You are here

function classy_panel_styles_install in Classy Panel Styles 7

Implements hook_install().

Seeds the settings forms with initial values.

File

./classy_panel_styles.install, line 12
Install file for Classy Panels module.

Code

function classy_panel_styles_install() {

  // Set the CSS file path if not already defined.
  if (!variable_get(CLASSY_PANEL_STYLES_CSS_PATH, FALSE)) {
    $path = drupal_get_path('module', 'classy_panel_styles') . '/cps_example/styles/css/classy_panel_styles.css';
    variable_set(CLASSY_PANEL_STYLES_CSS_PATH, $path);
  }

  // Enable Classy Panels styling in the Panels editor.
  if (FALSE === variable_get(CLASSY_PANEL_STYLES_EDITOR_STYLING, FALSE)) {
    variable_set(CLASSY_PANEL_STYLES_EDITOR_STYLING, 1);
  }

  // Set the default region renderer.
  if (FALSE === variable_get(CLASSY_PANEL_STYLES_REGION_STYLE, FALSE)) {
    variable_set(CLASSY_PANEL_STYLES_REGION_STYLE, 'panels_default_style_render_region');
  }

  // Set CPS as the default style on new Display objects.
  if (FALSE === variable_get(CLASSY_PANEL_STYLES_DISPLAY_DEFAULT, FALSE)) {
    variable_set(CLASSY_PANEL_STYLES_DISPLAY_DEFAULT, 1);
  }
}