ID); $orig_clock_in = null; $clock_in = null; if (isset($custom["employee_clock_in_time"][0]) && $this->isValidDate($custom["employee_clock_in_time"][0])){ $orig_clock_in = date($this->prettyDateTime, strtotime(sanitize_text_field($custom["employee_clock_in_time"][0]))); $clock_in = date($this->getDateTimeFormat(), strtotime(sanitize_text_field($custom["employee_clock_in_time"][0]))); } $orig_clock_out = null; $clock_out = null; if (isset($custom["employee_clock_out_time"][0]) && $this->isValidDate($custom["employee_clock_out_time"][0])){ $orig_clock_out = date($this->prettyDateTime, strtotime(sanitize_text_field($custom["employee_clock_out_time"][0]))); $clock_out = date($this->getDateTimeFormat(), strtotime(sanitize_text_field($custom["employee_clock_out_time"][0]))); } $location = null; if (isset($custom["location"][0])){ $location = sanitize_text_field($custom["location"][0]); } $ip_address_in = null; if (isset($custom["ip_address_in"][0])){ $ip_address_in = sanitize_text_field($custom["ip_address_in"][0]); } $ip_address_out = null; if (isset($custom["ip_address_out"][0])){ $ip_address_out = sanitize_text_field($custom["ip_address_out"][0]); } $employee_id = get_post_field( 'post_author', $post->ID ); $recent_author = get_user_by( 'ID', $employee_id ); $employee_name = sanitize_text_field($recent_author->last_name) . ", " . sanitize_text_field($recent_author->first_name); $selected_employee = ""; ?>
: getEmployeeName($employee_id)); } ?>
: :
:
:
:
: isValidDate($orig_clock_in) && $this->isValidDate($orig_clock_out)) { echo $this->secondsToTime($this->dateDifference($orig_clock_in, $orig_clock_out)); } else{ echo $this->secondsToTime(0); } ?>