Determines whether translations are loaded for a given text domain.
Parameters
$textdomain
stringoptional- Text domain. Default
'default'
.Default:
'default'
$locale
stringoptional- Locale. Default current locale.
Default:
null
Source
public function is_textdomain_loaded( string $textdomain = 'default', ?string $locale = null ): bool {
if ( null === $locale ) {
$locale = $this->current_locale;
}
return isset( $this->loaded_translations[ $locale ][ $textdomain ] ) &&
array() !== $this->loaded_translations[ $locale ][ $textdomain ];
}
Changelog
Version | Description |
---|---|
6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.