Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public static function checkRequiredPlugins() |
||
32 | { |
||
33 | $acfActive = class_exists('acf'); |
||
34 | |||
35 | if (!$acfActive) { |
||
36 | self::notifyRequiredPluginIsMissing('<a href="https://www.advancedcustomfields.com/pro/">Advanced Custom Fields PRO</a>'); |
||
37 | add_filter('template_include', function () { |
||
38 | die( |
||
|
|||
39 | 'One or more required plugins are not activated! Please <a href="' |
||
40 | . esc_url(admin_url('plugins.php')) |
||
41 | . '">activate or install the required plugin(s)</a> and reload the page.' |
||
42 | ); |
||
43 | }); |
||
44 | } |
||
45 | |||
46 | return $acfActive; |
||
47 | } |
||
64 |
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.