function claro_preprocess_form_element__password
Same name in other branches
- 9 core/themes/claro/claro.theme \claro_preprocess_form_element__password()
- 10 core/themes/claro/claro.theme \claro_preprocess_form_element__password()
- 11.x core/themes/claro/claro.theme \claro_preprocess_form_element__password()
Implements hook_preprocess_HOOK() for form_element__password.
File
-
core/
themes/ claro/ claro.theme, line 869
Code
function claro_preprocess_form_element__password(&$variables) {
if (!empty($variables['element']['#array_parents']) && in_array('pass1', $variables['element']['#array_parents'])) {
// This is the main password form element.
$variables['attributes']['class'][] = 'password-confirm__password';
}
if (!empty($variables['element']['#array_parents']) && in_array('pass2', $variables['element']['#array_parents'])) {
// This is the password confirm form element.
$variables['attributes']['class'][] = 'password-confirm__confirm';
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.