Make WordPress Core


Ignore:
Timestamp:
09/25/2012 05:26:19 AM (13 years ago)
Author:
nacin
Message:

Introduce constants to allow for easier expression of time periods in seconds. Adds MINUTE_IN_SECONDS, HOUR_IN_SECONDS, DAY_IN_SECONDS, WEEK_IN_SECONDS, YEAR_IN_SECONDS. props nbachiyski, SergeyBiryukov. fixes #20987.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-comments-list-table.php

    r21985 r21996  
    336336
    337337        $ptime = date( 'G', strtotime( $comment->comment_date ) );
    338         if ( ( abs( time() - $ptime ) ) < 86400 )
     338        if ( ( abs( time() - $ptime ) ) < DAY_IN_SECONDS )
    339339            $ptime = sprintf( __( '%s ago' ), human_time_diff( $ptime ) );
    340340        else
Note: See TracChangeset for help on using the changeset viewer.