Skip to content

Commit

Permalink
Merge branch 'feature/taxonomies' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb531 committed May 26, 2015
2 parents a1d372e + 9358f6e commit 7ac976b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion classes/class-awesome-post-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ public function __construct( $params ) {
// Otherwise, generate messages
add_filter( 'post_updated_messages', array( $this, 'post_updated_messages' ), 10 );
}
// Ensures that built-in taxonomies are registered for post type
if ( ! empty( $this->args['taxonomies'] ) ) {
foreach ( $this->args['taxonomies'] as $taxonomy_id ) {
register_taxonomy_for_object_type( $taxonomy_id, $this->id )
}
}
}

// Initialize CPT
public function init() {
register_post_type( $this->id, $this->args );
Expand Down

0 comments on commit 7ac976b

Please sign in to comment.