wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



is_new_day › WordPress Function

Depuis0.71
Dépréciéen/a
is_new_day ( Pas de paramètres )
Retourne:
  • (int) 1 when new day, 0 if not a new day.
Défini(e) dans:
Codex:

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.


Source

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

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