10
10
require_once( dirname( __FILE__ ) . '/admin.php' );
13
wp_die( __( 'Invalid taxonomy' ) );
13
wp_die( __( 'Invalid taxonomy.' ) );
15
15
$tax = get_taxonomy( $taxnow );
18
wp_die( __( 'Invalid taxonomy' ) );
18
wp_die( __( 'Invalid taxonomy.' ) );
20
20
if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ) ) ) {
21
wp_die( __( 'You are not allowed to manage these items.' ) );
21
wp_die( __( 'Sorry, you are not allowed to manage these items.' ) );
24
24
if ( ! current_user_can( $tax->cap->manage_terms ) ) {
26
26
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
27
'<p>' . __( 'You are not allowed to manage these items.' ) . '</p>',
27
'<p>' . __( 'Sorry, you are not allowed to manage these items.' ) . '</p>',
71
71
if ( ! current_user_can( $tax->cap->edit_terms ) ) {
73
73
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
74
'<p>' . __( 'You are not allowed to add this item.' ) . '</p>',
74
'<p>' . __( 'Sorry, you are not allowed to add this item.' ) . '</p>',
111
111
if ( ! current_user_can( $tax->cap->delete_terms ) ) {
113
113
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
114
'<p>' . __( 'You are not allowed to delete this item.' ) . '</p>',
114
'<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
128
128
if ( ! current_user_can( $tax->cap->delete_terms ) ) {
130
130
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
131
'<p>' . __( 'You are not allowed to delete these items.' ) . '</p>',
131
'<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
171
171
if ( ! current_user_can( $tax->cap->edit_terms ) ) {
173
173
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
174
'<p>' . __( 'You are not allowed to edit this item.' ) . '</p>',
174
'<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
205
205
if ( ! empty( $_REQUEST['paged'] ) ) {
206
206
$location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location );
208
wp_redirect( $location );
210
* Filters the taxonomy redirect destination URL.
214
* @param string $location The destination URL.
215
* @param object $tax The taxonomy object.
217
wp_redirect( apply_filters( 'redirect_term_location', $location, $tax ) );
288
297
if ( ! current_user_can( $tax->cap->edit_terms ) ) {
290
299
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
291
'<p>' . __( 'You are not allowed to edit this item.' ) . '</p>',
300
'<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
322
331
<div id="ajax-response"></div>
324
<form class="search-form" method="get">
333
<form class="search-form wp-clearfix" method="get">
325
334
<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
326
335
<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
328
337
<?php $wp_list_table->search_box( $tax->labels->search_items, 'tag' ); ?>
333
<div id="col-container">
336
<div class="col-wrap">
337
<form id="posts-filter" method="post">
338
<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
339
<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
341
<?php $wp_list_table->display(); ?>
346
<?php if ( 'category' == $taxonomy ) : ?>
347
<div class="form-wrap">
350
echo '<strong>' . __( 'Note:' ) . '</strong><br />';
352
/* translators: %s: default category */
353
__( 'Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category %s.' ),
354
/** This filter is documented in wp-includes/category-template.php */
355
'<strong>' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category') ) ) . '</strong>'
359
<?php if ( current_user_can( 'import' ) ) : ?>
360
<p><?php printf( __( 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.' ), esc_url( $import_link ) ) ?></p>
363
<?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
364
<div class="form-wrap">
365
<p><?php printf( __( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ), esc_url( $import_link ) ) ;?></p>
370
* Fires after the taxonomy list table.
372
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
376
* @param string $taxonomy The taxonomy name.
378
do_action( "after-{$taxonomy}-table", $taxonomy );
382
</div><!-- /col-right -->
341
<div id="col-container" class="wp-clearfix">
384
343
<div id="col-left">
385
344
<div class="col-wrap">
389
if ( !is_null( $tax->labels->popular_items ) ) {
390
if ( current_user_can( $tax->cap->edit_terms ) )
391
$tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'post_type' => $post_type, 'echo' => false, 'link' => 'edit' ) );
393
$tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) );
397
<div class="tagcloud">
398
<h2><?php echo $tax->labels->popular_items; ?></h2>
399
<?php echo $tag_cloud; unset( $tag_cloud ); ?>
405
348
if ( current_user_can($tax->cap->edit_terms) ) {
406
349
if ( 'category' == $taxonomy ) {
597
540
do_action( "{$taxonomy}_add_form", $taxonomy );
545
if ( ! is_null( $tax->labels->popular_items ) ) {
546
if ( current_user_can( $tax->cap->edit_terms ) ) {
547
$tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'post_type' => $post_type, 'echo' => false, 'link' => 'edit' ) );
549
$tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) );
554
<div class="tagcloud">
555
<h2><?php echo $tax->labels->popular_items; ?></h2>
556
<?php echo $tag_cloud; unset( $tag_cloud ); ?>
603
565
</div><!-- /col-left -->
568
<div class="col-wrap">
569
<form id="posts-filter" method="post">
570
<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" />
571
<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>" />
573
<?php $wp_list_table->display(); ?>
577
<?php if ( 'category' == $taxonomy ) : ?>
578
<div class="form-wrap edit-term-notes">
581
echo '<strong>' . __( 'Note:' ) . '</strong><br />';
583
/* translators: %s: default category */
584
__( 'Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category %s.' ),
585
/** This filter is documented in wp-includes/category-template.php */
586
'<strong>' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category') ) ) . '</strong>'
590
<?php if ( current_user_can( 'import' ) ) : ?>
591
<p><?php printf( __( 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.' ), esc_url( $import_link ) ) ?></p>
594
<?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
595
<div class="form-wrap edit-term-notes">
596
<p><?php printf( __( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ), esc_url( $import_link ) ) ;?></p>
601
* Fires after the taxonomy list table.
603
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
607
* @param string $taxonomy The taxonomy name.
609
do_action( "after-{$taxonomy}-table", $taxonomy );
613
</div><!-- /col-right -->
605
615
</div><!-- /col-container -->
606
616
</div><!-- /wrap -->