function workbench_moderation_noderevision in Workbench Moderation 7.3
Same name and namespace in other branches
- 7 plugins/page_manager/tasks/noderevision.inc \workbench_moderation_noderevision()
Entry point for our overridden My Workbench.
This function asks its assigned handlers who, if anyone, would like to run with it. If no one does, it passes through to the main node draft page.
1 string reference to 'workbench_moderation_noderevision'
- workbench_moderation_noderevision_menu_alter in plugins/
page_manager/ tasks/ noderevision.inc - Callback defined by workbench_moderation_noderevision_page_manager_tasks().
File
- plugins/
page_manager/ tasks/ noderevision.inc, line 67
Code
function workbench_moderation_noderevision($node) {
// Load my task plugin
$task = page_manager_get_task('noderevision');
// Load the node into a context.
ctools_include('context');
ctools_include('context-task-handler');
$contexts = ctools_context_handler_get_task_contexts($task, '', array(
$node,
));
$output = ctools_context_handler_render($task, '', $contexts, array(
$node->nid,
));
if ($output !== FALSE) {
return $output;
}
module_load_include('inc', 'workbench_moderation', 'workbench_moderation.node');
$function = 'workbench_moderation_node_view_revision';
foreach (module_implements('page_manager_override') as $module) {
$call = $module . '_page_manager_override';
if (($rc = $call('workbench')) && function_exists($rc)) {
$function = $rc;
break;
}
}
// Otherwise, fall back.
return $function($node);
}