You are here

function xmlsitemap_get_status_options in XML sitemap 7.2

Same name and namespace in other branches
  1. 8 xmlsitemap.module \xmlsitemap_get_status_options()
  2. 6.2 xmlsitemap.admin.inc \xmlsitemap_get_status_options()
  3. 2.x xmlsitemap.module \xmlsitemap_get_status_options()

Get a list of priority options.

Parameters

string $default: Include a 'default' option.

Return value

array An array of options.

See also

_xmlsitemap_translation_strings()

3 calls to xmlsitemap_get_status_options()
xmlsitemap_add_form_entity_summary in ./xmlsitemap.admin.inc
Add a table summary for an entity and its bundles.
xmlsitemap_add_form_link_options in ./xmlsitemap.admin.inc
Add a link's XML sitemap options to the link's form.
xmlsitemap_add_link_bundle_settings in ./xmlsitemap.admin.inc
Add the link type XML sitemap options to the link type's form.

File

./xmlsitemap.admin.inc, line 908
Administrative page callbacks for the xmlsitemap module.

Code

function xmlsitemap_get_status_options($default = NULL) {
  $options = array();
  $statuses = array(
    1 => t('Included'),
    0 => t('Excluded'),
  );
  if (isset($default)) {
    $default = $default ? 1 : 0;
    $options['default'] = t('Default (@value)', array(
      '@value' => drupal_strtolower($statuses[$default]),
    ));
  }
  $options += $statuses;
  return $options;
}