Skip to:
Content

BuddyPress.org

Changeset 12613


Ignore:
Timestamp:
04/09/2020 03:41:19 AM (3 months ago)
Author:
r-a-y
Message:

Settings: Ensure we use the updated user request function for WordPress 5.4.0.

In WordPress 5.4.0, the wp_get_user_request_data() function was
renamed to wp_get_user_request(). See #WP46302.

Props Dono12.

Fixes #8265 (5.0-branch).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/bp-settings/bp-settings-functions.php

    r12416 r12613  
    249249
    250250    if ( ! empty( $query->post ) ) {
    251         return wp_get_user_request_data( $query->post->ID );
     251        // WP 5.4 changed the user request function name to wp_get_user_request()
     252        $user_request = function_exists( 'wp_get_user_request' ) ? 'wp_get_user_request' : 'wp_get_user_request_data';
     253        return $user_request( $query->post->ID );
    252254    } else {
    253255        return false;
Note: See TracChangeset for help on using the changeset viewer.