Make WordPress Core


Ignore:
Timestamp:
11/09/2021 01:57:48 AM (3 years ago)
Author:
TimothyBlynJacobs
Message:

REST API: Add batch support for posts and terms controllers.

This also exposes the value of allow_batch in OPTIONS requests to a route.

A future commit will add batch support to more resources.

Props spacedmonkey, chrisvanpatten.
See #53063.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-widgets-controller.php

    r52031 r52068  
    15241524        $properties = $data['schema']['properties'];
    15251525
     1526        $this->assertSame( array( 'v1' => true ), $data['endpoints'][0]['allow_batch'] );
     1527
    15261528        $this->assertCount( 7, $properties );
    15271529        $this->assertArrayHasKey( 'id', $properties );
Note: See TracChangeset for help on using the changeset viewer.