WP_Textdomain_Registry::get()publicWP 6.1.0

Returns the languages directory path for a specific domain and locale.

Метод класса: WP_Textdomain_Registry{}

Хуков нет.

Возвращает

Строку|false. MO file 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 6.5.2

public function get( $domain, $locale ) {
	if ( isset( $this->all[ $domain ][ $locale ] ) ) {
		return $this->all[ $domain ][ $locale ];
	}

	return $this->get_path_from_lang_dir( $domain, $locale );
}