You are here

function social_profile_preprocess_input in Open Social 10.0.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_profile/social_profile.module \social_profile_preprocess_input()
  2. 8.3 modules/social_features/social_profile/social_profile.module \social_profile_preprocess_input()
  3. 8.4 modules/social_features/social_profile/social_profile.module \social_profile_preprocess_input()
  4. 8.5 modules/social_features/social_profile/social_profile.module \social_profile_preprocess_input()
  5. 8.6 modules/social_features/social_profile/social_profile.module \social_profile_preprocess_input()
  6. 8.7 modules/social_features/social_profile/social_profile.module \social_profile_preprocess_input()
  7. 8.8 modules/social_features/social_profile/social_profile.module \social_profile_preprocess_input()
  8. 10.3.x modules/social_features/social_profile/social_profile.module \social_profile_preprocess_input()
  9. 10.1.x modules/social_features/social_profile/social_profile.module \social_profile_preprocess_input()
  10. 10.2.x modules/social_features/social_profile/social_profile.module \social_profile_preprocess_input()

Implements hook_preprocess_input().

File

modules/social_features/social_profile/social_profile.module, line 285
The Social profile module.

Code

function social_profile_preprocess_input(&$variables) {

  // Edit the profile tag displays to show the hierarchy to users.
  // Only do this if it starts with a - to indicate it's a child.
  if (!empty($variables['element']['#parents']) && $variables['element']['#parents'][0] === 'profile_tag' && substr($variables['element']['#title'], 0, 1) === '-') {
    $variables['element']['#attributes']['class'][] = 'checkboxes--nested__child';
  }
}