Written in response to Theme localization in a query...:
Although Francisco's solution fixed Josh's problem, his answer is technically incorrect.
There is no need to assign the return value of __() to a variable prior to use - the return value can be used like any return value from any other function.
The problem with Josh's code was the incorrect use of concatenation within his parameters.
The solution I offered:
would have fixed that without the (albeit minor) overhead of creating a new variable that only gets used once.
There is no need to assign the return value of __() to a variable prior to use - the return value can be used like any return value from any other function.
The problem with Josh's code was the incorrect use of concatenation within his parameters.
The solution I offered:
'category_name' => __('Our Friends', 'mytheme'),would have fixed that without the (albeit minor) overhead of creating a new variable that only gets used once.
Updated: 01/27/12 4:16pm





