-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfooter.php
More file actions
151 lines (143 loc) · 4.89 KB
/
Copy pathfooter.php
File metadata and controls
151 lines (143 loc) · 4.89 KB
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
<?php
/**
* Display footer
*
* @package Saestate
*/
use SaestateVendor\EightshiftLibs\Helpers\Components;
use Saestate\CustomMeta\FooterAcfMeta;
$componentClass = 'footer';
$bgImageClass = "${componentClass}__background-image";
$contentWrapper = "${componentClass}__content-wrapper";
$logoClass = "${componentClass}__logo";
$titleClass = "${componentClass}__title";
$linksWrapper = "${componentClass}__links-wrapper";
$contentLink = "${componentClass}__content-link";
$contentDescription = "${componentClass}__content-description";
$locationAdderesses = "${componentClass}__location-addresses";
$locationAdderess = "${componentClass}__location-address";
?>
</main>
<footer class="<?php echo esc_attr('footer'); ?>">
<?php
$bgImage = get_field(FooterAcfMeta::BACKGROUND_IMAGE, 'options');
$logo = get_field(FooterAcfMeta::LOGO, 'options');
$titleText = get_field(FooterAcfMeta::TITLE, 'options');
$linkContent = get_field(FooterAcfMeta::LINK, 'options');
$phone = get_field(FooterAcfMeta::PHONE, 'options');
$email = get_field(FooterAcfMeta::EMAIL, 'options');
$firstLocation = get_field(FooterAcfMeta::FIRST_LOCATION, 'options');
$secondLocation = get_field(FooterAcfMeta::SECOND_LOCATION, 'options');
$leftColumnTitle = get_field(FooterAcfMeta::LEFT_COLUMN_TITLE, 'options');
$leftCenterColumnTitle = get_field(FooterAcfMeta::LEFT_CENTER_COLUMN_TITLE, 'options');
$rightCenterColumnTitle = get_field(FooterAcfMeta::RIGHT_CENTER_COLUMN_TITLE, 'options');
$rightColumnTitle = get_field(FooterAcfMeta::RIGHT_COLUMN_TITLE, 'options');
?>
<img src="<?php echo esc_url($bgImage['url']); ?>" alt="<?php echo esc_attr($bgImage['alt']); ?>" class="<?php echo esc_attr($bgImageClass); ?>">
<div class="<?php echo esc_attr($contentWrapper); ?>">
<img src="<?php echo esc_url($logo['url']); ?>" alt="<?php echo esc_attr($logo['alt']); ?>" class="<?php echo esc_attr($logoClass); ?>">
<h3 class="<?php echo esc_attr($titleClass); ?>"><?php echo esc_html($titleText); ?></h3>
<div class="<?php echo esc_attr($linksWrapper); ?>">
<a href="<?php echo esc_url($linkContent['url']); ?>" class="<?php echo esc_attr($contentLink); ?>"><?php echo esc_html($linkContent['title']); ?></a>
<a href="tel:<?php echo esc_attr($phone); ?>" class="<?php echo esc_attr($contentLink); ?>"><?php echo esc_html($phone); ?></a>
<a href="mailto:<?php echo esc_attr($email); ?>" class="<?php echo esc_attr($contentLink); ?>"><?php echo esc_html($email); ?></a>
</div>
<div class="<?php echo esc_attr($locationAdderesses); ?>">
<a href="<?php echo esc_url($firstLocation['url']); ?>" class="<?php echo esc_attr($locationAdderess); ?>"><?php esc_html_e($firstLocation['title'], 'saestate'); ?></a>
<a href="<?php echo esc_url($secondLocation['url']); ?>" class="<?php echo esc_attr($locationAdderess); ?>"><?php esc_html_e($secondLocation['title'], 'saestate'); ?></a>
</div>
</div>
<?php
echo Components::render( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
'layout-four-columns',
[
'layoutFourColumnsHtmlTag' => 'div',
'layoutFourColumnsAriaRole' => 'contentinfo',
'additionalClass' => 'footer-items',
'selectorClass' => 'footer',
'blockClass' => 'footer',
'layoutFourColumnsLeft' => [
Components::render(
'paragraph',
[
'paragraphContent' => esc_html__($leftColumnTitle, 'saestate'),
'blockClass' => 'footer',
]
),
Components::render(
'menu',
[
'menu' => 'footer_nav_left',
'componentClass' => 'footer',
'modifier' => 'menu',
]
)
],
'layoutFourColumnsLeftCenter' => [
Components::render(
'paragraph',
[
'paragraphContent' => esc_html__($leftCenterColumnTitle, 'saestate'),
'blockClass' => 'footer',
]
),
Components::render(
'menu',
[
'menu' => 'footer_nav_left_center',
'componentClass' => 'footer',
'modifier' => 'menu',
]
)
],
'layoutFourColumnsRightCenter' => [
Components::render(
'paragraph',
[
'paragraphContent' => esc_html__($rightCenterColumnTitle, 'saestate'),
'blockClass' => 'footer',
]
),
Components::render(
'menu',
[
'menu' => 'footer_nav_right_center',
'componentClass' => 'footer',
'modifier' => 'menu',
]
)
],
'layoutFourColumnsRight' => [
Components::render(
'paragraph',
[
'paragraphContent' => esc_html__($rightColumnTitle, 'saestate'),
'blockClass' => 'footer',
]
),
Components::render(
'menu',
[
'menu' => 'footer_nav_right',
'componentClass' => 'footer',
'modifier' => 'menu',
]
)
]
]
);
echo Components::render( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
'copyright',
[
'blockClass' => 'footer',
'copyrightYear' => gmdate('Y'),
'copyrightContent' => esc_html__('3SA ESTATE', 'saestate'),
]
);
?>
</footer>
<?php
wp_footer();
?>
</body>
</html>