WordPress: Template Tags/get calendar:修订间差异
来自站长百科
(新页面: == Description == Displays the calendar (defaults to current month/year). Days with posts are styled as such. This tag can be used anywhere within a template. == Usage == %%% <?php ge...) |
无编辑摘要 |
||
第1行: | 第1行: | ||
== Description == | == Description == | ||
== 描述 == | |||
Displays the calendar (defaults to current month/year). Days with posts are styled as such. This tag can be used anywhere within a template. | Displays the calendar (defaults to current month/year). Days with posts are styled as such. This tag can be used anywhere within a template. | ||
显示日历(默认为当期年份/月份)。文章发表的日期是以这种格式显示的。标签可以使用在模板内部的任何位置中。 | |||
== Usage == | == Usage == | ||
%%% <?php get_calendar(); ?> %%% | %%% <?php get_calendar(); ?> %%% | ||
== 用法 == | |||
%%% <?php 得到_日历(); ?> %%% | |||
== Examples == | == Examples == | ||
=== Default Usage === | === Default Usage === | ||
== 例子== | |||
=== 默认用法 === | |||
Displays calendar highlighting any dates with posts. | Displays calendar highlighting any dates with posts. | ||
显示日历,突出任何文章的日期。 | |||
%%% <?php get_calendar(); ?> %%% | %%% <?php get_calendar(); ?> %%% | ||
%%% <?php得到_日历(); ?> %%% | |||
=== Displays Weekday Abbrevations === | === Displays Weekday Abbrevations === | ||
=== 显示星期缩略词=== | |||
Display days using one-letter initial only; in 1.5, displays initial based on your WordPress [[WordPress:Localization]]. | Display days using one-letter initial only; in 1.5, displays initial based on your WordPress [[WordPress:Localization]]. | ||
使用星期的首字母,显示星期名;在1.5版本中,根据WordPress [[WordPress:Localization|本地化]]显示首字母。 | |||
<?php get_calendar(true); ?> | <?php get_calendar(true); ?> | ||
<?php 得到_日历 (正确的); ?> | |||
== Parameters == | == Parameters == | ||
==参数 == | |||
; initial : (''boolean'') If true, the day will be displayed using a one-letter initial; if false, an abbreviation based on your localization will be used. For example: | ; initial : (''boolean'') If true, the day will be displayed using a one-letter initial; if false, an abbreviation based on your localization will be used. For example: | ||
;首字母: (''boolean'')如果是正确的,星期会以一个首字母显示;如果是错误的,会使用以你的本地化翻译为基础的缩略词。例如: | |||
:* <tt>false</tt> causes "Sunday" to be displayed as "Sun" | :* <tt>false</tt> causes "Sunday" to be displayed as "Sun" | ||
:* <tt>true</tt> (default) causes it to be "S" | :* <tt>true</tt> (default) causes it to be "S" | ||
:* <tt>错误的</tt> 导致 "星期天" 显示为 "Sun" | |||
:* <tt>正确的</tt> (默认) 星期天显示为 "S" | |||
== Related == | == Related == | ||
第33行: | 第62行: | ||
{{Tag Footer}} | {{Tag Footer}} | ||
== 相关的 == | |||
{{标签 总标签}} | |||
{{标签 页底文字}} |
2008年7月2日 (三) 15:16的版本
Description
描述
Displays the calendar (defaults to current month/year). Days with posts are styled as such. This tag can be used anywhere within a template.
显示日历(默认为当期年份/月份)。文章发表的日期是以这种格式显示的。标签可以使用在模板内部的任何位置中。
Usage
%%% <?php get_calendar(); ?> %%%
用法
%%% <?php 得到_日历(); ?> %%%
Examples
Default Usage
例子
默认用法
Displays calendar highlighting any dates with posts.
显示日历,突出任何文章的日期。
%%% <?php get_calendar(); ?> %%%
%%% <?php得到_日历(); ?> %%%
Displays Weekday Abbrevations
显示星期缩略词
Display days using one-letter initial only; in 1.5, displays initial based on your WordPress WordPress:Localization.
使用星期的首字母,显示星期名;在1.5版本中,根据WordPress 本地化显示首字母。
<?php get_calendar(true); ?>
<?php 得到_日历 (正确的); ?>
Parameters
参数
- initial
- (boolean) If true, the day will be displayed using a one-letter initial; if false, an abbreviation based on your localization will be used. For example:
;首字母: (boolean)如果是正确的,星期会以一个首字母显示;如果是错误的,会使用以你的本地化翻译为基础的缩略词。例如:
- false causes "Sunday" to be displayed as "Sun"
- true (default) causes it to be "S"
- 错误的 导致 "星期天" 显示为 "Sun"
- 正确的 (默认) 星期天显示为 "S"