You are here

function theme_panels_skinr_style_render_pane in Skinr 6.2

Same name and namespace in other branches
  1. 6 modules/panels/skinr.inc \theme_panels_skinr_style_render_pane()

Render pane callback.

File

modules/panels/skinr.inc, line 87
Definition of the 'skinr' panel style.

Code

function theme_panels_skinr_style_render_pane($content, $pane, $display, $plugin = NULL) {
  if (isset($pane->style['style']) && isset($pane->style['style']) == 'skinr') {
    $hook = 'panels';
    $sid = 'display-' . $display->did . '-pane-' . $pane->pid;
    $style = array();

    // Get the Skinr classes for the current panel or display.
    if ($skinr = skinr_get(NULL, $hook, $sid)) {

      // Convert the array to a string fit for printing in the class attribute.
      $style = implode(' ', skinr_flatten_skins_array($skinr->skins));
    }
    if (!empty($content->css_class)) {
      $content->css_class .= ' ' . $style;
    }
    else {
      $content->css_class = $style;
    }
  }
  return theme('panels_pane', $content, $pane, $display);
}