Bulk Delete - Version 3.2

Version Description

Fixed bugs in handling post revisions and dates in categories. Added more options to delete pages.

Download this release

Release Info

Developer sudar
Plugin Icon 128x128 Bulk Delete
Version 3.2
Comparing to
See all releases

Code changes from version 3.1 to 3.2

bulk-delete.php CHANGED
@@ -5,7 +5,7 @@ Plugin Script: bulk-delete.php
5
  Plugin URI: http://sudarmuthu.com/wordpress/bulk-delete
6
  Description: Bulk delete posts from selected categories, tags, custom taxonomies or by post type like drafts, scheduled posts, revisions etc.
7
  Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
8
- Version: 3.1
9
  License: GPL
10
  Author: Sudar
11
  Author URI: http://sudarmuthu.com/
@@ -52,6 +52,16 @@ Domain Path: languages/
52
  - Added separate delete by sections for pages, drafts and urls
53
  - Added the option to delete by date for drafts, revisions, future posts etc
54
  - Added the option to delete by date for pages
 
 
 
 
 
 
 
 
 
 
55
  */
56
 
57
  /* Copyright 2009 Sudar Muthu (email : sudar@sudarmuthu.com)
@@ -75,9 +85,16 @@ Domain Path: languages/
75
  */
76
  class Bulk_Delete {
77
 
78
- const VERSION = '3.1';
79
- const JS_HANDLE = 'bulk-delete';
80
- const JS_VARIABLE = 'BULK_DELETE';
 
 
 
 
 
 
 
81
 
82
  /**
83
  * Default constructor
@@ -157,7 +174,7 @@ class Bulk_Delete {
157
 
158
  if ($file == $plugin) // only for this plugin
159
  return array_merge( $links,
160
- array( '<a href="http://sudarmuthu.com/out/bulk-delete-addons" target="_blank">' . __('Buy Addons', 'bulk-delete') . '</a>' )
161
  );
162
  return $links;
163
  }
@@ -176,35 +193,28 @@ class Bulk_Delete {
176
 
177
  <div id = "poststuff" style = "float:left; width:75%">
178
 
 
179
  <div class = "postbox">
180
  <div class = "handlediv"> <br> </div>
181
- <h3 class = "hndle"><span><?php _e("By Type", 'bulk-delete'); ?></span></h3>
182
  <div class = "inside">
183
  <h4><?php _e("Select the posts which you want to delete", 'bulk-delete'); ?></h4>
184
 
185
  <form name="smbd_form" id = "smbd_misc_form" action="<?php echo get_bloginfo("wpurl"); ?>/wp-admin/options-general.php?page=bulk-delete.php" method="post" onsubmit="return bd_validateForm(this);">
186
 
187
  <?php
188
- $wp_query = new WP_Query;
189
- $drafts = $wpdb->get_var("select count(*) from $wpdb->posts where post_status = 'draft'");
190
- $revisions = $wpdb->get_var("select count(*) from $wpdb->posts where post_type = 'revision'");
191
- $pending = $wpdb->get_var("select count(*) from $wpdb->posts where post_status = 'pending'");
192
- $future = $wpdb->get_var("select count(*) from $wpdb->posts where post_status = 'future'");
193
- $private = $wpdb->get_var("select count(*) from $wpdb->posts where post_status = 'private'");
194
  ?>
195
  <fieldset class="options">
196
  <table class="optiontable">
197
  <tr>
198
  <td scope="row" >
199
  <input name="smbd_drafts" id ="smbd_drafts" value = "drafts" type = "checkbox" />
200
- <label for="smbd_drafts"><?php _e("All Drafts", 'bulk-delete'); ?> (<?php echo $drafts . " "; _e("Drafts", 'bulk-delete'); ?>)</label>
201
- </td>
202
- </tr>
203
-
204
- <tr>
205
- <td>
206
- <input name="smbd_revisions" id ="smbd_revisions" value = "revisions" type = "checkbox" />
207
- <label for="smbd_revisions"><?php _e("All Revisions", 'bulk-delete'); ?> (<?php echo $revisions . " "; _e("Revisions", 'bulk-delete'); ?>)</label>
208
  </td>
209
  </tr>
210
 
@@ -237,103 +247,51 @@ class Bulk_Delete {
237
 
238
  <tr>
239
  <td scope="row">
240
- <input name="smbd_special_restrict" id="smbd_special_restrict" value = "true" type = "checkbox" onclick="toggle_date_restrict('special');" />
241
  <?php _e("Only restrict to posts which are ", 'bulk-delete');?>
242
- <select name="smbd_special_op" id="smbd_special_op" disabled>
243
  <option value ="<"><?php _e("older than", 'bulk-delete');?></option>
244
  <option value =">"><?php _e("posted within last", 'bulk-delete');?></option>
245
  </select>
246
- <input type ="textbox" name="smbd_special_days" id="smbd_special_days" disabled value ="0" maxlength="4" size="4" /><?php _e("days", 'bulk-delete');?>
247
  </td>
248
  </tr>
249
 
250
  <tr>
251
  <td scope="row">
252
- <input name="smbd_special_force_delete" value = "false" type = "radio" checked="checked" /> <?php _e('Move to Trash', 'bulk-delete'); ?>
253
- <input name="smbd_special_force_delete" value = "true" type = "radio" /> <?php _e('Delete permanently', 'bulk-delete'); ?>
254
  </td>
255
  </tr>
256
 
257
  <tr>
258
  <td scope="row">
259
- <input name="smbd_special_limit" id="smbd_special_limit" value = "true" type = "checkbox" onclick="toggle_limit_restrict('special');" />
260
  <?php _e("Only delete first ", 'bulk-delete');?>
261
- <input type ="textbox" name="smbd_special_limit_to" id="smbd_special_limit_to" disabled value ="0" maxlength="4" size="4" /><?php _e("posts.", 'bulk-delete');?>
262
  <?php _e("Use this option if there are more than 1000 posts and the script timesout.", 'bulk-delete') ?>
263
  </td>
264
  </tr>
265
 
266
- </table>
267
- </fieldset>
268
-
269
- <p class="submit">
270
- <input type="submit" name="submit" class="button-primary" value="<?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;">
271
- </p>
272
-
273
- <?php wp_nonce_field('bulk-delete-posts'); ?>
274
-
275
- <input type="hidden" name="smbd_action" value="bulk-delete-special" />
276
- </form>
277
- </div>
278
- </div>
279
-
280
-
281
- <div class = "postbox">
282
- <div class = "handlediv"> <br> </div>
283
- <h3 class = "hndle"><span><?php _e("By Pages", 'bulk-delete'); ?></span></h3>
284
- <div class = "inside">
285
- <h4><?php _e("Select the pages which you want to delete", 'bulk-delete'); ?></h4>
286
-
287
- <form name="smbd_form" id = "smbd_page_form" action="<?php echo get_bloginfo("wpurl"); ?>/wp-admin/options-general.php?page=bulk-delete.php" method="post"
288
- onsubmit="return bd_validateForm(this);">
289
-
290
  <?php
291
- $wp_query = new WP_Query;
292
- $pages = $wpdb->get_var("select count(*) from $wpdb->posts where post_type = 'page' AND post_status = 'publish' ");
 
 
 
 
293
  ?>
294
- <fieldset class="options">
295
- <table class="optiontable">
296
- <tr>
297
- <td>
298
- <input name="smbd_pages" value = "pages" type = "checkbox" />
299
- <label for="smbd_pages"><?php _e("All Pages", 'bulk-delete'); ?> (<?php echo $pages . " "; _e("Pages", 'bulk-delete'); ?>)</label>
300
- </td>
301
- </tr>
302
-
303
- <tr>
304
- <td>
305
- <h4><?php _e("Choose your filtering options", 'bulk-delete'); ?></h4>
306
- </td>
307
- </tr>
308
-
309
- <tr>
310
- <td scope="row">
311
- <input name="smbd_page_restrict" id="smbd_page_restrict" value = "true" type = "checkbox" onclick="toggle_date_restrict('page');" />
312
- <?php _e("Only restrict to pages which are ", 'bulk-delete');?>
313
- <select name="smbd_page_op" id="smbd_page_op" disabled>
314
- <option value ="<"><?php _e("older than", 'bulk-delete');?></option>
315
- <option value =">"><?php _e("posted within last", 'bulk-delete');?></option>
316
  </select>
317
- <input type ="textbox" name="smbd_page_days" id="smbd_page_days" disabled value ="0" maxlength="4" size="4" /><?php _e("days", 'bulk-delete');?>
318
  </td>
319
  </tr>
320
-
321
- <tr>
322
- <td scope="row">
323
- <input name="smbd_page_force_delete" value = "false" type = "radio" checked="checked" /> <?php _e('Move to Trash', 'bulk-delete'); ?>
324
- <input name="smbd_page_force_delete" value = "true" type = "radio" /> <?php _e('Delete permanently', 'bulk-delete'); ?>
325
- </td>
326
- </tr>
327
-
328
- <tr>
329
- <td scope="row">
330
- <input name="smbd_page_limit" id="smbd_page_limit" value = "true" type = "checkbox" onclick="toggle_limit_restrict('page');" />
331
- <?php _e("Only delete first ", 'bulk-delete');?>
332
- <input type ="textbox" name="smbd_page_limit_to" id="smbd_page_limit_to" disabled value ="0" maxlength="4" size="4" /><?php _e("posts.", 'bulk-delete');?>
333
- <?php _e("Use this option if there are more than 1000 posts and the script timesout.", 'bulk-delete') ?>
334
- </td>
335
- </tr>
336
-
337
  </table>
338
  </fieldset>
339
 
@@ -343,58 +301,13 @@ class Bulk_Delete {
343
 
344
  <?php wp_nonce_field('bulk-delete-posts'); ?>
345
 
346
- <input type="hidden" name="smbd_action" value="bulk-delete-page" />
347
  </form>
348
  </div>
349
  </div>
 
350
 
351
-
352
- <div class = "postbox">
353
- <div class = "handlediv"> <br> </div>
354
- <h3 class = "hndle"><span><?php _e("By Urls", 'bulk-delete'); ?></span></h3>
355
- <div class = "inside">
356
- <h4><?php _e("Delete these specific pages", 'bulk-delete'); ?></h4>
357
-
358
- <form name="smbd_form" id = "smbd_specific_form" action="<?php echo get_bloginfo("wpurl"); ?>/wp-admin/options-general.php?page=bulk-delete.php" method="post" >
359
-
360
- <fieldset class="options">
361
- <table class="optiontable">
362
- <tr>
363
- <td scope="row">
364
- <label for="smdb_specific_pages"><?php _e("Enter one post url (not post ids) per line", 'bulk-delete'); ?></label>
365
- <br/>
366
- <textarea style="width: 450px; height: 80px;" id="smdb_specific_pages_urls" name="smdb_specific_pages_urls" rows="5" columns="80" ></textarea>
367
- </td>
368
- </tr>
369
-
370
- <tr>
371
- <td>
372
- <h4><?php _e("Choose your filtering options", 'bulk-delete'); ?></h4>
373
- </td>
374
- </tr>
375
-
376
- <tr>
377
- <td scope="row">
378
- <input name="smbd_specific_force_delete" value = "false" type = "radio" checked="checked" /> <?php _e('Move to Trash', 'bulk-delete'); ?>
379
- <input name="smbd_specific_force_delete" value = "true" type = "radio" /> <?php _e('Delete permanently', 'bulk-delete'); ?>
380
- </td>
381
- </tr>
382
-
383
- </table>
384
- </fieldset>
385
-
386
- <p class="submit">
387
- <input type="submit" name="submit" class="button-primary" value="<?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;">
388
- </p>
389
-
390
- <?php wp_nonce_field('bulk-delete-posts'); ?>
391
-
392
- <input type="hidden" name="smbd_action" value="bulk-delete-specific" >
393
- </form>
394
- </div>
395
- </div>
396
-
397
-
398
  <div class = "postbox">
399
  <div class = "handlediv">
400
  <br>
@@ -493,9 +406,10 @@ class Bulk_Delete {
493
  }
494
  ?>
495
  </select>
496
- <span class = "bd-cats-pro" style = "color:red"><?php _e('Only available in Pro Addon', 'bulk-delete'); ?> <a href = "http://sudarmuthu.com/out/bulk-delete-category-addon">Buy now</a></span>
497
  </td>
498
  </tr>
 
499
  <tr>
500
  <td scope="row" colspan="2">
501
  <?php _e("Enter time in Y-m-d H:i:s format or enter now to use current time", 'bulk-delete');?>
@@ -514,6 +428,9 @@ class Bulk_Delete {
514
  </form>
515
  </div>
516
  </div>
 
 
 
517
  <?php
518
  $tags = get_tags();
519
  if (count($tags) > 0) {
@@ -534,9 +451,9 @@ class Bulk_Delete {
534
 
535
  <fieldset class="options">
536
  <table class="optiontable">
537
- <?php
538
  foreach ($tags as $tag) {
539
- ?>
540
  <tr>
541
  <td scope="row" >
542
  <input name="smbd_tags[]" value = "<?php echo $tag->term_id; ?>" type = "checkbox" />
@@ -545,9 +462,9 @@ class Bulk_Delete {
545
  <label for="smbd_tags"><?php echo $tag->name; ?> (<?php echo $tag->count . " "; _e("Posts", 'bulk-delete'); ?>)</label>
546
  </td>
547
  </tr>
548
- <?php
549
  }
550
- ?>
551
  <tr>
552
  <td scope="row" >
553
  <input name="smbd_tags_all" id ="smbd_tags_all" value = "-1" type = "checkbox" onclick="bd_checkAll(document.getElementById('smbd_tag_form'));" />
@@ -579,8 +496,8 @@ class Bulk_Delete {
579
 
580
  <tr>
581
  <td scope="row" colspan="2">
582
- <input name="smbd_tags_force_delete" value = "false" type = "radio" checked="checked" /> <?php _e('Move to Trash', 'bulk-delete'); ?>
583
- <input name="smbd_tags_force_delete" value = "true" type = "radio" /> <?php _e('Delete permanently', 'bulk-delete'); ?>
584
  </td>
585
  </tr>
586
 
@@ -597,11 +514,31 @@ class Bulk_Delete {
597
  </td>
598
  <td>
599
  <?php _e("Only delete first ", 'bulk-delete');?>
600
- <input type ="textbox" name="smbd_tags_limit_to" id="smbd_tags_limit_to" disabled value ="0" maxlength="4" size="4" /><?php _e("posts.", 'bulk-delete');?>
601
  <?php _e("Use this option if there are more than 1000 posts and the script timesout.", 'bulk-delete') ?>
602
  </td>
603
  </tr>
604
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
605
  </table>
606
  </fieldset>
607
  <p class="submit">
@@ -610,14 +547,16 @@ class Bulk_Delete {
610
 
611
  <?php wp_nonce_field('bulk-delete-posts'); ?>
612
 
613
- <input type="hidden" name="smbd_action" value="bulk-delete-tags" />
614
  </form>
615
  </div>
616
  </div>
617
  <?php
618
  }
619
  ?>
 
620
 
 
621
  <?php
622
  $customTaxs = get_taxonomies();
623
  if (count($customTaxs) > 0) {
@@ -721,6 +660,216 @@ class Bulk_Delete {
721
  <?php
722
  }
723
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
724
  <div class = "postbox">
725
  <div class = "handlediv">
726
  <br>
@@ -745,6 +894,8 @@ class Bulk_Delete {
745
  </table>
746
  </div>
747
  </div>
 
 
748
  </div>
749
 
750
  <iframe frameBorder="0" height = "950" src = "http://sudarmuthu.com/projects/wordpress/bulk-delete/sidebar.php?color=<?php echo get_user_option('admin_color'); ?>"></iframe>
@@ -837,9 +988,9 @@ class Bulk_Delete {
837
  $time = strtotime($_POST['smbd_cats_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
838
 
839
  if ($freq == -1) {
840
- wp_schedule_single_event($time, 'do-bulk-delete-cats', array($delete_options));
841
  } else {
842
- wp_schedule_event($time, $freq , 'do-bulk-delete-cats', array($delete_options));
843
  }
844
  } else {
845
  self::delete_cats($delete_options);
@@ -849,41 +1000,30 @@ class Bulk_Delete {
849
 
850
  case "bulk-delete-tags":
851
  // delete by tags
852
- $selected_tags = array_get($_POST, 'smbd_tags');
853
- if (array_get($_POST, 'smbd_tags_restrict', 'false') == "true") {
854
- add_filter ('posts_where', 'smbd_tags_by_days');
855
- }
856
-
857
- $private = array_get($_POST, 'smbd_tags_private', 'false');
858
-
859
- if ($private == 'true') {
860
- $options = array('tag__in'=>$selected_tags,'post_status'=>'private', 'post_type'=>'post');
861
- } else {
862
- $options = array('tag__in'=>$selected_tags,'post_status'=>'publish', 'post_type'=>'post');
863
- }
864
-
865
- $limit_to = absint(array_get($_POST, 'smbd_tags_limits_to', 0));
866
-
867
- if ($limit_to > 0) {
868
- $options['showposts'] = $limit_to;
869
- } else {
870
- $options['nopaging'] = 'true';
871
- }
872
-
873
- $force_delete = array_get($_POST, 'smbd_tags_force_delete');
874
 
875
- if ($force_delete == 'true') {
876
- $force_delete = true;
 
 
 
877
  } else {
878
- $force_delete = false;
879
  }
880
 
881
- $posts = $wp_query->query($options);
882
-
883
- foreach ($posts as $post) {
884
- wp_delete_post($post->ID, $force_delete);
885
- }
886
-
887
  break;
888
 
889
  case "bulk-delete-taxs":
@@ -929,34 +1069,33 @@ class Bulk_Delete {
929
 
930
  break;
931
 
932
- case "bulk-delete-special":
933
- // Delete special types like drafts, reviesion etc
934
 
935
  $delete_options = array();
936
- $delete_options['restrict'] = array_get($_POST, 'smbd_special_restrict', FALSE);
937
- $delete_options['limit_to'] = absint(array_get($_POST, 'smbd_special_limits_to', 0));
938
- $delete_options['force_delete'] = array_get($_POST, 'smbd_special_force_delete', 'false');
939
 
940
- $delete_options['special_op'] = array_get($_POST, 'smbd_special_op');
941
- $delete_options['special_days'] = array_get($_POST, 'smbd_special_days');
942
 
943
  $delete_options['drafts'] = array_get($_POST, 'smbd_drafts');
944
- $delete_options['revisions'] = array_get($_POST, 'smbd_revisions');
945
  $delete_options['pending'] = array_get($_POST, 'smbd_pending');
946
  $delete_options['future'] = array_get($_POST, 'smbd_future');
947
  $delete_options['private'] = array_get($_POST, 'smbd_private');
948
 
949
- if (array_get($_POST, 'smbd_special_cron', 'false') == 'true') {
950
- $freq = $_POST['smbd_special_cron_freq'];
951
- $time = strtotime($_POST['smbd_special_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
952
 
953
  if ($freq == -1) {
954
- wp_schedule_single_event($time, 'do-bulk-delete-special', array($delete_options));
955
  } else {
956
- wp_schedule_event($time, $freq , 'do-bulk-delete-special', array($delete_options));
957
  }
958
  } else {
959
- self::delete_special($delete_options);
960
  }
961
 
962
  break;
@@ -972,16 +1111,20 @@ class Bulk_Delete {
972
  $delete_options['page_op'] = array_get($_POST, 'smbd_page_op');
973
  $delete_options['page_days'] = array_get($_POST, 'smbd_page_days');
974
 
975
- $delete_options['pages'] = array_get($_POST, 'smbd_pages');
 
 
 
 
976
 
977
- if (array_get($_POST, 'smbd_page_cron', 'false') == 'true') {
978
- $freq = $_POST['smbd_page_cron_freq'];
979
- $time = strtotime($_POST['smbd_page_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
980
 
981
  if ($freq == -1) {
982
- wp_schedule_single_event($time, 'do-bulk-delete-page', array($delete_options));
983
  } else {
984
- wp_schedule_event($time, $freq , 'do-bulk-delete-page', array($delete_options));
985
  }
986
  } else {
987
  self::delete_pages($delete_options);
@@ -1009,6 +1152,14 @@ class Bulk_Delete {
1009
  wp_delete_post($postid, $force_delete);
1010
  }
1011
  break;
 
 
 
 
 
 
 
 
1012
  }
1013
 
1014
  // hook the admin notices action
@@ -1055,8 +1206,8 @@ class Bulk_Delete {
1055
  }
1056
 
1057
  if ($delete_options['restrict'] == "true") {
1058
- $options['cats_op'] = $delete_options['cats_op'];
1059
- $options['cats_days'] = $delete_options['cats_days'];
1060
 
1061
  if (!class_exists('Bulk_Delete_By_Days')) {
1062
  require_once dirname(__FILE__) . '/include/class-bulk-delete-by-days.php';
@@ -1073,12 +1224,18 @@ class Bulk_Delete {
1073
  }
1074
 
1075
  /**
1076
- * Delete special type of posts - drafts, revisions etc.
1077
  */
1078
- static function delete_special($delete_options) {
1079
- global $wp_query;
1080
 
1081
- $options = array();
 
 
 
 
 
 
 
1082
 
1083
  $limit_to = $delete_options['limit_to'];
1084
 
@@ -1097,8 +1254,8 @@ class Bulk_Delete {
1097
  }
1098
 
1099
  if ($delete_options['restrict'] == "true") {
1100
- $options['op'] = $delete_options['special_op'];
1101
- $options['days'] = $delete_options['special_days'];
1102
 
1103
  if (!class_exists('Bulk_Delete_By_Days')) {
1104
  require_once dirname(__FILE__) . '/include/class-bulk-delete-by-days.php';
@@ -1106,60 +1263,87 @@ class Bulk_Delete {
1106
  $bulk_Delete_By_Days = new Bulk_Delete_By_Days;
1107
  }
1108
 
1109
- // Drafts
1110
- if ("drafts" == $delete_options['drafts']) {
1111
- $options['post_status'] = 'draft';
1112
- $drafts = $wp_query->query($options);
1113
 
1114
- foreach ($drafts as $draft) {
1115
- wp_delete_post($draft->ID, $force_delete);
1116
- }
1117
  }
 
1118
 
1119
- // Revisions
1120
- if ("revisions" == $delete_options['revisions']) {
1121
- $revisions = $wpdb->get_results("select ID from $wpdb->posts where post_type = 'revision'");
 
 
 
1122
 
1123
- foreach ($revisions as $revision) {
1124
- wp_delete_post($revision->ID, $force_delete);
1125
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1126
  }
1127
 
1128
  // Pending Posts
1129
  if ("pending" == $delete_options['pending']) {
1130
- $pendings = $wpdb->get_results("select ID from $wpdb->posts where post_status = 'pending'");
1131
-
1132
- foreach ($pendings as $pending) {
1133
- wp_delete_post($pending->ID, $force_delete);
1134
- }
1135
  }
1136
 
1137
  // Future Posts
1138
  if ("future" == $delete_options['future']) {
1139
- $futures = $wpdb->get_results("select ID from $wpdb->posts where post_status = 'future'");
1140
-
1141
- foreach ($futures as $future) {
1142
- wp_delete_post($future->ID, $force_delete);
1143
- }
1144
  }
1145
 
1146
  // Private Posts
1147
  if ("private" == $delete_options['private']) {
1148
- $privates = $wpdb->get_results("select ID from $wpdb->posts where post_status = 'private'");
 
1149
 
1150
- foreach ($privates as $private) {
1151
- wp_delete_post($private->ID, $force_delete);
 
 
 
 
1152
  }
 
 
 
 
 
 
 
 
 
1153
  }
1154
  }
1155
 
1156
  /**
1157
- * Delete pages
1158
  */
1159
- static function delete_pages($delete_options) {
1160
  global $wp_query;
1161
 
1162
  $options = array();
 
1163
 
1164
  $limit_to = $delete_options['limit_to'];
1165
 
@@ -1177,6 +1361,33 @@ class Bulk_Delete {
1177
  $force_delete = false;
1178
  }
1179
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1180
  if ($delete_options['restrict'] == "true") {
1181
  $options['op'] = $delete_options['page_op'];
1182
  $options['days'] = $delete_options['page_days'];
@@ -1187,13 +1398,24 @@ class Bulk_Delete {
1187
  $bulk_Delete_By_Days = new Bulk_Delete_By_Days;
1188
  }
1189
 
1190
- // Pages
1191
- if ("pages" == $delete_options['pages']) {
1192
- $options['post_type'] = 'page';
1193
- $pages = $wp_query->query($options);
 
 
 
 
 
 
 
 
 
 
 
1194
 
1195
- foreach ($pages as $page) {
1196
- wp_delete_post($page->ID, $force_delete);
1197
  }
1198
  }
1199
  }
@@ -1252,23 +1474,6 @@ if (!function_exists('array_get')) {
1252
  }
1253
  }
1254
 
1255
- /**
1256
- * function to filter posts by days
1257
- * @param <type> $where
1258
- * @return <type>
1259
- */
1260
- if (!function_exists('smbd_tags_by_days ')) {
1261
- function smbd_tags_by_days ($where = '') {
1262
- $tags_op = array_get($_POST, 'smbd_tags_op');
1263
- $tags_days = array_get($_POST, 'smbd_tags_days');
1264
-
1265
- remove_filter('posts_where', 'smbd_tags_by_days');
1266
-
1267
- $where .= " AND post_date $tags_op '" . date('y-m-d', strtotime("-$tags_days days")) . "'";
1268
- return $where;
1269
- }
1270
- }
1271
-
1272
  /**
1273
  * function to filter custom taxonomy posts by days
1274
  * @param <type> $where
5
  Plugin URI: http://sudarmuthu.com/wordpress/bulk-delete
6
  Description: Bulk delete posts from selected categories, tags, custom taxonomies or by post type like drafts, scheduled posts, revisions etc.
7
  Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
8
+ Version: 3.2
9
  License: GPL
10
  Author: Sudar
11
  Author URI: http://sudarmuthu.com/
52
  - Added separate delete by sections for pages, drafts and urls
53
  - Added the option to delete by date for drafts, revisions, future posts etc
54
  - Added the option to delete by date for pages
55
+ 2013-05-04 - v3.2 - (Dev time: 20 hours)
56
+ - Added support for scheduling auto delete of pages
57
+ - Added support for scheduling auto delete of drafts
58
+ - Fixed issue in deleting post revisions
59
+ - Move post revisions to a separate section
60
+ - Better handling of post count to improve performance
61
+ - Moved pages to a separate section
62
+ - Added ability to delete pages in different status
63
+ - Added the option to schedule auto delete of tags by date
64
+ - Fixed a bug which was not allowing categories to be deleted based on date
65
  */
66
 
67
  /* Copyright 2009 Sudar Muthu (email : sudar@sudarmuthu.com)
85
  */
86
  class Bulk_Delete {
87
 
88
+ const VERSION = '3.2';
89
+ const JS_HANDLE = 'bulk-delete';
90
+ const JS_VARIABLE = 'BULK_DELETE';
91
+
92
+ // Cron hooks
93
+ const CRON_HOOK_CATS = 'do-bulk-delete-cats';
94
+ const CRON_HOOK_PAGES = 'do-bulk-delete-pages';
95
+ const CRON_HOOK_POST_STATUS = 'do-bulk-delete-post-status';
96
+ const CRON_HOOK_TAGS = 'do-bulk-delete-tags';
97
+ const CRON_HOOK_TAXONOMY = 'do-bulk-delete-taxonomy';
98
 
99
  /**
100
  * Default constructor
174
 
175
  if ($file == $plugin) // only for this plugin
176
  return array_merge( $links,
177
+ array( '<a href="http://sudarmuthu.com/wordpress/bulk-delete/pro-addons" target="_blank">' . __('Buy Addons', 'bulk-delete') . '</a>' )
178
  );
179
  return $links;
180
  }
193
 
194
  <div id = "poststuff" style = "float:left; width:75%">
195
 
196
+ <!-- Post status start-->
197
  <div class = "postbox">
198
  <div class = "handlediv"> <br> </div>
199
+ <h3 class = "hndle"><span><?php _e("By Post Status", 'bulk-delete'); ?></span></h3>
200
  <div class = "inside">
201
  <h4><?php _e("Select the posts which you want to delete", 'bulk-delete'); ?></h4>
202
 
203
  <form name="smbd_form" id = "smbd_misc_form" action="<?php echo get_bloginfo("wpurl"); ?>/wp-admin/options-general.php?page=bulk-delete.php" method="post" onsubmit="return bd_validateForm(this);">
204
 
205
  <?php
206
+ $posts_count = wp_count_posts();
207
+ $drafts = $posts_count->draft;
208
+ $future = $posts_count->future;
209
+ $pending = $posts_count->pending;
210
+ $private = $posts_count->private;
 
211
  ?>
212
  <fieldset class="options">
213
  <table class="optiontable">
214
  <tr>
215
  <td scope="row" >
216
  <input name="smbd_drafts" id ="smbd_drafts" value = "drafts" type = "checkbox" />
217
+ <label for="smbd_drafts"><?php _e("All Draft Posts", 'bulk-delete'); ?> (<?php echo $drafts . " "; _e("Drafts", 'bulk-delete'); ?>)</label>
 
 
 
 
 
 
 
218
  </td>
219
  </tr>
220
 
247
 
248
  <tr>
249
  <td scope="row">
250
+ <input name="smbd_post_status_restrict" id="smbd_post_status_restrict" value = "true" type = "checkbox" onclick="toggle_date_restrict('post_status');" />
251
  <?php _e("Only restrict to posts which are ", 'bulk-delete');?>
252
+ <select name="smbd_post_status_op" id="smbd_post_status_op" disabled>
253
  <option value ="<"><?php _e("older than", 'bulk-delete');?></option>
254
  <option value =">"><?php _e("posted within last", 'bulk-delete');?></option>
255
  </select>
256
+ <input type ="textbox" name="smbd_post_status_days" id="smbd_post_status_days" disabled value ="0" maxlength="4" size="4" /><?php _e("days", 'bulk-delete');?>
257
  </td>
258
  </tr>
259
 
260
  <tr>
261
  <td scope="row">
262
+ <input name="smbd_post_status_force_delete" value = "false" type = "radio" checked="checked" /> <?php _e('Move to Trash', 'bulk-delete'); ?>
263
+ <input name="smbd_post_status_force_delete" value = "true" type = "radio" /> <?php _e('Delete permanently', 'bulk-delete'); ?>
264
  </td>
265
  </tr>
266
 
267
  <tr>
268
  <td scope="row">
269
+ <input name="smbd_post_status_limit" id="smbd_post_status_limit" value = "true" type = "checkbox" onclick="toggle_limit_restrict('post_status');" />
270
  <?php _e("Only delete first ", 'bulk-delete');?>
271
+ <input type ="textbox" name="smbd_post_status_limit_to" id="smbd_post_status_limit_to" disabled value ="0" maxlength="4" size="4" /><?php _e("posts.", 'bulk-delete');?>
272
  <?php _e("Use this option if there are more than 1000 posts and the script timesout.", 'bulk-delete') ?>
273
  </td>
274
  </tr>
275
 
276
+ <tr>
277
+ <td scope="row" colspan="2">
278
+ <input name="smbd_post_status_cron" value = "false" type = "radio" checked="checked" /> <?php _e('Delete now', 'bulk-delete'); ?>
279
+ <input name="smbd_post_status_cron" value = "true" type = "radio" id = "smbd_post_status_cron" disabled > <?php _e('Schedule', 'bulk-delete'); ?>
280
+ <input name="smbd_post_status_cron_start" id = "smbd_post_status_cron_start" value = "now" type = "text" disabled><?php _e('repeat ', 'bulk-delete');?>
281
+ <select name = "smbd_post_status_cron_freq" id = "smbd_post_status_cron_freq" disabled>
282
+ <option value = "-1"><?php _e("Don't repeat", 'bulk-delete'); ?></option>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  <?php
284
+ $schedules = wp_get_schedules();
285
+ foreach($schedules as $key => $value) {
286
+ ?>
287
+ <option value = "<?php echo $key; ?>"><?php echo $value['display']; ?></option>
288
+ <?php
289
+ }
290
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  </select>
292
+ <span class = "bd-post-status-pro" style = "color:red"><?php _e('Only available in Pro Addon', 'bulk-delete'); ?> <a href = "http://sudarmuthu.com/out/buy-bulk-delete-post-status-addon">Buy now</a></span>
293
  </td>
294
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
295
  </table>
296
  </fieldset>
297
 
301
 
302
  <?php wp_nonce_field('bulk-delete-posts'); ?>
303
 
304
+ <input type="hidden" name="smbd_action" value="bulk-delete-post-status" />
305
  </form>
306
  </div>
307
  </div>
308
+ <!-- Post status end-->
309
 
310
+ <!-- Category Start-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
311
  <div class = "postbox">
312
  <div class = "handlediv">
313
  <br>
406
  }
407
  ?>
408
  </select>
409
+ <span class = "bd-cats-pro" style = "color:red"><?php _e('Only available in Pro Addon', 'bulk-delete'); ?> <a href = "http://sudarmuthu.com/out/buy-bulk-delete-category-addon">Buy now</a></span>
410
  </td>
411
  </tr>
412
+
413
  <tr>
414
  <td scope="row" colspan="2">
415
  <?php _e("Enter time in Y-m-d H:i:s format or enter now to use current time", 'bulk-delete');?>
428
  </form>
429
  </div>
430
  </div>
431
+ <!-- Category end-->
432
+
433
+ <!-- Tags start-->
434
  <?php
435
  $tags = get_tags();
436
  if (count($tags) > 0) {
451
 
452
  <fieldset class="options">
453
  <table class="optiontable">
454
+ <?php
455
  foreach ($tags as $tag) {
456
+ ?>
457
  <tr>
458
  <td scope="row" >
459
  <input name="smbd_tags[]" value = "<?php echo $tag->term_id; ?>" type = "checkbox" />
462
  <label for="smbd_tags"><?php echo $tag->name; ?> (<?php echo $tag->count . " "; _e("Posts", 'bulk-delete'); ?>)</label>
463
  </td>
464
  </tr>
465
+ <?php
466
  }
467
+ ?>
468
  <tr>
469
  <td scope="row" >
470
  <input name="smbd_tags_all" id ="smbd_tags_all" value = "-1" type = "checkbox" onclick="bd_checkAll(document.getElementById('smbd_tag_form'));" />
496
 
497
  <tr>
498
  <td scope="row" colspan="2">
499
+ <input name="smbd_tags_force_delete" value = "false" type = "radio" checked="checked" > <?php _e('Move to Trash', 'bulk-delete'); ?>
500
+ <input name="smbd_tags_force_delete" value = "true" type = "radio" > <?php _e('Delete permanently', 'bulk-delete'); ?>
501
  </td>
502
  </tr>
503
 
514
  </td>
515
  <td>
516
  <?php _e("Only delete first ", 'bulk-delete');?>
517
+ <input type ="textbox" name="smbd_tags_limits_to" id="smbd_tags_limits_to" disabled value ="0" maxlength="4" size="4" ><?php _e("posts.", 'bulk-delete');?>
518
  <?php _e("Use this option if there are more than 1000 posts and the script timesout.", 'bulk-delete') ?>
519
  </td>
520
  </tr>
521
 
522
+ <tr>
523
+ <td scope="row" colspan="2">
524
+ <input name="smbd_tags_cron" value = "false" type = "radio" checked="checked" > <?php _e('Delete now', 'bulk-delete'); ?>
525
+ <input name="smbd_tags_cron" value = "true" type = "radio" id = "smbd_tags_cron" disabled > <?php _e('Schedule', 'bulk-delete'); ?>
526
+ <input name="smbd_tags_cron_start" id = "smbd_tags_cron_start" value = "now" type = "text" disabled><?php _e('repeat ', 'bulk-delete');?>
527
+ <select name = "smbd_tags_cron_freq" id = "smbd_tags_cron_freq" disabled>
528
+ <option value = "-1"><?php _e("Don't repeat", 'bulk-delete'); ?></option>
529
+ <?php
530
+ $schedules = wp_get_schedules();
531
+ foreach($schedules as $key => $value) {
532
+ ?>
533
+ <option value = "<?php echo $key; ?>"><?php echo $value['display']; ?></option>
534
+ <?php
535
+ }
536
+ ?>
537
+ </select>
538
+ <span class = "bd-tags-pro" style = "color:red"><?php _e('Only available in Pro Addon', 'bulk-delete'); ?> <a href = "http://sudarmuthu.com/out/buy-bulk-delete-tags-addon">Buy now</a></span>
539
+ </td>
540
+ </tr>
541
+
542
  </table>
543
  </fieldset>
544
  <p class="submit">
547
 
548
  <?php wp_nonce_field('bulk-delete-posts'); ?>
549
 
550
+ <input type="hidden" name="smbd_action" value="bulk-delete-tags" >
551
  </form>
552
  </div>
553
  </div>
554
  <?php
555
  }
556
  ?>
557
+ <!-- Tags end-->
558
 
559
+ <!-- Custom tax Start-->
560
  <?php
561
  $customTaxs = get_taxonomies();
562
  if (count($customTaxs) > 0) {
660
  <?php
661
  }
662
  ?>
663
+ <!-- Custom tax end-->
664
+
665
+ <!-- Pages start-->
666
+ <div class = "postbox">
667
+ <div class = "handlediv"> <br> </div>
668
+ <h3 class = "hndle"><span><?php _e("By Pages", 'bulk-delete'); ?></span></h3>
669
+ <div class = "inside">
670
+ <h4><?php _e("Select the pages which you want to delete", 'bulk-delete'); ?></h4>
671
+
672
+ <form name="smbd_form" id = "smbd_page_form" action="<?php echo get_bloginfo("wpurl"); ?>/wp-admin/options-general.php?page=bulk-delete.php" method="post"
673
+ onsubmit="return bd_validateForm(this);">
674
+
675
+ <?php
676
+ $pages_count = wp_count_posts( 'page' );
677
+ $pages = $pages_count->publish;
678
+ $page_drafts = $pages_count->draft;
679
+ $page_future = $pages_count->future;
680
+ $page_pending = $pages_count->pending;
681
+ $page_private = $pages_count->private;
682
+ ?>
683
+ <fieldset class="options">
684
+ <table class="optiontable">
685
+ <tr>
686
+ <td>
687
+ <input name="smbd_published_pages" value = "published_pages" type = "checkbox" />
688
+ <label for="smbd_published_pages"><?php _e("All Published Pages", 'bulk-delete'); ?> (<?php echo $pages . " "; _e("Pages", 'bulk-delete'); ?>)</label>
689
+ </td>
690
+ </tr>
691
+
692
+ <tr>
693
+ <td>
694
+ <input name="smbd_draft_pages" value = "draft_pages" type = "checkbox" />
695
+ <label for="smbd_draft_pages"><?php _e("All Draft Pages", 'bulk-delete'); ?> (<?php echo $page_drafts . " "; _e("Pages", 'bulk-delete'); ?>)</label>
696
+ </td>
697
+ </tr>
698
+
699
+ <tr>
700
+ <td>
701
+ <input name="smbd_future_pages" value = "scheduled_pages" type = "checkbox" />
702
+ <label for="smbd_future_pages"><?php _e("All Scheduled Pages", 'bulk-delete'); ?> (<?php echo $page_future . " "; _e("Pages", 'bulk-delete'); ?>)</label>
703
+ </td>
704
+ </tr>
705
+
706
+ <tr>
707
+ <td>
708
+ <input name="smbd_pending_pages" value = "pending_pages" type = "checkbox" />
709
+ <label for="smbd_pending_pages"><?php _e("All Pending Pages", 'bulk-delete'); ?> (<?php echo $page_pending . " "; _e("Pages", 'bulk-delete'); ?>)</label>
710
+ </td>
711
+ </tr>
712
+
713
+ <tr>
714
+ <td>
715
+ <input name="smbd_private_pages" value = "private_pages" type = "checkbox" />
716
+ <label for="smbd_private_pages"><?php _e("All Private Pages", 'bulk-delete'); ?> (<?php echo $page_private . " "; _e("Pages", 'bulk-delete'); ?>)</label>
717
+ </td>
718
+ </tr>
719
+
720
+ <tr>
721
+ <td>
722
+ <h4><?php _e("Choose your filtering options", 'bulk-delete'); ?></h4>
723
+ </td>
724
+ </tr>
725
+
726
+ <tr>
727
+ <td scope="row">
728
+ <input name="smbd_page_restrict" id="smbd_page_restrict" value = "true" type = "checkbox" onclick="toggle_date_restrict('page');" />
729
+ <?php _e("Only restrict to pages which are ", 'bulk-delete');?>
730
+ <select name="smbd_page_op" id="smbd_page_op" disabled>
731
+ <option value ="<"><?php _e("older than", 'bulk-delete');?></option>
732
+ <option value =">"><?php _e("posted within last", 'bulk-delete');?></option>
733
+ </select>
734
+ <input type ="textbox" name="smbd_page_days" id="smbd_page_days" disabled value ="0" maxlength="4" size="4" /><?php _e("days", 'bulk-delete');?>
735
+ </td>
736
+ </tr>
737
+
738
+ <tr>
739
+ <td scope="row">
740
+ <input name="smbd_page_force_delete" value = "false" type = "radio" checked="checked" /> <?php _e('Move to Trash', 'bulk-delete'); ?>
741
+ <input name="smbd_page_force_delete" value = "true" type = "radio" /> <?php _e('Delete permanently', 'bulk-delete'); ?>
742
+ </td>
743
+ </tr>
744
+
745
+ <tr>
746
+ <td scope="row">
747
+ <input name="smbd_page_limit" id="smbd_page_limit" value = "true" type = "checkbox" onclick="toggle_limit_restrict('page');" />
748
+ <?php _e("Only delete first ", 'bulk-delete');?>
749
+ <input type ="textbox" name="smbd_page_limit_to" id="smbd_page_limit_to" disabled value ="0" maxlength="4" size="4" /><?php _e("posts.", 'bulk-delete');?>
750
+ <?php _e("Use this option if there are more than 1000 posts and the script timesout.", 'bulk-delete') ?>
751
+ </td>
752
+ </tr>
753
+
754
+ <tr>
755
+ <td scope="row" colspan="2">
756
+ <input name="smbd_pages_cron" value = "false" type = "radio" checked="checked" /> <?php _e('Delete now', 'bulk-delete'); ?>
757
+ <input name="smbd_pages_cron" value = "true" type = "radio" id = "smbd_pages_cron" disabled > <?php _e('Schedule', 'bulk-delete'); ?>
758
+ <input name="smbd_pages_cron_start" id = "smbd_pages_cron_start" value = "now" type = "text" disabled><?php _e('repeat ', 'bulk-delete');?>
759
+ <select name = "smbd_pages_cron_freq" id = "smbd_pages_cron_freq" disabled>
760
+ <option value = "-1"><?php _e("Don't repeat", 'bulk-delete'); ?></option>
761
+ <?php
762
+ $schedules = wp_get_schedules();
763
+ foreach($schedules as $key => $value) {
764
+ ?>
765
+ <option value = "<?php echo $key; ?>"><?php echo $value['display']; ?></option>
766
+ <?php
767
+ }
768
+ ?>
769
+ </select>
770
+ <span class = "bd-pages-pro" style = "color:red"><?php _e('Only available in Pro Addon', 'bulk-delete'); ?> <a href = "http://sudarmuthu.com/out/buy-bulk-delete-pages-addon">Buy now</a></span>
771
+ </td>
772
+ </tr>
773
+ </table>
774
+ </fieldset>
775
+
776
+ <p class="submit">
777
+ <input type="submit" name="submit" class="button-primary" value="<?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;">
778
+ </p>
779
+
780
+ <?php wp_nonce_field('bulk-delete-posts'); ?>
781
+
782
+ <input type="hidden" name="smbd_action" value="bulk-delete-page" >
783
+ </form>
784
+ </div>
785
+ </div>
786
+ <!-- Pages end-->
787
+
788
+ <!-- URLs start-->
789
+ <div class = "postbox">
790
+ <div class = "handlediv"> <br> </div>
791
+ <h3 class = "hndle"><span><?php _e("By Urls", 'bulk-delete'); ?></span></h3>
792
+ <div class = "inside">
793
+ <h4><?php _e("Delete these specific pages", 'bulk-delete'); ?></h4>
794
+
795
+ <form name="smbd_form" id = "smbd_specific_form" action="<?php echo get_bloginfo("wpurl"); ?>/wp-admin/options-general.php?page=bulk-delete.php" method="post" >
796
+
797
+ <fieldset class="options">
798
+ <table class="optiontable">
799
+ <tr>
800
+ <td scope="row">
801
+ <label for="smdb_specific_pages"><?php _e("Enter one post url (not post ids) per line", 'bulk-delete'); ?></label>
802
+ <br/>
803
+ <textarea style="width: 450px; height: 80px;" id="smdb_specific_pages_urls" name="smdb_specific_pages_urls" rows="5" columns="80" ></textarea>
804
+ </td>
805
+ </tr>
806
+
807
+ <tr>
808
+ <td>
809
+ <h4><?php _e("Choose your filtering options", 'bulk-delete'); ?></h4>
810
+ </td>
811
+ </tr>
812
+
813
+ <tr>
814
+ <td scope="row">
815
+ <input name="smbd_specific_force_delete" value = "false" type = "radio" checked="checked" /> <?php _e('Move to Trash', 'bulk-delete'); ?>
816
+ <input name="smbd_specific_force_delete" value = "true" type = "radio" /> <?php _e('Delete permanently', 'bulk-delete'); ?>
817
+ </td>
818
+ </tr>
819
+
820
+ </table>
821
+ </fieldset>
822
+
823
+ <p class="submit">
824
+ <input type="submit" name="submit" class="button-primary" value="<?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;">
825
+ </p>
826
+
827
+ <?php wp_nonce_field('bulk-delete-posts'); ?>
828
+
829
+ <input type="hidden" name="smbd_action" value="bulk-delete-specific" >
830
+ </form>
831
+ </div>
832
+ </div>
833
+ <!-- URLs start-->
834
+
835
+ <!-- Post Revisions start-->
836
+ <div class = "postbox" >
837
+ <div class = "handlediv"> <br> </div>
838
+ <h3 class = "hndle"><span><?php _e("By Post Revisions", 'bulk-delete'); ?></span></h3>
839
+ <div class = "inside">
840
+ <h4><?php _e("Select the posts which you want to delete", 'bulk-delete'); ?></h4>
841
+
842
+ <form name="smbd_form" id = "smbd_misc_form" action="<?php echo get_bloginfo("wpurl"); ?>/wp-admin/options-general.php?page=bulk-delete.php" method="post" onsubmit="return bd_validateForm(this);">
843
+ <?php
844
+ $wp_query = new WP_Query;
845
+ $revisions = $wpdb->get_var("select count(*) from $wpdb->posts where post_type = 'revision'");
846
+ ?>
847
+ <fieldset class="options">
848
+ <table class="optiontable">
849
+ <tr>
850
+ <td>
851
+ <input name="smbd_revisions" id ="smbd_revisions" value = "revisions" type = "checkbox" />
852
+ <label for="smbd_revisions"><?php _e("All Revisions", 'bulk-delete'); ?> (<?php echo $revisions . " "; _e("Revisions", 'bulk-delete'); ?>)</label>
853
+ </td>
854
+ </tr>
855
+
856
+ </table>
857
+ </fieldset>
858
+
859
+ <p class="submit">
860
+ <input type="submit" name="submit" class="button-primary" value="<?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;">
861
+ </p>
862
+
863
+ <?php wp_nonce_field('bulk-delete-posts'); ?>
864
+
865
+ <input type="hidden" name="smbd_action" value="bulk-delete-revisions" />
866
+ </form>
867
+ </div>
868
+ </div>
869
+ <!-- Post Revisions end-->
870
+
871
+
872
+ <!-- Debug box start-->
873
  <div class = "postbox">
874
  <div class = "handlediv">
875
  <br>
894
  </table>
895
  </div>
896
  </div>
897
+ <!-- Debug box end-->
898
+
899
  </div>
900
 
901
  <iframe frameBorder="0" height = "950" src = "http://sudarmuthu.com/projects/wordpress/bulk-delete/sidebar.php?color=<?php echo get_user_option('admin_color'); ?>"></iframe>
988
  $time = strtotime($_POST['smbd_cats_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
989
 
990
  if ($freq == -1) {
991
+ wp_schedule_single_event($time, self::CRON_HOOK_CATS, array($delete_options));
992
  } else {
993
+ wp_schedule_event($time, $freq , self::CRON_HOOK_CATS, array($delete_options));
994
  }
995
  } else {
996
  self::delete_cats($delete_options);
1000
 
1001
  case "bulk-delete-tags":
1002
  // delete by tags
1003
+
1004
+ $delete_options = array();
1005
+ $delete_options['selected_tags'] = array_get($_POST, 'smbd_tags');
1006
+ $delete_options['restrict'] = array_get($_POST, 'smbd_tags_restrict', FALSE);
1007
+ $delete_options['private'] = array_get($_POST, 'smbd_tags_private');
1008
+ $delete_options['limit_to'] = absint(array_get($_POST, 'smbd_tags_limits_to', 0));
1009
+ $delete_options['force_delete'] = array_get($_POST, 'smbd_tags_force_delete', 'false');
1010
+
1011
+ $delete_options['tags_op'] = array_get($_POST, 'smbd_tags_op');
1012
+ $delete_options['tags_days'] = array_get($_POST, 'smbd_tags_days');
1013
+
1014
+ if (array_get($_POST, 'smbd_tags_cron', 'false') == 'true') {
1015
+ $freq = $_POST['smbd_tags_cron_freq'];
1016
+ $time = strtotime($_POST['smbd_tags_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
 
 
 
 
 
 
 
 
1017
 
1018
+ if ($freq == -1) {
1019
+ wp_schedule_single_event($time, self::CRON_HOOK_TAGS, array($delete_options));
1020
+ } else {
1021
+ wp_schedule_event($time, $freq, self::CRON_HOOK_TAGS, array($delete_options));
1022
+ }
1023
  } else {
1024
+ self::delete_tags($delete_options);
1025
  }
1026
 
 
 
 
 
 
 
1027
  break;
1028
 
1029
  case "bulk-delete-taxs":
1069
 
1070
  break;
1071
 
1072
+ case "bulk-delete-post-status":
1073
+ // Delete by post status like drafts, pending posts etc
1074
 
1075
  $delete_options = array();
1076
+ $delete_options['restrict'] = array_get($_POST, 'smbd_post_status_restrict', FALSE);
1077
+ $delete_options['limit_to'] = absint(array_get($_POST, 'smbd_post_status_limits_to', 0));
1078
+ $delete_options['force_delete'] = array_get($_POST, 'smbd_post_status_force_delete', 'false');
1079
 
1080
+ $delete_options['post_status_op'] = array_get($_POST, 'smbd_post_status_op');
1081
+ $delete_options['post_status_days'] = array_get($_POST, 'smbd_post_status_days');
1082
 
1083
  $delete_options['drafts'] = array_get($_POST, 'smbd_drafts');
 
1084
  $delete_options['pending'] = array_get($_POST, 'smbd_pending');
1085
  $delete_options['future'] = array_get($_POST, 'smbd_future');
1086
  $delete_options['private'] = array_get($_POST, 'smbd_private');
1087
 
1088
+ if (array_get($_POST, 'smbd_post_status_cron', 'false') == 'true') {
1089
+ $freq = $_POST['smbd_post_status_cron_freq'];
1090
+ $time = strtotime($_POST['smbd_post_status_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
1091
 
1092
  if ($freq == -1) {
1093
+ wp_schedule_single_event($time, self::CRON_HOOK_POST_STATUS, array($delete_options));
1094
  } else {
1095
+ wp_schedule_event($time, $freq, self::CRON_HOOK_POST_STATUS, array($delete_options));
1096
  }
1097
  } else {
1098
+ self::delete_post_status($delete_options);
1099
  }
1100
 
1101
  break;
1111
  $delete_options['page_op'] = array_get($_POST, 'smbd_page_op');
1112
  $delete_options['page_days'] = array_get($_POST, 'smbd_page_days');
1113
 
1114
+ $delete_options['publish'] = array_get($_POST, 'smbd_published_pages');
1115
+ $delete_options['drafts'] = array_get($_POST, 'smbd_draft_pages');
1116
+ $delete_options['pending'] = array_get($_POST, 'smbd_pending_pages');
1117
+ $delete_options['future'] = array_get($_POST, 'smbd_future_pages');
1118
+ $delete_options['private'] = array_get($_POST, 'smbd_private_pages');
1119
 
1120
+ if (array_get($_POST, 'smbd_pages_cron', 'false') == 'true') {
1121
+ $freq = $_POST['smbd_pages_cron_freq'];
1122
+ $time = strtotime($_POST['smbd_pages_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
1123
 
1124
  if ($freq == -1) {
1125
+ wp_schedule_single_event($time, self::CRON_HOOK_PAGES, array($delete_options));
1126
  } else {
1127
+ wp_schedule_event($time, $freq , self::CRON_HOOK_PAGES, array($delete_options));
1128
  }
1129
  } else {
1130
  self::delete_pages($delete_options);
1152
  wp_delete_post($postid, $force_delete);
1153
  }
1154
  break;
1155
+
1156
+ case "bulk-delete-revisions":
1157
+ // Delete page revisions
1158
+
1159
+ $delete_options['revisions'] = array_get($_POST, 'smbd_revisions');
1160
+ self::delete_revisions($delete_options);
1161
+
1162
+ break;
1163
  }
1164
 
1165
  // hook the admin notices action
1206
  }
1207
 
1208
  if ($delete_options['restrict'] == "true") {
1209
+ $options['op'] = $delete_options['cats_op'];
1210
+ $options['days'] = $delete_options['cats_days'];
1211
 
1212
  if (!class_exists('Bulk_Delete_By_Days')) {
1213
  require_once dirname(__FILE__) . '/include/class-bulk-delete-by-days.php';
1224
  }
1225
 
1226
  /**
1227
+ * Delete posts by tags
1228
  */
1229
+ static function delete_tags($delete_options) {
 
1230
 
1231
+ $selected_tags = $delete_options['selected_tags'];
1232
+ $options = array('tag__in'=>$selected_tags, 'post_status'=>'publish', 'post_type'=>'post');
1233
+
1234
+ $private = $delete_options['private'];
1235
+
1236
+ if ($private == 'true') {
1237
+ $options['post_status'] = 'private';
1238
+ }
1239
 
1240
  $limit_to = $delete_options['limit_to'];
1241
 
1254
  }
1255
 
1256
  if ($delete_options['restrict'] == "true") {
1257
+ $options['op'] = $delete_options['tags_op'];
1258
+ $options['days'] = $delete_options['tags_days'];
1259
 
1260
  if (!class_exists('Bulk_Delete_By_Days')) {
1261
  require_once dirname(__FILE__) . '/include/class-bulk-delete-by-days.php';
1263
  $bulk_Delete_By_Days = new Bulk_Delete_By_Days;
1264
  }
1265
 
1266
+ $wp_query = new WP_Query();
1267
+ $posts = $wp_query->query($options);
 
 
1268
 
1269
+ foreach ($posts as $post) {
1270
+ wp_delete_post($post->ID, $force_delete);
 
1271
  }
1272
+ }
1273
 
1274
+ /**
1275
+ * Delete posts by post status - drafts, pending posts, scheduled posts etc.
1276
+ */
1277
+ static function delete_post_status( $delete_options ) {
1278
+ global $wp_query;
1279
+ global $wpdb;
1280
 
1281
+ $options = array();
1282
+ $post_status = array();
1283
+
1284
+ $limit_to = $delete_options['limit_to'];
1285
+
1286
+ if ($limit_to > 0) {
1287
+ $options['showposts'] = $limit_to;
1288
+ } else {
1289
+ $options['nopaging'] = 'true';
1290
+ }
1291
+
1292
+ $force_delete = $delete_options['force_delete'];
1293
+
1294
+ if ($force_delete == 'true') {
1295
+ $force_delete = true;
1296
+ } else {
1297
+ $force_delete = false;
1298
+ }
1299
+
1300
+ // Drafts
1301
+ if ("drafts" == $delete_options['drafts']) {
1302
+ $post_status[] = 'draft';
1303
  }
1304
 
1305
  // Pending Posts
1306
  if ("pending" == $delete_options['pending']) {
1307
+ $post_status[] = 'pending';
 
 
 
 
1308
  }
1309
 
1310
  // Future Posts
1311
  if ("future" == $delete_options['future']) {
1312
+ $post_status[] = 'future';
 
 
 
 
1313
  }
1314
 
1315
  // Private Posts
1316
  if ("private" == $delete_options['private']) {
1317
+ $post_status[] = 'private';
1318
+ }
1319
 
1320
+ if ($delete_options['restrict'] == "true") {
1321
+ $options['op'] = $delete_options['post_status_op'];
1322
+ $options['days'] = $delete_options['post_status_days'];
1323
+
1324
+ if (!class_exists('Bulk_Delete_By_Days')) {
1325
+ require_once dirname(__FILE__) . '/include/class-bulk-delete-by-days.php';
1326
  }
1327
+ $bulk_Delete_By_Days = new Bulk_Delete_By_Days;
1328
+ }
1329
+
1330
+ // now retrieve all posts and delete them
1331
+ $options['post_status'] = $post_status;
1332
+ $posts = $wp_query->query($options);
1333
+
1334
+ foreach ($posts as $post) {
1335
+ wp_delete_post($post->ID, $force_delete);
1336
  }
1337
  }
1338
 
1339
  /**
1340
+ * Bulk Delete pages
1341
  */
1342
+ static function delete_pages( $delete_options ) {
1343
  global $wp_query;
1344
 
1345
  $options = array();
1346
+ $post_status = array();
1347
 
1348
  $limit_to = $delete_options['limit_to'];
1349
 
1361
  $force_delete = false;
1362
  }
1363
 
1364
+ // published pages
1365
+ if ("published_pages" == $delete_options['publish']) {
1366
+ $post_status[] = 'publish';
1367
+ }
1368
+ // Drafts
1369
+ if ("draft_pages" == $delete_options['drafts']) {
1370
+ $post_status[] = 'draft';
1371
+ }
1372
+
1373
+ // Pending Posts
1374
+ if ("pending_pages" == $delete_options['pending']) {
1375
+ $post_status[] = 'pending';
1376
+ }
1377
+
1378
+ // Future Posts
1379
+ if ("future_pages" == $delete_options['future']) {
1380
+ $post_status[] = 'future';
1381
+ }
1382
+
1383
+ // Private Posts
1384
+ if ("private_pages" == $delete_options['private']) {
1385
+ $post_status[] = 'private';
1386
+ }
1387
+
1388
+ $options['post_type'] = 'page';
1389
+ $options['post_status'] = $post_status;
1390
+
1391
  if ($delete_options['restrict'] == "true") {
1392
  $options['op'] = $delete_options['page_op'];
1393
  $options['days'] = $delete_options['page_days'];
1398
  $bulk_Delete_By_Days = new Bulk_Delete_By_Days;
1399
  }
1400
 
1401
+ $pages = $wp_query->query($options);
1402
+ foreach ($pages as $page) {
1403
+ wp_delete_post($page->ID, $force_delete);
1404
+ }
1405
+ }
1406
+
1407
+ /**
1408
+ * Delete all post revisions
1409
+ */
1410
+ static function delete_revisions( $delete_options ) {
1411
+ global $wpdb;
1412
+
1413
+ // Revisions
1414
+ if ("revisions" == $delete_options['revisions']) {
1415
+ $revisions = $wpdb->get_results("select ID from $wpdb->posts where post_type = 'revision'");
1416
 
1417
+ foreach ($revisions as $revision) {
1418
+ wp_delete_post( $revision->ID );
1419
  }
1420
  }
1421
  }
1474
  }
1475
  }
1476
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1477
  /**
1478
  * function to filter custom taxonomy posts by days
1479
  * @param <type> $where
include/class-cron-list-table.php CHANGED
@@ -33,33 +33,49 @@ class Cron_List_Table extends WP_List_Table {
33
  }
34
  if ( $which == "bottom" ){
35
  //The code that goes after the table is there
36
- echo '<p>&nbsp;';
37
- echo '</p>';
38
  echo '<p>';
39
  echo '<strong>';
40
  _e('Note: ', 'bulk-delete');
41
  echo '</strong>';
42
  _e('Scheduling auto post deletion is available only when you buy pro addons.', 'bulk-delete');
43
  echo '</p>';
44
- echo '<p>';
45
- _e('The following are the list of pro addons that are currently available.', 'bulk-delete');
46
- echo '</p>';
47
- echo '<h3>'; _e('Bulk Delete Schedule Categories'); echo '</h3>';
48
- echo '<p>';
49
- _e('This addon adds the ability to schedule auto delete of categories. The cost of this addon is $15. You can buy it through paypal by clicking the below button.', 'bulk-delete');
50
- echo '</p>';
51
- ?>
52
 
53
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
54
- <input type="hidden" name="cmd" value="_s-xclick">
55
- <input type="hidden" name="hosted_button_id" value="RTJ77HKUS9C9L">
56
- <input type="image" src="https://www.paypalobjects.com/en_GB/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online.">
57
- <img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
58
- </form>
59
- <?php
60
  echo '<p>';
61
- _e('More addons coming soon', 'bulk-delete');
62
  echo '</p>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  }
64
  }
65
 
33
  }
34
  if ( $which == "bottom" ){
35
  //The code that goes after the table is there
36
+ echo '<p>&nbsp;</p>';
 
37
  echo '<p>';
38
  echo '<strong>';
39
  _e('Note: ', 'bulk-delete');
40
  echo '</strong>';
41
  _e('Scheduling auto post deletion is available only when you buy pro addons.', 'bulk-delete');
42
  echo '</p>';
 
 
 
 
 
 
 
 
43
 
 
 
 
 
 
 
 
44
  echo '<p>';
45
+ _e('The following are the list of pro addons that are currently available for purchase.', 'bulk-delete');
46
  echo '</p>';
47
+
48
+ echo '<ul style="list-style:disc; padding-left:35px">';
49
+
50
+ echo '<li>';
51
+ echo '<strong>', __('Bulk Delete Schedule Categories'), '</strong>', ' - ';
52
+ echo __('Adds the ability to schedule auto delete of posts based on categories', 'bulk-delete');
53
+ echo ' <a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-categories">', __('More Info'), '</a>.';
54
+ echo ' <a href = "http://sudarmuthu.com/out/buy-bulk-delete-category-addon">', __('Buy now'), '</a>';
55
+ echo '</li>';
56
+
57
+ echo '<li>';
58
+ echo '<strong>', __('Bulk Delete Schedule Tags'), '</strong>', ' - ';
59
+ echo __('Adds the ability to schedule auto delete of posts based on tags', 'bulk-delete');
60
+ echo ' <a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-tags">', __('More Info'), '</a>.';
61
+ echo ' <a href = "http://sudarmuthu.com/out/buy-bulk-delete-tags-addon">', __('Buy now'), '</a>';
62
+ echo '</li>';
63
+
64
+ echo '<li>';
65
+ echo '<strong>', __('Bulk Delete Schedule Pages'), '</strong>', ' - ';
66
+ echo __('Adds the ability to schedule auto delete pages', 'bulk-delete');
67
+ echo ' <a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-pages">', __('More Info'), '</a>.';
68
+ echo ' <a href = "http://sudarmuthu.com/out/buy-bulk-delete-pages-addon">', __('Buy now'), '</a>';
69
+ echo '</li>';
70
+
71
+ echo '<li>';
72
+ echo '<strong>', __('Bulk Delete Schedule by Post Status'), '</strong>', ' - ';
73
+ echo __('Adds the ability to schedule auto delete of posts based on post status like drafts, pending posts, scheduled posts etc.', 'bulk-delete');
74
+ echo ' <a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-post-status">', __('More Info'), '</a>.';
75
+ echo ' <a href = "http://sudarmuthu.com/out/buy-bulk-delete-post-status-addon">', __('Buy now'), '</a>';
76
+ echo '</li>';
77
+
78
+ echo '</ul>';
79
  }
80
  }
81
 
js/bulk-delete.js CHANGED
@@ -20,8 +20,21 @@ jQuery(document).ready(function () {
20
  jQuery('#smbd_cats_cron_start').datetimepicker({
21
  timeFormat: 'HH:mm:ss'
22
  });
 
 
 
 
 
 
 
 
 
 
 
 
23
  });
24
 
 
25
  /**
26
  * Check All Check boxes
27
  */
20
  jQuery('#smbd_cats_cron_start').datetimepicker({
21
  timeFormat: 'HH:mm:ss'
22
  });
23
+
24
+ jQuery('#smbd_tags_cron_start').datetimepicker({
25
+ timeFormat: 'HH:mm:ss'
26
+ });
27
+
28
+ jQuery('#smbd_pages_cron_start').datetimepicker({
29
+ timeFormat: 'HH:mm:ss'
30
+ });
31
+
32
+ jQuery('#smbd_post_status_cron_start').datetimepicker({
33
+ timeFormat: 'HH:mm:ss'
34
+ });
35
  });
36
 
37
+ // TODO: Bring these global functions inside the jQuery document selection callback
38
  /**
39
  * Check All Check boxes
40
  */
languages/bulk-delete.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Bulk Delete package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Bulk Delete 3.1\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/bulk-delete\n"
7
- "POT-Creation-Date: 2013-05-01 11:21:24+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -12,279 +12,306 @@ msgstr ""
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #. #-#-#-#-# bulk-delete.pot (Bulk Delete 3.1) #-#-#-#-#
16
  #. Plugin Name of the plugin/theme
17
- #: bulk-delete.php:104 bulk-delete.php:175
18
  msgid "Bulk Delete"
19
  msgstr ""
20
 
21
- #: bulk-delete.php:105 bulk-delete.php:786
22
  msgid "Bulk Delete Schedules"
23
  msgstr ""
24
 
25
- #: bulk-delete.php:128
26
  msgid "Are you sure you want to delete all the selected posts"
27
  msgstr ""
28
 
29
- #: bulk-delete.php:129
30
  msgid "Please select at least one option"
31
  msgstr ""
32
 
33
- #: bulk-delete.php:146
34
  msgid "Manage"
35
  msgstr ""
36
 
37
- #: bulk-delete.php:160
38
  msgid "Buy Addons"
39
  msgstr ""
40
 
41
- #: bulk-delete.php:171
42
  msgid "WARNING: Posts deleted once cannot be retrieved back. Use with caution."
43
  msgstr ""
44
 
45
- #: bulk-delete.php:181
46
- msgid "By Type"
47
  msgstr ""
48
 
49
- #: bulk-delete.php:183
50
  msgid "Select the posts which you want to delete"
51
  msgstr ""
52
 
53
- #: bulk-delete.php:200
54
- msgid "All Drafts"
55
  msgstr ""
56
 
57
- #: bulk-delete.php:200
58
  msgid "Drafts"
59
  msgstr ""
60
 
61
- #: bulk-delete.php:207
62
- msgid "All Revisions"
63
- msgstr ""
64
-
65
- #: bulk-delete.php:207
66
- msgid "Revisions"
67
- msgstr ""
68
-
69
- #: bulk-delete.php:214
70
  msgid "All Pending posts"
71
  msgstr ""
72
 
73
- #: bulk-delete.php:214 bulk-delete.php:221 bulk-delete.php:228
74
- #: bulk-delete.php:420 bulk-delete.php:545 bulk-delete.php:649
75
  msgid "Posts"
76
  msgstr ""
77
 
78
- #: bulk-delete.php:221
79
  msgid "All scheduled posts"
80
  msgstr ""
81
 
82
- #: bulk-delete.php:228
83
  msgid "All private posts"
84
  msgstr ""
85
 
86
- #: bulk-delete.php:234 bulk-delete.php:305 bulk-delete.php:372
87
- #: bulk-delete.php:437 bulk-delete.php:562 bulk-delete.php:666
88
  msgid "Choose your filtering options"
89
  msgstr ""
90
 
91
- #: bulk-delete.php:241 bulk-delete.php:446 bulk-delete.php:571
92
- #: bulk-delete.php:675
93
  msgid "Only restrict to posts which are "
94
  msgstr ""
95
 
96
- #: bulk-delete.php:243 bulk-delete.php:314 bulk-delete.php:448
97
- #: bulk-delete.php:573 bulk-delete.php:677
98
  msgid "older than"
99
  msgstr ""
100
 
101
- #: bulk-delete.php:244 bulk-delete.php:315 bulk-delete.php:449
102
- #: bulk-delete.php:574 bulk-delete.php:678
103
  msgid "posted within last"
104
  msgstr ""
105
 
106
- #: bulk-delete.php:246 bulk-delete.php:317 bulk-delete.php:451
107
- #: bulk-delete.php:576 bulk-delete.php:680
108
  msgid "days"
109
  msgstr ""
110
 
111
- #: bulk-delete.php:252 bulk-delete.php:323 bulk-delete.php:378
112
- #: bulk-delete.php:457 bulk-delete.php:582 bulk-delete.php:686
113
  msgid "Move to Trash"
114
  msgstr ""
115
 
116
- #: bulk-delete.php:253 bulk-delete.php:324 bulk-delete.php:379
117
- #: bulk-delete.php:458 bulk-delete.php:583 bulk-delete.php:687
118
  msgid "Delete permanently"
119
  msgstr ""
120
 
121
- #: bulk-delete.php:260 bulk-delete.php:331 bulk-delete.php:474
122
- #: bulk-delete.php:599 bulk-delete.php:703
123
  msgid "Only delete first "
124
  msgstr ""
125
 
126
- #: bulk-delete.php:261 bulk-delete.php:332 bulk-delete.php:475
127
- #: bulk-delete.php:600 bulk-delete.php:704
128
  msgid "posts."
129
  msgstr ""
130
 
131
- #: bulk-delete.php:262 bulk-delete.php:333 bulk-delete.php:476
132
- #: bulk-delete.php:601 bulk-delete.php:705
133
  msgid ""
134
  "Use this option if there are more than 1000 posts and the script timesout."
135
  msgstr ""
136
 
137
- #: bulk-delete.php:270 bulk-delete.php:341 bulk-delete.php:387
138
- #: bulk-delete.php:508 bulk-delete.php:608 bulk-delete.php:712
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  msgid "Bulk Delete "
140
  msgstr ""
141
 
142
- #: bulk-delete.php:283
143
- msgid "By Pages"
144
  msgstr ""
145
 
146
- #: bulk-delete.php:285
147
- msgid "Select the pages which you want to delete"
148
  msgstr ""
149
 
150
- #: bulk-delete.php:299
151
- msgid "All Pages"
152
  msgstr ""
153
 
154
- #: bulk-delete.php:299
155
- msgid "Pages"
156
  msgstr ""
157
 
158
- #: bulk-delete.php:312
159
- msgid "Only restrict to pages which are "
160
  msgstr ""
161
 
162
- #: bulk-delete.php:354
163
- msgid "By Urls"
164
  msgstr ""
165
 
166
- #: bulk-delete.php:356
167
- msgid "Delete these specific pages"
168
  msgstr ""
169
 
170
- #: bulk-delete.php:364
171
- msgid "Enter one post url (not post ids) per line"
172
  msgstr ""
173
 
174
- #: bulk-delete.php:402
175
- msgid "By Category"
176
  msgstr ""
177
 
178
- #: bulk-delete.php:404
179
- msgid "Select the categories whose post you want to delete"
180
  msgstr ""
181
 
182
- #: bulk-delete.php:431
183
- msgid "All Categories"
184
  msgstr ""
185
 
186
- #: bulk-delete.php:464 bulk-delete.php:589 bulk-delete.php:693
187
- msgid "Public posts"
188
  msgstr ""
189
 
190
- #: bulk-delete.php:465 bulk-delete.php:590 bulk-delete.php:694
191
- msgid "Private Posts"
192
  msgstr ""
193
 
194
- #: bulk-delete.php:482
195
- msgid "Delete now"
196
  msgstr ""
197
 
198
- #: bulk-delete.php:483 include/class-cron-list-table.php:73
199
- msgid "Schedule"
200
  msgstr ""
201
 
202
- #: bulk-delete.php:484
203
- msgid "repeat "
 
204
  msgstr ""
205
 
206
- #: bulk-delete.php:486
207
- msgid "Don't repeat"
208
  msgstr ""
209
 
210
- #: bulk-delete.php:496
211
- msgid "Only available in Pro Addon"
212
  msgstr ""
213
 
214
- #: bulk-delete.php:501
215
- msgid "Enter time in Y-m-d H:i:s format or enter now to use current time"
216
  msgstr ""
217
 
218
- #: bulk-delete.php:526
219
- msgid "By Tags"
220
  msgstr ""
221
 
222
- #: bulk-delete.php:529
223
- msgid "Select the tags whose post you want to delete"
224
  msgstr ""
225
 
226
- #: bulk-delete.php:556
227
- msgid "All Tags"
228
  msgstr ""
229
 
230
- #: bulk-delete.php:629
231
- msgid "By Taxonomies"
232
  msgstr ""
233
 
234
- #: bulk-delete.php:631
235
- msgid "Select the taxonomies whose post you want to delete"
236
  msgstr ""
237
 
238
- #: bulk-delete.php:660
239
- msgid "All Taxonomies"
 
 
 
 
 
 
 
 
240
  msgstr ""
241
 
242
- #: bulk-delete.php:728
243
  msgid "Debug Information"
244
  msgstr ""
245
 
246
- #: bulk-delete.php:730
247
  msgid ""
248
  "If you are seeing a blank page after clicking the Bulk Delete button, then "
249
  msgstr ""
250
 
251
- #: bulk-delete.php:730
252
  msgid "check out this FAQ"
253
  msgstr ""
254
 
255
- #: bulk-delete.php:731
256
  msgid "You also need need the following debug information."
257
  msgstr ""
258
 
259
- #: bulk-delete.php:734
260
  msgid "Available memory size "
261
  msgstr ""
262
 
263
- #: bulk-delete.php:738
264
  msgid "Script time out "
265
  msgstr ""
266
 
267
- #: bulk-delete.php:742
268
  msgid "Script input time "
269
  msgstr ""
270
 
271
- #: bulk-delete.php:764
272
  msgid "plugin"
273
  msgstr ""
274
 
275
- #: bulk-delete.php:764
276
  msgid "Version"
277
  msgstr ""
278
 
279
- #: bulk-delete.php:764
280
  msgid "by"
281
  msgstr ""
282
 
283
- #: bulk-delete.php:1023
284
  msgid "All the selected posts have been successfully deleted."
285
  msgstr ""
286
 
287
- #: bulk-delete.php:1210
288
  msgctxt "Cron table date format"
289
  msgid "M j, Y @ G:i"
290
  msgstr ""
@@ -295,51 +322,82 @@ msgid ""
295
  "posts in Bulk Delete Plugin."
296
  msgstr ""
297
 
298
- #: include/class-cron-list-table.php:40
299
  msgid "Note: "
300
  msgstr ""
301
 
302
- #: include/class-cron-list-table.php:42
303
  msgid ""
304
  "Scheduling auto post deletion is available only when you buy pro addons."
305
  msgstr ""
306
 
307
  #: include/class-cron-list-table.php:45
308
- msgid "The following are the list of pro addons that are currently available."
 
 
309
  msgstr ""
310
 
311
- #: include/class-cron-list-table.php:47
312
  msgid "Bulk Delete Schedule Categories"
313
  msgstr ""
314
 
315
- #: include/class-cron-list-table.php:49
316
- msgid ""
317
- "This addon adds the ability to schedule auto delete of categories. The cost "
318
- "of this addon is $15. You can buy it through paypal by clicking the below "
319
- "button."
 
 
 
 
 
 
 
320
  msgstr ""
321
 
322
- #: include/class-cron-list-table.php:61
323
- msgid "More addons coming soon"
 
 
 
 
 
 
 
 
 
 
 
 
324
  msgstr ""
325
 
326
  #: include/class-cron-list-table.php:72
 
 
 
 
 
 
 
 
 
 
327
  msgid "Next Due (GMT/UTC)"
328
  msgstr ""
329
 
330
- #: include/class-cron-list-table.php:74
331
  msgid "Type"
332
  msgstr ""
333
 
334
- #: include/class-cron-list-table.php:75
335
  msgid "Options"
336
  msgstr ""
337
 
338
- #: include/class-cron-list-table.php:121
339
  msgid "Delete"
340
  msgstr ""
341
 
342
- #: include/class-cron-list-table.php:146
343
  msgid "You have not scheduled any bulk delete jobs."
344
  msgstr ""
345
 
2
  # This file is distributed under the same license as the Bulk Delete package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Bulk Delete 3.2\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/bulk-delete\n"
7
+ "POT-Creation-Date: 2013-05-05 12:07:06+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #. #-#-#-#-# bulk-delete.pot (Bulk Delete 3.2) #-#-#-#-#
16
  #. Plugin Name of the plugin/theme
17
+ #: bulk-delete.php:121 bulk-delete.php:192
18
  msgid "Bulk Delete"
19
  msgstr ""
20
 
21
+ #: bulk-delete.php:122 bulk-delete.php:937
22
  msgid "Bulk Delete Schedules"
23
  msgstr ""
24
 
25
+ #: bulk-delete.php:145
26
  msgid "Are you sure you want to delete all the selected posts"
27
  msgstr ""
28
 
29
+ #: bulk-delete.php:146
30
  msgid "Please select at least one option"
31
  msgstr ""
32
 
33
+ #: bulk-delete.php:163
34
  msgid "Manage"
35
  msgstr ""
36
 
37
+ #: bulk-delete.php:177
38
  msgid "Buy Addons"
39
  msgstr ""
40
 
41
+ #: bulk-delete.php:188
42
  msgid "WARNING: Posts deleted once cannot be retrieved back. Use with caution."
43
  msgstr ""
44
 
45
+ #: bulk-delete.php:199
46
+ msgid "By Post Status"
47
  msgstr ""
48
 
49
+ #: bulk-delete.php:201 bulk-delete.php:840
50
  msgid "Select the posts which you want to delete"
51
  msgstr ""
52
 
53
+ #: bulk-delete.php:217
54
+ msgid "All Draft Posts"
55
  msgstr ""
56
 
57
+ #: bulk-delete.php:217
58
  msgid "Drafts"
59
  msgstr ""
60
 
61
+ #: bulk-delete.php:224
 
 
 
 
 
 
 
 
62
  msgid "All Pending posts"
63
  msgstr ""
64
 
65
+ #: bulk-delete.php:224 bulk-delete.php:231 bulk-delete.php:238
66
+ #: bulk-delete.php:333 bulk-delete.php:462 bulk-delete.php:588
67
  msgid "Posts"
68
  msgstr ""
69
 
70
+ #: bulk-delete.php:231
71
  msgid "All scheduled posts"
72
  msgstr ""
73
 
74
+ #: bulk-delete.php:238
75
  msgid "All private posts"
76
  msgstr ""
77
 
78
+ #: bulk-delete.php:244 bulk-delete.php:350 bulk-delete.php:479
79
+ #: bulk-delete.php:605 bulk-delete.php:722 bulk-delete.php:809
80
  msgid "Choose your filtering options"
81
  msgstr ""
82
 
83
+ #: bulk-delete.php:251 bulk-delete.php:359 bulk-delete.php:488
84
+ #: bulk-delete.php:614
85
  msgid "Only restrict to posts which are "
86
  msgstr ""
87
 
88
+ #: bulk-delete.php:253 bulk-delete.php:361 bulk-delete.php:490
89
+ #: bulk-delete.php:616 bulk-delete.php:731
90
  msgid "older than"
91
  msgstr ""
92
 
93
+ #: bulk-delete.php:254 bulk-delete.php:362 bulk-delete.php:491
94
+ #: bulk-delete.php:617 bulk-delete.php:732
95
  msgid "posted within last"
96
  msgstr ""
97
 
98
+ #: bulk-delete.php:256 bulk-delete.php:364 bulk-delete.php:493
99
+ #: bulk-delete.php:619 bulk-delete.php:734
100
  msgid "days"
101
  msgstr ""
102
 
103
+ #: bulk-delete.php:262 bulk-delete.php:370 bulk-delete.php:499
104
+ #: bulk-delete.php:625 bulk-delete.php:740 bulk-delete.php:815
105
  msgid "Move to Trash"
106
  msgstr ""
107
 
108
+ #: bulk-delete.php:263 bulk-delete.php:371 bulk-delete.php:500
109
+ #: bulk-delete.php:626 bulk-delete.php:741 bulk-delete.php:816
110
  msgid "Delete permanently"
111
  msgstr ""
112
 
113
+ #: bulk-delete.php:270 bulk-delete.php:387 bulk-delete.php:516
114
+ #: bulk-delete.php:642 bulk-delete.php:748
115
  msgid "Only delete first "
116
  msgstr ""
117
 
118
+ #: bulk-delete.php:271 bulk-delete.php:388 bulk-delete.php:517
119
+ #: bulk-delete.php:643 bulk-delete.php:749
120
  msgid "posts."
121
  msgstr ""
122
 
123
+ #: bulk-delete.php:272 bulk-delete.php:389 bulk-delete.php:518
124
+ #: bulk-delete.php:644 bulk-delete.php:750
125
  msgid ""
126
  "Use this option if there are more than 1000 posts and the script timesout."
127
  msgstr ""
128
 
129
+ #: bulk-delete.php:278 bulk-delete.php:395 bulk-delete.php:524
130
+ #: bulk-delete.php:756
131
+ msgid "Delete now"
132
+ msgstr ""
133
+
134
+ #: bulk-delete.php:279 bulk-delete.php:396 bulk-delete.php:525
135
+ #: bulk-delete.php:757 include/class-cron-list-table.php:89
136
+ msgid "Schedule"
137
+ msgstr ""
138
+
139
+ #: bulk-delete.php:280 bulk-delete.php:397 bulk-delete.php:526
140
+ #: bulk-delete.php:758
141
+ msgid "repeat "
142
+ msgstr ""
143
+
144
+ #: bulk-delete.php:282 bulk-delete.php:399 bulk-delete.php:528
145
+ #: bulk-delete.php:760
146
+ msgid "Don't repeat"
147
+ msgstr ""
148
+
149
+ #: bulk-delete.php:292 bulk-delete.php:409 bulk-delete.php:538
150
+ #: bulk-delete.php:770
151
+ msgid "Only available in Pro Addon"
152
+ msgstr ""
153
+
154
+ #: bulk-delete.php:299 bulk-delete.php:422 bulk-delete.php:545
155
+ #: bulk-delete.php:651 bulk-delete.php:777 bulk-delete.php:824
156
+ #: bulk-delete.php:860
157
  msgid "Bulk Delete "
158
  msgstr ""
159
 
160
+ #: bulk-delete.php:315
161
+ msgid "By Category"
162
  msgstr ""
163
 
164
+ #: bulk-delete.php:317
165
+ msgid "Select the categories whose post you want to delete"
166
  msgstr ""
167
 
168
+ #: bulk-delete.php:344
169
+ msgid "All Categories"
170
  msgstr ""
171
 
172
+ #: bulk-delete.php:377 bulk-delete.php:506 bulk-delete.php:632
173
+ msgid "Public posts"
174
  msgstr ""
175
 
176
+ #: bulk-delete.php:378 bulk-delete.php:507 bulk-delete.php:633
177
+ msgid "Private Posts"
178
  msgstr ""
179
 
180
+ #: bulk-delete.php:415
181
+ msgid "Enter time in Y-m-d H:i:s format or enter now to use current time"
182
  msgstr ""
183
 
184
+ #: bulk-delete.php:443
185
+ msgid "By Tags"
186
  msgstr ""
187
 
188
+ #: bulk-delete.php:446
189
+ msgid "Select the tags whose post you want to delete"
190
  msgstr ""
191
 
192
+ #: bulk-delete.php:473
193
+ msgid "All Tags"
194
  msgstr ""
195
 
196
+ #: bulk-delete.php:568
197
+ msgid "By Taxonomies"
198
  msgstr ""
199
 
200
+ #: bulk-delete.php:570
201
+ msgid "Select the taxonomies whose post you want to delete"
202
  msgstr ""
203
 
204
+ #: bulk-delete.php:599
205
+ msgid "All Taxonomies"
206
  msgstr ""
207
 
208
+ #: bulk-delete.php:668
209
+ msgid "By Pages"
210
  msgstr ""
211
 
212
+ #: bulk-delete.php:670
213
+ msgid "Select the pages which you want to delete"
214
  msgstr ""
215
 
216
+ #: bulk-delete.php:688
217
+ msgid "All Published Pages"
218
  msgstr ""
219
 
220
+ #: bulk-delete.php:688 bulk-delete.php:695 bulk-delete.php:702
221
+ #: bulk-delete.php:709 bulk-delete.php:716
222
+ msgid "Pages"
223
  msgstr ""
224
 
225
+ #: bulk-delete.php:695
226
+ msgid "All Draft Pages"
227
  msgstr ""
228
 
229
+ #: bulk-delete.php:702
230
+ msgid "All Scheduled Pages"
231
  msgstr ""
232
 
233
+ #: bulk-delete.php:709
234
+ msgid "All Pending Pages"
235
  msgstr ""
236
 
237
+ #: bulk-delete.php:716
238
+ msgid "All Private Pages"
239
  msgstr ""
240
 
241
+ #: bulk-delete.php:729
242
+ msgid "Only restrict to pages which are "
243
  msgstr ""
244
 
245
+ #: bulk-delete.php:791
246
+ msgid "By Urls"
247
  msgstr ""
248
 
249
+ #: bulk-delete.php:793
250
+ msgid "Delete these specific pages"
251
  msgstr ""
252
 
253
+ #: bulk-delete.php:801
254
+ msgid "Enter one post url (not post ids) per line"
255
  msgstr ""
256
 
257
+ #: bulk-delete.php:838
258
+ msgid "By Post Revisions"
259
+ msgstr ""
260
+
261
+ #: bulk-delete.php:852
262
+ msgid "All Revisions"
263
+ msgstr ""
264
+
265
+ #: bulk-delete.php:852
266
+ msgid "Revisions"
267
  msgstr ""
268
 
269
+ #: bulk-delete.php:877
270
  msgid "Debug Information"
271
  msgstr ""
272
 
273
+ #: bulk-delete.php:879
274
  msgid ""
275
  "If you are seeing a blank page after clicking the Bulk Delete button, then "
276
  msgstr ""
277
 
278
+ #: bulk-delete.php:879
279
  msgid "check out this FAQ"
280
  msgstr ""
281
 
282
+ #: bulk-delete.php:880
283
  msgid "You also need need the following debug information."
284
  msgstr ""
285
 
286
+ #: bulk-delete.php:883
287
  msgid "Available memory size "
288
  msgstr ""
289
 
290
+ #: bulk-delete.php:887
291
  msgid "Script time out "
292
  msgstr ""
293
 
294
+ #: bulk-delete.php:891
295
  msgid "Script input time "
296
  msgstr ""
297
 
298
+ #: bulk-delete.php:915
299
  msgid "plugin"
300
  msgstr ""
301
 
302
+ #: bulk-delete.php:915
303
  msgid "Version"
304
  msgstr ""
305
 
306
+ #: bulk-delete.php:915
307
  msgid "by"
308
  msgstr ""
309
 
310
+ #: bulk-delete.php:1174
311
  msgid "All the selected posts have been successfully deleted."
312
  msgstr ""
313
 
314
+ #: bulk-delete.php:1432
315
  msgctxt "Cron table date format"
316
  msgid "M j, Y @ G:i"
317
  msgstr ""
322
  "posts in Bulk Delete Plugin."
323
  msgstr ""
324
 
325
+ #: include/class-cron-list-table.php:39
326
  msgid "Note: "
327
  msgstr ""
328
 
329
+ #: include/class-cron-list-table.php:41
330
  msgid ""
331
  "Scheduling auto post deletion is available only when you buy pro addons."
332
  msgstr ""
333
 
334
  #: include/class-cron-list-table.php:45
335
+ msgid ""
336
+ "The following are the list of pro addons that are currently available for "
337
+ "purchase."
338
  msgstr ""
339
 
340
+ #: include/class-cron-list-table.php:51
341
  msgid "Bulk Delete Schedule Categories"
342
  msgstr ""
343
 
344
+ #: include/class-cron-list-table.php:52
345
+ msgid "Adds the ability to schedule auto delete of posts based on categories"
346
+ msgstr ""
347
+
348
+ #: include/class-cron-list-table.php:53 include/class-cron-list-table.php:60
349
+ #: include/class-cron-list-table.php:67 include/class-cron-list-table.php:74
350
+ msgid "More Info"
351
+ msgstr ""
352
+
353
+ #: include/class-cron-list-table.php:54 include/class-cron-list-table.php:61
354
+ #: include/class-cron-list-table.php:68 include/class-cron-list-table.php:75
355
+ msgid "Buy now"
356
  msgstr ""
357
 
358
+ #: include/class-cron-list-table.php:58
359
+ msgid "Bulk Delete Schedule Tags"
360
+ msgstr ""
361
+
362
+ #: include/class-cron-list-table.php:59
363
+ msgid "Adds the ability to schedule auto delete of posts based on tags"
364
+ msgstr ""
365
+
366
+ #: include/class-cron-list-table.php:65
367
+ msgid "Bulk Delete Schedule Pages"
368
+ msgstr ""
369
+
370
+ #: include/class-cron-list-table.php:66
371
+ msgid "Adds the ability to schedule auto delete pages"
372
  msgstr ""
373
 
374
  #: include/class-cron-list-table.php:72
375
+ msgid "Bulk Delete Schedule by Post Status"
376
+ msgstr ""
377
+
378
+ #: include/class-cron-list-table.php:73
379
+ msgid ""
380
+ "Adds the ability to schedule auto delete of posts based on post status like "
381
+ "drafts, pending posts, scheduled posts etc."
382
+ msgstr ""
383
+
384
+ #: include/class-cron-list-table.php:88
385
  msgid "Next Due (GMT/UTC)"
386
  msgstr ""
387
 
388
+ #: include/class-cron-list-table.php:90
389
  msgid "Type"
390
  msgstr ""
391
 
392
+ #: include/class-cron-list-table.php:91
393
  msgid "Options"
394
  msgstr ""
395
 
396
+ #: include/class-cron-list-table.php:137
397
  msgid "Delete"
398
  msgstr ""
399
 
400
+ #: include/class-cron-list-table.php:162
401
  msgid "You have not scheduled any bulk delete jobs."
402
  msgstr ""
403
 
readme.txt CHANGED
@@ -1,31 +1,31 @@
1
  === Bulk Delete ===
2
  Contributors: sudar
3
- Tags: post, comment, delete, bulk, draft, revision, page
4
  Requires at least: 2.0
5
  Tested up to: 3.5.1
6
  Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
7
- Stable tag: 3.1
8
 
9
- Bulk delete posts from selected categories, tags or custom taxonomies
10
 
11
  == Description ==
12
 
13
- Bulk Delete is a WordPress Plugin which can be used to delete posts in bulk from selected categories, tags or custom taxonomies. This Plugin can also delete all drafts, post revisions or pages.
14
 
15
  ### Features
16
 
17
- This Plugin supports the following bulk delete options
 
 
18
 
19
  - Delete posts by category
20
  - Delete posts by tags
21
  - Delete posts by custom taxonomies
22
  - Delete posts by url
23
- - Delete all pages
24
- - Delete all post revisions
25
  - Delete all pending posts
26
  - Delete all private posts
27
  - Delete all scheduled posts
28
- - Delete all drafts
29
 
30
  All the above options support the following filters
31
 
@@ -33,8 +33,36 @@ All the above options support the following filters
33
  - Post date less than X days
34
  - Only public posts
35
  - Only private posts
36
- - Restrict to first Y posts
37
- - Schedule deletion of posts automatically (Available as a Pro addon)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
  As you can see, the Plugin provide comprehensive options and filters to perform bulk deletion.
40
 
@@ -42,13 +70,12 @@ If you looking for just moving posts, instead of deleting, then use [Bulk Move P
42
 
43
  ### Pro Addons
44
 
45
- The following are the list of pro addons that are currently available.
46
-
47
- #### Bulk Delete Schedule Categories
48
-
49
- This addon adds the ability to schedule auto delete of posts based on categories. This will be really useful, if you have to delete posts based on categories on a regular basis.
50
 
51
- The cost of this addon is $15 and you can buy it through [paypal](http://sudarmuthu.com/out/bulk-delete-category-addon).
 
 
 
52
 
53
  ### Development
54
 
@@ -62,14 +89,16 @@ If you are looking for ideas, then you can start with one of the following TODO
62
 
63
  The following are the features that I am thinking of adding to the Plugin, when I get some free time. If you have any feature request or want to increase the priority of a particular feature, then let me know.
64
 
 
 
 
 
65
  - Bulk delete based on the presence/absence of a word
66
  - Bulk Delete empty posts
67
  - Bulk Delete posts based on users
68
- - Bulk Delete by custom post types
69
  - Delete images that are used by the posts that are being deleted
70
  - Expandable/collapsible taxonomies
71
  - Bulk delete comments
72
- - Ability to schedule deletion of posts
73
 
74
  ### Support
75
 
@@ -151,14 +180,33 @@ The ability to schedule deletion of posts is available as a pro addon.
151
 
152
  == Screenshots ==
153
 
154
- 1. The above screenshot shows how you can delete Posts by type. You can choose between drafts, revisions, Pending posts, scheduled posts, privates posts, pages etc..
 
 
155
 
156
- 2. The above screenshot shows how you can delete posts by tag
157
 
158
- 3. The above screenshot shows how you can delete posts by Custom taxonomies
 
 
 
 
 
 
159
 
160
  == Changelog ==
161
 
 
 
 
 
 
 
 
 
 
 
 
162
  = 2013-04-28 - v3.1 - (Dev time: 5 hours) =
163
  * Added separate delete by sections for pages, drafts and urls
164
  * Added the option to delete by date for drafts, revisions, future posts etc
@@ -248,6 +296,10 @@ The ability to schedule deletion of posts is available as a pro addon.
248
 
249
  == Upgrade Notice ==
250
 
 
 
 
 
251
  = 3.1 =
252
 
253
  Added the option to delete by date for pages, drafts, revisions, future posts etc
1
  === Bulk Delete ===
2
  Contributors: sudar
3
+ Tags: post, comment, delete, bulk, mass, draft, revision, page
4
  Requires at least: 2.0
5
  Tested up to: 3.5.1
6
  Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
7
+ Stable tag: 3.2
8
 
9
+ Bulk delete posts from selected categories, tags, custom taxonomies or by post type like drafts, scheduled posts, revisions etc.
10
 
11
  == Description ==
12
 
13
+ Bulk Delete is a WordPress Plugin which can be used to delete posts in bulk from selected categories, tags or custom taxonomies. This Plugin can also delete all drafts, post revisions, scheduled posts or pages.
14
 
15
  ### Features
16
 
17
+ #### Deleting posts
18
+
19
+ This Plugin supports the following bulk delete options for deleting posts
20
 
21
  - Delete posts by category
22
  - Delete posts by tags
23
  - Delete posts by custom taxonomies
24
  - Delete posts by url
25
+ - Delete all draft posts
 
26
  - Delete all pending posts
27
  - Delete all private posts
28
  - Delete all scheduled posts
 
29
 
30
  All the above options support the following filters
31
 
33
  - Post date less than X days
34
  - Only public posts
35
  - Only private posts
36
+ - Restrict to first N posts
37
+ - Delete permanently or just move to trash
38
+ - Schedule deletion of posts automatically (Available as a [Pro addon](http://sudarmuthu.com/wordpress/bulk-delete/pro-addons))
39
+
40
+ #### Deleting pages
41
+
42
+ - Delete all published pages
43
+ - Delete all draft pages
44
+ - Delete all pending pages
45
+ - Delete all private pages
46
+ - Delete all scheduled pages
47
+
48
+ Like posts, all the above options support the following filters as well
49
+
50
+ - Post date greater than X days
51
+ - Post date less than X days
52
+ - Only public posts
53
+ - Only private posts
54
+ - Restrict to first N posts
55
+ - Delete permanently or just move to trash
56
+ - Schedule deletion of posts automatically (Available as a [Pro addon](http://sudarmuthu.com/wordpress/bulk-delete/pro-addons))
57
+
58
+ #### Deleting post revisions
59
+
60
+ - Delete all post revisions
61
+
62
+ #### Deleting by custom post types and by content
63
+
64
+ Coming soon :)
65
+
66
 
67
  As you can see, the Plugin provide comprehensive options and filters to perform bulk deletion.
68
 
70
 
71
  ### Pro Addons
72
 
73
+ The following are the list of pro addons that are currently available for purchase to add more features to the Plugin.
 
 
 
 
74
 
75
+ - Bulk Delete Schedule Categories - Adds the ability to schedule auto delete of posts based on categories. [More details](http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-categories). [Buy now](http://sudarmuthu.com/out/buy-bulk-delete-category-addon)
76
+ - Bulk Delete Schedule Tags - Adds the ability to schedule auto delete of posts based on tags. [More details](http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-tags). [Buy now](http://sudarmuthu.com/out/buy-bulk-delete-tags-addon)
77
+ - Bulk Delete Schedule Pages - Adds the ability to schedule auto delete of pages. [More details](http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-pages). [Buy now](http://sudarmuthu.com/out/buy-bulk-delete-pages-addon)
78
+ - Bulk Delete Schedule by Post Status - Adds the ability to schedule auto delete of posts based on post status like drafts, pending posts, scheduled posts etc. [More details](http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-post-status). [Buy now](http://sudarmuthu.com/out/buy-bulk-delete-post-status-addon)
79
 
80
  ### Development
81
 
89
 
90
  The following are the features that I am thinking of adding to the Plugin, when I get some free time. If you have any feature request or want to increase the priority of a particular feature, then let me know.
91
 
92
+ - Close the different sections initially, when the page is loaded
93
+ - Change the message based on the option the user has chosen
94
+ - Bulk Delete sticky posts
95
+ - Bulk Delete by custom post types
96
  - Bulk delete based on the presence/absence of a word
97
  - Bulk Delete empty posts
98
  - Bulk Delete posts based on users
 
99
  - Delete images that are used by the posts that are being deleted
100
  - Expandable/collapsible taxonomies
101
  - Bulk delete comments
 
102
 
103
  ### Support
104
 
180
 
181
  == Screenshots ==
182
 
183
+ 1. The above screenshot shows how you can delete Posts by post status. You can choose between drafts, pending posts, scheduled posts, privates posts.
184
+
185
+ 2. The above screenshot shows how you can delete posts by category.
186
 
187
+ 3. The above screenshot shows how you can delete posts by tags.
188
 
189
+ 4. The above screenshot shows how you can delete posts by custom taxonomies.
190
+
191
+ 5. The above screenshot shows how you can delete pages by post status. You can choose between draft pages, pending pages, scheduled pages and privates pages.
192
+
193
+ 6. The above screenshot shows how you can schedule auto delete of posts. Note that this feature is available only when you buy [pro addons](http://sudarmuthu.com/wordpress/bulk-delete/pro-addons).
194
+
195
+ 7. The above screenshot shows the scheduled auto delete jobs will be displayed. Note that this feature is available only when you buy [pro addons](http://sudarmuthu.com/wordpress/bulk-delete/pro-addons).
196
 
197
  == Changelog ==
198
 
199
+ = 2013-05-04 - v3.2 - (Dev time: 20 hours) =
200
+ * Added support for scheduling auto delete of pages
201
+ * Added support for scheduling auto delete of drafts
202
+ * Fixed issue in deleting post revisions
203
+ * Move post revisions to a separate section
204
+ * Better handling of post count to improve performance
205
+ * Moved pages to a separate section
206
+ * Added ability to delete pages in different status
207
+ * Added the option to schedule auto delete of tags by date
208
+ * Fixed a bug which was not allowing categories to be deleted based on date
209
+
210
  = 2013-04-28 - v3.1 - (Dev time: 5 hours) =
211
  * Added separate delete by sections for pages, drafts and urls
212
  * Added the option to delete by date for drafts, revisions, future posts etc
296
 
297
  == Upgrade Notice ==
298
 
299
+ = 3.2 =
300
+
301
+ Fixed bugs in handling post revisions and dates in categories. Added more options to delete pages.
302
+
303
  = 3.1 =
304
 
305
  Added the option to delete by date for pages, drafts, revisions, future posts etc