You are here

function i18nblocks_admin in Internationalization 5.3

Same name and namespace in other branches
  1. 5 i18nblocks/i18nblocks.module \i18nblocks_admin()
  2. 5.2 i18nblocks/i18nblocks.module \i18nblocks_admin()

Add a new metablock and go to settings page

1 string reference to 'i18nblocks_admin'
i18nblocks_menu in i18nblocks/i18nblocks.module
Implementation of hook_menu()

File

i18nblocks/i18nblocks.module, line 256

Code

function i18nblocks_admin($op = 'add', $delta = NULL, $confirm = FALSE) {
  if ($op == 'add') {
    $metablock = new StdClass();
    $metablock->info = t('New multilingual block');
    return drupal_get_form('i18nblocks_form', $metablock);
  }
  elseif ($op == 'delete' && $delta && ($block = i18nblocks_get_metablock($delta))) {
    i18nblocks_delete($delta);
    drupal_set_message("The block has been deleted");
    drupal_goto('admin/build/block');
  }
}