WordPress.org

Making WordPress.org


Ignore:
Timestamp:
04/22/2016 06:17:23 AM (3 years ago)
Author:
dd32
Message:

Plugin Directory: Add ratings count postmeta display to admin and plugin cards.
Still to come is a Widget to allow rating & reviewing a plugin.

See #1575

File:
1 edited

Legend:

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

    r2612 r2998  
    1515
    1616    <div class="plugin-card-bottom">
    17         <!-- <div class="vers column-rating">
    18             <div class='wporg-ratings' title='4 out of 5 stars' style='color:#ffb900;'><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-empty"></span></div><span class="num-ratings" title="Rating based on 813 reviews">(813)</span>
    19         </div> -->
     17        <div class="vers column-rating">
     18            <?php
     19                if ( function_exists( 'wporg_get_dashicons_stars' ) ) {
     20                    echo wporg_get_dashicons_stars( get_post_meta( $post->ID, 'rating', true ) );
     21                }
     22            ?>
     23        </div>
    2024        <div class="column-updated">
    2125            <strong><?php _e( 'Last Updated:', 'wporg-plugins' ); ?></strong> <?php echo wporg_plugins_template_last_updated(); ?>
Note: See TracChangeset for help on using the changeset viewer.