New social link to reference the owner's website
This commit is contained in:
parent
5d94c7963f
commit
894a693a65
10 changed files with 67 additions and 53 deletions
|
@ -1178,36 +1178,44 @@ function system_site_information_settings() {
|
|||
'#default_value' => variable_get('site_mission', ''),
|
||||
'#description' => t("Your site's mission or focus statement (often prominently displayed on the front page).")
|
||||
);
|
||||
$form['site_twitter'] = array(
|
||||
|
||||
$form['social_website'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Twitter URL'),
|
||||
'#default_value' => variable_get('site_twitter', ''),
|
||||
'#description' => t('URL address of your Twitter account.')
|
||||
'#title' => t('Website URL'),
|
||||
'#default_value' => variable_get('social_website', ''),
|
||||
'#description' => t('Your main website.')
|
||||
);
|
||||
$form['site_facebook'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Facebook URL'),
|
||||
'#default_value' => variable_get('site_facebook', ''),
|
||||
'#description' => t('URL address of your Facebook page.')
|
||||
);
|
||||
$form['site_linkedin'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('LinkedIn URL'),
|
||||
'#default_value' => variable_get('site_linkedin', ''),
|
||||
'#description' => t('URL address of your LinkedIn account.')
|
||||
);
|
||||
$form['site_contact'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Web contact URL'),
|
||||
'#default_value' => variable_get('site_contact', ''),
|
||||
'#description' => t('URL address of your contact page.')
|
||||
);
|
||||
$form['site_rss'] = array(
|
||||
$form['social_rss'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Feed URL'),
|
||||
'#default_value' => variable_get('site_rss', ''),
|
||||
'#default_value' => variable_get('social_rss', ''),
|
||||
'#description' => t('Source feed of your main website.')
|
||||
);
|
||||
$form['social_twitter'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Twitter URL'),
|
||||
'#default_value' => variable_get('social_twitter', ''),
|
||||
'#description' => t('URL address of your Twitter account.')
|
||||
);
|
||||
$form['social_facebook'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Facebook URL'),
|
||||
'#default_value' => variable_get('social_facebook', ''),
|
||||
'#description' => t('URL address of your Facebook page.')
|
||||
);
|
||||
$form['social_linkedin'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('LinkedIn URL'),
|
||||
'#default_value' => variable_get('social_linkedin', ''),
|
||||
'#description' => t('URL address of your LinkedIn account.')
|
||||
);
|
||||
$form['social_contact'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Web contact URL'),
|
||||
'#default_value' => variable_get('social_contact', ''),
|
||||
'#description' => t('URL address of your contact page.')
|
||||
);
|
||||
|
||||
$form['site_footer'] = array(
|
||||
'#type' => 'textarea',
|
||||
'#title' => t('Footer message'),
|
||||
|
@ -1245,11 +1253,11 @@ function system_site_information_settings_validate($form, &$form_state) {
|
|||
}
|
||||
// Validate social links.
|
||||
unset($_SESSION['socialmenu']);
|
||||
_system_site_information_validate_url($form_state, 'site_twitter');
|
||||
_system_site_information_validate_url($form_state, 'site_facebook');
|
||||
_system_site_information_validate_url($form_state, 'site_linkedin');
|
||||
_system_site_information_validate_url($form_state, 'site_contact');
|
||||
_system_site_information_validate_url($form_state, 'site_rss');
|
||||
_system_site_information_validate_url($form_state, 'social_twitter');
|
||||
_system_site_information_validate_url($form_state, 'social_facebook');
|
||||
_system_site_information_validate_url($form_state, 'social_linkedin');
|
||||
_system_site_information_validate_url($form_state, 'social_contact');
|
||||
_system_site_information_validate_url($form_state, 'social_rss');
|
||||
// Validate front page path.
|
||||
$item = array('link_path' => $form_state['values']['site_frontpage']);
|
||||
$normal_path = drupal_get_normal_path($item['link_path']);
|
||||
|
|
Reference in a new issue