Version Description
Download this release
Release Info
Developer | brianfreytag |
Plugin | Social Media Widget |
Version | 1.0 |
Comparing to | |
See all releases |
Version 1.0
- images/default/16/buzz.png +0 -0
- images/default/16/digg.png +0 -0
- images/default/16/email.png +0 -0
- images/default/16/facebook.png +0 -0
- images/default/16/myspace.png +0 -0
- images/default/16/reddit.png +0 -0
- images/default/16/rss.png +0 -0
- images/default/16/twitter.png +0 -0
- images/default/16/youtube.png +0 -0
- images/default/32/buzz.png +0 -0
- images/default/32/digg.png +0 -0
- images/default/32/email.png +0 -0
- images/default/32/facebook.png +0 -0
- images/default/32/myspace.png +0 -0
- images/default/32/reddit.png +0 -0
- images/default/32/rss.png +0 -0
- images/default/32/twitter.png +0 -0
- images/default/32/youtube.png +0 -0
- images/default/64/buzz.png +0 -0
- images/default/64/digg.png +0 -0
- images/default/64/email.png +0 -0
- images/default/64/facebook.png +0 -0
- images/default/64/myspace.png +0 -0
- images/default/64/reddit.png +0 -0
- images/default/64/rss.png +0 -0
- images/default/64/twitter.png +0 -0
- images/default/64/youtube.png +0 -0
- images/default/readme.txt +11 -0
- images/heart/16/buzz.png +0 -0
- images/heart/16/digg.png +0 -0
- images/heart/16/email.png +0 -0
- images/heart/16/facebook.png +0 -0
- images/heart/16/myspace.png +0 -0
- images/heart/16/reddit.png +0 -0
- images/heart/16/rss.png +0 -0
- images/heart/16/twitter.png +0 -0
- images/heart/16/youtube.png +0 -0
- images/heart/32/buzz.png +0 -0
- images/heart/32/digg.png +0 -0
- images/heart/32/email.png +0 -0
- images/heart/32/facebook.png +0 -0
- images/heart/32/myspace.png +0 -0
- images/heart/32/reddit.png +0 -0
- images/heart/32/rss.png +0 -0
- images/heart/32/twitter.png +0 -0
- images/heart/32/youtube.png +0 -0
- images/heart/64/buzz.png +0 -0
- images/heart/64/digg.png +0 -0
- images/heart/64/email.png +0 -0
- images/heart/64/facebook.png +0 -0
- images/heart/64/myspace.png +0 -0
- images/heart/64/reddit.png +0 -0
- images/heart/64/rss.png +0 -0
- images/heart/64/twitter.png +0 -0
- images/heart/64/youtube.png +0 -0
- images/heart/readme.txt +4 -0
- images/sketch/16/buzz.png +0 -0
- images/sketch/16/digg.png +0 -0
- images/sketch/16/email.png +0 -0
- images/sketch/16/facebook.png +0 -0
- images/sketch/16/myspace.png +0 -0
- images/sketch/16/reddit.png +0 -0
- images/sketch/16/rss.png +0 -0
- images/sketch/16/twitter.png +0 -0
- images/sketch/16/youtube.png +0 -0
- images/sketch/32/buzz.png +0 -0
- images/sketch/32/digg.png +0 -0
- images/sketch/32/email.png +0 -0
- images/sketch/32/facebook.png +0 -0
- images/sketch/32/myspace.png +0 -0
- images/sketch/32/reddit.png +0 -0
- images/sketch/32/rss.png +0 -0
- images/sketch/32/twitter.png +0 -0
- images/sketch/32/youtube.png +0 -0
- images/sketch/64/buzz.png +0 -0
- images/sketch/64/digg.png +0 -0
- images/sketch/64/email.png +0 -0
- images/sketch/64/facebook.png +0 -0
- images/sketch/64/myspace.png +0 -0
- images/sketch/64/reddit.png +0 -0
- images/sketch/64/rss.png +0 -0
- images/sketch/64/twitter.png +0 -0
- images/sketch/64/youtube.png +0 -0
- images/sketch/readme.txt +4 -0
- readme.txt +52 -0
- social-widget.php +306 -0
- social_widget.css +26 -0
images/default/16/buzz.png
ADDED
Binary file
|
images/default/16/digg.png
ADDED
Binary file
|
images/default/16/email.png
ADDED
Binary file
|
images/default/16/facebook.png
ADDED
Binary file
|
images/default/16/myspace.png
ADDED
Binary file
|
images/default/16/reddit.png
ADDED
Binary file
|
images/default/16/rss.png
ADDED
Binary file
|
images/default/16/twitter.png
ADDED
Binary file
|
images/default/16/youtube.png
ADDED
Binary file
|
images/default/32/buzz.png
ADDED
Binary file
|
images/default/32/digg.png
ADDED
Binary file
|
images/default/32/email.png
ADDED
Binary file
|
images/default/32/facebook.png
ADDED
Binary file
|
images/default/32/myspace.png
ADDED
Binary file
|
images/default/32/reddit.png
ADDED
Binary file
|
images/default/32/rss.png
ADDED
Binary file
|
images/default/32/twitter.png
ADDED
Binary file
|
images/default/32/youtube.png
ADDED
Binary file
|
images/default/64/buzz.png
ADDED
Binary file
|
images/default/64/digg.png
ADDED
Binary file
|
images/default/64/email.png
ADDED
Binary file
|
images/default/64/facebook.png
ADDED
Binary file
|
images/default/64/myspace.png
ADDED
Binary file
|
images/default/64/reddit.png
ADDED
Binary file
|
images/default/64/rss.png
ADDED
Binary file
|
images/default/64/twitter.png
ADDED
Binary file
|
images/default/64/youtube.png
ADDED
Binary file
|
images/default/readme.txt
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Credits For This Icon Set Go To:
|
2 |
+
|
3 |
+
Twitter, RSS, Reddit, YouTube: FastIcon via http://www.iconspedia.com
|
4 |
+
|
5 |
+
Facebook, Digg, MySpace: Quaqe9 via http://www.iconspedia.com
|
6 |
+
|
7 |
+
E-mail: Zige Zhao via http://www.iconspedia.com
|
8 |
+
|
9 |
+
Buzz: Iconshock via http://www.iconspedia.com
|
10 |
+
|
11 |
+
|
images/heart/16/buzz.png
ADDED
Binary file
|
images/heart/16/digg.png
ADDED
Binary file
|
images/heart/16/email.png
ADDED
Binary file
|
images/heart/16/facebook.png
ADDED
Binary file
|
images/heart/16/myspace.png
ADDED
Binary file
|
images/heart/16/reddit.png
ADDED
Binary file
|
images/heart/16/rss.png
ADDED
Binary file
|
images/heart/16/twitter.png
ADDED
Binary file
|
images/heart/16/youtube.png
ADDED
Binary file
|
images/heart/32/buzz.png
ADDED
Binary file
|
images/heart/32/digg.png
ADDED
Binary file
|
images/heart/32/email.png
ADDED
Binary file
|
images/heart/32/facebook.png
ADDED
Binary file
|
images/heart/32/myspace.png
ADDED
Binary file
|
images/heart/32/reddit.png
ADDED
Binary file
|
images/heart/32/rss.png
ADDED
Binary file
|
images/heart/32/twitter.png
ADDED
Binary file
|
images/heart/32/youtube.png
ADDED
Binary file
|
images/heart/64/buzz.png
ADDED
Binary file
|
images/heart/64/digg.png
ADDED
Binary file
|
images/heart/64/email.png
ADDED
Binary file
|
images/heart/64/facebook.png
ADDED
Binary file
|
images/heart/64/myspace.png
ADDED
Binary file
|
images/heart/64/reddit.png
ADDED
Binary file
|
images/heart/64/rss.png
ADDED
Binary file
|
images/heart/64/twitter.png
ADDED
Binary file
|
images/heart/64/youtube.png
ADDED
Binary file
|
images/heart/readme.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
Credits For This Icon Set Go To The Design Superhero:
|
2 |
+
Heart v2:
|
3 |
+
|
4 |
+
http://thedesignsuperhero.com/2009/03/heart-v2-free-social-iconset-in-heart-shape/
|
images/sketch/16/buzz.png
ADDED
Binary file
|
images/sketch/16/digg.png
ADDED
Binary file
|
images/sketch/16/email.png
ADDED
Binary file
|
images/sketch/16/facebook.png
ADDED
Binary file
|
images/sketch/16/myspace.png
ADDED
Binary file
|
images/sketch/16/reddit.png
ADDED
Binary file
|
images/sketch/16/rss.png
ADDED
Binary file
|
images/sketch/16/twitter.png
ADDED
Binary file
|
images/sketch/16/youtube.png
ADDED
Binary file
|
images/sketch/32/buzz.png
ADDED
Binary file
|
images/sketch/32/digg.png
ADDED
Binary file
|
images/sketch/32/email.png
ADDED
Binary file
|
images/sketch/32/facebook.png
ADDED
Binary file
|
images/sketch/32/myspace.png
ADDED
Binary file
|
images/sketch/32/reddit.png
ADDED
Binary file
|
images/sketch/32/rss.png
ADDED
Binary file
|
images/sketch/32/twitter.png
ADDED
Binary file
|
images/sketch/32/youtube.png
ADDED
Binary file
|
images/sketch/64/buzz.png
ADDED
Binary file
|
images/sketch/64/digg.png
ADDED
Binary file
|
images/sketch/64/email.png
ADDED
Binary file
|
images/sketch/64/facebook.png
ADDED
Binary file
|
images/sketch/64/myspace.png
ADDED
Binary file
|
images/sketch/64/reddit.png
ADDED
Binary file
|
images/sketch/64/rss.png
ADDED
Binary file
|
images/sketch/64/twitter.png
ADDED
Binary file
|
images/sketch/64/youtube.png
ADDED
Binary file
|
images/sketch/readme.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
Credits For This Icon Set Go To ~TheG-Force via:
|
2 |
+
http://theg-force.deviantart.com/art/Social-Icons-hand-drawned-109467069\
|
3 |
+
|
4 |
+
E-mail icon: Janko At Warp Speed - Handycons via http://www.jankoatwarpspeed.com/post/2008/10/20/handycons-a-free-hand-drawn-social-media-icon-set.aspx
|
readme.txt
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Social Media Widget ===
|
2 |
+
Contributors: Brian Freytag with special thanks to iconspedia.com, jankoatwarpspeed.com, and thedesignsuperhero.com for the icons used in this project.
|
3 |
+
Tags: social media, twitter, facebook, myspace, digg, email,
|
4 |
+
Requires at least: 2.7.2
|
5 |
+
Tested up to: 3.0 beta 2
|
6 |
+
Stable tag: 1.0
|
7 |
+
|
8 |
+
== Description ==
|
9 |
+
|
10 |
+
The Social Media Widget is a simple sidebar widget that allows users to input their social media website profile URLs and other subscription options to show an icon on the sidebar to that social media site and more that open up in a separate browser window.
|
11 |
+
|
12 |
+
= Features =
|
13 |
+
|
14 |
+
* Supports the following social media sites:
|
15 |
+
* Facebook
|
16 |
+
* Twitter
|
17 |
+
* MySpace
|
18 |
+
* YouTube
|
19 |
+
* Digg
|
20 |
+
* Reddit
|
21 |
+
* Buzz
|
22 |
+
* RSS
|
23 |
+
* E-mail Subscription Info Page (or mailto: address)
|
24 |
+
|
25 |
+
* Ability to select from 3 different sizes of icons:
|
26 |
+
* 16x16
|
27 |
+
* 32x32
|
28 |
+
* 64x64
|
29 |
+
|
30 |
+
* Ability to select from 3 different icon packages:
|
31 |
+
* Web 2.0 (Default) - Icons from various artists at: http://www.iconspedia.com/
|
32 |
+
* Sketch - Handycons by Janko At Warp Speed at: http://www.jankoatwarpspeed.com/post/2008/10/20/handycons-a-free-hand-drawn-social-media-icon-set.aspx
|
33 |
+
* Heart - Heart v2 by The Design Superhero at: http://thedesignsuperhero.com/2009/03/heart-v2-free-social-iconset-in-heart-shape/
|
34 |
+
|
35 |
+
* Ability to choose starting icon opacity from 50% opacity to 100% opacity
|
36 |
+
note: on hover, icons are 100% opaque
|
37 |
+
|
38 |
+
== Installation ==
|
39 |
+
|
40 |
+
Follow the steps below to install the plugin.
|
41 |
+
|
42 |
+
1. Upload the social-widget directory to the /wp-content/plugins/ directory
|
43 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress
|
44 |
+
3. Go to Appearance/Widgets and activate the widget to customize
|
45 |
+
|
46 |
+
== Help ==
|
47 |
+
|
48 |
+
For help, you can send an e-mail to brifreytag_at_gmail.com or get ahold of me via twitter at @brianfreytag
|
49 |
+
|
50 |
+
== Changelog ==
|
51 |
+
|
52 |
+
1.0 - Added support for varying sizes, added 2 new icon packages, added support for varying opacities.
|
social-widget.php
ADDED
@@ -0,0 +1,306 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin Name: Social Media Widget
|
4 |
+
* Plugin URI: http://www.idontlikethisgame.com
|
5 |
+
* Description: Place social media icons on your Sidebar by inputting URLs to your profiles!
|
6 |
+
* Version: 1.0
|
7 |
+
* Author: Brian Freytag
|
8 |
+
* Author URL: http://www.idontlikethisgame.com
|
9 |
+
**/
|
10 |
+
|
11 |
+
/* Get the path of the widget */
|
12 |
+
|
13 |
+
$social_widget_path = WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__)).'/';
|
14 |
+
|
15 |
+
/* Get custom stylesheet */
|
16 |
+
wp_enqueue_style('social_widget_css',$social_widget_path.'social_widget.css');
|
17 |
+
|
18 |
+
/* Load custom stylesheet as print style */
|
19 |
+
add_action('wp_print_styles', 'social_widget_css');
|
20 |
+
|
21 |
+
/* Load the widget */
|
22 |
+
add_action( 'widgets_init', 'socialwidget_load_widgets' );
|
23 |
+
|
24 |
+
/* Register the widget */
|
25 |
+
function socialwidget_load_widgets() {
|
26 |
+
register_widget( 'Social_Widget' );
|
27 |
+
}
|
28 |
+
|
29 |
+
/* Begin Widget Class */
|
30 |
+
class Social_Widget extends WP_Widget {
|
31 |
+
|
32 |
+
/* Widget setup */
|
33 |
+
function Social_Widget() {
|
34 |
+
/* Widget settings. */
|
35 |
+
$widget_ops = array( 'classname' => 'Social Widget', 'description' => __('A widget that allows the user to display social media icons in their sidebar', 'test') );
|
36 |
+
|
37 |
+
/* Widget control settings. */
|
38 |
+
$control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'social-widget' );
|
39 |
+
|
40 |
+
/* Create the widget. */
|
41 |
+
$this->WP_Widget( 'social-widget', __('Social Widget', 'example'), $widget_ops, $control_ops );
|
42 |
+
}
|
43 |
+
|
44 |
+
/* Display the widget */
|
45 |
+
function widget( $args, $instance ) {
|
46 |
+
extract( $args );
|
47 |
+
|
48 |
+
/* Our variables from the widget settings. */
|
49 |
+
$title = apply_filters('widget_title', $instance['title'] );
|
50 |
+
$facebook = $instance['facebook'];
|
51 |
+
$twitter = $instance['twitter'];
|
52 |
+
$myspace = $instance['myspace'];
|
53 |
+
$youtube = $instance['youtube'];
|
54 |
+
$digg = $instance['digg'];
|
55 |
+
$reddit = $instance['reddit'];
|
56 |
+
$buzz = $instance['buzz'];
|
57 |
+
$rss = $instance['rss_url'];
|
58 |
+
$subscribe = $instance['subscribe'];
|
59 |
+
$icon_size = $instance['icon_size'];
|
60 |
+
$icon_pack = $instance['icon_pack'];
|
61 |
+
$icon_opacity = $instance['icon_opacity'];
|
62 |
+
|
63 |
+
/* Choose Icon Size if Value is 'default' */
|
64 |
+
if($icon_size == 'default') {
|
65 |
+
$icon_size = '32';
|
66 |
+
}
|
67 |
+
|
68 |
+
/* Choose icon opacity if Value is 'default' */
|
69 |
+
if($icon_opacity == 'default') {
|
70 |
+
$icon_opacity = '0.8';
|
71 |
+
}
|
72 |
+
|
73 |
+
/* Need to make opacity a whole number for IE styling filter() */
|
74 |
+
$icon_ie = $icon_opacity * 100;
|
75 |
+
|
76 |
+
/* Before widget (defined by themes). */
|
77 |
+
echo "<div class=\"socialmedia\">";
|
78 |
+
|
79 |
+
/* Display the widget title if one was input (before and after defined by themes). */
|
80 |
+
if ( $title )
|
81 |
+
echo $before_title . $title . $after_title;
|
82 |
+
|
83 |
+
echo "<div class=\"socialmedia-buttons\">";
|
84 |
+
/* Display linked images to profiles from widget settings if one was input. */
|
85 |
+
|
86 |
+
// Facebook
|
87 |
+
if ( $facebook != '') {
|
88 |
+
?> <a href="<?php echo $facebook; ?>" target="_blank"> <img class="subscribes" src="<?php echo WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__)).'/'; ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/facebook.png" alt="Follow us on Facebook!" title="Follow us on Facebook!" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;"/></a> <?php
|
89 |
+
} else {
|
90 |
+
echo ''; //If no URL inputed
|
91 |
+
}
|
92 |
+
|
93 |
+
// Twitter
|
94 |
+
if ( $twitter != '' ) {
|
95 |
+
?> <a href="<?php echo $twitter; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__)).'/'; ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/twitter.png" alt="Follow us on Twitter!"
|
96 |
+
title="Follow us on Twitter!" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> <?php
|
97 |
+
} else {
|
98 |
+
echo ''; //If no URL inputed
|
99 |
+
}
|
100 |
+
|
101 |
+
// MySpace
|
102 |
+
if ( $myspace != '' ) {
|
103 |
+
?> <a href="<?php echo $myspace; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__)).'/'; ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/myspace.png" alt="Follow us on Twitter!"
|
104 |
+
title="Follow us on MySpace!" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> <?php
|
105 |
+
} else {
|
106 |
+
echo ''; //If no URL inputed
|
107 |
+
}
|
108 |
+
|
109 |
+
// YouTube
|
110 |
+
if ( $youtube != '' ) {
|
111 |
+
?> <a href="<?php echo $youtube; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__)).'/'; ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/youtube.png" alt="Follow us on YouTube!"
|
112 |
+
title="Follow us on YouTube!" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> <?php
|
113 |
+
} else {
|
114 |
+
echo ''; //If No URL Inputed
|
115 |
+
}
|
116 |
+
|
117 |
+
// Digg
|
118 |
+
if ( $digg != '' ) {
|
119 |
+
?> <a href="<?php echo $digg; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__)).'/'; ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/digg.png" alt="Follow us on Digg!"
|
120 |
+
title="Follow us on Digg!" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> <?php
|
121 |
+
} else {
|
122 |
+
echo ''; //If no URL Inputed
|
123 |
+
}
|
124 |
+
|
125 |
+
// Reddit
|
126 |
+
if ( $reddit != '' ) {
|
127 |
+
?> <a href="<?php echo $reddit; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__)).'/'; ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/reddit.png" alt="Follow us on Reddit!"
|
128 |
+
title="Follow us on Reddit!" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> <?php
|
129 |
+
} else {
|
130 |
+
echo ''; //If no URL Inputed
|
131 |
+
}
|
132 |
+
|
133 |
+
// Google Buzz
|
134 |
+
if ( $buzz != '' ) {
|
135 |
+
?> <a href="<?php echo $buzz; ?>" target="_blank"><img class="subscribes" src="<?php echo WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__)).'/'; ?>images/<?php echo $icon_pack.'/'.$icon_size; ?>/buzz.png" alt="Follow us on Buzz!"
|
136 |
+
title="Follow us on Buzz!" style="filter: alpha(opacity=<?php echo $icon_ie;?>); opacity: <?php echo $icon_opacity;?>; -moz-opacity: <?php echo $icon_opacity;?>;" /></a> <?php
|
137 |
+
} else {
|
138 |
+
echo ''; //If no URL Inputed
|
139 |
+
}
|
140 |
+
|
141 |
+
// RSS
|
142 |
+
if ( $rss != '') {
|
143 |
+
?> <a href="<?php echo $rss; ?>"><img class="subscribes" src="<?php echo WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__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
|
144 |
+
} else {
|
145 |
+
echo '';// If no URL Inputed
|
146 |
+
}
|
147 |
+
|
148 |
+
// E-mail Subscription -- If Newsletter or Mailing List available
|
149 |
+
if ( $subscribe != '' ) {
|
150 |
+
?> <a href="<?php echo $subscribe; ?>"><img class="subscribes" src="<?php echo WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__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
|
151 |
+
} else {
|
152 |
+
echo ''; // If no URL Inputed
|
153 |
+
}
|
154 |
+
|
155 |
+
/* After widget (defined by themes). */
|
156 |
+
echo "</div></div>";
|
157 |
+
}
|
158 |
+
|
159 |
+
/* Update the widget settings */
|
160 |
+
function update( $new_instance, $old_instance ) {
|
161 |
+
$instance = $old_instance;
|
162 |
+
|
163 |
+
/* Strip Tags For Text Boxes */
|
164 |
+
$instance['title'] = strip_tags( $new_instance['title'] );
|
165 |
+
$instance['facebook'] = strip_tags( $new_instance['facebook'] );
|
166 |
+
$instance['twitter'] = strip_tags( $new_instance['twitter'] );
|
167 |
+
$instance['myspace'] = strip_tags( $new_instance['myspace'] );
|
168 |
+
$instance['youtube'] = strip_tags( $new_instance['youtube'] );
|
169 |
+
$instance['digg'] = strip_tags( $new_instance['digg'] );
|
170 |
+
$instance['reddit'] = strip_tags( $new_instance['reddit'] );
|
171 |
+
$instance['buzz'] = strip_tags( $new_instance['buzz'] );
|
172 |
+
$instance['rss_url'] = strip_tags( $new_instance['rss_url'] );
|
173 |
+
$instance['subscribe'] = strip_tags( $new_instance['subscribe'] );
|
174 |
+
$instance['icon_size'] = $new_instance['icon_size'];
|
175 |
+
$instance['icon_pack'] = $new_instance['icon_pack'];
|
176 |
+
$instance['icon_opacity'] = $new_instance['icon_opacity'];
|
177 |
+
|
178 |
+
return $instance;
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Displays the widget settings controls on the widget panel.
|
183 |
+
* Make use of the get_field_id() and get_field_name() function
|
184 |
+
* when creating your form elements. This handles the confusing stuff.
|
185 |
+
*/
|
186 |
+
function form( $instance ) {
|
187 |
+
|
188 |
+
/* Set up some default widget settings. */
|
189 |
+
$defaults = array(
|
190 |
+
'title' => __('Follow Us!', 'test'),
|
191 |
+
'facebook' => __('http://www.facebook.com/your_name', 'test'),
|
192 |
+
'twitter' => __('http://www.twitter.com/yourname', 'test'),
|
193 |
+
'myspace' => __('http://www.myspace.com/yourname', 'test'),
|
194 |
+
'youtube' => __('http://www.youtube.com/user/yourname', 'test'),
|
195 |
+
'digg' => __('http://www.digg.com/users/yourname', 'test'),
|
196 |
+
'reddit' => __('http://www.reddit.com/user/yourname', 'test'),
|
197 |
+
'buzz' => __('http://www.google.com/profiles/yourname#buzz', 'test'),
|
198 |
+
'icon_size' => 'default',
|
199 |
+
'icon_pack' => 'default',
|
200 |
+
'icon_opacity' => 'default');
|
201 |
+
|
202 |
+
$instance = wp_parse_args( (array) $instance, $defaults ); ?>
|
203 |
+
<p>
|
204 |
+
<em>Note: Make sure you include FULL URL (i.e. http://www.example.com)</em><br />
|
205 |
+
If you do not want an icon to be visible, simply delete the supplied URL and leave the input blox blank.
|
206 |
+
</p>
|
207 |
+
<!-- Widget Title: Text Input -->
|
208 |
+
<p>
|
209 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e('Title:', 'hybrid'); ?></label>
|
210 |
+
<input id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" style="width:85%;" />
|
211 |
+
</p>
|
212 |
+
|
213 |
+
<!-- Facebook URL: Text Input -->
|
214 |
+
<p>
|
215 |
+
<label for="<?php echo $this->get_field_id( 'facebook' ); ?>"><?php _e('Facebook URL:', 'test'); ?></label>
|
216 |
+
<input id="<?php echo $this->get_field_id( 'facebook' ); ?>" name="<?php echo $this->get_field_name( 'facebook' ); ?>" value="<?php echo $instance['facebook']; ?>" style="width:85%;" />
|
217 |
+
</p>
|
218 |
+
|
219 |
+
<!-- Twitter URL: Text Input -->
|
220 |
+
<p>
|
221 |
+
<label for="<?php echo $this->get_field_id( 'twitter' ); ?>"><?php _e('Twitter URL:', 'test'); ?></label>
|
222 |
+
<input id="<?php echo $this->get_field_id( 'twitter' ); ?>" name="<?php echo $this->get_field_name( 'twitter' ); ?>" value="<?php echo $instance['twitter']; ?>" style="width:85%;" />
|
223 |
+
</p>
|
224 |
+
|
225 |
+
<!-- MySpace URL: Text Input -->
|
226 |
+
<p>
|
227 |
+
<label for="<?php echo $this->get_field_id( 'myspace' ); ?>"><?php _e('MySpace URL:', 'test'); ?></label>
|
228 |
+
<input id="<?php echo $this->get_field_id( 'myspace' ); ?>" name="<?php echo $this->get_field_name( 'myspace' ); ?>" value="<?php echo $instance['myspace']; ?>" style="width:85%;" />
|
229 |
+
</p>
|
230 |
+
|
231 |
+
<!-- YouTube URL: Text Input -->
|
232 |
+
<p>
|
233 |
+
<label for="<?php echo $this->get_field_id( 'youtube' ); ?>"><?php _e('YouTube URL:', 'test'); ?></label>
|
234 |
+
<input id="<?php echo $this->get_field_id( 'youtube' ); ?>" name="<?php echo $this->get_field_name( 'youtube' ); ?>" value="<?php echo $instance['youtube']; ?>" style="width:85%;" />
|
235 |
+
</p>
|
236 |
+
|
237 |
+
<!-- Digg URL: Text Input -->
|
238 |
+
<p>
|
239 |
+
<label for="<?php echo $this->get_field_id( 'digg' ); ?>"><?php _e('Digg URL:', 'test'); ?></label>
|
240 |
+
<input id="<?php echo $this->get_field_id( 'digg' ); ?>" name="<?php echo $this->get_field_name( 'digg' ); ?>" value="<?php echo $instance['digg']; ?>" style="width:85%;" />
|
241 |
+
</p>
|
242 |
+
|
243 |
+
<!-- Reddit URL: Text Input -->
|
244 |
+
<p>
|
245 |
+
<label for="<?php echo $this->get_field_id( 'reddit' ); ?>"><?php _e('Reddit URL:', 'test'); ?></label>
|
246 |
+
<input id="<?php echo $this->get_field_id( 'reddit' ); ?>" name="<?php echo $this->get_field_name( 'reddit' ); ?>" value="<?php echo $instance['reddit']; ?>" style="width:85%;" />
|
247 |
+
</p>
|
248 |
+
|
249 |
+
<!-- Buzz URL: Text Input -->
|
250 |
+
<p>
|
251 |
+
<label for="<?php echo $this->get_field_id( 'buzz' ); ?>"><?php _e('Buzz URL:', 'test'); ?></label>
|
252 |
+
<input id="<?php echo $this->get_field_id( 'buzz' ); ?>" name="<?php echo $this->get_field_name( 'buzz' ); ?>" value="<?php echo $instance['buzz']; ?>" style="width:85%;" />
|
253 |
+
</p>
|
254 |
+
|
255 |
+
<!-- RSS URL: Text Input -->
|
256 |
+
<p>
|
257 |
+
<label for="<?php echo $this->get_field_id( 'rss_url' ); ?>"><?php _e('RSS URL:', 'test'); ?></label>
|
258 |
+
<input id="<?php echo $this->get_field_id( 'rss_url' ); ?>" name="<?php echo $this->get_field_name( 'rss_url' ); ?>" value="<?php bloginfo('rss2_url') ?>" style="width:85%;" />
|
259 |
+
</p>
|
260 |
+
|
261 |
+
|
262 |
+
<!-- Subscribe URL: Text Input -->
|
263 |
+
<p>
|
264 |
+
<label for="<?php echo $this->get_field_id( 'subscribe' ); ?>"><?php _e('Subscription URL:', 'test'); ?></label>
|
265 |
+
<input id="<?php echo $this->get_field_id( 'subscribe' ); ?>" name="<?php echo $this->get_field_name( 'subscribe' ); ?>" value="<?php echo $instance['subscribe'] ?>" style="width:85%;" />
|
266 |
+
</p>
|
267 |
+
<!-- Choose Icon Size: Dropdown -->
|
268 |
+
<p>
|
269 |
+
<label for="<?php echo $this->get_field_id( 'icon_size' ); ?>"><?php _e('Icon Size', 'test'); ?></label>
|
270 |
+
<select id="<?php echo $this->get_field_id( 'icon_size' ); ?>" name="<?php echo $this->get_field_name( 'icon_size' ); ?>">
|
271 |
+
<option value="16" <?php if($instance['icon_size'] == '16') { echo 'selected'; } ?>>16px</option>
|
272 |
+
<option value="default" <?php if($instance['icon_size'] == 'default') { echo 'selected'; } ?>>Default (32px)</option>
|
273 |
+
<option value="64" <?php if($instance['icon_size'] == '64') { echo 'selected'; } ?>>64px</option>
|
274 |
+
</select>
|
275 |
+
</p>
|
276 |
+
|
277 |
+
<!-- Choose Icon Pack: Dropdown -->
|
278 |
+
<p>
|
279 |
+
<label for="<?php echo $this->get_field_id( 'icon_pack' ); ?>"><?php _e('Icon Pack', 'test'); ?></label>
|
280 |
+
<select id="<?php echo $this->get_field_id( 'icon_pack' ); ?>" name="<?php echo $this->get_field_name( 'icon_pack' ); ?>">
|
281 |
+
<option value="heart" <?php if($instance['icon_pack'] == 'heart') { echo 'selected'; } ?>>Heart Icons</option>
|
282 |
+
<option value="default" <?php if($instance['icon_pack'] == 'default') { echo 'selected'; } ?>>Default Icons (Web2.0)</option>
|
283 |
+
<option value="sketch" <?php if($instance['icon_pack'] == 'sketch') { echo 'selected'; } ?>>Sketch Icons</option>
|
284 |
+
</select>
|
285 |
+
</p>
|
286 |
+
|
287 |
+
<!--Starting Icon Opacity -->
|
288 |
+
<p>
|
289 |
+
<label for="<?php echo $this->get_field_id( 'icon_opacity' ); ?>"><?php _e('Default Icon Opacity', 'test'); ?></label>
|
290 |
+
<select id="<?php echo $this->get_field_id( 'icon_opacity' ); ?>" name="<?php echo $this->get_field_name( 'icon_opacity' ); ?>">
|
291 |
+
<option value="0.5" <?php if($instance['icon_opacity'] == '0.5') { echo 'selected'; } ?>>50%</option>
|
292 |
+
<option value="0.6" <?php if($instance['icon_opacity'] == '0.6') { echo 'selected'; } ?>>60%</option>
|
293 |
+
<option value="0.7" <?php if($instance['icon_opacity'] == '0.7') { echo 'selected'; } ?>>70%</option>
|
294 |
+
<option value="default" <?php if($instance['icon_opacity'] == 'default') { echo 'selected'; } ?>>Default (80%)</option>
|
295 |
+
<option value="0.9" <?php if($instance['icon_opacity'] == '0.9') { echo 'selected'; } ?>>90%</option>
|
296 |
+
<option value="1" <?php if($instance['icon_opacity'] == '1') { echo 'selected'; } ?>>100%</option>
|
297 |
+
</select>
|
298 |
+
</p>
|
299 |
+
|
300 |
+
|
301 |
+
|
302 |
+
<?php
|
303 |
+
}
|
304 |
+
}
|
305 |
+
|
306 |
+
?>
|
social_widget.css
ADDED
@@ -0,0 +1,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 |
+
.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 |
+
}
|