Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#44337 closed defect (bug) (fixed)

Move scheduling of auto-draft garbage collection to `get_default_post_to_edit()`

Reported by: azaozz Owned by: azaozz
Milestone: 4.9.7 Priority: normal
Severity: normal Version:
Component: Cron API Keywords:
Focuses: Cc:


Scheduling for the wp_cron job that deletes expired auto-drafts is in post_new.php. If an user doesn't load the New Post screen in a while, there may be a lot of old auto-drafts piling up.

The auto-draft posts are created in get_default_post_to_edit() (when $create_in_db = true). It makes sense to schedule the deletion of old auto-drafts at the same time.

Change History (1)

#1 @azaozz
3 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 43338:

Move scheduling of old auto-draft posts deletion to get_default_post_to_edit() (where auto-drafts are created).

Fixes #44337.

Note: See TracTickets for help on using tickets.