Make WordPress Core


Ignore:
Timestamp:
10/10/2015 06:50:35 AM (11 years ago)
Author:
SergeyBiryukov
Message:

Use wp_star_rating() on Add Themes screen:

  • It works correctly for RTL
  • Requires less CSS styling
  • Is visually consistent with plugin ratings
  • Is more accessible

Fixes #34080.

File:
1 edited

Legend:

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

    r34891 r35006  
    243243                                <div class="theme-details">
    244244                                        <# if ( data.rating ) { #>
    245                                                 <div class="star-rating rating-{{ Math.round( data.rating / 10 ) * 10 }}">
    246                                                         <span class="one"></span><span class="two"></span><span class="three"></span><span class="four"></span><span class="five"></span>
    247                                                         <small class="ratings">{{ data.num_ratings }}</small>
     245                                                <div class="theme-rating">
     246                                                        {{{ data.stars }}}
     247                                                        <span class="num-ratings">({{ data.num_ratings }})</span>
    248248                                                </div>
    249249                                        <# } else { #>
    250                                                 <div class="star-rating">
    251                                                         <small class="ratings"><?php _e( 'This theme has not been rated yet.' ); ?></small>
    252                                                 </div>
     250                                                <span class="no-rating"><?php _e( 'This theme has not been rated yet.' ); ?></span>
    253251                                        <# } #>
    254252                                        <div class="theme-version"><?php printf( __( 'Version: %s' ), '{{ data.version }}' ); ?></div>
Note: See TracChangeset for help on using the changeset viewer.