Domanda

Ho creato impostazioni personalizzate per il mio tema per la memorizzazione di e -mail, URL FB, URL di Twitter e URL G+. Tutto sta arrivando correttamente ma le impostazioni non vengono salvate. Non ho idea di cosa non va. Tutto il codice e le schermate sono di seguito.

Contenuto del file .info

settings[z_email] = mail@zed.com
settings[z_facebook] = fb/url
settings[z_twitter] = twitter/url
settings[z_gplus] = gplus/url

Contenuto del file di tema settings.php

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."),
  );



}

La pagina di impostazione del tema:

enter image description here

Nessuna soluzione corretta

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a drupal.stackexchange
scroll top