#44708 closed defect (bug) (fixed)
Coding consistency, seeing both $request and $request_data
| Reported by: | garrett-eclipse | Owned by: | desrosj |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.1 |
| Component: | Privacy | Version: | 4.9.6 |
| Severity: | minor | Keywords: | good-first-bug has-patch |
| Cc: | Focuses: |
Description
Hello,
I'm noticing the variable naming for Privacy component items isn't consistent as there's a mix of both $request and $request_data for the request object. IMHO $request makes the most sense.
You can see this inconsistency best when you search for the 'wp_get_user_request_data' function call;
https://github.com/WordPress/WordPress/search?q=wp_get_user_request_data&unscoped_q=wp_get_user_request_data
$request_data is used in wp-includes/user.php and once in wp-admin/includes/user.php, but $request is found in wp-admin/includes/user.php, wp-admin/includes/file.php and /wp-admin/includes/ajax-actions.php
Cheers
Attachments (2)
Change History (14)
#5
@
8 years ago
Tested original patch and it looks good in terms of replacing the variables. Doing further testing on functionality.
#8
@
8 years ago
@pento the 44708.diff from @bruceallen seems to have gotten some unrelated css in list-tables.css that shouldn't be there. Aside from that the other changes are identical to 44708.patch from @nateallen so would use that version for the commit.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Changes variables named $request_data to $request for consistency