Opened 7 years ago
Closed 7 years ago
#42413 closed defect (bug) (fixed)
Customize: Export the current changeset's date if it's in the future
Reported by: | dlh | Owned by: | westonruter |
---|---|---|---|
Milestone: | 4.9 | Priority: | low |
Severity: | normal | Version: | 4.9 |
Component: | Customize | Keywords: | has-patch commit dev-reviewed |
Focuses: | Cc: |
Description
There seems to be a slight difference in behavior between the Publish Settings in the Customizer and the edit-post screen in this scenario:
- Schedule a changeset.
- Switch the changeset to a draft and save again.
- Exit the Customizer and open it again later such that the changeset draft is loaded.
If you go back to the Publish Settings and select "Schedule," the date shown will be the current date and time, not the actual date of the changeset post in the database (which is the date for which the changeset was previously scheduled). By contrast, the edit-post screen will show the database date.
WP_Customize_Manager::customize_pane_settings()
will currently export the date of the changeset post if its status is future
. The attached patch would instead check that the changeset post's date is in the future, regardless of post status. (Exporting a date in the past doesn't seem to make sense because scheduling a changeset with a past date is blocked, not published immediately.)
Attachments (3)
Change History (10)
#1
@
7 years ago
- Milestone changed from Awaiting Review to 4.9
- Owner set to westonruter
- Status changed from new to accepted
42413.2.diff works, but you could probably move the
$initial_date < $current_time
conditional inside the$changeset_post
condition. It doesn't seem to be relevant outside of it.