WP_Textdomain_Registry::get_paths_for_domain()privateWP 6.2.0

Returns possible language directory paths for a given text domain.

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

Хуков нет.

Возвращает

Строку[]. Array of language directory paths.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->get_paths_for_domain( $domain );
$domain(строка) (обязательный)
Text domain.

Список изменений

С версии 6.2.0 Введена.

Код WP_Textdomain_Registry::get_paths_for_domain() WP 6.5.2

private function get_paths_for_domain( $domain ) {
	$locations = array(
		WP_LANG_DIR . '/plugins',
		WP_LANG_DIR . '/themes',
	);

	if ( isset( $this->custom_paths[ $domain ] ) ) {
		$locations[] = $this->custom_paths[ $domain ];
	}

	return $locations;
}