WordPress函数文档get_bloginfo_rss()

获取博客的RSS相关信息 描述 译文 bloginfo函数的http://en.wikipedia.org/w…

获取博客的RSS相关信息

描述

译文

bloginfo函数的http://en.wikipedia.org/wiki/Rss RSS]集装箱。
可以用 get_bloginfo()函数检索任何想要检索的信息。当函数值在feed中被检索以供使用时,所有值的标签都将被除去,字符也将被转换。

原文

RSS container for the bloginfo function.

You can retrieve anything that you can using the get_bloginfo() function. Everything will be stripped of tags and characters converted, when the values are retrieved for use in the feeds.

用法

<?php get_bloginfo_rss$show ?>

参数

$show

(string) (可选) Informational detail about your blog. Valid values:

默认值: ”

  • ‘name’ – Weblog title; set in General Options. (Default)
  • ‘description’ – Tagline for your blog; set in General Options.
  • ‘url’ – URL for your blog’s web site address.
  • ‘rdf_url’ – URL for RDF/RSS 1.0 feed.
  • ‘rss_url’ – URL for RSS 0.92 feed.
  • ‘rss2_url’ – URL for RSS 2.0 feed.
  • ‘atom_url’ – URL for Atom feed.
  • ‘comments_rss2_url’ – URL for comments RSS 2.0 feed.
  • ‘pingback_url’ – URL for Pingback (XML-RPC file).
  • ‘admin_email’ – Administrator’s email address; set in General Options.
  • ‘charset’ – Character encoding for your blog; set in Reading Options.
  • ‘version’ – Version of WordPress your blog uses.

The following work in WordPress version 1.5 or after:

  • ‘html_type’ – “Content-type” for your blog.
  • ‘wpurl’ – URL for WordPress installation.
  • ‘template_url’ – URL for template in use.
  • ‘template_directory’ – URL for template’s directory.
  • ‘stylesheet_url’ – URL for primary CSS file.
  • ‘stylesheet_directory’ – URL for stylesheet directory.

返回值

(string) 

示例

RSS2 URL

Assigns the URL of your blog’s RSS2 feed to the variable $rss2_url.

注意

  • 使用到: apply_filters() 调用 ‘get_bloginfo_rss‘ hook with two parameters.

历史

添加于 版本: 1.5.1

源文件

get_bloginfo_rss() 函数的代码位于 wp-includes/feed.php.

  • 原文:http://codex.wordpress.org/Function_Reference/get_bloginfo_rss
类别:WordPress函数文档

本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。

评论 (0)COMMENT