Changeset 2362636
- Timestamp:
- 08/17/2020 12:26:18 AM (6 years ago)
- Location:
- wpbase-cache/trunk
- Files:
-
- 2 edited
-
wpbase-cache.php (modified) (1 diff)
-
wpbase-redis-cache.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wpbase-cache/trunk/wpbase-cache.php
r2362525 r2362636 4 4 Plugin URI: https://www.wpoven.com/ 5 5 Description: Custom WordPress Caching plugin for WPOven Hosted Sites which uses all caches on varnish, nginx, php-fpm stack and Redis. 6 Version: 5.5. 336 Version: 5.5.4 7 7 Author: Vikrant Datta 8 8 Author URI: https://www.wpoven.com/ -
wpbase-cache/trunk/wpbase-redis-cache.php
r2362524 r2362636 250 250 } 251 251 252 public function do_admin_actions() { 253 254 global $wp_filesystem; 255 if ( $this->initialize_filesystem( $url, true ) ) { 256 257 if ($_POST['wpbase_cache_options']['redis_cache'] == '1') { 258 update_option('wpbase_cache_options', 'redis_cache', "1"); 259 $wp_filesystem->copy(plugin_dir_path(__FILE__) . '/includes/object-cache.php', WP_CONTENT_DIR . '/object-cache.php', true); 260 do_action( 'redis_object_cache_enable', $result ); 261 } else if ($_POST['wpbase_cache_options']['redis_cache'] == NULL || $_POST['wpbase_cache_options']['redis_cache'] == '0') { 262 update_option('wpbase_cache_options', 'redis_cache', '0'); 263 $wp_filesystem->delete(WP_CONTENT_DIR . '/object-cache.php'); 264 do_action( 'redis_object_cache_disable', $result ); 265 } 252 253 254 public function do_admin_actions() { 255 if(strpos($_SERVER["HTTP_REFERER"], "options-general.php?page=wpbasecache") !== false){ 256 global $wp_filesystem; 257 if ( $this->initialize_filesystem( $url, true ) ) { 258 if ($_POST['wpbase_cache_options']['redis_cache'] == '1') { 259 update_option('wpbase_cache_options', 'redis_cache', "1"); 260 $wp_filesystem->copy(plugin_dir_path(__FILE__) . '/includes/object-cache.php', WP_CONTENT_DIR . '/object-cache.php', true); 261 do_action( 'redis_object_cache_enable', $result ); 262 } else if ($_POST['wpbase_cache_options']['redis_cache'] == NULL || $_POST['wpbase_cache_options']['redis_cache'] == '0') { 263 update_option('wpbase_cache_options', 'redis_cache', '0'); 264 $wp_filesystem->delete(WP_CONTENT_DIR . '/object-cache.php'); 265 do_action( 'redis_object_cache_disable', $result ); 266 } 267 } 266 268 } 267 } 269 } 270 268 271 public function initialize_filesystem( $url, $silent = false ) { 269 272
Note: See TracChangeset
for help on using the changeset viewer.