Skip to content

Commit

Permalink
Protect: introduce new wp_robots_no_robots when available (#18897)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeherve authored Feb 23, 2021
1 parent a0ef920 commit 41e3bf9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,10 @@ function display_page( $title, $message, $back_button = false, $recovery_form =
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width">
<?php
if ( function_exists( 'wp_no_robots' ) ) {
wp_no_robots();
if ( get_option( 'blog_public' ) ) {
echo "<meta name='robots' content='noindex,follow' />\n";
} else {
echo "<meta name='robots' content='noindex,nofollow' />\n";
}
?>
<title><?php echo $title ?></title>
Expand Down

0 comments on commit 41e3bf9

Please sign in to comment.