mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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:
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user