Adds the sitemap index to robots.txt.
Parameters
$output
stringrequired- robots.txt output.
$is_public
boolrequired- Whether the site is public.
Source
public function add_robots( $output, $is_public ) {
if ( $is_public ) {
$output .= "\nSitemap: " . esc_url( $this->index->get_index_url() ) . "\n";
}
return $output;
}
Changelog
Version | Description |
---|---|
5.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.