You are here

function twitter_block_delete in Twitter Block 7.2

Same name and namespace in other branches
  1. 7 twitter_block.admin.inc \twitter_block_delete()

Form constructor for the custom Twitter block deletion form.

Parameters

$delta: The unique ID of the block within the context of $module.

See also

twitter_block_delete_submit()

1 string reference to 'twitter_block_delete'
twitter_block_menu in ./twitter_block.module
Implements hook_menu().

File

./twitter_block.admin.inc, line 164
Admin page callbacks for the Twitter Block module.

Code

function twitter_block_delete($form, &$form_state, $delta) {
  $block = block_load('twitter_block', $delta);
  $twitter_block = twitter_block_block_get($block->delta);
  $form['info'] = array(
    '#type' => 'hidden',
    '#value' => $twitter_block['info'] ? $twitter_block['info'] : $twitter_block['title'],
  );
  $form['bid'] = array(
    '#type' => 'hidden',
    '#value' => $block->delta,
  );
  return confirm_form($form, t('Are you sure you want to delete the block %name?', array(
    '%name' => $twitter_block['info'],
  )), 'admin/structure/block', '', t('Delete'), t('Cancel'));
}