apply_filters( ‘wp_ability_normalize_input’, mixed $input, string $ability_name, WP_Ability $ability )

In this article

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.

Parameters

$inputmixed
The normalized input data.
$ability_namestring
The name of the ability.
$abilityWP_Ability
The ability instance.

Source

return apply_filters( 'wp_ability_normalize_input', $input, $this->name, $this );

Changelog

VersionDescription
7.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.