Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-tags.php

    r15220 r14989  
    1515    $taxonomy = 'post_tag';
    1616
    17 if ( !taxonomy_exists($taxonomy) )
     17if ( !is_taxonomy($taxonomy) )
    1818    wp_die(__('Invalid taxonomy'));
    1919
     
    181181        '<li>' . __('<strong>Name</strong> - The name is how it appears on your site.') . '</li>';
    182182    if ( ! global_terms_enabled() )
    183         $help .= '<li>' . __('<strong>Slug</strong> - The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.') . '</li>';
     183        $help .= '<li>' . __('<strong>Slug</strong> - The  &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.') . '</li>';
    184184
    185185    if ( 'category' == $taxonomy )
     
    192192
    193193    if ( 'category' == $taxonomy )
    194         $help .= '<p>' . __('<a href="http://codex.wordpress.org/Manage_Categories_SubPanel" target="_blank">Categories Documentation</a>') . '</p>';
    195     else
    196         $help .= '<p>' . __('<a href="http://codex.wordpress.org/Post_Tags_SubPanel" target="_blank">Tags Documentation</a>') . '</p>';
    197 
    198     $help .= '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>';
     194        $help .= '<p>' . __('<a href="http://codex.wordpress.org/Manage_Categories_SubPanel">Categories Documentation</a>') . '</p>';
     195    else
     196        $help .= '<p>' . __('<a href="http://codex.wordpress.org/Post_Tags_SubPanel">Tags Documentation</a>') . '</p>';
     197
     198    $help .= '<p>' . __('<a href="http://wordpress.org/support/">Support Forums</a>') . '</p>';
    199199
    200200    add_contextual_help($current_screen, $help);
     
    297297
    298298<div class="clear"></div>
     299<?php $table_type = ('category' == $taxonomy ? 'categories' : 'edit-tags'); ?>
    299300<table class="widefat tag fixed" cellspacing="0">
    300301    <thead>
    301302    <tr>
    302 <?php print_column_headers($current_screen); ?>
     303<?php print_column_headers($table_type); ?>
    303304    </tr>
    304305    </thead>
     
    306307    <tfoot>
    307308    <tr>
    308 <?php print_column_headers($current_screen, false); ?>
     309<?php print_column_headers($table_type, false); ?>
    309310    </tr>
    310311    </tfoot>
     
    338339<div class="form-wrap">
    339340<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' ) ) : ?>
    341341<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; ?>
    343 </div>
    344 <?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
     342</div>
     343<?php elseif ( 'post_tag' == $taxonomy ) : ?>
    345344<div class="form-wrap">
    346345<p><?php printf(__('Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>'), 'import.php') ;?>.</p>
     
    357356
    358357<?php
    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     ?>
     358if ( current_user_can( $tax->cap->edit_terms ) )
     359    $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false, 'link' => 'edit' ) );
     360else
     361    $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) );
     362
     363if ( $tag_cloud ) :
     364?>
    368365<div class="tagcloud">
    369366<h3><?php echo $tax->labels->popular_items; ?></h3>
     
    372369<?php
    373370endif;
    374 }
    375371
    376372if ( current_user_can($tax->cap->edit_terms) ) {
     
    386382<form id="addtag" method="post" action="edit-tags.php" class="validate">
    387383<input type="hidden" name="action" value="add-tag" />
    388 <input type="hidden" name="screen" value="<?php echo esc_attr($current_screen->id); ?>" />
    389384<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
    390385<?php wp_nonce_field('add-tag'); ?>
Note: See TracChangeset for help on using the changeset viewer.