Social Media Widget - Version 1.2.4

Version Description

Download this release

Release Info

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

Code changes from version 1.2.3 to 1.2.4

Files changed (3) hide show
  1. readme.txt +3 -1
  2. social-widget.php +23 -23
  3. social_widget.css +11 -18
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.3
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.3 - As expected, changes in 1.2.2 broke some peoples' stuff. Made a couple CSS changes to see if this fixes it.
58
 
59
  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.
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.4
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.4 - Trying something else to fix the issues with 1.2.2 and 1.2.3.
58
+
59
  1.2.3 - As expected, changes in 1.2.2 broke some peoples' stuff. Made a couple CSS changes to see if this fixes it.
60
 
61
  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.
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.3
7
  * Author: Brian Freytag
8
  * Author URL: http://www.idontlikethisgame.com
9
  **/
@@ -31,7 +31,7 @@ class Social_Widget extends WP_Widget {
31
  /* Widget setup */
32
  function Social_Widget() {
33
  /* Widget settings. */
34
- $widget_ops = array( 'classname' => 'Social Widget', 'description' => __('A widget that allows the user to display social media icons in their sidebar', 'test') );
35
 
36
  /* Widget control settings. */
37
  $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'social-widget' );
@@ -81,96 +81,96 @@ class Social_Widget extends WP_Widget {
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
  }
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.4
7
  * Author: Brian Freytag
8
  * Author URL: http://www.idontlikethisgame.com
9
  **/
31
  /* Widget setup */
32
  function Social_Widget() {
33
  /* Widget settings. */
34
+ $widget_ops = array( 'classname' => 'Social_Widget', 'description' => __('A widget that allows the user to display social media icons in their sidebar', 'test') );
35
 
36
  /* Widget control settings. */
37
  $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'social-widget' );
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>";
174
 
175
  echo $after_widget;
176
  }
social_widget.css CHANGED
@@ -1,38 +1,31 @@
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
- list-style: none !important;
11
  }
12
 
13
- ul.socialmedia-buttons li {
14
- display: inline !important;
15
- list-style: none !important;
16
- background: none !important;
17
  padding: 0 !important;
18
- margin-right: 10px !important;
 
19
  }
20
-
21
- ul.socialmedia-buttons img {
22
  border: 0 !important;
 
23
  }
24
 
25
- ul.socialmedia-buttons a,
26
  .author-list a{
27
  background: none !important;
28
  }
29
 
30
- ul.socialmedia-buttons a:hover {
31
  text-decoration: none;
32
  border: 0;
33
  }
34
 
35
- ul.socialmedia-buttons img:hover {
36
  filter: alpha(opacity=100) !important;
37
  opacity: 1 !important;
38
  -moz-opacity: 1 !important;
1
  /* Custom Styles For The Social Media Widget Icons */
2
 
3
+ .socialmedia-buttons {
4
+ margin-top: 5px 0 0 0;
 
 
 
 
 
 
5
  }
6
 
7
+ li.Social_Widget a {
 
 
 
8
  padding: 0 !important;
9
+ margin: 0 !important;
10
+ background: none !important;
11
  }
12
+
13
+ .socialmedia-buttons img {
14
  border: 0 !important;
15
+ margin-right: 10px;
16
  }
17
 
18
+ .socialmedia-buttons a,
19
  .author-list a{
20
  background: none !important;
21
  }
22
 
23
+ .socialmedia-buttons a:hover {
24
  text-decoration: none;
25
  border: 0;
26
  }
27
 
28
+ .socialmedia-buttons img:hover {
29
  filter: alpha(opacity=100) !important;
30
  opacity: 1 !important;
31
  -moz-opacity: 1 !important;