Shortcodes by Angie Makes - Version 3.21

Version Description

Download this release

Release Info

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

Code changes from version 3.20 to 3.21

README.md CHANGED
@@ -106,6 +106,10 @@ See our help article on [how to manually upload a plugin](http://knowledgebase.a
106
 
107
  ## Changelog ##
108
 
 
 
 
 
109
  ### Version 3.20 ###
110
 
111
  * Removed extra closing tag
106
 
107
  ## Changelog ##
108
 
109
+ ### Version 3.21 ###
110
+
111
+ * Added retina support for social and share icon images.
112
+
113
  ### Version 3.20 ###
114
 
115
  * Removed extra closing tag
admin/class-options.php CHANGED
@@ -60,13 +60,15 @@ class WPC_Shortcodes_Options extends WPC_Shortcodes_Vars {
60
  ),
61
  array(
62
  'option_name' => 'social_icons_format',
63
- 'title' => 'Format',
64
  'default' => parent::$theme_support['social_icons_format'],
65
- 'description' => '',
66
  'type' => 'dropdown',
67
  'options' => array(
68
  'icon' => 'Icon',
69
- 'image' => 'Image',
 
 
70
  ),
71
  'theme_reset' => true,
72
  ),
@@ -105,7 +107,9 @@ class WPC_Shortcodes_Options extends WPC_Shortcodes_Vars {
105
  'type' => 'dropdown',
106
  'options' => array(
107
  'icon' => 'Icon',
108
- 'image' => 'Image',
 
 
109
  'icon-text' => 'Icon + Text',
110
  'text' => 'Text',
111
  ),
@@ -359,9 +363,25 @@ class WPC_Shortcodes_Options extends WPC_Shortcodes_Vars {
359
  'type' => 'input',
360
  'theme_reset' => true,
361
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
362
  array(
363
  'option_name' => $key . '_share_icon',
364
- 'label' => 'Image Icon',
365
  'default' => parent::$theme_support[ $key . '_share_button'],
366
  'description' => '',
367
  'type' => 'image',
@@ -397,9 +417,25 @@ class WPC_Shortcodes_Options extends WPC_Shortcodes_Vars {
397
  'type' => 'input',
398
  'theme_reset' => true,
399
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
400
  array(
401
  'option_name' => $key . '_icon',
402
- 'label' => 'Image Icon',
403
  'default' => parent::$theme_support[ $key . '_social_icon'],
404
  'description' => '',
405
  'type' => 'image',
60
  ),
61
  array(
62
  'option_name' => 'social_icons_format',
63
+ 'title' => 'Default Format',
64
  'default' => parent::$theme_support['social_icons_format'],
65
+ 'description' => 'This option can be overwritten through a social media shortcode option, or through a social media widget option. So if your social icon format does not change, check your widget and shortcode options.',
66
  'type' => 'dropdown',
67
  'options' => array(
68
  'icon' => 'Icon',
69
+ 'small_image' => 'Small Image',
70
+ 'medium_image' => 'Medium Image',
71
+ 'image' => 'Large Image',
72
  ),
73
  'theme_reset' => true,
74
  ),
107
  'type' => 'dropdown',
108
  'options' => array(
109
  'icon' => 'Icon',
110
+ 'small_image' => 'Small Image',
111
+ 'medium_image' => 'Medium Image',
112
+ 'image' => 'Large Image',
113
  'icon-text' => 'Icon + Text',
114
  'text' => 'Text',
115
  ),
363
  'type' => 'input',
364
  'theme_reset' => true,
365
  ),
366
+ array(
367
+ 'option_name' => $key . '_small_share_icon',
368
+ 'label' => 'Small Image Icon',
369
+ 'default' => parent::$theme_support[ $key . '_small_share_button'],
370
+ 'description' => '',
371
+ 'type' => 'image',
372
+ 'theme_reset' => true,
373
+ ),
374
+ array(
375
+ 'option_name' => $key . '_medium_share_icon',
376
+ 'label' => 'Medium Image Icon',
377
+ 'default' => parent::$theme_support[ $key . '_medium_share_button'],
378
+ 'description' => '',
379
+ 'type' => 'image',
380
+ 'theme_reset' => true,
381
+ ),
382
  array(
383
  'option_name' => $key . '_share_icon',
384
+ 'label' => 'Large Image Icon',
385
  'default' => parent::$theme_support[ $key . '_share_button'],
386
  'description' => '',
387
  'type' => 'image',
417
  'type' => 'input',
418
  'theme_reset' => true,
419
  ),
420
+ array(
421
+ 'option_name' => $key . '_small_icon',
422
+ 'label' => 'Small Image Icon',
423
+ 'default' => parent::$theme_support[ $key . '_small_social_icon'],
424
+ 'description' => '',
425
+ 'type' => 'image',
426
+ 'theme_reset' => true,
427
+ ),
428
+ array(
429
+ 'option_name' => $key . '_medium_icon',
430
+ 'label' => 'Medium Image Icon',
431
+ 'default' => parent::$theme_support[ $key . '_medium_social_icon'],
432
+ 'description' => '',
433
+ 'type' => 'image',
434
+ 'theme_reset' => true,
435
+ ),
436
  array(
437
  'option_name' => $key . '_icon',
438
+ 'label' => 'Large Image Icon',
439
  'default' => parent::$theme_support[ $key . '_social_icon'],
440
  'description' => '',
441
  'type' => 'image',
public/class-register.php CHANGED
@@ -302,7 +302,24 @@ class WPC_Shortcodes_Register extends WPC_Shortcodes_Vars {
302
  $atts['format'] = get_option( WC_SHORTCODES_PREFIX . 'social_icons_format', 'icon' );
303
  }
304
 
305
- $show_image = 'image' == $atts['format'] ? true : false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
306
 
307
  if ( ! is_array( $order ) || empty( $order ) ) {
308
  return;
@@ -339,7 +356,9 @@ class WPC_Shortcodes_Register extends WPC_Shortcodes_Vars {
339
  }
340
 
341
  $link_option_name = WC_SHORTCODES_PREFIX . $key . '_link';
342
- $image_icon_option_name = WC_SHORTCODES_PREFIX . $key . '_icon';
 
 
343
  $font_icon_option_name = WC_SHORTCODES_PREFIX . $key . '_font_icon';
344
 
345
  $social_link = get_option( $link_option_name );
@@ -347,13 +366,33 @@ class WPC_Shortcodes_Register extends WPC_Shortcodes_Vars {
347
 
348
  $first_class = $first ? ' first-icon' : '';
349
  $first = false;
 
350
 
351
  if ( $show_image ) {
352
- $icon_url = get_option( $image_icon_option_name );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
353
 
354
  $html .= '<li class="wc-shortcodes-social-icon wc-shortcode-social-icon-' . esc_attr( $key . $first_class ) . '">';
355
  $html .='<a target="_blank" href="'.esc_url( $social_link ).'">';
356
- $html .= '<img src="'.esc_url( $icon_url ).'" alt="'.esc_attr( $name ).'">';
357
  $html .= '</a>';
358
  $html .= '</li>';
359
  }
@@ -1389,14 +1428,6 @@ class WPC_Shortcodes_Register extends WPC_Shortcodes_Vars {
1389
  $html = '<div class="' . esc_attr( implode( ' ', $classes ) ) . '" style="'.esc_attr( $style_attr ).'">';
1390
  $html .= '<ul class="wc-shortcodes-clearfix">';
1391
  foreach ( $share_buttons as $key => $name ) {
1392
- $icon_option_name = WC_SHORTCODES_PREFIX . $key . '_share_icon';
1393
- $icon_url = get_option( $icon_option_name );
1394
-
1395
- $icon_option_name = WC_SHORTCODES_PREFIX . $key . '_share_text';
1396
- $icon_text = get_option( $icon_option_name );
1397
-
1398
- $font_icon_option_name = WC_SHORTCODES_PREFIX . $key . '_share_font_icon';
1399
- $icon_class = get_option( $font_icon_option_name );
1400
 
1401
  $first_class = $first ? ' first-share-button' : '';
1402
 
@@ -1404,85 +1435,35 @@ class WPC_Shortcodes_Register extends WPC_Shortcodes_Vars {
1404
  case 'pinterest' :
1405
  $html .= '<li class="wc-shortcodes-share-button-icon wc-shortcode-share-button-icon-' . $key . $first_class . '">';
1406
  $html .='<a href="javascript:void((function()%7Bvar%20e=document.createElement(&apos;script&apos;);e.setAttribute(&apos;type&apos;,&apos;text/javascript&apos;);e.setAttribute(&apos;charset&apos;,&apos;UTF-8&apos;);e.setAttribute(&apos;src&apos;,&apos;https://assets.pinterest.com/js/pinmarklet.js?r=&apos;+Math.random()*99999999);document.body.appendChild(e)%7D)());">';
1407
- switch ( $format ) {
1408
- case 'image' :
1409
- $html .= '<img src="'.esc_url( $icon_url ).'" alt="'.esc_attr( $icon_text ).'">';
1410
- break;
1411
- case 'icon' :
1412
- $html .= '<i class="fa '.esc_attr( $icon_class ).'"></i>';
1413
- break;
1414
- default :
1415
- $html .= '<i class="fa '.esc_attr( $icon_class ).'"></i><span class="wc-share-button-'.$key.'">'.esc_html( $icon_text ).'</span>';
1416
- break;
1417
- }
1418
  $html .= '</a>';
1419
  $html .= '</li>';
1420
  break;
1421
  case 'facebook' :
1422
  $html .= '<li class="wc-shortcodes-share-button-icon wc-shortcode-share-button-icon-' . $key . $first_class . '">';
1423
  $html .='<a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u='.get_permalink().'&amp;t='.rawurlencode( html_entity_decode( get_the_title(), ENT_QUOTES, $charset ) ).'">';
1424
- switch ( $format ) {
1425
- case 'image' :
1426
- $html .= '<img src="'.esc_url( $icon_url ).'" alt="'.esc_attr( $icon_text ).'">';
1427
- break;
1428
- case 'icon' :
1429
- $html .= '<i class="fa '.esc_attr( $icon_class ).'"></i>';
1430
- break;
1431
- default :
1432
- $html .= '<i class="fa '.esc_attr( $icon_class ).'"></i><span class="wc-share-button-'.$key.'">'.esc_html( $icon_text ).'</span>';
1433
- break;
1434
- }
1435
  $html .= '</a>';
1436
  $html .= '</li>';
1437
  break;
1438
  case 'twitter' :
1439
  $html .= '<li class="wc-shortcodes-share-button-icon wc-shortcode-share-button-icon-' . $key . $first_class . '">';
1440
  $html .='<a target="_blank" href="https://twitter.com/share?text='.rawurlencode( html_entity_decode( get_the_title(), ENT_QUOTES, $charset ) ).'&amp;url='.get_permalink().'" class="share-button-twitter" data-lang="en">';
1441
- switch ( $format ) {
1442
- case 'image' :
1443
- $html .= '<img src="'.esc_url( $icon_url ).'" alt="'.esc_attr( $icon_text ).'">';
1444
- break;
1445
- case 'icon' :
1446
- $html .= '<i class="fa '.esc_attr( $icon_class ).'"></i>';
1447
- break;
1448
- default :
1449
- $html .= '<i class="fa '.esc_attr( $icon_class ).'"></i><span class="wc-share-button-'.$key.'">'.esc_html( $icon_text ).'</span>';
1450
- break;
1451
- }
1452
  $html .= '</a>';
1453
  $html .= '</li>';
1454
  break;
1455
  case 'email' :
1456
  $html .= '<li class="wc-shortcodes-share-button-icon wc-shortcode-share-button-icon-' . $key . $first_class . '">';
1457
  $html .='<a title="Share by Email" href="mailto:?subject='.rawurlencode( html_entity_decode( get_the_title(), ENT_QUOTES, $charset ) ).'&amp;body='.get_permalink().'">';
1458
- switch ( $format ) {
1459
- case 'image' :
1460
- $html .= '<img src="'.esc_url( $icon_url ).'" alt="'.esc_attr( $icon_text ).'">';
1461
- break;
1462
- case 'icon' :
1463
- $html .= '<i class="fa '.esc_attr( $icon_class ).'"></i>';
1464
- break;
1465
- default :
1466
- $html .= '<i class="fa '.esc_attr( $icon_class ).'"></i><span class="wc-share-button-'.$key.'">'.esc_html( $icon_text ).'</span>';
1467
- break;
1468
- }
1469
  $html .= '</a>';
1470
  $html .= '</li>';
1471
  break;
1472
  case 'google' :
1473
  $html .= '<li class="wc-shortcodes-share-button-icon wc-shortcode-share-button-icon-' . $key . $first_class . '">';
1474
  $html .='<a target="_blank" href="https://plus.google.com/share?url='.get_permalink().'">';
1475
- switch ( $format ) {
1476
- case 'image' :
1477
- $html .= '<img src="'.esc_url( $icon_url ).'" alt="'.esc_attr( $icon_text ).'">';
1478
- break;
1479
- case 'icon' :
1480
- $html .= '<i class="fa '.esc_attr( $icon_class ).'"></i>';
1481
- break;
1482
- default :
1483
- $html .= '<i class="fa '.esc_attr( $icon_class ).'"></i><span class="wc-share-button-'.$key.'">'.esc_html( $icon_text ).'</span>';
1484
- break;
1485
- }
1486
  $html .= '</a>';
1487
  $html .= '</li>';
1488
  break;
@@ -1494,17 +1475,7 @@ class WPC_Shortcodes_Register extends WPC_Shortcodes_Vars {
1494
  else {
1495
  $html .='<a href="#" onclick="javascript:void((function($){w=window.open(\''.get_permalink().'\');$(w).load(function(){setTimeout(function(){w.print();},1000);});})(jQuery));return false;">';
1496
  }
1497
- switch ( $format ) {
1498
- case 'image' :
1499
- $html .= '<img src="'.esc_url( $icon_url ).'" alt="'.esc_attr( $icon_text ).'">';
1500
- break;
1501
- case 'icon' :
1502
- $html .= '<i class="fa '.esc_attr( $icon_class ).'"></i>';
1503
- break;
1504
- default :
1505
- $html .= '<i class="fa '.esc_attr( $icon_class ).'"></i><span class="wc-share-button-'.$key.'">'.esc_html( $icon_text ).'</span>';
1506
- break;
1507
- }
1508
  $html .= '</a>';
1509
  $html .= '</li>';
1510
  break;
@@ -1516,6 +1487,61 @@ class WPC_Shortcodes_Register extends WPC_Shortcodes_Vars {
1516
  return $html;
1517
  }
1518
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1519
  public function get_share_buttons() {
1520
  $html = null;
1521
  $share_buttons = null;
302
  $atts['format'] = get_option( WC_SHORTCODES_PREFIX . 'social_icons_format', 'icon' );
303
  }
304
 
305
+ $show_image = false;
306
+ $show_large_image = false;
307
+ $show_medium_image = false;
308
+ $show_small_image = false;
309
+ switch ( $atts['format'] ) {
310
+ case 'image' :
311
+ $show_large_image = true;
312
+ $show_image = true;
313
+ break;
314
+ case 'medium_image' :
315
+ $show_medium_image = true;
316
+ $show_image = true;
317
+ break;
318
+ case 'small_image' :
319
+ $show_small_image = true;
320
+ $show_image = true;
321
+ break;
322
+ }
323
 
324
  if ( ! is_array( $order ) || empty( $order ) ) {
325
  return;
356
  }
357
 
358
  $link_option_name = WC_SHORTCODES_PREFIX . $key . '_link';
359
+ $small_image_icon_option_name = WC_SHORTCODES_PREFIX . $key . '_small_icon';
360
+ $medium_image_icon_option_name = WC_SHORTCODES_PREFIX . $key . '_medium_icon';
361
+ $large_image_icon_option_name = WC_SHORTCODES_PREFIX . $key . '_icon';
362
  $font_icon_option_name = WC_SHORTCODES_PREFIX . $key . '_font_icon';
363
 
364
  $social_link = get_option( $link_option_name );
366
 
367
  $first_class = $first ? ' first-icon' : '';
368
  $first = false;
369
+ $image_src = '';
370
 
371
  if ( $show_image ) {
372
+ if ( $show_small_image ) {
373
+ $icon_url = get_option( $small_image_icon_option_name );
374
+ $retina_icon_url = get_option( $medium_image_icon_option_name );
375
+ $image_src = 'src="'.esc_url( $icon_url ).'"';
376
+ if ( ! empty( $retina_icon_url ) ) {
377
+ $image_src .= ' srcset="'.esc_url( $icon_url ).' 1x, '.esc_url( $retina_icon_url ).' 2x"';
378
+ }
379
+ }
380
+ else if ( $show_medium_image ) {
381
+ $icon_url = get_option( $medium_image_icon_option_name );
382
+ $retina_icon_url = get_option( $large_image_icon_option_name );
383
+ $image_src = 'src="'.esc_url( $icon_url ).'"';
384
+ if ( ! empty( $retina_icon_url ) ) {
385
+ $image_src .= ' srcset="'.esc_url( $icon_url ).' 1x, '.esc_url( $retina_icon_url ).' 2x"';
386
+ }
387
+ }
388
+ else {
389
+ $icon_url = get_option( $large_image_icon_option_name );
390
+ $image_src = 'src="'.esc_url( $icon_url ).'"';
391
+ }
392
 
393
  $html .= '<li class="wc-shortcodes-social-icon wc-shortcode-social-icon-' . esc_attr( $key . $first_class ) . '">';
394
  $html .='<a target="_blank" href="'.esc_url( $social_link ).'">';
395
+ $html .= '<img '.$image_src.'" alt="'.esc_attr( $name ).'">';
396
  $html .= '</a>';
397
  $html .= '</li>';
398
  }
1428
  $html = '<div class="' . esc_attr( implode( ' ', $classes ) ) . '" style="'.esc_attr( $style_attr ).'">';
1429
  $html .= '<ul class="wc-shortcodes-clearfix">';
1430
  foreach ( $share_buttons as $key => $name ) {
 
 
 
 
 
 
 
 
1431
 
1432
  $first_class = $first ? ' first-share-button' : '';
1433
 
1435
  case 'pinterest' :
1436
  $html .= '<li class="wc-shortcodes-share-button-icon wc-shortcode-share-button-icon-' . $key . $first_class . '">';
1437
  $html .='<a href="javascript:void((function()%7Bvar%20e=document.createElement(&apos;script&apos;);e.setAttribute(&apos;type&apos;,&apos;text/javascript&apos;);e.setAttribute(&apos;charset&apos;,&apos;UTF-8&apos;);e.setAttribute(&apos;src&apos;,&apos;https://assets.pinterest.com/js/pinmarklet.js?r=&apos;+Math.random()*99999999);document.body.appendChild(e)%7D)());">';
1438
+ $html .= $this->helper_get_share_icon( $format, $key );
 
 
 
 
 
 
 
 
 
 
1439
  $html .= '</a>';
1440
  $html .= '</li>';
1441
  break;
1442
  case 'facebook' :
1443
  $html .= '<li class="wc-shortcodes-share-button-icon wc-shortcode-share-button-icon-' . $key . $first_class . '">';
1444
  $html .='<a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u='.get_permalink().'&amp;t='.rawurlencode( html_entity_decode( get_the_title(), ENT_QUOTES, $charset ) ).'">';
1445
+ $html .= $this->helper_get_share_icon( $format, $key );
 
 
 
 
 
 
 
 
 
 
1446
  $html .= '</a>';
1447
  $html .= '</li>';
1448
  break;
1449
  case 'twitter' :
1450
  $html .= '<li class="wc-shortcodes-share-button-icon wc-shortcode-share-button-icon-' . $key . $first_class . '">';
1451
  $html .='<a target="_blank" href="https://twitter.com/share?text='.rawurlencode( html_entity_decode( get_the_title(), ENT_QUOTES, $charset ) ).'&amp;url='.get_permalink().'" class="share-button-twitter" data-lang="en">';
1452
+ $html .= $this->helper_get_share_icon( $format, $key );
 
 
 
 
 
 
 
 
 
 
1453
  $html .= '</a>';
1454
  $html .= '</li>';
1455
  break;
1456
  case 'email' :
1457
  $html .= '<li class="wc-shortcodes-share-button-icon wc-shortcode-share-button-icon-' . $key . $first_class . '">';
1458
  $html .='<a title="Share by Email" href="mailto:?subject='.rawurlencode( html_entity_decode( get_the_title(), ENT_QUOTES, $charset ) ).'&amp;body='.get_permalink().'">';
1459
+ $html .= $this->helper_get_share_icon( $format, $key );
 
 
 
 
 
 
 
 
 
 
1460
  $html .= '</a>';
1461
  $html .= '</li>';
1462
  break;
1463
  case 'google' :
1464
  $html .= '<li class="wc-shortcodes-share-button-icon wc-shortcode-share-button-icon-' . $key . $first_class . '">';
1465
  $html .='<a target="_blank" href="https://plus.google.com/share?url='.get_permalink().'">';
1466
+ $html .= $this->helper_get_share_icon( $format, $key );
 
 
 
 
 
 
 
 
 
 
1467
  $html .= '</a>';
1468
  $html .= '</li>';
1469
  break;
1475
  else {
1476
  $html .='<a href="#" onclick="javascript:void((function($){w=window.open(\''.get_permalink().'\');$(w).load(function(){setTimeout(function(){w.print();},1000);});})(jQuery));return false;">';
1477
  }
1478
+ $html .= $this->helper_get_share_icon( $format, $key );
 
 
 
 
 
 
 
 
 
 
1479
  $html .= '</a>';
1480
  $html .= '</li>';
1481
  break;
1487
  return $html;
1488
  }
1489
 
1490
+ private function helper_get_share_icon( $format, $key ) {
1491
+ $small_image_icon_option_name = WC_SHORTCODES_PREFIX . $key . '_small_share_icon';
1492
+ $medium_image_icon_option_name = WC_SHORTCODES_PREFIX . $key . '_medium_share_icon';
1493
+ $large_image_icon_option_name = WC_SHORTCODES_PREFIX . $key . '_share_icon';
1494
+ $icon_option_name = WC_SHORTCODES_PREFIX . $key . '_share_text';
1495
+ $font_icon_option_name = WC_SHORTCODES_PREFIX . $key . '_share_font_icon';
1496
+
1497
+ $html = '';
1498
+
1499
+ switch ( $format ) {
1500
+ case 'small_image' :
1501
+ $icon_text = get_option( $icon_option_name );
1502
+ $icon_url = get_option( $small_image_icon_option_name );
1503
+ $retina_icon_url = get_option( $medium_image_icon_option_name );
1504
+
1505
+ $image_src = 'src="'.esc_url( $icon_url ).'"';
1506
+ if ( ! empty( $retina_icon_url ) ) {
1507
+ $image_src .= ' srcset="'.esc_url( $icon_url ).' 1x, '.esc_url( $retina_icon_url ).' 2x"';
1508
+ }
1509
+ $html = '<img '.$image_src.' alt="'.esc_attr( $icon_text ).'">';
1510
+ break;
1511
+ case 'medium_image' :
1512
+ $icon_text = get_option( $icon_option_name );
1513
+ $icon_url = get_option( $medium_image_icon_option_name );
1514
+ $retina_icon_url = get_option( $large_image_icon_option_name );
1515
+
1516
+ $image_src = 'src="'.esc_url( $icon_url ).'"';
1517
+ if ( ! empty( $retina_icon_url ) ) {
1518
+ $image_src .= ' srcset="'.esc_url( $icon_url ).' 1x, '.esc_url( $retina_icon_url ).' 2x"';
1519
+ }
1520
+ $html = '<img '.$image_src.' alt="'.esc_attr( $icon_text ).'">';
1521
+ break;
1522
+ case 'image' :
1523
+ $icon_text = get_option( $icon_option_name );
1524
+ $icon_url = get_option( $large_image_icon_option_name );
1525
+
1526
+ $image_src = 'src="'.esc_url( $icon_url ).'"';
1527
+ $html = '<img '.$image_src.' alt="'.esc_attr( $icon_text ).'">';
1528
+ break;
1529
+ case 'icon' :
1530
+ $icon_class = get_option( $font_icon_option_name );
1531
+
1532
+ $html = '<i class="fa '.esc_attr( $icon_class ).'"></i>';
1533
+ break;
1534
+ default :
1535
+ $icon_text = get_option( $icon_option_name );
1536
+ $icon_class = get_option( $font_icon_option_name );
1537
+
1538
+ $html = '<i class="fa '.esc_attr( $icon_class ).'"></i><span class="wc-share-button-'.$key.'">'.esc_html( $icon_text ).'</span>';
1539
+ break;
1540
+ }
1541
+
1542
+ return $html;
1543
+ }
1544
+
1545
  public function get_share_buttons() {
1546
  $html = null;
1547
  $share_buttons = null;
public/class-vars.php CHANGED
@@ -8,7 +8,7 @@ class WPC_Shortcodes_Vars {
8
  *
9
  * @var string
10
  */
11
- const VERSION = '3.20';
12
  const DB_VERSION = '1.0';
13
 
14
  /**
@@ -85,51 +85,91 @@ class WPC_Shortcodes_Vars {
85
  'share_buttons_on_archive_page' => false,
86
  'share_buttons_on_product_page' => false,
87
  'facebook_font_icon' => 'fa-facebook',
 
 
88
  'facebook_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/facebook.png',
89
  'twitter_font_icon' => 'fa-twitter',
 
 
90
  'twitter_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/twitter.png',
91
  'pinterest_font_icon' => 'fa-pinterest',
 
 
92
  'pinterest_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/pinterest.png',
93
  'google_font_icon' => 'fa-google-plus',
 
 
94
  'google_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/google.png',
95
  'bloglovin_font_icon' => 'fa-plus-square',
 
 
96
  'bloglovin_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/bloglovin.png',
97
  'email_font_icon' => 'fa-envelope',
 
 
98
  'email_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/email.png',
99
  'flickr_font_icon' => 'fa-flickr',
 
 
100
  'flickr_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/flickr.png',
101
  'instagram_font_icon' => 'fa-instagram',
 
 
102
  'instagram_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/instagram.png',
103
  'rss_font_icon' => 'fa-rss',
 
 
104
  'rss_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/rss.png',
105
  'custom1_font_icon' => 'fa-camera',
 
 
106
  'custom1_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/picasa.png',
107
  'custom2_font_icon' => 'fa-shopping-cart',
 
 
108
  'custom2_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/shopping.png',
109
  'custom3_font_icon' => 'fa-youtube',
 
 
110
  'custom3_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/youtube.png',
111
  'custom4_font_icon' => 'fa-dollar',
 
 
112
  'custom4_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/etsy.png',
113
  'custom5_font_icon' => 'fa-tumblr',
 
 
114
  'custom5_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/tumblr.png',
115
  'share_buttons_format' => 'image',
116
  'pinterest_share_text' => 'Pin it',
117
  'pinterest_share_font_icon' => 'fa-pinterest',
 
 
118
  'pinterest_share_button' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/pinterest.png',
119
  'facebook_share_text' => 'Share',
120
  'facebook_share_font_icon' => 'fa-facebook',
 
 
121
  'facebook_share_button' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/facebook.png',
122
  'twitter_share_text' => 'Tweet',
123
  'twitter_share_font_icon' => 'fa-twitter',
 
 
124
  'twitter_share_button' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/twitter.png',
125
  'google_share_text' => 'Share',
126
  'google_share_font_icon' => 'fa-google-plus',
 
 
127
  'google_share_button' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/google.png',
128
  'email_share_text' => 'Email',
129
  'email_share_font_icon' => 'fa-envelope',
 
 
130
  'email_share_button' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/email.png',
131
  'print_share_text' => 'Print',
132
  'print_share_font_icon' => 'fa-print',
 
 
133
  'print_share_button' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/print.png',
134
  );
135
 
8
  *
9
  * @var string
10
  */
11
+ const VERSION = '3.21';
12
  const DB_VERSION = '1.0';
13
 
14
  /**
85
  'share_buttons_on_archive_page' => false,
86
  'share_buttons_on_product_page' => false,
87
  'facebook_font_icon' => 'fa-facebook',
88
+ 'facebook_small_social_icon' => '',
89
+ 'facebook_medium_social_icon' => '',
90
  'facebook_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/facebook.png',
91
  'twitter_font_icon' => 'fa-twitter',
92
+ 'twitter_small_social_icon' => '',
93
+ 'twitter_medium_social_icon' => '',
94
  'twitter_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/twitter.png',
95
  'pinterest_font_icon' => 'fa-pinterest',
96
+ 'pinterest_small_social_icon' => '',
97
+ 'pinterest_medium_social_icon' => '',
98
  'pinterest_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/pinterest.png',
99
  'google_font_icon' => 'fa-google-plus',
100
+ 'google_small_social_icon' => '',
101
+ 'google_medium_social_icon' => '',
102
  'google_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/google.png',
103
  'bloglovin_font_icon' => 'fa-plus-square',
104
+ 'bloglovin_small_social_icon' => '',
105
+ 'bloglovin_medium_social_icon' => '',
106
  'bloglovin_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/bloglovin.png',
107
  'email_font_icon' => 'fa-envelope',
108
+ 'email_small_social_icon' => '',
109
+ 'email_medium_social_icon' => '',
110
  'email_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/email.png',
111
  'flickr_font_icon' => 'fa-flickr',
112
+ 'flickr_small_social_icon' => '',
113
+ 'flickr_medium_social_icon' => '',
114
  'flickr_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/flickr.png',
115
  'instagram_font_icon' => 'fa-instagram',
116
+ 'instagram_small_social_icon' => '',
117
+ 'instagram_medium_social_icon' => '',
118
  'instagram_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/instagram.png',
119
  'rss_font_icon' => 'fa-rss',
120
+ 'rss_small_social_icon' => '',
121
+ 'rss_medium_social_icon' => '',
122
  'rss_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/rss.png',
123
  'custom1_font_icon' => 'fa-camera',
124
+ 'custom1_small_social_icon' => '',
125
+ 'custom1_medium_social_icon' => '',
126
  'custom1_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/picasa.png',
127
  'custom2_font_icon' => 'fa-shopping-cart',
128
+ 'custom2_small_social_icon' => '',
129
+ 'custom2_medium_social_icon' => '',
130
  'custom2_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/shopping.png',
131
  'custom3_font_icon' => 'fa-youtube',
132
+ 'custom3_small_social_icon' => '',
133
+ 'custom3_medium_social_icon' => '',
134
  'custom3_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/youtube.png',
135
  'custom4_font_icon' => 'fa-dollar',
136
+ 'custom4_small_social_icon' => '',
137
+ 'custom4_medium_social_icon' => '',
138
  'custom4_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/etsy.png',
139
  'custom5_font_icon' => 'fa-tumblr',
140
+ 'custom5_small_social_icon' => '',
141
+ 'custom5_medium_social_icon' => '',
142
  'custom5_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/tumblr.png',
143
  'share_buttons_format' => 'image',
144
  'pinterest_share_text' => 'Pin it',
145
  'pinterest_share_font_icon' => 'fa-pinterest',
146
+ 'pinterest_small_share_button' => '',
147
+ 'pinterest_medium_share_button' => '',
148
  'pinterest_share_button' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/pinterest.png',
149
  'facebook_share_text' => 'Share',
150
  'facebook_share_font_icon' => 'fa-facebook',
151
+ 'facebook_small_share_button' => '',
152
+ 'facebook_medium_share_button' => '',
153
  'facebook_share_button' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/facebook.png',
154
  'twitter_share_text' => 'Tweet',
155
  'twitter_share_font_icon' => 'fa-twitter',
156
+ 'twitter_small_share_button' => '',
157
+ 'twitter_medium_share_button' => '',
158
  'twitter_share_button' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/twitter.png',
159
  'google_share_text' => 'Share',
160
  'google_share_font_icon' => 'fa-google-plus',
161
+ 'google_small_share_button' => '',
162
+ 'google_medium_share_button' => '',
163
  'google_share_button' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/google.png',
164
  'email_share_text' => 'Email',
165
  'email_share_font_icon' => 'fa-envelope',
166
+ 'email_small_share_button' => '',
167
+ 'email_medium_share_button' => '',
168
  'email_share_button' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/email.png',
169
  'print_share_text' => 'Print',
170
  'print_share_font_icon' => 'fa-print',
171
+ 'print_small_share_button' => '',
172
+ 'print_medium_share_button' => '',
173
  'print_share_button' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/print.png',
174
  );
175
 
public/class-widget-options.php CHANGED
@@ -259,7 +259,9 @@ class WPC_Shortcodes_Widget_Options {
259
  return array(
260
  'default' => 'Default',
261
  'icon' => 'Icon',
262
- 'image' => 'Image',
 
 
263
  );
264
  }
265
 
@@ -299,6 +301,7 @@ class WPC_Shortcodes_Widget_Options {
299
 
300
  public static function social_icons_max_height_values() {
301
  return array(
 
302
  '10' => '10',
303
  '12' => '12',
304
  '14' => '14',
259
  return array(
260
  'default' => 'Default',
261
  'icon' => 'Icon',
262
+ 'small_image' => 'Small Image',
263
+ 'medium_image' => 'Medium Image',
264
+ 'image' => 'Large Image',
265
  );
266
  }
267
 
301
 
302
  public static function social_icons_max_height_values() {
303
  return array(
304
+ '' => 'Default',
305
  '10' => '10',
306
  '12' => '12',
307
  '14' => '14',
public/widgets/widget-social-icons.php CHANGED
@@ -6,7 +6,7 @@
6
  class WPC_Shortcodes_Widget_Social_Icons extends WP_Widget {
7
  function __construct() {
8
  $widget_ops = array( 'description' => __('Add your social icons to your sidebar.') );
9
- parent::__construct( 'wc_shortcodes_social_icons', __('WP Canvas - Social Media Icons'), $widget_ops );
10
  }
11
 
12
  function widget($args, $instance) {
6
  class WPC_Shortcodes_Widget_Social_Icons extends WP_Widget {
7
  function __construct() {
8
  $widget_ops = array( 'description' => __('Add your social icons to your sidebar.') );
9
+ parent::__construct( 'wc_shortcodes_social_icons', __('Angie Makes - Social Media Icons'), $widget_ops );
10
  }
11
 
12
  function widget($args, $instance) {
readme.txt CHANGED
@@ -113,6 +113,10 @@ See our help article on [how to manually upload a plugin](http://knowledgebase.a
113
 
114
  == Changelog ==
115
 
 
 
 
 
116
  = Version 3.20 =
117
 
118
  * Removed extra closing tag
113
 
114
  == Changelog ==
115
 
116
+ = Version 3.21 =
117
+
118
+ * Added retina support for social and share icon images.
119
+
120
  = Version 3.20 =
121
 
122
  * Removed extra closing tag
wc-shortcodes.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://angiemakes.com/feminine-wordpress-blog-themes-women/
5
  Description: A plugin that adds a useful family of shortcodes to your WordPress theme.
6
  Author: Chris Baldelomar
7
  Author URI: http://angiemakes.com/
8
- Version: 3.20
9
  License: GPLv2 or later
10
  */
11
 
5
  Description: A plugin that adds a useful family of shortcodes to your WordPress theme.
6
  Author: Chris Baldelomar
7
  Author URI: http://angiemakes.com/
8
+ Version: 3.21
9
  License: GPLv2 or later
10
  */
11