function bayfront_do_footer_bottom() { // Open layout wrap wpsight_layout_wrap('footer-bottom-wrap'); ?> <div id="footer-bottom" class="clearfix"> <div id="bottom-menu"> <?php echo wpsight_menu('bottom'); ?> </div><!-- #bottom-menu --> <?php $credit = wpsight_get_option('credit'); // Set default value if option has not been set if (wpsight_get_option('credit') === false) { $credit = wpsight_get_option('credit', true); } ?> <div id="footer-contact-info"> <?php // Open layout wrap wpsight_layout_wrap('credit-wrap'); ?> <div id="credit" class="clearfix"> <?php echo do_shortcode($credit); ?> </div><!-- #credit --><?php // Close layout wrap wpsight_layout_wrap('credit-wrap', 'close'); ?> </div> <?php // Loop through social icons $nr = apply_filters('wpsight_social_icons_nr', 5); $social_icons = array(); for ($i = 1; $i <= $nr; $i++) { $social_icons[] = wpsight_get_social_icon(wpsight_get_option('icon_' . $i)); } // Remove empty elements $social_icons = array_filter($social_icons); $output = '<div class="social-icons">'; if (!empty($social_icons)) { $i = 1; foreach ($social_icons as $k => $v) { $social_link = wpsight_get_option('icon_' . $i . '_link'); $output .= '<a href="' . $social_link . '" target="_blank" title="' . $v['title'] . '" class="social-icon social-icon-' . $v['id'] . '"><img src="' . $v['icon'] . '" alt="" /></a>' . "\n"; $i++; } } else { $social_icon = wpsight_get_social_icon('rss'); $output .= '<a href="' . get_bloginfo_rss('rss2_url') . '" target="_blank" title="' . $social_icon['title'] . '" class="social-icon social-icon-' . $social_icon['id'] . '"><img src="' . $social_icon['icon'] . '" alt="" /></a>' . "\n"; } $output .= '</div><!-- .social-icons -->'; echo apply_filters('wpsight_social_icons_top', $output); echo '<div class="subscribe-form">'; if (function_exists('newsletter_form')) { newsletter_form(1); } echo '</div>'; ?> </div><!-- #footer-bottom --><?php // Close layout wrap wpsight_layout_wrap('footer-bottom-wrap', 'close'); }
function wpsight_do_top() { // Open layout wrap wpsight_layout_wrap('top-wrap'); ?> <div id="top" class="row"><?php // Check if social icons to display $nr = apply_filters('wpsight_social_icons_nr', 5); $social_icons = array(); for ($i = 1; $i <= $nr; $i++) { $social_icons[] = wpsight_get_social_icon(wpsight_get_option('icon_' . $i)); } // Remove empty elements $social_icons = array_filter($social_icons); // Set top-left span accordingly $span = !empty($social_icons) ? 'span8' : 'span12'; if (has_nav_menu('menu-top-left')) { ?> <div id="top-left" class="<?php echo $span; ?> "> <?php echo wpsight_menu('top-left', false); ?> </div><!-- #top-left --><?php } // Loop through social icons if (!empty($social_icons)) { $i = 1; // Set top-right span accordingly $span = !has_nav_menu('menu-top-left') ? 'span12' : 'span4'; $output = '<div id="top-right" class="' . $span . '">' . "\n"; $output .= '<div class="social-icons">' . "\n"; foreach ($social_icons as $k => $v) { $social_link = wpsight_get_option('icon_' . $i . '_link'); $output .= '<a href="' . $social_link . '" target="_blank" title="' . $v['title'] . '" class="social-icon social-icon-' . $v['id'] . '"><img src="' . $v['icon'] . '" alt="" /></a>' . "\n"; $i++; } $output .= '</div><!-- .social-icons -->' . "\n"; $output .= '</div><!-- #top-right -->' . "\n"; echo apply_filters('wpsight_social_icons_top', $output); } ?> </div><!-- #top --><?php // Close layout wrap wpsight_layout_wrap('top-wrap', 'close'); }