API page: http://api.drupal.org/api/drupal/core%21includes%21form.inc/function/the...

theme_checkbox() contains the following line:

  $t = get_t();

The function doesn't use $t.

The same issue is also present in Drupal 7. In Drupal 6, get_t() is never called.

CommentFileSizeAuthor
#4 fix-variable-1886796-4.patch427 bytesapaderno
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

apaderno’s picture

Version: 8.x-dev » 7.x-dev

Drupal 8 doesn't define anymore theme_checkbox(). (It's Drupal API that is not updated.)

This is still true for Drupal 7, where theme_checkbox() uses the following code.

  $element = $variables['element'];
  $t = get_t();
  $element['#attributes']['type'] = 'checkbox';
  element_set_attributes($element, array('id', 'name', '#return_value' => 'value'));

  // Unchecked checkbox has #value of integer 0.
  if (!empty($element['#checked'])) {
    $element['#attributes']['checked'] = 'checked';
  }
  _form_set_class($element, array('form-checkbox'));

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

apaderno’s picture

Component: documentation » forms system
apaderno’s picture

Status: Active » Needs review
FileSize
427 bytes
droplet’s picture

Status: Needs review » Reviewed & tested by the community
David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.