示例#1
0
        the_post_thumbnail('regular-large');
        ?>
</a>
					</div><!-- .featured-image-large -->
				<?php 
    }
    ?>
<!-- end if it has a featured image (displayed only on standard posts) -->

				<?php 
    if ($format == 'video') {
        ?>

				<span class="mini-title"><?php 
        echo get_the_date();
        echo pod_explicit_post($post->ID);
        ?>
</span>
				<h1 class="entry-title"><?php 
        the_title();
        ?>
</h1>
				
				<?php 
    } elseif ($format == 'aside' || $posttype == 'podcast') {
        ?>
					<?php 
        //Display no title.
        ?>
				<?php 
    } else {
示例#2
0
    function pod_featured_multimedia($post_id)
    {
        global $post;
        $plugin_inuse = get_pod_plugin_active();
        $post_format = get_post_format($post_id);
        $pod_featured_excerpt = pod_theme_option('pod-frontpage-fetured-ex');
        $post_featured_media = '';
        if ($plugin_inuse == 'ssp') {
            $pod_fh_heading = pod_theme_option('pod-featured-heading');
            $id = get_the_ID();
            $file = get_post_meta($post_id, 'enclosure', true);
            $terms = wp_get_post_terms($post_id, 'series');
            foreach ($terms as $term) {
                $series_id = $term->term_id;
                $series = $term->name;
                break;
            }
            $post_featured_media .= '<span class="mini-title">' . $pod_fh_heading . '</span>';
            $post_featured_media .= pod_explicit_post($post->ID);
            $post_featured_media .= '<h2><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>';
            if ($file != '') {
                $post_featured_media .= '<div class="audio"><div class="audio_player">' . do_shortcode('[audio src="' . $file . '"][/audio]') . '</div><!--audio_player--></div><!-- .audio -->';
            } else {
                $post_featured_media .= '';
            }
            if ($pod_featured_excerpt == true) {
                $post_featured_media .= '<div class="featured-excerpt ' . $post_format . '">';
                $post_featured_media .= get_the_excerpt();
                $post_featured_media .= '<a href="' . get_permalink() . '" class="more-link">';
                $post_featured_media .= __(' Read More', 'thstlang');
                $post_featured_media .= '<span class="meta-nav"></span>
								</a>';
                $post_featured_media .= '</div>';
            }
        } elseif ($plugin_inuse == 'bpp') {
            $pod_fh_heading = pod_theme_option('pod-featured-heading');
            $pp_audio_str = get_post_meta($post_id, 'enclosure', true);
            $pp_audiourl = strtok($pp_audio_str, "\n");
            $post_featured_media .= '<span class="mini-title">' . $pod_fh_heading . '</span>';
            $post_featured_media .= pod_explicit_post($post->ID);
            $post_featured_media .= '<h2><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>';
            if ($pp_audiourl != '') {
                $post_featured_media .= get_the_powerpress_content();
            }
            if ($pod_featured_excerpt == true) {
                $post_featured_media .= '<div class="featured-excerpt ' . $post_format . '">';
                $post_featured_media .= get_the_excerpt();
                $post_featured_media .= '<a href="' . get_permalink() . '" class="more-link">';
                $post_featured_media .= __(' Read More', 'thstlang');
                $post_featured_media .= '<span class="meta-nav"></span>
								</a>';
                $post_featured_media .= '</div>';
            }
        } else {
            if ($post_format == 'audio') {
                $audiourl = get_post_meta($post_id, 'cmb_thst_audio_url', true);
                $audioembed = get_post_meta($post_id, 'cmb_thst_audio_embed', true);
                $audioembedcode = get_post_meta($post_id, 'cmb_thst_audio_embed_code', true);
                $audiocapt = get_post_meta($post_id, 'cmb_thst_audio_capt', true);
                $audioplists = get_post_meta($post_id, 'cmb_thst_audio_playlist', true);
                $au_uploadcode = wp_audio_shortcode($audiourl);
                $audioex = get_post_meta($post_id, 'cmb_thst_audio_explicit', true);
                $options = get_option('podcaster-theme');
                $pod_fh_heading = isset($options['pod-featured-heading']) ? $options['pod-featured-heading'] : '';
                $excerpt_count = get_post_meta($post_id, 'cmb_thst_featured_post_excerpt_count', true);
                $has_excerpt = get_post_meta($post_id, 'cmb_thst_feature_post_excerpt', true);
                $post_object = get_post($post_id);
                $fheader_type = pod_theme_option('pod-featured-header-type');
                if ($fheader_type == 'static') {
                    $post_excerpt = get_the_excerpt();
                } else {
                    if ($has_excerpt == 'on') {
                        if ($post_object->post_excerpt) {
                            $post_excerpt = $post_object->post_excerpt;
                        } elseif (isset($excerpt_count)) {
                            $post_excerpt = pod_flexible_excerpt($post_id, $excerpt_count);
                        } else {
                            $post_excerpt = '';
                        }
                    } else {
                        $post_excerpt = '';
                    }
                }
                if ($audioembed != '') {
                    $file_parts = pathinfo($audioembed);
                    if (array_key_exists("extension", $file_parts)) {
                        $audioembed = '';
                        $au_embedcode = "<p>Please use a valid embed URL. Make sure it doesn't have a file extension, such as *.mp3.</p>";
                    } else {
                        $au_embedcode = wp_oembed_get($audioembed);
                    }
                    $post_featured_media .= '<div class="row">' . pod_the_embed('<span class="mini-title">' . $pod_fh_heading . '</span> ' . pod_explicit_post($post_id) . ' <h2><a href="' . get_permalink($post_id) . '">' . get_the_title($post_id) . '</a></h2> <p>' . $post_excerpt . '</p><a class="more-link" href="' . get_permalink($post_id) . '">' . __('Read More', 'thstlang') . '</a>', '<div class="audio_player au_oembed">' . $au_embedcode . '</div><!--audio_player-->') . '</div>';
                } elseif ($audiourl != '') {
                    $post_featured_media .= '<span class="mini-title">' . $pod_fh_heading . '</span>';
                    $post_featured_media .= pod_explicit_post($post->ID);
                    $post_featured_media .= '<h2><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>';
                    $post_featured_media .= '<div class="audio_player">' . do_shortcode('[audio src="' . $audiourl . '"][/audio]') . '</div><!--audio_player-->';
                    if ($pod_featured_excerpt == true) {
                        $post_featured_media .= '<div class="featured-excerpt ' . $post_format . '">';
                        $post_featured_media .= get_the_excerpt();
                        $post_featured_media .= '<a href="' . get_permalink() . '" class="more-link">';
                        $post_featured_media .= __(' Read More', 'thstlang');
                        $post_featured_media .= '<span class="meta-nav"></span>
								</a>';
                        $post_featured_media .= '</div>';
                    }
                } elseif (is_array($audioplists)) {
                    $post_featured_media .= '<div class="row">' . pod_the_embed('<span class="mini-title">' . $pod_fh_heading . '</span> ' . pod_explicit_post($post_id) . ' <h2><a href="' . get_permalink($post_id) . '">' . get_the_title($post_id) . '</a></h2> <p>' . $post_excerpt . '</p><a class="more-link" href="' . get_permalink($post_id) . '">' . __('Read More', 'thstlang') . '</a>', do_shortcode('[playlist type="audio" ids="' . implode(',', array_keys($audioplists)) . '"][/playlist]')) . '</div>';
                } elseif ($audioembedcode != '') {
                    $post_featured_media .= '<div class="row">' . pod_the_embed('<span class="mini-title">' . $pod_fh_heading . '</span> ' . pod_explicit_post($post_id) . ' <h2><a href="' . get_permalink($post_id) . '">' . get_the_title($post_id) . '</a></h2> <p>' . $post_excerpt . '</p><a class="more-link" href="' . get_permalink($post_id) . '">' . __('Read More', 'thstlang') . '</a>', '<div class="audio_player embed_code">' . $audioembedcode . '</div><!--audio_player-->') . '</div>';
                } else {
                    $post_featured_media .= '';
                }
            } elseif ($post_format == 'video') {
                $options = get_option('podcaster-theme');
                $pod_fh_heading = isset($options['pod-featured-heading']) ? $options['pod-featured-heading'] : '';
                $excerpt_count = get_post_meta($post_id, 'cmb_thst_featured_post_excerpt_count', true);
                $has_excerpt = get_post_meta($post_id, 'cmb_thst_feature_post_excerpt', true);
                $post_object = get_post($post_id);
                $fheader_type = pod_theme_option('pod-featured-header-type');
                if ($fheader_type == 'static') {
                    $post_excerpt = get_the_excerpt();
                } else {
                    if ($has_excerpt == 'on') {
                        if ($post_object->post_excerpt) {
                            $post_excerpt = $post_object->post_excerpt;
                        } elseif (isset($excerpt_count)) {
                            $post_excerpt = pod_flexible_excerpt($post_id, $excerpt_count);
                        } else {
                            $post_excerpt = '';
                        }
                    } else {
                        $post_excerpt = '';
                    }
                }
                $videoembed = get_post_meta($post_id, 'cmb_thst_video_embed', true);
                $videoembedcode = get_post_meta($post_id, 'cmb_thst_video_embed_code', true);
                $videourl = get_post_meta($post_id, 'cmb_thst_video_url', true);
                $videocapt = get_post_meta($post_id, 'cmb_thst_video_capt', true);
                $videoplists = get_post_meta($post_id, 'cmb_thst_video_playlist', true);
                $videothumb = get_post_meta($post_id, 'cmb_thst_video_thumb', true);
                $videoex = get_post_meta($post_id, 'cmb_thst_video_explicit', true);
                $post_featured_media .= '<div class="row">';
                if ($videoembed != '') {
                    $post_featured_media .= pod_the_embed('<span class="mini-title">' . $pod_fh_heading . '</span> ' . pod_explicit_post($post_id) . ' <h2><a href="' . get_permalink($post_id) . '">' . get_the_title($post_id) . '</a></h2> <p>' . $post_excerpt . '</p><a class="more-link" href="' . get_permalink($post_id) . '">' . __('Read More', 'thstlang') . '</a>', '<div class="video_player">' . wp_oembed_get($videoembed) . '</div>');
                } elseif ($videourl != '') {
                    $post_featured_media .= pod_the_embed('<span class="mini-title">' . $pod_fh_heading . '</span> ' . pod_explicit_post($post_id) . ' <h2><a href="' . get_permalink($post_id) . '">' . get_the_title($post_id) . '</a></h2> <p>' . $post_excerpt . '</p><a class="more-link" href="' . get_permalink($post_id) . '">' . __('Read More', 'thstlang') . '</a>', '<div class="video_player"> ' . do_shortcode('[video poster="' . $videothumb . '" src="' . $videourl . '"][/video]') . '</div>');
                } elseif (is_array($videoplists)) {
                    $post_featured_media .= pod_the_embed('<span class="mini-title">' . $pod_fh_heading . '</span> ' . pod_explicit_post($post_id) . ' <h2><a href="' . get_permalink($post_id) . '">' . get_the_title($post_id) . '</a></h2> <p>' . $post_excerpt . '</p><a class="more-link" href="' . get_permalink($post_id) . '">' . __('Read More', 'thstlang') . '</a>', '<div class="video_player">' . do_shortcode('[playlist type="video" ids="' . implode(',', array_keys($videoplists)) . '"][/playlist]') . '</div>');
                } elseif ($videoembedcode != '') {
                    $post_featured_media .= pod_the_embed('<span class="mini-title">' . $pod_fh_heading . '</span> ' . pod_explicit_post($post_id) . ' <h2><a href="' . get_permalink($post_id) . '">' . get_the_title($post_id) . '</a></h2> <p>' . $post_excerpt . '</p><a class="more-link" href="' . get_permalink($post_id) . '">' . __('Read More', 'thstlang') . '</a>', '<div class="video_player">' . $videoembedcode . '</div>');
                } else {
                    $post_featured_media .= '';
                }
                $post_featured_media .= '</div>';
            }
        }
        return $post_featured_media;
    }