Index: wp-includes/category-template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/category-template.php	(revision f3b7842281ac973a00e4d4d4bc6f749c43e3412f)
+++ wp-includes/category-template.php	(revision )
@@ -1338,3 +1338,18 @@
 
 	return $r;
 }
+
+/**
+ * Check if the current post has any of given terms of taxonomy.
+ *
+ * @since 4.6.0
+ *
+ * @param string $taxonomy Taxonomy name.
+ * @param int|object $post_id Optional. Post to check instead of the current post.
+ * @return bool True if the current post has any of the given terms of taxonomy.
+ */
+function has_terms($taxonomy, $post_id = null){
+	$terms = get_the_terms( $post_id, $taxonomy );
+
+	return ! ( is_wp_error( $terms ) || empty( $terms ) );
+}
