Skip to content

Instantly share code, notes, and snippets.

@mikejolley
Last active September 19, 2015 09:01
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 mikejolley/9984a9d22169db653dab to your computer and use it in GitHub Desktop.
Save mikejolley/9984a9d22169db653dab to your computer and use it in GitHub Desktop.
WP Job Manager Resumes - Enable comments on resumes
// Add comment support to the post type
add_filter( 'register_post_type_resume', 'register_post_type_resume_enable_comments' );
function register_post_type_resume_enable_comments( $post_type ) {
$post_type['supports'][] = 'comments';
return $post_type;
}
// Make comments open by default for new resumes
add_filter( 'submit_resume_form_save_resume_data', 'custom_submit_resume_form_save_resume_data' );
function custom_submit_resume_form_save_resume_data( $data ) {
$data['comment_status'] = 'open';
return $data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment