You are here

function _menu_block_block_save in Menu Block 7.3

Same name and namespace in other branches
  1. 5.2 menu_block.admin.inc \_menu_block_block_save()
  2. 5 menu_block.admin.inc \_menu_block_block_save()
  3. 6.2 menu_block.admin.inc \_menu_block_block_save()
  4. 7.2 menu_block.admin.inc \_menu_block_block_save()

Implements hook_block_save().

1 call to _menu_block_block_save()
menu_block_block_save in ./menu_block.module

File

./menu_block.admin.inc, line 436
Provides infrequently used functions and hooks for menu_block.

Code

function _menu_block_block_save($delta = '', $edit = array()) {
  if (!empty($delta)) {

    // Don't save values for an exported block.
    $config = menu_block_get_config($delta);
    if (empty($config['exported_to_code'])) {
      variable_set("menu_block_{$delta}_title_link", $edit['title_link']);
      variable_set("menu_block_{$delta}_admin_title", $edit['admin_title']);
      variable_set("menu_block_{$delta}_parent", $edit['parent']);
      variable_set("menu_block_{$delta}_level", $edit['level']);
      variable_set("menu_block_{$delta}_follow", $edit['follow']);
      variable_set("menu_block_{$delta}_depth", $edit['depth']);
      variable_set("menu_block_{$delta}_depth_relative", $edit['depth_relative']);
      variable_set("menu_block_{$delta}_expanded", $edit['expanded']);
      variable_set("menu_block_{$delta}_sort", $edit['sort']);
    }
  }
}