You are here

function blog_link in Drupal 4

Same name and namespace in other branches
  1. 5 modules/blog/blog.module \blog_link()
  2. 6 modules/blog/blog.module \blog_link()

Implementation of hook_link().

File

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

Code

function blog_link($type, $node = 0, $main = 0) {
  $links = array();
  if ($type == 'node' && $node->type == 'blog') {
    if (arg(0) != 'blog' || arg(1) != $node->uid) {
      $links[] = l(t("%username's blog", array(
        '%username' => $node->name,
      )), "blog/{$node->uid}", array(
        'title' => t("Read %username's latest blog entries.", array(
          '%username' => $node->name,
        )),
      ));
    }
  }
  return $links;
}