From cc208eac270389581776ec8d3e47b28a9d5cc240 Mon Sep 17 00:00:00 2001 From: dd32 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: http://svn.automattic.com/wordpress/trunk@12967 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 c090e8984..67dbdade9 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; ?>