Making WordPress.org

Changeset 13387


Ignore:
Timestamp:
03/26/2024 11:04:11 PM (4 months ago)
Author:
coffee2code
Message:

Support: Only display link to edit WP.org profile if on current user's profile or current user is caped.

Prevents forum moderators from seeing the link since they don't have the ability to edit WP.org profiles.

Props clorith, coffee2code.
Fixes #5454.

File:
1 edited

Legend:

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

    r12896 r13387  
    133133                </li>
    134134
     135                <?php $is_caped = function_exists( 'is_caped' ) && is_caped( get_current_user_id() ); ?>
     136                <?php if ( $is_caped || bbp_is_user_home() ) : ?>
    135137                <li>
    136138                    <span class="wporg-profile-edit-link">
     
    141143                    </span>
    142144                </li>
     145                <?php endif; ?>
    143146
    144147            <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.