terms = get_terms( 'category' ); if ( ! isset( $this->terms ) || ! is_array( $this->terms ) || 0 >= count( $this->terms ) ) { return; } $category_ids = json_decode( $instance['category_ids'], true ); ?>

terms as $term ) { if ( 0 < $term->count ) { $value = ( ( isset( $category_ids ) && is_array( $category_ids ) && in_array( $term->term_id, $category_ids ) ) ? 'on' : '' ); $name = sprintf( '%1$s[%2$s]', $this->get_field_name( 'category_ids' ), intval( $term->term_id ) ); $id = sprintf( '%1$s_%2$s', $this->get_field_name( 'category_ids' ), intval( $term->term_id ) ); $checked = ( isset( $value ) ? checked( 'on', $value, false ) : '' ); $label = sprintf( esc_html__( '%1$s ( Link Number : %2$d )', Ace::TEXTDOMAIN ), $term->name, $term->count ); echo '

'; } } ?>