diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php
index e656dd5..cfc2698 100644
|
a
|
b
|
if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post_type, |
| 140 | 140 | |
| 141 | 141 | // all taxonomies |
| 142 | 142 | foreach ( get_object_taxonomies( $post ) as $tax_name ) { |
| 143 | | $taxonomy = get_taxonomy($tax_name); |
| | 143 | $taxonomy = get_taxonomy( $tax_name ); |
| 144 | 144 | if ( ! $taxonomy->show_ui ) |
| 145 | 145 | continue; |
| 146 | 146 | |
| 147 | 147 | $label = $taxonomy->labels->name; |
| 148 | 148 | |
| 149 | | if ( !is_taxonomy_hierarchical($tax_name) ) |
| 150 | | add_meta_box('tagsdiv-' . $tax_name, $label, 'post_tags_meta_box', null, 'side', 'core', array( 'taxonomy' => $tax_name )); |
| | 149 | if ( ! is_taxonomy_hierarchical( $tax_name ) ) |
| | 150 | $tax_meta_box_id = 'tagsdiv-' . $tax_name; |
| 151 | 151 | else |
| 152 | | add_meta_box($tax_name . 'div', $label, 'post_categories_meta_box', null, 'side', 'core', array( 'taxonomy' => $tax_name )); |
| | 152 | $tax_meta_box_id = $tax_name . 'div'; |
| | 153 | |
| | 154 | add_meta_box( $tax_meta_box_id, $label, $taxonomy->meta_box_callback, null, 'side', 'core', array( 'taxonomy' => $tax_name ) ); |
| 153 | 155 | } |
| 154 | 156 | |
| 155 | 157 | if ( post_type_supports($post_type, 'page-attributes') ) |
diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php
index 955369e..1a8ef4f 100644
|
a
|
b
|
function register_taxonomy( $taxonomy, $object_type, $args = array() ) { |
| 388 | 388 | $args['labels'] = get_taxonomy_labels( (object) $args ); |
| 389 | 389 | $args['label'] = $args['labels']->name; |
| 390 | 390 | |
| | 391 | if ( empty( $args['meta_box_callback'] ) ) { |
| | 392 | if ( $args['hierarchical'] ) { |
| | 393 | $args['meta_box_callback'] = 'post_categories_meta_box'; |
| | 394 | } else { |
| | 395 | $args['meta_box_callback'] = 'post_tags_meta_box'; |
| | 396 | } |
| | 397 | } |
| | 398 | |
| 391 | 399 | $wp_taxonomies[$taxonomy] = (object) $args; |
| 392 | 400 | |
| 393 | 401 | // register callback handling for metabox |