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

git-svn-id: http://svn.automattic.com/wordpress/trunk@13289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32
2010-02-22 08:36:32 +00:00
parent 511454bd14
commit 0ec732b34a
5 changed files with 7 additions and 5 deletions

View File

@@ -2185,7 +2185,7 @@ function wp_insert_post($postarr = array(), $wp_error = false) {
if ( !empty($tax_input) ) {
foreach ( $tax_input as $taxonomy => $tags ) {
$taxonomy_obj = get_taxonomy($taxonomy);
if ( current_user_can($taxonomy_obj->manage_cap) )
if ( current_user_can($taxonomy_obj->assign_cap) )
wp_set_post_terms( $post_ID, $tags, $taxonomy );
}
}