/** * 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 delete posts from trash box * * @since 5.5 */ function bd_render_delete_posts_from_trash() { if (BD_Util::is_posts_box_hidden(Bulk_Delete::BOX_POST_FROM_TRASH)) { 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; } if (!class_exists('Bulk_Delete_From_Trash')) { ?> <!-- Posts In Trash box start--> <p> <span class = "bd-post-trash-pro" style = "color:red"> <?php _e('You need "Bulk Delete From Trash" Addon, to delete post in Trash.', 'bulk-delete'); ?> <a href = "http://bulkwp.com/addons/bulk-delete-from-trash/?utm_source=wpadmin&utm_campaign=BulkDelete&utm_medium=buynow&utm_content=bd-th">Buy now</a> </span> </p> <!-- Posts In Trash box end--> <?php } else { /** * Render delete posts from trash box * * @since 5.4 */ do_action('bd_render_delete_posts_from_trash'); } }