Skip to content

Instantly share code, notes, and snippets.

/**
* Time ago - Human time diff enhanced
*
* @param string $timeformat Fallback date format
* @param int $timestamp Post or comment or anyhing's timestamp
* @return string
*/
if( ! function_exists('dw_time_ago') ){
function dw_time_ago( $timeformat = 'j F Y H:i', $timestamp = '' ){
if( ! $timestamp ){