WordPress: Template Tags/get bloginfo rss:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
无编辑摘要
无编辑摘要
 
第1行: 第1行:
== Description ==
== 描述 ==
== 描述 ==


Returns information about your blog, which can then be used elsewhere in your PHP code. This function is identical to [[WordPress:Template_Tags/get_bloginfo | get_bloginfo()]] except it strips any markup from the output for use in WordPress' [[WordPress:Glossary#Feed|syndication feeds]].
返回关于你的博客的信息,这个信息可以用在PHP代码的其它位置。这个函数与[[WordPress:Template_Tags/get_bloginfo | get_bloginfo()]]函数相同,只是这个函数会从输出中取消任何标记,WordPress的[[WordPress:Glossary#Feed|syndication feeds]]中不能够使用这些标记。
 
返回关于你的博客的信息,这个信息可以用在PHP代码的其它位置。这个函数与[[WordPress:Template_Tags/get_bloginfo | 得到_bloginfo()]]函数相同,只是这个函数会从输出中取消任何标记,WordPress的[[WordPress:Glossary#Feed|syndication feeds]]中不能够使用这些标记。
 
To display this information, use [[WordPress:Template Tags/bloginfo_rss|bloginfo_rss()]].


要显示这个信息,请使用[[WordPress:Template Tags/bloginfo_rss|bloginfo_rss()]]。
要显示这个信息,请使用[[WordPress:Template Tags/bloginfo_rss|bloginfo_rss()]]。


== Usage ==
== 用法 ==


%%% <?php get_bloginfo_rss('show'); ?> %%%
%%% <?php get_bloginfo_rss('show'); ?> %%%
== 用法 ==
%%% <?php 得到_bloginfo_rss('显示'); ?> %%%
== Example ==
=== RSS2 URL ===


== 例子 ==
== 例子 ==


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


将你的博客的RSS2 feed的URL指派到变数$rss2_url。
将你的博客的RSS2 feed的URL指派到变数$rss2_url。


  <?php $rss2_url = get_bloginfo_rss('rss2_url'); ?>
  <?php $rss2_url = get_bloginfo_rss('rss2_url'); ?>
<?php $rss2_url = 得到_bloginfo_rss('rss2_url'); ?>
== Parameters ==


== 参数 ==
== 参数 ==


; show : (''string'') Informational detail about your blog. Valid values:
; show : (''string'') 关于你的博客的详细信息。有效的参数:


; 显示 : (''string'')关于你的博客的详细信息。有效的参数:
:* <tt>'name'</tt> - 网络日志标题;设置在总选项。(默认)


:* <tt>'name'</tt> - Weblog title; set in General Options. (Default)
:* <tt>'description'</tt> -你的博客的Tagline;设置在总选项。


:* <tt>'名称'</tt> -网络日志标题;设置在总选项。(默认)
:* <tt>'url'</tt> - 你的博客的网站地址的[[WordPress:Glossary#URI and URL|URL]]。
 
:* <tt>'description'</tt> - Tagline for your blog; set in General Options.
 
:* <tt>'描述'</tt> -你的博客的Tagline;设置在总选项。
 
:* <tt>'url'</tt> - [[WordPress:Glossary#URI and URL|URL]] for your blog's web site address.
 
:* <tt>'url'</tt> -你的博客的网站地址的[[WordPress:Glossary#URI and URL|URL]]。
 
:* <tt>'rdf_url'</tt> - URL for [[WordPress:Glossary#RDF|RDF]]/RSS 1.0 feed.


:* <tt>'rdf_url'</tt> -[[WordPress:Glossary#RDF|RDF]]/RSS 1.0 feed的URL。
:* <tt>'rdf_url'</tt> -[[WordPress:Glossary#RDF|RDF]]/RSS 1.0 feed的URL。
:* <tt>'rss_url'</tt> - URL for [[WordPress:Glossary#RSS|RSS]] 0.92 feed.


:* <tt>'rss_url'</tt> -[[WordPress:Glossary#RSS|RSS]] 0.92 feed的URL。
:* <tt>'rss_url'</tt> -[[WordPress:Glossary#RSS|RSS]] 0.92 feed的URL。
:* <tt>'rss2_url'</tt> - URL for RSS 2.0 feed.


:* <tt>'rss2_url'</tt> - RSS 2.0 feed的URL。
:* <tt>'rss2_url'</tt> - RSS 2.0 feed的URL。
:* <tt>'atom_url'</tt> - URL for [[WordPress:Glossary#Atom|Atom]] feed.


:* <tt>'atom_url'</tt> -[[WordPress:Glossary#Atom|Atom]] feed的URL。
:* <tt>'atom_url'</tt> -[[WordPress:Glossary#Atom|Atom]] feed的URL。


:* <tt>'comments_rss2_url'</tt> - URL for comments RSS 2.0 feed.
:* <tt>'comments_rss2_url'</tt> - 评论RSS2.0feed的URL。
 
:* <tt>'评论_rss2_url'</tt> -评论RSS2.0feed的URL。
 
:* <tt>'pingback_url'</tt> - URL for [[WordPress:Glossary#PingBack|Pingback]] (XML-RPC file).


:* <tt>'pingback_url'</tt> -[[WordPress:Glossary#PingBack|Pingback]] (XML-RPC文件)的URL。
:* <tt>'pingback_url'</tt> -[[WordPress:Glossary#PingBack|Pingback]] (XML-RPC文件)的URL。


:* <tt>'admin_email'</tt> - Administrator's email address; set in General Options.
:* <tt>'admin_email'</tt> -管理员的电子邮件地址;设置在总选项中。
 
:* <tt>'管理_电子邮件'</tt> -管理员的电子邮件地址;设置在总选项中。
 
:* <tt>'charset'</tt> - Character encoding for your blog; set in Reading Options.


:* <tt>'charset'</tt> -你的博客的字符编码;设置在阅读选项中。
:* <tt>'charset'</tt> -你的博客的字符编码;设置在阅读选项中。
:* <tt>'version'</tt> - Version of WordPress your blog uses.


:* <tt>'版本'</tt>你的博客使用的WordPress版本。
:* <tt>'版本'</tt>你的博客使用的WordPress版本。
: '''The following work in WordPress version 1.5 or after:'''


: '''以下的内容在WordPress1.5版本或者更高的版本中运行:'''
: '''以下的内容在WordPress1.5版本或者更高的版本中运行:'''
:* <tt>'html_type'</tt> - "Content-type" for your blog.


:* <tt>'html_type'</tt> -你的博客的"内容类型"。
:* <tt>'html_type'</tt> -你的博客的"内容类型"。
:* <tt>'wpurl'</tt> - URL for WordPress installation.


:* <tt>'wpurl'</tt> -WordPress安装的URL。
:* <tt>'wpurl'</tt> -WordPress安装的URL。


:* <tt>'template_url'</tt> - URL for template in use.
:* <tt>'template_url'</tt> - 使用的模板的URL。
 
:* <tt>'模板_url'</tt> -使用的模板的URL。
:* <tt>'template_directory'</tt> - URL for template's directory.
:* <tt>'template_directory'</tt> - 模板目录的URL。
 
:* <tt>'模板_目录'</tt> -目录目录的URL。
 
:* <tt>'stylesheet_url'</tt> - URL for primary [[WordPress:Glossary#CSS|CSS]] file.
 
:* <tt>'样式表_url'</tt> -主要的[[WordPress:Glossary#CSS|CSS]]文件的URL。
 
:* <tt>'stylesheet_directory'</tt> - URL for stylesheet directory.
 
:* <tt>'样式表_目录'</tt> -样式表目录的URL。
 
== Related ==


{{Tag General Tags}}
:* <tt>'stylesheet_url'</tt> - 主要的[[WordPress:Glossary#CSS|CSS]]文件的URL。


{{Tag Footer}}
:* <tt>'stylesheet_directory'</tt> - 样式表目录的URL。


== 相关的 ==
== 相关的 ==

2008年7月13日 (日) 11:51的最新版本

描述[ ]

返回关于你的博客的信息,这个信息可以用在PHP代码的其它位置。这个函数与 get_bloginfo()函数相同,只是这个函数会从输出中取消任何标记,WordPress的syndication feeds中不能够使用这些标记。

要显示这个信息,请使用bloginfo_rss()

用法[ ]

%%% <?php get_bloginfo_rss('show'); ?> %%%

例子[ ]

RSS2 URL[ ]

将你的博客的RSS2 feed的URL指派到变数$rss2_url。

<?php $rss2_url = get_bloginfo_rss('rss2_url'); ?>

参数[ ]

show
(string) 关于你的博客的详细信息。有效的参数:
  • 'name' - 网络日志标题;设置在总选项。(默认)
  • 'description' -你的博客的Tagline;设置在总选项。
  • 'url' - 你的博客的网站地址的URL
  • 'rdf_url' -RDF/RSS 1.0 feed的URL。
  • 'rss_url' -RSS 0.92 feed的URL。
  • 'rss2_url' - RSS 2.0 feed的URL。
  • 'atom_url' -Atom feed的URL。
  • 'comments_rss2_url' - 评论RSS2.0feed的URL。
  • 'pingback_url' -Pingback (XML-RPC文件)的URL。
  • 'admin_email' -管理员的电子邮件地址;设置在总选项中。
  • 'charset' -你的博客的字符编码;设置在阅读选项中。
  • '版本'你的博客使用的WordPress版本。
以下的内容在WordPress1.5版本或者更高的版本中运行:
  • 'html_type' -你的博客的"内容类型"。
  • 'wpurl' -WordPress安装的URL。
  • 'template_url' - 使用的模板的URL。
  • 'template_directory' - 模板目录的URL。
  • 'stylesheet_url' - 主要的CSS文件的URL。
  • 'stylesheet_directory' - 样式表目录的URL。

相关的[ ]

模板:标签 总 标签