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

$domainstringrequired
Text domain.

Return

bool Whether any MO file paths are available for the domain.

Source

public function has( $domain ) {
	return (
		isset( $this->current[ $domain ] ) ||
		empty( $this->all[ $domain ] ) ||
		in_array( $domain, $this->domains_with_translations, true )
	);
}

Changelog

VersionDescription
6.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.