[wp-hackers] Using constants for text domain
Justas Butkus
jbutkus at time.ly
Wed Nov 27 13:38:12 UTC 2013
Hi all.
In a recent response to "Best way to allow slug rewrite of CPT via i18n"
by Otto I saw him warning against use of defined constant for the text
domain.
What is the reasoning behind this, are there any exceptions to this rule?
We are proxying calls to gettext functions (__, _x, ...) family via our
class, so the result is much like this:
```
class PluginPrefix_Foo {
public function __( $string ) {
return __( $string, PLUGINPREFIX_TEXT_DOMAIN );
}
}
```
--
Regards,
Justas Butkus
More information about the wp-hackers
mailing list