Making WordPress.org

Changeset 8917


Ignore:
Timestamp:
06/05/2019 04:03:07 AM (4 years ago)
Author:
dd32
Message:

Plugin Directory: Always link to the 'pretty permalink' of reviews, now that the caches will have cleared.

Amends [8474].
See #4286.

File:
1 edited

Legend:

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

    r8474 r8917  
    3131            foreach ( $reviews as $review ) :
    3232                setup_postdata( $review );
    33                 if ( !empty( $review->post_name ) ) {
    34                     $url = 'https://wordpress.org/support/topic/' . $review->post_name . '/';
    35                 } else {
    36                     $url = add_query_arg( array( 'p' => $review->ID ), 'https://wordpress.org/support/plugin/' );
    37                 }
    3833                ?>
    3934                <article class="plugin-review">
     
    4237                    </div><div class="review">
    4338                        <header>
    44                             <h3 class="review-title"><a class="url" href="<?php echo esc_url( $url ); ?>"><?php echo get_the_title( $review ); ?></a></h3>
     39                            <h3 class="review-title"><a class="url" href="<?php echo esc_url( 'https://wordpress.org/support/topic/' . $review->post_name . '/' ); ?>"><?php echo get_the_title( $review ); ?></a></h3>
    4540                            <?php echo Template::dashicons_stars( $review->post_rating ); ?>
    4641                            <span class="review-author author vcard"><?php the_author_posts_link(); ?></span>
Note: See TracChangeset for help on using the changeset viewer.