[wp-trac] [WordPress Trac] #26511: Introduce a locale-switching function

WordPress Trac noreply at wordpress.org
Tue Sep 6 18:42:14 UTC 2016


#26511: Introduce a locale-switching function
--------------------------------------+------------------------
 Reporter:  johnbillion               |       Owner:
     Type:  feature request           |      Status:  reviewing
 Priority:  normal                    |   Milestone:  4.7
Component:  I18N                      |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------

Comment (by johnjamesjacoby):

 Replying to [comment:44 tfrommen]:
 > Replying to [comment:43 johnjamesjacoby]:
 > > Is it too late to recommend a `WP_Switcher` base class that sites can
 use, too?
 > >
 > > Related: #19572 <3
 > As the implementation would be completely different in any case, there's
 no use for a base class.

 Consider that the implementation between admin area list-tables is
 different for each type of object being listed, but them sharing a base
 class is (I think) pretty helpful for defining the mechanics of how a
 list-table works regardless of it's type.

 Similarly, the mechanics of stashing the current *thing*, switching to a
 new *thing*, and restoring the original *thing* are pretty common
 (consider `$wp_query` or `wp_reset_postdata()` for existing examples).

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


More information about the wp-trac mailing list