Making WordPress.org


Ignore:
Timestamp:
09/08/2016 09:03:12 PM (8 years ago)
Author:
coffee2code
Message:

Plugin Directory: Switch to use new ratings functions tied to new reviews forum.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php

    r3680 r4008  
    818818                $post = get_post( $object_id );
    819819                // The WordPress.org global ratings functions
    820                 if ( ! function_exists( 'wporg_get_rating_avg' ) ) {
     820                if ( ! method_exists( '\WPORG_Ratings', 'get_avg_rating' ) ) {
    821821                    break;
    822822                }
    823823
    824                 $rating = wporg_get_rating_avg( 'plugin', $post->post_name );
     824                $rating = \WPORG_Ratings::get_avg_rating( 'plugin', $post->post_name );
    825825                $value  = array( $rating );
    826826                break;
     
    828828            case 'ratings':
    829829                $post = get_post( $object_id );
    830                 if ( ! function_exists( 'wporg_get_rating_counts' ) ) {
     830                if ( ! method_exists( '\WPORG_Ratings', 'get_rating_counts' ) ) {
    831831                    break;
    832832                }
    833833
    834                 $ratings = wporg_get_rating_counts( 'plugin', $post->post_name );
     834                $ratings = \WPORG_Ratings::get_rating_counts( 'plugin', $post->post_name );
    835835                $value   = array( $ratings );
    836836                break;
Note: See TracChangeset for help on using the changeset viewer.