You are here

function panels_admin_settings_page in Panels 7.3

Same name and namespace in other branches
  1. 6.3 includes/callbacks.inc \panels_admin_settings_page()
1 string reference to 'panels_admin_settings_page'
panels_menu in ./panels.module
Implements hook_menu().

File

includes/callbacks.inc, line 158
Callbacks.inc Minor menu callbacks for Panels helpers.

Code

function panels_admin_settings_page() {
  $form = array();
  if (module_exists('page_manager')) {
    foreach (page_manager_get_tasks() as $task) {
      if ($function = ctools_plugin_get_function($task, 'admin settings')) {
        $function($form);
      }
    }
  }
  ctools_include('content');
  foreach (ctools_get_content_types() as $content) {
    if ($function = ctools_plugin_get_function($content, 'admin settings')) {
      $function($form);
    }
  }
  ctools_include('plugins', 'panels');
  $pipelines = panels_get_renderer_pipelines();
  $options = array();
  foreach ($pipelines as $key => $value) {
    $options[$key] = $value->admin_title;
  }
  if (count($options) > 1) {
    $form['panels_renderer_default'] = array(
      '#type' => 'select',
      '#title' => t('Default renderer'),
      '#options' => $options,
      '#default_value' => variable_get('panels_renderer_default', 'standard'),
      '#description' => t('The default renderer for new panel pages.'),
    );
  }
  if (empty($form)) {
    return array(
      '#value' => t('There are currently no settings to change, but additional plugins or modules may provide them in the future.'),
    );
  }
  return system_settings_form($form);
}