Changeset 64282 for trunk/src/js/_enqueues/admin/common.js
- Timestamp:
- 10/10/2026 02:18:37 PM (4 days ago)
- File:
-
- 1 edited
-
trunk/src/js/_enqueues/admin/common.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/common.js
r64133 r64282 1076 1076 } 1077 1077 1078 /*1079 * The `.below-h2` class is here just for backward compatibility with plugins1080 * that are (incorrectly) using it. Do not use. Use `.inline` instead. See #34570.1081 * If '.wp-header-end' is found, append the notices after it otherwise1082 * after the first h1 or h2 heading found within the main content.1083 */1084 if ( ! $headerEnd.length ) {1085 $headerEnd = $( '.wrap h1, .wrap h2' ).first();1086 }1087 $( 'div.updated, div.error, div.notice' ).not( '.inline, .below-h2' ).insertAfter( $headerEnd );1088 1089 1078 /** 1090 1079 * Makes notices dismissible. … … 1525 1514 input.on('change', toggleUploadButton); 1526 1515 })(); 1516 1517 /** 1518 * Moves the admin notices into an `aside` element after the first `h1`. 1519 * Prior to 7.2.0, admin notices were only moved after the first `h1`; 1520 * The `aside` wrapper was added in 7.2.0. 1521 * 1522 * @since 7.2.0 1523 * 1524 * @return {void} 1525 */ 1526 function moveAdminNotices() { 1527 /* 1528 * The `.below-h2` class is here just for backward compatibility with plugins 1529 * that are (incorrectly) using it. Do not use. Use `.inline` instead. See #34570. 1530 * If '.wp-header-end' is found, append the notices after it otherwise 1531 * after the first h1 or h2 heading found within the main content. 1532 */ 1533 if ( ! $headerEnd.length ) { 1534 $headerEnd = $( '.wrap h1, .wrap h2' ).first(); 1535 } 1536 const $notices = $( 'div.updated, div.error, div.notice' ).not( '.inline, .below-h2' ); 1537 if ( $notices.length ) { 1538 const $wpAdminNotices = $( '<aside id="wp-admin-notices"></aside>' ).attr( 'aria-label', __( 'Admin Notices' ) ).insertAfter( $headerEnd ); 1539 $notices.appendTo( $wpAdminNotices ); 1540 } 1541 } 1527 1542 1528 1543 /** … … 2128 2143 2129 2144 window.wpResponsive.init(); 2145 moveAdminNotices(); 2130 2146 setPinMenu(); 2131 2147 setMenuState();
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)