Social Icons Widget - Version 15.07

Version Description

  • Replaced http:// in unused input boxes with placeholder attribute instead.
  • Added CSS for icons in widget settings.
  • Updated the way icon path for custom icons is generated to stop conflicts with multilingual plugins.
Download this release

Release Info

Developer dannisbet
Plugin Icon 128x128 Social Icons Widget
Version 15.07
Comparing to
See all releases

Code changes from version 15.06 to 15.07

css/social_icons_admin.css CHANGED
@@ -19,6 +19,7 @@
19
  .social_icons_widget .aboutme { background-image:url('../icons/small/aboutme.jpg'); }
20
  .social_icons_widget .behance { background-image:url('../icons/small/behance.jpg'); }
21
  .social_icons_widget .codepen { background-image:url('../icons/small/codepen.jpg'); }
 
22
  .social_icons_widget .dribbble { background-image:url('../icons/small/dribbble.jpg'); }
23
  .social_icons_widget .email { background-image:url('../icons/small/email.jpg'); }
24
  .social_icons_widget .envato { background-image:url('../icons/small/envato.jpg'); }
@@ -40,6 +41,7 @@
40
  .social_icons_widget .stumbleupon { background-image:url('../icons/small/stumbleupon.jpg'); }
41
  .social_icons_widget .technorati { background-image:url('../icons/small/technorati.jpg'); }
42
  .social_icons_widget .tumblr { background-image:url('../icons/small/tumblr.jpg'); }
 
43
  .social_icons_widget .twitter { background-image:url('../icons/small/twitter.jpg'); }
44
  .social_icons_widget .vimeo { background-image:url('../icons/small/vimeo.jpg'); }
45
  .social_icons_widget .vine { background-image:url('../icons/small/vine.jpg'); }
19
  .social_icons_widget .aboutme { background-image:url('../icons/small/aboutme.jpg'); }
20
  .social_icons_widget .behance { background-image:url('../icons/small/behance.jpg'); }
21
  .social_icons_widget .codepen { background-image:url('../icons/small/codepen.jpg'); }
22
+ .social_icons_widget .dailymotion { background-image:url('../icons/small/dailymotion.jpg'); }
23
  .social_icons_widget .dribbble { background-image:url('../icons/small/dribbble.jpg'); }
24
  .social_icons_widget .email { background-image:url('../icons/small/email.jpg'); }
25
  .social_icons_widget .envato { background-image:url('../icons/small/envato.jpg'); }
41
  .social_icons_widget .stumbleupon { background-image:url('../icons/small/stumbleupon.jpg'); }
42
  .social_icons_widget .technorati { background-image:url('../icons/small/technorati.jpg'); }
43
  .social_icons_widget .tumblr { background-image:url('../icons/small/tumblr.jpg'); }
44
+ .social_icons_widget .twitch { background-image:url('../icons/small/twitch.jpg'); }
45
  .social_icons_widget .twitter { background-image:url('../icons/small/twitter.jpg'); }
46
  .social_icons_widget .vimeo { background-image:url('../icons/small/vimeo.jpg'); }
47
  .social_icons_widget .vine { background-image:url('../icons/small/vine.jpg'); }
lib/form.php CHANGED
@@ -2,7 +2,8 @@
2
  global $siw_social_accounts;
3
 
4
  foreach ($siw_social_accounts as $site => $id) {
5
- if(!isset($instance[$id])) { $instance[$id] = 'http://'; }
 
6
  }
7
 
8
  if(!isset($instance['title'])) { $instance['title'] = ''; }
@@ -52,7 +53,7 @@ $siw_sizes = array(
52
  <ul class="social_accounts">
53
  <?php foreach ($siw_social_accounts as $site => $id) : ?>
54
  <li><label for="<?php echo $this->get_field_id($id); ?>" class="<?php echo $id; ?>"><?php echo $site; ?>:</label>
55
- <input class="widefat" type="text" id="<?php echo $this->get_field_id($id); ?>" name="<?php echo $this->get_field_name($id); ?>" value="<?php echo esc_attr($instance[$id]); ?>" /></li>
56
  <?php endforeach; ?>
57
  </ul>
58
 
2
  global $siw_social_accounts;
3
 
4
  foreach ($siw_social_accounts as $site => $id) {
5
+ if(!isset($instance[$id])) { $instance[$id] = ''; }
6
+ elseif($instance[$id] == 'http://') { $instance[$id] = ''; }
7
  }
8
 
9
  if(!isset($instance['title'])) { $instance['title'] = ''; }
53
  <ul class="social_accounts">
54
  <?php foreach ($siw_social_accounts as $site => $id) : ?>
55
  <li><label for="<?php echo $this->get_field_id($id); ?>" class="<?php echo $id; ?>"><?php echo $site; ?>:</label>
56
+ <input class="widefat" type="text" id="<?php echo $this->get_field_id($id); ?>" name="<?php echo $this->get_field_name($id); ?>" value="<?php echo esc_attr($instance[$id]); ?>" placeholder="http://" /></li>
57
  <?php endforeach; ?>
58
  </ul>
59
 
lib/widget.php CHANGED
@@ -34,7 +34,7 @@ $ul_class .= 'icons-'.$siw_icons;
34
 
35
  if (in_array($siw_icons, $siw_custom_sizes)) {
36
  $size = str_replace("custom_","",$siw_icons);
37
- $siw_icon_path = STYLESHEETPATH .'/social_icons/'.$size.'/'.$id.'.{gif,jpg,jpeg,png}';
38
  }
39
  else {
40
  $siw_abs_path = str_replace('lib/', '', plugin_dir_path( __FILE__ ));
34
 
35
  if (in_array($siw_icons, $siw_custom_sizes)) {
36
  $size = str_replace("custom_","",$siw_icons);
37
+ $siw_icon_path = get_stylesheet_directory() .'/social_icons/'.$size.'/'.$id.'.{gif,jpg,jpeg,png}';
38
  }
39
  else {
40
  $siw_abs_path = str_replace('lib/', '', plugin_dir_path( __FILE__ ));
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dannisbet, nisbetcreative
3
  Tags: social, media, widget, follow, profile, icons, 500px, About.me, Behance, Dribbble, Codepen, Email, Envato, Facebook, Flickr, FourSquare, GitHub, Google+, Instagram, Kickstarter, Klout, LinkedIn, Medium, Path, Pinterest, RSS, Speaker Deck, StumbleUpon, Technorati, Tumblr, Twitter, Vimeo, Vine, WordPress, Yelp, YouTube, Zerply
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CJN7XU3Z7XHDL
5
  Requires at least: 3.5.1
6
- Tested up to: 4.1
7
- Stable tag: 15.06
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -74,6 +74,11 @@ The opening and closing unordered list tags can be edited or changed with the so
74
 
75
  == Changelog ==
76
 
 
 
 
 
 
77
  = 15.06 =
78
  * Fixed Undefined index errors.
79
  * Removed Technorati profile field.
3
  Tags: social, media, widget, follow, profile, icons, 500px, About.me, Behance, Dribbble, Codepen, Email, Envato, Facebook, Flickr, FourSquare, GitHub, Google+, Instagram, Kickstarter, Klout, LinkedIn, Medium, Path, Pinterest, RSS, Speaker Deck, StumbleUpon, Technorati, Tumblr, Twitter, Vimeo, Vine, WordPress, Yelp, YouTube, Zerply
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CJN7XU3Z7XHDL
5
  Requires at least: 3.5.1
6
+ Tested up to: 4.3
7
+ Stable tag: 15.07
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
74
 
75
  == Changelog ==
76
 
77
+ = 15.07 =
78
+ * Replaced http:// in unused input boxes with placeholder attribute instead.
79
+ * Added CSS for icons in widget settings.
80
+ * Updated the way icon path for custom icons is generated to stop conflicts with multilingual plugins.
81
+
82
  = 15.06 =
83
  * Fixed Undefined index errors.
84
  * Removed Technorati profile field.
social-media-icons-widget.php CHANGED
@@ -2,10 +2,10 @@
2
  /*
3
  Plugin Name: Social Icons Widget
4
  Plugin URI: http://github.com/dannisbet/Social-Icons-Widget
5
- Version: 15.06
6
  Description: Displays a list of social media website icons and a link to your profile.
7
  Author: Dan Nisbet
8
- Author URI: http://nisbetcreative.com/
9
  */
10
 
11
  class Social_Icons_Widget extends WP_Widget {
2
  /*
3
  Plugin Name: Social Icons Widget
4
  Plugin URI: http://github.com/dannisbet/Social-Icons-Widget
5
+ Version: 15.07
6
  Description: Displays a list of social media website icons and a link to your profile.
7
  Author: Dan Nisbet
8
+ Author URI: https://nisbetcreative.com/
9
  */
10
 
11
  class Social_Icons_Widget extends WP_Widget {