Skip to content

Commit

Permalink
Hardcode robots meta tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jeherve committed Feb 22, 2021
1 parent d4fef95 commit 024b5f5
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +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
// Remove wp_no_robots() when WordPress 5.7 is the minimum required version.
if ( function_exists( 'wp_robots' ) && function_exists( 'wp_robots_no_robots' ) && function_exists( 'add_filter' ) ) {
add_filter( 'wp_robots', 'wp_robots_no_robots' );
wp_robots();
if ( get_option( 'blog_public' ) ) {
echo "<meta name='robots' content='noindex,follow' />\n";
} else {
wp_no_robots();
echo "<meta name='robots' content='noindex,nofollow' />\n";
}
?>
<title><?php echo $title ?></title>
Expand Down

0 comments on commit 024b5f5

Please sign in to comment.