[wp-trac] [WordPress Trac] #64209: Allow abilities to be deprecated
WordPress Trac
noreply at wordpress.org
Tue May 26 16:48:18 UTC 2026
#64209: Allow abilities to be deprecated
---------------------------+---------------------
Reporter: jorbin | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 7.1
Component: Abilities API | Version: 6.9
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
---------------------------+---------------------
Comment (by gziolo):
I think a lightweight deprecation mechanism makes sense here, mainly to
support discovery without breaking backward compatibility. Deprecated
abilities should remain registered, retrievable by exact name, and
executable if permissions pass. At the same time, they should probably be
excluded from `wp_get_abilities()` and REST discovery by default, with an
explicit way to include them when needed.
For metadata, I would prefer `meta.deprecated` to be structured rather
than only a boolean, for example with `since`, `replacement`, and/or
`message` fields. That would give consumers enough information to migrate
while keeping the ability identifier stable. This seems consistent with
how WordPress generally handles public APIs: keep existing contracts
working where possible, but provide enough information for consumers to
move away from deprecated usage.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64209#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list