You are here

function panels_stylizer_merge_plugin in Panels 6.3

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

Merge the main stylizer plugin with a style to create a sub plugin.

This is used for both panels_stylizer_get_substyle and panels_stylizer_get_substyles.

2 calls to panels_stylizer_merge_plugin()
panels_stylizer_get_substyle in plugins/styles/stylizer.inc
Callback to provide a single stored stylizer style.
panels_stylizer_get_substyles in plugins/styles/stylizer.inc
Callback to provide all stored stylizer styles.

File

plugins/styles/stylizer.inc, line 37
Definition of the 'stylizer' panel style.

Code

function panels_stylizer_merge_plugin($plugin, $style) {
  $plugin['name'] = 'stylizer:' . $style->name;
  $plugin['title'] = check_plain($style->admin_title);
  $plugin['description'] = check_plain($style->admin_description);
  $plugin['style'] = $style;
  $plugin['weight'] = 0;
  ctools_include('stylizer');
  $base = ctools_get_style_base($style->settings['style_base']);
  if ($base['type'] == 'pane') {
    unset($plugin['render region']);
  }
  else {
    unset($plugin['render pane']);
  }
  unset($plugin['settings form']);
  unset($plugin['pane settings form']);
  return $plugin;
}