芝麻web文件管理V1.00
编辑当前文件:/home/seolotod/critterchoice.com/wp-content/mu-plugins/object-cache-pro/src/Plugin/Dropin.php
directory}/stubs/object-cache.php"; $result = $wp_filesystem->copy($stub, $dropin, true, FS_CHMOD_FILE); if (function_exists('wp_opcache_invalidate')) { wp_opcache_invalidate($dropin, true); } /** * Filters whether to automatically flush the object after enabling the drop-in. * * @param bool $autoflush Whether to auto-flush the object cache. Default true. */ if ((bool) apply_filters('objectcache_autoflush', true)) { $this->flush(); } return $result; } /** * Attempt to disable the object cache drop-in. * * @return bool */ public function disableDropin() { global $wp_filesystem; if (! \WP_Filesystem()) { return false; } $dropin = \WP_CONTENT_DIR . '/object-cache.php'; if (! $wp_filesystem->exists($dropin)) { return false; } $result = $wp_filesystem->delete($dropin); if (function_exists('wp_opcache_invalidate')) { wp_opcache_invalidate($dropin, true); } /** * Filters whether to automatically flush the object after disabling the drop-in. * * @param bool $autoflush Whether to auto-flush the object cache. Default true. */ if ((bool) apply_filters('objectcache_autoflush', true)) { $this->flush(); } return $result; } /** * Update the object cache drop-in, if it's outdated. * * @param \WP_Upgrader $upgrader * @param array
$options * @return bool|void */ public function maybeUpdateDropin($upgrader, $options) { $this->verifyDropin(); if (! wp_is_file_mod_allowed('object_cache_dropin')) { return; } if ($options['action'] !== 'update' || $options['type'] !== 'plugin') { return; } if (! in_array($this->basename, $options['plugins'] ?? [])) { return; } $diagnostics = $this->diagnostics(); if (! $diagnostics->dropinExists() || ! $diagnostics->dropinIsValid()) { return; } if ($diagnostics->dropinIsUpToDate()) { return; } return $this->enableDropin(); } /** * Verifies the object cache drop-in. * * @return void */ public function verifyDropin() { if (! $this->license()->isValid()) { $this->disableDropin(); } } /** * Initializes and connects the WordPress Filesystem Abstraction classes. * * @return \WP_Filesystem_Base */ protected function wpFilesystem() { global $wp_filesystem; try { require_once \ABSPATH . 'wp-admin/includes/plugin.php'; } catch (Throwable $th) { // } if (! \WP_Filesystem()) { try { require_once \ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php'; require_once \ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php'; } catch (Throwable $th) { // } return new \WP_Filesystem_Direct(null); } return $wp_filesystem; } }