Changeset 4987
- Timestamp:
- 02/22/2017 08:11:40 PM (8 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php
r4974 r4987 40 40 add_action( 'bbp_new_reply', array( $this, 'handle_extra_reply_actions' ), 10, 2 ); 41 41 add_action( 'bbp_edit_reply', array( $this, 'handle_extra_reply_actions' ), 10, 2 ); 42 43 // Store moderator's username on approve/unapprove actions. 44 add_action( 'bbp_approved_topic', array( $this, 'store_moderator_username' ) ); 45 add_action( 'bbp_approved_reply', array( $this, 'store_moderator_username' ) ); 46 add_action( 'bbp_unapproved_topic', array( $this, 'store_moderator_username' ) ); 47 add_action( 'bbp_unapproved_reply', array( $this, 'store_moderator_username' ) ); 42 48 } 43 49 … … 267 273 } 268 274 275 /** 276 * Store moderator's username on approve/unapprove actions. 277 * 278 * @param int $post_id Post ID. 279 */ 280 public function store_moderator_username( $post_id ) { 281 update_post_meta( $post_id, '_wporg_bbp_moderator', wp_get_current_user()->user_login ); 282 } 283 269 284 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-moderators.php
r4232 r4987 7 7 const ARCHIVED = 'archived'; 8 8 const ARCHIVED_META = '_wporg_bbp_unarchived_post_status'; 9 const MODERATOR_META = '_wporg_bbp_moderator'; 9 10 const DEFAULT_STATUS = 'publish'; 10 11 const VIEWS = array( 'archived', 'pending', 'spam' ); … … 249 250 if ( $post_id ) { 250 251 update_post_meta( $post->ID, self::ARCHIVED_META, $post->post_status ); 252 update_post_meta( $post->ID, self::MODERATOR_META, wp_get_current_user()->user_login ); 251 253 return true; 252 254 } … … 277 279 if ( $post_id ) { 278 280 delete_post_meta( $post->ID, self::ARCHIVED_META ); 281 update_post_meta( $post->ID, self::MODERATOR_META, wp_get_current_user()->user_login ); 279 282 return true; 280 283 }
Note: See TracChangeset
for help on using the changeset viewer.