function theme_file_entity_file_audio


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 theme_file_entity_file_audio($variables)
cle7 theme_file_entity_file_audio($variables)
elmsmedia7 theme_file_entity_file_audio($variables)
icor7 theme_file_entity_file_audio($variables)
meedjum_blog7 theme_file_entity_file_audio($variables)
mooc7 theme_file_entity_file_audio($variables)

Returns HTML for displaying an HTML5 <audio> tag.


array $variables: An associative array containing:

  • file: Associative array of file data, which must include "uri".
  • controls: Boolean indicating whether or not controls should be displayed.
  • autoplay: Boolean indicating whether or not the audio should start playing automatically.
  • loop: Boolean indicating whether or not the audio should loop.

Related topics

2 string references to the theme hook from theme_file_entity_file_audio()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

file_entity_field_formatter_view in sites/all/modules/ulmus/file_entity/
Implements hook_field_formatter_view().
file_entity_theme in sites/all/modules/ulmus/file_entity/file_entity.module
Implements hook_theme().


sites/all/modules/ulmus/file_entity/, line 85
Theme callbacks for the file entity module.


function theme_file_entity_file_audio($variables) {
  $files = $variables['files'];
  $output = '';

  $audio_attributes = array();
  if ($variables['controls']) {
    $audio_attributes['controls'] = 'controls';
  if ($variables['autoplay']) {
    $audio_attributes['autoplay'] = 'autoplay';
  if ($variables['loop']) {
    $audio_attributes['loop'] = 'loop';

  $output .= '<audio' . drupal_attributes($audio_attributes) . '>';
  foreach ($files as $delta => $file) {
    $source_attributes = array(
      'src' => file_create_url($file['uri']),
      'type' => $file['filemime'],
    $output .= '<source' . drupal_attributes($source_attributes) . ' />';
  $output .= '</audio>';
  return $output;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.