mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-07 09:49:04 +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:
@@ -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 = '';
|
||||
|
||||
Reference in New Issue
Block a user