is_new_day()
is_new_day() 确定循环中当前文章的发布日期是否与循环中上一篇文章的发布日期不同。Determine…
is_new_day()
确定循环中当前文章的发布日期是否与循环中上一篇文章的发布日期不同。
Determines whether the publish date of the current post in the loop is different from the publish date of the previous post in the loop.
确定循环中当前文章的发布日期是否与循环中上一篇文章的发布日期不同。
Determines whether the publish date of the current post in the loop is different from the publish date of the previous post in the loop.
目录锚点:#说明#返回#源码
说明(Description)
有关此主题函数和类似主题函数的更多信息,请参阅主题开发人员手册中的条件标记文章。
返回(Return)
(int)新的一天时为1,如果不是新的一天,则为0。
源码(Source)
/** * Whether the publish date of the current post in the loop is different from the * publish date of the previous post in the loop. * * @since 0.71 * * @global string $currentday The day of the current post in the loop. * @global string $previousday The day of the previous post in the loop. * * @return int 1 when new day, 0 if not a new day. */ function is_new_day() { global $currentday, $previousday; if ( $currentday != $previousday ) return 1; else return 0; }
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
0.71 | wp-includes/functions.php:962 | 1 function | 0 |
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。
还没有任何评论,赶紧来占个楼吧!