?>
</title>
		<link><?php 
        the_permalink_rss();
        ?>
</link>
		<pubDate><?php 
        echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false);
        ?>
</pubDate>
		<guid isPermaLink="false"><?php 
        the_guid();
        ?>
</guid>
		<description><?php 
        echo powerpress_format_itunes_value(powerpress_get_the_excerpt_rss(), 'description');
        ?>
</description>
<?php 
        rss_enclosure();
        ?>
	<?php 
        do_action('rss2_item');
        ?>
	<?php 
        echo "\t<itunes:order>";
        echo 1;
        echo "</itunes:order>\n";
        ?>
	</item>
<?php 
Example #2
0
function powerpress_itunes_summary($html)
{
    // Do some smart conversion of the post html to readable text without HTML.
    /*
    // First, convert: <a href="link"...>label</a>
    // to: label (link)
    $html = preg_replace_callback('/(\<a[^\>]*href="([^"]*)"[^\>]*>([^\<]*)<\/a\>)/i', 
    			create_function(
    				'$matches',
    				'return "{$matches[3]} ({$matches[2]})";'
    		), 
    			$html);
    
    // Second, convert: <img src="link" title="title" />
    // to: if no title (image: link) or (image title: link)
    $html = preg_replace_callback('/(\<img[^\>]*src="([^"]*)"[^\>]*[^\>]*\>)/i', 
    			create_function(
    				'$matches',
    				'return "({$matches[2]})";'
    		), 
    			$html);
    */
    // For now make them bullet points...
    $html = str_replace('<li>', '<li>* ', $html);
    // Now do all the other regular conversions...
    $html = strip_shortcodes($html);
    $html = str_replace(']]>', ']]&gt;', $html);
    $content_no_html = strip_tags($html, '<a>');
    // We can leave a tags
    $content_no_html = powerpress_format_itunes_value($content_no_html, 'summary-enhanced');
    //$content_no_html = preg_replace('/(\(http:\/\/[^\)\s]*)$/i', '', $content_no_html);
    return $content_no_html;
}