Make WordPress Core


Ignore:
Timestamp:
11/26/2013 02:24:25 AM (10 years ago)
Author:
dd32
Message:

Replace the Star ratings in the dashboard with dashicons ratings.
This also moves the ratings to only displaying full, half, or empty stars (ie. 3.0, 3.5, 4.0, no 3.7 ratings - which are rounded).
Fixes #26170

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin-install.php

    r25956 r26380  
    414414        <?php if ( ! empty($api->rating) ) : ?>
    415415        <h2><?php _e('Average Rating') ?></h2>
    416         <div class="star-holder" title="<?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?>">
    417             <div class="star star-rating" style="width: <?php echo esc_attr( str_replace( ',', '.', $api->rating ) ); ?>px"></div>
    418         </div>
     416        <?php wp_star_rating( array( 'rating' => $api->rating, 'type' => 'percent', 'number' => $api->num_ratings ) ); ?>
    419417        <small><?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?></small>
    420418        <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.