Make WordPress Core


Ignore:
Timestamp:
01/27/2024 12:05:24 AM (3 years 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/wpRestTemplateAutosavesController.php

    r56819 r57366  
    311311                $properties = $data['schema']['properties'];
    312312
    313                 $this->assertCount( 16, $properties );
     313                $this->assertCount( 18, $properties );
    314314                $this->assertArrayHasKey( 'id', $properties, 'ID key should exist in properties.' );
    315315                $this->assertArrayHasKey( 'slug', $properties, 'Slug key should exist in properties.' );
    … …  
    327327                $this->assertArrayHasKey( 'is_custom', $properties, 'is_custom key should exist in properties.' );
    328328                $this->assertArrayHasKey( 'parent', $properties, 'Parent key should exist in properties.' );
     329                $this->assertArrayHasKey( 'author_text', $properties, 'Parent key should exist in properties.' );
     330                $this->assertArrayHasKey( 'original_source', $properties, 'Parent key should exist in properties.' );
    329331        }
    330332
Note: See TracChangeset for help on using the changeset viewer.