mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 23:58:03 +00:00
Accessibility: Remove inappropriate content from the Posts and Edit screens headings.
Props grahamarmfield, SergeyBiryukov, trishasalas, valendesigns, rianrietveld, afercia. See #26601. git-svn-id: https://develop.svn.wordpress.org/trunk@38983 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -315,7 +315,8 @@ window.autosave = function() {
|
||||
var content, post_title, excerpt, $notice,
|
||||
postData = getSavedPostData(),
|
||||
cookie = wpCookies.get( 'wp-saving-post' ),
|
||||
$newerAutosaveNotice = $( '#has-newer-autosave' ).parent( '.notice' );
|
||||
$newerAutosaveNotice = $( '#has-newer-autosave' ).parent( '.notice' ),
|
||||
$headerEnd = $( '.wp-header-end' );
|
||||
|
||||
if ( cookie === post_id + '-saved' ) {
|
||||
wpCookies.remove( 'wp-saving-post' );
|
||||
@@ -338,8 +339,16 @@ window.autosave = function() {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* If '.wp-header-end' is found, append the notices after it otherwise
|
||||
* after the first h1 or h2 heading found within the main content.
|
||||
*/
|
||||
if ( ! $headerEnd.length ) {
|
||||
$headerEnd = $( '.wrap h1, .wrap h2' ).first();
|
||||
}
|
||||
|
||||
$notice = $( '#local-storage-notice' )
|
||||
.insertAfter( $( '.wrap h1, .wrap h2' ).first() )
|
||||
.insertAfter( $headerEnd )
|
||||
.addClass( 'notice-warning' );
|
||||
|
||||
if ( $newerAutosaveNotice.length ) {
|
||||
|
||||
Reference in New Issue
Block a user