diff --git a/wp-admin/edit-pages.php b/wp-admin/edit-pages.php
index bda3a4bfc4..e1b70638d1 100644
--- a/wp-admin/edit-pages.php
+++ b/wp-admin/edit-pages.php
@@ -17,6 +17,7 @@ if ( isset($_GET['action']) && ( -1 != $_GET['action'] || -1 != $_GET['action2']
case 'delete':
if ( isset($_GET['post']) && ! isset($_GET['bulk_edit']) && (isset($_GET['doaction']) || isset($_GET['doaction2'])) ) {
check_admin_referer('bulk-pages');
+ $deleted = 0;
foreach( (array) $_GET['post'] as $post_id_del ) {
$post_del = & get_post($post_id_del);
@@ -30,6 +31,7 @@ if ( isset($_GET['action']) && ( -1 != $_GET['action'] || -1 != $_GET['action2']
if ( !wp_delete_post($post_id_del) )
wp_die( __('Error in deleting...') );
}
+ $deleted++;
}
}
break;
@@ -58,6 +60,8 @@ if ( isset($_GET['action']) && ( -1 != $_GET['action'] || -1 != $_GET['action2']
$done['locked'] = count( $done['locked'] );
$sendback = add_query_arg( $done, $sendback );
}
+ if ( isset($deleted) )
+ $sendback = add_query_arg('deleted', $deleted, $sendback);
wp_redirect($sendback);
exit();
} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
@@ -102,23 +106,28 @@ require_once('admin-header.php'); ?>
-
+
diff --git a/wp-admin/edit.php b/wp-admin/edit.php
index 8e1cad3c48..83232f7459 100644
--- a/wp-admin/edit.php
+++ b/wp-admin/edit.php
@@ -25,6 +25,7 @@ if ( isset($_GET['action']) && ( -1 != $_GET['action'] || -1 != $_GET['action2']
case 'delete':
if ( isset($_GET['post']) && ! isset($_GET['bulk_edit']) && (isset($_GET['doaction']) || isset($_GET['doaction2'])) ) {
check_admin_referer('bulk-posts');
+ $deleted = 0;
foreach( (array) $_GET['post'] as $post_id_del ) {
$post_del = & get_post($post_id_del);
@@ -38,6 +39,7 @@ if ( isset($_GET['action']) && ( -1 != $_GET['action'] || -1 != $_GET['action2']
if ( !wp_delete_post($post_id_del) )
wp_die( __('Error in deleting...') );
}
+ $deleted++;
}
}
break;
@@ -66,6 +68,8 @@ if ( isset($_GET['action']) && ( -1 != $_GET['action'] || -1 != $_GET['action2']
$done['locked'] = count( $done['locked'] );
$sendback = add_query_arg( $done, $sendback );
}
+ if ( isset($deleted) )
+ $sendback = add_query_arg('deleted', $deleted, $sendback);
wp_redirect($sendback);
exit();
} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
@@ -100,21 +104,27 @@ if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET
-
+
diff --git a/wp-admin/page.php b/wp-admin/page.php
index 90992d9bc4..97b28b9b23 100644
--- a/wp-admin/page.php
+++ b/wp-admin/page.php
@@ -170,8 +170,9 @@ case 'delete':
}
$sendback = wp_get_referer();
- if (strpos($sendback, 'page.php') !== false) $sendback = admin_url('page-new.php');
+ if (strpos($sendback, 'page.php') !== false) $sendback = admin_url('edit-pages.php?deleted=1');
elseif (strpos($sendback, 'attachments.php') !== false) $sendback = admin_url('attachments.php');
+ else $sendback = add_query_arg('deleted', 1, $sendback);
wp_redirect($sendback);
exit();
break;
diff --git a/wp-admin/post.php b/wp-admin/post.php
index 17b2b05fbc..af8e081394 100644
--- a/wp-admin/post.php
+++ b/wp-admin/post.php
@@ -211,8 +211,9 @@ case 'delete':
}
$sendback = wp_get_referer();
- if (strpos($sendback, 'post.php') !== false) $sendback = admin_url('post-new.php');
+ if (strpos($sendback, 'post.php') !== false) $sendback = admin_url('edit.php?deleted=1');
elseif (strpos($sendback, 'attachments.php') !== false) $sendback = admin_url('attachments.php');
+ else $sendback = add_query_arg('deleted', 1, $sendback);
wp_redirect($sendback);
exit();
break;