Skip to content

Instantly share code, notes, and snippets.

@barryhughes
Created August 8, 2018 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barryhughes/96c4b2fc78055a8d031ecf1a3736e689 to your computer and use it in GitHub Desktop.
Save barryhughes/96c4b2fc78055a8d031ecf1a3736e689 to your computer and use it in GitHub Desktop.
Sample of overriding the min/max map view coords (ECP 4.4.30)
<?php
# Prohibit caching of geoloc center point/bounds
add_filter( 'pre_transient_geoloc_center_point_estimation', '__return_null' );
# Override the min/max coords
add_filter( 'tribe_geoloc_pre_get_min_max_coords', function() {
return [
'min_lat' => 30,
'max_lat' => 40,
'min_lng' => 20,
'max_lng' => 30,
];
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment