Bulk Delete - Version 0.7

Version Description

Download this release

Release Info

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

Code changes from version 0.6 to 0.7

Files changed (3) hide show
  1. bulk-delete.php +591 -462
  2. languages/bulk-delete.pot +186 -0
  3. readme.txt +7 -3
bulk-delete.php CHANGED
@@ -1,463 +1,592 @@
1
- <?php
2
- /*
3
- Plugin Name: Bulk Delete
4
- Plugin Script: bulk-delete.php
5
- Plugin URI: http://sudarmuthu.com/wordpress/bulk-delete
6
- Description: Bulk delete posts from selected categories or tags. Use it with caution.
7
- Version: 0.6
8
- License: GPL
9
- Author: Sudar
10
- Author URI: http://sudarmuthu.com/
11
-
12
- === RELEASE NOTES ===
13
- 2009-02-02 - v0.1 - first version
14
- 2009-02-03 - v0.2 - Second release - Fixed issues with pagging
15
- 2009-04-05 - v0.3 - Third release - Prevented drafts from deleted when only posts are selected
16
- 2009-07-05 - v0.4 - Fourth release - Added option to delete by date.
17
- 2009-07-21 - v0.5 - Fifth release - Added option to delete all pending posts.
18
- 2009-07-22 - v0.6 - Sixth release - Added option to delete all scheduled posts.
19
-
20
- */
21
-
22
-
23
- /**
24
- * Request Handler
25
- */
26
-
27
- if (!function_exists('smbd_request_handler')) {
28
- function smbd_request_handler() {
29
- global $wpdb;
30
-
31
- if (isset($_POST['smbd_action'])) {
32
-
33
- $wp_query = new WP_Query;
34
- check_admin_referer( 'bulk-delete-posts');
35
-
36
- switch($_POST['smbd_action']) {
37
-
38
- case "bulk-delete-cats":
39
- // delete by cats
40
- $selected_cats = $_POST['smbd_cats'];
41
- if ($_POST['smbd_cats_restrict'] == "true") {
42
-
43
- add_option('cats_op', $_POST['smbd_cats_op']);
44
- add_option('cats_days', $_POST['smbd_cats_days']);
45
-
46
- add_filter ('posts_where', 'cats_by_days');
47
- }
48
- $posts = $wp_query->query(array('category__in'=>$selected_cats,'post_status'=>'publish', 'post_type'=>'post', 'nopaging'=>'true'));
49
- foreach ($posts as $post) {
50
- wp_delete_post($post->ID);
51
- }
52
-
53
- break;
54
-
55
- case "bulk-delete-tags":
56
- // delete by tags
57
- $selected_tags = $_POST['smbd_tags'];
58
- if ($_POST['smbd_tags_restrict'] == "true") {
59
-
60
- add_option('tags_op', $_POST['smbd_tags_op']);
61
- add_option('tags_days', $_POST['smbd_tags_days']);
62
-
63
- add_filter ('posts_where', 'tags_by_days');
64
- }
65
- $posts = $wp_query->query(array('tag__in'=>$selected_tags, 'post_status'=>'publish', 'post_type'=>'post', 'nopaging'=>'true'));
66
-
67
- foreach ($posts as $post) {
68
- wp_delete_post($post->ID);
69
- }
70
-
71
- break;
72
-
73
- case "bulk-delete-special":
74
- // Drafts
75
- if ("drafs" == $_POST['smbd_drafs']) {
76
- $drafts = $wp_query->query(array('post_status'=>'draft', 'nopaging'=>'true'));
77
-
78
- foreach ($drafts as $draft) {
79
- wp_delete_post($draft->ID);
80
- }
81
- }
82
-
83
- // Revisions
84
- if ("revisions" == $_POST['smbd_revisions']) {
85
- $revisions = $wpdb->get_results($wpdb->prepare("select * from $wpdb->posts where post_type = 'revision'"));
86
-
87
- foreach ($revisions as $revision) {
88
- wp_delete_post($revision->ID);
89
- }
90
- }
91
-
92
- // Pending Posts
93
- if ("pending" == $_POST['smbd_pending']) {
94
- $pendings = $wpdb->get_results($wpdb->prepare("select * from $wpdb->posts where post_status = 'pending'"));
95
-
96
- foreach ($pendings as $pending) {
97
- wp_delete_post($pending->ID);
98
- }
99
- }
100
-
101
- // Future Posts
102
- if ("future" == $_POST['smbd_future']) {
103
- $futures = $wpdb->get_results($wpdb->prepare("select * from $wpdb->posts where post_status = 'future'"));
104
-
105
- foreach ($futures as $future) {
106
- wp_delete_post($future->ID);
107
- }
108
- }
109
-
110
- // Pages
111
- if ("pages" == $_POST['smbd_pages']) {
112
- $pages = $wp_query->query(array('post_type'=>'page', 'nopaging'=>'true'));
113
-
114
- foreach ($pages as $page) {
115
- wp_delete_post($page->ID);
116
- }
117
- }
118
- break;
119
- }
120
-
121
- // hook the admin notices action
122
- add_action( 'admin_notices', 'smbd_deleted_notice', 9 );
123
- }
124
- }
125
- }
126
-
127
- /**
128
- * Show deleted notice messages
129
- */
130
- function smbd_deleted_notice() {
131
- echo "<div class = 'updated'><p>" . __("All the selected posts have been sucessfully deleted.") ."</p></div>";
132
- }
133
-
134
- /**
135
- * Show the Admin page
136
- */
137
- if (!function_exists('smbd_displayOptions')) {
138
- function smbd_displayOptions() {
139
- global $wpdb;
140
- ?>
141
- <div class="updated fade" style="background:#ff0;text-align:center;color: red;"><p><strong><?php _e("WARNING: Posts deleted once cannot be retrieved back. Use with caution."); ?></strong></p></div>
142
- <div class="wrap">
143
- <?php screen_icon(); ?>
144
- <h2>Bulk Delete</h2>
145
-
146
- <h3><?php _e("Select the posts which you want to delete"); ?></h3>
147
-
148
- <form name="smbd_form" id = "smbd_misc_form"
149
- action="<?php echo get_bloginfo("wpurl"); ?>/wp-admin/options-general.php?page=bulk-delete.php" method="post"
150
- onsubmit="return bd_validateForm(this);">
151
-
152
- <?php
153
- $wp_query = new WP_Query;
154
- $drafts = $wp_query->query(array('post_status'=>'draft'));
155
- $revisions = $wpdb->get_results($wpdb->prepare("select * from $wpdb->posts where post_type = 'revision'"));
156
- $pending = $wpdb->get_results($wpdb->prepare("select * from $wpdb->posts where post_status = 'pending'"));
157
- $future = $wpdb->get_results($wpdb->prepare("select * from $wpdb->posts where post_status = 'future'"));
158
- $pages = $wp_query->query(array('post_type'=>'page'));
159
- ?>
160
- <fieldset class="options">
161
- <table class="optiontable">
162
- <tr>
163
- <td scope="row" >
164
- <input name="smbd_drafs" id ="smbd_drafs" value = "drafs" type = "checkbox" />
165
- <label for="smbd_drafs"><?php echo _e("All Drafts"); ?> (<?php echo count($drafts) . " "; _e("Drafts"); ?>)</label>
166
- </td>
167
- </tr>
168
- <tr>
169
- <td>
170
- <input name="smbd_revisions" id ="smbd_revisions" value = "revisions" type = "checkbox" />
171
- <label for="smbd_revisions"><?php echo _e("All Revisions"); ?> (<?php echo count($revisions) . " "; _e("Revisons"); ?>)</label>
172
- </td>
173
- </tr>
174
- <tr>
175
- <td>
176
- <input name="smbd_pending" id ="smbd_pending" value = "pending" type = "checkbox" />
177
- <label for="smbd_pending"><?php echo _e("All Pending posts"); ?> (<?php echo count($pending) . " "; _e("Posts"); ?>)</label>
178
- </td>
179
- </tr>
180
- <tr>
181
- <td>
182
- <input name="smbd_future" id ="smbd_future" value = "future" type = "checkbox" />
183
- <label for="smbd_future"><?php echo _e("All scheduled posts"); ?> (<?php echo count($future) . " "; _e("Posts"); ?>)</label>
184
- </td>
185
- </tr>
186
- <tr>
187
- <td>
188
- <input name="smbd_pages" value = "pages" type = "checkbox" />
189
- <label for="smbd_pages"><?php echo _e("All Pages"); ?> (<?php echo count($pages) . " "; _e("Pages"); ?>)</label>
190
- </td>
191
- </tr>
192
-
193
- </table>
194
- </fieldset>
195
- <p class="submit">
196
- <input type="submit" name="submit" value="<?php _e("Bulk Delete ") ?>&raquo;">
197
- </p>
198
-
199
- <?php wp_nonce_field('bulk-delete-posts'); ?>
200
-
201
- <input type="hidden" name="smbd_action" value="bulk-delete-special" />
202
- </form>
203
-
204
- <h3><?php _e("By Category"); ?></h3>
205
- <h4><?php _e("Select the categories whose post you want to delete") ?></h4>
206
-
207
- <form name="smbd_form" id = "smbd_cat_form"
208
- action="<?php echo get_bloginfo("wpurl"); ?>/wp-admin/options-general.php?page=bulk-delete.php" method="post"
209
- onsubmit="return bd_validateForm(this);">
210
-
211
- <fieldset class="options">
212
- <table class="optiontable">
213
- <?php
214
- $categories = get_categories(array('hide_empty' => false));
215
- foreach ($categories as $category) {
216
- ?>
217
- <tr>
218
- <td scope="row" >
219
- <input name="smbd_cats[]" value = "<?php echo $category->cat_ID; ?>" type = "checkbox" />
220
- </td>
221
- <td>
222
- <label for="smbd_cats"><?php echo $category->cat_name; ?> (<?php echo $category->count . " "; _e("Posts"); ?>)</label>
223
- </td>
224
- </tr>
225
- <?php
226
- }
227
- ?>
228
- <tr>
229
- <td scope="row" >
230
- <input name="smbd_cats_all" id ="smbd_cats_all" value = "-1" type = "checkbox" onclick="bd_checkAll(document.getElementById('smbd_cat_form'));" />
231
- </td>
232
- <td>
233
- <label for="smbd_cats_all"><?php _e("All Categories") ?></label>
234
- </td>
235
- </tr>
236
- <tr>
237
- <td colspan="2"></td>
238
- </tr>
239
-
240
- <tr>
241
- <td scope="row">
242
- <input name="smbd_cats_restrict" id="smbd_cats_restrict" value = "true" type = "checkbox" onclick="toggle_date_restrict('cats');" />
243
- </td>
244
- <td>
245
- <?php _e("Only restrict to posts which are ");?>
246
- <select name="smbd_cats_op" id="smbd_cats_op" disabled>
247
- <option value ="<"><?php _e("older than");?></option>
248
- <option value =">"><?php _e("posted within last");?></option>
249
- </select>
250
- <input type ="textbox" name="smbd_cats_days" id="smbd_cats_days" disabled value ="0" maxlength="4" size="4" /><?php _e("days");?>
251
- </td>
252
- </tr>
253
-
254
- </table>
255
- </fieldset>
256
- <p class="submit">
257
- <input type="submit" name="submit" value="<?php _e("Bulk Delete ") ?>&raquo;">
258
- </p>
259
-
260
- <?php wp_nonce_field('bulk-delete-posts'); ?>
261
-
262
- <input type="hidden" name="smbd_action" value="bulk-delete-cats" />
263
- </form>
264
- <?php
265
- $tags = get_tags();
266
- if (count($tags) > 0) {
267
- ?>
268
- <h3><?php _e("By Tags"); ?></h3>
269
- <h4><?php _e("Select the tags whose post you want to delete") ?></h4>
270
-
271
- <form name="smbd_form" id = "smbd_tag_form"
272
- action="<?php echo get_bloginfo("wpurl"); ?>/wp-admin/options-general.php?page=bulk-delete.php" method="post"
273
- onsubmit="return bd_validateForm(this);">
274
-
275
- <fieldset class="options">
276
- <table class="optiontable">
277
- <?php
278
- foreach ($tags as $tag) {
279
- ?>
280
- <tr>
281
- <td scope="row" >
282
- <input name="smbd_tags[]" value = "<?php echo $tag->term_id; ?>" type = "checkbox" />
283
- </td>
284
- <td>
285
- <label for="smbd_tags"><?php echo $tag->name; ?> (<?php echo $tag->count . " "; _e("Posts"); ?>)</label>
286
- </td>
287
- </tr>
288
- <?php
289
- }
290
- ?>
291
- <tr>
292
- <td scope="row" >
293
- <input name="smbd_tags_all" id ="smbd_tags_all" value = "-1" type = "checkbox" onclick="bd_checkAll(document.getElementById('smbd_tag_form'));" />
294
- </td>
295
- <td>
296
- <label for="smbd_tags_all"><?php _e("All Tags") ?></label>
297
- </td>
298
- </tr>
299
-
300
- <tr>
301
- <td colspan="2"></td>
302
- </tr>
303
-
304
- <tr>
305
- <td scope="row">
306
- <input name="smbd_tags_restrict" id ="smbd_tags_restrict" value = "true" type = "checkbox" onclick="toggle_date_restrict('tags');" />
307
- </td>
308
- <td>
309
- <?php _e("Only restrict to posts which are ");?>
310
- <select name="smbd_tags_op" id="smbd_tags_op" disabled>
311
- <option value ="<"><?php _e("older than");?></option>
312
- <option value =">"><?php _e("posted within last");?></option>
313
- </select>
314
- <input type ="textbox" name="smbd_tags_days" id ="smbd_tags_days" value ="0" maxlength="4" size="4" disabled /><?php _e("days");?>
315
- </td>
316
- </tr>
317
-
318
- </table>
319
- </fieldset>
320
- <p class="submit">
321
- <input type="submit" name="submit" value="<?php _e("Bulk Delete ") ?>&raquo;">
322
- </p>
323
-
324
- <?php wp_nonce_field('bulk-delete-posts'); ?>
325
-
326
- <input type="hidden" name="smbd_action" value="bulk-delete-tags" />
327
- </form>
328
- <?php
329
- }
330
- ?>
331
- <p><em><?php _e("If you are looking to move posts in bulk, instead of deleting then try out my "); ?> <a href = "http://sudarmuthu.com/wordpress/bulk-move"><?php _e("Bulk Move Plugin");?></a>.</em></p>
332
- </div>
333
- <?php
334
-
335
- // Display credits in Footer
336
- add_action( 'in_admin_footer', 'smbd_admin_footer' );
337
- }
338
- }
339
-
340
- /**
341
- * Print JavaScript
342
- */
343
- function smbd_print_scripts() {
344
- ?>
345
- <script type="text/javascript">
346
-
347
- /**
348
- * Check All Checkboxes
349
- */
350
- function bd_checkAll(form) {
351
- for (i = 0, n = form.elements.length; i < n; i++) {
352
- if(form.elements[i].type == "checkbox" && !(form.elements[i].getAttribute('onclick',2))) {
353
- if(form.elements[i].checked == true)
354
- form.elements[i].checked = false;
355
- else
356
- form.elements[i].checked = true;
357
- }
358
- }
359
- }
360
-
361
- function toggle_date_restrict(el) {
362
- if (jQuery("#smbd_" + el + "_restrict").is(":checked")) {
363
- jQuery("#smbd_" + el + "_op").removeAttr('disabled');
364
- jQuery("#smbd_" + el + "_days").removeAttr('disabled');
365
- } else {
366
- jQuery("#smbd_" + el + "_op").attr('disabled', 'true');
367
- jQuery("#smbd_" + el + "_days").attr('disabled', 'true');
368
- }
369
- }
370
- /**
371
- * Validate Form
372
- */
373
- function bd_validateForm(form) {
374
- var valid = false;
375
- for (i = 0, n = form.elements.length; i < n; i++) {
376
- if(form.elements[i].type == "checkbox" && !(form.elements[i].getAttribute('onclick',2))) {
377
- if(form.elements[i].checked == true) {
378
- valid = true;
379
- break;
380
- }
381
- }
382
- }
383
-
384
- if (valid) {
385
- return confirm("<?php _e('Are you sure you want to delete all the selected posts'); ?>");
386
- } else {
387
- alert ("<?php _e('Please select atleast one'); ?>");
388
- return false;
389
- }
390
- }
391
- </script>
392
- <?php
393
- }
394
-
395
- /**
396
- * function to filter posts by days
397
- * @param <type> $where
398
- * @return <type>
399
- */
400
- function cats_by_days ($where = '') {
401
- $cats_op = get_option('cats_op');
402
- $cats_days = get_option('cats_days');
403
- remove_filter('posts_where', 'cats_by_days');
404
-
405
- $where .= " AND post_date $cats_op '" . date('y-m-d', strtotime("-$cats_days days")) . "'";
406
- return $where;
407
- }
408
-
409
- /**
410
- * function to filter posts by days
411
- * @param <type> $where
412
- * @return <type>
413
- */
414
- function tags_by_days ($where = '') {
415
- $tags_op = get_option('tags_op');
416
- $tags_days = get_option('tags_days');
417
-
418
- remove_filter('posts_where', 'tags_by_days');
419
- $where .= " AND post_date $tags_op '" . date('y-m-d', strtotime("-$tags_days days")) . "'";
420
- return $where;
421
- }
422
-
423
- /**
424
- * Add navigation menu
425
- */
426
- if(!function_exists('smbd_add_menu')) {
427
- function smbd_add_menu() {
428
- //Add a submenu to Manage
429
- add_options_page("Bulk Delete", "Bulk Delete", 8, basename(__FILE__), "smbd_displayOptions");
430
- }
431
- }
432
-
433
- /**
434
- * Adds the settings link in the Plugin page. Based on http://striderweb.com/nerdaphernalia/2008/06/wp-use-action-links/
435
- * @staticvar <type> $this_plugin
436
- * @param <type> $links
437
- * @param <type> $file
438
- */
439
- function smbd_filter_plugin_actions($links, $file) {
440
- static $this_plugin;
441
- if( ! $this_plugin ) $this_plugin = plugin_basename(__FILE__);
442
-
443
- if( $file == $this_plugin ) {
444
- $settings_link = '<a href="options-general.php?page=bulk-delete.php">' . _('Manage') . '</a>';
445
- array_unshift( $links, $settings_link ); // before other links
446
- }
447
- return $links;
448
- }
449
-
450
- /**
451
- * Adds Footer links. Based on http://striderweb.com/nerdaphernalia/2008/06/give-your-wordpress-plugin-credit/
452
- */
453
- function smbd_admin_footer() {
454
- $plugin_data = get_plugin_data( __FILE__ );
455
- printf('%1$s ' . __("plugin") .' | ' . __("Version") . ' %2$s | '. __('by') . ' %3$s<br />', $plugin_data['Title'], $plugin_data['Version'], $plugin_data['Author']);
456
- }
457
-
458
- add_filter( 'plugin_action_links', 'smbd_filter_plugin_actions', 10, 2 );
459
-
460
- add_action('admin_menu', 'smbd_add_menu');
461
- add_action('init', 'smbd_request_handler');
462
- add_action('admin_head', 'smbd_print_scripts');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
463
  ?>
1
+ <?php
2
+ /*
3
+ Plugin Name: Bulk Delete
4
+ Plugin Script: bulk-delete.php
5
+ Plugin URI: http://sudarmuthu.com/wordpress/bulk-delete
6
+ Description: Bulk delete posts from selected categories or tags. Use it with caution.
7
+ Version: 0.7
8
+ License: GPL
9
+ Author: Sudar
10
+ Author URI: http://sudarmuthu.com/
11
+ Text Domain: bulk-delete
12
+
13
+ === RELEASE NOTES ===
14
+ 2009-02-02 - v0.1 - first version
15
+ 2009-02-03 - v0.2 - Second release - Fixed issues with pagging
16
+ 2009-04-05 - v0.3 - Third release - Prevented drafts from deleted when only posts are selected
17
+ 2009-07-05 - v0.4 - Fourth release - Added option to delete by date.
18
+ 2009-07-21 - v0.5 - Fifth release - Added option to delete all pending posts.
19
+ 2009-07-22 - v0.6 - Sixth release - Added option to delete all scheduled posts.
20
+ 2010-02-21 - v0.7 - Added an option to delete posts directly or send them to trash and support for translation.
21
+
22
+ /* Copyright 2009 Sudar Muthu (email : sudar@sudarmuthu.com)
23
+
24
+ This program is free software; you can redistribute it and/or modify
25
+ it under the terms of the GNU General Public License, version 2, as
26
+ published by the Free Software Foundation.
27
+
28
+ This program is distributed in the hope that it will be useful,
29
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
30
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31
+ GNU General Public License for more details.
32
+
33
+ You should have received a copy of the GNU General Public License
34
+ along with this program; if not, write to the Free Software
35
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
36
+ */
37
+
38
+ /**
39
+ * Request Handler
40
+ */
41
+
42
+ if (!function_exists('smbd_request_handler')) {
43
+ function smbd_request_handler() {
44
+ global $wpdb;
45
+
46
+ if (isset($_POST['smbd_action'])) {
47
+
48
+ $wp_query = new WP_Query;
49
+ check_admin_referer( 'bulk-delete-posts');
50
+
51
+ switch($_POST['smbd_action']) {
52
+
53
+ case "bulk-delete-cats":
54
+ // delete by cats
55
+ $selected_cats = $_POST['smbd_cats'];
56
+ if ($_POST['smbd_cats_restrict'] == "true") {
57
+
58
+ add_option('cats_op', $_POST['smbd_cats_op']);
59
+ add_option('cats_days', $_POST['smbd_cats_days']);
60
+
61
+ add_filter ('posts_where', 'cats_by_days');
62
+ }
63
+ $options = array('category__in'=>$selected_cats,'post_status'=>'publish', 'post_type'=>'post');
64
+
65
+ $limit_to = absint($_POST['smbd_cats_limits_to']);
66
+
67
+ if ($limit_to > 0) {
68
+ $options['showposts'] = $limit_to;
69
+ } else {
70
+ $options['nopaging'] = 'true';
71
+ }
72
+
73
+ $force_delete = $_POST['smbd_cats_force_delete'];
74
+
75
+ if ($force_delete == 'true') {
76
+ $force_delete = true;
77
+ } else {
78
+ $force_delete = false;
79
+ }
80
+
81
+ $posts = $wp_query->query($options);
82
+ foreach ($posts as $post) {
83
+ wp_delete_post($post->ID, $force_delete);
84
+ }
85
+
86
+ break;
87
+
88
+ case "bulk-delete-tags":
89
+ // delete by tags
90
+ $selected_tags = $_POST['smbd_tags'];
91
+ if ($_POST['smbd_tags_restrict'] == "true") {
92
+
93
+ add_option('tags_op', $_POST['smbd_tags_op']);
94
+ add_option('tags_days', $_POST['smbd_tags_days']);
95
+
96
+ add_filter ('posts_where', 'tags_by_days');
97
+ }
98
+ $options = array('tag__in'=>$selected_tags,'post_status'=>'publish', 'post_type'=>'post');
99
+
100
+ $limit_to = absint($_POST['smbd_tags_limits_to']);
101
+
102
+ if ($limit_to > 0) {
103
+ $options['showposts'] = $limit_to;
104
+ } else {
105
+ $options['nopaging'] = 'true';
106
+ }
107
+
108
+ $force_delete = $_POST['smbd_tags_force_delete'];
109
+
110
+ if ($force_delete == 'true') {
111
+ $force_delete = true;
112
+ } else {
113
+ $force_delete = false;
114
+ }
115
+
116
+ $posts = $wp_query->query($options);
117
+
118
+ foreach ($posts as $post) {
119
+ wp_delete_post($post->ID, $force_delete);
120
+ }
121
+
122
+ break;
123
+
124
+ case "bulk-delete-special":
125
+ $options = array();
126
+
127
+ $limit_to = absint($_POST['smbd_cats_limits_to']);
128
+
129
+ if ($limit_to > 0) {
130
+ $options['showposts'] = $limit_to;
131
+ } else {
132
+ $options['nopaging'] = 'true';
133
+ }
134
+
135
+ $force_delete = $_POST['smbd_special_force_delete'];
136
+ if ($force_delete == 'true') {
137
+ $force_delete = true;
138
+ } else {
139
+ $force_delete = false;
140
+ }
141
+
142
+ // Drafts
143
+ if ("drafs" == $_POST['smbd_drafs']) {
144
+ $options['post_status'] = 'draft';
145
+ $drafts = $wp_query->query($options);
146
+
147
+ foreach ($drafts as $draft) {
148
+ wp_delete_post($draft->ID, $force_delete);
149
+ }
150
+ }
151
+
152
+ // Revisions
153
+ if ("revisions" == $_POST['smbd_revisions']) {
154
+ $revisions = $wpdb->get_results($wpdb->prepare("select * from $wpdb->posts where post_type = 'revision'"));
155
+
156
+ foreach ($revisions as $revision) {
157
+ wp_delete_post($revision->ID, $force_delete);
158
+ }
159
+ }
160
+
161
+ // Pending Posts
162
+ if ("pending" == $_POST['smbd_pending']) {
163
+ $pendings = $wpdb->get_results($wpdb->prepare("select * from $wpdb->posts where post_status = 'pending'"));
164
+
165
+ foreach ($pendings as $pending) {
166
+ wp_delete_post($pending->ID, $force_delete);
167
+ }
168
+ }
169
+
170
+ // Future Posts
171
+ if ("future" == $_POST['smbd_future']) {
172
+ $futures = $wpdb->get_results($wpdb->prepare("select * from $wpdb->posts where post_status = 'future'"));
173
+
174
+ foreach ($futures as $future) {
175
+ wp_delete_post($future->ID, $force_delete);
176
+ }
177
+ }
178
+
179
+ // Pages
180
+ if ("pages" == $_POST['smbd_pages']) {
181
+ $options['post_type'] = 'page';
182
+ $pages = $wp_query->query($options);
183
+
184
+ foreach ($pages as $page) {
185
+ wp_delete_post($page->ID, $force_delete);
186
+ }
187
+ }
188
+ break;
189
+ }
190
+
191
+ // hook the admin notices action
192
+ add_action( 'admin_notices', 'smbd_deleted_notice', 9 );
193
+ }
194
+ }
195
+ }
196
+
197
+ /**
198
+ * Show deleted notice messages
199
+ */
200
+ function smbd_deleted_notice() {
201
+ echo "<div class = 'updated'><p>" . __("All the selected posts have been sucessfully deleted.", 'bulk-delete') . "</p></div>";
202
+ }
203
+
204
+ /**
205
+ * Show the Admin page
206
+ */
207
+ if (!function_exists('smbd_displayOptions')) {
208
+ function smbd_displayOptions() {
209
+ global $wpdb;
210
+ ?>
211
+ <div class="updated fade" style="background:#ff0;text-align:center;color: red;"><p><strong><?php _e("WARNING: Posts deleted once cannot be retrieved back. Use with caution.", 'bulk-delete'); ?></strong></p></div>
212
+ <div class="wrap">
213
+ <?php screen_icon(); ?>
214
+ <h2>Bulk Delete</h2>
215
+
216
+ <h3><?php _e("Select the posts which you want to delete", 'bulk-delete'); ?></h3>
217
+
218
+ <form name="smbd_form" id = "smbd_misc_form"
219
+ action="<?php echo get_bloginfo("wpurl"); ?>/wp-admin/options-general.php?page=bulk-delete.php" method="post"
220
+ onsubmit="return bd_validateForm(this);">
221
+
222
+ <?php
223
+ $wp_query = new WP_Query;
224
+ $drafts = $wp_query->query(array('post_status'=>'draft'));
225
+ $revisions = $wpdb->get_results($wpdb->prepare("select * from $wpdb->posts where post_type = 'revision'"));
226
+ $pending = $wpdb->get_results($wpdb->prepare("select * from $wpdb->posts where post_status = 'pending'"));
227
+ $future = $wpdb->get_results($wpdb->prepare("select * from $wpdb->posts where post_status = 'future'"));
228
+ $pages = $wp_query->query(array('post_type'=>'page'));
229
+ ?>
230
+ <fieldset class="options">
231
+ <table class="optiontable">
232
+ <tr>
233
+ <td scope="row" >
234
+ <input name="smbd_drafs" id ="smbd_drafs" value = "drafs" type = "checkbox" />
235
+ <label for="smbd_drafs"><?php echo _e("All Drafts", 'bulk-delete'); ?> (<?php echo count($drafts) . " "; _e("Drafts", 'bulk-delete'); ?>)</label>
236
+ </td>
237
+ </tr>
238
+ <tr>
239
+ <td>
240
+ <input name="smbd_revisions" id ="smbd_revisions" value = "revisions" type = "checkbox" />
241
+ <label for="smbd_revisions"><?php echo _e("All Revisions", 'bulk-delete'); ?> (<?php echo count($revisions) . " "; _e("Revisons", 'bulk-delete'); ?>)</label>
242
+ </td>
243
+ </tr>
244
+ <tr>
245
+ <td>
246
+ <input name="smbd_pending" id ="smbd_pending" value = "pending" type = "checkbox" />
247
+ <label for="smbd_pending"><?php echo _e("All Pending posts", 'bulk-delete'); ?> (<?php echo count($pending) . " "; _e("Posts", 'bulk-delete'); ?>)</label>
248
+ </td>
249
+ </tr>
250
+ <tr>
251
+ <td>
252
+ <input name="smbd_future" id ="smbd_future" value = "future" type = "checkbox" />
253
+ <label for="smbd_future"><?php echo _e("All scheduled posts", 'bulk-delete'); ?> (<?php echo count($future) . " "; _e("Posts", 'bulk-delete'); ?>)</label>
254
+ </td>
255
+ </tr>
256
+ <tr>
257
+ <td>
258
+ <input name="smbd_pages" value = "pages" type = "checkbox" />
259
+ <label for="smbd_pages"><?php echo _e("All Pages", 'bulk-delete'); ?> (<?php echo count($pages) . " "; _e("Pages", 'bulk-delete'); ?>)</label>
260
+ </td>
261
+ </tr>
262
+
263
+ <tr>
264
+ <td scope="row">
265
+ <input name="smbd_special_force_delete" value = "false" type = "radio" checked="checked" /> <?php _e('Move to Trash', 'bulk-delete'); ?>
266
+ <input name="smbd_special_force_delete" value = "true" type = "radio" /> <?php _e('Delete permanently', 'bulk-delete'); ?>
267
+ </td>
268
+ </tr>
269
+
270
+ <tr>
271
+ <td scope="row">
272
+ <input name="smbd_special_limit" id="smbd_special_limit" value = "true" type = "checkbox" onclick="toggle_limit_restrict('special');" />
273
+ <?php _e("Only delete first ", 'bulk-delete');?>
274
+ <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');?>
275
+ <?php _e("Use this option if there are more than 1000 posts and the script timesout.", 'bulk-delete') ?>
276
+ </td>
277
+ </tr>
278
+
279
+ </table>
280
+ </fieldset>
281
+ <p class="submit">
282
+ <input type="submit" name="submit" value="<?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;">
283
+ </p>
284
+
285
+ <?php wp_nonce_field('bulk-delete-posts'); ?>
286
+
287
+ <input type="hidden" name="smbd_action" value="bulk-delete-special" />
288
+ </form>
289
+
290
+ <h3><?php _e("By Category", 'bulk-delete'); ?></h3>
291
+ <h4><?php _e("Select the categories whose post you want to delete", 'bulk-delete'); ?></h4>
292
+
293
+ <form name="smbd_form" id = "smbd_cat_form"
294
+ action="<?php echo get_bloginfo("wpurl"); ?>/wp-admin/options-general.php?page=bulk-delete.php" method="post"
295
+ onsubmit="return bd_validateForm(this);">
296
+
297
+ <fieldset class="options">
298
+ <table class="optiontable">
299
+ <?php
300
+ $categories = get_categories(array('hide_empty' => false));
301
+ foreach ($categories as $category) {
302
+ ?>
303
+ <tr>
304
+ <td scope="row" >
305
+ <input name="smbd_cats[]" value = "<?php echo $category->cat_ID; ?>" type = "checkbox" />
306
+ </td>
307
+ <td>
308
+ <label for="smbd_cats"><?php echo $category->cat_name; ?> (<?php echo $category->count . " "; _e("Posts", 'bulk-delete'); ?>)</label>
309
+ </td>
310
+ </tr>
311
+ <?php
312
+ }
313
+ ?>
314
+ <tr>
315
+ <td scope="row" >
316
+ <input name="smbd_cats_all" id ="smbd_cats_all" value = "-1" type = "checkbox" onclick="bd_checkAll(document.getElementById('smbd_cat_form'));" />
317
+ </td>
318
+ <td>
319
+ <label for="smbd_cats_all"><?php _e("All Categories", 'bulk-delete') ?></label>
320
+ </td>
321
+ </tr>
322
+ <tr>
323
+ <td colspan="2"></td>
324
+ </tr>
325
+
326
+ <tr>
327
+ <td scope="row">
328
+ <input name="smbd_cats_restrict" id="smbd_cats_restrict" value = "true" type = "checkbox" onclick="toggle_date_restrict('cats');" />
329
+ </td>
330
+ <td>
331
+ <?php _e("Only restrict to posts which are ", 'bulk-delete');?>
332
+ <select name="smbd_cats_op" id="smbd_cats_op" disabled>
333
+ <option value ="<"><?php _e("older than", 'bulk-delete');?></option>
334
+ <option value =">"><?php _e("posted within last", 'bulk-delete');?></option>
335
+ </select>
336
+ <input type ="textbox" name="smbd_cats_days" id="smbd_cats_days" disabled value ="0" maxlength="4" size="4" /><?php _e("days", 'bulk-delete');?>
337
+ </td>
338
+ </tr>
339
+
340
+ <tr>
341
+ <td scope="row" colspan="2">
342
+ <input name="smbd_cats_force_delete" value = "false" type = "radio" checked="checked" /> <?php _e('Move to Trash', 'bulk-delete'); ?>
343
+ <input name="smbd_cats_force_delete" value = "true" type = "radio" /> <?php _e('Delete permanently', 'bulk-delete'); ?>
344
+ </td>
345
+ </tr>
346
+
347
+ <tr>
348
+ <td scope="row">
349
+ <input name="smbd_cats_limit" id="smbd_cats_limit" value = "true" type = "checkbox" onclick="toggle_limit_restrict('cats');" />
350
+ </td>
351
+ <td>
352
+ <?php _e("Only delete first ", 'bulk-delete');?>
353
+ <input type ="textbox" name="smbd_cats_limit_to" id="smbd_cats_limit_to" disabled value ="0" maxlength="4" size="4" /><?php _e("posts.", 'bulk-delete');?>
354
+ <?php _e("Use this option if there are more than 1000 posts and the script timesout.", 'bulk-delete') ?>
355
+ </td>
356
+ </tr>
357
+
358
+ </table>
359
+ </fieldset>
360
+ <p class="submit">
361
+ <input type="submit" name="submit" value="<?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;">
362
+ </p>
363
+
364
+ <?php wp_nonce_field('bulk-delete-posts'); ?>
365
+
366
+ <input type="hidden" name="smbd_action" value="bulk-delete-cats" />
367
+ </form>
368
+ <?php
369
+ $tags = get_tags();
370
+ if (count($tags) > 0) {
371
+ ?>
372
+ <h3><?php _e("By Tags", 'bulk-delete'); ?></h3>
373
+ <h4><?php _e("Select the tags whose post you want to delete", 'bulk-delete') ?></h4>
374
+
375
+ <form name="smbd_form" id = "smbd_tag_form"
376
+ action="<?php echo get_bloginfo("wpurl"); ?>/wp-admin/options-general.php?page=bulk-delete.php" method="post"
377
+ onsubmit="return bd_validateForm(this);">
378
+
379
+ <fieldset class="options">
380
+ <table class="optiontable">
381
+ <?php
382
+ foreach ($tags as $tag) {
383
+ ?>
384
+ <tr>
385
+ <td scope="row" >
386
+ <input name="smbd_tags[]" value = "<?php echo $tag->term_id; ?>" type = "checkbox" />
387
+ </td>
388
+ <td>
389
+ <label for="smbd_tags"><?php echo $tag->name; ?> (<?php echo $tag->count . " "; _e("Posts", 'bulk-delete'); ?>)</label>
390
+ </td>
391
+ </tr>
392
+ <?php
393
+ }
394
+ ?>
395
+ <tr>
396
+ <td scope="row" >
397
+ <input name="smbd_tags_all" id ="smbd_tags_all" value = "-1" type = "checkbox" onclick="bd_checkAll(document.getElementById('smbd_tag_form'));" />
398
+ </td>
399
+ <td>
400
+ <label for="smbd_tags_all"><?php _e("All Tags", 'bulk-delete') ?></label>
401
+ </td>
402
+ </tr>
403
+
404
+ <tr>
405
+ <td colspan="2"></td>
406
+ </tr>
407
+
408
+ <tr>
409
+ <td scope="row">
410
+ <input name="smbd_tags_restrict" id ="smbd_tags_restrict" value = "true" type = "checkbox" onclick="toggle_date_restrict('tags');" />
411
+ </td>
412
+ <td>
413
+ <?php _e("Only restrict to posts which are ", 'bulk-delete');?>
414
+ <select name="smbd_tags_op" id="smbd_tags_op" disabled>
415
+ <option value ="<"><?php _e("older than", 'bulk-delete');?></option>
416
+ <option value =">"><?php _e("posted within last", 'bulk-delete');?></option>
417
+ </select>
418
+ <input type ="textbox" name="smbd_tags_days" id ="smbd_tags_days" value ="0" maxlength="4" size="4" disabled /><?php _e("days", 'bulk-delete');?>
419
+ </td>
420
+ </tr>
421
+
422
+ <tr>
423
+ <td scope="row" colspan="2">
424
+ <input name="smbd_tags_force_delete" value = "false" type = "radio" checked="checked" /> <?php _e('Move to Trash', 'bulk-delete'); ?>
425
+ <input name="smbd_tags_force_delete" value = "true" type = "radio" /> <?php _e('Delete permanently', 'bulk-delete'); ?>
426
+ </td>
427
+ </tr>
428
+
429
+ <tr>
430
+ <td scope="row">
431
+ <input name="smbd_tags_limit" id="smbd_tags_limit" value = "true" type = "checkbox" onclick="toggle_limit_restrict('tags');" />
432
+ </td>
433
+ <td>
434
+ <?php _e("Only delete first ", 'bulk-delete');?>
435
+ <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');?>
436
+ <?php _e("Use this option if there are more than 1000 posts and the script timesout.", 'bulk-delete') ?>
437
+ </td>
438
+ </tr>
439
+
440
+ </table>
441
+ </fieldset>
442
+ <p class="submit">
443
+ <input type="submit" name="submit" value="<?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;">
444
+ </p>
445
+
446
+ <?php wp_nonce_field('bulk-delete-posts'); ?>
447
+
448
+ <input type="hidden" name="smbd_action" value="bulk-delete-tags" />
449
+ </form>
450
+ <?php
451
+ }
452
+ ?>
453
+ <p><em><?php _e("If you are looking to move posts in bulk, instead of deleting then try out my ", 'bulk-delete'); ?> <a href = "http://sudarmuthu.com/wordpress/bulk-move"><?php _e("Bulk Move Plugin", 'bulk-delete');?></a>.</em></p>
454
+ </div>
455
+ <?php
456
+
457
+ // Display credits in Footer
458
+ add_action( 'in_admin_footer', 'smbd_admin_footer' );
459
+ }
460
+ }
461
+
462
+ /**
463
+ * Print JavaScript
464
+ */
465
+ function smbd_print_scripts() {
466
+ ?>
467
+ <script type="text/javascript">
468
+
469
+ /**
470
+ * Check All Checkboxes
471
+ */
472
+ function bd_checkAll(form) {
473
+ for (i = 0, n = form.elements.length; i < n; i++) {
474
+ if(form.elements[i].type == "checkbox" && !(form.elements[i].getAttribute('onclick',2))) {
475
+ if(form.elements[i].checked == true)
476
+ form.elements[i].checked = false;
477
+ else
478
+ form.elements[i].checked = true;
479
+ }
480
+ }
481
+ }
482
+
483
+ function toggle_date_restrict(el) {
484
+ if (jQuery("#smbd_" + el + "_restrict").is(":checked")) {
485
+ jQuery("#smbd_" + el + "_op").removeAttr('disabled');
486
+ jQuery("#smbd_" + el + "_days").removeAttr('disabled');
487
+ } else {
488
+ jQuery("#smbd_" + el + "_op").attr('disabled', 'true');
489
+ jQuery("#smbd_" + el + "_days").attr('disabled', 'true');
490
+ }
491
+ }
492
+
493
+ function toggle_limit_restrict(el) {
494
+ if (jQuery("#smbd_" + el + "_limit").is(":checked")) {
495
+ jQuery("#smbd_" + el + "_limit_to").removeAttr('disabled');
496
+ } else {
497
+ jQuery("#smbd_" + el + "_limit_to").attr('disabled', 'true');
498
+ }
499
+ }
500
+ /**
501
+ * Validate Form
502
+ */
503
+ function bd_validateForm(form) {
504
+ var valid = false;
505
+ for (i = 0, n = form.elements.length; i < n; i++) {
506
+ if(form.elements[i].type == "checkbox" && !(form.elements[i].getAttribute('onclick',2))) {
507
+ if(form.elements[i].checked == true) {
508
+ valid = true;
509
+ break;
510
+ }
511
+ }
512
+ }
513
+
514
+ if (valid) {
515
+ return confirm("<?php _e('Are you sure you want to delete all the selected posts', 'bulk-delete'); ?>");
516
+ } else {
517
+ alert ("<?php _e('Please select atleast one', 'bulk-delete'); ?>");
518
+ return false;
519
+ }
520
+ }
521
+ </script>
522
+ <?php
523
+ }
524
+
525
+ /**
526
+ * function to filter posts by days
527
+ * @param <type> $where
528
+ * @return <type>
529
+ */
530
+ function cats_by_days ($where = '') {
531
+ $cats_op = get_option('cats_op');
532
+ $cats_days = get_option('cats_days');
533
+ remove_filter('posts_where', 'cats_by_days');
534
+
535
+ $where .= " AND post_date $cats_op '" . date('y-m-d', strtotime("-$cats_days days")) . "'";
536
+ return $where;
537
+ }
538
+
539
+ /**
540
+ * function to filter posts by days
541
+ * @param <type> $where
542
+ * @return <type>
543
+ */
544
+ function tags_by_days ($where = '') {
545
+ $tags_op = get_option('tags_op');
546
+ $tags_days = get_option('tags_days');
547
+
548
+ remove_filter('posts_where', 'tags_by_days');
549
+ $where .= " AND post_date $tags_op '" . date('y-m-d', strtotime("-$tags_days days")) . "'";
550
+ return $where;
551
+ }
552
+
553
+ /**
554
+ * Add navigation menu
555
+ */
556
+ if(!function_exists('smbd_add_menu')) {
557
+ function smbd_add_menu() {
558
+ //Add a submenu to Manage
559
+ $page = add_options_page("Bulk Delete", "Bulk Delete", 8, basename(__FILE__), "smbd_displayOptions");
560
+ add_action('admin_print_scripts-' . $page, 'smbd_print_scripts');
561
+ }
562
+ }
563
+
564
+ /**
565
+ * Adds the settings link in the Plugin page. Based on http://striderweb.com/nerdaphernalia/2008/06/wp-use-action-links/
566
+ * @staticvar <type> $this_plugin
567
+ * @param <type> $links
568
+ * @param <type> $file
569
+ */
570
+ function smbd_filter_plugin_actions($links, $file) {
571
+ static $this_plugin;
572
+ if( ! $this_plugin ) $this_plugin = plugin_basename(__FILE__);
573
+
574
+ if( $file == $this_plugin ) {
575
+ $settings_link = '<a href="options-general.php?page=bulk-delete.php">' . _('Manage') . '</a>';
576
+ array_unshift( $links, $settings_link ); // before other links
577
+ }
578
+ return $links;
579
+ }
580
+
581
+ /**
582
+ * Adds Footer links. Based on http://striderweb.com/nerdaphernalia/2008/06/give-your-wordpress-plugin-credit/
583
+ */
584
+ function smbd_admin_footer() {
585
+ $plugin_data = get_plugin_data( __FILE__ );
586
+ printf('%1$s ' . __("plugin", 'bulk-delete') .' | ' . __("Version", 'bulk-delete') . ' %2$s | '. __('by', 'bulk-delete') . ' %3$s<br />', $plugin_data['Title'], $plugin_data['Version'], $plugin_data['Author']);
587
+ }
588
+
589
+ add_filter( 'plugin_action_links', 'smbd_filter_plugin_actions', 10, 2 );
590
+ add_action('admin_menu', 'smbd_add_menu');
591
+ add_action('init', 'smbd_request_handler');
592
  ?>
languages/bulk-delete.pot ADDED
@@ -0,0 +1,186 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of the WordPress plugin Bulk Delete 0.7 by Sudar.
2
+ # Copyright (C) 2010 Sudar
3
+ # This file is distributed under the same license as the Bulk Delete package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: Bulk Delete 0.7\n"
10
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/bulk-delete\n"
11
+ "POT-Creation-Date: 2010-02-27 11:19+0000\n"
12
+ "PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "MIME-Version: 1.0\n"
16
+ "Content-Type: text/plain; charset=utf-8\n"
17
+ "Content-Transfer-Encoding: 8bit\n"
18
+
19
+ #: bulk-delete.php:200
20
+ msgid "All the selected posts have been sucessfully deleted."
21
+ msgstr ""
22
+
23
+ #: bulk-delete.php:210
24
+ msgid "WARNING: Posts deleted once cannot be retrieved back. Use with caution."
25
+ msgstr ""
26
+
27
+ #: bulk-delete.php:215
28
+ msgid "Select the posts which you want to delete"
29
+ msgstr ""
30
+
31
+ #: bulk-delete.php:234
32
+ msgid "All Drafts"
33
+ msgstr ""
34
+
35
+ #: bulk-delete.php:234
36
+ msgid "Drafts"
37
+ msgstr ""
38
+
39
+ #: bulk-delete.php:240
40
+ msgid "All Revisions"
41
+ msgstr ""
42
+
43
+ #: bulk-delete.php:240
44
+ msgid "Revisons"
45
+ msgstr ""
46
+
47
+ #: bulk-delete.php:246
48
+ msgid "All Pending posts"
49
+ msgstr ""
50
+
51
+ #: bulk-delete.php:246 bulk-delete.php:252 bulk-delete.php:307
52
+ #: bulk-delete.php:388
53
+ msgid "Posts"
54
+ msgstr ""
55
+
56
+ #: bulk-delete.php:252
57
+ msgid "All scheduled posts"
58
+ msgstr ""
59
+
60
+ #: bulk-delete.php:258
61
+ msgid "All Pages"
62
+ msgstr ""
63
+
64
+ #: bulk-delete.php:258
65
+ msgid "Pages"
66
+ msgstr ""
67
+
68
+ #: bulk-delete.php:264 bulk-delete.php:341 bulk-delete.php:423
69
+ msgid "Move to Trash"
70
+ msgstr ""
71
+
72
+ #: bulk-delete.php:265 bulk-delete.php:342 bulk-delete.php:424
73
+ msgid "Delete permanently"
74
+ msgstr ""
75
+
76
+ #: bulk-delete.php:272 bulk-delete.php:351 bulk-delete.php:433
77
+ msgid "Only delete first "
78
+ msgstr ""
79
+
80
+ #: bulk-delete.php:273 bulk-delete.php:352 bulk-delete.php:434
81
+ msgid "posts."
82
+ msgstr ""
83
+
84
+ #: bulk-delete.php:274 bulk-delete.php:353 bulk-delete.php:435
85
+ msgid ""
86
+ "Use this option if there are more than 1000 posts and the script timesout."
87
+ msgstr ""
88
+
89
+ #: bulk-delete.php:281 bulk-delete.php:360 bulk-delete.php:442
90
+ msgid "Bulk Delete "
91
+ msgstr ""
92
+
93
+ #: bulk-delete.php:289
94
+ msgid "By Category"
95
+ msgstr ""
96
+
97
+ #: bulk-delete.php:290
98
+ msgid "Select the categories whose post you want to delete"
99
+ msgstr ""
100
+
101
+ #: bulk-delete.php:318
102
+ msgid "All Categories"
103
+ msgstr ""
104
+
105
+ #: bulk-delete.php:330 bulk-delete.php:412
106
+ msgid "Only restrict to posts which are "
107
+ msgstr ""
108
+
109
+ #: bulk-delete.php:332 bulk-delete.php:414
110
+ msgid "older than"
111
+ msgstr ""
112
+
113
+ #: bulk-delete.php:333 bulk-delete.php:415
114
+ msgid "posted within last"
115
+ msgstr ""
116
+
117
+ #: bulk-delete.php:335 bulk-delete.php:417
118
+ msgid "days"
119
+ msgstr ""
120
+
121
+ #: bulk-delete.php:371
122
+ msgid "By Tags"
123
+ msgstr ""
124
+
125
+ #: bulk-delete.php:372
126
+ msgid "Select the tags whose post you want to delete"
127
+ msgstr ""
128
+
129
+ #: bulk-delete.php:399
130
+ msgid "All Tags"
131
+ msgstr ""
132
+
133
+ #: bulk-delete.php:452
134
+ msgid ""
135
+ "If you are looking to move posts in bulk, instead of deleting then try out "
136
+ "my "
137
+ msgstr ""
138
+
139
+ #: bulk-delete.php:452
140
+ msgid "Bulk Move Plugin"
141
+ msgstr ""
142
+
143
+ #: bulk-delete.php:514
144
+ msgid "Are you sure you want to delete all the selected posts"
145
+ msgstr ""
146
+
147
+ #: bulk-delete.php:516
148
+ msgid "Please select atleast one"
149
+ msgstr ""
150
+
151
+ #: bulk-delete.php:574
152
+ msgid "Manage"
153
+ msgstr ""
154
+
155
+ #: bulk-delete.php:585
156
+ msgid "plugin"
157
+ msgstr ""
158
+
159
+ #: bulk-delete.php:585
160
+ msgid "Version"
161
+ msgstr ""
162
+
163
+ #: bulk-delete.php:585
164
+ msgid "by"
165
+ msgstr ""
166
+
167
+ #. Plugin Name of an extension
168
+ msgid "Bulk Delete"
169
+ msgstr ""
170
+
171
+ #. Plugin URI of an extension
172
+ msgid "http://sudarmuthu.com/wordpress/bulk-delete"
173
+ msgstr ""
174
+
175
+ #. Description of an extension
176
+ msgid ""
177
+ "Bulk delete posts from selected categories or tags. Use it with caution."
178
+ msgstr ""
179
+
180
+ #. Author of an extension
181
+ msgid "Sudar"
182
+ msgstr ""
183
+
184
+ #. Author URI of an extension
185
+ msgid "http://sudarmuthu.com/"
186
+ msgstr ""
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: sudar
3
  Tags: post, comment, delete, bulk, draft, revision, page
4
  Requires at least: 2.0
5
- Tested up to: 2.8.2
6
- Stable tag: 0.6
7
 
8
  Bulk delete posts from selected categories or tags
9
 
@@ -46,6 +46,10 @@ Extract the zip file and just drop the contents in the wp-content/plugins/ direc
46
  ###v0.6 (2009-07-22)
47
  * Added option to delete all scheduled posts.
48
 
 
 
 
 
49
  ==Readme Generator==
50
 
51
- This Readme file was generated using <a href = 'http://sudarmuthu.com/projects/wp-readme.php'>wp-readme</a>, which generates readme files for WordPress Plugins.
2
  Contributors: sudar
3
  Tags: post, comment, delete, bulk, draft, revision, page
4
  Requires at least: 2.0
5
+ Tested up to: 2.9.2
6
+ Stable tag: 0.7
7
 
8
  Bulk delete posts from selected categories or tags
9
 
46
  ###v0.6 (2009-07-22)
47
  * Added option to delete all scheduled posts.
48
 
49
+ ###v0.7 (2010-02-21)
50
+ * Added an option to delete posts directly or send them to trash.
51
+ * Added support for translation.
52
+
53
  ==Readme Generator==
54
 
55
+ This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.