WP_Abilities_Registry::is_registered │ public │ WP 6.9.0

Checks if an ability is registered.

Do not use this method directly. Instead, use the wp_has_ability()

Метод класса: WP_Abilities_Registry{}

Хуков нет.

Возвращает

bool. True if the ability is registered, false otherwise.

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

$WP_Abilities_Registry = new WP_Abilities_Registry();
$WP_Abilities_Registry->is_registered( $name ): bool;
$name(строка) (обязательный)
The name of the registered ability, with its namespace.

Заметки

Смотрите: wp_has_ability()

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

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

Код WP_Abilities_Registry::is_registered() WP 7.1.2

public function is_registered( string $name ): bool {
	return isset( $this->registered_abilities[ $name ] );
}