You are here

function geoip_rules_condition_info in GeoIP API 7.2

Implements hook_rules_action_info().

Condition to compare if the detected country is contained in a list of selected countries.

File

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

Code

function geoip_rules_condition_info() {
  return array(
    'geoip_rules_condition_country_compare' => array(
      'label' => t('Check for user country detected by ip.'),
      'base' => 'geoip_rules_condition_country_compare',
      'parameter' => array(
        'Countries' => array(
          'label' => t('Country'),
          'type' => 'list<text>',
          'options list' => 'geoip_countries_list',
        ),
      ),
      'group' => t('GeoIp'),
    ),
    'geoip_rules_condition_continent_compare' => array(
      'label' => t('Check for user continent detected by ip.'),
      'base' => 'geoip_rules_condition_continent_compare',
      'parameter' => array(
        'Countries' => array(
          'label' => t('Continent'),
          'type' => 'list<text>',
          'options list' => 'geoip_continents_list',
        ),
      ),
      'group' => t('GeoIp'),
    ),
  );
}