function hook_media_token_to_markup_alter

cis7 media.api.php hook_media_token_to_markup_alter(&$element, $tag_info, $settings)
cle7 media.api.php hook_media_token_to_markup_alter(&$element, $tag_info, $settings)
elmsmedia7 media.api.php hook_media_token_to_markup_alter(&$element, $tag_info, $settings)
icor7 media.api.php hook_media_token_to_markup_alter(&$element, $tag_info, $settings)
meedjum_blog7 media.api.php hook_media_token_to_markup_alter(&$element, $tag_info, $settings)
mooc7 media.api.php hook_media_token_to_markup_alter(&$element, $tag_info, $settings)

Alter the output generated by Media filter tags.


array $element: The renderable array of output generated for the filter tag.

array $tag_info: The filter tag converted into an associative array by media_token_to_markup() with the following elements:

  • 'fid': The ID of the media file being rendered.
  • 'file': The object from file_load() of the media file being rendered.
  • 'view_mode': The view mode being used to render the file.
  • 'attributes': An additional array of attributes that could be output with media_get_file_without_label().

array $settings: An additional array of settings.

  • 'wysiwyg': A boolean if the output is for the WYSIWYG preview or FALSE if for normal rendering.

See also


1 function implements hook_media_token_to_markup_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

media_wysiwyg_view_mode_media_token_to_markup_alter in sites/all/modules/ulmus/media/modules/media_wysiwyg_view_mode/media_wysiwyg_view_mode.module
Implements hook_media_token_to_markup_alter().
1 invocation of hook_media_token_to_markup_alter()
media_token_to_markup in sites/all/modules/ulmus/media/includes/
Replace callback to convert a media file tag into HTML markup.


sites/all/modules/ulmus/media/media.api.php, line 165
Hooks provided by the Media module.


function hook_media_token_to_markup_alter(&$element, $tag_info, $settings) {
  if (empty($settings['wysiwyg'])) {
    $element['#attributes']['alt'] = t('This media has been output using the @mode view mode.', array('@mode' => $tag_info['view_mode']));



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.