Social Sharing Toolkit - Version 2.0.4

Version Description

Please update to version 2.0.4 for several display bug fixes, internationalization and expanded functionality.

Download this release

Release Info

Developer MarijnRongen
Plugin Icon wp plugin Social Sharing Toolkit
Version 2.0.4
Comparing to
See all releases

Code changes from version 2.0.3 to 2.0.4

admin.css CHANGED
@@ -1,3 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  div.mr_social_sharing_networks {
2
  -webkit-box-shadow: white 0px 1px 0px 0px inset;
3
  -webkit-user-select: none;
@@ -11,17 +34,16 @@ div.mr_social_sharing_networks {
11
  border-style: solid;
12
  border-width: 1px;
13
  box-shadow: white 0px 1px 0px 0px inset;
14
- display: block;
15
  margin: 1px 0 8px 0;
16
  outline-color: #222;
17
  outline-style: none;
18
  outline-width: 0px;
19
- width: 540px;
20
  padding: 0 0 10px 0;
21
  }
22
 
23
  .mr_social_sharing_networks h3, .mr_social_sharing_networks p {
24
- padding: 0 0 0 10px;
25
  }
26
 
27
  .mr_social_sharing_networks label {
@@ -30,12 +52,12 @@ div.mr_social_sharing_networks {
30
  padding: 0 0 0 10px;
31
  }
32
 
33
- ul#mr_social_sharing_networks, ul#mr_social_sharing_widget_networks, ul#mr_social_sharing_follow_networks {
34
  width: 520px;
35
  padding: 10px;
36
  }
37
 
38
- ul#mr_social_sharing_networks li, ul#mr_social_sharing_widget_networks li, ul#mr_social_sharing_follow_networks li {
39
  -webkit-box-shadow: white 0px 1px 0px 0px inset;
40
  -webkit-user-select: none;
41
  background-attachment: scroll;
@@ -56,22 +78,22 @@ ul#mr_social_sharing_networks li, ul#mr_social_sharing_widget_networks li, ul#mr
56
  outline-width: 0px;
57
  padding: 3px 10px 0 10px;
58
  text-shadow: white 0px 1px 0px;
59
- width: 500px;
60
  height: 24px;
61
  }
62
 
63
- ul#mr_social_sharing_networks li img, ul#mr_social_sharing_widget_networks li img, ul#mr_social_sharing_follow_networks li img {
64
  width: 16px;
65
  height: 16px;
66
  margin: 2px 10px 2px 0;
67
  }
68
 
69
- ul#mr_social_sharing_networks li img.right, ul#mr_social_sharing_widget_networks li img.right, ul#mr_social_sharing_follow_networks li img.right {
70
  float: right;
71
  margin: 2px -4px 2px 5px;
72
  }
73
 
74
- ul#mr_social_sharing_networks li label, ul#mr_social_sharing_widget_networks li label, ul#mr_social_sharing_follow_networks li label {
75
  display: inline-block;
76
  margin: -10px 10px 0 0;
77
  width: auto;
@@ -79,12 +101,12 @@ ul#mr_social_sharing_networks li label, ul#mr_social_sharing_widget_networks li
79
  padding: 0;
80
  }
81
 
82
- ul#mr_social_sharing_networks li input, ul#mr_social_sharing_widget_networks li input, ul#mr_social_sharing_follow_networks li input {
83
  margin: 0 10px 0 0;
84
  padding: 0;
85
  }
86
 
87
- ul#mr_social_sharing_networks li input.text, ul#mr_social_sharing_widget_networks li input.text, ul#mr_social_sharing_follow_networks li input.text {
88
  display: inline-block;
89
  float: right;
90
  width: 140px;
@@ -93,7 +115,7 @@ ul#mr_social_sharing_networks li input.text, ul#mr_social_sharing_widget_network
93
  padding: 0;
94
  }
95
 
96
- ul#mr_social_sharing_networks li label.text, ul#mr_social_sharing_widget_networks li label.text, ul#mr_social_sharing_follow_networks li label.text {
97
  display: inline-block;
98
  float: right;
99
  width: auto;
@@ -102,7 +124,7 @@ ul#mr_social_sharing_networks li label.text, ul#mr_social_sharing_widget_network
102
  padding: 0;
103
  }
104
 
105
- ul#mr_social_sharing_networks li select, ul#mr_social_sharing_widget_networks li select, ul#mr_social_sharing_follow_networks li select {
106
  display: inline-block;
107
  float: right;
108
  width: 160px;
1
+ ul.tabs {
2
+ height: 24px;
3
+ }
4
+
5
+ ul.tabs li {
6
+ display: inline-block;
7
+ }
8
+
9
+ ul.tabs li.ui-state-default, ul.tabs li.ui-state-active {
10
+ height: 20px;
11
+ padding: 2px 4px;
12
+ margin: 0 0 0 2px;
13
+ background-color: #FEFEFE;
14
+ border-color: #DFDFDF;
15
+ border-radius: 3px 3px 0 0;
16
+ border-style: solid;
17
+ border-width: 1px 1px 0 1px;
18
+ }
19
+
20
+ ul.tabs li.ui-state-active {
21
+ background-color: #F9F9F9;
22
+ }
23
+
24
  div.mr_social_sharing_networks {
25
  -webkit-box-shadow: white 0px 1px 0px 0px inset;
26
  -webkit-user-select: none;
34
  border-style: solid;
35
  border-width: 1px;
36
  box-shadow: white 0px 1px 0px 0px inset;
 
37
  margin: 1px 0 8px 0;
38
  outline-color: #222;
39
  outline-style: none;
40
  outline-width: 0px;
41
+ width: 580px;
42
  padding: 0 0 10px 0;
43
  }
44
 
45
  .mr_social_sharing_networks h3, .mr_social_sharing_networks p {
46
+ padding: 0 10px 0 10px;
47
  }
48
 
49
  .mr_social_sharing_networks label {
52
  padding: 0 0 0 10px;
53
  }
54
 
55
+ ul#mr_social_sharing_networks, ul#mr_social_sharing_shortcode_networks, ul#mr_social_sharing_widget_networks, ul#mr_social_sharing_follow_networks {
56
  width: 520px;
57
  padding: 10px;
58
  }
59
 
60
+ ul#mr_social_sharing_networks li, ul#mr_social_sharing_shortcode_networks li, ul#mr_social_sharing_widget_networks li, ul#mr_social_sharing_follow_networks li {
61
  -webkit-box-shadow: white 0px 1px 0px 0px inset;
62
  -webkit-user-select: none;
63
  background-attachment: scroll;
78
  outline-width: 0px;
79
  padding: 3px 10px 0 10px;
80
  text-shadow: white 0px 1px 0px;
81
+ width: 520px;
82
  height: 24px;
83
  }
84
 
85
+ ul#mr_social_sharing_networks li img, ul#mr_social_sharing_shortcode_networks li img, ul#mr_social_sharing_widget_networks li img, ul#mr_social_sharing_follow_networks li img {
86
  width: 16px;
87
  height: 16px;
88
  margin: 2px 10px 2px 0;
89
  }
90
 
91
+ ul#mr_social_sharing_networks li img.right, ul#mr_social_sharing_shortcode_networks li img.right, ul#mr_social_sharing_widget_networks li img.right, ul#mr_social_sharing_follow_networks li img.right {
92
  float: right;
93
  margin: 2px -4px 2px 5px;
94
  }
95
 
96
+ ul#mr_social_sharing_networks li label, ul#mr_social_sharing_shortcode_networks li label, ul#mr_social_sharing_widget_networks li label, ul#mr_social_sharing_follow_networks li label {
97
  display: inline-block;
98
  margin: -10px 10px 0 0;
99
  width: auto;
101
  padding: 0;
102
  }
103
 
104
+ ul#mr_social_sharing_networks li input, ul#mr_social_sharing_shortcode_networks li input, ul#mr_social_sharing_widget_networks li input, ul#mr_social_sharing_follow_networks li input {
105
  margin: 0 10px 0 0;
106
  padding: 0;
107
  }
108
 
109
+ ul#mr_social_sharing_networks li input.text, ul#mr_social_sharing_shortcode_networks li input.text, ul#mr_social_sharing_widget_networks li input.text, ul#mr_social_sharing_follow_networks li input.text {
110
  display: inline-block;
111
  float: right;
112
  width: 140px;
115
  padding: 0;
116
  }
117
 
118
+ ul#mr_social_sharing_networks li label.text, ul#mr_social_sharing_shortcode_networks li label.text, ul#mr_social_sharing_widget_networks li label.text, ul#mr_social_sharing_follow_networks li label.text {
119
  display: inline-block;
120
  float: right;
121
  width: auto;
124
  padding: 0;
125
  }
126
 
127
+ ul#mr_social_sharing_networks li select, ul#mr_social_sharing_shortcode_networks li select, ul#mr_social_sharing_widget_networks li select, ul#mr_social_sharing_follow_networks li select {
128
  display: inline-block;
129
  float: right;
130
  width: 160px;
admin.js CHANGED
@@ -1,5 +1,7 @@
1
  jQuery(document).ready( function($) {
 
2
  $( "#mr_social_sharing_networks" ).sortable();
 
3
  $( "#mr_social_sharing_widget_networks" ).sortable();
4
  $( "#mr_social_sharing_follow_networks" ).sortable();
5
  });
1
  jQuery(document).ready( function($) {
2
+ $( "#mr_social_sharing_tabs" ).tabs();
3
  $( "#mr_social_sharing_networks" ).sortable();
4
+ $( "#mr_social_sharing_shortcode_networks" ).sortable();
5
  $( "#mr_social_sharing_widget_networks" ).sortable();
6
  $( "#mr_social_sharing_follow_networks" ).sortable();
7
  });
googleplus.js.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ header("Content-type: text/javascript");
3
+ if (isset($_GET['lang'])) {
4
+ echo 'window.___gcfg = {lang: \''.$_GET['lang'].'\'};';
5
+ }
6
+ ?>
images/buttons/delicious.png CHANGED
Binary file
images/buttons/email.png CHANGED
Binary file
images/delicious_counters.png CHANGED
Binary file
images/delicious_counters_hover.png ADDED
Binary file
images/icons_large/lastfm.png ADDED
Binary file
images/icons_large/spotify.png ADDED
Binary file
images/icons_medium/lastfm.png ADDED
Binary file
images/icons_medium/spotify.png ADDED
Binary file
images/icons_small/divider.png ADDED
Binary file
images/icons_small/lastfm.png ADDED
Binary file
images/icons_small/spotify.png ADDED
Binary file
languages/mr_social_sharing_toolkit-nl_NL.mo ADDED
Binary file
languages/mr_social_sharing_toolkit-nl_NL.po ADDED
@@ -0,0 +1,310 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2010 Social Sharing Toolkit
2
+ # This file is distributed under the same license as the Social Sharing Toolkit package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Social Sharing Toolkit 2.0.4\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/social_sharing_toolkit\n"
7
+ "POT-Creation-Date: 2011-08-26 09:20:52+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2011-08-27 15:58+0100\n"
12
+ "Last-Translator: Marijn Rongen <m.rongen@active-bits.nl>\n"
13
+ "Language-Team: Dutch <LL@li.org>\n"
14
+
15
+ #: Button types:
16
+ msgid "Button"
17
+ msgstr "Knop"
18
+
19
+ msgid "Button + text"
20
+ msgstr "Knop + tekst"
21
+
22
+ msgid "Button + side counter"
23
+ msgstr "Knop + teller zijkant"
24
+
25
+ msgid "Button + top counter"
26
+ msgstr "Knop + teller boven"
27
+
28
+ msgid "Small icon"
29
+ msgstr "Klein icoon"
30
+
31
+ msgid "Small icon + text"
32
+ msgstr "Klein icoon + tekst"
33
+
34
+ msgid "Medium icon"
35
+ msgstr "Medium icoon"
36
+
37
+ msgid "Medium icon + text"
38
+ msgstr "Medium icoon + tekst"
39
+
40
+ msgid "Large icon"
41
+ msgstr "Groot icoon"
42
+
43
+ msgid "Send email"
44
+ msgstr "Stuur email"
45
+
46
+ msgid "Divider"
47
+ msgstr "Afscheiding"
48
+
49
+ msgid "RSS Feed"
50
+ msgstr "RSS Feed"
51
+
52
+ #: Admin screen:
53
+ msgid "Donate"
54
+ msgstr "Doneren"
55
+
56
+ msgid "Settings saved."
57
+ msgstr "Instellingen opgeslagen"
58
+
59
+ msgid "General settings"
60
+ msgstr "Algemene instellingen"
61
+
62
+ msgid "Posts & pages"
63
+ msgstr "Berichten & pagina's"
64
+
65
+ msgid "Shortcode"
66
+ msgstr "Shortcode"
67
+
68
+ msgid "Share Widget"
69
+ msgstr "Deel Widget"
70
+
71
+ msgid "Follow Widget"
72
+ msgstr "Volg Widget"
73
+
74
+ msgid "Automatic Twitter links"
75
+ msgstr "Automatische Twitter links"
76
+
77
+ #: General settings:
78
+ msgid "Load JavaScript in footer"
79
+ msgstr "JavaScript in footer laden"
80
+
81
+ msgid "Improves performance but may not work on some themes"
82
+ msgstr "Verbeterd werking maar werkt niet op met alle thema's"
83
+
84
+ msgid "Choose where the buttons must be displayed and if the buttons should be displayed on posts, pages or both."
85
+ msgstr "Kies of en waar de knoppen getoond moeten worden op berichten, pagina's of beide."
86
+
87
+ msgid "Button location"
88
+ msgstr "Locatie knoppen"
89
+
90
+ msgid "Do not display"
91
+ msgstr "Niet tonen"
92
+
93
+ msgid "Display before content"
94
+ msgstr "Vertoon voor inhoud"
95
+
96
+ msgid "Display after content"
97
+ msgstr "Vertoon na inhoud"
98
+
99
+ msgid "Display before and after content"
100
+ msgstr "Vertoon voor en na inhoud"
101
+
102
+ msgid "Place buttons on"
103
+ msgstr "Plaats knoppen op"
104
+
105
+ msgid "Posts and pages"
106
+ msgstr "Berichten en pagina's"
107
+
108
+ msgid "Only on posts"
109
+ msgstr "Enkel berichten"
110
+
111
+ msgid "Only on pages"
112
+ msgstr "Enkel pagina's"
113
+
114
+ msgid "Enable shortcode"
115
+ msgstr "Shortcode inschakelen"
116
+
117
+ msgid "Use the shortcode [social_share/] where you want the buttons to appear"
118
+ msgstr "Gebruik de shortcode [social_share/] waar je de knoppen wilt laten zien"
119
+
120
+ msgid "Uncheck this box if you are having issues displaying the buttons with excerpts (some themes have custom excerpt functions which do not play nice with the plugin)."
121
+ msgstr "Ontvink dit als u problemen ondervindt met de weergave van knoppen in samenvattingen (enkele thema's gebruiken eigen functies welke niet goed samenwerken met de plugin)."
122
+
123
+ msgid "Include buttons in excerpts"
124
+ msgstr "Toon knoppen in samenvattingen"
125
+
126
+ #: Posts & Pages, Shortcode, Share and Follow widget settings:
127
+ msgid "Check the boxes to display the button on your website. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list. For the tweet button you can also fill in your Twitter username which will then be appended to the tweet (like via @WordPress)."
128
+ msgstr "Vink de knoppen aan om deze weer te geven op uw website. Voor elke knop kunt u een apart stijl selecteren uit het selectieveld. U kunt de volgorde van de knoppen wijzigen door deze naar de gewenste positie in de lijst te slepen. Voor de Tweet knop kunt u ook uw Twitter gebruikersnaam invullen om deze aan de tweet toe te voegen (zoals via @WordPress)."
129
+
130
+ msgid "Check the boxes to display the button on Social Sharing Toolkit Share widget. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list. For the tweet button you can also fill in your Twitter username which will then be appended to the tweet (like via @WordPress)."
131
+ msgstr "Vink de knoppen aan om deze weer te geven in de Social Sharing Toolkit Deel widget. Voor elke knop kunt u een apart stijl selecteren uit het selectieveld. U kunt de volgorde van de knoppen wijzigen door deze naar de gewenste positie in de lijst te slepen. Voor de Tweet knop kunt u ook uw Twitter gebruikersnaam invullen om deze aan de tweet toe te voegen (zoals via @WordPress)."
132
+
133
+ msgid "For each widget you can enter a fixed url and title for the buttons, to do this"
134
+ msgstr "Voor elke widget kunt u een vaste url en titel opgeven, om dit te doen"
135
+
136
+ msgid "go to the widget configuration page"
137
+ msgstr "ga naar de widget configuratie pagina"
138
+
139
+ msgid "Check the boxes to display the button on Social Sharing Toolkit Follow widget. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list."
140
+ msgstr "Vink de knoppen aan om deze weer te geven in de Social Sharing Toolkit Volg widget. Voor elke knop kunt u een apart stijl selecteren uit het selectieveld. U kunt de volgorde van de knoppen wijzigen door deze naar de gewenste positie in de lijst te slepen."
141
+
142
+ msgid "Change button order"
143
+ msgstr "Verander volgorde van knoppen"
144
+
145
+ msgid "Choose button orientation horizontal to display the buttons side by side, vertical will place them below each other. You can also select an alignment to better suit your theme."
146
+ msgstr "Kies horizontale knop orientatie om de knoppen langs elkaar te tonen, de verticale orientatie zal de knoppen onder elkaar plaatsen. U kunt ook een uitlijning kiezen welke beter bij uw thema past. "
147
+
148
+ msgid "Button orientation"
149
+ msgstr "Knop orientatie"
150
+
151
+ msgid "Horizontal"
152
+ msgstr "Horizontaal"
153
+
154
+ msgid "Vertical"
155
+ msgstr "Verticaal"
156
+
157
+ msgid "Button alignment"
158
+ msgstr "Knop uitlijning"
159
+
160
+ msgid "Align to bottom"
161
+ msgstr "Uitlijnen op onderkant"
162
+
163
+ msgid "Align to top"
164
+ msgstr "Uitlijnen op bovenkant"
165
+
166
+ #: Automatic Twitter links settings:
167
+ msgid "For each button you only have to enter your id or username of the network as it appears in the url of your profile page. You will need to enter the complete url for the RSS Feed (including the http:// part) if you wish to display this button."
168
+ msgstr "Voor elke knop hoeft u enkel uw id of gebruikersnaam van het netwerk op te geven zoals deze wordt weergegeven in de url van uw profielpagina. U dient de complete url op te geven voor de RSS Feed (inclusief http://) als u deze wenst weer te geven."
169
+
170
+ msgid "To add the widget to your website"
171
+ msgstr "Om de widget aan uw website toe te voegen"
172
+
173
+ msgid "Select what you want to convert:"
174
+ msgstr "Geef aan wat u wilt converteren:"
175
+
176
+ msgid "Convert Twitter usernames"
177
+ msgstr "Converteer Twitter gebruikersnamen"
178
+
179
+ msgid "Convert hashtags"
180
+ msgstr "Converteer hashtags"
181
+
182
+ msgid "And where it should be converted:"
183
+ msgstr "En waar het geconverteerd moet worden:"
184
+
185
+ msgid "Convert in posts and pages"
186
+ msgstr "Converteer in berichten en pagina's"
187
+
188
+ msgid "Convert in comments"
189
+ msgstr "Converteer in reacties"
190
+
191
+ #: Widget settings:
192
+ msgid "Title"
193
+ msgstr "Titel"
194
+
195
+ msgid "Fixed title"
196
+ msgstr "Vaste titel"
197
+
198
+ msgid "Fixed url"
199
+ msgstr "Vaste url"
200
+
201
+ msgid "Further configuration is done via the"
202
+ msgstr "Verdere configuratie wordt gedaan via het"
203
+
204
+ msgid "plugin admin screen"
205
+ msgstr "plugin admin scherm"
206
+
207
+ #: Thank you box:
208
+ msgid "Thank you for using the Social Sharing Toolkit!"
209
+ msgstr "Bedankt voor het gebruiken van de Social Sharing Toolkit!"
210
+
211
+ msgid "For questions or requests about this plugin please use the"
212
+ msgstr "Voor vragen of verzoeken over deze plugin gaat u naar de"
213
+
214
+ msgid "official plugin page"
215
+ msgstr "officiële plugin pagina"
216
+
217
+ msgid "If you like the plugin I would appreciate it if you provide a rating of the"
218
+ msgstr "Als u de plugin leuk vind waardeer ik het zeer als u een beoordeling achterlaat van de"
219
+
220
+ msgid "plugin on WordPress.org"
221
+ msgstr "plugin op WordPress.org"
222
+
223
+ msgid "If you really like the plugin you can also"
224
+ msgstr "Als u de plugin echt leuk vindt kunt u ook"
225
+
226
+ msgid "donate here"
227
+ msgstr "hier doneren"
228
+
229
+ #: Facebook & Google+ language (same as you the WordPress Localized Language):
230
+ msgid "en_US"
231
+ msgstr "nl_NL"
232
+
233
+ #: Facebook horizontal counter width:
234
+ msgid "fb_horizontal_width"
235
+ msgstr "125px"
236
+
237
+ #: Facebook vertical counter width:
238
+ msgid "fb_vertical_width"
239
+ msgstr "91px"
240
+
241
+ #: Facebook button width (to hide text):
242
+ msgid "fb_standard_width"
243
+ msgstr "93px"
244
+
245
+ #: Button texts and titles:
246
+ msgid "Share on"
247
+ msgstr "Deel via"
248
+
249
+ msgid "Submit to"
250
+ msgstr "Voeg toe aan"
251
+
252
+ msgid "Save on"
253
+ msgstr "Opslaan op"
254
+
255
+ msgid "Digg This"
256
+ msgstr "Digg dit"
257
+
258
+ msgid "Share via email"
259
+ msgstr "Deel via email"
260
+
261
+ msgid "Friend me on"
262
+ msgstr "Bevriend me op"
263
+
264
+ msgid "Follow me on"
265
+ msgstr "Volg me op"
266
+
267
+ msgid "My profile on"
268
+ msgstr "Mijn profiel op"
269
+
270
+ msgid "Follow my company on"
271
+ msgstr "Volg mijn bedrijf op"
272
+
273
+ msgid "Add me to your circles"
274
+ msgstr "Voeg me toe aan je cirkels"
275
+
276
+ msgid "Join my network on"
277
+ msgstr "Wordt lid van mijn netwerk op"
278
+
279
+ msgid "Watch me on"
280
+ msgstr "Bekijk me op"
281
+
282
+ msgid "My photostream on"
283
+ msgstr "Mijn fotostream op"
284
+
285
+ msgid "My Picasa Web Albums"
286
+ msgstr "Mijn Picasa Web Albums"
287
+
288
+ msgid "My deviantArt"
289
+ msgstr "Mijn deviantArt"
290
+
291
+ #. Plugin Name of the plugin/theme
292
+ msgid "Social Sharing Toolkit"
293
+ msgstr "Social Sharing Toolkit"
294
+
295
+ #. Plugin URI of the plugin/theme
296
+ msgid "http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/"
297
+ msgstr "http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/"
298
+
299
+ #. Description of the plugin/theme
300
+ msgid "This plugin enables sharing of your content via popular social networks and can also convert Twitter names and hashtags to links. Easy & configurable."
301
+ msgstr "Deze plugin maakt het mogelijk je inhoud te delen via populaire sociale netwerken en kan ook Twitter namen en hashtags converteren naar links. Makkelijk en configureerbaar."
302
+
303
+ #. Author of the plugin/theme
304
+ msgid "Marijn Rongen"
305
+ msgstr "Marijn Rongen"
306
+
307
+ #. Author URI of the plugin/theme
308
+ msgid "http://www.marijnrongen.com"
309
+ msgstr "http://www.marijnrongen.com"
310
+
languages/mr_social_sharing_toolkit.pot ADDED
@@ -0,0 +1,309 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2010 Social Sharing Toolkit
2
+ # This file is distributed under the same license as the Social Sharing Toolkit package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Social Sharing Toolkit 2.0.4\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/social_sharing_toolkit\n"
7
+ "POT-Creation-Date: 2011-08-26 09:20:52+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+
15
+ #: Button types:
16
+ msgid "Button"
17
+ msgstr ""
18
+
19
+ msgid "Button + text"
20
+ msgstr ""
21
+
22
+ msgid "Button + side counter"
23
+ msgstr ""
24
+
25
+ msgid "Button + top counter"
26
+ msgstr ""
27
+
28
+ msgid "Small icon"
29
+ msgstr ""
30
+
31
+ msgid "Small icon + text"
32
+ msgstr ""
33
+
34
+ msgid "Medium icon"
35
+ msgstr ""
36
+
37
+ msgid "Medium icon + text"
38
+ msgstr ""
39
+
40
+ msgid "Large icon"
41
+ msgstr ""
42
+
43
+ msgid "Send email"
44
+ msgstr ""
45
+
46
+ msgid "Divider"
47
+ msgstr ""
48
+
49
+ msgid "RSS Feed"
50
+ msgstr ""
51
+
52
+ #: Admin screen:
53
+ msgid "Donate"
54
+ msgstr ""
55
+
56
+ msgid "Settings saved."
57
+ msgstr ""
58
+
59
+ msgid "General settings"
60
+ msgstr ""
61
+
62
+ msgid "Posts & pages"
63
+ msgstr ""
64
+
65
+ msgid "Shortcode"
66
+ msgstr ""
67
+
68
+ msgid "Share Widget"
69
+ msgstr ""
70
+
71
+ msgid "Follow Widget"
72
+ msgstr ""
73
+
74
+ msgid "Automatic Twitter links"
75
+ msgstr ""
76
+
77
+ #: General settings:
78
+ msgid "Load JavaScript in footer"
79
+ msgstr ""
80
+
81
+ msgid "Improves performance but may not work on some themes"
82
+ msgstr ""
83
+
84
+ msgid "Choose where the buttons must be displayed and if the buttons should be displayed on posts, pages or both."
85
+ msgstr ""
86
+
87
+ msgid "Button location"
88
+ msgstr ""
89
+
90
+ msgid "Do not display"
91
+ msgstr ""
92
+
93
+ msgid "Display before content"
94
+ msgstr ""
95
+
96
+ msgid "Display after content"
97
+ msgstr ""
98
+
99
+ msgid "Display before and after content"
100
+ msgstr ""
101
+
102
+ msgid "Place buttons on"
103
+ msgstr ""
104
+
105
+ msgid "Posts and pages"
106
+ msgstr ""
107
+
108
+ msgid "Only on posts"
109
+ msgstr ""
110
+
111
+ msgid "Only on pages"
112
+ msgstr ""
113
+
114
+ msgid "Enable shortcode"
115
+ msgstr ""
116
+
117
+ msgid "Use the shortcode [social_share/] where you want the buttons to appear"
118
+ msgstr ""
119
+
120
+ msgid "Uncheck this box if you are having issues displaying the buttons with excerpts (some themes have custom excerpt functions which do not play nice with the plugin)."
121
+ msgstr ""
122
+
123
+ msgid "Include buttons in excerpts"
124
+ msgstr ""
125
+
126
+ #: Posts & Pages, Shortcode, Share and Follow widget settings:
127
+ msgid "Check the boxes to display the button on your website. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list. For the tweet button you can also fill in your Twitter username which will then be appended to the tweet (like via @WordPress)."
128
+ msgstr ""
129
+
130
+ msgid "Check the boxes to display the button on Social Sharing Toolkit Share widget. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list. For the tweet button you can also fill in your Twitter username which will then be appended to the tweet (like via @WordPress)."
131
+ msgstr ""
132
+
133
+ msgid "For each widget you can enter a fixed url and title for the buttons, to do this"
134
+ msgstr ""
135
+
136
+ msgid "go to the widget configuration page"
137
+ msgstr ""
138
+
139
+ msgid "Check the boxes to display the button on Social Sharing Toolkit Follow widget. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list."
140
+ msgstr ""
141
+
142
+ msgid "Change button order"
143
+ msgstr ""
144
+
145
+ msgid "Choose button orientation horizontal to display the buttons side by side, vertical will place them below each other. You can also select an alignment to better suit your theme."
146
+ msgstr ""
147
+
148
+ msgid "Button orientation"
149
+ msgstr ""
150
+
151
+ msgid "Horizontal"
152
+ msgstr ""
153
+
154
+ msgid "Vertical"
155
+ msgstr ""
156
+
157
+ msgid "Button alignment"
158
+ msgstr ""
159
+
160
+ msgid "Align to bottom"
161
+ msgstr ""
162
+
163
+ msgid "Align to top"
164
+ msgstr ""
165
+
166
+ #: Automatic Twitter links settings:
167
+ msgid "For each button you only have to enter your id or username of the network as it appears in the url of your profile page. You will need to enter the complete url for the RSS Feed (including the http:// part) if you wish to display this button."
168
+ msgstr ""
169
+
170
+ msgid "To add the widget to your website"
171
+ msgstr ""
172
+
173
+ msgid "Select what you want to convert:"
174
+ msgstr ""
175
+
176
+ msgid "Convert Twitter usernames"
177
+ msgstr ""
178
+
179
+ msgid "Convert hashtags"
180
+ msgstr ""
181
+
182
+ msgid "And where it should be converted:"
183
+ msgstr ""
184
+
185
+ msgid "Convert in posts and pages"
186
+ msgstr ""
187
+
188
+ msgid "Convert in comments"
189
+ msgstr ""
190
+
191
+ #: Widget settings:
192
+ msgid "Title"
193
+ msgstr ""
194
+
195
+ msgid "Fixed title"
196
+ msgstr ""
197
+
198
+ msgid "Fixed url"
199
+ msgstr ""
200
+
201
+ msgid "Further configuration is done via the"
202
+ msgstr ""
203
+
204
+ msgid "plugin admin screen"
205
+ msgstr ""
206
+
207
+ #: Thank you box:
208
+ msgid "Thank you for using the Social Sharing Toolkit!"
209
+ msgstr ""
210
+
211
+ msgid "For questions or requests about this plugin please use the"
212
+ msgstr ""
213
+
214
+ msgid "official plugin page"
215
+ msgstr ""
216
+
217
+ msgid "If you like the plugin I would appreciate it if you provide a rating of the"
218
+ msgstr ""
219
+
220
+ msgid "plugin on WordPress.org"
221
+ msgstr ""
222
+
223
+ msgid "If you really like the plugin you can also"
224
+ msgstr ""
225
+
226
+ msgid "donate here"
227
+ msgstr ""
228
+
229
+ #: Facebook & Google+ language (same as you the WordPress Localized Language):
230
+ msgid "en_US"
231
+ msgstr ""
232
+
233
+ #: Facebook horizontal counter width:
234
+ msgid "fb_horizontal_width"
235
+ msgstr ""
236
+
237
+ #: Facebook vertical counter width:
238
+ msgid "fb_vertical_width"
239
+ msgstr ""
240
+
241
+ #: Facebook button width (to hide text):
242
+ msgid "fb_standard_width"
243
+ msgstr ""
244
+
245
+ #: Button texts and titles:
246
+ msgid "Share on"
247
+ msgstr ""
248
+
249
+ msgid "Submit to"
250
+ msgstr ""
251
+
252
+ msgid "Save on"
253
+ msgstr ""
254
+
255
+ msgid "Digg This"
256
+ msgstr ""
257
+
258
+ msgid "Share via email"
259
+ msgstr ""
260
+
261
+ msgid "Friend me on"
262
+ msgstr ""
263
+
264
+ msgid "Follow me on"
265
+ msgstr ""
266
+
267
+ msgid "My profile on"
268
+ msgstr ""
269
+
270
+ msgid "Follow my company on"
271
+ msgstr ""
272
+
273
+ msgid "Add me to your circles"
274
+ msgstr ""
275
+
276
+ msgid "Join my network on"
277
+ msgstr ""
278
+
279
+ msgid "Watch me on"
280
+ msgstr ""
281
+
282
+ msgid "My photostream on"
283
+ msgstr ""
284
+
285
+ msgid "My Picasa Web Albums"
286
+ msgstr ""
287
+
288
+ msgid "My deviantArt"
289
+ msgstr ""
290
+
291
+ #. Plugin Name of the plugin/theme
292
+ msgid "Social Sharing Toolkit"
293
+ msgstr ""
294
+
295
+ #. Plugin URI of the plugin/theme
296
+ msgid "http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/"
297
+ msgstr ""
298
+
299
+ #. Description of the plugin/theme
300
+ msgid "This plugin enables sharing of your content via popular social networks and can also convert Twitter names and hashtags to links. Easy & configurable."
301
+ msgstr ""
302
+
303
+ #. Author of the plugin/theme
304
+ msgid "Marijn Rongen"
305
+ msgstr ""
306
+
307
+ #. Author URI of the plugin/theme
308
+ msgid "http://www.marijnrongen.com"
309
+ msgstr ""
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=P8ZVN
4
  Tags: Facebook, Like, LinkedIn, Share, Google, Plus, +1, Google+, Twitter, Tweet, Follow, StumbleUpon, Stumble, Tumblr, Delicious, Digg, Reddit, Myspace, Hyves, YouTube, Flickr, Picasa, deaviantART, mail, RSS, feed, connect, recommend, social, sharing, widget, shortcode, page, post, button, counter, icon
5
  Requires at least: 3.0
6
  Tested up to: 3.2.1
7
- Stable tag: 2.0.3
8
  License: GPLv2 or later
9
 
10
  Easy sharing and connecting on social networks. Display on posts or use widgets or shortcode. Also Twitter name/hashtag to link converter.
@@ -47,9 +47,13 @@ You can also choose the orientation of the buttons:
47
  * horizontal (buttons are placed side by side)
48
  * vertical (buttons are placed below each other)
49
 
 
 
 
 
50
  = Shortcode =
51
 
52
- It is also possible to only let the buttons appear where you want by using shortcode. To do this you need to set the button position to the shortcode option and use the shortcode [social_share/] in the content where you would like to display the buttons.
53
 
54
  = Widget =
55
 
@@ -72,6 +76,8 @@ The networks currently supported for the Follow Widget are:
72
  * Flickr
73
  * Picasa
74
  * DeviantArt
 
 
75
 
76
  A button for an RSS feed is also included. Of course the type, order and orientation of the buttons is also configurable for the Follow Widget. Each button for the Follow Widget supports the following types:
77
 
@@ -115,6 +121,17 @@ To display the follow buttons somewhere else you can use the following code:
115
  echo $social_sharing_toolkit->create_followers();
116
  ?>`
117
 
 
 
 
 
 
 
 
 
 
 
 
118
 
119
  == Installation ==
120
 
@@ -122,15 +139,19 @@ Upload the Social Sharing Toolkit plugin to the `/wp-content/plugins/` folder on
122
 
123
  == Screenshots ==
124
 
125
- 1. Plugin configuration for posts and pages
126
- 2. Plugin configuration for Share Widget
127
- 3. Plugin configuration for Follow Widget
128
- 4. Automatic Twitter links configuration
129
- 5. Some buttons
130
- 6. Some other buttons
131
 
132
  == Upgrade Notice ==
133
 
 
 
 
 
134
  = 2.0.3 =
135
 
136
  Some bug fixes.
@@ -164,6 +185,21 @@ Please update to version 1.0.1 to prevent an unexpected printing of the page tit
164
 
165
  == Changelog ==
166
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  = 2.0.3 =
168
  * Fixed line break issue on some themes affecting horizontal button orientation
169
  * Fixed security prompt on IE9 (thanks to Joey for debugging this)
4
  Tags: Facebook, Like, LinkedIn, Share, Google, Plus, +1, Google+, Twitter, Tweet, Follow, StumbleUpon, Stumble, Tumblr, Delicious, Digg, Reddit, Myspace, Hyves, YouTube, Flickr, Picasa, deaviantART, mail, RSS, feed, connect, recommend, social, sharing, widget, shortcode, page, post, button, counter, icon
5
  Requires at least: 3.0
6
  Tested up to: 3.2.1
7
+ Stable tag: 2.0.4
8
  License: GPLv2 or later
9
 
10
  Easy sharing and connecting on social networks. Display on posts or use widgets or shortcode. Also Twitter name/hashtag to link converter.
47
  * horizontal (buttons are placed side by side)
48
  * vertical (buttons are placed below each other)
49
 
50
+ = Divider =
51
+
52
+ In version 2.0.4 three dividers were added to each list. These might be useful in ordering the buttons, especially in the case of varying button types used with a horizontal orientation. A divider will split the element containing the buttons in two, allowing for more customization.
53
+
54
  = Shortcode =
55
 
56
+ It is also possible to only let the buttons appear where you want by using shortcode. The shortcode function has it's own list of buttons with the same possibilities as the list for posts & pages. Use the shortcode [social_share/] in the content where you would like to display the buttons.
57
 
58
  = Widget =
59
 
76
  * Flickr
77
  * Picasa
78
  * DeviantArt
79
+ * Last.fm
80
+ * Spotify
81
 
82
  A button for an RSS feed is also included. Of course the type, order and orientation of the buttons is also configurable for the Follow Widget. Each button for the Follow Widget supports the following types:
83
 
121
  echo $social_sharing_toolkit->create_followers();
122
  ?>`
123
 
124
+ = The LinkedIn follow link doesn't seem right =
125
+
126
+ You may need to setup you custom public profile url. To do so, use the following steps:
127
+ 1. When signed in to LinkedIn, Go to Edit Profile
128
+ 2. Click on Edit link, next to your default Public Profile URL (Under Profile tab)
129
+ 3. Under "Your Public profile URL" on the right click "Customize your public profile url"
130
+ 4. Type your desired URL in the popup box and you should be done!
131
+
132
+ = Can I translate the plugin in my own language? =
133
+
134
+ You can, please refer to the i18n sections on the WordPress website for information on how this works. A .pot file and a Dutch translation are included in the `/languages/` folder of the plugin.
135
 
136
  == Installation ==
137
 
139
 
140
  == Screenshots ==
141
 
142
+ 1. Plugin configuration: General settings
143
+ 2. Plugin configuration: Posts and pages, Shortcode and Share Widget have the same options
144
+ 3. Buttons generated by the configuration in screenshot 2
145
+ 4. Plugin configuration: Follow Widget
146
+ 5. Example of buttons generated by Follow Widget
147
+ 6. Plugin configuration: Automatic Twitter links
148
 
149
  == Upgrade Notice ==
150
 
151
+ = 2.0.4 =
152
+
153
+ Please update to version 2.0.4 for several display bug fixes, internationalization and expanded functionality.
154
+
155
  = 2.0.3 =
156
 
157
  Some bug fixes.
185
 
186
  == Changelog ==
187
 
188
+ = 2.0.4 =
189
+ * Redesigned email button
190
+ * Redesigned Delicious buttons and counters
191
+ * Redesigned admin screens in tabs for easy configuration
192
+ * Enabled simultaneous shortcode use next to other display modes
193
+ * Added option to show buttons before and after content
194
+ * Added support for internationalization (.pot file and Dutch translation included)
195
+ * Added separate list for shortcode use
196
+ * Added Facebook button without text (text is hidden)
197
+ * Added Twitter Follow button (with & without counter)
198
+ * Added dividers to each list
199
+ * Added support for LinkedIn (company), Last.fm and Spotify follow links
200
+ * Fixed Javascript not loading in footer bug
201
+ * Fixed button alignment issues
202
+
203
  = 2.0.3 =
204
  * Fixed line break issue on some themes affecting horizontal button orientation
205
  * Fixed security prompt on IE9 (thanks to Joey for debugging this)
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file
screenshot-3.png CHANGED
Binary file
screenshot-4.png CHANGED
Binary file
screenshot-5.png CHANGED
Binary file
screenshot-6.png CHANGED
Binary file
social_sharing_toolkit.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Social Sharing Toolkit
4
  Plugin URI: http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/
5
  Description: This plugin enables sharing of your content via popular social networks and can also convert Twitter names and hashtags to links. Easy & configurable.
6
- Version: 2.0.3
7
  Author: Marijn Rongen
8
  Author URI: http://www.marijnrongen.com
9
  */
@@ -15,17 +15,19 @@ class MR_Social_Sharing_Toolkit {
15
  var $follow_buttons;
16
 
17
  function MR_Social_Sharing_Toolkit() {
 
18
  /* Declare button types */
19
- $this->types['none'] = 'Button';
20
- $this->types['horizontal'] = 'Button + side counter';
21
- $this->types['vertical'] = 'Button + top counter';
22
- $this->types['icon_small'] = 'Small icon';
23
- $this->types['icon_small_text'] = 'Small icon + text';
24
- $this->types['icon_medium'] = 'Medium icon';
25
- $this->types['icon_medium_text'] = 'Medium icon + text';
26
- $this->types['icon_large'] = 'Large icon';
 
27
  /* Declare bookmark buttons with options */
28
- $this->share_buttons['fb_like'] = array('icon' => 'facebook', 'title' => 'Facebook Like', 'types' => array('none', 'horizontal', 'vertical'));
29
  $this->share_buttons['fb_send'] = array('icon' => 'facebook', 'title' => 'Facebook Send', 'types' => array('none'));
30
  $this->share_buttons['tw_tweet'] = array('icon' => 'twitter', 'title' => 'Twitter', 'id' => '@', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
31
  $this->share_buttons['gl_plus'] = array('icon' => 'googleplus', 'title' => 'Google+', 'types' => array('none', 'horizontal', 'vertical'));
@@ -37,12 +39,16 @@ class MR_Social_Sharing_Toolkit {
37
  $this->share_buttons['rd_reddit'] = array('icon' => 'reddit', 'title' => 'Reddit', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
38
  $this->share_buttons['ms_myspace'] = array('icon' => 'myspace', 'title' => 'Myspace', 'types' => array('none', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
39
  $this->share_buttons['hv_respect'] = array('icon' => 'hyves', 'title' => 'Hyves Respect', 'types' => array('horizontal'));
40
- $this->share_buttons['ml_send'] = array('icon' => 'email', 'title' => 'Send email', 'types' => array('none', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
 
 
 
41
  /* Declare follow buttons with options */
42
  $this->follow_buttons['follow_facebook'] = array('icon' => 'facebook', 'title' => 'Facebook', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
43
- $this->follow_buttons['follow_twitter'] = array('icon' => 'twitter', 'title' => 'Twitter', 'id' => '@', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
44
  $this->follow_buttons['follow_plus'] = array('icon' => 'googleplus', 'title' => 'Google+', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
45
- $this->follow_buttons['follow_linked'] = array('icon' => 'linkedin', 'title' => 'LinkedIn', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
 
46
  $this->follow_buttons['follow_tumblr'] = array('icon' => 'tumblr', 'title' => 'Tumblr', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
47
  $this->follow_buttons['follow_myspace'] = array('icon' => 'myspace', 'title' => 'Myspace', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
48
  $this->follow_buttons['follow_hyves'] = array('icon' => 'hyves', 'title' => 'Hyves', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
@@ -50,43 +56,56 @@ class MR_Social_Sharing_Toolkit {
50
  $this->follow_buttons['follow_flickr'] = array('icon' => 'flickr', 'title' => 'Flickr', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
51
  $this->follow_buttons['follow_picasa'] = array('icon' => 'picasa', 'title' => 'Picasa', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
52
  $this->follow_buttons['follow_deviant'] = array('icon' => 'deviantart', 'title' => 'deviantArt', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
53
- $this->follow_buttons['follow_rss'] = array('icon' => 'rss', 'title' => 'RSS Feed', 'id' => 'url:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
 
 
 
 
 
54
  /* Set defaults and load user options */
55
  $this->get_options();
56
  }
57
 
58
  function get_options() {
59
  foreach ($this->share_buttons as $key => $val) {
60
- $buttons[$key] = array('enable' => 1, 'type' => $val['types'][0]);
61
- $widgets[$key] = array('enable' => 1, 'type' => $val['types'][0]);
 
62
  $button_order[] = $key;
 
63
  $widget_order[] = $key;
64
  }
65
  foreach ($this->follow_buttons as $key => $val) {
66
- $followers[$key] = array('enable' => 1, 'type' => $val['types'][0], 'id' => '');
67
  $follow_order[] = $key;
68
  }
69
- $this->options = array('mr_social_sharing_buttons' => $buttons, 'mr_social_sharing_widget_buttons' => $widgets, 'mr_social_sharing_follow_buttons' => $followers, 'mr_social_sharing_display' => 'span', 'mr_social_sharing_widget_display' => 'span', 'mr_social_sharing_follow_display' => 'span', 'mr_social_sharing_align' => '', 'mr_social_sharing_widget_align' => '', 'mr_social_sharing_follow_align' => '', 'mr_social_sharing_position' => 'none', 'mr_social_sharing_types' => 'both', 'mr_social_sharing_include_excerpts' => 1, 'mr_social_sharing_button_order' => $button_order, 'mr_social_sharing_widget_button_order' => $widget_order, 'mr_social_sharing_follow_button_order' => $follow_order, 'mr_social_sharing_linkify_content' => 0, 'mr_social_sharing_linkify_comments' => 0, 'mr_social_sharing_twitter_handles' => 0, 'mr_social_sharing_twitter_hashtags' => 0, 'mr_social_sharing_js_footer' => 0);
70
  foreach ($this->options as $key => $val) {
71
  $this->options[$key] = get_option( $key, $val );
72
  }
73
  foreach ($this->share_buttons as $key => $val) {
74
  if (!array_key_exists($key, $this->options['mr_social_sharing_buttons'])) {
75
- $this->options['mr_social_sharing_buttons'][$key] = array('enable' => 1, 'type' => $val['types'][0]);
 
 
 
76
  }
77
  if (!array_key_exists($key, $this->options['mr_social_sharing_widget_buttons'])) {
78
- $this->options['mr_social_sharing_widget_buttons'][$key] = array('enable' => 1, 'type' => $val['types'][0]);
79
  }
80
  if (!in_array($key, $this->options['mr_social_sharing_button_order'])) {
81
  $this->options['mr_social_sharing_button_order'][] = $key;
82
  }
 
 
 
83
  if (!in_array($key, $this->options['mr_social_sharing_widget_button_order'])) {
84
  $this->options['mr_social_sharing_widget_button_order'][] = $key;
85
  }
86
  }
87
  foreach ($this->follow_buttons as $key => $val) {
88
  if (!array_key_exists($key, $this->options['mr_social_sharing_follow_buttons'])) {
89
- $this->options['mr_social_sharing_follow_buttons'][$key] = array('enable' => 1, 'type' => $val['types'][0], 'id' => '');
90
  }
91
  if (!in_array($key, $this->options['mr_social_sharing_follow_button_order'])) {
92
  $this->options['mr_social_sharing_follow_button_order'][] = $key;
@@ -114,12 +133,13 @@ class MR_Social_Sharing_Toolkit {
114
  add_filter('plugin_row_meta', array('MR_Social_Sharing_Toolkit', 'plugin_links'),10,2);
115
  wp_enqueue_style('mr_social_sharing-admin', plugins_url('/admin.css', __FILE__));
116
  wp_enqueue_script('mr_social_sharing-admin', plugins_url('/admin.js', __FILE__));
 
117
  wp_enqueue_script('jquery-ui-sortable');
118
  }
119
 
120
  function plugin_links($links, $file) {
121
  if ($file == plugin_basename(__FILE__)) {
122
- $links[] = '<a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=P8ZVNC57E58FE&lc=NL&item_name=WordPress%20plugins%20by%20Marijn%20Rongen&item_number=Social%20Sharing%20Toolkit&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">Donate</a>';
123
  }
124
  return $links;
125
  }
@@ -131,279 +151,224 @@ class MR_Social_Sharing_Toolkit {
131
  if( isset($_POST['mr_social_sharing_save_options']) && $_POST['mr_social_sharing_save_options'] == 'Y' ) {
132
  $this->save_options($_POST);
133
  echo '
134
- <div class="updated"><p><strong>'.__('settings saved.', 'mr_social_sharing' ).'</strong></p></div>';
135
  }
136
  echo '
137
  <div class="wrap">
138
  <form method="post" action="">
139
  <input type="hidden" name="mr_social_sharing_save_options" value="Y"/>
140
  <h2>Social Sharing Toolkit</h2>
141
- <p>
142
- Jump to: <a href="#mr_social_sharing_widget_networks">Posts & pages</a> | <a href="#mr_social_sharing_widget_networks">Share Widget</a> | <a href="#mr_social_sharing_follow_networks">Follow Widget</a> | <a href="#mr_twitter_links">Automatic Twitter links</a><br/>
143
- <br/>
144
- <label for="mr_social_sharing_js_footer" class="check"><input type="checkbox" name="mr_social_sharing_js_footer" id="mr_social_sharing_js_footer"';
145
- if ($this->options['mr_social_sharing_js_footer'] == 1) { echo ' checked="checked"';}
146
- echo ' value="1" /> Load JavaScript in footer</label><br/>
147
- <span class="description"> '.__("Improves performance but may not work on some themes", 'mr_social_sharing').'</span>
148
- </p>
149
- <div class="mr_social_sharing_networks">
150
- <h3>Posts & pages:</h3>
151
- <p>
152
- Check the boxes to display the button on your website. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list. For the tweet button you can also fill in your Twitter username which will then be appended to the tweet (like via @WordPress).
153
- </p>
154
- <ul id="mr_social_sharing_networks">';
155
- foreach ($this->options['mr_social_sharing_button_order'] as $button) {
156
- echo '
157
- <li>
158
- <img src="'.plugins_url('/images/icons_small/'.$this->share_buttons[$button]['icon'].'.png', __FILE__).'" title="'.$this->share_buttons[$button]['title'].'" alt="'.$this->share_buttons[$button]['title'].'"/>
159
- <label for="mr_social_sharing_'.$button.'"><input type="checkbox" name="mr_social_sharing_buttons['.$button.'][enable]" id="mr_social_sharing_'.$button.'"';
160
- if ($this->options['mr_social_sharing_buttons'][$button]['enable'] == 1) { echo ' checked="checked"';}
161
- echo ' value="1" />'.$this->share_buttons[$button]['title'].'</label>
162
- <img class="right" src="'.plugins_url('/images/move.png', __FILE__).'" title="Change button order" alt="Change button order"/>
163
- <select name="mr_social_sharing_buttons['.$button.'][type]" id="mr_social_sharing_'.$button.'_type">';
164
- foreach ($this->share_buttons[$button]['types'] as $type) {
165
- echo '<option value="'.$type.'"';
166
- if ($this->options['mr_social_sharing_buttons'][$button]['type'] == $type) { echo ' selected="selected"';}
167
- echo '>'.$this->types[$type].'</option>';
168
- }
169
- if (array_key_exists('id', $this->share_buttons[$button])) {
170
- echo '
171
- <input type="text" class="text" name="mr_social_sharing_buttons['.$button.'][id]" id="mr_social_sharing_'.$button.'_id" value="'.$this->options['mr_social_sharing_buttons'][$button]['id'].'"/>
172
- <label for="mr_social_sharing_'.$button.'_id" class="text">'.$this->share_buttons[$button]['id'].'</label>';
173
- }
174
- echo '
175
- <input type="hidden" name="mr_social_sharing_button_order[]" value="'.$button.'"/>
176
- </li>';
177
- }
178
- echo '
179
  </ul>
180
- <p>
181
- Choose button orientation horizontal to display the buttons side by side, vertical will place them below each other. You can also select an alignment to better suit your theme.
182
- </p>
183
- <label for="mr_social_sharing_display">Button orientation</label>
184
- <select name="mr_social_sharing_display" id="mr_social_sharing_display">
185
- <option value="span"';
186
- if ($this->options['mr_social_sharing_display'] == 'span') { echo ' selected="selected"';}
187
- echo '>Horizontal</option>
188
- <option value="div"';
189
- if ($this->options['mr_social_sharing_display'] == 'div') { echo ' selected="selected"';}
190
- echo '>Vertical</option>
191
- </select><br/>
192
- <label for="mr_social_sharing_align">Button alignment</label>
193
- <select name="mr_social_sharing_align" id="mr_social_sharing_align">
194
- <option value=""';
195
- if ($this->options['mr_social_sharing_align'] == '') { echo ' selected="selected"';}
196
- echo '>Align to bottom</option>
197
- <option value="_top"';
198
- if ($this->options['mr_social_sharing_align'] == '_top') { echo ' selected="selected"';}
199
- echo '>Align to top</option>
200
- </select>
201
- <p>
202
- Choose where the buttons must be displayed and if the buttons should be displayed on posts, pages or both.
203
- </p>
204
- <label for="mr_social_sharing_position">Button location</label>
205
- <select name="mr_social_sharing_position" id="mr_social_sharing_position">
206
- <option value="none"';
207
  if ($this->options['mr_social_sharing_position'] == 'none') { echo ' selected="selected"';}
208
- echo '>Do not display social bookmarks</option>
209
- <option value="top"';
210
  if ($this->options['mr_social_sharing_position'] == 'top') { echo ' selected="selected"';}
211
- echo '>Display above content</option>
212
- <option value="bottom"';
213
  if ($this->options['mr_social_sharing_position'] == 'bottom') { echo ' selected="selected"';}
214
- echo '>Display below content</option>
215
- <option value="shortcode"';
216
- if ($this->options['mr_social_sharing_position'] == 'shortcode') { echo ' selected="selected"';}
217
- echo '>Let me decide by using shortcode</option>
218
- </select><br/>';
219
- if ($this->options['mr_social_sharing_position'] == 'shortcode') {
220
- echo '<span class="description"> '.__("Use the shortcode [social_share/] where you want the buttons to appear", 'mr_social_sharing').'</span><br/>';
221
- }
222
- echo '
223
- <label for="mr_social_sharing_types">Place buttons on</label>
224
- <select name="mr_social_sharing_types" id="mr_social_sharing_types">
225
- <option value="both"';
226
  if ($this->options['mr_social_sharing_types'] == 'both') { echo ' selected="selected"';}
227
- echo '>On posts and pages</option>
228
- <option value="posts"';
229
  if ($this->options['mr_social_sharing_types'] == 'posts') { echo ' selected="selected"';}
230
- echo '>Only on posts</option>
231
- <option value="pages"';
232
  if ($this->options['mr_social_sharing_types'] == 'pages') { echo ' selected="selected"';}
233
- echo '>Only on pages</option>
234
- </select>
235
- <p>
236
- Uncheck this box if you are having issues displaying the buttons with excerpts (some themes have custom excerpt functions which do not play nice with the plugin).
237
- </p>
238
- <label for="mr_social_sharing_include_excerpts" class="check"><input type="checkbox" name="mr_social_sharing_include_excerpts" id="mr_social_sharing_include_excerpts"';
 
 
239
  if ($this->options['mr_social_sharing_include_excerpts'] == 1) { echo ' checked="checked"';}
240
- echo ' value="1" /> Include buttons in excerpts</label>
 
 
 
 
 
 
 
 
 
241
  </div>
242
- <p class="submit">
243
- <input type="submit" name="Submit" class="button-primary" value="'.esc_attr__('Save Changes').'" />
244
- </p>
245
- <div class="mr_social_sharing_networks">
246
- <h3>Share Widget:</h3>
247
  <p>
248
- Check the boxes to display the button on Social Sharing Toolkit Share widget. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list. For the tweet button you can also fill in your Twitter username which will then be appended to the tweet (like via @WordPress).<br/>
249
- <br/>
250
- For each widget you can enter a fixed url and title for the buttons, to do this <a href="widgets.php">go to the widget configuration page</a>.
251
- </p>
252
- <ul id="mr_social_sharing_widget_networks">';
253
- foreach ($this->options['mr_social_sharing_widget_button_order'] as $button) {
254
- echo '
255
- <li>
256
- <img src="'.plugins_url('/images/icons_small/'.$this->share_buttons[$button]['icon'].'.png', __FILE__).'" title="'.$this->share_buttons[$button]['title'].'" alt="'.$this->share_buttons[$button]['title'].'"/>
257
- <label for="mr_social_sharing_widget_'.$button.'"><input type="checkbox" name="mr_social_sharing_widget_buttons['.$button.'][enable]" id="mr_social_sharing_widget_'.$button.'"';
258
- if ($this->options['mr_social_sharing_widget_buttons'][$button]['enable'] == 1) { echo ' checked="checked"';}
259
- echo ' value="1" />'.$this->share_buttons[$button]['title'].'</label>
260
- <img class="right" src="'.plugins_url('/images/move.png', __FILE__).'" title="Change button order" alt="Change button order"/>
261
- <select name="mr_social_sharing_widget_buttons['.$button.'][type]" id="mr_social_sharing_widget_'.$button.'_type">';
262
- foreach ($this->share_buttons[$button]['types'] as $type) {
263
- echo '<option value="'.$type.'"';
264
- if ($this->options['mr_social_sharing_widget_buttons'][$button]['type'] == $type) { echo ' selected="selected"';}
265
- echo '>'.$this->types[$type].'</option>';
266
- }
267
- if (array_key_exists('id', $this->share_buttons[$button])) {
268
- echo '
269
- <input type="text" class="text" name="mr_social_sharing_widget_buttons['.$button.'][id]" id="mr_social_sharing_widget_'.$button.'_id" value="'.$this->options['mr_social_sharing_widget_buttons'][$button]['id'].'"/>
270
- <label for="mr_social_sharing_widget_'.$button.'_id" class="text">'.$this->share_buttons[$button]['id'].'</label>';
271
- }
272
- echo '
273
- <input type="hidden" name="mr_social_sharing_widget_button_order[]" value="'.$button.'"/>
274
- </li>';
275
- }
276
- echo '
277
- </ul>
278
  <p>
279
- Choose button orientation horizontal to display the buttons side by side, vertical will place them below each other. You can also select an alignment to better suit your theme.
280
- </p>
281
- <label for="mr_social_sharing_widget_display">Button orientation</label>
282
- <select name="mr_social_sharing_widget_display" id="mr_social_sharing_widget_display">
283
- <option value="span"';
284
- if ($this->options['mr_social_sharing_widget_display'] == 'span') { echo ' selected="selected"';}
285
- echo '>Horizontal</option>
286
- <option value="div"';
287
- if ($this->options['mr_social_sharing_widget_display'] == 'div') { echo ' selected="selected"';}
288
- echo '>Vertical</option>
289
- </select><br/>
290
- <label for="mr_social_sharing_widget_align">Button alignment</label>
291
- <select name="mr_social_sharing_widget_align" id="mr_social_widget_sharing_align">
292
- <option value=""';
293
- if ($this->options['mr_social_sharing_widget_align'] == '') { echo ' selected="selected"';}
294
- echo '>Align to bottom</option>
295
- <option value="_top"';
296
- if ($this->options['mr_social_sharing_widget_align'] == '_top') { echo ' selected="selected"';}
297
- echo '>Align to top</option>
298
- </select>
299
  </div>
300
- <p class="submit">
301
- <input type="submit" name="Submit" class="button-primary" value="'.esc_attr__('Save Changes').'" />
302
- </p>
303
- <div class="mr_social_sharing_networks">
304
- <h3>Follow Widget:</h3>
305
  <p>
306
- Check the boxes to display the button on Social Sharing Toolkit Follow widget. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list.<br/>
 
 
307
  <br/>
308
- For each button you only have to enter your id or username of the network as it appears in the url of your profile page. You will need to enter the complete url for the RSS Feed (including the http:// part) if you wish to display this button.<br/>
309
  <br/>
310
- To add the widget to your website <a href="widgets.php">go to the widget configuration page</a>.
311
- </p>
312
- <ul id="mr_social_sharing_follow_networks">';
313
- foreach ($this->options['mr_social_sharing_follow_button_order'] as $button) {
314
- echo '
315
- <li>
316
- <img src="'.plugins_url('/images/icons_small/'.$this->follow_buttons[$button]['icon'].'.png', __FILE__).'" title="'.$this->follow_buttons[$button]['title'].'" alt="'.$this->follow_buttons[$button]['title'].'"/>
317
- <label for="mr_social_sharing_follow_'.$button.'"><input type="checkbox" name="mr_social_sharing_follow_buttons['.$button.'][enable]" id="mr_social_sharing_follow_'.$button.'"';
318
- if ($this->options['mr_social_sharing_follow_buttons'][$button]['enable'] == 1) { echo ' checked="checked"';}
319
- echo ' value="1" />'.$this->follow_buttons[$button]['title'].'</label>
320
- <img class="right" src="'.plugins_url('/images/move.png', __FILE__).'" title="Change button order" alt="Change button order"/>
321
- <select name="mr_social_sharing_follow_buttons['.$button.'][type]" id="mr_social_sharing_follow_'.$button.'_type">';
322
- foreach ($this->follow_buttons[$button]['types'] as $type) {
323
- echo '<option value="'.$type.'"';
324
- if ($this->options['mr_social_sharing_follow_buttons'][$button]['type'] == $type) { echo ' selected="selected"';}
325
- echo '>'.$this->types[$type].'</option>';
326
- }
327
- if (array_key_exists('id', $this->follow_buttons[$button])) {
328
- echo '
329
- <input type="text" class="text" name="mr_social_sharing_follow_buttons['.$button.'][id]" id="mr_social_sharing_follow_'.$button.'_id" value="'.$this->options['mr_social_sharing_follow_buttons'][$button]['id'].'"/>
330
- <label for="mr_social_sharing_follow_'.$button.'_id" class="text">'.$this->follow_buttons[$button]['id'].'</label>';
331
- }
332
- echo '
333
- <input type="hidden" name="mr_social_sharing_follow_button_order[]" value="'.$button.'"/>
334
- </li>';
335
- }
336
  echo '
337
- </ul>
338
- <p>
339
- Choose button orientation horizontal to display the buttons side by side, vertical will place them below each other. You can also select an alignment to better suit your theme.
340
- </p>
341
- <label for="mr_social_sharing_follow_display">Button orientation</label>
342
- <select name="mr_social_sharing_follow_display" id="mr_social_sharing_follow_display">
343
- <option value="span"';
344
- if ($this->options['mr_social_sharing_follow_display'] == 'span') { echo ' selected="selected"';}
345
- echo '>Horizontal</option>
346
- <option value="div"';
347
- if ($this->options['mr_social_sharing_follow_display'] == 'div') { echo ' selected="selected"';}
348
- echo '>Vertical</option>
349
- </select><br/>
350
- <label for="mr_social_sharing_follow_align">Button alignment</label>
351
- <select name="mr_social_sharing_follow_align" id="mr_social_widget_sharing_align">
352
- <option value=""';
353
- if ($this->options['mr_social_sharing_follow_align'] == '') { echo ' selected="selected"';}
354
- echo '>Align to bottom</option>
355
- <option value="_top"';
356
- if ($this->options['mr_social_sharing_follow_align'] == '_top') { echo ' selected="selected"';}
357
- echo '>Align to top</option>
358
- </select>
359
  </div>
360
- <p class="submit">
361
- <input type="submit" name="Submit" class="button-primary" value="'.esc_attr__('Save Changes').'" />
362
- </p>
363
- <div class="mr_social_sharing_networks" id="mr_twitter_links">
364
- <h3>Automatic Twitter links</h3>
365
- <p>Select what you want to convert…</p>
366
  <label for="mr_social_sharing_twitter_handles" class="check"><input type="checkbox" name="mr_social_sharing_twitter_handles" id="mr_social_sharing_twitter_handles"';
367
  if ($this->options['mr_social_sharing_twitter_handles'] == 1) { echo ' checked="checked"';}
368
- echo ' value="1" /> '.__("Convert Twitter usernames", 'mr_social_sharing').'</label><br/>
369
  <label for="mr_social_sharing_twitter_hashtags" class="check"><input type="checkbox" name="mr_social_sharing_twitter_hashtags" id="mr_social_sharing_twitter_hashtags"';
370
  if ($this->options['mr_social_sharing_twitter_hashtags'] == 1) { echo ' checked="checked"';}
371
- echo ' value="1" /> '.__("Convert hashtags", 'mr_social_sharing').'</label>
372
- <p>... and where it should be converted</p>
373
  <label for="mr_social_sharing_linkify_content" class="check"><input type="checkbox" name="mr_social_sharing_linkify_content" id="mr_social_sharing_linkify_content"';
374
  if ($this->options['mr_social_sharing_linkify_content'] == 1) { echo ' checked="checked"';}
375
- echo ' value="1" /> '.__("Convert in posts and pages", 'mr_social_sharing').'</label><br/>
376
  <label for="mr_social_sharing_linkify_comments" class="check"><input type="checkbox" name="mr_social_sharing_linkify_comments" id="mr_social_sharing_linkify_comments"';
377
  if ($this->options['mr_social_sharing_linkify_comments'] == 1) { echo ' checked="checked"';}
378
- echo ' value="1" /> '.__("Convert in comments", 'mr_social_sharing').'</label>
379
  </div>
 
380
  <p class="submit">
381
  <input type="submit" name="Submit" class="button-primary" value="'.esc_attr__('Save Changes').'" />
382
  </p>
383
  <div class="mr_social_sharing_networks">
384
- <h3>Thank you for using the Social Sharing Toolkit!</h3>
385
  <p>
386
- For questions or requests about this plugin please use the <a href="http://www.marijnrongen.com/wordpress-plugins/social-sharing-toolkit/" target="_blank">official plugin page</a>.
387
- If you like the plugin I would appreciate it if you provide a rating of the <a href="http://wordpress.org/extend/plugins/social-sharing-toolkit/" target="_blank">plugin on WordPress.org</a>. If you really like the plugin you can also <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=P8ZVNC57E58FE&lc=NL&item_name=WordPress%20plugins%20by%20Marijn%20Rongen&item_number=Social%20Sharing%20Toolkit&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted" target="_blank">donate here</a>.
388
  </p>
389
  </div>
390
  </form>
391
  </div>';
392
  }
393
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
394
  /* Output functions */
395
 
396
- function should_share_content() {
 
397
  wp_enqueue_style('mr_social_sharing', plugins_url('/style.css', __FILE__));
398
- wp_enqueue_script('mr_social_sharing', plugins_url('script.js', __FILE__), array('jquery'), array(), false, true);
399
- if ($this->options['mr_social_sharing_buttons']['gl_plus']['enable'] == 1 || $this->options['mr_social_sharing_widget_buttons']['gl_plus']['enable'] == 1) {
 
 
 
 
 
 
 
 
400
  if ($this->options['mr_social_sharing_js_footer'] == 1) {
 
401
  wp_enqueue_script('GooglePlus', 'http://apis.google.com/js/plusone.js', array(), false, true);
402
  } else {
 
403
  wp_enqueue_script('GooglePlus', 'http://apis.google.com/js/plusone.js');
404
  }
405
  }
406
- if ($this->options['mr_social_sharing_buttons']['dg_digg']['enable'] == 1 || $this->options['mr_social_sharing_widget_buttons']['dg_digg']['enable'] == 1) {
407
  if ($this->options['mr_social_sharing_buttons']['dg_digg']['type'] == 'horizontal' || $this->options['mr_social_sharing_buttons']['dg_digg']['type'] == 'vertical' || $this->options['mr_social_sharing_widget_buttons']['dg_digg']['type'] == 'horizontal' || $this->options['mr_social_sharing_widget_buttons']['dg_digg']['type'] == 'vertical') {
408
  if ($this->options['mr_social_sharing_js_footer'] == 1) {
409
  wp_enqueue_script('Digg', plugins_url('/digg.js', __FILE__), array(), false, true);
@@ -412,7 +377,7 @@ class MR_Social_Sharing_Toolkit {
412
  }
413
  }
414
  }
415
- if ($this->options['mr_social_sharing_buttons']['li_share']['enable'] == 1 || $this->options['mr_social_sharing_widget_buttons']['li_share']['enable'] == 1) {
416
  if ($this->options['mr_social_sharing_buttons']['li_share']['type'] == 'horizontal' || $this->options['mr_social_sharing_buttons']['li_share']['type'] == 'vertical' || $this->options['mr_social_sharing_buttons']['li_share']['type'] == 'none' || $this->options['mr_social_sharing_widget_buttons']['li_share']['type'] == 'horizontal' || $this->options['mr_social_sharing_widget_buttons']['li_share']['type'] == 'vertical' || $this->options['mr_social_sharing_widget_buttons']['li_share']['type'] == 'none') {
417
  if ($this->options['mr_social_sharing_js_footer'] == 1) {
418
  wp_enqueue_script('LinkedIn', 'http://platform.linkedin.com/in.js', array(), false, true);
@@ -421,15 +386,15 @@ class MR_Social_Sharing_Toolkit {
421
  }
422
  }
423
  }
424
- if ($this->options['mr_social_sharing_buttons']['fb_send']['enable'] == 1 || $this->options['mr_social_sharing_widget_buttons']['fb_send']['enable'] == 1) {
425
  if ($this->options['mr_social_sharing_js_footer'] == 1) {
426
- wp_enqueue_script('FacebookSend', 'http://connect.facebook.net/en_US/all.js#xfbml=1', array(), false, true);
427
  } else {
428
- wp_enqueue_script('FacebookSend', 'http://connect.facebook.net/en_US/all.js#xfbml=1');
429
  }
430
  }
431
- if ($this->options['mr_social_sharing_buttons']['tw_tweet']['enable'] == 1 || $this->options['mr_social_sharing_widget_buttons']['tw_tweet']['enable'] == 1) {
432
- if ($this->options['mr_social_sharing_buttons']['tw_tweet']['type'] == 'horizontal' || $this->options['mr_social_sharing_buttons']['tw_tweet']['type'] == 'vertical' || $this->options['mr_social_sharing_widget_buttons']['tw_tweet']['type'] == 'horizontal' || $this->options['mr_social_sharing_widget_buttons']['tw_tweet']['type'] == 'vertical') {
433
  if ($this->options['mr_social_sharing_js_footer'] == 1) {
434
  wp_enqueue_script('Twitter', 'http://platform.twitter.com/widgets.js', array(), false, true);
435
  } else {
@@ -437,10 +402,6 @@ class MR_Social_Sharing_Toolkit {
437
  }
438
  }
439
  }
440
- if ($this->options['mr_social_sharing_position'] == 'none' || $this->options['mr_social_sharing_position'] == 'shortcode') {
441
- return false;
442
- }
443
- return true;
444
  }
445
 
446
  function create_bookmarks($url = '', $title = '', $type = '') {
@@ -451,7 +412,7 @@ class MR_Social_Sharing_Toolkit {
451
  $url = 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
452
  }
453
  $bookmarks = '
454
- <!-- Social Sharing Toolkit v2.0.3 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
455
  <div class="mr_social_sharing_wrapper">';
456
  foreach ($this->options['mr_social_sharing_'.$type.'button_order'] as $button) {
457
  if ($this->options['mr_social_sharing_'.$type.'buttons'][$button]['enable'] == 1) {
@@ -459,14 +420,14 @@ class MR_Social_Sharing_Toolkit {
459
  $bookmarks .= $this->get_bookmark_button($button, $url, $title, $this->options['mr_social_sharing_'.$type.'buttons'][$button]['type'], $this->options['mr_social_sharing_'.$type.'display'], $this->options['mr_social_sharing_'.$type.'align'], $id);
460
  }
461
  }
462
- $bookmarks .= '
463
- </div>';
464
  return $bookmarks;
465
  }
466
 
467
  function create_followers() {
468
  $followers = '
469
- <!-- Social Sharing Toolkit v2.0.3 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
470
  <div class="mr_social_sharing_wrapper">';
471
  foreach ($this->options['mr_social_sharing_follow_button_order'] as $button) {
472
  if ($this->options['mr_social_sharing_follow_buttons'][$button]['enable'] == 1) {
@@ -474,39 +435,55 @@ class MR_Social_Sharing_Toolkit {
474
  $followers .= $this->get_follow_button($button, $this->options['mr_social_sharing_follow_buttons'][$button]['type'], $this->options['mr_social_sharing_follow_display'], $this->options['mr_social_sharing_follow_align'], $id);
475
  }
476
  }
477
- $followers .= '
478
- </div>';
479
  return $followers;
480
  }
481
 
482
  function get_bookmark_button($button, $url, $title, $type, $display = 'span', $align = '', $id = '') {
483
- $button = 'get_'.$button;
484
- $retval = '<'.$display.' class="mr_social_sharing'.$align.'">'.$this->$button($url, $title, $type, $id).'</'.$display.'>';
 
 
 
 
485
  return $retval;
486
  }
487
 
488
  function get_follow_button($button, $type, $display = 'span', $align = '', $id = '') {
489
- $button = 'get_'.$button;
490
- $retval = '<'.$display.' class="mr_social_sharing'.$align.'">'.$this->$button($type, $id).'</'.$display.'>';
 
 
 
 
491
  return $retval;
492
  }
493
 
494
  function get_fb_like($url, $title, $type, $id) {
495
- $retval = '<iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href='.urlencode($url).'&amp;layout=';
496
  switch ($type) {
497
  case 'horizontal':
498
  $retval .= 'button_count';
499
- $width = '90px';
500
- $height = '20px';
 
501
  break;
502
  case 'vertical':
503
  $retval .= 'box_count';
504
- $width = '55px';
505
- $height = '65px';
 
506
  break;
507
- default:
508
  $retval .= 'standard';
509
  $width = 'auto';
 
 
 
 
 
 
510
  $height = '24px';
511
  break;
512
  }
@@ -540,8 +517,8 @@ class MR_Social_Sharing_Toolkit {
540
  if ($id != '') {
541
  $url .= '&amp;via='.$id;
542
  }
543
- $title = 'Share on Twitter';
544
- $text = 'Share on Twitter';
545
  $icon = 'twitter';
546
  $retval = $this->get_icon($type, $url, $title, $text, $icon, true);
547
  break;
@@ -579,8 +556,8 @@ class MR_Social_Sharing_Toolkit {
579
  break;
580
  default:
581
  $url = 'http://www.linkedin.com/shareArticle?mini=true&amp;url='.urlencode($url).'&amp;title='.urlencode($title);
582
- $title = 'Share on LinkedIn';
583
- $text = 'Share on LinkedIn';
584
  $icon = 'linkedin';
585
  $retval = $this->get_icon($type, $url, $title, $text, $icon, true);
586
  break;
@@ -590,8 +567,8 @@ class MR_Social_Sharing_Toolkit {
590
 
591
  function get_tu_tumblr($url, $title, $type, $id) {
592
  $url = 'http://www.tumblr.com/share/link?url='.urlencode($url).'&amp;name='.urlencode($title);
593
- $title = 'Share on Tumblr';
594
- $text = 'Share on Tumblr';
595
  $icon = 'tumblr';
596
  return $this->get_icon($type, $url, $title, $text, $icon, true);
597
  }
@@ -606,8 +583,8 @@ class MR_Social_Sharing_Toolkit {
606
  break;
607
  default:
608
  $url = 'http://www.stumbleupon.com/submit?url='.urlencode($url).'&amp;title='.urlencode($title);
609
- $title = 'Submit to StumbleUpon';
610
- $text = 'Submit to StumbleUpon';
611
  $icon = 'stumbleupon';
612
  $retval = $this->get_icon($type, $url, $title, $text, $icon, true);
613
  break;
@@ -627,8 +604,8 @@ class MR_Social_Sharing_Toolkit {
627
  break;
628
  default:
629
  $url = 'http://del.icio.us/post?url='.urlencode($url).'&amp;title='.urlencode($title);
630
- $title = 'Save on Delicious';
631
- $text = 'Save on Delicious';
632
  $icon = 'delicious';
633
  $retval = $this->get_icon($type, $url, $title, $text, $icon, true);
634
  break;
@@ -646,8 +623,8 @@ class MR_Social_Sharing_Toolkit {
646
  break;
647
  default:
648
  $url = 'http://digg.com/submit?url='.urlencode($url).'&amp;title='.urlencode($title);
649
- $title = 'Digg This';
650
- $text = 'Digg This';
651
  $icon = 'digg';
652
  $retval = $this->get_icon($type, $url, $title, $text, $icon, true);
653
  break;
@@ -672,8 +649,8 @@ class MR_Social_Sharing_Toolkit {
672
  break;
673
  default:
674
  $url = 'http://www.reddit.com/submit?url='.urlencode($url);
675
- $title = 'Submit to reddit';
676
- $text = 'Submit to reddit';
677
  $icon = 'reddit';
678
  $retval = $this->get_icon($type, $url, $title, $text, $icon, true);
679
  break;
@@ -683,8 +660,8 @@ class MR_Social_Sharing_Toolkit {
683
 
684
  function get_ms_myspace($url, $title, $type, $id) {
685
  $url = 'http://www.myspace.com/Modules/PostTo/Pages/?t='.urlencode($title).'&amp;u='.urlencode($url);
686
- $title = 'Share on Myspace';
687
- $text = 'Share on Myspace';
688
  $icon = 'myspace';
689
  return $this->get_icon($type, $url, $title, $text, $icon, true);
690
  }
@@ -696,31 +673,42 @@ class MR_Social_Sharing_Toolkit {
696
 
697
  function get_ml_send($url, $title, $type, $id) {
698
  $url = 'mailto:?subject='.$title.'&amp;body='.$url;
699
- $title = 'Share via email';
700
- $text = 'Share via email';
701
  $icon = 'email';
702
  return $this->get_icon($type, $url, $title, $text, $icon);
703
  }
704
 
705
  function get_follow_facebook($type, $id) {
706
  $url = 'http://www.facebook.com/'.$id;
707
- $title = 'Friend me on Facebook';
708
  $text = 'Facebook';
709
  $icon = 'facebook';
710
  return $this->get_icon($type, $url, $title, $text, $icon);
711
  }
712
 
713
  function get_follow_twitter($type, $id) {
714
- $url = 'http://twitter.com/'.$id;
715
- $title = 'Follow me on Twitter';
716
- $text = 'Twitter';
717
- $icon = 'twitter';
718
- return $this->get_icon($type, $url, $title, $text, $icon);
 
 
 
 
 
 
 
 
 
 
 
719
  }
720
 
721
  function get_follow_plus($type, $id) {
722
  $url = 'http://plus.google.com/'.$id;
723
- $title = 'Add me to your circles';
724
  $text = 'Google+';
725
  $icon = 'googleplus';
726
  return $this->get_icon($type, $url, $title, $text, $icon);
@@ -728,7 +716,15 @@ class MR_Social_Sharing_Toolkit {
728
 
729
  function get_follow_linked($type, $id) {
730
  $url = 'http://www.linkedin.com/in/'.$id;
731
- $title = 'Connect to me on LinkedIn';
 
 
 
 
 
 
 
 
732
  $text = 'LinkedIn';
733
  $icon = 'linkedin';
734
  return $this->get_icon($type, $url, $title, $text, $icon);
@@ -736,7 +732,7 @@ class MR_Social_Sharing_Toolkit {
736
 
737
  function get_follow_tumblr($type, $id) {
738
  $url = 'http://'.$id.'.tumblr.com';
739
- $title = 'Follow me on Tumblr';
740
  $text = 'Tumblr';
741
  $icon = 'tumblr';
742
  return $this->get_icon($type, $url, $title, $text, $icon);
@@ -744,7 +740,7 @@ class MR_Social_Sharing_Toolkit {
744
 
745
  function get_follow_myspace($type, $id) {
746
  $url = 'http://www.myspace.com/'.$id;
747
- $title = 'Friend me on Myspace';
748
  $text = 'Myspace';
749
  $icon = 'myspace';
750
  return $this->get_icon($type, $url, $title, $text, $icon);
@@ -752,7 +748,7 @@ class MR_Social_Sharing_Toolkit {
752
 
753
  function get_follow_hyves($type, $id) {
754
  $url = 'http://'.$id.'.hyves.nl';
755
- $title = 'Friend me on Hyves';
756
  $text = 'Hyves';
757
  $icon = 'hyves';
758
  return $this->get_icon($type, $url, $title, $text, $icon);
@@ -760,7 +756,7 @@ class MR_Social_Sharing_Toolkit {
760
 
761
  function get_follow_youtube($type, $id) {
762
  $url = 'http://www.youtube.com/user/'.$id;
763
- $title = 'Watch me on YouTube';
764
  $text = 'YouTube';
765
  $icon = 'youtube';
766
  return $this->get_icon($type, $url, $title, $text, $icon);
@@ -768,7 +764,7 @@ class MR_Social_Sharing_Toolkit {
768
 
769
  function get_follow_flickr($type, $id) {
770
  $url = 'http://www.flickr.com/photos/'.$id;
771
- $title = 'My photostream on Flickr';
772
  $text = 'Flickr';
773
  $icon = 'flickr';
774
  return $this->get_icon($type, $url, $title, $text, $icon);
@@ -776,7 +772,7 @@ class MR_Social_Sharing_Toolkit {
776
 
777
  function get_follow_picasa($type, $id) {
778
  $url = 'http://picasaweb.google.com/'.$id;
779
- $title = 'My Picasa Web Albums';
780
  $text = 'Picasa';
781
  $icon = 'picasa';
782
  return $this->get_icon($type, $url, $title, $text, $icon);
@@ -784,16 +780,32 @@ class MR_Social_Sharing_Toolkit {
784
 
785
  function get_follow_deviant($type, $id) {
786
  $url = 'http://'.$id.'.deviantart.com/';
787
- $title = 'My deviantArt';
788
  $text = 'deviantArt';
789
  $icon = 'deviantart';
790
  return $this->get_icon($type, $url, $title, $text, $icon);
791
  }
792
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
793
  function get_follow_rss($type, $id) {
794
  $url = $id;
795
- $title = 'RSS Feed';
796
- $text = 'RSS Feed';
797
  $icon = 'rss';
798
  return $this->get_icon($type, $url, $title, $text, $icon);
799
  }
@@ -831,6 +843,13 @@ class MR_Social_Sharing_Toolkit {
831
  return $retval;
832
  }
833
 
 
 
 
 
 
 
 
834
  function share($content) {
835
  $type = get_post_type().'s';
836
  if (($this->options['mr_social_sharing_types'] == $type || $this->options['mr_social_sharing_types'] == 'both') && (($type != 'pages' && (is_single() || $this->options['mr_social_sharing_include_excerpts'] == 1)) || $type == 'pages' && !is_single())) {
@@ -842,14 +861,25 @@ class MR_Social_Sharing_Toolkit {
842
  $bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false));
843
  $content .= $bookmarks;
844
  }
 
 
 
 
845
  }
846
  return $content;
847
  }
848
 
 
 
 
 
 
 
 
849
  function share_shortcode() {
850
  $bookmarks = '';
851
- if ($this->options['mr_social_sharing_position'] == 'shortcode' && (is_single() || $this->options['mr_social_sharing_include_excerpts'] == 1)) {
852
- $bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false));
853
  }
854
  return $bookmarks;
855
  }
@@ -882,7 +912,7 @@ class MR_Social_Sharing_Toolkit_Widget extends WP_Widget {
882
  function MR_Social_Sharing_Toolkit_Widget() {
883
  $widget_ops = array( 'classname' => 'MR_Social_Sharing_Toolkit_Widget', 'description' => '' );
884
  $control_ops = array( 'id_base' => 'mr-social-sharing-toolkit-widget' );
885
- $this->WP_Widget( 'mr-social-sharing-toolkit-widget', 'Social Sharing Toolkit Share Widget', $widget_ops, $control_ops );
886
  }
887
 
888
  function widget ( $args, $instance) {
@@ -912,19 +942,19 @@ class MR_Social_Sharing_Toolkit_Widget extends WP_Widget {
912
  $instance = wp_parse_args((array) $instance, array( 'widget_title' => '', 'fixed_title' => '', 'fixed_url' => ''));
913
  echo '
914
  <p>
915
- <label for="'.$this->get_field_id( 'widget_title' ).'">Title:</label>
916
  <input class="widefat" id="'.$this->get_field_id( 'widget_title' ).'" name="'.$this->get_field_name( 'widget_title' ).'" value="'.$instance['widget_title'].'" />
917
  </p>
918
  <p>
919
- <label for="'.$this->get_field_id( 'fixed_title' ).'">Title:</label>
920
  <input class="widefat" id="'.$this->get_field_id( 'fixed_title' ).'" name="'.$this->get_field_name( 'fixed_title' ).'" value="'.$instance['fixed_title'].'" />
921
  </p>
922
  <p>
923
- <label for="'.$this->get_field_id( 'fixed_url' ).'">Url:</label>
924
  <input class="widefat" id="'.$this->get_field_id( 'fixed_url' ).'" name="'.$this->get_field_name( 'fixed_url' ).'" value="'.$instance['fixed_url'].'" />
925
  </p>
926
  <p>
927
- Further configuration is done via the <a href="options-general.php?page=mr_social_sharing#mr_social_sharing_widget_networks">plugin admin screen</a>.
928
  </p>';
929
  }
930
  }
@@ -932,7 +962,7 @@ class MR_Social_Sharing_Toolkit_Follow_Widget extends WP_Widget {
932
  function MR_Social_Sharing_Toolkit_Follow_Widget() {
933
  $widget_ops = array( 'classname' => 'MR_Social_Sharing_Toolkit_Follow_Widget', 'description' => '' );
934
  $control_ops = array( 'id_base' => 'mr-social-sharing-toolkit-follow-widget' );
935
- $this->WP_Widget( 'mr-social-sharing-toolkit-follow-widget', 'Social Sharing Toolkit Follow Widget', $widget_ops, $control_ops );
936
  }
937
 
938
  function widget ( $args, $instance) {
@@ -958,15 +988,17 @@ class MR_Social_Sharing_Toolkit_Follow_Widget extends WP_Widget {
958
  $instance = wp_parse_args((array) $instance, array( 'widget_title' => ''));
959
  echo '
960
  <p>
961
- <label for="'.$this->get_field_id( 'widget_title' ).'">Title:</label>
962
  <input class="widefat" id="'.$this->get_field_id( 'widget_title' ).'" name="'.$this->get_field_name( 'widget_title' ).'" value="'.$instance['widget_title'].'" />
963
  </p>
964
  <p>
965
- Further configuration is done via the <a href="options-general.php?page=mr_social_sharing#mr_social_sharing_follow_networks">plugin admin screen</a>.
966
  </p>';
967
  }
968
  }
969
  $MR_Social_Sharing_Toolkit = new MR_Social_Sharing_Toolkit();
 
 
970
  if ($MR_Social_Sharing_Toolkit->should_linkify_content()) {
971
  add_filter('the_content', array($MR_Social_Sharing_Toolkit, 'linkify'));
972
  }
@@ -976,7 +1008,9 @@ if ($MR_Social_Sharing_Toolkit->should_linkify_comments()) {
976
  if ($MR_Social_Sharing_Toolkit->should_share_content()) {
977
  add_filter( 'the_content', array($MR_Social_Sharing_Toolkit, 'share'));
978
  }
979
- add_shortcode('social_share', array($MR_Social_Sharing_Toolkit, 'share_shortcode'));
 
 
980
  /* Register widgets */
981
  add_action('widgets_init', create_function('', 'return register_widget("MR_Social_Sharing_Toolkit_Widget");'));
982
  add_action('widgets_init', create_function('', 'return register_widget("MR_Social_Sharing_Toolkit_Follow_Widget");'));
3
  Plugin Name: Social Sharing Toolkit
4
  Plugin URI: http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/
5
  Description: This plugin enables sharing of your content via popular social networks and can also convert Twitter names and hashtags to links. Easy & configurable.
6
+ Version: 2.0.4
7
  Author: Marijn Rongen
8
  Author URI: http://www.marijnrongen.com
9
  */
15
  var $follow_buttons;
16
 
17
  function MR_Social_Sharing_Toolkit() {
18
+ load_plugin_textdomain( 'mr_social_sharing_toolkit', false, dirname(plugin_basename(__FILE__)).'/languages/');
19
  /* Declare button types */
20
+ $this->types['none'] = __('Button','mr_social_sharing_toolkit');
21
+ $this->types['none_text'] = __('Button + text','mr_social_sharing_toolkit');
22
+ $this->types['horizontal'] = __('Button + side counter','mr_social_sharing_toolkit');
23
+ $this->types['vertical'] = __('Button + top counter','mr_social_sharing_toolkit');
24
+ $this->types['icon_small'] = __('Small icon','mr_social_sharing_toolkit');
25
+ $this->types['icon_small_text'] = __('Small icon + text','mr_social_sharing_toolkit');
26
+ $this->types['icon_medium'] = __('Medium icon','mr_social_sharing_toolkit');
27
+ $this->types['icon_medium_text'] = __('Medium icon + text','mr_social_sharing_toolkit');
28
+ $this->types['icon_large'] = __('Large icon','mr_social_sharing_toolkit');
29
  /* Declare bookmark buttons with options */
30
+ $this->share_buttons['fb_like'] = array('icon' => 'facebook', 'title' => 'Facebook Like', 'types' => array('none', 'none_text', 'horizontal', 'vertical'));
31
  $this->share_buttons['fb_send'] = array('icon' => 'facebook', 'title' => 'Facebook Send', 'types' => array('none'));
32
  $this->share_buttons['tw_tweet'] = array('icon' => 'twitter', 'title' => 'Twitter', 'id' => '@', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
33
  $this->share_buttons['gl_plus'] = array('icon' => 'googleplus', 'title' => 'Google+', 'types' => array('none', 'horizontal', 'vertical'));
39
  $this->share_buttons['rd_reddit'] = array('icon' => 'reddit', 'title' => 'Reddit', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
40
  $this->share_buttons['ms_myspace'] = array('icon' => 'myspace', 'title' => 'Myspace', 'types' => array('none', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
41
  $this->share_buttons['hv_respect'] = array('icon' => 'hyves', 'title' => 'Hyves Respect', 'types' => array('horizontal'));
42
+ $this->share_buttons['ml_send'] = array('icon' => 'email', 'title' => __('Send email','mr_social_sharing_toolkit'), 'types' => array('none', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
43
+ $this->share_buttons['ln_break_1'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 1', 'types' => array(''));
44
+ $this->share_buttons['ln_break_2'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 2', 'types' => array(''));
45
+ $this->share_buttons['ln_break_3'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 3', 'types' => array(''));
46
  /* Declare follow buttons with options */
47
  $this->follow_buttons['follow_facebook'] = array('icon' => 'facebook', 'title' => 'Facebook', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
48
+ $this->follow_buttons['follow_twitter'] = array('icon' => 'twitter', 'title' => 'Twitter', 'id' => '@', 'types' => array('none', 'horizontal', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
49
  $this->follow_buttons['follow_plus'] = array('icon' => 'googleplus', 'title' => 'Google+', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
50
+ $this->follow_buttons['follow_linked'] = array('icon' => 'linkedin', 'title' => 'LinkedIn Person', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
51
+ $this->follow_buttons['follow_linked_co'] = array('icon' => 'linkedin', 'title' => 'LinkedIn Company', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
52
  $this->follow_buttons['follow_tumblr'] = array('icon' => 'tumblr', 'title' => 'Tumblr', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
53
  $this->follow_buttons['follow_myspace'] = array('icon' => 'myspace', 'title' => 'Myspace', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
54
  $this->follow_buttons['follow_hyves'] = array('icon' => 'hyves', 'title' => 'Hyves', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
56
  $this->follow_buttons['follow_flickr'] = array('icon' => 'flickr', 'title' => 'Flickr', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
57
  $this->follow_buttons['follow_picasa'] = array('icon' => 'picasa', 'title' => 'Picasa', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
58
  $this->follow_buttons['follow_deviant'] = array('icon' => 'deviantart', 'title' => 'deviantArt', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
59
+ $this->follow_buttons['follow_lastfm'] = array('icon' => 'lastfm', 'title' => 'Last.fm', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
60
+ $this->follow_buttons['follow_spotify'] = array('icon' => 'spotify', 'title' => 'Spotify', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
61
+ $this->follow_buttons['follow_rss'] = array('icon' => 'rss', 'title' => __('RSS Feed','mr_social_sharing_toolkit'), 'id' => 'url:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large'));
62
+ $this->follow_buttons['ln_break_1'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 1', 'types' => array(''));
63
+ $this->follow_buttons['ln_break_2'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 2', 'types' => array(''));
64
+ $this->follow_buttons['ln_break_3'] = array('icon' => 'divider', 'title' => __('Divider','mr_social_sharing_toolkit').' 3', 'types' => array(''));
65
  /* Set defaults and load user options */
66
  $this->get_options();
67
  }
68
 
69
  function get_options() {
70
  foreach ($this->share_buttons as $key => $val) {
71
+ $buttons[$key] = array('enable' => 0, 'type' => $val['types'][0]);
72
+ $shortcodes[$key] = array('enable' => 0, 'type' => $val['types'][0]);
73
+ $widgets[$key] = array('enable' => 0, 'type' => $val['types'][0]);
74
  $button_order[] = $key;
75
+ $shortcode_order[] = $key;
76
  $widget_order[] = $key;
77
  }
78
  foreach ($this->follow_buttons as $key => $val) {
79
+ $followers[$key] = array('enable' => 0, 'type' => $val['types'][0], 'id' => '');
80
  $follow_order[] = $key;
81
  }
82
+ $this->options = array('mr_social_sharing_buttons' => $buttons, 'mr_social_sharing_shortcode_buttons' => $shortcodes, 'mr_social_sharing_widget_buttons' => $widgets, 'mr_social_sharing_follow_buttons' => $followers, 'mr_social_sharing_display' => 'span', 'mr_social_sharing_shortcode_display' => 'span', 'mr_social_sharing_widget_display' => 'span', 'mr_social_sharing_follow_display' => 'span', 'mr_social_sharing_align' => '', 'mr_social_sharing_shortcode_align' => '', 'mr_social_sharing_widget_align' => '', 'mr_social_sharing_follow_align' => '', 'mr_social_sharing_position' => 'none', 'mr_social_sharing_types' => 'both', 'mr_social_sharing_enable_shortcode' => 1, 'mr_social_sharing_include_excerpts' => 1, 'mr_social_sharing_button_order' => $button_order, 'mr_social_sharing_shortcode_button_order' => $shortcode_order, 'mr_social_sharing_widget_button_order' => $widget_order, 'mr_social_sharing_follow_button_order' => $follow_order, 'mr_social_sharing_linkify_content' => 0, 'mr_social_sharing_linkify_comments' => 0, 'mr_social_sharing_twitter_handles' => 0, 'mr_social_sharing_twitter_hashtags' => 0, 'mr_social_sharing_js_footer' => 0);
83
  foreach ($this->options as $key => $val) {
84
  $this->options[$key] = get_option( $key, $val );
85
  }
86
  foreach ($this->share_buttons as $key => $val) {
87
  if (!array_key_exists($key, $this->options['mr_social_sharing_buttons'])) {
88
+ $this->options['mr_social_sharing_buttons'][$key] = array('enable' => 0, 'type' => $val['types'][0]);
89
+ }
90
+ if (!array_key_exists($key, $this->options['mr_social_sharing_shortcode_buttons'])) {
91
+ $this->options['mr_social_sharing_shortcode_buttons'][$key] = array('enable' => 0, 'type' => $val['types'][0]);
92
  }
93
  if (!array_key_exists($key, $this->options['mr_social_sharing_widget_buttons'])) {
94
+ $this->options['mr_social_sharing_widget_buttons'][$key] = array('enable' => 0, 'type' => $val['types'][0]);
95
  }
96
  if (!in_array($key, $this->options['mr_social_sharing_button_order'])) {
97
  $this->options['mr_social_sharing_button_order'][] = $key;
98
  }
99
+ if (!in_array($key, $this->options['mr_social_sharing_shortcode_button_order'])) {
100
+ $this->options['mr_social_sharing_shortcode_button_order'][] = $key;
101
+ }
102
  if (!in_array($key, $this->options['mr_social_sharing_widget_button_order'])) {
103
  $this->options['mr_social_sharing_widget_button_order'][] = $key;
104
  }
105
  }
106
  foreach ($this->follow_buttons as $key => $val) {
107
  if (!array_key_exists($key, $this->options['mr_social_sharing_follow_buttons'])) {
108
+ $this->options['mr_social_sharing_follow_buttons'][$key] = array('enable' => 0, 'type' => $val['types'][0], 'id' => '');
109
  }
110
  if (!in_array($key, $this->options['mr_social_sharing_follow_button_order'])) {
111
  $this->options['mr_social_sharing_follow_button_order'][] = $key;
133
  add_filter('plugin_row_meta', array('MR_Social_Sharing_Toolkit', 'plugin_links'),10,2);
134
  wp_enqueue_style('mr_social_sharing-admin', plugins_url('/admin.css', __FILE__));
135
  wp_enqueue_script('mr_social_sharing-admin', plugins_url('/admin.js', __FILE__));
136
+ wp_enqueue_script('jquery-ui-tabs');
137
  wp_enqueue_script('jquery-ui-sortable');
138
  }
139
 
140
  function plugin_links($links, $file) {
141
  if ($file == plugin_basename(__FILE__)) {
142
+ $links[] = '<a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=P8ZVNC57E58FE&lc=NL&item_name=WordPress%20plugins%20by%20Marijn%20Rongen&item_number=Social%20Sharing%20Toolkit&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">'.__('Donate','mr_social_sharing_toolkit').'</a>';
143
  }
144
  return $links;
145
  }
151
  if( isset($_POST['mr_social_sharing_save_options']) && $_POST['mr_social_sharing_save_options'] == 'Y' ) {
152
  $this->save_options($_POST);
153
  echo '
154
+ <div class="updated"><p><strong>'.__('Settings saved.','mr_social_sharing_toolkit').'</strong></p></div>';
155
  }
156
  echo '
157
  <div class="wrap">
158
  <form method="post" action="">
159
  <input type="hidden" name="mr_social_sharing_save_options" value="Y"/>
160
  <h2>Social Sharing Toolkit</h2>
161
+
162
+ <div id="mr_social_sharing_tabs">
163
+ <ul class="tabs">
164
+ <li><a href="#tab_0">'.__('General settings','mr_social_sharing_toolkit').'</a><li>
165
+ <li><a href="#tab_1">'.__('Posts & pages','mr_social_sharing_toolkit').'</a><li>
166
+ <li><a href="#tab_2">'.__('Shortcode','mr_social_sharing_toolkit').'</a><li>
167
+ <li><a href="#tab_3">'.__('Share Widget','mr_social_sharing_toolkit').'</a><li>
168
+ <li><a href="#tab_4">'.__('Follow Widget','mr_social_sharing_toolkit').'</a><li>
169
+ <li><a href="#tab_5">'.__('Automatic Twitter links','mr_social_sharing_toolkit').'</a><li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  </ul>
171
+ <div id="tab_0" class="mr_social_sharing_networks">
172
+ <h3>'.__('General settings','mr_social_sharing_toolkit').':</h3>
173
+ <label for="mr_social_sharing_js_footer" class="check"><input type="checkbox" name="mr_social_sharing_js_footer" id="mr_social_sharing_js_footer"';
174
+ if ($this->options['mr_social_sharing_js_footer'] == 1) { echo ' checked="checked"';}
175
+ echo ' value="1" /> '.__('Load JavaScript in footer','mr_social_sharing_toolkit').'</label>
176
+
177
+ <p>
178
+ <span class="description"> '.__('Improves performance but may not work on some themes','mr_social_sharing_toolkit').'</span>
179
+ </p>
180
+ <p>
181
+ '.__('Choose where the buttons must be displayed and if the buttons should be displayed on posts, pages or both.','mr_social_sharing_toolkit').'
182
+ </p>
183
+ <label for="mr_social_sharing_position">'.__('Button location','mr_social_sharing_toolkit').'</label>
184
+ <select name="mr_social_sharing_position" id="mr_social_sharing_position">
185
+ <option value="none"';
 
 
 
 
 
 
 
 
 
 
 
 
186
  if ($this->options['mr_social_sharing_position'] == 'none') { echo ' selected="selected"';}
187
+ echo '>'.__('Do not display','mr_social_sharing_toolkit').'</option>
188
+ <option value="top"';
189
  if ($this->options['mr_social_sharing_position'] == 'top') { echo ' selected="selected"';}
190
+ echo '>'.__('Display before content','mr_social_sharing_toolkit').'</option>
191
+ <option value="bottom"';
192
  if ($this->options['mr_social_sharing_position'] == 'bottom') { echo ' selected="selected"';}
193
+ echo '>'.__('Display after content','mr_social_sharing_toolkit').'</option>
194
+ <option value="both"';
195
+ if ($this->options['mr_social_sharing_position'] == 'both') { echo ' selected="selected"';}
196
+ echo '>'.__('Display before and after content','mr_social_sharing_toolkit').'</option>
197
+ </select><br/><br/>
198
+ <label for="mr_social_sharing_types">'.__('Place buttons on','mr_social_sharing_toolkit').'</label>
199
+ <select name="mr_social_sharing_types" id="mr_social_sharing_types">
200
+ <option value="both"';
 
 
 
 
201
  if ($this->options['mr_social_sharing_types'] == 'both') { echo ' selected="selected"';}
202
+ echo '>'.__('Posts and pages','mr_social_sharing_toolkit').'</option>
203
+ <option value="posts"';
204
  if ($this->options['mr_social_sharing_types'] == 'posts') { echo ' selected="selected"';}
205
+ echo '>'.__('Only on posts','mr_social_sharing_toolkit').'</option>
206
+ <option value="pages"';
207
  if ($this->options['mr_social_sharing_types'] == 'pages') { echo ' selected="selected"';}
208
+ echo '>'.__('Only on pages','mr_social_sharing_toolkit').'</option>
209
+ </select><br/>
210
+ <br/>
211
+ <label for="mr_social_sharing_enable_shortcode" class="check"><input type="checkbox" name="mr_social_sharing_enable_shortcode" id="mr_social_sharing_enable_shortcode"';
212
+ if ($this->options['mr_social_sharing_position'] == 'shortcode' || $this->options['mr_social_sharing_enable_shortcode'] == 1) { echo ' checked="checked"';}
213
+ echo ' value="1" /> '.__('Enable shortcode').'</label><br/>
214
+ <p><span class="description"> '.__('Use the shortcode [social_share/] where you want the buttons to appear', 'mr_social_sharing_toolkit').'</span></p>
215
+ <label for="mr_social_sharing_include_excerpts" class="check"><input type="checkbox" name="mr_social_sharing_include_excerpts" id="mr_social_sharing_include_excerpts"';
216
  if ($this->options['mr_social_sharing_include_excerpts'] == 1) { echo ' checked="checked"';}
217
+ echo ' value="1" /> '.__('Include buttons in excerpts','mr_social_sharing_toolkit').'</label>
218
+ <p><span class="description">'.__('Uncheck this box if you are having issues displaying the buttons with excerpts (some themes have custom excerpt functions which do not play nice with the plugin).','mr_social_sharing_toolkit').'</p>
219
+ </div>
220
+ <div id="tab_1" class="mr_social_sharing_networks">
221
+ <h3>'.__('Posts & pages','mr_social_sharing_toolkit').'</h3>
222
+ <p>
223
+ '.__('Check the boxes to display the button on your website. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list. For the tweet button you can also fill in your Twitter username which will then be appended to the tweet (like via @WordPress).','mr_social_sharing_toolkit').'
224
+ </p>';
225
+ $this->showListAdmin($this->share_buttons);
226
+ echo '
227
  </div>
228
+ <div id="tab_2" class="mr_social_sharing_networks">
229
+ <h3>'.__('Shortcode','mr_social_sharing_toolkit').'</h3>
 
 
 
230
  <p>
231
+ '.__('Check the boxes to display the button on your website. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list. For the tweet button you can also fill in your Twitter username which will then be appended to the tweet (like via @WordPress).','mr_social_sharing_toolkit').'
232
+ </p>';
233
+ $this->showListAdmin($this->share_buttons, 'shortcode_');
234
+ echo '
235
+ </div>
236
+ <div id="tab_3" class="mr_social_sharing_networks">
237
+ <h3>'.__('Share Widget','mr_social_sharing_toolkit').'</h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  <p>
239
+ '.__('Check the boxes to display the button on Social Sharing Toolkit Share widget. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list. For the tweet button you can also fill in your Twitter username which will then be appended to the tweet (like via @WordPress).','mr_social_sharing_toolkit').'
240
+ <br/><br/>
241
+ '.__('For each widget you can enter a fixed url and title for the buttons, to do this','mr_social_sharing_toolkit').' <a href="widgets.php">'.__('go to the widget configuration page','mr_social_sharing_toolkit').'</a>.
242
+ </p>';
243
+ $this->showListAdmin($this->share_buttons, 'widget_');
244
+ echo '
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  </div>
246
+ <div id="tab_4" class="mr_social_sharing_networks">
247
+ <h3>'.__('Follow Widget','mr_social_sharing_toolkit').'</h3>
 
 
 
248
  <p>
249
+ '.__('Check the boxes to display the button on Social Sharing Toolkit Follow widget. For each button you can select a separate style from the dropdown box. You can change the order of the buttons by dragging them to the desired location in the list.','mr_social_sharing_toolkit').'
250
+ <br/><br/>
251
+ '.__('For each button you only have to enter your id or username of the network as it appears in the url of your profile page. You will need to enter the complete url for the RSS Feed (including the http:// part) if you wish to display this button.','mr_social_sharing_toolkit').'
252
  <br/>
 
253
  <br/>
254
+ '.__('To add the widget to your website','mr_social_sharing_toolkit').' <a href="widgets.php">'.__('go to the widget configuration page','mr_social_sharing_toolkit').'</a>.
255
+ </p>';
256
+ $this->showListAdmin($this->follow_buttons, 'follow_');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  echo '
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
258
  </div>
259
+ <div id="tab_5" class="mr_social_sharing_networks">
260
+ <h3>'.__('Automatic Twitter links','mr_social_sharing_toolkit').'</h3>
261
+ <p>'.__('Select what you want to convert:','mr_social_sharing_toolkit').'</p>
 
 
 
262
  <label for="mr_social_sharing_twitter_handles" class="check"><input type="checkbox" name="mr_social_sharing_twitter_handles" id="mr_social_sharing_twitter_handles"';
263
  if ($this->options['mr_social_sharing_twitter_handles'] == 1) { echo ' checked="checked"';}
264
+ echo ' value="1" /> '.__("Convert Twitter usernames", 'mr_social_sharing_toolkit').'</label><br/>
265
  <label for="mr_social_sharing_twitter_hashtags" class="check"><input type="checkbox" name="mr_social_sharing_twitter_hashtags" id="mr_social_sharing_twitter_hashtags"';
266
  if ($this->options['mr_social_sharing_twitter_hashtags'] == 1) { echo ' checked="checked"';}
267
+ echo ' value="1" /> '.__("Convert hashtags", 'mr_social_sharing_toolkit').'</label>
268
+ <p>'.__('And where it should be converted:','mr_social_sharing_toolkit').'</p>
269
  <label for="mr_social_sharing_linkify_content" class="check"><input type="checkbox" name="mr_social_sharing_linkify_content" id="mr_social_sharing_linkify_content"';
270
  if ($this->options['mr_social_sharing_linkify_content'] == 1) { echo ' checked="checked"';}
271
+ echo ' value="1" /> '.__("Convert in posts and pages", 'mr_social_sharing_toolkit').'</label><br/>
272
  <label for="mr_social_sharing_linkify_comments" class="check"><input type="checkbox" name="mr_social_sharing_linkify_comments" id="mr_social_sharing_linkify_comments"';
273
  if ($this->options['mr_social_sharing_linkify_comments'] == 1) { echo ' checked="checked"';}
274
+ echo ' value="1" /> '.__("Convert in comments", 'mr_social_sharing_toolkit').'</label>
275
  </div>
276
+ </div>
277
  <p class="submit">
278
  <input type="submit" name="Submit" class="button-primary" value="'.esc_attr__('Save Changes').'" />
279
  </p>
280
  <div class="mr_social_sharing_networks">
281
+ <h3>'.__('Thank you for using the Social Sharing Toolkit!','mr_social_sharing_toolkit').'</h3>
282
  <p>
283
+ '.__('For questions or requests about this plugin please use the','mr_social_sharing_toolkit').' <a href="http://www.marijnrongen.com/wordpress-plugins/social-sharing-toolkit/" target="_blank">'.__('official plugin page','mr_social_sharing_toolkit').'</a>.
284
+ '.__('If you like the plugin I would appreciate it if you provide a rating of the','mr_social_sharing_toolkit').' <a href="http://wordpress.org/extend/plugins/social-sharing-toolkit/" target="_blank">'.__('plugin on WordPress.org','mr_social_sharing_toolkit').'</a>. '.__('If you really like the plugin you can also','mr_social_sharing_toolkit').' <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=P8ZVNC57E58FE&lc=NL&item_name=WordPress%20plugins%20by%20Marijn%20Rongen&item_number=Social%20Sharing%20Toolkit&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted" target="_blank">'.__('donate here','mr_social_sharing_toolkit').'</a>.
285
  </p>
286
  </div>
287
  </form>
288
  </div>';
289
  }
290
 
291
+ function showListAdmin($buttons, $button_type = '') {
292
+ echo '
293
+ <ul id="mr_social_sharing_'.$button_type.'networks">';
294
+ foreach ($this->options['mr_social_sharing_'.$button_type.'button_order'] as $button) {
295
+ echo '
296
+ <li>
297
+ <img src="'.plugins_url('/images/icons_small/'.$buttons[$button]['icon'].'.png', __FILE__).'" title="'.$buttons[$button]['title'].'" alt="'.$buttons[$button]['title'].'"/>
298
+ <label for="mr_social_sharing_'.$button_type.$button.'"><input type="checkbox" name="mr_social_sharing_'.$button_type.'buttons['.$button.'][enable]" id="mr_social_sharing_'.$button_type.$button.'"';
299
+ if ($this->options['mr_social_sharing_'.$button_type.'buttons'][$button]['enable'] == 1) { echo ' checked="checked"';}
300
+ echo ' value="1" />'.$buttons[$button]['title'].'</label>
301
+ <img class="right" src="'.plugins_url('/images/move.png', __FILE__).'" title="'.__('Change button order','mr_social_sharing_toolkit').'" alt="'.__('Change button order','mr_social_sharing_toolkit').'"/>';
302
+ if (is_array($buttons[$button]['types']) && $buttons[$button]['types'][0] != '') {
303
+ echo '
304
+ <select name="mr_social_sharing_'.$button_type.'buttons['.$button.'][type]" id="mr_social_sharing_'.$button_type.$button.'_type">';
305
+ foreach ($buttons[$button]['types'] as $type) {
306
+ echo '<option value="'.$type.'"';
307
+ if ($this->options['mr_social_sharing_'.$button_type.'buttons'][$button]['type'] == $type) { echo ' selected="selected"';}
308
+ echo '>'.$this->types[$type].'</option>';
309
+ }
310
+ } else {
311
+ echo '
312
+ <input type="hidden" name="mr_social_sharing_'.$button_type.'buttons['.$button.'][type]" value=""/>';
313
+ }
314
+ if (array_key_exists('id', $buttons[$button])) {
315
+ echo '
316
+ <input type="text" class="text" name="mr_social_sharing_'.$button_type.'buttons['.$button.'][id]" id="mr_social_sharing_'.$button_type.$button.'_id" value="'.$this->options['mr_social_sharing_'.$button_type.'buttons'][$button]['id'].'"/>
317
+ <label for="mr_social_sharing_'.$button_type.$button.'_id" class="text">'.$buttons[$button]['id'].'</label>';
318
+ }
319
+ echo '
320
+ <input type="hidden" name="mr_social_sharing_'.$button_type.'button_order[]" value="'.$button.'"/>
321
+ </li>';
322
+ }
323
+ echo '
324
+ </ul>
325
+ <p>
326
+ '.__('Choose button orientation horizontal to display the buttons side by side, vertical will place them below each other. You can also select an alignment to better suit your theme.','mr_social_sharing_toolkit').'
327
+ </p>
328
+ <label for="mr_social_sharing_'.$button_type.'display">'.__('Button orientation','mr_social_sharing_toolkit').'</label>
329
+ <select name="mr_social_sharing_'.$button_type.'display" id="mr_social_sharing_'.$button_type.'display">
330
+ <option value="span"';
331
+ if ($this->options['mr_social_sharing_'.$button_type.'display'] == 'span') { echo ' selected="selected"';}
332
+ echo '>'.__('Horizontal','mr_social_sharing_toolkit').'</option>
333
+ <option value="div"';
334
+ if ($this->options['mr_social_sharing_'.$button_type.'display'] == 'div') { echo ' selected="selected"';}
335
+ echo '>'.__('Vertical','mr_social_sharing_toolkit').'</option>
336
+ </select><br/>
337
+ <label for="mr_social_sharing_'.$button_type.'align">'.__('Button alignment','mr_social_sharing_toolkit').'</label>
338
+ <select name="mr_social_sharing_'.$button_type.'align" id="mr_social_sharing_'.$button_type.'align">
339
+ <option value=""';
340
+ if ($this->options['mr_social_sharing_'.$button_type.'align'] == '') { echo ' selected="selected"';}
341
+ echo '>'.__('Align to bottom','mr_social_sharing_toolkit').'</option>
342
+ <option value="_top"';
343
+ if ($this->options['mr_social_sharing_'.$button_type.'align'] == '_top') { echo ' selected="selected"';}
344
+ echo '>'.__('Align to top','mr_social_sharing_toolkit').'</option>
345
+ </select>';
346
+ }
347
+
348
  /* Output functions */
349
 
350
+
351
+ function prepare_styles() {
352
  wp_enqueue_style('mr_social_sharing', plugins_url('/style.css', __FILE__));
353
+ }
354
+
355
+ function prepare_scripts() {
356
+ $lang = __('en_US','mr_social_sharing_toolkit');
357
+ if ($this->options['mr_social_sharing_js_footer'] == 1) {
358
+ wp_enqueue_script('mr_social_sharing', plugins_url('/script.js', __FILE__), array('jquery'), false, true);
359
+ } else {
360
+ wp_enqueue_script('mr_social_sharing', plugins_url('/script.js', __FILE__), array('jquery'));
361
+ }
362
+ if (($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_buttons']['gl_plus']['enable'] == 1) || $this->options['mr_social_sharing_widget_buttons']['gl_plus']['enable'] == 1 || (($this->options['mr_social_sharing_position'] == 'shortcode' || $this->options['mr_social_sharing_enable_shortcode'] == 1) && $this->options['mr_social_sharing_shortcode_buttons']['gl_plus']['enable'] == 1)) {
363
  if ($this->options['mr_social_sharing_js_footer'] == 1) {
364
+ wp_enqueue_script('GooglePlusLang', plugins_url('/googleplus.js.php?lang='.$lang, __FILE__), array(), false, true);
365
  wp_enqueue_script('GooglePlus', 'http://apis.google.com/js/plusone.js', array(), false, true);
366
  } else {
367
+ wp_enqueue_script('GooglePlusLang', plugins_url('/googleplus.js.php?lang='.$lang, __FILE__));
368
  wp_enqueue_script('GooglePlus', 'http://apis.google.com/js/plusone.js');
369
  }
370
  }
371
+ if (($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_buttons']['dg_digg']['enable'] == 1) || $this->options['mr_social_sharing_widget_buttons']['dg_digg']['enable'] == 1 || (($this->options['mr_social_sharing_position'] == 'shortcode' || $this->options['mr_social_sharing_enable_shortcode'] == 1) && $this->options['mr_social_sharing_shortcode_buttons']['dg_digg']['enable'] == 1)) {
372
  if ($this->options['mr_social_sharing_buttons']['dg_digg']['type'] == 'horizontal' || $this->options['mr_social_sharing_buttons']['dg_digg']['type'] == 'vertical' || $this->options['mr_social_sharing_widget_buttons']['dg_digg']['type'] == 'horizontal' || $this->options['mr_social_sharing_widget_buttons']['dg_digg']['type'] == 'vertical') {
373
  if ($this->options['mr_social_sharing_js_footer'] == 1) {
374
  wp_enqueue_script('Digg', plugins_url('/digg.js', __FILE__), array(), false, true);
377
  }
378
  }
379
  }
380
+ if (($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_buttons']['li_share']['enable'] == 1) || $this->options['mr_social_sharing_widget_buttons']['li_share']['enable'] == 1 || (($this->options['mr_social_sharing_position'] == 'shortcode' || $this->options['mr_social_sharing_enable_shortcode'] == 1) && $this->options['mr_social_sharing_shortcode_buttons']['li_share']['enable'] == 1)) {
381
  if ($this->options['mr_social_sharing_buttons']['li_share']['type'] == 'horizontal' || $this->options['mr_social_sharing_buttons']['li_share']['type'] == 'vertical' || $this->options['mr_social_sharing_buttons']['li_share']['type'] == 'none' || $this->options['mr_social_sharing_widget_buttons']['li_share']['type'] == 'horizontal' || $this->options['mr_social_sharing_widget_buttons']['li_share']['type'] == 'vertical' || $this->options['mr_social_sharing_widget_buttons']['li_share']['type'] == 'none') {
382
  if ($this->options['mr_social_sharing_js_footer'] == 1) {
383
  wp_enqueue_script('LinkedIn', 'http://platform.linkedin.com/in.js', array(), false, true);
386
  }
387
  }
388
  }
389
+ if (($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_buttons']['fb_send']['enable'] == 1) || $this->options['mr_social_sharing_widget_buttons']['fb_send']['enable'] == 1 || (($this->options['mr_social_sharing_position'] == 'shortcode' || $this->options['mr_social_sharing_enable_shortcode'] == 1) && $this->options['mr_social_sharing_shortcode_buttons']['fb_send']['enable'] == 1)) {
390
  if ($this->options['mr_social_sharing_js_footer'] == 1) {
391
+ wp_enqueue_script('FacebookSend', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1', array(), false, true);
392
  } else {
393
+ wp_enqueue_script('FacebookSend', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1');
394
  }
395
  }
396
+ if (($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_buttons']['tw_tweet']['enable'] == 1) || $this->options['mr_social_sharing_widget_buttons']['tw_tweet']['enable'] == 1 || (($this->options['mr_social_sharing_position'] == 'shortcode' || $this->options['mr_social_sharing_enable_shortcode'] == 1) && $this->options['mr_social_sharing_shortcode_buttons']['tw_tweet']['enable'] == 1) || $this->options['mr_social_sharing_follow_buttons']['tw_tweet']['enable'] == 1) {
397
+ if ($this->options['mr_social_sharing_buttons']['tw_tweet']['type'] == 'horizontal' || $this->options['mr_social_sharing_buttons']['tw_tweet']['type'] == 'vertical' || $this->options['mr_social_sharing_widget_buttons']['tw_tweet']['type'] == 'horizontal' || $this->options['mr_social_sharing_widget_buttons']['tw_tweet']['type'] == 'vertical' || $this->options['mr_social_sharing_follow_buttons']['tw_tweet']['type'] == 'none' || $this->options['mr_social_sharing_follow_buttons']['tw_tweet']['type'] == 'horizontal') {
398
  if ($this->options['mr_social_sharing_js_footer'] == 1) {
399
  wp_enqueue_script('Twitter', 'http://platform.twitter.com/widgets.js', array(), false, true);
400
  } else {
402
  }
403
  }
404
  }
 
 
 
 
405
  }
406
 
407
  function create_bookmarks($url = '', $title = '', $type = '') {
412
  $url = 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
413
  }
414
  $bookmarks = '
415
+ <!-- Social Sharing Toolkit v2.0.4 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
416
  <div class="mr_social_sharing_wrapper">';
417
  foreach ($this->options['mr_social_sharing_'.$type.'button_order'] as $button) {
418
  if ($this->options['mr_social_sharing_'.$type.'buttons'][$button]['enable'] == 1) {
420
  $bookmarks .= $this->get_bookmark_button($button, $url, $title, $this->options['mr_social_sharing_'.$type.'buttons'][$button]['type'], $this->options['mr_social_sharing_'.$type.'display'], $this->options['mr_social_sharing_'.$type.'align'], $id);
421
  }
422
  }
423
+ $bookmarks .= '</div>';
424
+ $bookmarks = str_replace('<div class="mr_social_sharing_wrapper"></div>', '', $bookmarks);
425
  return $bookmarks;
426
  }
427
 
428
  function create_followers() {
429
  $followers = '
430
+ <!-- Social Sharing Toolkit v2.0.4 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
431
  <div class="mr_social_sharing_wrapper">';
432
  foreach ($this->options['mr_social_sharing_follow_button_order'] as $button) {
433
  if ($this->options['mr_social_sharing_follow_buttons'][$button]['enable'] == 1) {
435
  $followers .= $this->get_follow_button($button, $this->options['mr_social_sharing_follow_buttons'][$button]['type'], $this->options['mr_social_sharing_follow_display'], $this->options['mr_social_sharing_follow_align'], $id);
436
  }
437
  }
438
+ $followers .= '</div>';
439
+ $followers = str_replace('<div class="mr_social_sharing_wrapper"></div>', '', $followers);
440
  return $followers;
441
  }
442
 
443
  function get_bookmark_button($button, $url, $title, $type, $display = 'span', $align = '', $id = '') {
444
+ if ($button == 'ln_break_1' || $button == 'ln_break_2' || $button == 'ln_break_3') {
445
+ $retval = '</div><div class="mr_social_sharing_wrapper">';
446
+ } else {
447
+ $button = 'get_'.$button;
448
+ $retval = '<'.$display.' class="mr_social_sharing'.$align.'">'.$this->$button($url, $title, $type, $id).'</'.$display.'>';
449
+ }
450
  return $retval;
451
  }
452
 
453
  function get_follow_button($button, $type, $display = 'span', $align = '', $id = '') {
454
+ if ($button == 'ln_break_1' || $button == 'ln_break_2' || $button == 'ln_break_3') {
455
+ $retval = '</div><div class="mr_social_sharing_wrapper">';
456
+ } else {
457
+ $button = 'get_'.$button;
458
+ $retval = '<'.$display.' class="mr_social_sharing'.$align.'">'.$this->$button($type, $id).'</'.$display.'>';
459
+ }
460
  return $retval;
461
  }
462
 
463
  function get_fb_like($url, $title, $type, $id) {
464
+ $retval = '<iframe src="https://www.facebook.com/plugins/like.php?locale='.__('en_US','mr_social_sharing_toolkit').'&amp;href='.urlencode($url).'&amp;layout=';
465
  switch ($type) {
466
  case 'horizontal':
467
  $retval .= 'button_count';
468
+ $width = __('fb_horizontal_width','mr_social_sharing_toolkit');
469
+ $width = ($width == 'fb_horizontal_width') ? '90px' : $width;
470
+ $height = '21px';
471
  break;
472
  case 'vertical':
473
  $retval .= 'box_count';
474
+ $width = __('fb_vertical_width','mr_social_sharing_toolkit');
475
+ $width = ($width == 'fb_vertical_width') ? '55px' : $width;
476
+ $height = '61px';
477
  break;
478
+ case 'none_text':
479
  $retval .= 'standard';
480
  $width = 'auto';
481
+ $height = '25px';
482
+ break;
483
+ default:
484
+ $retval .= 'standard';
485
+ $width = __('fb_standard_width','mr_social_sharing_toolkit');
486
+ $width = ($width == 'fb_standard_width') ? '51px' : $width;
487
  $height = '24px';
488
  break;
489
  }
517
  if ($id != '') {
518
  $url .= '&amp;via='.$id;
519
  }
520
+ $title = __('Share on','mr_social_sharing_toolkit').' Twitter';
521
+ $text = __('Share on','mr_social_sharing_toolkit').' Twitter';
522
  $icon = 'twitter';
523
  $retval = $this->get_icon($type, $url, $title, $text, $icon, true);
524
  break;
556
  break;
557
  default:
558
  $url = 'http://www.linkedin.com/shareArticle?mini=true&amp;url='.urlencode($url).'&amp;title='.urlencode($title);
559
+ $title = __('Share on','mr_social_sharing_toolkit').' LinkedIn';
560
+ $text = __('Share on','mr_social_sharing_toolkit').' LinkedIn';
561
  $icon = 'linkedin';
562
  $retval = $this->get_icon($type, $url, $title, $text, $icon, true);
563
  break;
567
 
568
  function get_tu_tumblr($url, $title, $type, $id) {
569
  $url = 'http://www.tumblr.com/share/link?url='.urlencode($url).'&amp;name='.urlencode($title);
570
+ $title = __('Share on','mr_social_sharing_toolkit').' Tumblr';
571
+ $text = __('Share on','mr_social_sharing_toolkit').' Tumblr';
572
  $icon = 'tumblr';
573
  return $this->get_icon($type, $url, $title, $text, $icon, true);
574
  }
583
  break;
584
  default:
585
  $url = 'http://www.stumbleupon.com/submit?url='.urlencode($url).'&amp;title='.urlencode($title);
586
+ $title = __('Submit to','mr_social_sharing_toolkit').' StumbleUpon';
587
+ $text = __('Submit to','mr_social_sharing_toolkit').' StumbleUpon';
588
  $icon = 'stumbleupon';
589
  $retval = $this->get_icon($type, $url, $title, $text, $icon, true);
590
  break;
604
  break;
605
  default:
606
  $url = 'http://del.icio.us/post?url='.urlencode($url).'&amp;title='.urlencode($title);
607
+ $title = __('Save on','mr_social_sharing_toolkit').' Delicious';
608
+ $text = __('Save on','mr_social_sharing_toolkit').' Delicious';
609
  $icon = 'delicious';
610
  $retval = $this->get_icon($type, $url, $title, $text, $icon, true);
611
  break;
623
  break;
624
  default:
625
  $url = 'http://digg.com/submit?url='.urlencode($url).'&amp;title='.urlencode($title);
626
+ $title = __('Digg This','mr_social_sharing_toolkit');
627
+ $text = __('Digg This','mr_social_sharing_toolkit');
628
  $icon = 'digg';
629
  $retval = $this->get_icon($type, $url, $title, $text, $icon, true);
630
  break;
649
  break;
650
  default:
651
  $url = 'http://www.reddit.com/submit?url='.urlencode($url);
652
+ $title = __('Submit to','mr_social_sharing_toolkit').' reddit';
653
+ $text = __('Submit to','mr_social_sharing_toolkit').' reddit';
654
  $icon = 'reddit';
655
  $retval = $this->get_icon($type, $url, $title, $text, $icon, true);
656
  break;
660
 
661
  function get_ms_myspace($url, $title, $type, $id) {
662
  $url = 'http://www.myspace.com/Modules/PostTo/Pages/?t='.urlencode($title).'&amp;u='.urlencode($url);
663
+ $title = __('Share on','mr_social_sharing_toolkit').' Myspace';
664
+ $text = __('Share on','mr_social_sharing_toolkit').' Myspace';
665
  $icon = 'myspace';
666
  return $this->get_icon($type, $url, $title, $text, $icon, true);
667
  }
673
 
674
  function get_ml_send($url, $title, $type, $id) {
675
  $url = 'mailto:?subject='.$title.'&amp;body='.$url;
676
+ $title = __('Share via email','mr_social_sharing_toolkit');
677
+ $text = __('Share via email','mr_social_sharing_toolkit');
678
  $icon = 'email';
679
  return $this->get_icon($type, $url, $title, $text, $icon);
680
  }
681
 
682
  function get_follow_facebook($type, $id) {
683
  $url = 'http://www.facebook.com/'.$id;
684
+ $title = __('Friend me on','mr_social_sharing_toolkit').' Facebook';
685
  $text = 'Facebook';
686
  $icon = 'facebook';
687
  return $this->get_icon($type, $url, $title, $text, $icon);
688
  }
689
 
690
  function get_follow_twitter($type, $id) {
691
+ switch ($type) {
692
+ case 'none':
693
+ $retval = '<a href="http://twitter.com/'.$id.'" class="twitter-follow-button" data-show-count="false">Follow @MarijnRongen</a>';
694
+ break;
695
+ case 'horizontal':
696
+ $retval = '<a href="http://twitter.com/'.$id.'" class="twitter-follow-button">Follow @MarijnRongen</a>';
697
+ break;
698
+ default:
699
+ $url = 'http://twitter.com/'.$id;
700
+ $title = __('Follow me on','mr_social_sharing_toolkit').' Twitter';
701
+ $text = 'Twitter';
702
+ $icon = 'twitter';
703
+ $retval = $this->get_icon($type, $url, $title, $text, $icon);
704
+ break;
705
+ }
706
+ return $retval;
707
  }
708
 
709
  function get_follow_plus($type, $id) {
710
  $url = 'http://plus.google.com/'.$id;
711
+ $title = __('Add me to your circles','mr_social_sharing_toolkit');
712
  $text = 'Google+';
713
  $icon = 'googleplus';
714
  return $this->get_icon($type, $url, $title, $text, $icon);
716
 
717
  function get_follow_linked($type, $id) {
718
  $url = 'http://www.linkedin.com/in/'.$id;
719
+ $title = __('Join my network on','mr_social_sharing_toolkit').' LinkedIn';
720
+ $text = 'LinkedIn';
721
+ $icon = 'linkedin';
722
+ return $this->get_icon($type, $url, $title, $text, $icon);
723
+ }
724
+
725
+ function get_follow_linked_co($type, $id) {
726
+ $url = 'http://www.linkedin.com/company/'.$id;
727
+ $title = __('Follow my company on','mr_social_sharing_toolkit').' LinkedIn';
728
  $text = 'LinkedIn';
729
  $icon = 'linkedin';
730
  return $this->get_icon($type, $url, $title, $text, $icon);
732
 
733
  function get_follow_tumblr($type, $id) {
734
  $url = 'http://'.$id.'.tumblr.com';
735
+ $title = __('Follow me on','mr_social_sharing_toolkit').' Tumblr';
736
  $text = 'Tumblr';
737
  $icon = 'tumblr';
738
  return $this->get_icon($type, $url, $title, $text, $icon);
740
 
741
  function get_follow_myspace($type, $id) {
742
  $url = 'http://www.myspace.com/'.$id;
743
+ $title = __('Friend me on','mr_social_sharing_toolkit').' Myspace';
744
  $text = 'Myspace';
745
  $icon = 'myspace';
746
  return $this->get_icon($type, $url, $title, $text, $icon);
748
 
749
  function get_follow_hyves($type, $id) {
750
  $url = 'http://'.$id.'.hyves.nl';
751
+ $title = __('Friend me on','mr_social_sharing_toolkit').' Hyves';
752
  $text = 'Hyves';
753
  $icon = 'hyves';
754
  return $this->get_icon($type, $url, $title, $text, $icon);
756
 
757
  function get_follow_youtube($type, $id) {
758
  $url = 'http://www.youtube.com/user/'.$id;
759
+ $title = __('Watch me on','mr_social_sharing_toolkit').' YouTube';
760
  $text = 'YouTube';
761
  $icon = 'youtube';
762
  return $this->get_icon($type, $url, $title, $text, $icon);
764
 
765
  function get_follow_flickr($type, $id) {
766
  $url = 'http://www.flickr.com/photos/'.$id;
767
+ $title = __('My photostream on','mr_social_sharing_toolkit').' Flickr';
768
  $text = 'Flickr';
769
  $icon = 'flickr';
770
  return $this->get_icon($type, $url, $title, $text, $icon);
772
 
773
  function get_follow_picasa($type, $id) {
774
  $url = 'http://picasaweb.google.com/'.$id;
775
+ $title = __('My Picasa Web Albums','mr_social_sharing_toolkit');
776
  $text = 'Picasa';
777
  $icon = 'picasa';
778
  return $this->get_icon($type, $url, $title, $text, $icon);
780
 
781
  function get_follow_deviant($type, $id) {
782
  $url = 'http://'.$id.'.deviantart.com/';
783
+ $title = __('My deviantArt','mr_social_sharing_toolkit');
784
  $text = 'deviantArt';
785
  $icon = 'deviantart';
786
  return $this->get_icon($type, $url, $title, $text, $icon);
787
  }
788
 
789
+ function get_follow_lastfm($type, $id) {
790
+ $url = 'http://www.last.fm/user/'.$id;
791
+ $title = __('My profile on','mr_social_sharing_toolkit').' Last.fm';
792
+ $text = 'Last.fm';
793
+ $icon = 'lastfm';
794
+ return $this->get_icon($type, $url, $title, $text, $icon);
795
+ }
796
+
797
+ function get_follow_spotify($type, $id) {
798
+ $url = 'http://open.spotify.com/user/'.$id;
799
+ $title = __('My profile on','mr_social_sharing_toolkit').' Spotify';
800
+ $text = 'Spotify';
801
+ $icon = 'spotify';
802
+ return $this->get_icon($type, $url, $title, $text, $icon);
803
+ }
804
+
805
  function get_follow_rss($type, $id) {
806
  $url = $id;
807
+ $title = __('RSS Feed','mr_social_sharing_toolkit');
808
+ $text = __('RSS Feed','mr_social_sharing_toolkit');
809
  $icon = 'rss';
810
  return $this->get_icon($type, $url, $title, $text, $icon);
811
  }
843
  return $retval;
844
  }
845
 
846
+ function should_share_content() {
847
+ if ($this->options['mr_social_sharing_position'] != 'none' && $this->options['mr_social_sharing_position'] != 'shortcode') {
848
+ return true;
849
+ }
850
+ return false;
851
+ }
852
+
853
  function share($content) {
854
  $type = get_post_type().'s';
855
  if (($this->options['mr_social_sharing_types'] == $type || $this->options['mr_social_sharing_types'] == 'both') && (($type != 'pages' && (is_single() || $this->options['mr_social_sharing_include_excerpts'] == 1)) || $type == 'pages' && !is_single())) {
861
  $bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false));
862
  $content .= $bookmarks;
863
  }
864
+ if ($this->options['mr_social_sharing_position'] == 'both') {
865
+ $bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false));
866
+ $content = $bookmarks.$content.$bookmarks;
867
+ }
868
  }
869
  return $content;
870
  }
871
 
872
+ function should_use_shortcode() {
873
+ if ($this->options['mr_social_sharing_position'] == 'shortcode' || $this->options['mr_social_sharing_enable_shortcode'] == 1) {
874
+ return true;
875
+ }
876
+ return false;
877
+ }
878
+
879
  function share_shortcode() {
880
  $bookmarks = '';
881
+ if (($this->options['mr_social_sharing_position'] == 'shortcode' || $this->options['mr_social_sharing_enable_shortcode'] == 1) && (is_single() || $this->options['mr_social_sharing_include_excerpts'] == 1)) {
882
+ $bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false), 'shortcode_');
883
  }
884
  return $bookmarks;
885
  }
912
  function MR_Social_Sharing_Toolkit_Widget() {
913
  $widget_ops = array( 'classname' => 'MR_Social_Sharing_Toolkit_Widget', 'description' => '' );
914
  $control_ops = array( 'id_base' => 'mr-social-sharing-toolkit-widget' );
915
+ $this->WP_Widget( 'mr-social-sharing-toolkit-widget', 'Social Sharing Toolkit '.__('Share Widget','mr_social_sharing_toolkit'), $widget_ops, $control_ops );
916
  }
917
 
918
  function widget ( $args, $instance) {
942
  $instance = wp_parse_args((array) $instance, array( 'widget_title' => '', 'fixed_title' => '', 'fixed_url' => ''));
943
  echo '
944
  <p>
945
+ <label for="'.$this->get_field_id( 'widget_title' ).'">'.__('Title').':</label>
946
  <input class="widefat" id="'.$this->get_field_id( 'widget_title' ).'" name="'.$this->get_field_name( 'widget_title' ).'" value="'.$instance['widget_title'].'" />
947
  </p>
948
  <p>
949
+ <label for="'.$this->get_field_id( 'fixed_title' ).'">'.__('Fixed title','mr_social_sharing_toolkit').':</label>
950
  <input class="widefat" id="'.$this->get_field_id( 'fixed_title' ).'" name="'.$this->get_field_name( 'fixed_title' ).'" value="'.$instance['fixed_title'].'" />
951
  </p>
952
  <p>
953
+ <label for="'.$this->get_field_id( 'fixed_url' ).'">'.__('Fixed url','mr_social_sharing_toolkit').':</label>
954
  <input class="widefat" id="'.$this->get_field_id( 'fixed_url' ).'" name="'.$this->get_field_name( 'fixed_url' ).'" value="'.$instance['fixed_url'].'" />
955
  </p>
956
  <p>
957
+ '.__('Further configuration is done via the','mr_social_sharing_toolkit').' <a href="options-general.php?page=mr_social_sharing#tab_3">'.__('plugin admin screen','mr_social_sharing_toolkit').'</a>.
958
  </p>';
959
  }
960
  }
962
  function MR_Social_Sharing_Toolkit_Follow_Widget() {
963
  $widget_ops = array( 'classname' => 'MR_Social_Sharing_Toolkit_Follow_Widget', 'description' => '' );
964
  $control_ops = array( 'id_base' => 'mr-social-sharing-toolkit-follow-widget' );
965
+ $this->WP_Widget( 'mr-social-sharing-toolkit-follow-widget', 'Social Sharing Toolkit '.__('Follow Widget','mr_social_sharing_toolkit'), $widget_ops, $control_ops );
966
  }
967
 
968
  function widget ( $args, $instance) {
988
  $instance = wp_parse_args((array) $instance, array( 'widget_title' => ''));
989
  echo '
990
  <p>
991
+ <label for="'.$this->get_field_id( 'widget_title' ).'">'.__('Title').':</label>
992
  <input class="widefat" id="'.$this->get_field_id( 'widget_title' ).'" name="'.$this->get_field_name( 'widget_title' ).'" value="'.$instance['widget_title'].'" />
993
  </p>
994
  <p>
995
+ '.__('Further configuration is done via the','mr_social_sharing_toolkit').' <a href="options-general.php?page=mr_social_sharing#tab_4">'.__('plugin admin screen','mr_social_sharing_toolkit').'</a>.
996
  </p>';
997
  }
998
  }
999
  $MR_Social_Sharing_Toolkit = new MR_Social_Sharing_Toolkit();
1000
+ add_action('wp_print_styles', array($MR_Social_Sharing_Toolkit, 'prepare_styles'));
1001
+ add_action('wp_print_scripts', array($MR_Social_Sharing_Toolkit, 'prepare_scripts'));
1002
  if ($MR_Social_Sharing_Toolkit->should_linkify_content()) {
1003
  add_filter('the_content', array($MR_Social_Sharing_Toolkit, 'linkify'));
1004
  }
1008
  if ($MR_Social_Sharing_Toolkit->should_share_content()) {
1009
  add_filter( 'the_content', array($MR_Social_Sharing_Toolkit, 'share'));
1010
  }
1011
+ if ($MR_Social_Sharing_Toolkit->should_use_shortcode()) {
1012
+ add_shortcode('social_share', array($MR_Social_Sharing_Toolkit, 'share_shortcode'));
1013
+ }
1014
  /* Register widgets */
1015
  add_action('widgets_init', create_function('', 'return register_widget("MR_Social_Sharing_Toolkit_Widget");'));
1016
  add_action('widgets_init', create_function('', 'return register_widget("MR_Social_Sharing_Toolkit_Follow_Widget");'));
style.css CHANGED
@@ -4,14 +4,15 @@ div.mr_social_sharing_wrapper {
4
  margin: 4px 0 !important;
5
  padding: 0 !important;
6
  border: 0 !important;
 
7
  }
8
 
9
  div.mr_social_sharing, span.mr_social_sharing, div.mr_social_sharing_top, span.mr_social_sharing_top {
10
  display: block;
11
  height: auto !important;
12
- vertical-align: bottom !important;
13
  margin: 2px !important;
14
  padding: 0 !important;
 
15
  }
16
 
17
  span.mr_social_sharing, span.mr_social_sharing_top {
@@ -31,28 +32,54 @@ a.mr_social_sharing_popup_link, a.mr_social_sharing_popup_link:HOVER {
31
  }
32
 
33
  .mr_social_sharing img, .mr_social_sharing_top img {
 
34
  margin: 0 !important;
35
  padding: 0 !important;
36
  border: 0 !important;
37
  vertical-align: bottom !important;
 
 
 
 
 
 
 
 
 
 
 
38
  }
39
 
40
  .mr_social_sharing span.mr_small_icon, .mr_social_sharing span.mr_medium_icon, .mr_social_sharing_top span.mr_small_icon, .mr_social_sharing_top span.mr_medium_icon {
41
- display: inline-block;
42
  font-family: 'Droid Sans',arial,sans-serif !important;
43
  vertical-align: bottom !important;
44
  font-size:10px !important;
45
  font-weight: 200 !important;
46
- margin: 4px 0 -4px 4px !important;
 
47
  padding: 0 !important;
48
  }
49
 
50
  .mr_social_sharing span.mr_medium_icon, .mr_social_sharing_top span.mr_medium_icon {
51
  font-size:12px !important;
 
52
  }
53
 
54
- .mr_social_sharing_top span.mr_small_icon, .mr_social_sharing_top span.mr_medium_icon {
55
- vertical-align: top !important;
 
 
 
 
 
 
 
 
 
 
 
 
56
  }
57
 
58
  /* Delicious */
@@ -66,23 +93,24 @@ a.mr_social_sharing_popup_link, a.mr_social_sharing_popup_link:HOVER {
66
  text-align:center;
67
  }
68
 
69
- .delicious_vertical a {
70
  display: block;
71
- font-family:'Droid Sans',arial,sans-serif !important;
72
- font-size:15px !important;
73
  font-weight: 200 !important;
74
  color: #7e7e7e !important;
75
- background:transparent url(images/delicious_counters.png) no-repeat scroll left top !important;
76
- padding:7px 0px 40px 0px !important;
 
77
  width: 50px !important;
78
- height:13px !important;
79
- line-height:12px;
80
  text-decoration: none;
81
  }
82
 
83
- .delicious_vertical a:hover {
84
  color: #0090ff !important;
85
- text-decoration: none !important;
86
  }
87
 
88
  .delicious_horizontal {
@@ -93,15 +121,16 @@ a.mr_social_sharing_popup_link, a.mr_social_sharing_popup_link:HOVER {
93
  margin: 0px;
94
  }
95
 
96
- .delicious_horizontal a {
97
  display: block;
98
- font-family:'Droid Sans',arial,sans-serif !important;
99
- font-size:12px !important;
100
  font-weight: 300 !important;
101
- background:transparent url(images/delicious_counters.png) no-repeat scroll left bottom;
102
- height:15px !important;
103
- width:35px !important;
104
- padding:0px 5px 5px 80px !important;
 
105
  color: #7e7e7e !important;
106
  text-decoration: none;
107
  text-align:center;
@@ -110,7 +139,7 @@ a.mr_social_sharing_popup_link, a.mr_social_sharing_popup_link:HOVER {
110
 
111
  .delicious_horizontal a:hover {
112
  color: #0090ff !important;
113
- text-decoration: none;
114
  }
115
 
116
  .delicious_vertical span.delicious_hash, .delicious_horizontal span.delicious_hash {
4
  margin: 4px 0 !important;
5
  padding: 0 !important;
6
  border: 0 !important;
7
+ line-height: 0 !important;
8
  }
9
 
10
  div.mr_social_sharing, span.mr_social_sharing, div.mr_social_sharing_top, span.mr_social_sharing_top {
11
  display: block;
12
  height: auto !important;
 
13
  margin: 2px !important;
14
  padding: 0 !important;
15
+ vertical-align: bottom !important;
16
  }
17
 
18
  span.mr_social_sharing, span.mr_social_sharing_top {
32
  }
33
 
34
  .mr_social_sharing img, .mr_social_sharing_top img {
35
+ display: inline-block !important;
36
  margin: 0 !important;
37
  padding: 0 !important;
38
  border: 0 !important;
39
  vertical-align: bottom !important;
40
+ max-width: 100%;
41
+ }
42
+
43
+ .mr_social_sharing a.mr_social_sharing_popup_link, .mr_social_sharing div, .mr_social_sharing span, .mr_social_sharing iframe, .mr_social_sharing img {
44
+ line-height: 0 !important;
45
+ vertical-align: bottom !important;
46
+ }
47
+
48
+ .mr_social_sharing_top a.mr_social_sharing_popup_link, .mr_social_sharing_top div, .mr_social_sharing_top span, .mr_social_sharing_top iframe, .mr_social_sharing_top img {
49
+ line-height: 0 !important;
50
+ vertical-align: top !important;
51
  }
52
 
53
  .mr_social_sharing span.mr_small_icon, .mr_social_sharing span.mr_medium_icon, .mr_social_sharing_top span.mr_small_icon, .mr_social_sharing_top span.mr_medium_icon {
54
+ display: inline-block !important;
55
  font-family: 'Droid Sans',arial,sans-serif !important;
56
  vertical-align: bottom !important;
57
  font-size:10px !important;
58
  font-weight: 200 !important;
59
+ line-height: 10px !important;
60
+ margin: 0 0 0 4px !important;
61
  padding: 0 !important;
62
  }
63
 
64
  .mr_social_sharing span.mr_medium_icon, .mr_social_sharing_top span.mr_medium_icon {
65
  font-size:12px !important;
66
+ line-height: 12px !important;
67
  }
68
 
69
+ /* Digg fix */
70
+
71
+ span.db-count {
72
+ line-height: 16px !important;
73
+ vertical-align: baseline !important;
74
+ }
75
+
76
+ /* LinkedIn fix */
77
+
78
+ span.IN-widget {
79
+ margin: 0 !important;
80
+ padding: 0 !important;
81
+ border: 0 !important;
82
+ line-height: 0 !important;
83
  }
84
 
85
  /* Delicious */
93
  text-align:center;
94
  }
95
 
96
+ .delicious_vertical a.mr_social_sharing_popup_link, .delicious_vertical a.mr_social_sharing_popup_link:hover {
97
  display: block;
98
+ font-family: 'Droid Sans',arial,sans-serif !important;
99
+ font-size: 15px !important;
100
  font-weight: 200 !important;
101
  color: #7e7e7e !important;
102
+ background: transparent url(images/delicious_counters.png) no-repeat scroll left top !important;
103
+ padding: 6px 0px 44px 0px !important;
104
+ margin: 0;
105
  width: 50px !important;
106
+ height: 10px !important;
107
+ line-height: 15px !important;
108
  text-decoration: none;
109
  }
110
 
111
+ .delicious_vertical a.mr_social_sharing_popup_link:hover {
112
  color: #0090ff !important;
113
+ background: transparent url(images/delicious_counters_hover.png) no-repeat scroll left top !important;
114
  }
115
 
116
  .delicious_horizontal {
121
  margin: 0px;
122
  }
123
 
124
+ .delicious_horizontal a, .delicious_horizontal a:hover {
125
  display: block;
126
+ font-family: 'Droid Sans',arial,sans-serif !important;
127
+ font-size: 12px !important;
128
  font-weight: 300 !important;
129
+ background: transparent url(images/delicious_counters.png) no-repeat scroll left bottom;
130
+ height: 10px !important;
131
+ width: 35px !important;
132
+ padding: 10px 5px 0 80px !important;
133
+ vertical-align: bottom !important;
134
  color: #7e7e7e !important;
135
  text-decoration: none;
136
  text-align:center;
139
 
140
  .delicious_horizontal a:hover {
141
  color: #0090ff !important;
142
+ background: transparent url(images/delicious_counters_hover.png) no-repeat scroll left bottom;
143
  }
144
 
145
  .delicious_vertical span.delicious_hash, .delicious_horizontal span.delicious_hash {