PluginProbe
Autoptimize / 3.1.16
Autoptimize v3.1.16
3.1.16 2.2.2 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.5.0 2.5.1 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 All 108 releases
← All changes | autoptimize.php +12 -7 2.7.5 → 3.1.16 View file →
@@ -1,12 +1,12 @@
1 1 <?php
2 2 /**
3 3 * Plugin Name: Autoptimize
4 - * Plugin URI: https://autoptimize.com/
4 + * Plugin URI: https://autoptimize.com/pro/
5 5 * Description: Makes your site faster by optimizing CSS, JS, Images, Google fonts and more.
6 - * Version: 2.7.5
6 + * Version: 3.1.16
7 7 * Author: Frank Goossens (futtta)
8 - * Author URI: https://autoptimize.com/
8 + * Author URI: https://autoptimize.com/pro/
9 9 * Text Domain: autoptimize
10 10 * License: GPLv2
11 11 * Released under the GNU General Public License (GPL)
12 12 * https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
@@ -20,9 +20,9 @@
20 20 if ( ! defined( 'ABSPATH' ) ) {
21 21 exit;
22 22 }
23 23
24 -define( 'AUTOPTIMIZE_PLUGIN_VERSION', '2.7.5' );
24 +define( 'AUTOPTIMIZE_PLUGIN_VERSION', '3.1.16' );
25 25
26 26 // plugin_dir_path() returns the trailing slash!
27 27 define( 'AUTOPTIMIZE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
28 28 define( 'AUTOPTIMIZE_PLUGIN_FILE', __FILE__ );
@@ -29,9 +29,9 @@
29 29
30 30 // Bail early if attempting to run on non-supported php versions.
31 31 if ( version_compare( PHP_VERSION, '5.6', '<' ) ) {
32 32 function autoptimize_incompatible_admin_notice() {
33 - echo '<div class="error"><p>' . __( 'Autoptimize requires PHP 5.6 (or higher) to function properly. Please upgrade PHP. The Plugin has been auto-deactivated.', 'autoptimize' ) . '</p></div>';
33 + echo '<div class="error"><p>' . esc_html__( 'Autoptimize requires PHP 5.6 (or higher) to function properly. Please upgrade PHP. The Plugin has been auto-deactivated.', 'autoptimize' ) . '</p></div>';
34 34 if ( isset( $_GET['activate'] ) ) {
35 35 unset( $_GET['activate'] );
36 36 }
37 37 }
@@ -43,9 +43,9 @@
43 43 return;
44 44 }
45 45
46 46 function autoptimize_autoload( $class_name ) {
47 - if ( in_array( $class_name, array( 'Minify_HTML', 'JSMin' ) ) ) {
47 + if ( in_array( $class_name, array( 'AO_Minify_HTML', 'JSMin' ) ) ) {
48 48 $file = strtolower( $class_name );
49 49 $file = str_replace( '_', '-', $file );
50 50 $path = dirname( __FILE__ ) . '/classes/external/php/';
51 51 $filepath = $path . $file . '.php';
@@ -64,9 +64,9 @@
64 64 $filepath = $path . $file . '.php';
65 65 }
66 66
67 67 // If we didn't match one of our rules, bail!
68 - if ( ! isset( $filepath ) ) {
68 + if ( ! isset( $filepath ) || ! is_readable( $filepath ) ) {
69 69 return;
70 70 }
71 71
72 72 require $filepath;
@@ -76,8 +76,13 @@
76 76
77 77 // Load WP CLI command(s) on demand.
78 78 if ( defined( 'WP_CLI' ) && WP_CLI ) {
79 79 require AUTOPTIMIZE_PLUGIN_DIR . 'classes/autoptimizeCLI.php';
80 +}
81 +
82 +// filter to disable AO both on front- and backend.
83 +if ( apply_filters( 'autoptimize_filter_disable_plugin', false ) ) {
84 + return;
80 85 }
81 86
82 87 /**
83 88 * Retrieve the instance of the main plugin class.