| @@ -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); |