Make WordPress Core


Ignore:
Timestamp:
01/27/2024 12:05:24 AM (6 months ago)
Author:
jorgefilipecosta
Message:

Editor: Add original_source and author_text to the templates REST API.

For the new "All templates" UI to work properly we need the REST API to provide to additional fields original_source, and author_text.

Props ntsekouras, get_dave.
Fixes #60358.

File:
1 edited

Legend:

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

    r57268 r57366  
    450450        $properties = $data['schema']['properties'];
    451451
    452         $this->assertCount( 16, $properties );
     452        $this->assertCount( 18, $properties );
    453453        $this->assertArrayHasKey( 'id', $properties, 'ID key should exist in properties.' );
    454454        $this->assertArrayHasKey( 'slug', $properties, 'Slug key should exist in properties.' );
     
    466466        $this->assertArrayHasKey( 'is_custom', $properties, 'is_custom key should exist in properties.' );
    467467        $this->assertArrayHasKey( 'parent', $properties, 'Parent key should exist in properties.' );
     468        $this->assertArrayHasKey( 'author_text', $properties, 'Parent key should exist in properties.' );
     469        $this->assertArrayHasKey( 'original_source', $properties, 'Parent key should exist in properties.' );
    468470    }
    469471
Note: See TracChangeset for help on using the changeset viewer.