You are here

function ultimate_cron_ctools_plugin_directory in Ultimate Cron 7.2

Implements hook_ctools_plugin_directory().

This module implements plugins for cTools and Ultimate Cron.

File

./ultimate_cron.module, line 117

Code

function ultimate_cron_ctools_plugin_directory($module, $type) {

  // Safety: go away if CTools is not at an appropriate version.
  if (!module_invoke('ctools', 'api_version', '1.7')) {
    return;
  }
  $supported = array(
    'ctools' => array(
      'export_ui' => 'export_ui',
    ),
    'ultimate_cron' => array(
      'settings' => 'settings',
      'scheduler' => 'scheduler',
      'launcher' => 'launcher',
      'logger' => 'logger',
    ),
  );
  if (isset($supported[$module][$type])) {
    return "plugins/{$module}/" . $supported[$module][$type];
  }
}