-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfooter.php
More file actions
executable file
·134 lines (95 loc) · 5.18 KB
/
footer.php
File metadata and controls
executable file
·134 lines (95 loc) · 5.18 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
<?php
/**
* The template for displaying the footer.
*/
$footer_options = get_option( 'footer-options' );
//debug
//debug_to_console( $footer_options );
?>
<aside class="ccl-c-school-band ccl-u-py-2" style="background-color:#F5F5F5" role="complementary" aria-label="Claremont Colleges School Logos">
<div class="ccl-l-container">
<ul class="ccl-l-row ccl-l-align-center ccl-u-clean-list">
<?php
$schools = array(
array( 'name' => 'Pomona', 'url' => 'https://www.pomona.edu/', 'logo' => CCL_ASSETS . 'images/logos/pomona@2x.png', 'width' => 96, 'height' => 40 ),
array( 'name' => 'Claremont Graduate University', 'url' => 'https://www.cgu.edu/', 'logo' => CCL_ASSETS . 'images/logos/cgu@2x.png', 'width' => 108, 'height' => 58 ),
array( 'name' => 'The Claremont Colleges Services', 'url' => 'https://services.claremont.edu/', 'logo' => CCL_ASSETS . 'images/logos/tccs@2x.png', 'width' => 100, 'height' => 100 ),
array( 'name' => 'Scripps College', 'url' => 'http://www.scrippscollege.edu/', 'logo' => CCL_ASSETS . 'images/logos/scrippscollege@2x.png', 'width' => 86, 'height' => 74 ),
array( 'name' => 'Claremont McKenna College', 'url' => 'http://www.claremontmckenna.edu/', 'logo' => CCL_ASSETS . 'images/logos/claremontmckenna@2x.png', 'width' => 84, 'height' => 70 ),
array( 'name' => 'Harvey Mudd College', 'url' => 'https://www.hmc.edu/', 'logo' => CCL_ASSETS . 'images/logos/hmc@2x.png', 'width' => 64, 'height' => 66 ),
array( 'name' => 'Pitzer College', 'url' => 'https://www.pitzer.edu/', 'logo' => CCL_ASSETS . 'images/logos/pitzer@2x.png', 'width' => 114, 'height' => 36 ),
array( 'name' => 'Keck Graduate Institute', 'url' => 'http://www.kgi.edu/', 'logo' => CCL_ASSETS . 'images/logos/kgi@2x.png', 'width' => 115, 'height' => 30 ),
);
foreach ( $schools as $school ) : ?>
<li class="ccl-l-column">
<a href="<?php echo $school['url']; ?>" title="<?php echo $school['name']; ?>">
<img src="<?php echo $school['logo']; ?>"
class="ccl-u-display-block ccl-l-center"
width="<?php echo $school['width']; ?>"
height="<?php echo $school['height']; ?>"
alt="<?php echo $school['name'] . ' logo'; ?>" />
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
</aside>
<footer id="colophon" class="ccl-c-footer ccl-u-pt-2 ccl-u-pb-3">
<div class="ccl-l-container">
<div class="ccl-l-row">
<div class="ccl-l-column ccl-l-span-third-lg">
<a href="<?php echo site_url(); ?>" class="ccl-b-logo ccl-is-vert ccl-is-white ccl-u-mt-1">
<span class="ccl-u-display-none"><?php echo bloginfo( 'name' ); ?></span>
</a>
<?php if ( has_nav_menu( 'footer_1' ) ): ?>
<nav aria-label="Footer Navigation">
<?php
wp_nav_menu( array(
'theme_location' => 'footer_1',
'menu_class' => 'ccl-c-menu ccl-is-primary',
'container' => 'div',
) );
?>
</nav>
<?php else: ?>
<?php echo '<div class="ccl-u-mt-1"><a href="' . admin_url( 'nav-menus.php' ) . '" class="ccl-b-btn ccl-is-small ccl-is-inverse">Add a footer menu</a></div>'; ?>
<?php endif; ?>
</div>
<div id="footer-context" class="ccl-l-column ccl-l-span-third-lg">
<?php if ( array_key_exists( 'footer-column-1', $footer_options ) && $footer_options['footer-column-1'] ) : ?>
<?php echo apply_filters( 'the_content', $footer_options['footer-column-1'] ); ?>
<?php else : ?>
<p>Add content to footer column 1</p>
<?php endif; ?>
</div>
<div class="ccl-l-column ccl-l-span-third-lg">
<?php if ( array_key_exists( 'footer-column-2', $footer_options ) && $footer_options['footer-column-2'] ) : ?>
<?php echo apply_filters( 'the_content', $footer_options['footer-column-2'] ); ?>
<?php else : ?>
<p>Add content to footer column 2</p>
<?php endif; ?>
</div>
</div>
<p class="ccl-u-font-size-sm ccl-u-faded">© <?php echo date('Y'); ?> The Claremont Colleges Library</p> <span id="ccl-c-footer-intranet" class="ccl-u-font-size-md"><a href="http://libguides.libraries.claremont.edu/intranet" target="_self">Staff Intranet Login</a> </span>
</div>
</footer><!-- #colophon -->
</div><!-- #page -->
<?php
//if feedback form is enabled, then show
global $wp_query;
//debug
debug_to_console( $wp_query );
debug_to_console( in_array( $wp_query->post->ID, $footer_options['footer_column_enable_chat_widget'] ) );
if( is_array( $footer_options['footer_column_enable_chat_widget'] ) && ( in_array( $wp_query->post->ID, $footer_options['footer_column_enable_chat_widget'] ) || in_array( $wp_query->post->post_type, $footer_options['footer_column_enable_chat_widget'] ) ) ){
?>
<script src="https://v2.libanswers.com/load_chat.php?hash=1b65997655cf4c593b1b25474e5f5f2c"></script>
<div id="libchat_1b65997655cf4c593b1b25474e5f5f2c"></div>
<?php
} elseif( array_key_exists( 'footer-column-ux-feedback', $footer_options ) && $footer_options['footer-column-ux-feedback'] ){
get_template_part( 'partials/ux-feedback' );
}
?>
<span class="media-size"></span>
<?php wp_footer(); ?>
</body>
</html>