本文整理汇总了PHP中zen_theme_get_default_settings函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_theme_get_default_settings函数的具体用法?PHP zen_theme_get_default_settings怎么用?PHP zen_theme_get_default_settings使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zen_theme_get_default_settings函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cti_flex_settings
/**
* Implementation of THEMEHOOK_settings() function.
*
* @param $saved_settings
* An array of saved settings for this theme.
* @return
* A form array.
*/
function cti_flex_settings($saved_settings)
{
// Get the default values from the .info file.
$defaults = zen_theme_get_default_settings('cti_flex');
// Merge the saved variables and their default values.
$settings = array_merge($defaults, $saved_settings);
/*
* Create the form using Forms API: http://api.drupal.org/api/6
*/
$form = array();
$form['cti_flex_fixed'] = array('#type' => 'checkbox', '#title' => t('Use fixed width for theme'), '#default_value' => $settings['cti_flex_fixed'], '#description' => t('The theme will be centered and fixed at 960 pixels wide. If you do not select this, the layout will be fluid, full width.'));
$form['cti_flex_design'] = array('#type' => 'radios', '#title' => t('Design'), '#default_value' => $settings['cti_flex_design'], '#options' => array('0' => t('Teal and Orange'), '1' => t('Blue and Green'), '2' => t('Red and Gray'), '4' => t('None (plain gray) - Select this option if using the color picker tool below')), '#description' => t('Select the specific site design you would like to use. Each design has its own style sheet in the "colors" directory of the theme.'));
$form['cti_flex_font_family'] = array('#type' => 'radios', '#title' => t('Font Family'), '#default_value' => $settings['cti_flex_font_family'], '#options' => array('0' => t('None - set manually in stylesheet'), '1' => t('Arial, Helvetica, Bitstream Vera Sans, sans-serif'), '2' => t('Lucida Sans, Verdana, Arial, sans-serif'), '3' => t('Times, Times New Roman, Georgia, Bitstream Vera Serif, serif'), '4' => t('Georgia, Times New Roman, Bitstream Vera Serif, serif'), '5' => t('Verdana, Tahoma, Arial, Helvetica, Bitstream Vera Sans, sans-serif'), '6' => t('Tahoma, Verdana, Arial, Helvetica, Bitstream Vera Sans, sans-serif')), '#description' => t('Select the font family to be used on the site.'));
$form['cti_flex_color1'] = array('#type' => (module_exists('colorpicker') ? 'colorpicker_' : '') . 'textfield', '#title' => t('Select color for body background (outside of main content area)'), '#default_value' => $settings['cti_flex_color1'], '#description' => t('Click on the eyedropper icon to use color picker. Or enter an HTML color code.'), '#prefix' => '<fieldset class="collapsible"><legend>Custom color settings</legend><br />These values will override any colors in your style sheets. Leave blank to use defaults.<br /><b>Important:</b> You must have the <a href="http://drupal.org/project/colorpicker" target="_blank">Color Picker</a> module installed to use the color picker widget.<div style="margin: 20px 0 0 20px;"><b>BACKGROUND COLORS</b>');
$form['cti_flex_color2'] = array('#type' => (module_exists('colorpicker') ? 'colorpicker_' : '') . 'textfield', '#title' => t('Select color for header and footer backgrounds'), '#default_value' => $settings['cti_flex_color2'], '#description' => t('Click on the eyedropper icon to use color picker. Or enter an HTML color code.'));
$form['cti_flex_color3'] = array('#type' => (module_exists('colorpicker') ? 'colorpicker_' : '') . 'textfield', '#title' => t('Select color for main navigation bar and block header backgrounds'), '#default_value' => $settings['cti_flex_color3'], '#description' => t('Click on the eyedropper icon to use color picker. Or enter an HTML color code.'));
$form['cti_flex_color4'] = array('#type' => (module_exists('colorpicker') ? 'colorpicker_' : '') . 'textfield', '#title' => t('Select color for block content background'), '#default_value' => $settings['cti_flex_color4'], '#description' => t('Click on the eyedropper icon to use color picker. Or enter an HTML color code.'));
$form['cti_flex_color5'] = array('#type' => (module_exists('colorpicker') ? 'colorpicker_' : '') . 'textfield', '#title' => t('Select color for links'), '#default_value' => $settings['cti_flex_color5'], '#description' => t('Click on the eyedropper icon to use color picker. Or enter an HTML color code.'), '#prefix' => t('<b>TEXT COLORS</b>'));
$form['cti_flex_color6'] = array('#type' => (module_exists('colorpicker') ? 'colorpicker_' : '') . 'textfield', '#title' => t('Select color for site name, site slogan and footer text'), '#default_value' => $settings['cti_flex_color6'], '#description' => t('Click on the eyedropper icon to use color picker. Or enter an HTML color code.'));
$form['cti_flex_color7'] = array('#type' => (module_exists('colorpicker') ? 'colorpicker_' : '') . 'textfield', '#title' => t('Select color for primary menu links and block headers'), '#default_value' => $settings['cti_flex_color7'], '#description' => t('Click on the eyedropper icon to use color picker. Or enter an HTML color code.'));
$form['cti_flex_color8'] = array('#type' => (module_exists('colorpicker') ? 'colorpicker_' : '') . 'textfield', '#title' => t('Select color for secondary menu links'), '#default_value' => $settings['cti_flex_color8'], '#description' => t('Click on the eyedropper icon to use color picker. Or enter an HTML color code.'), '#suffix' => '</div></fieldset>');
// Add the base theme's settings.
$form += zen_settings($saved_settings, $defaults);
// Remove some of the base theme's settings.
unset($form['themedev']['zen_layout']);
// We don't need to select the base stylesheet.
// Return the form
return $form;
}
示例2: zen_settings
/**
* Implementation of THEMEHOOK_settings() function.
*
* @param $saved_settings
* An array of saved settings for this theme.
* @param $subtheme_defaults
* Allow a subtheme to override the default values.
* @return
* A form array.
*/
function zen_settings($saved_settings, $subtheme_defaults = array())
{
// Add the form's CSS
drupal_add_css(drupal_get_path('theme', 'zen') . '/theme-settings.css', 'theme');
// Add javascript to show/hide optional settings
drupal_add_js(drupal_get_path('theme', 'zen') . '/theme-settings.js', 'theme');
// Get the default values from the .info file.
$defaults = zen_theme_get_default_settings('zen');
// Allow a subtheme to override the default values.
$defaults = array_merge($defaults, $subtheme_defaults);
// Merge the saved variables and their default values.
$settings = array_merge($defaults, $saved_settings);
/*
* Create the form using Forms API
*/
$form['zen-div-opening'] = array('#value' => '<div id="zen-settings">');
$form['zen_block_editing'] = array('#type' => 'checkbox', '#title' => t('Show block editing on hover'), '#description' => t('When hovering over a block, privileged users will see block editing links.'), '#default_value' => $settings['zen_block_editing']);
$form['breadcrumb'] = array('#type' => 'fieldset', '#title' => t('Breadcrumb settings'), '#attributes' => array('id' => 'zen-breadcrumb'));
$form['breadcrumb']['zen_breadcrumb'] = array('#type' => 'select', '#title' => t('Display breadcrumb'), '#default_value' => $settings['zen_breadcrumb'], '#options' => array('yes' => t('Yes'), 'admin' => t('Only in admin section'), 'no' => t('No')));
$form['breadcrumb']['zen_breadcrumb_separator'] = array('#type' => 'textfield', '#title' => t('Breadcrumb separator'), '#description' => t('Text only. Don’t forget to include spaces.'), '#default_value' => $settings['zen_breadcrumb_separator'], '#size' => 5, '#maxlength' => 10, '#prefix' => '<div id="div-zen-breadcrumb-collapse">');
$form['breadcrumb']['zen_breadcrumb_home'] = array('#type' => 'checkbox', '#title' => t('Show home page link in breadcrumb'), '#default_value' => $settings['zen_breadcrumb_home']);
$form['breadcrumb']['zen_breadcrumb_trailing'] = array('#type' => 'checkbox', '#title' => t('Append a separator to the end of the breadcrumb'), '#default_value' => $settings['zen_breadcrumb_trailing'], '#description' => t('Useful when the breadcrumb is placed just before the title.'));
$form['breadcrumb']['zen_breadcrumb_title'] = array('#type' => 'checkbox', '#title' => t('Append the content title to the end of the breadcrumb'), '#default_value' => $settings['zen_breadcrumb_title'], '#description' => t('Useful when the breadcrumb is not placed just before the title.'), '#suffix' => '</div>');
$form['themedev'] = array('#type' => 'fieldset', '#title' => t('Theme development settings'), '#attributes' => array('id' => 'zen-themedev'));
$form['themedev']['zen_rebuild_registry'] = array('#type' => 'checkbox', '#title' => t('Rebuild theme registry on every page.'), '#default_value' => $settings['zen_rebuild_registry'], '#description' => t('During theme development, it can be very useful to continuously <a href="!link">rebuild the theme registry</a>. WARNING: this is a huge performance penalty and must be turned off on production websites.', array('!link' => 'http://drupal.org/node/173880#theme-registry')), '#prefix' => '<div id="div-zen-registry"><strong>' . t('Theme registry:') . '</strong>', '#suffix' => '</div>');
$form['themedev']['zen_layout'] = array('#type' => 'radios', '#title' => t('Layout method'), '#options' => array('border-politics-liquid' => t('Liquid layout') . ' <small>(layout-liquid.css)</small>', 'border-politics-fixed' => t('Fixed layout') . ' <small>(layout-fixed.css)</small>'), '#default_value' => $settings['zen_layout']);
$form['themedev']['zen_wireframes'] = array('#type' => 'checkbox', '#title' => t('Display borders around main layout elements'), '#default_value' => $settings['zen_wireframes'], '#description' => t('<a href="!link">Wireframes</a> are useful when prototyping a website.', array('!link' => 'http://www.boxesandarrows.com/view/html_wireframes_and_prototypes_all_gain_and_no_pain')), '#prefix' => '<div id="div-zen-wireframes"><strong>' . t('Wireframes:') . '</strong>', '#suffix' => '</div>');
$form['zen-div-closing'] = array('#value' => '</div>');
// Return the form
return $form;
}
示例3: dkcenter_settings
/**
* Implementation of THEMEHOOK_settings() function.
*
* @param $saved_settings
* An array of saved settings for this theme.
* @return
* A form array.
*/
function dkcenter_settings($saved_settings)
{
// Get the default values from the .info file.
$defaults = zen_theme_get_default_settings('dkcenter');
// Merge the saved variables and their default values.
$settings = array_merge($defaults, $saved_settings);
/*
* Create the form using Forms API: http://api.drupal.org/api/6
*/
$form = array();
/* -- Delete this line if you want to use this setting
$form['STARTERKIT_example'] = array(
'#type' => 'checkbox',
'#title' => t('Use this sample setting'),
'#default_value' => $settings['STARTERKIT_example'],
'#description' => t("This option doesn't do anything; it's just an example."),
);
// */
// Add the base theme's settings.
$form += zen_settings($saved_settings, $defaults);
// Remove some of the base theme's settings.
unset($form['themedev']['zen_layout']);
// We don't need to select the base stylesheet.
// Return the form
return $form;
}
示例4: zen_ninesixty_settings
/**
* Implementation of THEMEHOOK_settings() function.
*
* @param $saved_settings
* An array of saved settings for this theme.
* @return
* A form array.
*/
function zen_ninesixty_settings($saved_settings)
{
// Get the default values from the .info file.
$defaults = zen_theme_get_default_settings('zen_ninesixty');
// Merge the saved variables and their default values.
$settings = array_merge($defaults, $saved_settings);
$form = array();
// Add the base theme's settings.
$form += zen_settings($saved_settings, $defaults);
// Remove some of the base theme's settings.
// We don't need to select the base stylesheet, as we are already using 960.
unset($form['themedev']['zen_layout']);
// Return the form
return $form;
}
示例5: STARTERKIT_settings
/**
* Implementation of THEMEHOOK_settings() function.
*
* @param $saved_settings
* An array of saved settings for this theme.
* @return
* A form array.
*/
function STARTERKIT_settings($saved_settings)
{
// Get the default values from the .info file.
$defaults = zen_theme_get_default_settings('STARTERKIT');
// Merge the saved variables and their default values.
$settings = array_merge($defaults, $saved_settings);
/*
* Create the form using Forms API: http://api.drupal.org/api/6
*/
$form = array();
// Add the base theme's settings.
$form += corporate_settings($saved_settings, $defaults);
// Remove some of the base theme's settings.
unset($form['themedev']['zen_layout']);
// We don't need to select the base stylesheet.
// Return the form
return $form;
}
示例6: nquire_laf_settings
/**
* Implementation of THEMEHOOK_settings() function.
*
* @param $saved_settings
* An array of saved settings for this theme.
* @return
* A form array.
*/
function nquire_laf_settings($saved_settings)
{
// Get the default values from the .info file.
$defaults = zen_theme_get_default_settings('nquire_laf');
// Merge the saved variables and their default values.
$settings = array_merge($defaults, $saved_settings);
/*
* Create the form using Forms API: http://api.drupal.org/api/6
*/
$form = array();
$form['nquire_laf_color_scheme'] = array('#type' => 'select', '#title' => t('Color scheme'), '#default_value' => $settings['nquire_laf_color_scheme'], '#description' => t("Select the color scheme."), '#options' => array('original' => t('Original nQuire'), 'osl' => t('OSL'), 'nt' => t('Nominet Trust')), '#weight' => -1000);
// Add the base theme's settings.
// $form += zen_settings($saved_settings, $defaults);
// Remove some of the base theme's settings.
// unset($form['themedev']['zen_layout']); // We don't need to select the base stylesheet.
// Return the form
return $form;
}
示例7: fjmtheme_settings
/**
* Implementation of THEMEHOOK_settings() function.
*
* @param $saved_settings
* An array of saved settings for this theme.
* @return
* A form array.
*/
function fjmtheme_settings($saved_settings)
{
// Get the default values from the .info file.
$defaults = zen_theme_get_default_settings('corporate');
// Merge the saved variables and their default values.
$settings = array_merge($defaults, $saved_settings);
/*
* Create the form using Forms API: http://api.drupal.org/api/6
*/
$form = array();
$form['fjm_design'] = array('#type' => 'radios', '#title' => t('Collection Color Scheme'), '#default_value' => $settings['fjm_design'], '#options' => array('0' => t('None (default)'), '1' => t('atmusica'), '2' => t('ceacs'), '3' => t('merce'), '4' => t('turina'), '5' => t('ensayos')), '#description' => t('Select an option above if you wish to use a pre-designed color scheme.'));
// Add the base theme's settings.
$form += zen_settings($saved_settings, $defaults);
// Remove some of the base theme's settings.
unset($form['themedev']['zen_layout']);
// We don't need to select the base stylesheet.
// Return the form
return $form;
}
示例8: zen_classic_settings
/**
* Implementation of THEMEHOOK_settings() function.
*
* @param $saved_settings
* An array of saved settings for this theme.
* @return
* A form array.
*/
function zen_classic_settings($saved_settings)
{
// Get the default values from the .info file.
$defaults = zen_theme_get_default_settings('zen_classic');
// Merge the saved variables and their default values.
$settings = array_merge($defaults, $saved_settings);
/*
* Create the form using Forms API: http://api.drupal.org/api/6
*/
$form = array();
$form['zen_classic_fixed'] = array('#type' => 'checkbox', '#title' => t('Use fixed width for theme'), '#default_value' => $settings['zen_classic_fixed'], '#description' => t('The theme should be centered and fixed at 960 pixels wide.'));
// Add the base theme's settings.
$form += zen_settings($saved_settings, $defaults);
// Remove some of the base theme's settings.
unset($form['themedev']);
//unset($form['themedev']['zen_layout']); // We don't need to select the base stylesheet.
// Return the form
return $form;
}
示例9: zen_ninesixty_settings
/**
* Implementation of THEMEHOOK_settings() function.
*
* @param $saved_settings
* An array of saved settings for this theme.
* @return
* A form array.
*/
function zen_ninesixty_settings($saved_settings)
{
// Get the default values from the .info file.
$defaults = zen_theme_get_default_settings('zen_ninesixty');
// Merge the saved variables and their default values.
$settings = array_merge($defaults, $saved_settings);
/*
* Create the form using Forms API: http://api.drupal.org/api/6
*/
$form = array();
/* -- Load debug css - 960 grid */
$form['zen_ninesixty_debug'] = array('#prefix' => '<div id="div-zen-debug"><strong>' . t('Debug Mode:') . '</strong>', '#type' => 'checkbox', '#title' => t('Activate 960 Grid system image'), '#default_value' => $settings['zen_ninesixty_debug'], '#description' => t("Load grid image into page layout using the debug.css"), '#suffix' => '</div>');
// Add the base theme's settings.
$form += zen_settings($saved_settings, $defaults);
// Remove some of the base theme's settings.
unset($form['themedev']['zen_layout']);
// We don't need to select the base stylesheet.
// Return the form
return $form;
}
示例10: lullacog_settings
/**
* Implementation of THEMEHOOK_settings() function.
*
* @param $saved_settings
* An array of saved settings for this theme.
* @return
* A form array.
*/
function lullacog_settings($saved_settings)
{
// Get the default values from the .info file.
$defaults = zen_theme_get_default_settings('lullacog');
// Merge the saved variables and their default values.
$settings = array_merge($defaults, $saved_settings);
// Add the base theme's settings.
$form = zen_settings($saved_settings, $defaults);
$form['breadcrumb']['zen_breadcrumb_img'] = array('#type' => 'textfield', '#length' => 60, '#title' => t('Breadcrumb image'), '#default_value' => $settings['zen_breadcrumb_img'], '#description' => t("The path to the image file you would like to use as your breadcrumb separator. If you specify a file here, whatever text is specified in 'Breadcrumb Separator' above will be ignored."));
if ($theme_info->info['skins']) {
$skins = array('default' => t('Default'));
$skins = $skins + $theme_info->info['skins'];
$form['skin'] = array('#type' => 'radios', '#title' => t('Select a skin'), '#default_value' => $settings['skin'] ? $settings['skin'] : 'default', '#options' => $skins);
}
// Remove some of the base theme's settings.
unset($form['themedev']['zen_layout']);
// We don't need to select the base stylesheet.
// Return the form
return $form;
}
示例11: asuzen_settings
/**
* Implementation of THEMEHOOK_settings() function.
*
* @param $saved_settings
* An array of saved settings for this theme.
* @return
* A form array.
*/
function asuzen_settings($saved_settings)
{
// Get the default values from the .info file.
$defaults = zen_theme_get_default_settings('asuzen');
// Merge the saved variables and their default values.
$settings = array_merge($defaults, $saved_settings);
/*
* Create the form using Forms API: http://api.drupal.org/api/6
*/
$form = array();
$form['asuzen_asu_header'] = array('#type' => 'textfield', '#title' => t('ASU header path'), '#description' => t("Enter the path to the custom header."), '#default_value' => $settings['asuzen_asu_header'], '#element_validate' => array('asuzen_asu_header_validate'));
$form['asuzen_fixed'] = array('#type' => 'checkbox', '#title' => t('Fixed width layout'), '#default_value' => $settings['asuzen_fixed'], '#description' => t("Sets a fixed-width of 1000px."));
// Add the base theme's settings.
$form += zen_settings($saved_settings, $defaults);
// Remove some of the base theme's settings.
unset($form['themedev']['zen_layout']);
// We don't need to select the base stylesheet.
// Return the form
return $form;
}
示例12: boinc_settings
/**
* Implementation of THEMEHOOK_settings() function.
*
* @param $saved_settings
* An array of saved settings for this theme.
* @return
* A form array.
*/
function boinc_settings($saved_settings)
{
// Get the default values from the .info file.
$defaults = zen_theme_get_default_settings('boinc');
// Merge the saved variables and their default values.
$settings = array_merge($defaults, $saved_settings);
/*
* Create the form using Forms API: http://api.drupal.org/api/6
*/
$form = array();
$form['boinc_stats_charts'] = array('#type' => 'fieldset', '#title' => t('Chart settings'), '#attributes' => array('class' => 'zen-settings'));
$form['boinc_stats_charts']['boinc_stats_chart_color'] = array('#type' => 'textfield', '#title' => t('Chart color'), '#default_value' => $settings['boinc_stats_chart_color'], '#description' => t('The primary color of the stats chart in hex format (e.g. #FAA341).'));
$form['boinc_stats_charts']['boinc_stats_chart_bcolor'] = array('#type' => 'textfield', '#title' => t('Chart background color'), '#default_value' => $settings['boinc_stats_chart_bcolor'], '#description' => t('The background color of the stats chart in hex format (e.g. #FFFFFF).'));
// Add the base theme's settings.
$form += zen_settings($saved_settings, $defaults);
// Remove some of the base theme's settings.
unset($form['themedev']['zen_layout']);
// We don't need to select the base stylesheet.
// Return the form
return $form;
}
示例13: austin_settings
/**
* Implementation of THEMEHOOK_settings() function.
*
* @param $saved_settings
* An array of saved settings for this theme.
* @return
* A form array.
*/
function austin_settings($saved_settings)
{
// Get the default values from the .info file.
$defaults = zen_theme_get_default_settings('austin');
// Merge the saved variables and their default values.
$settings = array_merge($defaults, $saved_settings);
/*
* Create the form using Forms API: http://api.drupal.org/api/6
*/
$form = array();
$form['austin_color'] = array('#type' => 'fieldset', '#title' => t('Color settings'), '#attributes' => array('id' => 'austin-colors'));
$form['austin_color']['austin_color_option'] = array('#type' => 'checkbox', '#title' => t('Choose the alternate color palette'), '#default_value' => $settings['austin_color_option'], '#description' => t('A body class of .with-alternate-color will be added to the $body_classes variable.'), '#prefix' => '<div id="div-austin-colors"><strong>' . t('Blue/Red color palette:') . '</strong>', '#suffix' => '</div>');
// */
// Add the base theme's settings.
$form += zen_settings($saved_settings, $defaults);
$form['zen_block_editing']['#weight'] = -4;
// Remove some of the base theme's settings.
unset($form['themedev']['zen_layout']);
// We don't need to select the base stylesheet.
// Return the form
return $form;
}
示例14: asuzen_asu_header_validate
/**
* Capture theme settings submissions and validate
*/
function asuzen_asu_header_validate($element, &$form_state)
{
$defaults = zen_theme_get_default_settings('asuzen');
if ($element['#name'] == 'asuzen_asu_header_basepath') {
if (!file_exists($form_state['values']['asuzen_asu_header_basepath'])) {
form_error($element, t("{$element['#title']}: Base path does not exist."));
}
} else {
if ($element['#name'] == 'asuzen_asu_header_template') {
$header_path = $form_state['values']['asuzen_asu_header_basepath'] . '/' . $defaults['asuzen_asu_header_version'] . '/headers/' . $form_state['values']['asuzen_asu_header_template'] . '.shtml';
if (!file_exists($header_path)) {
form_error($element, t("{$element['#title']}: Selected header template does not exist."));
}
} else {
if ($element['#name'] == 'asuzen_asu_footer_color') {
$footer_path = $form_state['values']['asuzen_asu_header_basepath'] . '/' . $defaults['asuzen_asu_header_version'] . '/includes/' . 'footer' . $form_state['values']['asuzen_asu_footer_color'] . '.shtml';
if (!file_exists($footer_path)) {
form_error($element, t("{$element['#title']}: Selected footer color does not exist."));
}
}
}
}
}