[wp-trac] [WordPress Trac] #39715: Customize: Keep alive auto-drafts created for page/post stubs, and delete when changeset is garbage-collected
WordPress Trac
noreply at wordpress.org
Thu Jan 26 23:00:11 UTC 2017
#39715: Customize: Keep alive auto-drafts created for page/post stubs, and delete
when changeset is garbage-collected
--------------------------+-------------------
Reporter: westonruter | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7.3
Component: Customize | Version: 4.7
Severity: normal | Keywords:
Focuses: |
--------------------------+-------------------
By default the customizer will store the customized state in a
`customize_changeset` post that gets an `auto-draft` status so that it
will be garbage-collected after a week. Whenever the changeset is updated,
the `post_date` should be updated to the current datetime so that it will
be kept-alive for another week (see #39713). However, when new page/post
stubs are created via nav menus (#34923) or via starter content (#38114)
these are also inserted with the `auto-draft` status. Whenever the
changeset is updated and its `post_date` is bumped, the `post_date` for
each of the auto-draft `nav_menus_created_posts` also needs to be
correspondingly bumped. Currently such page/post stubs can be deleted out
from under the changeset prematurely.
Additionally, if `customize_changeset` is transitioned to a stable `draft`
status so that it will not be garbage-collected, any auto-draft
`nav_menus_created_posts` should have the `post_date` bumped to be very
far in the future so that they will always be ignored by
`wp_delete_auto_drafts()`.
Lastly, when a `customize_changeset` post is deleted without having been
published, all auto-draft `nav_menus_created_posts` should be deleted as
well.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39715>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list