function ultimate_cron_menu_alter in Ultimate Cron 7.2
Same name and namespace in other branches
- 8 ultimate_cron.module \ultimate_cron_menu_alter()
- 6 ultimate_cron.module \ultimate_cron_menu_alter()
- 7 ultimate_cron.module \ultimate_cron_menu_alter()
Implements hook_menu_alter().
Steal the run-cron, so when you "run cron manually" from the status-reports page the ultimate_cron cron handler is run.
File
- ./
ultimate_cron.module, line 926
Code
function ultimate_cron_menu_alter(&$items) {
// Relocate ctools export ui to main tab.
// During install, the cTools export ui menu entries may not have been setup.
// If so, skip this part and assume that the menu will be rebuild after
// install is complete.
if (isset($items['admin/config/system/cron/jobs'])) {
$items['admin/config/system/cron'] = $items['admin/config/system/cron/jobs'];
$items['admin/config/system/cron/jobs'] = array(
'title' => 'Jobs',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 20,
);
unset($items['admin/config/system/cron']['type']);
}
// Steal the core cron run.
$steal =& $items['admin/reports/status/run-cron'];
$steal['page callback'] = 'ultimate_cron_run_scheduled_page';
$steal['page arguments'] = array(
'admin/reports/status',
);
$steal['module'] = 'ultimate_cron';
$steal['file'] = 'ultimate_cron.module';
}