WordPress函数:is_time是干什么用的?

追格官方小助手/ 2022年02月18日/ WordPress/ 浏览 1237

关于WordPress主题开发中的条件判断函数,我们已经了解了不少了。

根据WordPress官方文档,有一个 is_time 函数:

Whether the query is for a specific time.

判断当前的查询是否是一个指定的时间

When an hourly, “minutely”, or “secondly” archive is being displayed.

判断当前页面是否是按小时、分钟、秒归档的页面

看上去非常类似之前介绍的 is_date

if ( is_time() ) {
    // 干点啥呢。
}

就是不知道什么样的链接才能路由到 is_time 对应的页面……

发表评论

暂无评论,抢个沙发...

客服 工单