'theme_socialmedia', 'description' => __('Show your Social Media Buttons', 'krakatau_social_lang') );
$this->WP_Widget('theme_socialmedia', 'Krakatau widget social button', $widget_ops);
}
function widget($args, $instance) {
extract($args, EXTR_SKIP);
$title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
$url = get_template_directory_uri() . '/images/icons';
$options = get_option('krakatau_options');
$networks = '';
echo $before_widget;
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
?>
'' ) :
$networks .= '
![twitter]('. $url .'/twitter.png)
';
endif;
// Facebook Button
if ( isset($options['krakatau_social_facebook']) and $options['krakatau_social_facebook'] <> '' ) :
$networks .= '
![facebook]('. $url .'/facebook.png)
';
endif;
// GooglePlus Button
if ( isset($options['krakatau_social_googleplus']) and $options['krakatau_social_googleplus'] <> '' ) :
$networks .= '
![googleplus]('. $url .'/googleplus.png)
';
endif;
// LinkedIn Button
if ( isset($options['krakatau_social_linkedin']) and $options['krakatau_social_linkedin'] <> '' ) :
$networks .= '
![linkedin]('. $url .'/linkedin.png)
';
endif;
// MySpace Button
if ( isset($options['krakatau_social_myspace']) and $options['krakatau_social_myspace'] <> '' ) :
$networks .= '
![myspace]('. $url .'/myspace.png)
';
endif;
// Blogger Button
if ( isset($options['krakatau_social_blogger']) and $options['krakatau_social_blogger'] <> '' ) :
$networks .= '
![blogger]('. $url .'/blogger.png)
';
endif;
// Wordpress Button
if ( isset($options['krakatau_social_wordpress']) and $options['krakatau_social_wordpress'] <> '' ) :
$networks .= '
![wordpress]('. $url .'/wordpress.png)
';
endif;
// Flickr Button
if ( isset($options['krakatau_social_flickr']) and $options['krakatau_social_flickr'] <> '' ) :
$networks .= '
![flickr]('. $url .'/flickr.png)
';
endif;
// Last.fm Button
if ( isset($options['krakatau_social_lastfm']) and $options['krakatau_social_lastfm'] <> '' ) :
$networks .= '
![lastfm]('. $url .'/lastfm.png)
';
endif;
// Delicious Button
if ( isset($options['krakatau_social_delicious']) and $options['krakatau_social_delicious'] <> '' ) :
$networks .= '
![delicious]('. $url .'/delicious.png)
';
endif;
// Digg Button
if ( isset($options['krakatau_social_digg']) and $options['krakatau_social_digg'] <> '' ) :
$networks .= '
![digg]('. $url .'/digg.png)
';
endif;
// Reddit Button
if ( isset($options['krakatau_social_reddit']) and $options['krakatau_social_reddit'] <> '' ) :
$networks .= '
![reddit]('. $url .'/reddit.png)
';
endif;
// StumbleUpon Button
if ( isset($options['krakatau_social_stumbleupon']) and $options['krakatau_social_stumbleupon'] <> '' ) :
$networks .= '
![stumbleupon]('. $url .'/stumbleupon.png)
';
endif;
// RSS Button
if ( isset($options['krakatau_social_rss']) and $options['krakatau_social_rss'] <> '' ) :
$networks .= '
![rss]('. $url .'/rss.png)
';
endif;
// Friendfeed Button
if ( isset($options['krakatau_social_friendfeed']) and $options['krakatau_social_friendfeed'] <> '' ) :
$networks .= '
![friendfeed]('. $url .'/friendfeed.png)
';
endif;
// Skype Button
if ( isset($options['krakatau_social_skype']) and $options['krakatau_social_skype'] <> '' ) :
$networks .= '
![skype]('. $url .'/skype.png)
';
endif;
if($networks == '') {
_e('Go to WP-Admin-> Appearance-> Theme Options to configure this widget', 'krakatau');
} else {
echo $networks;
}
?>
'' ) );
$title = esc_attr($instance['title']);
?>