function _statistics_link

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 modules/statistics/statistics.pages.inc
Page callback: Displays statistics for a node.
statistics_top_referrers in modules/statistics/statistics.admin.inc
Page callback: Displays the "top referrers" in the access logs.
_statistics_format_item in modules/statistics/statistics.module
Formats an item for display, including both the item title and the link.

File

modules/statistics/statistics.module, line 401

Code

function _statistics_link($path, $width = 35) {
    $title = drupal_get_path_alias($path);
    $title = truncate_utf8($title, $width, FALSE, TRUE);
    return l($title, $path);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.