if ($copy_footer != '' && $copyright) { ?> <div class="copyright"><?php print str_replace('[year]', date('Y'), $copy_footer); ?> </div> <?php } ?> <?php $socials = get_theme_option('social_icons'); if ($socials) { ?> <ul class="social_links social_style_<?php echo get_theme_options_attribute('social_icons', 'style'); ?> "> <?php foreach ($socials as $s) { if (empty($s['icon'])) { continue; } ?> <?php $re = "/[a-z]+(.png)/"; $str = $s['icon']; preg_match($re, $str, $matches); $d = str_replace(".png", "", $matches[0]); $d = "icon-" . $d; ?>
/** * How to display the widget on the screen. */ function widget($args, $instance) { extract($args); $substitution_date = date('Y'); $title = apply_filters('widget_title', isset($instance['title']) ? $instance['title'] : ''); $text1 = isset($instance['text1']) ? do_shortcode($instance['text1']) : ''; $text2 = isset($instance['text2']) ? do_shortcode($instance['text2']) : ''; $logo_image = isset($instance['logo_image']) ? $instance['logo_image'] : ''; $show_logo = isset($instance['show_logo']) ? (int) $instance['show_logo'] : 1; $show_icons = isset($instance['show_icons']) ? (int) $instance['show_icons'] : 1; /* Before widget (defined by themes). */ echo balanceTags($before_widget); /* Display the widget title if one was input (before and after defined by themes). */ if ($title) { echo balanceTags($before_title . $title . $after_title); } ?> <div class="widget_inner"> <?php if ($show_logo) { if ($logo_image != '' || ($logo_image = get_theme_option('logo_image')) != '') { ?> <div class="logo logo_image"><a href="<?php echo esc_url(get_home_url()); ?> "><img src="<?php echo esc_url($logo_image); ?> " alt="" /></a></div> <?php } else { if (($logo_text = get_theme_option('logo_text')) != '') { $logo_text = str_replace(array('[', ']'), array('<span class="theme_accent">', '</span>'), $logo_text); ?> <div class="logo logo_text"><a href="<?php echo esc_url(get_home_url()); ?> "><span class="logo_title theme_header"><?php echo balanceTags($logo_text); ?> </span></a></div> <?php } } } if (!empty($text1)) { ?> <div class="logo_descr"><?php echo str_replace('[year]', $substitution_date, $text1); ?> </div> <?php } if ($show_icons) { $socials = get_theme_option('social_icons'); ?> <ul class="social_style_<?php echo get_theme_options_attribute('social_icons', 'style'); ?> "><?php foreach ($socials as $s) { if (empty($s['url'])) { continue; } ?> <li><a class="social_icons" href="<?php echo esc_url($s['url']); ?> " target="_blank"><img src="<?php echo esc_url($s['icon']); ?> " alt="" /></a></li><?php } ?> </ul><?php } if (!empty($text2)) { ?> <div class="logo_descr"><?php echo str_replace('[year]', $substitution_date, $text2); ?> </div> <?php } ?> </div> <?php /* After widget (defined by themes). */ echo balanceTags($after_widget); }