Ticket #1733: 1733.patch
File 1733.patch, 1.1 KB (added by , 8 years ago) |
---|
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/search.php
57 57 $query->set( 's', substr( $s, 0, -2 ) ); // remove '()' 58 58 // Restrict search to function-like content. 59 59 $query->set( 'post_type', array( 'wp-parser-function', 'wp-parser-method' ) ); 60 } else {61 // Search parsed post types instead of all post types.62 $query->set( 'post_type', DevHub\get_parsed_post_types() );63 60 } 64 61 } 62 63 // Get post types (if used, or set above) 64 $qv_post_types = array_filter( (array) $query->get( 'post_type' ) ); 65 $qv_post_types = array_map( 'sanitize_key', $qv_post_types ); 66 67 if ( empty( $qv_post_types ) ) { 68 // Not a handbook page, or exact search, or filters used. 69 // Fallback to parsed post types 70 $query->set( 'post_type', DevHub\get_parsed_post_types() ); 71 } 65 72 } 66 73 67 74 /**