function _dhtml_get_add_links in DHTML Menu 5
Same name and namespace in other branches
- 6.2 dhtml_menu.theme.inc \_dhtml_get_add_links()
Fetch duplicated menu items - this is a configurable setting.
1 call to _dhtml_get_add_links()
- theme_dhtml_menu_tree in ./
dhtml_menu.module - Format each menu tree
File
- ./
dhtml_menu.module, line 137 - DHTML menus
Code
function _dhtml_get_add_links() {
static $dhtml_menu_duplicated;
if (!isset($dhtml_menu_duplicated)) {
$dhtml_menu_duplicated = array();
$text = variable_get('dhtml_menu_duplicated', 'admin');
$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;
}