function current_search_menu_alter in Facet API 6.3
Same name and namespace in other branches
- 7.2 contrib/current_search/current_search.module \current_search_menu_alter()
- 7 contrib/current_search/current_search.module \current_search_menu_alter()
Implements hook_menu_alter().
File
- contrib/
current_search/ current_search.module, line 54 - Provides an interface for creating blocks containing information about the current search.
Code
function current_search_menu_alter(&$items) {
// Use same access callback as Facet API. We can't define access callbacks in
// CTools plugins, so we have to alter the menu and define them here.
$base_path = 'admin/settings/current_search';
foreach ($items as $path => $item) {
if ($base_path == $path || 0 === strpos($path, "{$base_path}/")) {
$items[$path]['access callback'] = 'facetapi_access_callback';
$items[$path]['access arguments'] = array();
}
}
// Ensures that the edit link shows up in contextual links.
$item =& $items['admin/settings/current_search/list/%ctools_export_ui/edit'];
$item['title'] = 'Configure current search items';
$item['type'] = MENU_CALLBACK;
//$item['context'] = MENU_CONTEXT_INLINE;
}