WP_Translation_Controller::get_files
Returns all translation files for a given text domain.
Метод класса: WP_Translation_Controller{}
Хуков нет.
Возвращает
WP_Translation_File[]. List of translation files.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_files( $textdomain, ?string $locale ): array;
- $textdomain(строка)
- Text domain.
По умолчанию:'default' - ?string $locale
- .
По умолчанию:null
Список изменений
| С версии 6.5.0 | Введена. |
Код WP_Translation_Controller::get_files() WP Translation Controller::get files WP 7.0
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();
}