Changeset 5523
- Timestamp:
- 05/30/2017 08:36:52 PM (9 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins
- Files:
-
- 2 edited
-
wporg-bbp-topic-resolution/inc/class-plugin.php (modified) (1 diff)
-
wporg-bbp-user-badges/inc/class-plugin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-topic-resolution/inc/class-plugin.php
r5039 r5523 506 506 } 507 507 508 if ( $user_id && $post && ( user_can( $user_id, 'moderate' ) || $user_id == $post->post_author ) ) {508 if ( $user_id && $post && ( user_can( $user_id, 'moderate', $topic_id ) || $user_id == $post->post_author ) ) { 509 509 $retval = true; 510 510 } else { -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-user-badges/inc/class-plugin.php
r5369 r5523 397 397 * moderator without considering if they are a keymaster. 398 398 * 399 * @param string $user_id Optional. User ID. Assumes current replyauthor ID399 * @param string $user_id Optional. User ID. Assumes current post author ID 400 400 * if not provided. 401 401 * @param bool $strict Optional. True if user should strictly be checked … … 406 406 public function is_user_moderator( $user_id = '', $strict = false ) { 407 407 if ( ! $user_id ) { 408 $user_id = bbp_get_reply_author_id();409 } 410 411 return ( user_can( $user_id, 'moderate' ) || ( ! $strict && bbp_is_user_keymaster( $user_id ) ) );408 $user_id = get_post_field( 'post_author' ); 409 } 410 411 return ( user_can( $user_id, 'moderate', get_the_ID() ) || ( ! $strict && bbp_is_user_keymaster( $user_id ) ) ); 412 412 } 413 413 }
Note: See TracChangeset
for help on using the changeset viewer.