mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-29 15:44:27 +00:00
Move taxonomy object properties for capabilities into a cap object. Capabilities can be specified via ['capabilities'] (an array keyed by the generic cap name) for register_taxonomy. fixes #13358.
git-svn-id: https://develop.svn.wordpress.org/trunk@14593 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2329,7 +2329,7 @@ function wp_insert_post($postarr = array(), $wp_error = false) {
|
||||
$taxonomy_obj = get_taxonomy($taxonomy);
|
||||
if ( is_array($tags) ) // array = hierarchical, string = non-hierarchical.
|
||||
$tags = array_filter($tags);
|
||||
if ( current_user_can($taxonomy_obj->assign_cap) )
|
||||
if ( current_user_can($taxonomy_obj->cap->assign_terms) )
|
||||
wp_set_post_terms( $post_ID, $tags, $taxonomy );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user