diff --git wp-admin/edit-form-advanced.php wp-admin/edit-form-advanced.php
index 017a163..5bdb4d2 100644
|
|
|
foreach ( get_object_taxonomies($post_type) as $tax_name ) { |
| 119 | 119 | |
| 120 | 120 | $label = $taxonomy->labels->name; |
| 121 | 121 | |
| 122 | | if ( !is_taxonomy_hierarchical($tax_name) ) |
| 123 | | add_meta_box('tagsdiv-' . $tax_name, $label, 'post_tags_meta_box', $post_type, 'side', 'core', array( 'taxonomy' => $tax_name )); |
| 124 | | else |
| 125 | | add_meta_box($tax_name . 'div', $label, 'post_categories_meta_box', $post_type, 'side', 'core', array( 'taxonomy' => $tax_name )); |
| | 122 | if ( !is_taxonomy_hierarchical($tax_name) ) { |
| | 123 | $tax_meta_box_id = "tagsdiv-{$tax_name}"; |
| | 124 | } |
| | 125 | else { |
| | 126 | $tax_meta_box_id = "{$tax_name}div"; |
| | 127 | } |
| | 128 | |
| | 129 | add_meta_box( $tax_meta_box_id, $label, $taxonomy->meta_box_callback, $post_type, 'side', 'core', array( 'taxonomy' => $tax_name ) ); |
| 126 | 130 | } |
| 127 | 131 | |
| 128 | 132 | if ( post_type_supports($post_type, 'page-attributes') ) |
diff --git wp-includes/taxonomy.php wp-includes/taxonomy.php
index 72d387a..3371fc8 100644
|
|
|
function register_taxonomy( $taxonomy, $object_type, $args = array() ) { |
| 356 | 356 | |
| 357 | 357 | $args['labels'] = get_taxonomy_labels( (object) $args ); |
| 358 | 358 | $args['label'] = $args['labels']->name; |
| | 359 | |
| | 360 | if ( empty( $args['meta_box_callback'] ) ) { |
| | 361 | if ( $args['hierarchical'] ) { |
| | 362 | $args['meta_box_callback'] = 'post_categories_meta_box'; |
| | 363 | } else { |
| | 364 | $args['meta_box_callback'] = 'post_tags_meta_box'; |
| | 365 | } |
| | 366 | } |
| 359 | 367 | |
| 360 | 368 | $wp_taxonomies[$taxonomy] = (object) $args; |
| 361 | 369 | |