WordPress 3.4
[autoinstalls/wordpress.git] / wp-admin / post-new.php
index a5d74e8b5be9d821d27864303a32c6d18ac79b55..deb41907e27a15a4217b929e39254f80d9b91c9b 100644 (file)
@@ -39,6 +39,10 @@ $editing = true;
 if ( ! current_user_can( $post_type_object->cap->edit_posts ) )
        wp_die( __( 'Cheatin’ uh?' ) );
 
+// Schedule auto-draft cleanup
+if ( ! wp_next_scheduled( 'wp_scheduled_auto_draft_delete' ) )
+       wp_schedule_event( time(), 'daily', 'wp_scheduled_auto_draft_delete' );
+
 wp_enqueue_script('autosave');
 
 // Show post form.
@@ -46,4 +50,3 @@ $post = get_default_post_to_edit( $post_type, true );
 $post_ID = $post->ID;
 include('edit-form-advanced.php');
 include('./admin-footer.php');
-?>