Changeset 2362524
- Timestamp:
- 08/16/2020 07:24:10 PM (6 years ago)
- File:
-
- 1 edited
-
wpbase-cache/trunk/wpbase-redis-cache.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wpbase-cache/trunk/wpbase-redis-cache.php
r2361544 r2362524 250 250 } 251 251 252 public function do_admin_actions() { 253 254 global $wp_filesystem; 255 if ($_POST['wpbase_cache_options']['redis_cache'] == '1') { 256 update_option('wpbase_cache_options', 'redis_cache', "1"); 257 $wp_filesystem->copy(plugin_dir_path(__FILE__) . '/includes/object-cache.php', WP_CONTENT_DIR . '/object-cache.php', true); 258 //do_action( 'redis_object_cache_enable', $result ); 259 } else if ($_POST['wpbase_cache_options']['redis_cache'] == NULL || $_POST['wpbase_cache_options']['redis_cache'] == '0') { 260 update_option('wpbase_cache_options', 'redis_cache', '0'); 261 $wp_filesystem->delete(WP_CONTENT_DIR . '/object-cache.php'); 262 //do_action( 'redis_object_cache_disable', $result ); 263 } 264 } 265 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 } 266 } 267 } 266 268 public function initialize_filesystem( $url, $silent = false ) { 267 269
Note: See TracChangeset
for help on using the changeset viewer.