PluginProbe
PhastPress / 1.96
PhastPress v1.96
3.12 3.11 1.75 1.76 1.77 1.78 1.79 1.80 1.81 1.82 1.83 1.84 1.85 1.86 1.87 1.88 1.89 1.90 1.91 1.92 1.93 1.94 1.95 1.96 1.97 All 119 releases
phastpress / classes / Compat / LiteSpeedCache.php

LiteSpeedCache.php in PhastPress 1.96, at classes/Compat/LiteSpeedCache.php

29 lines 683 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Kibo\PhastPlugins\PhastPress\Compat;
3
4 class LiteSpeedCache {
5 /** @return ?int */
6 public function getHookPriority() {
7 try {
8 $cls = new \ReflectionClass(\LiteSpeed\Core::class);
9 $prop = $cls->getProperty('_instance');
10 $prop->setAccessible(true);
11 $instance = $prop->getValue();
12 } catch (\ReflectionException $e) {
13 return null;
14 }
15
16 if (!$instance) {
17 return null;
18 }
19
20 $priority = has_filter('after_setup_theme', [$instance, 'init']);
21
22 if ($priority === false) {
23 return null;
24 }
25
26 return (int) $priority;
27 }
28 }
29