Last active
August 29, 2015 14:14
-
-
Save bryceadams/880c1d6dc108b81e4bb4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
add_filter( 'submit_resume_form_save_resume_data', 'custom_submit_resume_form_save_resume_data', 10, 5 ); | |
function custom_submit_resume_form_save_resume_data( $data, $post_title, $post_content, $status, $values ) { | |
$term = get_term( $values['resume_fields']['resume_category'][0], 'resume_category' ); | |
$data['post_name'] = sanitize_title( $term->name ); | |
// This line appends the location of the user | |
$data['post_name'] .= '-' . sanitize_title( $values['resume_fields']['candidate_location'] ); | |
return $data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment