Make WordPress Core

Changeset 15205


Ignore:
Timestamp:
06/11/2010 12:00:47 AM (15 years ago)
Author:
nacin
Message:

Check for the import cap before showing links to the tag/cat converter. props kpdesign, fixes #13834.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

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

    r15178 r15205  
    338338<div class="form-wrap">
    339339<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' ) ) : ?>
    340341<p><?php printf(__('Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.'), 'import.php') ?></p>
    341 </div>
    342 <?php elseif ( 'post_tag' == $taxonomy ) : ?>
     342<?php endif; ?>
     343</div>
     344<?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
    343345<div class="form-wrap">
    344346<p><?php printf(__('Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>'), 'import.php') ;?>.</p>
  • trunk/wp-admin/tools.php

    r15132 r15205  
    3939endif;
    4040
     41if ( current_user_can( 'import' ) ) :
    4142$cats = get_taxonomy('category');
    4243$tags = get_taxonomy('post_tag');
    43 
    4444if ( current_user_can($cats->cap->manage_terms) || current_user_can($tags->cap->manage_terms) ) : ?>
    4545<div class="tool-box">
     
    4848</div>
    4949<?php
     50endif;
    5051endif;
    5152
Note: See TracChangeset for help on using the changeset viewer.