-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfooter.php
121 lines (89 loc) · 5.05 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
<?php
/**
* The template for displaying the footer.
*
* Contains the closing of the #content div and all content after
*
* @package understrap-builder
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
// Load Customizer variables
$understrap_builder_container_type = get_option( 'understrap_builder_container_type', 'container');
$understrap_builder_container_footer_type = get_option( 'understrap_builder_container_footer_type', 'default');
$understrap_builder_footer_text_left = get_option( 'understrap_builder_footer_text_left', '<img class="alignnone wp-image-16" src="https://understrap.com/builder-logo-mini-64-64.png" alt="UnderStrap BUILDER Logo" width="24" height="24"> Powered By <a href="https://understrap.com/builder/">UnderStrap BUILDER</a>.' );
$understrap_builder_footer_text_right = get_option( 'understrap_builder_footer_text_right', '<p style="text-align: right;">Copyright [builder_current_year]</p>' );
$understrap_builder_footer_widgets_enable = get_option( 'understrap_builder_footer_widgets_enable', 0);
$understrap_builder_footer_bg_color = get_option( 'understrap_builder_footer_bg_color', '' );
$understrap_builder_footer_border = get_option( 'understrap_builder_footer_border', '' );
$understrap_builder_footer_border_color = get_option( 'understrap_builder_footer_border_color', 'primary' );
$understrap_builder_footer_text_color = get_option( 'understrap_builder_footer_text_color', '' );
$understrap_builder_footer_menu_align = get_option( 'understrap_builder_footer_menu_align', 'default' );
global $builder_default_spacings;
$understrap_builder_spacings_footer_menu = get_option( 'understrap_builder_spacings_footer_menu', $builder_default_spacings );
$understrap_builder_spacings_footer_text_bar = get_option( 'understrap_builder_spacings_footer_text_bar', $builder_default_spacings );
// Handle container type
if($understrap_builder_container_footer_type != 'default'){
$understrap_builder_container_type = $understrap_builder_container_footer_type;
}
// Footer classes logic
$us_b_footer_classes = '';
if($understrap_builder_footer_bg_color != ''){ $us_b_footer_classes .= ' bg-'.$understrap_builder_footer_bg_color; }
if($understrap_builder_footer_text_color != ''){ $us_b_footer_classes .= ' text-'.$understrap_builder_footer_text_color; }
if($understrap_builder_footer_border != ''){
$us_b_footer_classes .= ' us_b_t_'.$understrap_builder_footer_border.' border-'.$understrap_builder_footer_border_color;
}
// Footer menu align
$us_b_footer_menu_classes = '';
if($understrap_builder_footer_menu_align == 'right'){
$us_b_footer_menu_classes = ' justify-content-end';
} else if($understrap_builder_footer_menu_align == 'center'){
$us_b_footer_menu_classes = ' justify-content-center';
}
?>
<div class="wrapper" id="wrapper-footer">
<footer class="site-footer<?php echo esc_attr($us_b_footer_classes) ?>" id="us_b_footer">
<div class="<?php echo esc_attr($understrap_builder_container_type, 'understrap-builder'); ?>">
<?php if($understrap_builder_footer_widgets_enable == 1){ get_template_part( 'global-templates/footer-sidebar-check' ); } ?>
<?php if(has_nav_menu('us_b_footer_bar')){ ?>
<div class="row <?php echo esc_attr(understrap_builder_spacings_handler($understrap_builder_spacings_footer_menu)); ?>">
<div class="col">
<?php wp_nav_menu(
array(
'theme_location' => 'us_b_footer_bar',
'container_class' => '',
'container_id' => '',
'menu_class' => 'nav'.$us_b_footer_menu_classes,
'fallback_cb' => '',
'menu_id' => 'footer-menu',
'depth' => 1,
'walker' => new Understrap_WP_Bootstrap_Navwalker(),
)
); ?>
</div>
</div>
<?php } ?>
<?php if($understrap_builder_footer_text_left != '' || $understrap_builder_footer_text_right != ''){ ?>
<div class="site-info <?php echo esc_attr(understrap_builder_spacings_handler($understrap_builder_spacings_footer_text_bar)); ?>" id="us_b_footer_text_bar">
<div class="row">
<?php if($understrap_builder_footer_text_left != ''){ ?>
<div class="col-md-6" id="us_b_footer_text_bar_left">
<?php echo wpautop(do_shortcode(understrap_builder_convert_text_date($understrap_builder_footer_text_left), 'understrap-builder')); ?>
</div>
<?php } ?>
<?php if($understrap_builder_footer_text_right != ''){ ?>
<div class="col-md-6" id="us_b_footer_text_bar_right">
<?php echo wpautop(do_shortcode(understrap_builder_convert_text_date($understrap_builder_footer_text_right), 'understrap-builder')); ?>
</div>
<?php } ?>
</div>
</div><!-- .site-info -->
<?php } ?>
</div><!-- container end -->
</footer><!-- #colophon -->
</div><!-- wrapper end -->
</div><!-- #page we need this extra closing tag here -->
<?php wp_footer(); ?>
</body>
<?php understrap_builder_after_footer(); ?>
</html>