From 61a3be68640bd01e3904df6e50729d7d93488760 Mon Sep 17 00:00:00 2001 From: Joshua Pilcher Date: Wed, 20 Sep 2017 11:54:08 -0500 Subject: [PATCH] Interim 137 Subtheme wordmark support * Can now set wordmark via path in appearance setting within a subtheme * Modified region--branding to make hide logo when subtheme settings demanded * form--system-theme-settings.tpl.php modified to make Appearance page reflect subtheme logo --- preprocess/preprocess-region.inc | 4 ++-- templates/form--system-theme-settings.tpl.php | 2 +- templates/region--branding.tpl.php | 2 +- theme-settings.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/preprocess/preprocess-region.inc b/preprocess/preprocess-region.inc index f511cd3..527bcc3 100644 --- a/preprocess/preprocess-region.inc +++ b/preprocess/preprocess-region.inc @@ -33,7 +33,7 @@ function suitcase_interim_alpha_preprocess_region(&$vars) { $vars['suitcase_interim_config_header_type'] = variable_get('suitcase_interim_config_header_type', 1); // Get the uploaded wordmark if is exists and the header type allows - $vars['wordmark_image'] = (theme_get_setting('default_logo', 'suitcase_interim')) ? file_create_url(drupal_get_path('theme', 'suitcase_interim') . '/images/isu.svg') : file_create_url(theme_get_setting('logo_path', 'suitcase_interim')); + $vars['wordmark_image'] = (theme_get_setting('default_logo')) ? file_create_url(drupal_get_path('theme', 'suitcase_interim') . '/images/isu.svg') : file_create_url(theme_get_setting('logo_path')); } elseif ($vars['region'] == 'menu') { @@ -60,4 +60,4 @@ function suitcase_interim_alpha_preprocess_region(&$vars) { elseif (strpos($vars['region'], 'sidebar') === 0) { $vars['attributes_array']['role'] = 'complementary'; } -} \ No newline at end of file +} diff --git a/templates/form--system-theme-settings.tpl.php b/templates/form--system-theme-settings.tpl.php index 6eefbec..11e2525 100644 --- a/templates/form--system-theme-settings.tpl.php +++ b/templates/form--system-theme-settings.tpl.php @@ -5,7 +5,7 @@ */ ?>
- +
    diff --git a/templates/region--branding.tpl.php b/templates/region--branding.tpl.php index d3be6a0..08bfa0a 100644 --- a/templates/region--branding.tpl.php +++ b/templates/region--branding.tpl.php @@ -3,7 +3,7 @@ - + Iowa State University Iowa State University - <?php print $site_name; ?> diff --git a/theme-settings.php b/theme-settings.php index 09dce1e..add2b81 100644 --- a/theme-settings.php +++ b/theme-settings.php @@ -48,7 +48,7 @@ function suitcase_interim_form_system_theme_settings_alter(&$form, &$form_state) $form['suitcase_interim_config']['suitcase_interim_config_logo']['default_logo'] = array( '#type' => 'checkbox', '#title' => t('Use the default ISU wordmark'), - '#default_value' => theme_get_setting('default_logo', 'suitcase_interim'), + '#default_value' => theme_get_setting('default_logo'), '#tree' => FALSE, '#description' => t('Check here if you want to use the default ISU wordmark.') ); @@ -67,7 +67,7 @@ function suitcase_interim_form_system_theme_settings_alter(&$form, &$form_state) '#type' => 'textfield', '#title' => t('Path to custom wordmark'), '#description' => t('The path to the file you would like to use as your logo file instead of the ISU wordmark.'), - '#default_value' => theme_get_setting('logo_path', 'suitcase_interim'), + '#default_value' => theme_get_setting('logo_path'), ); $form['suitcase_interim_config']['suitcase_interim_config_logo']['settings']['logo_upload'] = array(