/** * create meta-tag robots */ function thematic_create_robots() { global $paged; if (thematic_seo()) { $content = "<!-- meta robots -->\n"; if (is_home() && $paged < 2 || is_front_page() || is_single() || is_page() || is_attachment()) { $content .= "<meta name=\"robots\" content=\"index,follow\">"; } elseif (is_search()) { $content .= "<meta name=\"robots\" content=\"noindex,nofollow\">"; } else { $content .= "<meta name=\"robots\" content=\"noindex,follow\">"; } $content .= "\n"; if (get_option('blog_public')) { echo apply_filters('thematic_create_robots', $content); } } }
/** * Create the robots meta-tag * * This can be switched off by filtering either thematic_seo or thematic_show_robots and returning FALSE * * Filter: thematic_show_robots * Filter: thematic_create_robots */ function thematic_meta_robots() { global $paged; if (thematic_seo() && get_option('blog_public')) { $display = apply_filters('thematic_show_robots', $display = TRUE); if ($display) { if (is_home() && $paged < 2 || is_front_page() || is_single() || is_page() || is_attachment()) { $content = ''; } elseif (is_search()) { $content = '<meta name="robots" content="noindex,nofollow" />'; } else { $content = '<meta name="robots" content="noindex,follow" />'; } $content .= "\n"; echo apply_filters('thematic_create_robots', $content); } } }