WordPress.org

Making WordPress.org

Ticket #2351: 2351.1.diff

File 2351.1.diff, 2.0 KB (added by Ipstenu, 3 years ago)
  • wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-author-card.php

     
    4545
    4646                                <span class="profile-links">
    4747                                        <a href="//profiles.wordpress.org/<?php echo $author->user_nicename; ?>">profile</a> |
    48                                         <a href="//wordpress.org/support/profile/<?php echo $author->user_nicename; ?>">support</a>
     48                                        <a href="//wordpress.org/support/users/<?php echo $author->user_nicename; ?>">support</a>
    4949                                </span>
    5050                                <span class="profile-email">
    5151                                        &lt;<?php echo $author->user_email; ?>&gt;
     
    6363                <?php
    6464                        endif;
    6565
    66                 $unsavory = array();
    67                 if ( property_exists( $author, 'capabilities' ) && isset( $author->capabilities['blocked'] ) && '1' == $author->capabilities['blocked'] ) {
    68                         $unsavory[] = '<span title="User is banned from logging into WordPress.org">banned</span>';
     66                if ( defined( 'WPORG_SUPPORT_FORUMS_BLOGID' ) ) {
     67                        $user = new \WP_User( $author, '', WPORG_SUPPORT_FORUMS_BLOGID );
     68                        if ( ! empty( $user->allcaps['bbp_blocked'] ) )
     69                                echo '<p>This user is: <strong><span title="User is banned from logging into WordPress.org">banned</span></strong></p>';
    6970                }
    70                 if ( property_exists( $author, 'elf_not_trusted' ) && '1' == $author->elf_not_trusted ) {
    71                         $unsavory[] = '<span title="User has been blocked from being able to post in the forums">blocked</span>';
    72                 }
    73                 if ( property_exists( $author, 'is_bozo' ) && '1' == $author->is_bozo ) {
    74                         $unsavory[] = '<span title="User has been flagged by forum moderators as being problematic">a bozo</span>';
    75                 }
    7671
    77                 if ( $unsavory ) {
    78                         echo '<p>This user is: <strong>' . implode( ', ', $unsavory ) . '</strong></p>';
    79                 }
    80 
    8172                $post_ids = get_posts( array(
    8273                        'fields'         => 'ids',
    8374                        'post_type'      => 'plugin',