[wp-trac] [WordPress Trac] #38610: Set `format` enum based on the post formats registered to the theme

WordPress Trac noreply at wordpress.org
Wed Nov 2 12:42:40 UTC 2016


#38610: Set `format` enum based on the post formats registered to the theme
----------------------------------------+---------------------
 Reporter:  danielbachhuber             |       Owner:  rmccue
     Type:  defect (bug)                |      Status:  closed
 Priority:  normal                      |   Milestone:  4.7
Component:  REST API                    |     Version:
 Severity:  normal                      |  Resolution:  fixed
 Keywords:  needs-unit-tests has-patch  |     Focuses:
----------------------------------------+---------------------

Comment (by nerrad):

 I have some questions about this commit because it seems to mean that
 themes are informing the data that gets returned via the api.  However, I
 might be misunderstanding what got changed here.

 If I'm understanding correctly, with this change, it means that the schema
 will only return the enum values for post formats that are registered by
 the active theme on a site (regardless of what post format slugs may be in
 the database).

 Does this mean that any validation of rest request queries against
 post_format only allow these slugs?

 Are clients still able to discover all post_formats available on a WP site
 (regardless) of what the theme has registered?

 If clients want to utilize post_formats for how the client is displaying
 the data, are they still able to POST and GET any custom formats that are
 _not_ registered by the active theme on the WordPress site?

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


More information about the wp-trac mailing list