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:
parent
e1e041271e
commit
b2411e9e3f
|
@ -167,7 +167,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
wp.updates.addAdminNotice = function( data ) {
|
wp.updates.addAdminNotice = function( data ) {
|
||||||
var $notice = $( data.selector ), $adminNotice;
|
var $notice = $( data.selector ),
|
||||||
|
$headerEnd = $( '.wp-header-end' ),
|
||||||
|
$adminNotice;
|
||||||
|
|
||||||
delete data.selector;
|
delete data.selector;
|
||||||
$adminNotice = wp.updates.adminNotice( data );
|
$adminNotice = wp.updates.adminNotice( data );
|
||||||
|
@ -179,6 +181,8 @@
|
||||||
|
|
||||||
if ( $notice.length ) {
|
if ( $notice.length ) {
|
||||||
$notice.replaceWith( $adminNotice );
|
$notice.replaceWith( $adminNotice );
|
||||||
|
} else if ( $headerEnd.length ) {
|
||||||
|
$headerEnd.after( $adminNotice );
|
||||||
} else {
|
} else {
|
||||||
if ( 'customize' === pagenow ) {
|
if ( 'customize' === pagenow ) {
|
||||||
$( '.customize-themes-notifications' ).append( $adminNotice );
|
$( '.customize-themes-notifications' ).append( $adminNotice );
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue