WP_Abilities_Registry::is_registeredpublicWP 6.9.0

Checks if an ability is registered.

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

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

Хуков нет.

Возвращает

true|false. 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.

Заметки

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

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

Код WP_Abilities_Registry::is_registered() WP 6.9

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