You are here

function dynamic_background_user_menu in Dynamic Background 6

Same name and namespace in other branches
  1. 7.2 modules/dynamic_background_user/dynamic_background_user.module \dynamic_background_user_menu()
  2. 7 modules/dynamic_background_user/dynamic_background_user.module \dynamic_background_user_menu()

Implementation of hook_menu(). Hooks into the profile with a "My background" tab, where users can select one of the backgrounds.

Return value

array menu items

File

modules/dynamic_background_user/dynamic_background_user.module, line 26
This module provides user with the option to select a dynamic background image for each user.

Code

function dynamic_background_user_menu() {
  $items = array();
  $items['admin/build/backgrounds/user'] = array(
    'title' => 'User',
    'description' => t('Configure user dynamic background'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'dynamic_background_user_admin_form',
    ),
    'access arguments' => array(
      'configure user dynamic background',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => -10,
  );
  $items['user/%user/backgrounds'] = array(
    'title' => 'My background',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'dynamic_background_user_form',
      1,
    ),
    'access arguments' => array(
      'user selection of background',
    ),
    'type' => MENU_LOCAL_TASK,
  );
  return $items;
}