Skip to content

Instantly share code, notes, and snippets.

@pixelwhip
Created December 6, 2012 23:05
Show Gist options
  • Save pixelwhip/4229302 to your computer and use it in GitHub Desktop.
Save pixelwhip/4229302 to your computer and use it in GitHub Desktop.
Custom Block code for Drupal 7
<?php
/**
* Implements hook_block_info().
*/
function MODULE_NAME_block_info() {
$blocks['BLOCK_DELTA'] = array(
'info' => t(''),
'cache' => DRUPAL_NO_CACHE,
);
return $blocks;
}
/**
* Implements hook_block_view().
*/
function MODULE_NAME_block_view($delta = '') {
$block = array();
switch ($delta) {
case 'BLOCK_DELTA':
$block['subject'] = t('');
$block['content'] = '';
break;
}
return $block;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment