Make WordPress Core

Opened 11 months ago

#46302 new enhancement

Coding consistency, found more $request_data that should be $request

Reported by: garrett-eclipse Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Administration Keywords:
Focuses: privacy Cc:
PR Number:


This is a follow-up to #44708.

In 5.1 changeset 44606 renamed variables from $request_data to $request. After a quick scrub it seems some were overlooked or are new.

3 occurrences in the wp_create_user_request function - https://github.com/WordPress/WordPress/blob/50ddffbac37fdae9298d1f11fe1dd7b8535fc839/wp-includes/user.php#L3309-L3347
2 occurrences in the WP_User_Request class - https://github.com/WordPress/WordPress/blob/50ddffbac37fdae9298d1f11fe1dd7b8535fc839/wp-includes/user.php#L3712-L3738

I'm unsure if the instances in the class should be changed or not as the other changes were because the variable was held the entire class while this instance is a property of that class.

And a last thought was should the wp_get_user_request_data not be wp_get_user_request and it's docblock state 'Return the user request.' simply because it's a function to get the request itself and not just the request_data.
The function I mentioned - https://github.com/WordPress/WordPress/blob/50ddffbac37fdae9298d1f11fe1dd7b8535fc839/wp-includes/user.php#L3617-L3634


Change History (0)

Note: See TracTickets for help on using tickets.