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.

{} Это метод класса: WP_Textdomain_Registry{}

Хуков нет.

Возвращает

true|false. Whether any MO file paths are available for the domain.

Использование

$WP_Textdomain_Registry = new WP_Textdomain_Registry();
$WP_Textdomain_Registry->has( $domain );
$domain(строка) (обязательный)
Text domain.

Список изменений

С версии 6.1.0 Введена.

Код WP_Textdomain_Registry::has() WP 6.1.1

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