blog_menu

5 blog.module blog_menu($may_cache)
6 blog.module blog_menu()
7 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;
}
Login or register to post comments