Version Description
[03/19/2013] = * BUG FIX: bug fix for deleting Post Orphans
Download this release
Release Info
Developer | cageehv |
Plugin | Optimize Database after Deleting Revisions |
Version | 2.2.8 |
Comparing to | |
See all releases |
Code changes from version 2.2.7 to 2.2.8
- readme.txt +6 -3
- rvg-optimize-db.php +7 -5
readme.txt
CHANGED
@@ -6,10 +6,10 @@ Plugin URI: http://cagewebdev.com/index.php/optimize-database-after-deleting-rev
|
|
6 |
Tags: database, delete, revisions, optimize, post, posts, page, pages, clean, clean up, trash, spam, trashed, spammed, database size, scheduler
|
7 |
Author URI: http://cagewebdev.com
|
8 |
Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
|
9 |
-
Requires at least: 2.2.
|
10 |
Tested up to: 3.5.1
|
11 |
-
Stable tag: 2.2.
|
12 |
-
Version: 2.2.
|
13 |
|
14 |
== Description ==
|
15 |
|
@@ -48,6 +48,9 @@ http://wordpress.org/extend/plugins/rvg-optimize-database/
|
|
48 |
|
49 |
== Changelog ==
|
50 |
|
|
|
|
|
|
|
51 |
= 2.2.7 [03/18/2013] =
|
52 |
* NEW: 'Orphan Post items' (like 'Auto Drafts') will be automatically deleted too now (thanks to: 0izys)
|
53 |
|
6 |
Tags: database, delete, revisions, optimize, post, posts, page, pages, clean, clean up, trash, spam, trashed, spammed, database size, scheduler
|
7 |
Author URI: http://cagewebdev.com
|
8 |
Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
|
9 |
+
Requires at least: 2.2.8
|
10 |
Tested up to: 3.5.1
|
11 |
+
Stable tag: 2.2.8
|
12 |
+
Version: 2.2.8
|
13 |
|
14 |
== Description ==
|
15 |
|
48 |
|
49 |
== Changelog ==
|
50 |
|
51 |
+
= 2.2.8 [03/19/2013] =
|
52 |
+
* BUG FIX: bug fix for deleting Post Orphans
|
53 |
+
|
54 |
= 2.2.7 [03/18/2013] =
|
55 |
* NEW: 'Orphan Post items' (like 'Auto Drafts') will be automatically deleted too now (thanks to: 0izys)
|
56 |
|
rvg-optimize-db.php
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
<?php
|
2 |
-
$odb_version = '2.2.
|
3 |
-
$odb_release_date = '03/
|
4 |
/**
|
5 |
* @package Optimize Database after Deleting Revisions
|
6 |
-
* @version 2.2.
|
7 |
*/
|
8 |
/*
|
9 |
Plugin Name: Optimize Database after Deleting Revisions
|
10 |
Plugin URI: http://cagewebdev.com/index.php/optimize-database-after-deleting-revisions-wordpress-plugin/
|
11 |
Description: Optimizes the Wordpress Database after Cleaning it out - <a href="options-general.php?page=rvg_odb_admin"><strong>plug in options</strong></a>
|
12 |
Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
|
13 |
-
Version: 2.2.
|
14 |
Author URI: http://cagewebdev.com
|
15 |
*/
|
16 |
?>
|
@@ -971,11 +971,12 @@ function rvg_delete_orphans($display)
|
|
971 |
$post_orphans = 0;
|
972 |
|
973 |
|
974 |
-
// DELETE POST ORPHANS
|
975 |
$sql_delete = "
|
976 |
SELECT COUNT(*) cnt
|
977 |
FROM $wpdb->posts
|
978 |
WHERE ID NOT IN (SELECT post_id FROM $wpdb->postmeta)
|
|
|
979 |
";
|
980 |
|
981 |
$results = $wpdb -> get_results($sql_delete);
|
@@ -986,6 +987,7 @@ function rvg_delete_orphans($display)
|
|
986 |
{ $sql_delete = "
|
987 |
DELETE FROM $wpdb->posts
|
988 |
WHERE ID NOT IN (SELECT post_id FROM $wpdb->postmeta)
|
|
|
989 |
";
|
990 |
$wpdb -> get_results($sql_delete);
|
991 |
}
|
1 |
<?php
|
2 |
+
$odb_version = '2.2.8';
|
3 |
+
$odb_release_date = '03/19/2013';
|
4 |
/**
|
5 |
* @package Optimize Database after Deleting Revisions
|
6 |
+
* @version 2.2.8
|
7 |
*/
|
8 |
/*
|
9 |
Plugin Name: Optimize Database after Deleting Revisions
|
10 |
Plugin URI: http://cagewebdev.com/index.php/optimize-database-after-deleting-revisions-wordpress-plugin/
|
11 |
Description: Optimizes the Wordpress Database after Cleaning it out - <a href="options-general.php?page=rvg_odb_admin"><strong>plug in options</strong></a>
|
12 |
Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
|
13 |
+
Version: 2.2.8
|
14 |
Author URI: http://cagewebdev.com
|
15 |
*/
|
16 |
?>
|
971 |
$post_orphans = 0;
|
972 |
|
973 |
|
974 |
+
// DELETE POST ORPHANS (AUTO DRAFTS)
|
975 |
$sql_delete = "
|
976 |
SELECT COUNT(*) cnt
|
977 |
FROM $wpdb->posts
|
978 |
WHERE ID NOT IN (SELECT post_id FROM $wpdb->postmeta)
|
979 |
+
AND post_status = 'auto-draft'
|
980 |
";
|
981 |
|
982 |
$results = $wpdb -> get_results($sql_delete);
|
987 |
{ $sql_delete = "
|
988 |
DELETE FROM $wpdb->posts
|
989 |
WHERE ID NOT IN (SELECT post_id FROM $wpdb->postmeta)
|
990 |
+
AND post_status = 'auto-draft'
|
991 |
";
|
992 |
$wpdb -> get_results($sql_delete);
|
993 |
}
|