Introduce assign_cap for Taxonomies, Defaults to 'edit_posts'. Allows for Authors/Contributors to tag/categorise their posts. See #12035

git-svn-id: https://develop.svn.wordpress.org/trunk@13289 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2010-02-22 08:36:32 +00:00
parent a2c844a939
commit c7be408d4a
5 changed files with 7 additions and 5 deletions
+2 -2
View File
@@ -315,7 +315,7 @@ function wp_terms_checklist($post_id = 0, $args = array()) {
$args = array('taxonomy' => $taxonomy);
$tax = get_taxonomy($taxonomy);
$args['disabled'] = !current_user_can($tax->manage_cap);
$args['disabled'] = !current_user_can($tax->assign_cap);
if ( is_array( $selected_cats ) )
$args['selected_cats'] = $selected_cats;
@@ -378,7 +378,7 @@ function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $ech
$terms = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number, 'hierarchical' => false ) );
$tax = get_taxonomy($taxonomy);
if ( ! current_user_can($tax->manage_cap) )
if ( ! current_user_can($tax->assign_cap) )
$disabled = 'disabled="disabled"';
else
$disabled = '';