[wp-trac] [WordPress Trac] #38578: `locale` is not a per-site user-option, but rather a global user attribute

WordPress Trac noreply at wordpress.org
Sun Oct 30 22:25:37 UTC 2016


#38578: `locale` is not a per-site user-option, but rather a global user attribute
-----------------------------+----------------------
 Reporter:  johnjamesjacoby  |       Owner:  ocean90
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:  4.7
Component:  I18N             |     Version:  trunk
 Severity:  normal           |  Resolution:  fixed
 Keywords:  has-patch        |     Focuses:
-----------------------------+----------------------
Changes (by ocean90):

 * owner:   => ocean90
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"39040"]:
 {{{
 #!CommitTicketReference repository="" revision="39040"
 I18N: Don't use `get_user_option()` for retrieving user's language.

 `get_user_option()` checks for both option types, site and network. Since
 `locale` is only a network option we can directly access the field via
 `WP_User`s magic getter.

 Props johnjamesjacoby.
 Fixes #38578.
 }}}

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


More information about the wp-trac mailing list