[wp-trac] [WordPress Trac] #44708: Coding consistency, seeing both $request and $request_data

WordPress Trac noreply at wordpress.org
Thu Aug 2 16:52:41 UTC 2018


#44708: Coding consistency, seeing both $request and $request_data
---------------------------------------+-----------------------------
 Reporter:  garrett-eclipse            |      Owner:  (none)
     Type:  defect (bug)               |     Status:  new
 Priority:  normal                     |  Milestone:  Awaiting Review
Component:  Privacy                    |    Version:  4.9.6
 Severity:  normal                     |   Keywords:
  Focuses:  privacy, coding-standards  |
---------------------------------------+-----------------------------
 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

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44708>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list