Changeset 3276 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/search.php
- Timestamp:
- 05/31/2016 07:30:22 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/search.php
r3241 r3276 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 ( ! $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
Note: See TracChangeset
for help on using the changeset viewer.