Returns all translation files for a given text domain.
Parameters
$textdomainstringoptional- Text domain. Default
'default'.Default:
'default' $localestringoptional- Locale. Default current locale.
Default:
null
Source
protected function get_files( string $textdomain = 'default', ?string $locale = null ): array {
if ( null === $locale ) {
$locale = $this->current_locale;
}
return $this->loaded_translations[ $locale ][ $textdomain ] ?? array();
}
Changelog
| Version | Description |
|---|---|
| 6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.