You are here

function swftools_initialise_options in SWF Tools 6.3

Initialise the SWF Tools options array with some standard elements.

To avoid NOTICE errors later we must make sure that some basic arrays are present.

Parameters

string $options: Options array to initialise.

Return value

nothing Manipulate the array by reference.

2 calls to swftools_initialise_options()
swf in ./swftools.module
Processes a file, or an array of files, and returns the relevant mark-up to render a Flash based player.
theme_swftools_api in api/swftools_api.module
Prepares the minimum definition to render Flash, and hands it to the selected embedding function.

File

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

Code

function swftools_initialise_options(&$options) {

  // Initialise any array elements that weren't passed by the caller
  $options += array(
    'params' => array(),
    'flashvars' => array(),
    'othervars' => array(),
    'methods' => array(),
  );

  // Initialise othervars with some defaults
  $options['othervars'] += array(
    'id' => '',
    'html_alt' => '',
  );
}