Normalizes the input for the ability, applying the default value from the input schema when needed.
Description
When no input is provided and the input schema is defined with a top-level default key, this method returns the value of that key. If the input schema does not define a default, or if the input schema is empty, this method returns null. If input is provided, it is returned as-is.
Parameters
$inputmixedoptional
The raw input provided for the ability. Default null.Default: null
Return
mixed
The same input, or the default from schema, or null if default not set.
Signature, return type and hooks compared across 3 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-includes/abilities-api/class-wp-ability.php, 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.