Simple Follow Me Social Buttons Widget - Version 1.4

Version Description

  • Added option to enter email address or url to any contact page for the email icon
Download this release

Release Info

Developer lucymtc
Plugin Icon 128x128 Simple Follow Me Social Buttons Widget
Version 1.4
Comparing to
See all releases

Code changes from version 1.3.1 to 1.4

includes/widget.php CHANGED
@@ -105,8 +105,19 @@ class Sfmsb_Widget extends WP_Widget {
105
 
106
  if( $key == 'email' ) {
107
 
108
- $label = __( 'Your ' . $item['name'], 'sfmsb_domain');
109
- $value = esc_attr( $instance['url_' . $key] );
 
 
 
 
 
 
 
 
 
 
 
110
 
111
  } else {
112
 
@@ -208,9 +219,21 @@ class Sfmsb_Widget extends WP_Widget {
208
  foreach( $this->available_buttons as $key => $item ){
209
 
210
  if( $key == 'email' ) {
211
- $value = esc_attr($new_instance['url_' . $key]);
 
 
 
 
 
 
 
 
 
 
 
 
212
  } else {
213
- $value = esc_url($new_instance['url_' . $key]);
214
  }
215
 
216
  $instance['url_' . $key] = $value;
@@ -280,9 +303,12 @@ class Sfmsb_Widget extends WP_Widget {
280
  $color = $instance['color'];
281
  }
282
 
283
- if( $key == 'email' ) {
 
284
  $href = 'mailto:' . esc_attr($instance['url_' . $key]);
 
285
  } else {
 
286
  $href = esc_url($instance['url_' . $key]);
287
  }
288
 
105
 
106
  if( $key == 'email' ) {
107
 
108
+ $label = __( 'Your Email address or other contact URL', 'sfmsb_domain');
109
+
110
+ $instance['url_' . $key] = str_replace('mailto:', '', $instance['url_' . $key]);
111
+ if( filter_var( $instance['url_' . $key], FILTER_VALIDATE_EMAIL ) ){
112
+
113
+ $value = esc_attr( $instance['url_' . $key] );
114
+
115
+ } else {
116
+
117
+ $value = esc_url( $instance['url_' . $key] );
118
+
119
+ } // if valid email
120
+
121
 
122
  } else {
123
 
219
  foreach( $this->available_buttons as $key => $item ){
220
 
221
  if( $key == 'email' ) {
222
+ $new_instance['url_' . $key] = str_replace('mailto:', '', $new_instance['url_' . $key]);
223
+
224
+ if( filter_var( $new_instance['url_' . $key], FILTER_VALIDATE_EMAIL ) ){
225
+
226
+ $value = esc_attr( $new_instance['url_' . $key] );
227
+
228
+ } else {
229
+
230
+ $value = esc_url( $new_instance['url_' . $key] );
231
+
232
+ } // if valid email
233
+
234
+
235
  } else {
236
+ $value = esc_url( $new_instance['url_' . $key] );
237
  }
238
 
239
  $instance['url_' . $key] = $value;
303
  $color = $instance['color'];
304
  }
305
 
306
+ if( $key == 'email' && filter_var( $instance['url_' . $key], FILTER_VALIDATE_EMAIL ) ) {
307
+
308
  $href = 'mailto:' . esc_attr($instance['url_' . $key]);
309
+
310
  } else {
311
+
312
  $href = esc_url($instance['url_' . $key]);
313
  }
314
 
languages/sfmsb_domain-en_EN.mo CHANGED
Binary file
languages/sfmsb_domain-en_EN.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Simple Follow Me Social Buttons Widget\n"
4
- "POT-Creation-Date: 2014-08-12 16:38+0100\n"
5
- "PO-Revision-Date: 2014-08-12 16:38+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: en\n"
@@ -39,41 +39,41 @@ msgid "Text"
39
  msgstr ""
40
 
41
  #: includes/widget.php:108
42
- msgid "Your "
43
  msgstr ""
44
 
45
- #: includes/widget.php:113
46
  msgid " URL"
47
  msgstr ""
48
 
49
- #: includes/widget.php:134
50
  msgid "Style"
51
  msgstr ""
52
 
53
- #: includes/widget.php:136
54
  msgid "Rounded"
55
  msgstr ""
56
 
57
- #: includes/widget.php:137
58
  msgid "Squared"
59
  msgstr ""
60
 
61
- #: includes/widget.php:148
62
  msgid "Color"
63
  msgstr ""
64
 
65
- #: includes/widget.php:154
66
  msgid "Size"
67
  msgstr ""
68
 
69
- #: includes/widget.php:166
70
  msgid "Position"
71
  msgstr ""
72
 
73
- #: includes/widget.php:175
74
  msgid "Icons under text"
75
  msgstr ""
76
 
77
- #: includes/widget.php:183
78
  msgid "Icons next to text"
79
  msgstr ""
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Simple Follow Me Social Buttons Widget\n"
4
+ "POT-Creation-Date: 2014-08-13 12:44+0100\n"
5
+ "PO-Revision-Date: 2014-08-13 12:44+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: en\n"
39
  msgstr ""
40
 
41
  #: includes/widget.php:108
42
+ msgid "Your Email address or other contact URL"
43
  msgstr ""
44
 
45
+ #: includes/widget.php:124
46
  msgid " URL"
47
  msgstr ""
48
 
49
+ #: includes/widget.php:145
50
  msgid "Style"
51
  msgstr ""
52
 
53
+ #: includes/widget.php:147
54
  msgid "Rounded"
55
  msgstr ""
56
 
57
+ #: includes/widget.php:148
58
  msgid "Squared"
59
  msgstr ""
60
 
61
+ #: includes/widget.php:159
62
  msgid "Color"
63
  msgstr ""
64
 
65
+ #: includes/widget.php:165
66
  msgid "Size"
67
  msgstr ""
68
 
69
+ #: includes/widget.php:177
70
  msgid "Position"
71
  msgstr ""
72
 
73
+ #: includes/widget.php:186
74
  msgid "Icons under text"
75
  msgstr ""
76
 
77
+ #: includes/widget.php:194
78
  msgid "Icons next to text"
79
  msgstr ""
languages/sfmsb_domain-es_ES.mo CHANGED
Binary file
languages/sfmsb_domain-es_ES.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Simple Follow Me Social Buttons Widget\n"
4
- "POT-Creation-Date: 2014-08-12 16:38+0100\n"
5
- "PO-Revision-Date: 2014-08-12 16:38+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: es\n"
@@ -39,41 +39,44 @@ msgid "Text"
39
  msgstr "Texto"
40
 
41
  #: includes/widget.php:108
42
- msgid "Your "
43
- msgstr "Tu "
44
 
45
- #: includes/widget.php:113
46
  msgid " URL"
47
  msgstr "URL"
48
 
49
- #: includes/widget.php:134
50
  msgid "Style"
51
  msgstr "Estilo"
52
 
53
- #: includes/widget.php:136
54
  msgid "Rounded"
55
  msgstr "Redondo"
56
 
57
- #: includes/widget.php:137
58
  msgid "Squared"
59
  msgstr "Cuadrado"
60
 
61
- #: includes/widget.php:148
62
  msgid "Color"
63
  msgstr "Color"
64
 
65
- #: includes/widget.php:154
66
  msgid "Size"
67
  msgstr "Tamaño"
68
 
69
- #: includes/widget.php:166
70
  msgid "Position"
71
  msgstr "Posición"
72
 
73
- #: includes/widget.php:175
74
  msgid "Icons under text"
75
  msgstr "Iconos bajo texto"
76
 
77
- #: includes/widget.php:183
78
  msgid "Icons next to text"
79
  msgstr "Iconos junto texto"
 
 
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Simple Follow Me Social Buttons Widget\n"
4
+ "POT-Creation-Date: 2014-08-13 12:44+0100\n"
5
+ "PO-Revision-Date: 2014-08-13 12:44+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: es\n"
39
  msgstr "Texto"
40
 
41
  #: includes/widget.php:108
42
+ msgid "Your Email address or other contact URL"
43
+ msgstr "Tu dirección email u otra URL de contacto"
44
 
45
+ #: includes/widget.php:124
46
  msgid " URL"
47
  msgstr "URL"
48
 
49
+ #: includes/widget.php:145
50
  msgid "Style"
51
  msgstr "Estilo"
52
 
53
+ #: includes/widget.php:147
54
  msgid "Rounded"
55
  msgstr "Redondo"
56
 
57
+ #: includes/widget.php:148
58
  msgid "Squared"
59
  msgstr "Cuadrado"
60
 
61
+ #: includes/widget.php:159
62
  msgid "Color"
63
  msgstr "Color"
64
 
65
+ #: includes/widget.php:165
66
  msgid "Size"
67
  msgstr "Tamaño"
68
 
69
+ #: includes/widget.php:177
70
  msgid "Position"
71
  msgstr "Posición"
72
 
73
+ #: includes/widget.php:186
74
  msgid "Icons under text"
75
  msgstr "Iconos bajo texto"
76
 
77
+ #: includes/widget.php:194
78
  msgid "Icons next to text"
79
  msgstr "Iconos junto texto"
80
+
81
+ #~ msgid "Your "
82
+ #~ msgstr "Tu "
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: lucymtc
3
  Tags: social,follow me,buttons,twitter,facebook,pinterest,google plus,linkedin,wordpress,rss,github,youtube,vimeo,instagram,font icons,retina ready
4
  Requires at least: 3.8
5
- Tested up to: 3.9.1
6
- Stable tag: 1.3.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -49,6 +49,9 @@ Icons from www.flaticon.com
49
 
50
  == Changelog ==
51
 
 
 
 
52
  = 1.3.1 =
53
  * Added version number to enqueue styles
54
 
2
  Contributors: lucymtc
3
  Tags: social,follow me,buttons,twitter,facebook,pinterest,google plus,linkedin,wordpress,rss,github,youtube,vimeo,instagram,font icons,retina ready
4
  Requires at least: 3.8
5
+ Tested up to: 3.9.2
6
+ Stable tag: 1.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
49
 
50
  == Changelog ==
51
 
52
+ = 1.4 =
53
+ * Added option to enter email address or url to any contact page for the email icon
54
+
55
  = 1.3.1 =
56
  * Added version number to enqueue styles
57
 
simple-follow-me-social-buttons-widget.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  Plugin Name: Simple Follow Me Social Buttons Widget
4
  Description: Widget to add some of the most popular follow me social buttons. Retina ready.
5
- Version: 1.3.1
6
  Author: Lucy Tomás
7
  Author URI: https://wordpress.org/support/profile/lucymtc
8
  License: GPLv2
@@ -107,7 +107,7 @@ final class SFMSB {
107
  if( !defined('SFMSB_PLUGIN_DIR') ) { define('SFMSB_PLUGIN_DIR', plugin_dir_path( __FILE__ )); }
108
  if( !defined('SFMSB_PLUGIN_URL') ) { define('SFMSB_PLUGIN_URL', plugin_dir_url( __FILE__ )); }
109
  if( !defined('SFMSB_PLUGIN_FILE') ) { define('SFMSB_PLUGIN_FILE', __FILE__ ); }
110
- if( !defined('SFMSB_PLUGIN_VERSION') ) { define('SFMSB_PLUGIN_VERSION', '1.3.1'); }
111
 
112
  }
113
 
2
  /**
3
  Plugin Name: Simple Follow Me Social Buttons Widget
4
  Description: Widget to add some of the most popular follow me social buttons. Retina ready.
5
+ Version: 1.4
6
  Author: Lucy Tomás
7
  Author URI: https://wordpress.org/support/profile/lucymtc
8
  License: GPLv2
107
  if( !defined('SFMSB_PLUGIN_DIR') ) { define('SFMSB_PLUGIN_DIR', plugin_dir_path( __FILE__ )); }
108
  if( !defined('SFMSB_PLUGIN_URL') ) { define('SFMSB_PLUGIN_URL', plugin_dir_url( __FILE__ )); }
109
  if( !defined('SFMSB_PLUGIN_FILE') ) { define('SFMSB_PLUGIN_FILE', __FILE__ ); }
110
+ if( !defined('SFMSB_PLUGIN_VERSION') ) { define('SFMSB_PLUGIN_VERSION', '1.4'); }
111
 
112
  }
113