You are here

function blog_menu in Drupal 4

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

Implementation of hook_menu().

File

modules/blog.module, line 261
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;
}