custom/menu_helper/menu_helper_blocks/menu_helper_blocks.module, line 287
_menu_helper_blocks_path_block()Builds the 'Add path to menu' block.
<?php
function _menu_helper_blocks_path_block() {
if ( !user_access('administer menu') ) {
return NULL;
}
// Check if we are currently in a book
if ( _menu_helper_blocks_book_get_current_item() != NULL) {
return NULL;
}
// Get menu items and check for active menu items
$menu_items = _menu_helper_blocks_get_current_menu_item('path');
if (!$menu_items) {
return NULL;
}
return array(
'subject' => t('Add path to menu'),
'content' => drupal_get_form('menu_helper_blocks_path_form', $menu_items),
);
}
?>