本文整理汇总了PHP中theme_get_setting函数的典型用法代码示例。如果您正苦于以下问题:PHP theme_get_setting函数的具体用法?PHP theme_get_setting怎么用?PHP theme_get_setting使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了theme_get_setting函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mooc_foundation_access_menu_link__cis_service_connection_all_active_outline
/**
* Implements menu_link__cis_service_connection_all_active_outline().
*/
function mooc_foundation_access_menu_link__cis_service_connection_all_active_outline($variables)
{
switch (theme_get_setting('mooc_foundation_access_outline_labeling')) {
case 'auto_both':
$word = theme_get_setting('mooc_foundation_access_outline_label');
$number = TRUE;
break;
case 'auto_num':
$word = FALSE;
$number = TRUE;
break;
case 'auto_text':
$word = theme_get_setting('mooc_foundation_access_outline_label');
$number = FALSE;
break;
case 'none':
$word = FALSE;
$number = FALSE;
break;
default:
$word = t('Lesson');
$number = TRUE;
break;
}
return _foundation_access_menu_outline($variables, $word, $number);
}
示例2: manis_form_system_theme_settings_alter
function manis_form_system_theme_settings_alter(&$form, $form_state)
{
$theme_path = drupal_get_path('theme', 'manis');
$form['settings'] = array('#type' => 'vertical_tabs', '#title' => t('Theme settings'), '#weight' => 2, '#collapsible' => TRUE, '#collapsed' => FALSE);
$form['settings']['general_setting'] = array('#type' => 'fieldset', '#title' => t('General Settings'), '#collapsible' => TRUE, '#collapsed' => FALSE);
$form['settings']['general_setting']['general_setting_tracking_code'] = array('#type' => 'textarea', '#title' => t('Tracking Code'), '#default_value' => theme_get_setting('general_setting_tracking_code', 'manis'));
$form['settings']['header'] = array('#type' => 'fieldset', '#title' => t('Header settings'), '#collapsible' => TRUE, '#collapsed' => FALSE);
$form['settings']['header']['header_style'] = array('#title' => t('Header style'), '#type' => 'select', '#options' => array('header1' => t('Header 1'), 'header2' => t('Header 2'), 'header3' => t('Header 3')), '#default_value' => theme_get_setting('header_style', 'manis'));
$form['settings']['header']['phone_contact'] = array('#title' => t('Phone contact'), '#type' => 'textfield', '#default_value' => theme_get_setting('phone_contact', 'manis'));
$form['settings']['header']['contact_email'] = array('#title' => t('Contact email'), '#type' => 'textfield', '#default_value' => theme_get_setting('contact_email', 'manis'));
$form['settings']['header']['social_network'] = array('#title' => t('Header social network'), '#type' => 'textarea', '#default_value' => theme_get_setting('social_network', 'manis'));
$form['settings']['blogs'] = array('#type' => 'fieldset', '#title' => t('Blogs'), '#collapsible' => TRUE, '#collapsed' => FALSE);
$form['settings']['blogs']['blogs_list'] = array('#type' => 'select', '#title' => t('Blogs list style'), '#options' => array('style1' => t('Style 1'), 'style2' => t('Style 2')), '#default_value' => theme_get_setting('blogs_style', 'manis'));
$form['settings']['footer'] = array('#type' => 'fieldset', '#title' => t('Footer settings'), '#collapsible' => TRUE, '#collapsed' => FALSE);
$form['settings']['footer']['enable_footer_logo'] = array('#type' => 'select', '#title' => t('Enable footer logo'), '#options' => array('on' => t('ON'), 'off' => t('OFF')), '#default_value' => theme_get_setting('enable_footer_logo', 'manis'));
$form['settings']['footer']['footer_copyright_message'] = array('#type' => 'textarea', '#title' => t('Footer copyright message'), '#default_value' => theme_get_setting('footer_copyright_message', 'manis'));
$form['settings']['custom_css'] = array('#type' => 'fieldset', '#title' => t('Custom CSS'), '#collapsible' => TRUE, '#collapsed' => FALSE);
$form['settings']['custom_css']['custom_css'] = array('#type' => 'textarea', '#title' => t('Custom CSS'), '#default_value' => theme_get_setting('custom_css', 'manis'), '#description' => t('<strong>Example:</strong><br/>h1 { font-family: \'Metrophobic\', Arial, serif; font-weight: 400; }'));
$form['settings']['skin'] = array('#type' => 'fieldset', '#title' => t('Switcher Style'), '#collapsible' => TRUE, '#collapsed' => FALSE);
//Disable Switcher style;
$form['settings']['skin']['manis_disable_switch'] = array('#title' => t('Switcher style'), '#type' => 'select', '#options' => array('on' => t('ON'), 'off' => t('OFF')), '#default_value' => theme_get_setting('manis_disable_switch', 'manis'));
$form['settings']['skin']['manis_layout'] = array('#title' => t('Layout'), '#type' => 'select', '#options' => array('wide' => t('Wide'), 'boxed' => t('Boxed')), '#default_value' => theme_get_setting('manis_layout', 'manis'));
$form['settings']['skin']['manis_direction'] = array('#title' => t('Direction'), '#type' => 'select', '#options' => array('ltr' => t('LTR'), 'rtl' => t('RTL')), '#default_value' => theme_get_setting('manis_direction', 'manis'));
$form['settings']['skin']['manis_style'] = array('#title' => t('Style'), '#type' => 'select', '#options' => array('light' => t('LIGHT'), 'dark' => t('DARK')), '#default_value' => theme_get_setting('manis_style', 'manis'));
$form['settings']['skin']['manis_skin'] = array('#title' => t('Skins'), '#type' => 'select', '#options' => array('default' => t('Default'), 'alimbalmarina' => t('Alimbalmarina'), 'juicy' => t('Juicy'), 'spoonflower_goats' => t('Spoonflower goats'), 'nutricap_keratin_vit' => t('Nutricap keratin vit'), 'courtly_attire' => t('Courtly attire'), 'mondrian' => t('Mondrian'), 'sage' => t('Sage'), 'walking_by' => t('Walking by')), '#default_value' => theme_get_setting('manis_skin', 'manis'));
$form['settings']['skin']['background'] = array('#type' => 'fieldset', '#title' => t('Background style'), '#collapsible' => TRUE, '#collapsed' => FALSE);
$form['settings']['skin']['background']['background_style'] = array('#title' => t('Use style'), '#type' => 'select', '#options' => array('pattern' => t('Pattern'), 'image' => t('Image')), '#default_value' => theme_get_setting('background_style', 'manis'));
$form['settings']['skin']['background']['manis_bg_pattern'] = array('#title' => t('Bg pattern'), '#type' => 'select', '#options' => array('swirl_pattern' => t('Swirl pattern'), 'sativa' => t('Sativa'), 'dimension' => t('Dimension'), 'symphony' => t('Symphony'), 'black_lozenge' => t('Black lozenge'), 'congruent_outline' => t('Congruent outline'), 'dark_exa' => t('Dark exa'), 'office_pattern' => t('Office pattern')), '#default_value' => theme_get_setting('manis_bg_pattern', 'manis'));
$form['settings']['skin']['background']['manis_bg_image'] = array('#title' => t('Bg image'), '#type' => 'select', '#options' => array('1' => t('1'), '2' => t('2'), '3' => t('3'), '4' => t('4'), '5' => t('5'), '6' => t('6'), '7' => t('7'), '8' => t('8')), '#default_value' => theme_get_setting('manis_bg_image', 'manis'));
}
示例3: zen_form_system_theme_settings_alter
/**
* Implements hook_form_system_theme_settings_alter() function.
*/
function zen_form_system_theme_settings_alter(&$form, $form_state, $form_id = NULL)
{
// Work-around for a core bug affecting admin themes. See issue #943212.
if (isset($form_id)) {
return;
}
// Create the form using Forms API
$form['breadcrumb'] = array('#type' => 'fieldset', '#title' => t('Breadcrumb settings'));
$form['breadcrumb']['zen_breadcrumb'] = array('#type' => 'select', '#title' => t('Display breadcrumb'), '#default_value' => theme_get_setting('zen_breadcrumb'), '#options' => array('yes' => t('Yes'), 'admin' => t('Only in admin section'), 'no' => t('No')));
$form['breadcrumb']['breadcrumb_options'] = array('#type' => 'container', '#states' => array('invisible' => array(':input[name="zen_breadcrumb"]' => array('value' => 'no'))));
$form['breadcrumb']['breadcrumb_options']['zen_breadcrumb_separator'] = array('#type' => 'textfield', '#title' => t('Breadcrumb separator'), '#description' => t('Text only. Don’t forget to include spaces.'), '#default_value' => theme_get_setting('zen_breadcrumb_separator'), '#size' => 5, '#maxlength' => 10);
$form['breadcrumb']['breadcrumb_options']['zen_breadcrumb_home'] = array('#type' => 'checkbox', '#title' => t('Show home page link in breadcrumb'), '#default_value' => theme_get_setting('zen_breadcrumb_home'));
$form['breadcrumb']['breadcrumb_options']['zen_breadcrumb_trailing'] = array('#type' => 'checkbox', '#title' => t('Append a separator to the end of the breadcrumb'), '#default_value' => theme_get_setting('zen_breadcrumb_trailing'), '#description' => t('Useful when the breadcrumb is placed just before the title.'), '#states' => array('disabled' => array(':input[name="zen_breadcrumb_title"]' => array('checked' => TRUE))));
$form['breadcrumb']['breadcrumb_options']['zen_breadcrumb_title'] = array('#type' => 'checkbox', '#title' => t('Append the content title to the end of the breadcrumb'), '#default_value' => theme_get_setting('zen_breadcrumb_title'), '#description' => t('Useful when the breadcrumb is not placed just before the title.'));
$form['support'] = array('#type' => 'fieldset', '#title' => t('Accessibility and support settings'));
// Only toggle the layout for the main Zen theme.
if ($form['var']['#value'] == 'theme_zen_settings') {
$form['support']['zen_layout'] = array('#type' => 'radios', '#title' => t('Layout'), '#options' => array('zen-responsive-sidebars' => t('Responsive sidebar layout') . ' <small>(layouts/responsive-sidebars.css)</small>', 'zen-fixed-width' => t('Fixed width layout') . ' <small>(layouts/fixed-width.css)</small>'), '#default_value' => theme_get_setting('zen_layout'));
}
$form['support']['zen_skip_link_anchor'] = array('#type' => 'textfield', '#title' => t('Anchor ID for the “skip link”'), '#default_value' => theme_get_setting('zen_skip_link_anchor'), '#field_prefix' => '#', '#description' => t('Specify the HTML ID of the element that the accessible-but-hidden “skip link” should link to. Note: that element should have the <code>tabindex="-1"</code> attribute to prevent an accessibility bug in webkit browsers. (<a href="!link">Read more about skip links</a>.)', array('!link' => 'https://drupal.org/node/467976')));
$form['support']['zen_skip_link_text'] = array('#type' => 'textfield', '#title' => t('Text for the “skip link”'), '#default_value' => theme_get_setting('zen_skip_link_text'), '#description' => t('For example: <em>Jump to navigation</em>, <em>Skip to content</em>'));
$form['support']['zen_meta'] = array('#type' => 'checkboxes', '#title' => t('Add HTML5 and responsive scripts and meta tags to every page.'), '#default_value' => theme_get_setting('zen_meta'), '#options' => array('html5' => t('Add HTML5 shim JavaScript to add support to IE 6-8.'), 'meta' => t('Add meta tags to support responsive design on mobile devices.')), '#description' => t('IE 6-8 require a JavaScript polyfill solution to add basic support of HTML5. Mobile devices require a few meta tags for responsive designs.'));
$form['themedev'] = array('#type' => 'fieldset', '#title' => t('Theme development settings'));
$form['themedev']['zen_rebuild_registry'] = array('#type' => 'checkbox', '#title' => t('Rebuild theme registry on every page.'), '#default_value' => theme_get_setting('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' => 'https://drupal.org/node/173880#theme-registry')));
}
示例4: cuflat_form_system_theme_settings_alter
function cuflat_form_system_theme_settings_alter(&$form, &$form_state)
{
$theme = $form_state['build_info']['args'][0];
$form['cuflat_theme_settings'] = array('#type' => 'fieldset', '#title' => t('Flat Theme Settings'), '#collapsible' => TRUE, '#collapsed' => TRUE);
$form['cuflat_theme_settings']['layout_style'] = array('#type' => 'radios', '#title' => t('Layout Style'), '#default_value' => theme_get_setting('layout_style', $theme) ? theme_get_setting('layout_style', $theme) : 'layout-wide', '#description' => t('Pick a layout style for your site.'), '#options' => array('layout-wide' => t('Wide'), 'layout-boxed' => t('Boxed')));
$form['cuflat_theme_settings']['banner_color'] = array('#type' => 'radios', '#title' => t('Banner Color'), '#default_value' => theme_get_setting('banner_color', $theme) ? theme_get_setting('banner_color', $theme) : 'black', '#description' => t('Pick a banner color for your site.'), '#options' => array('white' => t('White'), 'black' => t('Black')));
}
示例5: ishopping_form_system_theme_settings_alter
/**
* Impliments hook_form_system_theme_settings_alter().
*/
function ishopping_form_system_theme_settings_alter(&$form, $form_state)
{
$form['nucleus']['global_settings']['theme_settings']['hide_frontpage_main_content'] = array('#type' => 'checkbox', '#title' => t('Hide Main Content Block in Home Page'), '#default_value' => theme_get_setting('hide_frontpage_main_content'));
$form['nucleus']['about_nucleus'] = array('#type' => 'fieldset', '#title' => t('Feedback'), '#weight' => 40);
$form['nucleus']['about_nucleus']['about_nucleus_wrapper'] = array('#type' => 'container', '#attributes' => array('class' => array('about-nucleus-wrapper')));
$form['nucleus']['about_nucleus']['about_nucleus_wrapper']['about_nucleus_content'] = array('#markup' => '<iframe width="100%" height="650" scrolling="no" class="nucleus_frame" frameborder="0" src="http://www.weebpal.com/static/feedback/"></iframe>');
}
示例6: fusion_core_initialize_theme_settings
/**
* Initialize theme settings if needed
*/
function fusion_core_initialize_theme_settings($theme_name)
{
$theme_settings = theme_get_settings($theme_name);
if (!isset($theme_settings['primary_menu_dropdown']) || $theme_settings['rebuild_registry'] == 1) {
static $registry_rebuilt = false;
// avoid multiple rebuilds per page
// Rebuild theme registry & notify user
if (isset($theme_settings['rebuild_registry']) && $theme_settings['rebuild_registry'] == 1 && !$registry_rebuilt) {
drupal_rebuild_theme_registry();
drupal_set_message(t('Theme registry rebuild completed. <a href="!link">Turn off</a> this feature for production websites.', array('!link' => url('admin/build/themes/settings/' . $GLOBALS['theme']))), 'warning');
$registry_rebuilt = true;
}
// Retrieve saved or site-wide theme settings
$theme_setting_name = str_replace('/', '_', 'theme_' . $theme_name . '_settings');
$settings = variable_get($theme_setting_name, FALSE) ? theme_get_settings($theme_name) : theme_get_settings();
// Skip toggle_node_info_ settings
if (module_exists('node')) {
foreach (node_get_types() as $type => $name) {
unset($settings['toggle_node_info_' . $type]);
}
}
// Combine default theme settings from .info file & theme-settings.php
$theme_data = list_themes();
// get theme data for all themes
$info_theme_settings = $theme_name ? $theme_data[$theme_name]->info['settings'] : array();
$defaults = array_merge(fusion_core_default_theme_settings(), $info_theme_settings);
// Set combined default & saved theme settings
variable_set($theme_setting_name, array_merge($defaults, $settings));
// Force theme settings refresh
theme_get_setting('', TRUE);
}
}
示例7: bones_form_system_theme_settings_alter
function bones_form_system_theme_settings_alter(&$form, $form_state)
{
$grid_size = theme_get_setting('grid_size');
$col_number = get_columns();
$form['advanced_settings'] = array('#type' => 'vertical_tabs', '#title' => t('Advanced Theme Settings'), '#description' => t('Customize widths of the Preface and Postscript regions.'), '#collapsible' => TRUE, '#collapsed' => FALSE, '#weight' => -10, '#prefix' => t('<h3> Advanced Settings </h3>'));
// Styles
$form['advanced_settings']['styles'] = array('#type' => 'fieldset', '#title' => t('Styles'), '#collapsible' => TRUE, '#collapsed' => FALSE);
$form['advanced_settings']['styles']['style'] = array('#type' => 'select', '#title' => t('Style'), '#default_value' => theme_get_setting('style'), '#options' => array(1 => t('Style 1'), 2 => t('Style 2'), 3 => t('Style 3'), 4 => t('Style 4'), 5 => t('Style 5')));
// Grid Settings
$form['advanced_settings']['grid_settings'] = array('#type' => 'fieldset', '#title' => t('Grid Settings'), '#collapsible' => TRUE, '#collapsed' => FALSE, '#weight' => -10);
$form['advanced_settings']['grid_settings']['grid_size'] = array('#type' => 'select', '#title' => t('Grid Size'), '#default_value' => theme_get_setting('grid_size'), '#options' => array(12 => t('12 columns')));
$form['advanced_settings']['grid_settings']['sidebar_grid_settings'] = array('#type' => 'fieldset', '#title' => t('Sidebar Grid Settings'), '#description' => t('Customize the Sidebars.'), '#collapsible' => TRUE, '#collapsed' => FALSE, '#attributes' => array('class' => array('form-inline')), '#prefix' => t('<h3> Sidebar Grid Settings </h3>'));
$form['advanced_settings']['grid_settings']['sidebar_grid_settings']['sidebar_layout'] = array('#type' => 'select', '#title' => t('Sidebar Layout'), '#default_value' => theme_get_setting('sidebar_layout'), '#options' => array('sidebars-both-first' => t('Both Sidebars First'), 'sidebars-both-second' => t('Both Sidebars Second'), 'sidebars-split' => t('Split Sidebars')));
$form['advanced_settings']['grid_settings']['sidebar_grid_settings']['sidebar_first_width'] = array('#type' => 'select', '#title' => t('Sidebar First'), '#default_value' => theme_get_setting('sidebar_first_width'), '#options' => $col_number);
$form['advanced_settings']['grid_settings']['sidebar_grid_settings']['sidebar_second_width'] = array('#type' => 'select', '#title' => t('Sidebar Second'), '#default_value' => theme_get_setting('sidebar_second_width'), '#options' => $col_number);
$form['advanced_settings']['grid_settings']['preface_settings'] = array('#type' => 'fieldset', '#title' => t('More Grid Settings'), '#description' => t('Customize widths of the Preface regions. Note that all four values combined should ideally add up to ' . $grid_size . '.'), '#collapsible' => TRUE, '#collapsed' => FALSE, '#attributes' => array('class' => array('form-inline')), '#prefix' => t('<h3> Preface Grid Widths </h3>'));
$form['advanced_settings']['grid_settings']['postscript_settings'] = array('#type' => 'fieldset', '#title' => t('More Grid Settings'), '#description' => t('Customize widths of the Postscript regions. Note that all four values combined should ideally add up to ' . $grid_size . '.'), '#collapsible' => TRUE, '#collapsed' => FALSE, '#attributes' => array('class' => array('form-inline')), '#prefix' => t('<h3> Postscript Grid Widths </h3>'));
for ($region_count = 1; $region_count <= 4; $region_count++) {
$form['advanced_settings']['grid_settings']['preface_settings']['preface_' . $region_count . '_grid_width'] = array('#type' => 'select', '#title' => t('Preface ' . $region_count), '#default_value' => theme_get_setting('preface_' . $region_count . '_grid_width'), '#options' => $col_number);
$form['advanced_settings']['grid_settings']['postscript_settings']['postscript_' . $region_count . '_grid_width'] = array('#type' => 'select', '#title' => t('Postscript ' . $region_count), '#default_value' => theme_get_setting('postscript_' . $region_count . '_grid_width'), '#options' => $col_number);
}
// Misc Settings (Facebook, Twitter, etc.)
$form['advanced_settings']['misc_settings'] = array('#type' => 'fieldset', '#title' => t('Misc Settings'), '#collapsible' => TRUE, '#collapsed' => FALSE);
$form['advanced_settings']['misc_settings']['twitter'] = array('#type' => 'textfield', '#title' => t('Twitter URL'), '#size' => 10, '#default_value' => theme_get_setting('twitter'));
$form['advanced_settings']['misc_settings']['facebook'] = array('#type' => 'textfield', '#title' => t('Facebook URL'), '#size' => 10, '#default_value' => theme_get_setting('facebook'));
}
示例8: midnight_form_system_theme_settings_alter
/**
* Implements hook_form_FORM_ID_alter().
* @param $form
* @param $form_state
*/
function midnight_form_system_theme_settings_alter(&$form, &$form_state)
{
// Disabling responsiveness
$form['advanced']['responsive_utilities'] = array('#type' => 'fieldset', '#title' => t('Responsive utilities'), '#collapsible' => TRUE, '#collapsed' => FALSE);
$form['advanced']['responsive_utilities']['disabling_responsiveness'] = array('#type' => 'checkbox', '#title' => t('Disabling responsiveness'), '#default_value' => theme_get_setting('disabling_responsiveness'), '#description' => t('Enable this if you want to disabling responsiveness on theme.'));
$form['advanced']['responsive_utilities']['non_responsive_width'] = array('#type' => 'select', '#title' => t('Default container width'), '#description' => t('Select your default width of container class on page.'), '#default_value' => theme_get_setting('non_responsive_width'), '#options' => array('970' => t('Medium devices (970px)'), '1170' => t('Large devices (1170px)')), '#states' => array('invisible' => array(':input[name="disabling_responsiveness"]' => array('checked' => FALSE))));
}
示例9: glisseo_form_system_theme_settings_alter
/**
* Implements hook_form_system_theme_settings_alter() function.
*/
function glisseo_form_system_theme_settings_alter(&$form, $form_state, $form_id = NULL)
{
// Bug workaround (#943212).
if (isset($form_id)) {
return;
}
// We move default theme settings to new fieldset.
$form['theme_settings_fieldset'] = array('#type' => 'fieldset', '#title' => t('Base theme settings'), '#weight' => 1, '#collapsible' => TRUE, '#collapsed' => TRUE);
$form['theme_settings_fieldset']['theme_settings'] = $form['theme_settings'];
unset($form['theme_settings']);
$form['theme_settings_fieldset']['logo'] = $form['logo'];
unset($form['logo']);
$form['theme_settings_fieldset']['favicon'] = $form['favicon'];
unset($form['favicon']);
$form['developers_settings'] = array('#type' => 'fieldset', '#title' => t('Development'), '#weight' => 2, '#collapsible' => TRUE, '#collapsed' => TRUE);
$form['developers_settings']['glisseo_rebuild_registry'] = array('#weight' => 1, '#type' => 'checkbox', '#title' => t('Rebuild theme registry on every page load.'), '#default_value' => theme_get_setting('glisseo_rebuild_registry'));
$form['developers_settings']['glisseo_body_classes'] = array('#weight' => 2, '#type' => 'checkbox', '#title' => t('Add HTML classes to body-tag element.'), '#description' => t('Adds classes to body element. F.e.: html front logged-in page-node ...'), '#default_value' => theme_get_setting('glisseo_body_classes'));
$form['developers_settings']['glisseo_new_checkboxes'] = array('#weight' => 3, '#type' => 'checkbox', '#title' => t('New checkbox style.'), '#description' => t('Checkboxes will be displayed as switchers.'), '#default_value' => theme_get_setting('glisseo_new_checkboxes'));
$form['developers_settings']['glisseo_new_radios'] = array('#weight' => 4, '#type' => 'checkbox', '#title' => t('New radio-button style.'), '#description' => t('Radio-buttons will be themed.'), '#default_value' => theme_get_setting('glisseo_new_radios'));
$form['developers_settings']['glisseo_disable_grippie'] = array('#weight' => 5, '#type' => 'checkbox', '#title' => t('Disable textarea grippie.'), '#description' => t('Modern browser support textarea resize out the box. You can disable default grippie.'), '#default_value' => theme_get_setting('glisseo_disable_grippie'));
// @TODO: manage all files without custom code.
// This is some workaround for allow submit theme form with managed_file.
//$theme = $GLOBALS['theme_key'];
//$themes = list_themes();
//$form_state['build_info']['files'][] = str_replace("/$theme.info", '', $themes[$theme]->filename) . '/theme-settings.php';
//$form['#submit'][] = 'glisseo_theme_settings_form_submit';
}
示例10: bootstrap_preprocess_region
/**
* Implements hook_preprocess_region().
*/
function bootstrap_preprocess_region(&$variables)
{
global $theme;
$region = $variables['region'];
$classes =& $variables['classes_array'];
// Content region.
if ($region === 'content') {
// @todo is this actually used properly?
$variables['theme_hook_suggestions'][] = 'region__no_wrapper';
} elseif ($region === 'help' && !empty($variables['content'])) {
$variables['content'] = _bootstrap_icon('question-sign') . $variables['content'];
$classes[] = 'alert';
$classes[] = 'alert-info';
$classes[] = 'messages';
$classes[] = 'info';
}
// Support for "well" classes in regions.
static $wells;
if (!isset($wells)) {
foreach (system_region_list($theme) as $name => $title) {
$wells[$name] = theme_get_setting('bootstrap_region_well-' . $name);
}
}
if (!empty($wells[$region])) {
$classes[] = $wells[$region];
}
}
示例11: garland_preprocess_html
/**
* Override or insert variables into the html template.
*/
function garland_preprocess_html(&$vars)
{
// Toggle fixed or fluid width.
if (theme_get_setting('garland_width') == 'fluid') {
$vars['classes_array'][] = 'fluid-width';
}
}
示例12: razorDrupal_process_page
function razorDrupal_process_page(&$variables)
{
// Hook into color.module.
if (module_exists('color')) {
_color_page_alter($variables);
}
// Always print the site name and slogan, but if they are toggled off, we'll
// just hide them visually.
$variables['hide_site_name'] = theme_get_setting('toggle_name') ? FALSE : TRUE;
$variables['hide_site_slogan'] = theme_get_setting('toggle_slogan') ? FALSE : TRUE;
if ($variables['hide_site_name']) {
// If toggle_name is FALSE, the site_name will be empty, so we rebuild it.
$variables['site_name'] = filter_xss_admin(variable_get('site_name', 'Drupal'));
}
if ($variables['hide_site_slogan']) {
// If toggle_site_slogan is FALSE, the site_slogan will be empty, so we rebuild it.
$variables['site_slogan'] = filter_xss_admin(variable_get('site_slogan', ''));
}
// Since the title and the shortcut link are both block level elements,
// positioning them next to each other is much simpler with a wrapper div.
if (!empty($variables['title_suffix']['add_or_remove_shortcut']) && $variables['title']) {
// Add a wrapper div using the title_prefix and title_suffix render elements.
$variables['title_prefix']['shortcut_wrapper'] = array('#markup' => '<div class="shortcut-wrapper clearfix">', '#weight' => 100);
$variables['title_suffix']['shortcut_wrapper'] = array('#markup' => '</div>', '#weight' => -99);
// Make sure the shortcut link is the first item in title_suffix.
$variables['title_suffix']['add_or_remove_shortcut']['#weight'] = -100;
}
}
示例13: corporateclean_preprocess_html
function corporateclean_preprocess_html(&$variables)
{
if (!theme_get_setting('responsive_respond', 'corporateclean')) {
drupal_add_css(path_to_theme() . '/css/basic-layout.css', array('group' => CSS_THEME, 'browsers' => array('IE' => '(lte IE 8)&(!IEMobile)', '!IE' => FALSE), 'preprocess' => FALSE));
}
drupal_add_css(path_to_theme() . '/css/ie.css', array('group' => CSS_THEME, 'browsers' => array('IE' => '(lte IE 8)&(!IEMobile)', '!IE' => FALSE), 'preprocess' => FALSE));
}
示例14: sonambulo_form_system_theme_settings_alter
function sonambulo_form_system_theme_settings_alter(&$form, &$form_state)
{
$form['libraries'] = array('#type' => 'fieldset', '#title' => t('Additional Libraries'));
$form['libraries']['html5shim'] = array('#type' => 'checkbox', '#title' => t('html5 Shim'), '#default_value' => theme_get_setting('html5shim'), '#description' => t('Adds the html5 shim, a library that enables non-modern browsers to recognize HTML5 elements.'));
$form['libraries']['respond_js'] = array('#type' => 'checkbox', '#title' => t('Respond'), '#default_value' => theme_get_setting('respond_js'), '#description' => t('respond.js: A fast & lightweight polyfill for min/max-width CSS3 Media Queries (JavaScript library for IE 6-8, and more).'));
$form['libraries']['normalize_css'] = array('#type' => 'checkbox', '#title' => t('normalize.css'), '#default_value' => theme_get_setting('normalize_css'), '#description' => t('A modern, HTML5-ready alternative to CSS resets.'));
}
示例15: cu_omega_form_system_theme_settings_alter
function cu_omega_form_system_theme_settings_alter(&$form, &$form_state)
{
$theme = $form_state['build_info']['args'][0];
$form['cu_omega_theme_settings'] = array('#type' => 'fieldset', '#title' => t('Theme Settings'));
$form['cu_omega_theme_settings']['typography'] = array('#type' => 'fieldset', '#title' => t('Typography'), '#collapsible' => TRUE, '#collapsed' => TRUE);
$form['cu_omega_theme_settings']['typography']['headings'] = array('#type' => 'radios', '#title' => t('Heading Style'), '#default_value' => theme_get_setting('headings', $theme) ? theme_get_setting('headings', $theme) : 'headings-bold', '#description' => t('Pick a style for your sites headings.'), '#options' => array('headings-bold' => t('Bold'), 'headings-light' => t('Light')));
if (module_exists('cu_title_image')) {
$form['cu_omega_theme_settings']['page_title_image'] = array('#type' => 'fieldset', '#title' => t('Page Title Image'), '#collapsible' => TRUE, '#collapsed' => TRUE);
$form['cu_omega_theme_settings']['page_title_image']['page_title_image_background'] = array('#type' => 'radios', '#title' => t('Page Title Image Style'), '#default_value' => theme_get_setting('page_title_image_background', $theme) ? theme_get_setting('page_title_image_background', $theme) : 'page-title-image-background-white', '#description' => t('Pick a style for page title image text.'), '#options' => array('page-title-image-background-white' => t('Solid'), 'page-title-image-background-transparent' => t('Transparent')));
$form['cu_omega_theme_settings']['page_title_image']['page_title_image_width'] = array('#type' => 'radios', '#title' => t('Page Title Image Width'), '#default_value' => theme_get_setting('page_title_image_width', $theme) ? theme_get_setting('page_title_image_width', $theme) : 'page-title-image-width-content', '#description' => t('Pick a width for page title image. The effect is more dramatic when the theme layout option is set to wide.'), '#options' => array('page-title-image-width-full' => t('Browser Width'), 'page-title-image-width-content' => t('Content Width')));
}
$form['cu_omega_theme_settings']['columns'] = array('#type' => 'fieldset', '#title' => t('Column Options'), '#collapsible' => TRUE, '#collapsed' => TRUE);
$form['cu_omega_theme_settings']['columns']['after_content_columns'] = array('#type' => 'radios', '#title' => t('After Content Columns'), '#default_value' => theme_get_setting('after_content_columns', $theme) ? theme_get_setting('after_content_columns', $theme) : '3', '#description' => t('Pick how many columns for blocks after the content'), '#options' => array('6' => t('6'), '4' => t('4'), '3' => t('3'), '2' => t('2'), '1' => t('1')));
$form['cu_omega_theme_settings']['columns']['lower_columns'] = array('#type' => 'radios', '#title' => t('After Content 2 Columns'), '#default_value' => theme_get_setting('lower_columns', $theme) ? theme_get_setting('lower_columns', $theme) : '2', '#description' => t('Pick how many columns for blocks in the second after content region'), '#options' => array('6' => t('6'), '4' => t('4'), '3' => t('3'), '2' => t('2'), '1' => t('1')));
$form['cu_omega_theme_settings']['columns']['footer_columns'] = array('#type' => 'radios', '#title' => t('Footer Columns'), '#default_value' => theme_get_setting('footer_columns', $theme) ? theme_get_setting('footer_columns', $theme) : '4', '#description' => t('Pick how many columns for blocks in the footer'), '#options' => array('6' => t('6'), '4' => t('4'), '3' => t('3'), '2' => t('2'), '1' => t('1')));
$form['cu_omega_theme_settings']['breadcrumbs'] = array('#type' => 'fieldset', '#title' => t('Breadcrumbs'), '#collapsible' => TRUE, '#collapsed' => TRUE);
$form['cu_omega_theme_settings']['breadcrumbs']['use_breadcrumbs'] = array('#type' => 'checkbox', '#title' => t('Use Breadcrumbs'), '#default_value' => theme_get_setting('use_breadcrumbs', $theme) ? theme_get_setting('use_breadcrumbs', $theme) : FALSE, '#description' => t('Enable breadcrumb navigation.'));
$form['cu_omega_theme_settings']['action_menu'] = array('#type' => 'fieldset', '#title' => t('Secondary Menu'), '#collapsible' => TRUE, '#collapsed' => TRUE);
$form['cu_omega_theme_settings']['action_menu']['use_action_menu'] = array('#type' => 'checkbox', '#title' => t('Placement'), '#default_value' => theme_get_setting('use_action_menu', $theme) ? theme_get_setting('use_action_menu', $theme) : FALSE, '#description' => t('Place secondary menu as buttons on main navigation bar. Secondary menu label does not display when this option is selected.'));
$form['cu_omega_theme_settings']['action_menu']['action_menu_color'] = array('#type' => 'radios', '#title' => t('Color'), '#default_value' => theme_get_setting('action_menu_color', $theme) ? theme_get_setting('action_menu_color', $theme) : 'action-none', '#description' => t('Pick color for action menu'), '#options' => array('action-blue' => t('Blue'), 'action-gray' => t('Gray'), 'action-gold' => t('Gold'), 'action-none' => t('None (same as main menu navigation)')));
$form['cu_omega_theme_settings']['footer_menu'] = array('#type' => 'fieldset', '#title' => t('Footer Menu'), '#collapsible' => TRUE, '#collapsed' => TRUE);
$form['cu_omega_theme_settings']['footer_menu']['footer_menu_color'] = array('#type' => 'radios', '#title' => t('Color'), '#default_value' => theme_get_setting('footer_menu_color', $theme) ? theme_get_setting('footer_menu_color', $theme) : 'footer-menu-gray', '#description' => t('Pick color for footer menu.'), '#options' => array('footer-menu-gray' => t('Gray'), 'footer-menu-gold' => t('Gold')));
$form['cu_omega_theme_settings']['block_icons'] = array('#type' => 'fieldset', '#title' => t('Block Icons'), '#collapsible' => TRUE, '#collapsed' => TRUE);
$form['cu_omega_theme_settings']['block_icons']['block_icons_color'] = array('#type' => 'radios', '#title' => t('Color'), '#default_value' => theme_get_setting('block_icons_color', $theme) ? theme_get_setting('block_icons_color', $theme) : 'block-icons-inherit', '#description' => t('Pick color for block title icons.'), '#options' => array('block-icons-inherit' => t('Same as block title text'), 'block-icons-gray' => t('Gray'), 'block-icons-gold' => t('Gold')));
}