[wp-trac] [WordPress Trac] #64596: Abilities API: Allow nested namespace ability names (2-4 segments)
WordPress Trac
noreply at wordpress.org
Mon Feb 9 17:00:11 UTC 2026
#64596: Abilities API: Allow nested namespace ability names (2-4 segments)
------------------------------+-------------------------------
Reporter: jorgefilipecosta | Owner: jorgefilipecosta
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 7.0
Component: AI | Version: trunk
Severity: normal | Resolution: fixed
Keywords: | Focuses:
------------------------------+-------------------------------
Changes (by jorgefilipecosta):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"61602" 61602]:
{{{
#!CommitTicketReference repository="" revision="61602"
Abilities API: Allow nested namespace ability names (2-4 segments).
Expand ability name validation from exactly 2 segments
(`namespace/ability`) to 2-4 segments, enabling names like `my-
plugin/resource/find` and `my-plugin/resource/sub/find`.
This allows plugins to organize abilities into logical resource groups.
The validation regex changes from `/^[a-z0-9-]+\/[a-z0-9-]+$/` to
`/^[a-z0-9-]+(?:\/[a-z0-9-]+){1,3}$/`, which accepts the first segment
plus 1-3 additional slash-delimited segments.
Updates the validation regex, error messages, docblocks, and adds
corresponding unit and REST API tests.
Props jorgefilipecosta, justlevine, jorbin.
Fixes #64596.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64596#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list