Filters the result returned by an ability's execute callback.
Description
Fires after the registered execute callback runs. Plugins can use this to transform the result — response formatting, stripping internal metadata, content safety filtering, response enrichment, or recovering from a failure by returning a successful value. The filter receives whatever the registered callback produced, including a WP_Error if execution failed. Filters may pass the WP_Error through unchanged, override it with a recovered result, or convert a successful result into a WP_Error.
Parameters
$resultmixed
The result returned by the registered execute_callback, or a WP_Error if execution failed.
695* @param mixed$result The result returned by the registered `execute_callback`,696*or a `WP_Error`if execution failed.697* @param string$ability_name The name of the ability.698* @param mixed$input The normalized input data.699* @param WP_Ability$ability The ability instance.700*/701returnapply_filters('wp_ability_execute_result',$result,$this->name,$input,$this);702}703704/**705* Validates output data against the output schema.706*707* @since 6.9.0
History
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.