Bulk Delete - Version 5.0

Version Description

This version is only compatible with addons above v0.5

Download this release

Release Info

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

Code changes from version 4.4.3 to 5.0

bulk-delete.php CHANGED
@@ -1,1250 +1,693 @@
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 users and posts from selected categories, tags, post types, custom taxonomies or by post status like drafts, scheduled posts, revisions etc.
7
- Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
8
- Version: 4.4.3
9
- License: GPL
10
- Author: Sudar
11
- Author URI: http://sudarmuthu.com/
12
- Text Domain: bulk-delete
13
- Domain Path: languages/
14
-
15
- === RELEASE NOTES ===
16
- Check readme file for full release notes
17
- */
18
-
19
- /* Copyright 2009 Sudar Muthu (email : sudar@sudarmuthu.com)
20
-
21
- This program is free software; you can redistribute it and/or modify
22
- it under the terms of the GNU General Public License, version 2, as
23
- published by the Free Software Foundation.
24
-
25
- This program is distributed in the hope that it will be useful,
26
- but WITHOUT ANY WARRANTY; without even the implied warranty of
27
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
- GNU General Public License for more details.
29
-
30
- You should have received a copy of the GNU General Public License
31
- along with this program; if not, write to the Free Software
32
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
33
- */
34
-
35
- if ( !class_exists( 'Bulk_Delete_Users' ) ) {
36
- require_once dirname( __FILE__ ) . '/include/class-bulk-delete-users.php';
37
- }
38
-
39
- if ( !class_exists( 'Bulk_Delete_Posts' ) ) {
40
- require_once dirname( __FILE__ ) . '/include/class-bulk-delete-posts.php';
41
- }
42
-
43
- if ( !class_exists( 'Bulk_Delete_Util' ) ) {
44
- require_once dirname( __FILE__ ) . '/include/class-bulk-delete-util.php';
45
- }
46
-
47
- if ( !function_exists( 'array_get' ) ) {
48
- require_once dirname( __FILE__ ) . '/include/util.php';
49
- }
50
-
51
- /**
52
- * Bulk Delete Main class
53
- */
54
- class Bulk_Delete {
55
-
56
- const VERSION = '4.4.3';
57
-
58
- // page slugs
59
- const POSTS_PAGE_SLUG = 'bulk-delete-posts';
60
- const USERS_PAGE_SLUG = 'bulk-delete-users';
61
- const CRON_PAGE_SLUG = 'bulk-delete-cron';
62
-
63
- // JS constants
64
- const JS_HANDLE = 'bulk-delete';
65
- const JS_VARIABLE = 'BULK_DELETE';
66
-
67
- // Cron hooks
68
- const CRON_HOOK_CATS = 'do-bulk-delete-cats';
69
- const CRON_HOOK_PAGES = 'do-bulk-delete-pages';
70
- const CRON_HOOK_POST_STATUS = 'do-bulk-delete-post-status';
71
- const CRON_HOOK_TAGS = 'do-bulk-delete-tags';
72
- const CRON_HOOK_TAXONOMY = 'do-bulk-delete-taxonomy';
73
- const CRON_HOOK_POST_TYPES = 'do-bulk-delete-post-types';
74
- const CRON_HOOK_CUSTOM_FIELD= 'do-bulk-delete-custom-field';
75
- const CRON_HOOK_TITLE = 'do-bulk-delete-by-title';
76
-
77
- const CRON_HOOK_USER_ROLE = 'do-bulk-delete-users-by-role';
78
-
79
- // meta boxes for delete posts
80
- const BOX_POST_STATUS = 'bd_by_post_status';
81
- const BOX_CATEGORY = 'bd_by_category';
82
- const BOX_TAG = 'bd_by_tag';
83
- const BOX_TAX = 'bd_by_tax';
84
- const BOX_POST_TYPE = 'bd_by_post_type';
85
- const BOX_PAGE = 'bd_by_page';
86
- const BOX_URL = 'bd_by_url';
87
- const BOX_POST_REVISION = 'bd_by_post_revision';
88
- const BOX_CUSTOM_FIELD = 'bd_by_custom_field';
89
- const BOX_TITLE = 'bd_by_title';
90
- const BOX_DEBUG = 'bd_debug';
91
-
92
- // meta boxes for delete users
93
- const BOX_USERS = 'bdu_by_users';
94
-
95
- /**
96
- * Default constructor
97
- */
98
- public function __construct() {
99
- // Load localization domain
100
- $this->translations = dirname(plugin_basename(__FILE__)) . '/languages/' ;
101
- load_plugin_textdomain( 'bulk-delete', false, $this->translations);
102
-
103
- // Register hooks
104
- add_action('admin_menu', array(&$this, 'add_menu'));
105
- add_action('admin_init', array(&$this, 'request_handler'));
106
-
107
- // Add more links in the plugin listing page
108
- add_filter( 'plugin_action_links', array( &$this, 'filter_plugin_actions' ), 10, 2 );
109
- add_filter( 'plugin_row_meta', array( &$this, 'add_plugin_links' ), 10, 2 );
110
- }
111
-
112
- /**
113
- * Add navigation menu
114
- */
115
- function add_menu() {
116
- add_menu_page( __( 'Bulk Delete', 'bulk-delete' ) , __( 'Bulk Delete', 'bulk-delete' ), 'manage_options', self::POSTS_PAGE_SLUG, array( &$this, 'display_posts_page' ), 'dashicons-trash', '26.9966' );
117
-
118
- $this->admin_page = add_submenu_page( self::POSTS_PAGE_SLUG, __( 'Bulk Delete Posts', 'bulk-delete' ), __( 'Bulk Delete Posts', 'bulk-delete' ), 'delete_posts', self::POSTS_PAGE_SLUG, array( &$this, 'display_posts_page' ) );
119
- $this->users_page = add_submenu_page( self::POSTS_PAGE_SLUG, __( 'Bulk Delete Users', 'bulk-delete' ), __( 'Bulk Delete Users', 'bulk-delete' ), 'delete_users', self::USERS_PAGE_SLUG, array( &$this, 'display_users_page' ) );
120
- $this->cron_page = add_submenu_page( self::POSTS_PAGE_SLUG, __( 'Bulk Delete Schedules', 'bulk-delete' ), __( 'Bulk Delete Schedules', 'bulk-delete' ), 'delete_posts', self::CRON_PAGE_SLUG, array( &$this, 'display_cron_page' ) );
121
-
122
- // enqueue JavaScript
123
- add_action( 'admin_print_scripts-' . $this->admin_page, array( &$this, 'add_script') );
124
- add_action( 'admin_print_scripts-' . $this->users_page, array( &$this, 'add_script') );
125
-
126
- // delete posts page
127
- add_action( "load-{$this->admin_page}", array( &$this, 'add_delete_posts_settings_panel' ) );
128
- add_action( "add_meta_boxes_{$this->admin_page}", array( &$this, 'add_delete_posts_meta_boxes' ) );
129
-
130
- // delete users page
131
- add_action( "load-{$this->users_page}", array( &$this, 'add_delete_users_settings_panel' ) );
132
- add_action( "add_meta_boxes_{$this->users_page}", array( &$this, 'add_delete_users_meta_boxes' ) );
133
- }
134
-
135
- /**
136
- * Add settings Panel for delete posts page
137
- */
138
- function add_delete_posts_settings_panel() {
139
-
140
- /**
141
- * Create the WP_Screen object using page handle
142
- */
143
- $this->delete_posts_screen = WP_Screen::get($this->admin_page);
144
-
145
- /**
146
- * Content specified inline
147
- */
148
- $this->delete_posts_screen->add_help_tab(
149
- array(
150
- 'title' => __('About Plugin', 'bulk-delete'),
151
- 'id' => 'about_tab',
152
- 'content' => '<p>' . __('This plugin allows you to delete posts in bulk from selected categories, tags, custom taxonomies or by post status like drafts, pending posts, scheduled posts etc.', 'bulk-delete') . '</p>',
153
- 'callback' => false
154
- )
155
- );
156
-
157
- // Add help sidebar
158
- $this->delete_posts_screen->set_help_sidebar(
159
- '<p><strong>' . __('More information', 'bulk-delete') . '</strong></p>' .
160
- '<p><a href = "http://sudarmuthu.com/wordpress/bulk-delete">' . __('Plugin Homepage/support', 'bulk-delete') . '</a></p>' .
161
- '<p><a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons">' . __("Buy pro addons", 'bulk-delete') . '</a></p>' .
162
- '<p><a href = "http://sudarmuthu.com/blog">' . __("Plugin author's blog", 'bulk-delete') . '</a></p>' .
163
- '<p><a href = "http://sudarmuthu.com/wordpress/">' . __("Other Plugin's by Author", 'bulk-delete') . '</a></p>'
164
- );
165
-
166
- /* Trigger the add_meta_boxes hooks to allow meta boxes to be added */
167
- do_action('add_meta_boxes_' . $this->admin_page, null);
168
- do_action('add_meta_boxes', $this->admin_page, null);
169
-
170
- /* Enqueue WordPress' script for handling the meta boxes */
171
- wp_enqueue_script('postbox');
172
- }
173
-
174
- /**
175
- * Register meta boxes for delete posts page
176
- */
177
- function add_delete_posts_meta_boxes() {
178
- add_meta_box( self::BOX_POST_STATUS, __( 'By Post Status', 'bulk-delete' ), 'Bulk_Delete_Posts::render_by_post_status_box', $this->admin_page, 'advanced' );
179
- add_meta_box( self::BOX_CATEGORY, __( 'By Category', 'bulk-delete' ), 'Bulk_Delete_Posts::render_by_category_box', $this->admin_page, 'advanced' );
180
- add_meta_box( self::BOX_TAG, __( 'By Tag', 'bulk-delete' ), 'Bulk_Delete_Posts::render_by_tag_box', $this->admin_page, 'advanced' );
181
- add_meta_box( self::BOX_TAX, __( 'By Custom Taxonomy', 'bulk-delete' ), 'Bulk_Delete_Posts::render_by_tax_box', $this->admin_page, 'advanced' );
182
- add_meta_box( self::BOX_POST_TYPE, __( 'By Custom Post Types', 'bulk-delete' ), 'Bulk_Delete_Posts::render_by_post_type_box', $this->admin_page, 'advanced' );
183
- add_meta_box( self::BOX_PAGE, __( 'By Page', 'bulk-delete' ), 'Bulk_Delete_Posts::render_by_page_box', $this->admin_page, 'advanced' );
184
- add_meta_box( self::BOX_URL, __( 'By URL', 'bulk-delete' ), 'Bulk_Delete_Posts::render_by_url_box', $this->admin_page, 'advanced' );
185
- add_meta_box( self::BOX_POST_REVISION, __( 'By Post Revision', 'bulk-delete' ), 'Bulk_Delete_Posts::render_by_post_revision_box', $this->admin_page, 'advanced' );
186
- add_meta_box( self::BOX_CUSTOM_FIELD, __( 'By Custom Field', 'bulk-delete' ), 'Bulk_Delete_Posts::render_by_custom_field_box', $this->admin_page, 'advanced' );
187
- add_meta_box( self::BOX_TITLE, __( 'By Title', 'bulk-delete' ), 'Bulk_Delete_Posts::render_by_title_box', $this->admin_page, 'advanced' );
188
- add_meta_box( self::BOX_DEBUG, __( 'Debug Information', 'bulk-delete' ), 'Bulk_Delete_Posts::render_debug_box', $this->admin_page, 'advanced', 'low' );
189
- }
190
-
191
- /**
192
- * Add settings Panel for delete users page
193
- */
194
- function add_delete_users_settings_panel() {
195
-
196
- /**
197
- * Create the WP_Screen object using page handle
198
- */
199
- $this->delete_users_screen = WP_Screen::get( $this->users_page );
200
-
201
- /**
202
- * Content specified inline
203
- */
204
- $this->delete_users_screen->add_help_tab(
205
- array(
206
- 'title' => __('About Plugin', 'bulk-delete'),
207
- 'id' => 'about_tab',
208
- 'content' => '<p>' . __('This plugin allows you to delete posts in bulk from selected categories, tags, custom taxonomies or by post status like drafts, pending posts, scheduled posts etc.', 'bulk-delete') . '</p>',
209
- 'callback' => false
210
- )
211
- );
212
-
213
- // Add help sidebar
214
- $this->delete_users_screen->set_help_sidebar(
215
- '<p><strong>' . __('More information', 'bulk-delete') . '</strong></p>' .
216
- '<p><a href = "http://sudarmuthu.com/wordpress/bulk-delete">' . __('Plugin Homepage/support', 'bulk-delete') . '</a></p>' .
217
- '<p><a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons">' . __("Buy pro addons", 'bulk-delete') . '</a></p>' .
218
- '<p><a href = "http://sudarmuthu.com/blog">' . __("Plugin author's blog", 'bulk-delete') . '</a></p>' .
219
- '<p><a href = "http://sudarmuthu.com/wordpress/">' . __("Other Plugin's by Author", 'bulk-delete') . '</a></p>'
220
- );
221
-
222
- /* Trigger the add_meta_boxes hooks to allow meta boxes to be added */
223
- do_action('add_meta_boxes_' . $this->users_page, null);
224
- do_action('add_meta_boxes', $this->users_page, null);
225
-
226
- /* Enqueue WordPress' script for handling the meta boxes */
227
- wp_enqueue_script('postbox');
228
- }
229
-
230
- /**
231
- * Register meta boxes for delete users page
232
- */
233
- function add_delete_users_meta_boxes() {
234
- add_meta_box( self::BOX_USERS, __( 'By User Role', 'bulk-delete' ), 'Bulk_Delete_Users::render_delete_users_box', $this->users_page, 'advanced' );
235
- }
236
-
237
- /**
238
- * Enqueue JavaScript
239
- */
240
- function add_script() {
241
- global $wp_scripts;
242
-
243
- // uses code from http://trentrichardson.com/examples/timepicker/
244
- wp_enqueue_script( 'jquery-ui-timepicker', plugins_url( '/js/jquery-ui-timepicker.js', __FILE__ ), array( 'jquery-ui-slider', 'jquery-ui-datepicker' ), '1.4', true );
245
- wp_enqueue_script( self::JS_HANDLE, plugins_url('/js/bulk-delete.js', __FILE__), array('jquery-ui-timepicker'), self::VERSION, TRUE);
246
-
247
- $ui = $wp_scripts->query('jquery-ui-core');
248
-
249
- $url = "http://ajax.aspnetcdn.com/ajax/jquery.ui/{$ui->ver}/themes/smoothness/jquery-ui.css";
250
- wp_enqueue_style('jquery-ui-smoothness', $url, false, $ui->ver);
251
- wp_enqueue_style('jquery-ui-timepicker', plugins_url('/style/jquery-ui-timepicker.css', __FILE__), array(), '1.1.1');
252
-
253
- // JavaScript messages
254
- $msg = array(
255
- 'deletewarning' => __('Are you sure you want to delete all the selected posts', 'bulk-delete'),
256
- 'deletewarningusers' => __( 'Are you sure you want to delete all the selected users', 'bulk-delete' )
257
- );
258
-
259
- $error = array(
260
- 'selectone' => __( 'Please select posts from at least one option', 'bulk-delete' ),
261
- 'enterurl' => __( 'Please enter at least one page url', 'bulk-delete' ),
262
- 'enter_cf_key' => __( 'Please enter some value for custom field key', 'bulk-delete' ),
263
- 'enter_title' => __( 'Please enter some value for title', 'bulk-delete' )
264
- );
265
-
266
- $translation_array = array( 'msg' => $msg, 'error' => $error );
267
- wp_localize_script( self::JS_HANDLE, self::JS_VARIABLE, $translation_array );
268
- }
269
-
270
- /**
271
- * Adds the settings link in the Plugin page. Based on http://striderweb.com/nerdaphernalia/2008/06/wp-use-action-links/
272
- * @staticvar <type> $this_plugin
273
- * @param <type> $links
274
- * @param <type> $file
275
- */
276
- function filter_plugin_actions($links, $file) {
277
- static $this_plugin;
278
- if( ! $this_plugin ) $this_plugin = plugin_basename(__FILE__);
279
-
280
- if( $file == $this_plugin ) {
281
-
282
- $delete_users_link = '<a href="admin.php?page=' . self::USERS_PAGE_SLUG . '">' . __( 'Bulk Delete Users', 'bulk-delete' ) . '</a>';
283
- array_unshift( $links, $delete_users_link ); // before other links
284
-
285
- $delete_posts_link = '<a href="admin.php?page=' . self::POSTS_PAGE_SLUG . '">' . __( 'Bulk Delete Posts', 'bulk-delete' ) . '</a>';
286
- array_unshift( $links, $delete_posts_link ); // before other links
287
- }
288
- return $links;
289
- }
290
-
291
- /**
292
- * Adds additional links in the Plugin listing. Based on http://zourbuth.com/archives/751/creating-additional-wordpress-plugin-links-row-meta/
293
- */
294
- function add_plugin_links($links, $file) {
295
- $plugin = plugin_basename(__FILE__);
296
-
297
- if ($file == $plugin) // only for this plugin
298
- return array_merge( $links,
299
- array( '<a href="http://sudarmuthu.com/wordpress/bulk-delete/pro-addons" target="_blank">' . __('Buy Addons', 'bulk-delete') . '</a>' )
300
- );
301
- return $links;
302
- }
303
-
304
- /**
305
- * Show the delete posts page
306
- */
307
- function display_posts_page() {
308
- ?>
309
- <div class="wrap">
310
- <h2><?php _e('Bulk Delete Posts', 'bulk-delete');?></h2>
311
-
312
- <form method = "post">
313
- <?php
314
- // nonce for bulk delete
315
- wp_nonce_field( 'sm-bulk-delete-posts', 'sm-bulk-delete-posts-nonce' );
316
-
317
- /* Used to save closed meta boxes and their order */
318
- wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
319
- wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
320
- ?>
321
- <div id = "poststuff">
322
- <div id="post-body" class="metabox-holder columns-2">
323
-
324
- <div id="post-body-content">
325
- <div class="updated" >
326
- <p><strong><?php _e("WARNING: Posts deleted once cannot be retrieved back. Use with caution.", 'bulk-delete'); ?></strong></p>
327
- </div>
328
- </div><!-- #post-body-content -->
329
-
330
- <div id="postbox-container-1" class="postbox-container">
331
- <iframe frameBorder="0" height = "1300" src = "http://sudarmuthu.com/projects/wordpress/bulk-delete/sidebar.php?color=<?php echo get_user_option( 'admin_color' ); ?>&version=<?php echo self::VERSION; ?>"></iframe>
332
- </div>
333
-
334
- <div id="postbox-container-2" class="postbox-container">
335
- <?php do_meta_boxes( '', 'advanced', null ); ?>
336
- </div> <!-- #postbox-container-2 -->
337
-
338
- </div> <!-- #post-body -->
339
- </div><!-- #poststuff -->
340
- </form>
341
- </div><!-- .wrap -->
342
-
343
- <?php
344
- // Display credits in Footer
345
- add_action( 'in_admin_footer', array(&$this, 'admin_footer' ));
346
- }
347
-
348
- /**
349
- * Adds Footer links.
350
- */
351
- function admin_footer() {
352
- $plugin_data = get_plugin_data( __FILE__ );
353
- 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']);
354
- }
355
-
356
- /**
357
- * Display bulk delete users page
358
- */
359
- function display_users_page() {
360
- ?>
361
- <div class="wrap">
362
- <h2><?php _e('Bulk Delete Users', 'bulk-delete');?></h2>
363
-
364
- <form method = "post">
365
- <?php
366
- // nonce for bulk delete
367
- wp_nonce_field( 'sm-bulk-delete-users', 'sm-bulk-delete-users-nonce' );
368
-
369
- /* Used to save closed meta boxes and their order */
370
- wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
371
- wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
372
- ?>
373
- <div id = "poststuff">
374
- <div id="post-body" class="metabox-holder columns-2">
375
-
376
- <div id="post-body-content">
377
- <div class = "updated">
378
- <p><strong><?php _e("WARNING: Users deleted once cannot be retrieved back. Use with caution.", 'bulk-delete'); ?></strong></p>
379
- </div>
380
- </div><!-- #post-body-content -->
381
-
382
- <div id="postbox-container-1" class="postbox-container">
383
- <iframe frameBorder="0" height = "1300" src = "http://sudarmuthu.com/projects/wordpress/bulk-delete/sidebar.php?color=<?php echo get_user_option( 'admin_color' ); ?>&version=<?php echo self::VERSION; ?>"></iframe>
384
- </div>
385
-
386
- <div id="postbox-container-2" class="postbox-container">
387
- <?php do_meta_boxes( '', 'advanced', null ); ?>
388
- </div> <!-- #postbox-container-2 -->
389
-
390
- </div> <!-- #post-body -->
391
- </div><!-- #poststuff -->
392
- </form>
393
- </div><!-- .wrap -->
394
-
395
- <?php
396
- // Display credits in Footer
397
- add_action( 'in_admin_footer', array(&$this, 'admin_footer' ));
398
- }
399
-
400
- /**
401
- * Display the schedule page
402
- */
403
- function display_cron_page() {
404
-
405
- if(!class_exists('WP_List_Table')){
406
- require_once( ABSPATH . WPINC . '/class-wp-list-table.php' );
407
- }
408
-
409
- if (!class_exists('Cron_List_Table')) {
410
- require_once dirname(__FILE__) . '/include/class-cron-list-table.php';
411
- }
412
-
413
- //Prepare Table of elements
414
- $cron_list_table = new Cron_List_Table();
415
- $cron_list_table->prepare_items();
416
- ?>
417
- <div class="wrap">
418
- <h2><?php _e('Bulk Delete Schedules', 'bulk-delete');?></h2>
419
- <?php
420
- //Table of elements
421
- $cron_list_table->display();
422
- ?>
423
- </div>
424
- <?php
425
- // Display credits in Footer
426
- add_action( 'in_admin_footer', array(&$this, 'admin_footer' ));
427
- }
428
-
429
- /**
430
- * Request Handler. Handles both POST and GET requests
431
- */
432
- function request_handler() {
433
-
434
- // delete schedules
435
- if ( isset( $_GET['smbd_action'] ) && check_admin_referer( 'sm-bulk-delete-cron', 'sm-bulk-delete-cron-nonce' ) ) {
436
-
437
- switch($_GET['smbd_action']) {
438
-
439
- case 'delete-cron':
440
- $cron_id = absint($_GET['cron_id']);
441
- $cron_items = Bulk_Delete_Util::get_cron_schedules();
442
- wp_unschedule_event($cron_items[$cron_id]['timestamp'], $cron_items[$cron_id]['type'], $cron_items[$cron_id]['args']);
443
-
444
- $this->msg = __('The selected scheduled job was successfully deleted ', 'bulk-delete');
445
-
446
- break;
447
- }
448
- }
449
-
450
- // delete users
451
- if ( isset( $_POST['smbdu_action'] ) && check_admin_referer( 'sm-bulk-delete-users', 'sm-bulk-delete-users-nonce' ) ) {
452
-
453
- switch( $_POST['smbdu_action'] ) {
454
-
455
- case "bulk-delete-users-by-role":
456
- // delete by user role
457
-
458
- $delete_options = array();
459
- $delete_options['selected_roles'] = array_get( $_POST, 'smbdu_roles' );
460
- $delete_options['no_posts'] = array_get( $_POST, 'smbdu_role_no_posts', FALSE );
461
-
462
- $delete_options['login_restrict'] = array_get( $_POST, 'smbdu_login_restrict', FALSE );
463
- $delete_options['login_days'] = array_get( $_POST, 'smbdu_login_days' );
464
- $delete_options['limit_to'] = array_get( $_POST, 'smbdu_role_limit' );
465
-
466
- if (array_get( $_POST, 'smbdu_userrole_cron', 'false' ) == 'true' ) {
467
- $freq = $_POST['smbdu_userrole_cron_freq'];
468
- $time = strtotime( $_POST['smbdu_userrole_cron_start'] ) - ( get_option( 'gmt_offset' ) * 60 * 60 );
469
-
470
- if ( $freq == -1 ) {
471
- wp_schedule_single_event( $time, self::CRON_HOOK_USER_ROLE, array( $delete_options ) );
472
- } else {
473
- wp_schedule_event( $time, $freq , self::CRON_HOOK_USER_ROLE, array( $delete_options ) );
474
- }
475
-
476
- $this->msg = __( 'Users from the selected userrole are scheduled for deletion.', 'bulk-delete' ) . ' ' .
477
- sprintf( __( 'See the full list of <a href = "%s">scheduled tasks</a>' , 'bulk-delete' ), get_bloginfo( "wpurl" ) . '/wp-admin/admin.php?page=' . self::CRON_PAGE_SLUG );
478
- } else {
479
- $deleted_count = Bulk_Delete_Users::delete_users_by_role( $delete_options );
480
- $this->msg = sprintf( _n('Deleted %d user from the selected roles', 'Deleted %d users from the selected role' , $deleted_count, 'bulk-delete' ), $deleted_count );
481
- }
482
-
483
- break;
484
- }
485
- }
486
-
487
- // delete posts
488
- if ( isset( $_POST['smbd_action'] ) && check_admin_referer( 'sm-bulk-delete-posts', 'sm-bulk-delete-posts-nonce' ) ) {
489
-
490
- switch($_POST['smbd_action']) {
491
-
492
- case "bulk-delete-cats":
493
- // delete by cats
494
-
495
- $delete_options = array();
496
- $delete_options['post_type'] = array_get( $_POST, 'smbd_cat_post_type', 'post' );
497
- $delete_options['selected_cats'] = array_get($_POST, 'smbd_cats');
498
- $delete_options['restrict'] = array_get($_POST, 'smbd_cats_restrict', FALSE);
499
- $delete_options['private'] = array_get($_POST, 'smbd_cats_private');
500
- $delete_options['limit_to'] = absint(array_get($_POST, 'smbd_cats_limit_to', 0));
501
- $delete_options['force_delete'] = array_get($_POST, 'smbd_cats_force_delete', 'false');
502
-
503
- $delete_options['cats_op'] = array_get($_POST, 'smbd_cats_op');
504
- $delete_options['cats_days'] = array_get($_POST, 'smbd_cats_days');
505
-
506
- if (array_get($_POST, 'smbd_cats_cron', 'false') == 'true') {
507
- $freq = $_POST['smbd_cats_cron_freq'];
508
- $time = strtotime($_POST['smbd_cats_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
509
-
510
- if ($freq == -1) {
511
- wp_schedule_single_event($time, self::CRON_HOOK_CATS, array($delete_options));
512
- } else {
513
- wp_schedule_event($time, $freq , self::CRON_HOOK_CATS, array($delete_options));
514
- }
515
-
516
- $this->msg = __('Posts from the selected categories are scheduled for deletion.', 'bulk-delete') . ' ' .
517
- sprintf( __( 'See the full list of <a href = "%s">scheduled tasks</a>' , 'bulk-delete' ), get_bloginfo( "wpurl" ) . '/wp-admin/admin.php?page=' . self::CRON_PAGE_SLUG );
518
- } else {
519
- $deleted_count = self::delete_cats($delete_options);
520
- $this->msg = sprintf( _n('Deleted %d post from the selected categories', 'Deleted %d posts from the selected categories' , $deleted_count, 'bulk-delete' ), $deleted_count);
521
- }
522
-
523
- break;
524
-
525
- case "bulk-delete-tags":
526
- // delete by tags
527
-
528
- $delete_options = array();
529
- $delete_options['selected_tags'] = array_get($_POST, 'smbd_tags');
530
- $delete_options['restrict'] = array_get($_POST, 'smbd_tags_restrict', FALSE);
531
- $delete_options['private'] = array_get($_POST, 'smbd_tags_private');
532
- $delete_options['limit_to'] = absint(array_get($_POST, 'smbd_tags_limit_to', 0));
533
- $delete_options['force_delete'] = array_get($_POST, 'smbd_tags_force_delete', 'false');
534
-
535
- $delete_options['tags_op'] = array_get($_POST, 'smbd_tags_op');
536
- $delete_options['tags_days'] = array_get($_POST, 'smbd_tags_days');
537
-
538
- if (array_get($_POST, 'smbd_tags_cron', 'false') == 'true') {
539
- $freq = $_POST['smbd_tags_cron_freq'];
540
- $time = strtotime($_POST['smbd_tags_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
541
-
542
- if ($freq == -1) {
543
- wp_schedule_single_event($time, self::CRON_HOOK_TAGS, array($delete_options));
544
- } else {
545
- wp_schedule_event($time, $freq, self::CRON_HOOK_TAGS, array($delete_options));
546
- }
547
- $this->msg = __('Posts from the selected tags are scheduled for deletion.', 'bulk-delete') . ' ' .
548
- sprintf( __( 'See the full list of <a href = "%s">scheduled tasks</a>' , 'bulk-delete' ), get_bloginfo( "wpurl" ) . '/wp-admin/admin.php?page=' . self::CRON_PAGE_SLUG );
549
- } else {
550
- $deleted_count = self::delete_tags($delete_options);
551
- $this->msg = sprintf( _n('Deleted %d post from the selected tags', 'Deleted %d posts from the selected tags' , $deleted_count, 'bulk-delete' ), $deleted_count);
552
- }
553
-
554
- break;
555
-
556
- case "bulk-delete-taxs":
557
- // delete by taxs
558
-
559
- $delete_options = array();
560
- $delete_options['post_type'] = array_get( $_POST, 'smbd_tax_post_type', 'post' );
561
- $delete_options['selected_taxs'] = array_get($_POST, 'smbd_taxs');
562
- $delete_options['selected_tax_terms'] = array_get($_POST, 'smbd_tax_terms');
563
- $delete_options['restrict'] = array_get($_POST, 'smbd_taxs_restrict', FALSE);
564
- $delete_options['private'] = array_get($_POST, 'smbd_taxs_private');
565
- $delete_options['limit_to'] = absint(array_get($_POST, 'smbd_taxs_limit_to', 0));
566
- $delete_options['force_delete'] = array_get($_POST, 'smbd_taxs_force_delete', 'false');
567
-
568
- $delete_options['taxs_op'] = array_get($_POST, 'smbd_taxs_op');
569
- $delete_options['taxs_days'] = array_get($_POST, 'smbd_taxs_days');
570
-
571
- if (array_get($_POST, 'smbd_taxs_cron', 'false') == 'true') {
572
- $freq = $_POST['smbd_taxs_cron_freq'];
573
- $time = strtotime($_POST['smbd_taxs_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
574
-
575
- if ($freq == -1) {
576
- wp_schedule_single_event($time, self::CRON_HOOK_TAXONOMY, array($delete_options));
577
- } else {
578
- wp_schedule_event($time, $freq, self::CRON_HOOK_TAXONOMY, array($delete_options));
579
- }
580
- $this->msg = __('Posts from the selected custom taxonomies are scheduled for deletion.', 'bulk-delete') . ' ' .
581
- sprintf( __( 'See the full list of <a href = "%s">scheduled tasks</a>' , 'bulk-delete' ), get_bloginfo( "wpurl" ) . '/wp-admin/admin.php?page=' . self::CRON_PAGE_SLUG );
582
- } else {
583
- $deleted_count = self::delete_taxs($delete_options);
584
- $this->msg = sprintf( _n('Deleted %d post from the selected custom taxonomies', 'Deleted %d posts from the selected custom taxonomies' , $deleted_count, 'bulk-delete' ), $deleted_count);
585
- }
586
- break;
587
-
588
- case "bulk-delete-post-types":
589
- // delete by custom post type
590
-
591
- $delete_options = array();
592
-
593
- $delete_options['selected_types'] = array_get( $_POST, 'smbd_types' );
594
- $delete_options['restrict'] = array_get($_POST, 'smbd_types_restrict', FALSE);
595
- $delete_options['limit_to'] = absint(array_get($_POST, 'smbd_types_limit_to', 0));
596
- $delete_options['force_delete'] = array_get($_POST, 'smbd_types_force_delete', 'false');
597
-
598
- $delete_options['types_op'] = array_get($_POST, 'smbd_types_op');
599
- $delete_options['types_days'] = array_get($_POST, 'smbd_types_days');
600
-
601
- if (array_get($_POST, 'smbd_types_cron', 'false') == 'true') {
602
- $freq = $_POST['smbd_types_cron_freq'];
603
- $time = strtotime($_POST['smbd_types_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
604
-
605
- if ($freq == -1) {
606
- wp_schedule_single_event( $time, self::CRON_HOOK_POST_TYPES, array( $delete_options ) );
607
- } else {
608
- wp_schedule_event( $time, $freq, self::CRON_HOOK_POST_TYPES, array( $delete_options ) );
609
- }
610
-
611
- $this->msg = __( 'Posts from the selected custom post type are scheduled for deletion.', 'bulk-delete') . ' ' .
612
- sprintf( __( 'See the full list of <a href = "%s">scheduled tasks</a>' , 'bulk-delete' ), get_bloginfo( "wpurl" ) . '/wp-admin/admin.php?page=' . self::CRON_PAGE_SLUG );
613
- } else {
614
- $deleted_count = self::delete_post_types( $delete_options );
615
- $this->msg = sprintf( _n( 'Deleted %d post from the selected custom post type', 'Deleted %d posts from the selected custom post type' , $deleted_count, 'bulk-delete' ), $deleted_count );
616
- }
617
-
618
- break;
619
-
620
- case "bulk-delete-post-status":
621
- // Delete by post status like drafts, pending posts etc
622
-
623
- $delete_options = array();
624
- $delete_options['restrict'] = array_get($_POST, 'smbd_post_status_restrict', FALSE);
625
- $delete_options['limit_to'] = absint(array_get($_POST, 'smbd_post_status_limit_to', 0));
626
- $delete_options['force_delete'] = array_get($_POST, 'smbd_post_status_force_delete', 'false');
627
-
628
- $delete_options['post_status_op'] = array_get($_POST, 'smbd_post_status_op');
629
- $delete_options['post_status_days'] = array_get($_POST, 'smbd_post_status_days');
630
-
631
- $delete_options['publish'] = array_get( $_POST, 'smbd_publish' );
632
- $delete_options['drafts'] = array_get($_POST, 'smbd_drafts');
633
- $delete_options['pending'] = array_get($_POST, 'smbd_pending');
634
- $delete_options['future'] = array_get($_POST, 'smbd_future');
635
- $delete_options['private'] = array_get($_POST, 'smbd_private');
636
- $delete_options['sticky'] = array_get( $_POST, 'smbd_sticky' );
637
-
638
- if (array_get($_POST, 'smbd_post_status_cron', 'false') == 'true') {
639
- $freq = $_POST['smbd_post_status_cron_freq'];
640
- $time = strtotime($_POST['smbd_post_status_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
641
-
642
- if ($freq == -1) {
643
- wp_schedule_single_event($time, self::CRON_HOOK_POST_STATUS, array($delete_options));
644
- } else {
645
- wp_schedule_event($time, $freq, self::CRON_HOOK_POST_STATUS, array($delete_options));
646
- }
647
- $this->msg = __('Posts with the selected status are scheduled for deletion.', 'bulk-delete') . ' ' .
648
- sprintf( __( 'See the full list of <a href = "%s">scheduled tasks</a>' , 'bulk-delete' ), get_bloginfo( "wpurl" ) . '/wp-admin/admin.php?page=' . self::CRON_PAGE_SLUG );
649
- } else {
650
- $deleted_count = self::delete_post_status($delete_options);
651
- $this->msg = sprintf( _n('Deleted %d post with the selected post status', 'Deleted %d posts with the selected post status' , $deleted_count, 'bulk-delete' ), $deleted_count);
652
- }
653
-
654
- break;
655
-
656
- case "bulk-delete-page":
657
- // Delete pages
658
-
659
- $delete_options = array();
660
- $delete_options['restrict'] = array_get($_POST, 'smbd_pages_restrict', FALSE);
661
- $delete_options['limit_to'] = absint(array_get($_POST, 'smbd_pages_limit_to', 0));
662
- $delete_options['force_delete'] = array_get($_POST, 'smbd_pages_force_delete', 'false');
663
-
664
- $delete_options['page_op'] = array_get($_POST, 'smbd_pages_op');
665
- $delete_options['page_days'] = array_get($_POST, 'smbd_pages_days');
666
-
667
- $delete_options['publish'] = array_get($_POST, 'smbd_published_pages');
668
- $delete_options['drafts'] = array_get($_POST, 'smbd_draft_pages');
669
- $delete_options['pending'] = array_get($_POST, 'smbd_pending_pages');
670
- $delete_options['future'] = array_get($_POST, 'smbd_future_pages');
671
- $delete_options['private'] = array_get($_POST, 'smbd_private_pages');
672
-
673
- if (array_get($_POST, 'smbd_pages_cron', 'false') == 'true') {
674
- $freq = $_POST['smbd_pages_cron_freq'];
675
- $time = strtotime($_POST['smbd_pages_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
676
-
677
- if ($freq == -1) {
678
- wp_schedule_single_event($time, self::CRON_HOOK_PAGES, array($delete_options));
679
- } else {
680
- wp_schedule_event($time, $freq , self::CRON_HOOK_PAGES, array($delete_options));
681
- }
682
- $this->msg = __('The selected pages are scheduled for deletion.', 'bulk-delete') . ' ' .
683
- sprintf( __( 'See the full list of <a href = "%s">scheduled tasks</a>' , 'bulk-delete' ), get_bloginfo( "wpurl" ) . '/wp-admin/admin.php?page=' . self::CRON_PAGE_SLUG );
684
- } else {
685
- $deleted_count = self::delete_pages($delete_options);
686
- $this->msg = sprintf( _n('Deleted %d page', 'Deleted %d pages' , $deleted_count, 'bulk-delete' ), $deleted_count);
687
- }
688
-
689
- break;
690
-
691
- case "bulk-delete-specific":
692
- // Delete pages
693
-
694
- $force_delete = array_get($_POST, 'smbd_specific_force_delete');
695
- if ($force_delete == 'true') {
696
- $force_delete = true;
697
- } else {
698
- $force_delete = false;
699
- }
700
-
701
- $urls = preg_split( '/\r\n|\r|\n/', array_get($_POST, 'smdb_specific_pages_urls') );
702
- foreach ($urls as $url) {
703
- $checkedurl = $url;
704
- if (substr($checkedurl ,0,1) == '/') {
705
- $checkedurl = get_site_url() . $checkedurl ;
706
- }
707
- $postid = url_to_postid( $checkedurl );
708
- wp_delete_post($postid, $force_delete);
709
- }
710
-
711
- $deleted_count = count( $url );
712
- $this->msg = sprintf( _n( 'Deleted %d post with the specified urls', 'Deleted %d posts with the specified urls' , $deleted_count, 'bulk-delete' ), $deleted_count);
713
- break;
714
-
715
- case "bulk-delete-revisions":
716
- // Delete page revisions
717
-
718
- $delete_options['revisions'] = array_get($_POST, 'smbd_revisions');
719
- $deleted_count = self::delete_revisions($delete_options);
720
-
721
- $this->msg = sprintf( _n( 'Deleted %d post revision', 'Deleted %d post revisions' , $deleted_count, 'bulk-delete' ), $deleted_count);
722
- break;
723
-
724
- case "bulk-delete-cf":
725
- // delete by custom field
726
- // TODO: Handle this using filters
727
-
728
- if ( class_exists( 'Bulk_Delete_Custom_Field' ) ) {
729
- $this->msg = Bulk_Delete_Custom_Field::process_request();
730
- }
731
- break;
732
-
733
- case "bulk-delete-by-title":
734
- // delete by title
735
- // TODO: Move this logic to Bulk Delete By Title addon
736
- // TODO: Handle this using filters
737
-
738
- if ( class_exists( 'Bulk_Delete_By_Title' ) ) {
739
- $delete_options = array();
740
- $delete_options['title_field_op'] = array_get( $_POST, 'smbd_title_field_op' );
741
- $delete_options['title_value'] = array_get( $_POST, 'smbd_title_value' );
742
-
743
- $delete_options['restrict'] = array_get( $_POST, 'smbd_title_restrict', FALSE );
744
- $delete_options['private'] = array_get( $_POST, 'smbd_title_private' );
745
- $delete_options['limit_to'] = absint( array_get( $_POST, 'smbd_title_limit_to', 0) );
746
- $delete_options['force_delete'] = array_get( $_POST, 'smbd_title_force_delete', 'false' );
747
-
748
- $delete_options['title_op'] = array_get( $_POST, 'smbd_title_op' );
749
- $delete_options['title_days'] = array_get( $_POST, 'smbd_title_days' );
750
-
751
- if ( array_get( $_POST, 'smbd_title_cron', 'false' ) == 'true' ) {
752
- $freq = $_POST['smbd_title_cron_freq'];
753
- $time = strtotime( $_POST['smbd_title_cron_start'] ) - ( get_option( 'gmt_offset' ) * 60 * 60 );
754
-
755
- if ( $freq == -1 ) {
756
- wp_schedule_single_event( $time, self::CRON_HOOK_TITLE, array( $delete_options ) );
757
- } else {
758
- wp_schedule_event( $time, $freq , self::CRON_HOOK_TITLE, array( $delete_options ) );
759
- }
760
-
761
- $this->msg = __( 'Posts matching the selected title setting are scheduled for deletion.', 'bulk-delete' ) . ' ' .
762
- sprintf( __( 'See the full list of <a href = "%s">scheduled tasks</a>' , 'bulk-delete' ), get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=' . self::CRON_PAGE_SLUG );
763
- } else {
764
- $deleted_count = Bulk_Delete_By_Title::delete_by_title( $delete_options );
765
- $this->msg = sprintf( _n( 'Deleted %d post using the selected title condition', 'Deleted %d posts using the selected title condition' , $deleted_count, 'bulk-delete' ), $deleted_count );
766
- }
767
- }
768
- break;
769
- }
770
- }
771
-
772
- // hook the admin notices action
773
- add_action( 'admin_notices', array(&$this, 'deleted_notice'), 9 );
774
- }
775
-
776
- /**
777
- * Show deleted notice messages
778
- */
779
- function deleted_notice() {
780
- if ( isset( $this->msg ) && $this->msg != '' ) {
781
- echo "<div class = 'updated'><p>" . $this->msg . "</p></div>";
782
- }
783
-
784
- // cleanup
785
- $this->msg = '';
786
- remove_action( 'admin_notices', array( &$this, 'deleted_notice' ));
787
- }
788
-
789
- /**
790
- * Delete posts by category
791
- */
792
- static function delete_cats($delete_options) {
793
-
794
- // For compatibility reasons set default post type to 'post'
795
- $post_type = array_get( $delete_options, 'post_type', 'post' );
796
- $selected_cats = $delete_options['selected_cats'];
797
-
798
- $options = array(
799
- 'post_type' => $post_type,
800
- 'category__in' => $selected_cats,
801
- 'post_status' => 'publish'
802
- );
803
-
804
- $private = $delete_options['private'];
805
-
806
- if ($private == 'true') {
807
- $options[ 'post_status' ] = 'private';
808
- }
809
-
810
- $limit_to = $delete_options['limit_to'];
811
-
812
- if ($limit_to > 0) {
813
- $options['showposts'] = $limit_to;
814
- } else {
815
- $options['nopaging'] = 'true';
816
- }
817
-
818
- $force_delete = $delete_options['force_delete'];
819
-
820
- if ($force_delete == 'true') {
821
- $force_delete = true;
822
- } else {
823
- $force_delete = false;
824
- }
825
-
826
- if ($delete_options['restrict'] == "true") {
827
- $options['op'] = $delete_options['cats_op'];
828
- $options['days'] = $delete_options['cats_days'];
829
-
830
- if (!class_exists('Bulk_Delete_By_Days')) {
831
- require_once dirname(__FILE__) . '/include/class-bulk-delete-by-days.php';
832
- }
833
- $bulk_Delete_By_Days = new Bulk_Delete_By_Days;
834
- }
835
-
836
- $wp_query = new WP_Query();
837
- $posts = $wp_query->query($options);
838
-
839
- foreach ($posts as $post) {
840
- // $force delete parameter to custom post types doesn't work
841
- if ( $force_delete ) {
842
- wp_delete_post( $post->ID, TRUE );
843
- } else {
844
- wp_trash_post( $post->ID );
845
- }
846
- }
847
-
848
- return count($posts);
849
- }
850
-
851
- /**
852
- * Delete posts by tags
853
- */
854
- static function delete_tags($delete_options) {
855
-
856
- $selected_tags = $delete_options['selected_tags'];
857
- $options = array('tag__in'=>$selected_tags, 'post_status'=>'publish', 'post_type'=>'post');
858
-
859
- $private = $delete_options['private'];
860
-
861
- if ($private == 'true') {
862
- $options['post_status'] = 'private';
863
- }
864
-
865
- $limit_to = $delete_options['limit_to'];
866
-
867
- if ($limit_to > 0) {
868
- $options['showposts'] = $limit_to;
869
- } else {
870
- $options['nopaging'] = 'true';
871
- }
872
-
873
- $force_delete = $delete_options['force_delete'];
874
-
875
- if ($force_delete == 'true') {
876
- $force_delete = true;
877
- } else {
878
- $force_delete = false;
879
- }
880
-
881
- if ($delete_options['restrict'] == "true") {
882
- $options['op'] = $delete_options['tags_op'];
883
- $options['days'] = $delete_options['tags_days'];
884
-
885
- if (!class_exists('Bulk_Delete_By_Days')) {
886
- require_once dirname(__FILE__) . '/include/class-bulk-delete-by-days.php';
887
- }
888
- $bulk_Delete_By_Days = new Bulk_Delete_By_Days;
889
- }
890
-
891
- $wp_query = new WP_Query();
892
- $posts = $wp_query->query($options);
893
-
894
- foreach ($posts as $post) {
895
- wp_delete_post($post->ID, $force_delete);
896
- }
897
-
898
- return count($posts);
899
- }
900
-
901
- /**
902
- * Delete posts by custom taxonomy
903
- */
904
- static function delete_taxs($delete_options) {
905
-
906
- // For compatibility reasons set default post type to 'post'
907
- $post_type = array_get( $delete_options, 'post_type', 'post' );
908
- $selected_taxs = $delete_options['selected_taxs'];
909
- $selected_tax_terms = $delete_options['selected_tax_terms'];
910
-
911
- $options = array(
912
- 'post_status' => 'publish',
913
- 'post_type' => $post_type,
914
- 'tax_query' => array(
915
- array(
916
- 'taxonomy' => $selected_taxs,
917
- 'terms' => $selected_tax_terms,
918
- 'field' => 'slug'
919
- )
920
- )
921
- );
922
-
923
- $private = $delete_options['private'];
924
-
925
- if ($private == 'true') {
926
- $options['post_status'] = 'private';
927
- }
928
-
929
- $limit_to = $delete_options['limit_to'];
930
-
931
- if ($limit_to > 0) {
932
- $options['showposts'] = $limit_to;
933
- } else {
934
- $options['nopaging'] = 'true';
935
- }
936
-
937
- $force_delete = $delete_options['force_delete'];
938
-
939
- if ($force_delete == 'true') {
940
- $force_delete = true;
941
- } else {
942
- $force_delete = false;
943
- }
944
-
945
- if ($delete_options['restrict'] == "true") {
946
- $options['op'] = $delete_options['taxs_op'];
947
- $options['days'] = $delete_options['taxs_days'];
948
-
949
- if (!class_exists('Bulk_Delete_By_Days')) {
950
- require_once dirname(__FILE__) . '/include/class-bulk-delete-by-days.php';
951
- }
952
- $bulk_Delete_By_Days = new Bulk_Delete_By_Days;
953
- }
954
-
955
- $wp_query = new WP_Query();
956
- $posts = $wp_query->query($options);
957
-
958
- foreach ($posts as $post) {
959
- // $force delete parameter to custom post types doesn't work
960
- if ( $force_delete ) {
961
- wp_delete_post( $post->ID, TRUE );
962
- } else {
963
- wp_trash_post( $post->ID );
964
- }
965
- }
966
-
967
- return count( $posts );
968
- }
969
-
970
- /**
971
- * Delete posts by custom post type
972
- */
973
- static function delete_post_types( $delete_options ) {
974
- $count = 0;
975
- $selected_types = $delete_options['selected_types'];
976
-
977
- foreach ( $selected_types as $selected_type ) {
978
-
979
- $type_status = Bulk_Delete_Util::split_post_type_status( $selected_type );
980
-
981
- $type = $type_status['type'];
982
- $status = $type_status['status'];
983
-
984
- $options = array(
985
- 'post_status' => $status,
986
- 'post_type' => $type
987
- );
988
-
989
- $limit_to = $delete_options['limit_to'];
990
-
991
- if ( $limit_to > 0 ) {
992
- $options['showposts'] = $limit_to;
993
- } else {
994
- $options['nopaging'] = 'true';
995
- }
996
-
997
- $force_delete = $delete_options['force_delete'];
998
-
999
- if ( $force_delete == 'true' ) {
1000
- $force_delete = true;
1001
- } else {
1002
- $force_delete = false;
1003
- }
1004
-
1005
- self::pre_query();
1006
-
1007
- if ($delete_options['restrict'] == "true") {
1008
- $options['op'] = $delete_options['types_op'];
1009
- $options['days'] = $delete_options['types_days'];
1010
-
1011
- if ( !class_exists( 'Bulk_Delete_By_Days' ) ) {
1012
- require_once dirname( __FILE__ ) . '/include/class-bulk-delete-by-days.php';
1013
- }
1014
- $bulk_Delete_By_Days = new Bulk_Delete_By_Days;
1015
- }
1016
-
1017
- $wp_query = new WP_Query();
1018
- $posts = $wp_query->query( $options );
1019
-
1020
- self::post_query();
1021
-
1022
- foreach ( $posts as $post ) {
1023
- // $force delete parameter to custom post types doesn't work
1024
- if ( $force_delete ) {
1025
- wp_delete_post( $post->ID, TRUE );
1026
- } else {
1027
- wp_trash_post( $post->ID );
1028
- }
1029
- }
1030
-
1031
- $count += count( $posts );
1032
- }
1033
-
1034
- return $count;
1035
- }
1036
-
1037
- /**
1038
- * The event calendar Plugin changes query parameters which results in compatibility issues.
1039
- * So we disable it before executing our query
1040
- */
1041
- static function pre_query() {
1042
- if ( class_exists( 'TribeEventsQuery' ) ) {
1043
- remove_filter( 'pre_get_posts', array( TribeEventsQuery, 'pre_get_posts' ), 0 );
1044
- }
1045
- }
1046
-
1047
- /**
1048
- * The event calendar Plugin changes query parameters which results in compatibility issues.
1049
- * So we disable it before executing our query and then enable it after our query
1050
- */
1051
- static function post_query() {
1052
- if ( class_exists( 'TribeEventsQuery' ) ) {
1053
- add_filter( 'pre_get_posts', array( TribeEventsQuery, 'pre_get_posts' ), 0 );
1054
- }
1055
- }
1056
-
1057
- /**
1058
- * Delete posts by post status - drafts, pending posts, scheduled posts etc.
1059
- */
1060
- static function delete_post_status( $delete_options ) {
1061
- global $wp_query;
1062
- global $wpdb;
1063
-
1064
- $deleted_posts = 0;
1065
-
1066
- $force_delete = $delete_options['force_delete'];
1067
-
1068
- if ($force_delete == 'true') {
1069
- $force_delete = true;
1070
- } else {
1071
- $force_delete = false;
1072
- }
1073
-
1074
- // Delete sticky posts
1075
- if ( 'sticky' == $delete_options['sticky'] ) {
1076
- $sticky_post_ids = get_option( 'sticky_posts' );
1077
-
1078
- foreach ( $sticky_post_ids as $sticky_post_id ) {
1079
- wp_delete_post( $sticky_post_id, $force_delete );
1080
- }
1081
-
1082
- $deleted_posts += count( $sticky_post_ids );
1083
- }
1084
-
1085
- $options = array();
1086
- $post_status = array();
1087
-
1088
- $limit_to = $delete_options['limit_to'];
1089
-
1090
- if ($limit_to > 0) {
1091
- $options['showposts'] = $limit_to;
1092
- } else {
1093
- $options['nopaging'] = 'true';
1094
- }
1095
-
1096
- $force_delete = $delete_options['force_delete'];
1097
-
1098
- if ($force_delete == 'true') {
1099
- $force_delete = true;
1100
- } else {
1101
- $force_delete = false;
1102
- }
1103
-
1104
- // Published posts
1105
- if ( 'publish' == $delete_options['publish'] ) {
1106
- $post_status[] = 'publish';
1107
- }
1108
-
1109
- // Drafts
1110
- if ( 'drafts' == $delete_options['drafts'] ) {
1111
- $post_status[] = 'draft';
1112
-
1113
- // ignore sticky posts.
1114
- // For some reason, sticky posts also gets deleted when deleting drafts through a schedule
1115
- $options['post__not_in'] = get_option( 'sticky_posts' );
1116
- }
1117
-
1118
- // Pending Posts
1119
- if ("pending" == $delete_options['pending']) {
1120
- $post_status[] = 'pending';
1121
- }
1122
-
1123
- // Future Posts
1124
- if ("future" == $delete_options['future']) {
1125
- $post_status[] = 'future';
1126
- }
1127
-
1128
- // Private Posts
1129
- if ("private" == $delete_options['private']) {
1130
- $post_status[] = 'private';
1131
- }
1132
-
1133
- if ($delete_options['restrict'] == "true") {
1134
- $options['op'] = $delete_options['post_status_op'];
1135
- $options['days'] = $delete_options['post_status_days'];
1136
-
1137
- if (!class_exists('Bulk_Delete_By_Days')) {
1138
- require_once dirname(__FILE__) . '/include/class-bulk-delete-by-days.php';
1139
- }
1140
- $bulk_Delete_By_Days = new Bulk_Delete_By_Days;
1141
- }
1142
-
1143
- // now retrieve all posts and delete them
1144
- $options['post_status'] = $post_status;
1145
-
1146
- $posts = $wp_query->query($options);
1147
-
1148
- foreach ($posts as $post) {
1149
- wp_delete_post($post->ID, $force_delete);
1150
- }
1151
-
1152
- $deleted_posts += count( $posts );
1153
- return $deleted_posts;
1154
- }
1155
-
1156
- /**
1157
- * Bulk Delete pages
1158
- */
1159
- static function delete_pages( $delete_options ) {
1160
- global $wp_query;
1161
-
1162
- $options = array();
1163
- $post_status = array();
1164
-
1165
- $limit_to = $delete_options['limit_to'];
1166
-
1167
- if ($limit_to > 0) {
1168
- $options['showposts'] = $limit_to;
1169
- } else {
1170
- $options['nopaging'] = 'true';
1171
- }
1172
-
1173
- $force_delete = $delete_options['force_delete'];
1174
-
1175
- if ($force_delete == 'true') {
1176
- $force_delete = true;
1177
- } else {
1178
- $force_delete = false;
1179
- }
1180
-
1181
- // published pages
1182
- if ("published_pages" == $delete_options['publish']) {
1183
- $post_status[] = 'publish';
1184
- }
1185
-
1186
- // Drafts
1187
- if ("draft_pages" == $delete_options['drafts']) {
1188
- $post_status[] = 'draft';
1189
- }
1190
-
1191
- // Pending Posts
1192
- if ("pending_pages" == $delete_options['pending']) {
1193
- $post_status[] = 'pending';
1194
- }
1195
-
1196
- // Future Posts
1197
- if ("future_pages" == $delete_options['future']) {
1198
- $post_status[] = 'future';
1199
- }
1200
-
1201
- // Private Posts
1202
- if ("private_pages" == $delete_options['private']) {
1203
- $post_status[] = 'private';
1204
- }
1205
-
1206
- $options['post_type'] = 'page';
1207
- $options['post_status'] = $post_status;
1208
-
1209
- if ($delete_options['restrict'] == "true") {
1210
- $options['op'] = $delete_options['page_op'];
1211
- $options['days'] = $delete_options['page_days'];
1212
-
1213
- if (!class_exists('Bulk_Delete_By_Days')) {
1214
- require_once dirname(__FILE__) . '/include/class-bulk-delete-by-days.php';
1215
- }
1216
- $bulk_Delete_By_Days = new Bulk_Delete_By_Days;
1217
- }
1218
-
1219
- $pages = $wp_query->query($options);
1220
- foreach ($pages as $page) {
1221
- wp_delete_post($page->ID, $force_delete);
1222
- }
1223
-
1224
- return count( $pages );
1225
- }
1226
-
1227
- /**
1228
- * Delete all post revisions
1229
- */
1230
- static function delete_revisions( $delete_options ) {
1231
- global $wpdb;
1232
-
1233
- // Revisions
1234
- if ("revisions" == $delete_options['revisions']) {
1235
- $revisions = $wpdb->get_results("select ID from $wpdb->posts where post_type = 'revision'");
1236
-
1237
- foreach ($revisions as $revision) {
1238
- wp_delete_post( $revision->ID );
1239
- }
1240
-
1241
- return count( $revisions );
1242
- }
1243
-
1244
- return 0;
1245
- }
1246
- }
1247
-
1248
- // Start this plugin once all other plugins are fully loaded
1249
- add_action( 'init', 'Bulk_Delete' ); function Bulk_Delete() { global $Bulk_Delete; $Bulk_Delete = new Bulk_Delete(); }
1250
- ?>
1
+ <?php
2
+ /**
3
+ Plugin Name: Bulk Delete
4
+ Plugin Script: bulk-delete.php
5
+ Plugin URI: http://bulkwp.com
6
+ Description: Bulk delete users and posts from selected categories, tags, post types, custom taxonomies or by post status like drafts, scheduled posts, revisions etc.
7
+ Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
8
+ Version: 5.0
9
+ License: GPL
10
+ Author: Sudar
11
+ Author URI: http://sudarmuthu.com/
12
+ Text Domain: bulk-delete
13
+ Domain Path: languages/
14
+
15
+ === RELEASE NOTES ===
16
+ Check readme file for full release notes
17
+ */
18
+
19
+ /* Copyright 2009 Sudar Muthu (email : sudar@sudarmuthu.com)
20
+
21
+ This program is free software; you can redistribute it and/or modify
22
+ it under the terms of the GNU General Public License, version 2, as
23
+ published by the Free Software Foundation.
24
+
25
+ This program is distributed in the hope that it will be useful,
26
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
27
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
+ GNU General Public License for more details.
29
+
30
+ You should have received a copy of the GNU General Public License
31
+ along with this program; if not, write to the Free Software
32
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
33
+ */
34
+
35
+ /**
36
+ * @package Bulk_Delete
37
+ * @subpackage core
38
+ * @author Sudar
39
+ * @version 5.0
40
+ */
41
+
42
+ // Exit if accessed directly
43
+ if ( ! defined( 'ABSPATH' ) ) exit;
44
+
45
+ if ( ! class_exists( 'Bulk_Delete' ) ) :
46
+
47
+ /**
48
+ * Main Bulk_Delete class
49
+ *
50
+ * Singleton @since 5.0
51
+ */
52
+ final class Bulk_Delete {
53
+ /**
54
+ * @var Bulk_Delete The one true Bulk_Delete
55
+ * @since 5.0
56
+ */
57
+ private static $instance;
58
+
59
+ const VERSION = '5.0';
60
+
61
+ // page slugs
62
+ const POSTS_PAGE_SLUG = 'bulk-delete-posts';
63
+ const PAGES_PAGE_SLUG = 'bulk-delete-pages';
64
+ const USERS_PAGE_SLUG = 'bulk-delete-users';
65
+ const CRON_PAGE_SLUG = 'bulk-delete-cron';
66
+ const ADDON_PAGE_SLUG = 'bulk-delete-addon';
67
+ const INFO_PAGE_SLUG = 'bulk-delete-info';
68
+
69
+ // JS constants
70
+ const JS_HANDLE = 'bulk-delete';
71
+ const JS_VARIABLE = 'BULK_DELETE';
72
+
73
+ // Cron hooks
74
+ const CRON_HOOK_CATEGORY = 'do-bulk-delete-cat';
75
+ const CRON_HOOK_POST_STATUS = 'do-bulk-delete-post-status';
76
+ const CRON_HOOK_TAG = 'do-bulk-delete-tag';
77
+ const CRON_HOOK_TAXONOMY = 'do-bulk-delete-taxonomy';
78
+ const CRON_HOOK_POST_TYPE = 'do-bulk-delete-post-type';
79
+ const CRON_HOOK_CUSTOM_FIELD = 'do-bulk-delete-custom-field';
80
+ const CRON_HOOK_TITLE = 'do-bulk-delete-by-title';
81
+ const CRON_HOOK_DUPLICATE_TITLE = 'do-bulk-delete-by-duplicate-title';
82
+
83
+ const CRON_HOOK_PAGES_STATUS = 'do-bulk-delete-pages-by-status';
84
+
85
+ const CRON_HOOK_USER_ROLE = 'do-bulk-delete-users-by-role';
86
+
87
+ // meta boxes for delete posts
88
+ const BOX_POST_STATUS = 'bd_by_post_status';
89
+ const BOX_CATEGORY = 'bd_by_category';
90
+ const BOX_TAG = 'bd_by_tag';
91
+ const BOX_TAX = 'bd_by_tax';
92
+ const BOX_POST_TYPE = 'bd_by_post_type';
93
+ const BOX_URL = 'bd_by_url';
94
+ const BOX_POST_REVISION = 'bd_by_post_revision';
95
+ const BOX_CUSTOM_FIELD = 'bd_by_custom_field';
96
+ const BOX_TITLE = 'bd_by_title';
97
+ const BOX_DUPLICATE_TITLE = 'bd_by_duplicate_title';
98
+
99
+ // meta boxes for delete pages
100
+ const BOX_PAGE_STATUS = 'bd_by_page_status';
101
+
102
+ // meta boxes for delete users
103
+ const BOX_USERS = 'bdu_by_users';
104
+
105
+ // Settings constants
106
+ const SETTING_OPTION_GROUP = 'bd_settings';
107
+ const SETTING_OPTION_NAME = 'bd_licenses';
108
+ const SETTING_SECTION_ID = 'bd_license_section';
109
+
110
+ // Transient keys
111
+ const LICENSE_CACHE_KEY_PREFIX = 'bd-license_';
112
+
113
+ // path variables
114
+ // Ideally these should be constants, but because of PHP's limitations, these are static variables
115
+ static $PLUGIN_DIR;
116
+ static $PLUGIN_URL;
117
+ static $PLUGIN_FILE;
118
+
119
+ /**
120
+ * Main Bulk_Delete Instance
121
+ *
122
+ * Insures that only one instance of Bulk_Delete exists in memory at any one
123
+ * time. Also prevents needing to define globals all over the place.
124
+ *
125
+ * @since 5.0
126
+ * @static
127
+ * @staticvar array $instance
128
+ * @uses Bulk_Delete::setup_paths() Setup the plugin paths
129
+ * @uses Bulk_Delete::includes() Include the required files
130
+ * @uses Bulk_Delete::load_textdomain() Load text domain for translation
131
+ * @uses Bulk_Delete::setup_actions() Setup the hooks and actions
132
+ * @see BULK_DELETE()
133
+ * @return The one true BULK_DELETE
134
+ */
135
+ public static function instance() {
136
+ if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Bulk_Delete ) ) {
137
+ self::$instance = new Bulk_Delete;
138
+ self::$instance->setup_paths();
139
+ self::$instance->includes();
140
+ self::$instance->load_textdomain();
141
+ self::$instance->setup_actions();
142
+ }
143
+ return self::$instance;
144
+ }
145
+
146
+ /**
147
+ * Throw error on object clone
148
+ *
149
+ * The whole idea of the singleton design pattern is that there is a single
150
+ * object therefore, we don't want the object to be cloned.
151
+ *
152
+ * @since 5.0
153
+ * @access protected
154
+ * @return void
155
+ */
156
+ public function __clone() {
157
+ // Cloning instances of the class is forbidden
158
+ _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'bulk-delete' ), '5.0' );
159
+ }
160
+
161
+ /**
162
+ * Disable unserializing of the class
163
+ *
164
+ * @since 5.0
165
+ * @access protected
166
+ * @return void
167
+ */
168
+ public function __wakeup() {
169
+ // Unserializing instances of the class is forbidden
170
+ _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'bulk-delete' ), '5.0' );
171
+ }
172
+
173
+ /**
174
+ * Setup plugin constants
175
+ *
176
+ * @access private
177
+ * @since 5.0
178
+ * @return void
179
+ */
180
+ private function setup_paths() {
181
+ // Plugin Folder Path
182
+ self::$PLUGIN_DIR = plugin_dir_path( __FILE__ );
183
+
184
+ // Plugin Folder URL
185
+ self::$PLUGIN_URL = plugin_dir_url( __FILE__ );
186
+
187
+ // Plugin Root File
188
+ self::$PLUGIN_FILE = __FILE__;
189
+ }
190
+
191
+ /**
192
+ * Include required files
193
+ *
194
+ * @access private
195
+ * @since 5.0
196
+ * @return void
197
+ */
198
+ private function includes() {
199
+ require_once self::$PLUGIN_DIR . '/include/class-bulk-delete-posts.php';
200
+ require_once self::$PLUGIN_DIR . '/include/class-bulk-delete-pages.php';
201
+ require_once self::$PLUGIN_DIR . '/include/class-bulk-delete-users.php';
202
+ require_once self::$PLUGIN_DIR . '/include/class-bulk-delete-system-info.php';
203
+ require_once self::$PLUGIN_DIR . '/include/class-bulk-delete-util.php';
204
+ require_once self::$PLUGIN_DIR . '/include/class-bd-license.php';
205
+ require_once self::$PLUGIN_DIR . '/include/class-bd-license-handler.php';
206
+ require_once self::$PLUGIN_DIR . '/include/class-bd-edd-api-wrapper.php';
207
+ require_once self::$PLUGIN_DIR . '/include/class-bd-settings.php';
208
+ require_once self::$PLUGIN_DIR . '/include/admin-ui.php';
209
+ }
210
+
211
+ /**
212
+ * Loads the plugin language files
213
+ *
214
+ * @since 5.0
215
+ */
216
+ public function load_textdomain() {
217
+ // Load localization domain
218
+ $this->translations = dirname( plugin_basename( self::$PLUGIN_FILE ) ) . '/languages/';
219
+ load_plugin_textdomain( 'bulk-delete', false, $this->translations );
220
+ }
221
+
222
+ /**
223
+ * Loads the plugin's actions and hooks
224
+ *
225
+ * @access private
226
+ * @since 5.0
227
+ * @return void
228
+ */
229
+ private function setup_actions() {
230
+ add_action( 'admin_menu', array( &$this, 'add_menu' ) );
231
+ add_action( 'admin_init', array( &$this, 'request_handler' ) );
232
+ }
233
+
234
+ /**
235
+ * Add navigation menu
236
+ */
237
+ function add_menu() {
238
+ add_menu_page( __( 'Bulk Delete', 'bulk-delete' ) , __( 'Bulk Delete', 'bulk-delete' ), 'manage_options', self::POSTS_PAGE_SLUG, array( &$this, 'display_posts_page' ), 'dashicons-trash', '26.9966' );
239
+
240
+ $this->posts_page = add_submenu_page( self::POSTS_PAGE_SLUG, __( 'Bulk Delete Posts', 'bulk-delete' ), __( 'Bulk Delete Posts', 'bulk-delete' ), 'delete_posts', self::POSTS_PAGE_SLUG, array( &$this, 'display_posts_page' ) );
241
+ $this->pages_page = add_submenu_page( self::POSTS_PAGE_SLUG, __( 'Bulk Delete Pages', 'bulk-delete' ), __( 'Bulk Delete Pages', 'bulk-delete' ), 'delete_pages', self::PAGES_PAGE_SLUG, array( &$this, 'display_pages_page' ) );
242
+ $this->users_page = add_submenu_page( self::POSTS_PAGE_SLUG, __( 'Bulk Delete Users', 'bulk-delete' ), __( 'Bulk Delete Users', 'bulk-delete' ), 'delete_users', self::USERS_PAGE_SLUG, array( &$this, 'display_users_page' ) );
243
+ $this->cron_page = add_submenu_page( self::POSTS_PAGE_SLUG, __( 'Bulk Delete Schedules', 'bulk-delete' ), __( 'Schedules', 'bulk-delete' ), 'delete_posts', self::CRON_PAGE_SLUG, array( &$this, 'display_cron_page' ) );
244
+ $this->addon_page = add_submenu_page( self::POSTS_PAGE_SLUG, __( 'Addon Licenses', 'bulk-delete' ), __( 'Addon Licenses', 'bulk-delete' ), 'activate_plugins', self::ADDON_PAGE_SLUG, array( 'BD_License', 'display_addon_page' ) );
245
+ $this->info_page = add_submenu_page( self::POSTS_PAGE_SLUG, __( 'Bulk Delete System Info', 'bulk-delete' ), __( 'System Info', 'bulk-delete' ), 'manage_options', self::INFO_PAGE_SLUG, array( 'Bulk_Delete_System_Info', 'display_system_info' ) );
246
+
247
+ // enqueue JavaScript
248
+ add_action( 'admin_print_scripts-' . $this->posts_page, array( &$this, 'add_script') );
249
+ add_action( 'admin_print_scripts-' . $this->pages_page, array( &$this, 'add_script') );
250
+ add_action( 'admin_print_scripts-' . $this->users_page, array( &$this, 'add_script') );
251
+
252
+ // delete posts page
253
+ add_action( "load-{$this->posts_page}", array( &$this, 'add_delete_posts_settings_panel' ) );
254
+ add_action( "add_meta_boxes_{$this->posts_page}", array( &$this, 'add_delete_posts_meta_boxes' ) );
255
+
256
+ // delete pages page
257
+ add_action( "load-{$this->pages_page}", array( &$this, 'add_delete_pages_settings_panel' ) );
258
+ add_action( "add_meta_boxes_{$this->pages_page}", array( &$this, 'add_delete_pages_meta_boxes' ) );
259
+
260
+ // delete users page
261
+ add_action( "load-{$this->users_page}", array( &$this, 'add_delete_users_settings_panel' ) );
262
+ add_action( "add_meta_boxes_{$this->users_page}", array( &$this, 'add_delete_users_meta_boxes' ) );
263
+ }
264
+
265
+ /**
266
+ * Add settings Panel for delete posts page
267
+ */
268
+ function add_delete_posts_settings_panel() {
269
+
270
+ /**
271
+ * Create the WP_Screen object using page handle
272
+ */
273
+ $this->delete_posts_screen = WP_Screen::get($this->posts_page);
274
+
275
+ /**
276
+ * Content specified inline
277
+ */
278
+ $this->delete_posts_screen->add_help_tab(
279
+ array(
280
+ 'title' => __('About Plugin', 'bulk-delete'),
281
+ 'id' => 'about_tab',
282
+ 'content' => '<p>' . __('This plugin allows you to delete posts in bulk from selected categories, tags, custom taxonomies or by post status like drafts, pending posts, scheduled posts etc.', 'bulk-delete') . '</p>',
283
+ 'callback' => false
284
+ )
285
+ );
286
+
287
+ // Add help sidebar
288
+ $this->delete_posts_screen->set_help_sidebar(
289
+ '<p><strong>' . __('More information', 'bulk-delete') . '</strong></p>' .
290
+ '<p><a href = "http://sudarmuthu.com/wordpress/bulk-delete">' . __('Plugin Homepage/support', 'bulk-delete') . '</a></p>' .
291
+ '<p><a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons">' . __("Buy pro addons", 'bulk-delete') . '</a></p>' .
292
+ '<p><a href = "http://sudarmuthu.com/blog">' . __("Plugin author's blog", 'bulk-delete') . '</a></p>' .
293
+ '<p><a href = "http://sudarmuthu.com/wordpress/">' . __("Other Plugin's by Author", 'bulk-delete') . '</a></p>'
294
+ );
295
+
296
+ /* Trigger the add_meta_boxes hooks to allow meta boxes to be added */
297
+ do_action('add_meta_boxes_' . $this->posts_page, null);
298
+ do_action('add_meta_boxes', $this->posts_page, null);
299
+
300
+ /* Enqueue WordPress' script for handling the meta boxes */
301
+ wp_enqueue_script('postbox');
302
+ }
303
+
304
+ /**
305
+ * Register meta boxes for delete posts page
306
+ */
307
+ function add_delete_posts_meta_boxes() {
308
+ add_meta_box( self::BOX_POST_STATUS, __( 'By Post Status', 'bulk-delete' ), 'Bulk_Delete_Posts::render_delete_posts_by_status_box', $this->posts_page, 'advanced' );
309
+ add_meta_box( self::BOX_CATEGORY, __( 'By Category', 'bulk-delete' ), 'Bulk_Delete_Posts::render_delete_posts_by_category_box', $this->posts_page, 'advanced' );
310
+ add_meta_box( self::BOX_TAG, __( 'By Tag', 'bulk-delete' ), 'Bulk_Delete_Posts::render_delete_posts_by_tag_box', $this->posts_page, 'advanced' );
311
+ add_meta_box( self::BOX_TAX, __( 'By Custom Taxonomy', 'bulk-delete' ), 'Bulk_Delete_Posts::render_delete_posts_by_taxonomy_box', $this->posts_page, 'advanced' );
312
+ add_meta_box( self::BOX_POST_TYPE, __( 'By Custom Post Types', 'bulk-delete' ), 'Bulk_Delete_Posts::render_delete_posts_by_post_type_box', $this->posts_page, 'advanced' );
313
+ add_meta_box( self::BOX_URL, __( 'By URL', 'bulk-delete' ), 'Bulk_Delete_Posts::render_delete_posts_by_url_box', $this->posts_page, 'advanced' );
314
+ add_meta_box( self::BOX_POST_REVISION, __( 'By Post Revision', 'bulk-delete' ), 'Bulk_Delete_Posts::render_posts_by_revision_box', $this->posts_page, 'advanced' );
315
+ add_meta_box( self::BOX_CUSTOM_FIELD, __( 'By Custom Field', 'bulk-delete' ), 'Bulk_Delete_Posts::render_delete_posts_by_custom_field_box', $this->posts_page, 'advanced' );
316
+ add_meta_box( self::BOX_TITLE, __( 'By Title', 'bulk-delete' ), 'Bulk_Delete_Posts::render_delete_posts_by_title_box', $this->posts_page, 'advanced' );
317
+ add_meta_box( self::BOX_DUPLICATE_TITLE, __( 'By Duplicate Title', 'bulk-delete' ), 'Bulk_Delete_Posts::render_delete_posts_by_duplicate_title_box', $this->posts_page, 'advanced' );
318
+ }
319
+
320
+ /**
321
+ * Setup settings panel for delete pages page
322
+ *
323
+ * @since 5.0
324
+ */
325
+ function add_delete_pages_settings_panel() {
326
+
327
+ /**
328
+ * Create the WP_Screen object using page handle
329
+ */
330
+ $this->delete_pages_screen = WP_Screen::get( $this->pages_page );
331
+
332
+ /**
333
+ * Content specified inline
334
+ */
335
+ $this->delete_pages_screen->add_help_tab(
336
+ array(
337
+ 'title' => __('About Plugin', 'bulk-delete'),
338
+ 'id' => 'about_tab',
339
+ 'content' => '<p>' . __('This plugin allows you to delete posts in bulk from selected categories, tags, custom taxonomies or by post status like drafts, pending posts, scheduled posts etc.', 'bulk-delete') . '</p>',
340
+ 'callback' => false
341
+ )
342
+ );
343
+
344
+ // Add help sidebar
345
+ $this->delete_pages_screen->set_help_sidebar(
346
+ '<p><strong>' . __('More information', 'bulk-delete') . '</strong></p>' .
347
+ '<p><a href = "http://sudarmuthu.com/wordpress/bulk-delete">' . __('Plugin Homepage/support', 'bulk-delete') . '</a></p>' .
348
+ '<p><a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons">' . __("Buy pro addons", 'bulk-delete') . '</a></p>' .
349
+ '<p><a href = "http://sudarmuthu.com/blog">' . __("Plugin author's blog", 'bulk-delete') . '</a></p>' .
350
+ '<p><a href = "http://sudarmuthu.com/wordpress/">' . __("Other Plugin's by Author", 'bulk-delete') . '</a></p>'
351
+ );
352
+
353
+ /* Trigger the add_meta_boxes hooks to allow meta boxes to be added */
354
+ do_action('add_meta_boxes_' . $this->pages_page, null);
355
+ do_action('add_meta_boxes', $this->pages_page, null);
356
+
357
+ /* Enqueue WordPress' script for handling the meta boxes */
358
+ wp_enqueue_script('postbox');
359
+ }
360
+
361
+ /**
362
+ * Register meta boxes for delete pages page
363
+ *
364
+ * @since 5.0
365
+ */
366
+ function add_delete_pages_meta_boxes() {
367
+ add_meta_box( self::BOX_PAGE_STATUS, __( 'By Page status', 'bulk-delete' ), 'Bulk_Delete_Pages::render_delete_pages_by_status_box', $this->pages_page, 'advanced' );
368
+ }
369
+
370
+ /**
371
+ * Add settings Panel for delete users page
372
+ */
373
+ function add_delete_users_settings_panel() {
374
+
375
+ /**
376
+ * Create the WP_Screen object using page handle
377
+ */
378
+ $this->delete_users_screen = WP_Screen::get( $this->users_page );
379
+
380
+ /**
381
+ * Content specified inline
382
+ */
383
+ $this->delete_users_screen->add_help_tab(
384
+ array(
385
+ 'title' => __('About Plugin', 'bulk-delete'),
386
+ 'id' => 'about_tab',
387
+ 'content' => '<p>' . __('This plugin allows you to delete posts in bulk from selected categories, tags, custom taxonomies or by post status like drafts, pending posts, scheduled posts etc.', 'bulk-delete') . '</p>',
388
+ 'callback' => false
389
+ )
390
+ );
391
+
392
+ // Add help sidebar
393
+ $this->delete_users_screen->set_help_sidebar(
394
+ '<p><strong>' . __('More information', 'bulk-delete') . '</strong></p>' .
395
+ '<p><a href = "http://sudarmuthu.com/wordpress/bulk-delete">' . __('Plugin Homepage/support', 'bulk-delete') . '</a></p>' .
396
+ '<p><a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons">' . __("Buy pro addons", 'bulk-delete') . '</a></p>' .
397
+ '<p><a href = "http://sudarmuthu.com/blog">' . __("Plugin author's blog", 'bulk-delete') . '</a></p>' .
398
+ '<p><a href = "http://sudarmuthu.com/wordpress/">' . __("Other Plugin's by Author", 'bulk-delete') . '</a></p>'
399
+ );
400
+
401
+ /* Trigger the add_meta_boxes hooks to allow meta boxes to be added */
402
+ do_action('add_meta_boxes_' . $this->users_page, null);
403
+ do_action('add_meta_boxes', $this->users_page, null);
404
+
405
+ /* Enqueue WordPress' script for handling the meta boxes */
406
+ wp_enqueue_script('postbox');
407
+ }
408
+
409
+ /**
410
+ * Register meta boxes for delete users page
411
+ */
412
+ function add_delete_users_meta_boxes() {
413
+ add_meta_box( self::BOX_USERS, __( 'By User Role', 'bulk-delete' ), 'Bulk_Delete_Users::render_delete_users_by_role_box', $this->users_page, 'advanced' );
414
+ }
415
+
416
+ /**
417
+ * Enqueue JavaScript
418
+ */
419
+ function add_script() {
420
+ global $wp_scripts;
421
+
422
+ // uses code from http://trentrichardson.com/examples/timepicker/
423
+ wp_enqueue_script( 'jquery-ui-timepicker', plugins_url( '/js/jquery-ui-timepicker.js', __FILE__ ), array( 'jquery-ui-slider', 'jquery-ui-datepicker' ), '1.4', true );
424
+ wp_enqueue_script( self::JS_HANDLE, plugins_url('/js/bulk-delete.js', __FILE__), array('jquery-ui-timepicker'), self::VERSION, TRUE);
425
+
426
+ $ui = $wp_scripts->query('jquery-ui-core');
427
+
428
+ $url = "http://ajax.aspnetcdn.com/ajax/jquery.ui/{$ui->ver}/themes/smoothness/jquery-ui.css";
429
+ wp_enqueue_style('jquery-ui-smoothness', $url, false, $ui->ver);
430
+ wp_enqueue_style('jquery-ui-timepicker', plugins_url('/style/jquery-ui-timepicker.css', __FILE__), array(), '1.1.1');
431
+
432
+ // JavaScript messages
433
+ $msg = array(
434
+ 'deletewarning' => __('Are you sure you want to delete all the selected posts', 'bulk-delete'),
435
+ 'deletewarningusers' => __( 'Are you sure you want to delete all the selected users', 'bulk-delete' )
436
+ );
437
+
438
+ $error = array(
439
+ 'selectone' => __( 'Please select posts from at least one option', 'bulk-delete' ),
440
+ 'enterurl' => __( 'Please enter at least one page url', 'bulk-delete' ),
441
+ 'enter_cf_key' => __( 'Please enter some value for custom field key', 'bulk-delete' ),
442
+ 'enter_title' => __( 'Please enter some value for title', 'bulk-delete' )
443
+ );
444
+
445
+ $translation_array = array( 'msg' => $msg, 'error' => $error );
446
+ wp_localize_script( self::JS_HANDLE, self::JS_VARIABLE, $translation_array );
447
+ }
448
+
449
+ /**
450
+ * Show the delete posts page
451
+ */
452
+ function display_posts_page() {
453
+ ?>
454
+ <div class="wrap">
455
+ <h2><?php _e('Bulk Delete Posts', 'bulk-delete');?></h2>
456
+ <?php settings_errors(); ?>
457
+
458
+ <form method = "post">
459
+ <?php
460
+ // nonce for bulk delete
461
+ wp_nonce_field( 'sm-bulk-delete-posts', 'sm-bulk-delete-posts-nonce' );
462
+
463
+ /* Used to save closed meta boxes and their order */
464
+ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
465
+ wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
466
+ ?>
467
+ <div id = "poststuff">
468
+ <div id="post-body" class="metabox-holder columns-2">
469
+
470
+ <div id="post-body-content">
471
+ <div class="updated" >
472
+ <p><strong><?php _e("WARNING: Posts deleted once cannot be retrieved back. Use with caution.", 'bulk-delete'); ?></strong></p>
473
+ </div>
474
+ </div><!-- #post-body-content -->
475
+
476
+ <div id="postbox-container-1" class="postbox-container">
477
+ <iframe frameBorder="0" height = "1300" src = "http://sudarmuthu.com/projects/wordpress/bulk-delete/sidebar.php?color=<?php echo get_user_option( 'admin_color' ); ?>&version=<?php echo self::VERSION; ?>"></iframe>
478
+ </div>
479
+
480
+ <div id="postbox-container-2" class="postbox-container">
481
+ <?php do_meta_boxes( '', 'advanced', null ); ?>
482
+ </div> <!-- #postbox-container-2 -->
483
+
484
+ </div> <!-- #post-body -->
485
+ </div><!-- #poststuff -->
486
+ </form>
487
+ </div><!-- .wrap -->
488
+
489
+ <?php
490
+ /**
491
+ * Runs just before displaying the footer text in the "Bulk Delete Posts" admin page.
492
+ *
493
+ * This action is primarily for adding extra content in the footer of "Bulk Delete Posts" admin page.
494
+ *
495
+ * @since 5.0
496
+ */
497
+ do_action( 'bd_admin_footer_posts_page' );
498
+ }
499
+
500
+ /**
501
+ * Display the delete pages page
502
+ *
503
+ * @since 5.0
504
+ */
505
+ function display_pages_page() {
506
+ ?>
507
+ <div class="wrap">
508
+ <h2><?php _e( 'Bulk Delete Pages', 'bulk-delete' );?></h2>
509
+ <?php settings_errors(); ?>
510
+
511
+ <form method = "post">
512
+ <?php
513
+ // nonce for bulk delete
514
+ wp_nonce_field( 'sm-bulk-delete-pages', 'sm-bulk-delete-pages-nonce' );
515
+
516
+ /* Used to save closed meta boxes and their order */
517
+ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
518
+ wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
519
+ ?>
520
+ <div id = "poststuff">
521
+ <div id="post-body" class="metabox-holder columns-2">
522
+
523
+ <div id="post-body-content">
524
+ <div class = "updated">
525
+ <p><strong><?php _e( 'WARNING: Pages deleted once cannot be retrieved back. Use with caution.', 'bulk-delete' ); ?></strong></p>
526
+ </div>
527
+ </div><!-- #post-body-content -->
528
+
529
+ <div id="postbox-container-1" class="postbox-container">
530
+ <iframe frameBorder="0" height = "1300" src = "http://sudarmuthu.com/projects/wordpress/bulk-delete/sidebar.php?color=<?php echo get_user_option( 'admin_color' ); ?>&version=<?php echo self::VERSION; ?>"></iframe>
531
+ </div>
532
+
533
+ <div id="postbox-container-2" class="postbox-container">
534
+ <?php do_meta_boxes( '', 'advanced', null ); ?>
535
+ </div> <!-- #postbox-container-2 -->
536
+
537
+ </div> <!-- #post-body -->
538
+ </div><!-- #poststuff -->
539
+ </form>
540
+ </div><!-- .wrap -->
541
+
542
+ <?php
543
+ /**
544
+ * Runs just before displaying the footer text in the "Bulk Delete Pages" admin page.
545
+ *
546
+ * This action is primarily for adding extra content in the footer of "Bulk Delete Pages" admin page.
547
+ *
548
+ * @since 5.0
549
+ */
550
+ do_action( 'bd_admin_footer_pages_page' );
551
+ }
552
+
553
+ /**
554
+ * Display bulk delete users page
555
+ */
556
+ function display_users_page() {
557
+ ?>
558
+ <div class="wrap">
559
+ <h2><?php _e('Bulk Delete Users', 'bulk-delete');?></h2>
560
+ <?php settings_errors(); ?>
561
+
562
+ <form method = "post">
563
+ <?php
564
+ // nonce for bulk delete
565
+ wp_nonce_field( 'sm-bulk-delete-users', 'sm-bulk-delete-users-nonce' );
566
+
567
+ /* Used to save closed meta boxes and their order */
568
+ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
569
+ wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
570
+ ?>
571
+ <div id = "poststuff">
572
+ <div id="post-body" class="metabox-holder columns-2">
573
+
574
+ <div id="post-body-content">
575
+ <div class = "updated">
576
+ <p><strong><?php _e("WARNING: Users deleted once cannot be retrieved back. Use with caution.", 'bulk-delete'); ?></strong></p>
577
+ </div>
578
+ </div><!-- #post-body-content -->
579
+
580
+ <div id="postbox-container-1" class="postbox-container">
581
+ <iframe frameBorder="0" height = "1300" src = "http://sudarmuthu.com/projects/wordpress/bulk-delete/sidebar.php?color=<?php echo get_user_option( 'admin_color' ); ?>&version=<?php echo self::VERSION; ?>"></iframe>
582
+ </div>
583
+
584
+ <div id="postbox-container-2" class="postbox-container">
585
+ <?php do_meta_boxes( '', 'advanced', null ); ?>
586
+ </div> <!-- #postbox-container-2 -->
587
+
588
+ </div> <!-- #post-body -->
589
+ </div><!-- #poststuff -->
590
+ </form>
591
+ </div><!-- .wrap -->
592
+
593
+ <?php
594
+ /**
595
+ * Runs just before displaying the footer text in the "Bulk Delete Users" admin page.
596
+ *
597
+ * This action is primarily for adding extra content in the footer of "Bulk Delete Users" admin page.
598
+ *
599
+ * @since 5.0
600
+ */
601
+ do_action( 'bd_admin_footer_users_page' );
602
+ }
603
+
604
+ /**
605
+ * Display the schedule page
606
+ */
607
+ function display_cron_page() {
608
+
609
+ if(!class_exists('WP_List_Table')){
610
+ require_once( ABSPATH . WPINC . '/class-wp-list-table.php' );
611
+ }
612
+
613
+ if ( !class_exists( 'Cron_List_Table' ) ) {
614
+ require_once self::$PLUGIN_DIR . '/include/class-cron-list-table.php';
615
+ }
616
+
617
+ //Prepare Table of elements
618
+ $cron_list_table = new Cron_List_Table();
619
+ $cron_list_table->prepare_items();
620
+ ?>
621
+ <div class="wrap">
622
+ <h2><?php _e('Bulk Delete Schedules', 'bulk-delete');?></h2>
623
+ <?php settings_errors(); ?>
624
+ <?php
625
+ //Table of elements
626
+ $cron_list_table->display();
627
+ ?>
628
+ </div>
629
+ <?php
630
+ /**
631
+ * Runs just before displaying the footer text in the "Schedules" admin page.
632
+ *
633
+ * This action is primarily for adding extra content in the footer of "Schedules" admin page.
634
+ *
635
+ * @since 5.0
636
+ */
637
+ do_action( 'bd_admin_footer_cron_page' );
638
+ }
639
+
640
+ /**
641
+ * Handle both POST and GET requests
642
+ *
643
+ * This method automatically triggers all the actions
644
+ */
645
+ function request_handler() {
646
+
647
+ if ( isset( $_POST['bd_action'] ) ) {
648
+ if ( 'delete_pages_' === substr( $_POST['bd_action'], 0, strlen('delete_pages_') ) &&
649
+ !check_admin_referer( 'sm-bulk-delete-pages', 'sm-bulk-delete-pages-nonce' ) ) {
650
+ return FALSE;
651
+ }
652
+
653
+ if ( 'delete_posts_' === substr( $_POST['bd_action'], 0, strlen('delete_posts_') ) &&
654
+ !check_admin_referer( 'sm-bulk-delete-posts', 'sm-bulk-delete-posts-nonce' ) ) {
655
+ return FALSE;
656
+ }
657
+
658
+ if ( 'delete_users_' === substr( $_POST['bd_action'], 0, strlen('delete_users_') ) &&
659
+ !check_admin_referer( 'sm-bulk-delete-users', 'sm-bulk-delete-users-nonce' ) ) {
660
+ return FALSE;
661
+ }
662
+
663
+ do_action( 'bd_' . $_POST['bd_action'], $_POST );
664
+ }
665
+
666
+ if ( isset( $_GET['bd_action'] ) ) {
667
+ do_action( 'bd_' . $_GET['bd_action'], $_GET );
668
+ }
669
+
670
+ }
671
+ }
672
+
673
+ endif; // End if class_exists check
674
+
675
+ /**
676
+ * The main function responsible for returning the one true Bulk_Delete
677
+ * Instance to functions everywhere.
678
+ *
679
+ * Use this function like you would a global variable, except without needing
680
+ * to declare the global.
681
+ *
682
+ * Example: <?php $bulk_delete = BULK_DELETE(); ?>
683
+ *
684
+ * @since 5.0
685
+ * @return object The one true Bulk_Delete Instance
686
+ */
687
+ function BULK_DELETE() {
688
+ return Bulk_Delete::instance();
689
+ }
690
+
691
+ // Get BULK_DELETE Running
692
+ BULK_DELETE();
693
+ ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
include/admin-ui.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Customize admin UI for Bulk Delete plugin
4
+ *
5
+ * @package Bulk_Delete
6
+ * @subpackage admin
7
+ * @author Sudar
8
+ * @since 5.0
9
+ */
10
+
11
+ /**
12
+ * Add rating links to the admin dashboard
13
+ *
14
+ * @since 5.0
15
+ * @param string $footer_text The existing footer text
16
+ * @return string
17
+ */
18
+ function bd_add_rating_link( $footer_text ) {
19
+ $rating_text = sprintf( __( 'Thank you for using <a href = "%1$s">Bulk Delete</a> plugin! Kindly <a href = "%2$s">rate us</a> at <a href = "%2$s">WordPress.org</a>', 'bulk-delete' ),
20
+ 'http://bulkwp.com',
21
+ 'http://wordpress.org/support/view/plugin-reviews/bulk-delete?filter=5#postform'
22
+ );
23
+
24
+ $rating_text = apply_filters( 'bd_rating_link', $rating_text );
25
+ return str_replace( '</span>', '', $footer_text ) . ' | ' . $rating_text . '</span>';
26
+ }
27
+
28
+ /**
29
+ * Modify admin footer in Bulk Delete plugin pages
30
+ *
31
+ * @since 5.0
32
+ */
33
+ function bd_modify_admin_footer() {
34
+ add_filter( 'admin_footer_text', 'bd_add_rating_link' );
35
+ }
36
+
37
+ /**
38
+ * Adds setting links in plugin listing page.
39
+ * Based on http://striderweb.com/nerdaphernalia/2008/06/wp-use-action-links/
40
+ *
41
+ * @param array $links List of current links
42
+ * @param string $file Plugin filename
43
+ * @return array $links Modified list of links
44
+ */
45
+ function bd_add_plugin_action_links( $links, $file ) {
46
+ $bd = BULK_DELETE();
47
+
48
+ $this_plugin = plugin_basename( $bd::$PLUGIN_FILE );
49
+
50
+ if ( $file == $this_plugin ) {
51
+ $delete_users_link = '<a href="admin.php?page=' . Bulk_Delete::USERS_PAGE_SLUG . '">' . __( 'Bulk Delete Users', 'bulk-delete' ) . '</a>';
52
+ array_unshift( $links, $delete_users_link ); // before other links
53
+
54
+ $delete_posts_link = '<a href="admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG . '">' . __( 'Bulk Delete Posts', 'bulk-delete' ) . '</a>';
55
+ array_unshift( $links, $delete_posts_link ); // before other links
56
+ }
57
+
58
+ return $links;
59
+ }
60
+
61
+ /**
62
+ * Add additional links in the Plugin listing page.
63
+ * Based on http://zourbuth.com/archives/751/creating-additional-wordpress-plugin-links-row-meta/
64
+ *
65
+ * @param array $links List of current links
66
+ * @param string $file Plugin filename
67
+ * @return array $links Modified list of links
68
+ */
69
+ function bd_add_links_in_plugin_listing( $links, $file ) {
70
+ $bd = BULK_DELETE();
71
+
72
+ $plugin = plugin_basename( $bd::$PLUGIN_FILE );
73
+
74
+ if ( $file == $plugin ) { // only for this plugin
75
+ return array_merge( $links, array(
76
+ '<a href="http://bulkwp.com/addons" target="_blank">' . __( 'Buy Addons', 'bulk-delete' ) . '</a>'
77
+ ) );
78
+ }
79
+
80
+ return $links;
81
+ }
82
+
83
+ // Modify admin footer
84
+ add_action( 'bd_admin_footer_posts_page', 'bd_modify_admin_footer' );
85
+ add_action( 'bd_admin_footer_pages_page', 'bd_modify_admin_footer' );
86
+ add_action( 'bd_admin_footer_users_page', 'bd_modify_admin_footer' );
87
+ add_action( 'bd_admin_footer_cron_page' , 'bd_modify_admin_footer' );
88
+ add_action( 'bd_admin_footer_addon_page', 'bd_modify_admin_footer' );
89
+ add_action( 'bd_admin_footer_info_page' , 'bd_modify_admin_footer' );
90
+
91
+ // Change plugin listing page
92
+ add_filter( 'plugin_action_links', 'bd_add_plugin_action_links', 10, 2 );
93
+ add_filter( 'plugin_row_meta', 'bd_add_links_in_plugin_listing', 10, 2 );
94
+ ?>
include/class-bd-edd-api-wrapper.php ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Wrapper for EDD API
4
+ *
5
+ * @package Bulk_Delete
6
+ * @subpackage EDD
7
+ * @author Sudar
8
+ * @since 5.0
9
+ */
10
+ class BD_EDD_API_Wrapper {
11
+
12
+ /**
13
+ * Store url
14
+ *
15
+ * @since 5.0
16
+ */
17
+ const STORE_URL = 'http://bulkwp.com';
18
+
19
+ /**
20
+ * Check license
21
+ *
22
+ * @since 5.0
23
+ * @static
24
+ * @param string $addon Addon name
25
+ * @param string $license The license code
26
+ * @return bool|array False if request fails, API response otherwise
27
+ */
28
+ public static function check_license( $addon, $license ) {
29
+ $api_params = array(
30
+ 'edd_action'=> 'check_license',
31
+ 'license' => trim( $license ),
32
+ 'item_name' => urlencode( $addon ),
33
+ 'url' => home_url()
34
+ );
35
+
36
+ $license_data = array(
37
+ 'license' => $license,
38
+ 'item_name' => $addon,
39
+ 'validity' => 'invalid'
40
+ );
41
+
42
+ $response = self::call_edd_api( $api_params );
43
+
44
+ if ( $response && isset( $response->license ) ) {
45
+ if ( 'valid' == $response->license ) {
46
+ $license_data['license'] = $license;
47
+ $license_data['validity'] = 'valid';
48
+ $license_data['expires'] = $response->expires;
49
+ $license_data['addon-name'] = $response->item_name;
50
+ } elseif ( 'invalid' == $response->license ) {
51
+ $license_data['validity'] = 'invalid';
52
+ } elseif ( 'site_inactive' == $response->license ) {
53
+ $license_data['validity'] = 'invalid';
54
+ }
55
+
56
+ return $license_data;
57
+ }
58
+
59
+ return FALSE;
60
+ }
61
+
62
+ /**
63
+ * Activate license
64
+ *
65
+ * @since 5.0
66
+ * @static
67
+ * @param string $addon The addon that needs to be activated
68
+ * @param string $license The license code
69
+ * @return bool|array False if request fails, License info otherwise
70
+ */
71
+ public static function activate_license( $addon, $license ) {
72
+ $api_params = array(
73
+ 'edd_action'=> 'activate_license',
74
+ 'license' => trim( $license ),
75
+ 'item_name' => urlencode( $addon ),
76
+ 'url' => home_url()
77
+ );
78
+
79
+ $response = self::call_edd_api( $api_params );
80
+
81
+ if ( $response && isset( $response->success ) ) {
82
+ if ( 'true' == $response->success ) {
83
+ return array(
84
+ 'license' => $license,
85
+ 'validity' => 'valid',
86
+ 'expires' => $response->expires,
87
+ 'addon-name' => $response->item_name
88
+ );
89
+ } else {
90
+ $err_response = array(
91
+ 'validity' => 'invalid'
92
+ );
93
+
94
+ if ( isset( $response->error ) ) {
95
+ $err_response['error'] = $response->error;
96
+ }
97
+
98
+ return $err_response;
99
+ }
100
+ }
101
+
102
+ return FALSE;
103
+ }
104
+
105
+ /**
106
+ * Deactivate License
107
+ *
108
+ * @since 5.0
109
+ * @static
110
+ * @param string $addon The addon that needs to be deactivated
111
+ * @param string $license The license code
112
+ * @return bool True if deactivated, False otherwise
113
+ */
114
+ public static function deactivate_license( $addon, $license ) {
115
+ $api_params = array(
116
+ 'edd_action'=> 'deactivate_license',
117
+ 'license' => trim( $license ),
118
+ 'item_name' => urlencode( $addon ),
119
+ 'url' => home_url()
120
+ );
121
+
122
+ $response = self::call_edd_api( $api_params );
123
+
124
+ if ( $response && isset( $response->license ) ) {
125
+ if ( 'deactivated' == $response->license ) {
126
+ return TRUE;
127
+ }
128
+ }
129
+
130
+ return FALSE;
131
+ }
132
+
133
+ /**
134
+ * Call the EDD API
135
+ *
136
+ * @since 5.0
137
+ * @static
138
+ * @access private
139
+ * @param array $api_params Parameters for API
140
+ * @return bool|array $license_data False if request fails, API response otherwise
141
+ */
142
+ private static function call_edd_api( $api_params ) {
143
+ $response = wp_remote_get( add_query_arg( $api_params, self::STORE_URL ), array( 'timeout' => 15, 'sslverify' => false ) );
144
+
145
+ // make sure the response came back okay
146
+ if ( is_wp_error( $response ) ) {
147
+ return false;
148
+ }
149
+
150
+ $license_object = json_decode( wp_remote_retrieve_body( $response ) );
151
+ return $license_object;
152
+ }
153
+ }
154
+ ?>
include/class-bd-license-handler.php ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * License Handler for Bulk Delete Addons
4
+ *
5
+ * @package Bulk_Delete
6
+ * @subpackage License
7
+ * @author Sudar
8
+ * @since 5.0
9
+ */
10
+ class BD_License_Handler {
11
+
12
+ /**
13
+ * Name of the addon
14
+ *
15
+ * @since 5.0
16
+ */
17
+ private $addon_name;
18
+
19
+ /**
20
+ * Code of the addon
21
+ *
22
+ * @since 5.0
23
+ */
24
+ private $addon_code;
25
+
26
+ /**
27
+ * Version of the plugin
28
+ *
29
+ * @since 5.0
30
+ */
31
+ private $version;
32
+
33
+ /**
34
+ * plugin file name
35
+ *
36
+ * @since 5.0
37
+ */
38
+ private $plugin_file;
39
+
40
+ /**
41
+ * Author of the plugin
42
+ *
43
+ * @since 5.0
44
+ */
45
+ private $author;
46
+
47
+ /**
48
+ * Constructor
49
+ *
50
+ * @since 5.0
51
+ *
52
+ * @param string $addon_name Name of the addon
53
+ * @param string $addon_code Code of the addon
54
+ * @param string $version Version of the addon
55
+ * @param string $plugin_file Addon file name
56
+ * @param string $author Author of the addon
57
+ */
58
+ function __construct( $addon_name, $addon_code, $version, $plugin_file, $author = 'Sudar Muthu' ) {
59
+
60
+ $this->addon_name = $addon_name;
61
+ $this->addon_code = $addon_code;
62
+ $this->version = $version;
63
+ $this->plugin_file = $plugin_file;
64
+ $this->author = $author;
65
+
66
+ $this->hooks();
67
+
68
+ if ( BD_License::has_valid_license( $this->addon_name, $this->addon_code ) ) {
69
+ $license_code = BD_License::get_license_code( $this->addon_code );
70
+ if ( FALSE != $license_code ) {
71
+ $this->hook_updater( $license_code );
72
+ }
73
+ }
74
+ }
75
+
76
+ /**
77
+ * Start the updater
78
+ *
79
+ * @since 5.0
80
+ * @access private
81
+ * @param string $license_code License Code
82
+ */
83
+ private function hook_updater( $license_code ) {
84
+ $bd = BULK_DELETE();
85
+
86
+ if( ! class_exists( 'EDD_SL_Plugin_Updater' ) ) {
87
+ require_once $bd::$PLUGIN_DIR . '/include/libraries/EDD_SL_Plugin_Updater.php';
88
+ }
89
+
90
+ $this->updater = new EDD_SL_Plugin_Updater( BD_EDD_API_Wrapper::STORE_URL, $this->plugin_file, array(
91
+ 'version' => rawurlencode( $this->version ),
92
+ 'license' => rawurlencode( $license_code ),
93
+ 'item_name' => rawurlencode( $this->addon_name ),
94
+ 'addon_code' => rawurlencode( $this->addon_code ),
95
+ 'author' => rawurlencode( $this->author ),
96
+ 'url' => rawurlencode( home_url() )
97
+ ));
98
+ }
99
+
100
+ /**
101
+ * setup hooks
102
+ *
103
+ * @access private
104
+ * @since 5.0
105
+ */
106
+ private function hooks() {
107
+ add_action( 'bd_license_form' , array( &$this, 'display_license_form' ) );
108
+ add_action( 'bd_license_field', array( &$this, 'add_license_field' ) );
109
+ add_filter( 'bd_license_input', array( &$this, 'parse_license_input' ), 1 );
110
+ }
111
+
112
+ /**
113
+ * Decide whether to display the license form or not
114
+ *
115
+ * @since 5.0
116
+ */
117
+ public function display_license_form() {
118
+ if ( ! BD_License::has_valid_license( $this->addon_name, $this->addon_code ) ) {
119
+ $bd = BULK_DELETE();
120
+ $bd->display_activate_license_form = TRUE;
121
+ }
122
+ }
123
+
124
+ /**
125
+ * Add the license field to license form
126
+ *
127
+ * @since 5.0
128
+ */
129
+ public function add_license_field() {
130
+ if ( ! BD_License::has_valid_license( $this->addon_name, $this->addon_code ) ) {
131
+ $bd = BULK_DELETE();
132
+
133
+ add_settings_field(
134
+ $this->addon_code, // ID
135
+ '"' . $this->addon_name . '" ' . __( 'Addon License Key', 'bulk-delete' ), // Title
136
+ array( &$this, 'print_license_key_field' ), // Callback
137
+ $bd::ADDON_PAGE_SLUG, // Page
138
+ $bd::SETTING_SECTION_ID // Section
139
+ );
140
+ }
141
+ }
142
+
143
+ /**
144
+ * Print the license field
145
+ *
146
+ * @since 5.0
147
+ */
148
+ public function print_license_key_field() {
149
+ if ( ! BD_License::has_valid_license( $this->addon_name, $this->addon_code ) ) {
150
+ $bd = BULK_DELETE();
151
+
152
+ printf(
153
+ '<input type="text" id="%s" name="%s[%s]" placeholder="%s">',
154
+ $this->addon_code,
155
+ $bd::SETTING_OPTION_NAME,
156
+ $this->addon_code,
157
+ __( 'Enter license key', 'bulk-delete' )
158
+ );
159
+ }
160
+ }
161
+
162
+ /**
163
+ * Parse the license key and activate it if needed.
164
+ * If the key is invalid, then don't save it in the setting option
165
+ *
166
+ * @since 5.0
167
+ */
168
+ public function parse_license_input( $input ) {
169
+ if ( is_array( $input ) && key_exists( $this->addon_code, $input ) ) {
170
+ $license_code = trim( $input[ $this->addon_code ] );
171
+
172
+ if ( !empty( $license_code ) ) {
173
+ if ( ! BD_License::has_valid_license( $this->addon_name, $this->addon_code ) ) {
174
+ $activated = BD_License::activate_license( $this->addon_name, $this->addon_code, $license_code );
175
+ if ( !$activated ) {
176
+ unset( $input[ $this->addon_code ] );
177
+ }
178
+ }
179
+ } else {
180
+ unset( $input[ $this->addon_code ] );
181
+ }
182
+ } else {
183
+ if ( BD_License::has_valid_license( $this->addon_name, $this->addon_code ) ) {
184
+ $license_code = BD_License::get_license_code( $this->addon_code );
185
+ $input[ $this->addon_code ] = $license_code;
186
+ }
187
+ }
188
+ return $input;
189
+ }
190
+ }
191
+ ?>
include/class-bd-license.php ADDED
@@ -0,0 +1,436 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Addon license related functions
4
+ *
5
+ * @package Bulk_Delete
6
+ * @subpackage addon
7
+ * @author Sudar
8
+ * @since 5.0
9
+ */
10
+ class BD_License {
11
+ /**
12
+ * Output addon page content
13
+ *
14
+ * @since 5.0
15
+ * @static
16
+ */
17
+ public static function display_addon_page() {
18
+ if( !class_exists( 'WP_List_Table' ) ){
19
+ require_once( ABSPATH . WPINC . '/class-wp-list-table.php' );
20
+ }
21
+
22
+ if ( !class_exists( 'License_List_Table' ) ) {
23
+ require_once Bulk_Delete::$PLUGIN_DIR . '/include/class-license-list-table.php';
24
+ }
25
+
26
+ $license_list_table = new License_List_Table();
27
+ $license_list_table->prepare_items();
28
+ ?>
29
+ <div class="wrap">
30
+ <h2><?php _e( 'Addon Licenses', 'bulk-delete' );?></h2>
31
+ <?php settings_errors(); ?>
32
+ <form method="post" action="options.php">
33
+ <?php
34
+ $license_list_table->display();
35
+ do_action( 'bd_license_form' );
36
+ BD_License::display_available_addon_list();
37
+ ?>
38
+ </form>
39
+ </div>
40
+ <?php
41
+ /**
42
+ * Runs just before displaying the footer text in the "Addon" admin page.
43
+ *
44
+ * This action is primarily for adding extra content in the footer of "Addon" admin page.
45
+ *
46
+ * @since 5.0
47
+ */
48
+ do_action( 'bd_admin_footer_addon_page' );
49
+ }
50
+
51
+ /**
52
+ * Display License form
53
+ *
54
+ * @since 5.0
55
+ * @static
56
+ */
57
+ public static function display_activate_license_form() {
58
+ $bd = BULK_DELETE();
59
+ if ( isset( $bd->display_activate_license_form ) && TRUE == $bd->display_activate_license_form ) {
60
+ // This prints out all hidden setting fields
61
+ settings_fields( $bd::SETTING_OPTION_GROUP );
62
+ do_settings_sections( $bd::ADDON_PAGE_SLUG );
63
+ submit_button( __( 'Activate License', 'bulk-delete' ) );
64
+ }
65
+ }
66
+
67
+ /**
68
+ * Check if an addon has a valid license or not
69
+ *
70
+ * @since 5.0
71
+ * @static
72
+ * @param string $addon_name Addon Name
73
+ * @param string $addon_code Addon short Name
74
+ * @return bool True if addon has a valid license, False otherwise
75
+ */
76
+ public static function has_valid_license( $addon_name, $addon_code ) {
77
+ $bd = BULK_DELETE();
78
+ $key = Bulk_Delete::LICENSE_CACHE_KEY_PREFIX . $addon_code;
79
+ $license_data = get_option( $key, FALSE );
80
+
81
+ if ( ! $license_data ) {
82
+ // if data about license is not present, then fetch it.
83
+ // ideally this should not happen
84
+ $licenses = get_option( $bd::SETTING_OPTION_NAME );
85
+ if ( is_array( $licenses ) && key_exists( $addon_code, $licenses ) ) {
86
+ $license_data = BD_EDD_API_Wrapper::check_license( $addon_name, $licenses[ $addon_code ] );
87
+ update_option( $key, $license_data );
88
+ }
89
+ }
90
+
91
+ // TODO Encapsulate below code into a separate function
92
+ if ( $license_data && is_array( $license_data ) && key_exists( 'validity', $license_data ) ) {
93
+ if ( 'valid' == $license_data['validity'] ) {
94
+ if ( strtotime( 'now' ) < strtotime( $license_data['expires'] ) ) {
95
+ return TRUE;
96
+ } else {
97
+ $license_data['validity'] = 'expired';
98
+ update_option( $key, $license_data );
99
+ }
100
+ }
101
+ }
102
+
103
+ return FALSE;
104
+ }
105
+
106
+ /**
107
+ * Get the list of all licenses information to be displayed in the license page
108
+ *
109
+ * @since 5.0
110
+ * @static
111
+ * @return array $license_data License information
112
+ */
113
+ public static function get_licenses() {
114
+ $bd = BULK_DELETE();
115
+ $licenses = get_option( $bd::SETTING_OPTION_NAME );
116
+ $license_data = array();
117
+
118
+ if ( is_array( $licenses ) ) {
119
+ foreach ( $licenses as $addon_code => $license ) {
120
+ $license_data[ $addon_code ] = self::get_license( $addon_code, $license );
121
+ }
122
+ }
123
+
124
+ return $license_data;
125
+ }
126
+
127
+ /**
128
+ * Retrieve license information about an addon
129
+ *
130
+ * @since 5.0
131
+ * @static
132
+ * @param string $addon_code Addon short name
133
+ * @return object $license_data License information
134
+ */
135
+ public static function get_license( $addon_code ) {
136
+ $bd = BULK_DELETE();
137
+ $key = Bulk_Delete::LICENSE_CACHE_KEY_PREFIX . $addon_code;
138
+ $license_data = get_option( $key, FALSE );
139
+
140
+ if ( $license_data && is_array( $license_data ) && key_exists( 'validity', $license_data ) ) {
141
+ if ( 'valid' == $license_data['validity'] ) {
142
+ if ( strtotime( 'now' ) < strtotime( $license_data['expires'] ) ) {
143
+ // valid license
144
+ } else {
145
+ $license_data['validity'] = 'expired';
146
+ update_option( $key, $license_data );
147
+ }
148
+ }
149
+ }
150
+
151
+ return $license_data;
152
+ }
153
+
154
+ /**
155
+ * Get license code of an addon
156
+ *
157
+ * @since 5.0
158
+ * @static
159
+ * @param string $addon_code Addon code
160
+ * @return bool|string License code of the addon, False otherwise
161
+ */
162
+ public static function get_license_code( $addon_code ) {
163
+ $bd = BULK_DELETE();
164
+ $licenses = get_option( $bd::SETTING_OPTION_NAME );
165
+
166
+ if ( is_array($licenses ) && key_exists( $addon_code, $licenses ) ) {
167
+ return $licenses[ $addon_code ];
168
+ }
169
+ else {
170
+ return FALSE;
171
+ }
172
+ }
173
+
174
+ /**
175
+ * Deactivate license
176
+ *
177
+ * @since 5.0
178
+ * @static
179
+ */
180
+ public static function deactivate_license() {
181
+ if ( check_admin_referer( 'bd-deactivate-license', 'bd-deactivate-license-nonce' ) ) {
182
+ $bd = BULK_DELETE();
183
+ $msg = array( 'msg' => '', 'type' => 'error' );
184
+ $addon_code = $_GET['addon-code'];
185
+ $license_data = self::get_license( $addon_code );
186
+
187
+ $license = $license_data['license'];
188
+ $addon_name = $license_data['addon-name'];
189
+
190
+ $deactivated = BD_EDD_API_Wrapper::deactivate_license( $addon_name, $license );
191
+
192
+ if ( $deactivated ) {
193
+ self::delete_license_from_cache( $addon_code );
194
+ $msg['msg'] = sprintf( __( 'The license key for "%s" addon was successfully deactivated', 'bulk-delete' ), $addon_name );
195
+ $msg['type'] = 'updated';
196
+
197
+ } else {
198
+ self::validate_license( $addon_code, $addon_name );
199
+ $msg['msg'] = sprintf( __( 'There was some problem while trying to deactivate license key for "%s" addon. Kindly try again', 'bulk-delete' ), $addon_name );
200
+ }
201
+
202
+ add_settings_error(
203
+ $bd::ADDON_PAGE_SLUG,
204
+ 'license-deactivation',
205
+ $msg['msg'],
206
+ $msg['type']
207
+ );
208
+ }
209
+ }
210
+
211
+ /**
212
+ * Delete license
213
+ *
214
+ * @since 5.0
215
+ * @static
216
+ */
217
+ public static function delete_license() {
218
+ if ( check_admin_referer( 'bd-deactivate-license', 'bd-deactivate-license-nonce' ) ) {
219
+ $bd = BULK_DELETE();
220
+ $msg = array( 'msg' => '', 'type' => 'updated' );
221
+ $addon_code = $_GET['addon-code'];
222
+
223
+ self::delete_license_from_cache( $addon_code );
224
+
225
+ $msg['msg'] = __( 'The license key was successfully deleted', 'bulk-delete' );
226
+
227
+ add_settings_error(
228
+ $bd::ADDON_PAGE_SLUG,
229
+ 'license-deleted',
230
+ $msg['msg'],
231
+ $msg['type']
232
+ );
233
+ }
234
+ }
235
+
236
+ /**
237
+ * Delete license information from cache
238
+ *
239
+ * @since 5.0
240
+ * @static
241
+ * @param string $addon_code Addon code
242
+ */
243
+ private static function delete_license_from_cache( $addon_code ) {
244
+ $key = Bulk_Delete::LICENSE_CACHE_KEY_PREFIX . $addon_code;
245
+ delete_option( $key );
246
+
247
+ $licenses = get_option( Bulk_Delete::SETTING_OPTION_NAME );
248
+
249
+ if ( is_array( $licenses ) && key_exists( $addon_code, $licenses ) ) {
250
+ unset( $licenses[ $addon_code ] );
251
+ }
252
+ update_option( Bulk_Delete::SETTING_OPTION_NAME, $licenses );
253
+ }
254
+
255
+ /*
256
+ * Activate license
257
+ *
258
+ * @since 5.0
259
+ * @static
260
+ * @param string $addon_name Addon name
261
+ * @param string $addon_code Addon code
262
+ * @param string $license License code
263
+ * @return bool $valid True if valid, False otherwise
264
+ */
265
+ public static function activate_license( $addon_name, $addon_code, $license ) {
266
+ $license_data = BD_EDD_API_Wrapper::activate_license( $addon_name, $license );
267
+ $bd = BULK_DELETE();
268
+ $valid = FALSE;
269
+ $msg = array(
270
+ 'msg' => sprintf( __( 'There was some problem in contacting our store to activate the license key for "%s" addon', 'bulk-delete' ), $addon_name ),
271
+ 'type' => 'error'
272
+ );
273
+
274
+ if ( $license_data && is_array( $license_data ) && key_exists( 'validity', $license_data ) ) {
275
+ if ( 'valid' == $license_data['validity'] ) {
276
+ $key = Bulk_Delete::LICENSE_CACHE_KEY_PREFIX . $addon_code;
277
+ $license_data['addon-code'] = $addon_code;
278
+ update_option( $key, $license_data );
279
+
280
+ $msg['msg'] = sprintf( __( 'The license key for "%s" addon was successfully activated. The addon will get updates automatically till the license key is valid.', 'bulk-delete' ), $addon_name );
281
+ $msg['type'] = 'updated';
282
+ $valid = TRUE;
283
+ } else {
284
+ if ( key_exists( 'error', $license_data ) ) {
285
+ switch( $license_data['error'] ) {
286
+
287
+ case 'no_activations_left':
288
+ $msg['msg'] = sprintf( __( 'The license key for "%s" addon doesn\'t have any more activations left. Kindly buy a new license.', 'bulk-delete' ), $addon_name );
289
+ break;
290
+
291
+ case 'revoked':
292
+ $msg['msg'] = sprintf( __( 'The license key for "%s" addon is revoked. Kindly buy a new license.', 'bulk-delete' ), $addon_name );
293
+ break;
294
+
295
+ case 'expired':
296
+ $msg['msg'] = sprintf( __( 'The license key for "%s" addon has expired. Kindly buy a new license.', 'bulk-delete' ), $addon_name );
297
+ break;
298
+
299
+ default:
300
+ $msg['msg'] = sprintf( __( 'The license key for "%s" addon is invalid', 'bulk-delete' ), $addon_name );
301
+ break;
302
+ }
303
+ }
304
+ }
305
+ }
306
+
307
+ add_settings_error(
308
+ $bd::ADDON_PAGE_SLUG,
309
+ 'license-activation',
310
+ $msg['msg'],
311
+ $msg['type']
312
+ );
313
+
314
+ if ( !$valid && isset( $key ) ) {
315
+ delete_option( $key );
316
+ }
317
+ return $valid;
318
+ }
319
+
320
+ /**
321
+ * Validate the license for the given addon
322
+ *
323
+ * @since 5.0
324
+ * @static
325
+ * @param string $addon_name Addon name
326
+ * @param string $addon_code Addon code
327
+ */
328
+ public static function validate_license( $addon_code, $addon_name ) {
329
+ $key = Bulk_Delete::LICENSE_CACHE_KEY_PREFIX . $addon_code;
330
+
331
+ $licenses = get_option( Bulk_Delete::SETTING_OPTION_NAME );
332
+ if ( is_array( $licenses ) && key_exists( $addon_code, $licenses ) ) {
333
+ $license_data = BD_EDD_API_Wrapper::check_license( $addon_name, $licenses[ $addon_code ] );
334
+ if ( $license_data ) {
335
+ $license_data['addon-code'] = $addon_code;
336
+ $license_data['addon-name'] = $license_data['item_name'];
337
+ update_option( $key, $license_data );
338
+ } else {
339
+ delete_option( $key );
340
+ }
341
+ }
342
+
343
+ if ( $license_data && is_array( $license_data ) && key_exists( 'validity', $license_data ) ) {
344
+ if ( 'valid' == $license_data['validity'] ) {
345
+ if ( strtotime( 'now' ) > strtotime( $license_data['expires'] ) ) {
346
+ $license_data['validity'] = 'expired';
347
+ update_option( $key, $license_data );
348
+ }
349
+ }
350
+ }
351
+ }
352
+
353
+ /**
354
+ * Display information about all available addons
355
+ *
356
+ * @since 5.0
357
+ * @static
358
+ */
359
+ public static function display_available_addon_list() {
360
+
361
+ echo '<p>';
362
+ _e('The following are the list of pro addons that are currently available for purchase.', 'bulk-delete');
363
+ echo '</p>';
364
+
365
+ echo '<ul style="list-style:disc; padding-left:35px">';
366
+
367
+ echo '<li>';
368
+ echo '<strong>', __('Delete posts by custom field', 'bulk-delete'), '</strong>', ' - ';
369
+ echo __('Adds the ability to delete posts based on custom fields', 'bulk-delete');
370
+ echo ' <a href = "http://bulkwp.com/addons/bulk-delete-posts-by-custom-field/">', __('More Info', 'bulk-delete'), '</a>.';
371
+ echo '</li>';
372
+
373
+ echo '<li>';
374
+ echo '<strong>', __( 'Delete posts by duplicate title', 'bulk-delete' ), '</strong>', ' - ';
375
+ echo __( 'Adds the ability to delete posts based on duplicate title', 'bulk-delete' );
376
+ echo ' <a href = "http://bulkwp.com/addons/bulk-delete-posts-by-duplicate-title/">', __( 'More Info', 'bulk-delete' ), '</a>.';
377
+ echo '</li>';
378
+
379
+ echo '<li>';
380
+ echo '<strong>', __( 'Delete posts by title', 'bulk-delete' ), '</strong>', ' - ';
381
+ echo __( 'Adds the ability to delete posts based on title', 'bulk-delete' );
382
+ echo ' <a href = "http://bulkwp.com/addons/bulk-delete-posts-by-title/">', __( 'More Info', 'bulk-delete' ), '</a>.';
383
+ echo '</li>';
384
+
385
+ echo '<li>';
386
+ echo '<strong>', __('Scheduler for deleting Posts by Category', 'bulk-delete'), '</strong>', ' - ';
387
+ echo __('Adds the ability to schedule auto delete of posts based on category', 'bulk-delete');
388
+ echo ' <a href = "http://bulkwp.com/addons/scheduler-for-deleting-posts-by-category/">', __('More Info', 'bulk-delete'), '</a>.';
389
+ echo '</li>';
390
+
391
+ echo '<li>';
392
+ echo '<strong>', __('Scheduler for deleting Posts by Tag', 'bulk-delete'), '</strong>', ' - ';
393
+ echo __('Adds the ability to schedule auto delete of posts based on tag', 'bulk-delete');
394
+ echo ' <a href = "http://bulkwp.com/addons/scheduler-for-deleting-posts-by-tag/">', __('More Info', 'bulk-delete'), '</a>.';
395
+ echo '</li>';
396
+
397
+ echo '<li>';
398
+ echo '<strong>', __('Scheduler for deleting Posts by Custom Taxonomy', 'bulk-delete'), '</strong>', ' - ';
399
+ echo __('Adds the ability to schedule auto delete of posts based on custom taxonomy', 'bulk-delete');
400
+ echo ' <a href = "http://bulkwp.com/addons/scheduler-for-deleting-posts-by-taxonomy/">', __('More Info', 'bulk-delete'), '</a>.';
401
+ echo '</li>';
402
+
403
+ echo '<li>';
404
+ echo '<strong>', __('Scheduler for deleting Posts by Custom Post Type', 'bulk-delete'), '</strong>', ' - ';
405
+ echo __('Adds the ability to schedule auto delete of posts based on custom post type', 'bulk-delete');
406
+ echo ' <a href = "http://bulkwp.com/addons/scheduler-for-deleting-posts-by-post-type/">', __('More Info', 'bulk-delete'), '</a>.';
407
+ echo '</li>';
408
+
409
+ echo '<li>';
410
+ echo '<strong>', __('Scheduler for deleting Posts by Post Status', 'bulk-delete'), '</strong>', ' - ';
411
+ echo __('Adds the ability to schedule auto delete of posts based on post status like drafts, pending posts, scheduled posts etc.', 'bulk-delete');
412
+ echo ' <a href = "http://bulkwp.com/addons/scheduler-for-deleting-posts-by-status/">', __('More Info', 'bulk-delete'), '</a>.';
413
+ echo '</li>';
414
+
415
+ echo '<li>';
416
+ echo '<strong>', __('Scheduler for deleting Pages by Status', 'bulk-delete'), '</strong>', ' - ';
417
+ echo __('Adds the ability to schedule auto delete pages based on status', 'bulk-delete');
418
+ echo ' <a href = "http://bulkwp.com/addons/scheduler-for-deleting-pages-by-status/">', __('More Info', 'bulk-delete'), '</a>.';
419
+ echo '</li>';
420
+
421
+ echo '<li>';
422
+ echo '<strong>', __('Scheduler for deleting Users by User Role', 'bulk-delete'), '</strong>', ' - ';
423
+ echo __('Adds the ability to schedule auto delete of users based on user role', 'bulk-delete');
424
+ echo ' <a href = "http://bulkwp.com/addons/scheduler-for-deleting-users-by-role/">', __('More Info', 'bulk-delete'), '</a>.';
425
+ echo '</li>';
426
+
427
+ echo '</ul>';
428
+ }
429
+ }
430
+
431
+ // hooks
432
+ add_action( 'bd_license_form' , array( 'BD_License' , 'display_activate_license_form' ), 100 );
433
+ add_action( 'bd_deactivate_license' , array( 'BD_License' , 'deactivate_license' ) );
434
+ add_action( 'bd_delete_license' , array( 'BD_License' , 'delete_license' ) );
435
+ add_action( 'bd_validate_license' , array( 'BD_License' , 'validate_license' ), 10, 2 );
436
+ ?>
include/class-bd-settings.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Encapsulates the settings API for Bulk Delete Plugin
4
+ *
5
+ * @package Bulk_Delete
6
+ * @subpackage Settings
7
+ * @author Sudar
8
+ * @since 5.0
9
+ */
10
+ class BD_Settings {
11
+ /**
12
+ * Register settings used by the plugin
13
+ *
14
+ * @since 5.0
15
+ * @static
16
+ */
17
+ public static function create_settings() {
18
+ $bd = BULK_DELETE();
19
+
20
+ register_setting(
21
+ $bd::SETTING_OPTION_GROUP, // Option group
22
+ $bd::SETTING_OPTION_NAME, // Option name
23
+ array( 'BD_Settings', 'check_license' ) // Sanitize
24
+ );
25
+
26
+ add_settings_section(
27
+ $bd::SETTING_SECTION_ID, // ID
28
+ __( 'Add Addon License', 'bulk-delete' ), // Title
29
+ '__return_null', // Callback
30
+ $bd::ADDON_PAGE_SLUG // Page
31
+ );
32
+
33
+ /**
34
+ * Runs just after registering license form fields
35
+ *
36
+ * This action is primarily for adding more fields to the license form
37
+ * @since 5.0
38
+ */
39
+ do_action( 'bd_license_field' );
40
+ }
41
+
42
+ /**
43
+ * Callback for sanitizing settings
44
+ *
45
+ * @since 5.0
46
+ * @static
47
+ */
48
+ public static function check_license( $input ) {
49
+ /**
50
+ * Filter license form inputs
51
+ *
52
+ * @since 5.0
53
+ */
54
+ return apply_filters( 'bd_license_input', $input );
55
+ }
56
+ }
57
+
58
+ // hooks
59
+ add_action( 'admin_init', array( 'BD_Settings', 'create_settings' ), 100 );
60
+ ?>
include/class-bulk-delete-pages.php ADDED
@@ -0,0 +1,256 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Utility class for deleting pages
4
+ *
5
+ * @package Bulk_Delete
6
+ * @package Page
7
+ * @author Sudar
8
+ * @since 5.0
9
+ */
10
+ class Bulk_Delete_Pages {
11
+
12
+ /**
13
+ * Render delete pages by page status box
14
+ *
15
+ * @access public
16
+ * @static
17
+ * @since 5.0
18
+ */
19
+ public static function render_delete_pages_by_status_box() {
20
+
21
+ if ( Bulk_Delete_Util::is_pages_box_hidden( Bulk_Delete::BOX_PAGE_STATUS ) ) {
22
+ printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::PAGES_PAGE_SLUG );
23
+ return;
24
+ }
25
+
26
+ $pages_count = wp_count_posts( 'page' );
27
+ $pages = $pages_count->publish;
28
+ $page_drafts = $pages_count->draft;
29
+ $page_future = $pages_count->future;
30
+ $page_pending = $pages_count->pending;
31
+ $page_private = $pages_count->private;
32
+ ?>
33
+ <!-- Pages start-->
34
+ <h4><?php _e( 'Select the pages which you want to delete', 'bulk-delete' ); ?></h4>
35
+
36
+ <fieldset class="options">
37
+ <table class="optiontable">
38
+ <tr>
39
+ <td>
40
+ <input name="smbd_published_pages" value = "published_pages" type = "checkbox" />
41
+ <label for="smbd_published_pages"><?php _e("All Published Pages", 'bulk-delete'); ?> (<?php echo $pages . " "; _e("Pages", 'bulk-delete'); ?>)</label>
42
+ </td>
43
+ </tr>
44
+
45
+ <tr>
46
+ <td>
47
+ <input name="smbd_draft_pages" value = "draft_pages" type = "checkbox" />
48
+ <label for="smbd_draft_pages"><?php _e("All Draft Pages", 'bulk-delete'); ?> (<?php echo $page_drafts . " "; _e("Pages", 'bulk-delete'); ?>)</label>
49
+ </td>
50
+ </tr>
51
+
52
+ <tr>
53
+ <td>
54
+ <input name="smbd_future_pages" value = "scheduled_pages" type = "checkbox" />
55
+ <label for="smbd_future_pages"><?php _e("All Scheduled Pages", 'bulk-delete'); ?> (<?php echo $page_future . " "; _e("Pages", 'bulk-delete'); ?>)</label>
56
+ </td>
57
+ </tr>
58
+
59
+ <tr>
60
+ <td>
61
+ <input name="smbd_pending_pages" value = "pending_pages" type = "checkbox" />
62
+ <label for="smbd_pending_pages"><?php _e("All Pending Pages", 'bulk-delete'); ?> (<?php echo $page_pending . " "; _e("Pages", 'bulk-delete'); ?>)</label>
63
+ </td>
64
+ </tr>
65
+
66
+ <tr>
67
+ <td>
68
+ <input name="smbd_private_pages" value = "private_pages" type = "checkbox" />
69
+ <label for="smbd_private_pages"><?php _e("All Private Pages", 'bulk-delete'); ?> (<?php echo $page_private . " "; _e("Pages", 'bulk-delete'); ?>)</label>
70
+ </td>
71
+ </tr>
72
+
73
+ <tr>
74
+ <td>
75
+ <h4><?php _e("Choose your filtering options", 'bulk-delete'); ?></h4>
76
+ </td>
77
+ </tr>
78
+
79
+ <tr>
80
+ <td scope="row">
81
+ <input name="smbd_pages_restrict" id="smbd_pages_restrict" value = "true" type = "checkbox">
82
+ <?php _e("Only restrict to pages which are ", 'bulk-delete');?>
83
+ <select name="smbd_pages_op" id="smbd_pages_op" disabled>
84
+ <option value ="<"><?php _e("older than", 'bulk-delete');?></option>
85
+ <option value =">"><?php _e("posted within last", 'bulk-delete');?></option>
86
+ </select>
87
+ <input type ="textbox" name="smbd_pages_days" id="smbd_pages_days" disabled value ="0" maxlength="4" size="4" /><?php _e("days", 'bulk-delete');?>
88
+ </td>
89
+ </tr>
90
+
91
+ <tr>
92
+ <td scope="row">
93
+ <input name="smbd_pages_force_delete" value = "false" type = "radio" checked="checked" /> <?php _e('Move to Trash', 'bulk-delete'); ?>
94
+ <input name="smbd_pages_force_delete" value = "true" type = "radio" /> <?php _e('Delete permanently', 'bulk-delete'); ?>
95
+ </td>
96
+ </tr>
97
+
98
+ <tr>
99
+ <td scope="row">
100
+ <input name="smbd_pages_limit" id="smbd_pages_limit" value = "true" type = "checkbox">
101
+ <?php _e("Only delete first ", 'bulk-delete');?>
102
+ <input type ="textbox" name="smbd_pages_limit_to" id="smbd_pages_limit_to" disabled value ="0" maxlength="4" size="4" /><?php _e("posts.", 'bulk-delete');?>
103
+ <?php _e("Use this option if there are more than 1000 posts and the script timesout.", 'bulk-delete') ?>
104
+ </td>
105
+ </tr>
106
+
107
+ <tr>
108
+ <td scope="row" colspan="2">
109
+ <input name="smbd_pages_cron" value = "false" type = "radio" checked="checked" /> <?php _e('Delete now', 'bulk-delete'); ?>
110
+ <input name="smbd_pages_cron" value = "true" type = "radio" id = "smbd_pages_cron" disabled > <?php _e('Schedule', 'bulk-delete'); ?>
111
+ <input name="smbd_pages_cron_start" id = "smbd_pages_cron_start" value = "now" type = "text" disabled><?php _e('repeat ', 'bulk-delete');?>
112
+ <select name = "smbd_pages_cron_freq" id = "smbd_pages_cron_freq" disabled>
113
+ <option value = "-1"><?php _e("Don't repeat", 'bulk-delete'); ?></option>
114
+ <?php
115
+ $schedules = wp_get_schedules();
116
+ foreach($schedules as $key => $value) {
117
+ ?>
118
+ <option value = "<?php echo $key; ?>"><?php echo $value['display']; ?></option>
119
+ <?php
120
+ }
121
+ ?>
122
+ </select>
123
+ <span class = "bd-pages-pro" style = "color:red"><?php _e('Only available in Pro Addon', 'bulk-delete'); ?> <a href = "http://bulkwp.com/addons/scheduler-for-deleting-pages-by-status/">Buy now</a></span>
124
+ </td>
125
+ </tr>
126
+ </table>
127
+ </fieldset>
128
+
129
+ <p>
130
+ <button type="submit" name="bd_action" value = "delete_pages_by_status" class="button-primary"><?php _e( 'Bulk Delete ', 'bulk-delete' ) ?>&raquo;</button>
131
+ </p>
132
+ <!-- Pages end-->
133
+ <?php
134
+ }
135
+
136
+ /**
137
+ * Request handler for deleting pages by status
138
+ *
139
+ * @since 5.0
140
+ */
141
+ public static function do_delete_pages_by_status() {
142
+ $delete_options = array();
143
+ $delete_options['restrict'] = array_get( $_POST, 'smbd_pages_restrict', FALSE );
144
+ $delete_options['limit_to'] = absint( array_get( $_POST, 'smbd_pages_limit_to', 0 ) );
145
+ $delete_options['force_delete'] = array_get( $_POST, 'smbd_pages_force_delete', 'false' );
146
+
147
+ $delete_options['page_op'] = array_get( $_POST, 'smbd_pages_op' );
148
+ $delete_options['page_days'] = array_get( $_POST, 'smbd_pages_days' );
149
+
150
+ $delete_options['publish'] = array_get( $_POST, 'smbd_published_pages' );
151
+ $delete_options['drafts'] = array_get( $_POST, 'smbd_draft_pages' );
152
+ $delete_options['pending'] = array_get( $_POST, 'smbd_pending_pages' );
153
+ $delete_options['future'] = array_get( $_POST, 'smbd_future_pages' );
154
+ $delete_options['private'] = array_get( $_POST, 'smbd_private_pages' );
155
+
156
+ if ( array_get( $_POST, 'smbd_pages_cron', 'false' ) == 'true' ) {
157
+ $freq = $_POST['smbd_pages_cron_freq'];
158
+ $time = strtotime( $_POST['smbd_pages_cron_start'] ) - ( get_option( 'gmt_offset' ) * 60 * 60 );
159
+
160
+ if ( $freq == -1 ) {
161
+ wp_schedule_single_event( $time, Bulk_Delete::CRON_HOOK_PAGES_STATUS, array( $delete_options ) );
162
+ } else {
163
+ wp_schedule_event( $time, $freq , Bulk_Delete::CRON_HOOK_PAGES_STATUS, array( $delete_options ) );
164
+ }
165
+ $msg = __( 'The selected pages are scheduled for deletion.', 'bulk-delete' ) . ' ' .
166
+ sprintf( __( 'See the full list of <a href = "%s">scheduled tasks</a>' , 'bulk-delete' ), get_bloginfo( "wpurl" ) . '/wp-admin/admin.php?page=' . Bulk_Delete::CRON_PAGE_SLUG );
167
+ } else {
168
+ $deleted_count = self::delete_pages_by_status( $delete_options );
169
+ $msg = sprintf( _n( 'Deleted %d page', 'Deleted %d pages' , $deleted_count, 'bulk-delete' ), $deleted_count );
170
+ }
171
+
172
+ add_settings_error(
173
+ Bulk_Delete::PAGES_PAGE_SLUG,
174
+ 'deleted-cron',
175
+ $msg,
176
+ 'updated'
177
+ );
178
+ }
179
+
180
+ /**
181
+ * Bulk Delete pages
182
+ *
183
+ * @since 5.0
184
+ */
185
+ public static function delete_pages_by_status( $delete_options ) {
186
+ global $wp_query;
187
+
188
+ $bd = BULK_DELETE();
189
+ $options = array();
190
+ $post_status = array();
191
+
192
+ $limit_to = $delete_options['limit_to'];
193
+
194
+ if ($limit_to > 0) {
195
+ $options['showposts'] = $limit_to;
196
+ } else {
197
+ $options['nopaging'] = 'true';
198
+ }
199
+
200
+ $force_delete = $delete_options['force_delete'];
201
+
202
+ if ($force_delete == 'true') {
203
+ $force_delete = true;
204
+ } else {
205
+ $force_delete = false;
206
+ }
207
+
208
+ // published pages
209
+ if ("published_pages" == $delete_options['publish']) {
210
+ $post_status[] = 'publish';
211
+ }
212
+
213
+ // Drafts
214
+ if ("draft_pages" == $delete_options['drafts']) {
215
+ $post_status[] = 'draft';
216
+ }
217
+
218
+ // Pending Posts
219
+ if ("pending_pages" == $delete_options['pending']) {
220
+ $post_status[] = 'pending';
221
+ }
222
+
223
+ // Future Posts
224
+ if ("future_pages" == $delete_options['future']) {
225
+ $post_status[] = 'future';
226
+ }
227
+
228
+ // Private Posts
229
+ if ("private_pages" == $delete_options['private']) {
230
+ $post_status[] = 'private';
231
+ }
232
+
233
+ $options['post_type'] = 'page';
234
+ $options['post_status'] = $post_status;
235
+
236
+ if ($delete_options['restrict'] == "true") {
237
+ $options['op'] = $delete_options['page_op'];
238
+ $options['days'] = $delete_options['page_days'];
239
+
240
+ if ( !class_exists( 'Bulk_Delete_By_Days' ) ) {
241
+ require_once $bd::$PLUGIN_DIR . '/include/class-bulk-delete-by-days.php';
242
+ }
243
+ $bulk_Delete_By_Days = new Bulk_Delete_By_Days;
244
+ }
245
+
246
+ $pages = $wp_query->query($options);
247
+ foreach ($pages as $page) {
248
+ wp_delete_post($page->ID, $force_delete);
249
+ }
250
+
251
+ return count( $pages );
252
+ }
253
+ }
254
+
255
+ add_action( 'bd_delete_pages_by_status', array( 'Bulk_Delete_Pages', 'do_delete_pages_by_status' ) );
256
+ ?>
include/class-bulk-delete-posts.php CHANGED
@@ -2,15 +2,16 @@
2
  /**
3
  * Utility class for deleting posts
4
  *
5
- * @package Bulk Delete
6
- * @author Sudar
 
7
  */
8
  class Bulk_Delete_Posts {
9
 
10
  /**
11
  * Render post status box
12
  */
13
- public static function render_by_post_status_box() {
14
 
15
  if ( Bulk_Delete_Util::is_posts_box_hidden(Bulk_Delete::BOX_POST_STATUS) ) {
16
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
@@ -124,26 +125,178 @@ class Bulk_Delete_Posts {
124
  foreach($schedules as $key => $value) {
125
  ?>
126
  <option value = "<?php echo $key; ?>"><?php echo $value['display']; ?></option>
127
- <?php
128
  }
129
  ?>
130
  </select>
131
- <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>
132
  </td>
133
  </tr>
134
  </table>
135
  </fieldset>
136
 
137
  <p>
138
- <button type="submit" name="smbd_action" value = "bulk-delete-post-status" class="button-primary"><?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;</button>
139
  </p>
140
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
  }
142
 
143
  /**
144
- * Render By category box
145
  */
146
- public static function render_by_category_box() {
147
 
148
  if ( Bulk_Delete_Util::is_posts_box_hidden(Bulk_Delete::BOX_CATEGORY) ) {
149
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
@@ -268,11 +421,11 @@ class Bulk_Delete_Posts {
268
  foreach($schedules as $key => $value) {
269
  ?>
270
  <option value = "<?php echo $key; ?>"><?php echo $value['display']; ?></option>
271
- <?php
272
  }
273
  ?>
274
  </select>
275
- <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>
276
  </td>
277
  </tr>
278
 
@@ -286,16 +439,128 @@ class Bulk_Delete_Posts {
286
  </fieldset>
287
 
288
  <p>
289
- <button type="submit" name="smbd_action" value = "bulk-delete-cats" class="button-primary"><?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;</button>
290
  </p>
291
  <!-- Category end-->
292
  <?php
293
  }
294
 
295
  /**
296
- * Render by tag box
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
  */
298
- public static function render_by_tag_box() {
299
 
300
  if ( Bulk_Delete_Util::is_posts_box_hidden(Bulk_Delete::BOX_TAG) ) {
301
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
@@ -315,7 +580,7 @@ class Bulk_Delete_Posts {
315
  ?>
316
  <tr>
317
  <td scope="row" >
318
- <input name="smbd_tags[]" value = "<?php echo $tag->term_id; ?>" type = "checkbox" />
319
  </td>
320
  <td>
321
  <label for="smbd_tags"><?php echo $tag->name; ?> (<?php echo $tag->count . " "; _e("Posts", 'bulk-delete'); ?>)</label>
@@ -390,18 +655,18 @@ class Bulk_Delete_Posts {
390
  foreach($schedules as $key => $value) {
391
  ?>
392
  <option value = "<?php echo $key; ?>"><?php echo $value['display']; ?></option>
393
- <?php
394
  }
395
  ?>
396
  </select>
397
- <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>
398
  </td>
399
  </tr>
400
 
401
  </table>
402
  </fieldset>
403
  <p class="submit">
404
- <button type="submit" name="smbd_action" value = "bulk-delete-tags" class="button-primary"><?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;</button>
405
  </p>
406
  <!-- Tags end-->
407
  <?php
@@ -412,10 +677,108 @@ class Bulk_Delete_Posts {
412
  }
413
  }
414
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
415
  /**
416
  * Render delete by custom taxonomy box
417
  */
418
- public static function render_by_tax_box() {
419
 
420
  if ( Bulk_Delete_Util::is_posts_box_hidden(Bulk_Delete::BOX_TAX) ) {
421
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
@@ -569,18 +932,18 @@ class Bulk_Delete_Posts {
569
  foreach($schedules as $key => $value) {
570
  ?>
571
  <option value = "<?php echo $key; ?>"><?php echo $value['display']; ?></option>
572
- <?php
573
  }
574
  ?>
575
  </select>
576
- <span class = "bd-taxs-pro" style = "color:red"><?php _e('Only available in Pro Addon', 'bulk-delete'); ?> <a href = "http://sudarmuthu.com/out/buy-bulk-delete-taxonomy-addon">Buy now</a></span>
577
  </td>
578
  </tr>
579
 
580
  </table>
581
  </fieldset>
582
  <p class="submit">
583
- <button type="submit" name="smbd_action" value = "bulk-delete-taxs" class="button-primary"><?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;</button>
584
  </p>
585
  <!-- Custom tax end-->
586
  <?php
@@ -591,10 +954,132 @@ class Bulk_Delete_Posts {
591
  }
592
  }
593
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
594
  /**
595
  * Render delete by custom post type box
 
 
596
  */
597
- public static function render_by_post_type_box() {
598
 
599
  if ( Bulk_Delete_Util::is_posts_box_hidden(Bulk_Delete::BOX_POST_TYPE) ) {
600
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
@@ -700,18 +1185,18 @@ class Bulk_Delete_Posts {
700
  foreach($schedules as $key => $value) {
701
  ?>
702
  <option value = "<?php echo $key; ?>"><?php echo $value['display']; ?></option>
703
- <?php
704
  }
705
  ?>
706
  </select>
707
- <span class = "bd-types-pro" style = "color:red"><?php _e('Only available in Pro Addon', 'bulk-delete'); ?> <a href = "http://sudarmuthu.com/out/buy-bulk-delete-post-type-addon">Buy now</a></span>
708
  </td>
709
  </tr>
710
 
711
  </table>
712
  </fieldset>
713
  <p class="submit">
714
- <button type="submit" name="smbd_action" value = "bulk-delete-post-types" class="button-primary"><?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;</button>
715
  </p>
716
  <!-- Custom post type end-->
717
  <?php
@@ -723,129 +1208,153 @@ class Bulk_Delete_Posts {
723
  }
724
 
725
  /**
726
- * Render delete by pages box
 
 
 
727
  */
728
- public static function render_by_page_box() {
729
 
730
- if ( Bulk_Delete_Util::is_posts_box_hidden(Bulk_Delete::BOX_PAGE) ) {
731
- printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
732
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
733
  }
734
 
735
- $pages_count = wp_count_posts( 'page' );
736
- $pages = $pages_count->publish;
737
- $page_drafts = $pages_count->draft;
738
- $page_future = $pages_count->future;
739
- $page_pending = $pages_count->pending;
740
- $page_private = $pages_count->private;
741
- ?>
742
- <!-- Pages start-->
743
- <h4><?php _e("Select the pages which you want to delete", 'bulk-delete'); ?></h4>
744
 
745
- <fieldset class="options">
746
- <table class="optiontable">
747
- <tr>
748
- <td>
749
- <input name="smbd_published_pages" value = "published_pages" type = "checkbox" />
750
- <label for="smbd_published_pages"><?php _e("All Published Pages", 'bulk-delete'); ?> (<?php echo $pages . " "; _e("Pages", 'bulk-delete'); ?>)</label>
751
- </td>
752
- </tr>
 
 
 
753
 
754
- <tr>
755
- <td>
756
- <input name="smbd_draft_pages" value = "draft_pages" type = "checkbox" />
757
- <label for="smbd_draft_pages"><?php _e("All Draft Pages", 'bulk-delete'); ?> (<?php echo $page_drafts . " "; _e("Pages", 'bulk-delete'); ?>)</label>
758
- </td>
759
- </tr>
760
 
761
- <tr>
762
- <td>
763
- <input name="smbd_future_pages" value = "scheduled_pages" type = "checkbox" />
764
- <label for="smbd_future_pages"><?php _e("All Scheduled Pages", 'bulk-delete'); ?> (<?php echo $page_future . " "; _e("Pages", 'bulk-delete'); ?>)</label>
765
- </td>
766
- </tr>
767
 
768
- <tr>
769
- <td>
770
- <input name="smbd_pending_pages" value = "pending_pages" type = "checkbox" />
771
- <label for="smbd_pending_pages"><?php _e("All Pending Pages", 'bulk-delete'); ?> (<?php echo $page_pending . " "; _e("Pages", 'bulk-delete'); ?>)</label>
772
- </td>
773
- </tr>
774
 
775
- <tr>
776
- <td>
777
- <input name="smbd_private_pages" value = "private_pages" type = "checkbox" />
778
- <label for="smbd_private_pages"><?php _e("All Private Pages", 'bulk-delete'); ?> (<?php echo $page_private . " "; _e("Pages", 'bulk-delete'); ?>)</label>
779
- </td>
780
- </tr>
781
 
782
- <tr>
783
- <td>
784
- <h4><?php _e("Choose your filtering options", 'bulk-delete'); ?></h4>
785
- </td>
786
- </tr>
787
 
788
- <tr>
789
- <td scope="row">
790
- <input name="smbd_pages_restrict" id="smbd_pages_restrict" value = "true" type = "checkbox">
791
- <?php _e("Only restrict to pages which are ", 'bulk-delete');?>
792
- <select name="smbd_pages_op" id="smbd_pages_op" disabled>
793
- <option value ="<"><?php _e("older than", 'bulk-delete');?></option>
794
- <option value =">"><?php _e("posted within last", 'bulk-delete');?></option>
795
- </select>
796
- <input type ="textbox" name="smbd_pages_days" id="smbd_pages_days" disabled value ="0" maxlength="4" size="4" /><?php _e("days", 'bulk-delete');?>
797
- </td>
798
- </tr>
799
 
800
- <tr>
801
- <td scope="row">
802
- <input name="smbd_pages_force_delete" value = "false" type = "radio" checked="checked" /> <?php _e('Move to Trash', 'bulk-delete'); ?>
803
- <input name="smbd_pages_force_delete" value = "true" type = "radio" /> <?php _e('Delete permanently', 'bulk-delete'); ?>
804
- </td>
805
- </tr>
806
 
807
- <tr>
808
- <td scope="row">
809
- <input name="smbd_pages_limit" id="smbd_pages_limit" value = "true" type = "checkbox">
810
- <?php _e("Only delete first ", 'bulk-delete');?>
811
- <input type ="textbox" name="smbd_pages_limit_to" id="smbd_pages_limit_to" disabled value ="0" maxlength="4" size="4" /><?php _e("posts.", 'bulk-delete');?>
812
- <?php _e("Use this option if there are more than 1000 posts and the script timesout.", 'bulk-delete') ?>
813
- </td>
814
- </tr>
815
 
816
- <tr>
817
- <td scope="row" colspan="2">
818
- <input name="smbd_pages_cron" value = "false" type = "radio" checked="checked" /> <?php _e('Delete now', 'bulk-delete'); ?>
819
- <input name="smbd_pages_cron" value = "true" type = "radio" id = "smbd_pages_cron" disabled > <?php _e('Schedule', 'bulk-delete'); ?>
820
- <input name="smbd_pages_cron_start" id = "smbd_pages_cron_start" value = "now" type = "text" disabled><?php _e('repeat ', 'bulk-delete');?>
821
- <select name = "smbd_pages_cron_freq" id = "smbd_pages_cron_freq" disabled>
822
- <option value = "-1"><?php _e("Don't repeat", 'bulk-delete'); ?></option>
823
- <?php
824
- $schedules = wp_get_schedules();
825
- foreach($schedules as $key => $value) {
826
- ?>
827
- <option value = "<?php echo $key; ?>"><?php echo $value['display']; ?></option>
828
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
829
  }
830
- ?>
831
- </select>
832
- <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>
833
- </td>
834
- </tr>
835
- </table>
836
- </fieldset>
837
 
838
- <p>
839
- <button type="submit" name="smbd_action" value = "bulk-delete-page" class="button-primary"><?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;</button>
840
- </p>
841
- <!-- Pages end-->
842
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
843
  }
844
 
845
  /**
846
  * Render delete by url box
 
 
847
  */
848
- public static function render_by_url_box() {
849
 
850
  if ( Bulk_Delete_Util::is_posts_box_hidden(Bulk_Delete::BOX_URL) ) {
851
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
@@ -859,13 +1368,13 @@ class Bulk_Delete_Posts {
859
  <fieldset class="options">
860
  <table class="optiontable">
861
  <tr>
862
- <td scope="row">
863
  <label for="smdb_specific_pages"><?php _e("Enter one post url (not post ids) per line", 'bulk-delete'); ?></label>
864
  <br/>
865
  <textarea style="width: 450px; height: 80px;" id="smdb_specific_pages_urls" name="smdb_specific_pages_urls" rows="5" columns="80" ></textarea>
866
  </td>
867
  </tr>
868
-
869
  <tr>
870
  <td>
871
  <h4><?php _e("Choose your filtering options", 'bulk-delete'); ?></h4>
@@ -883,16 +1392,54 @@ class Bulk_Delete_Posts {
883
  </fieldset>
884
 
885
  <p>
886
- <button type="submit" name="smbd_action" value = "bulk-delete-specific" class="button-primary"><?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;</button>
887
  </p>
888
  <!-- URLs end-->
889
  <?php
890
  }
891
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
892
  /**
893
  * Render delete by post revisions box
 
 
894
  */
895
- public static function render_by_post_revision_box() {
896
 
897
  if ( Bulk_Delete_Util::is_posts_box_hidden(Bulk_Delete::BOX_POST_REVISION) ) {
898
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
@@ -919,102 +1466,176 @@ class Bulk_Delete_Posts {
919
  </fieldset>
920
 
921
  <p>
922
- <button type="submit" name="smbd_action" value = "bulk-delete-revisions" class="button-primary"><?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;</button>
923
  </p>
924
  <!-- Post Revisions end-->
925
  <?php
926
  }
927
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
928
  /**
929
  * Render delete posts by custom field box
 
 
930
  */
931
- public static function render_by_custom_field_box() {
932
 
933
  if ( Bulk_Delete_Util::is_posts_box_hidden( Bulk_Delete::BOX_CUSTOM_FIELD ) ) {
934
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
935
  return;
936
  }
937
 
938
- if ( !class_exists( 'Bulk_Delete_Custom_Field' ) ) {
939
  ?>
940
  <!-- Custom Field box start-->
941
  <p>
942
  <span class = "bd-post-custom-field-pro" style = "color:red">
943
- <?php _e( 'You need "Bulk Delete by Custom Field" Addon, to delete post by custom field.', 'bulk-delete' ); ?>
944
- <a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-by-custom-field">Buy now</a>
945
  </span>
946
  </p>
947
  <!-- Custom Field box end-->
948
  <?php
949
  } else {
950
- Bulk_Delete_Custom_Field::render_by_custom_field_box();
951
  }
952
  }
953
 
954
  /**
955
  * Render posts by title box
956
  *
957
- * @since 4.4
958
  * @static
959
- * @access public
960
  */
961
- public static function render_by_title_box() {
962
 
963
  if ( Bulk_Delete_Util::is_posts_box_hidden( Bulk_Delete::BOX_TITLE ) ) {
964
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
965
  return;
966
  }
967
 
968
- if ( !class_exists( 'Bulk_Delete_By_Title' ) ) {
969
  ?>
970
  <!-- Title box start-->
971
  <p>
972
  <span class = "bd-post-title-pro" style = "color:red">
973
- <?php _e( 'You need "Bulk Delete by Title" Addon, to delete post by title.', 'bulk-delete' ); ?>
974
- <a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-by-title">Buy now</a>
975
  </span>
976
  </p>
977
  <!-- Title box end-->
978
  <?php
979
  } else {
980
- Bulk_Delete_By_Title::render_by_title_box();
981
  }
982
  }
983
 
984
  /**
985
- * Render debug box
 
 
 
 
986
  */
987
- public static function render_debug_box() {
 
 
 
 
 
 
 
988
  ?>
989
- <!-- Debug box start-->
990
  <p>
991
- <?php _e('If you are seeing a blank page after clicking the Bulk Delete button, then ', 'bulk-delete'); ?><a href = "http://sudarmuthu.com/wordpress/bulk-delete#faq"><?php _e('check out this FAQ', 'bulk-delete');?></a>.
992
- <?php _e('You also need need the following debug information.', 'bulk-delete'); ?>
 
 
993
  </p>
994
- <table cellspacing="10">
995
- <tr>
996
- <th align = "right"><?php _e('PHP Version ', 'bulk-delete'); ?></th>
997
- <td><?php echo phpversion(); ?></td>
998
- </tr>
999
- <tr>
1000
- <th align = "right"><?php _e('Plugin Version ', 'bulk-delete'); ?></th>
1001
- <td><?php echo Bulk_Delete::VERSION; ?></td>
1002
- </tr>
1003
- <tr>
1004
- <th align = "right"><?php _e('Available memory size ', 'bulk-delete');?></th>
1005
- <td><?php echo ini_get( 'memory_limit' ); ?></td>
1006
- </tr>
1007
- <tr>
1008
- <th align = "right"><?php _e('Script time out ', 'bulk-delete');?></th>
1009
- <td><?php echo ini_get( 'max_execution_time' ); ?></td>
1010
- </tr>
1011
- <tr>
1012
- <th align = "right"><?php _e('Script input time ', 'bulk-delete'); ?></th>
1013
- <td><?php echo ini_get( 'max_input_time' ); ?></td>
1014
- </tr>
1015
- </table>
1016
- <!-- Debug box end-->
1017
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1018
  }
1019
  }
 
 
 
 
 
 
 
 
 
 
 
1020
  ?>
2
  /**
3
  * Utility class for deleting posts
4
  *
5
+ * @package Bulk_Delete
6
+ * @subpackage Posts
7
+ * @author Sudar
8
  */
9
  class Bulk_Delete_Posts {
10
 
11
  /**
12
  * Render post status box
13
  */
14
+ public static function render_delete_posts_by_status_box() {
15
 
16
  if ( Bulk_Delete_Util::is_posts_box_hidden(Bulk_Delete::BOX_POST_STATUS) ) {
17
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
125
  foreach($schedules as $key => $value) {
126
  ?>
127
  <option value = "<?php echo $key; ?>"><?php echo $value['display']; ?></option>
128
+ <?php
129
  }
130
  ?>
131
  </select>
132
+ <span class = "bd-post-status-pro" style = "color:red"><?php _e( 'Only available in Pro Addon', 'bulk-delete' ); ?> <a href = "http://bulkwp.com/addons/scheduler-for-deleting-posts-by-status/">Buy now</a></span>
133
  </td>
134
  </tr>
135
  </table>
136
  </fieldset>
137
 
138
  <p>
139
+ <button type="submit" name="bd_action" value = "delete_posts_by_status" class="button-primary"><?php _e( 'Bulk Delete ', 'bulk-delete' ) ?>&raquo;</button>
140
  </p>
141
+ <?php
142
+ }
143
+
144
+ /**
145
+ * Delete posts by post status
146
+ *
147
+ * @since 5.0
148
+ * @static
149
+ */
150
+ public static function do_delete_posts_by_status() {
151
+
152
+ $delete_options = array();
153
+ $delete_options['restrict'] = array_get($_POST, 'smbd_post_status_restrict', FALSE);
154
+ $delete_options['limit_to'] = absint(array_get($_POST, 'smbd_post_status_limit_to', 0));
155
+ $delete_options['force_delete'] = array_get($_POST, 'smbd_post_status_force_delete', 'false');
156
+
157
+ $delete_options['post_status_op'] = array_get($_POST, 'smbd_post_status_op');
158
+ $delete_options['post_status_days'] = array_get($_POST, 'smbd_post_status_days');
159
+
160
+ $delete_options['publish'] = array_get( $_POST, 'smbd_publish' );
161
+ $delete_options['drafts'] = array_get($_POST, 'smbd_drafts');
162
+ $delete_options['pending'] = array_get($_POST, 'smbd_pending');
163
+ $delete_options['future'] = array_get($_POST, 'smbd_future');
164
+ $delete_options['private'] = array_get($_POST, 'smbd_private');
165
+ $delete_options['sticky'] = array_get( $_POST, 'smbd_sticky' );
166
+
167
+ if (array_get($_POST, 'smbd_post_status_cron', 'false') == 'true') {
168
+ $freq = $_POST['smbd_post_status_cron_freq'];
169
+ $time = strtotime($_POST['smbd_post_status_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
170
+
171
+ if ($freq == -1) {
172
+ wp_schedule_single_event($time, Bulk_Delete::CRON_HOOK_POST_STATUS, array($delete_options));
173
+ } else {
174
+ wp_schedule_event($time, $freq, Bulk_Delete::CRON_HOOK_POST_STATUS, array($delete_options));
175
+ }
176
+ $msg = __('Posts with the selected status are scheduled for deletion.', 'bulk-delete') . ' ' .
177
+ sprintf( __( 'See the full list of <a href = "%s">scheduled tasks</a>' , 'bulk-delete' ), get_bloginfo( "wpurl" ) . '/wp-admin/admin.php?page=' . Bulk_Delete::CRON_PAGE_SLUG );
178
+ } else {
179
+ $deleted_count = self::delete_posts_by_status($delete_options);
180
+ $msg = sprintf( _n('Deleted %d post with the selected post status', 'Deleted %d posts with the selected post status' , $deleted_count, 'bulk-delete' ), $deleted_count);
181
+ }
182
+
183
+ add_settings_error(
184
+ Bulk_Delete::POSTS_PAGE_SLUG,
185
+ 'deleted-posts',
186
+ $msg,
187
+ 'updated'
188
+ );
189
+ }
190
+
191
+ /**
192
+ * Delete posts by post status - drafts, pending posts, scheduled posts etc.
193
+ *
194
+ * @since 5.0
195
+ * @static
196
+ * @param array $delete_options Options for deleting posts
197
+ * @return int $posts_deleted Number of posts that were deleted
198
+ *
199
+ */
200
+ public static function delete_posts_by_status( $delete_options ) {
201
+ global $wp_query;
202
+ global $wpdb;
203
+
204
+ $posts_deleted = 0;
205
+
206
+ $force_delete = $delete_options['force_delete'];
207
+
208
+ if ($force_delete == 'true') {
209
+ $force_delete = true;
210
+ } else {
211
+ $force_delete = false;
212
+ }
213
+
214
+ // Delete sticky posts
215
+ if ( 'sticky' == $delete_options['sticky'] ) {
216
+ $sticky_post_ids = get_option( 'sticky_posts' );
217
+
218
+ foreach ( $sticky_post_ids as $sticky_post_id ) {
219
+ wp_delete_post( $sticky_post_id, $force_delete );
220
+ }
221
+
222
+ $posts_deleted += count( $sticky_post_ids );
223
+ }
224
+
225
+ $options = array();
226
+ $post_status = array();
227
+
228
+ $limit_to = $delete_options['limit_to'];
229
+
230
+ if ($limit_to > 0) {
231
+ $options['showposts'] = $limit_to;
232
+ } else {
233
+ $options['nopaging'] = 'true';
234
+ }
235
+
236
+ $force_delete = $delete_options['force_delete'];
237
+
238
+ if ($force_delete == 'true') {
239
+ $force_delete = true;
240
+ } else {
241
+ $force_delete = false;
242
+ }
243
+
244
+ // Published posts
245
+ if ( 'publish' == $delete_options['publish'] ) {
246
+ $post_status[] = 'publish';
247
+ }
248
+
249
+ // Drafts
250
+ if ( 'drafts' == $delete_options['drafts'] ) {
251
+ $post_status[] = 'draft';
252
+
253
+ // ignore sticky posts.
254
+ // For some reason, sticky posts also gets deleted when deleting drafts through a schedule
255
+ $options['post__not_in'] = get_option( 'sticky_posts' );
256
+ }
257
+
258
+ // Pending Posts
259
+ if ("pending" == $delete_options['pending']) {
260
+ $post_status[] = 'pending';
261
+ }
262
+
263
+ // Future Posts
264
+ if ("future" == $delete_options['future']) {
265
+ $post_status[] = 'future';
266
+ }
267
+
268
+ // Private Posts
269
+ if ("private" == $delete_options['private']) {
270
+ $post_status[] = 'private';
271
+ }
272
+
273
+ if ($delete_options['restrict'] == "true") {
274
+ $options['op'] = $delete_options['post_status_op'];
275
+ $options['days'] = $delete_options['post_status_days'];
276
+
277
+ if ( !class_exists( 'Bulk_Delete_By_Days' ) ) {
278
+ require_once self::$PLUGIN_DIR . '/include/class-bulk-delete-by-days.php';
279
+ }
280
+ $bulk_Delete_By_Days = new Bulk_Delete_By_Days;
281
+ }
282
+
283
+ // now retrieve all posts and delete them
284
+ $options['post_status'] = $post_status;
285
+
286
+ $posts = $wp_query->query($options);
287
+
288
+ foreach ($posts as $post) {
289
+ wp_delete_post($post->ID, $force_delete);
290
+ }
291
+
292
+ $posts_deleted += count( $posts );
293
+ return $posts_deleted;
294
  }
295
 
296
  /**
297
+ * Render Delete posts by category box
298
  */
299
+ public static function render_delete_posts_by_category_box() {
300
 
301
  if ( Bulk_Delete_Util::is_posts_box_hidden(Bulk_Delete::BOX_CATEGORY) ) {
302
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
421
  foreach($schedules as $key => $value) {
422
  ?>
423
  <option value = "<?php echo $key; ?>"><?php echo $value['display']; ?></option>
424
+ <?php
425
  }
426
  ?>
427
  </select>
428
+ <span class = "bd-cats-pro" style = "color:red"><?php _e('Only available in Pro Addon', 'bulk-delete'); ?> <a href = "http://bulkwp.com/addons/scheduler-for-deleting-posts-by-category/">Buy now</a></span>
429
  </td>
430
  </tr>
431
 
439
  </fieldset>
440
 
441
  <p>
442
+ <button type="submit" name="bd_action" value = "delete_posts_by_category" class="button-primary"><?php _e( 'Bulk Delete ', 'bulk-delete' ); ?>&raquo;</button>
443
  </p>
444
  <!-- Category end-->
445
  <?php
446
  }
447
 
448
  /**
449
+ * Process delete posts by category
450
+ *
451
+ * @since 5.0
452
+ * @static
453
+ */
454
+ public static function do_delete_posts_by_category() {
455
+
456
+ $delete_options = array();
457
+ $delete_options['post_type'] = array_get( $_POST, 'smbd_cat_post_type', 'post' );
458
+ $delete_options['selected_cats'] = array_get($_POST, 'smbd_cats');
459
+ $delete_options['restrict'] = array_get($_POST, 'smbd_cats_restrict', FALSE);
460
+ $delete_options['private'] = array_get($_POST, 'smbd_cats_private');
461
+ $delete_options['limit_to'] = absint(array_get($_POST, 'smbd_cats_limit_to', 0));
462
+ $delete_options['force_delete'] = array_get($_POST, 'smbd_cats_force_delete', 'false');
463
+
464
+ $delete_options['cats_op'] = array_get($_POST, 'smbd_cats_op');
465
+ $delete_options['cats_days'] = array_get($_POST, 'smbd_cats_days');
466
+
467
+ if (array_get($_POST, 'smbd_cats_cron', 'false') == 'true') {
468
+ $freq = $_POST['smbd_cats_cron_freq'];
469
+ $time = strtotime($_POST['smbd_cats_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
470
+
471
+ if ($freq == -1) {
472
+ wp_schedule_single_event($time, Bulk_Delete::CRON_HOOK_CATEGORY, array($delete_options));
473
+ } else {
474
+ wp_schedule_event($time, $freq , Bulk_Delete::CRON_HOOK_CATEGORY, array($delete_options));
475
+ }
476
+
477
+ $msg = __('Posts from the selected categories are scheduled for deletion.', 'bulk-delete') . ' ' .
478
+ sprintf( __( 'See the full list of <a href = "%s">scheduled tasks</a>' , 'bulk-delete' ), get_bloginfo( "wpurl" ) . '/wp-admin/admin.php?page=' . Bulk_Delete::CRON_PAGE_SLUG );
479
+ } else {
480
+ $deleted_count = self::delete_posts_by_category( $delete_options );
481
+ $msg = sprintf( _n('Deleted %d post from the selected categories', 'Deleted %d posts from the selected categories' , $deleted_count, 'bulk-delete' ), $deleted_count);
482
+ }
483
+
484
+ add_settings_error(
485
+ Bulk_Delete::POSTS_PAGE_SLUG,
486
+ 'deleted-posts',
487
+ $msg,
488
+ 'updated'
489
+ );
490
+ }
491
+
492
+ /**
493
+ * Delete posts by category
494
+ *
495
+ * @since 5.0
496
+ * @static
497
+ * @param array $delete_options Options for deleting posts
498
+ * @return int $posts_deleted Number of posts that were deleted
499
+ */
500
+ public static function delete_posts_by_category( $delete_options ) {
501
+
502
+ // For compatibility reasons set default post type to 'post'
503
+ $post_type = array_get( $delete_options, 'post_type', 'post' );
504
+ $selected_cats = $delete_options['selected_cats'];
505
+
506
+ $options = array(
507
+ 'post_type' => $post_type,
508
+ 'category__in' => $selected_cats,
509
+ 'post_status' => 'publish'
510
+ );
511
+
512
+ $private = $delete_options['private'];
513
+
514
+ if ($private == 'true') {
515
+ $options[ 'post_status' ] = 'private';
516
+ }
517
+
518
+ $limit_to = $delete_options['limit_to'];
519
+
520
+ if ($limit_to > 0) {
521
+ $options['showposts'] = $limit_to;
522
+ } else {
523
+ $options['nopaging'] = 'true';
524
+ }
525
+
526
+ $force_delete = $delete_options['force_delete'];
527
+
528
+ if ($force_delete == 'true') {
529
+ $force_delete = true;
530
+ } else {
531
+ $force_delete = false;
532
+ }
533
+
534
+ if ($delete_options['restrict'] == "true") {
535
+ $options['op'] = $delete_options['cats_op'];
536
+ $options['days'] = $delete_options['cats_days'];
537
+
538
+ if ( !class_exists( 'Bulk_Delete_By_Days' ) ) {
539
+ $bd = BULK_DELETE();
540
+ require_once $bd::$PLUGIN_DIR . '/include/class-bulk-delete-by-days.php';
541
+ }
542
+ $bulk_Delete_By_Days = new Bulk_Delete_By_Days;
543
+ }
544
+
545
+ $wp_query = new WP_Query();
546
+ $posts = $wp_query->query($options);
547
+
548
+ foreach ($posts as $post) {
549
+ // $force delete parameter to custom post types doesn't work
550
+ if ( $force_delete ) {
551
+ wp_delete_post( $post->ID, TRUE );
552
+ } else {
553
+ wp_trash_post( $post->ID );
554
+ }
555
+ }
556
+
557
+ return count($posts);
558
+ }
559
+
560
+ /**
561
+ * Render delete posts by tag box
562
  */
563
+ public static function render_delete_posts_by_tag_box() {
564
 
565
  if ( Bulk_Delete_Util::is_posts_box_hidden(Bulk_Delete::BOX_TAG) ) {
566
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
580
  ?>
581
  <tr>
582
  <td scope="row" >
583
+ <input name="smbd_tags[]" value = "<?php echo $tag->term_id; ?>" type = "checkbox">
584
  </td>
585
  <td>
586
  <label for="smbd_tags"><?php echo $tag->name; ?> (<?php echo $tag->count . " "; _e("Posts", 'bulk-delete'); ?>)</label>
655
  foreach($schedules as $key => $value) {
656
  ?>
657
  <option value = "<?php echo $key; ?>"><?php echo $value['display']; ?></option>
658
+ <?php
659
  }
660
  ?>
661
  </select>
662
+ <span class = "bd-tags-pro" style = "color:red"><?php _e('Only available in Pro Addon', 'bulk-delete'); ?> <a href = "http://bulkwp.com/addons/scheduler-for-deleting-posts-by-tag/">Buy now</a></span>
663
  </td>
664
  </tr>
665
 
666
  </table>
667
  </fieldset>
668
  <p class="submit">
669
+ <button type="submit" name="bd_action" value = "delete_posts_by_tag" class="button-primary"><?php _e( 'Bulk Delete ', 'bulk-delete' ); ?>&raquo;</button>
670
  </p>
671
  <!-- Tags end-->
672
  <?php
677
  }
678
  }
679
 
680
+ /**
681
+ * Process Delete Posts by tag request
682
+ *
683
+ * @static
684
+ * @since 5.0
685
+ */
686
+ public static function do_delete_posts_by_tag() {
687
+
688
+ $delete_options = array();
689
+ $delete_options['selected_tags'] = array_get($_POST, 'smbd_tags');
690
+ $delete_options['restrict'] = array_get($_POST, 'smbd_tags_restrict', FALSE);
691
+ $delete_options['private'] = array_get($_POST, 'smbd_tags_private');
692
+ $delete_options['limit_to'] = absint(array_get($_POST, 'smbd_tags_limit_to', 0));
693
+ $delete_options['force_delete'] = array_get($_POST, 'smbd_tags_force_delete', 'false');
694
+
695
+ $delete_options['tags_op'] = array_get($_POST, 'smbd_tags_op');
696
+ $delete_options['tags_days'] = array_get($_POST, 'smbd_tags_days');
697
+
698
+ if (array_get($_POST, 'smbd_tags_cron', 'false') == 'true') {
699
+ $freq = $_POST['smbd_tags_cron_freq'];
700
+ $time = strtotime($_POST['smbd_tags_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
701
+
702
+ if ($freq == -1) {
703
+ wp_schedule_single_event($time, Bulk_Delete::CRON_HOOK_TAG, array($delete_options));
704
+ } else {
705
+ wp_schedule_event($time, $freq, Bulk_Delete::CRON_HOOK_TAG, array($delete_options));
706
+ }
707
+ $msg = __('Posts from the selected tags are scheduled for deletion.', 'bulk-delete') . ' ' .
708
+ sprintf( __( 'See the full list of <a href = "%s">scheduled tasks</a>' , 'bulk-delete' ), get_bloginfo( "wpurl" ) . '/wp-admin/admin.php?page=' . Bulk_Delete::CRON_PAGE_SLUG );
709
+ } else {
710
+ $deleted_count = self::delete_posts_by_tag( $delete_options );
711
+ $msg = sprintf( _n('Deleted %d post from the selected tags', 'Deleted %d posts from the selected tags' , $deleted_count, 'bulk-delete' ), $deleted_count);
712
+ }
713
+
714
+ add_settings_error(
715
+ Bulk_Delete::POSTS_PAGE_SLUG,
716
+ 'deleted-posts',
717
+ $msg,
718
+ 'updated'
719
+ );
720
+ }
721
+
722
+ /**
723
+ * Delete posts by tag
724
+ *
725
+ * @since 5.0
726
+ * @static
727
+ * @param array $delete_options Options for deleting posts
728
+ * @return int $posts_deleted Number of posts that were deleted
729
+ */
730
+ public static function delete_posts_by_tag( $delete_options ) {
731
+
732
+ $selected_tags = $delete_options['selected_tags'];
733
+ $options = array('tag__in'=>$selected_tags, 'post_status'=>'publish', 'post_type'=>'post');
734
+
735
+ $private = $delete_options['private'];
736
+
737
+ if ($private == 'true') {
738
+ $options['post_status'] = 'private';
739
+ }
740
+
741
+ $limit_to = $delete_options['limit_to'];
742
+
743
+ if ($limit_to > 0) {
744
+ $options['showposts'] = $limit_to;
745
+ } else {
746
+ $options['nopaging'] = 'true';
747
+ }
748
+
749
+ $force_delete = $delete_options['force_delete'];
750
+
751
+ if ($force_delete == 'true') {
752
+ $force_delete = true;
753
+ } else {
754
+ $force_delete = false;
755
+ }
756
+
757
+ if ($delete_options['restrict'] == "true") {
758
+ $options['op'] = $delete_options['tags_op'];
759
+ $options['days'] = $delete_options['tags_days'];
760
+
761
+ if ( !class_exists( 'Bulk_Delete_By_Days' ) ) {
762
+ $bd = BULK_DELETE();
763
+ require_once $bd::$PLUGIN_DIR . '/include/class-bulk-delete-by-days.php';
764
+ }
765
+ $bulk_Delete_By_Days = new Bulk_Delete_By_Days;
766
+ }
767
+
768
+ $wp_query = new WP_Query();
769
+ $posts = $wp_query->query($options);
770
+
771
+ foreach ($posts as $post) {
772
+ wp_delete_post($post->ID, $force_delete);
773
+ }
774
+
775
+ return count($posts);
776
+ }
777
+
778
  /**
779
  * Render delete by custom taxonomy box
780
  */
781
+ public static function render_delete_posts_by_taxonomy_box() {
782
 
783
  if ( Bulk_Delete_Util::is_posts_box_hidden(Bulk_Delete::BOX_TAX) ) {
784
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
932
  foreach($schedules as $key => $value) {
933
  ?>
934
  <option value = "<?php echo $key; ?>"><?php echo $value['display']; ?></option>
935
+ <?php
936
  }
937
  ?>
938
  </select>
939
+ <span class = "bd-taxs-pro" style = "color:red"><?php _e('Only available in Pro Addon', 'bulk-delete'); ?> <a href = "http://bulkwp.com/addons/scheduler-for-deleting-posts-by-taxonomy/">Buy now</a></span>
940
  </td>
941
  </tr>
942
 
943
  </table>
944
  </fieldset>
945
  <p class="submit">
946
+ <button type="submit" name="bd_action" value = "delete_posts_by_taxonomy" class="button-primary"><?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;</button>
947
  </p>
948
  <!-- Custom tax end-->
949
  <?php
954
  }
955
  }
956
 
957
+ /**
958
+ * Process Delete posts by Taxonomy Request
959
+ *
960
+ * @static
961
+ * @since 5.0
962
+ */
963
+ public static function do_delete_posts_by_taxonomy() {
964
+
965
+ $delete_options = array();
966
+ $delete_options['post_type'] = array_get( $_POST, 'smbd_tax_post_type', 'post' );
967
+ $delete_options['selected_taxs'] = array_get($_POST, 'smbd_taxs');
968
+ $delete_options['selected_tax_terms'] = array_get($_POST, 'smbd_tax_terms');
969
+ $delete_options['restrict'] = array_get($_POST, 'smbd_taxs_restrict', FALSE);
970
+ $delete_options['private'] = array_get($_POST, 'smbd_taxs_private');
971
+ $delete_options['limit_to'] = absint(array_get($_POST, 'smbd_taxs_limit_to', 0));
972
+ $delete_options['force_delete'] = array_get($_POST, 'smbd_taxs_force_delete', 'false');
973
+
974
+ $delete_options['taxs_op'] = array_get($_POST, 'smbd_taxs_op');
975
+ $delete_options['taxs_days'] = array_get($_POST, 'smbd_taxs_days');
976
+
977
+ if (array_get($_POST, 'smbd_taxs_cron', 'false') == 'true') {
978
+ $freq = $_POST['smbd_taxs_cron_freq'];
979
+ $time = strtotime($_POST['smbd_taxs_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
980
+
981
+ if ($freq == -1) {
982
+ wp_schedule_single_event($time, Bulk_Delete::CRON_HOOK_TAXONOMY, array($delete_options));
983
+ } else {
984
+ wp_schedule_event($time, $freq, Bulk_Delete::CRON_HOOK_TAXONOMY, array($delete_options));
985
+ }
986
+ $msg = __('Posts from the selected custom taxonomies are scheduled for deletion.', 'bulk-delete') . ' ' .
987
+ sprintf( __( 'See the full list of <a href = "%s">scheduled tasks</a>' , 'bulk-delete' ), get_bloginfo( "wpurl" ) . '/wp-admin/admin.php?page=' . Bulk_Delete::CRON_PAGE_SLUG );
988
+ } else {
989
+ $deleted_count = self::delete_posts_by_taxonomy( $delete_options );
990
+ $msg = sprintf( _n('Deleted %d post from the selected custom taxonomies', 'Deleted %d posts from the selected custom taxonomies' , $deleted_count, 'bulk-delete' ), $deleted_count);
991
+ }
992
+
993
+ add_settings_error(
994
+ Bulk_Delete::POSTS_PAGE_SLUG,
995
+ 'deleted-posts',
996
+ $msg,
997
+ 'updated'
998
+ );
999
+ }
1000
+
1001
+ /**
1002
+ * Delete posts by custom taxonomy
1003
+ *
1004
+ * @since 5.0
1005
+ * @static
1006
+ * @param array $delete_options Options for deleting posts
1007
+ * @return int $posts_deleted Number of posts that were deleted
1008
+ */
1009
+ public static function delete_posts_by_taxonomy( $delete_options ) {
1010
+
1011
+ // For compatibility reasons set default post type to 'post'
1012
+ $post_type = array_get( $delete_options, 'post_type', 'post' );
1013
+ $selected_taxs = $delete_options['selected_taxs'];
1014
+ $selected_tax_terms = $delete_options['selected_tax_terms'];
1015
+
1016
+ $options = array(
1017
+ 'post_status' => 'publish',
1018
+ 'post_type' => $post_type,
1019
+ 'tax_query' => array(
1020
+ array(
1021
+ 'taxonomy' => $selected_taxs,
1022
+ 'terms' => $selected_tax_terms,
1023
+ 'field' => 'slug'
1024
+ )
1025
+ )
1026
+ );
1027
+
1028
+ $private = $delete_options['private'];
1029
+
1030
+ if ($private == 'true') {
1031
+ $options['post_status'] = 'private';
1032
+ }
1033
+
1034
+ $limit_to = $delete_options['limit_to'];
1035
+
1036
+ if ($limit_to > 0) {
1037
+ $options['showposts'] = $limit_to;
1038
+ } else {
1039
+ $options['nopaging'] = 'true';
1040
+ }
1041
+
1042
+ $force_delete = $delete_options['force_delete'];
1043
+
1044
+ if ($force_delete == 'true') {
1045
+ $force_delete = true;
1046
+ } else {
1047
+ $force_delete = false;
1048
+ }
1049
+
1050
+ if ($delete_options['restrict'] == "true") {
1051
+ $options['op'] = $delete_options['taxs_op'];
1052
+ $options['days'] = $delete_options['taxs_days'];
1053
+
1054
+ if ( !class_exists( 'Bulk_Delete_By_Days' ) ) {
1055
+ $bd = BULK_DELETE();
1056
+ require_once $bd::$PLUGIN_DIR . '/include/class-bulk-delete-by-days.php';
1057
+ }
1058
+ $bulk_Delete_By_Days = new Bulk_Delete_By_Days;
1059
+ }
1060
+
1061
+ $wp_query = new WP_Query();
1062
+ $posts = $wp_query->query($options);
1063
+
1064
+ foreach ($posts as $post) {
1065
+ // $force delete parameter to custom post types doesn't work
1066
+ if ( $force_delete ) {
1067
+ wp_delete_post( $post->ID, TRUE );
1068
+ } else {
1069
+ wp_trash_post( $post->ID );
1070
+ }
1071
+ }
1072
+
1073
+ return count( $posts );
1074
+ }
1075
+
1076
+
1077
  /**
1078
  * Render delete by custom post type box
1079
+ *
1080
+ * @static
1081
  */
1082
+ public static function render_delete_posts_by_post_type_box() {
1083
 
1084
  if ( Bulk_Delete_Util::is_posts_box_hidden(Bulk_Delete::BOX_POST_TYPE) ) {
1085
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
1185
  foreach($schedules as $key => $value) {
1186
  ?>
1187
  <option value = "<?php echo $key; ?>"><?php echo $value['display']; ?></option>
1188
+ <?php
1189
  }
1190
  ?>
1191
  </select>
1192
+ <span class = "bd-types-pro" style = "color:red"><?php _e('Only available in Pro Addon', 'bulk-delete'); ?> <a href = "http://bulkwp.com/addons/scheduler-for-deleting-posts-by-post-type/">Buy now</a></span>
1193
  </td>
1194
  </tr>
1195
 
1196
  </table>
1197
  </fieldset>
1198
  <p class="submit">
1199
+ <button type="submit" name="bd_action" value = "delete_posts_by_post_type" class="button-primary"><?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;</button>
1200
  </p>
1201
  <!-- Custom post type end-->
1202
  <?php
1208
  }
1209
 
1210
  /**
1211
+ * Process request to delete posts by post type
1212
+ *
1213
+ * @static
1214
+ * @since 5.0
1215
  */
1216
+ public static function do_delete_posts_by_post_type() {
1217
 
1218
+ $delete_options = array();
1219
+
1220
+ $delete_options['selected_types'] = array_get( $_POST, 'smbd_types' );
1221
+ $delete_options['restrict'] = array_get($_POST, 'smbd_types_restrict', FALSE);
1222
+ $delete_options['limit_to'] = absint(array_get($_POST, 'smbd_types_limit_to', 0));
1223
+ $delete_options['force_delete'] = array_get($_POST, 'smbd_types_force_delete', 'false');
1224
+
1225
+ $delete_options['types_op'] = array_get($_POST, 'smbd_types_op');
1226
+ $delete_options['types_days'] = array_get($_POST, 'smbd_types_days');
1227
+
1228
+ if (array_get($_POST, 'smbd_types_cron', 'false') == 'true') {
1229
+ $freq = $_POST['smbd_types_cron_freq'];
1230
+ $time = strtotime($_POST['smbd_types_cron_start']) - ( get_option('gmt_offset') * 60 * 60 );
1231
+
1232
+ if ($freq == -1) {
1233
+ wp_schedule_single_event( $time, Bulk_Delete::CRON_HOOK_POST_TYPE, array( $delete_options ) );
1234
+ } else {
1235
+ wp_schedule_event( $time, $freq, Bulk_Delete::CRON_HOOK_POST_TYPE, array( $delete_options ) );
1236
+ }
1237
+
1238
+ $msg = __( 'Posts from the selected custom post type are scheduled for deletion.', 'bulk-delete') . ' ' .
1239
+ sprintf( __( 'See the full list of <a href = "%s">scheduled tasks</a>' , 'bulk-delete' ), get_bloginfo( "wpurl" ) . '/wp-admin/admin.php?page=' . Bulk_Delete::CRON_PAGE_SLUG );
1240
+ } else {
1241
+ $deleted_count = self::delete_posts_by_post_type( $delete_options );
1242
+ $msg = sprintf( _n( 'Deleted %d post from the selected custom post type', 'Deleted %d posts from the selected custom post type' , $deleted_count, 'bulk-delete' ), $deleted_count );
1243
  }
1244
 
1245
+ add_settings_error(
1246
+ Bulk_Delete::POSTS_PAGE_SLUG,
1247
+ 'deleted-posts',
1248
+ $msg,
1249
+ 'updated'
1250
+ );
1251
+ }
 
 
1252
 
1253
+ /**
1254
+ * Delete posts by custom post type
1255
+ *
1256
+ * @static
1257
+ * @since 5.0
1258
+ * @param array $delete_options Options for deleting posts
1259
+ * @return int $posts_deleted Number of posts that were deleted
1260
+ */
1261
+ public static function delete_posts_by_post_type( $delete_options ) {
1262
+ $count = 0;
1263
+ $selected_types = $delete_options['selected_types'];
1264
 
1265
+ foreach ( $selected_types as $selected_type ) {
 
 
 
 
 
1266
 
1267
+ $type_status = Bulk_Delete_Util::split_post_type_status( $selected_type );
 
 
 
 
 
1268
 
1269
+ $type = $type_status['type'];
1270
+ $status = $type_status['status'];
 
 
 
 
1271
 
1272
+ $options = array(
1273
+ 'post_status' => $status,
1274
+ 'post_type' => $type
1275
+ );
 
 
1276
 
1277
+ $limit_to = $delete_options['limit_to'];
 
 
 
 
1278
 
1279
+ if ( $limit_to > 0 ) {
1280
+ $options['showposts'] = $limit_to;
1281
+ } else {
1282
+ $options['nopaging'] = 'true';
1283
+ }
 
 
 
 
 
 
1284
 
1285
+ $force_delete = $delete_options['force_delete'];
 
 
 
 
 
1286
 
1287
+ if ( $force_delete == 'true' ) {
1288
+ $force_delete = true;
1289
+ } else {
1290
+ $force_delete = false;
1291
+ }
 
 
 
1292
 
1293
+ self::pre_query();
1294
+
1295
+ if ($delete_options['restrict'] == "true") {
1296
+ $options['op'] = $delete_options['types_op'];
1297
+ $options['days'] = $delete_options['types_days'];
1298
+
1299
+ if ( !class_exists( 'Bulk_Delete_By_Days' ) ) {
1300
+ $bd = BULK_DELETE();
1301
+ require_once $bd::$PLUGIN_DIR . '/include/class-bulk-delete-by-days.php';
1302
+ }
1303
+ $bulk_Delete_By_Days = new Bulk_Delete_By_Days;
1304
+ }
1305
+
1306
+ $wp_query = new WP_Query();
1307
+ $posts = $wp_query->query( $options );
1308
+
1309
+ self::post_query();
1310
+
1311
+ foreach ( $posts as $post ) {
1312
+ // $force delete parameter to custom post types doesn't work
1313
+ if ( $force_delete ) {
1314
+ wp_delete_post( $post->ID, TRUE );
1315
+ } else {
1316
+ wp_trash_post( $post->ID );
1317
+ }
1318
+ }
1319
+
1320
+ $count += count( $posts );
1321
  }
 
 
 
 
 
 
 
1322
 
1323
+ return $count;
1324
+ }
1325
+
1326
+ /**
1327
+ * The event calendar Plugin changes query parameters which results in compatibility issues.
1328
+ * So we disable it before executing our query
1329
+ *
1330
+ * @static
1331
+ * @access private
1332
+ */
1333
+ private static function pre_query() {
1334
+ if ( class_exists( 'TribeEventsQuery' ) ) {
1335
+ remove_filter( 'pre_get_posts', array( TribeEventsQuery, 'pre_get_posts' ), 0 );
1336
+ }
1337
+ }
1338
+
1339
+ /**
1340
+ * The event calendar Plugin changes query parameters which results in compatibility issues.
1341
+ * So we disable it before executing our query and then enable it after our query
1342
+ *
1343
+ * @static
1344
+ * @access private
1345
+ */
1346
+ private static function post_query() {
1347
+ if ( class_exists( 'TribeEventsQuery' ) ) {
1348
+ add_filter( 'pre_get_posts', array( TribeEventsQuery, 'pre_get_posts' ), 0 );
1349
+ }
1350
  }
1351
 
1352
  /**
1353
  * Render delete by url box
1354
+ *
1355
+ * @static
1356
  */
1357
+ public static function render_delete_posts_by_url_box() {
1358
 
1359
  if ( Bulk_Delete_Util::is_posts_box_hidden(Bulk_Delete::BOX_URL) ) {
1360
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
1368
  <fieldset class="options">
1369
  <table class="optiontable">
1370
  <tr>
1371
+ <td scope="row">
1372
  <label for="smdb_specific_pages"><?php _e("Enter one post url (not post ids) per line", 'bulk-delete'); ?></label>
1373
  <br/>
1374
  <textarea style="width: 450px; height: 80px;" id="smdb_specific_pages_urls" name="smdb_specific_pages_urls" rows="5" columns="80" ></textarea>
1375
  </td>
1376
  </tr>
1377
+
1378
  <tr>
1379
  <td>
1380
  <h4><?php _e("Choose your filtering options", 'bulk-delete'); ?></h4>
1392
  </fieldset>
1393
 
1394
  <p>
1395
+ <button type="submit" name="bd_action" value = "delete_posts_by_url" class="button-primary"><?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;</button>
1396
  </p>
1397
  <!-- URLs end-->
1398
  <?php
1399
  }
1400
 
1401
+ /**
1402
+ * Delete posts by url
1403
+ *
1404
+ * @static
1405
+ * @since 5.0
1406
+ */
1407
+ public static function do_delete_posts_by_url() {
1408
+
1409
+ $force_delete = array_get($_POST, 'smbd_specific_force_delete');
1410
+ if ($force_delete == 'true') {
1411
+ $force_delete = true;
1412
+ } else {
1413
+ $force_delete = false;
1414
+ }
1415
+
1416
+ $urls = preg_split( '/\r\n|\r|\n/', array_get($_POST, 'smdb_specific_pages_urls') );
1417
+ foreach ($urls as $url) {
1418
+ $checkedurl = $url;
1419
+ if (substr($checkedurl ,0,1) == '/') {
1420
+ $checkedurl = get_site_url() . $checkedurl ;
1421
+ }
1422
+ $postid = url_to_postid( $checkedurl );
1423
+ wp_delete_post($postid, $force_delete);
1424
+ }
1425
+
1426
+ $deleted_count = count( $url );
1427
+ $msg = sprintf( _n( 'Deleted %d post with the specified urls', 'Deleted %d posts with the specified urls' , $deleted_count, 'bulk-delete' ), $deleted_count);
1428
+
1429
+ add_settings_error(
1430
+ Bulk_Delete::POSTS_PAGE_SLUG,
1431
+ 'deleted-posts',
1432
+ $msg,
1433
+ 'updated'
1434
+ );
1435
+ }
1436
+
1437
  /**
1438
  * Render delete by post revisions box
1439
+ *
1440
+ * @static
1441
  */
1442
+ public static function render_posts_by_revision_box() {
1443
 
1444
  if ( Bulk_Delete_Util::is_posts_box_hidden(Bulk_Delete::BOX_POST_REVISION) ) {
1445
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
1466
  </fieldset>
1467
 
1468
  <p>
1469
+ <button type="submit" name="bd_action" value = "delete_posts_by_revision" class="button-primary"><?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;</button>
1470
  </p>
1471
  <!-- Post Revisions end-->
1472
  <?php
1473
  }
1474
 
1475
+ /**
1476
+ * Process delete revisions request
1477
+ *
1478
+ * @static
1479
+ * @since 5.0
1480
+ */
1481
+ public static function do_delete_posts_by_revision() {
1482
+ $delete_options['revisions'] = array_get( $_POST, 'smbd_revisions' );
1483
+ $deleted_count = self::delete_posts_by_revision( $delete_options );
1484
+
1485
+ $msg = sprintf( _n( 'Deleted %d post revision', 'Deleted %d post revisions' , $deleted_count, 'bulk-delete' ), $deleted_count );
1486
+
1487
+ add_settings_error(
1488
+ Bulk_Delete::POSTS_PAGE_SLUG,
1489
+ 'deleted-posts',
1490
+ $msg,
1491
+ 'updated'
1492
+ );
1493
+ }
1494
+
1495
+ /**
1496
+ * Delete all post revisions
1497
+ *
1498
+ * @since 5.0
1499
+ * @static
1500
+ */
1501
+ public static function delete_posts_by_revision( $delete_options ) {
1502
+ global $wpdb;
1503
+
1504
+ // Revisions
1505
+ if ("revisions" == $delete_options['revisions']) {
1506
+ $revisions = $wpdb->get_results("select ID from $wpdb->posts where post_type = 'revision'");
1507
+
1508
+ foreach ($revisions as $revision) {
1509
+ wp_delete_post( $revision->ID );
1510
+ }
1511
+
1512
+ return count( $revisions );
1513
+ }
1514
+
1515
+ return 0;
1516
+ }
1517
+
1518
  /**
1519
  * Render delete posts by custom field box
1520
+ *
1521
+ * @static
1522
  */
1523
+ public static function render_delete_posts_by_custom_field_box() {
1524
 
1525
  if ( Bulk_Delete_Util::is_posts_box_hidden( Bulk_Delete::BOX_CUSTOM_FIELD ) ) {
1526
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
1527
  return;
1528
  }
1529
 
1530
+ if ( !class_exists( 'Bulk_Delete_Posts_By_Custom_Field' ) ) {
1531
  ?>
1532
  <!-- Custom Field box start-->
1533
  <p>
1534
  <span class = "bd-post-custom-field-pro" style = "color:red">
1535
+ <?php _e( 'You need "Bulk Delete Posts by Custom Field" Addon, to delete post by custom field.', 'bulk-delete' ); ?>
1536
+ <a href = "http://bulkwp.com/addons/bulk-delete-posts-by-custom-field/">Buy now</a>
1537
  </span>
1538
  </p>
1539
  <!-- Custom Field box end-->
1540
  <?php
1541
  } else {
1542
+ Bulk_Delete_Posts_By_Custom_Field::render_delete_posts_by_custom_field_box();
1543
  }
1544
  }
1545
 
1546
  /**
1547
  * Render posts by title box
1548
  *
1549
+ * @since 5.0
1550
  * @static
 
1551
  */
1552
+ public static function render_delete_posts_by_title_box() {
1553
 
1554
  if ( Bulk_Delete_Util::is_posts_box_hidden( Bulk_Delete::BOX_TITLE ) ) {
1555
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
1556
  return;
1557
  }
1558
 
1559
+ if ( !class_exists( 'Bulk_Delete_Posts_By_Title' ) ) {
1560
  ?>
1561
  <!-- Title box start-->
1562
  <p>
1563
  <span class = "bd-post-title-pro" style = "color:red">
1564
+ <?php _e( 'You need "Bulk Delete Posts by Title" Addon, to delete post by title.', 'bulk-delete' ); ?>
1565
+ <a href = "http://bulkwp.com/addons/bulk-delete-posts-by-title/">Buy now</a>
1566
  </span>
1567
  </p>
1568
  <!-- Title box end-->
1569
  <?php
1570
  } else {
1571
+ Bulk_Delete_Posts_By_Title::render_delete_posts_by_title_box();
1572
  }
1573
  }
1574
 
1575
  /**
1576
+ * Render delete posts by duplicate title box
1577
+ *
1578
+ * @since 5.0
1579
+ * @static
1580
+ * @access public
1581
  */
1582
+ public static function render_delete_posts_by_duplicate_title_box() {
1583
+
1584
+ if ( Bulk_Delete_Util::is_posts_box_hidden( Bulk_Delete::BOX_DUPLICATE_TITLE ) ) {
1585
+ printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::POSTS_PAGE_SLUG );
1586
+ return;
1587
+ }
1588
+
1589
+ if ( !class_exists( 'Bulk_Delete_Posts_By_Duplicate_Title' ) ) {
1590
  ?>
1591
+ <!-- Duplicate Title box start-->
1592
  <p>
1593
+ <span class = "bd-post-title-pro" style = "color:red">
1594
+ <?php _e( 'You need "Bulk Delete Posts by Duplicate Title" Addon, to delete post by duplicate title.', 'bulk-delete' ); ?>
1595
+ <a href = "http://bulkwp.com/addons/bulk-delete-posts-by-duplicate-title/">Buy now</a>
1596
+ </span>
1597
  </p>
1598
+ <!-- Duplicate Title box end-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1599
  <?php
1600
+ } else {
1601
+ Bulk_Delete_Posts_By_Duplicate_Title::render_delete_posts_by_duplicate_title_box();
1602
+ }
1603
+ }
1604
+
1605
+ /**
1606
+ * Process delete cron job request.
1607
+ * This should ideally go in a separate class. But I was
1608
+ * lazy to create a separate class for a single function
1609
+ *
1610
+ * @since 5.0
1611
+ * @static
1612
+ */
1613
+ public static function do_delete_cron() {
1614
+ if ( check_admin_referer( 'sm-bulk-delete-cron', 'sm-bulk-delete-cron-nonce' ) ) {
1615
+ $cron_id = absint($_GET['cron_id']);
1616
+ $cron_items = Bulk_Delete_Util::get_cron_schedules();
1617
+ wp_unschedule_event($cron_items[$cron_id]['timestamp'], $cron_items[$cron_id]['type'], $cron_items[$cron_id]['args']);
1618
+
1619
+ $msg = __('The selected scheduled job was successfully deleted ', 'bulk-delete');
1620
+
1621
+ add_settings_error(
1622
+ Bulk_Delete::CRON_PAGE_SLUG,
1623
+ 'deleted-cron',
1624
+ $msg,
1625
+ 'updated'
1626
+ );
1627
+ }
1628
  }
1629
  }
1630
+
1631
+ // hooks
1632
+ add_action( 'bd_delete_posts_by_status' , array( 'Bulk_Delete_Posts' , 'do_delete_posts_by_status' ) );
1633
+ add_action( 'bd_delete_posts_by_category' , array( 'Bulk_Delete_Posts' , 'do_delete_posts_by_category' ) );
1634
+ add_action( 'bd_delete_posts_by_tag' , array( 'Bulk_Delete_Posts' , 'do_delete_posts_by_tag' ) );
1635
+ add_action( 'bd_delete_posts_by_taxonomy' , array( 'Bulk_Delete_Posts' , 'do_delete_posts_by_taxonomy' ) );
1636
+ add_action( 'bd_delete_posts_by_post_type' , array( 'Bulk_Delete_Posts' , 'do_delete_posts_by_post_type' ) );
1637
+ add_action( 'bd_delete_posts_by_url' , array( 'Bulk_Delete_Posts' , 'do_delete_posts_by_url' ) );
1638
+ add_action( 'bd_delete_posts_by_revision' , array( 'Bulk_Delete_Posts' , 'do_delete_posts_by_revision' ) );
1639
+
1640
+ add_action( 'bd_delete_cron' , array( 'Bulk_Delete_Posts' , 'do_delete_cron' ) );
1641
  ?>
include/class-bulk-delete-system-info.php ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * System Info
4
+ *
5
+ * These are functions are used for exporting data from Bulk Delete.
6
+ *
7
+ * @package Bulk Delete
8
+ * @subpackage Admin/System
9
+ * @author Sudar
10
+ * @since 5.0
11
+ * @note Based on the code from Easy Digital Downloads plugin
12
+ */
13
+
14
+ // Exit if accessed directly
15
+ if ( ! defined( 'ABSPATH' ) ) exit;
16
+
17
+ if ( ! class_exists( 'Bulk_Delete_System_Info' ) ) :
18
+
19
+ /**
20
+ * Encapsulates System info
21
+ *
22
+ * @since 5.0
23
+ */
24
+ class Bulk_Delete_System_Info {
25
+ /**
26
+ * Shows the system info panel which contains version data and debug info.
27
+ * The data for the system info is generated by the Browser class.
28
+ *
29
+ * @since 5.0
30
+ * @static
31
+ * @global $wpdb - global object $wpdb Used to query the database using the WordPress Database API
32
+ * @return void
33
+ */
34
+ public static function display_system_info() {
35
+ global $wpdb;
36
+ $bd = BULK_DELETE();
37
+
38
+ if ( ! class_exists( 'Browser' ) ) {
39
+ require_once $bd::$PLUGIN_DIR . 'include/libraries/browser.php';
40
+ }
41
+
42
+ $browser = new Browser();
43
+ if ( get_bloginfo( 'version' ) < '3.4' ) {
44
+ $theme_data = get_theme_data( get_stylesheet_directory() . '/style.css' );
45
+ $theme = $theme_data['Name'] . ' ' . $theme_data['Version'];
46
+ } else {
47
+ $theme_data = wp_get_theme();
48
+ $theme = $theme_data->Name . ' ' . $theme_data->Version;
49
+ }
50
+
51
+ // Try to identifty the hosting provider
52
+ $host = false;
53
+ if( defined( 'WPE_APIKEY' ) ) {
54
+ $host = 'WP Engine';
55
+ } elseif( defined( 'PAGELYBIN' ) ) {
56
+ $host = 'Pagely';
57
+ }
58
+ ?>
59
+ <div class="wrap">
60
+ <h2><?php _e( 'System Information', 'bulk-delete' ); ?></h2><br/>
61
+ <form action="<?php echo esc_url( admin_url( 'admin.php?page=' . $bd::INFO_PAGE_SLUG ) ); ?>" method="post" dir="ltr">
62
+ <textarea style="width:800px;height:400px;font-family:Menlo,Monaco,monospace;white-space:pre;" readonly="readonly" onclick="this.focus();this.select()" id="system-info-textarea" name="bulk-delete-sysinfo" title="<?php _e( 'To copy the system info, click below then press Ctrl + C (PC) or Cmd + C (Mac).', 'bulk-delete' ); ?>">
63
+ ### Begin System Info ###
64
+
65
+ ## Please include this information when posting support requests ##
66
+
67
+ <?php
68
+ do_action( 'bd_system_info_before' );
69
+ ?>
70
+
71
+ Multisite: <?php echo is_multisite() ? 'Yes' . "\n" : 'No' . "\n" ?>
72
+
73
+ SITE_URL: <?php echo site_url() . "\n"; ?>
74
+ HOME_URL: <?php echo home_url() . "\n"; ?>
75
+
76
+ Bulk Delete Version: <?php echo $bd::VERSION . "\n"; ?>
77
+ Upgraded From: <?php echo get_option( 'bulk-delete_version_upgraded_from', 'None' ) . "\n"; ?>
78
+ WordPress Version: <?php echo get_bloginfo( 'version' ) . "\n"; ?>
79
+ Permalink Structure: <?php echo get_option( 'permalink_structure' ) . "\n"; ?>
80
+ Active Theme: <?php echo $theme . "\n"; ?>
81
+ <?php if( $host ) : ?>
82
+ Host: <?php echo $host . "\n"; ?>
83
+ <?php endif; ?>
84
+
85
+ Registered Post types <?php echo implode( ', ', get_post_types() ) . "\n\n"; ?>
86
+
87
+ <?php echo $browser ; ?>
88
+
89
+ PHP Version: <?php echo PHP_VERSION . "\n"; ?>
90
+ MySQL Version: <?php echo mysql_get_server_info() . "\n"; ?>
91
+ Web Server Info: <?php echo $_SERVER['SERVER_SOFTWARE'] . "\n"; ?>
92
+
93
+ WordPress Memory Limit: <?php echo WP_MEMORY_LIMIT; ?><?php echo "\n"; ?>
94
+ PHP Safe Mode: <?php echo ini_get( 'safe_mode' ) ? "Yes" : "No\n"; ?>
95
+ PHP Memory Limit: <?php echo ini_get( 'memory_limit' ) . "\n"; ?>
96
+ PHP Upload Max Size: <?php echo ini_get( 'upload_max_filesize' ) . "\n"; ?>
97
+ PHP Post Max Size: <?php echo ini_get( 'post_max_size' ) . "\n"; ?>
98
+ PHP Upload Max Filesize: <?php echo ini_get( 'upload_max_filesize' ) . "\n"; ?>
99
+ PHP Time Limit: <?php echo ini_get( 'max_execution_time' ) . "\n"; ?>
100
+ PHP Max Input Vars: <?php echo ini_get( 'max_input_vars' ) . "\n"; ?>
101
+ PHP Arg Separator: <?php echo ini_get( 'arg_separator.output' ) . "\n"; ?>
102
+ PHP Allow URL File Open: <?php echo ini_get( 'allow_url_fopen' ) ? "Yes" : "No\n"; ?>
103
+
104
+ WP_DEBUG: <?php echo defined( 'WP_DEBUG' ) ? WP_DEBUG ? 'Enabled' . "\n" : 'Disabled' . "\n" : 'Not set' . "\n" ?>
105
+
106
+ WP Table Prefix: <?php echo "Length: ". strlen( $wpdb->prefix ); echo " Status:"; if ( strlen( $wpdb->prefix )>16 ) {echo " ERROR: Too Long";} else {echo " Acceptable";} echo "\n"; ?>
107
+
108
+ Session: <?php echo isset( $_SESSION ) ? 'Enabled' : 'Disabled'; ?><?php echo "\n"; ?>
109
+ Session Name: <?php echo esc_html( ini_get( 'session.name' ) ); ?><?php echo "\n"; ?>
110
+ Cookie Path: <?php echo esc_html( ini_get( 'session.cookie_path' ) ); ?><?php echo "\n"; ?>
111
+ Save Path: <?php echo esc_html( ini_get( 'session.save_path' ) ); ?><?php echo "\n"; ?>
112
+ Use Cookies: <?php echo ini_get( 'session.use_cookies' ) ? 'On' : 'Off'; ?><?php echo "\n"; ?>
113
+ Use Only Cookies: <?php echo ini_get( 'session.use_only_cookies' ) ? 'On' : 'Off'; ?><?php echo "\n"; ?>
114
+
115
+ DISPLAY ERRORS: <?php echo ( ini_get( 'display_errors' ) ) ? 'On (' . ini_get( 'display_errors' ) . ')' : 'N/A'; ?><?php echo "\n"; ?>
116
+ FSOCKOPEN: <?php echo ( function_exists( 'fsockopen' ) ) ? 'Your server supports fsockopen.' : 'Your server does not support fsockopen.'; ?><?php echo "\n"; ?>
117
+ cURL: <?php echo ( function_exists( 'curl_init' ) ) ? 'Your server supports cURL.' : 'Your server does not support cURL.'; ?><?php echo "\n"; ?>
118
+ SOAP Client: <?php echo ( class_exists( 'SoapClient' ) ) ? 'Your server has the SOAP Client enabled.' : 'Your server does not have the SOAP Client enabled.'; ?><?php echo "\n"; ?>
119
+ SUHOSIN: <?php echo ( extension_loaded( 'suhosin' ) ) ? 'Your server has SUHOSIN installed.' : 'Your server does not have SUHOSIN installed.'; ?><?php echo "\n"; ?>
120
+
121
+ ACTIVE PLUGINS:
122
+
123
+ <?php
124
+ $plugins = get_plugins();
125
+ $active_plugins = get_option( 'active_plugins', array() );
126
+
127
+ foreach ( $plugins as $plugin_path => $plugin ) {
128
+ // If the plugin isn't active, don't show it.
129
+ if ( ! in_array( $plugin_path, $active_plugins ) )
130
+ continue;
131
+
132
+ echo $plugin['Name'] . ': ' . $plugin['Version'] ."\n";
133
+ }
134
+
135
+ if ( is_multisite() ) {
136
+ ?>
137
+
138
+ NETWORK ACTIVE PLUGINS:
139
+
140
+ <?php
141
+ $plugins = wp_get_active_network_plugins();
142
+ $active_plugins = get_site_option( 'active_sitewide_plugins', array() );
143
+
144
+ foreach ( $plugins as $plugin_path ) {
145
+ $plugin_base = plugin_basename( $plugin_path );
146
+
147
+ // If the plugin isn't active, don't show it.
148
+ if ( ! array_key_exists( $plugin_base, $active_plugins ) )
149
+ continue;
150
+
151
+ $plugin = get_plugin_data( $plugin_path );
152
+
153
+ echo $plugin['Name'] . ' :' . $plugin['Version'] ."\n";
154
+ }
155
+ }
156
+ do_action( 'bd_system_info_after' );
157
+ ?>
158
+ ### End System Info ###</textarea>
159
+ <p class="submit">
160
+ <input type="hidden" name="bd_action" value="download_sysinfo">
161
+ <?php submit_button( 'Download System Info File', 'primary', 'bulk-delete-download-sysinfo', false ); ?>
162
+ </p>
163
+ </form>
164
+ </div>
165
+ </div>
166
+ <?php
167
+ /**
168
+ * Runs just before displaying the footer text in the "System Info" admin page.
169
+ *
170
+ * This action is primarily for adding extra content in the footer of "System Info" admin page.
171
+ *
172
+ * @since 5.0
173
+ */
174
+ do_action( 'bd_admin_footer_info_page' );
175
+ }
176
+
177
+ /**
178
+ * Generates the System Info Download File
179
+ *
180
+ * @since 5.0
181
+ * @return void
182
+ */
183
+ public static function generate_sysinfo_download() {
184
+ nocache_headers();
185
+
186
+ header( "Content-type: text/plain" );
187
+ header( 'Content-Disposition: attachment; filename="bulk-delete-system-info.txt"' );
188
+
189
+ echo wp_strip_all_tags( $_POST['bulk-delete-sysinfo'] );
190
+ die();
191
+ }
192
+ }
193
+ endif;
194
+
195
+ add_action( 'bd_download_sysinfo', array( 'Bulk_Delete_System_Info', 'generate_sysinfo_download' ) );
196
+ ?>
include/class-bulk-delete-users.php CHANGED
@@ -2,15 +2,16 @@
2
  /**
3
  * Utility class for deleting users
4
  *
5
- * @package Bulk Delete
6
- * @author Sudar
 
7
  */
8
  class Bulk_Delete_Users {
9
 
10
  /**
11
  * Render delete users box
12
  */
13
- public static function render_delete_users_box() {
14
 
15
  if ( Bulk_Delete_Util::is_users_box_hidden( Bulk_Delete::BOX_USERS ) ) {
16
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::USERS_PAGE_SLUG );
@@ -18,7 +19,7 @@ class Bulk_Delete_Users {
18
  }
19
  ?>
20
  <!-- Users Start-->
21
- <h4><?php _e("Select the user roles from which you want to delete users", 'bulk-delete'); ?></h4>
22
 
23
  <fieldset class="options">
24
  <table class="optiontable">
@@ -28,22 +29,20 @@ class Bulk_Delete_Users {
28
  ?>
29
  <tr>
30
  <td scope="row" >
31
- <input name="smbdu_roles[]" value = "<?php echo $role; ?>" type = "checkbox" />
32
- </td>
33
- <td>
34
- <label for="smbdu_roles"><?php echo $role; ?> (<?php echo $count . " "; _e("Users", 'bulk-delete'); ?>)</label>
35
  </td>
36
  </tr>
37
  <?php
38
  }
39
  ?>
40
  <tr>
41
- <td colspan="2">
42
- <h4><?php _e("Choose your filtering options", 'bulk-delete'); ?></h4>
43
  </td>
44
  </tr>
45
 
46
- <?php
47
  if ( !Bulk_Delete_Util::is_simple_login_log_present() ) {
48
  $disabled = "disabled";
49
  } else {
@@ -52,16 +51,14 @@ class Bulk_Delete_Users {
52
  ?>
53
  <tr>
54
  <td scope="row">
55
- <input name="smbdu_login_restrict" id="smbdu_login_restrict" value = "true" type = "checkbox" <?php echo $disabled; ?> >
56
- </td>
57
- <td>
58
- <?php _e("Only restrict to users who have not logged in the last ", 'bulk-delete');?>
59
- <input type ="textbox" name="smbdu_login_days" id="smbdu_login_days" value ="0" maxlength="4" size="4" <?php echo $disabled; ?> ><?php _e("days", 'bulk-delete');?>
60
- <?php
61
  if ( !Bulk_Delete_Util::is_simple_login_log_present() ) {
62
  ?>
63
  <span style = "color:red">
64
- <?php _e('Need Simple Login Log Plugin', 'bulk-delete'); ?> <a href = "http://wordpress.org/plugins/simple-login-log/">Install now</a>
65
  </span>
66
  <?php
67
  }
@@ -71,36 +68,34 @@ class Bulk_Delete_Users {
71
 
72
  <tr>
73
  <td scope="row">
74
- <input name="smbdu_role_no_posts" id="smbdu_role_no_posts" value = "true" type = "checkbox" >
75
- </td>
76
- <td>
77
  <?php _e( "Only if user doesn't have any post", 'bulk-delete' ); ?>
78
  </td>
79
  </tr>
80
 
81
  <tr>
82
- <td scope="row" colspan="2">
83
- <input name="smbdu_userrole_cron" value = "false" type = "radio" checked="checked" /> <?php _e('Delete now', 'bulk-delete'); ?>
84
- <input name="smbdu_userrole_cron" value = "true" type = "radio" id = "smbdu_userrole_cron" disabled > <?php _e('Schedule', 'bulk-delete'); ?>
85
- <input name="smbdu_userrole_cron_start" id = "smbdu_userrole_cron_start" value = "now" type = "text" disabled><?php _e('repeat ', 'bulk-delete');?>
86
  <select name = "smbdu_userrole_cron_freq" id = "smbdu_userrole_cron_freq" disabled>
87
- <option value = "-1"><?php _e("Don't repeat", 'bulk-delete'); ?></option>
88
  <?php
89
  $schedules = wp_get_schedules();
90
  foreach($schedules as $key => $value) {
91
  ?>
92
  <option value = "<?php echo $key; ?>"><?php echo $value['display']; ?></option>
93
- <?php
94
  }
95
  ?>
96
  </select>
97
- <span class = "bdu-users-by-role-pro" style = "color:red"><?php _e('Only available in Pro Addon', 'bulk-delete'); ?> <a href = "http://sudarmuthu.com/out/buy-bulk-delete-users-by-role-addon">Buy now</a></span>
98
  </td>
99
  </tr>
100
 
101
  <tr>
102
- <td scope="row" colspan="2">
103
- <?php _e("Enter time in Y-m-d H:i:s format or enter now to use current time", 'bulk-delete');?>
104
  </td>
105
  </tr>
106
 
@@ -108,14 +103,57 @@ class Bulk_Delete_Users {
108
  </fieldset>
109
 
110
  <p>
111
- <button type="submit" name="smbdu_action" value = "bulk-delete-users-by-role" class="button-primary"><?php _e("Bulk Delete ", 'bulk-delete') ?>&raquo;</button>
112
  </p>
113
  <!-- Users end-->
114
  <?php
115
  }
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  /**
118
  * Delete users by user role
 
 
119
  */
120
  public static function delete_users_by_role( $delete_options ) {
121
 
@@ -153,18 +191,23 @@ class Bulk_Delete_Users {
153
  $count ++;
154
  }
155
  }
156
-
157
  return $count;
158
  }
159
 
160
  /**
161
  * Find the last login date/time of a user
 
 
 
162
  */
163
  private static function get_last_login( $user_id ) {
164
  global $wpdb;
165
 
166
- return $wpdb->get_var( $wpdb->prepare( "SELECT time FROM {$wpdb->prefix}" . Bulk_Delete_Util::SIMPLE_LOGIN_LOG_TABLE .
167
  " WHERE uid = %d ORDER BY time DESC LIMIT 1", $user_id ) );
168
  }
169
  }
 
 
170
  ?>
2
  /**
3
  * Utility class for deleting users
4
  *
5
+ * @package Bulk_Delete
6
+ * @subpackage Users
7
+ * @author Sudar
8
  */
9
  class Bulk_Delete_Users {
10
 
11
  /**
12
  * Render delete users box
13
  */
14
+ public static function render_delete_users_by_role_box() {
15
 
16
  if ( Bulk_Delete_Util::is_users_box_hidden( Bulk_Delete::BOX_USERS ) ) {
17
  printf( __( 'This section just got enabled. Kindly <a href = "%1$s">refresh</a> the page to fully enable it.', 'bulk-delete' ), 'admin.php?page=' . Bulk_Delete::USERS_PAGE_SLUG );
19
  }
20
  ?>
21
  <!-- Users Start-->
22
+ <h4><?php _e( 'Select the user roles from which you want to delete users', 'bulk-delete' ); ?></h4>
23
 
24
  <fieldset class="options">
25
  <table class="optiontable">
29
  ?>
30
  <tr>
31
  <td scope="row" >
32
+ <input name="smbdu_roles[]" value = "<?php echo $role; ?>" type = "checkbox">
33
+ <label for="smbdu_roles"><?php echo $role; ?> (<?php echo $count . " "; _e( 'Users', 'bulk-delete' ); ?>)</label>
 
 
34
  </td>
35
  </tr>
36
  <?php
37
  }
38
  ?>
39
  <tr>
40
+ <td scope="row">
41
+ <h4><?php _e( 'Choose your filtering options', 'bulk-delete' ); ?></h4>
42
  </td>
43
  </tr>
44
 
45
+ <?php
46
  if ( !Bulk_Delete_Util::is_simple_login_log_present() ) {
47
  $disabled = "disabled";
48
  } else {
51
  ?>
52
  <tr>
53
  <td scope="row">
54
+ <input name="smbdu_login_restrict" id="smbdu_login_restrict" value = "true" type = "checkbox" <?php echo $disabled; ?>>
55
+ <?php _e( 'Only restrict to users who have not logged in the last ', 'bulk-delete' );?>
56
+ <input type ="textbox" name="smbdu_login_days" id="smbdu_login_days" value ="0" maxlength="4" size="4" <?php echo $disabled; ?> ><?php _e( 'days', 'bulk-delete' );?>
57
+ <?php
 
 
58
  if ( !Bulk_Delete_Util::is_simple_login_log_present() ) {
59
  ?>
60
  <span style = "color:red">
61
+ <?php _e( 'Need Simple Login Log Plugin', 'bulk-delete' ); ?> <a href = "http://wordpress.org/plugins/simple-login-log/">Install now</a>
62
  </span>
63
  <?php
64
  }
68
 
69
  <tr>
70
  <td scope="row">
71
+ <input name="smbdu_role_no_posts" id="smbdu_role_no_posts" value = "true" type = "checkbox">
 
 
72
  <?php _e( "Only if user doesn't have any post", 'bulk-delete' ); ?>
73
  </td>
74
  </tr>
75
 
76
  <tr>
77
+ <td scope="row">
78
+ <input name="smbdu_userrole_cron" value = "false" type = "radio" checked="checked"> <?php _e( 'Delete now', 'bulk-delete' ); ?>
79
+ <input name="smbdu_userrole_cron" value = "true" type = "radio" id = "smbdu_userrole_cron" disabled > <?php _e( 'Schedule', 'bulk-delete' ); ?>
80
+ <input name="smbdu_userrole_cron_start" id = "smbdu_userrole_cron_start" value = "now" type = "text" disabled><?php _e( 'repeat ', 'bulk-delete' );?>
81
  <select name = "smbdu_userrole_cron_freq" id = "smbdu_userrole_cron_freq" disabled>
82
+ <option value = "-1"><?php _e( "Don't repeat", 'bulk-delete' ); ?></option>
83
  <?php
84
  $schedules = wp_get_schedules();
85
  foreach($schedules as $key => $value) {
86
  ?>
87
  <option value = "<?php echo $key; ?>"><?php echo $value['display']; ?></option>
88
+ <?php
89
  }
90
  ?>
91
  </select>
92
+ <span class = "bdu-users-by-role-pro" style = "color:red"><?php _e( 'Only available in Pro Addon', 'bulk-delete' ); ?> <a href = "http://bulkwp.com/addons/scheduler-for-deleting-users-by-role/">Buy now</a></span>
93
  </td>
94
  </tr>
95
 
96
  <tr>
97
+ <td scope="row">
98
+ <?php _e( 'Enter time in Y-m-d H:i:s format or enter now to use current time', 'bulk-delete' );?>
99
  </td>
100
  </tr>
101
 
103
  </fieldset>
104
 
105
  <p>
106
+ <button type="submit" name="bd_action" value = "delete_users_by_role" class="button-primary"><?php _e( 'Bulk Delete ', 'bulk-delete' ) ?>&raquo;</button>
107
  </p>
108
  <!-- Users end-->
109
  <?php
110
  }
111
 
112
+ /**
113
+ * Process the request for deleting users by role
114
+ *
115
+ * @static
116
+ * @since 5.0
117
+ */
118
+ public static function do_delete_users_by_role() {
119
+
120
+ $delete_options = array();
121
+ $delete_options['selected_roles'] = array_get( $_POST, 'smbdu_roles' );
122
+ $delete_options['no_posts'] = array_get( $_POST, 'smbdu_role_no_posts', FALSE );
123
+
124
+ $delete_options['login_restrict'] = array_get( $_POST, 'smbdu_login_restrict', FALSE );
125
+ $delete_options['login_days'] = array_get( $_POST, 'smbdu_login_days' );
126
+ $delete_options['limit_to'] = array_get( $_POST, 'smbdu_role_limit' );
127
+
128
+ if (array_get( $_POST, 'smbdu_userrole_cron', 'false' ) == 'true' ) {
129
+ $freq = $_POST['smbdu_userrole_cron_freq'];
130
+ $time = strtotime( $_POST['smbdu_userrole_cron_start'] ) - ( get_option( 'gmt_offset' ) * 60 * 60 );
131
+
132
+ if ( $freq == -1 ) {
133
+ wp_schedule_single_event( $time, Bulk_Delete::CRON_HOOK_USER_ROLE, array( $delete_options ) );
134
+ } else {
135
+ wp_schedule_event( $time, $freq , Bulk_Delete::CRON_HOOK_USER_ROLE, array( $delete_options ) );
136
+ }
137
+
138
+ $msg = __( 'Users from the selected userrole are scheduled for deletion.', 'bulk-delete' ) . ' ' .
139
+ sprintf( __( 'See the full list of <a href = "%s">scheduled tasks</a>' , 'bulk-delete' ), get_bloginfo( "wpurl" ) . '/wp-admin/admin.php?page=' . Bulk_Delete::CRON_PAGE_SLUG );
140
+ } else {
141
+ $deleted_count = self::delete_users_by_role( $delete_options );
142
+ $msg = sprintf( _n('Deleted %d user from the selected roles', 'Deleted %d users from the selected role' , $deleted_count, 'bulk-delete' ), $deleted_count );
143
+ }
144
+
145
+ add_settings_error(
146
+ Bulk_Delete::USERS_PAGE_SLUG,
147
+ 'deleted-users',
148
+ $msg,
149
+ 'updated'
150
+ );
151
+ }
152
+
153
  /**
154
  * Delete users by user role
155
+ *
156
+ * @static
157
  */
158
  public static function delete_users_by_role( $delete_options ) {
159
 
191
  $count ++;
192
  }
193
  }
194
+
195
  return $count;
196
  }
197
 
198
  /**
199
  * Find the last login date/time of a user
200
+ *
201
+ * @static
202
+ * @access private
203
  */
204
  private static function get_last_login( $user_id ) {
205
  global $wpdb;
206
 
207
+ return $wpdb->get_var( $wpdb->prepare( "SELECT time FROM {$wpdb->prefix}" . Bulk_Delete_Util::SIMPLE_LOGIN_LOG_TABLE .
208
  " WHERE uid = %d ORDER BY time DESC LIMIT 1", $user_id ) );
209
  }
210
  }
211
+
212
+ add_action( 'bd_delete_users_by_role', array( 'Bulk_Delete_Users', 'process_deleting_users_by_role' ) );
213
  ?>
include/class-bulk-delete-util.php CHANGED
@@ -2,8 +2,9 @@
2
  /**
3
  * Utility class
4
  *
5
- * @package Bulk Delete
6
- * @author Sudar
 
7
  */
8
  class Bulk_Delete_Util {
9
 
@@ -12,11 +13,16 @@ class Bulk_Delete_Util {
12
 
13
  // Meta boxes
14
  const VISIBLE_POST_BOXES = 'metaboxhidden_toplevel_page_bulk-delete-posts';
 
15
  const VISIBLE_USER_BOXES = 'metaboxhidden_bulk-delete_page_bulk-delete-users';
16
 
17
  /**
18
  * Find out if Simple Login Log is installed or not
19
  * http://wordpress.org/plugins/simple-login-log/
 
 
 
 
20
  */
21
  public static function is_simple_login_log_present() {
22
  global $wpdb;
@@ -29,11 +35,12 @@ class Bulk_Delete_Util {
29
  }
30
 
31
  /**
32
- * @brief Check whether the meta box in posts page is hidden or not
33
- *
34
- * @param $box
35
  *
36
- * @return
 
 
 
37
  */
38
  public static function is_posts_box_hidden( $box ) {
39
  $hidden_boxes = self::get_posts_hidden_boxes();
@@ -43,7 +50,9 @@ class Bulk_Delete_Util {
43
  /**
44
  * Get the list of hidden boxes in posts page
45
  *
46
- * @return the array of hidden meta boxes
 
 
47
  */
48
  public static function get_posts_hidden_boxes() {
49
  $current_user = wp_get_current_user();
@@ -51,11 +60,39 @@ class Bulk_Delete_Util {
51
  }
52
 
53
  /**
54
- * @brief Check whether the meta box in users page is hidden or not
55
  *
56
- * @param $box
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  *
58
- * @return
 
 
 
59
  */
60
  public static function is_users_box_hidden( $box ) {
61
  $hidden_boxes = self::get_users_hidden_boxes();
@@ -65,7 +102,9 @@ class Bulk_Delete_Util {
65
  /**
66
  * Get the list of hidden boxes in users page
67
  *
68
- * @return the array of hidden meta boxes
 
 
69
  */
70
  public static function get_users_hidden_boxes() {
71
  $current_user = wp_get_current_user();
@@ -75,7 +114,9 @@ class Bulk_Delete_Util {
75
  /**
76
  * Get the list of cron schedules
77
  *
78
- * @return array - The list of cron schedules
 
 
79
  */
80
  public static function get_cron_schedules() {
81
 
@@ -108,6 +149,9 @@ class Bulk_Delete_Util {
108
 
109
  /**
110
  * Generate display name from post type and status
 
 
 
111
  */
112
  public static function display_post_type_status( $str ) {
113
  $type_status = self::split_post_type_status( $str );
@@ -136,6 +180,9 @@ class Bulk_Delete_Util {
136
 
137
  /**
138
  * Split post type and status
 
 
 
139
  */
140
  public static function split_post_type_status( $str ) {
141
  $type_status = array();
@@ -153,4 +200,20 @@ class Bulk_Delete_Util {
153
  return $type_status;
154
  }
155
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  ?>
2
  /**
3
  * Utility class
4
  *
5
+ * @package Bulk_Delete
6
+ * @subpackage Util
7
+ * @author Sudar
8
  */
9
  class Bulk_Delete_Util {
10
 
13
 
14
  // Meta boxes
15
  const VISIBLE_POST_BOXES = 'metaboxhidden_toplevel_page_bulk-delete-posts';
16
+ const VISIBLE_PAGE_BOXES = 'metaboxhidden_bulk-delete_page_bulk-delete-pages';
17
  const VISIBLE_USER_BOXES = 'metaboxhidden_bulk-delete_page_bulk-delete-users';
18
 
19
  /**
20
  * Find out if Simple Login Log is installed or not
21
  * http://wordpress.org/plugins/simple-login-log/
22
+ *
23
+ * @static
24
+ * @access public
25
+ * @return bool True if plugin is installed, False otherwise
26
  */
27
  public static function is_simple_login_log_present() {
28
  global $wpdb;
35
  }
36
 
37
  /**
38
+ * Check whether the meta box in posts page is hidden or not
 
 
39
  *
40
+ * @static
41
+ * @access public
42
+ * @param string $box The name of the box
43
+ * @return bool True if the box is hidden, False otherwise
44
  */
45
  public static function is_posts_box_hidden( $box ) {
46
  $hidden_boxes = self::get_posts_hidden_boxes();
50
  /**
51
  * Get the list of hidden boxes in posts page
52
  *
53
+ * @static
54
+ * @access public
55
+ * @return array The list of hidden meta boxes
56
  */
57
  public static function get_posts_hidden_boxes() {
58
  $current_user = wp_get_current_user();
60
  }
61
 
62
  /**
63
+ * Check whether the meta box in pages page is hidden or not
64
  *
65
+ * @since 5.0
66
+ * @static
67
+ * @access public
68
+ * @param string $box The name of the box to check
69
+ * @return bool True if the box is hidden, False otherwise
70
+ */
71
+ public static function is_pages_box_hidden( $box ) {
72
+ $hidden_boxes = self::get_pages_hidden_boxes();
73
+ return ( is_array( $hidden_boxes ) && in_array( $box, $hidden_boxes ) );
74
+ }
75
+
76
+ /**
77
+ * Get the list of hidden boxes in posts page
78
+ *
79
+ * @since 5.0
80
+ * @static
81
+ * @access public
82
+ * @return the array of hidden meta boxes
83
+ */
84
+ public static function get_pages_hidden_boxes() {
85
+ $current_user = wp_get_current_user();
86
+ return get_user_meta( $current_user->ID, self::VISIBLE_PAGE_BOXES, TRUE );
87
+ }
88
+
89
+ /**
90
+ * Check whether the meta box in users page is hidden or not
91
  *
92
+ * @static
93
+ * @access public
94
+ * @param string $box The name of the box to check
95
+ * @return bool True if the box is hidden, False otherwise
96
  */
97
  public static function is_users_box_hidden( $box ) {
98
  $hidden_boxes = self::get_users_hidden_boxes();
102
  /**
103
  * Get the list of hidden boxes in users page
104
  *
105
+ * @static
106
+ * @access public
107
+ * @return array The array of hidden meta boxes
108
  */
109
  public static function get_users_hidden_boxes() {
110
  $current_user = wp_get_current_user();
114
  /**
115
  * Get the list of cron schedules
116
  *
117
+ * @static
118
+ * @access public
119
+ * @return array The list of cron schedules
120
  */
121
  public static function get_cron_schedules() {
122
 
149
 
150
  /**
151
  * Generate display name from post type and status
152
+ *
153
+ * @static
154
+ * @access public
155
  */
156
  public static function display_post_type_status( $str ) {
157
  $type_status = self::split_post_type_status( $str );
180
 
181
  /**
182
  * Split post type and status
183
+ *
184
+ * @static
185
+ * @access public
186
  */
187
  public static function split_post_type_status( $str ) {
188
  $type_status = array();
200
  return $type_status;
201
  }
202
  }
203
+
204
+ /**
205
+ * Get a value from an array based on key.
206
+ * If key is present returns the value, else returns the default value
207
+ *
208
+ * @param array $array Array from which value has to be retrieved
209
+ * @param string $key key, whose value to be retrieved
210
+ * @param string $default Optional. Default value to be returned, if the key is not found
211
+ *
212
+ * @return mixed Value if key is present, else the default value
213
+ */
214
+ if ( !function_exists( 'array_get' ) ) {
215
+ function array_get( $array, $key, $default = NULL ) {
216
+ return isset( $array[ $key ] ) ? $array[ $key ] : $default;
217
+ }
218
+ }
219
  ?>
include/class-cron-list-table.php CHANGED
@@ -2,9 +2,9 @@
2
  /**
3
  * Table to show cron list
4
  *
5
- * @package Bulk Delete
6
  * @subpackage Cron
7
- * @author Sudar
8
  */
9
  class Cron_List_Table extends WP_List_Table {
10
 
@@ -14,15 +14,16 @@ class Cron_List_Table extends WP_List_Table {
14
  */
15
  function __construct() {
16
  parent::__construct( array(
17
- 'singular'=> 'cron_list', //Singular label
18
- 'plural' => 'cron_lists', //plural label, also this well be one of the table css class
19
- 'ajax' => false //We won't support Ajax for this table
20
  ) );
21
  }
22
 
23
  /**
24
  * Add extra markup in the toolbars before or after the list
25
- * @param string $which, helps you decide if you add the markup after (bottom) or before (top) the list
 
26
  */
27
  function extra_tablenav( $which ) {
28
  if ( $which == "top" ){
@@ -41,76 +42,7 @@ class Cron_List_Table extends WP_List_Table {
41
  _e('Scheduling auto post or user 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>', __('Delete posts by custom field', 'bulk-delete'), '</strong>', ' - ';
52
- echo __('Adds the ability to delete posts based on custom fields', 'bulk-delete');
53
- echo ' <a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-by-custom-field">', __('More Info', 'bulk-delete'), '</a>.';
54
- echo ' <a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-by-custom-field">', __('Buy now', 'bulk-delete'), '</a>';
55
- echo '</li>';
56
-
57
- echo '<li>';
58
- echo '<strong>', __( 'Delete posts by title', 'bulk-delete' ), '</strong>', ' - ';
59
- echo __( 'Adds the ability to delete posts based on title', 'bulk-delete' );
60
- echo ' <a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-by-title">', __( 'More Info', 'bulk-delete' ), '</a>.';
61
- echo ' <a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-by-title">', __( 'Buy now', 'bulk-delete' ), '</a>';
62
- echo '</li>';
63
-
64
- echo '<li>';
65
- echo '<strong>', __('Schedule auto delete of Posts by Categories', 'bulk-delete'), '</strong>', ' - ';
66
- echo __('Adds the ability to schedule auto delete of posts based on categories', 'bulk-delete');
67
- echo ' <a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-categories">', __('More Info', 'bulk-delete'), '</a>.';
68
- echo ' <a href = "http://sudarmuthu.com/out/buy-bulk-delete-category-addon">', __('Buy now', 'bulk-delete'), '</a>';
69
- echo '</li>';
70
-
71
- echo '<li>';
72
- echo '<strong>', __('Schedule auto delete of Posts by Tags', 'bulk-delete'), '</strong>', ' - ';
73
- echo __('Adds the ability to schedule auto delete of posts based on tags', 'bulk-delete');
74
- echo ' <a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-tags">', __('More Info', 'bulk-delete'), '</a>.';
75
- echo ' <a href = "http://sudarmuthu.com/out/buy-bulk-delete-tags-addon">', __('Buy now', 'bulk-delete'), '</a>';
76
- echo '</li>';
77
-
78
- echo '<li>';
79
- echo '<strong>', __('Schedule auto delete of posts by Custom Taxonomy', 'bulk-delete'), '</strong>', ' - ';
80
- echo __('Adds the ability to schedule auto delete of posts based on custom taxonomies', 'bulk-delete');
81
- echo ' <a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-taxonomy">', __('More Info', 'bulk-delete'), '</a>.';
82
- echo ' <a href = "http://sudarmuthu.com/out/buy-bulk-delete-taxonomy-addon">', __('Buy now', 'bulk-delete'), '</a>';
83
- echo '</li>';
84
-
85
- echo '<li>';
86
- echo '<strong>', __('Schedule auto delete of Posts by Custom Post Type', 'bulk-delete'), '</strong>', ' - ';
87
- echo __('Adds the ability to schedule auto delete of posts based on custom post types', 'bulk-delete');
88
- echo ' <a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-post-types">', __('More Info', 'bulk-delete'), '</a>.';
89
- echo ' <a href = "http://sudarmuthu.com/out/buy-bulk-delete-post-type-addon">', __('Buy now', 'bulk-delete'), '</a>';
90
- echo '</li>';
91
-
92
- echo '<li>';
93
- echo '<strong>', __('Schedule auto delete of Pages', 'bulk-delete'), '</strong>', ' - ';
94
- echo __('Adds the ability to schedule auto delete pages', 'bulk-delete');
95
- echo ' <a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-pages">', __('More Info', 'bulk-delete'), '</a>.';
96
- echo ' <a href = "http://sudarmuthu.com/out/buy-bulk-delete-pages-addon">', __('Buy now', 'bulk-delete'), '</a>';
97
- echo '</li>';
98
-
99
- echo '<li>';
100
- echo '<strong>', __('Schedule auto delete of Posts by Post Status', 'bulk-delete'), '</strong>', ' - ';
101
- echo __('Adds the ability to schedule auto delete of posts based on post status like drafts, pending posts, scheduled posts etc.', 'bulk-delete');
102
- echo ' <a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-post-status">', __('More Info', 'bulk-delete'), '</a>.';
103
- echo ' <a href = "http://sudarmuthu.com/out/buy-bulk-delete-post-status-addon">', __('Buy now', 'bulk-delete'), '</a>';
104
- echo '</li>';
105
-
106
- echo '<li>';
107
- echo '<strong>', __('Schedule auto delete of Users by User Role', 'bulk-delete'), '</strong>', ' - ';
108
- echo __('Adds the ability to schedule auto delete of users based on user role', 'bulk-delete');
109
- echo ' <a href = "http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-users-by-user-role">', __('More Info', 'bulk-delete'), '</a>.';
110
- echo ' <a href = "http://sudarmuthu.com/out/buy-bulk-delete-users-by-role-addon">', __('Buy now', 'bulk-delete'), '</a>';
111
- echo '</li>';
112
-
113
- echo '</ul>';
114
  }
115
  }
116
 
@@ -158,7 +90,7 @@ class Cron_List_Table extends WP_List_Table {
158
  "per_page" => $perpage,
159
  ) );
160
  //The pagination links are automatically built according to those parameters
161
-
162
  /* — Register the Columns — */
163
  $columns = $this->get_columns();
164
  $hidden = array();
@@ -171,16 +103,16 @@ class Cron_List_Table extends WP_List_Table {
171
  function column_col_cron_due($item) {
172
  //Build row actions
173
  $actions = array(
174
- 'delete' => sprintf( '<a href="?page=%s&smbd_action=%s&cron_id=%s&%s=%s">%s</a>',
175
  $_REQUEST['page'],
176
- 'delete-cron',
177
  $item['id'],
178
  'sm-bulk-delete-cron-nonce',
179
  wp_create_nonce( 'sm-bulk-delete-cron' ),
180
  __( 'Delete', 'bulk-delete' )
181
  ),
182
  );
183
-
184
  //Return the title contents
185
  return sprintf('%1$s <span style="color:silver">(%2$s)</span>%3$s',
186
  /*$1%s*/ $item['due'],
2
  /**
3
  * Table to show cron list
4
  *
5
+ * @package Bulk_Delete
6
  * @subpackage Cron
7
+ * @author Sudar
8
  */
9
  class Cron_List_Table extends WP_List_Table {
10
 
14
  */
15
  function __construct() {
16
  parent::__construct( array(
17
+ 'singular' => 'cron_list', //Singular label
18
+ 'plural' => 'cron_lists', //plural label, also this well be one of the table css class
19
+ 'ajax' => false //We won't support Ajax for this table
20
  ) );
21
  }
22
 
23
  /**
24
  * Add extra markup in the toolbars before or after the list
25
+ *
26
+ * @param string $which Whether the markup should appear after (bottom) or before (top) the list
27
  */
28
  function extra_tablenav( $which ) {
29
  if ( $which == "top" ){
42
  _e('Scheduling auto post or user deletion is available only when you buy pro addons.', 'bulk-delete');
43
  echo '</p>';
44
 
45
+ BD_License::display_available_addon_list();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  }
47
  }
48
 
90
  "per_page" => $perpage,
91
  ) );
92
  //The pagination links are automatically built according to those parameters
93
+
94
  /* — Register the Columns — */
95
  $columns = $this->get_columns();
96
  $hidden = array();
103
  function column_col_cron_due($item) {
104
  //Build row actions
105
  $actions = array(
106
+ 'delete' => sprintf( '<a href="?page=%s&bd_action=%s&cron_id=%s&%s=%s">%s</a>',
107
  $_REQUEST['page'],
108
+ 'delete_cron',
109
  $item['id'],
110
  'sm-bulk-delete-cron-nonce',
111
  wp_create_nonce( 'sm-bulk-delete-cron' ),
112
  __( 'Delete', 'bulk-delete' )
113
  ),
114
  );
115
+
116
  //Return the title contents
117
  return sprintf('%1$s <span style="color:silver">(%2$s)</span>%3$s',
118
  /*$1%s*/ $item['due'],
include/class-license-list-table.php ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Table to show the list of addon licenses
4
+ *
5
+ * @package Bulk_Delete
6
+ * @subpackage Addon
7
+ * @author Sudar
8
+ * @since 5.0
9
+ */
10
+ class License_List_Table extends WP_List_Table {
11
+
12
+ /**
13
+ * Constructor, setup labels
14
+ *
15
+ * @since 5.0
16
+ */
17
+ function __construct() {
18
+ parent::__construct( array(
19
+ 'singular' => 'license_list', // Singular label
20
+ 'plural' => 'license_lists', // plural label, also this well be one of the table css class
21
+ 'ajax' => false // We won't support Ajax for this table
22
+ ) );
23
+ }
24
+
25
+ /**
26
+ * Add extra markup in the toolbars before or after the list
27
+ *
28
+ * @since 5.0
29
+ * @param string $which Whether the markup should be after (bottom) or before (top) the list
30
+ * @uses Bulk_Delete_Adddon::display_available_addon_list() Display the list of available addons
31
+ */
32
+ function extra_tablenav( $which ) {
33
+ if ( $which == "top" ) {
34
+ echo '<p>';
35
+ _e( 'This is the list of addon license that are currently registered with the plugin.', 'bulk-delete' );
36
+ echo '</p>';
37
+ }
38
+ }
39
+
40
+ /**
41
+ * Define the list of columns that will be used in the table
42
+ *
43
+ * @since 5.0
44
+ * @return array $columns The list of columns in the table
45
+ */
46
+ function get_columns() {
47
+ return $columns = array(
48
+ 'col_addon_name' => __( 'Addon Name', 'bulk-delete' ),
49
+ 'col_license' => __( 'License Code', 'bulk-delete' ),
50
+ 'col_license_validity' => __( 'Validity', 'bulk-delete' ),
51
+ 'col_expires' => __( 'Expires', 'bulk-delete' )
52
+ );
53
+ }
54
+
55
+ /**
56
+ * Defines columns that can be sorted
57
+ *
58
+ * @since 5.0
59
+ * @return array $sortable List of columns that can be sorted
60
+ */
61
+ public function get_sortable_columns() {
62
+ return $sortable = array(
63
+ 'col_addon_name' => array( 'addon_name', FALSE )
64
+ );
65
+ }
66
+
67
+ /**
68
+ * Prepare the table
69
+ *
70
+ * @since 5.0
71
+ */
72
+ function prepare_items() {
73
+ $columns = $this->get_columns();
74
+ $hidden = array();
75
+ $sortable = $this->get_sortable_columns();
76
+
77
+ $this->_column_headers = array( $columns, $hidden, $sortable );
78
+
79
+ $this->items = BD_License::get_licenses();
80
+ }
81
+
82
+ /**
83
+ * Display the col_addon_name column
84
+ *
85
+ * @since 5.0
86
+ * @param array $item Single row of data
87
+ */
88
+ function column_col_addon_name( $item ) {
89
+ $validity = $item['validity'];
90
+ $action_label = __( 'Delete', 'bulk-delete' );
91
+ $action_name = 'delete_license';
92
+
93
+ if ( 'valid' == $validity ) {
94
+ $action_label = __( 'Deactivate', 'bulk-delete' );
95
+ $action_name = 'deactivate_license';
96
+ }
97
+
98
+ // Build row actions
99
+ $actions = array(
100
+ 'deactivate' => sprintf( '<a href="?page=%s&bd_action=%s&addon-code=%s&%s=%s">%s</a>',
101
+ $_REQUEST['page'],
102
+ $action_name,
103
+ $item['addon-code'],
104
+ 'bd-deactivate-license-nonce',
105
+ wp_create_nonce( 'bd-deactivate-license' ),
106
+ $action_label
107
+ ),
108
+ );
109
+
110
+ // Return the title contents
111
+ return sprintf('%1$s%2$s',
112
+ /*$1%s*/ $item['addon-name'],
113
+ /*$2%s*/ $this->row_actions( $actions )
114
+ );
115
+ }
116
+
117
+ /**
118
+ * Display the col_license column
119
+ *
120
+ * @since 5.0
121
+ * @param array $item Single row of data
122
+ */
123
+ function column_col_license( $item ) {
124
+ return $item['license'];
125
+ }
126
+
127
+ /**
128
+ * Display the col_license_validity column
129
+ *
130
+ * @since 5.0
131
+ * @param array $item Single row of data
132
+ */
133
+ function column_col_license_validity( $item ) {
134
+ $validity = $item['validity'];
135
+ if ( 'valid' == $validity ) {
136
+ return '<span style="color:green;">' . $validity . '</span>';
137
+ } else {
138
+ return '<span style="color:red;">' . $validity . '</span>';
139
+ }
140
+ }
141
+
142
+ /**
143
+ * Display the col_expires column
144
+ *
145
+ * @since 5.0
146
+ * @param array $item Single row of data
147
+ */
148
+ function column_col_expires( $item ) {
149
+ if ( key_exists( 'expires', $item ) ) {
150
+ return $item['expires'];
151
+ } else {
152
+ return __( 'N/A', 'bulk-delete' );
153
+ }
154
+ }
155
+
156
+ /**
157
+ * Define the message that will be shown when the table is empty
158
+ *
159
+ * @since 5.0
160
+ */
161
+ function no_items() {
162
+ _e( "You don't have any valid addon license yet.", 'bulk-delete' );
163
+ }
164
+ }
165
+ ?>
include/libraries/EDD_SL_Plugin_Updater.php ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // uncomment this line for testing
4
+ //set_site_transient( 'update_plugins', null );
5
+
6
+ /**
7
+ * Allows plugins to use their own update API.
8
+ *
9
+ * @author Pippin Williamson
10
+ * @version 1.1
11
+ */
12
+ class EDD_SL_Plugin_Updater {
13
+ private $api_url = '';
14
+ private $api_data = array();
15
+ private $name = '';
16
+ private $slug = '';
17
+
18
+ /**
19
+ * Class constructor.
20
+ *
21
+ * @uses plugin_basename()
22
+ * @uses hook()
23
+ *
24
+ * @param string $_api_url The URL pointing to the custom API endpoint.
25
+ * @param string $_plugin_file Path to the plugin file.
26
+ * @param array $_api_data Optional data to send with API calls.
27
+ * @return void
28
+ */
29
+ function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
30
+ $this->api_url = trailingslashit( $_api_url );
31
+ $this->api_data = $_api_data;
32
+ $this->name = plugin_basename( $_plugin_file );
33
+ $this->slug = basename( $_plugin_file, '.php');
34
+ $this->version = $_api_data['version'];
35
+
36
+ // Set up hooks.
37
+ $this->hook();
38
+ }
39
+
40
+ /**
41
+ * Set up Wordpress filters to hook into WP's update process.
42
+ *
43
+ * @uses add_filter()
44
+ *
45
+ * @return void
46
+ */
47
+ private function hook() {
48
+ add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'pre_set_site_transient_update_plugins_filter' ) );
49
+ add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
50
+ add_filter( 'http_request_args', array( $this, 'http_request_args' ), 10, 2 );
51
+ }
52
+
53
+ /**
54
+ * Check for Updates at the defined API endpoint and modify the update array.
55
+ *
56
+ * This function dives into the update api just when Wordpress creates its update array,
57
+ * then adds a custom API call and injects the custom plugin data retrieved from the API.
58
+ * It is reassembled from parts of the native Wordpress plugin update code.
59
+ * See wp-includes/update.php line 121 for the original wp_update_plugins() function.
60
+ *
61
+ * @uses api_request()
62
+ *
63
+ * @param array $_transient_data Update array build by Wordpress.
64
+ * @return array Modified update array with custom plugin data.
65
+ */
66
+ function pre_set_site_transient_update_plugins_filter( $_transient_data ) {
67
+
68
+
69
+ if( empty( $_transient_data ) ) return $_transient_data;
70
+
71
+ $to_send = array( 'slug' => $this->slug );
72
+
73
+ $api_response = $this->api_request( 'plugin_latest_version', $to_send );
74
+
75
+ if( false !== $api_response && is_object( $api_response ) && isset( $api_response->new_version ) ) {
76
+ if( version_compare( $this->version, $api_response->new_version, '<' ) )
77
+ $_transient_data->response[$this->name] = $api_response;
78
+ }
79
+ return $_transient_data;
80
+ }
81
+
82
+
83
+ /**
84
+ * Updates information on the "View version x.x details" page with custom data.
85
+ *
86
+ * @uses api_request()
87
+ *
88
+ * @param mixed $_data
89
+ * @param string $_action
90
+ * @param object $_args
91
+ * @return object $_data
92
+ */
93
+ function plugins_api_filter( $_data, $_action = '', $_args = null ) {
94
+ if ( ( $_action != 'plugin_information' ) || !isset( $_args->slug ) || ( $_args->slug != $this->slug ) ) return $_data;
95
+
96
+ $to_send = array( 'slug' => $this->slug );
97
+
98
+ $api_response = $this->api_request( 'plugin_information', $to_send );
99
+ if ( false !== $api_response ) $_data = $api_response;
100
+
101
+ return $_data;
102
+ }
103
+
104
+
105
+ /**
106
+ * Disable SSL verification in order to prevent download update failures
107
+ *
108
+ * @param array $args
109
+ * @param string $url
110
+ * @return object $array
111
+ */
112
+ function http_request_args( $args, $url ) {
113
+ // If it is an https request and we are performing a package download, disable ssl verification
114
+ if( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
115
+ $args['sslverify'] = false;
116
+ }
117
+ return $args;
118
+ }
119
+
120
+ /**
121
+ * Calls the API and, if successfull, returns the object delivered by the API.
122
+ *
123
+ * @uses get_bloginfo()
124
+ * @uses wp_remote_post()
125
+ * @uses is_wp_error()
126
+ *
127
+ * @param string $_action The requested action.
128
+ * @param array $_data Parameters for the API action.
129
+ * @return false||object
130
+ */
131
+ private function api_request( $_action, $_data ) {
132
+
133
+ global $wp_version;
134
+
135
+ $data = array_merge( $this->api_data, $_data );
136
+
137
+ if( $data['slug'] != $this->slug )
138
+ return;
139
+
140
+ if( empty( $data['license'] ) )
141
+ return;
142
+
143
+ $api_params = array(
144
+ 'edd_action' => 'get_version',
145
+ 'license' => $data['license'],
146
+ 'name' => $data['item_name'],
147
+ 'slug' => $this->slug,
148
+ 'author' => $data['author'],
149
+ 'url' => home_url()
150
+ );
151
+ $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
152
+
153
+ if ( ! is_wp_error( $request ) ):
154
+ $request = json_decode( wp_remote_retrieve_body( $request ) );
155
+ if( $request && isset( $request->sections ) )
156
+ $request->sections = maybe_unserialize( $request->sections );
157
+
158
+ if ( $request && isset( $request->license_check ) && 'site_inactive' == $request->license_check ) {
159
+ // if the license is not valid anymore
160
+ do_action( 'bd_validate_license', urldecode( $data['addon_code'] ), urldecode( $data['item_name'] ) );
161
+ }
162
+
163
+ return $request;
164
+ else:
165
+ return false;
166
+ endif;
167
+ }
168
+ }
include/libraries/browser.php ADDED
@@ -0,0 +1,1082 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Modified to remove var
4
+ * Chris Christoff on 12/26/2012
5
+ * Changes: Changes vars to publics
6
+ *
7
+ * Modified to work for EDD by
8
+ * Chris Christoff on 12/23/2012
9
+ * Changes: Removed the browser string return and added spacing. Also removed return HTML formatting.
10
+ *
11
+ * Modified to add formatted User Agent string for EDD System Info by
12
+ * Chris Christoff on 12/23/2012
13
+ * Changes: Split user string and add formatting so we can print a nicely
14
+ * formatted user agent string on the EDD System Info
15
+ *
16
+ * File: Browser.php
17
+ * Author: Chris Schuld (http://chrisschuld.com/)
18
+ * Last Modified: August 20th, 2010
19
+ * @version 1.9
20
+ * @package PegasusPHP
21
+ *
22
+ * Copyright (C) 2008-2010 Chris Schuld (chris@chrisschuld.com)
23
+ *
24
+ * This program is free software; you can redistribute it and/or
25
+ * modify it under the terms of the GNU General Public License as
26
+ * published by the Free Software Foundation; either version 2 of
27
+ * the License, or (at your option) any later version.
28
+ *
29
+ * This program is distributed in the hope that it will be useful,
30
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
31
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32
+ * GNU General Public License for more details at:
33
+ * http://www.gnu.org/copyleft/gpl.html
34
+ *
35
+ *
36
+ * Typical Usage:
37
+ *
38
+ * $browser = new Browser();
39
+ * if( $browser->getBrowser() == Browser::BROWSER_FIREFOX && $browser->getVersion() >= 2 ) {
40
+ * echo 'You have FireFox version 2 or greater';
41
+ * }
42
+ *
43
+ * User Agents Sampled from: http://www.useragentstring.com/
44
+ *
45
+ * This implementation is based on the original work from Gary White
46
+ * http://apptools.com/phptools/browser/
47
+ *
48
+ * UPDATES:
49
+ *
50
+ * 2010-08-20 (v1.9):
51
+ * + Added MSN Explorer Browser (legacy)
52
+ * + Added Bing/MSN Robot (Thanks Rob MacDonald)
53
+ * + Added the Android Platform (PLATFORM_ANDROID)
54
+ * + Fixed issue with Android 1.6/2.2 (Thanks Tom Hirashima)
55
+ *
56
+ * 2010-04-27 (v1.8):
57
+ * + Added iPad Support
58
+ *
59
+ * 2010-03-07 (v1.7):
60
+ * + *MAJOR* Rebuild (preg_match and other "slow" routine removal(s))
61
+ * + Almost allof Gary's original code has been replaced
62
+ * + Large PHPUNIT testing environment created to validate new releases and additions
63
+ * + Added FreeBSD Platform
64
+ * + Added OpenBSD Platform
65
+ * + Added NetBSD Platform
66
+ * + Added SunOS Platform
67
+ * + Added OpenSolaris Platform
68
+ * + Added support of the Iceweazel Browser
69
+ * + Added isChromeFrame() call to check if chromeframe is in use
70
+ * + Moved the Opera check in front of the Firefox check due to legacy Opera User Agents
71
+ * + Added the __toString() method (Thanks Deano)
72
+ *
73
+ * 2009-11-15:
74
+ * + Updated the checkes for Firefox
75
+ * + Added the NOKIA platform
76
+ * + Added Checks for the NOKIA brower(s)
77
+ *
78
+ * 2009-11-08:
79
+ * + PHP 5.3 Support
80
+ * + Added support for BlackBerry OS and BlackBerry browser
81
+ * + Added support for the Opera Mini browser
82
+ * + Added additional documenation
83
+ * + Added support for isRobot() and isMobile()
84
+ * + Added support for Opera version 10
85
+ * + Added support for deprecated Netscape Navigator version 9
86
+ * + Added support for IceCat
87
+ * + Added support for Shiretoko
88
+ *
89
+ * 2010-04-27 (v1.8):
90
+ * + Added iPad Support
91
+ *
92
+ * 2009-08-18:
93
+ * + Updated to support PHP 5.3 - removed all deprecated function calls
94
+ * + Updated to remove all double quotes (") -- converted to single quotes (')
95
+ *
96
+ * 2009-04-27:
97
+ * + Updated the IE check to remove a typo and bug (thanks John)
98
+ *
99
+ * 2009-04-22:
100
+ * + Added detection for GoogleBot
101
+ * + Added detection for the W3C Validator.
102
+ * + Added detection for Yahoo! Slurp
103
+ *
104
+ * 2009-03-14:
105
+ * + Added detection for iPods.
106
+ * + Added Platform detection for iPhones
107
+ * + Added Platform detection for iPods
108
+ *
109
+ * 2009-02-16: (Rick Hale)
110
+ * + Added version detection for Android phones.
111
+ *
112
+ * 2008-12-09:
113
+ * + Removed unused constant
114
+ *
115
+ * 2008-11-07:
116
+ * + Added Google's Chrome to the detection list
117
+ * + Added isBrowser(string) to the list of functions special thanks to
118
+ * Daniel 'mavrick' Lang for the function concept (http://mavrick.id.au)
119
+ *
120
+ *
121
+ * Gary White noted: "Since browser detection is so unreliable, I am
122
+ * no longer maintaining this script. You are free to use and or
123
+ * modify/update it as you want, however the author assumes no
124
+ * responsibility for the accuracy of the detected values."
125
+ *
126
+ * Anyone experienced with Gary's script might be interested in these notes:
127
+ *
128
+ * Added class constants
129
+ * Added detection and version detection for Google's Chrome
130
+ * Updated the version detection for Amaya
131
+ * Updated the version detection for Firefox
132
+ * Updated the version detection for Lynx
133
+ * Updated the version detection for WebTV
134
+ * Updated the version detection for NetPositive
135
+ * Updated the version detection for IE
136
+ * Updated the version detection for OmniWeb
137
+ * Updated the version detection for iCab
138
+ * Updated the version detection for Safari
139
+ * Updated Safari to remove mobile devices (iPhone)
140
+ * Added detection for iPhone
141
+ * Added detection for robots
142
+ * Added detection for mobile devices
143
+ * Added detection for BlackBerry
144
+ * Removed Netscape checks (matches heavily with firefox & mozilla)
145
+ *
146
+ */
147
+
148
+ class Browser {
149
+ public $_agent = '';
150
+ public $_browser_name = '';
151
+ public $_version = '';
152
+ public $_platform = '';
153
+ public $_os = '';
154
+ public $_is_aol = false;
155
+ public $_is_mobile = false;
156
+ public $_is_robot = false;
157
+ public $_aol_version = '';
158
+
159
+ public $BROWSER_UNKNOWN = 'unknown';
160
+ public $VERSION_UNKNOWN = 'unknown';
161
+
162
+ public $BROWSER_OPERA = 'Opera'; // Http://www.opera.com/
163
+ public $BROWSER_OPERA_MINI = 'Opera Mini'; // Http://www.opera.com/mini/
164
+ public $BROWSER_WEBTV = 'WebTV'; // Http://www.webtv.net/pc/
165
+ public $BROWSER_IE = 'Internet Explorer'; // Http://www.microsoft.com/ie/
166
+ public $BROWSER_POCKET_IE = 'Pocket Internet Explorer'; // Http://en.wikipedia.org/wiki/Internet_Explorer_Mobile
167
+ public $BROWSER_KONQUEROR = 'Konqueror'; // Http://www.konqueror.org/
168
+ public $BROWSER_ICAB = 'iCab'; // Http://www.icab.de/
169
+ public $BROWSER_OMNIWEB = 'OmniWeb'; // Http://www.omnigroup.com/applications/omniweb/
170
+ public $BROWSER_FIREBIRD = 'Firebird'; // Http://www.ibphoenix.com/
171
+ public $BROWSER_FIREFOX = 'Firefox'; // Http://www.mozilla.com/en-US/firefox/firefox.html
172
+ public $BROWSER_ICEWEASEL = 'Iceweasel'; // Http://www.geticeweasel.org/
173
+ public $BROWSER_SHIRETOKO = 'Shiretoko'; // Http://wiki.mozilla.org/Projects/shiretoko
174
+ public $BROWSER_MOZILLA = 'Mozilla'; // Http://www.mozilla.com/en-US/
175
+ public $BROWSER_AMAYA = 'Amaya'; // Http://www.w3.org/Amaya/
176
+ public $BROWSER_LYNX = 'Lynx'; // Http://en.wikipedia.org/wiki/Lynx
177
+ public $BROWSER_SAFARI = 'Safari'; // Http://apple.com
178
+ public $BROWSER_IPHONE = 'iPhone'; // Http://apple.com
179
+ public $BROWSER_IPOD = 'iPod'; // Http://apple.com
180
+ public $BROWSER_IPAD = 'iPad'; // Http://apple.com
181
+ public $BROWSER_CHROME = 'Chrome'; // Http://www.google.com/chrome
182
+ public $BROWSER_ANDROID = 'Android'; // Http://www.android.com/
183
+ public $BROWSER_GOOGLEBOT = 'GoogleBot'; // Http://en.wikipedia.org/wiki/Googlebot
184
+ public $BROWSER_SLURP = 'Yahoo! Slurp'; // Http://en.wikipedia.org/wiki/Yahoo!_Slurp
185
+ public $BROWSER_W3CVALIDATOR = 'W3C Validator'; // Http://validator.w3.org/
186
+ public $BROWSER_BLACKBERRY = 'BlackBerry'; // Http://www.blackberry.com/
187
+ public $BROWSER_ICECAT = 'IceCat'; // Http://en.wikipedia.org/wiki/GNU_IceCat
188
+ public $BROWSER_NOKIA_S60 = 'Nokia S60 OSS Browser'; // Http://en.wikipedia.org/wiki/Web_Browser_for_S60
189
+ public $BROWSER_NOKIA = 'Nokia Browser'; // * all other WAP-based browsers on the Nokia Platform
190
+ public $BROWSER_MSN = 'MSN Browser'; // Http://explorer.msn.com/
191
+ public $BROWSER_MSNBOT = 'MSN Bot'; // Http://search.msn.com/msnbot.htm
192
+ // Http://en.wikipedia.org/wiki/Msnbot (used for Bing as well)
193
+
194
+ public $BROWSER_NETSCAPE_NAVIGATOR = 'Netscape Navigator'; // Http://browser.netscape.com/ (DEPRECATED)
195
+ public $BROWSER_GALEON = 'Galeon'; // Http://galeon.sourceforge.net/ (DEPRECATED)
196
+ public $BROWSER_NETPOSITIVE = 'NetPositive'; // Http://en.wikipedia.org/wiki/NetPositive (DEPRECATED)
197
+ public $BROWSER_PHOENIX = 'Phoenix'; // Http://en.wikipedia.org/wiki/History_of_Mozilla_Firefox (DEPRECATED)
198
+
199
+ public $PLATFORM_UNKNOWN = 'unknown';
200
+ public $PLATFORM_WINDOWS = 'Windows';
201
+ public $PLATFORM_WINDOWS_CE = 'Windows CE';
202
+ public $PLATFORM_APPLE = 'Apple';
203
+ public $PLATFORM_LINUX = 'Linux';
204
+ public $PLATFORM_OS2 = 'OS/2';
205
+ public $PLATFORM_BEOS = 'BeOS';
206
+ public $PLATFORM_IPHONE = 'iPhone';
207
+ public $PLATFORM_IPOD = 'iPod';
208
+ public $PLATFORM_IPAD = 'iPad';
209
+ public $PLATFORM_BLACKBERRY = 'BlackBerry';
210
+ public $PLATFORM_NOKIA = 'Nokia';
211
+ public $PLATFORM_FREEBSD = 'FreeBSD';
212
+ public $PLATFORM_OPENBSD = 'OpenBSD';
213
+ public $PLATFORM_NETBSD = 'NetBSD';
214
+ public $PLATFORM_SUNOS = 'SunOS';
215
+ public $PLATFORM_OPENSOLARIS = 'OpenSolaris';
216
+ public $PLATFORM_ANDROID = 'Android';
217
+
218
+ public $OPERATING_SYSTEM_UNKNOWN = 'unknown';
219
+
220
+ function Browser($useragent="") {
221
+ $this->reset();
222
+ if( $useragent != "" ) {
223
+ $this->setUserAgent($useragent);
224
+ }
225
+ else {
226
+ $this->determine();
227
+ }
228
+ }
229
+
230
+ /**
231
+ * Reset all properties
232
+ */
233
+ function reset() {
234
+ $this->_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";
235
+ $this->_browser_name = $this->BROWSER_UNKNOWN;
236
+ $this->_version = $this->VERSION_UNKNOWN;
237
+ $this->_platform = $this->PLATFORM_UNKNOWN;
238
+ $this->_os = $this->OPERATING_SYSTEM_UNKNOWN;
239
+ $this->_is_aol = false;
240
+ $this->_is_mobile = false;
241
+ $this->_is_robot = false;
242
+ $this->_aol_version = $this->VERSION_UNKNOWN;
243
+ }
244
+
245
+ /**
246
+ * Check to see if the specific browser is valid
247
+ * @param string $browserName
248
+ * @return True if the browser is the specified browser
249
+ */
250
+ function isBrowser($browserName) { return( 0 == strcasecmp($this->_browser_name, trim($browserName))); }
251
+
252
+ /**
253
+ * The name of the browser. All return types are from the class contants
254
+ * @return string Name of the browser
255
+ */
256
+ function getBrowser() { return $this->_browser_name; }
257
+ /**
258
+ * Set the name of the browser
259
+ * @param $browser The name of the Browser
260
+ */
261
+ function setBrowser($browser) { return $this->_browser_name = $browser; }
262
+ /**
263
+ * The name of the platform. All return types are from the class contants
264
+ * @return string Name of the browser
265
+ */
266
+ function getPlatform() { return $this->_platform; }
267
+ /**
268
+ * Set the name of the platform
269
+ * @param $platform The name of the Platform
270
+ */
271
+ function setPlatform($platform) { return $this->_platform = $platform; }
272
+ /**
273
+ * The version of the browser.
274
+ * @return string Version of the browser (will only contain alpha-numeric characters and a period)
275
+ */
276
+ function getVersion() { return $this->_version; }
277
+ /**
278
+ * Set the version of the browser
279
+ * @param $version The version of the Browser
280
+ */
281
+ function setVersion($version) { $this->_version = preg_replace('/[^0-9,.,a-z,A-Z-]/','',$version); }
282
+ /**
283
+ * The version of AOL.
284
+ * @return string Version of AOL (will only contain alpha-numeric characters and a period)
285
+ */
286
+ function getAolVersion() { return $this->_aol_version; }
287
+ /**
288
+ * Set the version of AOL
289
+ * @param $version The version of AOL
290
+ */
291
+ function setAolVersion($version) { $this->_aol_version = preg_replace('/[^0-9,.,a-z,A-Z]/','',$version); }
292
+ /**
293
+ * Is the browser from AOL?
294
+ * @return boolean True if the browser is from AOL otherwise false
295
+ */
296
+ function isAol() { return $this->_is_aol; }
297
+ /**
298
+ * Is the browser from a mobile device?
299
+ * @return boolean True if the browser is from a mobile device otherwise false
300
+ */
301
+ function isMobile() { return $this->_is_mobile; }
302
+ /**
303
+ * Is the browser from a robot (ex Slurp,GoogleBot)?
304
+ * @return boolean True if the browser is from a robot otherwise false
305
+ */
306
+ function isRobot() { return $this->_is_robot; }
307
+ /**
308
+ * Set the browser to be from AOL
309
+ * @param $isAol
310
+ */
311
+ function setAol($isAol) { $this->_is_aol = $isAol; }
312
+ /**
313
+ * Set the Browser to be mobile
314
+ * @param boolean $value is the browser a mobile brower or not
315
+ */
316
+ function setMobile($value=true) { $this->_is_mobile = $value; }
317
+ /**
318
+ * Set the Browser to be a robot
319
+ * @param boolean $value is the browser a robot or not
320
+ */
321
+ function setRobot($value=true) { $this->_is_robot = $value; }
322
+ /**
323
+ * Get the user agent value in use to determine the browser
324
+ * @return string The user agent from the HTTP header
325
+ */
326
+ function getUserAgent() { return $this->_agent; }
327
+ /**
328
+ * Set the user agent value (the construction will use the HTTP header value - this will overwrite it)
329
+ * @param $agent_string The value for the User Agent
330
+ */
331
+ function setUserAgent($agent_string) {
332
+ $this->reset();
333
+ $this->_agent = $agent_string;
334
+ $this->determine();
335
+ }
336
+ /**
337
+ * Used to determine if the browser is actually "chromeframe"
338
+ * @since 1.7
339
+ * @return boolean True if the browser is using chromeframe
340
+ */
341
+ function isChromeFrame() {
342
+ return( strpos($this->_agent,"chromeframe") !== false );
343
+ }
344
+ /**
345
+ * Returns a formatted string with a summary of the details of the browser.
346
+ * @return string formatted string with a summary of the browser
347
+ */
348
+ function __toString() {
349
+ $text1 = $this->getUserAgent(); //grabs the UA (user agent) string
350
+ $UAline1 = substr($text1, 0, 32); //the first line we print should only be the first 32 characters of the UA string
351
+ $text2 = $this->getUserAgent();//now we grab it again and save it to a string
352
+ $towrapUA = str_replace($UAline1, '', $text2);//the rest of the printoff (other than first line) is equivolent
353
+ // To the whole string minus the part we printed off. IE
354
+ // User Agent: thefirst32charactersfromUAline1
355
+ // the rest of it is now stored in
356
+ // $text2 to be printed off
357
+ // But we need to add spaces before each line that is split other than line 1
358
+ $space = '';
359
+ for($i = 0; $i < 25; $i++) {
360
+ $space .= ' ';
361
+ }
362
+ // Now we split the remaining string of UA ($text2) into lines that are prefixed by spaces for formatting
363
+ $wordwrapped = chunk_split($towrapUA, 32, "\n $space");
364
+ return "Platform: {$this->getPlatform()} \n".
365
+ "Browser Name: {$this->getBrowser()} \n" .
366
+ "Browser Version: {$this->getVersion()} \n" .
367
+ "User Agent String: $UAline1 \n\t\t\t " .
368
+ "$wordwrapped";
369
+ }
370
+ /**
371
+ * Protected routine to calculate and determine what the browser is in use (including platform)
372
+ */
373
+ function determine() {
374
+ $this->checkPlatform();
375
+ $this->checkBrowsers();
376
+ $this->checkForAol();
377
+ }
378
+ /**
379
+ * Protected routine to determine the browser type
380
+ * @return boolean True if the browser was detected otherwise false
381
+ */
382
+ function checkBrowsers() {
383
+ return (
384
+ // Well-known, well-used
385
+ // Special Notes:
386
+ // (1) Opera must be checked before FireFox due to the odd
387
+ // user agents used in some older versions of Opera
388
+ // (2) WebTV is strapped onto Internet Explorer so we must
389
+ // check for WebTV before IE
390
+ // (3) (deprecated) Galeon is based on Firefox and needs to be
391
+ // tested before Firefox is tested
392
+ // (4) OmniWeb is based on Safari so OmniWeb check must occur
393
+ // before Safari
394
+ // (5) Netscape 9+ is based on Firefox so Netscape checks
395
+ // before FireFox are necessary
396
+ $this->checkBrowserWebTv() ||
397
+ $this->checkBrowserInternetExplorer() ||
398
+ $this->checkBrowserOpera() ||
399
+ $this->checkBrowserGaleon() ||
400
+ $this->checkBrowserNetscapeNavigator9Plus() ||
401
+ $this->checkBrowserFirefox() ||
402
+ $this->checkBrowserChrome() ||
403
+ $this->checkBrowserOmniWeb() ||
404
+
405
+ // Common mobile
406
+ $this->checkBrowserAndroid() ||
407
+ $this->checkBrowseriPad() ||
408
+ $this->checkBrowseriPod() ||
409
+ $this->checkBrowseriPhone() ||
410
+ $this->checkBrowserBlackBerry() ||
411
+ $this->checkBrowserNokia() ||
412
+
413
+ // Common bots
414
+ $this->checkBrowserGoogleBot() ||
415
+ $this->checkBrowserMSNBot() ||
416
+ $this->checkBrowserSlurp() ||
417
+
418
+ // WebKit base check (post mobile and others)
419
+ $this->checkBrowserSafari() ||
420
+
421
+ // Everyone else
422
+ $this->checkBrowserNetPositive() ||
423
+ $this->checkBrowserFirebird() ||
424
+ $this->checkBrowserKonqueror() ||
425
+ $this->checkBrowserIcab() ||
426
+ $this->checkBrowserPhoenix() ||
427
+ $this->checkBrowserAmaya() ||
428
+ $this->checkBrowserLynx() ||
429
+
430
+ $this->checkBrowserShiretoko() ||
431
+ $this->checkBrowserIceCat() ||
432
+ $this->checkBrowserW3CValidator() ||
433
+ $this->checkBrowserMozilla() /* Mozilla is such an open standard that you must check it last */
434
+ );
435
+ }
436
+
437
+ /**
438
+ * Determine if the user is using a BlackBerry (last updated 1.7)
439
+ * @return boolean True if the browser is the BlackBerry browser otherwise false
440
+ */
441
+ function checkBrowserBlackBerry() {
442
+ if( stripos($this->_agent,'blackberry') !== false ) {
443
+ $aresult = explode("/",stristr($this->_agent,"BlackBerry"));
444
+ $aversion = explode(' ',$aresult[1]);
445
+ $this->setVersion($aversion[0]);
446
+ $this->_browser_name = $this->BROWSER_BLACKBERRY;
447
+ $this->setMobile(true);
448
+ return true;
449
+ }
450
+ return false;
451
+ }
452
+
453
+ /**
454
+ * Determine if the user is using an AOL User Agent (last updated 1.7)
455
+ * @return boolean True if the browser is from AOL otherwise false
456
+ */
457
+ function checkForAol() {
458
+ $this->setAol(false);
459
+ $this->setAolVersion($this->VERSION_UNKNOWN);
460
+
461
+ if( stripos($this->_agent,'aol') !== false ) {
462
+ $aversion = explode(' ',stristr($this->_agent, 'AOL'));
463
+ $this->setAol(true);
464
+ $this->setAolVersion(preg_replace('/[^0-9\.a-z]/i', '', $aversion[1]));
465
+ return true;
466
+ }
467
+ return false;
468
+ }
469
+
470
+ /**
471
+ * Determine if the browser is the GoogleBot or not (last updated 1.7)
472
+ * @return boolean True if the browser is the GoogletBot otherwise false
473
+ */
474
+ function checkBrowserGoogleBot() {
475
+ if( stripos($this->_agent,'googlebot') !== false ) {
476
+ $aresult = explode('/',stristr($this->_agent,'googlebot'));
477
+ $aversion = explode(' ',$aresult[1]);
478
+ $this->setVersion(str_replace(';','',$aversion[0]));
479
+ $this->_browser_name = $this->BROWSER_GOOGLEBOT;
480
+ $this->setRobot(true);
481
+ return true;
482
+ }
483
+ return false;
484
+ }
485
+
486
+ /**
487
+ * Determine if the browser is the MSNBot or not (last updated 1.9)
488
+ * @return boolean True if the browser is the MSNBot otherwise false
489
+ */
490
+ function checkBrowserMSNBot() {
491
+ if( stripos($this->_agent,"msnbot") !== false ) {
492
+ $aresult = explode("/",stristr($this->_agent,"msnbot"));
493
+ $aversion = explode(" ",$aresult[1]);
494
+ $this->setVersion(str_replace(";","",$aversion[0]));
495
+ $this->_browser_name = $this->BROWSER_MSNBOT;
496
+ $this->setRobot(true);
497
+ return true;
498
+ }
499
+ return false;
500
+ }
501
+
502
+ /**
503
+ * Determine if the browser is the W3C Validator or not (last updated 1.7)
504
+ * @return boolean True if the browser is the W3C Validator otherwise false
505
+ */
506
+ function checkBrowserW3CValidator() {
507
+ if( stripos($this->_agent,'W3C-checklink') !== false ) {
508
+ $aresult = explode('/',stristr($this->_agent,'W3C-checklink'));
509
+ $aversion = explode(' ',$aresult[1]);
510
+ $this->setVersion($aversion[0]);
511
+ $this->_browser_name = $this->BROWSER_W3CVALIDATOR;
512
+ return true;
513
+ }
514
+ else if( stripos($this->_agent,'W3C_Validator') !== false ) {
515
+ // Some of the Validator versions do not delineate w/ a slash - add it back in
516
+ $ua = str_replace("W3C_Validator ", "W3C_Validator/", $this->_agent);
517
+ $aresult = explode('/',stristr($ua,'W3C_Validator'));
518
+ $aversion = explode(' ',$aresult[1]);
519
+ $this->setVersion($aversion[0]);
520
+ $this->_browser_name = $this->BROWSER_W3CVALIDATOR;
521
+ return true;
522
+ }
523
+ return false;
524
+ }
525
+
526
+ /**
527
+ * Determine if the browser is the Yahoo! Slurp Robot or not (last updated 1.7)
528
+ * @return boolean True if the browser is the Yahoo! Slurp Robot otherwise false
529
+ */
530
+ function checkBrowserSlurp() {
531
+ if( stripos($this->_agent,'slurp') !== false ) {
532
+ $aresult = explode('/',stristr($this->_agent,'Slurp'));
533
+ $aversion = explode(' ',$aresult[1]);
534
+ $this->setVersion($aversion[0]);
535
+ $this->_browser_name = $this->BROWSER_SLURP;
536
+ $this->setRobot(true);
537
+ $this->setMobile(false);
538
+ return true;
539
+ }
540
+ return false;
541
+ }
542
+
543
+ /**
544
+ * Determine if the browser is Internet Explorer or not (last updated 1.7)
545
+ * @return boolean True if the browser is Internet Explorer otherwise false
546
+ */
547
+ function checkBrowserInternetExplorer() {
548
+
549
+ // Test for v1 - v1.5 IE
550
+ if( stripos($this->_agent,'microsoft internet explorer') !== false ) {
551
+ $this->setBrowser($this->BROWSER_IE);
552
+ $this->setVersion('1.0');
553
+ $aresult = stristr($this->_agent, '/');
554
+ if( preg_match('/308|425|426|474|0b1/i', $aresult) ) {
555
+ $this->setVersion('1.5');
556
+ }
557
+ return true;
558
+ }
559
+ // Test for versions > 1.5
560
+ else if( stripos($this->_agent,'msie') !== false && stripos($this->_agent,'opera') === false ) {
561
+ // See if the browser is the odd MSN Explorer
562
+ if( stripos($this->_agent,'msnb') !== false ) {
563
+ $aresult = explode(' ',stristr(str_replace(';','; ',$this->_agent),'MSN'));
564
+ $this->setBrowser( $this->BROWSER_MSN );
565
+ $this->setVersion(str_replace(array('(',')',';'),'',$aresult[1]));
566
+ return true;
567
+ }
568
+ $aresult = explode(' ',stristr(str_replace(';','; ',$this->_agent),'msie'));
569
+ $this->setBrowser( $this->BROWSER_IE );
570
+ $this->setVersion(str_replace(array('(',')',';'),'',$aresult[1]));
571
+ return true;
572
+ }
573
+ // Test for Pocket IE
574
+ else if( stripos($this->_agent,'mspie') !== false || stripos($this->_agent,'pocket') !== false ) {
575
+ $aresult = explode(' ',stristr($this->_agent,'mspie'));
576
+ $this->setPlatform( $this->PLATFORM_WINDOWS_CE );
577
+ $this->setBrowser( $this->BROWSER_POCKET_IE );
578
+ $this->setMobile(true);
579
+
580
+ if( stripos($this->_agent,'mspie') !== false ) {
581
+ $this->setVersion($aresult[1]);
582
+ }
583
+ else {
584
+ $aversion = explode('/',$this->_agent);
585
+ $this->setVersion($aversion[1]);
586
+ }
587
+ return true;
588
+ }
589
+ return false;
590
+ }
591
+
592
+ /**
593
+ * Determine if the browser is Opera or not (last updated 1.7)
594
+ * @return boolean True if the browser is Opera otherwise false
595
+ */
596
+ function checkBrowserOpera() {
597
+ if( stripos($this->_agent,'opera mini') !== false ) {
598
+ $resultant = stristr($this->_agent, 'opera mini');
599
+ if( preg_match('/\//',$resultant) ) {
600
+ $aresult = explode('/',$resultant);
601
+ $aversion = explode(' ',$aresult[1]);
602
+ $this->setVersion($aversion[0]);
603
+ }
604
+ else {
605
+ $aversion = explode(' ',stristr($resultant,'opera mini'));
606
+ $this->setVersion($aversion[1]);
607
+ }
608
+ $this->_browser_name = $this->BROWSER_OPERA_MINI;
609
+ $this->setMobile(true);
610
+ return true;
611
+ }
612
+ else if( stripos($this->_agent,'opera') !== false ) {
613
+ $resultant = stristr($this->_agent, 'opera');
614
+ if( preg_match('/Version\/(10.*)$/',$resultant,$matches) ) {
615
+ $this->setVersion($matches[1]);
616
+ }
617
+ else if( preg_match('/\//',$resultant) ) {
618
+ $aresult = explode('/',str_replace("("," ",$resultant));
619
+ $aversion = explode(' ',$aresult[1]);
620
+ $this->setVersion($aversion[0]);
621
+ }
622
+ else {
623
+ $aversion = explode(' ',stristr($resultant,'opera'));
624
+ $this->setVersion(isset($aversion[1])?$aversion[1]:"");
625
+ }
626
+ $this->_browser_name = $this->BROWSER_OPERA;
627
+ return true;
628
+ }
629
+ return false;
630
+ }
631
+
632
+ /**
633
+ * Determine if the browser is Chrome or not (last updated 1.7)
634
+ * @return boolean True if the browser is Chrome otherwise false
635
+ */
636
+ function checkBrowserChrome() {
637
+ if( stripos($this->_agent,'Chrome') !== false ) {
638
+ $aresult = explode('/',stristr($this->_agent,'Chrome'));
639
+ $aversion = explode(' ',$aresult[1]);
640
+ $this->setVersion($aversion[0]);
641
+ $this->setBrowser($this->BROWSER_CHROME);
642
+ return true;
643
+ }
644
+ return false;
645
+ }
646
+
647
+
648
+ /**
649
+ * Determine if the browser is WebTv or not (last updated 1.7)
650
+ * @return boolean True if the browser is WebTv otherwise false
651
+ */
652
+ function checkBrowserWebTv() {
653
+ if( stripos($this->_agent,'webtv') !== false ) {
654
+ $aresult = explode('/',stristr($this->_agent,'webtv'));
655
+ $aversion = explode(' ',$aresult[1]);
656
+ $this->setVersion($aversion[0]);
657
+ $this->setBrowser($this->BROWSER_WEBTV);
658
+ return true;
659
+ }
660
+ return false;
661
+ }
662
+
663
+ /**
664
+ * Determine if the browser is NetPositive or not (last updated 1.7)
665
+ * @return boolean True if the browser is NetPositive otherwise false
666
+ */
667
+ function checkBrowserNetPositive() {
668
+ if( stripos($this->_agent,'NetPositive') !== false ) {
669
+ $aresult = explode('/',stristr($this->_agent,'NetPositive'));
670
+ $aversion = explode(' ',$aresult[1]);
671
+ $this->setVersion(str_replace(array('(',')',';'),'',$aversion[0]));
672
+ $this->setBrowser($this->BROWSER_NETPOSITIVE);
673
+ return true;
674
+ }
675
+ return false;
676
+ }
677
+
678
+ /**
679
+ * Determine if the browser is Galeon or not (last updated 1.7)
680
+ * @return boolean True if the browser is Galeon otherwise false
681
+ */
682
+ function checkBrowserGaleon() {
683
+ if( stripos($this->_agent,'galeon') !== false ) {
684
+ $aresult = explode(' ',stristr($this->_agent,'galeon'));
685
+ $aversion = explode('/',$aresult[0]);
686
+ $this->setVersion($aversion[1]);
687
+ $this->setBrowser($this->BROWSER_GALEON);
688
+ return true;
689
+ }
690
+ return false;
691
+ }
692
+
693
+ /**
694
+ * Determine if the browser is Konqueror or not (last updated 1.7)
695
+ * @return boolean True if the browser is Konqueror otherwise false
696
+ */
697
+ function checkBrowserKonqueror() {
698
+ if( stripos($this->_agent,'Konqueror') !== false ) {
699
+ $aresult = explode(' ',stristr($this->_agent,'Konqueror'));
700
+ $aversion = explode('/',$aresult[0]);
701
+ $this->setVersion($aversion[1]);
702
+ $this->setBrowser($this->BROWSER_KONQUEROR);
703
+ return true;
704
+ }
705
+ return false;
706
+ }
707
+
708
+ /**
709
+ * Determine if the browser is iCab or not (last updated 1.7)
710
+ * @return boolean True if the browser is iCab otherwise false
711
+ */
712
+ function checkBrowserIcab() {
713
+ if( stripos($this->_agent,'icab') !== false ) {
714
+ $aversion = explode(' ',stristr(str_replace('/',' ',$this->_agent),'icab'));
715
+ $this->setVersion($aversion[1]);
716
+ $this->setBrowser($this->BROWSER_ICAB);
717
+ return true;
718
+ }
719
+ return false;
720
+ }
721
+
722
+ /**
723
+ * Determine if the browser is OmniWeb or not (last updated 1.7)
724
+ * @return boolean True if the browser is OmniWeb otherwise false
725
+ */
726
+ function checkBrowserOmniWeb() {
727
+ if( stripos($this->_agent,'omniweb') !== false ) {
728
+ $aresult = explode('/',stristr($this->_agent,'omniweb'));
729
+ $aversion = explode(' ',isset($aresult[1])?$aresult[1]:"");
730
+ $this->setVersion($aversion[0]);
731
+ $this->setBrowser($this->BROWSER_OMNIWEB);
732
+ return true;
733
+ }
734
+ return false;
735
+ }
736
+
737
+ /**
738
+ * Determine if the browser is Phoenix or not (last updated 1.7)
739
+ * @return boolean True if the browser is Phoenix otherwise false
740
+ */
741
+ function checkBrowserPhoenix() {
742
+ if( stripos($this->_agent,'Phoenix') !== false ) {
743
+ $aversion = explode('/',stristr($this->_agent,'Phoenix'));
744
+ $this->setVersion($aversion[1]);
745
+ $this->setBrowser($this->BROWSER_PHOENIX);
746
+ return true;
747
+ }
748
+ return false;
749
+ }
750
+
751
+ /**
752
+ * Determine if the browser is Firebird or not (last updated 1.7)
753
+ * @return boolean True if the browser is Firebird otherwise false
754
+ */
755
+ function checkBrowserFirebird() {
756
+ if( stripos($this->_agent,'Firebird') !== false ) {
757
+ $aversion = explode('/',stristr($this->_agent,'Firebird'));
758
+ $this->setVersion($aversion[1]);
759
+ $this->setBrowser($this->BROWSER_FIREBIRD);
760
+ return true;
761
+ }
762
+ return false;
763
+ }
764
+
765
+ /**
766
+ * Determine if the browser is Netscape Navigator 9+ or not (last updated 1.7)
767
+ * NOTE: (http://browser.netscape.com/ - Official support ended on March 1st, 2008)
768
+ * @return boolean True if the browser is Netscape Navigator 9+ otherwise false
769
+ */
770
+ function checkBrowserNetscapeNavigator9Plus() {
771
+ if( stripos($this->_agent,'Firefox') !== false && preg_match('/Navigator\/([^ ]*)/i',$this->_agent,$matches) ) {
772
+ $this->setVersion($matches[1]);
773
+ $this->setBrowser($this->BROWSER_NETSCAPE_NAVIGATOR);
774
+ return true;
775
+ }
776
+ else if( stripos($this->_agent,'Firefox') === false && preg_match('/Netscape6?\/([^ ]*)/i',$this->_agent,$matches) ) {
777
+ $this->setVersion($matches[1]);
778
+ $this->setBrowser($this->BROWSER_NETSCAPE_NAVIGATOR);
779
+ return true;
780
+ }
781
+ return false;
782
+ }
783
+
784
+ /**
785
+ * Determine if the browser is Shiretoko or not (https://wiki.mozilla.org/Projects/shiretoko) (last updated 1.7)
786
+ * @return boolean True if the browser is Shiretoko otherwise false
787
+ */
788
+ function checkBrowserShiretoko() {
789
+ if( stripos($this->_agent,'Mozilla') !== false && preg_match('/Shiretoko\/([^ ]*)/i',$this->_agent,$matches) ) {
790
+ $this->setVersion($matches[1]);
791
+ $this->setBrowser($this->BROWSER_SHIRETOKO);
792
+ return true;
793
+ }
794
+ return false;
795
+ }
796
+
797
+ /**
798
+ * Determine if the browser is Ice Cat or not (http://en.wikipedia.org/wiki/GNU_IceCat) (last updated 1.7)
799
+ * @return boolean True if the browser is Ice Cat otherwise false
800
+ */
801
+ function checkBrowserIceCat() {
802
+ if( stripos($this->_agent,'Mozilla') !== false && preg_match('/IceCat\/([^ ]*)/i',$this->_agent,$matches) ) {
803
+ $this->setVersion($matches[1]);
804
+ $this->setBrowser($this->BROWSER_ICECAT);
805
+ return true;
806
+ }
807
+ return false;
808
+ }
809
+
810
+ /**
811
+ * Determine if the browser is Nokia or not (last updated 1.7)
812
+ * @return boolean True if the browser is Nokia otherwise false
813
+ */
814
+ function checkBrowserNokia() {
815
+ if( preg_match("/Nokia([^\/]+)\/([^ SP]+)/i",$this->_agent,$matches) ) {
816
+ $this->setVersion($matches[2]);
817
+ if( stripos($this->_agent,'Series60') !== false || strpos($this->_agent,'S60') !== false ) {
818
+ $this->setBrowser($this->BROWSER_NOKIA_S60);
819
+ }
820
+ else {
821
+ $this->setBrowser( $this->BROWSER_NOKIA );
822
+ }
823
+ $this->setMobile(true);
824
+ return true;
825
+ }
826
+ return false;
827
+ }
828
+
829
+ /**
830
+ * Determine if the browser is Firefox or not (last updated 1.7)
831
+ * @return boolean True if the browser is Firefox otherwise false
832
+ */
833
+ function checkBrowserFirefox() {
834
+ if( stripos($this->_agent,'safari') === false ) {
835
+ if( preg_match("/Firefox[\/ \(]([^ ;\)]+)/i",$this->_agent,$matches) ) {
836
+ $this->setVersion($matches[1]);
837
+ $this->setBrowser($this->BROWSER_FIREFOX);
838
+ return true;
839
+ }
840
+ else if( preg_match("/Firefox$/i",$this->_agent,$matches) ) {
841
+ $this->setVersion("");
842
+ $this->setBrowser($this->BROWSER_FIREFOX);
843
+ return true;
844
+ }
845
+ }
846
+ return false;
847
+ }
848
+
849
+ /**
850
+ * Determine if the browser is Firefox or not (last updated 1.7)
851
+ * @return boolean True if the browser is Firefox otherwise false
852
+ */
853
+ function checkBrowserIceweasel() {
854
+ if( stripos($this->_agent,'Iceweasel') !== false ) {
855
+ $aresult = explode('/',stristr($this->_agent,'Iceweasel'));
856
+ $aversion = explode(' ',$aresult[1]);
857
+ $this->setVersion($aversion[0]);
858
+ $this->setBrowser($this->BROWSER_ICEWEASEL);
859
+ return true;
860
+ }
861
+ return false;
862
+ }
863
+ /**
864
+ * Determine if the browser is Mozilla or not (last updated 1.7)
865
+ * @return boolean True if the browser is Mozilla otherwise false
866
+ */
867
+ function checkBrowserMozilla() {
868
+ if( stripos($this->_agent,'mozilla') !== false && preg_match('/rv:[0-9].[0-9][a-b]?/i',$this->_agent) && stripos($this->_agent,'netscape') === false) {
869
+ $aversion = explode(' ',stristr($this->_agent,'rv:'));
870
+ preg_match('/rv:[0-9].[0-9][a-b]?/i',$this->_agent,$aversion);
871
+ $this->setVersion(str_replace('rv:','',$aversion[0]));
872
+ $this->setBrowser($this->BROWSER_MOZILLA);
873
+ return true;
874
+ }
875
+ else if( stripos($this->_agent,'mozilla') !== false && preg_match('/rv:[0-9]\.[0-9]/i',$this->_agent) && stripos($this->_agent,'netscape') === false ) {
876
+ $aversion = explode('',stristr($this->_agent,'rv:'));
877
+ $this->setVersion(str_replace('rv:','',$aversion[0]));
878
+ $this->setBrowser($this->BROWSER_MOZILLA);
879
+ return true;
880
+ }
881
+ else if( stripos($this->_agent,'mozilla') !== false && preg_match('/mozilla\/([^ ]*)/i',$this->_agent,$matches) && stripos($this->_agent,'netscape') === false ) {
882
+ $this->setVersion($matches[1]);
883
+ $this->setBrowser($this->BROWSER_MOZILLA);
884
+ return true;
885
+ }
886
+ return false;
887
+ }
888
+
889
+ /**
890
+ * Determine if the browser is Lynx or not (last updated 1.7)
891
+ * @return boolean True if the browser is Lynx otherwise false
892
+ */
893
+ function checkBrowserLynx() {
894
+ if( stripos($this->_agent,'lynx') !== false ) {
895
+ $aresult = explode('/',stristr($this->_agent,'Lynx'));
896
+ $aversion = explode(' ',(isset($aresult[1])?$aresult[1]:""));
897
+ $this->setVersion($aversion[0]);
898
+ $this->setBrowser($this->BROWSER_LYNX);
899
+ return true;
900
+ }
901
+ return false;
902
+ }
903
+
904
+ /**
905
+ * Determine if the browser is Amaya or not (last updated 1.7)
906
+ * @return boolean True if the browser is Amaya otherwise false
907
+ */
908
+ function checkBrowserAmaya() {
909
+ if( stripos($this->_agent,'amaya') !== false ) {
910
+ $aresult = explode('/',stristr($this->_agent,'Amaya'));
911
+ $aversion = explode(' ',$aresult[1]);
912
+ $this->setVersion($aversion[0]);
913
+ $this->setBrowser($this->BROWSER_AMAYA);
914
+ return true;
915
+ }
916
+ return false;
917
+ }
918
+
919
+ /**
920
+ * Determine if the browser is Safari or not (last updated 1.7)
921
+ * @return boolean True if the browser is Safari otherwise false
922
+ */
923
+ function checkBrowserSafari() {
924
+ if( stripos($this->_agent,'Safari') !== false && stripos($this->_agent,'iPhone') === false && stripos($this->_agent,'iPod') === false ) {
925
+ $aresult = explode('/',stristr($this->_agent,'Version'));
926
+ if( isset($aresult[1]) ) {
927
+ $aversion = explode(' ',$aresult[1]);
928
+ $this->setVersion($aversion[0]);
929
+ }
930
+ else {
931
+ $this->setVersion($this->VERSION_UNKNOWN);
932
+ }
933
+ $this->setBrowser($this->BROWSER_SAFARI);
934
+ return true;
935
+ }
936
+ return false;
937
+ }
938
+
939
+ /**
940
+ * Determine if the browser is iPhone or not (last updated 1.7)
941
+ * @return boolean True if the browser is iPhone otherwise false
942
+ */
943
+ function checkBrowseriPhone() {
944
+ if( stripos($this->_agent,'iPhone') !== false ) {
945
+ $aresult = explode('/',stristr($this->_agent,'Version'));
946
+ if( isset($aresult[1]) ) {
947
+ $aversion = explode(' ',$aresult[1]);
948
+ $this->setVersion($aversion[0]);
949
+ }
950
+ else {
951
+ $this->setVersion($this->VERSION_UNKNOWN);
952
+ }
953
+ $this->setMobile(true);
954
+ $this->setBrowser($this->BROWSER_IPHONE);
955
+ return true;
956
+ }
957
+ return false;
958
+ }
959
+
960
+ /**
961
+ * Determine if the browser is iPod or not (last updated 1.7)
962
+ * @return boolean True if the browser is iPod otherwise false
963
+ */
964
+ function checkBrowseriPad() {
965
+ if( stripos($this->_agent,'iPad') !== false ) {
966
+ $aresult = explode('/',stristr($this->_agent,'Version'));
967
+ if( isset($aresult[1]) ) {
968
+ $aversion = explode(' ',$aresult[1]);
969
+ $this->setVersion($aversion[0]);
970
+ }
971
+ else {
972
+ $this->setVersion($this->VERSION_UNKNOWN);
973
+ }
974
+ $this->setMobile(true);
975
+ $this->setBrowser($this->BROWSER_IPAD);
976
+ return true;
977
+ }
978
+ return false;
979
+ }
980
+
981
+ /**
982
+ * Determine if the browser is iPod or not (last updated 1.7)
983
+ * @return boolean True if the browser is iPod otherwise false
984
+ */
985
+ function checkBrowseriPod() {
986
+ if( stripos($this->_agent,'iPod') !== false ) {
987
+ $aresult = explode('/',stristr($this->_agent,'Version'));
988
+ if( isset($aresult[1]) ) {
989
+ $aversion = explode(' ',$aresult[1]);
990
+ $this->setVersion($aversion[0]);
991
+ }
992
+ else {
993
+ $this->setVersion($this->VERSION_UNKNOWN);
994
+ }
995
+ $this->setMobile(true);
996
+ $this->setBrowser($this->BROWSER_IPOD);
997
+ return true;
998
+ }
999
+ return false;
1000
+ }
1001
+
1002
+ /**
1003
+ * Determine if the browser is Android or not (last updated 1.7)
1004
+ * @return boolean True if the browser is Android otherwise false
1005
+ */
1006
+ function checkBrowserAndroid() {
1007
+ if( stripos($this->_agent,'Android') !== false ) {
1008
+ $aresult = explode(' ',stristr($this->_agent,'Android'));
1009
+ if( isset($aresult[1]) ) {
1010
+ $aversion = explode(' ',$aresult[1]);
1011
+ $this->setVersion($aversion[0]);
1012
+ }
1013
+ else {
1014
+ $this->setVersion($this->VERSION_UNKNOWN);
1015
+ }
1016
+ $this->setMobile(true);
1017
+ $this->setBrowser($this->BROWSER_ANDROID);
1018
+ return true;
1019
+ }
1020
+ return false;
1021
+ }
1022
+
1023
+ /**
1024
+ * Determine the user's platform (last updated 1.7)
1025
+ */
1026
+ function checkPlatform() {
1027
+ if( stripos($this->_agent, 'windows') !== false ) {
1028
+ $this->_platform = $this->PLATFORM_WINDOWS;
1029
+ }
1030
+ else if( stripos($this->_agent, 'iPad') !== false ) {
1031
+ $this->_platform = $this->PLATFORM_IPAD;
1032
+ }
1033
+ else if( stripos($this->_agent, 'iPod') !== false ) {
1034
+ $this->_platform = $this->PLATFORM_IPOD;
1035
+ }
1036
+ else if( stripos($this->_agent, 'iPhone') !== false ) {
1037
+ $this->_platform = $this->PLATFORM_IPHONE;
1038
+ }
1039
+ elseif( stripos($this->_agent, 'mac') !== false ) {
1040
+ $this->_platform = $this->PLATFORM_APPLE;
1041
+ }
1042
+ elseif( stripos($this->_agent, 'android') !== false ) {
1043
+ $this->_platform = $this->PLATFORM_ANDROID;
1044
+ }
1045
+ elseif( stripos($this->_agent, 'linux') !== false ) {
1046
+ $this->_platform = $this->PLATFORM_LINUX;
1047
+ }
1048
+ else if( stripos($this->_agent, 'Nokia') !== false ) {
1049
+ $this->_platform = $this->PLATFORM_NOKIA;
1050
+ }
1051
+ else if( stripos($this->_agent, 'BlackBerry') !== false ) {
1052
+ $this->_platform = $this->PLATFORM_BLACKBERRY;
1053
+ }
1054
+ elseif( stripos($this->_agent,'FreeBSD') !== false ) {
1055
+ $this->_platform = $this->PLATFORM_FREEBSD;
1056
+ }
1057
+ elseif( stripos($this->_agent,'OpenBSD') !== false ) {
1058
+ $this->_platform = $this->PLATFORM_OPENBSD;
1059
+ }
1060
+ elseif( stripos($this->_agent,'NetBSD') !== false ) {
1061
+ $this->_platform = $this->PLATFORM_NETBSD;
1062
+ }
1063
+ elseif( stripos($this->_agent, 'OpenSolaris') !== false ) {
1064
+ $this->_platform = $this->PLATFORM_OPENSOLARIS;
1065
+ }
1066
+ elseif( stripos($this->_agent, 'SunOS') !== false ) {
1067
+ $this->_platform = $this->PLATFORM_SUNOS;
1068
+ }
1069
+ elseif( stripos($this->_agent, 'OS\/2') !== false ) {
1070
+ $this->_platform = $this->PLATFORM_OS2;
1071
+ }
1072
+ elseif( stripos($this->_agent, 'BeOS') !== false ) {
1073
+ $this->_platform = $this->PLATFORM_BEOS;
1074
+ }
1075
+ elseif( stripos($this->_agent, 'win') !== false ) {
1076
+ $this->_platform = $this->PLATFORM_WINDOWS;
1077
+ }
1078
+
1079
+ }
1080
+ }
1081
+
1082
+ ?>
js/bulk-delete.js CHANGED
@@ -4,7 +4,7 @@
4
  * http://sudarmuthu.com/wordpress/bulk-delete
5
  *
6
  * @author: Sudar <http://sudarmuthu.com>
7
- *
8
  */
9
 
10
  /*jslint browser: true, devel: true*/
@@ -47,7 +47,7 @@ jQuery(document).ready(function () {
47
  // for post boxes
48
  postboxes.add_postbox_toggles(pagenow);
49
 
50
- jQuery.each(['_cats', '_tags', '_taxs', '_pages', '_post_status', '_types', '_cf', '_title', 'u_userrole'], function (index, value) {
51
  // invoke the date time picker
52
  jQuery('#smbd' + value + '_cron_start').datetimepicker({
53
  timeFormat: 'HH:mm:ss'
@@ -87,7 +87,7 @@ jQuery(document).ready(function () {
87
  // not valid
88
  alert(BULK_DELETE.error.enterurl);
89
  }
90
- } else if (jQuery(this).val() === 'bulk-delete-cf') {
91
  if (jQuery('#smbd_cf_key').val() !== '') {
92
  valid = true;
93
  } else {
@@ -95,7 +95,7 @@ jQuery(document).ready(function () {
95
  alert(BULK_DELETE.error.enter_cf_key);
96
  }
97
 
98
- } else if (jQuery(this).val() === 'bulk-delete-by-title') {
99
 
100
  if (jQuery('#smbd_title_value').val() !== '') {
101
  valid = true;
@@ -104,6 +104,9 @@ jQuery(document).ready(function () {
104
  alert(BULK_DELETE.error.enter_title);
105
  }
106
 
 
 
 
107
  } else {
108
  if (jQuery(this).parent().prev().children('table').find(":checkbox:checked[value!='true']").size() > 0) {
109
  // monstrous selector
@@ -115,7 +118,7 @@ jQuery(document).ready(function () {
115
  }
116
 
117
  if (valid) {
118
- if (current_button.lastIndexOf('bulk-delete-users-', 0) === 0) {
119
  return confirm(BULK_DELETE.msg.deletewarningusers);
120
  } else {
121
  return confirm(BULK_DELETE.msg.deletewarning);
4
  * http://sudarmuthu.com/wordpress/bulk-delete
5
  *
6
  * @author: Sudar <http://sudarmuthu.com>
7
+ *
8
  */
9
 
10
  /*jslint browser: true, devel: true*/
47
  // for post boxes
48
  postboxes.add_postbox_toggles(pagenow);
49
 
50
+ jQuery.each(['_cats', '_tags', '_taxs', '_pages', '_post_status', '_types', '_cf', '_title', '_dup_title', 'u_userrole'], function (index, value) {
51
  // invoke the date time picker
52
  jQuery('#smbd' + value + '_cron_start').datetimepicker({
53
  timeFormat: 'HH:mm:ss'
87
  // not valid
88
  alert(BULK_DELETE.error.enterurl);
89
  }
90
+ } else if (jQuery(this).val() === 'delete_posts_by_custom_field') {
91
  if (jQuery('#smbd_cf_key').val() !== '') {
92
  valid = true;
93
  } else {
95
  alert(BULK_DELETE.error.enter_cf_key);
96
  }
97
 
98
+ } else if (jQuery(this).val() === 'delete_posts_by_title') {
99
 
100
  if (jQuery('#smbd_title_value').val() !== '') {
101
  valid = true;
104
  alert(BULK_DELETE.error.enter_title);
105
  }
106
 
107
+ } else if (jQuery(this).val() === 'delete_posts_by_duplicate_title') {
108
+ // nothing to check for duplicate title
109
+ valid = true;
110
  } else {
111
  if (jQuery(this).parent().prev().children('table').find(":checkbox:checked[value!='true']").size() > 0) {
112
  // monstrous selector
118
  }
119
 
120
  if (valid) {
121
+ if (current_button.lastIndexOf('delete_users_by_role', 0) === 0) {
122
  return confirm(BULK_DELETE.msg.deletewarningusers);
123
  } else {
124
  return confirm(BULK_DELETE.msg.deletewarning);
languages/bulk-delete-de_DE.mo CHANGED
Binary file
languages/bulk-delete-de_DE.po CHANGED
@@ -1,271 +1,1022 @@
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
  msgid ""
7
  msgstr ""
8
- "Project-Id-Version: Bulk Delete 1.2\n"
9
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/bulk-delete\n"
10
  "POT-Creation-Date: 2011-01-24 17:19:16+00:00\n"
11
- "PO-Revision-Date: 2011-05-05 10:44+0100\n"
12
- "Last-Translator: Rene <info@wpwebshop.com>\n"
13
  "Language-Team: \n"
14
  "MIME-Version: 1.0\n"
15
  "Content-Type: text/plain; charset=UTF-8\n"
16
  "Content-Transfer-Encoding: 8bit\n"
17
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
 
18
  "X-Poedit-Language: German\n"
19
  "X-Poedit-Country: GERMANY\n"
20
-
21
- #: bulk-delete.php:275
22
- msgid "All the selected posts have been sucessfully deleted."
23
- msgstr "Alle selektierten Berichten sind gel&ouml;scht worden."
24
-
25
- #: bulk-delete.php:285
 
 
 
26
  msgid "WARNING: Posts deleted once cannot be retrieved back. Use with caution."
27
- msgstr "WARNUNG: Gel&ouml;schte Berichten k&ouml;nnen nicht zur&uuml;ckgeholt werden. Seien Sie vorsichtig."
28
 
29
- #: bulk-delete.php:290
 
 
30
  msgid "Select the posts which you want to delete"
31
- msgstr "Selektieren Sie die Berichten die Sie l&ouml;schen m&ouml;chten"
32
 
33
- #: bulk-delete.php:310
34
- msgid "All Drafts"
35
- msgstr "Alle Entw&uuml;rfe"
36
-
37
- #: bulk-delete.php:310
38
  msgid "Drafts"
39
- msgstr "Entw&uuml;rfe"
40
 
41
- #: bulk-delete.php:316
 
42
  msgid "All Revisions"
43
  msgstr "Alle Revisionen"
44
 
45
- #: bulk-delete.php:316
 
46
  msgid "Revisions"
47
  msgstr "Revisionen"
48
 
49
- #: bulk-delete.php:322
 
50
  msgid "All Pending posts"
51
- msgstr "Alle ausstehende Berichten"
52
-
53
- #: bulk-delete.php:322
54
- #: bulk-delete.php:328
55
- #: bulk-delete.php:334
56
- #: bulk-delete.php:389
57
- #: bulk-delete.php:477
58
- #: bulk-delete.php:572
 
 
 
59
  msgid "Posts"
60
- msgstr "Berichten"
61
 
62
- #: bulk-delete.php:328
 
63
  msgid "All scheduled posts"
64
- msgstr "Alle geplante Berichten"
65
 
66
- #: bulk-delete.php:334
 
67
  msgid "All private posts"
68
- msgstr "Alle private Berichten"
69
-
70
- #: bulk-delete.php:340
71
- msgid "All Pages"
72
- msgstr "Alle Seiten"
73
-
74
- #: bulk-delete.php:340
 
75
  msgid "Pages"
76
  msgstr "Seiten"
77
 
78
- #: bulk-delete.php:346
79
- #: bulk-delete.php:423
80
- #: bulk-delete.php:512
81
- #: bulk-delete.php:607
 
 
 
 
82
  msgid "Move to Trash"
83
- msgstr "Nach Papierkorb verschieben"
84
-
85
- #: bulk-delete.php:347
86
- #: bulk-delete.php:424
87
- #: bulk-delete.php:513
88
- #: bulk-delete.php:608
 
 
 
 
89
  msgid "Delete permanently"
90
- msgstr "Definitiv l&ouml;schen"
91
-
92
- #: bulk-delete.php:354
93
- #: bulk-delete.php:440
94
- #: bulk-delete.php:529
95
- #: bulk-delete.php:624
 
 
 
96
  msgid "Only delete first "
97
- msgstr "L&ouml;sche nur die ersten"
98
-
99
- #: bulk-delete.php:355
100
- #: bulk-delete.php:441
101
- #: bulk-delete.php:530
102
- #: bulk-delete.php:625
 
 
 
103
  msgid "posts."
104
- msgstr "Berichten."
105
-
106
- #: bulk-delete.php:356
107
- #: bulk-delete.php:442
108
- #: bulk-delete.php:531
109
- #: bulk-delete.php:626
 
 
 
110
  msgid "Use this option if there are more than 1000 posts and the script timesout."
111
- msgstr "Verwenden Sie diese Option wenn es mehr als 1000 Berichten und das Skript ein Timeout-Fehler gibt."
112
-
113
- #: bulk-delete.php:363
114
- #: bulk-delete.php:449
115
- #: bulk-delete.php:538
116
- #: bulk-delete.php:633
 
 
 
 
 
 
117
  msgid "Bulk Delete "
118
- msgstr "Massenl&ouml;schung"
119
 
120
- #: bulk-delete.php:371
 
121
  msgid "By Category"
122
- msgstr "Nach Kategorie"
123
 
124
- #: bulk-delete.php:372
 
125
  msgid "Select the categories whose post you want to delete"
126
- msgstr "Selektieren Sie die Kategorien wessen Berichten Sie l&ouml;schen m&ouml;chten."
127
 
128
- #: bulk-delete.php:400
 
129
  msgid "All Categories"
130
  msgstr "Alle Kategorien"
131
 
132
- #: bulk-delete.php:412
133
- #: bulk-delete.php:501
134
- #: bulk-delete.php:596
 
 
 
135
  msgid "Only restrict to posts which are "
136
- msgstr "Nur Berichten f&uuml;r die gilt:"
137
-
138
- #: bulk-delete.php:414
139
- #: bulk-delete.php:503
140
- #: bulk-delete.php:598
 
 
 
 
141
  msgid "older than"
142
- msgstr "&auml;lter als"
143
-
144
- #: bulk-delete.php:415
145
- #: bulk-delete.php:504
146
- #: bulk-delete.php:599
 
 
 
 
147
  msgid "posted within last"
148
- msgstr "verfasst seit"
149
-
150
- #: bulk-delete.php:417
151
- #: bulk-delete.php:506
152
- #: bulk-delete.php:601
 
 
 
 
 
153
  msgid "days"
154
- msgstr "Tage"
155
 
156
- #: bulk-delete.php:430
157
- #: bulk-delete.php:519
158
- #: bulk-delete.php:614
 
159
  msgid "Public posts"
160
- msgstr "&Ouml;ffentliche Berichten"
161
 
162
- #: bulk-delete.php:431
163
- #: bulk-delete.php:520
164
- #: bulk-delete.php:615
 
165
  msgid "Private Posts"
166
- msgstr "Private Berichten"
167
 
168
- #: bulk-delete.php:460
169
- msgid "By Tags"
170
- msgstr "Nach Tags"
171
-
172
- #: bulk-delete.php:461
173
  msgid "Select the tags whose post you want to delete"
174
- msgstr "Selektieren Sie die Tags wessen Berichten Sie l&ouml;schen m&ouml;chten."
175
 
176
- #: bulk-delete.php:488
 
177
  msgid "All Tags"
178
- msgstr "Alle Tags"
179
-
180
- #: bulk-delete.php:553
181
- msgid "By Taxonomies"
182
- msgstr "Nach Taxonomien"
183
 
184
- #: bulk-delete.php:554
 
185
  msgid "Select the taxonomies whose post you want to delete"
186
- msgstr "Selektieren Sie die Taxonomien wessen Berichten Sie l&ouml;schen m&ouml;chten."
187
 
188
- #: bulk-delete.php:583
189
- msgid "All Taxonomies"
190
- msgstr "Alle Taxonomien"
191
-
192
- #: bulk-delete.php:643
193
- msgid "Support"
194
- msgstr "Support"
195
-
196
- #: bulk-delete.php:644
197
- msgid "If you have any questions/comments/feedback about the Plugin then post a comment in the <a target=\"_blank\" href = \"http://sudarmuthu.com/wordpress/bulk-delete\">Plugins homepage</a>."
198
- msgstr "Falls Sie irgendwelche Fragen/Kommentare/Feedback mit Bezug auf dem Plug-In haben, schreiben Sie dann ein Kommentar auf der <a target=\"_blank\" href = \"http://sudarmuthu.com/wordpress/twitter-avatar-reloaded\">Plug-In Startseite</a>."
199
-
200
- #: bulk-delete.php:645
201
- msgid "If you like the Plugin, then consider doing one of the following."
202
- msgstr "Sie m&ouml;gen das Plug-In? &Uuml;berlegen Sie dann folgendes:"
203
-
204
- #: bulk-delete.php:647
205
- msgid "Write a blog post about the Plugin."
206
- msgstr "Sie k&ouml;nnten einen Blogeintrag &uuml;ber dem Plug-In schreiben."
207
-
208
- #: bulk-delete.php:648
209
- msgid " about it."
210
- msgstr "dar&uuml;ber."
211
-
212
- #: bulk-delete.php:649
213
- msgid "Give a <a href = \"http://wordpress.org/extend/plugins/bulk-delete/\" target=\"_blank\">good rating</a>."
214
- msgstr "Gib <a href = \"http://wordpress.org/extend/plugins/twitter-avatar-reloaded/\" target=\"_blank\">eine gute Bewertung</a>."
215
-
216
- #: bulk-delete.php:650
217
- msgid "Say <a href = \"http://sudarmuthu.com/if-you-wanna-thank-me\" target=\"_blank\">thank you</a>."
218
- msgstr "Sage <a href = \"http://sudarmuthu.com/if-you-wanna-thank-me\" target=\"_blank\">Dankesch&ouml;n</a>."
219
-
220
- #: bulk-delete.php:653
221
- msgid "If you are looking to move posts in bulk, instead of deleting then try out my "
222
- msgstr "Wenn Sie viele Berichten verschieben statt l&ouml;schen m&ouml;chten, probieren Sie dann mein"
223
-
224
- #: bulk-delete.php:653
225
- msgid "Bulk Move Plugin"
226
- msgstr "Massenverschiebung Plug-In"
227
-
228
- #: bulk-delete.php:715
229
  msgid "Are you sure you want to delete all the selected posts"
230
- msgstr "Sind Sie sicher, dass Sie alle selektierten Berichten l&ouml;schen m&ouml;chten?"
231
-
232
- #: bulk-delete.php:717
233
- msgid "Please select at least one"
234
- msgstr "Selektieren Sie bitte mindestens einen."
235
-
236
- #: bulk-delete.php:808
237
- msgid "Manage"
238
- msgstr "Verwaltung"
239
 
240
- #: bulk-delete.php:819
 
241
  msgid "plugin"
242
  msgstr "Plug-In"
243
 
244
- #: bulk-delete.php:819
 
245
  msgid "Version"
246
  msgstr "Version"
247
 
248
- #: bulk-delete.php:819
 
249
  msgid "by"
250
- msgstr "durch"
251
 
252
- #. Plugin Name of the plugin/theme
 
 
 
253
  msgid "Bulk Delete"
254
  msgstr "Massenlöschung"
255
 
256
- #. Plugin URI of the plugin/theme
 
 
257
  msgid "http://sudarmuthu.com/wordpress/bulk-delete"
258
  msgstr "http://sudarmuthu.com/wordpress/bulk-delete"
259
 
260
- #. Description of the plugin/theme
261
- msgid "Bulk delete posts from selected categories or tags. Use it with caution."
262
- msgstr "Massenlöschung von Berichten mit selektierten Kategorien oder Tags. Sei vorsichtig."
263
-
264
- #. Author of the plugin/theme
265
  msgid "Sudar"
266
  msgstr "Sudar"
267
 
268
- #. Author URI of the plugin/theme
 
 
269
  msgid "http://sudarmuthu.com/"
270
  msgstr "http://sudarmuthu.com/"
271
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: Bulk Delete v4.4.3\n"
4
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/bulk-delete\n"
5
  "POT-Creation-Date: 2011-01-24 17:19:16+00:00\n"
6
+ "PO-Revision-Date: 2014-03-21 20:18:21+0000\n"
7
+ "Last-Translator: Alexander Ihrig <github@alexander-ihrig.de>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Generator: CSL v1.x\n"
14
  "X-Poedit-Language: German\n"
15
  "X-Poedit-Country: GERMANY\n"
16
+ "X-Poedit-SourceCharset: utf-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
18
+ "X-Poedit-Basepath: \n"
19
+ "X-Poedit-Bookmarks: \n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+ "X-Textdomain-Support: yes"
22
+
23
+ #: bulk-delete.php:326
24
+ #@ bulk-delete
25
  msgid "WARNING: Posts deleted once cannot be retrieved back. Use with caution."
26
+ msgstr "WARNUNG: Gelöschte Beiträge können nicht wiederhergestellt werden. Seien Sie vorsichtig!"
27
 
28
+ #: include/class-bulk-delete-posts.php:29
29
+ #: include/class-bulk-delete-posts.php:907
30
+ #@ bulk-delete
31
  msgid "Select the posts which you want to delete"
32
+ msgstr "Wählen Sie die Beiträge, die Sie löschen möchten:"
33
 
34
+ #: include/class-bulk-delete-posts.php:43
35
+ #@ bulk-delete
 
 
 
36
  msgid "Drafts"
37
+ msgstr "Entwürfe"
38
 
39
+ #: include/class-bulk-delete-posts.php:914
40
+ #@ bulk-delete
41
  msgid "All Revisions"
42
  msgstr "Alle Revisionen"
43
 
44
+ #: include/class-bulk-delete-posts.php:914
45
+ #@ bulk-delete
46
  msgid "Revisions"
47
  msgstr "Revisionen"
48
 
49
+ #: include/class-bulk-delete-posts.php:50
50
+ #@ bulk-delete
51
  msgid "All Pending posts"
52
+ msgstr "Alle ausstehenden Beiträge"
53
+
54
+ #: include/class-bulk-delete-posts.php:36
55
+ #: include/class-bulk-delete-posts.php:50
56
+ #: include/class-bulk-delete-posts.php:57
57
+ #: include/class-bulk-delete-posts.php:64
58
+ #: include/class-bulk-delete-posts.php:71
59
+ #: include/class-bulk-delete-posts.php:197
60
+ #: include/class-bulk-delete-posts.php:321
61
+ #: include/class-bulk-delete-posts.php:504
62
+ #@ bulk-delete
63
  msgid "Posts"
64
+ msgstr "Beiträge"
65
 
66
+ #: include/class-bulk-delete-posts.php:57
67
+ #@ bulk-delete
68
  msgid "All scheduled posts"
69
+ msgstr "Alle geplanten Beiträge"
70
 
71
+ #: include/class-bulk-delete-posts.php:64
72
+ #@ bulk-delete
73
  msgid "All private posts"
74
+ msgstr "Alle privaten Beiträge"
75
+
76
+ #: include/class-bulk-delete-posts.php:750
77
+ #: include/class-bulk-delete-posts.php:757
78
+ #: include/class-bulk-delete-posts.php:764
79
+ #: include/class-bulk-delete-posts.php:771
80
+ #: include/class-bulk-delete-posts.php:778
81
+ #@ bulk-delete
82
  msgid "Pages"
83
  msgstr "Seiten"
84
 
85
+ #: include/class-bulk-delete-posts.php:101
86
+ #: include/class-bulk-delete-posts.php:236
87
+ #: include/class-bulk-delete-posts.php:358
88
+ #: include/class-bulk-delete-posts.php:537
89
+ #: include/class-bulk-delete-posts.php:675
90
+ #: include/class-bulk-delete-posts.php:802
91
+ #: include/class-bulk-delete-posts.php:877
92
+ #@ bulk-delete
93
  msgid "Move to Trash"
94
+ msgstr "In den Papierkorb verschieben"
95
+
96
+ #: include/class-bulk-delete-posts.php:102
97
+ #: include/class-bulk-delete-posts.php:237
98
+ #: include/class-bulk-delete-posts.php:359
99
+ #: include/class-bulk-delete-posts.php:538
100
+ #: include/class-bulk-delete-posts.php:676
101
+ #: include/class-bulk-delete-posts.php:803
102
+ #: include/class-bulk-delete-posts.php:878
103
+ #@ bulk-delete
104
  msgid "Delete permanently"
105
+ msgstr "Endgültig löschen"
106
+
107
+ #: include/class-bulk-delete-posts.php:109
108
+ #: include/class-bulk-delete-posts.php:253
109
+ #: include/class-bulk-delete-posts.php:375
110
+ #: include/class-bulk-delete-posts.php:554
111
+ #: include/class-bulk-delete-posts.php:685
112
+ #: include/class-bulk-delete-posts.php:810
113
+ #@ bulk-delete
114
  msgid "Only delete first "
115
+ msgstr "Lösche nur die ersten "
116
+
117
+ #: include/class-bulk-delete-posts.php:110
118
+ #: include/class-bulk-delete-posts.php:254
119
+ #: include/class-bulk-delete-posts.php:376
120
+ #: include/class-bulk-delete-posts.php:555
121
+ #: include/class-bulk-delete-posts.php:686
122
+ #: include/class-bulk-delete-posts.php:811
123
+ #@ bulk-delete
124
  msgid "posts."
125
+ msgstr "Beiträge."
126
+
127
+ #: include/class-bulk-delete-posts.php:111
128
+ #: include/class-bulk-delete-posts.php:255
129
+ #: include/class-bulk-delete-posts.php:377
130
+ #: include/class-bulk-delete-posts.php:556
131
+ #: include/class-bulk-delete-posts.php:687
132
+ #: include/class-bulk-delete-posts.php:812
133
+ #@ bulk-delete
134
  msgid "Use this option if there are more than 1000 posts and the script timesout."
135
+ msgstr "Verwenden Sie diese Option bei mehr als 1000 Beiträgen oder wenn das Script zu einem Timeout-Fehler führt."
136
+
137
+ #: include/class-bulk-delete-posts.php:138
138
+ #: include/class-bulk-delete-posts.php:289
139
+ #: include/class-bulk-delete-posts.php:404
140
+ #: include/class-bulk-delete-posts.php:583
141
+ #: include/class-bulk-delete-posts.php:714
142
+ #: include/class-bulk-delete-posts.php:839
143
+ #: include/class-bulk-delete-posts.php:886
144
+ #: include/class-bulk-delete-posts.php:922
145
+ #: include/class-bulk-delete-users.php:111
146
+ #@ bulk-delete
147
  msgid "Bulk Delete "
148
+ msgstr "Massenlöschung "
149
 
150
+ #: bulk-delete.php:179
151
+ #@ bulk-delete
152
  msgid "By Category"
153
+ msgstr "Abhängig von der Kategorie"
154
 
155
+ #: include/class-bulk-delete-posts.php:180
156
+ #@ bulk-delete
157
  msgid "Select the categories whose post you want to delete"
158
+ msgstr "Wählen Sie die Kategorien, deren Beiträge Sie löschen möchten:"
159
 
160
+ #: include/class-bulk-delete-posts.php:208
161
+ #@ bulk-delete
162
  msgid "All Categories"
163
  msgstr "Alle Kategorien"
164
 
165
+ #: include/class-bulk-delete-posts.php:90
166
+ #: include/class-bulk-delete-posts.php:225
167
+ #: include/class-bulk-delete-posts.php:347
168
+ #: include/class-bulk-delete-posts.php:526
169
+ #: include/class-bulk-delete-posts.php:664
170
+ #@ bulk-delete
171
  msgid "Only restrict to posts which are "
172
+ msgstr "Nur Beiträge, für die gilt: "
173
+
174
+ #: include/class-bulk-delete-posts.php:92
175
+ #: include/class-bulk-delete-posts.php:227
176
+ #: include/class-bulk-delete-posts.php:349
177
+ #: include/class-bulk-delete-posts.php:528
178
+ #: include/class-bulk-delete-posts.php:666
179
+ #: include/class-bulk-delete-posts.php:793
180
+ #@ bulk-delete
181
  msgid "older than"
182
+ msgstr "älter als"
183
+
184
+ #: include/class-bulk-delete-posts.php:93
185
+ #: include/class-bulk-delete-posts.php:228
186
+ #: include/class-bulk-delete-posts.php:350
187
+ #: include/class-bulk-delete-posts.php:529
188
+ #: include/class-bulk-delete-posts.php:667
189
+ #: include/class-bulk-delete-posts.php:794
190
+ #@ bulk-delete
191
  msgid "posted within last"
192
+ msgstr "veröffentlicht in den letzten"
193
+
194
+ #: include/class-bulk-delete-posts.php:95
195
+ #: include/class-bulk-delete-posts.php:230
196
+ #: include/class-bulk-delete-posts.php:352
197
+ #: include/class-bulk-delete-posts.php:531
198
+ #: include/class-bulk-delete-posts.php:669
199
+ #: include/class-bulk-delete-posts.php:796
200
+ #: include/class-bulk-delete-users.php:59
201
+ #@ bulk-delete
202
  msgid "days"
203
+ msgstr "Tage(n)"
204
 
205
+ #: include/class-bulk-delete-posts.php:243
206
+ #: include/class-bulk-delete-posts.php:365
207
+ #: include/class-bulk-delete-posts.php:544
208
+ #@ bulk-delete
209
  msgid "Public posts"
210
+ msgstr "Öffentliche Beiträge"
211
 
212
+ #: include/class-bulk-delete-posts.php:244
213
+ #: include/class-bulk-delete-posts.php:366
214
+ #: include/class-bulk-delete-posts.php:545
215
+ #@ bulk-delete
216
  msgid "Private Posts"
217
+ msgstr "Private Beiträge"
218
 
219
+ #: include/class-bulk-delete-posts.php:308
220
+ #@ bulk-delete
 
 
 
221
  msgid "Select the tags whose post you want to delete"
222
+ msgstr "Wählen Sie die Schlagwörter, deren Beiträge Sie löschen möchten:"
223
 
224
+ #: include/class-bulk-delete-posts.php:332
225
+ #@ bulk-delete
226
  msgid "All Tags"
227
+ msgstr "Alle Schlagwörter"
 
 
 
 
228
 
229
+ #: include/class-bulk-delete-posts.php:471
230
+ #@ bulk-delete
231
  msgid "Select the taxonomies whose post you want to delete"
232
+ msgstr "Wählen Sie die Taxonomien, deren Beiträge Sie löschen möchten:"
233
 
234
+ #: bulk-delete.php:255
235
+ #@ bulk-delete
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
236
  msgid "Are you sure you want to delete all the selected posts"
237
+ msgstr "Sind Sie sicher, dass Sie alle gewählten Beiträge löschen möchten?"
 
 
 
 
 
 
 
 
238
 
239
+ #: bulk-delete.php:353
240
+ #@ bulk-delete
241
  msgid "plugin"
242
  msgstr "Plug-In"
243
 
244
+ #: bulk-delete.php:353
245
+ #@ bulk-delete
246
  msgid "Version"
247
  msgstr "Version"
248
 
249
+ #: bulk-delete.php:353
250
+ #@ bulk-delete
251
  msgid "by"
252
+ msgstr "von"
253
 
254
+ #. translators: plugin header field 'Name'
255
+ #: bulk-delete.php:0
256
+ #: bulk-delete.php:116
257
+ #@ bulk-delete
258
  msgid "Bulk Delete"
259
  msgstr "Massenlöschung"
260
 
261
+ #. translators: plugin header field 'PluginURI'
262
+ #: bulk-delete.php:0
263
+ #@ bulk-delete
264
  msgid "http://sudarmuthu.com/wordpress/bulk-delete"
265
  msgstr "http://sudarmuthu.com/wordpress/bulk-delete"
266
 
267
+ #. translators: plugin header field 'Author'
268
+ #: bulk-delete.php:0
269
+ #@ bulk-delete
 
 
270
  msgid "Sudar"
271
  msgstr "Sudar"
272
 
273
+ #. translators: plugin header field 'AuthorURI'
274
+ #: bulk-delete.php:0
275
+ #@ bulk-delete
276
  msgid "http://sudarmuthu.com/"
277
  msgstr "http://sudarmuthu.com/"
278
 
279
+ #. translators: plugin header field 'Description'
280
+ #: bulk-delete.php:0
281
+ #@ bulk-delete
282
+ msgid "Bulk delete users and posts from selected categories, tags, post types, custom taxonomies or by post status like drafts, scheduled posts, revisions etc."
283
+ msgstr "Massenlöschung von Benutzern und Beiträgen, die gewählten Kategorien, Schlagwörtern, speziellen Beitragstypen und Taxonomien entsprechen oder nach Beitragsstatus wie Entwurf, geplante Beiträge und Revisionen, etc."
284
+
285
+ #. translators: plugin header field 'Version'
286
+ #: bulk-delete.php:0
287
+ #@ bulk-delete
288
+ msgid "4.4.3"
289
+ msgstr ""
290
+
291
+ #: bulk-delete.php:118
292
+ #: bulk-delete.php:285
293
+ #: bulk-delete.php:310
294
+ #@ bulk-delete
295
+ msgid "Bulk Delete Posts"
296
+ msgstr "Beiträge massenweise löschen"
297
+
298
+ #: bulk-delete.php:119
299
+ #: bulk-delete.php:282
300
+ #: bulk-delete.php:362
301
+ #@ bulk-delete
302
+ msgid "Bulk Delete Users"
303
+ msgstr "Benutzer massenweise löschen"
304
+
305
+ #: bulk-delete.php:120
306
+ #: bulk-delete.php:418
307
+ #@ bulk-delete
308
+ msgid "Bulk Delete Schedules"
309
+ msgstr "Geplante Massenlöschungen"
310
+
311
+ #: bulk-delete.php:150
312
+ #: bulk-delete.php:206
313
+ #@ bulk-delete
314
+ msgid "About Plugin"
315
+ msgstr "Über das Plug-in"
316
+
317
+ #: bulk-delete.php:152
318
+ #: bulk-delete.php:208
319
+ #@ bulk-delete
320
+ msgid "This plugin allows you to delete posts in bulk from selected categories, tags, custom taxonomies or by post status like drafts, pending posts, scheduled posts etc."
321
+ msgstr "Dieses Plug-in ermöglicht es Ihnen, um massenweise Beiträge zu löschen, die gewählten Kategorien, Schlagwörtern, speziellen Beitragstypen und Taxonomien entsprechen oder nach Beitragsstatus wie Entwurf, geplante Beiträge und Revisionen, etc."
322
+
323
+ #: bulk-delete.php:159
324
+ #: bulk-delete.php:215
325
+ #@ bulk-delete
326
+ msgid "More information"
327
+ msgstr "Weitere Informationen"
328
+
329
+ #: bulk-delete.php:160
330
+ #: bulk-delete.php:216
331
+ #@ bulk-delete
332
+ msgid "Plugin Homepage/support"
333
+ msgstr "Plug-in-Homepage und -Unterstützung"
334
+
335
+ #: bulk-delete.php:161
336
+ #: bulk-delete.php:217
337
+ #@ bulk-delete
338
+ msgid "Buy pro addons"
339
+ msgstr "Pro-Addons kaufen"
340
+
341
+ #: bulk-delete.php:162
342
+ #: bulk-delete.php:218
343
+ #@ bulk-delete
344
+ msgid "Plugin author's blog"
345
+ msgstr "Autoren-Blog des Plug-ins"
346
+
347
+ #: bulk-delete.php:163
348
+ #: bulk-delete.php:219
349
+ #@ bulk-delete
350
+ msgid "Other Plugin's by Author"
351
+ msgstr "Weitere Plug-ins des Autors"
352
+
353
+ #: bulk-delete.php:178
354
+ #@ bulk-delete
355
+ msgid "By Post Status"
356
+ msgstr "Abhängig vom Beitragsstatus"
357
+
358
+ #: bulk-delete.php:180
359
+ #@ bulk-delete
360
+ msgid "By Tag"
361
+ msgstr "Abhängig vom Schlagwort"
362
+
363
+ #: bulk-delete.php:181
364
+ #@ bulk-delete
365
+ msgid "By Custom Taxonomy"
366
+ msgstr "Abhängig von spezieller Taxonomie"
367
+
368
+ #: bulk-delete.php:182
369
+ #@ bulk-delete
370
+ msgid "By Custom Post Types"
371
+ msgstr "Abhängig von speziellen Beitragstypen"
372
+
373
+ #: bulk-delete.php:183
374
+ #@ bulk-delete
375
+ msgid "By Page"
376
+ msgstr "Abhängig von der Seite"
377
+
378
+ #: bulk-delete.php:184
379
+ #@ bulk-delete
380
+ msgid "By URL"
381
+ msgstr "Abhängig von der URL"
382
+
383
+ #: bulk-delete.php:185
384
+ #@ bulk-delete
385
+ msgid "By Post Revision"
386
+ msgstr "Abhängig von der Beitragsrevision"
387
+
388
+ #: bulk-delete.php:186
389
+ #@ bulk-delete
390
+ msgid "By Custom Field"
391
+ msgstr "Abhängig von speziellem Feld"
392
+
393
+ #: bulk-delete.php:187
394
+ #@ bulk-delete
395
+ msgid "By Title"
396
+ msgstr "Abhängig vom Titel"
397
+
398
+ #: bulk-delete.php:188
399
+ #@ bulk-delete
400
+ msgid "Debug Information"
401
+ msgstr "Debug-Informationen"
402
+
403
+ #: bulk-delete.php:234
404
+ #@ bulk-delete
405
+ msgid "By User Role"
406
+ msgstr "Abhängig von der Benutzerrolle"
407
+
408
+ #: bulk-delete.php:256
409
+ #@ bulk-delete
410
+ msgid "Are you sure you want to delete all the selected users"
411
+ msgstr "Sind Sie sicher, dass Sie alle gewählten Benutzer löschen möchten?"
412
+
413
+ #: bulk-delete.php:260
414
+ #@ bulk-delete
415
+ msgid "Please select posts from at least one option"
416
+ msgstr "Bitte wählen Sie zumindest eine Option, der Beiträge entsprechen sollen."
417
+
418
+ #: bulk-delete.php:261
419
+ #@ bulk-delete
420
+ msgid "Please enter at least one page url"
421
+ msgstr "Bitte geben Sie mindestens eine Seiten-URL ein"
422
+
423
+ #: bulk-delete.php:262
424
+ #@ bulk-delete
425
+ msgid "Please enter some value for custom field key"
426
+ msgstr "Bitte geben Sie einen Wert für ein spezielles Feld ein."
427
+
428
+ #: bulk-delete.php:263
429
+ #@ bulk-delete
430
+ msgid "Please enter some value for title"
431
+ msgstr "Bitte geben Sie einen Titel ein"
432
+
433
+ #: bulk-delete.php:299
434
+ #@ bulk-delete
435
+ msgid "Buy Addons"
436
+ msgstr "Addons kaufen"
437
+
438
+ #: bulk-delete.php:378
439
+ #@ bulk-delete
440
+ msgid "WARNING: Users deleted once cannot be retrieved back. Use with caution."
441
+ msgstr "WARNUNG: Gelöschte Benutzer können nicht wiederhergestellt werden. Seien Sie vorsichtig!"
442
+
443
+ #: bulk-delete.php:444
444
+ #@ bulk-delete
445
+ msgid "The selected scheduled job was successfully deleted "
446
+ msgstr "Der gewählte geplante Auftrag wurde erfolgreich gelöscht "
447
+
448
+ #: bulk-delete.php:476
449
+ #@ bulk-delete
450
+ msgid "Users from the selected userrole are scheduled for deletion."
451
+ msgstr "Benutzer der gewählten Benutzerrollen sind zur Löschung geplant."
452
+
453
+ #: bulk-delete.php:477
454
+ #: bulk-delete.php:517
455
+ #: bulk-delete.php:548
456
+ #: bulk-delete.php:581
457
+ #: bulk-delete.php:612
458
+ #: bulk-delete.php:648
459
+ #: bulk-delete.php:683
460
+ #: bulk-delete.php:762
461
+ #, php-format
462
+ #@ bulk-delete
463
+ msgid "See the full list of <a href = \"%s\">scheduled tasks</a>"
464
+ msgstr "Die vollständige Liste der <a href = \"%s\">geplanten Aufträge</a> anzeigen"
465
+
466
+ #: bulk-delete.php:480
467
+ #, php-format
468
+ #@ bulk-delete
469
+ msgid "Deleted %d user from the selected roles"
470
+ msgid_plural "Deleted %d users from the selected role"
471
+ msgstr[0] "%d Benutzer der gewählten Benutzerrollen wurde gelöscht"
472
+ msgstr[1] "%d Benutzer der gewählten Benutzerrollen wurden gelöscht"
473
+
474
+ #: bulk-delete.php:516
475
+ #@ bulk-delete
476
+ msgid "Posts from the selected categories are scheduled for deletion."
477
+ msgstr "Beiträge der gewählten Kategorien sind zur Löschung geplant."
478
+
479
+ #: bulk-delete.php:520
480
+ #, php-format
481
+ #@ bulk-delete
482
+ msgid "Deleted %d post from the selected categories"
483
+ msgid_plural "Deleted %d posts from the selected categories"
484
+ msgstr[0] "%d Beitrag der gewählten Kategorien wurde gelöscht"
485
+ msgstr[1] "%d Beiträge der gewählten Kategorien wurden gelöscht"
486
+
487
+ #: bulk-delete.php:547
488
+ #@ bulk-delete
489
+ msgid "Posts from the selected tags are scheduled for deletion."
490
+ msgstr "Beiträge mit den gewählten Schlagwörtern sind zur Löschung geplant."
491
+
492
+ #: bulk-delete.php:551
493
+ #, php-format
494
+ #@ bulk-delete
495
+ msgid "Deleted %d post from the selected tags"
496
+ msgid_plural "Deleted %d posts from the selected tags"
497
+ msgstr[0] "%d Beitrag mit den gewählten Schlagwörtern wurde gelöscht"
498
+ msgstr[1] "%d Beiträge mit den gewählten Schlagwörtern wurden gelöscht"
499
+
500
+ #: bulk-delete.php:580
501
+ #@ bulk-delete
502
+ msgid "Posts from the selected custom taxonomies are scheduled for deletion."
503
+ msgstr "Beiträge der gewählten speziellen Taxonomien sind zur Löschung geplant."
504
+
505
+ #: bulk-delete.php:584
506
+ #, php-format
507
+ #@ bulk-delete
508
+ msgid "Deleted %d post from the selected custom taxonomies"
509
+ msgid_plural "Deleted %d posts from the selected custom taxonomies"
510
+ msgstr[0] "%d Beitrag der gewählten speziellen Taxonomien wurde gelöscht."
511
+ msgstr[1] "%d Beiträge der gewählten speziellen Taxonomien wurden gelöscht."
512
+
513
+ #: bulk-delete.php:611
514
+ #@ bulk-delete
515
+ msgid "Posts from the selected custom post type are scheduled for deletion."
516
+ msgstr "Beiträge des gewählten speziellen Beitragstyps sind zur Löschung geplant."
517
+
518
+ #: bulk-delete.php:615
519
+ #, php-format
520
+ #@ bulk-delete
521
+ msgid "Deleted %d post from the selected custom post type"
522
+ msgid_plural "Deleted %d posts from the selected custom post type"
523
+ msgstr[0] "%d Beitrag des gewählten speziellen Beitragstyps wurde gelöscht."
524
+ msgstr[1] "%d Beiträge des gewählten speziellen Beitragstyps wurden gelöscht."
525
+
526
+ #: bulk-delete.php:647
527
+ #@ bulk-delete
528
+ msgid "Posts with the selected status are scheduled for deletion."
529
+ msgstr "Beiträge des gewählten Beitragsstatus sind zur Löschung geplant."
530
+
531
+ #: bulk-delete.php:651
532
+ #, php-format
533
+ #@ bulk-delete
534
+ msgid "Deleted %d post with the selected post status"
535
+ msgid_plural "Deleted %d posts with the selected post status"
536
+ msgstr[0] "%d Beitrag des gewählten Beitragsstatus wurde gelöscht."
537
+ msgstr[1] "%d Beiträge des gewählten Beitragsstatus wurden gelöscht."
538
+
539
+ #: bulk-delete.php:682
540
+ #@ bulk-delete
541
+ msgid "The selected pages are scheduled for deletion."
542
+ msgstr "Die gewählten Seiten sind zur Löschung geplant."
543
+
544
+ #: bulk-delete.php:686
545
+ #, php-format
546
+ #@ bulk-delete
547
+ msgid "Deleted %d page"
548
+ msgid_plural "Deleted %d pages"
549
+ msgstr[0] "%d Seite wurde gelöscht."
550
+ msgstr[1] "%d Seiten wurden gelöscht."
551
+
552
+ #: bulk-delete.php:712
553
+ #, php-format
554
+ #@ bulk-delete
555
+ msgid "Deleted %d post with the specified urls"
556
+ msgid_plural "Deleted %d posts with the specified urls"
557
+ msgstr[0] "%d Beitrag mit den angegebenen URLs wurde gelöscht."
558
+ msgstr[1] "%d Beiträge mit den angegebenen URLs wurden gelöscht."
559
+
560
+ #: bulk-delete.php:721
561
+ #, php-format
562
+ #@ bulk-delete
563
+ msgid "Deleted %d post revision"
564
+ msgid_plural "Deleted %d post revisions"
565
+ msgstr[0] "%d Beitragsrevision wurde gelöscht."
566
+ msgstr[1] "%d Beitragsrevisionen wurden gelöscht."
567
+
568
+ #: bulk-delete.php:761
569
+ #@ bulk-delete
570
+ msgid "Posts matching the selected title setting are scheduled for deletion."
571
+ msgstr "Beiträge, die zu dem gewählten Titel passen, sind zur Löschung geplant."
572
+
573
+ #: bulk-delete.php:765
574
+ #, php-format
575
+ #@ bulk-delete
576
+ msgid "Deleted %d post using the selected title condition"
577
+ msgid_plural "Deleted %d posts using the selected title condition"
578
+ msgstr[0] "%d Beitrag, passend zum gewählten Titel, wurde gelöscht."
579
+ msgstr[1] "%d Beiträge, passend zum gewählten Titel, wurden gelöscht."
580
+
581
+ #: include/class-bulk-delete-posts.php:16
582
+ #: include/class-bulk-delete-posts.php:149
583
+ #: include/class-bulk-delete-posts.php:301
584
+ #: include/class-bulk-delete-posts.php:421
585
+ #: include/class-bulk-delete-posts.php:600
586
+ #: include/class-bulk-delete-posts.php:731
587
+ #: include/class-bulk-delete-posts.php:851
588
+ #: include/class-bulk-delete-posts.php:898
589
+ #: include/class-bulk-delete-posts.php:934
590
+ #: include/class-bulk-delete-posts.php:964
591
+ #: include/class-bulk-delete-users.php:16
592
+ #, php-format
593
+ #@ bulk-delete
594
+ msgid "This section just got enabled. Kindly <a href = \"%1$s\">refresh</a> the page to fully enable it."
595
+ msgstr "Dieser Bereich wurde gerade freigeschaltet. Bitte <a href = \"%1$s\">aktualisieren</a> Sie die Seite, um sie vollständig zu aktivieren."
596
+
597
+ #: include/class-bulk-delete-posts.php:36
598
+ #@ bulk-delete
599
+ msgid "All publish posts"
600
+ msgstr "Alle veröffentlichten Beiträge"
601
+
602
+ #: include/class-bulk-delete-posts.php:43
603
+ #@ bulk-delete
604
+ msgid "All Draft Posts"
605
+ msgstr "Alle Beitrags-Entwürfe"
606
+
607
+ #: include/class-bulk-delete-posts.php:71
608
+ #@ bulk-delete
609
+ msgid "All Sticky posts"
610
+ msgstr "Alle angehefteten Beiträge"
611
+
612
+ #: include/class-bulk-delete-posts.php:77
613
+ #: include/class-bulk-delete-posts.php:216
614
+ #: include/class-bulk-delete-posts.php:338
615
+ #: include/class-bulk-delete-posts.php:517
616
+ #: include/class-bulk-delete-posts.php:655
617
+ #: include/class-bulk-delete-posts.php:784
618
+ #: include/class-bulk-delete-posts.php:871
619
+ #: include/class-bulk-delete-users.php:42
620
+ #@ bulk-delete
621
+ msgid "Choose your filtering options"
622
+ msgstr "Wählen Sie Ihre Filter-Optionen:"
623
+
624
+ #: include/class-bulk-delete-posts.php:83
625
+ #@ bulk-delete
626
+ msgid "Note: The date filter will not work for sticky posts"
627
+ msgstr "Hinweis: Der Datumsfilter funktioniert nicht bei angehefteten Beiträgen."
628
+
629
+ #: include/class-bulk-delete-posts.php:117
630
+ #: include/class-bulk-delete-posts.php:261
631
+ #: include/class-bulk-delete-posts.php:383
632
+ #: include/class-bulk-delete-posts.php:562
633
+ #: include/class-bulk-delete-posts.php:693
634
+ #: include/class-bulk-delete-posts.php:818
635
+ #: include/class-bulk-delete-users.php:83
636
+ #@ bulk-delete
637
+ msgid "Delete now"
638
+ msgstr "Jetzt löschen"
639
+
640
+ #: include/class-bulk-delete-posts.php:118
641
+ #: include/class-bulk-delete-posts.php:262
642
+ #: include/class-bulk-delete-posts.php:384
643
+ #: include/class-bulk-delete-posts.php:563
644
+ #: include/class-bulk-delete-posts.php:694
645
+ #: include/class-bulk-delete-posts.php:819
646
+ #: include/class-bulk-delete-users.php:84
647
+ #: include/class-cron-list-table.php:124
648
+ #@ bulk-delete
649
+ msgid "Schedule"
650
+ msgstr "Planung"
651
+
652
+ #: include/class-bulk-delete-posts.php:119
653
+ #: include/class-bulk-delete-posts.php:263
654
+ #: include/class-bulk-delete-posts.php:385
655
+ #: include/class-bulk-delete-posts.php:564
656
+ #: include/class-bulk-delete-posts.php:695
657
+ #: include/class-bulk-delete-posts.php:820
658
+ #: include/class-bulk-delete-users.php:85
659
+ #@ bulk-delete
660
+ msgid "repeat "
661
+ msgstr "wiederholen"
662
+
663
+ #: include/class-bulk-delete-posts.php:121
664
+ #: include/class-bulk-delete-posts.php:265
665
+ #: include/class-bulk-delete-posts.php:387
666
+ #: include/class-bulk-delete-posts.php:566
667
+ #: include/class-bulk-delete-posts.php:697
668
+ #: include/class-bulk-delete-posts.php:822
669
+ #: include/class-bulk-delete-users.php:87
670
+ #@ bulk-delete
671
+ msgid "Don't repeat"
672
+ msgstr "Nicht wiederholen"
673
+
674
+ #: include/class-bulk-delete-posts.php:131
675
+ #: include/class-bulk-delete-posts.php:275
676
+ #: include/class-bulk-delete-posts.php:397
677
+ #: include/class-bulk-delete-posts.php:576
678
+ #: include/class-bulk-delete-posts.php:707
679
+ #: include/class-bulk-delete-posts.php:832
680
+ #: include/class-bulk-delete-users.php:97
681
+ #@ bulk-delete
682
+ msgid "Only available in Pro Addon"
683
+ msgstr "Nur im Pro-Addon verfügbar"
684
+
685
+ #: include/class-bulk-delete-posts.php:161
686
+ #@ bulk-delete
687
+ msgid "Select the post type whose category posts you want to delete"
688
+ msgstr "Wählen Sie einen Beitragstyp, dessen Beiträge der Kategorie Sie löschen möchten:"
689
+
690
+ #: include/class-bulk-delete-posts.php:181
691
+ #@ bulk-delete
692
+ msgid "Note: The post count below for each category is the total number of posts in that category, irrespective of post type"
693
+ msgstr "Hinweis: Die Anzahl der Beiträge unten ist die gesamte Zahl der Beiträge in der jeweiligen Kategorie, unabhängig vom Beitragstyp."
694
+
695
+ #: include/class-bulk-delete-posts.php:281
696
+ #: include/class-bulk-delete-users.php:103
697
+ #@ bulk-delete
698
+ msgid "Enter time in Y-m-d H:i:s format or enter now to use current time"
699
+ msgstr "Geben Sie den Zeitpunkt im Format Y-m-d H:i:s ein, oder geben Sie 'now' für den aktuellen Zeitpunkt ein."
700
+
701
+ #: include/class-bulk-delete-posts.php:410
702
+ #@ bulk-delete
703
+ msgid "You don't have any posts assigned to tags in this blog."
704
+ msgstr "Es gibt keine Beiträge, denen Schlagwörter zugeordnet sind."
705
+
706
+ #: include/class-bulk-delete-posts.php:451
707
+ #@ bulk-delete
708
+ msgid "Select the post type whose taxonomy posts you want to delete"
709
+ msgstr "Wählen Sie einen Beitragstyp, dessen Beiträge der Taxonomie Sie löschen möchten:"
710
+
711
+ #: include/class-bulk-delete-posts.php:490
712
+ #@ bulk-delete
713
+ msgid "The selected taxonomy has the following terms. Select the terms whose post you want to delete"
714
+ msgstr "Die gewählte Taxonomie hat folgende Begriffe. Wählen Sie die Begriffe, deren Beiträge Sie löschen möchten:"
715
+
716
+ #: include/class-bulk-delete-posts.php:491
717
+ #@ bulk-delete
718
+ msgid "Note: The post count below for each term is the total number of posts in that term, irrespective of post type"
719
+ msgstr "Hinweis: Die Anzahl der Beiträge unten ist die gesamte Zahl der Beiträge des jeweiligen Begriffs, unabhängig vom Beitragstyp."
720
+
721
+ #: include/class-bulk-delete-posts.php:589
722
+ #@ bulk-delete
723
+ msgid "You don't have any posts assigned to custom taxonomies in this blog."
724
+ msgstr "Es gibt keine Beiträge, die zu speziellen Taxonomien gehören."
725
+
726
+ #: include/class-bulk-delete-posts.php:635
727
+ #@ bulk-delete
728
+ msgid "Select the custom post type whose post you want to delete"
729
+ msgstr "Wählen Sie den speziellen Beitragstyp, dessen Beiträge Sie löschen möchten:"
730
+
731
+ #: include/class-bulk-delete-posts.php:720
732
+ #@ bulk-delete
733
+ msgid "You don't have any posts assigned to custom post types in this blog."
734
+ msgstr "Es gibt keine Beiträge, die zu speziellen Beitragstypen gehören."
735
+
736
+ #: include/class-bulk-delete-posts.php:743
737
+ #@ bulk-delete
738
+ msgid "Select the pages which you want to delete"
739
+ msgstr "Wählen Sie die Seiten, die Sie löschen möchten:"
740
+
741
+ #: include/class-bulk-delete-posts.php:750
742
+ #@ bulk-delete
743
+ msgid "All Published Pages"
744
+ msgstr "Alle veröffentlichten Seiten"
745
+
746
+ #: include/class-bulk-delete-posts.php:757
747
+ #@ bulk-delete
748
+ msgid "All Draft Pages"
749
+ msgstr "Alle Seiten-Entwürfe"
750
+
751
+ #: include/class-bulk-delete-posts.php:764
752
+ #@ bulk-delete
753
+ msgid "All Scheduled Pages"
754
+ msgstr "Alle geplanten Seiten"
755
+
756
+ #: include/class-bulk-delete-posts.php:771
757
+ #@ bulk-delete
758
+ msgid "All Pending Pages"
759
+ msgstr "Alle ausstehenden Seiten"
760
+
761
+ #: include/class-bulk-delete-posts.php:778
762
+ #@ bulk-delete
763
+ msgid "All Private Pages"
764
+ msgstr "Alle privaten Seiten"
765
+
766
+ #: include/class-bulk-delete-posts.php:791
767
+ #@ bulk-delete
768
+ msgid "Only restrict to pages which are "
769
+ msgstr "Nur Seiten, für die gilt: "
770
+
771
+ #: include/class-bulk-delete-posts.php:857
772
+ #@ bulk-delete
773
+ msgid "Delete these specific pages"
774
+ msgstr "Lösche diese spezifischen Seiten:"
775
+
776
+ #: include/class-bulk-delete-posts.php:863
777
+ #@ bulk-delete
778
+ msgid "Enter one post url (not post ids) per line"
779
+ msgstr "Geben Sie eine Beitrags-URL (nicht Beitrags-ID) pro Zeile ein"
780
+
781
+ #: include/class-bulk-delete-posts.php:943
782
+ #@ bulk-delete
783
+ msgid "You need \"Bulk Delete by Custom Field\" Addon, to delete post by custom field."
784
+ msgstr "Um Beiträge abhängig von speziellen Feldern löschen zu können, benötigen Sie das Pro-Addon \"Bulk Delete by Custom Field\"."
785
+
786
+ #: include/class-bulk-delete-posts.php:973
787
+ #@ bulk-delete
788
+ msgid "You need \"Bulk Delete by Title\" Addon, to delete post by title."
789
+ msgstr "Um Beiträge abhängig vom Titel löschen zu können, benötigen Sie das Pro-Addon \"Bulk Delete by Title\"."
790
+
791
+ #: include/class-bulk-delete-posts.php:991
792
+ #@ bulk-delete
793
+ msgid "If you are seeing a blank page after clicking the Bulk Delete button, then "
794
+ msgstr "Wenn Sie eine leere Seite sehen, nachdem Sie auf die Schaltfläche Massenlöschung geklickt haben, dann "
795
+
796
+ #: include/class-bulk-delete-posts.php:991
797
+ #@ bulk-delete
798
+ msgid "check out this FAQ"
799
+ msgstr "lesen Sie in den FAQ"
800
+
801
+ #: include/class-bulk-delete-posts.php:992
802
+ #@ bulk-delete
803
+ msgid "You also need need the following debug information."
804
+ msgstr "Sie benötigen außerdem die folgenden Debug-Informationen."
805
+
806
+ #: include/class-bulk-delete-posts.php:996
807
+ #@ bulk-delete
808
+ msgid "PHP Version "
809
+ msgstr ""
810
+
811
+ #: include/class-bulk-delete-posts.php:1000
812
+ #@ bulk-delete
813
+ msgid "Plugin Version "
814
+ msgstr ""
815
+
816
+ #: include/class-bulk-delete-posts.php:1004
817
+ #@ bulk-delete
818
+ msgid "Available memory size "
819
+ msgstr ""
820
+
821
+ #: include/class-bulk-delete-posts.php:1008
822
+ #@ bulk-delete
823
+ msgid "Script time out "
824
+ msgstr ""
825
+
826
+ #: include/class-bulk-delete-posts.php:1012
827
+ #@ bulk-delete
828
+ msgid "Script input time "
829
+ msgstr ""
830
+
831
+ #: include/class-bulk-delete-users.php:21
832
+ #@ bulk-delete
833
+ msgid "Select the user roles from which you want to delete users"
834
+ msgstr "Wählen Sie die Benutzerrollen, deren Benutzer Sie löschen möchten:"
835
+
836
+ #: include/class-bulk-delete-users.php:34
837
+ #@ bulk-delete
838
+ msgid "Users"
839
+ msgstr "Benutzer"
840
+
841
+ #: include/class-bulk-delete-users.php:58
842
+ #@ bulk-delete
843
+ msgid "Only restrict to users who have not logged in the last "
844
+ msgstr "Nur Benutzer, die sich nicht mehr angemeldet haben seit: "
845
+
846
+ #: include/class-bulk-delete-users.php:64
847
+ #@ bulk-delete
848
+ msgid "Need Simple Login Log Plugin"
849
+ msgstr "Hierfür wird das Plug-in \\\"Simple Login Log\\\" benötigt."
850
+
851
+ #: include/class-bulk-delete-users.php:77
852
+ #@ bulk-delete
853
+ msgid "Only if user doesn't have any post"
854
+ msgstr "Nur wenn Benutzer keinerlei Beiträge haben"
855
+
856
+ #: include/class-bulk-delete-util.php:84
857
+ #@ bulk-delete
858
+ msgctxt "Cron table date format"
859
+ msgid "M j, Y @ G:i"
860
+ msgstr "M j, Y @ G:i"
861
+
862
+ #: include/class-cron-list-table.php:31
863
+ #@ bulk-delete
864
+ msgid "This is the list of jobs that are currently scheduled for auto deleting posts in Bulk Delete Plugin."
865
+ msgstr "Dies ist die Liste der momentan geplanten Aufträge zur automatischen Löschung von Beiträgen mit Hilfe dieses Plug-ins."
866
+
867
+ #: include/class-cron-list-table.php:39
868
+ #@ bulk-delete
869
+ msgid "Note: "
870
+ msgstr "Hinweis: "
871
+
872
+ #: include/class-cron-list-table.php:41
873
+ #@ bulk-delete
874
+ msgid "Scheduling auto post or user deletion is available only when you buy pro addons."
875
+ msgstr "Die Planung zur automatischen Löschung von Benutzern oder Beiträgen ist nur verfügbar, wenn Sie Pro-Addons kaufen."
876
+
877
+ #: include/class-cron-list-table.php:45
878
+ #@ bulk-delete
879
+ msgid "The following are the list of pro addons that are currently available for purchase."
880
+ msgstr "Im Folgenden finden Sie eine Liste der Pro-Addons, die es aktuell zu kaufen gibt."
881
+
882
+ #: include/class-cron-list-table.php:51
883
+ #@ bulk-delete
884
+ msgid "Delete posts by custom field"
885
+ msgstr ""
886
+
887
+ #: include/class-cron-list-table.php:52
888
+ #@ bulk-delete
889
+ msgid "Adds the ability to delete posts based on custom fields"
890
+ msgstr "Fügt die Möglichkeit hinzu, Beiträge abhängig von speziellen Feldern zu löschen."
891
+
892
+ #: include/class-cron-list-table.php:53
893
+ #: include/class-cron-list-table.php:60
894
+ #: include/class-cron-list-table.php:67
895
+ #: include/class-cron-list-table.php:74
896
+ #: include/class-cron-list-table.php:81
897
+ #: include/class-cron-list-table.php:88
898
+ #: include/class-cron-list-table.php:95
899
+ #: include/class-cron-list-table.php:102
900
+ #: include/class-cron-list-table.php:109
901
+ #@ bulk-delete
902
+ msgid "More Info"
903
+ msgstr "Weitere Informationen"
904
+
905
+ #: include/class-cron-list-table.php:54
906
+ #: include/class-cron-list-table.php:61
907
+ #: include/class-cron-list-table.php:68
908
+ #: include/class-cron-list-table.php:75
909
+ #: include/class-cron-list-table.php:82
910
+ #: include/class-cron-list-table.php:89
911
+ #: include/class-cron-list-table.php:96
912
+ #: include/class-cron-list-table.php:103
913
+ #: include/class-cron-list-table.php:110
914
+ #@ bulk-delete
915
+ msgid "Buy now"
916
+ msgstr "Jetzt kaufen"
917
+
918
+ #: include/class-cron-list-table.php:58
919
+ #@ bulk-delete
920
+ msgid "Delete posts by title"
921
+ msgstr ""
922
+
923
+ #: include/class-cron-list-table.php:59
924
+ #@ bulk-delete
925
+ msgid "Adds the ability to delete posts based on title"
926
+ msgstr "Fügt die Möglichkeit hinzu, Beiträge abhängig vom Titel zu löschen."
927
+
928
+ #: include/class-cron-list-table.php:65
929
+ #@ bulk-delete
930
+ msgid "Schedule auto delete of Posts by Categories"
931
+ msgstr ""
932
+
933
+ #: include/class-cron-list-table.php:66
934
+ #@ bulk-delete
935
+ msgid "Adds the ability to schedule auto delete of posts based on categories"
936
+ msgstr "Fügt die Planungsmöglichkeit hinzu, Beiträge abhängig von Kategorien automatisch löschen zu lassen."
937
+
938
+ #: include/class-cron-list-table.php:72
939
+ #@ bulk-delete
940
+ msgid "Schedule auto delete of Posts by Tags"
941
+ msgstr ""
942
+
943
+ #: include/class-cron-list-table.php:73
944
+ #@ bulk-delete
945
+ msgid "Adds the ability to schedule auto delete of posts based on tags"
946
+ msgstr "Fügt die Planungsmöglichkeit hinzu, Beiträge abhängig von Schlagwörtern automatisch löschen zu lassen."
947
+
948
+ #: include/class-cron-list-table.php:79
949
+ #@ bulk-delete
950
+ msgid "Schedule auto delete of posts by Custom Taxonomy"
951
+ msgstr ""
952
+
953
+ #: include/class-cron-list-table.php:80
954
+ #@ bulk-delete
955
+ msgid "Adds the ability to schedule auto delete of posts based on custom taxonomies"
956
+ msgstr "Fügt die Planungsmöglichkeit hinzu, Beiträge spezieller Taxonomien automatisch löschen zu lassen."
957
+
958
+ #: include/class-cron-list-table.php:86
959
+ #@ bulk-delete
960
+ msgid "Schedule auto delete of Posts by Custom Post Type"
961
+ msgstr ""
962
+
963
+ #: include/class-cron-list-table.php:87
964
+ #@ bulk-delete
965
+ msgid "Adds the ability to schedule auto delete of posts based on custom post types"
966
+ msgstr "Fügt die Planungsmöglichkeit hinzu, Beiträge spezieller Beitragstypen automatisch löschen zu lassen."
967
+
968
+ #: include/class-cron-list-table.php:93
969
+ #@ bulk-delete
970
+ msgid "Schedule auto delete of Pages"
971
+ msgstr ""
972
+
973
+ #: include/class-cron-list-table.php:94
974
+ #@ bulk-delete
975
+ msgid "Adds the ability to schedule auto delete pages"
976
+ msgstr "Fügt die Planungsmöglichkeit hinzu, Seiten automatisch löschen zu lassen."
977
+
978
+ #: include/class-cron-list-table.php:100
979
+ #@ bulk-delete
980
+ msgid "Schedule auto delete of Posts by Post Status"
981
+ msgstr ""
982
+
983
+ #: include/class-cron-list-table.php:101
984
+ #@ bulk-delete
985
+ msgid "Adds the ability to schedule auto delete of posts based on post status like drafts, pending posts, scheduled posts etc."
986
+ msgstr "Fügt die Planungsmöglichkeit hinzu, Beiträge abhängig vom Beitragsstatus (wie Entwurf, ausstehende Beiträge oder geplante Beiträge) automatisch löschen zu lassen."
987
+
988
+ #: include/class-cron-list-table.php:107
989
+ #@ bulk-delete
990
+ msgid "Schedule auto delete of Users by User Role"
991
+ msgstr ""
992
+
993
+ #: include/class-cron-list-table.php:108
994
+ #@ bulk-delete
995
+ msgid "Adds the ability to schedule auto delete of users based on user role"
996
+ msgstr "Fügt die Planungsmöglichkeit hinzu, Benutzer abhängig von der Benutzerrolle automatisch löschen zu lassen."
997
+
998
+ #: include/class-cron-list-table.php:123
999
+ #@ bulk-delete
1000
+ msgid "Next Due (GMT/UTC)"
1001
+ msgstr "Nächste Fälligkeit (GMT/UTC)"
1002
+
1003
+ #: include/class-cron-list-table.php:125
1004
+ #@ bulk-delete
1005
+ msgid "Type"
1006
+ msgstr "Typ"
1007
+
1008
+ #: include/class-cron-list-table.php:126
1009
+ #@ bulk-delete
1010
+ msgid "Options"
1011
+ msgstr "Optionen"
1012
+
1013
+ #: include/class-cron-list-table.php:180
1014
+ #@ bulk-delete
1015
+ msgid "Delete"
1016
+ msgstr "Löschen"
1017
+
1018
+ #: include/class-cron-list-table.php:206
1019
+ #@ bulk-delete
1020
+ msgid "You have not scheduled any bulk delete jobs."
1021
+ msgstr "Sie haben keinen Massenlöschungsauftrag geplant."
1022
+
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 4.4.3\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/bulk-delete\n"
7
- "POT-Creation-Date: 2014-01-26 12:15:19+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,934 +12,1135 @@ msgstr ""
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #: bulk-delete.php:116
 
 
 
 
 
 
16
  msgid "Bulk Delete"
17
  msgstr ""
18
 
19
- #: bulk-delete.php:118 bulk-delete.php:285 bulk-delete.php:310
20
  msgid "Bulk Delete Posts"
21
  msgstr ""
22
 
23
- #: bulk-delete.php:119 bulk-delete.php:282 bulk-delete.php:362
 
 
 
 
24
  msgid "Bulk Delete Users"
25
  msgstr ""
26
 
27
- #: bulk-delete.php:120 bulk-delete.php:418
28
  msgid "Bulk Delete Schedules"
29
  msgstr ""
30
 
31
- #: bulk-delete.php:150 bulk-delete.php:206
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  msgid "About Plugin"
33
  msgstr ""
34
 
35
- #: bulk-delete.php:152 bulk-delete.php:208
36
- msgid "This plugin allows you to delete posts in bulk from selected categories, tags, custom taxonomies or by post status like drafts, pending posts, scheduled posts etc."
 
 
 
37
  msgstr ""
38
 
39
- #: bulk-delete.php:159 bulk-delete.php:215
40
  msgid "More information"
41
  msgstr ""
42
 
43
- #: bulk-delete.php:160 bulk-delete.php:216
44
  msgid "Plugin Homepage/support"
45
  msgstr ""
46
 
47
- #: bulk-delete.php:161 bulk-delete.php:217
48
  msgid "Buy pro addons"
49
  msgstr ""
50
 
51
- #: bulk-delete.php:162 bulk-delete.php:218
52
  msgid "Plugin author's blog"
53
  msgstr ""
54
 
55
- #: bulk-delete.php:163 bulk-delete.php:219
56
  msgid "Other Plugin's by Author"
57
  msgstr ""
58
 
59
- #: bulk-delete.php:178
60
  msgid "By Post Status"
61
  msgstr ""
62
 
63
- #: bulk-delete.php:179
64
  msgid "By Category"
65
  msgstr ""
66
 
67
- #: bulk-delete.php:180
68
  msgid "By Tag"
69
  msgstr ""
70
 
71
- #: bulk-delete.php:181
72
  msgid "By Custom Taxonomy"
73
  msgstr ""
74
 
75
- #: bulk-delete.php:182
76
  msgid "By Custom Post Types"
77
  msgstr ""
78
 
79
- #: bulk-delete.php:183
80
- msgid "By Page"
81
- msgstr ""
82
-
83
- #: bulk-delete.php:184
84
  msgid "By URL"
85
  msgstr ""
86
 
87
- #: bulk-delete.php:185
88
  msgid "By Post Revision"
89
  msgstr ""
90
 
91
- #: bulk-delete.php:186
92
  msgid "By Custom Field"
93
  msgstr ""
94
 
95
- #: bulk-delete.php:187
96
  msgid "By Title"
97
  msgstr ""
98
 
99
- #: bulk-delete.php:188
100
- msgid "Debug Information"
 
 
 
 
101
  msgstr ""
102
 
103
- #: bulk-delete.php:234
104
  msgid "By User Role"
105
  msgstr ""
106
 
107
- #: bulk-delete.php:255
108
  msgid "Are you sure you want to delete all the selected posts"
109
  msgstr ""
110
 
111
- #: bulk-delete.php:256
112
  msgid "Are you sure you want to delete all the selected users"
113
  msgstr ""
114
 
115
- #: bulk-delete.php:260
116
  msgid "Please select posts from at least one option"
117
  msgstr ""
118
 
119
- #: bulk-delete.php:261
120
  msgid "Please enter at least one page url"
121
  msgstr ""
122
 
123
- #: bulk-delete.php:262
124
  msgid "Please enter some value for custom field key"
125
  msgstr ""
126
 
127
- #: bulk-delete.php:263
128
  msgid "Please enter some value for title"
129
  msgstr ""
130
 
131
- #: bulk-delete.php:299
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  msgid "Buy Addons"
133
  msgstr ""
134
 
135
- #: bulk-delete.php:326
136
- msgid "WARNING: Posts deleted once cannot be retrieved back. Use with caution."
137
  msgstr ""
138
 
139
- #: bulk-delete.php:353
140
- msgid "plugin"
141
  msgstr ""
142
 
143
- #: bulk-delete.php:353
144
- msgid "Version"
145
  msgstr ""
146
 
147
- #: bulk-delete.php:353
148
- msgid "by"
149
  msgstr ""
150
 
151
- #: bulk-delete.php:378
152
- msgid "WARNING: Users deleted once cannot be retrieved back. Use with caution."
 
 
153
  msgstr ""
154
 
155
- #: bulk-delete.php:444
156
- msgid "The selected scheduled job was successfully deleted "
157
  msgstr ""
158
 
159
- #: bulk-delete.php:476
160
- msgid "Users from the selected userrole are scheduled for deletion."
 
 
161
  msgstr ""
162
 
163
- #: bulk-delete.php:477 bulk-delete.php:517 bulk-delete.php:548
164
- #: bulk-delete.php:581 bulk-delete.php:612 bulk-delete.php:648
165
- #: bulk-delete.php:683 bulk-delete.php:762
166
- #: tmp_addon/bulk-delete-by-custom-field.php:286
167
- msgid "See the full list of <a href = \"%s\">scheduled tasks</a>"
168
  msgstr ""
169
 
170
- #: bulk-delete.php:480
171
- msgid "Deleted %d user from the selected roles"
172
- msgid_plural "Deleted %d users from the selected role"
173
- msgstr[0] ""
174
- msgstr[1] ""
175
 
176
- #: bulk-delete.php:516
177
- msgid "Posts from the selected categories are scheduled for deletion."
178
  msgstr ""
179
 
180
- #: bulk-delete.php:520
181
- msgid "Deleted %d post from the selected categories"
182
- msgid_plural "Deleted %d posts from the selected categories"
183
- msgstr[0] ""
184
- msgstr[1] ""
185
 
186
- #: bulk-delete.php:547
187
- msgid "Posts from the selected tags are scheduled for deletion."
188
  msgstr ""
189
 
190
- #: bulk-delete.php:551
191
- msgid "Deleted %d post from the selected tags"
192
- msgid_plural "Deleted %d posts from the selected tags"
193
- msgstr[0] ""
194
- msgstr[1] ""
195
 
196
- #: bulk-delete.php:580
197
- msgid "Posts from the selected custom taxonomies are scheduled for deletion."
198
  msgstr ""
199
 
200
- #: bulk-delete.php:584
201
- msgid "Deleted %d post from the selected custom taxonomies"
202
- msgid_plural "Deleted %d posts from the selected custom taxonomies"
203
- msgstr[0] ""
204
- msgstr[1] ""
205
 
206
- #: bulk-delete.php:611
207
- msgid "Posts from the selected custom post type are scheduled for deletion."
 
 
 
 
208
  msgstr ""
209
 
210
- #: bulk-delete.php:615
211
- msgid "Deleted %d post from the selected custom post type"
212
- msgid_plural "Deleted %d posts from the selected custom post type"
213
- msgstr[0] ""
214
- msgstr[1] ""
215
 
216
- #: bulk-delete.php:647
217
- msgid "Posts with the selected status are scheduled for deletion."
218
  msgstr ""
219
 
220
- #: bulk-delete.php:651
221
- msgid "Deleted %d post with the selected post status"
222
- msgid_plural "Deleted %d posts with the selected post status"
223
- msgstr[0] ""
224
- msgstr[1] ""
225
 
226
- #: bulk-delete.php:682
227
- msgid "The selected pages are scheduled for deletion."
228
  msgstr ""
229
 
230
- #: bulk-delete.php:686
231
- msgid "Deleted %d page"
232
- msgid_plural "Deleted %d pages"
233
- msgstr[0] ""
234
- msgstr[1] ""
235
 
236
- #: bulk-delete.php:712
237
- msgid "Deleted %d post with the specified urls"
238
- msgid_plural "Deleted %d posts with the specified urls"
239
- msgstr[0] ""
240
- msgstr[1] ""
241
 
242
- #: bulk-delete.php:721
243
- msgid "Deleted %d post revision"
244
- msgid_plural "Deleted %d post revisions"
245
- msgstr[0] ""
246
- msgstr[1] ""
247
 
248
- #: bulk-delete.php:761
249
- msgid "Posts matching the selected title setting are scheduled for deletion."
250
  msgstr ""
251
 
252
- #: bulk-delete.php:765
253
- msgid "Deleted %d post using the selected title condition"
254
- msgid_plural "Deleted %d posts using the selected title condition"
255
- msgstr[0] ""
256
- msgstr[1] ""
257
 
258
- #: include/class-bulk-delete-posts.php:16
259
- #: include/class-bulk-delete-posts.php:149
260
- #: include/class-bulk-delete-posts.php:301
261
- #: include/class-bulk-delete-posts.php:421
262
- #: include/class-bulk-delete-posts.php:600
263
- #: include/class-bulk-delete-posts.php:731
264
- #: include/class-bulk-delete-posts.php:851
265
- #: include/class-bulk-delete-posts.php:898
266
- #: include/class-bulk-delete-posts.php:934
267
- #: include/class-bulk-delete-posts.php:964
268
- #: include/class-bulk-delete-users.php:16
269
- msgid "This section just got enabled. Kindly <a href = \"%1$s\">refresh</a> the page to fully enable it."
270
- msgstr ""
271
-
272
- #: include/class-bulk-delete-posts.php:29
273
- #: include/class-bulk-delete-posts.php:907
274
- msgid "Select the posts which you want to delete"
275
  msgstr ""
276
 
277
- #: include/class-bulk-delete-posts.php:36
278
- msgid "All publish posts"
279
  msgstr ""
280
 
281
- #: include/class-bulk-delete-posts.php:36
282
- #: include/class-bulk-delete-posts.php:50
283
- #: include/class-bulk-delete-posts.php:57
284
- #: include/class-bulk-delete-posts.php:64
285
- #: include/class-bulk-delete-posts.php:71
286
- #: include/class-bulk-delete-posts.php:197
287
- #: include/class-bulk-delete-posts.php:321
288
- #: include/class-bulk-delete-posts.php:504
289
- msgid "Posts"
290
  msgstr ""
291
 
292
- #: include/class-bulk-delete-posts.php:43
293
- msgid "All Draft Posts"
294
  msgstr ""
295
 
296
- #: include/class-bulk-delete-posts.php:43
297
- msgid "Drafts"
 
 
298
  msgstr ""
299
 
300
- #: include/class-bulk-delete-posts.php:50
301
- msgid "All Pending posts"
302
  msgstr ""
303
 
304
- #: include/class-bulk-delete-posts.php:57
305
- msgid "All scheduled posts"
306
  msgstr ""
307
 
308
- #: include/class-bulk-delete-posts.php:64
309
- msgid "All private posts"
310
  msgstr ""
311
 
312
- #: include/class-bulk-delete-posts.php:71
313
- msgid "All Sticky posts"
 
 
 
 
314
  msgstr ""
315
 
316
- #: include/class-bulk-delete-posts.php:77
317
- #: include/class-bulk-delete-posts.php:216
318
- #: include/class-bulk-delete-posts.php:338
319
- #: include/class-bulk-delete-posts.php:517
320
- #: include/class-bulk-delete-posts.php:655
321
  #: include/class-bulk-delete-posts.php:784
322
- #: include/class-bulk-delete-posts.php:871
323
- #: include/class-bulk-delete-users.php:42
324
- #: tmp_addon/bulk-delete-by-custom-field.php:168
325
- #: tmp_addon/bulk-delete-by-title.php:84
326
- msgid "Choose your filtering options"
 
 
 
 
 
327
  msgstr ""
328
 
329
- #: include/class-bulk-delete-posts.php:83
330
- msgid "Note: The date filter will not work for sticky posts"
331
  msgstr ""
332
 
333
- #: include/class-bulk-delete-posts.php:90
334
- #: include/class-bulk-delete-posts.php:225
335
- #: include/class-bulk-delete-posts.php:347
336
- #: include/class-bulk-delete-posts.php:526
337
- #: include/class-bulk-delete-posts.php:664
338
- #: tmp_addon/bulk-delete-by-custom-field.php:177
339
- #: tmp_addon/bulk-delete-by-title.php:93
340
- msgid "Only restrict to posts which are "
341
  msgstr ""
342
 
343
- #: include/class-bulk-delete-posts.php:92
344
- #: include/class-bulk-delete-posts.php:227
345
- #: include/class-bulk-delete-posts.php:349
346
- #: include/class-bulk-delete-posts.php:528
347
- #: include/class-bulk-delete-posts.php:666
348
- #: include/class-bulk-delete-posts.php:793
349
- #: tmp_addon/bulk-delete-by-custom-field.php:179
350
- #: tmp_addon/bulk-delete-by-title.php:95
351
- msgid "older than"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
  msgstr ""
353
 
 
354
  #: include/class-bulk-delete-posts.php:93
355
- #: include/class-bulk-delete-posts.php:228
356
- #: include/class-bulk-delete-posts.php:350
357
- #: include/class-bulk-delete-posts.php:529
358
- #: include/class-bulk-delete-posts.php:667
359
- #: include/class-bulk-delete-posts.php:794
360
- #: tmp_addon/bulk-delete-by-custom-field.php:180
361
- #: tmp_addon/bulk-delete-by-title.php:96
 
 
 
 
 
 
 
 
 
 
362
  msgid "posted within last"
363
  msgstr ""
364
 
365
- #: include/class-bulk-delete-posts.php:95
366
- #: include/class-bulk-delete-posts.php:230
367
- #: include/class-bulk-delete-posts.php:352
368
- #: include/class-bulk-delete-posts.php:531
369
- #: include/class-bulk-delete-posts.php:669
370
- #: include/class-bulk-delete-posts.php:796
371
- #: include/class-bulk-delete-users.php:59
372
- #: tmp_addon/bulk-delete-by-custom-field.php:182
373
- #: tmp_addon/bulk-delete-by-title.php:98
374
  msgid "days"
375
  msgstr ""
376
 
377
- #: include/class-bulk-delete-posts.php:101
378
- #: include/class-bulk-delete-posts.php:236
379
- #: include/class-bulk-delete-posts.php:358
380
- #: include/class-bulk-delete-posts.php:537
381
- #: include/class-bulk-delete-posts.php:675
382
- #: include/class-bulk-delete-posts.php:802
383
- #: include/class-bulk-delete-posts.php:877
384
- #: tmp_addon/bulk-delete-by-custom-field.php:188
385
- #: tmp_addon/bulk-delete-by-title.php:104
 
386
  msgid "Move to Trash"
387
  msgstr ""
388
 
389
- #: include/class-bulk-delete-posts.php:102
390
- #: include/class-bulk-delete-posts.php:237
391
- #: include/class-bulk-delete-posts.php:359
392
- #: include/class-bulk-delete-posts.php:538
393
- #: include/class-bulk-delete-posts.php:676
394
- #: include/class-bulk-delete-posts.php:803
395
- #: include/class-bulk-delete-posts.php:878
396
- #: tmp_addon/bulk-delete-by-custom-field.php:189
397
- #: tmp_addon/bulk-delete-by-title.php:105
 
398
  msgid "Delete permanently"
399
  msgstr ""
400
 
401
- #: include/class-bulk-delete-posts.php:109
402
- #: include/class-bulk-delete-posts.php:253
403
- #: include/class-bulk-delete-posts.php:375
404
- #: include/class-bulk-delete-posts.php:554
405
- #: include/class-bulk-delete-posts.php:685
406
- #: include/class-bulk-delete-posts.php:810
407
- #: tmp_addon/bulk-delete-by-custom-field.php:205
408
- #: tmp_addon/bulk-delete-by-title.php:121
409
  msgid "Only delete first "
410
  msgstr ""
411
 
412
- #: include/class-bulk-delete-posts.php:110
413
- #: include/class-bulk-delete-posts.php:254
414
- #: include/class-bulk-delete-posts.php:376
415
- #: include/class-bulk-delete-posts.php:555
416
- #: include/class-bulk-delete-posts.php:686
417
- #: include/class-bulk-delete-posts.php:811
418
- #: tmp_addon/bulk-delete-by-custom-field.php:206
419
- #: tmp_addon/bulk-delete-by-title.php:122
420
  msgid "posts."
421
  msgstr ""
422
 
423
- #: include/class-bulk-delete-posts.php:111
424
- #: include/class-bulk-delete-posts.php:255
425
- #: include/class-bulk-delete-posts.php:377
426
- #: include/class-bulk-delete-posts.php:556
427
- #: include/class-bulk-delete-posts.php:687
428
- #: include/class-bulk-delete-posts.php:812
429
- #: tmp_addon/bulk-delete-by-custom-field.php:207
430
- #: tmp_addon/bulk-delete-by-title.php:123
431
- msgid "Use this option if there are more than 1000 posts and the script timesout."
432
- msgstr ""
433
-
434
- #: include/class-bulk-delete-posts.php:117
435
- #: include/class-bulk-delete-posts.php:261
436
- #: include/class-bulk-delete-posts.php:383
437
- #: include/class-bulk-delete-posts.php:562
438
- #: include/class-bulk-delete-posts.php:693
439
- #: include/class-bulk-delete-posts.php:818
440
- #: include/class-bulk-delete-users.php:83
441
- #: tmp_addon/bulk-delete-by-custom-field.php:213
442
- #: tmp_addon/bulk-delete-by-title.php:129
443
- msgid "Delete now"
444
  msgstr ""
445
 
 
446
  #: include/class-bulk-delete-posts.php:118
447
- #: include/class-bulk-delete-posts.php:262
448
- #: include/class-bulk-delete-posts.php:384
449
- #: include/class-bulk-delete-posts.php:563
450
- #: include/class-bulk-delete-posts.php:694
451
- #: include/class-bulk-delete-posts.php:819
452
- #: include/class-bulk-delete-users.php:84 include/class-cron-list-table.php:124
453
- #: tmp_addon/bulk-delete-by-custom-field.php:214
454
- #: tmp_addon/bulk-delete-by-title.php:130
455
- msgid "Schedule"
456
  msgstr ""
457
 
 
458
  #: include/class-bulk-delete-posts.php:119
459
- #: include/class-bulk-delete-posts.php:263
460
- #: include/class-bulk-delete-posts.php:385
461
- #: include/class-bulk-delete-posts.php:564
462
- #: include/class-bulk-delete-posts.php:695
463
- #: include/class-bulk-delete-posts.php:820
464
- #: include/class-bulk-delete-users.php:85
465
- #: tmp_addon/bulk-delete-by-custom-field.php:215
466
- #: tmp_addon/bulk-delete-by-title.php:131
 
 
 
 
 
 
 
 
 
 
 
 
 
467
  msgid "repeat "
468
  msgstr ""
469
 
470
- #: include/class-bulk-delete-posts.php:121
471
- #: include/class-bulk-delete-posts.php:265
472
- #: include/class-bulk-delete-posts.php:387
473
- #: include/class-bulk-delete-posts.php:566
474
- #: include/class-bulk-delete-posts.php:697
475
- #: include/class-bulk-delete-posts.php:822
476
- #: include/class-bulk-delete-users.php:87
477
- #: tmp_addon/bulk-delete-by-custom-field.php:217
478
- #: tmp_addon/bulk-delete-by-title.php:133
 
479
  msgid "Don't repeat"
480
  msgstr ""
481
 
482
- #: include/class-bulk-delete-posts.php:131
483
- #: include/class-bulk-delete-posts.php:275
484
- #: include/class-bulk-delete-posts.php:397
485
- #: include/class-bulk-delete-posts.php:576
486
- #: include/class-bulk-delete-posts.php:707
487
- #: include/class-bulk-delete-posts.php:832
488
- #: include/class-bulk-delete-users.php:97
489
- #: tmp_addon/bulk-delete-by-custom-field.php:227
490
- #: tmp_addon/bulk-delete-by-title.php:143
 
491
  msgid "Only available in Pro Addon"
492
  msgstr ""
493
 
494
- #: include/class-bulk-delete-posts.php:138
495
- #: include/class-bulk-delete-posts.php:289
496
- #: include/class-bulk-delete-posts.php:404
497
- #: include/class-bulk-delete-posts.php:583
498
- #: include/class-bulk-delete-posts.php:714
499
- #: include/class-bulk-delete-posts.php:839
500
- #: include/class-bulk-delete-posts.php:886
501
- #: include/class-bulk-delete-posts.php:922
502
- #: include/class-bulk-delete-users.php:111
503
- #: tmp_addon/bulk-delete-by-custom-field.php:241
504
- #: tmp_addon/bulk-delete-by-title.php:157
 
505
  msgid "Bulk Delete "
506
  msgstr ""
507
 
508
- #: include/class-bulk-delete-posts.php:161
509
- msgid "Select the post type whose category posts you want to delete"
510
  msgstr ""
511
 
512
- #: include/class-bulk-delete-posts.php:180
513
- msgid "Select the categories whose post you want to delete"
 
 
 
 
 
 
 
 
 
514
  msgstr ""
515
 
516
- #: include/class-bulk-delete-posts.php:181
517
- msgid "Note: The post count below for each category is the total number of posts in that category, irrespective of post type"
518
- msgstr ""
 
 
519
 
520
- #: include/class-bulk-delete-posts.php:208
521
- msgid "All Categories"
 
522
  msgstr ""
523
 
524
- #: include/class-bulk-delete-posts.php:243
525
- #: include/class-bulk-delete-posts.php:365
526
- #: include/class-bulk-delete-posts.php:544
527
- #: tmp_addon/bulk-delete-by-custom-field.php:195
528
- #: tmp_addon/bulk-delete-by-title.php:111
529
- msgid "Public posts"
530
  msgstr ""
531
 
532
- #: include/class-bulk-delete-posts.php:244
533
- #: include/class-bulk-delete-posts.php:366
534
- #: include/class-bulk-delete-posts.php:545
535
- #: tmp_addon/bulk-delete-by-custom-field.php:196
536
- #: tmp_addon/bulk-delete-by-title.php:112
537
- msgid "Private Posts"
 
 
 
538
  msgstr ""
539
 
540
- #: include/class-bulk-delete-posts.php:281
541
- #: include/class-bulk-delete-users.php:103
542
- #: tmp_addon/bulk-delete-by-custom-field.php:233
543
- #: tmp_addon/bulk-delete-by-title.php:149
544
- msgid "Enter time in Y-m-d H:i:s format or enter now to use current time"
545
  msgstr ""
546
 
547
- #: include/class-bulk-delete-posts.php:308
548
- msgid "Select the tags whose post you want to delete"
549
  msgstr ""
550
 
551
- #: include/class-bulk-delete-posts.php:332
552
- msgid "All Tags"
553
  msgstr ""
554
 
555
- #: include/class-bulk-delete-posts.php:410
556
- msgid "You don't have any posts assigned to tags in this blog."
557
  msgstr ""
558
 
559
- #: include/class-bulk-delete-posts.php:451
560
- msgid "Select the post type whose taxonomy posts you want to delete"
561
  msgstr ""
562
 
563
- #: include/class-bulk-delete-posts.php:471
564
- msgid "Select the taxonomies whose post you want to delete"
565
  msgstr ""
566
 
567
- #: include/class-bulk-delete-posts.php:490
568
- msgid "The selected taxonomy has the following terms. Select the terms whose post you want to delete"
569
  msgstr ""
570
 
571
- #: include/class-bulk-delete-posts.php:491
572
- msgid "Note: The post count below for each term is the total number of posts in that term, irrespective of post type"
 
 
 
 
 
 
573
  msgstr ""
574
 
575
- #: include/class-bulk-delete-posts.php:589
576
- msgid "You don't have any posts assigned to custom taxonomies in this blog."
577
  msgstr ""
578
 
579
- #: include/class-bulk-delete-posts.php:635
580
- msgid "Select the custom post type whose post you want to delete"
581
- msgstr ""
 
 
582
 
583
- #: include/class-bulk-delete-posts.php:720
584
- msgid "You don't have any posts assigned to custom post types in this blog."
585
  msgstr ""
586
 
587
- #: include/class-bulk-delete-posts.php:743
588
- msgid "Select the pages which you want to delete"
589
  msgstr ""
590
 
591
- #: include/class-bulk-delete-posts.php:750
592
- msgid "All Published Pages"
 
 
593
  msgstr ""
594
 
595
- #: include/class-bulk-delete-posts.php:750
596
- #: include/class-bulk-delete-posts.php:757
597
- #: include/class-bulk-delete-posts.php:764
598
- #: include/class-bulk-delete-posts.php:771
599
- #: include/class-bulk-delete-posts.php:778
600
- msgid "Pages"
601
  msgstr ""
602
 
603
- #: include/class-bulk-delete-posts.php:757
604
- msgid "All Draft Pages"
 
 
 
 
605
  msgstr ""
606
 
607
- #: include/class-bulk-delete-posts.php:764
608
- msgid "All Scheduled Pages"
 
 
 
 
609
  msgstr ""
610
 
611
- #: include/class-bulk-delete-posts.php:771
612
- msgid "All Pending Pages"
 
 
 
 
613
  msgstr ""
614
 
615
- #: include/class-bulk-delete-posts.php:778
616
- msgid "All Private Pages"
617
  msgstr ""
618
 
619
- #: include/class-bulk-delete-posts.php:791
620
- msgid "Only restrict to pages which are "
621
- msgstr ""
 
 
622
 
623
- #: include/class-bulk-delete-posts.php:857
624
- msgid "Delete these specific pages"
625
  msgstr ""
626
 
627
- #: include/class-bulk-delete-posts.php:863
628
- msgid "Enter one post url (not post ids) per line"
629
  msgstr ""
630
 
631
- #: include/class-bulk-delete-posts.php:914
632
- msgid "All Revisions"
633
  msgstr ""
634
 
635
- #: include/class-bulk-delete-posts.php:914
636
- msgid "Revisions"
637
  msgstr ""
638
 
639
- #: include/class-bulk-delete-posts.php:943
640
- msgid "You need \"Bulk Delete by Custom Field\" Addon, to delete post by custom field."
641
- msgstr ""
 
 
642
 
643
- #: include/class-bulk-delete-posts.php:973
644
- msgid "You need \"Bulk Delete by Title\" Addon, to delete post by title."
645
  msgstr ""
646
 
647
- #: include/class-bulk-delete-posts.php:991
648
- msgid "If you are seeing a blank page after clicking the Bulk Delete button, then "
649
  msgstr ""
650
 
651
- #: include/class-bulk-delete-posts.php:991
652
- msgid "check out this FAQ"
 
 
653
  msgstr ""
654
 
655
- #: include/class-bulk-delete-posts.php:992
656
- msgid "You also need need the following debug information."
 
 
657
  msgstr ""
658
 
659
- #: include/class-bulk-delete-posts.php:996
660
- msgid "PHP Version "
661
  msgstr ""
662
 
663
- #: include/class-bulk-delete-posts.php:1000
664
- msgid "Plugin Version "
665
  msgstr ""
666
 
667
- #: include/class-bulk-delete-posts.php:1004
668
- msgid "Available memory size "
669
- msgstr ""
 
 
670
 
671
- #: include/class-bulk-delete-posts.php:1008
672
- msgid "Script time out "
673
  msgstr ""
674
 
675
- #: include/class-bulk-delete-posts.php:1012
676
- msgid "Script input time "
677
  msgstr ""
678
 
679
- #: include/class-bulk-delete-users.php:21
680
- msgid "Select the user roles from which you want to delete users"
681
  msgstr ""
682
 
683
- #: include/class-bulk-delete-users.php:34
684
- msgid "Users"
685
- msgstr ""
 
 
686
 
687
- #: include/class-bulk-delete-users.php:58
688
- msgid "Only restrict to users who have not logged in the last "
689
  msgstr ""
690
 
691
- #: include/class-bulk-delete-users.php:64
692
- msgid "Need Simple Login Log Plugin"
693
  msgstr ""
694
 
695
- #: include/class-bulk-delete-users.php:77
696
- msgid "Only if user doesn't have any post"
 
 
 
 
 
 
697
  msgstr ""
698
 
699
- #: include/class-bulk-delete-util.php:84
700
- msgctxt "Cron table date format"
701
- msgid "M j, Y @ G:i"
702
  msgstr ""
703
 
704
- #: include/class-cron-list-table.php:31
705
- msgid "This is the list of jobs that are currently scheduled for auto deleting posts in Bulk Delete Plugin."
 
 
 
 
 
 
 
 
706
  msgstr ""
707
 
708
- #: include/class-cron-list-table.php:39
709
- msgid "Note: "
710
  msgstr ""
711
 
712
- #: include/class-cron-list-table.php:41
713
- msgid "Scheduling auto post or user deletion is available only when you buy pro addons."
 
 
714
  msgstr ""
715
 
716
- #: include/class-cron-list-table.php:45
717
- msgid "The following are the list of pro addons that are currently available for purchase."
718
  msgstr ""
719
 
720
- #: include/class-cron-list-table.php:51
721
- msgid "Delete posts by custom field"
722
  msgstr ""
723
 
724
- #: include/class-cron-list-table.php:52
725
- msgid "Adds the ability to delete posts based on custom fields"
 
 
726
  msgstr ""
727
 
728
- #: include/class-cron-list-table.php:53 include/class-cron-list-table.php:60
729
- #: include/class-cron-list-table.php:67 include/class-cron-list-table.php:74
730
- #: include/class-cron-list-table.php:81 include/class-cron-list-table.php:88
731
- #: include/class-cron-list-table.php:95 include/class-cron-list-table.php:102
732
- #: include/class-cron-list-table.php:109
733
- msgid "More Info"
734
  msgstr ""
735
 
736
- #: include/class-cron-list-table.php:54 include/class-cron-list-table.php:61
737
- #: include/class-cron-list-table.php:68 include/class-cron-list-table.php:75
738
- #: include/class-cron-list-table.php:82 include/class-cron-list-table.php:89
739
- #: include/class-cron-list-table.php:96 include/class-cron-list-table.php:103
740
- #: include/class-cron-list-table.php:110
741
- msgid "Buy now"
742
  msgstr ""
743
 
744
- #: include/class-cron-list-table.php:58
745
- msgid "Delete posts by title"
746
  msgstr ""
747
 
748
- #: include/class-cron-list-table.php:59
749
- msgid "Adds the ability to delete posts based on title"
750
  msgstr ""
751
 
752
- #: include/class-cron-list-table.php:65
753
- msgid "Schedule auto delete of Posts by Categories"
754
  msgstr ""
755
 
756
- #: include/class-cron-list-table.php:66
757
- msgid "Adds the ability to schedule auto delete of posts based on categories"
758
  msgstr ""
759
 
760
- #: include/class-cron-list-table.php:72
761
- msgid "Schedule auto delete of Posts by Tags"
 
 
 
 
 
 
 
762
  msgstr ""
763
 
764
- #: include/class-cron-list-table.php:73
765
- msgid "Adds the ability to schedule auto delete of posts based on tags"
 
 
766
  msgstr ""
767
 
768
- #: include/class-cron-list-table.php:79
769
- msgid "Schedule auto delete of posts by Custom Taxonomy"
770
  msgstr ""
771
 
772
- #: include/class-cron-list-table.php:80
773
- msgid "Adds the ability to schedule auto delete of posts based on custom taxonomies"
 
 
774
  msgstr ""
775
 
776
- #: include/class-cron-list-table.php:86
777
- msgid "Schedule auto delete of Posts by Custom Post Type"
778
  msgstr ""
779
 
780
- #: include/class-cron-list-table.php:87
781
- msgid "Adds the ability to schedule auto delete of posts based on custom post types"
782
  msgstr ""
783
 
784
- #: include/class-cron-list-table.php:93
785
- msgid "Schedule auto delete of Pages"
786
  msgstr ""
787
 
788
- #: include/class-cron-list-table.php:94
789
- msgid "Adds the ability to schedule auto delete pages"
 
790
  msgstr ""
791
 
792
- #: include/class-cron-list-table.php:100
793
- msgid "Schedule auto delete of Posts by Post Status"
794
  msgstr ""
795
 
796
- #: include/class-cron-list-table.php:101
797
- msgid "Adds the ability to schedule auto delete of posts based on post status like drafts, pending posts, scheduled posts etc."
 
 
798
  msgstr ""
799
 
800
- #: include/class-cron-list-table.php:107
801
- msgid "Schedule auto delete of Users by User Role"
802
  msgstr ""
803
 
804
- #: include/class-cron-list-table.php:108
805
- msgid "Adds the ability to schedule auto delete of users based on user role"
806
  msgstr ""
807
 
808
- #: include/class-cron-list-table.php:123
809
- msgid "Next Due (GMT/UTC)"
810
  msgstr ""
811
 
812
- #: include/class-cron-list-table.php:125
813
- msgid "Type"
814
  msgstr ""
815
 
816
- #: include/class-cron-list-table.php:126
817
- msgid "Options"
818
  msgstr ""
819
 
820
- #: include/class-cron-list-table.php:180
821
- msgid "Delete"
822
  msgstr ""
823
 
824
- #: include/class-cron-list-table.php:206
825
- msgid "You have not scheduled any bulk delete jobs."
826
  msgstr ""
827
 
828
- #: tmp_addon/bulk-delete-by-custom-field.php:112
829
  msgid "Select the post type whose posts you want to delete"
830
  msgstr ""
831
 
832
- #: tmp_addon/bulk-delete-by-custom-field.php:130
833
  msgid "Choose your custom field settings"
834
  msgstr ""
835
 
836
- #: tmp_addon/bulk-delete-by-custom-field.php:134
837
  msgid "Key "
838
  msgstr ""
839
 
840
- #: tmp_addon/bulk-delete-by-custom-field.php:137
841
  msgid "equal to (string)"
842
  msgstr ""
843
 
844
- #: tmp_addon/bulk-delete-by-custom-field.php:138
845
  msgid "not equal to (string)"
846
  msgstr ""
847
 
848
- #: tmp_addon/bulk-delete-by-custom-field.php:139
849
  msgid "equal to (date)"
850
  msgstr ""
851
 
852
- #: tmp_addon/bulk-delete-by-custom-field.php:140
853
  msgid "not equal to (date)"
854
  msgstr ""
855
 
856
- #: tmp_addon/bulk-delete-by-custom-field.php:141
857
  msgid "less than (date)"
858
  msgstr ""
859
 
860
- #: tmp_addon/bulk-delete-by-custom-field.php:142
861
  msgid "greater than (date)"
862
  msgstr ""
863
 
864
- #: tmp_addon/bulk-delete-by-custom-field.php:143
865
  msgid "less than (number)"
866
  msgstr ""
867
 
868
- #: tmp_addon/bulk-delete-by-custom-field.php:144
869
  msgid "greater than (number)"
870
  msgstr ""
871
 
872
- #: tmp_addon/bulk-delete-by-custom-field.php:146
873
  msgid "Value "
874
  msgstr ""
875
 
876
- #: tmp_addon/bulk-delete-by-custom-field.php:153
877
  msgid "Enter the Date Format "
878
  msgstr ""
879
 
880
- #: tmp_addon/bulk-delete-by-custom-field.php:155
881
  msgid "Possible Values"
882
  msgstr ""
883
 
884
- #: tmp_addon/bulk-delete-by-custom-field.php:156
885
  msgid "If you leave date format blank, then \"YYYYMMDD\", will be assumed"
886
  msgstr ""
887
 
888
- #: tmp_addon/bulk-delete-by-custom-field.php:162
889
  msgid "If you want to check for null values, then leave the value column blank"
890
  msgstr ""
891
 
892
- #: tmp_addon/bulk-delete-by-custom-field.php:285
893
- msgid "Posts matching the selected custom field setting are scheduled for deletion."
 
894
  msgstr ""
895
 
896
- #: tmp_addon/bulk-delete-by-custom-field.php:290
897
  msgid "Deleted %d post using the selected custom field condition"
898
  msgid_plural "Deleted %d posts using the selected custom field condition"
899
  msgstr[0] ""
900
  msgstr[1] ""
901
 
902
- #: tmp_addon/bulk-delete-by-title.php:63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
903
  msgid "Choose your title settings"
904
  msgstr ""
905
 
906
- #: tmp_addon/bulk-delete-by-title.php:69
907
  msgid "Title"
908
  msgstr ""
909
 
910
- #: tmp_addon/bulk-delete-by-title.php:71
911
  msgid "equal to"
912
  msgstr ""
913
 
914
- #: tmp_addon/bulk-delete-by-title.php:72
915
  msgid "not equal to"
916
  msgstr ""
917
 
918
- #: tmp_addon/bulk-delete-by-title.php:73
919
  msgid "contains"
920
  msgstr ""
921
 
922
- #: tmp_addon/bulk-delete-by-title.php:74
923
  msgid "doesn't contains"
924
  msgstr ""
925
 
926
- #: tmp_addon/bulk-delete-by-title.php:75
927
  msgid "starts with"
928
  msgstr ""
929
 
930
- #: tmp_addon/bulk-delete-by-title.php:76
931
  msgid "ends with"
932
  msgstr ""
933
- #. Plugin Name of the plugin/theme
934
- msgid "Bulk Delete"
 
935
  msgstr ""
936
 
937
  #. Plugin URI of the plugin/theme
938
- msgid "http://sudarmuthu.com/wordpress/bulk-delete"
939
  msgstr ""
940
 
941
  #. Description of the plugin/theme
942
- msgid "Bulk delete users and posts from selected categories, tags, post types, custom taxonomies or by post status like drafts, scheduled posts, revisions etc."
 
 
 
943
  msgstr ""
944
 
945
  #. Author of the plugin/theme
2
  # This file is distributed under the same license as the Bulk Delete package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Bulk Delete 5.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/bulk-delete\n"
7
+ "POT-Creation-Date: 2014-06-10 15:05:38+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.php:158 bulk-delete.php:170
16
+ msgid "Cheatin&#8217; huh?"
17
+ msgstr ""
18
+
19
+ #. #-#-#-#-# bulk-delete.pot (Bulk Delete 5.0) #-#-#-#-#
20
+ #. Plugin Name of the plugin/theme
21
+ #: bulk-delete.php:238
22
  msgid "Bulk Delete"
23
  msgstr ""
24
 
25
+ #: bulk-delete.php:240 bulk-delete.php:455 include/admin-ui.php:54
26
  msgid "Bulk Delete Posts"
27
  msgstr ""
28
 
29
+ #: bulk-delete.php:241 bulk-delete.php:508
30
+ msgid "Bulk Delete Pages"
31
+ msgstr ""
32
+
33
+ #: bulk-delete.php:242 bulk-delete.php:559 include/admin-ui.php:51
34
  msgid "Bulk Delete Users"
35
  msgstr ""
36
 
37
+ #: bulk-delete.php:243 bulk-delete.php:622
38
  msgid "Bulk Delete Schedules"
39
  msgstr ""
40
 
41
+ #: bulk-delete.php:243
42
+ msgid "Schedules"
43
+ msgstr ""
44
+
45
+ #: bulk-delete.php:244 include/class-bd-license.php:30
46
+ msgid "Addon Licenses"
47
+ msgstr ""
48
+
49
+ #: bulk-delete.php:245
50
+ msgid "Bulk Delete System Info"
51
+ msgstr ""
52
+
53
+ #: bulk-delete.php:245
54
+ msgid "System Info"
55
+ msgstr ""
56
+
57
+ #: bulk-delete.php:280 bulk-delete.php:337 bulk-delete.php:385
58
  msgid "About Plugin"
59
  msgstr ""
60
 
61
+ #: bulk-delete.php:282 bulk-delete.php:339 bulk-delete.php:387
62
+ msgid ""
63
+ "This plugin allows you to delete posts in bulk from selected categories, "
64
+ "tags, custom taxonomies or by post status like drafts, pending posts, "
65
+ "scheduled posts etc."
66
  msgstr ""
67
 
68
+ #: bulk-delete.php:289 bulk-delete.php:346 bulk-delete.php:394
69
  msgid "More information"
70
  msgstr ""
71
 
72
+ #: bulk-delete.php:290 bulk-delete.php:347 bulk-delete.php:395
73
  msgid "Plugin Homepage/support"
74
  msgstr ""
75
 
76
+ #: bulk-delete.php:291 bulk-delete.php:348 bulk-delete.php:396
77
  msgid "Buy pro addons"
78
  msgstr ""
79
 
80
+ #: bulk-delete.php:292 bulk-delete.php:349 bulk-delete.php:397
81
  msgid "Plugin author's blog"
82
  msgstr ""
83
 
84
+ #: bulk-delete.php:293 bulk-delete.php:350 bulk-delete.php:398
85
  msgid "Other Plugin's by Author"
86
  msgstr ""
87
 
88
+ #: bulk-delete.php:308
89
  msgid "By Post Status"
90
  msgstr ""
91
 
92
+ #: bulk-delete.php:309
93
  msgid "By Category"
94
  msgstr ""
95
 
96
+ #: bulk-delete.php:310
97
  msgid "By Tag"
98
  msgstr ""
99
 
100
+ #: bulk-delete.php:311
101
  msgid "By Custom Taxonomy"
102
  msgstr ""
103
 
104
+ #: bulk-delete.php:312
105
  msgid "By Custom Post Types"
106
  msgstr ""
107
 
108
+ #: bulk-delete.php:313
 
 
 
 
109
  msgid "By URL"
110
  msgstr ""
111
 
112
+ #: bulk-delete.php:314
113
  msgid "By Post Revision"
114
  msgstr ""
115
 
116
+ #: bulk-delete.php:315
117
  msgid "By Custom Field"
118
  msgstr ""
119
 
120
+ #: bulk-delete.php:316
121
  msgid "By Title"
122
  msgstr ""
123
 
124
+ #: bulk-delete.php:317
125
+ msgid "By Duplicate Title"
126
+ msgstr ""
127
+
128
+ #: bulk-delete.php:367
129
+ msgid "By Page status"
130
  msgstr ""
131
 
132
+ #: bulk-delete.php:413
133
  msgid "By User Role"
134
  msgstr ""
135
 
136
+ #: bulk-delete.php:434
137
  msgid "Are you sure you want to delete all the selected posts"
138
  msgstr ""
139
 
140
+ #: bulk-delete.php:435
141
  msgid "Are you sure you want to delete all the selected users"
142
  msgstr ""
143
 
144
+ #: bulk-delete.php:439
145
  msgid "Please select posts from at least one option"
146
  msgstr ""
147
 
148
+ #: bulk-delete.php:440
149
  msgid "Please enter at least one page url"
150
  msgstr ""
151
 
152
+ #: bulk-delete.php:441
153
  msgid "Please enter some value for custom field key"
154
  msgstr ""
155
 
156
+ #: bulk-delete.php:442
157
  msgid "Please enter some value for title"
158
  msgstr ""
159
 
160
+ #: bulk-delete.php:472
161
+ msgid "WARNING: Posts deleted once cannot be retrieved back. Use with caution."
162
+ msgstr ""
163
+
164
+ #: bulk-delete.php:525
165
+ msgid "WARNING: Pages deleted once cannot be retrieved back. Use with caution."
166
+ msgstr ""
167
+
168
+ #: bulk-delete.php:576
169
+ msgid "WARNING: Users deleted once cannot be retrieved back. Use with caution."
170
+ msgstr ""
171
+
172
+ #: include/admin-ui.php:19
173
+ msgid ""
174
+ "Thank you for using <a href = \"%1$s\">Bulk Delete</a> plugin! Kindly <a "
175
+ "href = \"%2$s\">rate us</a> at <a href = \"%2$s\">WordPress.org</a>"
176
+ msgstr ""
177
+
178
+ #: include/admin-ui.php:76
179
  msgid "Buy Addons"
180
  msgstr ""
181
 
182
+ #: include/class-bd-license-handler.php:135
183
+ msgid "Addon License Key"
184
  msgstr ""
185
 
186
+ #: include/class-bd-license-handler.php:157
187
+ msgid "Enter license key"
188
  msgstr ""
189
 
190
+ #: include/class-bd-license.php:63
191
+ msgid "Activate License"
192
  msgstr ""
193
 
194
+ #: include/class-bd-license.php:194
195
+ msgid "The license key for \"%s\" addon was successfully deactivated"
196
  msgstr ""
197
 
198
+ #: include/class-bd-license.php:199
199
+ msgid ""
200
+ "There was some problem while trying to deactivate license key for \"%s\" "
201
+ "addon. Kindly try again"
202
  msgstr ""
203
 
204
+ #: include/class-bd-license.php:225
205
+ msgid "The license key was successfully deleted"
206
  msgstr ""
207
 
208
+ #: include/class-bd-license.php:270
209
+ msgid ""
210
+ "There was some problem in contacting our store to activate the license key "
211
+ "for \"%s\" addon"
212
  msgstr ""
213
 
214
+ #: include/class-bd-license.php:280
215
+ msgid ""
216
+ "The license key for \"%s\" addon was successfully activated. The addon will "
217
+ "get updates automatically till the license key is valid."
 
218
  msgstr ""
219
 
220
+ #: include/class-bd-license.php:288
221
+ msgid ""
222
+ "The license key for \"%s\" addon doesn't have any more activations left. "
223
+ "Kindly buy a new license."
224
+ msgstr ""
225
 
226
+ #: include/class-bd-license.php:292
227
+ msgid "The license key for \"%s\" addon is revoked. Kindly buy a new license."
228
  msgstr ""
229
 
230
+ #: include/class-bd-license.php:296
231
+ msgid "The license key for \"%s\" addon has expired. Kindly buy a new license."
232
+ msgstr ""
 
 
233
 
234
+ #: include/class-bd-license.php:300
235
+ msgid "The license key for \"%s\" addon is invalid"
236
  msgstr ""
237
 
238
+ #: include/class-bd-license.php:362
239
+ msgid ""
240
+ "The following are the list of pro addons that are currently available for "
241
+ "purchase."
242
+ msgstr ""
243
 
244
+ #: include/class-bd-license.php:368
245
+ msgid "Delete posts by custom field"
246
  msgstr ""
247
 
248
+ #: include/class-bd-license.php:369
249
+ msgid "Adds the ability to delete posts based on custom fields"
250
+ msgstr ""
 
 
251
 
252
+ #: include/class-bd-license.php:370 include/class-bd-license.php:376
253
+ #: include/class-bd-license.php:382 include/class-bd-license.php:388
254
+ #: include/class-bd-license.php:394 include/class-bd-license.php:400
255
+ #: include/class-bd-license.php:406 include/class-bd-license.php:412
256
+ #: include/class-bd-license.php:418 include/class-bd-license.php:424
257
+ msgid "More Info"
258
  msgstr ""
259
 
260
+ #: include/class-bd-license.php:374
261
+ msgid "Delete posts by duplicate title"
262
+ msgstr ""
 
 
263
 
264
+ #: include/class-bd-license.php:375
265
+ msgid "Adds the ability to delete posts based on duplicate title"
266
  msgstr ""
267
 
268
+ #: include/class-bd-license.php:380
269
+ msgid "Delete posts by title"
270
+ msgstr ""
 
 
271
 
272
+ #: include/class-bd-license.php:381
273
+ msgid "Adds the ability to delete posts based on title"
274
  msgstr ""
275
 
276
+ #: include/class-bd-license.php:386
277
+ msgid "Scheduler for deleting Posts by Category"
278
+ msgstr ""
 
 
279
 
280
+ #: include/class-bd-license.php:387
281
+ msgid "Adds the ability to schedule auto delete of posts based on category"
282
+ msgstr ""
 
 
283
 
284
+ #: include/class-bd-license.php:392
285
+ msgid "Scheduler for deleting Posts by Tag"
286
+ msgstr ""
 
 
287
 
288
+ #: include/class-bd-license.php:393
289
+ msgid "Adds the ability to schedule auto delete of posts based on tag"
290
  msgstr ""
291
 
292
+ #: include/class-bd-license.php:398
293
+ msgid "Scheduler for deleting Posts by Custom Taxonomy"
294
+ msgstr ""
 
 
295
 
296
+ #: include/class-bd-license.php:399
297
+ msgid ""
298
+ "Adds the ability to schedule auto delete of posts based on custom taxonomy"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  msgstr ""
300
 
301
+ #: include/class-bd-license.php:404
302
+ msgid "Scheduler for deleting Posts by Custom Post Type"
303
  msgstr ""
304
 
305
+ #: include/class-bd-license.php:405
306
+ msgid ""
307
+ "Adds the ability to schedule auto delete of posts based on custom post type"
 
 
 
 
 
 
308
  msgstr ""
309
 
310
+ #: include/class-bd-license.php:410
311
+ msgid "Scheduler for deleting Posts by Post Status"
312
  msgstr ""
313
 
314
+ #: include/class-bd-license.php:411
315
+ msgid ""
316
+ "Adds the ability to schedule auto delete of posts based on post status like "
317
+ "drafts, pending posts, scheduled posts etc."
318
  msgstr ""
319
 
320
+ #: include/class-bd-license.php:416
321
+ msgid "Scheduler for deleting Pages by Status"
322
  msgstr ""
323
 
324
+ #: include/class-bd-license.php:417
325
+ msgid "Adds the ability to schedule auto delete pages based on status"
326
  msgstr ""
327
 
328
+ #: include/class-bd-license.php:422
329
+ msgid "Scheduler for deleting Users by User Role"
330
  msgstr ""
331
 
332
+ #: include/class-bd-license.php:423
333
+ msgid "Adds the ability to schedule auto delete of users based on user role"
334
+ msgstr ""
335
+
336
+ #: include/class-bd-settings.php:28
337
+ msgid "Add Addon License"
338
  msgstr ""
339
 
340
+ #: include/class-bulk-delete-pages.php:22
341
+ #: include/class-bulk-delete-posts.php:17
342
+ #: include/class-bulk-delete-posts.php:302
343
+ #: include/class-bulk-delete-posts.php:566
 
344
  #: include/class-bulk-delete-posts.php:784
345
+ #: include/class-bulk-delete-posts.php:1085
346
+ #: include/class-bulk-delete-posts.php:1360
347
+ #: include/class-bulk-delete-posts.php:1445
348
+ #: include/class-bulk-delete-posts.php:1526
349
+ #: include/class-bulk-delete-posts.php:1555
350
+ #: include/class-bulk-delete-posts.php:1585
351
+ #: include/class-bulk-delete-users.php:17
352
+ msgid ""
353
+ "This section just got enabled. Kindly <a href = \"%1$s\">refresh</a> the "
354
+ "page to fully enable it."
355
  msgstr ""
356
 
357
+ #: include/class-bulk-delete-pages.php:34
358
+ msgid "Select the pages which you want to delete"
359
  msgstr ""
360
 
361
+ #: include/class-bulk-delete-pages.php:41
362
+ msgid "All Published Pages"
 
 
 
 
 
 
363
  msgstr ""
364
 
365
+ #: include/class-bulk-delete-pages.php:41
366
+ #: include/class-bulk-delete-pages.php:48
367
+ #: include/class-bulk-delete-pages.php:55
368
+ #: include/class-bulk-delete-pages.php:62
369
+ #: include/class-bulk-delete-pages.php:69
370
+ msgid "Pages"
371
+ msgstr ""
372
+
373
+ #: include/class-bulk-delete-pages.php:48
374
+ msgid "All Draft Pages"
375
+ msgstr ""
376
+
377
+ #: include/class-bulk-delete-pages.php:55
378
+ msgid "All Scheduled Pages"
379
+ msgstr ""
380
+
381
+ #: include/class-bulk-delete-pages.php:62
382
+ msgid "All Pending Pages"
383
+ msgstr ""
384
+
385
+ #: include/class-bulk-delete-pages.php:69
386
+ msgid "All Private Pages"
387
+ msgstr ""
388
+
389
+ #: include/class-bulk-delete-pages.php:75
390
+ #: include/class-bulk-delete-posts.php:78
391
+ #: include/class-bulk-delete-posts.php:369
392
+ #: include/class-bulk-delete-posts.php:603
393
+ #: include/class-bulk-delete-posts.php:880
394
+ #: include/class-bulk-delete-posts.php:1140
395
+ #: include/class-bulk-delete-posts.php:1380
396
+ #: include/class-bulk-delete-users.php:41
397
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:190
398
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:155
399
+ #: tmp_addon/bulk-delete-posts-by-title.php:106
400
+ msgid "Choose your filtering options"
401
+ msgstr ""
402
+
403
+ #: include/class-bulk-delete-pages.php:82
404
+ msgid "Only restrict to pages which are "
405
  msgstr ""
406
 
407
+ #: include/class-bulk-delete-pages.php:84
408
  #: include/class-bulk-delete-posts.php:93
409
+ #: include/class-bulk-delete-posts.php:380
410
+ #: include/class-bulk-delete-posts.php:614
411
+ #: include/class-bulk-delete-posts.php:891
412
+ #: include/class-bulk-delete-posts.php:1151
413
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:201
414
+ #: tmp_addon/bulk-delete-posts-by-title.php:117
415
+ msgid "older than"
416
+ msgstr ""
417
+
418
+ #: include/class-bulk-delete-pages.php:85
419
+ #: include/class-bulk-delete-posts.php:94
420
+ #: include/class-bulk-delete-posts.php:381
421
+ #: include/class-bulk-delete-posts.php:615
422
+ #: include/class-bulk-delete-posts.php:892
423
+ #: include/class-bulk-delete-posts.php:1152
424
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:202
425
+ #: tmp_addon/bulk-delete-posts-by-title.php:118
426
  msgid "posted within last"
427
  msgstr ""
428
 
429
+ #: include/class-bulk-delete-pages.php:87
430
+ #: include/class-bulk-delete-posts.php:96
431
+ #: include/class-bulk-delete-posts.php:383
432
+ #: include/class-bulk-delete-posts.php:617
433
+ #: include/class-bulk-delete-posts.php:894
434
+ #: include/class-bulk-delete-posts.php:1154
435
+ #: include/class-bulk-delete-users.php:56
436
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:204
437
+ #: tmp_addon/bulk-delete-posts-by-title.php:120
438
  msgid "days"
439
  msgstr ""
440
 
441
+ #: include/class-bulk-delete-pages.php:93
442
+ #: include/class-bulk-delete-posts.php:102
443
+ #: include/class-bulk-delete-posts.php:389
444
+ #: include/class-bulk-delete-posts.php:623
445
+ #: include/class-bulk-delete-posts.php:900
446
+ #: include/class-bulk-delete-posts.php:1160
447
+ #: include/class-bulk-delete-posts.php:1386
448
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:210
449
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:161
450
+ #: tmp_addon/bulk-delete-posts-by-title.php:126
451
  msgid "Move to Trash"
452
  msgstr ""
453
 
454
+ #: include/class-bulk-delete-pages.php:94
455
+ #: include/class-bulk-delete-posts.php:103
456
+ #: include/class-bulk-delete-posts.php:390
457
+ #: include/class-bulk-delete-posts.php:624
458
+ #: include/class-bulk-delete-posts.php:901
459
+ #: include/class-bulk-delete-posts.php:1161
460
+ #: include/class-bulk-delete-posts.php:1387
461
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:211
462
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:162
463
+ #: tmp_addon/bulk-delete-posts-by-title.php:127
464
  msgid "Delete permanently"
465
  msgstr ""
466
 
467
+ #: include/class-bulk-delete-pages.php:101
468
+ #: include/class-bulk-delete-posts.php:110
469
+ #: include/class-bulk-delete-posts.php:406
470
+ #: include/class-bulk-delete-posts.php:640
471
+ #: include/class-bulk-delete-posts.php:917
472
+ #: include/class-bulk-delete-posts.php:1170
473
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:227
474
+ #: tmp_addon/bulk-delete-posts-by-title.php:143
475
  msgid "Only delete first "
476
  msgstr ""
477
 
478
+ #: include/class-bulk-delete-pages.php:102
479
+ #: include/class-bulk-delete-posts.php:111
480
+ #: include/class-bulk-delete-posts.php:407
481
+ #: include/class-bulk-delete-posts.php:641
482
+ #: include/class-bulk-delete-posts.php:918
483
+ #: include/class-bulk-delete-posts.php:1171
484
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:228
485
+ #: tmp_addon/bulk-delete-posts-by-title.php:144
486
  msgid "posts."
487
  msgstr ""
488
 
489
+ #: include/class-bulk-delete-pages.php:103
490
+ #: include/class-bulk-delete-posts.php:112
491
+ #: include/class-bulk-delete-posts.php:408
492
+ #: include/class-bulk-delete-posts.php:642
493
+ #: include/class-bulk-delete-posts.php:919
494
+ #: include/class-bulk-delete-posts.php:1172
495
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:229
496
+ #: tmp_addon/bulk-delete-posts-by-title.php:145
497
+ msgid ""
498
+ "Use this option if there are more than 1000 posts and the script timesout."
 
 
 
 
 
 
 
 
 
 
 
499
  msgstr ""
500
 
501
+ #: include/class-bulk-delete-pages.php:109
502
  #: include/class-bulk-delete-posts.php:118
503
+ #: include/class-bulk-delete-posts.php:414
504
+ #: include/class-bulk-delete-posts.php:648
505
+ #: include/class-bulk-delete-posts.php:925
506
+ #: include/class-bulk-delete-posts.php:1178
507
+ #: include/class-bulk-delete-users.php:78
508
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:235
509
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:168
510
+ #: tmp_addon/bulk-delete-posts-by-title.php:151
511
+ msgid "Delete now"
512
  msgstr ""
513
 
514
+ #: include/class-bulk-delete-pages.php:110
515
  #: include/class-bulk-delete-posts.php:119
516
+ #: include/class-bulk-delete-posts.php:415
517
+ #: include/class-bulk-delete-posts.php:649
518
+ #: include/class-bulk-delete-posts.php:926
519
+ #: include/class-bulk-delete-posts.php:1179
520
+ #: include/class-bulk-delete-users.php:79 include/class-cron-list-table.php:56
521
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:236
522
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:169
523
+ #: tmp_addon/bulk-delete-posts-by-title.php:152
524
+ msgid "Schedule"
525
+ msgstr ""
526
+
527
+ #: include/class-bulk-delete-pages.php:111
528
+ #: include/class-bulk-delete-posts.php:120
529
+ #: include/class-bulk-delete-posts.php:416
530
+ #: include/class-bulk-delete-posts.php:650
531
+ #: include/class-bulk-delete-posts.php:927
532
+ #: include/class-bulk-delete-posts.php:1180
533
+ #: include/class-bulk-delete-users.php:80
534
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:237
535
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:170
536
+ #: tmp_addon/bulk-delete-posts-by-title.php:153
537
  msgid "repeat "
538
  msgstr ""
539
 
540
+ #: include/class-bulk-delete-pages.php:113
541
+ #: include/class-bulk-delete-posts.php:122
542
+ #: include/class-bulk-delete-posts.php:418
543
+ #: include/class-bulk-delete-posts.php:652
544
+ #: include/class-bulk-delete-posts.php:929
545
+ #: include/class-bulk-delete-posts.php:1182
546
+ #: include/class-bulk-delete-users.php:82
547
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:239
548
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:172
549
+ #: tmp_addon/bulk-delete-posts-by-title.php:155
550
  msgid "Don't repeat"
551
  msgstr ""
552
 
553
+ #: include/class-bulk-delete-pages.php:123
554
+ #: include/class-bulk-delete-posts.php:132
555
+ #: include/class-bulk-delete-posts.php:428
556
+ #: include/class-bulk-delete-posts.php:662
557
+ #: include/class-bulk-delete-posts.php:939
558
+ #: include/class-bulk-delete-posts.php:1192
559
+ #: include/class-bulk-delete-users.php:92
560
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:249
561
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:182
562
+ #: tmp_addon/bulk-delete-posts-by-title.php:165
563
  msgid "Only available in Pro Addon"
564
  msgstr ""
565
 
566
+ #: include/class-bulk-delete-pages.php:130
567
+ #: include/class-bulk-delete-posts.php:139
568
+ #: include/class-bulk-delete-posts.php:442
569
+ #: include/class-bulk-delete-posts.php:669
570
+ #: include/class-bulk-delete-posts.php:946
571
+ #: include/class-bulk-delete-posts.php:1199
572
+ #: include/class-bulk-delete-posts.php:1395
573
+ #: include/class-bulk-delete-posts.php:1469
574
+ #: include/class-bulk-delete-users.php:106
575
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:263
576
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:196
577
+ #: tmp_addon/bulk-delete-posts-by-title.php:179
578
  msgid "Bulk Delete "
579
  msgstr ""
580
 
581
+ #: include/class-bulk-delete-pages.php:165
582
+ msgid "The selected pages are scheduled for deletion."
583
  msgstr ""
584
 
585
+ #: include/class-bulk-delete-pages.php:166
586
+ #: include/class-bulk-delete-posts.php:177
587
+ #: include/class-bulk-delete-posts.php:478
588
+ #: include/class-bulk-delete-posts.php:708
589
+ #: include/class-bulk-delete-posts.php:987
590
+ #: include/class-bulk-delete-posts.php:1239
591
+ #: include/class-bulk-delete-users.php:139
592
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:305
593
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:241
594
+ #: tmp_addon/bulk-delete-posts-by-title.php:216
595
+ msgid "See the full list of <a href = \"%s\">scheduled tasks</a>"
596
  msgstr ""
597
 
598
+ #: include/class-bulk-delete-pages.php:169
599
+ msgid "Deleted %d page"
600
+ msgid_plural "Deleted %d pages"
601
+ msgstr[0] ""
602
+ msgstr[1] ""
603
 
604
+ #: include/class-bulk-delete-posts.php:30
605
+ #: include/class-bulk-delete-posts.php:1454
606
+ msgid "Select the posts which you want to delete"
607
  msgstr ""
608
 
609
+ #: include/class-bulk-delete-posts.php:37
610
+ msgid "All publish posts"
 
 
 
 
611
  msgstr ""
612
 
613
+ #: include/class-bulk-delete-posts.php:37
614
+ #: include/class-bulk-delete-posts.php:51
615
+ #: include/class-bulk-delete-posts.php:58
616
+ #: include/class-bulk-delete-posts.php:65
617
+ #: include/class-bulk-delete-posts.php:72
618
+ #: include/class-bulk-delete-posts.php:350
619
+ #: include/class-bulk-delete-posts.php:586
620
+ #: include/class-bulk-delete-posts.php:867
621
+ msgid "Posts"
622
  msgstr ""
623
 
624
+ #: include/class-bulk-delete-posts.php:44
625
+ msgid "All Draft Posts"
 
 
 
626
  msgstr ""
627
 
628
+ #: include/class-bulk-delete-posts.php:44
629
+ msgid "Drafts"
630
  msgstr ""
631
 
632
+ #: include/class-bulk-delete-posts.php:51
633
+ msgid "All Pending posts"
634
  msgstr ""
635
 
636
+ #: include/class-bulk-delete-posts.php:58
637
+ msgid "All scheduled posts"
638
  msgstr ""
639
 
640
+ #: include/class-bulk-delete-posts.php:65
641
+ msgid "All private posts"
642
  msgstr ""
643
 
644
+ #: include/class-bulk-delete-posts.php:72
645
+ msgid "All Sticky posts"
646
  msgstr ""
647
 
648
+ #: include/class-bulk-delete-posts.php:84
649
+ msgid "Note: The date filter will not work for sticky posts"
650
  msgstr ""
651
 
652
+ #: include/class-bulk-delete-posts.php:91
653
+ #: include/class-bulk-delete-posts.php:378
654
+ #: include/class-bulk-delete-posts.php:612
655
+ #: include/class-bulk-delete-posts.php:889
656
+ #: include/class-bulk-delete-posts.php:1149
657
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:199
658
+ #: tmp_addon/bulk-delete-posts-by-title.php:115
659
+ msgid "Only restrict to posts which are "
660
  msgstr ""
661
 
662
+ #: include/class-bulk-delete-posts.php:176
663
+ msgid "Posts with the selected status are scheduled for deletion."
664
  msgstr ""
665
 
666
+ #: include/class-bulk-delete-posts.php:180
667
+ msgid "Deleted %d post with the selected post status"
668
+ msgid_plural "Deleted %d posts with the selected post status"
669
+ msgstr[0] ""
670
+ msgstr[1] ""
671
 
672
+ #: include/class-bulk-delete-posts.php:314
673
+ msgid "Select the post type whose category posts you want to delete"
674
  msgstr ""
675
 
676
+ #: include/class-bulk-delete-posts.php:333
677
+ msgid "Select the categories whose post you want to delete"
678
  msgstr ""
679
 
680
+ #: include/class-bulk-delete-posts.php:334
681
+ msgid ""
682
+ "Note: The post count below for each category is the total number of posts in "
683
+ "that category, irrespective of post type"
684
  msgstr ""
685
 
686
+ #: include/class-bulk-delete-posts.php:361
687
+ msgid "All Categories"
 
 
 
 
688
  msgstr ""
689
 
690
+ #: include/class-bulk-delete-posts.php:396
691
+ #: include/class-bulk-delete-posts.php:630
692
+ #: include/class-bulk-delete-posts.php:907
693
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:217
694
+ #: tmp_addon/bulk-delete-posts-by-title.php:133
695
+ msgid "Public posts"
696
  msgstr ""
697
 
698
+ #: include/class-bulk-delete-posts.php:397
699
+ #: include/class-bulk-delete-posts.php:631
700
+ #: include/class-bulk-delete-posts.php:908
701
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:218
702
+ #: tmp_addon/bulk-delete-posts-by-title.php:134
703
+ msgid "Private Posts"
704
  msgstr ""
705
 
706
+ #: include/class-bulk-delete-posts.php:434
707
+ #: include/class-bulk-delete-users.php:98
708
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:255
709
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:188
710
+ #: tmp_addon/bulk-delete-posts-by-title.php:171
711
+ msgid "Enter time in Y-m-d H:i:s format or enter now to use current time"
712
  msgstr ""
713
 
714
+ #: include/class-bulk-delete-posts.php:477
715
+ msgid "Posts from the selected categories are scheduled for deletion."
716
  msgstr ""
717
 
718
+ #: include/class-bulk-delete-posts.php:481
719
+ msgid "Deleted %d post from the selected categories"
720
+ msgid_plural "Deleted %d posts from the selected categories"
721
+ msgstr[0] ""
722
+ msgstr[1] ""
723
 
724
+ #: include/class-bulk-delete-posts.php:573
725
+ msgid "Select the tags whose post you want to delete"
726
  msgstr ""
727
 
728
+ #: include/class-bulk-delete-posts.php:597
729
+ msgid "All Tags"
730
  msgstr ""
731
 
732
+ #: include/class-bulk-delete-posts.php:675
733
+ msgid "You don't have any posts assigned to tags in this blog."
734
  msgstr ""
735
 
736
+ #: include/class-bulk-delete-posts.php:707
737
+ msgid "Posts from the selected tags are scheduled for deletion."
738
  msgstr ""
739
 
740
+ #: include/class-bulk-delete-posts.php:711
741
+ msgid "Deleted %d post from the selected tags"
742
+ msgid_plural "Deleted %d posts from the selected tags"
743
+ msgstr[0] ""
744
+ msgstr[1] ""
745
 
746
+ #: include/class-bulk-delete-posts.php:814
747
+ msgid "Select the post type whose taxonomy posts you want to delete"
748
  msgstr ""
749
 
750
+ #: include/class-bulk-delete-posts.php:834
751
+ msgid "Select the taxonomies whose post you want to delete"
752
  msgstr ""
753
 
754
+ #: include/class-bulk-delete-posts.php:853
755
+ msgid ""
756
+ "The selected taxonomy has the following terms. Select the terms whose post "
757
+ "you want to delete"
758
  msgstr ""
759
 
760
+ #: include/class-bulk-delete-posts.php:854
761
+ msgid ""
762
+ "Note: The post count below for each term is the total number of posts in "
763
+ "that term, irrespective of post type"
764
  msgstr ""
765
 
766
+ #: include/class-bulk-delete-posts.php:952
767
+ msgid "You don't have any posts assigned to custom taxonomies in this blog."
768
  msgstr ""
769
 
770
+ #: include/class-bulk-delete-posts.php:986
771
+ msgid "Posts from the selected custom taxonomies are scheduled for deletion."
772
  msgstr ""
773
 
774
+ #: include/class-bulk-delete-posts.php:990
775
+ msgid "Deleted %d post from the selected custom taxonomies"
776
+ msgid_plural "Deleted %d posts from the selected custom taxonomies"
777
+ msgstr[0] ""
778
+ msgstr[1] ""
779
 
780
+ #: include/class-bulk-delete-posts.php:1120
781
+ msgid "Select the custom post type whose post you want to delete"
782
  msgstr ""
783
 
784
+ #: include/class-bulk-delete-posts.php:1205
785
+ msgid "You don't have any posts assigned to custom post types in this blog."
786
  msgstr ""
787
 
788
+ #: include/class-bulk-delete-posts.php:1238
789
+ msgid "Posts from the selected custom post type are scheduled for deletion."
790
  msgstr ""
791
 
792
+ #: include/class-bulk-delete-posts.php:1242
793
+ msgid "Deleted %d post from the selected custom post type"
794
+ msgid_plural "Deleted %d posts from the selected custom post type"
795
+ msgstr[0] ""
796
+ msgstr[1] ""
797
 
798
+ #: include/class-bulk-delete-posts.php:1366
799
+ msgid "Delete these specific pages"
800
  msgstr ""
801
 
802
+ #: include/class-bulk-delete-posts.php:1372
803
+ msgid "Enter one post url (not post ids) per line"
804
  msgstr ""
805
 
806
+ #: include/class-bulk-delete-posts.php:1427
807
+ msgid "Deleted %d post with the specified urls"
808
+ msgid_plural "Deleted %d posts with the specified urls"
809
+ msgstr[0] ""
810
+ msgstr[1] ""
811
+
812
+ #: include/class-bulk-delete-posts.php:1461
813
+ msgid "All Revisions"
814
  msgstr ""
815
 
816
+ #: include/class-bulk-delete-posts.php:1461
817
+ msgid "Revisions"
 
818
  msgstr ""
819
 
820
+ #: include/class-bulk-delete-posts.php:1485
821
+ msgid "Deleted %d post revision"
822
+ msgid_plural "Deleted %d post revisions"
823
+ msgstr[0] ""
824
+ msgstr[1] ""
825
+
826
+ #: include/class-bulk-delete-posts.php:1535
827
+ msgid ""
828
+ "You need \"Bulk Delete Posts by Custom Field\" Addon, to delete post by "
829
+ "custom field."
830
  msgstr ""
831
 
832
+ #: include/class-bulk-delete-posts.php:1564
833
+ msgid "You need \"Bulk Delete Posts by Title\" Addon, to delete post by title."
834
  msgstr ""
835
 
836
+ #: include/class-bulk-delete-posts.php:1594
837
+ msgid ""
838
+ "You need \"Bulk Delete Posts by Duplicate Title\" Addon, to delete post by "
839
+ "duplicate title."
840
  msgstr ""
841
 
842
+ #: include/class-bulk-delete-posts.php:1619
843
+ msgid "The selected scheduled job was successfully deleted "
844
  msgstr ""
845
 
846
+ #: include/class-bulk-delete-system-info.php:60
847
+ msgid "System Information"
848
  msgstr ""
849
 
850
+ #: include/class-bulk-delete-system-info.php:62
851
+ msgid ""
852
+ "To copy the system info, click below then press Ctrl + C (PC) or Cmd + C "
853
+ "(Mac)."
854
  msgstr ""
855
 
856
+ #: include/class-bulk-delete-users.php:22
857
+ msgid "Select the user roles from which you want to delete users"
 
 
 
 
858
  msgstr ""
859
 
860
+ #: include/class-bulk-delete-users.php:33
861
+ msgid "Users"
 
 
 
 
862
  msgstr ""
863
 
864
+ #: include/class-bulk-delete-users.php:55
865
+ msgid "Only restrict to users who have not logged in the last "
866
  msgstr ""
867
 
868
+ #: include/class-bulk-delete-users.php:61
869
+ msgid "Need Simple Login Log Plugin"
870
  msgstr ""
871
 
872
+ #: include/class-bulk-delete-users.php:72
873
+ msgid "Only if user doesn't have any post"
874
  msgstr ""
875
 
876
+ #: include/class-bulk-delete-users.php:138
877
+ msgid "Users from the selected userrole are scheduled for deletion."
878
  msgstr ""
879
 
880
+ #: include/class-bulk-delete-users.php:142
881
+ msgid "Deleted %d user from the selected roles"
882
+ msgid_plural "Deleted %d users from the selected role"
883
+ msgstr[0] ""
884
+ msgstr[1] ""
885
+
886
+ #: include/class-bulk-delete-util.php:125
887
+ msgctxt "Cron table date format"
888
+ msgid "M j, Y @ G:i"
889
  msgstr ""
890
 
891
+ #: include/class-cron-list-table.php:32
892
+ msgid ""
893
+ "This is the list of jobs that are currently scheduled for auto deleting "
894
+ "posts in Bulk Delete Plugin."
895
  msgstr ""
896
 
897
+ #: include/class-cron-list-table.php:40
898
+ msgid "Note: "
899
  msgstr ""
900
 
901
+ #: include/class-cron-list-table.php:42
902
+ msgid ""
903
+ "Scheduling auto post or user deletion is available only when you buy pro "
904
+ "addons."
905
  msgstr ""
906
 
907
+ #: include/class-cron-list-table.php:55
908
+ msgid "Next Due (GMT/UTC)"
909
  msgstr ""
910
 
911
+ #: include/class-cron-list-table.php:57
912
+ msgid "Type"
913
  msgstr ""
914
 
915
+ #: include/class-cron-list-table.php:58
916
+ msgid "Options"
917
  msgstr ""
918
 
919
+ #: include/class-cron-list-table.php:112
920
+ #: include/class-license-list-table.php:90
921
+ msgid "Delete"
922
  msgstr ""
923
 
924
+ #: include/class-cron-list-table.php:138
925
+ msgid "You have not scheduled any bulk delete jobs."
926
  msgstr ""
927
 
928
+ #: include/class-license-list-table.php:35
929
+ msgid ""
930
+ "This is the list of addon license that are currently registered with the "
931
+ "plugin."
932
  msgstr ""
933
 
934
+ #: include/class-license-list-table.php:48
935
+ msgid "Addon Name"
936
  msgstr ""
937
 
938
+ #: include/class-license-list-table.php:49
939
+ msgid "License Code"
940
  msgstr ""
941
 
942
+ #: include/class-license-list-table.php:50
943
+ msgid "Validity"
944
  msgstr ""
945
 
946
+ #: include/class-license-list-table.php:51
947
+ msgid "Expires"
948
  msgstr ""
949
 
950
+ #: include/class-license-list-table.php:94
951
+ msgid "Deactivate"
952
  msgstr ""
953
 
954
+ #: include/class-license-list-table.php:152
955
+ msgid "N/A"
956
  msgstr ""
957
 
958
+ #: include/class-license-list-table.php:162
959
+ msgid "You don't have any valid addon license yet."
960
  msgstr ""
961
 
962
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:134
963
  msgid "Select the post type whose posts you want to delete"
964
  msgstr ""
965
 
966
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:152
967
  msgid "Choose your custom field settings"
968
  msgstr ""
969
 
970
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:156
971
  msgid "Key "
972
  msgstr ""
973
 
974
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:159
975
  msgid "equal to (string)"
976
  msgstr ""
977
 
978
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:160
979
  msgid "not equal to (string)"
980
  msgstr ""
981
 
982
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:161
983
  msgid "equal to (date)"
984
  msgstr ""
985
 
986
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:162
987
  msgid "not equal to (date)"
988
  msgstr ""
989
 
990
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:163
991
  msgid "less than (date)"
992
  msgstr ""
993
 
994
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:164
995
  msgid "greater than (date)"
996
  msgstr ""
997
 
998
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:165
999
  msgid "less than (number)"
1000
  msgstr ""
1001
 
1002
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:166
1003
  msgid "greater than (number)"
1004
  msgstr ""
1005
 
1006
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:168
1007
  msgid "Value "
1008
  msgstr ""
1009
 
1010
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:175
1011
  msgid "Enter the Date Format "
1012
  msgstr ""
1013
 
1014
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:177
1015
  msgid "Possible Values"
1016
  msgstr ""
1017
 
1018
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:178
1019
  msgid "If you leave date format blank, then \"YYYYMMDD\", will be assumed"
1020
  msgstr ""
1021
 
1022
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:184
1023
  msgid "If you want to check for null values, then leave the value column blank"
1024
  msgstr ""
1025
 
1026
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:304
1027
+ msgid ""
1028
+ "Posts matching the selected custom field setting are scheduled for deletion."
1029
  msgstr ""
1030
 
1031
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:309
1032
  msgid "Deleted %d post using the selected custom field condition"
1033
  msgid_plural "Deleted %d posts using the selected custom field condition"
1034
  msgstr[0] ""
1035
  msgstr[1] ""
1036
 
1037
+ #: tmp_addon/bulk-delete-posts-by-custom-field.php:480
1038
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:324
1039
+ #: tmp_addon/bulk-delete-posts-by-title.php:359
1040
+ #: tmp_addon/bulk-delete-scheduler-for-deleting-pages-by-status.php:106
1041
+ #: tmp_addon/bulk-delete-scheduler-for-deleting-posts-by-category.php:106
1042
+ #: tmp_addon/bulk-delete-scheduler-for-deleting-posts-by-custom-field.php:106
1043
+ #: tmp_addon/bulk-delete-scheduler-for-deleting-posts-by-duplicate-title.php:115
1044
+ #: tmp_addon/bulk-delete-scheduler-for-deleting-posts-by-post-type.php:105
1045
+ #: tmp_addon/bulk-delete-scheduler-for-deleting-posts-by-status.php:106
1046
+ #: tmp_addon/bulk-delete-scheduler-for-deleting-posts-by-tag.php:106
1047
+ #: tmp_addon/bulk-delete-scheduler-for-deleting-posts-by-taxonomy.php:101
1048
+ #: tmp_addon/bulk-delete-scheduler-for-deleting-users-by-role.php:106
1049
+ msgid ""
1050
+ "<strong>%s</strong> addon needs <a href=\"%s\">Bulk Delete plugin</a> to be "
1051
+ "installed and activated; the addon has been <strong>deactivated</strong>."
1052
+ msgstr ""
1053
+
1054
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:118
1055
+ msgid "Select the post type whose duplicate posts you want to delete"
1056
+ msgstr ""
1057
+
1058
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:136
1059
+ msgid "Choose your duplicate title settings"
1060
+ msgstr ""
1061
+
1062
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:140
1063
+ msgid "Delete posts with duplicate title that were "
1064
+ msgstr ""
1065
+
1066
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:142
1067
+ msgid "created"
1068
+ msgstr ""
1069
+
1070
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:143
1071
+ msgid "modified"
1072
+ msgstr ""
1073
+
1074
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:147
1075
+ msgid "first"
1076
+ msgstr ""
1077
+
1078
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:148
1079
+ msgid "last"
1080
+ msgstr ""
1081
+
1082
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:222
1083
+ msgid "Sorry something went wrong. Kindly try again."
1084
+ msgstr ""
1085
+
1086
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:240
1087
+ msgid ""
1088
+ "Posts with duplicate title matching the selected settings are scheduled for "
1089
+ "deletion."
1090
+ msgstr ""
1091
+
1092
+ #: tmp_addon/bulk-delete-posts-by-duplicate-title.php:245
1093
+ #: tmp_addon/bulk-delete-posts-by-title.php:219
1094
+ msgid "Deleted %d post using the selected title condition"
1095
+ msgid_plural "Deleted %d posts using the selected title condition"
1096
+ msgstr[0] ""
1097
+ msgstr[1] ""
1098
+
1099
+ #: tmp_addon/bulk-delete-posts-by-title.php:85
1100
  msgid "Choose your title settings"
1101
  msgstr ""
1102
 
1103
+ #: tmp_addon/bulk-delete-posts-by-title.php:91
1104
  msgid "Title"
1105
  msgstr ""
1106
 
1107
+ #: tmp_addon/bulk-delete-posts-by-title.php:93
1108
  msgid "equal to"
1109
  msgstr ""
1110
 
1111
+ #: tmp_addon/bulk-delete-posts-by-title.php:94
1112
  msgid "not equal to"
1113
  msgstr ""
1114
 
1115
+ #: tmp_addon/bulk-delete-posts-by-title.php:95
1116
  msgid "contains"
1117
  msgstr ""
1118
 
1119
+ #: tmp_addon/bulk-delete-posts-by-title.php:96
1120
  msgid "doesn't contains"
1121
  msgstr ""
1122
 
1123
+ #: tmp_addon/bulk-delete-posts-by-title.php:97
1124
  msgid "starts with"
1125
  msgstr ""
1126
 
1127
+ #: tmp_addon/bulk-delete-posts-by-title.php:98
1128
  msgid "ends with"
1129
  msgstr ""
1130
+
1131
+ #: tmp_addon/bulk-delete-posts-by-title.php:215
1132
+ msgid "Posts matching the selected title setting are scheduled for deletion."
1133
  msgstr ""
1134
 
1135
  #. Plugin URI of the plugin/theme
1136
+ msgid "http://bulkwp.com"
1137
  msgstr ""
1138
 
1139
  #. Description of the plugin/theme
1140
+ msgid ""
1141
+ "Bulk delete users and posts from selected categories, tags, post types, "
1142
+ "custom taxonomies or by post status like drafts, scheduled posts, revisions "
1143
+ "etc."
1144
  msgstr ""
1145
 
1146
  #. Author of the plugin/theme
readme.txt CHANGED
@@ -1,231 +1,260 @@
1
- === Bulk Delete ===
2
- Contributors: sudar
3
- Tags: post, comment, delete, bulk, mass, draft, revision, page
4
- Requires at least: 3.8
5
- Tested up to: 3.8.1
6
- Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
7
- Stable tag: 4.4.3
8
-
9
- Bulk delete users based on user role and posts from selected categories, tags, post types, custom taxonomies or by post status 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, post types or custom taxonomies. This Plugin can also delete all drafts, post revisions, scheduled posts or pages and users based on user role.
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 custom post types
25
- - Delete posts by url
26
- - Delete posts by custom field (Available as a [Pro addon](http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-by-custom-field))
27
- - Delete posts by title (Available as a [Pro addon](http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-by-title))
28
- - Delete all draft posts
29
- - Delete all pending posts
30
- - Delete all private posts
31
- - Delete all scheduled posts
32
-
33
- All the above options support the following filters
34
-
35
- - Post date greater than X days
36
- - Post date less than X days
37
- - Only public posts
38
- - Only private posts
39
- - Restrict to first N posts
40
- - Delete permanently or just move to trash
41
- - Schedule deletion of posts automatically (Available as a [Pro addon](http://sudarmuthu.com/wordpress/bulk-delete/pro-addons))
42
-
43
- #### Deleting pages
44
-
45
- - Delete all published pages
46
- - Delete all draft pages
47
- - Delete all pending pages
48
- - Delete all private pages
49
- - Delete all scheduled pages
50
-
51
- Like posts, all the above options support the following filters as well
52
-
53
- - Post date greater than X days
54
- - Post date less than X days
55
- - Only public posts
56
- - Only private posts
57
- - Restrict to first N posts
58
- - Delete permanently or just move to trash
59
- - Schedule deletion of posts automatically (Available as a [Pro addon](http://sudarmuthu.com/wordpress/bulk-delete/pro-addons))
60
-
61
- #### Deleting post revisions
62
-
63
- - Delete all post revisions
64
-
65
- #### Deleting users
66
-
67
- - Delete users based on user role
68
-
69
- #### Deleting posts by content and page views
70
-
71
- Coming soon :)
72
-
73
- As you can see, the Plugin provide comprehensive options and filters to perform bulk deletion.
74
-
75
- If you looking for just moving posts, instead of deleting, then use [Bulk Move Plugin][2] instead.
76
-
77
- ### Pro Addons
78
-
79
- The following are the list of pro addons that are currently available for purchase to add more features to the Plugin.
80
-
81
- - **Delete posts by custom field** - Adds the ability to delete posts based on custom field. [More details](http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-by-custom-field). [Buy now](http://sudarmuthu.com/out/buy-bulk-delete-custom-field-addon)
82
- - **Delete posts by title** - Adds the ability to delete posts based on title. [More details](http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-by-title). [Buy now](http://sudarmuthu.com/out/buy-bulk-delete-title-addon)
83
- - **Schedule auto delete of Posts by 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)
84
- - **Schedule auto delete of Posts by 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)
85
- - **Schedule auto delete of Posts by Custom Taxonomies** - Adds the ability to schedule auto delete of posts based on custom taxonomies. [More details](http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-taxonomy). [Buy now](http://sudarmuthu.com/out/buy-bulk-delete-taxonomy-addon)
86
- - **Schedule auto delete of Posts by Custom post types** - Adds the ability to schedule auto delete of posts based on custom post types. [More details](http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-post-types). [Buy now](http://sudarmuthu.com/out/buy-bulk-delete-post-type-addon)
87
- - **Schedule auto delete of 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)
88
- - **Schedule auto delete of Posts 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)
89
- - **Schedule auto delete of users by User Role** - Adds the ability to schedule auto delete of users based on user role. [More details](http://sudarmuthu.com/wordpress/bulk-delete/pro-addons#bulk-delete-schedule-users-by-user-role). [Buy now](http://sudarmuthu.com/out/buy-bulk-delete-users-by-role-addon)
90
-
91
- ### Development
92
-
93
- The development of the Plugin happens over at [github][6]. If you want to contribute to the Plugin, fork the [project at github][6] and send me a pull request.
94
-
95
- If you are not familiar with either git or Github then refer to this [guide to see how fork and send pull request](http://sudarmuthu.com/blog/contributing-to-project-hosted-in-github).
96
-
97
- If you are looking for ideas, then you can start with one of the following TODO items :)
98
-
99
- ### TODO
100
-
101
- 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.
102
-
103
- - Bulk Delete posts based on page views
104
- - Bulk delete based on the presence/absence of a word
105
- - Bulk Delete empty posts
106
- - Bulk Delete posts based on users
107
- - Bulk delete comments
108
- - Delete images that are used by the posts that are being deleted
109
- - <del>Bulk Delete sticky posts</del> - Added in v4.4
110
- - <del>Change the message based on the option the user has chosen</del> - Added in v3.3
111
- - <del>Expandable/collapsible taxonomies</del> - Added in v3.3
112
- - <del>Ability to choose the different sections that should be loaded</del> - Added in v3.4
113
- - <del>Bulk Delete by custom post types</del> - Added in v3.5
114
-
115
- ### Support
116
-
117
- - If you have found a bug/issue or have a feature request, then post them in [github issues][7]
118
- - If you have a question about usage or need help to troubleshoot, then post in WordPress forums or leave a comment in [Plugins's home page][1]
119
- - If you like the Plugin, then kindly leave a review/feedback at [WordPress repo page][8].
120
- - If you find this Plugin useful or and wanted to say thank you, then there are ways to [make me happy](http://sudarmuthu.com/if-you-wanna-thank-me) :) and I would really appreciate if you can do one of those.
121
- - Checkout other [WordPress Plugins][5] that I have written
122
- - If anything else, then contact me in [twitter][3].
123
-
124
- [1]: http://sudarmuthu.com/wordpress/bulk-delete
125
- [2]: http://sudarmuthu.com/wordpress/bulk-move
126
- [3]: http://twitter.com/sudarmuthu
127
- [4]: http://sudarmuthu.com/blog
128
- [5]: http://sudarmuthu.com/wordpress
129
- [6]: https://github.com/sudar/bulk-delete
130
- [7]: https://github.com/sudar/bulk-delete/issues
131
- [8]: http://wordpress.org/extend/plugins/bulk-delete/
132
-
133
- == Translation ==
134
-
135
- The Plugin currently has translations for the following languages.
136
-
137
- * Dutch (Thanks Rene)
138
- * Brazilian Portuguese (Thanks Marcelo of Criacao de Sites em Ribeirao Preto)
139
- * German (Thanks Jenny Beelens)
140
- * Turkish Portuguese (Thanks Bahadir Yildiz)
141
- * Spanish (Thanks Brian Flores)
142
- * Italian (Thanks Paolo Gabrielli)
143
- * Bulgarian (Thanks Nikolay Nikolov)
144
- * Russian (Thanks Maxim Pesteev)
145
- * Lithuanian (Thanks Vincent G)
146
- * Hindi (Thanks Love Chandel)
147
- * Serbian (Thanks Diana)
148
- * Gujarati (Thanks Puneet)
149
-
150
- The pot file is available with the Plugin. If you are willing to do translation for the Plugin, use the pot file to create the .po files for your language and let me know.
151
-
152
- == Credits ==
153
-
154
- Thanks <a href="http://www.martincapodici.com">Martin Capodici</a> for providing the code to implement the "delete specific page" feature.
155
-
156
- Thanks to [Time picker addon](http://trentrichardson.com/examples/timepicker/) JavaScript library, which the Plugin uses.
157
-
158
- == Installation ==
159
-
160
- Extract the zip file and just drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.
161
-
162
- == Frequently Asked Questions ==
163
-
164
- = After installing the Plugin, I just see a blank page. =
165
-
166
- This can happen if you have huge number of posts and your server is very underpowered. Check your PHP error log to see if there are any errors and correct them. The most common problems are script timeout or running out of memory. Change your PHP.ini file and increase the script timeout and/or amount of memory used by PHP process.
167
-
168
- In particular try to change the following settings
169
-
170
- * `max_execution_time = 600` - Maximum execution time of each script, in seconds
171
- * `max_input_time = 30` - Maximum amount of time each script may spend parsing request data
172
- * `memory_limit = 256M` - Maximum amount of memory a script may consume
173
-
174
- You can also try to disable different sections of the Plugin, if you have huge number of posts.
175
-
176
- = How do I disable different sections of the Plugin =
177
-
178
- You can enable or disable different sections of the Plugin by choosing the required modules in the screen option. You can open screen options by clicking the link in the top right corner of the Plugin page.
179
-
180
- = How do I know what are the current values for these options configured in my server? =
181
-
182
- Scroll down to the button of the Plugin page and you can see the current values of these options printed for your reference under the “Debug Information” heading
183
-
184
- = Is it possible to restore the posts that I have deleted through the Plugin? =
185
-
186
- If you choose the option "Move to trash" then you can find them from trash. But if you choose "Delete permanently", then it is not possible to retrieve the posts. So be **very careful**.
187
-
188
- = Is it possible that some Plugin are not compatible with Bulk Delete? =
189
-
190
- Yes. If a Plugin rewrites the query vars by using `add_filter( 'pre_get_posts' )` then it may be incompatible with this Plugin. [The event calendar](http://wordpress.org/plugins/the-events-calendar/) is one such Plugin.
191
-
192
- I currently disable and enable the `pre_get_posts` filter if I find that "The event calendar" Plugin is installed. It is not ideal, but it gets the work done. If you find any other Plugin with which Bulk Delete doesn't work, then let me know and I will try to see if I can add support through some hack like this.
193
-
194
- = Is it possible to schedule deletion of posts =
195
-
196
- The ability to schedule deletion of posts is available as a pro addon.
197
-
198
- == Screenshots ==
199
-
200
-
201
- 1. The above screenshot shows how you can delete Posts by post status. You can choose between drafts, pending posts, scheduled posts, privates posts.
202
-
203
-
204
- 2. The above screenshot shows how you can delete posts by category.
205
-
206
-
207
- 3. The above screenshot shows how you can delete posts by tags.
208
-
209
-
210
- 4. The above screenshot shows how you can delete posts by custom taxonomies.
211
-
212
-
213
- 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.
214
-
215
-
216
- 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).
217
-
218
-
219
- 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).
220
-
221
-
222
- 8. The above screenshot shows how you can enable/disable different sections of the Plugin.
223
-
224
- == Readme Generator ==
225
-
226
- This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  == Changelog ==
228
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  = 2014-01-26 - v4.4.3 - (Dev time: 1.5 hours) =
230
  - Tweak: Ability to delete posts from non-public post types as well
231
  - Fix: Fix the height of the sidebar
@@ -394,6 +423,9 @@ This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/
394
 
395
  == Upgrade Notice ==
396
 
 
 
 
397
  = 4.4.1 =
398
  Fix: Prevent Bulk Delete from overriding other menus
399
 
1
+ === Bulk Delete ===
2
+ Contributors: sudar
3
+ Tags: post, comment, delete, bulk, mass, draft, revision, page
4
+ Requires at least: 3.8
5
+ Tested up to: 3.9.1
6
+ Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
7
+ Stable tag: 5.0
8
+
9
+ Bulk delete posts, pages or users in bulk based on different conditions and filters.
10
+
11
+ == Description ==
12
+
13
+ **NOTE: v5.0 and the above of this plugin is NOT compatible with any addons whose version is less than v0.5. If you are using an addon for this plugin, then make sure you that you have at least v0.5 or above of the addon before upgrading to v5.0 of this plugin. If you have any questions regarding this, then post them in the [BulkWP support forums][1]**
14
+
15
+ Bulk Delete is a WordPress Plugin that allows you to delete posts, pages and users in bulk based on different conditions and filters.
16
+
17
+ The following conditions and filters are supported.
18
+
19
+ ### Features
20
+
21
+ #### Deleting posts
22
+
23
+ This Plugin supports the following bulk delete options for deleting posts
24
+
25
+ - Delete posts by category
26
+ - Delete posts by tag
27
+ - Delete posts by custom taxonomy
28
+ - Delete posts by custom post type
29
+ - Delete posts by url
30
+ - Delete posts by custom field (Available as a [Pro addon](http://bulkwp.com/addons/bulk-delete-posts-by-custom-field/))
31
+ - Delete posts by title (Available as a [Pro addon](http://bulkwp.com/addons/bulk-delete-posts-by-title/))
32
+ - Delete posts by duplicate title (Available as a [Pro addon](http://bulkwp.com/addons/bulk-delete-posts-by-duplicate-title/))
33
+ - Delete all draft posts
34
+ - Delete all pending posts
35
+ - Delete all private posts
36
+ - Delete all scheduled posts
37
+
38
+ All the above options support the following filters
39
+
40
+ - Post date greater than X days
41
+ - Post date less than X days
42
+ - Only public posts
43
+ - Only private posts
44
+ - Restrict to first N posts
45
+ - Delete permanently or just move to trash
46
+ - Schedule deletion of posts automatically (Available as a [Pro addon](http://bulkwp.com/addons/))
47
+
48
+ #### Deleting pages
49
+
50
+ - Delete all published pages
51
+ - Delete all draft pages
52
+ - Delete all pending pages
53
+ - Delete all private pages
54
+ - Delete all scheduled pages
55
+
56
+ Like posts, all the above options support the following filters as well
57
+
58
+ - Post date greater than X days
59
+ - Post date less than X days
60
+ - Only public posts
61
+ - Only private posts
62
+ - Restrict to first N posts
63
+ - Delete permanently or just move to trash
64
+ - Schedule deletion of pages automatically (Available as a [Pro addon](http://bulkwp.com/addons/scheduler-for-deleting-pages-by-status/))
65
+
66
+ #### Deleting post revisions
67
+
68
+ - Delete all post revisions
69
+
70
+ #### Deleting users
71
+
72
+ - Delete users based on user role
73
+ - Delete users who have not logged in in the last X days
74
+
75
+ #### Deleting posts by content and page views
76
+
77
+ - Delete duplicate posts by title (Available as a [Pro addon](http://bulkwp.com/addons/bulk-delete-posts-by-duplicate-title/))
78
+
79
+ More options coming soon :)
80
+
81
+ As you can see, the Plugin provide comprehensive options and filters to perform bulk deletion.
82
+
83
+ If you looking for just moving posts, instead of deleting, then use [Bulk Move Plugin][2] instead.
84
+
85
+ ### Pro Addons
86
+
87
+ The following are the popular pro addons that are available for purchase. The full list of [pro addons](http://bulkwp.com/addons/) is available at the plugin site.
88
+
89
+ - **Delete posts by custom field** - Adds the ability to delete posts based on custom field. [More details](http://bulkwp.com/addons/bulk-delete-posts-by-custom-field/).
90
+ - **Delete posts by title** - Adds the ability to delete posts based on title. [More details](http://bulkwp.com/addons/bulk-delete-posts-by-title/).
91
+ - **Delete posts by duplicate title** - Adds the ability to delete posts based on duplicate title. [More details](http://bulkwp.com/addons/bulk-delete-posts-by-duplicate-title/).
92
+ - **Scheduler for deleting posts Category** - Adds the ability to schedule auto delete of posts based on category. [More details](http://bulkwp.com/addons/scheduler-for-deleting-posts-by-category/).
93
+ - **Scheduler for deleting posts Tag** - Adds the ability to schedule auto delete of posts based on tag. [More details](http://bulkwp.com/addons/scheduler-for-deleting-posts-by-tag/).
94
+ - **Scheduler for deleting posts by Custom Taxonomy** - Adds the ability to schedule auto delete of posts based on custom taxonomy. [More details](http://bulkwp.com/addons/scheduler-for-deleting-posts-by-taxonomy/).
95
+ - **Scheduler for deleting posts by Custom post type** - Adds the ability to schedule auto delete of posts based on custom post type. [More details](http://bulkwp.com/addons/scheduler-for-deleting-posts-by-post-type/).
96
+ - **Scheduler for deleting posts 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://bulkwp.com/addons/scheduler-for-deleting-posts-by-status/).
97
+ - **Scheduler for deleting pages by status** - Adds the ability to schedule auto delete of pages based on status. [More details](http://bulkwp.com/addons/scheduler-for-deleting-pages-by-status/).
98
+ - **Scheduler for deleting users by User Role** - Adds the ability to schedule auto delete of users based on user role. [More details](http://bulkwp.com/addons/scheduler-for-deleting-users-by-role/).
99
+
100
+ ### Development
101
+
102
+ The development of the Plugin happens over at [github][6]. If you want to contribute to the Plugin, fork the [project at github][6] and send me a pull request.
103
+
104
+ If you are not familiar with either git or Github then refer to this [guide to see how fork and send pull request](http://sudarmuthu.com/blog/contributing-to-project-hosted-in-github).
105
+
106
+ If you are looking for ideas, then you can start with one of the following TODO items :)
107
+
108
+ ### TODO
109
+
110
+ 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.
111
+
112
+ - Bulk Delete posts based on page views
113
+ - Bulk delete based on the presence/absence of a word
114
+ - Bulk Delete empty posts
115
+ - Bulk Delete posts based on users
116
+ - Bulk delete comments
117
+ - Delete images that are used by the posts that are being deleted
118
+ - <del>Bulk Delete sticky posts</del> - Added in v4.4
119
+ - <del>Change the message based on the option the user has chosen</del> - Added in v3.3
120
+ - <del>Expandable/collapsible taxonomies</del> - Added in v3.3
121
+ - <del>Ability to choose the different sections that should be loaded</del> - Added in v3.4
122
+ - <del>Bulk Delete by custom post types</del> - Added in v3.5
123
+
124
+ ### Support
125
+
126
+ - If you have found a bug/issue or have a feature request, then post them in [github issues][7]
127
+ - If you have a question about the plugin usage or need help to troubleshoot, then post about it in our [BulkWP Support forums][1]
128
+ - If you have a question about any of the addon or need help to troubleshoot the addons, then post about it in our [BulkWP Support forums][1]
129
+ - If you like the Plugin, then kindly leave a review/feedback at [WordPress repo page][8]. This will help more people to discover the plugin.
130
+ - Checkout other [WordPress Plugins][5] that I have written
131
+ - If anything else, then contact us in [twitter][3].
132
+
133
+ [1]: http://bulkwp.com/support
134
+ [2]: http://sudarmuthu.com/wordpress/bulk-move
135
+ [3]: http://twitter.com/bulkwp
136
+ [5]: http://sudarmuthu.com/wordpress
137
+ [6]: https://github.com/sudar/bulk-delete
138
+ [7]: https://github.com/sudar/bulk-delete/issues
139
+ [8]: http://wordpress.org/support/view/plugin-reviews/bulk-delete
140
+
141
+ == Translation ==
142
+
143
+ The Plugin currently has translations for the following languages.
144
+
145
+ * Dutch (Thanks Rene)
146
+ * Brazilian Portuguese (Thanks Marcelo of Criacao de Sites em Ribeirao Preto)
147
+ * German (Thanks Jenny Beelens)
148
+ * Turkish Portuguese (Thanks Bahadir Yildiz)
149
+ * Spanish (Thanks Brian Flores)
150
+ * Italian (Thanks Paolo Gabrielli)
151
+ * Bulgarian (Thanks Nikolay Nikolov)
152
+ * Russian (Thanks Maxim Pesteev)
153
+ * Lithuanian (Thanks Vincent G)
154
+ * Hindi (Thanks Love Chandel)
155
+ * Serbian (Thanks Diana)
156
+ * Gujarati (Thanks Puneet)
157
+
158
+ The pot file is available with the Plugin. If you are willing to do translation for the Plugin, use the pot file to create the .po files for your language and let me know.
159
+
160
+ == Credits ==
161
+
162
+ Thanks <a href="http://www.martincapodici.com">Martin Capodici</a> for providing the code to implement the "delete specific page" feature.
163
+
164
+ Thanks to [Time picker addon](http://trentrichardson.com/examples/timepicker/) JavaScript library, which the Plugin uses.
165
+
166
+ == Installation ==
167
+
168
+ Extract the zip file and just drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.
169
+
170
+ == Frequently Asked Questions ==
171
+
172
+ = After installing the Plugin, I just see a blank page. =
173
+
174
+ This can happen if you have huge number of posts and your server is very underpowered. Check your PHP error log to see if there are any errors and correct them. The most common problems are script timeout or running out of memory. Change your PHP.ini file and increase the script timeout and/or amount of memory used by PHP process.
175
+
176
+ In particular try to change the following settings
177
+
178
+ * `max_execution_time = 600` - Maximum execution time of each script, in seconds
179
+ * `max_input_time = 30` - Maximum amount of time each script may spend parsing request data
180
+ * `memory_limit = 256M` - Maximum amount of memory a script may consume
181
+
182
+ You can also try to disable different sections of the Plugin, if you have huge number of posts.
183
+
184
+ = How do I disable different sections of the Plugin =
185
+
186
+ You can enable or disable different sections of the Plugin by choosing the required modules in the screen option. You can open screen options by clicking the link in the top right corner of the Plugin page.
187
+
188
+ = How do I know what are the current values for these options configured in my server? =
189
+
190
+ Scroll down to the button of the Plugin page and you can see the current values of these options printed for your reference under the “Debug Information” heading
191
+
192
+ = Is it possible to restore the posts that I have deleted through the Plugin? =
193
+
194
+ If you choose the option "Move to trash" then you can find them from trash. But if you choose "Delete permanently", then it is not possible to retrieve the posts. So be **very careful**.
195
+
196
+ = Is it possible that some Plugin are not compatible with Bulk Delete? =
197
+
198
+ Yes. If a Plugin rewrites the query vars by using `add_filter( 'pre_get_posts' )` then it may be incompatible with this Plugin. [The event calendar](http://wordpress.org/plugins/the-events-calendar/) is one such Plugin.
199
+
200
+ I currently disable and enable the `pre_get_posts` filter if I find that "The event calendar" Plugin is installed. It is not ideal, but it gets the work done. If you find any other Plugin with which Bulk Delete doesn't work, then let me know and I will try to see if I can add support through some hack like this.
201
+
202
+ = Is it possible to schedule deletion of posts? =
203
+
204
+ The ability to schedule deletion of posts is available as a [pro addon](http://bulkwp.com/addons/).
205
+
206
+ = I have a question about the pro addons, how should I contact you? =
207
+
208
+ You can contact us by posting about it in our [support forum](http://bulkwp.com/support/).
209
+
210
+ == Screenshots ==
211
+
212
+
213
+ 1. The above screenshot shows how you can delete Posts by post status. You can choose between drafts, pending posts, scheduled posts, privates posts.
214
+
215
+
216
+ 2. The above screenshot shows how you can delete posts by category.
217
+
218
+
219
+ 3. The above screenshot shows how you can delete posts by tag.
220
+
221
+
222
+ 4. The above screenshot shows how you can delete posts by custom taxonomy.
223
+
224
+
225
+ 5. The above screenshot shows how you can delete posts by post type.
226
+
227
+
228
+ 6. 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.
229
+
230
+
231
+ 7. The above screenshot shows how you can delete users by user role.
232
+
233
+
234
+ 8. 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://bulkwp.com/addons/).
235
+
236
+
237
+ 9. The above screenshot shows how you can enable/disable different sections of the Plugin.
238
+
239
+ == Readme Generator ==
240
+
241
+ This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
242
  == Changelog ==
243
 
244
+ = 2014-04-26 - v5.0 - (Dev time: 30 hours) =
245
+ - New: Add the ability to delete posts by duplicate title (#56)
246
+ - Tweak: Make Bulk_Delete class singleton
247
+ - Tweak: Move all deprecated functions and code to a separate file
248
+ - New: Add a new page that displays system information for debugging
249
+ - Tweak: Add the ability to filter text displayed in admin footer
250
+ - Tweak: Change the menu text for Schedule page
251
+ - Tweak: Move delete page modules to a separate page
252
+ - New: Add the ability to handle addon license
253
+ - Tweak: Refactored the way request was handled
254
+ - New: Use `add_settings_error` method to display information to users
255
+ - Tweak: Update screenshots
256
+ - Tweak: Handle expired license properly
257
+
258
  = 2014-01-26 - v4.4.3 - (Dev time: 1.5 hours) =
259
  - Tweak: Ability to delete posts from non-public post types as well
260
  - Fix: Fix the height of the sidebar
423
 
424
  == Upgrade Notice ==
425
 
426
+ = 5.0 =
427
+ This version is only compatible with addons above v0.5
428
+
429
  = 4.4.1 =
430
  Fix: Prevent Bulk Delete from overriding other menus
431