Esempio n. 1
0
            ?>
                                </td>
                            <?php 
        }
        ?>

                            <td class="post-title page-title column-title">
                                <?php 
        $check_in = date(TravelHelper::getDateFormat(), strtotime(get_post_meta($post_id, 'check_in', true)));
        $check_out = date(TravelHelper::getDateFormat(), strtotime(get_post_meta($post_id, 'check_out', true)));
        echo balanceTags($check_in . "<br/>");
        $duration = "";
        if ($type_tour == 'daily_tour') {
            $duration_unit = get_post_meta($item_id, 'duration_unit', true);
            $duration = get_post_meta($post_id, 'duration', true);
            echo __("Duration", ST_TEXTDOMAIN) . ': ' . $duration . ' ' . TravelHelper::get_duration_text($duration_unit, $duration);
        } else {
            $diff = TravelHelper::dateDiff(get_post_meta($post_id, 'check_in', true), get_post_meta($post_id, 'check_out', true));
            if (!empty($diff) and $diff) {
                if ($diff > 1) {
                    $duration .= esc_attr($diff) . " " . __("days", ST_TEXTDOMAIN);
                } else {
                    $duration .= esc_attr($diff) . " " . __("day", ST_TEXTDOMAIN);
                }
            }
            echo __("Duration", ST_TEXTDOMAIN) . ": " . $duration;
        }
        ?>
                            </td>
                            <td class="post-title page-title column-title">
                               <?php