1. 首页
  2. WordPress 函数手册

get_calendar()

get_calendar( bool $initial = true, bool $echo = true )

显示日历,其中包含将文章作为链接的天数。
Display calendar with days that have posts as links.

目录锚点:#说明#参数#返回#源码


说明(Description)

日历已缓存,如果存在,将检索该日历。如果当月没有帖子,则不会显示。


参数(Parameters)

参数 类型 必填 说明
$initial (bool) 可选 使用初始日历名称。
$echo (bool) 可选 设置为false返回。

返回(Return)

(void|string)void如果$echo参数为true,日历HTML如果$echo为false。


源码(Source)


更新版本 源码位置 使用 被使用
1.0.0 wp-includes/general-template.php:2063 1 function 21

get_calendar() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_calendar/