Administration: Make sure wp.updates.addAdminNotice
is displayed after the page header and does not unexpectedly push down "Add New" and other buttons.
Props shivapoudel. Fixes #41221. git-svn-id: https://develop.svn.wordpress.org/trunk@42700 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1ac83e86f5
commit
ff8e7c03d2
@ -167,7 +167,9 @@
|
||||
*
|
||||
*/
|
||||
wp.updates.addAdminNotice = function( data ) {
|
||||
var $notice = $( data.selector ), $adminNotice;
|
||||
var $notice = $( data.selector ),
|
||||
$headerEnd = $( '.wp-header-end' ),
|
||||
$adminNotice;
|
||||
|
||||
delete data.selector;
|
||||
$adminNotice = wp.updates.adminNotice( data );
|
||||
@ -179,6 +181,8 @@
|
||||
|
||||
if ( $notice.length ) {
|
||||
$notice.replaceWith( $adminNotice );
|
||||
} else if ( $headerEnd.length ) {
|
||||
$headerEnd.after( $adminNotice );
|
||||
} else {
|
||||
if ( 'customize' === pagenow ) {
|
||||
$( '.customize-themes-notifications' ).append( $adminNotice );
|
||||
|
Loading…
Reference in New Issue
Block a user