You are here

function nd_cssoverrider_process in Node displays 6

Implementation of nd_pluginname_process().

File

plugins/cssoverrider.inc, line 58
Plugin to override css inline.

Code

function nd_cssoverrider_process(&$vars, &$node_display, $nd_display_settings) {
  foreach ($node_display->themed_regions as $region_name => $region_data) {
    $classes = nd_default_value($nd_display_settings, $vars['node']->build_mode, 'cssoverrider', 'class', $region_name, '');
    $inline = nd_default_value($nd_display_settings, $vars['node']->build_mode, 'cssoverrider', 'inline', $region_name, '');
    if (!empty($classes)) {
      $node_display->themed_regions[$region_name]['extra_class'] = ' ' . $classes;
    }
    if (!empty($inline)) {
      $node_display->themed_regions[$region_name]['inline_css'] = 'style="' . $inline . '"';
    }
  }
}