Making WordPress.org

Ticket #2409: meta-2409.patch

File meta-2409.patch, 1.3 KB (added by SergeyBiryukov, 8 years ago)
  • inc/class-plugin-directory-compat.php

     
    105105                        $create_label = \WPORG_Ratings::get_user_rating( 'plugin', $this->slug(), get_current_user_id() ) ?
    106106                                __( 'Edit Review', 'wporg-forums' ) :
    107107                                __( 'Add Review', 'wporg-forums' );
    108                 } else {
     108                } elseif ( bbp_is_single_forum() && bbp_current_user_can_access_create_topic_form() ) {
    109109                        $create_label = __( 'Create Topic', 'wporg-forums' );
    110110                }
    111111                if ( $create_label ) {
  • inc/class-theme-directory-compat.php

     
    103103                        $create_label = \WPORG_Ratings::get_user_rating( 'theme', $this->slug(), get_current_user_id() ) ?
    104104                                __( 'Edit Review', 'wporg-forums' ) :
    105105                                __( 'Add Review', 'wporg-forums' );
    106                 } elseif ( bbp_current_user_can_access_create_topic_form() ) {
     106                } elseif ( bbp_is_single_forum() && bbp_current_user_can_access_create_topic_form() ) {
    107107                        $create_label = __( 'Create Topic', 'wporg-forums' );
    108108                }
    109109                if ( $create_label ) {