Changeset 803576
- Timestamp:
- 11/13/2013 07:43:43 AM (12 years ago)
- Location:
- beautiful-social-widget/trunk
- Files:
-
- 2 edited
-
beautiful-social-widget.php (modified) (9 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
beautiful-social-widget/trunk/beautiful-social-widget.php
r801550 r803576 2 2 /* 3 3 Plugin Name: Beautiful Social Widget 4 Plugin URI: http://cwlk.org/beautiful-social-widget 4 Plugin URI: http://cwlk.org/beautiful-social-widget/ 5 5 Description: This plugin provides the widget to show the link to your Social profile and make your Website more Social. 6 Version: 1. 26 Version: 1.3 7 7 Author: Sudeep Acharya 8 8 Author URI: http://cwlk.org … … 15 15 function bsw_widget() 16 16 { 17 register_widget('beautiful_social_widget');17 register_widget('beautiful_social_widget'); 18 18 } 19 19 … … 21 21 class beautiful_social_widget extends WP_Widget { 22 22 23 function beautiful_social_widget() {24 $widget_ops = array('classname' => 'widget_beautiful_social_widget', 'description' => __('Displays the link to your Social profile with icon.') );23 function beautiful_social_widget() { 24 $widget_ops = array('classname' => 'widget_beautiful_social_widget', 'description' => __('Displays the link to your Social profile with icon.') ); 25 25 $this->WP_Widget('beautiful_social_widget', __('Beautiful Social Widget'), $widget_ops); 26 }26 } 27 27 function form($instance) { 28 28 $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'facebook' => '', 'twitter' => '', 'googleplus' => '', 'linkedin' => '', 'pinterest' => '', 29 29 'youtube' => '', 'instagram' => '', 'tumblr' => '', 'flickr' => '', 'rssfeed' => '', 'email' => '') ); 30 $title = strip_tags($instance['title']);31 $facebook = strip_tags($instance['facebook']);32 $twitter = strip_tags($instance['twitter']);33 $googleplus = strip_tags($instance['googleplus']);34 $linkedin = strip_tags($instance['linkedin']);35 $pinterest = strip_tags($instance['pinterest']);30 $title = strip_tags($instance['title']); 31 $facebook = strip_tags($instance['facebook']); 32 $twitter = strip_tags($instance['twitter']); 33 $googleplus = strip_tags($instance['googleplus']); 34 $linkedin = strip_tags($instance['linkedin']); 35 $pinterest = strip_tags($instance['pinterest']); 36 36 $youtube = strip_tags($instance['youtube']); 37 37 $instagram = strip_tags($instance['instagram']); … … 41 41 $email = strip_tags($instance['email']); 42 42 43 ?>44 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php echo __('Title'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>45 <p><label for="<?php echo $this->get_field_id('facebook'); ?>"><?php echo __('Facebook'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('facebook'); ?>" name="<?php echo $this->get_field_name('facebook'); ?>" type="text" value="<?php echo attribute_escape($facebook); ?>" /></label></p>46 <p><label for="<?php echo $this->get_field_id('twitter'); ?>"><?php echo __('Twitter'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('twitter'); ?>" name="<?php echo $this->get_field_name('twitter'); ?>" type="text" value="<?php echo attribute_escape($twitter); ?>" /></label></p>47 <p><label for="<?php echo $this->get_field_id('googleplus'); ?>"><?php echo __('Google Plus'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('googleplus'); ?>" name="<?php echo $this->get_field_name('googleplus'); ?>" type="text" value="<?php echo attribute_escape($googleplus); ?>" /></label></p>48 <p><label for="<?php echo $this->get_field_id('linkedin'); ?>"><?php echo __('Linked In'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('linkedin'); ?>" name="<?php echo $this->get_field_name('linkedin'); ?>" type="text" value="<?php echo attribute_escape($linkedin); ?>" /></label></p>49 <p><label for="<?php echo $this->get_field_id('pinterest'); ?>"><?php echo __('Pinterest'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('pinterest'); ?>" name="<?php echo $this->get_field_name('pinterest'); ?>" type="text" value="<?php echo attribute_escape($pinterest); ?>" /></label></p>50 <p><label for="<?php echo $this->get_field_id('youtube'); ?>"><?php echo __('YouTube'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('youtube'); ?>" name="<?php echo $this->get_field_name('youtube'); ?>" type="text" value="<?php echo attribute_escape($youtube); ?>" /></label></p>51 <p><label for="<?php echo $this->get_field_id('instagram'); ?>"><?php echo __('Instagram'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('instagram'); ?>" name="<?php echo $this->get_field_name('instagram'); ?>" type="text" value="<?php echo attribute_escape($instagram); ?>" /></label></p>52 <p><label for="<?php echo $this->get_field_id('tumblr'); ?>"><?php echo __('Tumblr'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('tumblr'); ?>" name="<?php echo $this->get_field_name('tumblr'); ?>" type="text" value="<?php echo attribute_escape($tumblr); ?>" /></label></p>53 <p><label for="<?php echo $this->get_field_id('flickr'); ?>"><?php echo __('Flickr'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('flickr'); ?>" name="<?php echo $this->get_field_name('flickr'); ?>" type="text" value="<?php echo attribute_escape($flickr); ?>" /></label></p>54 <p><label for="<?php echo $this->get_field_id('rssfeed'); ?>"><?php echo __('RSS Feed'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('rssfeed'); ?>" name="<?php echo $this->get_field_name('rssfeed'); ?>" type="text" value="<?php echo attribute_escape($rssfeed); ?>" /></label></p>55 <p><label for="<?php echo $this->get_field_id('email'); ?>"><?php echo __('Email Address'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('email'); ?>" name="<?php echo $this->get_field_name('email'); ?>" type="text" value="<?php echo attribute_escape($email); ?>" /></label></p>43 ?> 44 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php echo __('Title'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label></p> 45 <p><label for="<?php echo $this->get_field_id('facebook'); ?>"><?php echo __('Facebook'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('facebook'); ?>" name="<?php echo $this->get_field_name('facebook'); ?>" type="text" value="<?php echo esc_attr($facebook); ?>" /></label></p> 46 <p><label for="<?php echo $this->get_field_id('twitter'); ?>"><?php echo __('Twitter'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('twitter'); ?>" name="<?php echo $this->get_field_name('twitter'); ?>" type="text" value="<?php echo esc_attr($twitter); ?>" /></label></p> 47 <p><label for="<?php echo $this->get_field_id('googleplus'); ?>"><?php echo __('Google Plus'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('googleplus'); ?>" name="<?php echo $this->get_field_name('googleplus'); ?>" type="text" value="<?php echo esc_attr($googleplus); ?>" /></label></p> 48 <p><label for="<?php echo $this->get_field_id('linkedin'); ?>"><?php echo __('Linked In'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('linkedin'); ?>" name="<?php echo $this->get_field_name('linkedin'); ?>" type="text" value="<?php echo esc_attr($linkedin); ?>" /></label></p> 49 <p><label for="<?php echo $this->get_field_id('pinterest'); ?>"><?php echo __('Pinterest'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('pinterest'); ?>" name="<?php echo $this->get_field_name('pinterest'); ?>" type="text" value="<?php echo esc_attr($pinterest); ?>" /></label></p> 50 <p><label for="<?php echo $this->get_field_id('youtube'); ?>"><?php echo __('YouTube'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('youtube'); ?>" name="<?php echo $this->get_field_name('youtube'); ?>" type="text" value="<?php echo esc_attr($youtube); ?>" /></label></p> 51 <p><label for="<?php echo $this->get_field_id('instagram'); ?>"><?php echo __('Instagram'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('instagram'); ?>" name="<?php echo $this->get_field_name('instagram'); ?>" type="text" value="<?php echo esc_attr($instagram); ?>" /></label></p> 52 <p><label for="<?php echo $this->get_field_id('tumblr'); ?>"><?php echo __('Tumblr'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('tumblr'); ?>" name="<?php echo $this->get_field_name('tumblr'); ?>" type="text" value="<?php echo esc_attr($tumblr); ?>" /></label></p> 53 <p><label for="<?php echo $this->get_field_id('flickr'); ?>"><?php echo __('Flickr'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('flickr'); ?>" name="<?php echo $this->get_field_name('flickr'); ?>" type="text" value="<?php echo esc_attr($flickr); ?>" /></label></p> 54 <p><label for="<?php echo $this->get_field_id('rssfeed'); ?>"><?php echo __('RSS Feed'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('rssfeed'); ?>" name="<?php echo $this->get_field_name('rssfeed'); ?>" type="text" value="<?php echo esc_attr($rssfeed); ?>" /></label></p> 55 <p><label for="<?php echo $this->get_field_id('email'); ?>"><?php echo __('Email Address'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('email'); ?>" name="<?php echo $this->get_field_name('email'); ?>" type="text" value="<?php echo esc_attr($email); ?>" /></label></p> 56 56 57 57 <?php … … 60 60 function update($new_instance, $old_instance) { 61 61 $instance = $old_instance; 62 $instance['title'] = strip_tags($new_instance['title']);63 $instance['facebook'] = strip_tags($new_instance['facebook']);64 $instance['twitter'] = strip_tags($new_instance['twitter']);65 $instance['googleplus'] = strip_tags($new_instance['googleplus']);66 $instance['linkedin'] = strip_tags($new_instance['linkedin']);67 $instance['pinterest'] = strip_tags($new_instance['pinterest']);62 $instance['title'] = strip_tags($new_instance['title']); 63 $instance['facebook'] = strip_tags($new_instance['facebook']); 64 $instance['twitter'] = strip_tags($new_instance['twitter']); 65 $instance['googleplus'] = strip_tags($new_instance['googleplus']); 66 $instance['linkedin'] = strip_tags($new_instance['linkedin']); 67 $instance['pinterest'] = strip_tags($new_instance['pinterest']); 68 68 $instance['youtube'] = strip_tags($new_instance['youtube']); 69 69 $instance['instagram'] = strip_tags($new_instance['instagram']); … … 72 72 $instance['rssfeed'] = strip_tags($new_instance['rssfeed']); 73 73 $instance['email'] = strip_tags($new_instance['email']); 74 74 75 75 return $instance; 76 76 } … … 79 79 extract($args); 80 80 81 $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);82 $facebook = empty($instance['facebook']) ? '' : $instance['facebook'];83 $twitter = empty($instance['twitter']) ? '' : $instance['twitter'];84 $googleplus = empty($instance['googleplus']) ? '' : $instance['googleplus'];85 $linkedin = empty($instance['linkedin']) ? '' : $instance['linkedin'];86 $pinterest = empty($instance['pinterest']) ? '' : $instance['pinterest'];81 $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); 82 $facebook = empty($instance['facebook']) ? '' : $instance['facebook']; 83 $twitter = empty($instance['twitter']) ? '' : $instance['twitter']; 84 $googleplus = empty($instance['googleplus']) ? '' : $instance['googleplus']; 85 $linkedin = empty($instance['linkedin']) ? '' : $instance['linkedin']; 86 $pinterest = empty($instance['pinterest']) ? '' : $instance['pinterest']; 87 87 $youtube = empty($instance['youtube']) ? '' : $instance['youtube']; 88 88 $instagram = empty($instance['instagram']) ? '' : $instance['instagram']; … … 93 93 94 94 95 echo $before_widget;96 if (!empty( $title )) {97 echo $before_title . $title . $after_title;98 };95 echo $before_widget; 96 if (!empty( $title )) { 97 echo $before_title . $title . $after_title; 98 }; 99 99 100 100 101 101 echo '<div id="bsw-content">'; 102 102 if( $facebook ) echo '<a href="'. $facebook .'" target="_blank" id="bswfacebook" title="Facebook">Facebook</a>'; 103 if( $twitter ) echo '<a id="bswtwitter" href="'. $twitter .'" target="_blank" title="Twitter">Twitter</a>';104 if( $googleplus ) echo '<a id="bswgoogleplus" href="'. $googleplus .'" target="_blank" title="Google Plus">Google Plus</a>';105 if( $linkedin ) echo '<a id="bswlinkedin" href="'. $linkedin .'" target="_blank" title="Linked In">Linked In</a>';106 if( $pinterest ) echo '<a id="bswpinterest" href="'. $pinterest .'" target="_blank" title="Pinterest">Pinterest</a>';103 if( $twitter ) echo '<a id="bswtwitter" href="'. $twitter .'" target="_blank" title="Twitter">Twitter</a>'; 104 if( $googleplus ) echo '<a id="bswgoogleplus" href="'. $googleplus .'" target="_blank" title="Google Plus">Google Plus</a>'; 105 if( $linkedin ) echo '<a id="bswlinkedin" href="'. $linkedin .'" target="_blank" title="Linked In">Linked In</a>'; 106 if( $pinterest ) echo '<a id="bswpinterest" href="'. $pinterest .'" target="_blank" title="Pinterest">Pinterest</a>'; 107 107 if( $youtube ) echo '<a id="bswyoutube" href="'. $youtube .'" target="_blank" title="YouTube">YouTube</a>'; 108 108 if( $instagram ) echo '<a id="bswinstagram" href="'. $instagram .'" target="_blank" title="Instagram">Instagram</a>'; … … 111 111 if( $rssfeed ) echo '<a id="bswrssfeed" href="'. $rssfeed .'" target="_blank" title="RSS Feed">RSS Feed</a>'; 112 112 if( $email ) echo '<a id="bswemail" href="mailto:'. $email .'" target="_blank" title="Email">Email</a>'; 113 echo '</div>';113 echo '</div>'; 114 114 115 115 echo $after_widget; 116 116 wp_enqueue_style( 'bsw', plugins_url('bsw.css', __FILE__) ); 117 }117 } 118 118 } 119 119 ?> -
beautiful-social-widget/trunk/readme.txt
r801550 r803576 16 16 17 17 This Plugin supports the following Social Media: 18 * 19 * 20 * Google Plus21 * Linked In22 * 23 * YouTube24 * 25 * Tumblr26 * Flickr27 * Rss28 * 18 * Facebook 19 * Twitter 20 * Google Plus 21 * Linked In 22 * Pinterest 23 * YouTube 24 * Instagram 25 * Tumblr 26 * Flickr 27 * Rss 28 * Email 29 29 30 30 == Installation == … … 44 44 == Changelog == 45 45 46 = 1.3 = 47 * Replaced Deprecated functions 48 46 49 = 1.2 = 47 * Added Email option50 * Added Email option 48 51 49 52 = 1.1 = 50 * Update License53 * Update License 51 54 52 55 = 1.0 = 53 * Initial reelase56 * Initial reelase
Note: See TracChangeset
for help on using the changeset viewer.