if (has_nav_menu('footer-menu') || false !== et_get_option('show_footer_social_icons', true)) { ?> <div id="footer-nav"> <?php if (has_nav_menu('footer-menu')) { wp_nav_menu(array('theme_location' => 'footer-menu', 'depth' => '1', 'menu_class' => 'bottom-nav', 'menu_id' => 'footer-menu', 'container' => '', 'fallback_cb' => '')); } $show_footer_social_icons = et_get_option('show_footer_social_icons', true); if (false !== $show_footer_social_icons || is_customize_preview()) { ?> <ul class="et-extra-social-icons" style="<?php extra_visible_display_css($show_footer_social_icons); ?> "> <?php $social_icons = extra_get_social_networks(); ?> <?php foreach ($social_icons as $social_icon => $social_icon_title) { ?> <?php $social_icon = esc_attr($social_icon); ?> <?php $social_icon_url = et_get_option(sprintf('%s_url', $social_icon), ''); ?> <?php if ('' != $social_icon_url) { ?> <li class="et-extra-social-icon <?php echo $social_icon;
?> <a href="<?php echo esc_url(get_author_posts_url($author->ID)); ?> " class="button post-count" title="<?php esc_attr_e(sprintf(__('Posts By: %s', 'extra'), $author->user_nicename)); ?> " rel="author"><?php esc_html_e(sprintf(_n('%d Post', '%d Posts', $count), $count)); ?> </a> </div> <!-- /.author-content --> <?php $social_links = ''; foreach (extra_get_social_networks() as $network => $title) { $network = esc_attr($network); if (!empty($author->{$network})) { $url = extra_format_url($author->{$network}); $social_links .= sprintf('<a href="%s" target="_blank"><i class="et-extra-icon et-extra-icon-%s et-extra-icon-author-%s-color-hover"></i></a>', esc_url($url), esc_attr($network), esc_attr($author->ID)); } } if (!empty($social_links)) { echo '<div class="author-footer">' . $social_links . '</div>'; } ?> </div> <!-- /.author --> <?php } ?> </div>
function extra_customizer_register_social_networks_settings($settings) { $settings = array(); foreach (extra_get_social_networks() as $social_network => $social_network_title) { $settings[sprintf('%s_url', $social_network)] = array('label' => sprintf(__('%s URL', 'extra'), $social_network_title), 'sanitize_callback' => 'esc_url_raw'); } return $settings; }