Skip to content

Instantly share code, notes, and snippets.

/**
* Implements hook_pre_features_revert().
*
* If a menu link is added in a menu handled by this feature, it won't be deleted when the menu feature is reverted.
* Only the menu links exported in the feature will be reverted.
* Implementing this hook allows us to make sure that the menu is fully resetted after the revert
* by first deleting all menu links before reverting.
*/
function main_menu_pre_features_revert($component) {
if($component == 'menu_links') {