Make WordPress Core

Changeset 38983

Timestamp:
10/27/2016 08:38:09 PM (8 years ago)
Author:
afercia
Message:

Accessibility: Remove inappropriate content from the Posts and Edit screens headings.

Props grahamarmfield, SergeyBiryukov, trishasalas, valendesigns, rianrietveld, afercia.

See #26601.

Location:
trunk/src
Files:
5 edited

Legend:

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

    r38893 r38983  
    573573    font-weight: 400;
    574574    margin: 0;
    575     padding: 9px 15px 4px 0;
     575    padding: 9px 4px 0;
    576576    line-height: 29px;
     577
     578
     579
     580
     581
     582
     583
     584
     585
     586
    577587}
    578588
     
    609619}
    610620
     621
     622
     623
     624
    611625.wrap .add-new-h2:hover, /* deprecated */
    612626.wrap .page-title-action:hover {
     
    36553669    }
    36563670
     3671
     3672
     3673
     3674
    36573675    .wrap .add-new-h2, /* deprecated */
    36583676    .wrap .add-new-h2:active, /* deprecated */
  • trunk/src/wp-admin/edit-form-advanced.php

    r38951 r38983  
    475475
    476476<div class="wrap">
    477 <h1><?php
     477<h1><?php
    478478echo esc_html( $title );
    479 if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create_posts ) )
     479?></h1>
     480
     481<?php
     482if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create_posts ) ) {
    480483    echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
    481 ?></h1>
     484}
     485?>
     486
     487<hr class="wp-header-end">
     488
    482489<?php if ( $notice ) : ?>
    483490<div id="notice" class="notice notice-warning"><p id="has-newer-autosave"><?php echo $notice ?></p></div>
  • trunk/src/wp-admin/edit.php

    r38958 r38983  
    304304?>
    305305<div class="wrap">
    306 <h1><?php
     306<h1><?php
    307307echo esc_html( $post_type_object->labels->name );
    308 if ( current_user_can( $post_type_object->cap->create_posts ) )
     308?></h1>
     309
     310<?php
     311if ( current_user_can( $post_type_object->cap->create_posts ) ) {
    309312    echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
     313
    310314
    311315if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
     
    313317    printf( ' <span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', get_search_query() );
    314318}
    315 ?></h1>
     319?>
     320
     321<hr class="wp-header-end">
    316322
    317323<?php
  • trunk/src/wp-admin/js/common.js

    r38706 r38983  
    203203            adminbar: $adminbar.height(),
    204204            menu: $adminMenuWrap.height()
    205         };
     205        },
     206        $headerEnd = $( '.wp-header-end' );
    206207
    207208
     
    397398     * The `.below-h2` class is here just for backward compatibility with plugins
    398399     * that are (incorrectly) using it. Do not use. Use `.inline` instead. See #34570.
     400
     401
    399402     */
    400     $( 'div.updated, div.error, div.notice' ).not( '.inline, .below-h2' ).insertAfter( $( '.wrap h1, .wrap h2' ).first() );
     403    if ( ! $headerEnd.length ) {
     404        $headerEnd = $( '.wrap h1, .wrap h2' ).first();
     405    }
     406    $( 'div.updated, div.error, div.notice' ).not( '.inline, .below-h2' ).insertAfter( $headerEnd );
    401407
    402408    // Make notices dismissible
  • trunk/src/wp-includes/js/autosave.js

    r37737 r38983  
    316316                    postData = getSavedPostData(),
    317317                    cookie = wpCookies.get( 'wp-saving-post' ),
    318                     $newerAutosaveNotice = $( '#has-newer-autosave' ).parent( '.notice' );
     318                    $newerAutosaveNotice = $( '#has-newer-autosave' ).parent( '.notice' ),
     319                    $headerEnd = $( '.wp-header-end' );
    319320
    320321                if ( cookie === post_id + '-saved' ) {
     
    339340                }
    340341
     342
     343
     344
     345
     346
     347
     348
     349
    341350                $notice = $( '#local-storage-notice' )
    342                     .insertAfter( $( '.wrap h1, .wrap h2' ).first() )
     351                    .insertAfter( $ )
    343352                    .addClass( 'notice-warning' );
    344353
Note: See TracChangeset for help on using the changeset viewer.