You are here

function _pathologic_settings in Pathologic 7

Same name and namespace in other branches
  1. 7.3 pathologic.module \_pathologic_settings()
  2. 7.2 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 33
Pathologic text filter for Drupal.

Code

function _pathologic_settings($form, &$form_state, $filter, $format, $defaults) {
  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,
    ),
    'local_paths' => array(
      '#type' => 'textarea',
      '#title' => t('Also considered local'),
      '#default_value' => isset($filter->settings['local_paths']) ? $filter->settings['local_paths'] : $defaults['local_paths'],
      '#description' => t('Enter the beginning of paths which should also be considered local for this server. Please read <a href="!docs">Pathologic&rsquo;s documentation</a> for more information about this feature. If the site is using a WYSIWYG content editor such as CKEditor or TinyMCE, you will probably need to enter a single slash (<code>/</code>) in this field.', array(
        '!docs' => 'http://drupal.org/node/257026',
      )),
      '#weight' => 10,
    ),
    'absolute' => array(
      '#type' => 'checkbox',
      '#title' => t('Output full absolute URLs'),
      '#default_value' => isset($filter->settings['absolute']) ? $filter->settings['absolute'] : $defaults['absolute'],
      '#description' => t('If checked, Pathologic will output full absolute URLs, with a protocol and server fragment (such as <code>http://example.com/foo/bar</code>); this is useful if you want images and links to not break for those reading the content in a feed reader or through some other form of aggregation. However, in cases where the site is being served via both HTTP and HTTPS, it may be necessary to uncheck this box so that protocol and server fragments are omitted in the paths Pathologic creates (such as <code>/foo/bar</code>) to avoid issues where the browser complains about pages containing both secure and insecure content.'),
      '#weight' => 20,
    ),
  );
}