WordPress.org

Making WordPress.org

Changeset 6159


Ignore:
Timestamp:
11/22/17 22:40:33 (3 weeks ago)
Author:
SergeyBiryukov
Message:

Support Forums: After [6156], add "Reviews Written" item to admin bar only on the main support forums, since reviews are only available there.

See #2951.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-users.php

    r6156 r6159  
    136136        ) ); 
    137137 
    138         $wp_admin_bar->add_menu( array( 
    139             'parent' => 'user-topics', 
    140             'id'     => 'reviews-written', 
    141             'title'  => __( 'Reviews Written', 'wporg-forums' ), 
    142             'href'   => bbp_get_user_profile_url( $user_id ) . 'reviews/', 
    143         ) ); 
     138        if ( defined( 'WPORG_SUPPORT_FORUMS_BLOGID' ) && WPORG_SUPPORT_FORUMS_BLOGID == get_current_blog_id() ) { 
     139            $wp_admin_bar->add_menu( array( 
     140                'parent' => 'user-topics', 
     141                'id'     => 'reviews-written', 
     142                'title'  => __( 'Reviews Written', 'wporg-forums' ), 
     143                'href'   => bbp_get_user_profile_url( $user_id ) . 'reviews/', 
     144            ) ); 
     145        } 
    144146 
    145147        $wp_admin_bar->add_menu( array( 
Note: See TracChangeset for help on using the changeset viewer.