Version Description
[02/21/2015] = * NEW: showing the icon in the admin menu is now configurable via the settings page
Download this release
Release Info
Developer | cageehv |
Plugin | Optimize Database after Deleting Revisions |
Version | 3.1.3 |
Comparing to | |
See all releases |
Code changes from version 3.1.2 to 3.1.3
- readme.txt +10 -7
- rvg-optimize-db.php +79 -10
readme.txt
CHANGED
@@ -8,8 +8,8 @@ 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.1.1
|
11 |
-
Stable tag: 3.1.
|
12 |
-
Version: 3.1.
|
13 |
License: GPLv2 or later
|
14 |
|
15 |
== Description ==
|
@@ -28,9 +28,10 @@ This plugin is a 'One Click' WordPress Database Cleaner / Optimizer.
|
|
28 |
* Creates a log file of the optimizations (optional)
|
29 |
* Optimization can be scheduled to automatically run once hourly, twice daily, once daily or once weekly at a specific time (optional)
|
30 |
* 'Optimize DB (1 click)' link in the admin bar (optional)
|
|
|
31 |
|
32 |
= Settings =
|
33 |
-
You can find the settings page in the WP Admin Panel » Optimize Database
|
34 |
|
35 |
= Starting the Optimization =
|
36 |
You can start the Optimization in the WP Admin Panel » Optimize Database.<br />
|
@@ -62,11 +63,13 @@ http://cagewebdev.com/index.php/wordpress-plugins/
|
|
62 |
|
63 |
* Upload the Plugin to the `/wp-content/plugins/` directory
|
64 |
* Activate the plugin in the WP Admin Panel » Plugins
|
65 |
-
* Change the settings (if needed) in the WP Admin Panel » Settings » Optimize
|
66 |
|
67 |
== Changelog ==
|
68 |
-
= 3.1.
|
|
|
69 |
|
|
|
70 |
* BUG FIX: fixed the link to the settings page
|
71 |
|
72 |
= 3.1.1 [02/20/2015] =
|
@@ -252,10 +255,10 @@ http://cagewebdev.com/index.php/wordpress-plugins/
|
|
252 |
== Frequently Asked Questions ==
|
253 |
|
254 |
= How can I change the settings of this plugin? =
|
255 |
-
* WP Admin Panel »
|
256 |
|
257 |
= How do I run this plugin? =
|
258 |
-
* WP Admin Panel » Optimize Database. Then click the 'Start Optimization'-button
|
259 |
* Click the 'Optimize DB (1 click)' link in the Admin Bar (if enabled)
|
260 |
|
261 |
= Why do I see 'Table does not support optimize, doing recreate + analyze instead' while optimizing my database? =
|
8 |
Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
|
9 |
Requires at least: 2.8
|
10 |
Tested up to: 4.1.1
|
11 |
+
Stable tag: 3.1.3
|
12 |
+
Version: 3.1.3
|
13 |
License: GPLv2 or later
|
14 |
|
15 |
== Description ==
|
28 |
* Creates a log file of the optimizations (optional)
|
29 |
* Optimization can be scheduled to automatically run once hourly, twice daily, once daily or once weekly at a specific time (optional)
|
30 |
* 'Optimize DB (1 click)' link in the admin bar (optional)
|
31 |
+
* 'Optimize Database' Icon in the admin menu (optional)
|
32 |
|
33 |
= Settings =
|
34 |
+
You can find the settings page in the WP Admin Panel » Optimize Database -or- via the WP Admin Panel » Optimize Database icon (depends on settings)
|
35 |
|
36 |
= Starting the Optimization =
|
37 |
You can start the Optimization in the WP Admin Panel » Optimize Database.<br />
|
63 |
|
64 |
* Upload the Plugin to the `/wp-content/plugins/` directory
|
65 |
* Activate the plugin in the WP Admin Panel » Plugins
|
66 |
+
* Change the settings (if needed) in the WP Admin Panel » Settings » Optimize Database -or- via the WP Admin Panel » Optimize Database icon (depends on settings)
|
67 |
|
68 |
== Changelog ==
|
69 |
+
= 3.1.3 [02/21/2015] =
|
70 |
+
* NEW: showing the icon in the admin menu is now configurable via the settings page
|
71 |
|
72 |
+
= 3.1.2 [02/20/2015] =
|
73 |
* BUG FIX: fixed the link to the settings page
|
74 |
|
75 |
= 3.1.1 [02/20/2015] =
|
255 |
== Frequently Asked Questions ==
|
256 |
|
257 |
= How can I change the settings of this plugin? =
|
258 |
+
* Change the settings in the WP Admin Panel » Settings » Optimize Database -or- via the WP Admin Panel » Optimize Database icon (depends on settings)
|
259 |
|
260 |
= How do I run this plugin? =
|
261 |
+
* WP Admin Panel » Optimize Database. Then click the 'Start Optimization'-button -or- via the WP Admin Panel » Optimize Database icon (depends on settings)
|
262 |
* Click the 'Optimize DB (1 click)' link in the Admin Bar (if enabled)
|
263 |
|
264 |
= Why do I see 'Table does not support optimize, doing recreate + analyze instead' while optimizing my database? =
|
rvg-optimize-db.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
-
$odb_version = '3.1.
|
3 |
-
$odb_release_date = '02/
|
4 |
/**
|
5 |
* @package Optimize Database after Deleting Revisions
|
6 |
-
* @version 3.1.
|
7 |
*/
|
8 |
/*
|
9 |
Plugin Name: Optimize Database after Deleting Revisions
|
@@ -11,7 +11,7 @@ Plugin URI: http://cagewebdev.com/index.php/optimize-database-after-deleting-rev
|
|
11 |
Description: Optimizes the Wordpress Database after Cleaning it out
|
12 |
Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
|
13 |
Author URI: http://cagewebdev.com
|
14 |
-
Version: 3.1.
|
15 |
*/
|
16 |
|
17 |
/********************************************************************************************
|
@@ -30,30 +30,84 @@ add_action('init', 'rvg_odb_action_init');
|
|
30 |
|
31 |
/********************************************************************************************
|
32 |
|
33 |
-
ADD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
*********************************************************************************************/
|
36 |
function rvg_add_menu_page()
|
37 |
{
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
-
add_action(
|
41 |
|
42 |
|
43 |
/********************************************************************************************
|
44 |
|
45 |
-
ADD THE 'OPTIMIZE DB SETTINGS' ITEM TO THE SETTINGS MENU
|
46 |
|
47 |
*********************************************************************************************/
|
48 |
function rvg_odb_admin_menu()
|
49 |
{
|
50 |
if (function_exists('add_options_page'))
|
51 |
-
{ add_options_page(
|
|
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
}
|
54 |
-
add_action(
|
55 |
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
/********************************************************************************************
|
58 |
*
|
59 |
* SHOW A LINK TO THE PLUGIN SETTINGS ON THE MAIN PLUGINS PAGE (v3.1)
|
@@ -207,6 +261,12 @@ function rvg_odb_settings_page()
|
|
207 |
if(isset($_POST['rvg_odb_adminbar']))
|
208 |
$rvg_odb_adminbar = $_POST['rvg_odb_adminbar'];
|
209 |
update_option('rvg_odb_adminbar', $rvg_odb_adminbar);
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
|
211 |
$rvg_odb_logging_on = 'N';
|
212 |
if(isset($_POST['rvg_odb_logging_on']))
|
@@ -286,6 +346,9 @@ function rvg_odb_settings_page()
|
|
286 |
|
287 |
$rvg_odb_adminbar = get_option('rvg_odb_adminbar');
|
288 |
if(!$rvg_odb_adminbar) $rvg_odb_adminbar = 'N';
|
|
|
|
|
|
|
289 |
?>
|
290 |
<script type="text/javascript">
|
291 |
function schedule_changed()
|
@@ -317,6 +380,7 @@ function schedule_changed()
|
|
317 |
<h2><?php echo __('Optimize Database after Deleting Revisions - Settings','rvg-optimize-database');?></h2>
|
318 |
<?php
|
319 |
if($rvg_odb_adminbar == 'Y') $rvg_odb_adminbar_checked = ' checked="checked"'; else $rvg_odb_adminbar_checked = '';
|
|
|
320 |
if($rvg_clear_trash == 'Y') $rvg_clear_trash_checked = ' checked="checked"'; else $rvg_clear_trash_checked = '';
|
321 |
if($rvg_clear_spam == 'Y') $rvg_clear_spam_checked = ' checked="checked"'; else $rvg_clear_spam_checked = '';
|
322 |
if($rvg_clear_tags == 'Y') $rvg_clear_tags_checked = ' checked="checked"'; else $rvg_clear_tags_checked = '';
|
@@ -394,6 +458,11 @@ if($rvg_odb_logging_on == 'Y') $rvg_odb_logging_on_checked = ' checked="checke
|
|
394 |
<td valign="top"><input name="rvg_odb_adminbar" type="checkbox" value="Y" <?php echo $rvg_odb_adminbar_checked?> />
|
395 |
<?php echo __('(change will be visible after loading the next page)','rvg-optimize-database');?></td>
|
396 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
397 |
</table></td>
|
398 |
</tr>
|
399 |
<?php
|
1 |
<?php
|
2 |
+
$odb_version = '3.1.3';
|
3 |
+
$odb_release_date = '02/21/2015';
|
4 |
/**
|
5 |
* @package Optimize Database after Deleting Revisions
|
6 |
+
* @version 3.1.3
|
7 |
*/
|
8 |
/*
|
9 |
Plugin Name: Optimize Database after Deleting Revisions
|
11 |
Description: Optimizes the Wordpress Database after Cleaning it out
|
12 |
Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
|
13 |
Author URI: http://cagewebdev.com
|
14 |
+
Version: 3.1.3
|
15 |
*/
|
16 |
|
17 |
/********************************************************************************************
|
30 |
|
31 |
/********************************************************************************************
|
32 |
|
33 |
+
ADD THE 'OPTIMIZE DATABASE' ITEM TO THE TOOLS MENU
|
34 |
+
|
35 |
+
*********************************************************************************************/
|
36 |
+
function optimize_db_main()
|
37 |
+
{ if (function_exists('add_management_page'))
|
38 |
+
{ add_management_page(
|
39 |
+
__('Optimize Database','rvg-optimize-database'),
|
40 |
+
__('Optimize Database','rvg-optimize-database'),
|
41 |
+
'administrator',
|
42 |
+
'rvg-optimize-db.php',
|
43 |
+
'rvg_optimize_db');
|
44 |
+
}
|
45 |
+
}
|
46 |
+
if(get_option('rvg_odb_adminmenu') != "Y") add_action('admin_menu', 'optimize_db_main');
|
47 |
+
|
48 |
+
|
49 |
+
/********************************************************************************************
|
50 |
+
|
51 |
+
'ICON MODE': ADD A LINK TO THE ADMIN MENU (v3.1.3)
|
52 |
|
53 |
*********************************************************************************************/
|
54 |
function rvg_add_menu_page()
|
55 |
{
|
56 |
+
if (function_exists('add_menu_page'))
|
57 |
+
{
|
58 |
+
add_menu_page(
|
59 |
+
__('Optimize Database','rvg-optimize-database'),
|
60 |
+
__('Optimize Database','rvg-optimize-database'),
|
61 |
+
'administrator',
|
62 |
+
'rvg-optimize-db.php',
|
63 |
+
'rvg_optimize_db',
|
64 |
+
plugins_url('rvg-optimize-database/images/icon.png')
|
65 |
+
);
|
66 |
+
}
|
67 |
}
|
68 |
+
if(get_option('rvg_odb_adminmenu') == "Y") add_action('admin_menu', 'rvg_add_menu_page');
|
69 |
|
70 |
|
71 |
/********************************************************************************************
|
72 |
|
73 |
+
ADD THE 'OPTIMIZE DB SETTINGS' ITEM TO THE SETTINGS MENU (v3.1.3)
|
74 |
|
75 |
*********************************************************************************************/
|
76 |
function rvg_odb_admin_menu()
|
77 |
{
|
78 |
if (function_exists('add_options_page'))
|
79 |
+
{ add_options_page(
|
80 |
+
__('Optimize Database', 'rvg-optimize-database'),
|
81 |
+
__('Optimize Database', 'rvg-optimize-database'),
|
82 |
+
'manage_options',
|
83 |
+
'rvg_odb_admin',
|
84 |
+
'rvg_odb_settings_page');
|
85 |
}
|
86 |
}
|
87 |
+
if(get_option('rvg_odb_adminmenu') != "Y") add_action('admin_menu', 'rvg_odb_admin_menu');
|
88 |
|
89 |
|
90 |
+
/********************************************************************************************
|
91 |
+
|
92 |
+
'ICON MODE': REGISTER OPTION PAGE BUT HIDE IT FROM THE ADMIN MENU (v3.1.3)
|
93 |
+
|
94 |
+
*********************************************************************************************/
|
95 |
+
function register_odb_options()
|
96 |
+
{
|
97 |
+
if (function_exists('add_submenu_page'))
|
98 |
+
{ add_submenu_page(
|
99 |
+
null, // HIDE FROM MENU!
|
100 |
+
__('Optimize Database', 'rvg-optimize-database'),
|
101 |
+
__('Optimize Database', 'rvg-optimize-database'),
|
102 |
+
'manage_options',
|
103 |
+
'rvg_odb_admin',
|
104 |
+
'rvg_odb_settings_page'
|
105 |
+
);
|
106 |
+
}
|
107 |
+
}
|
108 |
+
if(get_option('rvg_odb_adminmenu') == "Y") add_action('admin_menu', 'register_odb_options');
|
109 |
+
|
110 |
+
|
111 |
/********************************************************************************************
|
112 |
*
|
113 |
* SHOW A LINK TO THE PLUGIN SETTINGS ON THE MAIN PLUGINS PAGE (v3.1)
|
261 |
if(isset($_POST['rvg_odb_adminbar']))
|
262 |
$rvg_odb_adminbar = $_POST['rvg_odb_adminbar'];
|
263 |
update_option('rvg_odb_adminbar', $rvg_odb_adminbar);
|
264 |
+
|
265 |
+
// v3.1.3
|
266 |
+
$rvg_odb_adminmenu = 'N';
|
267 |
+
if(isset($_POST['rvg_odb_adminmenu']))
|
268 |
+
$rvg_odb_adminmenu = $_POST['rvg_odb_adminmenu'];
|
269 |
+
update_option('rvg_odb_adminmenu', $rvg_odb_adminmenu);
|
270 |
|
271 |
$rvg_odb_logging_on = 'N';
|
272 |
if(isset($_POST['rvg_odb_logging_on']))
|
346 |
|
347 |
$rvg_odb_adminbar = get_option('rvg_odb_adminbar');
|
348 |
if(!$rvg_odb_adminbar) $rvg_odb_adminbar = 'N';
|
349 |
+
|
350 |
+
$rvg_odb_adminmenu = get_option('rvg_odb_adminmenu');
|
351 |
+
if(!$rvg_odb_adminmenu) $rvg_odb_adminmenu = 'N';
|
352 |
?>
|
353 |
<script type="text/javascript">
|
354 |
function schedule_changed()
|
380 |
<h2><?php echo __('Optimize Database after Deleting Revisions - Settings','rvg-optimize-database');?></h2>
|
381 |
<?php
|
382 |
if($rvg_odb_adminbar == 'Y') $rvg_odb_adminbar_checked = ' checked="checked"'; else $rvg_odb_adminbar_checked = '';
|
383 |
+
if($rvg_odb_adminmenu == 'Y') $rvg_odb_adminmenu_checked = ' checked="checked"'; else $rvg_odb_adminmenu_checked = '';
|
384 |
if($rvg_clear_trash == 'Y') $rvg_clear_trash_checked = ' checked="checked"'; else $rvg_clear_trash_checked = '';
|
385 |
if($rvg_clear_spam == 'Y') $rvg_clear_spam_checked = ' checked="checked"'; else $rvg_clear_spam_checked = '';
|
386 |
if($rvg_clear_tags == 'Y') $rvg_clear_tags_checked = ' checked="checked"'; else $rvg_clear_tags_checked = '';
|
458 |
<td valign="top"><input name="rvg_odb_adminbar" type="checkbox" value="Y" <?php echo $rvg_odb_adminbar_checked?> />
|
459 |
<?php echo __('(change will be visible after loading the next page)','rvg-optimize-database');?></td>
|
460 |
</tr>
|
461 |
+
<tr>
|
462 |
+
<td align="right" valign="top"><span class="odb-bold"><?php echo __('Show an icon in the Admin Menu','rvg-optimize-database');?></span></td>
|
463 |
+
<td valign="top"><input name="rvg_odb_adminmenu" type="checkbox" value="Y" <?php echo $rvg_odb_adminmenu_checked?> />
|
464 |
+
<?php echo __('(change will be visible after loading the next page)','rvg-optimize-database');?></td>
|
465 |
+
</tr>
|
466 |
</table></td>
|
467 |
</tr>
|
468 |
<?php
|