Version Description
Download this release
Release Info
Developer | sudar |
Plugin | Bulk Delete |
Version | 2.2.2 |
Comparing to | |
See all releases |
Code changes from version 2.2.1 to 2.2.2
- bulk-delete.php +14 -13
- readme.txt +5 -2
bulk-delete.php
CHANGED
@@ -5,7 +5,7 @@ Plugin Script: bulk-delete.php
|
|
5 |
Plugin URI: http://sudarmuthu.com/wordpress/bulk-delete
|
6 |
Description: Bulk delete posts from selected categories or tags. Use it with caution.
|
7 |
Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
|
8 |
-
Version: 2.2.
|
9 |
License: GPL
|
10 |
Author: Sudar
|
11 |
Author URI: http://sudarmuthu.com/
|
@@ -42,7 +42,8 @@ Text Domain: bulk-delete
|
|
42 |
- Added checks to see if elements are present in the array before accessing them.
|
43 |
2012-10-28 - v2.2.1 - (Dev time: 0.5 hour)
|
44 |
- Added Serbian translations
|
45 |
-
|
|
|
46 |
*/
|
47 |
|
48 |
/* Copyright 2009 Sudar Muthu (email : sudar@sudarmuthu.com)
|
@@ -230,7 +231,7 @@ if (!function_exists('smbd_request_handler')) {
|
|
230 |
|
231 |
// Revisions
|
232 |
if ("revisions" == array_get($_POST, 'smbd_revisions')) {
|
233 |
-
$revisions = $wpdb->get_results(
|
234 |
|
235 |
foreach ($revisions as $revision) {
|
236 |
wp_delete_post($revision->ID, $force_delete);
|
@@ -239,7 +240,7 @@ if (!function_exists('smbd_request_handler')) {
|
|
239 |
|
240 |
// Pending Posts
|
241 |
if ("pending" == array_get($_POST, 'smbd_pending')) {
|
242 |
-
$pendings = $wpdb->get_results(
|
243 |
|
244 |
foreach ($pendings as $pending) {
|
245 |
wp_delete_post($pending->ID, $force_delete);
|
@@ -248,7 +249,7 @@ if (!function_exists('smbd_request_handler')) {
|
|
248 |
|
249 |
// Future Posts
|
250 |
if ("future" == array_get($_POST, 'smbd_future')) {
|
251 |
-
$futures = $wpdb->get_results(
|
252 |
|
253 |
foreach ($futures as $future) {
|
254 |
wp_delete_post($future->ID, $force_delete);
|
@@ -257,7 +258,7 @@ if (!function_exists('smbd_request_handler')) {
|
|
257 |
|
258 |
// Private Posts
|
259 |
if ("private" == array_get($_POST, 'smbd_private')) {
|
260 |
-
$privates = $wpdb->get_results(
|
261 |
|
262 |
foreach ($privates as $private) {
|
263 |
wp_delete_post($private->ID, $force_delete);
|
@@ -333,12 +334,12 @@ if (!function_exists('smbd_displayOptions')) {
|
|
333 |
|
334 |
<?php
|
335 |
$wp_query = new WP_Query;
|
336 |
-
$drafts = $wpdb->get_var(
|
337 |
-
$revisions = $wpdb->get_var(
|
338 |
-
$pending = $wpdb->get_var(
|
339 |
-
$future = $wpdb->get_var(
|
340 |
-
$private = $wpdb->get_var(
|
341 |
-
$pages = $wpdb->get_var(
|
342 |
?>
|
343 |
<fieldset class="options">
|
344 |
<table class="optiontable">
|
@@ -843,7 +844,7 @@ if (!function_exists('smbd_get_tax_post')) {
|
|
843 |
function smbd_get_tax_post($tax) {
|
844 |
global $wpdb;
|
845 |
|
846 |
-
$query = $wpdb->prepare("
|
847 |
$post_ids_result = $wpdb->get_results($query);
|
848 |
|
849 |
$postids = array();
|
5 |
Plugin URI: http://sudarmuthu.com/wordpress/bulk-delete
|
6 |
Description: Bulk delete posts from selected categories or tags. Use it with caution.
|
7 |
Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
|
8 |
+
Version: 2.2.2
|
9 |
License: GPL
|
10 |
Author: Sudar
|
11 |
Author URI: http://sudarmuthu.com/
|
42 |
- Added checks to see if elements are present in the array before accessing them.
|
43 |
2012-10-28 - v2.2.1 - (Dev time: 0.5 hour)
|
44 |
- Added Serbian translations
|
45 |
+
2012-12-20 - v2.2.2 - (Dev time: 0.5 hour)
|
46 |
+
- Removed unused wpdb->prepare() function calls
|
47 |
*/
|
48 |
|
49 |
/* Copyright 2009 Sudar Muthu (email : sudar@sudarmuthu.com)
|
231 |
|
232 |
// Revisions
|
233 |
if ("revisions" == array_get($_POST, 'smbd_revisions')) {
|
234 |
+
$revisions = $wpdb->get_results("select ID from $wpdb->posts where post_type = 'revision'");
|
235 |
|
236 |
foreach ($revisions as $revision) {
|
237 |
wp_delete_post($revision->ID, $force_delete);
|
240 |
|
241 |
// Pending Posts
|
242 |
if ("pending" == array_get($_POST, 'smbd_pending')) {
|
243 |
+
$pendings = $wpdb->get_results("select ID from $wpdb->posts where post_status = 'pending'");
|
244 |
|
245 |
foreach ($pendings as $pending) {
|
246 |
wp_delete_post($pending->ID, $force_delete);
|
249 |
|
250 |
// Future Posts
|
251 |
if ("future" == array_get($_POST, 'smbd_future')) {
|
252 |
+
$futures = $wpdb->get_results("select ID from $wpdb->posts where post_status = 'future'");
|
253 |
|
254 |
foreach ($futures as $future) {
|
255 |
wp_delete_post($future->ID, $force_delete);
|
258 |
|
259 |
// Private Posts
|
260 |
if ("private" == array_get($_POST, 'smbd_private')) {
|
261 |
+
$privates = $wpdb->get_results("select ID from $wpdb->posts where post_status = 'private'");
|
262 |
|
263 |
foreach ($privates as $private) {
|
264 |
wp_delete_post($private->ID, $force_delete);
|
334 |
|
335 |
<?php
|
336 |
$wp_query = new WP_Query;
|
337 |
+
$drafts = $wpdb->get_var("select count(*) from $wpdb->posts where post_status = 'draft'");
|
338 |
+
$revisions = $wpdb->get_var("select count(*) from $wpdb->posts where post_type = 'revision'");
|
339 |
+
$pending = $wpdb->get_var("select count(*) from $wpdb->posts where post_status = 'pending'");
|
340 |
+
$future = $wpdb->get_var("select count(*) from $wpdb->posts where post_status = 'future'");
|
341 |
+
$private = $wpdb->get_var("select count(*) from $wpdb->posts where post_status = 'private'");
|
342 |
+
$pages = $wpdb->get_var("select count(*) from $wpdb->posts where post_type = 'page'");
|
343 |
?>
|
344 |
<fieldset class="options">
|
345 |
<table class="optiontable">
|
844 |
function smbd_get_tax_post($tax) {
|
845 |
global $wpdb;
|
846 |
|
847 |
+
$query = $wpdb->prepare("SELECT object_id FROM {$wpdb->prefix}term_relationships WHERE term_taxonomy_id IN (SELECT term_taxonomy_id FROM {$wpdb->prefix}term_taxonomy WHERE taxonomy = '%s')", $tax);
|
848 |
$post_ids_result = $wpdb->get_results($query);
|
849 |
|
850 |
$postids = array();
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: sudar
|
3 |
Tags: post, comment, delete, bulk, draft, revision, page
|
4 |
Requires at least: 2.0
|
5 |
-
Tested up to: 3.
|
6 |
Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
|
7 |
-
Stable tag: 2.2.
|
8 |
|
9 |
Bulk delete posts from selected categories or tags
|
10 |
|
@@ -163,6 +163,9 @@ Additional FAQ and troubleshooting guide can be found in the [Plugins homepage](
|
|
163 |
### v2.2.1 (2012-10-28) (Dev time: 0.5 hour)
|
164 |
* Added Serbian translations
|
165 |
|
|
|
|
|
|
|
166 |
==Readme Generator==
|
167 |
|
168 |
This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
|
2 |
Contributors: sudar
|
3 |
Tags: post, comment, delete, bulk, draft, revision, page
|
4 |
Requires at least: 2.0
|
5 |
+
Tested up to: 3.5
|
6 |
Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
|
7 |
+
Stable tag: 2.2.2
|
8 |
|
9 |
Bulk delete posts from selected categories or tags
|
10 |
|
163 |
### v2.2.1 (2012-10-28) (Dev time: 0.5 hour)
|
164 |
* Added Serbian translations
|
165 |
|
166 |
+
### v2.2.2 (2012-12-20) (Dev time: 0.5 hour)
|
167 |
+
* Removed unused wpdb->prepare() function calls
|
168 |
+
|
169 |
==Readme Generator==
|
170 |
|
171 |
This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
|