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.

You appear to be a bot. Output may be restricted

Description

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 https://developer.wordpress.org/themes/basics/conditional-tags/ Conditional Tags} article in the Theme Developer Handbook.

Usage

$int = is_new_day();

Parameters

Returns

int

  1. when new day, 0 if not a new day.
  2. Source

    File name: wordpress/wp-includes/functions.php
    Lines:

    1 to 9 of 9
    function is_new_day() {
      global $currentday, $previousday;
    
      if ( $currentday !== $previousday ) {
        return 1;
      } else {
        return 0;
      }
    }
     

     View on GitHub View on Trac