- Timestamp:
- 04/09/2020 03:41:04 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-walker-category-checklist.php
r47550 r47557 84 84 $args['popular_cats'] = empty( $args['popular_cats'] ) ? array() : $args['popular_cats']; 85 85 86 $class = in_array( $category->term_id, $args['popular_cats'] ) ? ' class="popular-category"' : '';86 $class = in_array( $category->term_id, $args['popular_cats'], true ) ? ' class="popular-category"' : ''; 87 87 88 88 $args['selected_cats'] = empty( $args['selected_cats'] ) ? array() : $args['selected_cats']; … … 92 92 $inner_class = 'category'; 93 93 94 if ( in_array( $category->term_id, $args['selected_cats'] ) ) {94 if ( in_array( $category->term_id, $args['selected_cats'], true ) ) { 95 95 $inner_class .= ' selected'; 96 96 $aria_checked = 'true'; … … 103 103 esc_html( apply_filters( 'the_category', $category->name, '', '' ) ) . '</div>'; 104 104 } else { 105 $is_selected = in_array( $category->term_id, $args['selected_cats'], true ); 106 $is_disabled = ! empty( $args['disabled'] ); 107 105 108 $output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . 106 109 '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="' . $name . '[]" id="in-' . $taxonomy . '-' . $category->term_id . '"' . 107 checked( in_array( $category->term_id, $args['selected_cats'] ), true, false ) .108 disabled( empty( $args['disabled'] ), false, false ) . ' /> ' .110 checked( $is_selected, true, false ) . 111 disabled( $is_disabled, true, false ) . ' /> ' . 109 112 /** This filter is documented in wp-includes/category-template.php */ 110 113 esc_html( apply_filters( 'the_category', $category->name, '', '' ) ) . '</label>';
Note: See TracChangeset
for help on using the changeset viewer.