Version Description
Download this release
Release Info
Developer | cbaldelomar |
Plugin | Shortcodes by Angie Makes |
Version | 1.45 |
Comparing to | |
See all releases |
Code changes from version 1.44 to 1.45
- README.md +5 -0
- includes/functions.php +27 -26
- includes/options.php +459 -451
- includes/widgets.php +1 -2
- readme.txt +5 -0
- wc-shortcodes.php +21 -7
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
),
|
16 |
),
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
),
|
36 |
),
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
),
|
56 |
),
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
),
|
76 |
),
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
),
|
96 |
),
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
),
|
116 |
),
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
),
|
136 |
),
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
),
|
156 |
),
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
),
|
176 |
),
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
),
|
196 |
),
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
),
|
216 |
),
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
),
|
236 |
),
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
),
|
256 |
),
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
),
|
276 |
),
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
),
|
296 |
),
|
297 |
),
|
298 |
-
)
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
),
|
314 |
),
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
),
|
327 |
),
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
),
|
340 |
),
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
),
|
353 |
),
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
),
|
366 |
),
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
),
|
379 |
),
|
380 |
),
|
381 |
-
)
|
382 |
-
|
383 |
-
$
|
384 |
-
$
|
385 |
-
$admin_email = get_option( 'admin_email' );
|
386 |
|
387 |
-
$wc_shortcodes_options['rsvp'] = array(
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
|
|
414 |
),
|
415 |
),
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
),
|
428 |
),
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
),
|
448 |
),
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
),
|
468 |
),
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
),
|
481 |
),
|
482 |
),
|
483 |
-
)
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
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'] :
|
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.
|
9 |
License: GPLv2 or later
|
10 |
*/
|
11 |
|
12 |
-
define( 'WC_SHORTCODES_VERSION', '1.
|
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
|