WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/10/2020 07:55:51 PM (10 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r47237 r47245  
    30973097 */
    30983098function _wp_privacy_account_request_confirmed( $request_id ) {
    3099     $request = wp_get_user_request_data( $request_id );
     3099    $request = wp_get_user_request( $request_id );
    31003100
    31013101    if ( ! $request ) {
     
    31273127 */
    31283128function _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 );
    31303130
    31313131    if ( ! is_a( $request, 'WP_User_Request' ) || 'request-confirmed' !== $request->status ) {
     
    32663266 */
    32673267function _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 );
    32693269
    32703270    if ( ! is_a( $request, 'WP_User_Request' ) || 'request-completed' !== $request->status ) {
     
    34163416 */
    34173417function _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 );
    34193419
    34203420    $message  = '<p class="success">' . __( 'Action has been confirmed.' ) . '</p>';
     
    35523552function wp_send_user_request( $request_id ) {
    35533553    $request_id = absint( $request_id );
    3554     $request    = wp_get_user_request_data( $request_id );
     3554    $request    = wp_get_user_request( $request_id );
    35553555
    35563556    if ( ! $request ) {
     
    37143714
    37153715    $request_id = absint( $request_id );
    3716     $request    = wp_get_user_request_data( $request_id );
     3716    $request    = wp_get_user_request( $request_id );
    37173717
    37183718    if ( ! $request ) {
     
    37663766
    37673767/**
    3768  * Return data about a user request.
     3768 * Return the user request object for the specified request ID.
    37693769 *
    37703770 * @since 4.9.6
    37713771 *
    3772  * @param int $request_id Request ID to get data about.
     3772 * @param int $request_id The ID of the user request.
    37733773 * @return WP_User_Request|false
    37743774 */
    3775 function wp_get_user_request_data( $request_id ) {
     3775function wp_get_user_request( $request_id ) {
    37763776    $request_id = absint( $request_id );
    37773777    $post       = get_post( $request_id );
Note: See TracChangeset for help on using the changeset viewer.