You are here

function customfilter_filter_info in Custom filter 7

Same name and namespace in other branches
  1. 7.2 customfilter.module \customfilter_filter_info()

Implements hook_filter_info().

Return a list of filter to use in admin/config/content/formats/add

File

./customfilter.module, line 24
Allows the users with the right permission to define custom filters.

Code

function customfilter_filter_info() {
  $filters = _customfilter_get_filters();
  $itens = array();
  foreach ($filters as $filter) {
    $itens[$filter['type']] = array(
      'title' => $filter['name'],
      'description' => $filter['description'],
      'process callback' => '_customfilter_filter_process',
      'default settings' => array(
        'allowed_html' => '',
        'filter_html_help' => 1,
        'filter_html_nofollow' => 0,
      ),
      'tips callback' => '_customfilter_filter_tips',
    );
  }
  return $itens;
}