Making WordPress.org

Changeset 5157


Ignore:
Timestamp:
03/21/2017 07:21:27 PM (7 years ago)
Author:
coffee2code
Message:

Support Forums, User Moderation: Record timestamp of when a user was flagged/unflagged.

Props SergeyBiryukov.
See #2584.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-user-moderation/inc/class-plugin.php

    r5038 r5157  
    2222    // Meta key to store moderator's username on flag/unflag actions.
    2323    const MODERATOR_META = '_wporg_bbp_moderator';
     24
     25    // Meta key to store moderation date on flag/unflag actions.
     26    const MODERATION_DATE_META = '_wporg_bbp_moderation_date';
    2427
    2528    /**
     
    233236            update_user_meta( $user_id, self::USER_META, true );
    234237            update_user_meta( $user_id, self::MODERATOR_META, wp_get_current_user()->user_nicename );
     238            update_user_meta( $user_id, self::MODERATION_DATE_META, current_time( 'mysql' ) );
    235239        }
    236240        do_action( 'wporg_bbp_flag_user', $user_id );
     
    247251            delete_user_meta( $user_id, self::USER_META );
    248252            update_user_meta( $user_id, self::MODERATOR_META, wp_get_current_user()->user_nicename );
     253            update_user_meta( $user_id, self::MODERATION_DATE_META, current_time( 'mysql' ) );
    249254        }
    250255        do_action( 'wporg_bbp_unflag_user', $user_id );
Note: See TracChangeset for help on using the changeset viewer.