array('Horizontal Large Menu', 'addthis_default_style addthis_32x32_style' ), 'hs' => array('Horizontal Small Menu', 'addthis_default_style'), 'vl' => array('Vertical Large Menu', 'addthis_vertical_style addthis_32x32_style'), 'vs' => array('Vertical Small Menu', 'addthis_vertical_style') ); // we can't set it now since we want to use bloginfo to autoset the RSS Feed var $buttons = array(); /** * Constructor */ function AddThisFollowSidebarWidget() { $widget_ops = array( 'classname' => 'atfollowwidget', 'description' => 'Connect fans and followers with your profiles on top social services' ); /* Widget control settings. */ $control_ops = array( 'width' => 490); /* Create the widget. */ $this->WP_Widget( 'addthis-follow-widget', 'AddThis Follow', $widget_ops, $control_ops ); $this->buttons = array( 'facebook' => array( 'name' => 'Facebook', 'input' => 'http://www.facebook.com/ %s', 'placeholder' => 'YOUR-PROFILE' ), 'twitter' => array( 'name' => 'Twitter', 'input' => 'http://twitter.com/ %s', 'placeholder' => 'YOUR-USERNAME' ), 'youtube' => array( 'name' => 'YouTube', 'input' => 'http://www.youtube.com/user/ %s ', 'placeholder' => '' ), 'rss' => array( 'name' => 'RSS', 'input' => '%s', 'placeholder' => get_bloginfo('rss2_url') ), 'linkedin' => array( 'name' => 'LinkedIn', 'input' => 'http://www.linkedin.com/in/ %s', 'placeholder' => '' ), 'google' => array( 'name' => 'Google+', 'input' => 'https://plus.google.com/ %s', 'placeholder' => '' ), 'flickr' => array( 'name' => 'Flickr', 'input' => 'http://www.flickr.com/photos/ %s', 'placeholder' => '' ), 'vimeo' => array( 'name' => 'Vimoe', 'input' => 'http://www.vimeo.com/ %s ', 'placeholder' => '' ), 'pinterest' => array( 'name' => 'Pintrest', 'input' => 'http://www.pinterest.com/ %s', 'placeholder' => '' ), 'instagram' => array( 'name' => 'Instagram', 'input' => 'http://followgram.me/ %s', 'placeholder' => '' ), 'foursquare' => array( 'name' => 'Foursquare', 'input' => 'http://foursquare.com/ %s', 'placeholder' => '' ), 'tumblr' => array( 'name' => 'Tumblr', 'input' => 'http:// %s .tumblr.com', 'placeholder' => '' ), ); } /** * Echo's out the content of our widget */ function widget($args, $instance) { extract ( $args ); $title = apply_filters('widget_title', $instance['title']); echo $before_widget; if ($title) echo $before_title . $title . $after_title; unset($instance['profile']); unset($instance['title']); $class = $this->styles[$instance['style']][1]; echo '
|
|
|
|
|
|
|
' . __('Buttons:') . ' '; $count = 0; // Buttons foreach($this->buttons as $id => $button) { $class = ($count >= 4) ? 'atmore hidden' : ''; $value = (empty($instance[$id])) ? $button['placeholder'] : esc_attr($instance[$id]); echo '
| |
| '; echo "" . __('More Options', 'addthis') . ' | |