[wp-trac] [WordPress Trac] #39996: Grant clients more liberty in setting 'template' attribute

WordPress Trac noreply at wordpress.org
Wed Mar 1 00:44:16 UTC 2017


#39996: Grant clients more liberty in setting 'template' attribute
------------------------------------------+--------------------
 Reporter:  danielbachhuber               |       Owner:
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  4.7.4
Component:  REST API                      |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+--------------------

Comment (by dd32):

 Replying to [comment:1 jnylen0]:
 > If we apply the same logic for templates, we are essentially saying that
 clients can set any arbitrary data (or just an arbitrary PHP filename) in
 this field, which doesn't seem right.  Instead, I think the change we
 should make here is to enable setting a post to the same `template` value
 that it currently has - this should be a no-op even if the current theme
 doesn't support that value.

 I agree with this - There doesn't appear to be any value in allowing it to
 be set to a value which isn't supported by the theme - as it's theme-
 specific data (unlike post formats), however we shouldn't force a client
 to wipe out the existing value in order to resave a post.
 @danielbachhuber If you've got a use-case, I'd love to hear it

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


More information about the wp-trac mailing list