Ticket #2351: 2351.1.diff
File 2351.1.diff, 2.0 KB (added by , 8 years ago) |
---|
-
wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-author-card.php
45 45 46 46 <span class="profile-links"> 47 47 <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> 49 49 </span> 50 50 <span class="profile-email"> 51 51 <<?php echo $author->user_email; ?>> … … 63 63 <?php 64 64 endif; 65 65 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>'; 69 70 } 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 }76 71 77 if ( $unsavory ) {78 echo '<p>This user is: <strong>' . implode( ', ', $unsavory ) . '</strong></p>';79 }80 81 72 $post_ids = get_posts( array( 82 73 'fields' => 'ids', 83 74 'post_type' => 'plugin',