You are here

function ajax_register_block_save in Ajax Login/Register 7.4

Implements hook_block_save().

File

./ajax_register.module, line 97

Code

function ajax_register_block_save($delta = '', $edit = array()) {

  // Remove empty elements from array.
  $links = $edit['ajax_register_enabled_links'];
  foreach ($links as $key => $link) {
    if (!$link) {
      unset($links[$key]);
    }
  }

  // Save variables to database.
  variable_set('ajax_register_enabled_links', $links);
  variable_set('ajax_register_show_links_inline', $edit['ajax_register_show_links_inline']);
}