A2 Optimized WP - Version 3.0.2.3

Version Description

= 2.0.10.9 = Important security update. Please upgrade immediately.

= 2.0 = New GPL plugin, now updates are through the wordpress.org repository

Download this release

Release Info

Developer a2hosting
Plugin Icon 128x128 A2 Optimized WP
Version 3.0.2.3
Comparing to
See all releases

Code changes from version 3.0.2.2 to 3.0.2.3

Files changed (3) hide show
  1. a2-optimized.php +2 -2
  2. core/A2_Optimized_CLI.php +8 -46
  3. readme.txt +4 -1
a2-optimized.php CHANGED
@@ -9,7 +9,7 @@
9
  * @wordpress-plugin
10
  * Plugin Name: A2 Optimized WP
11
  * Plugin URI: https://wordpress.org/plugins/a2-optimized/
12
- * Version: 3.0.2.2
13
  * Author: A2 Hosting
14
  * Author URI: https://www.a2hosting.com/
15
  * Description: A2 Optimized - WordPress Optimization Plugin
@@ -119,4 +119,4 @@ function run_a2_optimized() {
119
  }
120
  }
121
 
122
- run_a2_optimized();
9
  * @wordpress-plugin
10
  * Plugin Name: A2 Optimized WP
11
  * Plugin URI: https://wordpress.org/plugins/a2-optimized/
12
+ * Version: 3.0.2.3
13
  * Author: A2 Hosting
14
  * Author URI: https://www.a2hosting.com/
15
  * Description: A2 Optimized - WordPress Optimization Plugin
119
  }
120
  }
121
 
122
+ run_a2_optimized();
core/A2_Optimized_CLI.php CHANGED
@@ -698,56 +698,18 @@ class A2_Optimized_CLI {
698
  */
699
 
700
  public function recommendations($args, $assoc_args) {
701
- $opts = new A2_Optimized_Optimizations;
702
- $action = $args[0];
703
-
704
- $output = 'Recommendations are coming soon.';
705
-
706
- /*
707
- switch ($action) {
708
- case 'show':
709
- $output .= "We would enable the following optimizations:\n";
710
- $optimizations = $opts->get_recommended_optimizations();
711
- foreach ($optimizations as $k => $optimization) {
712
- if (isset($optimization['is_configured'])) {
713
- $optimizations[$k]['is_configured']($optimizations[$k]);
714
- }
715
- }
716
-
717
- $optimization_count = 0;
718
- foreach ($optimizations as $k => $optimization) {
719
- if (!$optimization['configured']) {
720
- if (!isset($optimization['compatibility_issue'])) {
721
- $output .= $optimization['name'] . "\n";
722
- $optimization_count++;
723
- }
724
- }
725
- }
726
-
727
- if ($optimization_count == 0) {
728
- $output = "Site is already optimized!\n\n";
729
- }
730
 
731
- break;
732
- case 'save':
733
- $opts->save_optimizations();
734
- $output .= "Saved current optimizations.\n";
735
 
736
- break;
737
- case 'apply':
738
- echo "Saving current optimizations...\n";
739
- $opts->apply_recommended_optimizations();
740
- $output .= "Recommended optimizations have been applied.\n";
741
 
742
- break;
743
- case 'restore':
744
- $opts->restore_optimizations();
745
- $output .= "Restored previous optimization state.\n";
746
-
747
- break;
748
  }
749
- */
750
-
751
  echo $output;
752
  }
753
  }
698
  */
699
 
700
  public function recommendations($args, $assoc_args) {
701
+ if(file_exists('/opt/a2-optimized/wordpress/class.A2_Optimized_Private_Optimizations_v3.php')){
702
+ require_once('/opt/a2-optimized/wordpress/class.A2_Optimized_Private_Optimizations_v3.php');
703
+ $private_opts = new A2_Optimized_Private_Optimizations;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
704
 
705
+ $action = $args[0];
 
 
 
706
 
707
+ $output = $private_opts->apply_recommendation($action);
 
 
 
 
708
 
709
+ } else {
710
+ $output = "Not available";
 
 
 
 
711
  }
712
+
 
713
  echo $output;
714
  }
715
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: a2hosting, supersoju
3
  Tags: a2 hosting, cache, caching, speed, fast, optimize, site performance, image optimization, image compression, site security, seo, gzip compression, minify code, code minification
4
  Requires at least: 5.1
5
  Tested up to: 6.1
6
- Stable tag: 3.0.2.2
7
  Requires PHP: 5.6
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -150,6 +150,9 @@ Yes. A2 Optimized works on any host that supports WordPress; however, A2 Hostin
150
 
151
  == Changelog ==
152
 
 
 
 
153
  = 3.0.2.2 =
154
  * Small QoL improvements
155
 
3
  Tags: a2 hosting, cache, caching, speed, fast, optimize, site performance, image optimization, image compression, site security, seo, gzip compression, minify code, code minification
4
  Requires at least: 5.1
5
  Tested up to: 6.1
6
+ Stable tag: 3.0.2.3
7
  Requires PHP: 5.6
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
150
 
151
  == Changelog ==
152
 
153
+ = 3.0.2.2 =
154
+ * Small update for A2 hosting customers
155
+
156
  = 3.0.2.2 =
157
  * Small QoL improvements
158