예제 #1
0
if ($settings->title) {
    ?>
      <h1 class="fb-sermons-title"><?php 
    echo $settings->title;
    ?>
</h1>
    <?php 
}
// Get posts
$posts = ctc_get_sermons($instance);
// Loop Posts
$i = 0;
foreach ($posts as $post) {
    setup_postdata($post);
    $i++;
    extract(ctc_sermon_data());
    $ctc_sermon_topic = get_the_term_list($post->ID, 'ctc_sermon_topic', '', __(', ', 'rock'));
    $ctc_sermon_book = get_the_term_list($post->ID, 'ctc_sermon_book', '', __(', ', 'rock'));
    $ctc_sermon_series = get_the_term_list($post->ID, 'ctc_sermon_series', '', __(', ', 'rock'));
    $ctc_sermon_speaker = get_the_term_list($post->ID, 'ctc_sermon_speaker', '', __(', ', 'rock'));
    $ctc_sermon_tag = get_the_term_list($post->ID, 'ctc_sermon_tag', '', __(', ', 'rock'));
    ?>

      <div class="fb-sermons--sermon">

        <?php 
    if ($instance['show_image'] && has_post_thumbnail()) {
        ?>
          <a class="fb-sermons--sermon-image" href="<?php 
        the_permalink();
        ?>
예제 #2
0
<?php

/**
 * The template part for displaying the post content.
 *
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package Rock
 */
// Get sermon data:
$sermon_data = ctc_sermon_data();
$has_full_text = $sermon_data['has_full_text'];
$video_player = $sermon_data['video_player'];
$video_download_url = $sermon_data['video_download_url'];
$audio_player = $sermon_data['audio_player'];
$audio_download_url = $sermon_data['audio_download_url'];
$pdf_download_url = $sermon_data['pdf_download_url'];
// Show buttons if need to switch between video and audio players or have at least one download link
$show_buttons = false;
if ($video_player && $audio_player || $video_download_url || $audio_download_url || $pdf_download_url) {
    $show_buttons = true;
}
// Player request (?player=audio or ?player=video)
// Optionally show and scroll to a specific player
if (isset($_GET['player']) && ('video' == $_GET['player'] && $video_player || 'audio' == $_GET['player'] && $audio_player)) {
    $player_request = $_GET['player'];
    switch ($player_request) {
        case 'video':
            $player = $video_player;
            break;
        case 'audio':