You are here

function _panels_stylizer_get_style in Panels 7.3

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

Get style settings for a stylizer style.

Because style settings can come from a couple of different places, depending on if it's a custom style in the panel or a custom style in the database, we have a tricky way of looking for this info.

2 calls to _panels_stylizer_get_style()
theme_panels_stylizer_stylizer_style_render_pane in plugins/styles/stylizer.inc
Pane render theme.
theme_panels_stylizer_stylizer_style_render_region in plugins/styles/stylizer.inc
Region render theme.

File

plugins/styles/stylizer.inc, line 97

Code

function _panels_stylizer_get_style($plugin, $style_settings) {
  if (!empty($plugin['style'])) {
    return $plugin['style']->settings;
  }
  if (empty($style_settings)) {
    return array();
  }
  if ($style_settings['style'] == '$') {
    return $style_settings['settings'];
  }
  ctools_include('export');
  $style = ctools_export_crud_load('stylizer', $style_settings['style']);
  if ($style) {
    return $style->settings;
  }
}