From 44c8e7aea83a05bbf3c4f62b44bb93a4b9fc9f62 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 28 Jan 2013 03:23:01 +0000 Subject: [PATCH] Consistently use a helper function instead of directly printing the disabled attribute. Remove an erroneous esc_attr() call. fixes #23194. git-svn-id: https://develop.svn.wordpress.org/trunk@23352 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/meta-boxes.php | 10 +++++----- wp-admin/includes/template.php | 6 +----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index 2b0b2864fc..18fc9eb23a 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -339,27 +339,27 @@ function post_tags_meta_box($post, $box) { extract( wp_parse_args($args, $defaults), EXTR_SKIP ); $tax_name = esc_attr($taxonomy); $taxonomy = get_taxonomy($taxonomy); - $disabled = !current_user_can($taxonomy->cap->assign_terms) ? 'disabled="disabled"' : ''; + $user_can_assign_terms = current_user_can( $taxonomy->cap->assign_terms ); $comma = _x( ',', 'tag delimiter' ); ?>

labels->add_or_remove_items; ?>

-
- cap->assign_terms) ) : ?> +
+
labels->add_new_item; ?>

-

labels->separate_items_with_commas ); ?>

+

labels->separate_items_with_commas; ?>

-cap->assign_terms) ) : ?> +

labels->choose_from_most_used; ?>

'count', 'order' => 'DESC', 'number' => $number, 'hierarchical' => false ) ); $tax = get_taxonomy($taxonomy); - if ( ! current_user_can($tax->cap->assign_terms) ) - $disabled = 'disabled="disabled"'; - else - $disabled = ''; $popular_ids = array(); foreach ( (array) $terms as $term ) { @@ -192,7 +188,7 @@ function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $ech