You are here

function swftools_fix_old_player_names in SWF Tools 6.3

Changes old player names to the new ones so existing content doesn't break.

Parameters

string $name: The currently assigned player name.

Return value

string The corrected player name (which will be unchanged if it is already ok).

1 call to swftools_fix_old_player_names()
swf in ./swftools.module
Processes a file, or an array of files, and returns the relevant mark-up to render a Flash based player.

File

./swftools.module, line 2098
The primary component of SWF Tools that enables comprehensive media handling.

Code

function swftools_fix_old_player_names($name) {

  // This is the array to map old names to new names
  $map = array(
    'flowplayer_mediaplayer' => 'flowplayer',
    'flowplayer3_mediaplayer' => 'flowplayer3',
    'wijering_imagerotator' => 'imagerotator',
    'wijering4_mediaplayer' => 'jwplayer4',
  );

  // Attach the supplied action name as both key and value
  $map += array(
    $name => $name,
  );

  // Return the mapped result
  return $map[$name];
}