Make WordPress Core

Changeset 35238


Ignore:
Timestamp:
10/17/2015 07:03:30 AM (11 years ago)
Author:
iseulde
Message:

Admin: fix repositioning notices

Fixes #34294.
Props afercia.

Location:
trunk/src
Files:
2 edited

Legend:

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

    r34325 r35238  
    370370        }
    371371
    372         // Move .notice, .updated and .error alert boxes. Don't move boxes designed to be inline.
    373         $firstHeading = $( '.wrap > h1:first' );
    374 
    375         // Back compatibility: if there is no H1, apply to first H2.
    376         if ( ! $firstHeading.length ) {
    377                 $firstHeading = $( '.wrap h2:first' );
    378         }
    379 
    380         $firstHeading.nextAll( 'div.updated, div.error, div.notice' ).addClass( 'below-h2' );
    381         $( 'div.updated, div.error, div.notice' ).not( '.below-h2, .inline' ).insertAfter( $firstHeading );
     372        $( 'div.updated, div.error, div.notice' ).not( '.inline' ).insertAfter( $( '.wrap' ).children( ':header' ).first() );
    382373
    383374        // Make notices dismissible
  • trunk/src/wp-includes/js/autosave.js

    r34027 r35238  
    346346                                };
    347347
    348                                 $notice = $( '#local-storage-notice' );
    349                                 $('.wrap h2').first().after( $notice.addClass( 'notice-warning' ).show() );
     348                                $notice = $( '#local-storage-notice' )
     349                                        .insertAfter( $( '.wrap' ).children( ':header' ).first() )
     350                                        .addClass( 'notice-warning' )
     351                                        .show();
    350352
    351353                                $notice.on( 'click.autosave-local', function( event ) {
Note: See TracChangeset for help on using the changeset viewer.