_WP_Dependency::set_translations()publicWP 5.0.0

Sets the translation domain for this dependency.

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

Хуков нет.

Возвращает

true|false. False if $domain is not a string, true otherwise.

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

$_WP_Dependency = new _WP_Dependency();
$_WP_Dependency->set_translations( $domain, $path );
$domain(строка) (обязательный)
The translation textdomain.
$path(строка)
The full file path to the directory containing translation files.
По умолчанию: ''

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

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

Код _WP_Dependency::set_translations() WP 6.5.2

public function set_translations( $domain, $path = '' ) {
	if ( ! is_string( $domain ) ) {
		return false;
	}
	$this->textdomain        = $domain;
	$this->translations_path = $path;
	return true;
}