WP_Textdomain_Registry::get_paths_for_domain( string $domain ): string[]

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Returns possible language directory paths for a given text domain.

Parameters

$domainstringrequired
Text domain.

Return

string[] Array of language directory paths.

Source

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;
}

Changelog

VersionDescription
6.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.