Changeset 9000
- Timestamp:
- 06/28/2019 05:03:37 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/search.php
r7827 r9000 25 25 add_filter( 'posts_orderby', array( __CLASS__, 'search_posts_orderby' ), 10, 2 ); 26 26 add_filter( 'the_posts', array( __CLASS__, 'rerun_empty_search' ), 10, 2 ); 27 add_action( 'wp_head', array( __CLASS__, 'noindex_for_search' ) ); 28 } 29 30 /** 31 * Outputs `noindex,follow` robots tag for search results. 32 */ 33 public static function noindex_for_search() { 34 if ( is_search() ) { 35 wp_no_robots(); 36 } 27 37 } 28 38
Note: See TracChangeset
for help on using the changeset viewer.