apply_filters( 'wp_ability_normalize_input', mixed $input, string $ability_name, WP_Ability $ability )
- Since
- 7.1.0
Filters the normalized input for an ability.
Description
Fires after normalize_input() has applied any default value declared in the input schema, giving plugins a chance to adjust the input before it is consumed downstream. Common uses include defaulting beyond what JSON Schema can express, prompt enrichment, and injecting caller metadata.
Returning a WP_Error causes callers that propagate it (such as execute()) to halt before validation, permission checks, and the registered execute callback.
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
$inputmixed- The normalized input data.
$ability_namestring- The name of the ability.
$abilityWP_Ability- The ability instance.
Where this hook fires · 1
wp-includes/abilities-api/class-wp-ability.php:508WP_Ability::normalize_input()
Source code
* @since 7.1.0 * * @param mixed $input The normalized input data. * @param string $ability_name The name of the ability. * @param WP_Ability $ability The ability instance. */ return apply_filters( 'wp_ability_normalize_input', $input, $this->name, $this ); } /** * Validates input data against the input schema. * * @since 6.9.0Changelog
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.