Don't show category adder to users without manage_categories cap. fixes #8114

git-svn-id: https://develop.svn.wordpress.org/trunk@9574 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-11-08 23:10:31 +00:00
parent 1bcce31a47
commit de9c864970
1 changed files with 3 additions and 1 deletions

View File

@ -266,6 +266,7 @@ function post_categories_meta_box($post) {
</ul>
</div>
<?php if ( current_user_can('manage_categories') ) : ?>
<div id="category-adder" class="wp-hidden-children">
<h4><a id="category-add-toggle" href="#category-add" class="hide-if-no-js" tabindex="3"><?php _e( '+ Add New Category' ); ?></a></h4>
<p id="category-add" class="wp-hidden-child">
@ -276,8 +277,9 @@ function post_categories_meta_box($post) {
<span id="category-ajax-response"></span>
</p>
</div>
<?php
endif;
}
add_meta_box('categorydiv', __('Categories'), 'post_categories_meta_box', 'post', 'side', 'core');