mirror of
https://gh.wpcy.net/https://github.com/pawankhated/one-click-wordpress-installer.git
synced 2026-04-22 00:39:17 +08:00
25 lines
508 B
PHP
25 lines
508 B
PHP
<?php
|
|
|
|
class Debug_Bar_Object_Cache extends Debug_Bar_Panel {
|
|
function init() {
|
|
$this->title( __( 'Object Cache', 'debug-bar' ) );
|
|
}
|
|
|
|
function prerender() {
|
|
global $wp_object_cache;
|
|
$this->set_visible( is_object( $wp_object_cache ) && method_exists( $wp_object_cache, 'stats' ) );
|
|
}
|
|
|
|
function render() {
|
|
global $wp_object_cache;
|
|
|
|
ob_start();
|
|
echo "<div id='object-cache-stats'>";
|
|
$wp_object_cache->stats();
|
|
echo "</div>";
|
|
$out = ob_get_contents();
|
|
ob_end_clean();
|
|
|
|
echo $out;
|
|
}
|
|
}
|