function views_menu_admin_items in Views (for Drupal 7) 5
Add the adminstrative items to a view.
1 call to views_menu_admin_items()
File
- ./
views.module, line 155
Code
function views_menu_admin_items(&$items, $view_name, $view_args, $args) {
// Remove args that are tabs from $args.
$tabs = array();
foreach (module_implements('views_tabs') as $module) {
$function = $module . '_views_tabs';
$tabs = array_merge($tabs, (array) $function('names'));
}
// See what the last arg is.
$last_arg = array_pop($args);
if (in_array($last_arg, $tabs)) {
array_pop($view_args);
}
else {
$args[] = $last_arg;
}
$view = views_get_view($view_name);
$path = implode('/', $args);
views_ui_add_menu_items($items, $view, $path, $path != $_GET['q'] && !empty($view_args), $view_args);
}