You are here

function _mostpopular_callback in Drupal Most Popular 7

1 call to _mostpopular_callback()
_mostpopular_invoke in ./mostpopular.module

File

./mostpopular.module, line 321
The main file for the Most Popular module.

Code

function _mostpopular_callback($callback, $info) {
  if (is_array($info)) {
    $info = (object) $info;
  }
  if (isset($info->file)) {
    include $info->file;
  }
  $module = $info->module;
  $delta = $info->delta;
  $function = FALSE;
  if (isset($info->callbacks[$callback]) && function_exists($info->callbacks[$callback])) {
    $function = $info->callbacks[$callback];
  }
  elseif (function_exists("{$module}_{$callback}_{$delta}")) {
    $function = "{$module}_{$callback}_{$delta}";
  }
  elseif (function_exists("{$module}_{$callback}")) {
    $function = "{$module}_{$callback}";
  }
  elseif (function_exists("mostpopular_default_{$callback}")) {
    $function = "mostpopular_default_{$callback}";
  }
  return $function;
}