Trash status update, see #4529
git-svn-id: https://develop.svn.wordpress.org/trunk@11750 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d9f8c67f2f
commit
16241293d3
|
@ -3352,18 +3352,18 @@ function wp_scheduled_delete() {
|
|||
|
||||
$delete_timestamp = time() - (60*60*24*EMPTY_TRASH_DAYS);
|
||||
|
||||
foreach ( $trash_meta['comments'] as $id => $meta ) {
|
||||
foreach ( (array) $trash_meta['comments'] as $id => $meta ) {
|
||||
if ( $meta['time'] < $delete_timestamp ) {
|
||||
wp_delete_comment($id);
|
||||
unset($trash_meta['comments'][$id]);
|
||||
}
|
||||
}
|
||||
foreach ( $trash_meta['posts'] as $id => $meta ) {
|
||||
foreach ( (array) $trash_meta['posts'] as $id => $meta ) {
|
||||
if ( $meta['time'] < $delete_timestamp ) {
|
||||
wp_delete_post($id);
|
||||
unset($to_delete['posts'][$id]);
|
||||
unset($trash_meta['posts'][$id]);
|
||||
}
|
||||
}
|
||||
|
||||
update_option('wp_scheduled_delete', $to_delete);
|
||||
update_option('wp_trash_meta', $trash_meta);
|
||||
}
|
||||
|
|
|
@ -1249,7 +1249,7 @@ function wp_trash_post($postid = 0) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Removes a post or page from the Trash
|
||||
* Restores a post or page from the Trash
|
||||
*
|
||||
* @since 2.9.0
|
||||
* @uses do_action() on 'untrash_post' before undeletion
|
||||
|
|
Loading…
Reference in New Issue