function power_menu_token_info in Power Menu 7
Same name and namespace in other branches
- 7.2 power_menu.tokens.inc \power_menu_token_info()
Implements hook_token_info().
Parameters
$type:
File
- ./
power_menu.module, line 635 - This module provides some additional menu features. The features are not actually new, but are part of other modules. it's though very cumbersome to creating a new menu item, because one has to go to all the different places to configure these…
Code
function power_menu_token_info() {
$pms = power_menu_get_pm_menus();
$info = array();
foreach (array_filter($pms) as $pm) {
$info['tokens']['node']["power_menu_path_{$pm}-path"] = array(
'name' => t("Power Menu: %power_menu", array(
'%power_menu' => $pm,
)),
'description' => t("Path based on the Power Menu: %power_menu", array(
'%power_menu' => $pm,
)),
);
}
return $info;
}