Full ELMS Learning Network documentation
function theme_image_button
×
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/api.elmsln.org/includes/bootstrap.inc).cis7 form.inc | theme_image_button($variables) |
cle7 form.inc | theme_image_button($variables) |
elmsmedia7 form.inc | theme_image_button($variables) |
icor7 form.inc | theme_image_button($variables) |
meedjum_blog7 form.inc | theme_image_button($variables) |
mooc7 form.inc | theme_image_button($variables) |
Returns HTML for an image button form element.
Parameters
$variables: An associative array containing:
- element: An associative array containing the properties of the element. Properties used: #attributes, #button_type, #name, #value, #title, #src.
Related topics
12 string references to the theme hook from theme_image_button()
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.
- ajax_pre_render_element in includes/
ajax.inc - Adds Ajax information about an element to communicate with JavaScript.
- ctools_jump_menu in sites/
all/ modules/ ulmus/ ctools/ includes/ jump-menu.inc - Generate a jump menu form.
- drupal_common_theme in includes/
common.inc - Provides theme registration for themes across .inc files.
- ds_field_row_form_format_summary_construct in sites/
all/ modules/ ulmus/ ds/ includes/ ds.field_ui.inc - Helper function for formatter summary settings.
- feeds_ui_mapping_settings_form in sites/
all/ modules/ ulmus/ feeds/ feeds_ui/ feeds_ui.admin.inc - Per mapper configuration form that is a part of feeds_ui_mapping_form().
File
- includes/
form.inc, line 3816 - Functions for form and batch generation and processing.
Code
function theme_image_button($variables) {
$element = $variables['element'];
$element['#attributes']['type'] = 'image';
element_set_attributes($element, array('id', 'name', 'value'));
$element['#attributes']['src'] = file_create_url($element['#src']);
if (!empty($element['#title'])) {
$element['#attributes']['alt'] = $element['#title'];
$element['#attributes']['title'] = $element['#title'];
}
$element['#attributes']['class'][] = 'form-' . $element['#button_type'];
if (!empty($element['#attributes']['disabled'])) {
$element['#attributes']['class'][] = 'form-button-disabled';
}
return '<input' . drupal_attributes($element['#attributes']) . ' />';
}