You are here

function nd_plugins_process in Node displays 6

Process plugins.

Parameters

array $vars The variables currently processed.:

stdClass $node_display Collection of arrays with node data.:

array $nd_display_settings Display settings.:

1 call to nd_plugins_process()
_nd_preprocess_node in ./nd.module
Helper function used in either nd_preprocess_node or other preprocess function.

File

./nd.module, line 306
Main node displays file.

Code

function nd_plugins_process(&$vars, &$node_display, $nd_display_settings) {
  $plugins = variable_get('nd_plugin_settings', array());
  if (!empty($plugins)) {
    foreach ($plugins as $key => $plugin) {
      if (isset($plugin['filename'])) {
        require_once $plugin['filename'];
      }
      $function = $plugin['process_callback'];
      $function($vars, $node_display, $nd_display_settings);
    }
  }
}