You are here

function theme_panels_stylizer_stylizer_style_render_pane in Panels 7.3

Same name and namespace in other branches
  1. 6.3 plugins/styles/stylizer.inc \theme_panels_stylizer_stylizer_style_render_pane()

Pane render theme.

File

plugins/styles/stylizer.inc, line 151

Code

function theme_panels_stylizer_stylizer_style_render_pane($vars) {
  $content = $vars['content'];
  $pane = $vars['pane'];
  $display = $vars['display'];
  $plugin = $vars['style'];
  $settings = _panels_stylizer_get_style($plugin, $vars['settings']);
  if ($settings) {
    ctools_include('stylizer');
    $plugin = ctools_get_style_base($settings['style_base']);
    if (empty($content->css_class)) {
      $content->css_class = ctools_stylizer_get_css_class($plugin, $settings);
    }
    else {
      $content->css_class .= ' ' . ctools_stylizer_get_css_class($plugin, $settings);
    }
    ctools_stylizer_add_css($plugin, $settings);
    if (isset($plugin['theme'])) {
      return theme($plugin['theme'], array(
        'settings' => $settings,
        'content' => $content,
        'pane' => $pane,
        'display' => $display,
      ));
    }
  }

  // If the style is gone or has no theme of its own, just display the output.
  return theme('panels_pane', array(
    'content' => $content,
    'pane' => $pane,
    'display' => $display,
  ));
}