'', 'id' => '')); $url = ''; if ($media['id'] != '') { if ( strpos( get_post_mime_type( $media['id'] ), 'image' ) !== false ) { $image = wp_get_attachment_image_src( $media['id'], $size ); if ( $image ){ $url = $image[0]; } } else { $url = wp_get_attachment_url( $media['id'] ); } } if ($url == '' && $media['url'] != '') { $id = attachment_url_to_postid( $media['url'] ); if ( $id ) { if ( strpos( get_post_mime_type( $id ), 'image' ) !== false ) { $image = wp_get_attachment_image_src( $id, $size ); if ( $image ){ $url = $image[0]; } } else { $url = wp_get_attachment_url( $id ); } } else { $url = $media['url']; } } return $url; } } /** * Getting theme layout. * * Book Land used book_land_get_layout() function get theme layout. * * @since 1.1 * * @param string $default theme layout * @return string */ if ( ! function_exists( 'book_land_get_layout' ) ) { function book_land_get_layout( $default = 'right' ) { $option = wp_parse_args( get_option( 'book_land_option', array() ), book_land_data() ); $layout = $option['primary_sidebar']; if ( class_exists('woocommerce') ) { if ( is_woocommerce() || is_cart() || is_checkout() || is_account_page() || is_wc_endpoint_url() ) { $is_active_sidebar = is_active_sidebar( 'sidebar-woocommerce' ); if ( ! $is_active_sidebar ) { $layout = 'none'; } } } return apply_filters( 'book_land_get_layout', $layout, $default ); } } /** * Displaying site custom logo. * * Book Land used book_land_logo() function to display * site custom logo. * * @since 1.1 * */ If( !function_exists('book_land_logo') ){ function book_land_logo(){ if( has_custom_logo() ){ the_custom_logo(); }else{ ?>

'; book_land_set_color($color); echo ''; } /** * Primary Color. * * Book Land assing primary color in theme css. * * @since 1.1 * */ function book_land_set_color( $color = '#f4364f' ){ $option = wp_parse_args( get_option( 'book_land_option', array() ), book_land_data() ); list($r, $g, $b) = sscanf($color, "#%02x%02x%02x"); ?> :root{ --sub-header-bg-color: ; --sub-header-bg-color: ; } a:hover, a:focus, .top-social-list > li > a:hover, .top-social-list > li > a:focus, .navbar-default .navbar-brand:focus, .navbar-default .navbar-brand:hover, .home-slider:hover .carousel-control, .section_header h2 span, .service_icon, .service_title h3:hover, .service_title h3:focus, .room_title h3:hover, .room_title h3:focus, .room-regular-price .room-price, .room-btn:hover, .room-btn:focus, .card_room:hover .room_occupacy, .card-blog .blogContent .blogTitle h3:hover, .testimonialContent .testi-title h3, .testimonialContent .testi-title h3:hover, .counter_item .fa, .contact-secondary-inner label, .error_title_404, .entry-meta .post_date:after, .entry-meta .post_author:after, .footer-menu ul li a:hover, .footer-menu ul > .active > a, .copyright-text a:hover, .copyright-text a:focus, .footer-copyright .card-payment:hover, .widget ul li.current-menu-item a, .widget ul li.current_page_item a, .widget ul li.current-cat a{ color: ; } input[type=button]:hover, input[type=button]:focus, input[type=submit]:hover, input[type=submit]:focus, input[type=reset]:hover, input[type=reset]:focus, .navbar-default .navbar-nav > li > a:focus, .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:focus, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .current-menu-parent > a, .navbar-default .navbar-nav > .current-menu-parent > a:focus, .navbar-default .navbar-nav > .current-menu-parent > a:hover, .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:focus, .navbar-default .navbar-nav > .open > a:hover, .dropdown-menu > li > a:focus, .dropdown-menu > li > a:hover, .dropdown-menu > .active > a, .dropdown-menu > .active > a:focus, .dropdown-menu > .active > a:hover, .dropdown-menu > .open > a, .dropdown-menu > .open > a:focus, .dropdown-menu >.open > a:hover, .navbar-default .navbar-nav > .current_page_item > a, .navbar-default .navbar-nav > .current_page_item > a:focus, .navbar-default .navbar-nav > .current_page_item > a:hover, .navbar-default .navbar-nav > .current_menu_item > a, .navbar-default .navbar-nav > .current_menu_item > a:focus, .navbar-default .navbar-nav > .current_menu_item > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus, .slider_overlay .slide-btn, .section_header p::before, .room-btn, .room_occupacy, .callout-btn, .contact_wrap, .gallery-btn, .error_button, .entry-meta .post_date, .entry-meta .post_author, .more-link, .toTop, .widget .tagcloud a:hover, .widget .tagcloud a:focus, .page-numbers.current, .footer-widgets .widget caption, .footer-widgets .widget .searchform #searchsubmit, .news_slider .carousel-control, #loader-wrapper .loader-section{ background-color: ; } .dropdown-menu > .active > a, .dropdown-menu > .active > a:focus, .dropdown-menu > .active > a:hover{ border-color: ; } .room_overlay, .card-blog .news_overlay{ background-color: dd; } .slider_overlay .slide-btn, .carousel-indicators li, .room-btn{ border: 2px solid ; } .callout_content{ border: 7px solid ; } .site-footer { border-top: 4px solid ; border-bottom: 4px solid ; } .widget-title::before { border-color: ; } blockquote { border-left: 5px solid ; } /*--- navigation padding ---*/ .nav > li > a{ padding-left: px; padding-right: px; } /*--- sub header padding ---*/ .sub-header .section_overlay{ padding-top: px; padding-bottom: px; } .sub-header .sub-header-title{ color: ; } body{ font-size: px !important; } .header-menu .navbar-nav > li > a, .dropdown-menu > li > a{ font-size: px !important; } h1{ font-size: px; } h2{ font-size: px; } h3{ font-size: px; } h4{ font-size: px; } h5{ font-size: px; } h6{ font-size: px; } $v) { $page_ids[] = wp_parse_args($v, array( 'icon_type' => 'icon', 'image' => '', 'icon' => 'gg', 'iconcolor' => '#F4364F', 'title' => '', 'desc' => '', 'link' => '#', 'enable_link' => 0 )); } } return $page_ids; } } /** * Room Contents. * * Book Land getting room section data. * * @since 1.1 * * @return array. */ if ( ! function_exists( 'book_land_get_section_room_data' ) ) { function book_land_get_section_room_data(){ $option = wp_parse_args( get_option( 'book_land_option', array() ), book_land_data() ); $rooms = $option['room_s_content']; if (is_string($rooms)) { $rooms = json_decode($rooms, true); } $page_ids = array(); if (!empty($rooms) && is_array($rooms)) { foreach ($rooms as $k => $v) { $page_ids[] = wp_parse_args($v, array( 'image' => '', 'title' => '', 'desc' => '', 'link' => '#', )); } } return $page_ids; } } /** * Book Land home page sections priority. * * Book Land sections priority filter functions. * * @since 1.1 * * @param integer $priority section priority number. * @param string $section section name. * @return array. */ if(!function_exists('book_land_section_priority_callback')): function book_land_section_priority_callback($priority,$section){ $sections = array( 'book_land_slider' => 1, 'book_land_service' => 2, 'book_land_room' => 3, 'book_land_blog' => 4, 'book_land_contact' => 5, ); return $sections[$section]; } endif; add_filter('book_land_section_priority','book_land_section_priority_callback',1,2);