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()

Method of the class: WP_Abilities_Registry{}

No Hooks.

Returns

true|false. True if the ability is registered, false otherwise.

Usage

$WP_Abilities_Registry = new WP_Abilities_Registry();
$WP_Abilities_Registry->is_registered( $name ): bool;
$name(string) (required)
The name of the registered ability, with its namespace.

Notes

Changelog

Since 6.9.0 Introduced.

WP_Abilities_Registry::is_registered() code WP 7.0

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