You are here

function media_filter_info in D7 Media 7

Implements hook_filter_info().

For performance, the media filter is allowed to be cached by default. See media_filter_invalidate_caches() for details. Some sites may use advanced media styles with rendering implentations that differs per theme or based on other runtime information. For these sites, it may be necessary to implement a module with a hook_filter_info_alter() implementation that sets $info['media_filter']['cache'] to FALSE.

See also

media_filter_invalidate_caches()

File

./media.module, line 1046
Media API

Code

function media_filter_info() {
  $filters['media_filter'] = array(
    'title' => t('Convert Media tags to markup'),
    'description' => t('This filter will convert [[{type:media... ]] tags into markup.'),
    'process callback' => 'media_filter',
    'weight' => 2,
    'tips callback' => 'media_filter_tips',
  );

  // If the WYSIWYG module is enabled, add additional help.
  if (module_exists('wysiwyg')) {
    $filters['media_filter']['description'] .= ' ' . t('This must be enabled for the Media WYSIWYG integration to work with this input format.');
  }
  return $filters;
}