Optimize Database after Deleting Revisions - Version 4.0.3

Version Description

[12/17/2015] = * BUG FIX: Bug fix for Cron Schedules * BUG FIX: Un-installation generated an error * CHANGE: Some minor updates / changes

Download this release

Release Info

Developer cageehv
Plugin Icon 128x128 Optimize Database after Deleting Revisions
Version 4.0.3
Comparing to
See all releases

Code changes from version 4.0.2 to 4.0.3

classes/odb-scheduler.php CHANGED
@@ -28,8 +28,9 @@ class ODB_Scheduler
28
  * http://codex.wordpress.org/Plugin_API/Filter_Reference/cron_schedules
29
  *
30
  * v4.0.1 Localization fixed
 
31
  *******************************************************************************/
32
- function odb_extra_cron_schedules()
33
  {
34
  global $odb_class;
35
 
@@ -110,7 +111,7 @@ class ODB_Scheduler
110
  $time = strtotime($date);
111
  }
112
  else
113
- // 'hourly' OR 'twicedaily': ONE MINUTE DELAY FOR THE FIRST RUN
114
  $time = time();
115
 
116
  return $time;
28
  * http://codex.wordpress.org/Plugin_API/Filter_Reference/cron_schedules
29
  *
30
  * v4.0.1 Localization fixed
31
+ * v4.0.3 ($schedules) added as a parameter
32
  *******************************************************************************/
33
+ function odb_extra_cron_schedules($schedules)
34
  {
35
  global $odb_class;
36
 
111
  $time = strtotime($date);
112
  }
113
  else
114
+ // 'hourly' OR 'twicedaily'
115
  $time = time();
116
 
117
  return $time;
language/rvg-optimize-database-nl_NL.mo CHANGED
Binary file
language/rvg-optimize-database-nl_NL.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Optimize Database after Deleting Revisions v2.8.3\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-11-25 18:44+0100\n"
6
- "PO-Revision-Date: 2015-11-25 18:45+0100\n"
7
  "Last-Translator: Rolf van Gelder <info@cagewebdev.com>\n"
8
  "Language-Team: CAGE <info@cagewebdev.com>\n"
9
  "Language: nl_NL\n"
@@ -275,7 +275,7 @@ msgstr "Verwijder verlopen transiënts"
275
  msgid "Delete pingbacks and trackbacks"
276
  msgstr "Verwijder pingback en trackbacks"
277
 
278
- #: classes/odb-displayer.php:64 includes/settings-page.php:173
279
  msgid "Keep a log"
280
  msgstr "Gebruik een logbestand"
281
 
@@ -433,7 +433,7 @@ msgstr ""
433
  "Klik <a href=\"tools.php?page=rvg-optimize-database\" class=\"odb-bold"
434
  "\">HIER</a> om de optimalisatie te starten"
435
 
436
- #: includes/settings-page.php:130 rvg-optimize-database.php:375
437
  msgid "Settings"
438
  msgstr "Instellingen"
439
 
@@ -446,7 +446,7 @@ msgstr ""
446
  msgid "('0' means: delete <u>ALL</u> revisions)"
447
  msgstr "('0' betekent: verwijder <u>ALLE</u> revisies)"
448
 
449
- #: includes/settings-page.php:179
450
  msgid "Optimize InnoDB tables too"
451
  msgstr "Optimiliseer ook InnoDB tabellen"
452
 
@@ -513,19 +513,19 @@ msgid "Go To Optimizer"
513
  msgstr "Ga naar Optimalisatie"
514
 
515
  # @ rvg-optimize-database
516
- #: rvg-optimize-database.php:347 rvg-optimize-database.php:348
517
- #: rvg-optimize-database.php:362 rvg-optimize-database.php:363
518
- #: rvg-optimize-database.php:405 rvg-optimize-database.php:406
519
- #: rvg-optimize-database.php:424 rvg-optimize-database.php:425
520
  msgid "Optimize Database"
521
  msgstr "Optimaliseer Database"
522
 
523
  # @ optimize_db
524
- #: rvg-optimize-database.php:392
525
  msgid "Optimize DB (1 click)"
526
  msgstr "Optimaliseer DB (1 klik)"
527
 
528
- #: rvg-optimize-database.php:517
529
  msgid "Optimize Database after Deleting Revisions LOG FILE HAS BEEN DELETED"
530
  msgstr "Optimize Database after Deleting Revisions LOGBESTAND VERWIJDERD"
531
 
2
  msgstr ""
3
  "Project-Id-Version: Optimize Database after Deleting Revisions v2.8.3\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2015-12-17 19:02+0100\n"
6
+ "PO-Revision-Date: 2015-12-17 19:02+0100\n"
7
  "Last-Translator: Rolf van Gelder <info@cagewebdev.com>\n"
8
  "Language-Team: CAGE <info@cagewebdev.com>\n"
9
  "Language: nl_NL\n"
275
  msgid "Delete pingbacks and trackbacks"
276
  msgstr "Verwijder pingback en trackbacks"
277
 
278
+ #: classes/odb-displayer.php:64 includes/settings-page.php:179
279
  msgid "Keep a log"
280
  msgstr "Gebruik een logbestand"
281
 
433
  "Klik <a href=\"tools.php?page=rvg-optimize-database\" class=\"odb-bold"
434
  "\">HIER</a> om de optimalisatie te starten"
435
 
436
+ #: includes/settings-page.php:130 rvg-optimize-database.php:379
437
  msgid "Settings"
438
  msgstr "Instellingen"
439
 
446
  msgid "('0' means: delete <u>ALL</u> revisions)"
447
  msgstr "('0' betekent: verwijder <u>ALLE</u> revisies)"
448
 
449
+ #: includes/settings-page.php:173
450
  msgid "Optimize InnoDB tables too"
451
  msgstr "Optimiliseer ook InnoDB tabellen"
452
 
513
  msgstr "Ga naar Optimalisatie"
514
 
515
  # @ rvg-optimize-database
516
+ #: rvg-optimize-database.php:351 rvg-optimize-database.php:352
517
+ #: rvg-optimize-database.php:366 rvg-optimize-database.php:367
518
+ #: rvg-optimize-database.php:409 rvg-optimize-database.php:410
519
+ #: rvg-optimize-database.php:428 rvg-optimize-database.php:429
520
  msgid "Optimize Database"
521
  msgstr "Optimaliseer Database"
522
 
523
  # @ optimize_db
524
+ #: rvg-optimize-database.php:396
525
  msgid "Optimize DB (1 click)"
526
  msgstr "Optimaliseer DB (1 klik)"
527
 
528
+ #: rvg-optimize-database.php:529
529
  msgid "Optimize Database after Deleting Revisions LOG FILE HAS BEEN DELETED"
530
  msgstr "Optimize Database after Deleting Revisions LOGBESTAND VERWIJDERD"
531
 
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.4
11
- Stable tag: 4.0.2
12
- Version: 4.0.2
13
  License: GPLv2 or later
14
 
15
  == Description ==
@@ -86,6 +86,11 @@ 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
  = 4.0.2 [11/28/2015] =
90
  * BUG FIX: Settings weren't saved correctly for MultiSites
91
 
8
  Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
9
  Requires at least: 2.8
10
  Tested up to: 4.4
11
+ Stable tag: 4.0.3
12
+ Version: 4.0.3
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
+ = 4.0.3 [12/17/2015] =
90
+ * BUG FIX: Bug fix for Cron Schedules
91
+ * BUG FIX: Un-installation generated an error
92
+ * CHANGE: Some minor updates / changes
93
+
94
  = 4.0.2 [11/28/2015] =
95
  * BUG FIX: Settings weren't saved correctly for MultiSites
96
 
rvg-optimize-database.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * @package Optimize Database after Deleting Revisions
4
- * @version 4.0.2
5
  */
6
  /*
7
  Plugin Name: Optimize Database after Deleting Revisions
@@ -9,7 +9,7 @@ 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: 4.0.2
13
  */
14
 
15
  /********************************************************************************************
@@ -24,8 +24,8 @@ $odb_class = new OptimizeDatabase();
24
  class OptimizeDatabase
25
  {
26
  // VERSION
27
- var $odb_version = '4.0.2';
28
- var $odb_release_date = '11/28/2015';
29
 
30
  // PLUGIN OPTIONS
31
  var $odb_rvg_options = array();
@@ -112,7 +112,8 @@ class OptimizeDatabase
112
  // LOAD STYLE SHEET (ONLY ON RELEVANT PAGES)
113
  $this_page = '';
114
  if(isset($_GET['page'])) $this_page = $_GET['page'];
115
- if($this_page == 'odb_settings_page' || $this_page == 'rvg-optimize-database')
 
116
  { wp_register_style('odb-style'.$this->odb_version, plugins_url('css/style'.$this->odb_minify.'.css', __FILE__));
117
  wp_enqueue_style('odb-style'.$this->odb_version);
118
  }
@@ -447,6 +448,18 @@ class OptimizeDatabase
447
  } // odb_i18n()
448
 
449
 
 
 
 
 
 
 
 
 
 
 
 
 
450
  /*******************************************************************************
451
  * PLUGIN DE-ACTIVATION
452
  *******************************************************************************/
@@ -462,10 +475,6 @@ class OptimizeDatabase
462
  public static function odb_uninstallation_handler()
463
  { // STOP SCHEDULER
464
  wp_clear_scheduled_hook('odb_scheduler');
465
-
466
- // DELETE OPTIONS FROM DATABASE
467
- $this->odb_multisite_obj->odb_ms_delete_option('odb_rvg_excluded_tabs');
468
- $this->odb_multisite_obj->odb_ms_delete_option('odb_rvg_options');
469
  } // odb_uninstallation_handler()
470
 
471
 
1
  <?php
2
  /**
3
  * @package Optimize Database after Deleting Revisions
4
+ * @version 4.0.3
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: 4.0.3
13
  */
14
 
15
  /********************************************************************************************
24
  class OptimizeDatabase
25
  {
26
  // VERSION
27
+ var $odb_version = '4.0.3';
28
+ var $odb_release_date = '12/17/2015';
29
 
30
  // PLUGIN OPTIONS
31
  var $odb_rvg_options = array();
112
  // LOAD STYLE SHEET (ONLY ON RELEVANT PAGES)
113
  $this_page = '';
114
  if(isset($_GET['page'])) $this_page = $_GET['page'];
115
+ // v4.0.3
116
+ if($this->odb_is_relevant_page())
117
  { wp_register_style('odb-style'.$this->odb_version, plugins_url('css/style'.$this->odb_minify.'.css', __FILE__));
118
  wp_enqueue_style('odb-style'.$this->odb_version);
119
  }
448
  } // odb_i18n()
449
 
450
 
451
+ /*******************************************************************************
452
+ * ARE WE ON A, FOR THIS PLUGIN, RELEVANT PAGE?
453
+ * Since v4.0.3
454
+ *******************************************************************************/
455
+ function odb_is_relevant_page()
456
+ {
457
+ $this_page = '';
458
+ if(isset($_GET['page'])) $this_page = $_GET['page'];
459
+ return ($this_page == 'odb_settings_page' || $this_page == 'rvg-optimize-database');
460
+ } // odb_is_relevant_page()
461
+
462
+
463
  /*******************************************************************************
464
  * PLUGIN DE-ACTIVATION
465
  *******************************************************************************/
475
  public static function odb_uninstallation_handler()
476
  { // STOP SCHEDULER
477
  wp_clear_scheduled_hook('odb_scheduler');
 
 
 
 
478
  } // odb_uninstallation_handler()
479
 
480