he_terms( get_the_ID(), $taxonomy ); if ( ! empty( $tags ) ) { $query_vars['tax_query'][] = array( 'taxonomy' => $taxonomy, 'field' => 'term_id', 'terms' => wp_list_pluck( $tags, 'term_id' ), ); } } if ( count( $query_vars['tax_query'] ) > 1 ) { $query_vars['tax_query']['relation'] = 'OR'; } } $attributes['query_vars'] = $query_vars; /** * Filters the Related Posts carousel attributes. * * @param array $attributes The Related Posts carousel attributes. * @param string $post_type Current post type. */ $attributes = apply_filters( 'tripp_related_posts_attributes', $attributes, $post_type ); $block = array( 'blockName' => 'flextension/post-carousel', 'attrs' => $attributes, ); echo render_block( $block ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } } if ( ! function_exists( 'tripp_related_posts' ) ) { /** * Displays the related posts section. */ function tripp_related_posts() { if ( get_theme_mod( 'blog_single_post_related', false ) || is_customize_preview() ) { get_template_part( 'template-parts/single/related' ); } } } if ( ! function_exists( 'tripp_posts_not_found' ) ) { /** * Prints out the message when there are no posts to show. */ function tripp_posts_not_found() { if ( 'following' === get_query_var( 'filter' ) && ! tripp_user_has_following() ) { echo '