Theme settings not getting saved
-
31-10-2019 - |
Question
I created custom settings for my theme for storing email, fb url, twitter url and g+ url. Everything is coming properly but the settings are not getting saved. I have no idea whats wrong. All the code and screenshots are below.
.info file content
settings[z_email] = mail@zed.com
settings[z_facebook] = fb/url
settings[z_twitter] = twitter/url
settings[z_gplus] = gplus/url
theme-settings.php file content
function z_form_system_theme_settings_alter(&$form, $form_state) {
$form['z_email'] = array(
'#type' => 'textfield',
'#title' => t('Email'),
'#default_value' => theme_get_setting('mail@zealind.com'),
'#description' => t("Global Email Id for ZealInd site."),
);
$form['z_facebook'] = array(
'#type' => 'textfield',
'#title' => t('Facebook'),
'#default_value' => theme_get_setting(''),
'#description' => t("Facebook Url."),
);
$form['z_twitter'] = array(
'#type' => 'textfield',
'#title' => t('Twitter'),
'#default_value' => theme_get_setting(''),
'#description' => t("Twitter Url."),
);
$form['z_gplus'] = array(
'#type' => 'textfield',
'#title' => t('Google+'),
'#default_value' => theme_get_setting(''),
'#description' => t("Google+ Url."),
);
}
The theme setting page:
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange