function yandex_metrics_page_build in Yandex.Metrics 7
Same name and namespace in other branches
- 8.2 yandex_metrics.module \yandex_metrics_page_build()
- 7.3 yandex_metrics.module \yandex_metrics_page_build()
- 7.2 yandex_metrics.module \yandex_metrics_page_build()
Implementation of hook_page_build(). Adds Yandex.Metrics counter code to the site footer. See http://drupal.org/node/224333#hook_footer
File
- ./
yandex_metrics.module, line 881 - The main code of Yandex.Metrics module.
Code
function yandex_metrics_page_build(&$page) {
$yandex_metrics_counter_code = variable_get('yandex_metrics_counter_code', '');
if (!empty($yandex_metrics_counter_code) && yandex_metrics_show_counter() && yandex_metrics_show_counter_for_role()) {
$page['page_bottom']['yandex_metrics'] = array(
'#type' => 'markup',
'#markup' => '<div style="clear:both;">' . $yandex_metrics_counter_code . '</div>',
);
}
}