wp_abilities_api_init
Fires when preparing abilities registry.
Abilities should be created and register their hooks on this action rather than another action to ensure they're only loaded when needed.
Usage
add_action( 'wp_abilities_api_init', 'wp_kama_abilities_api_init_action' );
/**
* Function for `wp_abilities_api_init` action-hook.
*
* @param WP_Abilities_Registry $instance Abilities registry object.
*
* @return void
*/
function wp_kama_abilities_api_init_action( $instance ){
// action...
}
- $instance(WP_Abilities_Registry)
- Abilities registry object.
Changelog
| Since 6.9.0 | Introduced. |
Where the hook is called
wp_abilities_api_init
wp-includes/abilities-api/class-wp-abilities-registry.php 303
do_action( 'wp_abilities_api_init', self::$instance );
Where the hook is used in WordPress
wp-includes/default-filters.php 539
add_action( 'wp_abilities_api_init', 'wp_register_core_abilities' );