-
-
Notifications
You must be signed in to change notification settings - Fork 39
Record Properties
Additional to the Maxmind properties, this wordpress plugin adds some properties:
$record->isEmpty
(since 2.0.0) TRUE if the record does not contain any data. This can happen because not every IP has related information.
$record->extra->cached
(since 2.4.0) 0 if not cached. A unix timestamp if cached (contains the time when it was cached)
$record->extra->source
(since 2.4.0) Source that this record is coming from.
$record->extra->error
(since 2.4.0)
Error message of this lookup, if any. In error case $record->isEmpty is TRUE.
The record can be accessed in PHP, in the Wordpress shortcodes and in AJAX. The shortcode names have a slightly different format. This list is for the shortcodes and AJAX API.
Note: Not all properties might be filled (depending on the Maxmind source you use and the information available for the requested IP).
continent
continent.code
continent.name
continent.names.{lang, e.g. en}
continent.geoname_id
country
country.confidence
country.is_in_european_union
country.iso_code
country.name
country.names.{lang, e.g. en}
country.geoname_id
registered_country.geoname_id
registered_country.is_in_european_union
registered_country.iso_code
registered_country.name
registered_country.names.{lang, e.g. en}
represented_country.geoname_id
represented_country.is_in_european_union
represented_country.iso_code
represented_country.name
represented_country.names.{lang, e.g. en}
represented_country.type
subdivisions.0.confidence
subdivisions.0.geoname_id
subdivisions.0.iso_code
subdivisions.0.name
subdivisions.0.names.{lang, e.g. en}
subdivisions.1.confidence
subdivisions.1.geoname_id
subdivisions.1.iso_code
subdivisions.1.name
subdivisions.1.names.{lang, e.g. en}
most_specific_subdivision.confidence
most_specific_subdivision.geoname_id
most_specific_subdivision.iso_code
most_specific_subdivision.name
most_specific_subdivision.names.{lang, e.g. en}
city
city.name
city.names.{lang, e.g. en}
city.geoname_id
postal.code
postal.confidence
location.accuracy_radius
location.average_income
location.latitude
location.longitude
location.metro_code
location.population_density
location.time_zone
traits.autonomous_system_number
traits.autonomous_system_organization
traits.domain
traits.is_anonymous
traits.is_anonymous_proxy
traits.is_anonymous_vpn
traits.is_hosting_provider
traits.is_public_proxy
traits.is_satellite_provider
traits.is_tor_exit_node
traits.isp
traits.ip_address
traits.organization
traits.user_type
maxmind.queries_remaining
## The properties below are not from Maxmind, but from the plugin itself
is_empty
extra.cached
extra.source
extra.error
For PHP, camelCase these properties, i.e. country.iso_code
becomes $record->country->isoCode
.
See Maxmind properties to access the documentation what their values mean.
Iso country Codes are 2-letter ISO 3166-1 codes.
Content of this documentation is available under Creative Commons Attribution-Share Alike 3.0 Unported License. Feel free to improve it by logging in with a Github user and editing it.