Changeset 7319 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/redirects.php
- Timestamp:
- 06/19/2018 09:44:33 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/redirects.php
r4709 r7319 31 31 /** 32 32 * Redirects a search query with only one result directly to that result. 33 * 34 * @globals \WP_Query $wp_query Global WP_Query instance. 33 35 */ 34 36 public static function redirect_single_search_match() { 35 if ( is_search() && ! get_query_var( 'is_handbook' ) && 1 == $GLOBALS['wp_query']->found_posts ) { 37 global $wp_query; 38 39 if ( is_search() && ! $wp_query->is_handbook && 1 == $wp_query->found_posts ) { 36 40 wp_redirect( get_permalink( get_post() ) ); 37 41 exit();
Note: See TracChangeset
for help on using the changeset viewer.