Skip to content

Instantly share code, notes, and snippets.

@tripflex
Created December 13, 2017 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tripflex/51ba2e65131c7246b1f486d258cd5d60 to your computer and use it in GitHub Desktop.
Save tripflex/51ba2e65131c7246b1f486d258cd5d60 to your computer and use it in GitHub Desktop.
Customize phone field type to only show AU country
<?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