Make WordPress Core


Ignore:
Timestamp:
04/12/2022 09:24:51 AM (5 years ago)
Author:
gziolo
Message:

REST API: Bring new endpoints for Block Patterns from Gutenberg plugin

Related Gutenberg issue: ​https://github.com/WordPress/gutenberg/issues/39889.

Backporting changes from the Gutenberg plugin:

  • new Block Patterns REST API endpoint
  • new Block Pattern Categories REST API endpoint
  • updates to Query Loop related patterns
  • support for custom taxonomies in Query Loop block

Props hellofromtonya, peterwilsoncc, ntsekouras, zieladam, ironprogrammer, spacedmonkey, timothyblynjacobs, antonvlasenko, jsnajdr.
See #55505.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/blocks/wpBlock.php

    r52010 r53152  
    444444                                'orderby'      => 'title',
    445445                                'post__not_in' => array( 1, 2 ),
    446                                 'category__in' => array( 56 ),
    447                                 'tag__in'      => array( 3, 11, 10 ),
     446                                'tax_query'    => array(
     447                                        array(
     448                                                'taxonomy'         => 'category',
     449                                                'terms'            => array( 56 ),
     450                                                'include_children' => false,
     451                                        ),
     452                                        array(
     453                                                'taxonomy'         => 'post_tag',
     454                                                'terms'            => array( 3, 11, 10 ),
     455                                                'include_children' => false,
     456                                        ),
     457                                ),
    448458                        )
    449459                );
Note: See TracChangeset for help on using the changeset viewer.