Last active
August 29, 2015 14:18
-
-
Save tripflex/14005f5ff70edfd68a38 to your computer and use it in GitHub Desktop.
Auto set phone field type flag by visitors IP, and set country(s) at top of list
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_phone_args', 'my_custom_phone_args' ); | |
function my_custom_phone_args( $args ){ | |
// Other available arguments, see GitHub for details | |
// https://github.com/Bluefieldscom/intl-tel-input#options | |
// | |
// $args['allowExtensions'] = 'false'; | |
// $args['autoFormat'] = 'true'; | |
// $args['autoHideDialCode'] = 'false'; | |
// $args['autoPlaceholder'] = 'true'; | |
// $args['ipinfoToken'] = ''; | |
// $args['nationalMode'] = 'true'; | |
$args['preferredCountries'] = array( 'iq' ); | |
$args['defaultCountry'] = 'auto'; | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment