[wp-trac] [WordPress Trac] #59903: Add user pattern categories to the pattern categories API response
WordPress Trac
noreply at wordpress.org
Mon Nov 13 23:27:04 UTC 2023
#59903: Add user pattern categories to the pattern categories API response
--------------------------+-----------------------------
Reporter: glendaviesnz | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: trunk
Severity: normal | Keywords: has-patch
Focuses: |
--------------------------+-----------------------------
Currently user pattern categories and block pattern categories are merged
in a number of places in the editor front end. It makes sense to do tis in
a single place and the block-patterns/categories endpoint seems the
obvious place to do that.
There is a Gutenberg PR
(https://github.com/WordPress/gutenberg/pull/55822) that adds the user
pattern categories only if the `source` query param is specified and
includes `user`.
Also added is a new `id` field as this is needed to map the user
categories back to the taxonomy terms in certain parts of the UI. This
field is only returned if `id` is explicitly requeste in the _fields
param.
To see the added data the endpoint has to be called with `params _fields:
'name,label,description, id'` and `source: [ 'core', 'user' ]`.
There is a related core PR (https://github.com/WordPress/wordpress-
develop/pull/5621) but this should only be merged once the GB PR is
finalised and approved.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59903>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list