You are here

function geoip_rules_condition_continent_compare in GeoIP API 7.2

Checks if the detected continent matches to one in the list.

Parameters

array $continents: List of continents to check against.

Return value

bool TRUE if the continent code is in the list.

1 string reference to 'geoip_rules_condition_continent_compare'
geoip_rules_condition_info in ./geoip.rules.inc
Implements hook_rules_action_info().

File

./geoip.rules.inc, line 67
Rules integration of the geoip module

Code

function geoip_rules_condition_continent_compare($continents) {
  if (!is_array($continents)) {
    $continents = explode('\\n', strtoupper($continents));
  }
  return in_array(geoip_continent_code(), $continents);
}