WordPress函数文档get_calendar()

获取一个日历表 描述 Displays the calendar (defaults to current m…

获取一个日历表

描述

Displays the calendar (defaults to current month/year). Days with posts are styled as such. This tag can be used anywhere within a template.

用法

 <?php get_calendar$initial$echo ); ?> 

参数

$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.

默认值: True

  • False – causes “Sunday” to be displayed as “Sun”
  • True – causes it to be “S”

$echo

(boolean) (可选) Determines whether or not the calendar should be displayed.

默认值: True

  • False – Returns calendar, but does not echo it to screen
  • True – Echos calendar, but does not return it to a variable

示例

Default Usage

Displays calendar highlighting any dates with posts.

Displays Weekday Abbrevations

Display days using one-letter initial only; in 1.5, displays initial based on your WordPress Localization.

历史

添加于 版本: 1.0.0

相关

get_calendar(),
get_day_link(),
get_month_link(),
get_the_date(),
get_the_time(),
get_year_link(),
single_month_title(),
the_date(),
the_date_xml(),
the_modified_date(),
get_the_modified_date(),
the_modified_time(),
get_the_modified_time(),
the_time()

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

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

评论 (0)COMMENT