105 '<div class="' . $inner_class . '" data-term-id=' . $category->term_id . |
105 '<div class="' . $inner_class . '" data-term-id=' . $category->term_id . |
106 ' tabindex="0" role="checkbox" aria-checked="' . $aria_checked . '">' . |
106 ' tabindex="0" role="checkbox" aria-checked="' . $aria_checked . '">' . |
107 /** This filter is documented in wp-includes/category-template.php */ |
107 /** This filter is documented in wp-includes/category-template.php */ |
108 esc_html( apply_filters( 'the_category', $category->name, '', '' ) ) . '</div>'; |
108 esc_html( apply_filters( 'the_category', $category->name, '', '' ) ) . '</div>'; |
109 } else { |
109 } else { |
110 $is_selected = in_array( $category->term_id, $args['selected_cats'], true ); |
110 $is_selected = in_array( $category->term_id, $args['selected_cats'], true ); |
111 $is_disabled = ! empty( $args['disabled'] ); |
111 $is_disabled = ! empty( $args['disabled'] ); |
|
112 $li_element_id = wp_unique_prefixed_id( "in-{$taxonomy}-{$category->term_id}-" ); |
|
113 $checkbox_element_id = wp_unique_prefixed_id( "in-{$taxonomy}-{$category->term_id}-" ); |
112 |
114 |
113 $output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . |
115 $output .= "\n<li id='" . esc_attr( $li_element_id ) . "'$class>" . |
114 '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="' . $name . '[]" id="in-' . $taxonomy . '-' . $category->term_id . '"' . |
116 '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="' . $name . '[]" id="' . esc_attr( $checkbox_element_id ) . '"' . |
115 checked( $is_selected, true, false ) . |
117 checked( $is_selected, true, false ) . |
116 disabled( $is_disabled, true, false ) . ' /> ' . |
118 disabled( $is_disabled, true, false ) . ' /> ' . |
117 /** This filter is documented in wp-includes/category-template.php */ |
119 /** This filter is documented in wp-includes/category-template.php */ |
118 esc_html( apply_filters( 'the_category', $category->name, '', '' ) ) . '</label>'; |
120 esc_html( apply_filters( 'the_category', $category->name, '', '' ) ) . '</label>'; |
119 } |
121 } |