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