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-wp-optimize-transients-cache.php +5 -5 3.2.21 → 4.7.0 View file →
@@ -1,7 +1,7 @@
1 1 <?php
2 2
3 -if (!defined('WPO_VERSION')) die('No direct access allowed');
3 +if (!defined('ABSPATH')) die('No direct access allowed');
4 4
5 5 /**
6 6 * Class WP_Optimize_Transients_Cache
7 7 */
@@ -40,9 +40,9 @@
40 40 * @param mixed $value
41 41 * @param int $expiration
42 42 */
43 43 public function set($key, &$value, $expiration = 0) {
44 - $keep_free_mem = $this->_keep_free_mem ? $this->_keep_free_mem : 16 * 1048576;
44 + $keep_free_mem = $this->_keep_free_mem ?: 16 * 1048576;
45 45
46 46 $used_memory = memory_get_usage();
47 47 $free_memory = WP_Optimize()->get_free_memory();
48 48 $released_memory = 0;
@@ -99,11 +99,11 @@
99 99
100 100 /**
101 101 * Set transient.
102 102 *
103 - * @param int $key
104 - * @param mixed $value
105 - * @param int $expiration
103 + * @param string $key
104 + * @param mixed $value
105 + * @param int $expiration
106 106 */
107 107 public function set_transient($key, $value, $expiration = 0) {
108 108 if (WP_Optimize()->is_multisite_mode()) {
109 109 set_site_transient($key, $value, $expiration);