WP_Textdomain_Registry::get
Returns the languages directory path for a specific domain and locale.
Метод класса: WP_Textdomain_Registry{}
Хуки из метода
Возвращает
Строку|false. Languages directory path or false if there is none available.
Использование
$WP_Textdomain_Registry = new WP_Textdomain_Registry(); $WP_Textdomain_Registry->get( $domain, $locale );
- $domain(строка) (обязательный)
- Text domain.
- $locale(строка) (обязательный)
- Locale.
Список изменений
| С версии 6.1.0 | Введена. |
Код WP_Textdomain_Registry::get() WP Textdomain Registry::get WP 7.0
public function get( $domain, $locale ) {
$path = $this->all[ $domain ][ $locale ] ?? $this->get_path_from_lang_dir( $domain, $locale );
/**
* Filters the determined languages directory path for a specific domain and locale.
*
* @since 6.6.0
*
* @param string|false $path Languages directory path for the given domain and locale.
* @param string $domain Text domain.
* @param string $locale Locale.
*/
return apply_filters( 'lang_dir_for_domain', $path, $domain, $locale );
}