Make WordPress Core


Ignore:
Timestamp:
09/25/2012 05:26:19 AM (12 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-posts-list-table.php

    r21974 r21996  
    581581                    $time_diff = time() - $time;
    582582
    583                     if ( $time_diff > 0 && $time_diff < 24*60*60 )
     583                    if ( $time_diff > 0 && $time_diff < DAY_IN_SECONDS )
    584584                        $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) );
    585585                    else
Note: See TracChangeset for help on using the changeset viewer.