post_content; if( function_exists('do_blocks') ) $content = do_blocks($content); $content = wptexturize($content); $content = wpautop($content); $content = shortcode_unautop($content); // Why do we do this? $content = prepend_attachment($content); if( function_exists('wp_make_content_images_responsive') ) $content = wp_make_content_images_responsive($content); $shortcodesTemp = $GLOBALS['shortcode_tags']; $GLOBALS['shortcode_tags']['skipto'] = 'powerpress_shortcode_skipto'; $content = do_shortcode($content); $GLOBALS['shortcode_tags'] = $shortcodesTemp; $content = capital_P_dangit($content); $content = convert_smilies($content); $content = strip_shortcodes( $content ); $content = str_replace(']]>', ']]>', $content); if( function_exists('_oembed_filter_feed_content') ) // WP 4.4+ return ( _oembed_filter_feed_content( $content ) ); //if( function_exists('wp_encode_emoji') ) { // WP 4.2+ // return wp_encode_emoji( $content ); //} return $content; } function powerpress_get_the_excerpt_rss($no_filters = true) { if( $no_filters == false ) { $output = get_the_excerpt(); return apply_filters( 'the_excerpt_rss', $output ); } global $post; if ( post_password_required() ) { return __( 'There is no excerpt because this is a protected post.' ); } $output = strip_tags($post->post_excerpt); if ( $output == '') { $output = $post->post_content; $shortcodesTemp = $GLOBALS['shortcode_tags']; $GLOBALS['shortcode_tags']['skipto'] = 'powerpress_shortcode_skipto'; $output = do_shortcode($output); $GLOBALS['shortcode_tags'] = $shortcodesTemp; $output = strip_shortcodes( $output ); $output = str_replace(']]>', ']]>', $output); $output = strip_tags($output); } return convert_chars( ent2ncr( $output ) ); } function powerpress_the_generator() { echo 'https://wordpress.org/?v=' . get_bloginfo_rss( 'version' ) . ''; } $GeneralSettings = get_option('powerpress_general'); $iTunesOrderNumber = 0; $FeaturedPodcastID = 0; if( !empty($GeneralSettings['new_episode_box_feature_in_itunes']) ) { $iTunesFeatured = get_option('powerpress_itunes_featured'); $feed_slug = get_query_var('feed'); if( !empty($iTunesFeatured[ $feed_slug ]) ) { if( get_post_type() == 'post' ) { $FeaturedPodcastID = $iTunesFeatured[ $feed_slug ]; $GLOBALS['powerpress_feed']['itunes_feature'] = true; // So any custom order value is not used when looping through the feeds. $iTunesOrderNumber = 2; // One reserved for featured episode } } } header('Content-Type: application/rss+xml; charset=' . get_option('blog_charset'), true); $more = 1; $FeedActionHook = ''; if( !empty($GeneralSettings['feed_action_hook']) ) $FeedActionHook = '_powerpress'; echo ''."\n"; ?> > <?php if( version_compare($GLOBALS['wp_version'], 4.4, '<' ) ) { bloginfo_rss('name'); } wp_title_rss(); ?> https://wordpress.org/?v=' . get_bloginfo_rss( 'version' ) . ''. PHP_EOL; } ?> next_post(); // Use this rather than the_post() that way we do not add additional queries to the database ?> <?php the_title_rss() ?> 0 ) { ?> ]]> post_content ) <= 0 ?> ]]> post_content ) <= 0 ?> 0 ) { echo "\t"; if( $FeaturedPodcastID == get_the_ID() ) { echo '1'; $FeaturedPodcastID = 0; } else // Print of 2, 3, ... { echo $iTunesOrderNumber; $iTunesOrderNumber++; } echo "\n"; } // Decide based on count if we want to flip on the feed maximizer... $ItemCount++; if( empty($GLOBALS['powerpress_feed']['feed_maximizer_on']) && $ItemCount >= 10 && !empty($GLOBALS['powerpress_feed']['maximize_feed']) ) { $GLOBALS['powerpress_feed']['feed_maximizer_on'] = true; // All future items will be minimized in order to maximize episode count } ?> $FeaturedPodcastID) ); if( have_posts()) { if( empty($GeneralSettings['feed_accel']) ) the_post(); else $GLOBALS['post'] = $GLOBALS['wp_query']->next_post(); // Use this rather than the_post() that way we do not add additional queries to the database // Featured podcast epiosde, give it the highest itunes:order value... ?> <?php the_title_rss() ?> "; echo 1; echo "\n"; ?> queries) ) { echo ""; } } ?>