Created
November 27, 2015 16:37
-
-
Save danfisher85/20e90552c2c92bf79161 to your computer and use it in GitHub Desktop.
Get Resume IDs for WP Resume Manager
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
| function get_the_resume_ids( $post = null ) { | |
| $post = get_post( $post ); | |
| if ( $post->post_type !== 'resume' ) | |
| return ''; | |
| if ( ! get_option( 'resume_manager_enable_categories' ) ) | |
| return ''; | |
| $categories = wp_get_object_terms( $post->ID, 'resume_category', array( 'fields' => 'ids' ) ); | |
| if ( is_wp_error( $categories ) ) { | |
| return ''; | |
| } | |
| return implode( ', ', $categories ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment