function xmlsitemap_priority_options in XML sitemap 6
Same name and namespace in other branches
- 5.2 xmlsitemap/xmlsitemap.module \xmlsitemap_priority_options()
- 5 xmlsitemap.module \xmlsitemap_priority_options()
Return an array of sitemap priority options.
Parameters
$option: If not given, the array will include priority values from 0.0 to 1.0.
- exclude: Add option to exclude item from sitemap.
- default: Add option to use default priority. Only for cases where a default priority exists.
- both: Add both the default and exclude options.
Return value
An array of priority options.
9 calls to xmlsitemap_priority_options()
- xmlsitemap_node_form_alter in xmlsitemap_node/
xmlsitemap_node.module - Implementation of hook_form_alter().
- xmlsitemap_node_form_node_type_form_alter in xmlsitemap_node/
xmlsitemap_node.module - Implementation of hook_form_FORM_ID_alter().
- xmlsitemap_node_form_xmlsitemap_settings_alter in xmlsitemap_node/
xmlsitemap_node.module - Implementation of hook_form_FORM_ID_alter().
- xmlsitemap_settings in ./
xmlsitemap.admin.inc - Form builder; return the sitemap settings form.
- xmlsitemap_taxonomy_form_taxonomy_form_term_alter in xmlsitemap_taxonomy/
xmlsitemap_taxonomy.module - Implementation of hook_form_FORM_ID_alter().
File
- ./
xmlsitemap.module, line 315 - Creates a sitemap compatible with the sitemaps.org schema.
Code
function xmlsitemap_priority_options($option = '') {
$options = array(
'1' => t('1.0'),
'0.9' => t('0.9'),
'0.8' => t('0.8'),
'0.7' => t('0.7'),
'0.6' => t('0.6'),
'0.5' => t('0.5'),
'0.4' => t('0.4'),
'0.3' => t('0.3'),
'0.2' => t('0.2'),
'0.1' => t('0.1'),
'0' => t('0.0'),
);
if ($option == 'exclude' || $option == 'both') {
$options['-1'] = t('Not in sitemap');
}
if ($option == 'default' || $option == 'both') {
$options['-2'] = t('Default');
}
return $options;
}