WP_Textdomain_Registry::set()publicWP 6.1.0

Sets the language directory path for a specific domain and locale.

Also sets the 'current' property for direct access to the path for the current (most recent) locale.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$WP_Textdomain_Registry = new WP_Textdomain_Registry();
$WP_Textdomain_Registry->set( $domain, $locale, $path );
$domain(строка) (обязательный)
Text domain.
$locale(строка) (обязательный)
Locale.
$path(строка|false) (обязательный)
Language directory path or false if there is none available.

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

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

Код WP_Textdomain_Registry::set() WP 6.5.2

public function set( $domain, $locale, $path ) {
	$this->all[ $domain ][ $locale ] = $path ? rtrim( $path, '/' ) . '/' : false;
	$this->current[ $domain ]        = $this->all[ $domain ][ $locale ];
}