Making WordPress.org


Ignore:
Timestamp:
04/15/2015 09:19:21 AM (11 years ago)
Author:
dd32
Message:

Theme Directory: Consolidate some ratings strings, and round the value to .5 stars, previously it would display 5 stars, yet say 4.8 stars.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content-single.php

    r1477 r1478  
    8181                                                <span class="four"></span>
    8282                                                <span class="five"></span>
    83                                                 <p class="description"><?php printf( __( '%s out of 5 stars.', 'wporg-themes' ), '<span itemprop="ratingValue">' . number_format_i18n( $theme->rating / 20, 1 )  . '</span>' ); ?></p>
     83                                                <p class="description"><?php printf( __( '%s out of 5 stars.', 'wporg-themes' ), '<span itemprop="ratingValue">' . number_format_i18n( round($theme->rating / 20 / 0.5)*0.5, 1 )  . '</span>' ); ?></p>
    8484                                        </div>
    8585                                <?php else : ?>
Note: See TracChangeset for help on using the changeset viewer.