# phastpress/3.6/classes/Compat/LiteSpeedCache.php

PhastPress, version 3.6. 29 lines.

- Page: https://pluginprobe.com/plugins/phastpress/3.6/code/classes/Compat/LiteSpeedCache.php
- Raw: https://pluginprobe.com/plugins/phastpress/3.6/raw/classes/Compat/LiteSpeedCache.php
- Modified: 2021-01-28T11:37:34+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/phastpress/3.6/code/classes/Compat/LiteSpeedCache.php#L10-L20`.

```php
<?php
namespace Kibo\PhastPlugins\PhastPress\Compat;

class LiteSpeedCache {
    /** @return ?int */
    public function getHookPriority() {
        try {
            $cls = new \ReflectionClass(\LiteSpeed\Core::class);
            $prop = $cls->getProperty('_instance');
            $prop->setAccessible(true);
            $instance = $prop->getValue();
        } catch (\ReflectionException $e) {
            return null;
        }

        if (!$instance) {
            return null;
        }

        $priority = has_filter('after_setup_theme', [$instance, 'init']);

        if ($priority === false) {
            return null;
        }

        return (int) $priority;
    }
}

```
