WP_Textdomain_Registry::get()
Returns the languages directory path for a specific domain and locale.
Method of the class: WP_Textdomain_Registry{}
Hooks from the method
Return
String|false
. Languages directory path or false if there is none available.
Usage
$WP_Textdomain_Registry = new WP_Textdomain_Registry(); $WP_Textdomain_Registry->get( $domain, $locale );
- $domain(string) (required)
- Text domain.
- $locale(string) (required)
- Locale.
Changelog
Since 6.1.0 | Introduced. |
WP_Textdomain_Registry::get() WP Textdomain Registry::get code WP 6.7.1
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 ); }