-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.php
113 lines (93 loc) · 4.87 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
</div><!-- #content -->
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="container">
<div class="row" id="nav">
<div class="row top">
<img id="fossil-logo" src="<?=get_template_directory_uri() ?>/static/img/myfossil-logo-white-small.png"
alt="myFOSSIL Logo" />
<div class="hidden-xs hidden-sm hidden-md col-md-6 col-lg-4" id="footer-logos">
<div class="row">
<div class="col-xs-12 col-md-4">
<a href="http://ufl.edu" rel="nofollow">
<img src="<?=get_template_directory_uri() ?>/static/img/logos/uf.png" />
</a>
</div>
<div class="col-xs-12 col-md-4">
<a href="https://www.flmnh.ufl.edu/" rel="nofollow">
<img src="<?=get_template_directory_uri() ?>/static/img/logos/flmnh.png" />
</a>
</div>
<div class="col-xs-12 col-md-4">
<a href="http://www.nsf.gov/" rel="nofollow">
<img src="<?=get_template_directory_uri() ?>/static/img/logos/nsf.png" />
</a>
</div>
</div>
</div>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-left" id="nav-main">
<?php
$menu_items = array();
foreach ( wp_get_nav_menu_items( 'primary' ) as $item ) {
if ( $item->menu_item_parent ) {
if ( ! property_exists( $menu_items[$item->menu_item_parent], 'sub' ) ) {
$menu_items[$item->menu_item_parent]->sub = array();
}
$menu_items[$item->menu_item_parent]->sub[] = $item;
} else {
$menu_items[$item->ID] = $item;
}
}
//var_dump( $menu_items );
?>
<?php foreach ( $menu_items as $item ) : ?>
<li>
<?php
$page_array = get_option( 'bp-pages' );
if ( $post->post_title == "Site-Wide Activity" ) {
$post->post_title = 'Activity';
$post->title = 'Activity';
}
if ( array_key_exists( strtolower( $item->title ), $page_array ) ) {
$item->object_id = $page_array[strtolower( $item->title )];
}
$class = ( $item->object_id == $post->ID || strtolower( $item->title ) == strtolower( $post->post_title ) ) ? ' class="selected"' : null;
?>
<?php if ( $item->sub ) : ?>
<a id="dropdown<?=$item->ID ?>" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
<?=$item->title ?>
</a>
<ul class="footer-submenu" role="menu" aria-labelledby="dropdown<?=$item->ID ?>">
<?php foreach ( $item->sub as $sub_item ) : ?>
<li>
<a href="<?php echo $sub_item->url; ?>"<?=$class ?>><span><?php echo $sub_item->title; ?></span></a>
</li>
<?php endforeach; ?>
</ul>
<?php else: ?>
<a href="<?php echo $item->url; ?>"<?=$class ?>><span><?php echo $item->title; ?></span></a>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>
</div><!-- .row -->
<div class="row">
<div id="footer-disclaimer" class="col-xs-12 col-lg-12">
<p>
Development of myFOSSIL is based upon work largely
supported by the National Science Foundation under Grant
No. DRL-1322725. Any opinions, findings, and conclusions or
recommendations expressed in this material are those of the
authors and do not necessarily reflect the views of the
National Science Foundation.
</p>
</div><!-- column -->
</div><!-- .row -->
</div><!-- .container -->
</footer><!-- #colophon -->
</div><!-- #page -->
<?php wp_footer(); ?>
</body>
</html>