WP_Textdomain_Registry::has()
Determines whether any MO file paths are available for the domain.
This is the case if a path has been set for the current locale, or if there is no information stored yet, in which case _load_textdomain_just_in_time() will fetch the information first.
Method of the class: WP_Textdomain_Registry{}
No Hooks.
Return
true|false
. Whether any MO file paths are available for the domain.
Usage
$WP_Textdomain_Registry = new WP_Textdomain_Registry(); $WP_Textdomain_Registry->has( $domain );
- $domain(string) (required)
- Text domain.
Changelog
Since 6.1.0 | Introduced. |
WP_Textdomain_Registry::has() WP Textdomain Registry::has code WP 6.8
public function has( $domain ) { return ( isset( $this->current[ $domain ] ) || empty( $this->all[ $domain ] ) || in_array( $domain, $this->domains_with_translations, true ) ); }