Ticket #18465: noindex.patch
File noindex.patch, 1.6 KB (added by , 13 years ago) |
---|
-
wp-includes/functions.php
1134 1134 } else { 1135 1135 $site_url = parse_url( site_url() ); 1136 1136 $path = ( !empty( $site_url['path'] ) ) ? $site_url['path'] : ''; 1137 $output .= "Disallow: $path/wp-admin/\n";1138 1137 $output .= "Disallow: $path/wp-includes/\n"; 1139 1138 } 1140 1139 … … 3528 3527 } 3529 3528 3530 3529 /** 3530 * Send a HTTP header to prevent indexation of opened URL by search engines that support it. 3531 * 3532 * @link http://googleblog.blogspot.com/2007/07/robots-exclusion-protocol-now-with-even.html 3533 * 3534 * @since 3.3.0 3535 * @return none 3536 */ 3537 function send_noindex_header() { 3538 @header("X-Robots-Tag: noindex"); 3539 } 3540 3541 /** 3531 3542 * Returns a MySQL expression for selecting the week number based on the start_of_week option. 3532 3543 * 3533 3544 * @internal -
wp-admin/admin-ajax.php
14 14 define('DOING_AJAX', true); 15 15 define('WP_ADMIN', true); 16 16 17 send_noindex_header(); 18 17 19 if ( ! isset( $_REQUEST['action'] ) ) 18 20 die('-1'); 19 21 -
wp-admin/admin.php
66 66 auth_redirect(); 67 67 68 68 nocache_headers(); 69 send_noindex_header(); 69 70 70 71 // Schedule trash collection 71 72 if ( !wp_next_scheduled('wp_scheduled_delete') && !defined('WP_INSTALLING') )