4.6.x blog.module blog_link($type, $node = 0, $main = 0)
4.7.x blog.module blog_link($type, $node = 0, $main = 0)
5.x blog.module blog_link($type, $node = NULL, $teaser = FALSE)
6.x blog.module blog_link($type, $node = NULL, $teaser = FALSE)

Implementation of hook_link().

File

modules/blog/blog.module, line 233
Enables keeping an easily and regularly updated web page or a blog.

Code

function blog_link($type, $node = NULL, $teaser = FALSE) {
  $links = array();
  if ($type == 'node' && $node->type == 'blog') {
    if (arg(0) != 'blog' || arg(1) != $node->uid) {
      $links['blog_usernames_blog'] = array(
        'title' => t("@username's blog", array(
          '@username' => $node->name,
        )),
        'href' => "blog/{$node-&gt;<span class="php-function-or-constant property member-of-variable">uid</span>}",
        'attributes' => array(
          'title' => t("Read @username's latest blog entries.", array(
            '@username' => $node->name,
          )),
        ),
      );
    }
  }
  return $links;
}