function _statistics_link
7.x statistics.module | _statistics_link($path, $width = 35) |
6.x statistics.module | _statistics_link($path, $width = 35) |
Generates a link to a path, truncating the displayed text to a given width.
Parameters
$path: The path to generate the link for.
$width: The width to set the displayed text of the path.
Return value
A string as a link, truncated to the width, linked to the given $path.
3 calls to _statistics_link()
- statistics_node_tracker in drupal-7.x/
modules/ statistics/ statistics.pages.inc - Page callback: Displays statistics for a node.
- statistics_top_referrers in drupal-7.x/
modules/ statistics/ statistics.admin.inc - Page callback: Displays the "top referrers" in the access logs.
- _statistics_format_item in drupal-7.x/
modules/ statistics/ statistics.module - Formats an item for display, including both the item title and the link.
File
- drupal-7.x/
modules/ statistics/ statistics.module, line 404 - Logs and displays access statistics for a site.
Code
function _statistics_link($path, $width = 35) {
$title = drupal_get_path_alias($path);
$title = truncate_utf8($title, $width, FALSE, TRUE);
return l($title, $path);
}