[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/abilities-api/ -> class-wp-abilities-registry.php (summary)

Abilities API Defines WP_Abilities_Registry class.

File Size: 330 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 8 functions

  register()
  unregister()
  get_all_registered()
  is_registered()
  get_registered()
  get_instance()
  __wakeup()
  __sleep()

Functions
Functions that are not part of a class:

register( string $name, array $args )   X-Ref
Registers a new ability.

Do not use this method directly. Instead, use the `wp_register_ability()` function.

param: string               $name The name of the ability. The name must be a string containing a namespace
param: array<string, mixed> $args {
return: WP_Ability|null The registered ability instance on success, null on failure.

unregister( string $name )   X-Ref
Unregisters an ability.

Do not use this method directly. Instead, use the `wp_unregister_ability()` function.

param: string $name The name of the registered ability, with its namespace.
return: WP_Ability|null The unregistered ability instance on success, null on failure.

get_all_registered()   X-Ref
Retrieves the list of all registered abilities.

Do not use this method directly. Instead, use the `wp_get_abilities()` function.

return: WP_Ability[] The array of registered abilities.

is_registered( string $name )   X-Ref
Checks if an ability is registered.

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

param: string $name The name of the registered ability, with its namespace.
return: bool True if the ability is registered, false otherwise.

get_registered( string $name )   X-Ref
Retrieves a registered ability.

Do not use this method directly. Instead, use the `wp_get_ability()` function.

param: string $name The name of the registered ability, with its namespace.
return: WP_Ability|null The registered ability instance, or null if it is not registered.

get_instance()   X-Ref
Utility method to retrieve the main instance of the registry class.

The instance will be created if it does not exist yet.

return: WP_Abilities_Registry|null The main registry instance, or null when `init` action has not fired.

__wakeup()   X-Ref
Wakeup magic method.


__sleep()   X-Ref
Sleep magic method.




Generated : Tue May 5 08:20:14 2026 Cross-referenced by PHPXref