1 system.admin.inc system_rss_feeds_settings()

Form builder; Configure how the site handles RSS feeds.

Related topics

File

core/modules/system/system.admin.inc, line 2015
Admin page callbacks for the System module.

Code

function system_rss_feeds_settings() {
  $rss_config = config('system.core');
  $form['#config'] = 'system.core';
  $form['rss_description'] = array(
    '#type' => 'textarea',
    '#title' => t('Feed description'),
    '#default_value' => $rss_config->get('rss_description'),
    '#description' => t('Description of your site, included in each feed.')
  );
  $form['rss_limit'] = array(
    '#type' => 'select',
    '#title' => t('Number of items in each feed'),
    '#default_value' => $rss_config->get('rss_limit'),
    '#options' => backdrop_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30)),
    '#description' => t('Default number of items to include in each feed.')
  );
  $form['rss_viewmode'] = array(
    '#type' => 'select',
    '#title' => t('Feed content'),
    '#default_value' => $rss_config->get('rss_viewmode'),
    '#options' => array(
      'title' => t('Titles only'),
      'teaser' => t('Titles plus teaser'),
      'fulltext' => t('Full text'),
    ),
    '#description' => t('Global setting for the default display of content items in each feed.')
  );

  return system_settings_form($form);
}