wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_has_ability_category › WordPress Function

Since6.9.0
Deprecatedn/a
wp_has_ability_category ( $slug )
Parameters:
  • (string) $slug The slug of the ability category.
    Required: Yes
See:
  • WP_Ability_Categories_Registry::is_registered()
Returns:
  • (bool) True if the ability category is registered, false otherwise.
Defined at:
Codex:

Checks if an ability category is registered.



Source

function wp_has_ability_category( string $slug ): bool {
	$registry = WP_Ability_Categories_Registry::get_instance();
	if ( null === $registry ) {
		return false;
	}

	return $registry->is_registered( $slug );
}