Implements hook_block_alter().
Removes the "popular" block from display if the module is not configured to count content views.
function statistics_block_alter(&$definitions) {
$statistics_count_content_views = config('statistics.settings')
->get('count_content_views');
if (empty($statistics_count_content_views)) {
unset($definitions['statistics_popular_block']);
}
}