'day', 'w' => 'week', 'm' => 'month' ); }else{ return array( 'd' => 'days', 'w' => 'weeks', 'm' => 'months' ); } } /* Check if exists in multidimensional array */ function in_athena_array(array $array, $check){ foreach($array as $key => $value){ if(is_array($value) && in_array($check, $value)){ return $key; } } return false; } function athena_date_timezone( $date, $settings ){ $date_format = new DateTime(); $date_format->setTimestamp( $date ); $timezone = get_option('timezone_string'); $timezone = !empty($timezone) ? $timezone : get_option('gmt_offset'); date_timezone_set($date_format, timezone_open($timezone)); return date_format($date_format, $settings['date_time_format']); }