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.
Built from https://develop.svn.wordpress.org/trunk@42700


git-svn-id: http://core.svn.wordpress.org/trunk@42528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2018-02-11 17:28:30 +00:00
parent e1e041271e
commit b2411e9e3f
3 changed files with 7 additions and 3 deletions

View File

@ -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 );

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42699';
$wp_version = '5.0-alpha-42700';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.