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 | vendor/team-updraft/lib-central/central/wp-optimize.php +11 -5 3.7.0 → 4.7.0 View file →
@@ -36,13 +36,9 @@
36 36 * Class constructor
37 37 */
38 38 public function __construct() {
39 39 parent::__construct();
40 -
41 - // Load wp-optimize translations
42 - if (defined('UPDRAFTCENTRAL_CLIENT_DIR') && file_exists(UPDRAFTCENTRAL_CLIENT_DIR.'/translations-central.php')) {
43 - $this->translations = include_once(UPDRAFTCENTRAL_CLIENT_DIR.'/translations-central.php');
44 - }
40 + add_action('updraftplus_load_translations_for_udcentral', array($this, 'load_updraftplus_translations'));
45 41 }
46 42
47 43 /**
48 44 * Whether the current user can perform key control AJAX actions
@@ -132,8 +128,18 @@
132 128 if ($wp_optimize) {
133 129 if (is_callable(array($wp_optimize, 'log'))) {
134 130 call_user_func(array($wp_optimize, 'log'), $line);
135 131 }
132 + }
133 + }
134 +
135 + /**
136 + * Load translations which are based on UpdraftPlus domain text
137 + */
138 + public function load_updraftplus_translations() {
139 + // Load wp-optimize translations
140 + if (defined('UPDRAFTCENTRAL_CLIENT_DIR') && file_exists(UPDRAFTCENTRAL_CLIENT_DIR.'/translations-central.php')) {
141 + $this->translations = include(UPDRAFTCENTRAL_CLIENT_DIR.'/translations-central.php');
136 142 }
137 143 }
138 144
139 145 /**