Digital Sovereignty for everyone

Hooks, filters and cron

Filters answered by other plugins

  • lh_addresses_site_can_read( false, $viewer_id, $user_id, $blog_id ): whether the viewer may read the addresses the user has given to that site. Answered by LH Membership.
  • lh_places_geocode( null, $fields ): returns array( 'lat', 'lng', 'accuracy' ) or null for a structured address. Answered by LH Places.

Configuration filters

  • lh_addresses_return_address_types (default residential, postal, delivery, billing, work)
  • lh_addresses_return_admin_capability (default install_plugins)
  • lh_addresses_return_default_country_code (default: the site locale’s region)
  • lh_addresses_geocode_batch_size (25), lh_addresses_geocode_max_attempts (5), lh_addresses_geocode_interval_microseconds (1,100,000), lh_addresses_geocode_time_budget (45 seconds)
  • lh_addresses_init_plugin, lh_addresses_return_plugin_debugging_status

Actions fired

  • lh_addresses_saved( $id, $user_id, $changed, $existing )
  • lh_addresses_use_added( $address_id, $user_id, $blog_id, $type ), lh_addresses_use_removed( $address_id, $blog_id, $type )
  • lh_addresses_site_uses_removed( $user_id, $blog_id, $removed )
  • lh_addresses_user_addresses_deleted( $user_id, $ids )
  • lh_addresses_geocoded( $id, $lat, $lng )

Core hooks used

remove_user_from_blog removes that site’s uses; wpmu_delete_user (or delete_user on single site) deletes all of the user’s addresses; wp_privacy_personal_data_exporters and wp_privacy_personal_data_erasers register the Addresses exporter and eraser (network-wide on the main site, site-scoped elsewhere).

Cron

lh_addresses_geocode_queue, every five minutes on the main site. Takes pending addresses, then failed ones whose backoff (2 to the power of attempts, in hours) has passed, and geocodes up to the batch size at no more than one request per second, under a two-minute network lock. After five failed attempts an address is marked skipped. Does nothing when no geocoder answers lh_places_geocode.

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.