read()) !== false) {
if ( !preg_match('|^\.+$|', $file) && preg_match('|\.php$|', $file) )
$plugin_files[] = $file;
}
}
if ('' != trim(get_settings('active_plugins'))) {
$current_plugins = explode("\n", (get_settings('active_plugins')));
}
if (!$plugins_dir || !$plugin_files) {
echo "
Couldn't open plugins directory or there are no plugins available.
"; // TODO: make more helpful
} else {
?>
Plugin |
Version |
Author |
Description |
Action |
{$plugin_name[1]}");
}
if ('' == $author_uri) {
$author = $author_name[1];
} else {
$author = wp_filter_kses("{$author_name[1]}");
}
$style = ('class="alternate"' == $style) ? '' : 'class="alternate"';
if (!empty($current_plugins) && in_array($plugin_file, $current_plugins)) {
$action = "Deactivate";
$plugin = "$plugin";
} else {
$action = "Activate";
}
echo "
$plugin |
{$version[1]} |
$author |
$description |
$action |
";
}
?>