Created
December 13, 2017 17:57
-
-
Save tripflex/51ba2e65131c7246b1f486d258cd5d60 to your computer and use it in GitHub Desktop.
Customize phone field type to only show AU country
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 this code to your functions.php file (omit the <?php at the top), or use the Code Snippets plugin (include everything) | |
add_filter( 'job_manager_field_editor_phone_args', 'smyles_custom_phone_args_only_au' ); | |
function smyles_custom_phone_args_only_au( $args ){ | |
// Other available arguments, see GitHub for details | |
// https://github.com/jackocnr/intl-tel-input/tree/8a2364bc0459fce934d7cf04a82823db63e7944b | |
// | |
$args['nationalMode'] = 'false'; | |
$args['onlyCountries'] = array( 'au' ); | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment