function shoestrap_footer_html() { $blog_name = get_bloginfo('name', 'display'); $ftext = shoestrap_getVariable('footer_text'); $ftext = $ftext == '' ? '© [year] [sitename]' : $ftext; $ftext = str_replace('[year]', date('Y'), $ftext); $ftext = str_replace('[sitename]', $blog_name, $ftext); $social = shoestrap_getVariable('footer_social_toggle'); $social_width = shoestrap_getVariable('footer_social_width'); $width = 12; // Social is enabled, we're modifying the width! $width = intval($social_width) > 0 && $social ? $width - intval($social_width) : $width; $social_blank = shoestrap_getVariable('footer_social_new_window_toggle'); $blank = $social_blank == 1 ? ' target="_blank"' : ''; $networks = shoestrap_get_social_links(); do_action('shoestrap_footer_before_copyright'); ?> <div id="footer-copyright"> <article class="<?php echo shoestrap_container_class('footer-copyright'); ?> "> <div class='row'> <?php if ($social && count($networks) > 0) { ?> <div id="footer_social_bar" class="col-md-12 col-lg-12"> <?php foreach ($networks as $network) { ?> <?php if ($network['url'] == '') { continue; } ?> <a href="<?php echo $network['url']; ?> "<?php echo $blank; ?> title="<?php echo $network['icon']; ?> "> <span class="icon el-icon-<?php echo $network['icon']; ?> "></span> </a> <?php } ?> </div> <?php } ?> <div id="copyright-bar" class="col-md-12 col-lg-12"> <?php echo $ftext; ?> </div> </div> </article> </div> <?php }
function shoestrap_navbar_social_bar() { // Get all the social networks the user is using $networks = shoestrap_get_social_links(); // The base class for icons that will be used $baseclass = 'icon el-icon-'; // Build the content $content = ''; $content .= '<div id="navbar_social_bar">'; // populate the networks foreach ($networks as $network) { if (strlen($network['url']) > 7) { // add the $show variable to check if the user has actually entered a url in any of the available networks $show = true; $content .= '<a class="btn btn-link navbar-btn" href="' . $network['url'] . '" target="_blank" title="' . $network['icon'] . '">'; $content .= '<i class="' . $baseclass . $network['icon'] . '"></i> '; $content .= '</a>'; } } $content .= '</div>'; echo $content; }