WP_Textdomain_Registry::set_custom_path()publicWP 6.1.0

Sets the custom path to the plugin's/theme's languages directory.

Used by load_plugin_textdomain() and load_theme_textdomain().

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

Хуков нет.

Возвращает

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

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

$WP_Textdomain_Registry = new WP_Textdomain_Registry();
$WP_Textdomain_Registry->set_custom_path( $domain, $path );
$domain(строка) (обязательный)
Text domain.
$path(строка) (обязательный)
Language directory path.

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

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

Код WP_Textdomain_Registry::set_custom_path() WP 6.4.3

public function set_custom_path( $domain, $path ) {
	$this->custom_paths[ $domain ] = rtrim( $path, '/' );
}