function wpfc_podcast_add_item()
{
    global $post;
    $audio = get_post_meta($post->ID, 'sermon_audio', 'true');
    $speaker = strip_tags(get_the_term_list($post->ID, 'wpfc_preacher', '', ' & ', ''));
    $series = strip_tags(get_the_term_list($post->ID, 'wpfc_sermon_series', '', ', ', ''));
    // Sermon Topics
    $topic_list = wp_get_post_terms(get_the_ID(), 'wpfc_sermon_topics');
    $topics = false;
    if ($topic_list && count($topic_list) > 0) {
        $c = 0;
        foreach ($topic_list as $t) {
            if ($c == 0) {
                $topics = esc_html($t->name);
                ++$c;
            } else {
                $topics .= ', ' . esc_html($t->name);
            }
        }
    }
    $post_image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'large');
    $post_image = $post_image ? $post_image['0'] : null;
    $enclosure = get_post_meta($post->ID, 'enclosure', 'true');
    $audio_duration = get_post_meta($post->ID, '_wpfc_sermon_duration', 'true');
    if ($audio_duration == '') {
        $audio_duration = '0:00';
    }
    //zero if undefined
    ?>
	<itunes:author><?php 
    echo $speaker;
    ?>
</itunes:author>
	<itunes:subtitle><?php 
    echo $series;
    ?>
</itunes:subtitle>
	<itunes:summary><?php 
    strip_tags(wpfc_sermon_meta('sermon_description'));
    ?>
</itunes:summary>
	<?php 
    if ($post_image) {
        ?>
	<itunes:image href="<?php 
        echo $post_image;
        ?>
" />
	<?php 
    }
    ?>
	<?php 
    if ($enclosure == '') {
        ?>
		<enclosure url="<?php 
        echo $audio;
        ?>
" length="0" type="audio/mpeg"/>
	<?php 
    }
    ?>
	<itunes:duration><?php 
    echo esc_html($audio_duration);
    ?>
</itunes:duration>
	<?php 
    if ($topics) {
        ?>
		<itunes:keywords><?php 
        echo esc_html($topics);
        ?>
</itunes:keywords><?php 
    }
}
/**
 * Custom Excerpt function for Sermon Manager
 */
function avada_get_sermon_content($archive = false)
{
    global $post;
    $sermon_content = '';
    ob_start();
    ?>

	<p>
		<?php 
    _e('Date: ', 'Avada');
    wpfc_sermon_date(get_option('date_format'), '<span class="sermon_date">', '</span> ');
    echo the_terms($post->ID, 'wpfc_service_type', ' <span class="service_type">(', ' ', ')</span>');
    ?>
</p><p><?php 
    wpfc_sermon_meta('bible_passage', '<span class="bible_passage">' . __('Bible Text: ', 'Avada'), '</span> | ');
    echo the_terms($post->ID, 'wpfc_preacher', '<span class="preacher_name">', ', ', '</span>');
    echo the_terms($post->ID, 'wpfc_sermon_series', '<p><span class="sermon_series">' . __('Series: ', 'Aavada'), ' ', '</span></p>');
    ?>
	</p>

	<?php 
    if ($archive) {
        $sermonoptions = get_option('wpfc_options');
        if (isset($sermonoptions['archive_player']) == '1') {
            ?>
			<div class="wpfc_sermon cf">
				<?php 
            wpfc_sermon_files();
            ?>
			</div>
		<?php 
        }
    }
    ?>

	<?php 
    if (!$archive) {
        ?>

	<?php 
        wpfc_sermon_files();
        ?>

	<?php 
        wpfc_sermon_description();
        ?>

	<?php 
        wpfc_sermon_attachments();
        ?>

	<?php 
        echo the_terms($post->ID, 'wpfc_sermon_topics', '<p class="sermon_topics">' . __('Topics: ', 'sermon-manager'), ',', '', '</p>');
        ?>

	<?php 
    }
    $sermon_content = ob_get_clean();
    if ($archive) {
        $description = '';
        ob_start();
        wpfc_sermon_description();
        $description .= ob_get_clean();
        $excerpt_length = fusion_get_theme_option('excerpt_length_blog');
        $sermon_content .= Avada()->blog->get_content_stripped_and_excerpted($excerpt_length, $description);
    }
    return $sermon_content;
}
Example #3
0
            ?>
</link>
			<description><?php 
            strip_tags(wpfc_sermon_meta('sermon_description'));
            ?>
</description>
			<itunes:author><?php 
            echo $series;
            ?>
</itunes:author>
			<itunes:subtitle><?php 
            strip_tags(wpfc_sermon_meta('sermon_description'));
            ?>
</itunes:subtitle>
			<itunes:summary><?php 
            strip_tags(wpfc_sermon_meta('sermon_description'));
            ?>
</itunes:summary>
			<?php 
            if ($post_image) {
                ?>
			<itunes:image href="<?php 
                echo $post_image;
                ?>
" />
			<?php 
            }
            ?>
			<enclosure url="<?php 
            echo esc_url($audio_file);
            ?>
		<h1 class="sermon-title">
				<a href="<?php 
the_permalink();
?>
" title="<?php 
the_title();
?>
"><?php 
the_title();
?>
</a>
				<span class="sermon-date-meta"><?php 
wpfc_sermon_date('m/d/y', '', '');
echo the_terms($post->ID, 'wpfc_service_type', ' (', ' ', ')');
?>
<span>
		</h1>

		<div class="sermon-summary">
		<?php 
edwards_sermon_buttons();
wpfc_sermon_meta('bible_passage', '<span class="bible_passage">Bible Text: ', '</span> | ');
echo the_terms($post->ID, 'wpfc_preacher', '<span class="preacher_name">Speaker: ', ' ', '</span>');
echo the_terms($post->ID, 'wpfc_sermon_series', '<span class="sermon_series">Series: ', ' ', '</span>');
?>
		</div>

</article><!-- #post-<?php 
the_ID();
?>
 -->
Example #5
0
function wpfc_sermon_excerpt()
{
    global $post;
    ?>
	<div class="wpfc_sermon_wrap cf">
		<div class="wpfc_sermon_image">
			<?php 
    render_sermon_image('sermon_small');
    ?>
		</div>
		<div class="wpfc_sermon_meta cf">
			<p>	
				<?php 
    wpfc_sermon_date(get_option('date_format'), '<span class="sermon_date">', '</span> ');
    echo the_terms($post->ID, 'wpfc_service_type', ' <span class="service_type">(', ' ', ')</span>');
    ?>
</p><p><?php 
    wpfc_sermon_meta('bible_passage', '<span class="bible_passage">' . __('Bible Text: ', 'sermon-manager'), '</span> | ');
    echo the_terms($post->ID, 'wpfc_preacher', '<span class="preacher_name">', ', ', '</span>');
    echo the_terms($post->ID, 'wpfc_sermon_series', '<p><span class="sermon_series">' . __('Series: ', 'sermon-manager'), ' ', '</span></p>');
    ?>
			</p>
		</div>
		<?php 
    $sermonoptions = get_option('wpfc_options');
    if (isset($sermonoptions['archive_player']) == '1') {
        ?>
			<div class="wpfc_sermon cf">		  	
				<?php 
        wpfc_sermon_files();
        ?>
			</div>
		<?php 
    }
    ?>
	</div>
<script>
	var refTagger = {
		settings: {
			bibleReader: "bible.faithlife",
			bibleVersion: "ESV",			
			customStyle : {
				heading: {
					backgroundColor : "#CDDED1"
				}
			}
		}
	};
	(function(d, t) {
		var g = d.createElement(t), s = d.getElementsByTagName(t)[0];
		g.src = "//api.reftagger.com/v2/RefTagger.js";
		s.parentNode.insertBefore(g, s);
	}(document, "script"));
</script>
	<?php 
}