You are here

function language_hierarchy_is_language_selector in Language Hierarchy 7

Check if given form element is used to chose language.

Parameters

$element: Form API element array.

Return value

bool TRUE if element is used to select language, FALSE otherwise.

1 call to language_hierarchy_is_language_selector()
language_hierarchy_preprocess_select in ./language_hierarchy.module
Preprocess select to add in aria attributes.

File

./language_hierarchy.module, line 579

Code

function language_hierarchy_is_language_selector($element) {
  $language_list = language_list();
  $common = array_intersect(array_keys($language_list), array_keys($element['#options']));
  return count($common) > 0;
}