Make WordPress Core

Changeset 40823


Ignore:
Timestamp:
05/23/2017 05:57:42 PM (7 years ago)
Author:
afercia
Message:

Administration: Fix some HTML validation errors.

Fixes some minor HTML issues in the admin and, most notably, changes the rel
attribute used in the List Tables from rel="permalink" to rel="bookmark".

Props mihai2u, pento, arena, topher1kenobe, michalzuber, stubgo.
Fixes #37004.

Location:
trunk/src/wp-admin
Files:
8 edited

Legend:

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

    r38880 r40823  
    651651}
    652652
    653 .form-table th.th-full {
     653.form-table th.th-full, /* Not used by core. Back-compat for pre-4.8 */
     654.form-table .td-full {
    654655    width: auto;
     656    padding: 20px 10px 20px 0;
    655657    font-weight: 400;
    656658}
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r40309 r40823  
    679679            }
    680680            $actions['view'] = sprintf(
    681                 '<a href="%s" aria-label="%s" rel="permalink">%s</a>',
     681                '<a href="%s" aria-label="%s" rel="bookmark">%s</a>',
    682682                get_permalink( $post->ID ),
    683683                /* translators: %s: attachment title */
     
    738738            if ( ! $this->is_trash ) {
    739739                $actions['view'] = sprintf(
    740                     '<a href="%s" aria-label="%s" rel="permalink">%s</a>',
     740                    '<a href="%s" aria-label="%s" rel="bookmark">%s</a>',
    741741                    get_permalink( $post->ID ),
    742742                    /* translators: %s: attachment title */
  • trunk/src/wp-admin/includes/class-wp-ms-sites-list-table.php

    r40393 r40823  
    550550        }
    551551
    552         $actions['visit']   = "<a href='" . esc_url( get_home_url( $blog['blog_id'], '/' ) ) . "' rel='permalink'>" . __( 'Visit' ) . '</a>';
     552        $actions['visit']   = "<a href='" . esc_url( get_home_url( $blog['blog_id'], '/' ) ) . "' rel='bookmark'>" . __( 'Visit' ) . '</a>';
    553553
    554554        /**
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r40361 r40823  
    12891289                    $preview_link = get_preview_post_link( $post );
    12901290                    $actions['view'] = sprintf(
    1291                         '<a href="%s" rel="permalink" aria-label="%s">%s</a>',
     1291                        '<a href="%s" rel="bookmark" aria-label="%s">%s</a>',
    12921292                        esc_url( $preview_link ),
    12931293                        /* translators: %s: post title */
     
    12981298            } elseif ( 'trash' != $post->post_status ) {
    12991299                $actions['view'] = sprintf(
    1300                     '<a href="%s" rel="permalink" aria-label="%s">%s</a>',
     1300                    '<a href="%s" rel="bookmark" aria-label="%s">%s</a>',
    13011301                    get_permalink( $post->ID ),
    13021302                    /* translators: %s: post title */
  • trunk/src/wp-admin/includes/class-wp-users-list-table.php

    r39757 r40823  
    259259    protected function extra_tablenav( $which ) {
    260260        $id = 'bottom' === $which ? 'new_role2' : 'new_role';
     261        $button_id = 'bottom' === $which ? 'changeit2' : 'changeit';
    261262    ?>
    262263    <div class="alignleft actions">
     
    268269        </select>
    269270    <?php
    270             submit_button( __( 'Change' ), '', 'changeit', false );
     271            submit_button( __( 'Change' ), '', $button_id, false );
    271272        endif;
    272273
     
    296297     */
    297298    public function current_action() {
    298         if ( isset( $_REQUEST['changeit'] ) &&
     299        if ( ( isset( $_REQUEST['changeit'] ) || isset( $_REQUEST['changeit2'] ) ) &&
    299300            ( ! empty( $_REQUEST['new_role'] ) || ! empty( $_REQUEST['new_role2'] ) ) ) {
    300301            return 'promote';
  • trunk/src/wp-admin/includes/template.php

    r40323 r40823  
    15211521        <div id="find-posts-head" class="find-box-head">
    15221522            <?php _e( 'Attach to existing content' ); ?>
    1523             <button type="button" id="find-posts-close"><span class="screen-reader-text"><?php _e( 'Close media attachment panel' ); ?></button>
     1523            <button type="button" id="find-posts-close"><span class="screen-reader-text"><?php _e( 'Close media attachment panel' ); ?></span></button>
    15241524        </div>
    15251525        <div class="find-box-inside">
  • trunk/src/wp-admin/options-general.php

    r39947 r40823  
    131131    ?>
    132132    <tr>
    133         <th width="33%" scope="row"><label for="WPLANG"><?php _e( 'Site Language' ); ?></label></th>
     133        <th scope="row"><label for="WPLANG"><?php _e( 'Site Language' ); ?></label></th>
    134134        <td>
    135135            <?php
     
    298298    echo '<label><input type="radio" name="date_format" id="date_format_custom_radio" value="\c\u\s\t\o\m"';
    299299    checked( $custom );
    300     echo '/> <span class="date-time-text date-time-custom-text">' . __( 'Custom:' ) . '<span class="screen-reader-text"> ' . __( 'enter a custom date format in the following field' ) . '</span></label>' .
     300    echo '/> <span class="date-time-text date-time-custom-text">' . __( 'Custom:' ) . '<span class="screen-reader-text"> ' . __( 'enter a custom date format in the following field' ) . '</span></span></label>' .
    301301        '<label for="date_format_custom" class="screen-reader-text">' . __( 'Custom date format:' ) . '</label>' .
    302         '<input type="text" name="date_format_custom" id="date_format_custom" value="' . esc_attr( get_option( 'date_format' ) ) . '" class="small-text" /></span>' .
     302        '<input type="text" name="date_format_custom" id="date_format_custom" value="' . esc_attr( get_option( 'date_format' ) ) . '" class="small-text" />' .
    303303        '<span class="screen-reader-text">' . __( 'example:' ) . ' </span> <span class="example">' . date_i18n( get_option( 'date_format' ) ) . '</span>' .
    304304        "<span class='spinner'></span>\n";
     
    334334    echo '<label><input type="radio" name="time_format" id="time_format_custom_radio" value="\c\u\s\t\o\m"';
    335335    checked( $custom );
    336     echo '/> <span class="date-time-text date-time-custom-text">' . __( 'Custom:' ) . '<span class="screen-reader-text"> ' . __( 'enter a custom time format in the following field' ) . '</span></label>' .
     336    echo '/> <span class="date-time-text date-time-custom-text">' . __( 'Custom:' ) . '<span class="screen-reader-text"> ' . __( 'enter a custom time format in the following field' ) . '</span></span></label>' .
    337337        '<label for="time_format_custom" class="screen-reader-text">' . __( 'Custom time format:' ) . '</label>' .
    338         '<input type="text" name="time_format_custom" id="time_format_custom" value="' . esc_attr( get_option( 'time_format' ) ) . '" class="small-text" /></span>' .
     338        '<input type="text" name="time_format_custom" id="time_format_custom" value="' . esc_attr( get_option( 'time_format' ) ) . '" class="small-text" />' .
    339339        '<span class="screen-reader-text">' . __( 'example:' ) . ' </span> <span class="example">' . date_i18n( get_option( 'time_format' ) ) . '</span>' .
    340340        "<span class='spinner'></span>\n";
  • trunk/src/wp-admin/options-media.php

    r38720 r40823  
    119119</td>
    120120</tr>
     121<tr>
     122<td colspan="2" class="td-full">
     123<?php else : ?>
     124<tr>
     125<td class="td-full">
    121126<?php endif; ?>
    122 <tr>
    123 <th scope="row" colspan="2" class="th-full">
    124127<label for="uploads_use_yearmonth_folders">
    125128<input name="uploads_use_yearmonth_folders" type="checkbox" id="uploads_use_yearmonth_folders" value="1"<?php checked('1', get_option('uploads_use_yearmonth_folders')); ?> />
    126129<?php _e('Organize my uploads into month- and year-based folders'); ?>
    127130</label>
    128 </th>
     131</td>
    129132</tr>
    130133
Note: See TracChangeset for help on using the changeset viewer.