diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php index 9eff6ecbeb67a..575e8a91758f1 100644 --- a/src/wp-includes/default-filters.php +++ b/src/wp-includes/default-filters.php @@ -366,7 +366,13 @@ add_action( 'wp_enqueue_scripts', 'wp_enqueue_emoji_styles' ); add_action( 'wp_print_styles', 'print_emoji_styles' ); // Retained for backwards-compatibility. Unhooked by wp_enqueue_emoji_styles(). -if ( isset( $_GET['replytocom'] ) ) { +if ( + // Comment reply link. + isset( $_GET['replytocom'] ) + || + // Unapproved comment preview. + ( isset( $_GET['unapproved'] ) && isset( $_GET['moderation-hash'] ) ) +) { add_filter( 'wp_robots', 'wp_robots_no_robots' ); }