$tax_name =
esc_attr( $parsed_args['taxonomy'
] );
$taxonomy =
get_taxonomy( $parsed_args['taxonomy'
] );
?>
<div id="taxonomy-<?php
echo $tax_name; ?>" class="categorydiv">
<ul id="<?php
echo $tax_name; ?>-tabs" class="category-tabs">
<li class="tabs"><a href="#<?php
echo $tax_name; ?>-all"><?php
echo $taxonomy->labels->all_items; ?></a></li>
<li class="hide-if-no-js"><a href="#<?php
echo $tax_name; ?>-pop"><?php
echo esc_html( $taxonomy->labels->most_used
); ?></a></li>
</ul>
<div id="<?php
echo $tax_name; ?>-pop" class="tabs-panel" style="display: none;">
<ul id="<?php
echo $tax_name; ?>checklist-pop" class="categorychecklist form-no-clear" >
<?php
$popular_ids =
wp_popular_terms_checklist( $tax_name ); ?>
</ul>
</div>
<div id="<?php
echo $tax_name; ?>-all" class="tabs-panel">
<?php
$name =
( 'category' ===
$tax_name ) ? 'post_category' : 'tax_input[' .
$tax_name . ']';
// Allows for an empty term set to be sent. 0 is an invalid term ID and will be ignored by empty() checks.
echo "<input type='hidden' name='{
$name}[]' value='0' />";
?>
<ul id="<?php
echo $tax_name; ?>checklist" data-wp-lists="list:<?php
echo $tax_name; ?>" class="categorychecklist form-no-clear">
<?php