我怎样才能改变search_menu()
钩子的行为,而不是改变search.module
代码?
我想改变它:
function search_menu() {
//...
foreach (module_implements('search') as $name) {
$items['search/'. $name .'/%menu_tail'] = array(
'title callback' => 'module_invoke',
'title arguments' => array($name, 'search', 'name', TRUE),
'page callback' => 'search_view',
'page arguments' => array($name),
'access callback' => '_search_menu',
'access arguments' => array($name),
'type' => MENU_LOCAL_TASK,
'parent' => 'search',
'file' => 'search.pages.inc',
);
}
return $items;
}
到:
function search_menu() {
//...
foreach (module_implements('search') as $name) {
$items['search/'. $name .'/%menu_tail'] = array(
'title callback' => 'module_invoke',
'title arguments' => array($name, 'search', 'name', TRUE),
'page callback' => 'search_view',
'page arguments' => array($name),
'access callback' => '_search_menu',
'access arguments' => array($name),
'type' => MENU_CALLBACK,
'parent' => 'search',
'file' => 'search.pages.inc',
);
}
return $items;
}
隐藏搜索页面上的标签。
谢谢!