wp_before_execute_ability action-hookWP 6.9.0

Fires before an ability gets executed, after input validation and permissions check.

Usage

add_action( 'wp_before_execute_ability', 'wp_kama_before_execute_ability_action', 10, 3 );

/**
 * Function for `wp_before_execute_ability` action-hook.
 * 
 * @param string     $ability_name The name of the ability.
 * @param mixed      $input        The input data for the ability.
 * @param WP_Ability $ability      The ability instance.
 *
 * @return void
 */
function wp_kama_before_execute_ability_action( $ability_name, $input, $ability ){

	// action...
}
$ability_name(string)
The name of the ability.
$input(mixed)
The input data for the ability.
$ability(WP_Ability)
The ability instance.

Changelog

Since 6.9.0 Introduced.
Since 7.1.0 Added the $ability parameter.

Where the hook is called

WP_Ability::execute()
wp_before_execute_ability
wp-includes/abilities-api/class-wp-ability.php 852
do_action( 'wp_before_execute_ability', $this->name, $input, $this );

Where the hook is used in WordPress

Usage not found.