Created
September 20, 2013 13:01
-
-
Save morsok/6637134 to your computer and use it in GitHub Desktop.
This file contains 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
/** | |
* Implements hook_block_info(). | |
*/ | |
function YOUR_MODULE_block_info() | |
{ | |
$blocks = array(); | |
$blocks['YOUR_BLOCK_ABC'] = array( | |
'info' => t('YOUR BLOCK NAME'), | |
); | |
return $blocks; | |
} | |
/** | |
* Implements hook_block_view(). | |
*/ | |
function YOUR_MODULE_block_view($delta = '') | |
{ | |
$block = array(); | |
switch ($delta) { | |
case 'YOUR_BLOCK_ABC': | |
$block['subject'] = ''; | |
$block['content'] = _YOUR_MODULE_BLOCK_ABC_CONTENT(); | |
break; | |
} | |
return $block; | |
} | |
function _YOUR_MODULE_BLOCK_ABC_CONTENT() | |
{ | |
$output = t('Hello world'); | |
return $output; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment