[wp-trac] [WordPress Trac] #48798: REST API: Expose editor-color-palette theme support in /themes endpoint

WordPress Trac noreply at wordpress.org
Fri Jan 3 16:55:51 UTC 2020


#48798: REST API: Expose editor-color-palette theme support in /themes endpoint
-------------------------+-----------------------
 Reporter:  koke         |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  5.4
Component:  REST API     |     Version:  5.0
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  rest-api
-------------------------+-----------------------

Comment (by TimothyBlynJacobs):

 @koke this is looking good to me. One thing is that when listing
 properties, you can't use a type shorthand like that. You need to specify
 a full schema.

 {{{
 'name'  => 'string',
 }}}

 needs to be

 {{{
 'name' => array(
     'type' => 'string',
 ),
 }}}

 It also looks like a short array syntax array snuck in there for `editor-
 color-palette`.

 We also don't support the JSON-Schema v4+ required syntax, instead we use
 the v3 boolean syntax at the moment.


 {{{
 'required' => array( 'name', 'slug', 'color' ),
 }}}

 That being said, since this is a readonly property, we could just drop the
 `required` information entirely.

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


More information about the wp-trac mailing list