本文整理匯總了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);
}