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 | compatibility/class-wpo-translatepress-compatibility.php +2 -3 3.4.2 → 4.7.0 View file →
@@ -12,11 +12,8 @@
12 12 /**
13 13 * Constructor.
14 14 */
15 15 private function __construct() {
16 - // Bail out if TranslatePress is not active
17 - if (!class_exists('TRP_Translate_Press')) return;
18 -
19 16 // Using the TranslatePress instance retrieve the settings
20 17 $this->trp_settings = TRP_Translate_Press::get_trp_instance()->get_component('settings')->get_settings();
21 18 // Add action hooks to delete cache for all languages
22 19 add_action('wpo_single_post_cache_deleted', array($this, 'translatepress_delete_post_cache_for_all_languages'));
@@ -54,8 +51,9 @@
54 51 // Build url using the url-slugs and the path of the deleted post
55 52 $possible_lang_url = $homepage_url. '/' . $value . $post_path;
56 53 WPO_Page_Cache::delete_cache_by_url($possible_lang_url);
57 54 }
55 + if (!empty($url_slugs)) WPO_Page_Cache::instance()->file_log("Cache for associated TranslatePress translation posts for Title: {{title}} have been purged", $deleted_post_id);
58 56 }
59 57
60 58 /**
61 59 * Deletes cache files for all connected languages for a post feed.
@@ -74,7 +72,8 @@
74 72 // Build url using the url-slugs and the path of the deleted post
75 73 $possible_lang_url = $homepage_url.'/'. $value . untrailingslashit($post_path) . '/feed/';
76 74 WPO_Page_Cache::delete_cache_by_url($possible_lang_url);
77 75 }
76 + if (!empty($url_slugs)) WPO_Page_Cache::instance()->file_log("Cache for associated TranslatePress translation posts' feeds for Title: {{title}} have been purged", $deleted_post_id);
78 77 }
79 78 }
80 79 endif;