'; $html .= '
'; // $galleryItems = Hotel_Content::galleryItems(); foreach ($galleryItems as $e) { $html .= ''; } $html .= '
'; $html .= ''; return $html; } function hotel_code_accomodation($attr, $content = null) { if (empty($attr['header'])) $attr['header'] = ''; // $html = ''; $html .= '
'; $html .= '
'; $html .= '
'; // if (!empty($attr['header'])) { $html .= '

' . $attr['header'] . '

'; } // $html .= '
'; // $limitItems = false; if (isset($attr['limit'])) $limitItems = $attr['limit']; $items = Hotel_Content::roomItems($limitItems); foreach ($items as $e) { $coverBG = ''; if (isset($e['photo']['url'])) { $coverBG = 'background-image: url(' . $e['photo']['url'] . ');'; } $html .= '
' . '
' . '' . $e['name'] . '' . '
' . '

' . $e['desc'] . '

' . '
'; if (!empty($e['features'])) { foreach ($e['features'] as $e2) { $title = str_replace('fa-', '', $e2); $html .= ''; } } $booking_page = get_permalink(Hotel_Content::getSetting('booking_page')); $roomLink = add_query_arg(array('step' => 1, 'room' => $e['id']), $booking_page); $roomLink = str_replace('&', '&', $roomLink); $html .= '
' . '
' . '' . '
'; } $html .= '
'; // $html .= '
'; if (isset($attr['more_link'])) { $html .= ''; } $html .= '
'; return $html; } // function hotel_code_map($attr, $content = null) { if (empty($attr['mapbox'])) $attr['mapbox'] = '//a.tiles.mapbox.com/v3/frytek91.hpej9nbh/attribution,zoompan.html'; // $html = ''; $html .= '
'; $html .= ''; $html .= '
'; return $html; } function hotel_code_reviews($attr, $content = null) { if (empty($attr['header'])) $attr['header'] = ''; // $html = ''; $html .= '
'; $html .= '
'; $html .= '
'; // if (!empty($attr['header'])) { $html .= '

' . $attr['header'] . '

'; } // $html .= '
'; $limitItems = false; if (isset($attr['limit'])) $limitItems = $attr['limit']; $items = Hotel_Content::reviewsItem($limitItems); foreach ($items as $e) { // $e['author'] | $e['rank'] if (empty($e['company'])) { $e['company'] = ''; } $html .= '
' . $e['name'] . '
' . $e['desc'] . '
' . $e['author'] . ',
' . $e['author_company'] . '
'; } $html .= '
'; // $html .= '
'; if (isset($attr['more_link'])) { $html .= ''; } $html .= '
'; return $html; } // function hotel_code_blog($attr, $content = null) { if (empty($attr['header'])) $attr['header'] = ''; if (empty($attr['header_sub'])) $attr['header_sub'] = ''; // $html = ''; if (!empty($attr['header'])) { $html .= '

' . $attr['header'] . '

'; } if (!empty($attr['header_sub'])) { $html .= '
' . $attr['header_sub'] . '
'; } // $htmlLeft = ''; $htmlRight = ''; // $posts = Hotel_Content::blogPosts(); $n = 1; foreach ($posts as $e) { setup_postdata($e); $thumb = get_the_post_thumbnail($e->ID); $thumb_html = ''; if (!empty($thumb)) { $thumb_html = '
' . $thumb . '
'; } $htmlSingle = '
' . '

' . $e->post_title . '

' . $thumb_html . '
' . get_the_excerpt() . '
' . '
'; if ($n % 2 == 0) { $htmlRight .= $htmlSingle; } else { $htmlLeft .= $htmlSingle; } $n++; if ($n > 8) break; } $html .= '
'; if (count($posts) == 0) { $html .= '
' . __('No posts available.', 'hotel-theme') . '
'; } $html .= '
' . $htmlLeft . '
'; $html .= '
' . $htmlRight . '
'; $html .= '
'; if (is_home()) { $html .= '
' . get_posts_nav_link(' · ', __('previous page', 'hotel-theme'), __('next page', 'hotel-theme')) . '
'; } // $html = '
' . $html . '
'; return $html; } // Contact function hotel_code_contact($attr, $content = null) { $html = ''; if (empty($attr['header'])) { $attr['header'] = ''; } if (empty($attr['header_sub'])) { $attr['header_sub'] = ''; } // $content = str_replace(array( '[contact_details]' ), array( '[contact_details header="' . $attr['header'] . '" header_sub="' . $attr['header_sub'] . '"]' ), $content); // $html = '
' . do_shortcode($content) . '
'; // return $html; } function hotel_code_contact_details($attr, $content = null) { $html = '
'; $html .= '
'; // if (isset($attr['header'])) { $html .= '

' . $attr['header'] . '

'; } if (isset($attr['header_sub'])) { $html .= '
' . $attr['header_sub'] . '
'; } $html .= '

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean quis leo auctor, hendrerit nisi id, hendrerit diam.

'; // $html .= '
'; $html .= do_shortcode($content); $html .= '
'; $html .= '
'; return $html; } function hotel_code_contact_details_item($attr, $content = null) { if (empty($attr['name'])) { $attr['name'] = ''; } if (empty($attr['value'])) { $attr['value'] = ''; } $html = '
' . $attr['name'] . ':' . $attr['value'] . '
'; return $html; } function hotel_code_contact_form($attr, $content = null) { $html = '
'; $html .= '
'; if (isset($attr['header'])) { $html .= '

' . $attr['header'] . '

'; } if (isset($attr['header_sub'])) { $html .= '
' . $attr['header_sub'] . '
'; } $html .= '
'; $html .= '
' . __('Please feel free to send us a short message.', 'hotel-theme') . '
'; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= '
'; // $html .= '
'; $html .= '
'; return $html; } function hotel_code_header_full($attr, $content = null) { if (empty($attr['header'])) $attr['header'] = ''; $html = ''; $html .= '
'; $html .= '
'; $html .= '

' . $attr['header'] . '

'; $html .= '
'; $html .= '
'; return $html; } // function hotel_code_gallery($attr, $content = null) { $html = ''; if (!empty($attr['header'])) { $html .= '
'; $html .= '

' . $attr['header'] . '

'; $html .= '
'; } $html .= ''; return $html; } add_shortcode('contact', 'hotel_code_contact'); add_shortcode('contact_details', 'hotel_code_contact_details'); add_shortcode('contact_details_item', 'hotel_code_contact_details_item'); add_shortcode('contact_form', 'hotel_code_contact_form'); // add_shortcode('gallery_slider', 'hotel_code_gallery_slider'); add_shortcode('accomodation', 'hotel_code_accomodation'); add_shortcode('map', 'hotel_code_map'); add_shortcode('reviews', 'hotel_code_reviews'); add_shortcode('blog', 'hotel_code_blog'); add_shortcode('header_full', 'hotel_code_header_full'); add_shortcode('gallery', 'hotel_code_gallery'); add_shortcode('booking', 'hotel_code_booking');