Commit b2c89320 authored by Dave Reid's avatar Dave Reid

by Dave Reid: Updated for latest XML sitemap context code.

parent c59f5b6d
......@@ -36,15 +36,16 @@ function xmlsitemap_i18n_xmlsitemap_context_info() {
return $context;
}
function xmlsitemap_i18n_xmlsitemap_language_context_settings(stdClass $sitemap) {
$form['language'] = array(
/**
* Implements hook_form_FORM_ID_alter().
*/
function xmlsitemap_i18n_form_xmlsitemap_sitemap_edit_form_alter(&$form, $form_state) {
$form['context']['language'] = array(
'#type' => 'select',
'#title' => t('Language'),
'#options' => locale_language_list(),
'#default_value' => issset($sitemap->context['language']) ? $sitemap->context['language'] : '',
'#description' => t("Each language's sitemap will respect the <a href=\"@i18n-settings\">multilingual content selection mode</a>.", array('@i18n-settings' => url('admin/settings/language/i18n'))),
'#options' => array(LANGUAGE_NONE => t('Language neutral')) + locale_language_list(),
'#default_value' => isset($form['#sitemap']['context']['language']) ? $form['#sitemap']['context']['language'] : LANGUAGE_NONE,
);
return $form;
}
/**
......@@ -56,16 +57,6 @@ function xmlsitemap_i18n_form_i18n_admin_settings_alter(&$form, $form_state) {
array_unshift($form['#submit'], 'xmlsitemap_form_submit_flag_regenerate');
}
/**
* Implements hook_form_FORM_ID_alter().
*
* Allow the user to have multilingual sitemaps.
*/
function xmlsitemap_i18n_form_xmlsitemap_settings_form_alter(&$form, $form_state) {
$form['xmlsitemap']['xmlsitemap_languages']['#options'] = locale_language_list();
$form['xmlsitemap']['xmlsitemap_languages']['#description'] = t("Each language's sitemap will respect the <a href=\"@i18n-settings\">multilingual content selection mode</a>.", array('@i18n-settings' => url('admin/settings/language/i18n')));
}
/**
* Implements hook_query_TAG_alter().
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment