You are here

function heartbeat_plugins_get_plugin in Heartbeat 7

Helper function to retrieve an active plugin.

Parameters

Boolean $include: Indicates whether the plugins needs to be loaded/included.

3 calls to heartbeat_plugins_get_plugin()
ctools_export_ui_heartbeat_plugin::edit_form in modules/heartbeat_plugins/plugins/export_ui/ctools_export_ui_heartbeat_plugin.class.php
Provide the actual editing form.
ctools_export_ui_heartbeat_plugin::edit_form_validate in modules/heartbeat_plugins/plugins/export_ui/ctools_export_ui_heartbeat_plugin.class.php
Validate callback for the edit form.
heartbeat_plugins_heartbeat_theme_alter in modules/heartbeat_plugins/heartbeat_plugins.module
Implementation of hook_heartbeat_theme_alter().

File

modules/heartbeat_plugins/heartbeat_plugins.module, line 476

Code

function heartbeat_plugins_get_plugin($plugin_name) {
  $plugins =& drupal_static('heartbeat_plugins');
  if (empty($plugins)) {
    $plugins = heartbeat_plugins_get_active_plugins(TRUE);
  }
  foreach ($plugins as $plugin) {
    if ($plugin->plugin_name == $plugin_name) {
      return $plugin;
    }
  }
  return NULL;
}