function quotes_menu_alter in Quotes 7
Same name and namespace in other branches
- 6 quotes.module \quotes_menu_alter()
Implements hook_menu_alter().
File
- ./
quotes.module, line 328 - The quotes module allows users to maintain a list of quotes that can be displayed in any number of administrator-defined quote blocks.
Code
function quotes_menu_alter(&$callbacks) {
// Get what the admin wants to call it.
// Note: menu_get_item('quotes') returns the original, not the overridden.
$menu_title = db_query("SELECT link_title FROM {menu_links} WHERE router_path = 'quotes'")
->fetchField();
if (empty($menu_title)) {
$menu_title = 'Quotes';
}
$callbacks['quotes']['title'] = $menu_title;
$callbacks['quotes/%']['title'] = $menu_title . ' page';
$callbacks['user/%user/quotes']['title'] = $menu_title;
}