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


PHP comment_author_rss函数代码示例

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


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

示例1: get_the_title

	get_post_custom($comment_post->ID);
?>
	<entry>
		<title><?php
			if ( !is_singular() ) {
				$title = get_the_title($comment_post->ID);
				$title = apply_filters('the_title_rss', $title);
				printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());
			} else {
				printf(ent2ncr(__('By: %s')), get_comment_author_rss());
			}
		?></title>
		<link rel="alternate" href="<?php comment_link(); ?>" type="<?php bloginfo_rss('html_type'); ?>" />

		<author>
			<name><?php comment_author_rss(); ?></name>
			<?php if (get_comment_author_url()) echo '<uri>' . get_comment_author_url() . '</uri>'; ?>

		</author>

		<id><?php comment_link(); ?></id>
		<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></updated>
		<published><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></published>
<?php if ( post_password_required($comment_post) ) : ?>
		<content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php echo get_the_password_form(); ?>]]></content>
<?php else : // post pass ?>
		<content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php comment_text(); ?>]]></content>
<?php endif; // post pass
	// Return comment threading information (http://www.ietf.org/rfc/rfc4685.txt)
	if ( $comment->comment_parent == 0 ) : // This comment is top level ?>
		<thr:in-reply-to ref="<?php the_guid() ?>" href="<?php the_permalink_rss() ?>" type="<?php bloginfo_rss('html_type'); ?>" />
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:feed-atom-comments.php

示例2: printf

        } else {
            printf(ent2ncr(__('By: %s')), get_comment_author_rss());
        }
        ?>
</title>
		<link rel="alternate" href="<?php 
        comment_link();
        ?>
" type="<?php 
        bloginfo_rss('html_type');
        ?>
" />

		<author>
			<name><?php 
        comment_author_rss();
        ?>
</name>
			<?php 
        if (get_comment_author_url()) {
            echo '<uri>' . get_comment_author_url() . '</uri>';
        }
        ?>

		</author>

		<id><?php 
        comment_guid();
        ?>
</id>
		<updated><?php 
开发者ID:BGCX262,项目名称:zxhproject-svn-to-git,代码行数:31,代码来源:feed-atom-comments.php

示例3: get_settings

			AND post_date < '".date("Y-m-d H:i:59")."' 
			ORDER BY comment_date LIMIT " . get_settings('posts_per_rss') );
		} else { // if no post id passed in, we'll just ue the last 10 comments.
			$comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email, 
			comment_author_url, comment_date, comment_content, comment_post_ID, 
			$wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments 
			LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE $wpdb->posts.post_status = 'publish' 
			AND $wpdb->comments.comment_approved = '1' AND post_date < '".date("Y-m-d H:i:s")."'  
			ORDER BY comment_date DESC LIMIT " . get_settings('posts_per_rss') );
		}
	// this line is WordPress' motor, do not delete it.
		if ($comments) {
			foreach ($comments as $comment) {
?>
	<item>
		<title>by: <?php comment_author_rss() ?></title>
		<link><?php comment_link() ?></link>
		<pubDate><?php comment_time('r'); ?></pubDate>
		<guid><?php comment_link() ?></guid>
			<?php 
			if (!empty($comment->post_password) && $_COOKIE['wp-postpass'] != $comment->post_password) {
			?>
		<description>Protected Comments: Please enter your password to view comments.</description>
		<content:encoded><![CDATA[<?php echo get_the_password_form() ?>]]></content:encoded>
			<?php
			} else {
			?>
		<description><?php comment_text_rss() ?></description>
		<content:encoded><![CDATA[<?php comment_text() ?>]]></content:encoded>
			<?php 
			} // close check for password 
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:wp-commentsrss2.php


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