From f92eae92d07190eb7f66a547eae2d1e01885417e Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 2 Feb 2021 20:40:53 +0000 Subject: [PATCH] Docs: Update documentation for `wp_create_user_request()` per the documentation standards. Add a `@since` note for the `$send_confirmation_email` parameter. Follow-up to [50159]. See #43890. git-svn-id: https://develop.svn.wordpress.org/trunk@50165 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/privacy-tools.php | 2 +- src/wp-includes/user.php | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/includes/privacy-tools.php b/src/wp-admin/includes/privacy-tools.php index e31116933f..33611c1975 100644 --- a/src/wp-admin/includes/privacy-tools.php +++ b/src/wp-admin/includes/privacy-tools.php @@ -114,7 +114,7 @@ function _wp_personal_data_handle_actions() { $send_confirmation_email = true; if ( ! isset( $_POST['send_confirmation_email'] ) ) { - $send_confirmation_email = false; + $send_confirmation_email = false; } if ( ! in_array( $action_type, _wp_privacy_action_request_types(), true ) ) { diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index b77748d18c..f08f685abb 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -3936,11 +3936,15 @@ function _wp_privacy_account_request_confirmed_message( $request_id ) { * users on the site, or guests without a user account. * * @since 4.9.6 + * @since 5.7.0 Added the `$send_confirmation_email` parameter. * - * @param string $email_address User email address. This can be the address of a registered or non-registered user. + * @param string $email_address User email address. This can be the address of a registered + * or non-registered user. * @param string $action_name Name of the action that is being confirmed. Required. - * @param array $request_data Misc data you want to send with the verification request and pass to the actions once the request is confirmed. - * @param bool $send_confirmation_email Optional. True by default, if false is passed the request status is set to Completed directly. + * @param array $request_data Misc data you want to send with the verification request and pass + * to the actions once the request is confirmed. + * @param bool $send_confirmation_email Optional. If false, the request status is set to 'Completed' directly. + * Default true. * @return int|WP_Error Returns the request ID if successful, or a WP_Error object on failure. */ function wp_create_user_request( $email_address = '', $action_name = '', $request_data = array(), $send_confirmation_email = true ) {