WordPress.org

Make WordPress Core

Changeset 42700


Ignore:
Timestamp:
02/11/2018 05:27:17 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/updates.js

    r42604 r42700  
    168168     */
    169169    wp.updates.addAdminNotice = function( data ) {
    170         var $notice = $( data.selector ), $adminNotice;
     170        var $notice = $( data.selector ),
     171            $headerEnd = $( '.wp-header-end' ),
     172            $adminNotice;
    171173
    172174        delete data.selector;
     
    180182        if ( $notice.length ) {
    181183            $notice.replaceWith( $adminNotice );
     184        } else if ( $headerEnd.length ) {
     185            $headerEnd.after( $adminNotice );
    182186        } else {
    183187            if ( 'customize' === pagenow ) {
Note: See TracChangeset for help on using the changeset viewer.