From b48695661a4db84bbacf94d23e90193905f114c0 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Fri, 5 Feb 2010 14:33:29 +0000 Subject: [PATCH] Allow viewing of Attached hierarchical Terms when the user doesnt have Manage capability of the taxonomy, Only set terms if user has Management capability. See #12035 git-svn-id: https://develop.svn.wordpress.org/trunk@12967 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/meta-boxes.php | 6 ++---- wp-admin/includes/template.php | 13 +++++++++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index c090e8984e..67dbdade9d 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -239,7 +239,7 @@ if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 function post_tags_meta_box($post, $box) { $tax_name = esc_attr(substr($box['id'], 8)); $taxonomy = get_taxonomy($tax_name); - if ( !current_user_can($taxonomy->manage_cap) ) + if ( !current_user_can($taxonomy->manage_cap) ) // @todo: Display the terms, do not edit. return; $helps = isset($taxonomy->helps) ? esc_attr($taxonomy->helps) : __('Separate tags with commas.'); ?> @@ -279,8 +279,6 @@ function post_categories_meta_box( $post, $box ) { extract( wp_parse_args($args, $defaults), EXTR_SKIP ); $tax = get_taxonomy($taxonomy); - if ( !current_user_can($tax->manage_cap) ) - return; ?>