mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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
This commit is contained in:
@@ -176,10 +176,6 @@ 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->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
|
||||
|
||||
<li id="<?php echo $id; ?>" class="popular-category">
|
||||
<label class="selectit">
|
||||
<input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $term->term_id; ?>" <?php echo $disabled ?>/>
|
||||
<input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $term->term_id; ?>" <?php disabled( ! current_user_can( $tax->cap->assign_terms ) ); ?> />
|
||||
<?php echo esc_html( apply_filters( 'the_category', $term->name ) ); ?>
|
||||
</label>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user