blog_menu

  1. drupal
    1. 4.7
    2. 5 blog.module
    3. 6 blog.module
    4. 7 blog.module
Versions
4.7 – 5 blog_menu($may_cache)
6 – 7 blog_menu()

Implementation of hook_menu().

Code

modules/blog.module, line 262

<?php
function blog_menu($may_cache) {
  global $user;
  $items = array();

  if ($may_cache) {
    $items[] = array(
      'path' => 'node/add/blog', 
      'title' => t('blog entry'), 
      'access' => user_access('edit own blog'),
    );
    $items[] = array(
      'path' => 'blog', 
      'title' => t('blogs'), 
      'callback' => 'blog_page', 
      'access' => user_access('access content'), 
      'type' => MENU_SUGGESTED_ITEM,
    );
    $items[] = array(
      'path' => 'blog/' . $user->uid, 
      'title' => t('my blog'), 
      'access' => user_access('edit own blog'), 
      'type' => MENU_DYNAMIC_ITEM,
    );
  }

  return $items;
}
?>