Making WordPress.org


Ignore:
Timestamp:
03/12/2024 05:27:53 AM (6 months ago)
Author:
dd32
Message:

wporg-plugins-2024: Adopt the new tile layout for the plugin cards, with description below the card header.

See #7469.

File:
1 edited

Legend:

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

    r13153 r13310  
    164164        global $wp_query;
    165165
    166         $metas   = [];
     166        $metas = [];
    167167
    168168        if ( is_singular( 'plugin' ) ) {
     
    306306     * @return string
    307307     */
    308     public static function get_star_rating( $post = null ) {
     308    public static function get_star_rating( $post = null, $linked = true ) {
    309309        $post = get_post( $post );
    310310
     
    322322                Template::dashicons_stars( $rating ) .
    323323                '<span class="rating-count">(' .
    324                     '<a href="https://wordpress.org/support/plugin/' . $post->post_name . '/reviews/">' .
     324                    ( $linked ? '<a href="https://wordpress.org/support/plugin/' . $post->post_name . '/reviews/">' : '' ) .
    325325                    sprintf(
    326326                        /* translators: 1: number of ratings */
     
    328328                        number_format_i18n( $num_ratings )
    329329                    ) .
    330                 '</a>' .
     330                ( $linked ? '</a>' : '' ) .
    331331                ')</span>' .
    332332            '</div>';
Note: See TracChangeset for help on using the changeset viewer.