| Versions | |
|---|---|
| 4.7 – 5 | blog_menu( |
| 6 – 7 | blog_menu() |
Implementation of hook_menu().
modules/
<?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;
}
?>