You are here

function override_css_settings_menu in Override css 7

Implements hook_menu().

File

override_css_settings/override_css_settings.module, line 8

Code

function override_css_settings_menu() {
  $items = array();
  if (variable_get('override_css_settings_enabled', FALSE)) {
    $basepath = variable_get('override_css_settings_path', OVERRIDE_CSS_SETTINGS_PATH);
    $arg_counter = count(explode('/', $basepath));
    $items[$basepath] = array(
      'title' => variable_get('override_css_settings_title', 'Override theme'),
      'page callback' => 'override_css_settings_page',
      'access arguments' => array(
        'override css settings',
      ),
      'type' => variable_get('override_css_settings_type', MENU_LOCAL_TASK),
      'weight' => 1,
    );
    $items[$basepath . '/%override_css_selector/values'] = array(
      'title' => 'Values',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'override_css_selector_value',
        $arg_counter,
        TRUE,
      ),
      'access arguments' => array(
        'override css settings',
      ),
      'type' => MENU_LOCAL_TASK,
      'file' => 'override_css.admin.inc',
      'file path' => drupal_get_path('module', 'override_css'),
      'weight' => -10,
    );
    $items[$basepath . '/%override_css_selector/reset'] = array(
      'title' => 'Reset',
      'page callback' => 'override_css_reset_selector_page',
      'page arguments' => array(
        $arg_counter,
        TRUE,
      ),
      'access arguments' => array(
        'override css settings',
      ),
      'type' => MENU_LOCAL_TASK,
      'file' => 'override_css.admin.inc',
      'file path' => drupal_get_path('module', 'override_css'),
      'weight' => -9,
    );
  }
  return $items;
}