Last active
August 29, 2015 13:56
-
-
Save LarsEliasNielsen/9324180 to your computer and use it in GitHub Desktop.
Drupal 7 Module Development: Module Block
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(). | |
* | |
* Declares a block to provide to Drupal. This can also specify block | |
* configuration settings, like here where the cache is determined be the | |
* user role. | |
* | |
* @url: https://api.drupal.org/api/drupal/modules!block!block.api.php/function/hook_block_info/7 | |
*/ | |
function espn_news_block_info() { | |
$blocks['espn_news'] = array( | |
'info' => t('ESPN News'), | |
'cache' => DRUPAL_CACHE_PER_ROLE, | |
); | |
return $blocks; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment