You are here

function theme_filefield_sources_list in FileField Sources 7

Same name and namespace in other branches
  1. 6 filefield_sources.module \theme_filefield_sources_list()

Theme the display of the sources list.

1 theme call to theme_filefield_sources_list()
filefield_sources_field_process in ./filefield_sources.module
A #process callback to extend the filefield_widget element type.

File

./filefield_sources.module, line 648
Extend FileField to allow files from multiple sources.

Code

function theme_filefield_sources_list($variables) {
  $element = $variables['element'];
  $sources = $variables['sources'];
  $links = array();
  foreach ($sources as $name => $source) {
    $links[] = '<a href="#" onclick="return false;" title="' . $source['description'] . '" id="' . $element['#id'] . '-' . $name . '-source" class="filefield-source filefield-source-' . $name . '">' . $source['label'] . '</a>';
  }
  return '<div class="filefield-sources-list">' . implode(' | ', $links) . '</div>';
}