mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Privacy: Use consistent variable naming when working with privacy requests.
Throughout the core privacy functions, `WP_User_Request` instances were stored in variables named both `$request`, and `$request_data`. This changes all occurrences of `$request_data` to `$request` for better consistency. Props nateallen, bruceallen, garrett-eclipse. Fixes #44708. git-svn-id: https://develop.svn.wordpress.org/trunk@44606 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+18
-18
@@ -2962,13 +2962,13 @@ function wp_user_personal_data_exporter( $email_address ) {
|
||||
* @param int $request_id ID of the request.
|
||||
*/
|
||||
function _wp_privacy_account_request_confirmed( $request_id ) {
|
||||
$request_data = wp_get_user_request_data( $request_id );
|
||||
$request = wp_get_user_request_data( $request_id );
|
||||
|
||||
if ( ! $request_data ) {
|
||||
if ( ! $request ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! in_array( $request_data->status, array( 'request-pending', 'request-failed' ), true ) ) {
|
||||
if ( ! in_array( $request->status, array( 'request-pending', 'request-failed' ), true ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2992,9 +2992,9 @@ function _wp_privacy_account_request_confirmed( $request_id ) {
|
||||
* @param int $request_id The ID of the request.
|
||||
*/
|
||||
function _wp_privacy_send_request_confirmation_notification( $request_id ) {
|
||||
$request_data = wp_get_user_request_data( $request_id );
|
||||
$request = wp_get_user_request_data( $request_id );
|
||||
|
||||
if ( ! is_a( $request_data, 'WP_User_Request' ) || 'request-confirmed' !== $request_data->status ) {
|
||||
if ( ! is_a( $request, 'WP_User_Request' ) || 'request-confirmed' !== $request->status ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3004,8 +3004,8 @@ function _wp_privacy_send_request_confirmation_notification( $request_id ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$manage_url = add_query_arg( 'page', $request_data->action_name, admin_url( 'tools.php' ) );
|
||||
$action_description = wp_user_request_action_description( $request_data->action_name );
|
||||
$manage_url = add_query_arg( 'page', $request->action_name, admin_url( 'tools.php' ) );
|
||||
$action_description = wp_user_request_action_description( $request->action_name );
|
||||
|
||||
/**
|
||||
* Filters the recipient of the data request confirmation notification.
|
||||
@@ -3018,14 +3018,14 @@ function _wp_privacy_send_request_confirmation_notification( $request_id ) {
|
||||
*
|
||||
* @since 4.9.6
|
||||
*
|
||||
* @param string $admin_email The email address of the notification recipient.
|
||||
* @param WP_User_Request $request_data The request that is initiating the notification.
|
||||
* @param string $admin_email The email address of the notification recipient.
|
||||
* @param WP_User_Request $request The request that is initiating the notification.
|
||||
*/
|
||||
$admin_email = apply_filters( 'user_request_confirmed_email_to', get_site_option( 'admin_email' ), $request_data );
|
||||
$admin_email = apply_filters( 'user_request_confirmed_email_to', get_site_option( 'admin_email' ), $request );
|
||||
|
||||
$email_data = array(
|
||||
'request' => $request_data,
|
||||
'user_email' => $request_data->email,
|
||||
'request' => $request,
|
||||
'user_email' => $request->email,
|
||||
'description' => $action_description,
|
||||
'manage_url' => $manage_url,
|
||||
'sitename' => wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ),
|
||||
@@ -3131,9 +3131,9 @@ All at ###SITENAME###
|
||||
* @param int $request_id The privacy request post ID associated with this request.
|
||||
*/
|
||||
function _wp_privacy_send_erasure_fulfillment_notification( $request_id ) {
|
||||
$request_data = wp_get_user_request_data( $request_id );
|
||||
$request = wp_get_user_request_data( $request_id );
|
||||
|
||||
if ( ! is_a( $request_data, 'WP_User_Request' ) || 'request-completed' !== $request_data->status ) {
|
||||
if ( ! is_a( $request, 'WP_User_Request' ) || 'request-completed' !== $request->status ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3148,13 +3148,13 @@ function _wp_privacy_send_erasure_fulfillment_notification( $request_id ) {
|
||||
*
|
||||
* @since 4.9.6
|
||||
*
|
||||
* @param string $user_email The email address of the notification recipient.
|
||||
* @param WP_User_Request $request_data The request that is initiating the notification.
|
||||
* @param string $user_email The email address of the notification recipient.
|
||||
* @param WP_User_Request $request The request that is initiating the notification.
|
||||
*/
|
||||
$user_email = apply_filters( 'user_erasure_fulfillment_email_to', $request_data->email, $request_data );
|
||||
$user_email = apply_filters( 'user_erasure_fulfillment_email_to', $request->email, $request );
|
||||
|
||||
$email_data = array(
|
||||
'request' => $request_data,
|
||||
'request' => $request,
|
||||
'message_recipient' => $user_email,
|
||||
'privacy_policy_url' => get_privacy_policy_url(),
|
||||
'sitename' => wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ),
|
||||
|
||||
Reference in New Issue
Block a user