Changeset 5291 for sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-moderators.php
- Timestamp:
- 04/09/2017 05:34:20 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-moderators.php
r5290 r5291 44 44 add_filter( 'bbp_get_reply_spam_link', array( $this, 'convert_toggles_to_actions' ), 10, 3 ); 45 45 add_filter( 'bbp_get_reply_approve_link', array( $this, 'convert_toggles_to_actions' ), 10, 3 ); 46 47 // Store moderator's username on approve/unapprove actions. 48 add_action( 'bbp_approved_topic', array( $this, 'store_moderator_username' ) ); 49 add_action( 'bbp_approved_reply', array( $this, 'store_moderator_username' ) ); 50 add_action( 'bbp_unapproved_topic', array( $this, 'store_moderator_username' ) ); 51 add_action( 'bbp_unapproved_reply', array( $this, 'store_moderator_username' ) ); 46 52 } 47 53 … … 571 577 return $link; 572 578 } 579 580 /** 581 * Store moderator's username on approve/unapprove actions. 582 * 583 * @param int $post_id Post ID. 584 */ 585 public function store_moderator_username( $post_id ) { 586 update_post_meta( $post_id, self::MODERATOR_META, wp_get_current_user()->user_login ); 587 } 573 588 }
Note: See TracChangeset
for help on using the changeset viewer.