wpseek.com
WordPress开发者和主题制作者的搜索引擎



is_new_day › WordPress Function

Since0.71
已弃用n/a
is_new_day ( 没有参数 )
返回:
  • (int) 1 when new day, 0 if not a 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.

For more information on this and similar theme functions, check out the {@link Conditional Tags} article in the Theme Developer Handbook.


源码

function is_new_day() {
	global $currentday, $previousday;

	if ( $currentday !== $previousday ) {
		return 1;
	} else {
		return 0;
	}
}