[wp-trac] [WordPress Trac] #38698: REST API: Enable page templates for all post types
WordPress Trac
noreply at wordpress.org
Tue Nov 8 22:03:51 UTC 2016
#38698: REST API: Enable page templates for all post types
--------------------------------------+-------------------------
Reporter: swissspidy | Owner: swissspidy
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.7
Component: Posts, Post Types | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: rest-api
--------------------------------------+-------------------------
Comment (by danielbachhuber):
Replying to [comment:5 swissspidy]:
> * Change conditional to only expose template option when there's at
least 1 template (what about back compat?)
Schemas are meant to be fixed, meaning `template` should always be an
attribute on a Post or Page. `enum` can be empty if there are no templates
present.
See `format` and the code around `$fixed_schemas` for an analogue.
`template` likely deserves to be handled by `$fixed_schemas` too.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38698#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list