[wp-trac] [WordPress Trac] #38943: Customize changeset API issue with post date

WordPress Trac noreply at wordpress.org
Fri Nov 25 19:38:41 UTC 2016


#38943: Customize changeset API issue with post date
--------------------------+-----------------------------
 Reporter:  utkarshpatel  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Customize     |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 In changeset when we update status with `future` with date
 {{{#!php
 wp.customize.previewer.save({status: 'future', date: '2017-01-01
 00:00:00'})
 }}}

 And after that if we change status to `draft`
 {{{#!php
 wp.customize.previewer.save({status: 'draft', title: 'Add 2017 greeting'})
 }}}

 It keeps `2017-01-01 00:00:00` as post_date after that.

 If we send `draft` request with `date` param
 {{{#!php
 wp.customize.previewer.save({status: 'draft', title: 'Add 2017 greeting',
 date: '2016-11-26 01:02:00'})
 }}}
 It gives error `not_future_date`.

 https://github.com/WordPress/WordPress/blob/70fc99e323e27a72280aea3b8cf2a6bd73660d54
 /wp-includes/class-wp-customize-manager.php#L2019-L2042

 Here in code if date is passed it assumes `future` post_status.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38943>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list