Navigation Menu

Skip to content

Commit

Permalink
refactor block to be more condensed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bèr Kessels committed May 5, 2013
1 parent 34031cf commit a0cb637
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions tagadelic_taxonomy.module
Expand Up @@ -124,14 +124,12 @@ function tagadelic_taxonomy_admin_form($form, &$form_state) {
* @returns array $blocks
*/
function tagadelic_taxonomy_block_info() {
$blocks = array();

$blocks['tagadelic_taxonomy'] = array(
'info' => t('Tagadelic Tag cloud'),
'cache' => DRUPAL_NO_CACHE,
return array(
'tagadelic_taxonomy' => array(
'info' => t('Tagadelic Tag cloud'),
'cache' => DRUPAL_NO_CACHE,
)
);

return $blocks;
}

/**
Expand All @@ -142,15 +140,11 @@ function tagadelic_taxonomy_block_info() {
* @return array $block renderable array of terms cloud
*/
function tagadelic_taxonomy_block_view($delta = '') {
$block = array();
switch ($delta) {
case 'tagadelic_taxonomy':
$block['subject'] = t('Tag cloud');
$block['content'] = array(
'#type' => 'markup',
'#markup' => tagadelic_taxonomy_cloud(),
);
break;
}
return $block;
return array(
'subject' => t('Tag cloud'),
'content' => array(
'#type' => 'markup',
'#markup' => tagadelic_taxonomy_cloud(12),
)
);
}

0 comments on commit a0cb637

Please sign in to comment.