+<?php
+
+if ( !is_taxonomy_hierarchical($taxonomy) ) {
+ if ( current_user_can( $tax->cap->edit_terms ) )
+ $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false, 'link' => 'edit' ) );
+ else
+ $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) );
+
+ if ( $tag_cloud ) :
+ ?>
+<div class="tagcloud">
+<h3><?php echo $tax->labels->popular_items; ?></h3>
+<?php echo $tag_cloud; unset( $tag_cloud ); ?>
+</div>
+<?php
+endif;
+}
+
+if ( current_user_can($tax->cap->edit_terms) ) {
+ if ( 'category' == $taxonomy )
+ do_action('add_category_form_pre', (object)array('parent' => 0) ); // Back compat hook. Deprecated in preference to $taxonomy_pre_add_form
+ else
+ do_action('add_tag_form_pre', $taxonomy); // Back compat hook. Applies to all Taxonomies -not- categories
+ do_action($taxonomy . '_pre_add_form', $taxonomy);
+?>
+
+<div class="form-wrap">
+<h3><?php echo $tax->labels->add_new_item; ?></h3>
+<form id="addtag" method="post" action="edit-tags.php" class="validate">
+<input type="hidden" name="action" value="add-tag" />
+<input type="hidden" name="screen" value="<?php echo esc_attr($current_screen->id); ?>" />
+<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
+<?php wp_nonce_field('add-tag'); ?>
+
+<div class="form-field form-required">
+ <label for="tag-name"><?php _ex('Name', 'Taxonomy Name'); ?></label>
+ <input name="tag-name" id="tag-name" type="text" value="" size="40" aria-required="true" />
+ <p><?php _e('The name is how it appears on your site.'); ?></p>
+</div>
+<?php if ( ! global_terms_enabled() ) : ?>
+<div class="form-field">
+ <label for="tag-slug"><?php _ex('Slug', 'Taxonomy Slug'); ?></label>
+ <input name="slug" id="tag-slug" type="text" value="" size="40" />
+ <p><?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p>
+</div>
+<?php endif; // is_multisite() ?>
+<?php if ( is_taxonomy_hierarchical($taxonomy) ) : ?>
+<div class="form-field">
+ <label for="parent"><?php _ex('Parent', 'Taxonomy Parent'); ?></label>
+ <?php wp_dropdown_categories(array('hide_empty' => 0, 'hide_if_empty' => false, 'taxonomy' => $taxonomy, 'name' => 'parent', 'orderby' => 'name', 'hierarchical' => true, 'show_option_none' => __('None'))); ?>
+ <?php if ( 'category' == $taxonomy ) : // @todo: Generic text for hierarchical taxonomies ?>
+ <p><?php _e('Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.'); ?></p>
+ <?php endif; ?>
+</div>
+<?php endif; // is_taxonomy_hierarchical() ?>
+<div class="form-field">
+ <label for="tag-description"><?php _ex('Description', 'Taxonomy Description'); ?></label>
+ <textarea name="description" id="tag-description" rows="5" cols="40"></textarea>
+ <p><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p>
+</div>
+
+<?php
+if ( ! is_taxonomy_hierarchical($taxonomy) )
+ do_action('add_tag_form_fields', $taxonomy);
+do_action($taxonomy . '_add_form_fields', $taxonomy);
+?>
+<p class="submit"><input type="submit" class="button" name="submit" id="submit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" /></p>
+<?php
+if ( 'category' == $taxonomy )
+ do_action('edit_category_form', (object)array('parent' => 0) ); // Back compat hook. Deprecated in preference to $taxonomy_add_form
+else
+ do_action('add_tag_form', $taxonomy); // Back compat hook. Applies to all Taxonomies -not- categories
+do_action($taxonomy . '_add_form', $taxonomy);
+?>
+</form></div>
+<?php } ?>
+
+</div>
+</div><!-- /col-left -->
+
+</div><!-- /col-container -->
+</div><!-- /wrap -->
+
+<?php inline_edit_term_row('edit-tags', $taxonomy); ?>