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 | includes/class-updraft-smush-task.php +14 -15 4.5.3 → 4.7.0 View file →
@@ -152,17 +152,16 @@
152 152 if (!$webp_tools_available) {
153 153 $this->log('There were no WebP conversion tools found on your server.');
154 154 }
155 155
156 - $webp_converter = new WPO_WebP_Convert();
157 - $destination = $webp_converter->get_destination_path($file_path);
156 + $destination = WPO_WebP_Utils::get_destination_path($file_path);
158 157 if ($webp_tools_available && file_exists($destination)) {
159 158 if (is_multisite()) {
160 159 switch_to_blog($this->get_option('blog_id', 1));
161 - update_post_meta($attachment_id, 'wpo-webp-conversion-complete', true);
160 + update_post_meta($attachment_id, WPO_Webp_Convert_Image_Task::WEBP_CONVERSION_META_KEY, true);
162 161 restore_current_blog();
163 162 } else {
164 - update_post_meta($attachment_id, 'wpo-webp-conversion-complete', true);
163 + update_post_meta($attachment_id, WPO_Webp_Convert_Image_Task::WEBP_CONVERSION_META_KEY, true);
165 164 }
166 165 }
167 166
168 167 return $this->success;
@@ -247,9 +246,9 @@
247 246
248 247 // Make path relative and safe for migrations
249 248 $back_up_relative_path = preg_replace('#^'.wp_normalize_path($uploads_dir['basedir'].'/').'#', '', $back_up);
250 249
251 - update_post_meta($this->get_option('attachment_id'), 'original-file', $back_up_relative_path);
250 + update_post_meta($this->get_option('attachment_id'), '_wpo-original-file', $back_up_relative_path);
252 251
253 252 if (is_multisite()) {
254 253 restore_current_blog();
255 254 }
@@ -322,16 +321,16 @@
322 321 );
323 322
324 323 if (is_multisite()) {
325 324 switch_to_blog($this->get_option('blog_id', 1));
326 - update_post_meta($attachment_id, 'smush-complete', true);
327 - update_post_meta($attachment_id, 'smush-info', $info);
328 - update_post_meta($attachment_id, 'smush-stats', $stats);
325 + update_post_meta($attachment_id, '_wpo-smush-complete', true);
326 + update_post_meta($attachment_id, '_wpo-smush-info', $info);
327 + update_post_meta($attachment_id, '_wpo-smush-stats', $stats);
329 328 restore_current_blog();
330 329 } else {
331 - update_post_meta($attachment_id, 'smush-complete', true);
332 - update_post_meta($attachment_id, 'smush-info', $info);
333 - update_post_meta($attachment_id, 'smush-stats', $stats);
330 + update_post_meta($attachment_id, '_wpo-smush-complete', true);
331 + update_post_meta($attachment_id, '_wpo-smush-info', $info);
332 + update_post_meta($attachment_id, '_wpo-smush-stats', $stats);
334 333 }
335 334
336 335 $this->log("Successfully optimized the image - $file_path." . $info);
337 336 $this->set_status('complete');
@@ -353,14 +352,14 @@
353 352 $info = sprintf(__('Failed with error code %1$s - %2$s', 'wp-optimize'), $error_code, $error_message);
354 353
355 354 if (is_multisite()) {
356 355 switch_to_blog($this->get_option('blog_id', 1));
357 - update_post_meta($attachment_id, 'smush-info', $info);
358 - update_post_meta($attachment_id, 'smush-complete', false);
356 + update_post_meta($attachment_id, '_wpo-smush-info', $info);
357 + update_post_meta($attachment_id, '_wpo-smush-complete', false);
359 358 restore_current_blog();
360 359 } else {
361 - update_post_meta($attachment_id, 'smush-info', $info);
362 - update_post_meta($attachment_id, 'smush-complete', false);
360 + update_post_meta($attachment_id, '_wpo-smush-info', $info);
361 + update_post_meta($attachment_id, '_wpo-smush-complete', false);
363 362 }
364 363
365 364
366 365 do_action('ud_smush_task_failed', $this, $error_code, $error_message);