isAbstract() || $reflection->isInterface()) { continue; } if ($reflection->hasMethod('get_plugin_file')) { $instance = $reflection->newInstance(); $plugin_file = $instance->get_plugin_file(); if (is_plugin_active($plugin_file)) { $active_event_plugins[$class] = $plugin_file; } } } } // Now you can use $active_event_plugins for further processing return $active_event_plugins; } }