Skip to content

Commit 920cac8

Browse files
authored
Adds HTML5 Support for meta tags
- Adds HTML5 support for robots meta if theme supports HTML5 meta Signed-off-by: Beda Schmid <beda@tukutoi.com>
1 parent 5e020f6 commit 920cac8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wp-includes/robots-template.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ function wp_robots() {
4545
if ( empty( $robots_strings ) ) {
4646
return;
4747
}
48-
49-
echo "<meta name='robots' content='" . esc_attr( implode( ', ', $robots_strings ) ) . "' />\n";
48+
$closure = current_theme_supports( 'html5', 'meta' ) ? '>' : ' />';
49+
echo "<meta name='robots' content='" . esc_attr( implode( ', ', $robots_strings ) ) . "'" . $closure . "\n";
5050
}
5151

5252
/**

0 commit comments

Comments
 (0)