get_all_settings(); if ( empty( $s['cache_debug_enabled'] ) ) { return false; } if ( current_user_can( 'manage_options' ) ) { return true; } $secret = isset( $s['cache_debug_secret'] ) ? (string) $s['cache_debug_secret'] : ''; $debug_key = isset( $_GET['qwsc_key'] ) ? sanitize_text_field( wp_unslash( $_GET['qwsc_key'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Secret-key authentication, not a state-changing request. if ( $secret && '' !== $debug_key && hash_equals( $secret, $debug_key ) ) { return true; } return false; } public function footer() { if ( ! self::active() ) { return; } $st = Status::get(); $stats = Stats::get(); $s = \QWSpeedCache\Plugin::instance()->get_all_settings(); echo "\n\n"; } }