PluginProbe
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript / 1.9.4
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript v1.9.4
4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.0.30 4.0.29 4.0.28 4.0.27 4.0.26 4.0.24 4.0.25 4.0.23 4.0.22 4.0.21 4.0.19 4.0.18 4.0.17 4.0.16 1.9.3 1.9.4 1.9.5 1.9.6 All 170 releases
searchpro / inc / thirdparty / plugin / HideMyWPGhost.php

HideMyWPGhost.php in BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript 1.9.4, at inc/thirdparty/plugin/HideMyWPGhost.php

31 lines 900 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH'))
3 exit;
4
5 if (class_exists('HMWP_Models_Compatibility_Abstract')) {
6 class HideMyWPGhost extends HMWP_Models_Compatibility_Abstract
7 {
8 function __construct()
9 {
10 add_filter('template_redirect', [$this, 'disable_plugin']);
11 add_filter('berqwp_cache_buffer', [$this, 'findReplaceCache'], PHP_INT_MAX);
12 }
13
14 function disable_plugin()
15 {
16 $bypass_cache = apply_filters( 'berqwp_bypass_cache', false );
17
18 if ($bypass_cache) {
19 add_filter('hmwp_process_buffer', '__return_false');
20 add_filter('hmwp_process_find_replace', '__return_false');
21 }
22 }
23
24 function findReplaceCache($content) {
25 return HMWP_Classes_ObjController::getClass('HMWP_Models_Rewrite')->getBuffer($content);;
26 }
27
28
29 }
30 new HideMyWPGhost();
31 }