Simple Social Icons - Version 1.0.5

Version Description

  • Updated LICENSE.txt file to include social extension
Download this release

Release Info

Developer nathanrice
Plugin Icon 128x128 Simple Social Icons
Version 1.0.5
Comparing to
See all releases

Code changes from version 1.0.4 to 1.0.5

Files changed (2) hide show
  1. readme.txt +10 -5
  2. simple-social-icons.php +64 -59
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
=== Plugin Name ===
2
- Contributors: nathanrice, studiopress
3
Tags: social media, social networking, social profiles
4
- Requires at least: 3.6
5
- Tested up to: 3.6.1
6
- Stable tag: 1.0.4
7
8
This plugin allows you to insert social icons in any widget area.
9
@@ -42,6 +42,8 @@ No, not at this time.
42
* Vimeo
43
* YouTube
44
45
== Changelog ==
46
47
= 0.9.0 =
@@ -77,4 +79,7 @@ No, not at this time.
77
* Added Tumblr icon
78
79
= 1.0.4 =
80
- * Updated version in enqueue script function
1
=== Plugin Name ===
2
+ Contributors: nathanrice, studiopress, bgardner
3
Tags: social media, social networking, social profiles
4
+ Requires at least: 3.7
5
+ Tested up to: 3.7.1
6
+ Stable tag: 1.0.5
7
8
This plugin allows you to insert social icons in any widget area.
9
42
* Vimeo
43
* YouTube
44
45
+ NOTE - The rights to each pictogram in the social extension are either trademarked or copyrighted by the respective company. Icons that are included in the social extension can be identified at http://www.entypo.com/.
46
+
47
== Changelog ==
48
49
= 0.9.0 =
79
* Added Tumblr icon
80
81
= 1.0.4 =
82
+ * Updated version in enqueue script function
83
+
84
+ = 1.0.5 =
85
+ * Updated LICENSE.txt file to include social extension
simple-social-icons.php CHANGED
@@ -6,7 +6,7 @@ Description: A simple, CSS and icon font driven social icons widget.
6
Author: Nathan Rice
7
Author URI: http://www.nathanrice.net/
8
9
- Version: 1.0.4
10
11
License: GNU General Public License v2.0 (or later)
12
License URI: http://www.opensource.org/licenses/gpl-license.php
@@ -46,30 +46,30 @@ class Simple_Social_Icons_Widget extends WP_Widget {
46
* Default widget option values.
47
*/
48
$this->defaults = array(
49
- 'title' => '',
50
- 'new_window' => 0,
51
- 'size' => 36,
52
- 'border_radius' => 3,
53
- 'icon_color' => '#ffffff',
54
- 'icon_color_hover' => '#ffffff',
55
- 'background_color' => '#999999',
56
'background_color_hover' => '#666666',
57
- 'alignment' => 'alignleft',
58
- 'dribbble' => '',
59
- 'email' => '',
60
- 'facebook' => '',
61
- 'flickr' => '',
62
- 'github' => '',
63
- 'gplus' => '',
64
- 'instagram' => '',
65
- 'linkedin' => '',
66
- 'pinterest' => '',
67
- 'rss' => '',
68
- 'stumbleupon' => '',
69
- 'tumblr' => '',
70
- 'twitter' => '',
71
- 'vimeo' => '',
72
- 'youtube' => '',
73
);
74
75
/**
@@ -77,69 +77,69 @@ class Simple_Social_Icons_Widget extends WP_Widget {
77
*/
78
$this->profiles = array(
79
'dribbble' => array(
80
- 'label' => __( 'Dribbble URI', 'ssiw' ),
81
- 'pattern' => '<li class="social-dribbble"><a href="%s" %s>&#xe800;</a></li>',
82
),
83
'email' => array(
84
- 'label' => __( 'Email URI', 'ssiw' ),
85
- 'pattern' => '<li class="social-email"><a href="%s" %s>&#xe80b;</a></li>',
86
),
87
'facebook' => array(
88
- 'label' => __( 'Facebook URI', 'ssiw' ),
89
- 'pattern' => '<li class="social-facebook"><a href="%s" %s>&#xe802;</a></li>',
90
),
91
'flickr' => array(
92
- 'label' => __( 'Flickr URI', 'ssiw' ),
93
- 'pattern' => '<li class="social-flickr"><a href="%s" %s>&#xe80a;</a></li>',
94
),
95
'github' => array(
96
- 'label' => __( 'GitHub URI', 'ssiw' ),
97
- 'pattern' => '<li class="social-github"><a href="%s" %s>&#xe80c;</a></li>',
98
),
99
'gplus' => array(
100
- 'label' => __( 'Google+ URI', 'ssiw' ),
101
- 'pattern' => '<li class="social-gplus"><a href="%s" %s>&#xe801;</a></li>',
102
),
103
'instagram' => array(
104
- 'label' => __( 'Instagram URI', 'ssiw' ),
105
- 'pattern' => '<li class="social-instagram"><a href="%s" %s>&#xe809;</a></li>',
106
),
107
'linkedin' => array(
108
- 'label' => __( 'Linkedin URI', 'ssiw' ),
109
- 'pattern' => '<li class="social-linkedin"><a href="%s" %s>&#xe806;</a></li>',
110
),
111
'pinterest' => array(
112
- 'label' => __( 'Pinterest URI', 'ssiw' ),
113
- 'pattern' => '<li class="social-pinterest"><a href="%s" %s>&#xe803;</a></li>',
114
),
115
'rss' => array(
116
- 'label' => __( 'RSS URI', 'ssiw' ),
117
- 'pattern' => '<li class="social-rss"><a href="%s" %s>&#xe805;</a></li>',
118
),
119
'stumbleupon' => array(
120
- 'label' => __( 'StumbleUpon URI', 'ssiw' ),
121
- 'pattern' => '<li class="social-stumbleupon"><a href="%s" %s>&#xe808;</a></li>',
122
),
123
'tumblr' => array(
124
- 'label' => __( 'Tumblr URI', 'ssiw' ),
125
- 'pattern' => '<li class="social-tumblr"><a href="%s" %s>&#xe807;</a></li>',
126
),
127
'twitter' => array(
128
- 'label' => __( 'Twitter URI', 'ssiw' ),
129
- 'pattern' => '<li class="social-twitter"><a href="%s" %s>&#xe80d;</a></li>',
130
),
131
'vimeo' => array(
132
- 'label' => __( 'Vimeo URI', 'ssiw' ),
133
- 'pattern' => '<li class="social-vimeo"><a href="%s" %s>&#xe80e;</a></li>',
134
),
135
'youtube' => array(
136
- 'label' => __( 'YouTube URI', 'ssiw' ),
137
- 'pattern' => '<li class="social-youtube"><a href="%s" %s>&#xe804;</a></li>',
138
),
139
);
140
141
$widget_ops = array(
142
- 'classname' => 'simple-social-icons',
143
'description' => __( 'Displays select social icons.', 'ssiw' ),
144
);
145
@@ -265,8 +265,15 @@ class Simple_Social_Icons_Widget extends WP_Widget {
265
$profiles = (array) $this->profiles;
266
267
foreach ( $profiles as $profile => $data ) {
268
- if ( ! empty( $instance[$profile] ) )
269
$output .= sprintf( $data['pattern'], esc_url( $instance[$profile] ), $new_window );
270
}
271
272
if ( $output )
@@ -277,7 +284,7 @@ class Simple_Social_Icons_Widget extends WP_Widget {
277
}
278
279
function enqueue_css() {
280
- wp_enqueue_style( 'simple-social-icons-font', plugin_dir_url( __FILE__ ) . 'css/style.css', array(), '1.0.4' );
281
}
282
283
/**
@@ -299,8 +306,6 @@ class Simple_Social_Icons_Widget extends WP_Widget {
299
.simple-social-icons ul li a,
300
.simple-social-icons ul li a:hover {
301
background-color: ' . $instance['background_color'] . ' !important;
302
- -moz-border-radius: ' . $instance['border_radius'] . 'px
303
- -webkit-border-radius: ' . $instance['border_radius'] . 'px;
304
border-radius: ' . $instance['border_radius'] . 'px;
305
color: ' . $instance['icon_color'] . ' !important;
306
font-size: ' . $font_size . 'px;
6
Author: Nathan Rice
7
Author URI: http://www.nathanrice.net/
8
9
+ Version: 1.0.5
10
11
License: GNU General Public License v2.0 (or later)
12
License URI: http://www.opensource.org/licenses/gpl-license.php
46
* Default widget option values.
47
*/
48
$this->defaults = array(
49
+ 'title' => '',
50
+ 'new_window' => 0,
51
+ 'size' => 36,
52
+ 'border_radius' => 3,
53
+ 'icon_color' => '#ffffff',
54
+ 'icon_color_hover' => '#ffffff',
55
+ 'background_color' => '#999999',
56
'background_color_hover' => '#666666',
57
+ 'alignment' => 'alignleft',
58
+ 'dribbble' => '',
59
+ 'email' => '',
60
+ 'facebook' => '',
61
+ 'flickr' => '',
62
+ 'github' => '',
63
+ 'gplus' => '',
64
+ 'instagram' => '',
65
+ 'linkedin' => '',
66
+ 'pinterest' => '',
67
+ 'rss' => '',
68
+ 'stumbleupon' => '',
69
+ 'tumblr' => '',
70
+ 'twitter' => '',
71
+ 'vimeo' => '',
72
+ 'youtube' => '',
73
);
74
75
/**
77
*/
78
$this->profiles = array(
79
'dribbble' => array(
80
+ 'label' => __( 'Dribbble URI', 'ssiw' ),
81
+ 'pattern' => '<li class="social-dribbble"><a href="%s" %s>&#xe800;</a></li>',
82
),
83
'email' => array(
84
+ 'label' => __( 'Email URI', 'ssiw' ),
85
+ 'pattern' => '<li class="social-email"><a href="%s" %s>&#xe80b;</a></li>',
86
),
87
'facebook' => array(
88
+ 'label' => __( 'Facebook URI', 'ssiw' ),
89
+ 'pattern' => '<li class="social-facebook"><a href="%s" %s>&#xe802;</a></li>',
90
),
91
'flickr' => array(
92
+ 'label' => __( 'Flickr URI', 'ssiw' ),
93
+ 'pattern' => '<li class="social-flickr"><a href="%s" %s>&#xe80a;</a></li>',
94
),
95
'github' => array(
96
+ 'label' => __( 'GitHub URI', 'ssiw' ),
97
+ 'pattern' => '<li class="social-github"><a href="%s" %s>&#xe80c;</a></li>',
98
),
99
'gplus' => array(
100
+ 'label' => __( 'Google+ URI', 'ssiw' ),
101
+ 'pattern' => '<li class="social-gplus"><a href="%s" %s>&#xe801;</a></li>',
102
),
103
'instagram' => array(
104
+ 'label' => __( 'Instagram URI', 'ssiw' ),
105
+ 'pattern' => '<li class="social-instagram"><a href="%s" %s>&#xe809;</a></li>',
106
),
107
'linkedin' => array(
108
+ 'label' => __( 'Linkedin URI', 'ssiw' ),
109
+ 'pattern' => '<li class="social-linkedin"><a href="%s" %s>&#xe806;</a></li>',
110
),
111
'pinterest' => array(
112
+ 'label' => __( 'Pinterest URI', 'ssiw' ),
113
+ 'pattern' => '<li class="social-pinterest"><a href="%s" %s>&#xe803;</a></li>',
114
),
115
'rss' => array(
116
+ 'label' => __( 'RSS URI', 'ssiw' ),
117
+ 'pattern' => '<li class="social-rss"><a href="%s" %s>&#xe805;</a></li>',
118
),
119
'stumbleupon' => array(
120
+ 'label' => __( 'StumbleUpon URI', 'ssiw' ),
121
+ 'pattern' => '<li class="social-stumbleupon"><a href="%s" %s>&#xe808;</a></li>',
122
),
123
'tumblr' => array(
124
+ 'label' => __( 'Tumblr URI', 'ssiw' ),
125
+ 'pattern' => '<li class="social-tumblr"><a href="%s" %s>&#xe807;</a></li>',
126
),
127
'twitter' => array(
128
+ 'label' => __( 'Twitter URI', 'ssiw' ),
129
+ 'pattern' => '<li class="social-twitter"><a href="%s" %s>&#xe80d;</a></li>',
130
),
131
'vimeo' => array(
132
+ 'label' => __( 'Vimeo URI', 'ssiw' ),
133
+ 'pattern' => '<li class="social-vimeo"><a href="%s" %s>&#xe80e;</a></li>',
134
),
135
'youtube' => array(
136
+ 'label' => __( 'YouTube URI', 'ssiw' ),
137
+ 'pattern' => '<li class="social-youtube"><a href="%s" %s>&#xe804;</a></li>',
138
),
139
);
140
141
$widget_ops = array(
142
+ 'classname' => 'simple-social-icons',
143
'description' => __( 'Displays select social icons.', 'ssiw' ),
144
);
145
265
$profiles = (array) $this->profiles;
266
267
foreach ( $profiles as $profile => $data ) {
268
+
269
+ if ( empty( $instance[ $profile ] ) )
270
+ continue;
271
+
272
+ if ( is_email( $instance[ $profile ] ) )
273
+ $output .= sprintf( $data['pattern'], 'mailto:' . esc_attr( $instance[$profile] ), $new_window );
274
+ else
275
$output .= sprintf( $data['pattern'], esc_url( $instance[$profile] ), $new_window );
276
+
277
}
278
279
if ( $output )
284
}
285
286
function enqueue_css() {
287
+ wp_enqueue_style( 'simple-social-icons-font', plugin_dir_url( __FILE__ ) . 'css/style.css', array(), '1.0.5' );
288
}
289
290
/**
306
.simple-social-icons ul li a,
307
.simple-social-icons ul li a:hover {
308
background-color: ' . $instance['background_color'] . ' !important;
309
border-radius: ' . $instance['border_radius'] . 'px;
310
color: ' . $instance['icon_color'] . ' !important;
311
font-size: ' . $font_size . 'px;