[wp-trac] [WordPress Trac] #13395: Introduce _ex to replace echo _x

WordPress Trac wp-trac at lists.automattic.com
Sat May 15 13:40:42 UTC 2010


#13395: Introduce _ex to replace echo _x
-----------------------------------+----------------------------------------
 Reporter:  westi                  |        Owner:  westi 
     Type:  enhancement            |       Status:  closed
 Priority:  normal                 |    Milestone:  3.0   
Component:  i18n                   |      Version:  3.0   
 Severity:  normal                 |   Resolution:  fixed 
 Keywords:  has-patch 2nd-opinion  |  
-----------------------------------+----------------------------------------

Comment(by hakre):

 I have a suggestion for those who want to make the next step:

 {{{
 <?php _e(x, 'Slug', 'Taxonomy Slug'); ?>
 }}}

 as in:

 {{{
 function _e() {
   $p = func_get_args();
   $f = '_' . array_shift($p);
   echo call_user_func_array($f, $p);
 }
 }}}

 not really, this is just for the taste of it.

 btw, does "constant string usage" throw any warning with wordpress
 requirements?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13395#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list