Simple Social Icons - Version 1.0.6

Version Description

  • Added filters
Download this release

Release Info

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

Code changes from version 1.0.5 to 1.0.6

Files changed (3) hide show
  1. font/LICENSE.txt +4 -0
  2. readme.txt +6 -3
  3. simple-social-icons.php +53 -22
font/LICENSE.txt CHANGED
@@ -19,3 +19,7 @@ Font license info
19
  Homepage: http://www.justbenicestudio.com/studio/websymbols/
20
 
21
 
 
 
 
 
19
  Homepage: http://www.justbenicestudio.com/studio/websymbols/
20
 
21
 
22
+ ## Social Extention
23
+
24
+ The rights to each pictogram in the social extention are either trademarked or copyrighted by the respective company.
25
+ Icons that are included in the social extention can be identified at http://www.entypo.com/.
readme.txt CHANGED
@@ -2,8 +2,8 @@
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
 
@@ -82,4 +82,7 @@ NOTE - The rights to each pictogram in the social extension are either trademark
82
  * Updated version in enqueue script function
83
 
84
  = 1.0.5 =
85
- * Updated LICENSE.txt file to include social extension
 
 
 
2
  Contributors: nathanrice, studiopress, bgardner
3
  Tags: social media, social networking, social profiles
4
  Requires at least: 3.7
5
+ Tested up to: 3.9
6
+ Stable tag: 1.0.6
7
 
8
  This plugin allows you to insert social icons in any widget area.
9
 
82
  * Updated version in enqueue script function
83
 
84
  = 1.0.5 =
85
+ * Updated LICENSE.txt file to include social extension
86
+
87
+ = 1.0.6 =
88
+ * Added filters
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.5
10
 
11
  License: GNU General Public License v2.0 (or later)
12
  License URI: http://www.opensource.org/licenses/gpl-license.php
@@ -29,7 +29,14 @@ class Simple_Social_Icons_Widget extends WP_Widget {
29
  protected $sizes;
30
 
31
  /**
32
- * Default widget values.
 
 
 
 
 
 
 
33
  *
34
  * @var array
35
  */
@@ -45,7 +52,7 @@ class Simple_Social_Icons_Widget extends WP_Widget {
45
  /**
46
  * Default widget option values.
47
  */
48
- $this->defaults = array(
49
  'title' => '',
50
  'new_window' => 0,
51
  'size' => 36,
@@ -70,73 +77,94 @@ class Simple_Social_Icons_Widget extends WP_Widget {
70
  'twitter' => '',
71
  'vimeo' => '',
72
  'youtube' => '',
73
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
 
75
  /**
76
  * Social profile choices.
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',
@@ -284,7 +312,10 @@ class Simple_Social_Icons_Widget extends WP_Widget {
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
  /**
6
  Author: Nathan Rice
7
  Author URI: http://www.nathanrice.net/
8
 
9
+ Version: 1.0.6
10
 
11
  License: GNU General Public License v2.0 (or later)
12
  License URI: http://www.opensource.org/licenses/gpl-license.php
29
  protected $sizes;
30
 
31
  /**
32
+ * Default widget profile glyphs.
33
+ *
34
+ * @var array
35
+ */
36
+ protected $glyphs;
37
+
38
+ /**
39
+ * Default widget profile values.
40
  *
41
  * @var array
42
  */
52
  /**
53
  * Default widget option values.
54
  */
55
+ $this->defaults = apply_filters( 'simple_social_default_styles', array(
56
  'title' => '',
57
  'new_window' => 0,
58
  'size' => 36,
77
  'twitter' => '',
78
  'vimeo' => '',
79
  'youtube' => '',
80
+ ) );
81
+
82
+ /**
83
+ * Social profile glyphs.
84
+ */
85
+ $this->glyphs = apply_filters( 'simple_social_default_glyphs', array(
86
+ 'dribbble' => '&#xe800;',
87
+ 'email' => '&#xe80b;',
88
+ 'facebook' => '&#xe802;',
89
+ 'flickr' => '&#xe80a;',
90
+ 'github' => '&#xe80c;',
91
+ 'gplus' => '&#xe801;',
92
+ 'instagram' => '&#xe809;',
93
+ 'linkedin' => '&#xe806;',
94
+ 'pinterest' => '&#xe803;',
95
+ 'rss' => '&#xe805;',
96
+ 'stumbleupon' => '&#xe808;',
97
+ 'tumblr' => '&#xe807;',
98
+ 'twitter' => '&#xe80d;',
99
+ 'vimeo' => '&#xe80e;',
100
+ 'youtube' => '&#xe804;',
101
+ ) );
102
 
103
  /**
104
  * Social profile choices.
105
  */
106
+ $this->profiles = apply_filters( 'simple_social_default_profiles', array(
107
  'dribbble' => array(
108
  'label' => __( 'Dribbble URI', 'ssiw' ),
109
+ 'pattern' => '<li class="social-dribbble"><a href="%s" %s>' . $this->glyphs['dribbble'] . '</a></li>',
110
  ),
111
  'email' => array(
112
  'label' => __( 'Email URI', 'ssiw' ),
113
+ 'pattern' => '<li class="social-email"><a href="%s" %s>' . $this->glyphs['email'] . '</a></li>',
114
  ),
115
  'facebook' => array(
116
  'label' => __( 'Facebook URI', 'ssiw' ),
117
+ 'pattern' => '<li class="social-facebook"><a href="%s" %s>' . $this->glyphs['facebook'] . '</a></li>',
118
  ),
119
  'flickr' => array(
120
  'label' => __( 'Flickr URI', 'ssiw' ),
121
+ 'pattern' => '<li class="social-flickr"><a href="%s" %s>' . $this->glyphs['flickr'] . '</a></li>',
122
  ),
123
  'github' => array(
124
  'label' => __( 'GitHub URI', 'ssiw' ),
125
+ 'pattern' => '<li class="social-github"><a href="%s" %s>' . $this->glyphs['github'] . '</a></li>',
126
  ),
127
  'gplus' => array(
128
  'label' => __( 'Google+ URI', 'ssiw' ),
129
+ 'pattern' => '<li class="social-gplus"><a href="%s" %s>' . $this->glyphs['gplus'] . '</a></li>',
130
  ),
131
  'instagram' => array(
132
  'label' => __( 'Instagram URI', 'ssiw' ),
133
+ 'pattern' => '<li class="social-instagram"><a href="%s" %s>' . $this->glyphs['instagram'] . '</a></li>',
134
  ),
135
  'linkedin' => array(
136
  'label' => __( 'Linkedin URI', 'ssiw' ),
137
+ 'pattern' => '<li class="social-linkedin"><a href="%s" %s>' . $this->glyphs['linkedin'] . '</a></li>',
138
  ),
139
  'pinterest' => array(
140
  'label' => __( 'Pinterest URI', 'ssiw' ),
141
+ 'pattern' => '<li class="social-pinterest"><a href="%s" %s>' . $this->glyphs['pinterest'] . '</a></li>',
142
  ),
143
  'rss' => array(
144
  'label' => __( 'RSS URI', 'ssiw' ),
145
+ 'pattern' => '<li class="social-rss"><a href="%s" %s>' . $this->glyphs['rss'] . '</a></li>',
146
  ),
147
  'stumbleupon' => array(
148
  'label' => __( 'StumbleUpon URI', 'ssiw' ),
149
+ 'pattern' => '<li class="social-stumbleupon"><a href="%s" %s>' . $this->glyphs['stumbleupon'] . '</a></li>',
150
  ),
151
  'tumblr' => array(
152
  'label' => __( 'Tumblr URI', 'ssiw' ),
153
+ 'pattern' => '<li class="social-tumblr"><a href="%s" %s>' . $this->glyphs['tumblr'] . '</a></li>',
154
  ),
155
  'twitter' => array(
156
  'label' => __( 'Twitter URI', 'ssiw' ),
157
+ 'pattern' => '<li class="social-twitter"><a href="%s" %s>' . $this->glyphs['twitter'] . '</a></li>',
158
  ),
159
  'vimeo' => array(
160
  'label' => __( 'Vimeo URI', 'ssiw' ),
161
+ 'pattern' => '<li class="social-vimeo"><a href="%s" %s>' . $this->glyphs['vimeo'] . '</a></li>',
162
  ),
163
  'youtube' => array(
164
  'label' => __( 'YouTube URI', 'ssiw' ),
165
+ 'pattern' => '<li class="social-youtube"><a href="%s" %s>' . $this->glyphs['youtube'] . '</a></li>',
166
  ),
167
+ ) );
168
 
169
  $widget_ops = array(
170
  'classname' => 'simple-social-icons',
312
  }
313
 
314
  function enqueue_css() {
315
+
316
+ $cssfile = apply_filters( 'simple_social_default_css', plugin_dir_url( __FILE__ ) . 'css/style.css' );
317
+
318
+ wp_enqueue_style( 'simple-social-icons-font', esc_url( $cssfile ), array(), '1.0.5', 'all' );
319
  }
320
 
321
  /**