function _dhtml_menu_get_add_links in DHTML Menu 6
Fetch duplicated menu items - this is a configurable setting.
1 call to _dhtml_menu_get_add_links()
- theme_dhtml_menu_tree in ./
dhtml_menu.inc - Theme each menu, adding important CSS data
File
- ./
dhtml_menu.inc, line 17 - dhtml_menu.inc Allow click expansion of the menu tree via javascript, with graceful degradation.
Code
function _dhtml_menu_get_add_links() {
static $dhtml_menu_duplicated;
if (!isset($dhtml_menu_duplicated)) {
$dhtml_menu_duplicated = array();
$text = variable_get('dhtml_menu_duplicated', "admin\nadmin/build/menu\nnode/add");
$text = preg_split('/\\n/', $text, -1, PREG_SPLIT_NO_EMPTY);
// explode returns array(0 => '') for $text == ''
foreach ($text as $line) {
$line = trim($line);
preg_match('/^([^ ]+)( (.*))?$/', $line, $match);
$dhtml_menu_duplicated[$match[1]] = !empty($match[3]) ? $match[3] : TRUE;
}
}
return $dhtml_menu_duplicated;
}