Created
June 16, 2024 22:46
-
-
Save zackkatz/8b37dc92c0f33f61469398e4d2b17c88 to your computer and use it in GitHub Desktop.
GravityView Maps - Add more radius search options
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add larger-radius options for geolocation radius search. | |
* | |
* @param array $options Nested array. `value` key maps to the size of the radius. | |
* | |
* @return array Modified array of options. | |
*/ | |
add_filter( 'gk/gravitymaps/geolocation_radius_options', function ( $options ) { | |
$additional_options = [ | |
[ 'value' => 200 ], | |
[ 'value' => 300 ], | |
[ 'value' => 400 ], | |
[ 'value' => 500 ], | |
[ 'value' => 750 ], | |
[ 'value' => 1000 ], | |
]; | |
return array_merge( $options, $additional_options ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment