function revision_scheduler_preprocess_menu_local_action in Revision scheduler 7
Preprocess the add scheduled revision local action to add a destination query.
File
- ./
revision_scheduler.module, line 161
Code
function revision_scheduler_preprocess_menu_local_action(&$variables) {
$link =& $variables['element']['#link'];
if (isset($link['href']) && !isset($link['localized_options']['query']['destination']) && preg_match('#node/\\d+/(revisions|moderation)/schedule/add#', $link['href'])) {
$link += array(
'localized_options' => array(),
);
$link['localized_options'] += array(
'query' => array(),
);
$link['localized_options']['query'] += drupal_get_destination();
}
}