Making WordPress.org


Ignore:
Timestamp:
03/31/2020 04:47:04 AM (6 years ago)
Author:
dd32
Message:

Plugin Directory: Add a login link to add reviews, and a notice when there's no reviews for the plugin.

This differs from the ticket patches slightly, in that it adds the login link to the sidebar rather than the notice, for consistency when a plugin has existing reviews.

Props dufresnesteven.
Fixes #4383.

File:
1 edited

Legend:

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

    r7282 r9652  
    8181                <a class="button button-secondary" href="<?php echo esc_url( 'https://wordpress.org/support/plugin/' . $post->post_name . '/reviews/#new-post' ); ?>"><?php _e( 'Add my review', 'wporg-plugins' ); ?></a>
    8282            </div>
     83        <?php else: ?>
     84            <div class="user-rating">
     85                <a href="<?php echo esc_url( wp_login_url( 'https://wordpress.org/support/plugin/' . get_post()->post_name . '/reviews/#new-post' ) ); ?>" rel="nofollow" title="<?php esc_attr_e( 'Log in to Wordpress.org', 'wporg-plugins' ); ?>"><?php _e( 'Log in to submit a review.', 'wporg-plugins' ); ?></a>
     86            </div>
    8387        <?php
    8488        endif;
Note: See TracChangeset for help on using the changeset viewer.