From 7270205975caa228a8001ff4c456596d220a5d14 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 26 Dec 2015 00:48:27 +0000 Subject: [PATCH] Remove redundant title attribute from `wp_star_rating()`. Hide the visible number of ratings from assistive technologies. This data is redundant, as the same information is already conveyed by the text hidden with `.screen-reader-text` class. Props afercia. Fixes #35141. Built from https://develop.svn.wordpress.org/trunk@36092 git-svn-id: http://core.svn.wordpress.org/trunk@36057 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-plugin-install-list-table.php | 2 +- wp-admin/includes/plugin-install.php | 2 +- wp-admin/includes/template.php | 6 +++--- wp-admin/theme-install.php | 2 +- wp-includes/version.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/wp-admin/includes/class-wp-plugin-install-list-table.php b/wp-admin/includes/class-wp-plugin-install-list-table.php index 2c1ade0afa..1e985c4689 100644 --- a/wp-admin/includes/class-wp-plugin-install-list-table.php +++ b/wp-admin/includes/class-wp-plugin-install-list-table.php @@ -526,7 +526,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
$plugin['rating'], 'type' => 'percent', 'number' => $plugin['num_ratings'] ) ); ?> - () +
diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php index 3e18d544d5..66747b7acf 100644 --- a/wp-admin/includes/plugin-install.php +++ b/wp-admin/includes/plugin-install.php @@ -572,7 +572,7 @@ function install_plugin_information() { rating ) ) { ?>

$api->rating, 'type' => 'percent', 'number' => $api->num_ratings ) ); ?> - num_ratings ), number_format_i18n( $api->num_ratings ) ); ?> + ratings ) && array_sum( (array) $api->ratings ) > 0 ) { diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 6176d30e71..08a366faf0 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -8,10 +8,10 @@ * @subpackage Administration */ -/** Walker_Category_Checklist class */ +/** Walker_Category_Checklist class */ require_once( ABSPATH . 'wp-admin/includes/class-walker-category-checklist.php' ); -/** WP_Internal_Pointers class */ +/** WP_Internal_Pointers class */ require_once( ABSPATH . 'wp-admin/includes/class-wp-internal-pointers.php' ); // @@ -2054,7 +2054,7 @@ function wp_star_rating( $args = array() ) { $title = sprintf( __( '%s rating' ), number_format_i18n( $rating, 1 ) ); } - $output = '
'; + $output = '
'; $output .= '' . $title . ''; $output .= str_repeat( '
', $full_stars ); $output .= str_repeat( '
', $half_stars ); diff --git a/wp-admin/theme-install.php b/wp-admin/theme-install.php index 76c9237122..6bcd7cdc98 100644 --- a/wp-admin/theme-install.php +++ b/wp-admin/theme-install.php @@ -259,7 +259,7 @@ if ( $tab ) { <# if ( data.rating ) { #>
{{{ data.stars }}} - ({{ data.num_ratings }}) +
<# } else { #> diff --git a/wp-includes/version.php b/wp-includes/version.php index 6485e63a48..b12fab047f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-36091'; +$wp_version = '4.5-alpha-36092'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.