Changeset 2939
- Timestamp:
- 04/12/2016 09:39:42 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/searchform.php
r2286 r2939 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 ( ! is_search() || 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>
Note: See TracChangeset
for help on using the changeset viewer.