Digital Sovereignty for everyone

Hooks, settings and integrations

Filters

  • lh_places_init_plugin: return false to stop the plugin registering any of its hooks on a site, without deactivating it.
  • lh_places_get_applicable_post_types: the candidate post types (public, excluding attachment). A type must also declare lh_places-geo_support.
  • lh_places_validate_options: filters the Google Maps API key option before it is saved.
  • lh_places_return_map_tile_sources: the hosts the map loads tile images from, as Content Security Policy sources (default https://*.tile.openstreetmap.org and https://server.arcgisonline.com). Add a host here if you change the map’s tile layers. Since 1.32.0.
  • wpgm_geoquery_srid and wpgm_known_capabilities: from wp-geometa-lib (see Spatial queries).

Cron

lh_places_initial_run is a one-off event scheduled on activation (on every site when network-activated). It flushes rewrite rules and installs the spatial tables. Deactivation clears it.

Settings

There is no settings page of its own. An optional Google Maps API key field is added to GatherPress’s general settings and stored in the google_maps_js_api_key option. If it is empty, a key saved by The Events Calendar is shown instead. The key is only used for one thing: when a singular post contains the map block and has coordinates, the LH OGP plugin uses a Google static map as the post’s sharing image.

Output

  • Feeds: RSS2 and RDF feeds declare the GeoRSS namespace and give each geo-tagged item a georss:point.
  • Page head: singular views of geo-tagged posts get ICBM and DC.title meta tags.

Integrations

  • GatherPress: gatherpress_venue gets geo support automatically, and the API key field lives on its settings page.
  • The Events Calendar: whenever a venue’s _VenueLat or _VenueLng is saved, it is copied to geo_latitude or geo_longitude.
  • LH OGP: through the lh_ogp_meta_tags_singular_og_images_filter filter, as described under Settings.
  • LH CSP Directives: the map’s tile hosts (OpenStreetMap for the Street layer, Esri World Imagery for the Satellite layer) are added to the network Content Security Policy through the lh_csp_directives_additional_sources filter, so map tiles are not reported as violations. Nothing happens when LH CSP Directives is not active.

If you like this plugin please consider making a donation to further development

Install LHero.org

lhero.org

Open it straight from your home screen, full screen and quicker to load.

  1. Tap the Share button . If you cannot see it, tap ••• first.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add.
  1. Tap the browser menu â‹®.
  2. Tap Install app or Add to Home screen.
  1. In the menu bar, choose File, then Add to Dock.

Use your browser's menu to install this site or add it to your home screen.