Server IP : 162.213.251.208 / Your IP : 18.118.166.47 Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : jmoroovq ( 1890) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/jmoroovq/mariowesser.com/wp-content/mu-plugins/object-cache-pro/src/Plugin/templates/widgets/ |
Upload File : |
<?php $license = $this->license(); $diagnostics = $this->diagnostics(); $usingRelayCache = $diagnostics->usingRelayCache(); $status = $diagnostics['general']['status']->html; $dropin = $diagnostics['general']['dropin']->html; $evictionPolicy = $diagnostics['general']['eviction-policy']; $redisKeys = $diagnostics['statistics']['redis-keys']; $redisMemory = $diagnostics['statistics']['redis-memory']; $relayKeys = $diagnostics['statistics']['relay-keys'] ?? false; $relayMemory = $diagnostics['statistics']['relay-memory'] ?? false; $configError = $this->config->initException ?? false; $configDefined = defined('\WP_REDIS_CONFIG'); $configDefinedTooLate = $this->lazyAssConfig(); $networkFlushing = is_multisite() && $this->config->network_flush !== $this->config::NETWORK_FLUSH_ALL; $isDisabled = $diagnostics->isDisabled(); $dropinExists = $diagnostics->dropinExists(); $dropinIsValid = $dropinExists && $diagnostics->dropinIsValid(); $dropinIsUpToDate = $dropinExists && $diagnostics->dropinIsUpToDate(); $fileModsAllowed = wp_is_file_mod_allowed('object_cache_dropin'); $admin_nonce_url = function ($action) { $function = is_network_admin() ? 'network_admin_url' : 'admin_url'; $onDashboard = get_current_screen()->id !== $this->screenId; $url = $function( add_query_arg( $onDashboard ? 'objectcache-action' : 'action', $action, $onDashboard ? 'index.php' : $this->baseurl ) ); return wp_nonce_url($url, $action); }; ?> <div class="objectcache:widget objectcache:overview-widget"> <ul> <li> <span class="dashicons dashicons-performance"></span> Status: <?php echo $status; ?> </li> <li> <span class="dashicons dashicons-admin-plugins"></span> Drop-in: <?php echo $dropin; ?> </li> <?php if (! $license->isValid()) : ?> <li> <span class="dashicons dashicons-admin-network"></span> License: <data class="error"> <?php if (! $this->token()) : ?> Missing token <?php else : ?> <?php echo ucwords($license->state() ?? 'error'); ?> <?php endif; ?> </data> </li> <?php endif; ?> <?php if ($evictionPolicy->hasValue() && $evictionPolicy->hasIssue()) : ?> <li> <span class="dashicons dashicons-admin-settings"></span> Eviction: <?php echo $evictionPolicy->html; ?> </li> <?php endif; ?> <?php if ($this->config->shared && $redisKeys->hasValue()) : ?> <li> <span class="dashicons dashicons-database"></span> Cache: <?php printf(_n('%s object', '%s objects', $redisKeys->value), number_format($redisKeys->value)); ?> </li> <?php elseif ($redisMemory->hasValue()): ?> <li title="<?php if ($redisKeys->hasValue()) : printf(_n('%s object', '%s objects', $redisKeys->value), number_format($redisKeys->value)); endif; ?>"> <span class="dashicons dashicons-database"></span> Cache: <?php echo $redisMemory->html; ?> </li> <?php endif; ?> <?php if ($usingRelayCache) : ?> <?php if ($this->config->shared && $relayKeys->hasValue()) : ?> <li> <span class="dashicons dashicons-database-add"></span> Relay: <?php printf(_n('%s object', '%s objects', $relayKeys->value), number_format($relayKeys->value)); ?> </li> <?php elseif ($relayMemory->hasValue()): ?> <li title="<?php if ($relayKeys->hasValue()) : printf(_n('%s object', '%s objects', $relayKeys->value), number_format($relayKeys->value)); endif; ?>"> <span class="dashicons dashicons-database-add"></span> Relay: <?php echo $relayMemory->html; ?> </li> <?php endif; ?> <?php endif; ?> </ul> <div class="actions"> <?php if (! $isDisabled && $dropinExists && $dropinIsValid && $diagnostics->ping()) : ?> <?php $flushText = is_network_admin() ? 'Flush Network Cache' : ($networkFlushing ? 'Flush Site Cache' : 'Flush Cache'); ?> <?php $flushAction = is_network_admin() ? 'flush-network-cache' : ($networkFlushing ? 'flush-site-cache' : 'flush-cache'); ?> <?php if ($license->isValid()) : ?> <a class="button button-primary" href="<?php echo $admin_nonce_url($flushAction); ?>" > <?php echo $flushText; ?> </a> <?php else : ?> <a class="button button-primary" href="#!" disabled> <?php echo $flushText; ?> </a> <?php endif; ?> <?php endif; ?> <?php if ($fileModsAllowed && (! is_multisite() || is_network_admin())) : ?> <?php if (! $dropinExists || ! $dropinIsValid) : ?> <?php if ($configDefined && ! $configDefinedTooLate && $license->isValid()) : ?> <a class="button button-primary" href="<?php echo $admin_nonce_url('enable-dropin'); ?>" > Enable Cache </a> <?php else : ?> <a class="button button-primary" href="#!" disabled> Enable Cache </a> <?php endif; ?> <?php elseif ($dropinIsValid && ! $dropinIsUpToDate) : ?> <a class="button button-secondary" href="<?php echo $admin_nonce_url('update-dropin'); ?>" > Update Drop-in </a> <?php endif; ?> <?php if ($dropinExists && $dropinIsValid && ! $isDisabled) : ?> <a class="button button-secondary button-ml-auto" onclick="return confirm('Are you sure you want to disable the object cache?')" href="<?php echo $admin_nonce_url('disable-dropin'); ?>" > Disable </a> <?php endif; ?> <?php endif; ?> </div> </div> <?php if ($isDisabled) : ?> <div class="objectcache:widget-sub"> <?php if ($diagnostics->isDisabledUsingConstant()) : ?> <p> The object cache is disabled using the <code>WP_REDIS_DISABLED</code> constant. </p> <?php elseif ($diagnostics->isDisabledUsingEnvVar()) : ?> <p> The object cache is currently disabled using the <code>WP_REDIS_DISABLED</code> environment variable. </p> <?php endif; ?> </div> <?php elseif (! $configDefined) : ?> <div class="objectcache:widget-sub"> <p> To enable the object cache, set up the <code>WP_REDIS_CONFIG</code> constant. </p> </div> <?php elseif ($configDefined && $configDefinedTooLate) : ?> <div class="objectcache:widget-sub"> <p> The <code>WP_REDIS_CONFIG</code> constant was defined too late. Try moving it to the top of the configuration file. </p> </div> <?php elseif ($configError) : ?> <div class="objectcache:widget-sub"> <p> An error occurred during the instantiation of the configuration: </p> <ul> <li><code><?php echo esc_html($configError->getMessage()); ?></code></li> </ul> </div> <?php elseif (! empty($wp_object_cache_errors)) : ?> <div class="objectcache:widget-sub"> <p> <?php if (count($wp_object_cache_errors) > 1) : ?> <?php echo count($wp_object_cache_errors); ?> object cache errors have occurred: <?php else : ?> An object cache error has occurred: <?php endif; ?> </p> <ul> <?php foreach (array_slice($wp_object_cache_errors, 0, 3) as $error) : ?> <li><code><?php echo esc_html($error); ?></code></li> <?php endforeach; ?> </ul> </div> <?php elseif (! $this->token()) : ?> <div class="objectcache:widget-sub"> <p> Automatic updates for Object Cache Pro are disabled, because no license token is set. </p> </div> <?php elseif (! $license->isValid()) : ?> <div class="objectcache:widget-sub"> <p> Automatic updates for Object Cache Pro are disabled, because the license token is not valid. </p> </div> <?php endif; ?> <script> if (history.replaceState) { location.href.indexOf('objectcache-status') > -1 && history.replaceState({}, document.title, location.href.replace(/\?objectcache-status=[\w-]+$/, '')); location.href.indexOf('page=objectcache') > -1 && history.replaceState({}, document.title, location.href.replace(/&status=[\w-]+/, '')); } </script>