function menu_parent_options_js
Page callback. Get all the available menus and menu items as a JavaScript array.
1 string reference to 'menu_parent_options_js'
- menu_menu in modules/
menu/ menu.module - Implements hook_menu().
File
-
modules/
menu/ menu.module, line 388
Code
function menu_parent_options_js() {
$available_menus = array();
if (isset($_POST['menus']) && count($_POST['menus'])) {
foreach ($_POST['menus'] as $menu) {
$available_menus[$menu] = $menu;
}
}
$options = _menu_get_options(menu_get_menus(), $available_menus, array(
'mlid' => 0,
));
drupal_json_output($options);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.