Make WordPress Core


Ignore:
Timestamp:
10/10/2015 06:50:35 AM (9 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/includes/ajax-actions.php

    r34912 r35006  
    28022802        $theme->version     = wp_kses( $theme->version, $themes_allowedtags );
    28032803        $theme->description = wp_kses( $theme->description, $themes_allowedtags );
    2804         $theme->num_ratings = sprintf( _n( '(based on %s rating)', '(based on %s ratings)', $theme->num_ratings ), number_format_i18n( $theme->num_ratings ) );
     2804        $theme->stars       = wp_star_rating( array( 'rating' => $theme->rating, 'type' => 'percent', 'number' => $theme->num_ratings, 'echo' => false ) );
     2805        $theme->num_ratings = number_format_i18n( $theme->num_ratings );
    28052806        $theme->preview_url = set_url_scheme( $theme->preview_url );
    28062807    }
Note: See TracChangeset for help on using the changeset viewer.