Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/wp-rocket/inc/API/bypass.php

Keine Baseline-Datei – Diff nur gegen leer.
Zur Liste
1 -
1 + <?php
2 +
3 + defined( 'ABSPATH' ) || exit;
4 +
5 + /**
6 + * Indicate to bypass rocket optimizations.
7 + *
8 + * Checks for "nowprocket" query string in the url to bypass rocket processes.
9 + *
10 + * @since 3.7
11 + *
12 + * @return bool True to indicate should bypass; false otherwise.
13 + */
14 + function rocket_bypass() {
15 + static $bypass = null;
16 +
17 + if ( rocket_get_constant( 'WP_ROCKET_IS_TESTING', false ) ) {
18 + $bypass = null;
19 + }
20 +
21 + if ( ! is_null( $bypass ) ) {
22 + return $bypass;
23 + }
24 +
25 + $bypass = isset( $_GET['nowprocket'] ) && 0 !== $_GET['nowprocket']; // phpcs:ignore WordPress.Security.NonceVerification
26 +
27 + return $bypass;
28 + }
29 +