当前位置: 首页>>代码示例>>PHP>>正文


PHP the_excerpt_rss函数代码示例

本文整理汇总了PHP中the_excerpt_rss函数的典型用法代码示例。如果您正苦于以下问题:PHP the_excerpt_rss函数的具体用法?PHP the_excerpt_rss怎么用?PHP the_excerpt_rss使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了the_excerpt_rss函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: skeleton_og_meta_tags

    /**
     * Display the Open Graph meta tags.
     * Add more to this if needed.
     *
     * See: https://developers.facebook.com/docs/sharing/webmasters and http://ogp.me/
     */
    function skeleton_og_meta_tags()
    {
        if (is_single() || is_page()) {
            if (have_posts()) {
                while (have_posts()) {
                    the_post();
                    ?>
        <meta name="og:description" content="<?php 
                    the_excerpt_rss();
                    ?>
">
        <meta name="og:image" content="<?php 
                    echo skeleton_get_thumbnail_src(get_post_thumbnail_id());
                    ?>
">
    <?php 
                }
            }
        } elseif (is_home()) {
            ?>
        <meta name="og:description" content="<?php 
            bloginfo('description');
            ?>
">
    <?php 
        }
    }
开发者ID:sayme,项目名称:skeleton,代码行数:33,代码来源:template-tags.php

示例2: lj_description

function lj_description()
{
    if (is_single() || is_page()) {
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                the_excerpt_rss();
            }
        }
    } else {
        if (is_home()) {
            lj_title();
        }
    }
}
开发者ID:klebercarvalho,项目名称:demo,代码行数:15,代码来源:functions.php

示例3: osfeeds_item

function osfeeds_item()
{
    global $osfeeds_gallery_lookup;
    $media = array();
    // Honor the feed settings. Don't include any media that isn't in the feed.
    if (!strlen(get_the_content())) {
        $content = the_excerpt_rss();
    } else {
        // When a gallery in a post is processed wp_get_attachment_link is run for
        // each picture. Get the $id for each picture.
        // $lookup = ('dom.com/wp-content...' => 13,'dom.com/wp-content...' => 16)
        add_filter('wp_get_attachment_link', 'osfeeds_gallery_lookup', 10, 5);
        $content = apply_filters('the_content', get_the_content());
        remove_filter('wp_get_attachment_link', 'osfeeds_gallery_lookup', 10, 5);
        $lookup = $osfeeds_gallery_lookup;
        unset($osfeeds_gallery_lookup);
    }
    // Use featured image if it has one.
    global $post;
    if (has_post_thumbnail($post->ID)) {
        // Get featured image as thumbnail if possible, else use attachment
        // thumbnail/full
        //$thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'thumbnail');
        //if (!empty($thumbnail))
        //  $media[]['thumbnail']['attr']['url'] = $thumbnail[0];
        // Make the featured image the first media:content item.
        $thumbnail_id = get_post_thumbnail_id($post->ID);
        $featured_src = wp_get_attachment_image_src($thumbnail_id, 'full');
        $attributes = osfeeds_attachment_attributes($thumbnail_id, $featured_src[0]);
        $featured_item = assemble_featured($featured_src[0], $attributes);
        $media[] = $featured_item;
    }
    // Extract img tag attributes
    $images = 0;
    if (preg_match_all('/<img (.+?)>/', $content, $matches)) {
        foreach ($matches[1] as $attrs) {
            $item = $img = array();
            // Construct $img array from <img> attributes
            // Produces $img = ('alt' => 'val1', 'src' => 'val2', 'title' => 'val3', etc)
            foreach (wp_kses_hair($attrs, array('http')) as $attr) {
                $img[$attr['name']] = $attr['value'];
            }
            // Get absolute URL of image
            if (!isset($img['src'])) {
                continue;
            }
            $img['src'] = osfeeds_url($img['src']);
            // Skip emoticons
            if (isset($img['class']) && false !== strpos($img['class'], 'wp-smiley')) {
                continue;
            }
            // If the image scraped from the content is found in $lookup that means
            // its part of a gallery so use that id. Otherwise grab the id from the
            // css class
            $id = false;
            if (isset($lookup[$img['src']])) {
                $id = $lookup[$img['src']];
            } elseif (isset($img['class']) && preg_match('/wp-image-(\\d+)/', $img['class'], $match)) {
                $id = $match[1];
            }
            // It's an attachment, so we will get the URLs, title, and description
            // from functions
            if ($id) {
                $img = array_merge($img, osfeeds_attachment_attributes($id, $img['src']));
            }
            // Populate thumbnail on first iteration of image search if not already
            // filled from featured image
            //if (++$images == 1) {
            //  if (!empty($thumbnail))
            //    $img['thumbnail'] = $thumbnail[0];
            //  elseif (isset($img['thumbnail']))
            //    $media[]['thumbnail']['attr']['url'] = $img['thumbnail'];
            //  else
            //    $media[]['thumbnail']['attr']['url'] = $img['src'];
            //}
            // If first image of gallery/post is the same as featured image then it
            // is already added so don't add again
            if ($featured_src == $img['src']) {
                continue;
            }
            // From this point on just assemble the image being iterated over,
            // whether that be part of a gallery or not into <media:content> tags
            $item = assemble_item($img);
            $media[] = $item;
        }
    }
    $media = apply_filters('osfeeds_media', $media);
    osfeeds_print($media);
}
开发者ID:kyme-online,项目名称:Ramesh-Photography,代码行数:89,代码来源:onswipe_feeds.php

示例4: start_wp

        start_wp();
        ?>
        <item>
            <title><?php 
        the_title_rss();
        ?>
</title>
<?php 
        // we might use this in the future, but not now, that's why it's commented in PHP
        // so that it doesn't appear at all in the RSS
        //          echo "<category>"; the_category_unicode(); echo "</category>";
        $more = 1;
        if (get_settings('rss_use_excerpt')) {
            ?>
            <description><?php 
            the_excerpt_rss(get_settings('rss_excerpt_length'), get_settings('rss_encoded_html'));
            ?>
</description>
<?php 
        } else {
            // use content
            ?>
            <description><?php 
            the_content_rss('', 0, '', get_settings('rss_excerpt_length'), get_settings('rss_encoded_html'));
            ?>
</description>
<?php 
        }
        // end else use content
        ?>
            <link><?php 
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:31,代码来源:wp-rss.php

示例5: bloginfo_rss

	<generator>http://wordpress.org/?v=<?php bloginfo_rss('version'); ?></generator>
	<language><?php echo get_option('rss_language'); ?></language>
	<?php do_action('rss2_head'); ?>
	<?php while( have_posts()) : the_post(); ?>
	<item>
		<title><?php the_title_rss() ?></title>
		<link><?php permalink_single_rss() ?></link>
		<comments><?php comments_link(); ?></comments>
		<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
		<dc:creator><?php the_author() ?></dc:creator>
		<?php the_category_rss() ?>

		<guid isPermaLink="false"><?php the_guid(); ?></guid>
<?php if (get_option('rss_use_excerpt')) : ?>
		<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
<?php else : ?>
		<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
	<?php if ( strlen( $post->post_content ) > 0 ) : ?>
		<content:encoded><![CDATA[<?php the_content() ?>]]></content:encoded>
	<?php else : ?>
		<content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>
	<?php endif; ?>
<?php endif; ?>
		<wfw:commentRss><?php echo comments_rss(); ?></wfw:commentRss>
<?php rss_enclosure(); ?>
	<?php do_action('rss2_item'); ?>
	</item>
	<?php endwhile; ?>
</channel>
</rss>
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:30,代码来源:wp-rss2.php

示例6: header

}

header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
$more = 1;

?>
<?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
<!-- generator="wordpress/<?php echo $wp_version ?>" -->
<rss version="0.92">
<channel>
	<title><?php bloginfo_rss('name') ?></title>
	<link><?php bloginfo_rss('url') ?></link>
	<description><?php bloginfo_rss('description') ?></description>
	<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), 0); ?></lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language><?php echo get_option('rss_language'); ?></language>

<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
	<item>
		<title><?php the_title_rss() ?></title>
<?php if (get_settings('rss_use_excerpt')) { ?>
		<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
<?php } else { // use content ?>
		<description><?php the_content_rss('', 0, '', get_settings('rss_excerpt_length')) ?></description>
<?php } ?>
		<link><?php permalink_single_rss() ?></link>
	</item>
<?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
</channel>
</rss>
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:30,代码来源:wp-rss.php

示例7: get_entry

	function get_entry($postID, $post_type = 'post') {
		log_app('function',"get_entry($postID, '$post_type')");
		ob_start();
		global $posts, $post, $wp_query, $wp, $wpdb, $blog_id, $post_cache;
		switch($post_type) {
			case 'post':
				$varname = 'p';
				break;
			case 'attachment':
				$varname = 'attachment_id';
				break;
		}
		query_posts($varname . '=' . $postID);
		if ( have_posts() ) : while ( have_posts() ) : the_post();
		$post = $GLOBALS['post'];
		?>
		<?php log_app('$post',print_r($GLOBALS['post'],true)); ?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://purl.org/atom/app#" xml:lang="<?php echo get_option('rss_language'); ?>">
	<id><?php the_guid($post->ID); ?></id>
	<title type="html"><![CDATA[<?php the_title_rss() ?>]]></title>

	<updated><?php echo get_post_modified_time('Y-m-d\TH:i:s\Z', true); ?></updated>
	<published><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></published>
	<app:control>
		<app:draft><?php echo ($GLOBALS['post']->post_status == 'draft' ? 'yes' : 'no') ?></app:draft>
	</app:control>
	<author>
		<name><?php the_author()?></name>
		<email><?php the_author_email()?></email>
		<uri><?php the_author_url()?></uri>
	</author>
<?php if($GLOBALS['post']->post_type == 'attachment') { ?>
	<link rel="edit" href="<?php $this->the_entry_url() ?>" />
	<link rel="edit-media" href="<?php $this->the_media_url() ?>" />
	<content type="<?php echo $GLOBALS['post']->post_mime_type ?>" src="<?php the_guid(); ?>"/>
<?php } else { ?>
	<link href="<?php permalink_single_rss() ?>" />
	<link rel="edit" href="<?php $this->the_entry_url() ?>" />
<?php } ?>
<?php foreach(get_the_category() as $category) { ?>
	<category scheme="<?php bloginfo_rss('home') ?>" term="<?php echo $category->cat_name?>" />
	<summary type="html"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
<?php }
	if ( strlen( $GLOBALS['post']->post_content ) ) : ?>
	<content type="html"><![CDATA[<?php echo get_the_content('', 0, '') ?>]]></content>
<?php endif; ?>
</entry>
<?php
		$entry = ob_get_contents();
		break;
		endwhile;
		else:
			$this->auth_required(__("Access Denied."));
		endif;
		ob_end_clean();

		log_app('get_entry returning:',$entry);
		return $entry; 
	}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:59,代码来源:wp-app.php

示例8: podcasting_add_itunes_item

function podcasting_add_itunes_item()
{
    if ('podcast' == get_query_var('feed')) {
        $podcast_format = '' == get_query_var('format') ? 'default-format' : get_query_var('format');
        $enclosures = get_post_custom_values('enclosure');
        foreach ($enclosures as $enclosure) {
            $enclosure_itunes = explode("\n", $enclosure);
            $enclosure_itunes = unserialize($enclosure_itunes[3]);
            if ($enclosure_itunes['format'] == $podcast_format) {
                break;
            }
        }
        // iTunes summary
        ob_start();
        the_content();
        $itunes_summary = ob_get_contents();
        ob_end_clean();
        echo '<itunes:summary>' . podcasting_limit_string_length(ent2ncr(strip_tags(stripslashes($itunes_summary))), 4000) . '</itunes:summary>' . "\n";
        // iTunes subtitle
        ob_start();
        the_excerpt_rss();
        $itunes_subtitle = ob_get_contents();
        ob_end_clean();
        echo '<itunes:subtitle>' . podcasting_limit_string_length(ent2ncr(strip_tags(stripslashes($itunes_subtitle))), 255) . '</itunes:subtitle>' . "\n";
        // iTunes author
        if ('' != $enclosure_itunes['author']) {
            echo '<itunes:author>' . ent2ncr(stripslashes($enclosure_itunes['author'])) . '</itunes:author>' . "\n";
        }
        // iTunes duration
        if ('' != $enclosure_itunes['length']) {
            echo '<itunes:duration>' . ent2ncr(stripslashes($enclosure_itunes['length'])) . '</itunes:duration>' . "\n";
        }
        // iTunes keywords
        if ('' != $enclosure_itunes['keywords']) {
            echo '<itunes:keywords>' . ent2ncr(stripslashes($enclosure_itunes['keywords'])) . '</itunes:keywords>' . "\n";
        }
        // iTunes explicit
        if ('' != $enclosure_itunes['explicit']) {
            echo '<itunes:explicit>' . $enclosure_itunes['explicit'] . '</itunes:explicit>' . "\n";
        }
    }
}
开发者ID:alx,项目名称:barceloneta,代码行数:42,代码来源:podcasting.php

示例9: bloginfo_rss

	<tagline><?php bloginfo_rss("description") ?></tagline>
	<modified><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT')); ?></modified>
	<copyright>Copyright <?php echo mysql2date('Y', get_lastpostdate('blog')); ?></copyright>
	<generator url="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator>
	
	<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
	<entry>
	  	<author>
			<name><?php the_author() ?></name>
		</author>
		<title type="text/html" mode="escaped"><![CDATA[<?php the_title_rss() ?>]]></title>
		<link rel="alternate" type="text/html" href="<?php permalink_single_rss() ?>" />
		<id><?php the_guid(); ?></id>
		<modified><?php the_time('Y-m-d\TH:i:s\Z'); ?></modified>
		<issued>  <?php the_time('Y-m-d\TH:i:s\Z'); ?></issued>
		<?php the_category_rss('rdf') ?>
		<summary type="<?php bloginfo('html_type'); ?>" mode="escaped"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
<?php if (!get_settings('rss_use_excerpt')) : ?>
	<?php if ( strlen( $post->post_content ) ) : ?>
		<content type="<?php bloginfo('html_type'); ?>" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content>
	<?php else : ?>
		<content type="<?php bloginfo('html_type'); ?>" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></content>
	<?php endif; ?>
<?php else : ?>
		<content type="<?php bloginfo('html_type'); ?>" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_excerpt_rss() ?>]]></content>
<?php endif; ?>
<?php rss_enclosure(); ?>
	</entry>
	<?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
</feed>
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:30,代码来源:wp-atom.php

示例10: the_time

</id>
		<modified><?php 
        the_time('Y-m-d\\TH:i:s\\Z');
        ?>
</modified>
		<issued><?php 
        the_time('Y-m-d\\TH:i:s\\Z');
        ?>
</issued>
		<?php 
        the_category_rss('rdf');
        $more = 1;
        if ($rss_use_excerpt) {
            ?>
		<summary type="text/html"><?php 
            the_excerpt_rss($rss_excerpt_length, 2);
            ?>
</summary>
<?php 
        } else {
            // use content
            ?>
		<summary type="text/html"><?php 
            the_content_rss('', 0, '', $rss_excerpt_length, 2);
            ?>
</summary>
<?php 
        }
        // end else use content
        ?>
		<content type="text/html" mode="escaped" xml:base="<?php 
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:31,代码来源:wp-atom.php

示例11: seometa_add_meta

function seometa_add_meta()
{
    if (get_option('seo_meta_tags[description]') != '') {
        if (is_single() || is_page()) {
            if (have_posts()) {
                while (have_posts()) {
                    the_post();
                    ?>
<meta name="description" content="<?php 
                    the_excerpt_rss();
                    ?>
" />
<?php 
                }
            }
        } elseif (is_home()) {
            ?>
<meta name="description" content="<?php 
            echo get_option('seo_meta_tags[description]');
            ?>
" />
<?php 
        }
    }
    if (get_option('seo_meta_tags[keywords]') != '') {
        ?>
<meta name="keywords" content="<?php 
        echo get_option('seo_meta_tags[keywords]');
        ?>
" />
<?php 
    }
}
开发者ID:revathskumar,项目名称:Coderepo,代码行数:33,代码来源:seo-meta-tags.php

示例12: cherry_wp_head

function cherry_wp_head()
{
    ?>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<script type="text/javascript">
var cherry_url = '<?php 
    bloginfo('template_url');
    ?>
';
</script>
<!--[if lt IE 9]>
<script type='text/javascript' src='<?php 
    echo BD_JS;
    ?>
/selectivizr-min.js'></script>
<script type='text/javascript' src='<?php 
    echo BD_JS;
    ?>
/html5.js'></script>
<![endif]-->
<!--[if IE 8]>
<link href="<?php 
    echo BD_CSS;
    ?>
/ie.css" rel="stylesheet" type="text/css" media="all" />
<![endif]-->
<!--[if IE 7]>
<link href="<?php 
    echo BD_CSS;
    ?>
/ie.css" rel="stylesheet" type="text/css" media="all" />
<![endif]-->
<?php 
    if (bdayh_get_option('disable_responsive')) {
        ?>
<meta name="viewport" content="width=1045" />
<?php 
    } else {
        ?>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<?php 
    }
    if (bdayh_get_option('seo_settings') == 1) {
        if (is_home() || is_front_page()) {
            ?>
<meta name="description" content="<?php 
            bloginfo('description');
            ?>
" />
<meta name="keywords" content="<?php 
            echo stripslashes(bdayh_get_option('seo_keywords'));
            ?>
" />
<?php 
        } elseif (is_single() || is_page()) {
            if (have_posts()) {
                while (have_posts()) {
                    the_post();
                    ?>
<meta name="description" content="<?php 
                    the_excerpt_rss();
                    ?>
" />
<?php 
                    csv_tags();
                }
            }
            wp_reset_query();
        }
    }
    if (bdayh_get_option('skin_color') == 'red') {
    } else {
    }
    if (bdayh_get_option('skin_color') == 'blue') {
        ?>
    <link href="<?php 
        echo BD_CSS;
        ?>
/blue.css" rel="stylesheet" type="text/css" media="all" />
<?php 
    } else {
    }
    if (bdayh_get_option('skin_color') == 'green') {
        ?>
    <link href="<?php 
        echo BD_CSS;
        ?>
/green.css" rel="stylesheet" type="text/css" media="all" />
<?php 
    } else {
    }
    if (bdayh_get_option('skin_color') == 'rose') {
        ?>
    <link href="<?php 
        echo BD_CSS;
        ?>
/rose.css" rel="stylesheet" type="text/css" media="all" />
<?php 
    } else {
    }
//.........这里部分代码省略.........
开发者ID:hunghoang179,项目名称:sitenews,代码行数:101,代码来源:functions.php

示例13: get_option

	xml:lang="<?php echo get_option('rss_language'); ?>"
	<?php do_action('atom_ns'); ?>
>
	<title><?php bloginfo_rss('name') ?></title>
	<link rel="alternate" type="text/html" href="<?php bloginfo_rss('home') ?>" />
	<tagline><?php bloginfo_rss("description") ?></tagline>
	<modified><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></modified>
	<copyright>Copyright <?php echo mysql2date('Y', get_lastpostdate('blog'), 0); ?></copyright>
	<generator url="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator>
	<?php do_action('atom_head'); ?>
	<?php while (have_posts()) : the_post(); ?>
	<entry>
		<author>
			<name><?php the_author() ?></name>
		</author>
		<title type="text/html" mode="escaped"><![CDATA[<?php the_title_rss() ?>]]></title>
		<link rel="alternate" type="text/html" href="<?php permalink_single_rss() ?>" />
		<id><?php the_guid(); ?></id>
		<modified><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></modified>
		<issued><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></issued>
		<?php the_category_rss('rdf') ?>
		<summary type="<?php bloginfo('html_type'); ?>" mode="escaped"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
<?php if ( !get_option('rss_use_excerpt') ) : ?>
		<content type="<?php bloginfo('html_type'); ?>" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content>
<?php endif; ?>
<?php rss_enclosure(); ?>
<?php do_action('atom_entry'); ?>
	</entry>
	<?php endwhile ; ?>
</feed>
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:30,代码来源:wp-atom.php

示例14: do_action

	<admin:generatorAgent rdf:resource="http://wordpress.org/?v=<?php echo $wp_version ?>"/>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
	<?php do_action('rdf_header'); ?>
	<items>
		<rdf:Seq>
		<?php while (have_posts()): the_post(); ?>
			<rdf:li rdf:resource="<?php permalink_single_rss() ?>"/>
		<?php endwhile; ?>
		</rdf:Seq>
	</items>
</channel>
<?php rewind_posts(); while (have_posts()): the_post(); ?>
<item rdf:about="<?php permalink_single_rss() ?>">
	<title><?php the_title_rss() ?></title>
	<link><?php permalink_single_rss() ?></link>
	 <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', $post->post_date_gmt, false); ?></dc:date>
	<dc:creator><?php the_author() ?></dc:creator>
	<?php the_category_rss('rdf') ?>
<?php if (get_option('rss_use_excerpt')) : ?>
	<description><?php the_excerpt_rss() ?></description>
<?php else : ?>
	<description><?php the_content_rss('', 0, '', get_option('rss_excerpt_length'), 2) ?></description>
	<content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
<?php endif; ?>
	<?php do_action('rdf_item'); ?>
</item>
<?php endwhile;  ?>
</rdf:RDF>
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:30,代码来源:wp-rdf.php

示例15: get_the_post_thumbnail

    $the_image = get_the_post_thumbnail($post->ID, 'work_post_image');
    if ($the_image) {
        $thumb_id = get_post_thumbnail_id($post->ID);
        $thumb_url = wp_get_attachment_image_src($thumb_id, 'work_post_image', true);
        echo $thumb_url[0];
    } else {
        echo get_template_directory_uri() . '/images/temp_work_img.jpg';
    }
    ?>
</image>
<link><?php 
    echo get_the_permalink($post->ID);
    ?>
</link>
<description><?php 
    htmlspecialchars_decode(the_excerpt_rss());
    ?>
</description>
<category><?php 
    echo strip_tags(get_the_category_list(', '));
    ?>
</category>
<guid><?php 
    echo $post_id;
    ?>
</guid>
</item>
<?php 
}
?>
</channel>
开发者ID:JackBrit,项目名称:Team-London-Bridge,代码行数:31,代码来源:event-feed.php


注:本文中的the_excerpt_rss函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。