-
Notifications
You must be signed in to change notification settings - Fork 0
/
sidebar1.php
executable file
·64 lines (56 loc) · 3.39 KB
/
sidebar1.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
<div class="grid-2 one">
<div class="expandnav">
<span class="toggleall">
<a href="#" class="opensb">Show Page Navigation <img src="<?php echo get_template_directory_uri(); ?>/images/opennav.png" alt="Show nav" /></a><a class="closesb" style="display: none;" href="#">Hide Page Navigation <img src="<?php echo get_template_directory_uri(); ?>/images/closenav.png" alt="Hide nav" /></a>
</span>
</div><!-- end expandnav hidden menu -->
<div id="sbnav">
<?php wp_nav_menu(array('theme_location' => 'department')); ?>
<!-- break up the navigation if you want into multiple menus. use the custom menu widget to select them. You can also use this for anything else -->
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Left Column')) {} ?>
<!-- end custom menus -->
</div><!-- end sbnav -->
<div class="socialize">
<?php
// 2017-05-04 jp in moving theme options to the customizer, we don't need the options framework anymore
// but this code still checks it for those sites who haven't used Customizer to outfit their sites.
$twitter = get_option('uri_department_department_twitter');
$instagram = get_option('uri_department_department_instagram');
$facebook = get_option('uri_department_department_facebook');
$linkedin = get_option('uri_department_department_linkedin');
$youtube = get_option('uri_department_department_youtube');
// check for legacy values
if ( empty ( $twitter ) ) {
$twitter = of_get_option('urid_tweet');
if ( ! empty ( $twitter ) ) {
// only do this if empty, because we test if twitter is empty upon display
$twitter = 'https://www.twitter.com/' . str_replace('@', '', $twitter);
}
}
if ( empty( $instagram ) ) {
$instagram = of_get_option('urid_instagram');
}
if ( empty( $facebook ) ) {
$facebook = of_get_option('urid_facebook');
}
if ( empty( $linkedin ) ) {
$linkedin = of_get_option('urid_linkedin');
}
if ( empty( $youtube ) ) {
$youtube = of_get_option('urid_youtube');
}
if ( empty( $google ) ) {
$google = of_get_option('urid_google');
}
$social_icon_dir = get_template_directory_uri() . '/images/social/';
?>
<?php if ( ! empty( $twitter ) ) : ?><a href="<?php echo $twitter; ?>" id="dept-twitter"><img src="<?php echo $social_icon_dir; ?>twitter.png" alt="Twitter" /></a><?php endif; ?>
<?php if ( ! empty( $instagram ) ) : ?><a href="<?php echo $instagram; ?>" id="dept-instagram"><img src="<?php echo $social_icon_dir; ?>instagram.png" alt="Instagram" /></a><?php endif; ?>
<?php if ( ! empty( $facebook ) ) : ?><a href="<?php echo $facebook; ?>" id="dept-facebook"><img src="<?php echo $social_icon_dir; ?>fb.png" alt="Facebook" /></a><?php endif; ?>
<?php if ( ! empty( $google ) ) : ?><a href="<?php echo $google; ?>" id="dept-google"><img src="<?php echo $social_icon_dir; ?>gplus.png" alt="Google+" /></a><?php endif; ?>
<?php if ( ! empty( $youtube ) ) : ?><a href="<?php echo $youtube; ?>" id="dept-youtube"><img src="<?php echo $social_icon_dir; ?>youtube.png" alt="Youtube" /></a><?php endif; ?>
<?php if ( ! empty( $linkedin ) ) : ?><a href="<?php echo $linkedin; ?>" id="dept-linkedin"><img src="<?php echo $social_icon_dir; ?>linkedin.png" alt="LinkedIn" /></a><?php endif; ?>
</div>
<!-- for extra content under the menu -->
<?php echo of_get_option('urid_html'); ?>
</div>