You are here

function _adsense_click_format_path in Google AdSense integration 7

Same name and namespace in other branches
  1. 5.3 contrib/adsense_click/adsense_click.logs.inc \_adsense_click_format_path()
  2. 6 contrib/adsense_click/adsense_click.logs.inc \_adsense_click_format_path()

Format path.

2 calls to _adsense_click_format_path()
adsense_click_log in contrib/adsense_click/adsense_click.logs.inc
Click log.
adsense_click_top_pages in contrib/adsense_click/adsense_click.logs.inc
Click top pages.

File

contrib/adsense_click/adsense_click.logs.inc, line 153
Functions to display the logs tracked by the adsense_click module.

Code

function _adsense_click_format_path($path, $title = '', $width = 32) {
  global $base_url;
  if ($title) {
    $short_title = truncate_utf8($title, $width, FALSE, TRUE);
  }
  else {
    $title = $path;
    $short_path = preg_replace('?^' . $base_url . '?', '', $path);
    $short_title = truncate_utf8($short_path, $width, FALSE, TRUE);
  }
  return l($short_title, $path, array(
    'attributes' => array(
      'title' => $title,
    ),
  ));
}