[wp-trac] [WordPress Trac] #56244: Use a consistent parameter name for functions accepting a comment ID or object

WordPress Trac noreply at wordpress.org
Wed Jul 20 14:12:16 UTC 2022


#56244: Use a consistent parameter name for functions accepting a comment ID or
object
----------------------------+-------------------------------------
 Reporter:  SergeyBiryukov  |       Owner:  SergeyBiryukov
     Type:  enhancement     |      Status:  accepted
 Priority:  normal          |   Milestone:  6.1
Component:  Comments        |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:  docs, coding-standards
----------------------------+-------------------------------------

Comment (by SergeyBiryukov):

 In [changeset:"53729" 53729]:
 {{{
 #!CommitTicketReference repository="" revision="53729"
 Coding Standards: Standardize on `user_id` when passing data to comment
 functions.

 The `wp_new_comment()`, `wp_update_comment()`, and `wp_filter_comment()`
 functions already normalize the `user_ID` parameter internally to
 `user_id`, which matches the database field name.

 This commit aims to bring some consistency when passing the parameter in
 core.

 The corresponding `$user_ID` variable is also renamed to `$user_id` to
 match the other variables when not referring to the `$user_ID` global,
 which has an exception in the WordPress coding standards.

 Follow-up to [8543], [8720], [12267], [12300], [26491], [28915], [28922],
 [34799], [49303].

 See #55647, #56244.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56244#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list