You are here

function hook_jw_player_plugin_info in JW Player 7

Same name and namespace in other branches
  1. 8 jw_player.api.php \hook_jw_player_plugin_info()
  2. 7.2 jw_player.api.php \hook_jw_player_plugin_info()

Implements hook_jw_player_plugin_info().

Return value

array Associative array of plugins keyed by actual plugin id

1 invocation of hook_jw_player_plugin_info()
jw_player_preset_plugins in ./jw_player.module
Retrieves all available preset plugins.

File

./jw_player.api.php, line 13
Hooks provided by JW Player.

Code

function hook_jw_player_plugin_info($preset) {

  // Create a plugin keyed by its actual plugin id.
  $plugins['foo'] = array(
    'name' => t('Foobar'),
    'description' => t('A plugin to do foobar'),
    // Note: Each option should be in a valid FAPI format, as it is directly
    // referenced in the preset settings form, except the '#title' may be
    // omitted for the name of the option to be taken as default.
    'config options' => array(
      'accountid' => array(
        '#type' => 'textfield',
        '#required' => TRUE,
        '#size' => 15,
        '#default_value' => 'bar',
      ),
      'param2' => array(
        '#type' => 'select',
        '#options' => array(
          'TRUE' => 'TRUE',
          'FALSE' => 'FALSE',
        ),
        '#default_value' => 'TRUE',
        '#description' => t('Enables the controls on an item when playing'),
      ),
    ),
  );
  return $plugins;
}