function theme_swftools_accessible_controls in SWF Tools 6.3
Builds a list of accessible controls for the specified player.
SWF Tools accessibility scripts use classes of the form !player-accessible-!action-!id. See theme_swftools_wijering4_accessible() for an example of how to implement accessible controls.
Parameters
string $player: The player name to be made accessible (e.g. jwplayer4).
string $id: The id of the player these controls relate to.
array $actions: The list of actions as an associative array, where the key is the action name, and the value is the label. The calling function should translate the text first.
int $visible: Whether the controls should be visible. Options are one the following constants:
Return value
string HTML markup to generate a list.
Related topics
4 theme calls to theme_swftools_accessible_controls()
- theme_swftools_flowplayer3_accessible in flowplayer3/
swftools_flowplayer3.module - Returns markup to enable accessible controls for Flowplayer 3.
- theme_swftools_jw5_accessible in jw5/
swftools_jw5.module - Returns markup to enable accessible controls for the Wijering 4 player.
- theme_swftools_wijering4_accessible in wijering4/
swftools_wijering4.module - Returns markup to enable accessible controls for the Wijering 4 player.
- theme_swftools_wpaudio_accessible in wpaudio/
swftools_wpaudio.module - Returns markup to enable accessible controls for the WordPress audio player.
File
- ./
swftools.module, line 2272 - The primary component of SWF Tools that enables comprehensive media handling.
Code
function theme_swftools_accessible_controls($player, $id, $actions, $visible) {
foreach ($actions as $action => $label) {
$list[] = l($label, '', array(
'fragment' => ' ',
'external' => TRUE,
'attributes' => array(
'class' => t('!player-accessible-!action-!id', array(
'!player' => $player,
'!action' => $action,
'!id' => $id,
)),
),
));
}
return theme_item_list($list, '', 'ul', array(
'class' => $visible == SWFTOOLS_ACCESSIBLE_VISIBLE ? '' : 'swftools-accessible-hidden',
));
}