private static function acf_exists() { $acf_exists = class_exists('acf'); // If ACF is not present. if (!$acf_exists) { $acf_exists = false; add_action('admin_notices', function () { echo self::$messages['acf_missing']; }); } return $acf_exists; }