Last active
September 22, 2016 14:42
-
-
Save laurelstreng/ee27cc336a5590d5d16182a6fd8ec5dd to your computer and use it in GitHub Desktop.
Drupal 7 - Theme Settings WYSIWYG Field
This file contains hidden or 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 if (theme_get_setting('features_title')): ?> | |
<div class="features-title"> | |
<?php $featurestitle = theme_get_setting('features_title'); ?> | |
<?php print check_markup($featurestitle['value'], $featurestitle['format']); ?> | |
</div> | |
<?php endif; ?> |
This file contains hidden or 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
function THEMENAME_form_system_theme_settings_alter(&$form, $form_state, $form_id = NULL){ | |
if (isset($form_id)) { | |
return; | |
} | |
$form['front_page'] = array( | |
'#type' => 'fieldset', | |
'#title' => t('Front Page'), | |
'#description' => t('Add/edit titles for each unique section of the Front Page.'), | |
); | |
$featurestitle = theme_get_setting('features_title'); | |
$form['front_page']['features_title'] = array( | |
'#type' => 'text_format', | |
'#title' => t('Features Title'), | |
'#default_value' => $featurestitle['value'], | |
'#format' => 'full_html', | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment