Created
October 5, 2012 05:51
-
-
Save danreb/3838311 to your computer and use it in GitHub Desktop.
Drupal Theme Specific Settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Usage | |
* Insert to specific code block, div or regions | |
* | |
*/ | |
<?php if (theme_get_setting('footer_credits')): ?> | |
<span class="credits"><?php print t('Powered by: '); ?> <a href="http://github.com/danreb/abtik">Abtik Base Theme</a></span> | |
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_form_FORM_ID_alter(). | |
* Example of adding settings in Drupal theme. | |
* This adds credits | |
*/ | |
function THEMENAME_form_system_theme_settings_alter(&$form, $form_state) { | |
$form['THEMENAME_settings']['footer'] = array( | |
'#type' => 'fieldset', | |
'#title' => t('Footer'), | |
'#collapsible' => TRUE, | |
'#collapsed' => FALSE, | |
); | |
$form['THEMENAME_settings']['footer']['footer_credits'] = array( | |
'#type' => 'checkbox', | |
'#title' => t('Show theme credits in footer'), | |
'#default_value' => theme_get_setting('footer_credits','abtik'), | |
'#description' => t("Check this option to show copyright text in footer. Uncheck to hide."), | |
); | |
return $form; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment