Skip to content

Commit

Permalink
Make it easier to extend with implementations of scheduler_workbench_…
Browse files Browse the repository at this point in the history
…scheduler_api()
  • Loading branch information
Bevan Rudge committed Jun 26, 2012
1 parent 20fb3c0 commit 1483c7c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions scheduler_workbench.module
Expand Up @@ -129,14 +129,9 @@ function scheduler_workbench_module_implements_alter(&$implementations, $hook) {
* @param string $action
*/
function scheduler_workbench_scheduler_api($node, $action) {
switch ($action) {
case 'publish':
_scheduler_workbench_scheduler_publish($node);
break;

case 'unpublish':
_scheduler_workbench_scheduler_unpublish($node);
break;
$func = "_scheduler_workbench_scheduler_$action";
if (function_exists($func)) {
$func($node);
}
}

Expand Down

0 comments on commit 1483c7c

Please sign in to comment.