Making WordPress.org

Changeset 1462


Ignore:
Timestamp:
03/30/2015 03:37:52 AM (10 years ago)
Author:
dd32
Message:

Themes Directory: Fix the Ratings output for the server-generated theme content.

File:
1 edited

Legend:

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

    r1439 r1462  
    11<?php
    22$slug  = get_post()->post_name;
    3 $theme = themes_api('theme_information', array( 'slug' => $slug ) );
     3$theme = themes_api('theme_information', array( 'slug' => $slug, 'fields' => array( 'ratings' => true ) ) );
    44?>
    55<div class="theme-navigation">
     
    7575
    7676                <?php if ( ! empty( $theme->ratings ) ) : ?>
    77                     <div class="rating rating-<?php echo esc_attr( number_format( $theme->rating ) ); ?>">
     77                    <div class="rating rating-<?php echo esc_attr( round( $theme->rating / 10, 0) * 10 ); ?>">
    7878                        <span class="one"></span>
    7979                        <span class="two"></span>
Note: See TracChangeset for help on using the changeset viewer.