function advagg_validator_menu_alter in Advanced CSS/JS Aggregation 7.2
Implements hook_menu_alter().
File
- advagg_validator/
advagg_validator.module, line 83 - Advanced aggregation validation module.
Code
function advagg_validator_menu_alter(&$items) {
// Make sure the advagg_admin_config_root_path() function is available.
drupal_load('module', 'advagg');
$config_path = advagg_admin_config_root_path();
if (!isset($items[$config_path . '/advagg'])) {
// If the advagg module is not enabled, redirect the /advagg path to
// /advagg/validate_css_w3.
$items[$config_path . '/advagg'] = array(
'title' => 'Advanced CSS/JS Aggregation',
'type' => MENU_LOCAL_TASK,
'weight' => 1,
'description' => $items[$config_path . '/advagg/validate_css_w3']['description'],
'page callback' => 'drupal_goto',
'page arguments' => array(
$config_path . '/advagg/validate_css_w3',
),
'access arguments' => array(
'administer site configuration',
),
);
}
if (!isset($items[$config_path . '/default'])) {
// Make sure the performance page has a default path.
$items[$config_path . '/default'] = array(
'title' => 'Performance',
'type' => MENU_DEFAULT_LOCAL_TASK,
'file path' => drupal_get_path('module', 'system'),
'weight' => -10,
);
}
}