Returns the languages directory path for a specific domain and locale.
Parameters
$domain
stringrequired- Text domain.
$locale
stringrequired- Locale.
Source
public function get( $domain, $locale ) {
$path = $this->all[ $domain ][ $locale ] ?? $this->get_path_from_lang_dir( $domain, $locale );
/**
* Filters the determined languages directory path for a specific domain and locale.
*
* @since 6.6.0
*
* @param string|false $path Languages directory path for the given domain and locale.
* @param string $domain Text domain.
* @param string $locale Locale.
*/
return apply_filters( 'lang_dir_for_domain', $path, $domain, $locale );
}
Hooks
- apply_filters( ‘lang_dir_for_domain’,
string|false $path ,string $domain ,string $locale ) Filters the determined languages directory path for a specific domain and locale.
Changelog
Version | Description |
---|---|
6.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.