You are here

function dynamic_background_menu in Dynamic Background 7

Same name and namespace in other branches
  1. 6 dynamic_background.module \dynamic_background_menu()
  2. 7.2 dynamic_background.module \dynamic_background_menu()

Implements hook_menu().

File

./dynamic_background.module, line 37
This module enables administrators to upload images used as background on the site. The selected background image link is exposed as either $background in the page.tpl file or as /background.css.

Code

function dynamic_background_menu() {
  $items = array();
  $items['admin/config/user-interface/backgrounds'] = array(
    'title' => 'Dynamic background',
    'description' => 'Upload background images.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'dynamic_background_admin_images',
    ),
    'access arguments' => array(
      'set dynamic backgrounds',
    ),
    'file' => 'includes/backgrounds.admin.inc',
  );
  $items['admin/config/user-interface/backgrounds/images'] = array(
    'title' => 'Background images',
    'description' => 'Upload background images and select current active background.',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/config/user-interface/backgrounds/settings'] = array(
    'title' => 'Settings',
    'description' => 'Configure dynamic backgrounds settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'dynamic_background_admin_settings',
    ),
    'access arguments' => array(
      'configure dynamic backgrounds',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => -5,
    'file' => 'includes/settings.admin.inc',
  );
  $items['admin/config/user-interface/backgrounds/weight'] = array(
    'title' => 'Weight',
    'description' => 'Configure dynamic backgrounds extension weight',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'dynamic_background_admin_weight_form',
    ),
    'access arguments' => array(
      'dynamic backgrounds weight',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => -8,
    'file' => 'includes/weight.admin.inc',
  );
  $items['background.css'] = array(
    'page callback' => 'dynamic_background_css',
    'access arguments' => array(
      'dynamic backgrounds css',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}