WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/12/2012 06:49:48 PM (9 years ago)
Author:
ryan
Message:

Schedule auto-draft deletion from post-new.php instead of from admin.php. This provides better throttling for large multisite installs and reduces the risk of a delete avalanche.

fixes #19663

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/post-new.php

    r19712 r20453  
    4040    wp_die( __( 'Cheatin’ uh?' ) );
    4141
     42// Schedule auto-draft cleanup
     43if ( ! wp_next_scheduled( 'wp_scheduled_auto_draft_delete' ) )
     44    wp_schedule_event( time(), 'daily', 'wp_scheduled_auto_draft_delete' );
     45
    4246wp_enqueue_script('autosave');
    4347
Note: See TracChangeset for help on using the changeset viewer.