Making WordPress.org

Changeset 5293


Ignore:
Timestamp:
04/09/2017 05:47:32 AM (8 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: Use Moderators::store_moderator_username() in ::archive_post() and ::unarchive_post().

See #2474.

File:
1 edited

Legend:

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

    r5292 r5293  
    4545        add_filter( 'bbp_get_reply_approve_link',       array( $this, 'convert_toggles_to_actions' ), 10, 3 );
    4646
    47         // Store moderator's username on approve/unapprove actions.
     47        // Store moderator's username on Approve/Unapprove actions.
    4848        add_action( 'bbp_approved_topic',               array( $this, 'store_moderator_username' ) );
    4949        add_action( 'bbp_approved_reply',               array( $this, 'store_moderator_username' ) );
     
    289289            if ( $post_id ) {
    290290                update_post_meta( $post->ID, self::ARCHIVED_META, $post->post_status );
    291                 update_post_meta( $post->ID, self::MODERATOR_META, wp_get_current_user()->user_nicename );
     291                $this->store_moderator_username( $post->ID );
    292292
    293293                if ( bbp_is_reply( $post->ID ) ) {
     
    323323            if ( $post_id ) {
    324324                delete_post_meta( $post->ID, self::ARCHIVED_META );
    325                 update_post_meta( $post->ID, self::MODERATOR_META, wp_get_current_user()->user_nicename );
     325                $this->store_moderator_username( $post->ID );
    326326
    327327                if ( bbp_is_reply( $post->ID ) ) {
     
    579579
    580580    /**
    581      * Store moderator's username on approve/unapprove actions.
     581     * Store moderator's username on Approve/Unapprove and Archive/Unarchive actions.
    582582     *
    583583     * @param int $post_id Post ID.
Note: See TracChangeset for help on using the changeset viewer.