Same name and namespace in other branches
  1. 4.7.x modules/blog.module \blog_menu()
  2. 5.x modules/blog/blog.module \blog_menu()
  3. 6.x modules/blog/blog.module \blog_menu()
  4. 7.x modules/blog/blog.module \blog_menu()

Implementation of hook_menu().

File

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

Code

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;
}