From 3ffaa37727f134308d82e4c20691e141a0c52b9f Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Wed, 4 Nov 2015 21:26:58 +0000 Subject: [PATCH] Admin: Ensure notices with the `below-h2` class are not repositioned after [35238]. Keeps the `.below-h2` class for backwards compatibility with plugins that are (incorrectly) using it. Plugins should use `.inline` instead. Props stephenharris. Fixes #34570. See #34294. git-svn-id: https://develop.svn.wordpress.org/trunk@35516 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/common.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/js/common.js b/src/wp-admin/js/common.js index b214228941..8484f8bcb3 100644 --- a/src/wp-admin/js/common.js +++ b/src/wp-admin/js/common.js @@ -393,7 +393,11 @@ $document.ready( function() { }); } - $( 'div.updated, div.error, div.notice' ).not( '.inline' ).insertAfter( $( '.wrap' ).children( ':header' ).first() ); + /* + * 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() ); // Make notices dismissible $( '.notice.is-dismissible' ).each( function() {