~robotparade/wordpress/stable

« back to all changes in this revision

Viewing changes to wp-admin/edit-tags.php

  • Committer: Jeff Waugh
  • Date: 2010-06-11 21:00:40 UTC
  • Revision ID: jdub@bethesignal.org-20100611210040-9narx3kdlayc8x39
WordPress 3.0 RC3

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
if ( empty($taxonomy) )
15
15
        $taxonomy = 'post_tag';
16
16
 
17
 
if ( !is_taxonomy($taxonomy) )
 
17
if ( !taxonomy_exists($taxonomy) )
18
18
        wp_die(__('Invalid taxonomy'));
19
19
 
20
20
$tax = get_taxonomy($taxonomy);
296
296
</div>
297
297
 
298
298
<div class="clear"></div>
299
 
<?php $table_type = ('category' == $taxonomy ? 'categories' : 'edit-tags'); ?>
300
299
<table class="widefat tag fixed" cellspacing="0">
301
300
        <thead>
302
301
        <tr>
303
 
<?php print_column_headers($table_type); ?>
 
302
<?php print_column_headers($current_screen); ?>
304
303
        </tr>
305
304
        </thead>
306
305
 
307
306
        <tfoot>
308
307
        <tr>
309
 
<?php print_column_headers($table_type, false); ?>
 
308
<?php print_column_headers($current_screen, false); ?>
310
309
        </tr>
311
310
        </tfoot>
312
311
 
338
337
<?php if ( 'category' == $taxonomy ) : ?>
339
338
<div class="form-wrap">
340
339
<p><?php printf(__('<strong>Note:</strong><br />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 <strong>%s</strong>.'), apply_filters('the_category', get_cat_name(get_option('default_category')))) ?></p>
 
340
<?php if ( current_user_can( 'import' ) ) : ?>
341
341
<p><?php printf(__('Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.'), 'import.php') ?></p>
 
342
<?php endif; ?>
342
343
</div>
343
 
<?php elseif ( 'post_tag' == $taxonomy ) : ?>
 
344
<?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
344
345
<div class="form-wrap">
345
346
<p><?php printf(__('Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>'), 'import.php') ;?>.</p>
346
347
</div>
355
356
<div class="col-wrap">
356
357
 
357
358
<?php
358
 
if ( current_user_can( $tax->cap->edit_terms ) )
359
 
        $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false, 'link' => 'edit' ) );
360
 
else
361
 
        $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) );
362
 
 
363
 
if ( $tag_cloud ) :
364
 
?>
 
359
 
 
360
if ( !is_taxonomy_hierarchical($taxonomy) ) {
 
361
        if ( current_user_can( $tax->cap->edit_terms ) )
 
362
                $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false, 'link' => 'edit' ) );
 
363
        else
 
364
                $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) );
 
365
 
 
366
        if ( $tag_cloud ) :
 
367
        ?>
365
368
<div class="tagcloud">
366
369
<h3><?php echo $tax->labels->popular_items; ?></h3>
367
370
<?php echo $tag_cloud; unset( $tag_cloud ); ?>
368
371
</div>
369
372
<?php
370
373
endif;
 
374
}
371
375
 
372
376
if ( current_user_can($tax->cap->edit_terms) ) {
373
377
        if ( 'category' == $taxonomy )
381
385
<h3><?php echo $tax->labels->add_new_item; ?></h3>
382
386
<form id="addtag" method="post" action="edit-tags.php" class="validate">
383
387
<input type="hidden" name="action" value="add-tag" />
 
388
<input type="hidden" name="screen" value="<?php echo esc_attr($current_screen->id); ?>" />
384
389
<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
385
390
<?php wp_nonce_field('add-tag'); ?>
386
391