WP_Textdomain_Registry::has
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 Textdomain Registry::has WP 7.0
public function has( $domain ) {
return (
isset( $this->current[ $domain ] ) ||
empty( $this->all[ $domain ] ) ||
in_array( $domain, $this->domains_with_translations, true )
);
}