[wp-trac] [WordPress Trac] #38512: Add $user argument to get_user_locale()

WordPress Trac noreply at wordpress.org
Wed Oct 26 12:58:18 UTC 2016


#38512: Add $user argument to get_user_locale()
-------------------------+------------------------------------------
 Reporter:  ocean90      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  4.7
Component:  Users        |    Version:  trunk
 Severity:  normal       |   Keywords:  needs-patch needs-unit-tests
  Focuses:               |
-------------------------+------------------------------------------
 Splitting this out of #26511.

 The latest patch of #26511 does a lot of `switch_to_locale( $user->locale
 ?  $user->locale : get_locale() );` calls. This is exactly what
 `get_user_locale()` does for the current user. Adding a `$user` argument
 allows us to DRY up some logic.

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


More information about the wp-trac mailing list