wp_after_execute_ability хук-событиеWP 6.9.0

Fires immediately after an ability finished executing.

Использование

add_action( 'wp_after_execute_ability', 'wp_kama_after_execute_ability_action', 10, 4 );

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

	// action...
}
$ability_name(строка)
The name of the ability.
$input(разное)
The input data for the ability.
$result(разное)
The result of the ability execution.
$ability(WP_Ability)
The ability instance.

Список изменений

С версии 6.9.0 Введена.
С версии 7.1.0 Added the $ability parameter.

Где вызывается хук

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

Где используется хук в WordPress

Использование не найдено.