Last active
May 30, 2019 19:07
-
-
Save pbearne/f6ef65f254a4f21e4363d6b038af1f96 to your computer and use it in GitHub Desktop.
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
function matador_default_required_fields( $fields ) { | |
return array( | |
'first_and_last_name', | |
'email', | |
'phone', | |
); | |
} | |
add_filter( 'matador_default_required_fields', 'matador_default_required_fields' ); | |
// or | |
function matador_default_required_fields( $fields ) { | |
// add phone | |
$fields[] = 'phone'; | |
// find the key and then unset it | |
if (($key = array_search('resume', $fields)) !== false) { | |
unset($fields[$key]); | |
} | |
return $fields; | |
} | |
add_filter( 'matador_default_required_fields', 'matador_default_required_fields' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment