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.module, line 92

<?php
function statistics_link($type, $node = 0, $main = 0) {
  global $id;

  $links = array();

  if ($type != 'comment' && variable_get('statistics_display_counter', 0)) {
    $statistics = statistics_get($node->nid);
    if ($statistics) {
      $links[] = 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.