Changeset 50159 for trunk/src/wp-includes/user.php
- Timestamp:
- 02/02/2021 07:43:37 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r50141 r50159 3938 3938 * @since 4.9.6 3939 3939 * 3940 * @param string $email_address User email address. This can be the address of a registered or non-registered user. 3941 * @param string $action_name Name of the action that is being confirmed. Required. 3942 * @param array $request_data Misc data you want to send with the verification request and pass to the actions once the request is confirmed. 3943 * @return int|WP_Error Returns the request ID if successful, or a WP_Error object on failure. 3944 */ 3945 function wp_create_user_request( $email_address = '', $action_name = '', $request_data = array() ) { 3940 * @param string $email_address User email address. This can be the address of a registered or non-registered user. 3941 * @param string $action_name Name of the action that is being confirmed. Required. 3942 * @param array $request_data Misc data you want to send with the verification request and pass to the actions once the request is confirmed. 3943 * @param bool $send_confirmation_email Optional. True by default, if false is passed the request status is set to Completed directly. 3944 * @return int|WP_Error Returns the request ID if successful, or a WP_Error object on failure. 3945 */ 3946 function wp_create_user_request( $email_address = '', $action_name = '', $request_data = array(), $send_confirmation_email = true ) { 3946 3947 $email_address = sanitize_email( $email_address ); 3947 3948 $action_name = sanitize_key( $action_name ); … … 3976 3977 } 3977 3978 3979 if ( false !== $send_confirmation_email ) { 3980 $status = 'request-pending'; 3981 } else { 3982 $status = 'request-completed'; 3983 } 3984 3978 3985 $request_id = wp_insert_post( 3979 3986 array( … … 3982 3989 'post_title' => $email_address, 3983 3990 'post_content' => wp_json_encode( $request_data ), 3984 'post_status' => 'request-pending',3991 'post_status' => $status, 3985 3992 'post_type' => 'user_request', 3986 3993 'post_date' => current_time( 'mysql', false ),
Note: See TracChangeset
for help on using the changeset viewer.