Shortcodes by Angie Makes - Version 1.45

Version Description

Download this release

Release Info

Developer cbaldelomar
Plugin Icon wp plugin Shortcodes by Angie Makes
Version 1.45
Comparing to
See all releases

Code changes from version 1.44 to 1.45

README.md CHANGED
@@ -66,6 +66,11 @@ Use the shortcode manager in the TinyMCE text editor
66
 
67
  ## Changelog ##
68
 
 
 
 
 
 
69
  ### Version 1.44
70
 
71
  * Changed gutter width to fixed pixel value instead of percentage.
66
 
67
  ## Changelog ##
68
 
69
+ ### Version 1.45
70
+
71
+ * Added theme support for social icons and share buttons
72
+ * Clean up
73
+
74
  ### Version 1.44
75
 
76
  * Changed gutter width to fixed pixel value instead of percentage.
includes/functions.php CHANGED
@@ -14,31 +14,6 @@ function wc_shortcodes_check_supports() {
14
  }
15
  add_action( 'init', 'wc_shortcodes_check_supports' );
16
 
17
- /**
18
- * filter social url. For example, we want to add
19
- * mailto: to an email address.
20
- *
21
- * @access public
22
- * @return void
23
- */
24
- function wc_shortcodes_smart_social_link( $social_link, $name ) {
25
- switch ( $name ) {
26
- case 'email' :
27
- // some users may have already inserted mailto:, so let's remove it.
28
- if ( is_email( $social_link ) ) {
29
- $social_link = str_replace( 'mailto:', '', $social_link );
30
- $social_link = 'mailto:'.$social_link;
31
- }
32
- break;
33
- default :
34
- $social_link = esc_url( $social_link );
35
- break;
36
- }
37
-
38
- return $social_link;
39
- }
40
- add_filter( 'wc_shortcodes_social_link' , 'wc_shortcodes_smart_social_link', 10, 2 );
41
-
42
  /*
43
  * On New Version
44
  */
@@ -56,6 +31,7 @@ function wc_shortcodes_options_activation() {
56
 
57
  if ( $initialize ) {
58
  update_option( WC_SHORTCODES_PREFIX . 'current_version', WC_SHORTCODES_VERSION );
 
59
  foreach ( $wc_shortcodes_options as $o ) {
60
  foreach ( $o['sections'] as $oo ) {
61
  foreach ( $oo['options'] as $ooo ) {
@@ -72,7 +48,32 @@ function wc_shortcodes_options_activation() {
72
  }
73
  }
74
  }
75
- add_action( 'init', 'wc_shortcodes_options_activation' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
 
77
  function wc_shortcodes_default_social_icons() {
78
  global $wc_shortcodes_social_icons;
14
  }
15
  add_action( 'init', 'wc_shortcodes_check_supports' );
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  /*
18
  * On New Version
19
  */
31
 
32
  if ( $initialize ) {
33
  update_option( WC_SHORTCODES_PREFIX . 'current_version', WC_SHORTCODES_VERSION );
34
+
35
  foreach ( $wc_shortcodes_options as $o ) {
36
  foreach ( $o['sections'] as $oo ) {
37
  foreach ( $oo['options'] as $ooo ) {
48
  }
49
  }
50
  }
51
+ add_action( 'init', 'wc_shortcodes_options_activation', 200 );
52
+
53
+ /**
54
+ * filter social url. For example, we want to add
55
+ * mailto: to an email address.
56
+ *
57
+ * @access public
58
+ * @return void
59
+ */
60
+ function wc_shortcodes_smart_social_link( $social_link, $name ) {
61
+ switch ( $name ) {
62
+ case 'email' :
63
+ // some users may have already inserted mailto:, so let's remove it.
64
+ if ( is_email( $social_link ) ) {
65
+ $social_link = str_replace( 'mailto:', '', $social_link );
66
+ $social_link = 'mailto:'.$social_link;
67
+ }
68
+ break;
69
+ default :
70
+ $social_link = esc_url( $social_link );
71
+ break;
72
+ }
73
+
74
+ return $social_link;
75
+ }
76
+ add_filter( 'wc_shortcodes_social_link' , 'wc_shortcodes_smart_social_link', 10, 2 );
77
 
78
  function wc_shortcodes_default_social_icons() {
79
  global $wc_shortcodes_social_icons;
includes/options.php CHANGED
@@ -1,511 +1,519 @@
1
  <?php
2
- $wc_shortcodes_options['social-media'] = array(
3
- 'title' => 'Social Media',
4
- 'sections' => array(
5
- array(
6
- 'section' => 'wc-shortcodes-options-social-display-section',
7
- 'title' => 'Display',
8
- 'options' => array(
9
- array(
10
- 'id' => 'social_icons_display',
11
- 'title' => 'Order / Show / Hide',
12
- 'default' => $wc_shortcodes_social_icons,
13
- 'description' => '',
14
- 'type' => 'social_icons',
 
 
 
 
 
 
 
15
  ),
16
  ),
17
- ),
18
- array(
19
- 'section' => 'wc-shortcodes-options-facebook-section',
20
- 'title' => 'Facebook',
21
- 'options' => array(
22
- array(
23
- 'id' => 'facebook_link',
24
- 'title' => 'Link',
25
- 'default' => '',
26
- 'description' => '',
27
- 'type' => 'input',
28
- ),
29
- array(
30
- 'id' => 'facebook_icon',
31
- 'title' => 'Icon',
32
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/facebook.png',
33
- 'description' => '',
34
- 'type' => 'image',
35
  ),
36
  ),
37
- ),
38
- array(
39
- 'section' => 'wc-shortcodes-options-twitter-section',
40
- 'title' => 'Twitter',
41
- 'options' => array(
42
- array(
43
- 'id' => 'twitter_link',
44
- 'title' => 'Link',
45
- 'default' => '',
46
- 'description' => '',
47
- 'type' => 'input',
48
- ),
49
- array(
50
- 'id' => 'twitter_icon',
51
- 'title' => 'Icon',
52
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/twitter.png',
53
- 'description' => '',
54
- 'type' => 'image',
55
  ),
56
  ),
57
- ),
58
- array(
59
- 'section' => 'wc-shortcodes-options-pinterest-section',
60
- 'title' => 'Pinterest',
61
- 'options' => array(
62
- array(
63
- 'id' => 'pinterest_link',
64
- 'title' => 'Link',
65
- 'default' => '',
66
- 'description' => '',
67
- 'type' => 'input',
68
- ),
69
- array(
70
- 'id' => 'pinterest_icon',
71
- 'title' => 'Icon',
72
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/pinterest.png',
73
- 'description' => '',
74
- 'type' => 'image',
75
  ),
76
  ),
77
- ),
78
- array(
79
- 'section' => 'wc-shortcodes-options-google-section',
80
- 'title' => 'Google',
81
- 'options' => array(
82
- array(
83
- 'id' => 'google_link',
84
- 'title' => 'Link',
85
- 'default' => '',
86
- 'description' => '',
87
- 'type' => 'input',
88
- ),
89
- array(
90
- 'id' => 'google_icon',
91
- 'title' => 'Icon',
92
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/google.png',
93
- 'description' => '',
94
- 'type' => 'image',
95
  ),
96
  ),
97
- ),
98
- array(
99
- 'section' => 'wc-shortcodes-options-bloglovin-section',
100
- 'title' => 'BlogLovin',
101
- 'options' => array(
102
- array(
103
- 'id' => 'bloglovin_link',
104
- 'title' => 'Link',
105
- 'default' => '',
106
- 'description' => '',
107
- 'type' => 'input',
108
- ),
109
- array(
110
- 'id' => 'bloglovin_icon',
111
- 'title' => 'Icon',
112
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/bloglovin.png',
113
- 'description' => '',
114
- 'type' => 'image',
115
  ),
116
  ),
117
- ),
118
- array(
119
- 'section' => 'wc-shortcodes-options-email-section',
120
- 'title' => 'Email',
121
- 'options' => array(
122
- array(
123
- 'id' => 'email_link',
124
- 'title' => 'Link',
125
- 'default' => '',
126
- 'description' => '',
127
- 'type' => 'input',
128
- ),
129
- array(
130
- 'id' => 'email_icon',
131
- 'title' => 'Icon',
132
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/email.png',
133
- 'description' => '',
134
- 'type' => 'image',
135
  ),
136
  ),
137
- ),
138
- array(
139
- 'section' => 'wc-shortcodes-options-flickr-section',
140
- 'title' => 'Flickr',
141
- 'options' => array(
142
- array(
143
- 'id' => 'flickr_link',
144
- 'title' => 'Link',
145
- 'default' => '',
146
- 'description' => '',
147
- 'type' => 'input',
148
- ),
149
- array(
150
- 'id' => 'flickr_icon',
151
- 'title' => 'Icon',
152
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/flickr.png',
153
- 'description' => '',
154
- 'type' => 'image',
155
  ),
156
  ),
157
- ),
158
- array(
159
- 'section' => 'wc-shortcodes-options-instagram-section',
160
- 'title' => 'Instagram',
161
- 'options' => array(
162
- array(
163
- 'id' => 'instagram_link',
164
- 'title' => 'Link',
165
- 'default' => '',
166
- 'description' => '',
167
- 'type' => 'input',
168
- ),
169
- array(
170
- 'id' => 'instagram_icon',
171
- 'title' => 'Icon',
172
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/instagram.png',
173
- 'description' => '',
174
- 'type' => 'image',
175
  ),
176
  ),
177
- ),
178
- array(
179
- 'section' => 'wc-shortcodes-options-rss-section',
180
- 'title' => 'Rss',
181
- 'options' => array(
182
- array(
183
- 'id' => 'rss_link',
184
- 'title' => 'Link',
185
- 'default' => '',
186
- 'description' => '',
187
- 'type' => 'input',
188
- ),
189
- array(
190
- 'id' => 'rss_icon',
191
- 'title' => 'Icon',
192
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/rss.png',
193
- 'description' => '',
194
- 'type' => 'image',
195
  ),
196
  ),
197
- ),
198
- array(
199
- 'section' => 'wc-shortcodes-options-custom1-section',
200
- 'title' => 'Custom 1',
201
- 'options' => array(
202
- array(
203
- 'id' => 'custom1_link',
204
- 'title' => 'Link',
205
- 'default' => '',
206
- 'description' => '',
207
- 'type' => 'input',
208
- ),
209
- array(
210
- 'id' => 'custom1_icon',
211
- 'title' => 'Icon',
212
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/picasa.png',
213
- 'description' => '',
214
- 'type' => 'image',
215
  ),
216
  ),
217
- ),
218
- array(
219
- 'section' => 'wc-shortcodes-options-custom2-section',
220
- 'title' => 'Custom 2',
221
- 'options' => array(
222
- array(
223
- 'id' => 'custom2_link',
224
- 'title' => 'Link',
225
- 'default' => '',
226
- 'description' => '',
227
- 'type' => 'input',
228
- ),
229
- array(
230
- 'id' => 'custom2_icon',
231
- 'title' => 'Icon',
232
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/shopping.png',
233
- 'description' => '',
234
- 'type' => 'image',
235
  ),
236
  ),
237
- ),
238
- array(
239
- 'section' => 'wc-shortcodes-options-custom3-section',
240
- 'title' => 'Custom 3',
241
- 'options' => array(
242
- array(
243
- 'id' => 'custom3_link',
244
- 'title' => 'Link',
245
- 'default' => '',
246
- 'description' => '',
247
- 'type' => 'input',
248
- ),
249
- array(
250
- 'id' => 'custom3_icon',
251
- 'title' => 'Icon',
252
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/youtube.png',
253
- 'description' => '',
254
- 'type' => 'image',
255
  ),
256
  ),
257
- ),
258
- array(
259
- 'section' => 'wc-shortcodes-options-custom4-section',
260
- 'title' => 'Custom 4',
261
- 'options' => array(
262
- array(
263
- 'id' => 'custom4_link',
264
- 'title' => 'Link',
265
- 'default' => '',
266
- 'description' => '',
267
- 'type' => 'input',
268
- ),
269
- array(
270
- 'id' => 'custom4_icon',
271
- 'title' => 'Icon',
272
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/etsy.png',
273
- 'description' => '',
274
- 'type' => 'image',
275
  ),
276
  ),
277
- ),
278
- array(
279
- 'section' => 'wc-shortcodes-options-custom5-section',
280
- 'title' => 'Custom 5',
281
- 'options' => array(
282
- array(
283
- 'id' => 'custom5_link',
284
- 'title' => 'Link',
285
- 'default' => '',
286
- 'description' => '',
287
- 'type' => 'input',
288
- ),
289
- array(
290
- 'id' => 'custom5_icon',
291
- 'title' => 'Icon',
292
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/tumblr.png',
293
- 'description' => '',
294
- 'type' => 'image',
295
  ),
296
  ),
297
  ),
298
- ),
299
- );
300
- $wc_shortcodes_options['share-buttons'] = array(
301
- 'title' => 'Share Buttons',
302
- 'sections' => array(
303
- array(
304
- 'section' => 'wc-shortcodes-options-share-display-section',
305
- 'title' => 'Display',
306
- 'options' => array(
307
- array(
308
- 'id' => 'share_buttons_display',
309
- 'title' => 'Order / Show / Hide',
310
- 'default' => $wc_shortcodes_share_buttons,
311
- 'description' => '',
312
- 'type' => 'share_buttons',
313
  ),
314
  ),
315
- ),
316
- array(
317
- 'section' => 'wc-shortcodes-options-facebook-share-section',
318
- 'title' => 'Facebook',
319
- 'options' => array(
320
- array(
321
- 'id' => 'facebook_share_icon',
322
- 'title' => 'Icon',
323
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/facebook.png',
324
- 'description' => '',
325
- 'type' => 'image',
326
  ),
327
  ),
328
- ),
329
- array(
330
- 'section' => 'wc-shortcodes-options-twitter-share-section',
331
- 'title' => 'Twitter',
332
- 'options' => array(
333
- array(
334
- 'id' => 'twitter_share_icon',
335
- 'title' => 'Icon',
336
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/twitter.png',
337
- 'description' => '',
338
- 'type' => 'image',
339
  ),
340
  ),
341
- ),
342
- array(
343
- 'section' => 'wc-shortcodes-options-pinterest-share-section',
344
- 'title' => 'Pinterest',
345
- 'options' => array(
346
- array(
347
- 'id' => 'pinterest_share_icon',
348
- 'title' => 'Icon',
349
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/pinterest.png',
350
- 'description' => '',
351
- 'type' => 'image',
352
  ),
353
  ),
354
- ),
355
- array(
356
- 'section' => 'wc-shortcodes-options-google-share-section',
357
- 'title' => 'Google',
358
- 'options' => array(
359
- array(
360
- 'id' => 'google_share_icon',
361
- 'title' => 'Icon',
362
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/google.png',
363
- 'description' => '',
364
- 'type' => 'image',
365
  ),
366
  ),
367
- ),
368
- array(
369
- 'section' => 'wc-shortcodes-options-email-share-section',
370
- 'title' => 'Email',
371
- 'options' => array(
372
- array(
373
- 'id' => 'email_share_icon',
374
- 'title' => 'Icon',
375
- 'default' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/email.png',
376
- 'description' => '',
377
- 'type' => 'image',
378
  ),
379
  ),
380
  ),
381
- ),
382
- );
383
- $number_options = "1\n2\n3\n4\n5";
384
- $event_options = "All Events\nMain Ceremony\nWedding Party";
385
- $admin_email = get_option( 'admin_email' );
386
 
387
- $wc_shortcodes_options['rsvp'] = array(
388
- 'title' => 'RSVP',
389
- 'sections' => array(
390
- array(
391
- 'section' => 'wc-shortcodes-options-rsvp-section',
392
- 'title' => 'RSVP',
393
- 'options' => array(
394
- array(
395
- 'id' => 'rsvp_email',
396
- 'title' => 'Email To',
397
- 'default' => $admin_email,
398
- 'description' => 'Send RSVP notification to the email address above. Separate multiple emails with a comma.',
399
- 'type' => 'emails',
400
- ),
401
- array(
402
- 'id' => 'rsvp_email_title',
403
- 'title' => 'Email Title',
404
- 'default' => 'New RSVP - ' .get_bloginfo('title'),
405
- 'description' => 'The subject tile of your email you will receive',
406
- 'type' => 'input',
407
- ),
408
- array(
409
- 'id' => 'rsvp_success_message',
410
- 'title' => 'Success Message',
411
- 'default' => 'Thanks for attending! We will see you at our wedding.',
412
- 'description' => 'The message to display after a user successfully RSVP\'d',
413
- 'type' => 'input',
 
414
  ),
415
  ),
416
- ),
417
- array(
418
- 'section' => 'wc-shortcodes-options-rsvp-name-section',
419
- 'title' => 'Name',
420
- 'options' => array(
421
- array(
422
- 'id' => 'rsvp_name_title',
423
- 'title' => 'Title',
424
- 'default' => 'Your Name',
425
- 'description' => '',
426
- 'type' => 'input',
427
  ),
428
  ),
429
- ),
430
- array(
431
- 'section' => 'wc-shortcodes-options-rsvp-number-section',
432
- 'title' => 'Number',
433
- 'options' => array(
434
- array(
435
- 'id' => 'rsvp_number_title',
436
- 'title' => 'Title',
437
- 'default' => 'Number of Guests',
438
- 'description' => '',
439
- 'type' => 'input',
440
- ),
441
- array(
442
- 'id' => 'rsvp_number_options',
443
- 'title' => 'Options',
444
- 'default' => $number_options,
445
- 'description' => '',
446
- 'type' => 'textarea',
447
  ),
448
  ),
449
- ),
450
- array(
451
- 'section' => 'wc-shortcodes-options-rsvp-event-section',
452
- 'title' => 'Event',
453
- 'options' => array(
454
- array(
455
- 'id' => 'rsvp_event_title',
456
- 'title' => 'Title',
457
- 'default' => 'You Will Attend...',
458
- 'description' => '',
459
- 'type' => 'input',
460
- ),
461
- array(
462
- 'id' => 'rsvp_event_options',
463
- 'title' => 'Options',
464
- 'default' => $event_options,
465
- 'description' => '',
466
- 'type' => 'textarea',
467
  ),
468
  ),
469
- ),
470
- array(
471
- 'section' => 'wc-shortcodes-options-rsvp-button-section',
472
- 'title' => 'Button',
473
- 'options' => array(
474
- array(
475
- 'id' => 'rsvp_button_title',
476
- 'title' => 'Title',
477
- 'default' => 'I Am Attending',
478
- 'description' => '',
479
- 'type' => 'input',
480
  ),
481
  ),
482
  ),
483
- ),
484
- );
485
- $wc_shortcodes_options['misc'] = array(
486
- 'title' => 'Misc',
487
- 'sections' => array(
488
- array(
489
- 'section' => 'wc-shortcodes-options-misc-section',
490
- 'title' => 'Miscellaneous Options',
491
- 'options' => array(
492
- array(
493
- 'id' => 'enable_shortcode_css',
494
- 'title' => 'Shortcode CSS',
495
- 'default' => '1',
496
- 'description' => '',
497
- 'label' => 'Use shortcode CSS provided by plugin',
498
- 'type' => 'checkbox',
499
- ),
500
- array(
501
- 'id' => 'enable_font_awesome',
502
- 'title' => 'Enable FontAwesome',
503
- 'default' => '1',
504
- 'description' => '',
505
- 'label' => 'Use font icons provided by FontAwesome',
506
- 'type' => 'checkbox',
507
  ),
508
  ),
509
  ),
510
- ),
511
- );
 
1
  <?php
2
+ function wc_shortcodes_set_options() {
3
+ global $wc_shortcodes_share_buttons;
4
+ global $wc_shortcodes_social_icons;
5
+ global $wc_shortcodes_options;
6
+ global $wc_shortcodes_theme_support;
7
+
8
+ $wc_shortcodes_options['social-media'] = array(
9
+ 'title' => 'Social Media',
10
+ 'sections' => array(
11
+ array(
12
+ 'section' => 'wc-shortcodes-options-social-display-section',
13
+ 'title' => 'Display',
14
+ 'options' => array(
15
+ array(
16
+ 'id' => 'social_icons_display',
17
+ 'title' => 'Order / Show / Hide',
18
+ 'default' => $wc_shortcodes_social_icons,
19
+ 'description' => '',
20
+ 'type' => 'social_icons',
21
+ ),
22
  ),
23
  ),
24
+ array(
25
+ 'section' => 'wc-shortcodes-options-facebook-section',
26
+ 'title' => 'Facebook',
27
+ 'options' => array(
28
+ array(
29
+ 'id' => 'facebook_link',
30
+ 'title' => 'Link',
31
+ 'default' => '',
32
+ 'description' => '',
33
+ 'type' => 'input',
34
+ ),
35
+ array(
36
+ 'id' => 'facebook_icon',
37
+ 'title' => 'Icon',
38
+ 'default' => $wc_shortcodes_theme_support['facebook_social_icon'],
39
+ 'description' => '',
40
+ 'type' => 'image',
41
+ ),
42
  ),
43
  ),
44
+ array(
45
+ 'section' => 'wc-shortcodes-options-twitter-section',
46
+ 'title' => 'Twitter',
47
+ 'options' => array(
48
+ array(
49
+ 'id' => 'twitter_link',
50
+ 'title' => 'Link',
51
+ 'default' => '',
52
+ 'description' => '',
53
+ 'type' => 'input',
54
+ ),
55
+ array(
56
+ 'id' => 'twitter_icon',
57
+ 'title' => 'Icon',
58
+ 'default' => $wc_shortcodes_theme_support['twitter_social_icon'],
59
+ 'description' => '',
60
+ 'type' => 'image',
61
+ ),
62
  ),
63
  ),
64
+ array(
65
+ 'section' => 'wc-shortcodes-options-pinterest-section',
66
+ 'title' => 'Pinterest',
67
+ 'options' => array(
68
+ array(
69
+ 'id' => 'pinterest_link',
70
+ 'title' => 'Link',
71
+ 'default' => '',
72
+ 'description' => '',
73
+ 'type' => 'input',
74
+ ),
75
+ array(
76
+ 'id' => 'pinterest_icon',
77
+ 'title' => 'Icon',
78
+ 'default' => $wc_shortcodes_theme_support['pinterest_social_icon'],
79
+ 'description' => '',
80
+ 'type' => 'image',
81
+ ),
82
  ),
83
  ),
84
+ array(
85
+ 'section' => 'wc-shortcodes-options-google-section',
86
+ 'title' => 'Google',
87
+ 'options' => array(
88
+ array(
89
+ 'id' => 'google_link',
90
+ 'title' => 'Link',
91
+ 'default' => '',
92
+ 'description' => '',
93
+ 'type' => 'input',
94
+ ),
95
+ array(
96
+ 'id' => 'google_icon',
97
+ 'title' => 'Icon',
98
+ 'default' => $wc_shortcodes_theme_support['google_social_icon'],
99
+ 'description' => '',
100
+ 'type' => 'image',
101
+ ),
102
  ),
103
  ),
104
+ array(
105
+ 'section' => 'wc-shortcodes-options-bloglovin-section',
106
+ 'title' => 'BlogLovin',
107
+ 'options' => array(
108
+ array(
109
+ 'id' => 'bloglovin_link',
110
+ 'title' => 'Link',
111
+ 'default' => '',
112
+ 'description' => '',
113
+ 'type' => 'input',
114
+ ),
115
+ array(
116
+ 'id' => 'bloglovin_icon',
117
+ 'title' => 'Icon',
118
+ 'default' => $wc_shortcodes_theme_support['bloglovin_social_icon'],
119
+ 'description' => '',
120
+ 'type' => 'image',
121
+ ),
122
  ),
123
  ),
124
+ array(
125
+ 'section' => 'wc-shortcodes-options-email-section',
126
+ 'title' => 'Email',
127
+ 'options' => array(
128
+ array(
129
+ 'id' => 'email_link',
130
+ 'title' => 'Link',
131
+ 'default' => '',
132
+ 'description' => '',
133
+ 'type' => 'input',
134
+ ),
135
+ array(
136
+ 'id' => 'email_icon',
137
+ 'title' => 'Icon',
138
+ 'default' => $wc_shortcodes_theme_support['email_social_icon'],
139
+ 'description' => '',
140
+ 'type' => 'image',
141
+ ),
142
  ),
143
  ),
144
+ array(
145
+ 'section' => 'wc-shortcodes-options-flickr-section',
146
+ 'title' => 'Flickr',
147
+ 'options' => array(
148
+ array(
149
+ 'id' => 'flickr_link',
150
+ 'title' => 'Link',
151
+ 'default' => '',
152
+ 'description' => '',
153
+ 'type' => 'input',
154
+ ),
155
+ array(
156
+ 'id' => 'flickr_icon',
157
+ 'title' => 'Icon',
158
+ 'default' => $wc_shortcodes_theme_support['flickr_social_icon'],
159
+ 'description' => '',
160
+ 'type' => 'image',
161
+ ),
162
  ),
163
  ),
164
+ array(
165
+ 'section' => 'wc-shortcodes-options-instagram-section',
166
+ 'title' => 'Instagram',
167
+ 'options' => array(
168
+ array(
169
+ 'id' => 'instagram_link',
170
+ 'title' => 'Link',
171
+ 'default' => '',
172
+ 'description' => '',
173
+ 'type' => 'input',
174
+ ),
175
+ array(
176
+ 'id' => 'instagram_icon',
177
+ 'title' => 'Icon',
178
+ 'default' => $wc_shortcodes_theme_support['instagram_social_icon'],
179
+ 'description' => '',
180
+ 'type' => 'image',
181
+ ),
182
  ),
183
  ),
184
+ array(
185
+ 'section' => 'wc-shortcodes-options-rss-section',
186
+ 'title' => 'Rss',
187
+ 'options' => array(
188
+ array(
189
+ 'id' => 'rss_link',
190
+ 'title' => 'Link',
191
+ 'default' => '',
192
+ 'description' => '',
193
+ 'type' => 'input',
194
+ ),
195
+ array(
196
+ 'id' => 'rss_icon',
197
+ 'title' => 'Icon',
198
+ 'default' => $wc_shortcodes_theme_support['rss_social_icon'],
199
+ 'description' => '',
200
+ 'type' => 'image',
201
+ ),
202
  ),
203
  ),
204
+ array(
205
+ 'section' => 'wc-shortcodes-options-custom1-section',
206
+ 'title' => 'Custom 1',
207
+ 'options' => array(
208
+ array(
209
+ 'id' => 'custom1_link',
210
+ 'title' => 'Link',
211
+ 'default' => '',
212
+ 'description' => '',
213
+ 'type' => 'input',
214
+ ),
215
+ array(
216
+ 'id' => 'custom1_icon',
217
+ 'title' => 'Icon',
218
+ 'default' => $wc_shortcodes_theme_support['custom1_social_icon'],
219
+ 'description' => '',
220
+ 'type' => 'image',
221
+ ),
222
  ),
223
  ),
224
+ array(
225
+ 'section' => 'wc-shortcodes-options-custom2-section',
226
+ 'title' => 'Custom 2',
227
+ 'options' => array(
228
+ array(
229
+ 'id' => 'custom2_link',
230
+ 'title' => 'Link',
231
+ 'default' => '',
232
+ 'description' => '',
233
+ 'type' => 'input',
234
+ ),
235
+ array(
236
+ 'id' => 'custom2_icon',
237
+ 'title' => 'Icon',
238
+ 'default' => $wc_shortcodes_theme_support['custom2_social_icon'],
239
+ 'description' => '',
240
+ 'type' => 'image',
241
+ ),
242
  ),
243
  ),
244
+ array(
245
+ 'section' => 'wc-shortcodes-options-custom3-section',
246
+ 'title' => 'Custom 3',
247
+ 'options' => array(
248
+ array(
249
+ 'id' => 'custom3_link',
250
+ 'title' => 'Link',
251
+ 'default' => '',
252
+ 'description' => '',
253
+ 'type' => 'input',
254
+ ),
255
+ array(
256
+ 'id' => 'custom3_icon',
257
+ 'title' => 'Icon',
258
+ 'default' => $wc_shortcodes_theme_support['custom3_social_icon'],
259
+ 'description' => '',
260
+ 'type' => 'image',
261
+ ),
262
  ),
263
  ),
264
+ array(
265
+ 'section' => 'wc-shortcodes-options-custom4-section',
266
+ 'title' => 'Custom 4',
267
+ 'options' => array(
268
+ array(
269
+ 'id' => 'custom4_link',
270
+ 'title' => 'Link',
271
+ 'default' => '',
272
+ 'description' => '',
273
+ 'type' => 'input',
274
+ ),
275
+ array(
276
+ 'id' => 'custom4_icon',
277
+ 'title' => 'Icon',
278
+ 'default' => $wc_shortcodes_theme_support['custom4_social_icon'],
279
+ 'description' => '',
280
+ 'type' => 'image',
281
+ ),
282
  ),
283
  ),
284
+ array(
285
+ 'section' => 'wc-shortcodes-options-custom5-section',
286
+ 'title' => 'Custom 5',
287
+ 'options' => array(
288
+ array(
289
+ 'id' => 'custom5_link',
290
+ 'title' => 'Link',
291
+ 'default' => '',
292
+ 'description' => '',
293
+ 'type' => 'input',
294
+ ),
295
+ array(
296
+ 'id' => 'custom5_icon',
297
+ 'title' => 'Icon',
298
+ 'default' => $wc_shortcodes_theme_support['custom5_social_icon'],
299
+ 'description' => '',
300
+ 'type' => 'image',
301
+ ),
302
  ),
303
  ),
304
  ),
305
+ );
306
+ $wc_shortcodes_options['share-buttons'] = array(
307
+ 'title' => 'Share Buttons',
308
+ 'sections' => array(
309
+ array(
310
+ 'section' => 'wc-shortcodes-options-share-display-section',
311
+ 'title' => 'Display',
312
+ 'options' => array(
313
+ array(
314
+ 'id' => 'share_buttons_display',
315
+ 'title' => 'Order / Show / Hide',
316
+ 'default' => $wc_shortcodes_share_buttons,
317
+ 'description' => '',
318
+ 'type' => 'share_buttons',
319
+ ),
320
  ),
321
  ),
322
+ array(
323
+ 'section' => 'wc-shortcodes-options-facebook-share-section',
324
+ 'title' => 'Facebook',
325
+ 'options' => array(
326
+ array(
327
+ 'id' => 'facebook_share_icon',
328
+ 'title' => 'Icon',
329
+ 'default' => $wc_shortcodes_theme_support['facebook_share_button'],
330
+ 'description' => '',
331
+ 'type' => 'image',
332
+ ),
333
  ),
334
  ),
335
+ array(
336
+ 'section' => 'wc-shortcodes-options-twitter-share-section',
337
+ 'title' => 'Twitter',
338
+ 'options' => array(
339
+ array(
340
+ 'id' => 'twitter_share_icon',
341
+ 'title' => 'Icon',
342
+ 'default' => $wc_shortcodes_theme_support['twitter_share_button'],
343
+ 'description' => '',
344
+ 'type' => 'image',
345
+ ),
346
  ),
347
  ),
348
+ array(
349
+ 'section' => 'wc-shortcodes-options-pinterest-share-section',
350
+ 'title' => 'Pinterest',
351
+ 'options' => array(
352
+ array(
353
+ 'id' => 'pinterest_share_icon',
354
+ 'title' => 'Icon',
355
+ 'default' => $wc_shortcodes_theme_support['pinterest_share_button'],
356
+ 'description' => '',
357
+ 'type' => 'image',
358
+ ),
359
  ),
360
  ),
361
+ array(
362
+ 'section' => 'wc-shortcodes-options-google-share-section',
363
+ 'title' => 'Google',
364
+ 'options' => array(
365
+ array(
366
+ 'id' => 'google_share_icon',
367
+ 'title' => 'Icon',
368
+ 'default' => $wc_shortcodes_theme_support['google_share_button'],
369
+ 'description' => '',
370
+ 'type' => 'image',
371
+ ),
372
  ),
373
  ),
374
+ array(
375
+ 'section' => 'wc-shortcodes-options-email-share-section',
376
+ 'title' => 'Email',
377
+ 'options' => array(
378
+ array(
379
+ 'id' => 'email_share_icon',
380
+ 'title' => 'Icon',
381
+ 'default' => $wc_shortcodes_theme_support['email_share_button'],
382
+ 'description' => '',
383
+ 'type' => 'image',
384
+ ),
385
  ),
386
  ),
387
  ),
388
+ );
389
+ $number_options = "1\n2\n3\n4\n5";
390
+ $event_options = "All Events\nMain Ceremony\nWedding Party";
391
+ $admin_email = get_option( 'admin_email' );
 
392
 
393
+ $wc_shortcodes_options['rsvp'] = array(
394
+ 'title' => 'RSVP',
395
+ 'sections' => array(
396
+ array(
397
+ 'section' => 'wc-shortcodes-options-rsvp-section',
398
+ 'title' => 'RSVP',
399
+ 'options' => array(
400
+ array(
401
+ 'id' => 'rsvp_email',
402
+ 'title' => 'Email To',
403
+ 'default' => $admin_email,
404
+ 'description' => 'Send RSVP notification to the email address above. Separate multiple emails with a comma.',
405
+ 'type' => 'emails',
406
+ ),
407
+ array(
408
+ 'id' => 'rsvp_email_title',
409
+ 'title' => 'Email Title',
410
+ 'default' => 'New RSVP - ' .get_bloginfo('title'),
411
+ 'description' => 'The subject tile of your email you will receive',
412
+ 'type' => 'input',
413
+ ),
414
+ array(
415
+ 'id' => 'rsvp_success_message',
416
+ 'title' => 'Success Message',
417
+ 'default' => 'Thanks for attending! We will see you at our wedding.',
418
+ 'description' => 'The message to display after a user successfully RSVP\'d',
419
+ 'type' => 'input',
420
+ ),
421
  ),
422
  ),
423
+ array(
424
+ 'section' => 'wc-shortcodes-options-rsvp-name-section',
425
+ 'title' => 'Name',
426
+ 'options' => array(
427
+ array(
428
+ 'id' => 'rsvp_name_title',
429
+ 'title' => 'Title',
430
+ 'default' => 'Your Name',
431
+ 'description' => '',
432
+ 'type' => 'input',
433
+ ),
434
  ),
435
  ),
436
+ array(
437
+ 'section' => 'wc-shortcodes-options-rsvp-number-section',
438
+ 'title' => 'Number',
439
+ 'options' => array(
440
+ array(
441
+ 'id' => 'rsvp_number_title',
442
+ 'title' => 'Title',
443
+ 'default' => 'Number of Guests',
444
+ 'description' => '',
445
+ 'type' => 'input',
446
+ ),
447
+ array(
448
+ 'id' => 'rsvp_number_options',
449
+ 'title' => 'Options',
450
+ 'default' => $number_options,
451
+ 'description' => '',
452
+ 'type' => 'textarea',
453
+ ),
454
  ),
455
  ),
456
+ array(
457
+ 'section' => 'wc-shortcodes-options-rsvp-event-section',
458
+ 'title' => 'Event',
459
+ 'options' => array(
460
+ array(
461
+ 'id' => 'rsvp_event_title',
462
+ 'title' => 'Title',
463
+ 'default' => 'You Will Attend...',
464
+ 'description' => '',
465
+ 'type' => 'input',
466
+ ),
467
+ array(
468
+ 'id' => 'rsvp_event_options',
469
+ 'title' => 'Options',
470
+ 'default' => $event_options,
471
+ 'description' => '',
472
+ 'type' => 'textarea',
473
+ ),
474
  ),
475
  ),
476
+ array(
477
+ 'section' => 'wc-shortcodes-options-rsvp-button-section',
478
+ 'title' => 'Button',
479
+ 'options' => array(
480
+ array(
481
+ 'id' => 'rsvp_button_title',
482
+ 'title' => 'Title',
483
+ 'default' => 'I Am Attending',
484
+ 'description' => '',
485
+ 'type' => 'input',
486
+ ),
487
  ),
488
  ),
489
  ),
490
+ );
491
+ $wc_shortcodes_options['misc'] = array(
492
+ 'title' => 'Misc',
493
+ 'sections' => array(
494
+ array(
495
+ 'section' => 'wc-shortcodes-options-misc-section',
496
+ 'title' => 'Miscellaneous Options',
497
+ 'options' => array(
498
+ array(
499
+ 'id' => 'enable_shortcode_css',
500
+ 'title' => 'Shortcode CSS',
501
+ 'default' => '1',
502
+ 'description' => '',
503
+ 'label' => 'Use shortcode CSS provided by plugin',
504
+ 'type' => 'checkbox',
505
+ ),
506
+ array(
507
+ 'id' => 'enable_font_awesome',
508
+ 'title' => 'Enable FontAwesome',
509
+ 'default' => '1',
510
+ 'description' => '',
511
+ 'label' => 'Use font icons provided by FontAwesome',
512
+ 'type' => 'checkbox',
513
+ ),
514
  ),
515
  ),
516
  ),
517
+ );
518
+ }
519
+ add_action( 'init', 'wc_shortcodes_set_options', 100 );
includes/widgets.php CHANGED
@@ -109,9 +109,8 @@ class WC_Shortcodes_Social_Icons_Widget extends WP_Widget {
109
  }
110
 
111
  function form( $instance ) {
112
- $order = isset( $instance['order'] ) ? $instance['order'] : $default_order;
113
  $title = isset( $instance['title'] ) ? $instance['title'] : 'Follow Me!';
114
- $columns = isset( $instance['columns'] ) ? $instance['columns'] : 6;
115
  $maxheight = isset( $instance['maxheight'] ) ? $instance['maxheight'] : 'none';
116
  ?>
117
  <p>
109
  }
110
 
111
  function form( $instance ) {
 
112
  $title = isset( $instance['title'] ) ? $instance['title'] : 'Follow Me!';
113
+ $columns = isset( $instance['columns'] ) ? $instance['columns'] : 'float-left';
114
  $maxheight = isset( $instance['maxheight'] ) ? $instance['maxheight'] : 'none';
115
  ?>
116
  <p>
readme.txt CHANGED
@@ -88,6 +88,11 @@ Use the shortcode manager in the TinyMCE text editor
88
 
89
  == Changelog ==
90
 
 
 
 
 
 
91
  ### Version 1.44
92
 
93
  * Changed gutter width to fixed pixel value instead of percentage.
88
 
89
  == Changelog ==
90
 
91
+ ### Version 1.45
92
+
93
+ * Added theme support for social icons and share buttons
94
+ * Clean up
95
+
96
  ### Version 1.44
97
 
98
  * Changed gutter width to fixed pixel value instead of percentage.
wc-shortcodes.php CHANGED
@@ -5,11 +5,11 @@ Plugin URI: http://webplantmedia.com/starter-themes/wordpresscanvas/features/sho
5
  Description: A family of shortcodes to enhance site functionality.
6
  Author: Chris Baldelomar
7
  Author URI: http://webplantmedia.com/
8
- Version: 1.44
9
  License: GPLv2 or later
10
  */
11
 
12
- define( 'WC_SHORTCODES_VERSION', '1.44' );
13
  define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
14
  define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
15
  define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
@@ -38,11 +38,6 @@ $wc_shortcodes_social_icons = array(
38
  'custom3' => 'Custom 3',
39
  'custom4' => 'Custom 4',
40
  'custom5' => 'Custom 5',
41
- 'pinterest' => 'Pinterest',
42
- 'facebook' => 'Facebook',
43
- 'twitter' => 'Twitter',
44
- 'google' => 'Google',
45
- 'email' => 'Email',
46
  );
47
  $wc_shortcodes_share_buttons = array(
48
  'pinterest' => 'Pinterest',
@@ -53,6 +48,25 @@ $wc_shortcodes_share_buttons = array(
53
  );
54
  $wc_shortcodes_theme_support = array(
55
  'fullwidth_container' => '#main',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  );
57
 
58
  require_once( dirname(__FILE__) . '/includes/options.php' ); // define options array
5
  Description: A family of shortcodes to enhance site functionality.
6
  Author: Chris Baldelomar
7
  Author URI: http://webplantmedia.com/
8
+ Version: 1.45
9
  License: GPLv2 or later
10
  */
11
 
12
+ define( 'WC_SHORTCODES_VERSION', '1.45' );
13
  define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
14
  define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
15
  define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
38
  'custom3' => 'Custom 3',
39
  'custom4' => 'Custom 4',
40
  'custom5' => 'Custom 5',
 
 
 
 
 
41
  );
42
  $wc_shortcodes_share_buttons = array(
43
  'pinterest' => 'Pinterest',
48
  );
49
  $wc_shortcodes_theme_support = array(
50
  'fullwidth_container' => '#main',
51
+ 'facebook_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/facebook.png',
52
+ 'twitter_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/twitter.png',
53
+ 'pinterest_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/pinterest.png',
54
+ 'google_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/google.png',
55
+ 'bloglovin_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/bloglovin.png',
56
+ 'email_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/email.png',
57
+ 'flickr_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/flickr.png',
58
+ 'instagram_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/instagram.png',
59
+ 'rss_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/rss.png',
60
+ 'custom1_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/picasa.png',
61
+ 'custom2_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/shopping.png',
62
+ 'custom3_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/youtube.png',
63
+ 'custom4_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/etsy.png',
64
+ 'custom5_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/tumblr.png',
65
+ 'pinterest_share_button' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/pinterest.png',
66
+ 'facebook_share_button' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/facebook.png',
67
+ 'twitter_share_button' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/twitter.png',
68
+ 'google_share_button' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/google.png',
69
+ 'email_share_button' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/email.png',
70
  );
71
 
72
  require_once( dirname(__FILE__) . '/includes/options.php' ); // define options array