[wp-trac] [WordPress Trac] #38899: Deletion of auto-drafts and trashed posts never gets scheduled unless user accesses admin pages
WordPress Trac
noreply at wordpress.org
Tue Nov 22 04:17:13 UTC 2016
#38899: Deletion of auto-drafts and trashed posts never gets scheduled unless user
accesses admin pages
--------------------------+--------------------------
Reporter: westonruter | Owner: westonruter
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 4.7
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+--------------------------
Changes (by westonruter):
* keywords: => has-patch
Comment:
[attachment:38899.1.diff] moves the scheduling of trashed post deletion
and auto-draft deletion to a new `wp_schedule_garbage_collection()`
function which gets called at `init`. I suppose this could instead be done
once during the `wp_install` action, but since `wp_install()` is pluggable
I'd be nervous that some installs could happen to not get these events
scheduled.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38899#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list