Social Media Widget - Version 1.2.2

Version Description

Download this release

Release Info

Developer brianfreytag
Plugin Icon 128x128 Social Media Widget
Version 1.2.2
Comparing to
See all releases

Code changes from version 1.2.1 to 1.2.2

Files changed (3) hide show
  1. readme.txt +3 -1
  2. social-widget.php +25 -23
  3. social_widget.css +19 -7
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Brian Freytag
3
  Tags: social media, twitter, facebook, myspace, digg, email
4
  Requires at least: 2.9.1
5
  Tested up to: 3.0 beta 2
6
- Stable tag: 1.2.1
7
 
8
  == Description ==
9
 
@@ -54,6 +54,8 @@ Follow the steps below to install the plugin.
54
  For help, you can send an e-mail to brifreytag_at_gmail.com or get ahold of me via twitter at @brianfreytag
55
 
56
  == Changelog ==
 
 
57
  1.2.1 - Fixed an issue with Orkut icon staying on even if the field is blank. Fixed an issue with 32 pixel default icons appearing as 64 pixels.
58
 
59
  1.2 -
3
  Tags: social media, twitter, facebook, myspace, digg, email
4
  Requires at least: 2.9.1
5
  Tested up to: 3.0 beta 2
6
+ Stable tag: 1.2.2
7
 
8
  == Description ==
9
 
54
  For help, you can send an e-mail to brifreytag_at_gmail.com or get ahold of me via twitter at @brianfreytag
55
 
56
  == Changelog ==
57
+ 1.2.2 - Some of you were complaining about it breaking your theme because I wasn't using the default arguments to wrap the widget. I decided to give it a try. I'm sure this is going to break more than it's going to fix, but I'm doing it "properly" now. Note: You're going to have to do a lot more CSS hacks to get it to look right in some themes.
58
+
59
  1.2.1 - Fixed an issue with Orkut icon staying on even if the field is blank. Fixed an issue with 32 pixel default icons appearing as 64 pixels.
60
 
61
  1.2 -
social-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Social Media Widget
4
  * Plugin URI: http://www.idontlikethisgame.com/updates/social-media-widget/
5
  * Description: Place social media icons on your Sidebar by inputting URLs to your profiles!
6
- * Version: 1.2.1
7
  * Author: Brian Freytag
8
  * Author URL: http://www.idontlikethisgame.com
9
  **/
@@ -75,102 +75,104 @@ class Social_Widget extends WP_Widget {
75
  $icon_ie = $icon_opacity * 100;
76
 
77
  /* Before widget (defined by themes). */
78
- echo "<div class=\"socialmedia\">";
79
 
80
  /* Display the widget title if one was input (before and after defined by themes). */
81
  if ( $title )
82
  echo $before_title . $title . $after_title;
83
 
84
- echo "<div class=\"socialmedia-buttons\">";
85
  /* Display linked images to profiles from widget settings if one was input. */
86
 
87
  // Facebook
88
  if ( $facebook != '') {
89
- ?> <a href="<?php echo $facebook; ?>" target="_blank"> <img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/facebook.png" alt="<?php echo $title; ?> on Facebook" title="<?php echo $title; ?> on Facebook" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;"/></a> <?php
90
  } else {
91
  echo ''; //If no URL inputed
92
  }
93
 
94
  // Twitter
95
  if ( $twitter != '' ) {
96
- ?> <a href="<?php echo $twitter; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/twitter.png" alt="<?php echo $title; ?> on Twitter"
97
- title="<?php echo $title; ?> on Twitter" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> <?php
98
  } else {
99
  echo ''; //If no URL inputed
100
  }
101
 
102
  // MySpace
103
  if ( $myspace != '' ) {
104
- ?> <a href="<?php echo $myspace; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/myspace.png" alt="<?php echo $title; ?> on MySpace"
105
- title="<?php echo $title; ?> on MySpace" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> <?php
106
  } else {
107
  echo ''; //If no URL inputed
108
  }
109
 
110
  // Orkut
111
  if ( $orkut != '' ) {
112
- ?> <a href="<?php echo $orkut; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/orkut.png" alt="<?php echo $title; ?> on Orkut"
113
- title="<?php echo $title; ?> on Orkut" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> <?php
114
  } else {
115
  echo ''; //If no URL inputed
116
  }
117
 
118
  // LinkedIN
119
  if ( $linkedin != '' ) {
120
- ?> <a href="<?php echo $linkedin; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/linkedin.png" alt="<?php echo $title; ?> on LinkedIn"
121
- title="<?php echo $title; ?> on LinkedIn" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> <?php
122
  } else {
123
  echo ''; //If no URL inputed
124
  }
125
 
126
  // YouTube
127
  if ( $youtube != '' ) {
128
- ?> <a href="<?php echo $youtube; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/youtube.png" alt="<?php echo $title; ?> on YouTube"
129
- title="<?php echo $title; ?> on YouTube" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> <?php
130
  } else {
131
  echo ''; //If No URL Inputed
132
  }
133
 
134
  // Digg
135
  if ( $digg != '' ) {
136
- ?> <a href="<?php echo $digg; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/digg.png" alt="<?php echo $title; ?> on Digg"
137
- title="<?php echo $title; ?> on Digg" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> <?php
138
  } else {
139
  echo ''; //If no URL Inputed
140
  }
141
 
142
  // Reddit
143
  if ( $reddit != '' ) {
144
- ?> <a href="<?php echo $reddit; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/reddit.png" alt="<?php echo $title; ?> on Reddit"
145
- title="<?php echo $title; ?> on Reddit" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> <?php
146
  } else {
147
  echo ''; //If no URL Inputed
148
  }
149
 
150
  // Google Buzz
151
  if ( $buzz != '' ) {
152
- ?> <a href="<?php echo $buzz; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/buzz.png" alt="<?php echo $title; ?> on Buzz"
153
- title="<?php echo $title; ?> on Buzz" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> <?php
154
  } else {
155
  echo ''; //If no URL Inputed
156
  }
157
 
158
  // RSS
159
  if ( $rss != '') {
160
- ?> <a href="<?php echo $rss; ?>"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/rss.png" alt="Subscribe to our RSS Feeds" title="Subscribe to our RSS Feeds" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> <?php
161
  } else {
162
  echo '';// If no URL Inputed
163
  }
164
 
165
  // E-mail Subscription -- If Newsletter or Mailing List available
166
  if ( $subscribe != '' ) {
167
- ?> <a href="<?php echo $subscribe; ?>"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/email.png" alt="Join our Mailing List" title="Join Our Mailing List" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a><?php
168
  } else {
169
  echo ''; // If no URL Inputed
170
  }
171
 
172
  /* After widget (defined by themes). */
173
- echo "</div></div>";
 
 
174
  }
175
 
176
  /* Update the widget settings */
3
  * Plugin Name: Social Media Widget
4
  * Plugin URI: http://www.idontlikethisgame.com/updates/social-media-widget/
5
  * Description: Place social media icons on your Sidebar by inputting URLs to your profiles!
6
+ * Version: 1.2.2
7
  * Author: Brian Freytag
8
  * Author URL: http://www.idontlikethisgame.com
9
  **/
75
  $icon_ie = $icon_opacity * 100;
76
 
77
  /* Before widget (defined by themes). */
78
+ echo $before_widget;
79
 
80
  /* Display the widget title if one was input (before and after defined by themes). */
81
  if ( $title )
82
  echo $before_title . $title . $after_title;
83
 
84
+ echo "<ul class=\"socialmedia-buttons\">";
85
  /* Display linked images to profiles from widget settings if one was input. */
86
 
87
  // Facebook
88
  if ( $facebook != '') {
89
+ ?> <li><a href="<?php echo $facebook; ?>" target="_blank"> <img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/facebook.png" alt="<?php echo $title; ?> on Facebook" title="<?php echo $title; ?> on Facebook" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;"/></a> </li><?php
90
  } else {
91
  echo ''; //If no URL inputed
92
  }
93
 
94
  // Twitter
95
  if ( $twitter != '' ) {
96
+ ?><li> <a href="<?php echo $twitter; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/twitter.png" alt="<?php echo $title; ?> on Twitter"
97
+ title="<?php echo $title; ?> on Twitter" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> </li><?php
98
  } else {
99
  echo ''; //If no URL inputed
100
  }
101
 
102
  // MySpace
103
  if ( $myspace != '' ) {
104
+ ?> <li><a href="<?php echo $myspace; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/myspace.png" alt="<?php echo $title; ?> on MySpace"
105
+ title="<?php echo $title; ?> on MySpace" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a></li><?php
106
  } else {
107
  echo ''; //If no URL inputed
108
  }
109
 
110
  // Orkut
111
  if ( $orkut != '' ) {
112
+ ?> <li><a href="<?php echo $orkut; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/orkut.png" alt="<?php echo $title; ?> on Orkut"
113
+ title="<?php echo $title; ?> on Orkut" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> </li><?php
114
  } else {
115
  echo ''; //If no URL inputed
116
  }
117
 
118
  // LinkedIN
119
  if ( $linkedin != '' ) {
120
+ ?><li> <a href="<?php echo $linkedin; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/linkedin.png" alt="<?php echo $title; ?> on LinkedIn"
121
+ title="<?php echo $title; ?> on LinkedIn" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a></li> <?php
122
  } else {
123
  echo ''; //If no URL inputed
124
  }
125
 
126
  // YouTube
127
  if ( $youtube != '' ) {
128
+ ?><li> <a href="<?php echo $youtube; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/youtube.png" alt="<?php echo $title; ?> on YouTube"
129
+ title="<?php echo $title; ?> on YouTube" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> </li><?php
130
  } else {
131
  echo ''; //If No URL Inputed
132
  }
133
 
134
  // Digg
135
  if ( $digg != '' ) {
136
+ ?><li> <a href="<?php echo $digg; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/digg.png" alt="<?php echo $title; ?> on Digg"
137
+ title="<?php echo $title; ?> on Digg" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a></li> <?php
138
  } else {
139
  echo ''; //If no URL Inputed
140
  }
141
 
142
  // Reddit
143
  if ( $reddit != '' ) {
144
+ ?><li><a href="<?php echo $reddit; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/reddit.png" alt="<?php echo $title; ?> on Reddit"
145
+ title="<?php echo $title; ?> on Reddit" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a></li> <?php
146
  } else {
147
  echo ''; //If no URL Inputed
148
  }
149
 
150
  // Google Buzz
151
  if ( $buzz != '' ) {
152
+ ?><li> <a href="<?php echo $buzz; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/buzz.png" alt="<?php echo $title; ?> on Buzz"
153
+ title="<?php echo $title; ?> on Buzz" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a></li> <?php
154
  } else {
155
  echo ''; //If no URL Inputed
156
  }
157
 
158
  // RSS
159
  if ( $rss != '') {
160
+ ?><li><a href="<?php echo $rss; ?>"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/rss.png" alt="Subscribe to our RSS Feeds" title="Subscribe to our RSS Feeds" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a></li> <?php
161
  } else {
162
  echo '';// If no URL Inputed
163
  }
164
 
165
  // E-mail Subscription -- If Newsletter or Mailing List available
166
  if ( $subscribe != '' ) {
167
+ ?><li> <a href="<?php echo $subscribe; ?>"><img class="subscribes" src="<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/email.png" alt="Join our Mailing List" title="Join Our Mailing List" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a></li><?php
168
  } else {
169
  echo ''; // If no URL Inputed
170
  }
171
 
172
  /* After widget (defined by themes). */
173
+ echo "</ul>";
174
+
175
+ echo $after_widget;
176
  }
177
 
178
  /* Update the widget settings */
social_widget.css CHANGED
@@ -1,26 +1,38 @@
1
  /* Custom Styles For The Social Media Widget Icons */
2
 
3
- .socialmedia-buttons {
4
  margin-top: 5px;
5
  margin-left: 10px;
 
 
 
 
6
  }
7
 
8
- .socialmedia-buttons img {
9
- margin-right: 10px;
 
 
 
 
10
  }
11
 
12
- .socialmedia-buttons a,
 
 
 
 
13
  .author-list a{
14
  background: none !important;
15
  }
16
 
17
- .socialmedia-buttons a:hover {
18
  text-decoration: none;
19
  border: 0;
20
  }
21
 
22
- .socialmedia-buttons img:hover {
23
  filter: alpha(opacity=100) !important;
24
  opacity: 1 !important;
25
  -moz-opacity: 1 !important;
26
- }
1
  /* Custom Styles For The Social Media Widget Icons */
2
 
3
+ /*.socialmedia-buttons {
4
  margin-top: 5px;
5
  margin-left: 10px;
6
+ }*/
7
+
8
+ ul.socialmedia-buttons {
9
+ margin-top: 5px !important;
10
  }
11
 
12
+ ul.socialmedia-buttons li {
13
+ display: inline;
14
+ list-style: none;
15
+ background: none !important;
16
+ padding: 0 !important;
17
+ margin-right: 10px !important;
18
  }
19
 
20
+ ul.socialmedia-buttons img {
21
+ border: 0 !important;
22
+ }
23
+
24
+ ul.socialmedia-buttons a,
25
  .author-list a{
26
  background: none !important;
27
  }
28
 
29
+ ul.socialmedia-buttons a:hover {
30
  text-decoration: none;
31
  border: 0;
32
  }
33
 
34
+ ul.socialmedia-buttons img:hover {
35
  filter: alpha(opacity=100) !important;
36
  opacity: 1 !important;
37
  -moz-opacity: 1 !important;
38
+ }