-
Notifications
You must be signed in to change notification settings - Fork 1
/
header-app-view.php
134 lines (115 loc) · 5.33 KB
/
header-app-view.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE html>
<!--[if IE 7 ]> <html class="ie7"> <![endif]-->
<!--[if IE 8 ]> <html class="ie8"> <![endif]-->
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<!-- Mobile Meta -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <!-- Favicon -->
<?php listingpro_favicon();
global $listingpro_options;
$listing_detail_slider_style = $listingpro_options['lp_detail_slider_styles'];
$lp_default_map_location_lat = 0;
$lp_default_map_location_long = -0;
if( (isset($listingpro_options['lp_default_map_location_lat'])) && (isset($listingpro_options['lp_default_map_location_long'])) ){
if( (!empty($listingpro_options['lp_default_map_location_lat'])) && (!empty($listingpro_options['lp_default_map_location_long'])) ){
$lp_default_map_location_lat = $listingpro_options['lp_default_map_location_lat'];
$lp_default_map_location_long = $listingpro_options['lp_default_map_location_long'];
}
}
$lpsearchMode = "titlematch";
if( isset($listingpro_options['lp_what_field_algo']) ){
if( !empty($listingpro_options['lp_what_field_algo']) && $listingpro_options['lp_what_field_algo']=="keyword" ){
$lpsearchMode = "keyword";
}
}
?>
<?php wp_head(); ?>
</head>
<body <?php body_class() ?> data-submitlink="<?php echo listingpro_url('submit-listing'); ?>" data-sliderstyle="<?php echo esc_attr($listing_detail_slider_style); ?>" data-defaultmaplat="<?php echo esc_attr($lp_default_map_location_lat); ?>" data-defaultmaplot="<?php echo esc_attr($lp_default_map_location_long); ?>" data-lpsearchmode = "<?php echo esc_attr($lpsearchMode); ?>">
<?php
$mapbox_token= '';
$map_style= '';
$mapOption = $listingpro_options['map_option'];
$search_view = $listingpro_options['search_views'];
$search_layout = $listingpro_options['search_layout'];
$alignment = $listingpro_options['search_alignment'];
$top_banner_styles = $listingpro_options['top_banner_styles'];
$alignClass = '';
if( $top_banner_styles == 'map_view' ) {
if ( $alignment == 'align_top' ) {
$alignClass = 'lp-align-top';
}elseif ( $alignment == 'align_middle' ) {
$alignClass = 'lp-align-underBanner';
}elseif ( $alignment == 'align_bottom' ) {
$alignClass = 'lp-align-bottom';
}
}
if($mapOption == 'mapbox'){
$mapbox_token = $listingpro_options['mapbox_token'];
$map_style = $listingpro_options['map_style'];
}
$primary_logo = $listingpro_options['primary_logo']['url'];
$listing_style = '';
$listing_styledata = '';
$listing_style = $listingpro_options['listing_style'];
if(isset($_GET['list-style']) && !empty($_GET['list-style'])){
$listing_styledata = 'data-list-style="'.esc_attr($_GET['list-style']).'"';
$listing_style = esc_html($_GET['list-style']);
}
$lpCurrLocOnHome = '';
if(isset($listingpro_options['lp_auto_current_locations_switch'])){
$lpCurrLocOnHome = $listingpro_options['lp_auto_current_locations_switch'];
}
$header_views = $listingpro_options['header_views'];
$topBannerView = $listingpro_options['top_banner_styles'];
$ipAPI = $listingpro_options['lp_current_ip_type'];
$videoBanner = '';
$imgClass = '';
if( $topBannerView == 'map_view' ) {
$imgClass = '';
}elseif ( $topBannerView=="banner_view") {
$videoBanner = $listingpro_options['lp_video_banner_on'];
if($videoBanner=="video_banner"){
$imgClass = 'lp-vedio-bg';
}
else{
$imgClass = 'lp-header-bg';
}
}
$app_view_home = $listingpro_options['app_view_home'];
$app_view_home = url_to_postid( $app_view_home );
?>
<div id="page" class="clearfix" <?php echo esc_attr($listing_styledata); ?> data-mtoken="<?php echo esc_attr($mapbox_token); ?>" data-mstyle="<?php echo esc_attr($map_style); ?>" data-sitelogo="<?php echo esc_attr($primary_logo); ?>" data-site-url="<?php echo esc_url(home_url('/')); ?>" data-ipapi="<?php echo $ipAPI ?>" data-lpcurrentloconhome = "<?php echo esc_attr($lpCurrLocOnHome) ?>">
<!--==================================Header Open=================================-->
<div class="pos-relative">
<div class="header-container <?php if(is_front_page() || ( !empty( $app_view_home ) && is_page( $app_view_home ) )){ echo esc_attr($imgClass); } ?> ">
<?php
get_template_part( 'mobile/templates/headers/header-app-view-template');
get_template_part( 'mobile/templates/popups');
get_template_part( 'templates/popups');
get_template_part( 'mobile/templates/banner');
?>
</div>
<!--==================================Header Close=================================-->
<!--================================== Search Close =================================-->
<?php
if( is_front_page() && !is_home() || ( !empty( $app_view_home ) && is_page($app_view_home) ) ){
$topBannerView = $listingpro_options['top_banner_styles'];
if( $topBannerView == 'map_view' ) {
get_template_part( 'templates/search/template_search1' );
}
}
?>
<div class="lp-top-notification-bar"></div>
<!--================================== Search Close =================================-->
</div>
<?php
if ( is_front_page() ) { ?>
<div class="home-categories-area <?php echo esc_attr($alignClass); ?>">
<?php echo listingpro_banner_categories(); ?>
</div>
<?php
}
?>