Ticket #1517: 1517.2.patch
File 1517.2.patch, 1.4 KB (added by , 9 years ago) |
---|
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/searchform.php
51 51 'wp-parser-class' => __( 'Classes', 'wporg' ), 52 52 'wp-parser-method' => __( 'Methods', 'wporg' ), 53 53 ); 54 55 $qv_post_type = array_filter( (array) get_query_var( 'post_type' ) ); 56 57 if ( in_array( 'any', $qv_post_type ) ) { 58 // no filters used 59 $qv_post_type = array(); 60 } 61 54 62 foreach ( $search_post_types as $post_type => $label ) { 55 $ qv_post_type = (array) get_query_var( 'post_type');63 $checked = checked( in_array( $post_type, $qv_post_type ), true, false ); 56 64 ?> 57 <label><input type="checkbox" name="post_type[]" value="<?php echo esc_attr( $post_type ); ?>"58 <?php checked( ! is_search() || in_array( 'any', $qv_post_type ) || in_array( $post_type, $qv_post_type ) ); ?> /> <?php echo $label; ?></label>59 65 <label><input type="checkbox" name="post_type[]" value="<?php echo esc_attr( $post_type ); ?>" 66 <?php echo $checked; ?> /> <?php echo $label; ?></label> 67 <?php } ?> 60 68 </div> 61 69 </form> 62 70