Changes in trunk/wp-admin/edit-tags.php [15220:14989]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-tags.php
r15220 r14989 15 15 $taxonomy = 'post_tag'; 16 16 17 if ( ! taxonomy_exists($taxonomy) )17 if ( !is_taxonomy($taxonomy) ) 18 18 wp_die(__('Invalid taxonomy')); 19 19 … … 181 181 '<li>' . __('<strong>Name</strong> - The name is how it appears on your site.') . '</li>'; 182 182 if ( ! global_terms_enabled() ) 183 $help .= '<li>' . __('<strong>Slug</strong> - The “slug” 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 “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.') . '</li>'; 184 184 185 185 if ( 'category' == $taxonomy ) … … 192 192 193 193 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>'; 199 199 200 200 add_contextual_help($current_screen, $help); … … 297 297 298 298 <div class="clear"></div> 299 <?php $table_type = ('category' == $taxonomy ? 'categories' : 'edit-tags'); ?> 299 300 <table class="widefat tag fixed" cellspacing="0"> 300 301 <thead> 301 302 <tr> 302 <?php print_column_headers($ current_screen); ?>303 <?php print_column_headers($table_type); ?> 303 304 </tr> 304 305 </thead> … … 306 307 <tfoot> 307 308 <tr> 308 <?php print_column_headers($ current_screen, false); ?>309 <?php print_column_headers($table_type, false); ?> 309 310 </tr> 310 311 </tfoot> … … 338 339 <div class="form-wrap"> 339 340 <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; ?> 343 </div> 344 <?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?> 342 </div> 343 <?php elseif ( 'post_tag' == $taxonomy ) : ?> 345 344 <div class="form-wrap"> 346 345 <p><?php printf(__('Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>'), 'import.php') ;?>.</p> … … 357 356 358 357 <?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 ?> 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 ?> 368 365 <div class="tagcloud"> 369 366 <h3><?php echo $tax->labels->popular_items; ?></h3> … … 372 369 <?php 373 370 endif; 374 }375 371 376 372 if ( current_user_can($tax->cap->edit_terms) ) { … … 386 382 <form id="addtag" method="post" action="edit-tags.php" class="validate"> 387 383 <input type="hidden" name="action" value="add-tag" /> 388 <input type="hidden" name="screen" value="<?php echo esc_attr($current_screen->id); ?>" />389 384 <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" /> 390 385 <?php wp_nonce_field('add-tag'); ?>
Note: See TracChangeset
for help on using the changeset viewer.