Created
December 6, 2012 23:05
-
-
Save pixelwhip/4229302 to your computer and use it in GitHub Desktop.
Custom Block code for Drupal 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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