function __construct() { wp_register_script('bookyourtravel-search-widget', BYT_Theme_Utils::get_file_uri('/js/search_widget.js'), array('jquery', 'bookyourtravel-jquery-uniform', 'jquery-ui-spinner'), '1.0', true); wp_enqueue_script('bookyourtravel-search-widget'); wp_enqueue_script('custom-suggest', BYT_Theme_Utils::get_file_uri('/js/custom-suggest.js'), array('jquery'), '', true); /* Widget settings. */ $widget_ops = array('classname' => 'byt_search_widget', 'description' => __('BookYourTravel: Search', 'bookyourtravel')); /* Widget control settings. */ $control_ops = array('width' => 260, 'height' => 600, 'id_base' => 'byt_search_widget'); /* Create the widget. */ parent::__construct('byt_search_widget', __('BookYourTravel: Search', 'bookyourtravel'), $widget_ops, $control_ops); global $byt_theme_globals; $this->custom_search_results_page = $byt_theme_globals->get_custom_search_results_page_url(); $this->enable_reviews = $byt_theme_globals->enable_reviews(); $this->enable_tours = $byt_theme_globals->enable_tours(); $this->enable_car_rentals = $byt_theme_globals->enable_car_rentals(); $this->enable_accommodations = $byt_theme_globals->enable_accommodations(); $this->enable_cruises = $byt_theme_globals->enable_cruises(); }
<?php global $post, $post_class, $display_mode, $byt_theme_globals, $byt_posts_post_type; $post_id = $post->ID; $post_obj = new byt_post($post); $base_id = $post_obj->get_base_id(); $post_image = $post_obj->get_main_image(); if (empty($post_image)) { $post_image = BYT_Theme_Utils::get_file_uri('/images/uploads/img.jpg'); } if (empty($display_mode) || $display_mode == 'card') { ?> <!--post--> <article class=" <?php echo $post_class; ?> "> <div> <?php if (!empty($post_image)) { ?> <figure> <a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "><img src="<?php echo esc_url($post_image); ?>
$enable_reviews = $byt_theme_globals->enable_reviews(); $accommodation_location = $accommodation_obj->get_location(); ?> <aside id="secondary" class="right-sidebar widget-area" role="complementary"> <ul> <li> <article class="accommodation-details hotel-details clearfix"> <h1><?php echo $accommodation_obj->get_title(); ?> <span class="stars"> <?php for ($i = 0; $i < $accommodation_obj->get_custom_field('star_count'); $i++) { ?> <img src="<?php echo BYT_Theme_Utils::get_file_uri('/images/ico/star.png'); ?> " alt=""> <?php } ?> </span> </h1> <?php if ($accommodation_location != null) { ?> <span class="address"><?php echo $accommodation_obj->get_custom_field('address'); ?> , <?php echo isset($accommodation_location) ? $accommodation_location->get_title() : '';
public function get_theme_logo_src() { $logo_src = of_get_option('website_logo_upload', ''); if (empty($logo_src)) { if (empty($color_scheme_style_sheet)) { $logo_src = BYT_Theme_Utils::get_file_uri('/images/txt/logo.png'); } else { if ($color_scheme_style_sheet == 'theme-strawberry') { $logo_src = BYT_Theme_Utils::get_file_uri('/images/themes/strawberry/txt/logo.png'); } else { if ($color_scheme_style_sheet == 'theme-black') { $logo_src = BYT_Theme_Utils::get_file_uri('/images/themes/black/txt/logo.png'); } else { if ($color_scheme_style_sheet == 'theme-blue') { $logo_src = BYT_Theme_Utils::get_file_uri('/images/themes/blue/txt/logo.png'); } else { if ($color_scheme_style_sheet == 'theme-orange') { $logo_src = BYT_Theme_Utils::get_file_uri('/images/themes/orange/txt/logo.png'); } else { if ($color_scheme_style_sheet == 'theme-pink') { $logo_src = BYT_Theme_Utils::get_file_uri('/images/themes/pink/txt/logo.png'); } else { if ($color_scheme_style_sheet == 'theme-yellow') { $logo_src = BYT_Theme_Utils::get_file_uri('/images/themes/yellow/txt/logo.png'); } else { if ($color_scheme_style_sheet == 'theme-navy') { $logo_src = BYT_Theme_Utils::get_file_uri('/images/themes/navy/txt/logo.png'); } else { $logo_src = BYT_Theme_Utils::get_file_uri('/images/txt/logo.png'); } } } } } } } } } return $logo_src; }
/** * Enqueues scripts and styles for admin. * * @since Book Your Travel 1.0 */ function enqueue_admin_scripts_styles() { wp_enqueue_script('jquery'); wp_enqueue_script('jquery-effects-core'); wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-slider'); wp_enqueue_script('jquery-ui-datepicker'); wp_enqueue_script('jquery-ui-droppable'); wp_enqueue_script('jquery-ui-draggable'); wp_enqueue_script('jquery-ui-sortable'); wp_enqueue_script('jquery-ui-selectable'); wp_enqueue_script('jquery-ui-autocomplete'); wp_enqueue_script('jquery-ui-tabs'); wp_enqueue_script('jquery-ui-dialog'); wp_enqueue_script('jquery-ui-spinner'); wp_register_script('byt-admin', BYT_Theme_Utils::get_file_uri('/includes/admin/admin.js'), false, '1.0.0'); wp_enqueue_script('byt-admin'); wp_enqueue_style('byt-admin-ui-css', BYT_Theme_Utils::get_file_uri('/css/jquery-ui.min.css'), false); wp_enqueue_style('byt-admin-css', BYT_Theme_Utils::get_file_uri('/css/admin-custom.css'), false); }
echo __('+ less info', 'bookyourtravel'); ?> '; </script> <section id="availability" class="tab-content <?php echo $first_display_tab == 'availability' ? 'initial' : ''; ?> "> <article> <?php do_action('byt_show_single_accommodation_availability_before'); ?> <h1><?php _e('Availability', 'bookyourtravel'); ?> </h1> <?php BYT_Theme_Utils::render_field("text-wrap", "", "", $accommodation_obj->get_custom_field('availability_text'), '', false, true); $room_type_ids = $accommodation_obj->get_room_types(); if ($room_type_ids && count($room_type_ids) > 0) { ?> <ul class="room-types"> <?php // Loop through the items returned for ($z = 0; $z < count($room_type_ids); $z++) { $room_type_id = $room_type_ids[$z]; $room_type_obj = new byt_room_type(intval($room_type_id)); $room_type_min_price = $byt_accommodations_post_type->get_accommodation_min_price($accommodation_id, $room_type_id); ?> <!--room_type--> <li id="room_type_<?php
<?php global $post, $car_rental_class, $display_mode, $byt_theme_globals, $byt_car_rentals_post_type; $car_rental_id = $post->ID; $car_rental_obj = new byt_car_rental($post); $car_rental_image = $car_rental_obj->get_main_image(); if (empty($car_rental_image)) { $car_rental_image = BYT_Theme_Utils::get_file_uri('/images/uploads/img.jpg'); } $price_decimal_places = $byt_theme_globals->get_price_decimal_places(); $default_currency_symbol = $byt_theme_globals->get_default_currency_symbol(); $show_currency_symbol_after = $byt_theme_globals->show_currency_symbol_after(); $price_per_day = $car_rental_obj->get_custom_field('price_per_day'); if (empty($display_mode) || $display_mode == 'card') { ?> <!--car rental--> <article class="car_rental_item <?php echo $car_rental_class; ?> "> <div> <figure> <a href="<?php echo esc_url($car_rental_obj->get_permalink()); ?> " title="<?php echo esc_attr($car_rental_obj->get_title()); ?> "> <img src="<?php echo esc_url($car_rental_image);
$cart_page_url = $byt_theme_globals->get_cart_page_url(); if (!isset($current_user)) { $current_user = wp_get_current_user(); } ?> <meta charset="<?php echo esc_attr(get_bloginfo('charset')); ?> "> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <title><?php wp_title(); ?> </title> <link rel="shortcut icon" href="<?php echo esc_url(BYT_Theme_Utils::get_file_uri('/images/favicon.ico')); ?> " /> <link rel="pingback" href="<?php echo esc_url(get_bloginfo('pingback_url')); ?> " /> <script type="text/javascript"> window.datepickerDateFormat = "<?php echo BYT_Theme_Utils::dateformat_PHP_to_jQueryUI(get_option('date_format')); ?> "; window.datepickerAltFormat = "<?php echo BOOKYOURTRAVEL_ALT_DATE_FORMAT; ?> ";
public static function contact_form_js() { global $business_address_longitude, $business_address_latitude; wp_register_script('google-maps', '//maps.google.com/maps/api/js?sensor=false', 'jquery', '1.0', true); wp_enqueue_script('google-maps'); wp_register_script('infobox', BYT_Theme_Utils::get_file_uri('/js/infobox.js'), 'jquery', '1.0', true); wp_enqueue_script('infobox'); wp_register_script('contact', BYT_Theme_Utils::get_file_uri('/js/contact.js'), 'jquery', '1.0', true); wp_enqueue_script('contact'); /* Contact form related stuff */ $business_address_latitude = of_get_option('business_address_latitude', ''); $business_address_longitude = of_get_option('business_address_longitude', ''); $contact_company_name = trim(of_get_option('contact_company_name', '')); $contact_phone_number = trim(of_get_option('contact_phone_number', '')); $contact_address_street = trim(of_get_option('contact_address_street', '')); $contact_address_city = trim(of_get_option('contact_address_city', '')); $contact_address_country = trim(of_get_option('contact_address_country', '')); $company_address = '<strong>' . $contact_company_name . '</strong>'; $company_address .= (!empty($contact_address_street) ? $contact_address_street : '') . ', '; $company_address .= (!empty($contact_address_city) ? $contact_address_city : '') . ', '; $company_address .= !empty($contact_address_country) ? $contact_address_country : ''; $company_address = rtrim(trim($company_address), ','); if (!empty($business_address_longitude) && !empty($business_address_latitude)) { ?> <script> window.business_address_latitude = '<?php echo addslashes($business_address_latitude); ?> '; window.business_address_longitude = '<?php echo addslashes($business_address_longitude); ?> '; window.company_address = '<?php echo addslashes($company_address); ?> '; </script> <?php } }
?> "> <h3><?php echo $accommodation_obj->get_title(); ?> <?php if ($accommodation_obj->get_status() == 'private') { echo '<span class="private">' . __('Pending', 'bookyourtravel') . '</span>'; } ?> <span class="stars"> <?php for ($i = 0; $i < $accommodation_obj->get_custom_field('star_count'); $i++) { ?> <img src="<?php echo esc_url(BYT_Theme_Utils::get_file_uri('/images/ico/star.png')); ?> " alt="" /> <?php } ?> </span> </h3> <?php if ($accommodation_min_price > 0) { ?> <p> <?php $price_string = ''; if (!$show_currency_symbol_after) { $price_string = '<span class="curr">' . $default_currency_symbol . '</span>';