function theme_file


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($variables)
cle7 theme_file($variables)
elmsmedia7 theme_file($variables)
icor7 theme_file($variables)
meedjum_blog7 theme_file($variables)
mooc7 theme_file($variables)

Returns HTML for a file upload form element.

For assistance with handling the uploaded file correctly, see the API provided by


$variables: An associative array containing:

  • element: An associative array containing the properties of the element. Properties used: #title, #name, #size, #description, #required, #attributes.

Related topics

8 theme calls to theme_file()
filefield_paths_form_alter in sites/all/modules/ulmus/filefield_paths/filefield_paths.module
Implements hook_form_alter().
file_managed_file_process in modules/file/file.module
Process function to expand the managed_file element type.
theme_file_entity_download_link in sites/all/modules/ulmus/file_entity/
Copy of theme_file_file_link() for linking to the file download URL.
theme_file_entity_file_link in sites/all/modules/ulmus/file_entity/
Copy of theme_file_file_link() for linking to the view file page.
theme_file_formatter_table in modules/file/
Returns HTML for a file attachments table.

... See full list

656 string references to the theme hook from theme_file()

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.

accessibility_content_menu in sites/all/modules/ulmus/accessibility/modules/accessibility_content/accessibility_content.module
Implements hook_menu().
accessibility_features_api in sites/all/modules/ulmus/accessibility/accessibility.module
Implements hook_features_api().
accessibility_menu in sites/all/modules/ulmus/accessibility/accessibility.module
Implements hook_menu().
accessibility_testswarm_menu in sites/all/modules/ulmus/accessibility/modules/accessibility_testswarm/accessibility_testswarm.module
Implements hook_menu();
accessibility_tests_list_submit in sites/all/modules/ulmus/accessibility/
Form submit callback for importing tests.

... See full list


includes/, line 4005
Functions for form and batch generation and processing.


function theme_file($variables) {
  $element = $variables['element'];
  $element['#attributes']['type'] = 'file';
  element_set_attributes($element, array('id', 'name', 'size'));
  _form_set_class($element, array('form-file'));

  return '<input' . drupal_attributes($element['#attributes']) . ' />';