Created
September 25, 2019 17:32
-
-
Save tripflex/cae0d218679a9f4f8dd128470d1ac893 to your computer and use it in GitHub Desktop.
Autocomplete only suggest regions types (locality, country, etc) when using WP Job Manager Field Editor
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_filter( 'job_manager_field_editor_autocomplete_field_options', 'smyles_custom_autocomplete_options', 10, 4 ); | |
function smyles_custom_autocomplete_options( $options, $key, $args, $field ){ | |
// @see https://developers.google.com/places/supported_types | |
$options['types'] = array( '(regions)' ); | |
return $options; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment