Changeset 45519 for trunk/src/wp-includes/user.php
- Timestamp:
- 06/10/2019 11:53:32 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r45479 r45519 3648 3648 return new WP_User_Request( $post ); 3649 3649 } 3650 3651 /**3652 * WP_User_Request class.3653 *3654 * Represents user request data loaded from a WP_Post object.3655 *3656 * @since 4.9.63657 */3658 final class WP_User_Request {3659 /**3660 * Request ID.3661 *3662 * @var int3663 */3664 public $ID = 0;3665 3666 /**3667 * User ID.3668 *3669 * @var int3670 */3671 public $user_id = 0;3672 3673 /**3674 * User email.3675 *3676 * @var int3677 */3678 public $email = '';3679 3680 /**3681 * Action name.3682 *3683 * @var string3684 */3685 public $action_name = '';3686 3687 /**3688 * Current status.3689 *3690 * @var string3691 */3692 public $status = '';3693 3694 /**3695 * Timestamp this request was created.3696 *3697 * @var int|null3698 */3699 public $created_timestamp = null;3700 3701 /**3702 * Timestamp this request was last modified.3703 *3704 * @var int|null3705 */3706 public $modified_timestamp = null;3707 3708 /**3709 * Timestamp this request was confirmed.3710 *3711 * @var int3712 */3713 public $confirmed_timestamp = null;3714 3715 /**3716 * Timestamp this request was completed.3717 *3718 * @var int3719 */3720 public $completed_timestamp = null;3721 3722 /**3723 * Misc data assigned to this request.3724 *3725 * @var array3726 */3727 public $request_data = array();3728 3729 /**3730 * Key used to confirm this request.3731 *3732 * @var string3733 */3734 public $confirm_key = '';3735 3736 /**3737 * Constructor.3738 *3739 * @since 4.9.63740 *3741 * @param WP_Post|object $post Post object.3742 */3743 public function __construct( $post ) {3744 $this->ID = $post->ID;3745 $this->user_id = $post->post_author;3746 $this->email = $post->post_title;3747 $this->action_name = $post->post_name;3748 $this->status = $post->post_status;3749 $this->created_timestamp = strtotime( $post->post_date_gmt );3750 $this->modified_timestamp = strtotime( $post->post_modified_gmt );3751 $this->confirmed_timestamp = (int) get_post_meta( $post->ID, '_wp_user_request_confirmed_timestamp', true );3752 $this->completed_timestamp = (int) get_post_meta( $post->ID, '_wp_user_request_completed_timestamp', true );3753 $this->request_data = json_decode( $post->post_content, true );3754 $this->confirm_key = $post->post_password;3755 }3756 }
Note: See TracChangeset
for help on using the changeset viewer.