Last active
November 27, 2019 21:54
-
-
Save tripflex/38a6e5a20ae3b7738a70d6cfa033920b to your computer and use it in GitHub Desktop.
Enable Featured Image (thumbnail) for WP Job Manager Resumes
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_filter( 'register_post_type_resume', 'register_post_type_resume_enable_featured_image' ); | |
// Unfortunately all reusme uploads must be attached (added to media library) to support featured image | |
add_filter( 'resume_manager_attach_uploaded_files', '__return_true' ); | |
function register_post_type_resume_enable_featured_image( $post_type ) { | |
if( ! in_array( 'thumbnail', $post_type['supports'] ) ){ | |
$post_type['supports'][] = 'thumbnail'; | |
} | |
return $post_type; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment