diff --git a/src/wp-admin/js/common.js b/src/wp-admin/js/common.js index ae49ee0e41..6f66aeec8f 100644 --- a/src/wp-admin/js/common.js +++ b/src/wp-admin/js/common.js @@ -397,7 +397,7 @@ $document.ready( function() { * The `.below-h2` class is here just for backwards compatibility with plugins * that are (incorrectly) using it. Do not use. Use `.inline` instead. See #34570. */ - $( 'div.updated, div.error, div.notice' ).not( '.inline, .below-h2' ).insertAfter( $( '.wrap' ).children( ':header' ).first() ); + $( 'div.updated, div.error, div.notice' ).not( '.inline, .below-h2' ).insertAfter( $( '.wrap h1, .wrap h2' ).first() ); // Make notices dismissible function makeNoticesDismissible() { diff --git a/src/wp-includes/js/autosave.js b/src/wp-includes/js/autosave.js index 0ffc293f5b..85d5f84193 100644 --- a/src/wp-includes/js/autosave.js +++ b/src/wp-includes/js/autosave.js @@ -346,7 +346,7 @@ window.autosave = function() { }; $notice = $( '#local-storage-notice' ) - .insertAfter( $( '.wrap' ).children( ':header' ).first() ) + .insertAfter( $( '.wrap h1, .wrap h2' ).first() ) .addClass( 'notice-warning' ) .show();