function filter_get_filters

7.x filter.module filter_get_filters()

Returns a list of all filters provided by modules.

Return value

array An array of filter formats.

7 calls to filter_get_filters()
check_markup in drupal-7.x/modules/filter/filter.module
Runs all the enabled filters on a piece of text.
FilterCRUDTestCase::verifyTextFormat in drupal-7.x/modules/filter/filter.test
Verifies that a text format is properly stored.
filter_admin_format_form in drupal-7.x/modules/filter/filter.admin.inc
Form constructor for the text format add/edit form.
filter_format_save in drupal-7.x/modules/filter/filter.module
Saves a text format object to the database.
filter_list_format in drupal-7.x/modules/filter/filter.module
Retrieves a list of filters for a given text format.

... See full list

2 string references to 'filter_get_filters'
filter_modules_disabled in drupal-7.x/modules/filter/filter.module
Implements hook_modules_disabled().
filter_modules_enabled in drupal-7.x/modules/filter/filter.module
Implements hook_modules_enabled().

File

drupal-7.x/modules/filter/filter.module, line 592
Framework for handling the filtering of content.

Code

function filter_get_filters() {
  $filters = &drupal_static(__FUNCTION__, array());

  if (empty($filters)) {
    foreach (module_implements('filter_info') as $module) {
      $info = module_invoke($module, 'filter_info');
      if (isset($info) && is_array($info)) {
        // Assign the name of the module implementing the filters and ensure
        // default values.
        foreach (array_keys($info) as $name) {
          $info[$name]['module'] = $module;
          $info[$name] += array(
            'description' => '',
            'weight' => 0,
          );
        }
        $filters = array_merge($filters, $info);
      }
    }
    // Allow modules to alter filter definitions.
    drupal_alter('filter_info', $filters);

    uasort($filters, '_filter_list_cmp');
  }

  return $filters;
}