$defaults = array
( 'taxonomy' => 'post_tag'
);
if ( !
isset( $box['args'
] ) || !
is_array( $box['args'
] ) ) { $args = array
();
} else { $args =
$box['args'
];
} $parsed_args =
wp_parse_args( $args,
$defaults );
$tax_name =
esc_attr( $parsed_args['taxonomy'
] );
$taxonomy =
get_taxonomy( $parsed_args['taxonomy'
] );
$user_can_assign_terms =
current_user_can( $taxonomy->cap->assign_terms
);
$comma =
_x( ',', 'tag delimiter'
);
$terms_to_edit =
get_terms_to_edit( $post->ID,
$tax_name );
if ( !
is_string( $terms_to_edit ) ) { $terms_to_edit = '';
} ?>
<div class="tagsdiv" id="<?php
echo $tax_name; ?>">
<div class="jaxtag">
<div class="nojs-tags hide-if-js">
<label for="tax-input-<?php
echo $tax_name; ?>"><?php
echo $taxonomy->labels->add_or_remove_items; ?></label>
<p><textarea name="<?php
echo "tax_input[
$tax_name]"; ?>" rows="3" cols="20" class="the-tags" id="tax-input-<?php
echo $tax_name; ?>" <?php
disabled( !
$user_can_assign_terms ); ?> aria-describedby="new-tag-<?php
echo $tax_name; ?>-desc"><?php
echo str_replace( ',',
$comma . ' ',
$terms_to_edit ); // textarea_escaped by esc_attr() ?></textarea></p>
</div>
<?php
if ( $user_can_assign_terms ) : ?>