is_textdomain_loaded()
Whether there are translations for the text domain.
1 time — 0.000027 sec (very fast) | 50000 times — 0.01 sec (speed of light) | PHP 7.1.5, WP 4.8.2
No Hooks.
Return
true|false
. Whether there are translations.
Usage
is_textdomain_loaded( $domain );
- $domain(string) (required)
- Text domain. Unique identifier for retrieving translated strings.
Notes
- Global. MO[]. $l10n
Changelog
Since 3.0.0 | Introduced. |
Code of is_textdomain_loaded() is textdomain loaded WP 6.0
function is_textdomain_loaded( $domain ) { global $l10n; return isset( $l10n[ $domain ] ); }