function accordion_menu_js_settings in Accordion Menu 6
Same name and namespace in other branches
- 7 includes/view.inc \accordion_menu_js_settings()
Returns jQuery UI accordion settings.
@todo String input needs to be passed through check_plain().
Parameters
string $delta: The delta that uniquely identifies the block in the block system.
Return value
array An associative array of JS settings with booleans converted to strings.
1 call to accordion_menu_js_settings()
- _accordion_menu_block_view in includes/
view.inc - Implements hook_block_view().
File
- includes/
view.inc, line 101 - Provides view routines.
Code
function accordion_menu_js_settings($delta, $config) {
$config_nojs = array(
'delta' => $delta,
'menu_name' => 'Menu ' . $delta,
'menu_source' => 'navigation',
'block_source' => '',
'script_scope' => 'footer',
'header_link' => FALSE,
'menu_expanded' => FALSE,
);
$config = array_diff_key($config, $config_nojs);
foreach (array(
'auto_height',
'clear_style',
'collapsible',
'fill_space',
'navigation',
) as $key) {
$config[$key] = accordion_menu_boolean_option($config[$key]);
}
// Adapt to jQuery UI 1.6.
$config['alwaysOpen'] = accordion_menu_boolean_option(!$config['collapsible']);
unset($config['collapsible']);
return $config;
}