-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfooter.php
More file actions
113 lines (70 loc) · 2.51 KB
/
footer.php
File metadata and controls
113 lines (70 loc) · 2.51 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
<?php
/**
* The template for displaying the footer
*
* Contains the closing of the #content div and all content after.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package slow-atoms
*/
if ( ! defined( 'ABSPATH' ) ) { exit; }
?>
<footer class="slow-atoms__footer">
<div class="footer__body">
<div class="footer__useful-links">
<h5 class="footer__title">Useful Links</h5>
<div class="footer__links">
<?php // TODO: Check if it exists first
wp_nav_menu( array(
'theme_location' => 'useful-links',
'menu_class' => 'footer--list',
) );
?>
</div><!-- .footer__links -->
</div><!-- .footer__useful-links -->
<div class="affiliate_image_gallery">
<?php
// Get authors from ACF
//$ms_acf_affiliate_list = get_field('ms_acf_affiliate_list') ;
$cnt = 1 ;
$ms_acf_affiliate_list_array = array() ;
$home_page_ID = get_option( 'page_on_front' ) ;
while( $cnt <= 999 ):
$affiliate = 'ms_acf_affiliates_list_' . $cnt . '_key';
$affiliate_image_ID = get_field( $affiliate, $home_page_ID )['ms_acf_affiliate_image_name'] ;
$affiliate_url = get_field( $affiliate, $home_page_ID )['ms_acf_affiliates_url_name'] ;
if ( empty( $affiliate_url ) ) :
// if we have reached the last author, break
break ;
else :
$image_class = 'affiliate_image affiliate_' .$cnt ;
$affiliate_image_srcset = wp_get_attachment_image_srcset( $affiliate_image_ID , 'full' );
$affiliate_image_url = wp_get_attachment_image_src( $affiliate_image_ID )[ 0 ] ;
// echo $affiliate_url ;
// echo $affiliate_logo ;
$markup = '<a href="https://' . $affiliate_url . '" target="blank"><img class="' . $image_class . '" loading="lazy" src="' . $affiliate_image_url . '" srcset="' . esc_attr( $affiliate_image_srcset ) . '" /></a>' ;
echo $markup ;
$cnt++;
endif ;
endwhile;
?>
</div>
</div><!-- .footer__body -->
<div class="site-info">
<?php
$site_info = '<p>© ' . get_bloginfo( 'name' ) . ' ' . date("Y") . '</p>' ;
if ( WPCF7_RECAPTCHA::get_instance() -> is_active() ) {
$site_info .= '<p>Protected by <a href="https://www.google.com/recaptcha/intro/v3.html?ref=techmoon">reCAPTCHA v3</a>.</p>';
}
$my_theme = wp_get_theme( ) ;
$my_theme_URL = $my_theme -> get( 'ThemeURI' ) ;
$site_info .= '<p><a href="' . $my_theme_URL . '">' . wp_get_theme() . '</a></p>' ;
echo $site_info ;
?>
</div><!-- .site-info -->
</footer><!-- .slow-atoms__footer -->
</div><!-- #page .site -->
<?php wp_footer(); ?>
</body>
</html>