You are here

function _pathologic_settings in Pathologic 7.2

Same name and namespace in other branches
  1. 7.3 pathologic.module \_pathologic_settings()
  2. 7 pathologic.module \_pathologic_settings()

Settings callback for Pathologic.

1 string reference to '_pathologic_settings'
pathologic_filter_info in ./pathologic.module
Implements hook_filter_info().

File

./pathologic.module, line 37
Pathologic text filter for Drupal.

Code

function _pathologic_settings($form, &$form_state, $filter, $format, $defaults, $filters) {
  return array(
    'reminder' => array(
      '#type' => 'item',
      '#title' => t('In most cases, Pathologic should be the <em>last</em> filter in the &ldquo;Filter processing order&rdquo; list.'),
      '#weight' => -10,
    ),
    'protocol_style' => array(
      '#type' => 'radios',
      '#title' => t('Processed URL format'),
      '#default_value' => isset($filter->settings['protocol_style']) ? $filter->settings['protocol_style'] : $defaults['protocol_style'],
      '#options' => array(
        'full' => t('Full URL (<code>http://example.com/foo/bar</code>)'),
        'proto-rel' => t('Protocol relative URL (<code>//example.com/foo/bar</code>)'),
        'path' => t('Path relative to server root (<code>/foo/bar</code>)'),
      ),
      '#description' => t('The <em>Full URL</em> option is best for stopping broken images and links in syndicated content (such as in RSS feeds), but will likely lead to problems if your site is accessible by both HTTP and HTTPS. Paths output with the <em>Protocol relative URL</em> option will avoid such problems, but feed readers and other software not using up-to-date standards may be confused by the paths. The <em>Path relative to server root</em> option will avoid problems with sites accessible by both HTTP and HTTPS with no compatibility concerns, but will absolutely not fix broken images and links in syndicated content.'),
      '#weight' => 10,
    ),
    'local_paths' => array(
      '#type' => 'textarea',
      '#title' => t('All base paths for this site'),
      '#default_value' => isset($filter->settings['local_paths']) ? $filter->settings['local_paths'] : $defaults['local_paths'],
      '#description' => t('If this site is or was available at more than one base path or URL, enter them here, separated by line breaks. For example, if this site is live at <code>http://example.com/</code> but has a staging version at <code>http://dev.example.org/staging/</code>, you would enter both those URLs here. If confused, please read <a href="!docs">Pathologic&rsquo;s documentation</a> for more information about this option and what it affects.', array(
        '!docs' => 'http://drupal.org/node/257026',
      )),
      '#weight' => 20,
    ),
  );
}