Making WordPress.org


Ignore:
Timestamp:
11/24/2016 01:38:06 AM (8 years ago)
Author:
dd32
Message:

Plugin Directory: Clean up the section templates, bring some custom functionality into their respective shortcodes and shifting the read-more logic from CSS/JS to PHP/HTML.

File:
1 edited

Legend:

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

    r4388 r4410  
    1616    static function display() {
    1717        $reviews = Tools::get_plugin_reviews( get_post()->post_name );
     18        $review_count = array_sum( get_post_meta( get_the_ID(), 'ratings', true ) );
    1819
    1920        if ( empty( $reviews ) ) {
     
    5152        </div>
    5253
     54        <a class="reviews-link" href="<?php echo esc_url( 'https://wordpress.org/support/plugin/' . get_post()->post_name . '/reviews/' ); ?>">
     55            <?php printf( __( 'Read all %s reviews', 'wporg-plugins' ), number_format_i18n( $review_count ) ); ?>
     56        </a>
     57
    5358        <?php
    5459        return ob_get_clean();
Note: See TracChangeset for help on using the changeset viewer.