You are here

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

Implements hook_menu_alter().

File

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

Code

function wp_blog_menu_alter(&$menu) {

  // Hack the menu to allow node/add/wp-blog to be a contextual link.
  $menu['node/add/wp-blog']['_tab'] = TRUE;
  $menu['node/add/wp-blog']['tab_parent'] = 'node/add';
  $menu['node/add/wp-blog']['context'] = MENU_CONTEXT_INLINE;

  // Change the menu-title so the contextual link reads 'Create WP blog post'.
  $menu['node/add/wp-blog']['title'] = 'Create @name';
  $menu['node/add/wp-blog']['title callback'] = 't';
  $menu['node/add/wp-blog']['title arguments'] = array(
    '@name' => 'WP blog post',
  );
}