mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 16:21:26 +01:00
Trash status update, see #4529
git-svn-id: http://svn.automattic.com/wordpress/trunk@11750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
39e4f05a15
commit
dc37cd4ce4
@ -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
Block a user