Version Description
Download this release
Release Info
Developer | dannisbet |
Plugin | Social Icons Widget |
Version | 13.04 |
Comparing to | |
See all releases |
Code changes from version 14.04 to 13.04
- css/social_icons_admin.css +0 -33
- css/social_icons_widget.css +0 -1
- icons/large/_unknown.jpg +0 -0
- icons/large/aboutme.jpg +0 -0
- icons/large/behance.jpg +0 -0
- icons/large/dribbble.jpg +0 -0
- icons/large/email.jpg +0 -0
- icons/large/facebook.jpg +0 -0
- icons/large/facebook.png +0 -0
- icons/large/flickr.jpg +0 -0
- icons/large/forrst.jpg +0 -0
- icons/large/foursquare.jpg +0 -0
- icons/large/github.jpg +0 -0
- icons/large/googleplus.jpg +0 -0
- icons/large/instagram.jpg +0 -0
- icons/large/klout.jpg +0 -0
- icons/large/linkedin.jpg +0 -0
- icons/large/medium.jpg +0 -0
- icons/large/path.jpg +0 -0
- icons/large/pinterest.jpg +0 -0
- icons/large/rss.jpg +0 -0
- icons/large/stumbleupon.jpg +0 -0
- icons/large/tumblr.jpg +0 -0
- icons/large/twitter.jpg +0 -0
- icons/large/vimeo.jpg +0 -0
- icons/large/wordpress.jpg +0 -0
- icons/large/yelp.jpg +0 -0
- icons/large/youtube.jpg +0 -0
- icons/large/zerply.jpg +0 -0
- icons/medium/_unknown.jpg +0 -0
- icons/medium/aboutme.jpg +0 -0
- icons/medium/behance.jpg +0 -0
- icons/medium/dribbble.jpg +0 -0
- icons/medium/email.jpg +0 -0
- icons/medium/facebook.jpg +0 -0
- icons/medium/facebook.png +0 -0
- icons/medium/flickr.jpg +0 -0
- icons/medium/forrst.jpg +0 -0
- icons/medium/foursquare.jpg +0 -0
- icons/medium/github.jpg +0 -0
- icons/medium/googleplus.jpg +0 -0
- icons/medium/instagram.jpg +0 -0
- icons/medium/klout.jpg +0 -0
- icons/medium/linkedin.jpg +0 -0
- icons/medium/medium.jpg +0 -0
- icons/medium/path.jpg +0 -0
- icons/medium/pinterest.jpg +0 -0
- icons/medium/rss.jpg +0 -0
- icons/medium/stumbleupon.jpg +0 -0
- icons/medium/technorati.jpg +0 -0
- icons/medium/tumblr.jpg +0 -0
- icons/medium/twitter.jpg +0 -0
- icons/medium/vimeo.jpg +0 -0
- icons/medium/wordpress.jpg +0 -0
- icons/medium/yelp.jpg +0 -0
- icons/medium/youtube.jpg +0 -0
- icons/medium/zerply.jpg +0 -0
- icons/small/_unknown.jpg +0 -0
- icons/small/aboutme.jpg +0 -0
- icons/small/behance.jpg +0 -0
- icons/small/dribbble.jpg +0 -0
- icons/small/email.jpg +0 -0
- icons/small/facebook.jpg +0 -0
- icons/small/facebook.png +0 -0
- icons/small/flickr.jpg +0 -0
- icons/small/forrst.jpg +0 -0
- icons/small/foursquare.jpg +0 -0
- icons/small/github.jpg +0 -0
- icons/small/googleplus.jpg +0 -0
- icons/small/instagram.jpg +0 -0
- icons/small/klout.jpg +0 -0
- icons/small/linkedin.jpg +0 -0
- icons/small/medium.jpg +0 -0
- icons/small/path.jpg +0 -0
- icons/small/pinterest.jpg +0 -0
- icons/small/rss.jpg +0 -0
- icons/small/stumbleupon.jpg +0 -0
- icons/small/technorati.jpg +0 -0
- icons/small/tumblr.jpg +0 -0
- icons/small/twitter.jpg +0 -0
- icons/small/vimeo.jpg +0 -0
- icons/small/wordpress.jpg +0 -0
- icons/small/yelp.jpg +0 -0
- icons/small/youtube.jpg +0 -0
- icons/small/zerply.jpg +0 -0
- lib/form.php +10 -10
- lib/social-networks.php +0 -50
- lib/widget.php +11 -23
- readme.txt +15 -32
- social-media-icons-widget.php +28 -5
css/social_icons_admin.css
CHANGED
@@ -9,39 +9,6 @@
|
|
9 |
margin-bottom:5px;
|
10 |
}
|
11 |
|
12 |
-
.social_icons_widget .social_accounts label {
|
13 |
-
background-repeat:no-repeat;
|
14 |
-
padding-left:20px;
|
15 |
-
}
|
16 |
-
|
17 |
-
/* Icons for admin widget */
|
18 |
-
.social_icons_widget .aboutme { background-image:url('../icons/small/aboutme.jpg'); }
|
19 |
-
.social_icons_widget .behance { background-image:url('../icons/small/behance.jpg'); }
|
20 |
-
.social_icons_widget .dribbble { background-image:url('../icons/small/dribbble.jpg'); }
|
21 |
-
.social_icons_widget .email { background-image:url('../icons/small/email.jpg'); }
|
22 |
-
.social_icons_widget .facebook { background-image:url('../icons/small/facebook.png'); }
|
23 |
-
.social_icons_widget .flickr { background-image:url('../icons/small/flickr.jpg'); }
|
24 |
-
.social_icons_widget .forrst { background-image:url('../icons/small/forrst.jpg'); }
|
25 |
-
.social_icons_widget .foursquare { background-image:url('../icons/small/foursquare.jpg'); }
|
26 |
-
.social_icons_widget .github { background-image:url('../icons/small/github.jpg'); }
|
27 |
-
.social_icons_widget .googleplus { background-image:url('../icons/small/googleplus.jpg'); }
|
28 |
-
.social_icons_widget .instagram { background-image:url('../icons/small/instagram.jpg'); }
|
29 |
-
.social_icons_widget .klout { background-image:url('../icons/small/klout.jpg'); }
|
30 |
-
.social_icons_widget .linkedin { background-image:url('../icons/small/linkedin.jpg'); }
|
31 |
-
.social_icons_widget .medium { background-image:url('../icons/small/medium.jpg'); }
|
32 |
-
.social_icons_widget .path { background-image:url('../icons/small/path.jpg'); }
|
33 |
-
.social_icons_widget .pinterest { background-image:url('../icons/small/pinterest.jpg'); }
|
34 |
-
.social_icons_widget .rss { background-image:url('../icons/small/rss.jpg'); }
|
35 |
-
.social_icons_widget .stumbleupon { background-image:url('../icons/small/stumbleupon.jpg'); }
|
36 |
-
.social_icons_widget .technorati { background-image:url('../icons/small/technorati.jpg'); }
|
37 |
-
.social_icons_widget .tumblr { background-image:url('../icons/small/tumblr.jpg'); }
|
38 |
-
.social_icons_widget .twitter { background-image:url('../icons/small/twitter.jpg'); }
|
39 |
-
.social_icons_widget .vimeo { background-image:url('../icons/small/vimeo.jpg'); }
|
40 |
-
.social_icons_widget .wordpress { background-image:url('../icons/small/wordpress.jpg'); }
|
41 |
-
.social_icons_widget .yelp { background-image:url('../icons/small/yelp.jpg'); }
|
42 |
-
.social_icons_widget .youtube { background-image:url('../icons/small/youtube.jpg'); }
|
43 |
-
.social_icons_widget .zerply { background-image:url('../icons/small/zerply.jpg'); }
|
44 |
-
|
45 |
.social_icons_widget .icon_options label,
|
46 |
.social_icons_widget .label_options label {
|
47 |
display:inline;
|
9 |
margin-bottom:5px;
|
10 |
}
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
.social_icons_widget .icon_options label,
|
13 |
.social_icons_widget .label_options label {
|
14 |
display:inline;
|
css/social_icons_widget.css
CHANGED
@@ -19,7 +19,6 @@
|
|
19 |
}
|
20 |
|
21 |
.social-icons-widget ul.show-labels li img {
|
22 |
-
float:left;
|
23 |
margin-right:10px;
|
24 |
vertical-align:middle;
|
25 |
}
|
19 |
}
|
20 |
|
21 |
.social-icons-widget ul.show-labels li img {
|
|
|
22 |
margin-right:10px;
|
23 |
vertical-align:middle;
|
24 |
}
|
icons/large/_unknown.jpg
DELETED
Binary file
|
icons/large/aboutme.jpg
DELETED
Binary file
|
icons/large/behance.jpg
CHANGED
Binary file
|
icons/large/dribbble.jpg
CHANGED
Binary file
|
icons/large/email.jpg
DELETED
Binary file
|
icons/large/facebook.jpg
DELETED
Binary file
|
icons/large/facebook.png
ADDED
Binary file
|
icons/large/flickr.jpg
CHANGED
Binary file
|
icons/large/forrst.jpg
CHANGED
Binary file
|
icons/large/foursquare.jpg
CHANGED
Binary file
|
icons/large/github.jpg
DELETED
Binary file
|
icons/large/googleplus.jpg
CHANGED
Binary file
|
icons/large/instagram.jpg
CHANGED
Binary file
|
icons/large/klout.jpg
CHANGED
Binary file
|
icons/large/linkedin.jpg
CHANGED
Binary file
|
icons/large/medium.jpg
DELETED
Binary file
|
icons/large/path.jpg
CHANGED
Binary file
|
icons/large/pinterest.jpg
CHANGED
Binary file
|
icons/large/rss.jpg
CHANGED
Binary file
|
icons/large/stumbleupon.jpg
CHANGED
Binary file
|
icons/large/tumblr.jpg
CHANGED
Binary file
|
icons/large/twitter.jpg
CHANGED
Binary file
|
icons/large/vimeo.jpg
CHANGED
Binary file
|
icons/large/wordpress.jpg
DELETED
Binary file
|
icons/large/yelp.jpg
CHANGED
Binary file
|
icons/large/youtube.jpg
CHANGED
Binary file
|
icons/large/zerply.jpg
CHANGED
Binary file
|
icons/medium/_unknown.jpg
DELETED
Binary file
|
icons/medium/aboutme.jpg
DELETED
Binary file
|
icons/medium/behance.jpg
CHANGED
Binary file
|
icons/medium/dribbble.jpg
CHANGED
Binary file
|
icons/medium/email.jpg
DELETED
Binary file
|
icons/medium/facebook.jpg
DELETED
Binary file
|
icons/medium/facebook.png
ADDED
Binary file
|
icons/medium/flickr.jpg
CHANGED
Binary file
|
icons/medium/forrst.jpg
CHANGED
Binary file
|
icons/medium/foursquare.jpg
CHANGED
Binary file
|
icons/medium/github.jpg
DELETED
Binary file
|
icons/medium/googleplus.jpg
CHANGED
Binary file
|
icons/medium/instagram.jpg
CHANGED
Binary file
|
icons/medium/klout.jpg
CHANGED
Binary file
|
icons/medium/linkedin.jpg
CHANGED
Binary file
|
icons/medium/medium.jpg
DELETED
Binary file
|
icons/medium/path.jpg
CHANGED
Binary file
|
icons/medium/pinterest.jpg
CHANGED
Binary file
|
icons/medium/rss.jpg
CHANGED
Binary file
|
icons/medium/stumbleupon.jpg
CHANGED
Binary file
|
icons/medium/technorati.jpg
CHANGED
Binary file
|
icons/medium/tumblr.jpg
CHANGED
Binary file
|
icons/medium/twitter.jpg
CHANGED
Binary file
|
icons/medium/vimeo.jpg
CHANGED
Binary file
|
icons/medium/wordpress.jpg
DELETED
Binary file
|
icons/medium/yelp.jpg
CHANGED
Binary file
|
icons/medium/youtube.jpg
CHANGED
Binary file
|
icons/medium/zerply.jpg
CHANGED
Binary file
|
icons/small/_unknown.jpg
DELETED
Binary file
|
icons/small/aboutme.jpg
DELETED
Binary file
|
icons/small/behance.jpg
CHANGED
Binary file
|
icons/small/dribbble.jpg
CHANGED
Binary file
|
icons/small/email.jpg
DELETED
Binary file
|
icons/small/facebook.jpg
DELETED
Binary file
|
icons/small/facebook.png
ADDED
Binary file
|
icons/small/flickr.jpg
CHANGED
Binary file
|
icons/small/forrst.jpg
CHANGED
Binary file
|
icons/small/foursquare.jpg
CHANGED
Binary file
|
icons/small/github.jpg
DELETED
Binary file
|
icons/small/googleplus.jpg
CHANGED
Binary file
|
icons/small/instagram.jpg
CHANGED
Binary file
|
icons/small/klout.jpg
CHANGED
Binary file
|
icons/small/linkedin.jpg
CHANGED
Binary file
|
icons/small/medium.jpg
DELETED
Binary file
|
icons/small/path.jpg
CHANGED
Binary file
|
icons/small/pinterest.jpg
CHANGED
Binary file
|
icons/small/rss.jpg
CHANGED
Binary file
|
icons/small/stumbleupon.jpg
CHANGED
Binary file
|
icons/small/technorati.jpg
CHANGED
Binary file
|
icons/small/tumblr.jpg
CHANGED
Binary file
|
icons/small/twitter.jpg
CHANGED
Binary file
|
icons/small/vimeo.jpg
CHANGED
Binary file
|
icons/small/wordpress.jpg
DELETED
Binary file
|
icons/small/yelp.jpg
CHANGED
Binary file
|
icons/small/youtube.jpg
CHANGED
Binary file
|
icons/small/zerply.jpg
CHANGED
Binary file
|
lib/form.php
CHANGED
@@ -11,14 +11,13 @@ foreach ($social_accounts as $site => $id) {
|
|
11 |
$data['title'] = $instance['title'];
|
12 |
$data['icons'] = $instance['icons'];
|
13 |
$data['labels'] = $instance['labels'];
|
14 |
-
$data['show_title'] = $instance['show_title'];
|
15 |
|
16 |
?>
|
17 |
|
18 |
<div class="social_icons_widget">
|
19 |
|
20 |
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title:</label>
|
21 |
-
<input class="widefat" type="text" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo
|
22 |
|
23 |
<?php
|
24 |
$sizes = array(
|
@@ -37,7 +36,7 @@ $sizes = array(
|
|
37 |
<?php
|
38 |
foreach($sizes as $option => $value) :
|
39 |
|
40 |
-
if(
|
41 |
else { $selected = ''; }
|
42 |
?>
|
43 |
|
@@ -47,16 +46,17 @@ $sizes = array(
|
|
47 |
</select>
|
48 |
</p>
|
49 |
|
50 |
-
<?php if(
|
51 |
<p class="label_options"><input type="checkbox" id="<?php echo $this->get_field_id('labels'); ?>" name="<?php echo $this->get_field_name('labels'); ?>" value="show"<?php echo $checked; ?> /> <label for="<?php echo $this->get_field_id('labels'); ?>">Show Labels</label></p>
|
52 |
|
53 |
-
<?php if(esc_attr($data['show_title'] == 'show')) { $checked = ' checked="checked"'; } else { $checked = ''; } ?>
|
54 |
-
<p class="label_options"><input type="checkbox" id="<?php echo $this->get_field_id('show_title'); ?>" name="<?php echo $this->get_field_name('show_title'); ?>" value="show"<?php echo $checked; ?> /> <label for="<?php echo $this->get_field_id('show_title'); ?>">Hide Title</label></p>
|
55 |
-
|
56 |
<ul class="social_accounts">
|
57 |
-
<?php foreach ($social_accounts as $site => $id) :
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
60 |
<?php endforeach; ?>
|
61 |
</ul>
|
62 |
|
11 |
$data['title'] = $instance['title'];
|
12 |
$data['icons'] = $instance['icons'];
|
13 |
$data['labels'] = $instance['labels'];
|
|
|
14 |
|
15 |
?>
|
16 |
|
17 |
<div class="social_icons_widget">
|
18 |
|
19 |
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title:</label>
|
20 |
+
<input class="widefat" type="text" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo attribute_escape($data['title']); ?>" /></p>
|
21 |
|
22 |
<?php
|
23 |
$sizes = array(
|
36 |
<?php
|
37 |
foreach($sizes as $option => $value) :
|
38 |
|
39 |
+
if(attribute_escape($data['icons'] == $value)) { $selected = ' selected="selected"'; }
|
40 |
else { $selected = ''; }
|
41 |
?>
|
42 |
|
46 |
</select>
|
47 |
</p>
|
48 |
|
49 |
+
<?php if(attribute_escape($data['labels'] == 'show')) { $checked = ' checked="checked"'; } ?>
|
50 |
<p class="label_options"><input type="checkbox" id="<?php echo $this->get_field_id('labels'); ?>" name="<?php echo $this->get_field_name('labels'); ?>" value="show"<?php echo $checked; ?> /> <label for="<?php echo $this->get_field_id('labels'); ?>">Show Labels</label></p>
|
51 |
|
|
|
|
|
|
|
52 |
<ul class="social_accounts">
|
53 |
+
<?php foreach ($social_accounts as $site => $id) :
|
54 |
+
$icon = plugins_url('social_icons_widget/icons/small/'.$id.'.jpg', '');
|
55 |
+
if ( @getimagesize($icon) ) { $image = '<img class="site_icon" src="'.$icon.'" alt="'.$site.'" height="16" width="16" />'; }
|
56 |
+
else { $image = ''; }
|
57 |
+
?>
|
58 |
+
<li><?php echo $image; ?> <label for="<?php echo $this->get_field_id($id); ?>"><?php echo $site; ?>:</label>
|
59 |
+
<input class="widefat" type="text" id="<?php echo $this->get_field_id($id); ?>" name="<?php echo $this->get_field_name($id); ?>" value="<?php echo attribute_escape($data[$id]); ?>" /></li>
|
60 |
<?php endforeach; ?>
|
61 |
</ul>
|
62 |
|
lib/social-networks.php
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Declare supported social media websites
|
4 |
-
|
5 |
-
By default, the Social Icons Widget provides a variety of popular social media websites. Developers can easily add more social media websites by creating a filter in the active theme's functions.php file like such:
|
6 |
-
|
7 |
-
`function add_new_icons($icon_list) {
|
8 |
-
$icon_list['Full Website Name'] = 'full-website-id';
|
9 |
-
|
10 |
-
return $icon_list;
|
11 |
-
}
|
12 |
-
add_filter('social_icon_accounts', 'add_new_icons');`
|
13 |
-
|
14 |
-
The full-website-id should reflect the name of the image you create in each of the icon folder sizes, or in your custom icon directory. It is also used to populate the class field of the icon when the widget displays. The Social Icon Widget looks for .gif, .jpg, .jpeg, and .png in order and returns the first extention it finds.
|
15 |
-
*/
|
16 |
-
|
17 |
-
global $social_accounts;
|
18 |
-
$social_accounts = array(
|
19 |
-
'About.me' => 'aboutme',
|
20 |
-
'Behance' => 'behance',
|
21 |
-
'Dribbble' => 'dribbble',
|
22 |
-
'Email' => 'email',
|
23 |
-
'Facebook' => 'facebook',
|
24 |
-
'Flickr' => 'flickr',
|
25 |
-
'Forrst' => 'forrst',
|
26 |
-
'Foursquare' => 'foursquare',
|
27 |
-
'GitHub' => 'github',
|
28 |
-
'Google+' => 'googleplus',
|
29 |
-
'Instagram' => 'instagram',
|
30 |
-
'Klout' => 'klout',
|
31 |
-
'LinkedIn' => 'linkedin',
|
32 |
-
'Medium' => 'medium',
|
33 |
-
'Path' => 'path',
|
34 |
-
'Pinterest' => 'pinterest',
|
35 |
-
'RSS Feed' => 'rss',
|
36 |
-
'StumbleUpon' => 'stumbleupon',
|
37 |
-
'Technorati' => 'technorati',
|
38 |
-
'Tumblr' => 'tumblr',
|
39 |
-
'Twitter' => 'twitter',
|
40 |
-
'Vimeo' => 'vimeo',
|
41 |
-
'WordPress' => 'wordpress',
|
42 |
-
'Yelp' => 'yelp',
|
43 |
-
'YouTube' => 'youtube',
|
44 |
-
'Zerply' => 'zerply'
|
45 |
-
);
|
46 |
-
|
47 |
-
if( has_filter('social_icon_accounts') ) {
|
48 |
-
$social_accounts = apply_filters('social_icon_accounts', $social_accounts);
|
49 |
-
}
|
50 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/widget.php
CHANGED
@@ -8,21 +8,17 @@ foreach ($social_accounts as $site => $id) {
|
|
8 |
|
9 |
extract($args);
|
10 |
|
11 |
-
$title =
|
12 |
$icons = $instance['icons'];
|
13 |
$labels = $instance['labels'];
|
14 |
-
$show_title = $instance['show_title'];
|
15 |
|
16 |
echo $before_widget;
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
echo $after_title;
|
22 |
-
}
|
23 |
|
24 |
if($labels == 'show') { $ul_class = 'show-labels '; }
|
25 |
-
else { $ul_class = ''; }
|
26 |
$ul_class .= 'icons-'.$icons;
|
27 |
?>
|
28 |
|
@@ -37,29 +33,21 @@ $ul_class .= 'icons-'.$icons;
|
|
37 |
$icon_path = STYLESHEETPATH .'/social_icons/'.$size.'/'.$id.'.{gif,jpg,jpeg,png}';
|
38 |
}
|
39 |
else {
|
40 |
-
$icon_path = ABSPATH .'wp-content/plugins/
|
41 |
}
|
42 |
|
43 |
$result = glob( $icon_path, GLOB_BRACE );
|
44 |
|
45 |
-
if($
|
46 |
-
|
47 |
-
|
48 |
-
$icon = get_bloginfo('url').'/wp-content/themes'.$path[1];
|
49 |
-
}
|
50 |
-
else {
|
51 |
-
$path = explode('plugins', $result[0]);
|
52 |
-
$icon = get_bloginfo('url').'/wp-content/plugins'.$path[1];
|
53 |
-
}
|
54 |
-
}
|
55 |
-
elseif( $labels != 'show' && $icons != 'small' ) {
|
56 |
-
$icon = get_bloginfo('url').'/wp-content/plugins/social-media-icons-widget/icons/'.$icons.'/_unknown.jpg';
|
57 |
}
|
58 |
else {
|
59 |
-
$
|
|
|
60 |
}
|
61 |
|
62 |
-
if ( $icon ) { $image = '<img class="site-icon" src="'.$icon.'" alt="'.$title.'" title="'.$title.'" />'; }
|
63 |
else { $image = ''; }
|
64 |
|
65 |
if($labels != 'show') { $title = ''; }
|
8 |
|
9 |
extract($args);
|
10 |
|
11 |
+
$title = $instance['title'];
|
12 |
$icons = $instance['icons'];
|
13 |
$labels = $instance['labels'];
|
|
|
14 |
|
15 |
echo $before_widget;
|
16 |
|
17 |
+
echo $before_title;
|
18 |
+
echo $title;
|
19 |
+
echo $after_title;
|
|
|
|
|
20 |
|
21 |
if($labels == 'show') { $ul_class = 'show-labels '; }
|
|
|
22 |
$ul_class .= 'icons-'.$icons;
|
23 |
?>
|
24 |
|
33 |
$icon_path = STYLESHEETPATH .'/social_icons/'.$size.'/'.$id.'.{gif,jpg,jpeg,png}';
|
34 |
}
|
35 |
else {
|
36 |
+
$icon_path = ABSPATH .'wp-content/plugins/social_icons_widget/icons/'.$icons.'/'.$id.'.{gif,jpg,jpeg,png}';
|
37 |
}
|
38 |
|
39 |
$result = glob( $icon_path, GLOB_BRACE );
|
40 |
|
41 |
+
if (in_array($icons, $custom_sizes)) {
|
42 |
+
$path = explode('themes', $result[0]);
|
43 |
+
$icon = get_bloginfo('url').'/wp-content/themes'.$path[1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
45 |
else {
|
46 |
+
$path = explode('plugins', $result[0]);
|
47 |
+
$icon = get_bloginfo('url').'/wp-content/plugins'.$path[1];
|
48 |
}
|
49 |
|
50 |
+
if ( @getimagesize($icon) ) { $image = '<img class="site-icon" src="'.$icon.'" alt="'.$title.'" title="'.$title.'" />'; }
|
51 |
else { $image = ''; }
|
52 |
|
53 |
if($labels != 'show') { $title = ''; }
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Social Icons Widget ===
|
2 |
Contributors: dannisbet
|
3 |
-
Tags: social, media, widget, follow, profile, icons,
|
4 |
-
Donate link:
|
5 |
Requires at least: 3.5.1
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag:
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -16,14 +16,15 @@ The Social Media Icons widget takes a simple, extendable approach to displaying
|
|
16 |
|
17 |
= Extending =
|
18 |
|
19 |
-
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
27 |
|
28 |
The full-website-id should reflect the name of the image you create in each of the icon folder sizes, or in your custom icon directory. It is also used to populate the class field of the icon when the widget displays. The Social Icon Widget looks for .gif, .jpg, .jpeg, and .png in order and returns the first extention it finds.
|
29 |
|
@@ -35,9 +36,7 @@ Custom icons are easy to add. To enable them, select "Custom" from the Icon Type
|
|
35 |
|
36 |
= Icons =
|
37 |
|
38 |
-
Default icons are from the [
|
39 |
-
|
40 |
-
Email envelope icon is from Cy Me at [Noun Project](http://thenounproject.com/term/envelope/24786/).
|
41 |
|
42 |
== Installation ==
|
43 |
|
@@ -54,30 +53,14 @@ Coming soon.
|
|
54 |
|
55 |
== Changelog ==
|
56 |
|
57 |
-
=
|
58 |
-
*
|
59 |
-
* Updated all icons to Simple Icons set
|
60 |
-
|
61 |
-
= 14.03 =
|
62 |
-
* Removed @getimagesize function for compatibility purposes
|
63 |
-
* New accounts are now added via WordPress filter rather than editing core plugin code
|
64 |
-
|
65 |
-
= 2013.05 =
|
66 |
-
* Fixed image and CSS paths
|
67 |
|
68 |
= 2013.04 =
|
69 |
-
* Initial commit
|
70 |
|
71 |
-
= trunk =
|
72 |
* Initial commit
|
73 |
|
74 |
== Upgrade Notice ==
|
75 |
|
76 |
-
= 14.03 =
|
77 |
-
Removed @getimagesize function for compatibility purposes. New accounts are now added via WordPress filter rather than editing core plugin code.
|
78 |
-
|
79 |
-
= 2013.05 =
|
80 |
-
Fixed image and CSS paths
|
81 |
-
|
82 |
= 2013.04 =
|
83 |
Initial commit to WordPress plugin repository
|
1 |
=== Social Icons Widget ===
|
2 |
Contributors: dannisbet
|
3 |
+
Tags: social, media, widget, follow, profile, icons, twitter, facebook, linkedin, forrst, dribbble
|
4 |
+
Donate link: http://dannisbet.com/
|
5 |
Requires at least: 3.5.1
|
6 |
+
Tested up to: 3.6-beta1-23930
|
7 |
+
Stable tag: 2013.04
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
16 |
|
17 |
= Extending =
|
18 |
|
19 |
+
Developers can easily extend the plugin to accept additional website profiles and upload custom icons to replace the default set. The widget settings allow for three different sizes by default and users can choose to display a label next to each icon.
|
20 |
|
21 |
+
By default, the Social Icons Widget provides a variety of popular social media websites. However, it's been structured to allow for easy addition of new social media profiles, or removal of unwanted ones.
|
22 |
+
|
23 |
+
To edit the list of social media profiles, open social-media-icons-widget.php and locate line 32, which contains the $social_accounts array. Any edits made to this array will be reflected through the entire widget. There's no need to find/replace in any other file.
|
24 |
+
|
25 |
+
The structure of the array follows a simple format:
|
26 |
+
|
27 |
+
'Full Website Name' => 'full-website-id'
|
28 |
|
29 |
The full-website-id should reflect the name of the image you create in each of the icon folder sizes, or in your custom icon directory. It is also used to populate the class field of the icon when the widget displays. The Social Icon Widget looks for .gif, .jpg, .jpeg, and .png in order and returns the first extention it finds.
|
30 |
|
36 |
|
37 |
= Icons =
|
38 |
|
39 |
+
Default icons are from the Social Boilerplate Iconset created by [Mosaic Web Studios](http://mosaic.ws/projects/boilerplate.php).
|
|
|
|
|
40 |
|
41 |
== Installation ==
|
42 |
|
53 |
|
54 |
== Changelog ==
|
55 |
|
56 |
+
= trunk =
|
57 |
+
* Initial commit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
= 2013.04 =
|
|
|
60 |
|
|
|
61 |
* Initial commit
|
62 |
|
63 |
== Upgrade Notice ==
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
= 2013.04 =
|
66 |
Initial commit to WordPress plugin repository
|
social-media-icons-widget.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Social Icons Widget
|
4 |
Plugin URI: http://github.com/dannisbet/Social-Icons-Widget
|
5 |
-
Version:
|
6 |
Description: Displays a list of social media website icons and a link to your profile.
|
7 |
Author: Dan Nisbet
|
8 |
Author URI: http://dannisbet.com/
|
@@ -27,7 +27,31 @@ class Social_Icons_Widget extends WP_Widget {
|
|
27 |
add_action('admin_print_styles', array($this, 'register_admin_styles'));
|
28 |
add_action('wp_enqueue_scripts', array($this, 'register_widget_styles'));
|
29 |
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
|
33 |
function form($instance) {
|
@@ -45,7 +69,6 @@ class Social_Icons_Widget extends WP_Widget {
|
|
45 |
$instance['title'] = $new_instance['title'];
|
46 |
$instance['icons'] = $new_instance['icons'];
|
47 |
$instance['labels'] = $new_instance['labels'];
|
48 |
-
$instance['show_title'] = $new_instance['show_title'];
|
49 |
|
50 |
return $instance;
|
51 |
}
|
@@ -55,11 +78,11 @@ class Social_Icons_Widget extends WP_Widget {
|
|
55 |
}
|
56 |
|
57 |
function register_admin_styles() {
|
58 |
-
wp_enqueue_style('social-icons-widget-admin', plugins_url('
|
59 |
}
|
60 |
|
61 |
function register_widget_styles() {
|
62 |
-
wp_enqueue_style('social-icons-widget-widget', plugins_url('
|
63 |
}
|
64 |
|
65 |
}
|
2 |
/*
|
3 |
Plugin Name: Social Icons Widget
|
4 |
Plugin URI: http://github.com/dannisbet/Social-Icons-Widget
|
5 |
+
Version: 2013.04
|
6 |
Description: Displays a list of social media website icons and a link to your profile.
|
7 |
Author: Dan Nisbet
|
8 |
Author URI: http://dannisbet.com/
|
27 |
add_action('admin_print_styles', array($this, 'register_admin_styles'));
|
28 |
add_action('wp_enqueue_scripts', array($this, 'register_widget_styles'));
|
29 |
|
30 |
+
// Declare supported social media websites
|
31 |
+
global $social_accounts;
|
32 |
+
$social_accounts = array(
|
33 |
+
'Behance' => 'behance',
|
34 |
+
'Dribbble' => 'dribbble',
|
35 |
+
'Facebook' => 'facebook',
|
36 |
+
'Flickr' => 'flickr',
|
37 |
+
'Forrst' => 'forrst',
|
38 |
+
'Foursquare' => 'foursquare',
|
39 |
+
'Google+' => 'googleplus',
|
40 |
+
'Instagram' => 'instagram',
|
41 |
+
'Klout' => 'klout',
|
42 |
+
'LinkedIn' => 'linkedin',
|
43 |
+
'Path' => 'path',
|
44 |
+
'Pinterest' => 'pinterest',
|
45 |
+
'RSS Feed' => 'rss',
|
46 |
+
'StumbleUpon' => 'stumbleupon',
|
47 |
+
'Technorati' => 'technorati',
|
48 |
+
'Tumblr' => 'tumblr',
|
49 |
+
'Twitter' => 'twitter',
|
50 |
+
'Vimeo' => 'vimeo',
|
51 |
+
'Yelp' => 'yelp',
|
52 |
+
'YouTube' => 'youtube',
|
53 |
+
'Zerply' => 'zerply'
|
54 |
+
);
|
55 |
}
|
56 |
|
57 |
function form($instance) {
|
69 |
$instance['title'] = $new_instance['title'];
|
70 |
$instance['icons'] = $new_instance['icons'];
|
71 |
$instance['labels'] = $new_instance['labels'];
|
|
|
72 |
|
73 |
return $instance;
|
74 |
}
|
78 |
}
|
79 |
|
80 |
function register_admin_styles() {
|
81 |
+
wp_enqueue_style('social-icons-widget-admin', plugins_url('social_icons_widget/css/social_icons_admin.css'));
|
82 |
}
|
83 |
|
84 |
function register_widget_styles() {
|
85 |
+
wp_enqueue_style('social-icons-widget-widget', plugins_url('social_icons_widget/css/social_icons_widget.css'));
|
86 |
}
|
87 |
|
88 |
}
|