function _dhtml_get_add_links in DHTML Menu 6.2
Same name and namespace in other branches
- 5 dhtml_menu.module \_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.theme.inc - Theme each menu, adding important CSS data
File
- ./
dhtml_menu.theme.inc, line 113 - dhtml_menu.inc Themable functions required to render a DHTML menu block
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', DHTML_MENU_DUPLICATE_DEFAULT);
$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;
}