[wp-trac] [WordPress Trac] #39232: REST API: Can't set existing post format if theme does not support it (2)

WordPress Trac noreply at wordpress.org
Tue Dec 13 03:18:03 UTC 2016


#39232: REST API: Can't set existing post format if theme does not support it (2)
--------------------------+------------------------------
 Reporter:  iseulde       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  REST API      |     Version:  4.7
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by jnylen0):

 Replying to @iseulde from ticket:38916#comment:5

 > Shouldn't you be able to POST the data you got back to the server
 without errors?

 I think this is an excellent design principle for an API.  Cases where
 this is not possible often point to problems in the API or elsewhere.

 Proposed solution for this ticket:

 - Always allow the standard post formats to be set; show them as part of
 the `format` enum in the arguments and schema.
 - Additionally allow the current post format to be set, even if the theme
 does not support it.  This should be a no-op.

 I'm fine with addressing this in the API interface first, then addressing
 the larger issue in core (as @Drivingralle explained) separately.

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


More information about the wp-trac mailing list