/** * Render delete by post revisions box * * @static */ public static function render_posts_by_revision_box() { global $wpdb; if (BD_Util::is_posts_box_hidden(Bulk_Delete::BOX_POST_REVISION)) { 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); return; } $revisions = $wpdb->get_var("select count(*) from {$wpdb->posts} where post_type = 'revision'"); ?> <!-- Post Revisions start--> <h4><?php _e('Select the posts which you want to delete', 'bulk-delete'); ?> </h4> <fieldset class="options"> <table class="optiontable"> <tr> <td> <input name="smbd_revisions" id ="smbd_revisions" value="revisions" type="checkbox"> <label for="smbd_revisions"><?php _e('All Revisions', 'bulk-delete'); ?> (<?php echo $revisions . ' '; _e('Revisions', 'bulk-delete'); ?> )</label> </td> </tr> </table> </fieldset> <?php bd_render_submit_button('delete_posts_by_revision'); }
/** * Render submit button. * * @since 5.5 */ protected function render_submit_button() { bd_render_submit_button($this->delete_action); }
/** * Render delete pages by page status box * * @access public * @static * @since 5.0 */ public static function render_delete_pages_by_status_box() { if (BD_Util::is_pages_box_hidden(Bulk_Delete::BOX_PAGE_STATUS)) { 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); return; } $pages_count = wp_count_posts('page'); $pages = $pages_count->publish; $page_drafts = $pages_count->draft; $page_future = $pages_count->future; $page_pending = $pages_count->pending; $page_private = $pages_count->private; ?> <!-- Pages start--> <h4><?php _e('Select the pages which you want to delete', 'bulk-delete'); ?> </h4> <fieldset class="options"> <table class="optiontable"> <tr> <td> <input name="smbd_published_pages" value="published_pages" type="checkbox"> <label for="smbd_published_pages"><?php _e('All Published Pages', 'bulk-delete'); ?> (<?php echo $pages . ' '; _e('Pages', 'bulk-delete'); ?> )</label> </td> </tr> <tr> <td> <input name="smbd_draft_pages" value="draft_pages" type="checkbox"> <label for="smbd_draft_pages"><?php _e('All Draft Pages', 'bulk-delete'); ?> (<?php echo $page_drafts . ' '; _e('Pages', 'bulk-delete'); ?> )</label> </td> </tr> <tr> <td> <input name="smbd_future_pages" value="scheduled_pages" type="checkbox"> <label for="smbd_future_pages"><?php _e('All Scheduled Pages', 'bulk-delete'); ?> (<?php echo $page_future . ' '; _e('Pages', 'bulk-delete'); ?> )</label> </td> </tr> <tr> <td> <input name="smbd_pending_pages" value="pending_pages" type="checkbox"> <label for="smbd_pending_pages"><?php _e('All Pending Pages', 'bulk-delete'); ?> (<?php echo $page_pending . ' '; _e('Pages', 'bulk-delete'); ?> )</label> </td> </tr> <tr> <td> <input name="smbd_private_pages" value="private_pages" type="checkbox"> <label for="smbd_private_pages"><?php _e('All Private Pages', 'bulk-delete'); ?> (<?php echo $page_private . ' '; _e('Pages', 'bulk-delete'); ?> )</label> </td> </tr> </table> <table class="optiontable"> <?php bd_render_filtering_table_header(); bd_render_restrict_settings('pages', 'pages'); bd_render_delete_settings('pages'); bd_render_limit_settings('pages'); bd_render_cron_settings('pages', 'http://bulkwp.com/addons/scheduler-for-deleting-pages-by-status/?utm_source=wpadmin&utm_campaign=BulkDelete&utm_medium=buynow&utm_content=bd-sp'); ?> </table> </fieldset> <?php bd_render_submit_button('delete_pages_by_status'); }