public function filter_active_plugins($plugins)
{
if (empty($plugins)) {
return $plugins;
}
$f = preg_quote(basename($this->plugin_base()));
return array_merge(preg_grep('/' . $f . '$/', $plugins), preg_grep('/' . $f . '$/', $plugins, PREG_GREP_INVERT));
}