Changes in trunk/wp-admin/edit-tags.php [14989:15220]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-tags.php
r14989 r15220 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 … … 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 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" >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>';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>'; 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'); ?>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> … … 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> … … 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 </div> 343 <?php elseif ( 'post_tag' == $taxonomy ) : ?> 342 <?php endif; ?> 343 </div> 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> … … 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> … … 369 372 <?php 370 373 endif; 374 } 371 375 372 376 if ( current_user_can($tax->cap->edit_terms) ) { … … 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'); ?>
Note: See TracChangeset
for help on using the changeset viewer.