mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Privacy: Rename wp_get_user_request_data() to wp_get_user_request() for clarity; deprecate the old function.
The function returns an instance of the `WP_User_Request` object itself, not its `$request_data` property. Follow-up to [44606]. Props garrett-eclipse. Fixes #46302. git-svn-id: https://develop.svn.wordpress.org/trunk@47245 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -258,7 +258,7 @@ class Tests_Privacy_WpPrivacyGeneratePersonalDataExportFile extends WP_UnitTestC
|
||||
$this->assertTrue( file_exists( $report_dir . 'index.html' ) );
|
||||
|
||||
$report_contents = file_get_contents( $report_dir . 'index.html' );
|
||||
$request = wp_get_user_request_data( self::$export_request_id );
|
||||
$request = wp_get_user_request( self::$export_request_id );
|
||||
|
||||
$this->assertContains( '<h1>Personal Data Export</h1>', $report_contents );
|
||||
$this->assertContains( '<h2>About</h2>', $report_contents );
|
||||
@@ -285,7 +285,7 @@ class Tests_Privacy_WpPrivacyGeneratePersonalDataExportFile extends WP_UnitTestC
|
||||
$zip->extractTo( $report_dir );
|
||||
$zip->close();
|
||||
|
||||
$request = wp_get_user_request_data( self::$export_request_id );
|
||||
$request = wp_get_user_request( self::$export_request_id );
|
||||
|
||||
$this->assertTrue( file_exists( $report_dir . 'export.json' ) );
|
||||
|
||||
|
||||
@@ -152,16 +152,16 @@ class Tests_User_WpPrivacySendRequestConfirmationNotification extends WP_UnitTes
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter callback that modifies the recipient of the data request confirmation notification.
|
||||
* Filter callback that modifies the recipient of the user request confirmation notification.
|
||||
*
|
||||
* @since 4.9.8
|
||||
*
|
||||
* @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 WP_User_Request $request The request that is initiating the notification.
|
||||
* @return string Admin email address.
|
||||
*/
|
||||
public function modify_email_address( $admin_email, $request_data ) {
|
||||
$admin_email = $request_data->email;
|
||||
public function modify_email_address( $admin_email, $request ) {
|
||||
$admin_email = $request->email;
|
||||
return $admin_email;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user