Forked from zackkatz/add-radius-options-to-search.php
Created
February 11, 2025 20:04
-
-
Save phillipwilhelm/0719a2341722f4c956b9410bde0059d0 to your computer and use it in GitHub Desktop.
GravityView Maps - Add more radius search options
This file contains hidden or 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