Making WordPress.org


Ignore:
Timestamp:
04/22/2016 06:17:23 AM (9 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/plugins/plugin-directory/admin/list-table/class-plugin-posts.php

    r2994 r2998  
    159159     */
    160160    public function column_rating( $post ) {
    161         $rating = (string) get_post_meta( $post->ID, 'avg_rating', true );
    162         if ( ! empty( $rating ) && function_exists( 'wporg_get_dashicons_stars' ) ) {
    163             echo wporg_get_dashicons_stars( $rating / 20 );
     161        if ( function_exists( 'wporg_get_dashicons_stars' ) ) {
     162            echo wporg_get_dashicons_stars( get_post_meta( $post->ID, 'rating', true ) );
    164163        }
    165164    }
Note: See TracChangeset for help on using the changeset viewer.