You are here

function dynamic_background_blog_menu in Dynamic Background 7

Same name and namespace in other branches
  1. 6 modules/dynamic_background_blog/dynamic_background_blog.module \dynamic_background_blog_menu()
  2. 7.2 modules/dynamic_background_blog/dynamic_background_blog.module \dynamic_background_blog_menu()

Implementation of hook_menu(). Hooks into the dynamic background modules menu structure and adds the "blog" menu tab to the administration interface.

Return value

array menu items

File

modules/dynamic_background_blog/dynamic_background_blog.module, line 30

Code

function dynamic_background_blog_menu() {
  $items = array();
  $items['admin/config/user-interface/backgrounds/blog'] = array(
    'title' => 'Blog',
    'description' => t('Configure blog dynamic background'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'dynamic_background_blog_admin_form',
    ),
    'access arguments' => array(
      'configure blog dynamic background',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => -10,
  );
  $items['user/%user/blog/background'] = array(
    'title' => 'My blog background',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'dynamic_background_blog_form',
      1,
    ),
    'access arguments' => array(
      'user selection of blog background',
    ),
    'type' => MENU_LOCAL_TASK,
  );
  return $items;
}