From 4f83e56f58481a1c8072a87a5199531e813ad2b6 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Tue, 23 May 2017 17:57:42 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@40823 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/forms.css | 4 +++- src/wp-admin/includes/class-wp-media-list-table.php | 4 ++-- src/wp-admin/includes/class-wp-ms-sites-list-table.php | 2 +- src/wp-admin/includes/class-wp-posts-list-table.php | 4 ++-- src/wp-admin/includes/class-wp-users-list-table.php | 5 +++-- src/wp-admin/includes/template.php | 2 +- src/wp-admin/options-general.php | 10 +++++----- src/wp-admin/options-media.php | 9 ++++++--- 8 files changed, 23 insertions(+), 17 deletions(-) diff --git a/src/wp-admin/css/forms.css b/src/wp-admin/css/forms.css index f0b1b372ea..b46cb5f3b4 100644 --- a/src/wp-admin/css/forms.css +++ b/src/wp-admin/css/forms.css @@ -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; } diff --git a/src/wp-admin/includes/class-wp-media-list-table.php b/src/wp-admin/includes/class-wp-media-list-table.php index 6e9e3629c7..002c79ecf3 100644 --- a/src/wp-admin/includes/class-wp-media-list-table.php +++ b/src/wp-admin/includes/class-wp-media-list-table.php @@ -678,7 +678,7 @@ class WP_Media_List_Table extends WP_List_Table { } } $actions['view'] = sprintf( - '%s', + '%s', get_permalink( $post->ID ), /* translators: %s: attachment title */ esc_attr( sprintf( __( 'View “%s”' ), $att_title ) ), @@ -737,7 +737,7 @@ class WP_Media_List_Table extends WP_List_Table { } if ( ! $this->is_trash ) { $actions['view'] = sprintf( - '%s', + '%s', get_permalink( $post->ID ), /* translators: %s: attachment title */ esc_attr( sprintf( __( 'View “%s”' ), $att_title ) ), diff --git a/src/wp-admin/includes/class-wp-ms-sites-list-table.php b/src/wp-admin/includes/class-wp-ms-sites-list-table.php index 4a43775377..1afb0c43c4 100644 --- a/src/wp-admin/includes/class-wp-ms-sites-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-sites-list-table.php @@ -549,7 +549,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table { } } - $actions['visit'] = "" . __( 'Visit' ) . ''; + $actions['visit'] = "" . __( 'Visit' ) . ''; /** * Filters the action links displayed for each site in the Sites list table. diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php index 9881c51889..cfe9866161 100644 --- a/src/wp-admin/includes/class-wp-posts-list-table.php +++ b/src/wp-admin/includes/class-wp-posts-list-table.php @@ -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( - '%s', + '%s', esc_url( $preview_link ), /* translators: %s: post title */ esc_attr( sprintf( __( 'Preview “%s”' ), $title ) ), @@ -1297,7 +1297,7 @@ class WP_Posts_List_Table extends WP_List_Table { } } elseif ( 'trash' != $post->post_status ) { $actions['view'] = sprintf( - '%s', + '%s', get_permalink( $post->ID ), /* translators: %s: post title */ esc_attr( sprintf( __( 'View “%s”' ), $title ) ), diff --git a/src/wp-admin/includes/class-wp-users-list-table.php b/src/wp-admin/includes/class-wp-users-list-table.php index 8c80e9070d..4ba5eef8be 100644 --- a/src/wp-admin/includes/class-wp-users-list-table.php +++ b/src/wp-admin/includes/class-wp-users-list-table.php @@ -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'; ?>
has_items() ) : ?> @@ -267,7 +268,7 @@ class WP_Users_List_Table extends WP_List_Table {
- +