aboutsummaryrefslogtreecommitdiff
path: root/srcs/wordpress/wp-includes/class-wp-user-request.php
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-01-07 13:06:14 +0100
committerCharles <sircharlesaze@gmail.com>2020-01-07 13:06:14 +0100
commit7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8 (patch)
treef7453d7dd5cbaaab246e23810b02d3edf1e451be /srcs/wordpress/wp-includes/class-wp-user-request.php
parentc59bdcf77c50cbe89b4a93782cdd6d9e7532080e (diff)
downloadft_server-7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8.tar.gz
ft_server-7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8.tar.bz2
ft_server-7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8.zip
Added wordpress
Diffstat (limited to 'srcs/wordpress/wp-includes/class-wp-user-request.php')
-rw-r--r--srcs/wordpress/wp-includes/class-wp-user-request.php107
1 files changed, 107 insertions, 0 deletions
diff --git a/srcs/wordpress/wp-includes/class-wp-user-request.php b/srcs/wordpress/wp-includes/class-wp-user-request.php
new file mode 100644
index 0000000..a59c7ff
--- /dev/null
+++ b/srcs/wordpress/wp-includes/class-wp-user-request.php
@@ -0,0 +1,107 @@
+<?php
+/**
+ * WP_User_Request class.
+ *
+ * Represents user request data loaded from a WP_Post object.
+ *
+ * @since 4.9.6
+ */
+final class WP_User_Request {
+ /**
+ * Request ID.
+ *
+ * @var int
+ */
+ public $ID = 0;
+
+ /**
+ * User ID.
+ *
+ * @var int
+ */
+ public $user_id = 0;
+
+ /**
+ * User email.
+ *
+ * @var int
+ */
+ public $email = '';
+
+ /**
+ * Action name.
+ *
+ * @var string
+ */
+ public $action_name = '';
+
+ /**
+ * Current status.
+ *
+ * @var string
+ */
+ public $status = '';
+
+ /**
+ * Timestamp this request was created.
+ *
+ * @var int|null
+ */
+ public $created_timestamp = null;
+
+ /**
+ * Timestamp this request was last modified.
+ *
+ * @var int|null
+ */
+ public $modified_timestamp = null;
+
+ /**
+ * Timestamp this request was confirmed.
+ *
+ * @var int
+ */
+ public $confirmed_timestamp = null;
+
+ /**
+ * Timestamp this request was completed.
+ *
+ * @var int
+ */
+ public $completed_timestamp = null;
+
+ /**
+ * Misc data assigned to this request.
+ *
+ * @var array
+ */
+ public $request_data = array();
+
+ /**
+ * Key used to confirm this request.
+ *
+ * @var string
+ */
+ public $confirm_key = '';
+
+ /**
+ * Constructor.
+ *
+ * @since 4.9.6
+ *
+ * @param WP_Post|object $post Post object.
+ */
+ public function __construct( $post ) {
+ $this->ID = $post->ID;
+ $this->user_id = $post->post_author;
+ $this->email = $post->post_title;
+ $this->action_name = $post->post_name;
+ $this->status = $post->post_status;
+ $this->created_timestamp = strtotime( $post->post_date_gmt );
+ $this->modified_timestamp = strtotime( $post->post_modified_gmt );
+ $this->confirmed_timestamp = (int) get_post_meta( $post->ID, '_wp_user_request_confirmed_timestamp', true );
+ $this->completed_timestamp = (int) get_post_meta( $post->ID, '_wp_user_request_completed_timestamp', true );
+ $this->request_data = json_decode( $post->post_content, true );
+ $this->confirm_key = $post->post_password;
+ }
+}