Description

Retrieves all event locations data.

Usage

em_get_locations($args)

Parameters

  • $args | array (optional)
    An array of parameters of get_terms() function with predefined default ‘fields’ => ‘all’ that can be changed into:
    • all – returns an array of term objects and location metadata – Default
    • ids – returns an array of integers
    • names – returns an array of strings
    • count – returns the number of terms found
    • id => parent – returns an associative array where the key is the term id and the value is the parent term id if present or 0

Return

Array of term objects or FALSE if ‘event-location’ is disabled (not registered).

If ‘fields’ => ‘all’ is set function returns term objects with an additional ‘location_meta’ key, that contains addition location metadata: latitude, longitude, address, city, state, zip, country.