Changeset 47245
- Timestamp:
- 02/10/2020 07:55:51 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r47233 r47245 4711 4711 check_ajax_referer( 'wp-privacy-export-personal-data-' . $request_id, 'security' ); 4712 4712 4713 // Get the request data.4714 $request = wp_get_user_request _data( $request_id );4713 // Get the request. 4714 $request = wp_get_user_request( $request_id ); 4715 4715 4716 4716 if ( ! $request || 'export_personal_data' !== $request->action_name ) { … … 4902 4902 check_ajax_referer( 'wp-privacy-erase-personal-data-' . $request_id, 'security' ); 4903 4903 4904 // Get the request data.4905 $request = wp_get_user_request _data( $request_id );4904 // Get the request. 4905 $request = wp_get_user_request( $request_id ); 4906 4906 4907 4907 if ( ! $request || 'remove_personal_data' !== $request->action_name ) { -
trunk/src/wp-admin/includes/class-wp-privacy-requests-table.php
r47148 r47245 303 303 304 304 foreach ( $requests as $request ) { 305 $this->items[] = wp_get_user_request _data( $request->ID );305 $this->items[] = wp_get_user_request( $request->ID ); 306 306 } 307 307 -
trunk/src/wp-admin/includes/deprecated.php
r47198 r47245 1565 1565 _deprecated_function( __FUNCTION__, '5.3.0' ); 1566 1566 } 1567 1568 /** 1569 * Return the user request object for the specified request ID. 1570 * 1571 * @since 4.9.6 1572 * @deprecated 5.4.0 Use wp_get_user_request() 1573 * @see wp_get_user_request() 1574 * 1575 * @param int $request_id The ID of the user request. 1576 * @return WP_User_Request|false 1577 */ 1578 function wp_get_user_request_data( $request_id ) { 1579 _deprecated_function( __FUNCTION__, '5.4.0', 'wp_get_user_request()' ); 1580 return wp_get_user_request( $request_id ); 1581 } -
trunk/src/wp-admin/includes/privacy-tools.php
r47219 r47245 42 42 * 43 43 * @param int $request_id Request ID. 44 * @return int|WP_Error $result Request ID on success or WP_Error.44 * @return int|WP_Error $result Request ID on success or WP_Error. 45 45 */ 46 46 function _wp_privacy_completed_request( $request_id ) { 47 // Get the request. 47 48 $request_id = absint( $request_id ); 48 $request = wp_get_user_request _data( $request_id );49 $request = wp_get_user_request( $request_id ); 49 50 50 51 if ( ! $request ) { … … 289 290 } 290 291 291 // Get the request data.292 $request = wp_get_user_request _data( $request_id );292 // Get the request. 293 $request = wp_get_user_request( $request_id ); 293 294 294 295 if ( ! $request || 'export_personal_data' !== $request->action_name ) { … … 502 503 */ 503 504 function wp_privacy_send_personal_data_export_email( $request_id ) { 504 // Get the request data.505 $request = wp_get_user_request _data( $request_id );505 // Get the request. 506 $request = wp_get_user_request( $request_id ); 506 507 507 508 if ( ! $request || 'export_personal_data' !== $request->action_name ) { … … 672 673 } 673 674 674 // Get the request data.675 $request = wp_get_user_request _data( $request_id );675 // Get the request. 676 $request = wp_get_user_request( $request_id ); 676 677 677 678 if ( ! $request || 'export_personal_data' !== $request->action_name ) { … … 816 817 } 817 818 818 $request = wp_get_user_request_data( $request_id ); 819 // Get the request. 820 $request = wp_get_user_request( $request_id ); 819 821 820 822 if ( ! $request || 'remove_personal_data' !== $request->action_name ) { -
trunk/src/wp-includes/user.php
r47237 r47245 3097 3097 */ 3098 3098 function _wp_privacy_account_request_confirmed( $request_id ) { 3099 $request = wp_get_user_request _data( $request_id );3099 $request = wp_get_user_request( $request_id ); 3100 3100 3101 3101 if ( ! $request ) { … … 3127 3127 */ 3128 3128 function _wp_privacy_send_request_confirmation_notification( $request_id ) { 3129 $request = wp_get_user_request _data( $request_id );3129 $request = wp_get_user_request( $request_id ); 3130 3130 3131 3131 if ( ! is_a( $request, 'WP_User_Request' ) || 'request-confirmed' !== $request->status ) { … … 3266 3266 */ 3267 3267 function _wp_privacy_send_erasure_fulfillment_notification( $request_id ) { 3268 $request = wp_get_user_request _data( $request_id );3268 $request = wp_get_user_request( $request_id ); 3269 3269 3270 3270 if ( ! is_a( $request, 'WP_User_Request' ) || 'request-completed' !== $request->status ) { … … 3416 3416 */ 3417 3417 function _wp_privacy_account_request_confirmed_message( $request_id ) { 3418 $request = wp_get_user_request _data( $request_id );3418 $request = wp_get_user_request( $request_id ); 3419 3419 3420 3420 $message = '<p class="success">' . __( 'Action has been confirmed.' ) . '</p>'; … … 3552 3552 function wp_send_user_request( $request_id ) { 3553 3553 $request_id = absint( $request_id ); 3554 $request = wp_get_user_request _data( $request_id );3554 $request = wp_get_user_request( $request_id ); 3555 3555 3556 3556 if ( ! $request ) { … … 3714 3714 3715 3715 $request_id = absint( $request_id ); 3716 $request = wp_get_user_request _data( $request_id );3716 $request = wp_get_user_request( $request_id ); 3717 3717 3718 3718 if ( ! $request ) { … … 3766 3766 3767 3767 /** 3768 * Return data about a user request.3768 * Return the user request object for the specified request ID. 3769 3769 * 3770 3770 * @since 4.9.6 3771 3771 * 3772 * @param int $request_id Request ID to get data about.3772 * @param int $request_id The ID of the user request. 3773 3773 * @return WP_User_Request|false 3774 3774 */ 3775 function wp_get_user_request _data( $request_id ) {3775 function wp_get_user_request( $request_id ) { 3776 3776 $request_id = absint( $request_id ); 3777 3777 $post = get_post( $request_id ); -
trunk/tests/phpunit/tests/privacy/wpPrivacyGeneratePersonalDataExportFile.php
r47146 r47245 259 259 260 260 $report_contents = file_get_contents( $report_dir . 'index.html' ); 261 $request = wp_get_user_request _data( self::$export_request_id );261 $request = wp_get_user_request( self::$export_request_id ); 262 262 263 263 $this->assertContains( '<h1>Personal Data Export</h1>', $report_contents ); … … 286 286 $zip->close(); 287 287 288 $request = wp_get_user_request _data( self::$export_request_id );288 $request = wp_get_user_request( self::$export_request_id ); 289 289 290 290 $this->assertTrue( file_exists( $report_dir . 'export.json' ) ); -
trunk/tests/phpunit/tests/privacy/wpPrivacySendRequestConfirmationNotification.php
r46586 r47245 153 153 154 154 /** 155 * Filter callback that modifies the recipient of the datarequest confirmation notification.155 * Filter callback that modifies the recipient of the user request confirmation notification. 156 156 * 157 157 * @since 4.9.8 158 158 * 159 159 * @param string $admin_email The email address of the notification recipient. 160 * @param WP_User_Request $request _dataThe request that is initiating the notification.160 * @param WP_User_Request $request The request that is initiating the notification. 161 161 * @return string Admin email address. 162 162 */ 163 public function modify_email_address( $admin_email, $request _data) {164 $admin_email = $request _data->email;163 public function modify_email_address( $admin_email, $request ) { 164 $admin_email = $request->email; 165 165 return $admin_email; 166 166 }
Note: See TracChangeset
for help on using the changeset viewer.