statistics_link

Versions
4.6 – 4.7
statistics_link($type, $node = 0, $main = 0)
5 – 6
statistics_link($type, $node = NULL, $teaser = FALSE)

Implementation of hook_link().

Code

modules/statistics/statistics.module, line 84

<?php
function statistics_link($type, $node = NULL, $teaser = FALSE) {
  global $id;
  $links = array();

  if ($type != 'comment' && user_access('view post access counter')) {
    $statistics = statistics_get($node->nid);
    if ($statistics) {
      $links['statistics_counter']['title'] = format_plural($statistics['totalcount'], '1 read', '@count reads');
    }
  }

  return $links;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.