PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.7.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.7.0
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
← All changes | minify/class-wp-optimize-minify-config.php +19 -6 3.4.1 → 4.7.0 View file →
@@ -27,9 +27,9 @@
27 27 *
28 28 * @return bool
29 29 */
30 30 public function is_enabled() {
31 - return $this->get('enabled');
31 + return (bool) $this->get('enabled');
32 32 }
33 33
34 34 /**
35 35 * Removes all Minify settings from the Database if 'preserve_settings_on_uninstall' is false
@@ -48,9 +48,9 @@
48 48
49 49 /**
50 50 * Get config from file or cache
51 51 *
52 - * @param string $option - An option name
52 + * @param ?string $option - An option name
53 53 * @param mixed $default - A default for the option
54 54 * @return array|string
55 55 */
56 56 public function get($option = null, $default = false) {
@@ -118,18 +118,20 @@
118 118 'emoji_removal' => true,
119 119 'merge_google_fonts' => true,
120 120 'enable_display_swap' => true,
121 121 'remove_googlefonts' => false,
122 + 'host_local_google_fonts' => false,
123 + 'disable_google_fonts_processing' => false,
122 124 'gfonts_method' => 'inherit', // inline, async, exclude
123 125 'fawesome_method' => 'inherit', // inline, async, exclude
124 126 'enable_css' => true,
125 127 'enable_css_minification' => true,
126 - 'enable_merging_of_css' => true,
128 + 'enable_merging_of_css' => false,
127 129 'remove_print_mediatypes' => false,
128 130 'inline_css' => false,
129 131 'enable_js' => true,
130 132 'enable_js_minification' => true,
131 - 'enable_merging_of_js' => true,
133 + 'enable_merging_of_js' => false,
132 134 'enable_defer_js' => 'individual',
133 135 'defer_js_type' => 'defer',
134 136 'defer_jquery' => true,
135 137 'enable_js_trycatch' => false,
@@ -136,8 +138,12 @@
136 138 'exclude_defer_login' => true,
137 139 'cdn_url' => '',
138 140 'cdn_force' => false,
139 141
142 + 'enable_delay_js' => false,
143 + 'enable_preload_js' => false,
144 + 'exclude_delay_js' => '',
145 +
140 146 'async_css' => '',
141 147 'async_js' => '',
142 148 'disable_css_inline_merge' => true,
143 149 /**
@@ -157,9 +163,9 @@
157 163 'exclude_css' => '',
158 164 'edit_default_exclutions' => false,
159 165
160 166 'merge_allowed_urls' => '',
161 -
167 +
162 168 // internal
163 169 'enabled' => false,
164 170 'last-cache-update' => 0,
165 171 'plugin_version' => '0.0.0',
@@ -164,8 +170,14 @@
164 170 'last-cache-update' => 0,
165 171 'plugin_version' => '0.0.0',
166 172 'cache_lifespan' => 30,
167 173 'merge_inline_extra_css_js' => true,
174 +
175 + 'enable_analytics' => false,
176 + 'analytics_method' => 'gtagv4',
177 + 'tracking_id' => '',
178 +
179 + 'enable_unused_css' => false,
168 180 );
169 181 return apply_filters('wpo_minify_defaults', $defaults);
170 182 }
171 183
@@ -179,9 +191,10 @@
179 191 * Filters the result of always_purge_everything
180 192 *
181 193 * @return boolean
182 194 */
183 - return apply_filters('wpo_minify_always_purge_everything', 0 === intval($this->get('cache_lifespan')) || (defined('WPO_ADVANCED_CACHE') && defined('WP_CACHE') && WP_CACHE));
195 + $filtered_value = apply_filters('wpo_minify_always_purge_everything', 0 === intval($this->get('cache_lifespan')) || (defined('WPO_ADVANCED_CACHE') && defined('WP_CACHE') && WP_CACHE));
196 + return is_bool($filtered_value) ? $filtered_value : false;
184 197 }
185 198
186 199 /**
187 200 * Get the instance