From 95fd7b15908a6218d1c85f4bd065b34748ed8665 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 2 Jan 2015 18:51:52 +0000 Subject: [PATCH] Move the (recently added) `.notice` admin notices below the first H2, same as the `.updated` and `.error` notices. Props sippis, fixes #30885. git-svn-id: https://develop.svn.wordpress.org/trunk@31023 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/common.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/js/common.js b/src/wp-admin/js/common.js index 01ce8945d4..f4253b3a6b 100644 --- a/src/wp-admin/js/common.js +++ b/src/wp-admin/js/common.js @@ -171,7 +171,7 @@ $('.contextual-help-tabs').delegate('a', 'click', function(e) { }); $(document).ready( function() { - var checks, first, last, checked, sliced, mobileEvent, transitionTimeout, focusedRowActions, + var checks, first, last, checked, sliced, mobileEvent, transitionTimeout, focusedRowActions, $firstHeading, lastClicked = false, pageInput = $('input.current-page'), currentPage = pageInput.val(), @@ -368,9 +368,10 @@ $(document).ready( function() { }); } - // Move .updated and .error alert boxes. Don't move boxes designed to be inline. - $('div.wrap h2:first').nextAll('div.updated, div.error').addClass('below-h2'); - $('div.updated, div.error').not('.below-h2, .inline').insertAfter( $('div.wrap h2:first') ); + // Move .notice, .updated and .error alert boxes. Don't move boxes designed to be inline. + $firstHeading = $( 'div.wrap h2:first' ); + $firstHeading.nextAll( 'div.updated, div.error, div.notice' ).addClass( 'below-h2' ); + $( 'div.updated, div.error, div.notice' ).not( '.below-h2, .inline' ).insertAfter( $firstHeading ); // Init screen meta screenMeta.init();