Version Description
[10/23/2015] = * BUG FIX: Bug fixed for deleting unused tags
Download this release
Release Info
Developer | cageehv |
Plugin | Optimize Database after Deleting Revisions |
Version | 3.4.9 |
Comparing to | |
See all releases |
Code changes from version 3.4.8 to 3.4.9
- readme.txt +6 -3
- rvg-optimize-db.php +10 -9
readme.txt
CHANGED
@@ -7,9 +7,9 @@ Tags: database, delete, revisions, optimize, post, posts, page, pages, clean, cl
|
|
7 |
Author URI: http://cagewebdev.com
|
8 |
Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
|
9 |
Requires at least: 2.8
|
10 |
-
Tested up to: 4.3
|
11 |
-
Stable tag: 3.4.
|
12 |
-
Version: 3.4.
|
13 |
License: GPLv2 or later
|
14 |
|
15 |
== Description ==
|
@@ -86,6 +86,9 @@ http://cagewebdev.com/index.php/wordpress-plugins/
|
|
86 |
* If you run the plugin from any of the sites, it will cleanup ALL the sites in the network!
|
87 |
|
88 |
== Changelog ==
|
|
|
|
|
|
|
89 |
= 3.4.8 [09/14/2015] =
|
90 |
* BUG FIX: Bug fixed for deleting transients
|
91 |
|
7 |
Author URI: http://cagewebdev.com
|
8 |
Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
|
9 |
Requires at least: 2.8
|
10 |
+
Tested up to: 4.3.1
|
11 |
+
Stable tag: 3.4.9
|
12 |
+
Version: 3.4.9
|
13 |
License: GPLv2 or later
|
14 |
|
15 |
== Description ==
|
86 |
* If you run the plugin from any of the sites, it will cleanup ALL the sites in the network!
|
87 |
|
88 |
== Changelog ==
|
89 |
+
= 3.4.9 [10/23/2015] =
|
90 |
+
* BUG FIX: Bug fixed for deleting unused tags
|
91 |
+
|
92 |
= 3.4.8 [09/14/2015] =
|
93 |
* BUG FIX: Bug fixed for deleting transients
|
94 |
|
rvg-optimize-db.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* @package Optimize Database after Deleting Revisions
|
4 |
-
* @version 3.4.
|
5 |
*/
|
6 |
/*
|
7 |
Plugin Name: Optimize Database after Deleting Revisions
|
@@ -9,11 +9,11 @@ Plugin URI: http://cagewebdev.com/index.php/optimize-database-after-deleting-rev
|
|
9 |
Description: Optimizes the Wordpress Database after Cleaning it out
|
10 |
Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
|
11 |
Author URI: http://cagewebdev.com
|
12 |
-
Version: 3.4.
|
13 |
*/
|
14 |
|
15 |
-
$odb_version = '3.4.
|
16 |
-
$odb_release_date = '
|
17 |
|
18 |
// v3.3 - MULTISITE
|
19 |
$odb_ms_prefixes = array();
|
@@ -1621,7 +1621,8 @@ function rvg_delete_spam($results, $display)
|
|
1621 |
*
|
1622 |
* DELETE UNUSED TAGS
|
1623 |
*
|
1624 |
-
* v3.2:
|
|
|
1625 |
*
|
1626 |
********************************************************************************************/
|
1627 |
function rvg_delete_tags()
|
@@ -1636,14 +1637,14 @@ function rvg_delete_tags()
|
|
1636 |
$tags = get_terms('post_tag', array('hide_empty' => 0));
|
1637 |
for($j=0; $j<count($tags); $j++)
|
1638 |
{
|
1639 |
-
if($tags[$
|
1640 |
-
{ if(!rvg_delete_tags_is_scheduled($tags[$
|
1641 |
{ // v3.0: TAG NOT USED IN SCHEDULED POSTS: CAN BE DELETED
|
1642 |
$total_deleted++;
|
1643 |
-
wp_delete_term($tags[$
|
1644 |
}
|
1645 |
}
|
1646 |
-
}
|
1647 |
} // for($i=0; $i<count($odb_ms_blogids); $i++)
|
1648 |
|
1649 |
return $total_deleted;
|
1 |
<?php
|
2 |
/**
|
3 |
* @package Optimize Database after Deleting Revisions
|
4 |
+
* @version 3.4.9
|
5 |
*/
|
6 |
/*
|
7 |
Plugin Name: Optimize Database after Deleting Revisions
|
9 |
Description: Optimizes the Wordpress Database after Cleaning it out
|
10 |
Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
|
11 |
Author URI: http://cagewebdev.com
|
12 |
+
Version: 3.4.9
|
13 |
*/
|
14 |
|
15 |
+
$odb_version = '3.4.9';
|
16 |
+
$odb_release_date = '10/23/2015';
|
17 |
|
18 |
// v3.3 - MULTISITE
|
19 |
$odb_ms_prefixes = array();
|
1621 |
*
|
1622 |
* DELETE UNUSED TAGS
|
1623 |
*
|
1624 |
+
* v3.2: MULTISITE
|
1625 |
+
* v3.4.9: BUG FIX ($i should have been $j)
|
1626 |
*
|
1627 |
********************************************************************************************/
|
1628 |
function rvg_delete_tags()
|
1637 |
$tags = get_terms('post_tag', array('hide_empty' => 0));
|
1638 |
for($j=0; $j<count($tags); $j++)
|
1639 |
{
|
1640 |
+
if($tags[$j]->count < 1)
|
1641 |
+
{ if(!rvg_delete_tags_is_scheduled($tags[$j]->term_id, $odb_ms_prefixes[$i]))
|
1642 |
{ // v3.0: TAG NOT USED IN SCHEDULED POSTS: CAN BE DELETED
|
1643 |
$total_deleted++;
|
1644 |
+
wp_delete_term($tags[$j]->term_id, 'post_tag');
|
1645 |
}
|
1646 |
}
|
1647 |
+
} // for($j=0; $j<count($tags); $j++)
|
1648 |
} // for($i=0; $i<count($odb_ms_blogids); $i++)
|
1649 |
|
1650 |
return $total_deleted;
|