Changeset 20453 for trunk/wp-includes/functions.php
- Timestamp:
- 04/12/2012 06:49:48 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r20449 r20453 3309 3309 /** 3310 3310 * Permanently deletes posts, pages, attachments, and comments which have been in the trash for EMPTY_TRASH_DAYS. 3311 * Deletes auto-drafts for new posts that are > 7 days old3312 3311 * 3313 3312 * @since 2.9.0 … … 3351 3350 } 3352 3351 } 3353 3354 // Cleanup old auto-drafts more than 7 days old3355 $old_posts = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_status = 'auto-draft' AND DATE_SUB( NOW(), INTERVAL 7 DAY ) > post_date" );3356 foreach ( (array) $old_posts as $delete )3357 wp_delete_post( $delete, true ); // Force delete3358 3352 } 3359 3353
Note: See TracChangeset
for help on using the changeset viewer.