Making WordPress.org


Ignore:
Timestamp:
02/22/2017 08:11:40 PM (9 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: Store moderator's username on approve/unapprove and archive/unarchive actions.

See #2474.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-moderators.php

    r4232 r4987  
    77    const ARCHIVED       = 'archived';
    88    const ARCHIVED_META  = '_wporg_bbp_unarchived_post_status';
     9    const MODERATOR_META = '_wporg_bbp_moderator';
    910    const DEFAULT_STATUS = 'publish';
    1011    const VIEWS          = array( 'archived', 'pending', 'spam' );
     
    249250            if ( $post_id ) {
    250251                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 );
    251253                return true;
    252254            }
     
    277279            if ( $post_id ) {
    278280                delete_post_meta( $post->ID, self::ARCHIVED_META );
     281                update_post_meta( $post->ID, self::MODERATOR_META, wp_get_current_user()->user_login );
    279282                return true;
    280283            }
Note: See TracChangeset for help on using the changeset viewer.