-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.php
152 lines (134 loc) · 5.63 KB
/
footer.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?php
/**
* The template for displaying the footer.
*
* -------------------------------------------------------------------
*
* DESCRIPTION:
*
* This file outputs the next theme parts:
* – Site-wide pre-footer 'Call to action' block
* – LiveComposer based footer
* – Off-canvas mobile menu ('mobile-offcanvas' widget area)
*
* @package SEOWP WordPress Theme
* @author Vlad Mitkovsky <info@lumbermandesigns.com>
* @copyright 2014 Lumberman Designs
* @license http://themeforest.net/licenses
* @link http://themeforest.net/user/lumbermandesigns
*
* -------------------------------------------------------------------
*
* Send your ideas on code improvement or new hook requests using
* contact form on http://themeforest.net/user/lumbermandesigns
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
// Output HTML comment with template file name if LBMN_THEME_DEBUG = 1
if ( LBMN_THEME_DEBUG ) echo '<!-- FILE: '.__FILE__.' -->';
echo '</div><!-- .site-main -->';
// <div class="site-main"> opened in the header.php
/**
* ----------------------------------------------------------------------
* Output 'Call to action' area before the footer output
*/
// disable 'Call to action' area for editing mode in Live Composer
if ( ! DS_LIVE_COMPOSER_ACTIVE ) {
// Get data from theme customizer
$calltoaction_switch = get_theme_mod( 'lbmn_calltoaction_switch', 1 );
$calltoaction_message = get_theme_mod( 'lbmn_calltoaction_message', LBMN_CALLTOACTION_MESSAGE_DEFAULT );
$calltoaction_url = get_theme_mod( 'lbmn_calltoaction_url', LBMN_CALLTOACTION_URL_DEFAULT );
global $wp_customize;
// If call to action panel is active or we are in theme customiser
if ( $calltoaction_switch || isset($wp_customize) ) {
?>
<section class='calltoaction-area' data-stateonload='<?php echo $calltoaction_switch; ?>'>
<span class='calltoaction-area__content'>
<?php
if(is_page_template('page-secondary-spanish.php') || is_page_template('page-spanish.php')){ echo "<span style='font-size:29px;'>Llame <span class='google_number' >1-877-709-8101</span> para una cotizacion gratuita o haga clic aqui para una cotizacion</span> <i class='fa-icon-angle-right calltoaction-area__cta-icon'></i>"; }else{echo $calltoaction_message." <i class='fa-icon-angle-right calltoaction-area__cta-icon'></i>";}
?>
</span>
<?php if ( 4 < strlen($calltoaction_url) ) { ?>
<!--<a href='<?php // echo esc_url( $calltoaction_url );?>#' class='calltoaction-area__cta-link click_togg-menu'></a>-->
<a class='calltoaction-area__cta-link click_togg-menu_footer'></a>
<?php } ?>
<?php if(is_page_template('page-spanish.php') || is_page_template('page-secondary-spanish.php')){}else{ ?>
<div class="menu-quoto show_togg-menu_footer menu-quoto_footer" style="display:none;">
<?php dynamic_sidebar( 'free-quoto' ); ?>
</div>
<?php } ?>
</section>
<?php
}
}
/**
* ----------------------------------------------------------------------
* Output LiveComposer-based footer ( WP Admin > Appearance > Footers )
* For WordPress it's a page of custom content type: Footer > lbmn_footer
*/
if ( defined( 'DS_LIVE_COMPOSER_URL' ) && LBMN_THEME_CONFUGRATED ){
// Show footer only if LC isn't active
if ( DS_LIVE_COMPOSER_ACTIVE ) {
echo '<footer class="site-footer">The footer is disabled when editing the page.</footer>';
} else {
// If not 404 or no search results page otherwise get_the_ID() throws a notice
if ( have_posts() ) {
$post_id = get_the_ID();
} else {
$post_id = '';
}
$footer_post_id = lbmn_get_footerid_by_pageid($post_id);
$composer_code = get_post_meta($footer_post_id, 'dslc_code', true );
$composer_content = '';
// If composer code not empty
if ( $composer_code ) {
// Generate the composer output
$composer_content = do_shortcode( $composer_code );
}
global $dslc_active;
if ( $composer_code ) {
// Show footer content only if LiveComposer edit mode isn't active
if ( ! DS_LIVE_COMPOSER_ACTIVE ) {
echo '<footer id="dslc-content" class="site-footer dslc-content dslc-clearfix"><div id="dslc-footer" class="dslc-content dslc-clearfix">' . do_action( 'dslc_footer_output_prepend') . $composer_content . do_action( 'dslc_footer_output_append') . '</div></footer>';
}
}
}
} else {
// The functions below called only if Live Composer isn't active
echo lbmn_footer();
}
/**
* ----------------------------------------------------------------------
* Off-canvas mobile menu panel ('mobile-offcanvas' widget area)
*/
// disable Off-canvas panel for editing mode in Live Composer
if ( ! DS_LIVE_COMPOSER_ACTIVE ):
?>
<a href="#" class="off-canvas__overlay exit-off-canvas"> </a>
<aside class="right-off-canvas-menu off-canvas-area">
<?php if ( is_active_sidebar( 'mobile-offcanvas' ) ): /* Mobile off-canvas */ ?>
<div class="close-offcanvas">
<a class="right-off-canvas-toggle" href="#"><i aria-hidden="true" class="lbmn-icon-cross"></i> <span>close</span></a>
</div>
<?php dynamic_sidebar( 'mobile-offcanvas' ); ?>
<?php endif; ?>
</aside>
<?php endif; // !$dslc_active ?>
<script >
jQuery(document).ready(function($){
$(".click_togg-menu_footer").click(function(){
$(".show_togg-menu_footer").slideToggle("slow");
});
$(".click_togg-menu_header").click(function(){
$(".show_togg-menu_header").slideToggle("slow");
});
});
</script>
</div><!-- .global-wrapper -->
</div><!-- .global-container -->
</div><!-- .off-canvas-wrap -->
<?php wp_footer(); ?>
<script>
window.onload=function() {_googWcmGet('google_number', '1-877-709-8101');};
</script>
</body>
</html>