[wp-trac] [WordPress Trac] #55647: Coding Standards fixes for WP 6.1

WordPress Trac noreply at wordpress.org
Fri Jul 15 13:44:06 UTC 2022

#55647: Coding Standards fixes for WP 6.1
 Reporter:  costdev         |       Owner:  (none)
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  6.1
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:  coding-standards

Comment (by SergeyBiryukov):

 In [changeset:"53702" 53702]:
 #!CommitTicketReference repository="" revision="53702"
 Coding Standards: Rename the `$user_id` parameter of `get_user_locale()`
 to `$user` for accuracy.

 Since the parameter accepts not only a user's ID, but also a `WP_User`
 object, `$user` is a more appropriate name, which better aligns with the
 `$post` parameter of functions that accept a post ID or a `WP_Post`

 The pre-existing internal `$user` variable which contained a `WP_User`
 object is renamed to `$user_object` for clarity.

 Follow-up to [38955].

 Props aristath, poena, afercia, SergeyBiryukov.
 See #55647.

Ticket URL: <https://core.trac.wordpress.org/ticket/55647#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list