-
-
Save dhaley/4708360 to your computer and use it in GitHub Desktop.
vcr_menu.install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Programmatically create VCR menus. Oh Yeah! | |
* | |
* Will create pages, menus and menu items, beans and more. | |
* More power! | |
*/ | |
/** | |
* Implements hook_install(). | |
*/ | |
function vcr_menu_install() { | |
_vcr_menu_create_menus(); | |
} | |
/** | |
* Create custom menus and set secondary menu. | |
*/ | |
function _vcr_menu_create_menus() { | |
$menus = array( | |
array( | |
'menu_name' => 'secondary-menu', | |
'title' => 'Secondary Menu', | |
'description' => '', | |
), | |
); | |
foreach ($menus as $menu) { | |
menu_save($menu); | |
} | |
variable_set('menu_secondary_links_source', 'secondary-menu'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment