$post ) ); ?>
'; $html .= aiopod_get_svg( 'calendar' ); $html .= ''; $html .= ''; $meta[] = $html; } if ( ! empty( $attributes['show_categories'] ) ) { // Categories if ( $term_links = aiopod_get_term_links( $post->ID, 'aiopod_categories' ) ) { $html = '
'; $html .= aiopod_get_svg( 'folder' ); $html .= '' . implode( ' ', $term_links ) . ''; $html .= '
'; $meta[] = $html; } } if ( ! empty( $attributes['show_episodes_count'] ) ) { // Episodes count $episodes_count = aiopod_get_podcast_episodes_count( $post->ID ); $html = ''; $html .= aiopod_get_svg( 'episodes' ); $html .= sprintf( _n( '%s episode', '%s episodes', $episodes_count, 'aio-podcast-studio' ), number_format_i18n( $episodes_count ) ); $html .= ''; $meta[] = $html; } if ( ! empty( $attributes['show_downloads_count'] ) ) { // Downloads count $downloads_count = (int) get_post_meta( $post->ID, 'total_downloads', true ); $html = ''; $html .= aiopod_get_svg( 'download' ); $html .= sprintf( _n( '%s download', '%s downloads', $downloads_count, 'aio-podcast-studio' ), aiopod_format_number( $downloads_count ) ); $html .= ''; $meta[] = $html; } if ( ! empty( $attributes['show_plays_count'] ) ) { // Plays count $plays_count = (int) get_post_meta( $post->ID, 'total_plays', true ); $html = ''; $html .= aiopod_get_svg( 'speaker' ); $html .= sprintf( _n( '%s play', '%s plays', $plays_count, 'aio-podcast-studio' ), aiopod_format_number( $plays_count ) ); $html .= ''; $meta[] = $html; } if ( ! empty( $attributes['show_explicit_badge'] ) ) { // Explicit badge $is_explicit = get_post_meta( $post->ID, 'is_explicit', true ); if ( ! empty( $is_explicit ) ) { $meta[] = sprintf( '%s', esc_html__( 'Explicit', 'aio-podcast-studio' ) ); } } if ( ! empty( $meta ) ) { $podcast_content .= '
'; $podcast_content .= implode( '', $meta ); $podcast_content .= '
'; } // Description if ( ! empty( $content ) ) { $podcast_content .= '
'; $podcast_content .= $content; $podcast_content .= '
'; } // Actions: Subscribe, Follow, Share $subscribe_buttons = array(); if ( ! empty( $attributes['show_subscribe_buttons'] ) ) { $subscribe_buttons = aiopod_get_subscribe_buttons( $post->ID ); } $follow_buttons = array(); if ( ! empty( $attributes['show_follow_buttons'] ) ) { $follow_buttons = aiopod_get_follow_buttons( $post->ID ); } $share_buttons = array(); if ( ! empty( $attributes['show_share_buttons'] ) ) { $share_buttons = aiopod_get_share_buttons( $post->ID ); } if ( ! empty( $subscribe_buttons ) || ! empty( $follow_buttons ) || ! empty( $share_buttons ) ) { $html = '
'; // Button: Subscribe if ( ! empty( $subscribe_buttons ) ) { $html .= ''; $html .= ''; // Modal: Subscribe $html .= ''; $html .= ''; } // Button: Follow Us if ( ! empty( $follow_buttons ) ) { $html .= ''; $html .= ''; // Modal: Follow Us $html .= ''; $html .= '
'; $html .= '
' . esc_html__( 'Follow Us & Stay Updated', 'aio-podcast-studio' ) . '
'; $html .= ''; $html .= '
'; $html .= '
'; $html .= '
'; foreach ( $follow_buttons as $follow_button ) { $html .= sprintf( '', esc_url( $follow_button['url'] ), esc_attr( $follow_button['label'] ), esc_attr( $follow_button['icon'] ) ); } $html .= '
'; $html .= '
'; $html .= '
'; $html .= '
'; } // Button: Share Podcast if ( ! empty( $share_buttons ) ) { $html .= ''; $html .= ''; // Modal: Share $html .= ''; $html .= '
'; $html .= '
' . esc_html__( 'Share This Podcast', 'aio-podcast-studio' ) . '
'; $html .= ''; $html .= '
'; $html .= '
'; $html .= '
'; foreach ( $share_buttons as $share_button ) { $html .= sprintf( '', esc_url( $share_button['url'] ), esc_attr( $share_button['label'] ), esc_attr( $share_button['icon'] ) ); } $html .= '
'; $html .= '
'; $html .= '
'; $html .= '
'; } $html .= '
'; $podcast_content .= $html; } // Output the podcast content if ( ! empty( $image['src'] ) || ! empty( $podcast_content ) ) { echo '
'; echo '
'; if ( ! empty( $image['src'] ) ) { echo '
'; aiopod_the_image( $image ); echo '
'; } if ( ! empty( $podcast_content ) ) { echo '
'; echo $podcast_content; echo '
'; } echo '
'; echo '
'; } // Full Episodes if ( ! empty( $attributes['show_episodes'] ) ) { $episodes_args = array( 'podcast' => $post->ID, 'title' => $attributes['episodes_title'], 'hide_if_empty' => 0 ); if ( ! empty( $attributes['show_trailer_episodes'] ) || ! empty( $attributes['show_bonus_episodes'] ) ) { // Exclude episode types that are shown in separate sections $types = array( 'full' ); if ( empty( $attributes['show_trailer_episodes'] ) ) { $types[] = 'trailer'; } if ( empty( $attributes['show_bonus_episodes'] ) ) { $types[] = 'bonus'; } $episodes_args['type'] = $types; } $episodes_args = apply_filters( 'aiopod_single_podcast_episodes_args', $episodes_args ); aiopod_the_episodes( $episodes_args ); } // Trailers if ( ! empty( $attributes['show_trailer_episodes'] ) ) { $trailers_args = array( 'podcast' => $post->ID, 'title' => $attributes['trailer_episodes_title'], 'type' => 'trailer', 'show_count' => 0, 'layout' => 'slider', 'limit' => 0, 'slides_per_view' => $attributes['slides_per_view'], 'space_between' => $attributes['space_between'], 'show_dots' => $attributes['show_dots'], 'show_arrows' => $attributes['show_arrows'], 'enable_player' => 0, 'interactive_mode' => $attributes['interactive_mode'], 'enable_filters' => 0, 'hide_if_empty' => 1 ); $trailers_args = apply_filters( 'aiopod_single_podcast_trailers_args', $trailers_args ); aiopod_the_episodes( $trailers_args ); } // Bonus Episodes if ( ! empty( $attributes['show_bonus_episodes'] ) ) { $bonus_episodes_args = array( 'podcast' => $post->ID, 'title' => $attributes['bonus_episodes_title'], 'type' => 'bonus', 'show_count' => 0, 'layout' => 'slider', 'limit' => 0, 'slides_per_view' => $attributes['slides_per_view'], 'space_between' => $attributes['space_between'], 'show_dots' => $attributes['show_dots'], 'show_arrows' => $attributes['show_arrows'], 'enable_player' => 0, 'interactive_mode' => $attributes['interactive_mode'], 'enable_filters' => 0, 'hide_if_empty' => 1 ); $bonus_episodes_args = apply_filters( 'aiopod_single_podcast_bonus_episodes_args', $bonus_episodes_args ); aiopod_the_episodes( $bonus_episodes_args ); } // Participants $participants = array(); if ( ! empty( $attributes['show_participants'] ) ) { $participants = aiopod_get_post_participants( $post->ID ); } $participants_columns = ! empty( $attributes['participants_columns'] ) ? (int) $attributes['participants_columns'] : 3; if ( ! empty( $participants ) ) : ?>