function filter_filter_info in Drupal 7
Implements hook_filter_info().
Related topics
1 call to filter_filter_info()
- FilterSettingsTestCase::testFilterDefaults in modules/
filter/ filter.test - Tests explicit and implicit default settings for filters.
File
- modules/
filter/ filter.module, line 1229 - Framework for handling the filtering of content.
Code
function filter_filter_info() {
$filters['filter_html'] = array(
'title' => t('Limit allowed HTML tags'),
'process callback' => '_filter_html',
'settings callback' => '_filter_html_settings',
'default settings' => array(
'allowed_html' => '<a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>',
'filter_html_help' => 1,
'filter_html_nofollow' => 0,
),
'tips callback' => '_filter_html_tips',
'weight' => -10,
);
$filters['filter_autop'] = array(
'title' => t('Convert line breaks into HTML (i.e. <code><br></code> and <code><p></code>)'),
'process callback' => '_filter_autop',
'tips callback' => '_filter_autop_tips',
);
$filters['filter_url'] = array(
'title' => t('Convert URLs into links'),
'process callback' => '_filter_url',
'settings callback' => '_filter_url_settings',
'default settings' => array(
'filter_url_length' => 72,
),
'tips callback' => '_filter_url_tips',
);
$filters['filter_htmlcorrector'] = array(
'title' => t('Correct faulty and chopped off HTML'),
'process callback' => '_filter_htmlcorrector',
'weight' => 10,
);
$filters['filter_html_escape'] = array(
'title' => t('Display any HTML as plain text'),
'process callback' => '_filter_html_escape',
'tips callback' => '_filter_html_escape_tips',
'weight' => -10,
);
return $filters;
}