Changeset 5652
- Timestamp:
- 07/12/2017 12:10:21 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-user-notes.php
r5650 r5652 43 43 44 44 /** 45 * Checks if a note is added to a postand save it to the user's meta data.45 * Checks if a user note is added and save it to the user's meta data. 46 46 * 47 47 * @param string $action Requested action. … … 202 202 } 203 203 204 // Only keymasters can see notes on moderators. 205 if ( user_can( get_post()->post_author, 'moderate' ) && ! current_user_can( 'keep_gate' ) ) { 206 return; 207 } 208 204 209 printf( '<div class="wporg-bbp-user-notes-toggle"><a href="#" data-post-id="%d">%s</a></div>', 205 210 esc_attr( get_the_ID() ), … … 392 397 $post_id = get_the_ID(); 393 398 399 // Only keymasters can see notes on moderators. 400 if ( user_can( $user_id, 'moderate' ) && ! current_user_can( 'keep_gate' ) ) { 401 return; 402 } 403 394 404 $show_user_notes = isset( $_GET['show_user_notes'] ) && (int) $_GET['show_user_notes'] == $post_id; 395 405 … … 412 422 return; 413 423 } 424 425 $user_id = bbp_get_displayed_user_id(); 426 427 // Only keymasters can see notes on moderators. 428 if ( user_can( $user_id, 'moderate' ) && ! current_user_can( 'keep_gate' ) ) { 429 return; 430 } 414 431 ?> 415 432 <div class="wporg-bbp-user-notes"> 416 433 <h2 id="user-notes" class="entry-title"><?php esc_html_e( 'User Notes', 'wporg-forums' ); ?></h2> 417 434 <div class="bbp-user-section"> 418 <?php $this->display_user_notes( bbp_get_displayed_user_id()); ?>435 <?php $this->display_user_notes( $user_id ); ?> 419 436 </div> 420 437 </div>
Note: See TracChangeset
for help on using the changeset viewer.