ID; $title = fictioneer_get_safe_title( $post_id, 'card-recommendation' ); $links = array_merge( fictioneer_url_list_to_array( get_post_meta( $post_id, 'fictioneer_recommendation_urls', true ) ), fictioneer_url_list_to_array( get_post_meta( $post_id, 'fictioneer_recommendation_support', true ) ) ); $excerpt = get_the_excerpt(); $one_sentence = get_post_meta( $post_id, 'fictioneer_recommendation_one_sentence', true ); $card_classes = []; // Taxonomies $tags = false; $fandoms = false; $characters = false; $genres = false; if ( get_option( 'fictioneer_show_tags_on_recommendation_cards' ) && ! get_option( 'fictioneer_hide_taxonomies_on_recommendation_cards' ) ) { $tags = get_the_tags(); } if ( ! get_option( 'fictioneer_hide_taxonomies_on_recommendation_cards' ) ) { $fandoms = get_the_terms( $post_id, 'fcn_fandom' ); $characters = get_the_terms( $post_id, 'fcn_character' ); $genres = get_the_terms( $post_id, 'fcn_genre' ); } // Flags $show_terms = ! get_option( 'fictioneer_hide_taxonomies_on_recommendation_cards' ) && ( $tags || $genres || $fandoms || $characters ); // Extra classes if ( get_theme_mod( 'card_style', 'default' ) !== 'default' ) { $card_classes[] = '_' . get_theme_mod( 'card_style' ); } if ( get_theme_mod( 'card_image_style', 'default' ) !== 'default' ) { $card_classes[] = '_' . get_theme_mod( 'card_image_style' ); } if ( ! $show_terms ) { $card_classes[] = '_no-tax'; } // Card attributes $attributes = apply_filters( 'fictioneer_filter_card_attributes', [], $post, 'card-recommendation' ); $card_attributes = ''; foreach ( $attributes as $key => $value ) { $card_attributes .= esc_attr( $key ) . '="' . esc_attr( $value ) . '" '; } // Thumbnail attributes $thumbnail_args = array( 'alt' => sprintf( __( '%s Thumbnail', 'fictioneer' ), $title ), 'class' => 'no-auto-lightbox' ); ?>