[wp-trac] [WordPress Trac] #55574: WP_REST_Pattern_Directory_Controller::get_items doesn't support array arguments

WordPress Trac noreply at wordpress.org
Thu Apr 14 21:20:36 UTC 2022


#55574: WP_REST_Pattern_Directory_Controller::get_items doesn't support array
arguments
---------------------------+------------------------------
 Reporter:  antonvlasenko  |       Owner:  antonvlasenko
     Type:  enhancement    |      Status:  assigned
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  REST API       |     Version:  trunk
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:  rest-api
---------------------------+------------------------------

Comment (by antonvlasenko):

 Steps to test the PR:
 1. Activate a block-based theme like `Twenty Twenty-Two`.
 2. Open the `theme.json` file for that theme and add a new `patterns`
 setting to it:
 {{{
 "patterns": [
         "short-text-surrounded-by-round-images",
         "visual-navigation-with-rainbow-gradient"
   ],
 }}}
 You can use any pattern instead of the patterns above. However, it's
 important to use at least 2 patterns.
 A list of available patterns can be found here:
 https://wordpress.org/patterns/
 3. Make a GET call to this REST API endpoint:
 `/wp/v2/block-patterns/patterns`
 Expected result:
 The response must contact patterns added in step `2`.
 E.g.:
 [[Image(https://cldup.com/VHZlrnyQMm.png)]]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55574#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list