You are here

function menu_block_menu_link_insert in Menu Block 7.2

Same name and namespace in other branches
  1. 7.3 menu_block.module \menu_block_menu_link_insert()

Implements hook_menu_link_insert().

2 calls to menu_block_menu_link_insert()
menu_block_menu_link_delete in ./menu_block.module
Implements hook_menu_link_delete().
menu_block_menu_link_update in ./menu_block.module
Implements hook_menu_link_update().

File

./menu_block.module, line 1061
Provides configurable blocks of menu items.

Code

function menu_block_menu_link_insert($link) {

  // If a book is being created, updated, or deleted, clear the
  // menu_block_get_all_menus() cache since it means a change to a book "menu"
  // that would need to be picked up by book_menu_block_get_menus().
  if (strpos($link['menu_name'], 'book-toc-') === 0 && !$link['plid']) {
    cache_clear_all('menu_block_menus:', 'cache_menu', TRUE);
    drupal_static_reset('menu_block_get_all_menus');
  }
}