Making WordPress.org

Changeset 5005


Ignore:
Timestamp:
02/24/2017 07:50:20 PM (7 years ago)
Author:
coffee2code
Message:

Support Theme: Ensure only moderators can see the notice for flagged users on user profiles.

See #2493.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/user-profile.php

    r5004 r5005  
    1313    <h2 class="entry-title"><?php esc_html_e( 'Profile', 'wporg-forums' ); ?></h2>
    1414    <div class="bbp-user-section"><?php
    15         if ( class_exists( 'WordPressdotorg\Forums\User_Moderation\Plugin' ) ) {
     15        if ( current_user_can( 'moderate' ) && class_exists( 'WordPressdotorg\Forums\User_Moderation\Plugin' ) ) {
    1616            $is_user_flagged = WordPressdotorg\Forums\User_Moderation\Plugin::get_instance()->is_user_flagged( bbp_get_displayed_user_id() );
    1717            $moderator       = get_user_meta( bbp_get_displayed_user_id(), '_wporg_bbp_moderator', true );
Note: See TracChangeset for help on using the changeset viewer.