]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/autosave.js
WordPress 4.4
[autoinstalls/wordpress.git] / wp-includes / js / autosave.js
index 4e6834a15d3e1c0a4157c51e2c408cada6f48051..0ffc293f5b8100032e143cea4c6115f653977904 100644 (file)
@@ -286,7 +286,8 @@ window.autosave = function() {
                                                });
                                        }
 
-                                       wpCookies.set( 'wp-saving-post', post_id + '-check', 24 * 60 * 60 );
+                                       var secure = ( 'https:' === window.location.protocol );
+                                       wpCookies.set( 'wp-saving-post', post_id + '-check', 24 * 60 * 60, false, false, secure );
                                });
                        }
 
@@ -344,8 +345,10 @@ window.autosave = function() {
                                        excerpt: excerpt
                                };
 
-                               $notice = $( '#local-storage-notice' );
-                               $('.wrap h2').first().after( $notice.addClass( 'notice-warning' ).show() );
+                               $notice = $( '#local-storage-notice' )
+                                       .insertAfter( $( '.wrap' ).children( ':header' ).first() )
+                                       .addClass( 'notice-warning' )
+                                       .show();
 
                                $notice.on( 'click.autosave-local', function( event ) {
                                        var $target = $( event.target );