Returns a list of plugins and metadata about them.
array An array keyed by PLUGIN_TYPE:PLUGIN_NAME, like 'display:page' or 'pager:full', containing an array with the following keys:
function views_plugin_list() {
$plugin_data = views_get_plugin_definitions();
$plugins = array();
foreach (views_get_enabled_views() as $view) {
foreach ($view
->get('display') as $display_id => $display) {
foreach ($plugin_data as $type => $info) {
if ($type == 'display' && isset($display['display_plugin'])) {
$name = $display['display_plugin'];
}
elseif (isset($display['display_options']["{$type}_plugin"])) {
$name = $display['display_options']["{$type}_plugin"];
}
elseif (isset($display['display_options'][$type]['type'])) {
$name = $display['display_options'][$type]['type'];
}
else {
continue;
}
// Key first by the plugin type, then the name.
$key = $type . ':' . $name;
// Add info for this plugin.
if (!isset($plugins[$key])) {
$plugins[$key] = array(
'type' => $type,
'title' => check_plain($info[$name]['title']),
'module' => check_plain($info[$name]['module']),
'views' => array(),
);
}
// Add this view to the list for this plugin.
$plugins[$key]['views'][$view
->get('name')] = $view
->get('name');
}
}
}
return $plugins;
}