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().

Method of the class: WP_Textdomain_Registry{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_Textdomain_Registry = new WP_Textdomain_Registry();
$WP_Textdomain_Registry->set_custom_path( $domain, $path );
$domain(string) (required)
Text domain.
$path(string) (required)
Language directory path.

Changelog

Since 6.1.0 Introduced.

WP_Textdomain_Registry::set_custom_path() code WP 6.6.2

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