[wp-trac] [WordPress Trac] #64139: Abilities API: Normalize input from schema
WordPress Trac
noreply at wordpress.org
Wed Oct 22 15:00:48 UTC 2025
#64139: Abilities API: Normalize input from schema
--------------------------+--------------------------------------
Reporter: gziolo | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.9
Component: General | Version: trunk
Severity: normal | Keywords: has-patch has-unit-tests
Focuses: |
--------------------------+--------------------------------------
Bug fix extracted from WordPress/abilities-api#108.
Follow-up for https://core.trac.wordpress.org/ticket/64098.
Normalizes the input for the ability, applying the default value from the
input schema when needed.
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64139>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list