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

git-svn-id: http://svn.automattic.com/wordpress/trunk@9574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-11-08 23:10:31 +00:00
parent 4a22773ec4
commit bf433456ce
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');