WP_Textdomain_Registry::has()publicWP 6.1.0

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() code WP 6.1.1

public function has( $domain ) {
	return ! empty( $this->current[ $domain ] ) || empty( $this->all[ $domain ] );
}