You are here

function media_wysiwyg_filter_info in D7 Media 7.4

Same name and namespace in other branches
  1. 7.2 modules/media_wysiwyg/media_wysiwyg.module \media_wysiwyg_filter_info()
  2. 7.3 modules/media_wysiwyg/media_wysiwyg.module \media_wysiwyg_filter_info()

Implements hook_filter_info().

File

modules/media_wysiwyg/media_wysiwyg.module, line 378
Primarily Drupal hooks.

Code

function media_wysiwyg_filter_info() {
  $filters['media_filter'] = array(
    'title' => t('Convert Media tags to markup'),
    'description' => t('This filter will convert [[{type:media... ]] tags into markup. This must be enabled for the Media WYSIWYG integration to work with this input format. It is recommended to run this before the "@convert_urls" filter.', array(
      '@convert_urls' => 'Convert URLs into links',
    )),
    'process callback' => 'media_wysiwyg_filter',
    'weight' => 2,
    // @TODO not implemented
    'tips callback' => 'media_filter_tips',
  );
  $filters['media_filter_paragraph_fix'] = array(
    'title' => t('Ensure that embedded Media tags are not contained in paragraphs'),
    'description' => t('This filter will fix any paragraph tags surrounding embedded Media tags. This helps to avoid the chopped up markup that can result from unexpectedly closed paragraph tags. This filter should be positioned above (before) the "Convert Media tags to markup" filter.'),
    'process callback' => 'media_wysiwyg_filter_paragraph_fix',
    'settings callback' => '_media_filter_paragraph_fix_settings',
    'default settings' => array(
      'replace' => 0,
    ),
    'weight' => 1,
  );
  return $filters;
}