wppaste
WordPress

do_action( 'wp_ability_invoked', string $ability_name, mixed $input, WP_Ability $ability )

Since
7.1.0
Fires when an ability is invoked, before any processing takes place.

Description

This action fires for every call regardless of outcome (validation failure, permission denial, short-circuit, or successful execution), and before input normalization so the raw input is captured as-is.

Compatibility

WordPress
since 7.1.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in 1 of the 5 tracked releases, added in 7.1.0.

Parameters

$ability_namestring
The name of the ability.
$inputmixed
The raw input data for the ability, before normalization.
$abilityWP_Ability
The ability instance.

Where this hook fires · 1

  • wp-includes/abilities-api/class-wp-ability.php:783WP_Ability::execute()

Source code

		 * @since 7.1.0		 *		 * @param string     $ability_name The name of the ability.		 * @param mixed      $input        The raw input data for the ability, before normalization.		 * @param WP_Ability $ability      The ability instance.		 */		do_action( 'wp_ability_invoked', $this->name, $input, $this ); 		$pre_execute_sentinel = new WP_Filter_Sentinel(); 		/**		 * Filters whether to short-circuit ability execution.		 *

Changelog

Introduced in 7.1.0.

Signature, return type and hooks compared across 1 parsed release.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.