Ticket #20037: patch.patch
File patch.patch, 1.8 KB (added by , 13 years ago) |
---|
-
wp-includes/default-filters.php
204 204 add_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 ); 205 205 add_action( 'wp_head', 'locale_stylesheet' ); 206 206 add_action( 'publish_future_post', 'check_and_publish_future_post', 10, 1 ); 207 add_action( 'wp_head', ' noindex',1 );207 add_action( 'wp_head', 'wp_no_robots', 1 ); 208 208 add_action( 'wp_head', 'wp_print_styles', 8 ); 209 209 add_action( 'wp_head', 'wp_print_head_scripts', 9 ); 210 210 add_action( 'wp_head', 'wp_generator' ); -
wp-includes/general-template.php
1715 1715 * 1716 1716 * @since 3.3.0 1717 1717 */ 1718 function wp_no_robots() { 1719 echo "<meta name='robots' content='noindex,nofollow' />\n"; 1718 function wp_no_robots() { 1719 1720 global $wp_query; 1721 $post = $wp_query->get_queried_object(); 1722 1723 if ( !$post || '0' == get_option('blog_public') ) 1724 $robots_meta = 'noindex,nofollow'; 1725 elseif ( is_single() || is_page() || is_home() ) 1726 $robots_meta = "all,noodp,noydir"; 1727 elseif ( is_archive() || is_search() || is_404() ) 1728 $robots_meta = "follow,noindex"; 1729 else 1730 $robots_meta = ''; 1731 1732 $robots_meta = apply_filters( 'wp_no_robots' , $robots_meta , $post ); 1733 1734 if ( $robots_meta != '' ) 1735 echo "<meta name='robots' content='".$robots_meta."' />\n"; 1720 1736 } 1721 1737 1722 1738 /**