function theme_url

Returns HTML for a URL form element.

Parameters

$variables: An associative array containing:

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

Related topics

1 theme call to theme_url()
system_element_info in drupal/core/modules/system/system.module
Implements hook_element_info().

File

drupal/core/includes/form.inc, line 4230
Functions for form and batch generation and processing.

Code

function theme_url($variables) {
  $element = $variables['element'];
  $element['#attributes']['type'] = 'url';
  element_set_attributes($element, array(
    'id',
    'name',
    'value',
    'size',
    'maxlength',
    'placeholder',
  ));
  _form_set_attributes($element, array(
    'form-url',
  ));
  return '<input' . new Attribute($element['#attributes']) . ' />' . drupal_render_children($element);
}