function google_analytics_counter_block_view in Google Analytics Counter 7.2
Same name and namespace in other branches
- 7.3 google_analytics_counter.module \google_analytics_counter_block_view()
- 7 google_analytics_counter.module \google_analytics_counter_block_view()
Implements hook_block_view().
File
- ./
google_analytics_counter.module, line 138 - Basic functions for this module.
Code
function google_analytics_counter_block_view($delta) {
$block = array();
// Generate our block content
$block_content = google_analytics_counter_display();
$block['subject'] = t('Google Analytics Counter');
if ($block_content == '') {
// If unknown, for some reason.
$block['content'] = 0;
// Instead of t('N/A'). Suppose better to use 0 because it's true, that path has been recorded zero times by GA. Path may not exist or be private or too new.
}
else {
$block['content'] = $block_content;
}
return $block;
}