Skip to content

Commit

Permalink
register post type *after* setting hierarchical for the post type
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkingorg committed Feb 28, 2013
1 parent b522ec8 commit c5359e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cf-tax-post-binding.php
Expand Up @@ -215,7 +215,6 @@ public static function on_wp_loaded() {
if (empty($post_type) && is_array($config['post_type'])) {
global $CFTPB_ENABLED_POST_TYPES;
$CFTPB_ENABLED_POST_TYPES[] = $config['post_type'][0];
register_post_type($config['post_type'][0], $config['post_type'][1]);
if (!empty($tax_name)) {
if (!isset($config['post_type'][1]['hierarchical'])) {
$config['post_type'][1]['hierarchical'] = is_taxonomy_hierarchical($tax_name);
Expand All @@ -233,6 +232,7 @@ public static function on_wp_loaded() {
continue;
}
}
register_post_type($config['post_type'][0], $config['post_type'][1]);
do_action('cftpb_register_post_type', $config['post_type'][0], $config);
$post_type = $config['post_type'][0];
}
Expand Down

0 comments on commit c5359e4

Please sign in to comment.