You are here

function theme_swftools_html_alt in SWF Tools 6.3

Themes the alternate HTML markup for an SWF Tools element.

A theme is used here so that the site can over-ride and modify the html_alt output before it is placed on the page. This allows more complex output than the fixed HTML alternate that can be specified on the settings page.

The SWF Tools data array is passed to the theme so that the themer has access to all the data just prior to output. It can use this to modify its results accordingly.

Parameters

array $data: The SWF Tools data array.

Return value

string A string of markup.

Related topics

4 theme calls to theme_swftools_html_alt()
swf in ./swftools.module
Processes a file, or an array of files, and returns the relevant mark-up to render a Flash based player.
swftools_image_html_alt in ./swftools.module
Replaces the html_alt string with an image tag when rendering an image playlist.
theme_swftools_direct in includes/swftools.core.inc
Turns an SWF Tools data array in to markup for inclusion on the page, using W3C compliant HTML.
theme_swftools_swfobject2 in swfobject2/swftools_swfobject2.module
Turns an SWF Tools data array in to markup and JavaScript for inclusion on the page.

File

includes/swftools.core.inc, line 172
Implements SWF Tools core functions that are common to the main module and the API module.

Code

function theme_swftools_html_alt($data) {

  // If html_alt is empty then populate it with default text
  // TODO: What if the user wants an empty string?
  $data['othervars']['html_alt'] = $data['othervars']['html_alt'] ? $data['othervars']['html_alt'] : variable_get('swftools_html_alt', SWFTOOLS_DEFAULT_HTML_ALT);

  // Return resulting string after filtering it
  return check_markup($data['othervars']['html_alt'], variable_get('swftools_html_alt_format', FILTER_FORMAT_DEFAULT), FALSE);
}