function menu_custom_features_rebuild in Features 6
Same name and namespace in other branches
- 7.2 includes/features.menu.inc \menu_custom_features_rebuild()
- 7 includes/features.menu.inc \menu_custom_features_rebuild()
Implementation of hook_features_rebuild().
1 call to menu_custom_features_rebuild()
- menu_custom_features_revert in includes/
features.menu.inc - Implementation of hook_features_revert().
File
- includes/
features.menu.inc, line 118
Code
function menu_custom_features_rebuild($module) {
if ($defaults = features_get_default('menu_custom', $module)) {
foreach ($defaults as $menu) {
$existing = db_result(db_query("SELECT menu_name FROM {menu_custom} WHERE menu_name = '%s'", $menu['menu_name']));
drupal_write_record('menu_custom', $menu, $existing ? array(
'menu_name',
) : array());
}
}
}