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.

Built from https://develop.svn.wordpress.org/trunk@40823


git-svn-id: http://core.svn.wordpress.org/trunk@40680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2017-05-23 17:58:43 +00:00
parent da0a505497
commit 3aabc09e9c
14 changed files with 31 additions and 23 deletions

View File

@ -650,8 +650,10 @@ ul#add-to-blog-users {
font-weight: 600;
}
.form-table th.th-full {
.form-table th.th-full, /* Not used by core. Back-compat for pre-4.8 */
.form-table .td-full {
width: auto;
padding: 20px 0 20px 10px;
font-weight: 400;
}

File diff suppressed because one or more lines are too long

View File

@ -650,8 +650,10 @@ ul#add-to-blog-users {
font-weight: 600;
}
.form-table th.th-full {
.form-table th.th-full, /* Not used by core. Back-compat for pre-4.8 */
.form-table .td-full {
width: auto;
padding: 20px 10px 20px 0;
font-weight: 400;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -678,7 +678,7 @@ class WP_Media_List_Table extends WP_List_Table {
}
}
$actions['view'] = sprintf(
'<a href="%s" aria-label="%s" rel="permalink">%s</a>',
'<a href="%s" aria-label="%s" rel="bookmark">%s</a>',
get_permalink( $post->ID ),
/* translators: %s: attachment title */
esc_attr( sprintf( __( 'View &#8220;%s&#8221;' ), $att_title ) ),
@ -737,7 +737,7 @@ class WP_Media_List_Table extends WP_List_Table {
}
if ( ! $this->is_trash ) {
$actions['view'] = sprintf(
'<a href="%s" aria-label="%s" rel="permalink">%s</a>',
'<a href="%s" aria-label="%s" rel="bookmark">%s</a>',
get_permalink( $post->ID ),
/* translators: %s: attachment title */
esc_attr( sprintf( __( 'View &#8220;%s&#8221;' ), $att_title ) ),

View File

@ -549,7 +549,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
}
}
$actions['visit'] = "<a href='" . esc_url( get_home_url( $blog['blog_id'], '/' ) ) . "' rel='permalink'>" . __( 'Visit' ) . '</a>';
$actions['visit'] = "<a href='" . esc_url( get_home_url( $blog['blog_id'], '/' ) ) . "' rel='bookmark'>" . __( 'Visit' ) . '</a>';
/**
* Filters the action links displayed for each site in the Sites list table.

View File

@ -1288,7 +1288,7 @@ class WP_Posts_List_Table extends WP_List_Table {
if ( $can_edit_post ) {
$preview_link = get_preview_post_link( $post );
$actions['view'] = sprintf(
'<a href="%s" rel="permalink" aria-label="%s">%s</a>',
'<a href="%s" rel="bookmark" aria-label="%s">%s</a>',
esc_url( $preview_link ),
/* translators: %s: post title */
esc_attr( sprintf( __( 'Preview &#8220;%s&#8221;' ), $title ) ),
@ -1297,7 +1297,7 @@ class WP_Posts_List_Table extends WP_List_Table {
}
} elseif ( 'trash' != $post->post_status ) {
$actions['view'] = sprintf(
'<a href="%s" rel="permalink" aria-label="%s">%s</a>',
'<a href="%s" rel="bookmark" aria-label="%s">%s</a>',
get_permalink( $post->ID ),
/* translators: %s: post title */
esc_attr( sprintf( __( 'View &#8220;%s&#8221;' ), $title ) ),

View File

@ -258,6 +258,7 @@ class WP_Users_List_Table extends WP_List_Table {
*/
protected function extra_tablenav( $which ) {
$id = 'bottom' === $which ? 'new_role2' : 'new_role';
$button_id = 'bottom' === $which ? 'changeit2' : 'changeit';
?>
<div class="alignleft actions">
<?php if ( current_user_can( 'promote_users' ) && $this->has_items() ) : ?>
@ -267,7 +268,7 @@ class WP_Users_List_Table extends WP_List_Table {
<?php wp_dropdown_roles(); ?>
</select>
<?php
submit_button( __( 'Change' ), '', 'changeit', false );
submit_button( __( 'Change' ), '', $button_id, false );
endif;
/**
@ -295,7 +296,7 @@ class WP_Users_List_Table extends WP_List_Table {
* @return string The bulk action required.
*/
public function current_action() {
if ( isset( $_REQUEST['changeit'] ) &&
if ( ( isset( $_REQUEST['changeit'] ) || isset( $_REQUEST['changeit2'] ) ) &&
( ! empty( $_REQUEST['new_role'] ) || ! empty( $_REQUEST['new_role2'] ) ) ) {
return 'promote';
}

View File

@ -1520,7 +1520,7 @@ function find_posts_div($found_action = '') {
<div id="find-posts" class="find-box" style="display: none;">
<div id="find-posts-head" class="find-box-head">
<?php _e( 'Attach to existing content' ); ?>
<button type="button" id="find-posts-close"><span class="screen-reader-text"><?php _e( 'Close media attachment panel' ); ?></button>
<button type="button" id="find-posts-close"><span class="screen-reader-text"><?php _e( 'Close media attachment panel' ); ?></span></button>
</div>
<div class="find-box-inside">
<div class="find-box-search">

View File

@ -130,7 +130,7 @@ if ( ! is_multisite() && defined( 'WPLANG' ) && '' !== WPLANG && 'en_US' !== WPL
if ( ! empty( $languages ) || ! empty( $translations ) ) {
?>
<tr>
<th width="33%" scope="row"><label for="WPLANG"><?php _e( 'Site Language' ); ?></label></th>
<th scope="row"><label for="WPLANG"><?php _e( 'Site Language' ); ?></label></th>
<td>
<?php
$locale = get_locale();
@ -297,9 +297,9 @@ if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists
echo '<label><input type="radio" name="date_format" id="date_format_custom_radio" value="\c\u\s\t\o\m"';
checked( $custom );
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>' .
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>' .
'<label for="date_format_custom" class="screen-reader-text">' . __( 'Custom date format:' ) . '</label>' .
'<input type="text" name="date_format_custom" id="date_format_custom" value="' . esc_attr( get_option( 'date_format' ) ) . '" class="small-text" /></span>' .
'<input type="text" name="date_format_custom" id="date_format_custom" value="' . esc_attr( get_option( 'date_format' ) ) . '" class="small-text" />' .
'<span class="screen-reader-text">' . __( 'example:' ) . ' </span> <span class="example">' . date_i18n( get_option( 'date_format' ) ) . '</span>' .
"<span class='spinner'></span>\n";
?>
@ -333,9 +333,9 @@ if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists
echo '<label><input type="radio" name="time_format" id="time_format_custom_radio" value="\c\u\s\t\o\m"';
checked( $custom );
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>' .
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>' .
'<label for="time_format_custom" class="screen-reader-text">' . __( 'Custom time format:' ) . '</label>' .
'<input type="text" name="time_format_custom" id="time_format_custom" value="' . esc_attr( get_option( 'time_format' ) ) . '" class="small-text" /></span>' .
'<input type="text" name="time_format_custom" id="time_format_custom" value="' . esc_attr( get_option( 'time_format' ) ) . '" class="small-text" />' .
'<span class="screen-reader-text">' . __( 'example:' ) . ' </span> <span class="example">' . date_i18n( get_option( 'time_format' ) ) . '</span>' .
"<span class='spinner'></span>\n";

View File

@ -118,14 +118,17 @@ if ( get_option('upload_url_path') || ( get_option('upload_path') != 'wp-content
<p class="description"><?php _e('Configuring this is optional. By default, it should be blank.'); ?></p>
</td>
</tr>
<?php endif; ?>
<tr>
<th scope="row" colspan="2" class="th-full">
<td colspan="2" class="td-full">
<?php else : ?>
<tr>
<td class="td-full">
<?php endif; ?>
<label for="uploads_use_yearmonth_folders">
<input name="uploads_use_yearmonth_folders" type="checkbox" id="uploads_use_yearmonth_folders" value="1"<?php checked('1', get_option('uploads_use_yearmonth_folders')); ?> />
<?php _e('Organize my uploads into month- and year-based folders'); ?>
</label>
</th>
</td>
</tr>
<?php do_settings_fields('media', 'uploads'); ?>

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-beta2-40822';
$wp_version = '4.8-beta2-40823';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.