On this page
WP_Textdomain_Registry::has( string $domain ): bool
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
$domainstring Required-
Text domain.
Return
bool Whether any MO file paths are available for the domain.
Source
File: wp-includes/class-wp-textdomain-registry.php. View all references
public function has( $domain ) {
return ! empty( $this->current[ $domain ] ) || empty( $this->all[ $domain ] );
}
Related
Used By
| Used By | Description |
|---|---|
| _load_textdomain_just_in_time() wp-includes/l10n.php | Loads plugin and theme text domains just-in-time. |
Changelog
| Version | Description |
|---|---|
| 6.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_textdomain_registry/has