[wp-trac] [WordPress Trac] #46302: Coding consistency, found more $request_data that should be $request
WordPress Trac
noreply at wordpress.org
Fri Feb 22 01:58:22 UTC 2019
#46302: Coding consistency, found more $request_data that should be $request
-----------------------------+-----------------------------
Reporter: garrett-eclipse | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version:
Severity: normal | Keywords:
Focuses: privacy |
-----------------------------+-----------------------------
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.
Instances;
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
Thanks
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46302>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list