get_calendar()获取一个日历表

目录

描述

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

get_calendar() 描述

用法

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

get_calendar() 用法

参数

$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

get_calendar() 参数

示例

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.

get_calendar() 示例

历史

添加于 版本: 1.0.0

get_calendar() 历史

相关