WP_Textdomain_Registry::has( string $domain )
Determines whether any MO file paths are available for the domain.
Description
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.
Parameters
- $domain
-
(Required) Text domain.
Return
(bool) Whether any MO file paths are available for the domain.
Source
File: wp-includes/class-wp-textdomain-registry.php
public function has( $domain ) {
return (
! empty( $this->current[ $domain ] ) ||
empty( $this->all[ $domain ] ) ||
in_array( $domain, $this->domains_with_translations, true )
);
}
Changelog
Version | Description |
---|---|
6.1.0 | Introduced. |