You are here

function _administration_language_negotiation_admin_get_language in Administration Language Negotiation 7

Custom callback to check if a path match a list of path.

Parameters

string $path_to_check: The path to check.

Return value

bool True if the path match, False otherwise.

1 call to _administration_language_negotiation_admin_get_language()
administration_language_negotiation_admin_language in ./administration_language_negotiation.module
Language negotiation custom callback.

File

./administration_language_negotiation.module, line 73
Main module page of administration language negotiation module.

Code

function _administration_language_negotiation_admin_get_language($path_to_check) {
  $admin_path = implode("\n", array_filter(variable_get('administration_language_negotiation_paths', array())));
  if (drupal_match_path($path_to_check, $admin_path)) {
    return TRUE;
  }
  return FALSE;
}