本文整理汇总了PHP中wp_convert_rss_charset函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_convert_rss_charset函数的具体用法?PHP wp_convert_rss_charset怎么用?PHP wp_convert_rss_charset使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_convert_rss_charset函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: the_category_rss
function the_category_rss($type = 'rss', $echo = true)
{
$categories = get_the_category();
$the_list = '';
foreach ($categories as $category) {
$category->cat_name = convert_chars($category->cat_name);
if ('rdf' == $type) {
$the_list .= "\n\t<dc:subject>{$category->cat_name}</dc:subject>";
} else {
$the_list .= "\n\t<category>{$category->cat_name}</category>";
}
}
return _echo(wp_convert_rss_charset(apply_filters('the_category_rss', $the_list)), $echo);
}
示例2: bloginfo_rss
function bloginfo_rss($show = '')
{
global $blog_charset;
$info = strip_tags(get_bloginfo($show));
echo wp_convert_rss_charset($info);
}
示例3: comment_text_rss
function comment_text_rss($echo = true, $plain = true)
{
$comment_text = str_replace('<trackback />', '', $GLOBALS['comment']->comment_content);
$comment_text = str_replace('<pingback />', '', $comment_text);
$comment_text = apply_filters('comment_text', $comment_text);
if ($plain) {
$comment_text = strip_tags($comment_text);
}
return _echo(wp_convert_rss_charset($comment_text), $echo);
}
示例4: the_excerpt_rss
function the_excerpt_rss($cut = 0, $encode_html = 0)
{
$output = apply_filters('the_excerpt', get_the_excerpt(true));
if ($cut && !$encode_html) {
$encode_html = 2;
}
if ($encode_html == 1) {
$output = htmlspecialchars($output);
$cut = 0;
} elseif ($encode_html == 0) {
$output = make_url_footnote($output);
} elseif ($encode_html == 2) {
$output = htmlspecialchars(strip_tags($output));
}
if ($cut) {
$excerpt = '';
$blah = explode(' ', $output);
if (count($blah) > $cut) {
$k = $cut;
$use_dotdotdot = 1;
} else {
$k = count($blah);
$use_dotdotdot = 0;
}
for ($i = 0; $i < $k; $i++) {
$excerpt .= $blah[$i] . ' ';
}
$excerpt .= $use_dotdotdot ? '...' : '';
$output = $excerpt;
}
$output = str_replace(']]>', ']]>', $output);
echo wp_convert_rss_charset(apply_filters('the_excerpt_rss', $output));
}
示例5: the_category_rss
function the_category_rss($type = 'rss')
{
$categories = get_the_category();
$the_list = '';
foreach ($categories as $category) {
$category->cat_name = stripslashes(convert_chars($category->cat_name));
if ('rdf' == $type) {
$the_list .= "\n\t<dc:subject>{$category->cat_name}</dc:subject>";
} else {
$the_list .= "\n\t<category>{$category->cat_name}</category>";
}
}
echo wp_convert_rss_charset(apply_filters('the_category_rss', $the_list));
}
示例6: comment_text_rss
function comment_text_rss()
{
global $comment;
$comment_text = str_replace('<trackback />', '', $comment->comment_content);
$comment_text = str_replace('<pingback />', '', $comment_text);
$comment_text = apply_filters('comment_text', $comment_text);
$comment_text = strip_tags($comment_text);
$comment_text = htmlspecialchars($comment_text);
echo wp_convert_rss_charset($comment_text);
}
示例7: the_author_rss
function the_author_rss()
{
global $blog_charset;
echo wp_convert_rss_charset(the_author('', false));
}
示例8: bloginfo_rss
function bloginfo_rss($show = '', $echo = true)
{
$info = strip_tags(get_bloginfo($show));
return _echo(wp_convert_rss_charset($info), $echo);
}
示例9: the_author_rss
function the_author_rss($echo = true)
{
return _echo(wp_convert_rss_charset(the_author('', false)), $echo);
}