Changeset 4721
- Timestamp:
- 01/18/2017 07:20:06 PM (8 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-plugin-directory-compat.php
r4553 r4721 99 99 $active = sprintf( '<a href="//wordpress.org/support/plugin/%s/active">%s</a>', esc_attr( $this->slug() ), __( 'Active Topics', 'wporg-forums' ) ); 100 100 $reviews = sprintf( '<a href="//wordpress.org/support/plugin/%s/reviews/">Reviews</a>', esc_attr( $this->slug() ) ); 101 $create = ''; 102 103 $create_label = ''; 104 if ( $this->ratings && $this->ratings->is_rating_view() && bbp_current_user_can_access_create_reply_form() ) { 105 $create_label = \WPORG_Ratings::get_user_rating( 'plugin', $this->slug(), get_current_user_id() ) ? 106 __( 'Edit Review', 'wporg-forums' ) : 107 __( 'Add Review', 'wporg-forums' ); 108 } else { 109 $create_label = __( 'Create Topic', 'wporg-forums' ); 110 } 111 if ( $create_label ) { 112 $create = sprintf( '<a href="#new-post">%s</a>', $create_label ); 113 } 101 114 ?> 115 102 116 <div> 103 117 <h3>About this Plugin</h3> … … 111 125 <li><?php echo $active; ?></li> 112 126 <li><?php echo $reviews; ?></li> 127 <li class="create-topic"><?php echo $create; ?></li> 113 128 </ul> 114 129 </div> -
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-theme-directory-compat.php
r4553 r4721 97 97 $active = sprintf( '<a href="//wordpress.org/support/theme/%s/active">%s</a>', esc_attr( $this->slug() ), __( 'Active Topics', 'wporg-forums' ) ); 98 98 $reviews = sprintf( '<a href="//wordpress.org/support/theme/%s/reviews/">Reviews</a>', esc_attr( $this->slug() ) ); 99 $create = ''; 100 101 $create_label = ''; 102 if ( $this->ratings && $this->ratings->is_rating_view() && bbp_current_user_can_access_create_reply_form() ) { 103 $create_label = \WPORG_Ratings::get_user_rating( 'theme', $this->slug(), get_current_user_id() ) ? 104 __( 'Edit Review', 'wporg-forums' ) : 105 __( 'Add Review', 'wporg-forums' ); 106 } elseif ( bbp_current_user_can_access_create_topic_form() ) { 107 $create_label = __( 'Create Topic', 'wporg-forums' ); 108 } 109 if ( $create_label ) { 110 $create = sprintf( '<a href="#new-post">%s</a>', $create_label ); 111 } 99 112 ?> 100 113 <div> … … 105 118 <li><?php echo $active; ?></li> 106 119 <li><?php echo $reviews; ?></li> 120 <li class="create-topic"><?php echo $create; ?></li> 107 121 </ul> 108 122 </div>
Note: See TracChangeset
for help on using the changeset viewer.