Example #1
0
function powerpress_do_podcast_feed($for_comments = false)
{
    global $wp_query, $powerpress_feed;
    powerpress_is_podcast_feed();
    // Loads the feed settings if not already loaded...
    $GeneralSettings = get_option('powerpress_general');
    if (isset($GeneralSettings['premium_caps']) && $GeneralSettings['premium_caps']) {
        $feed_slug = get_query_var('feed');
        if ($feed_slug != 'podcast') {
            $FeedSettings = get_option('powerpress_feed_' . $feed_slug);
            if (!empty($FeedSettings['premium'])) {
                require_once POWERPRESS_ABSPATH . '/powerpress-feed-auth.php';
                powerpress_feed_auth($feed_slug);
            }
        }
    }
    //$wp_query->get_posts(); // No longer needed as it duplicates the existing get posts query already performed
    if (!empty($GeneralSettings['episode_box_feature_in_itunes']) || !empty($powerpress_feed['maximize_feed'])) {
        // Use the template for the always featured option
        load_template(POWERPRESS_ABSPATH . '/feed-podcast.php');
    } else {
        do_feed_rss2(false);
    }
}
function powerpress_do_podcast_feed($for_comments = false)
{
    global $wp_query, $powerpress_feed;
    powerpress_is_podcast_feed();
    // Loads the feed settings if not already loaded...
    $GeneralSettings = get_option('powerpress_general');
    if (isset($GeneralSettings['premium_caps']) && $GeneralSettings['premium_caps']) {
        $feed_slug = get_query_var('feed');
        if ($feed_slug != 'podcast') {
            $FeedSettings = get_option('powerpress_feed_' . $feed_slug);
            if (!empty($FeedSettings['premium'])) {
                require_once POWERPRESS_ABSPATH . '/powerpress-feed-auth.php';
                powerpress_feed_auth($feed_slug);
            }
        }
    }
    // Use the template to gurantee future WordPress behavior
    load_template(POWERPRESS_ABSPATH . '/feed-podcast.php');
}