Uses
Uses | Description |
---|---|
wp-includes/l10n.php: _load_textdomain_just_in_time() | Loads plugin and theme textdomains just-in-time. |
Return the Translations instance for a text domain.
If there isn’t one, returns empty Translations instance.
(string) (Required) Text domain. Unique identifier for retrieving translated strings.
(Translations|NOOP_Translations) A Translations instance.
File: wp-includes/l10n.php
function get_translations_for_domain( $domain ) { global $l10n; if ( isset( $l10n[ $domain ] ) || ( _load_textdomain_just_in_time( $domain ) && isset( $l10n[ $domain ] ) ) ) { return $l10n[ $domain ]; } static $noop_translations = null; if ( null === $noop_translations ) { $noop_translations = new NOOP_Translations; } return $noop_translations; }
Version | Description |
---|---|
2.8.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_translations_for_domain