You are here

function wp_blog_menu in WP Blog - a WordPress-style blogging module. 7

Implements hook_menu().

File

./wp_blog.module, line 53
WP Blog provides a content-type, taxonomy vocabulary, views and various features to mimic a WordPress-style blog.

Code

function wp_blog_menu() {
  $items = array();

  // Add a menu-item at blog/add, to provide an ACTION link for all pages
  // beginning blog/. The link simply redirects to node/add/wp-blog.
  $items['blog/add'] = array(
    'title' => 'Add WP blog post',
    'page callback' => 'drupal_goto',
    'page arguments' => array(
      'node/add/wp-blog',
    ),
    'access callback' => 'node_access',
    'access arguments' => array(
      'create',
      'wp_blog',
    ),
    'type' => MENU_LOCAL_ACTION,
  );
  return $items;
}