WordPress Social Sharing Plugin – Social Warfare - Version 3.0.6

Version Description

Download this release

Release Info

Developer WarfarePlugins
Plugin Icon 128x128 WordPress Social Sharing Plugin – Social Warfare
Version 3.0.6
Comparing to
See all releases

Code changes from version 3.0.5 to 3.0.6

css/admin-options.min.css CHANGED
@@ -1,5 +1,5 @@
1
- border: rgb(221, 221, 221);
2
- box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
3
- height: 120px;
4
- width: 97%
5
  __ESCAPED_SOURCE_END_CLEAN_CSS__
1
+ border: rgb(221, 221, 221);
2
+ box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
3
+ height: 120px;
4
+ width: 97%
5
  __ESCAPED_SOURCE_END_CLEAN_CSS__
css/style.css CHANGED
@@ -1118,7 +1118,7 @@ body .swp_social_panel.swp_other_color_outlines:hover .swp_flipboard {
1118
  width: 100%;
1119
  }
1120
 
1121
- .swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_hide .iconFiller {
1122
  display: block;
1123
  float: none;
1124
  margin: 0 auto;
@@ -1129,7 +1129,7 @@ body .swp_social_panel.swp_other_color_outlines:hover .swp_flipboard {
1129
  width: 150px;
1130
  }
1131
 
1132
- .swp_social_panelSide .nc_tweetContainer:not(.total_shares):hover .iconFiller,
1133
  .swp_social_panelSide .nc_tweetContainer:not(.total_shares) .spaceManWilly {
1134
  width: 90px;
1135
  }
1118
  width: 100%;
1119
  }
1120
 
1121
+ .swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_count.swp_hide .iconFiller {
1122
  display: block;
1123
  float: none;
1124
  margin: 0 auto;
1129
  width: 150px;
1130
  }
1131
 
1132
+ .swp_social_panelSide .nc_tweetContainer[data-network]:not(.total_shares):hover .iconFiller,
1133
  .swp_social_panelSide .nc_tweetContainer:not(.total_shares) .spaceManWilly {
1134
  width: 90px;
1135
  }
css/style.min.css CHANGED
@@ -1 +1 @@
1
- .swp_social_panel{clear:both;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;height:34px;line-height:1;margin-bottom:20px!important;margin-top:20px!important;overflow:hidden;padding:0;-webkit-align-items:stretch;align-items:stretch;-webkit-box-align:stretch;-moz-box-align:stretch;-webkit-box-pack:justify;-moz-box-pack:justify;direction:ltr;-ms-flex-align:stretch;-ms-flex-line-pack:center;-ms-flex-pack:justify;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-justify-content:space-between;justify-content:space-between}.swp_social_panel:not(.nc_floater):not(.swp_social_panelSide){width:100%!important}.nc_wrapper .swp_social_panel{margin-bottom:10px!important;margin-top:10px!important}div.swp_social_panel .nc_tweetContainer{-webkit-border-radius:2px;border-radius:2px;cursor:pointer;float:left;font-family:Lato;height:32px;margin:0 5px 3px;min-width:34px;overflow:hidden;text-align:center;-webkit-transition:all .1s linear;transition:all .1s linear}div.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.swp_social_panel .nc_tweetContainer a.nc_tweet,.swp_social_panel .total_shares .swp_count{display:block;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;font-family:Lato,sans-serif;font-size:18px!important;font-weight:700;height:30px;text-decoration:none;text-decoration:none!important;text-transform:none;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap}.swp_social_panel:not(.nc_floater):not(.swp_social_panelSide).swp_shift{padding:0 10px}.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:nth-child(1){margin-left:0}.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:nth-last-child(1){margin-right:0}.swp_social_panel a .swp_count:not(.swp_hide){display:inline-block;line-height:32px;margin:0;padding:0 5px;-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.swp_social_panel .total_shares .swp_count,span.swp_share{line-height:30px}.swp_social_panel a .swp_count.swp_hide{margin:0 auto}.swp_social_panel span:before{content:initial!important}.swp_social_panel span.swp_count{font-size:14px}.swp_social_panel span.iconFiller{font-size:18px;margin:0 auto}.swp_social_panel.notMobile .nc_tweetContainer:nth-child(1){margin-left:0}.swp_social_panel:not(.swp_social_panelSide){-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.swp_social_panel:not(.swp_social_panelSide) div.total_shares.total_sharesalt:nth-child(1){margin-left:0;margin-right:15px;padding-left:0}.swp_social_panel:not(.swp_social_panelSide) div.total_shares.total_sharesalt:nth-last-child(1){margin-right:0;padding-right:0}a.swp_CTT{cursor:pointer}span.swp_share{display:block;float:right;float:left;font-size:14px;font-weight:400;height:30px;margin:0 0 0 6px;max-width:none!important;vertical-align:middle}.swp_social_panelSide span.swp_share{margin:0}.swp_social_panel .sw{float:left;height:30px;line-height:32px;margin:0 5px;text-shadow:none!important;width:20px}.iconFiller{display:block;float:left;height:30px;overflow:hidden;-webkit-transition:width .1s linear;transition:width .1s linear}.swp_social_panel .iconFiller{width:30px}span.spaceManWilly{display:block;width:120px}.swp_social_panel .total_shares{background:#c4c4c4;border:1px solid #e08a0f;-webkit-border-radius:2px;border-radius:2px;color:#fff;cursor:default;display:block;font-size:19px;padding:0 10px;-webkit-box-flex:0!important;-moz-box-flex:0!important;-webkit-flex:none!important;-ms-flex:none!important;flex:none!important}.swp_social_panel div.total_shares.total_sharesalt,.swp_social_panel:hover div.total_shares.total_sharesalt:not(:nth-child(1)){background:0 0!important;border:none;color:#474b4d;margin-left:0!important}div.swp_social_panel:hover div.total_shares.total_sharesalt:not(:nth-child(1)){background:0 0;color:#474b4d;margin-left:10px}.swp_social_panel .total_shares.total_sharesalt .swp_label{color:#474b4d;font-size:10px;letter-spacing:0;min-width:40px;vertical-align:middle}.swp_social_panel .total_shares .swp_label{font-size:10px;vertical-align:middle}.swp_social_panel .total_shares.total_sharesalt .swp_count{color:#474b4d;font-size:24px}.swp_social_panel.swp_customFull:hover div.total_shares,.swp_social_panel.swp_fade .total_shares,.swp_social_panel.swp_full_color .total_shares,.swp_social_panel:hover .total_shares{background:#e08a0f}.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer.total_shares.total_sharesalt:before{content:"o";display:inline-block;font-family:sw-icon-font;margin-top:7px;vertical-align:top}.swp_social_panel:not(.swp_social_panelSide) .total_shares.total_sharesalt .swp_count{display:inline-block;line-height:0;margin-left:8px;margin-top:12px;min-width:45px;position:relative;vertical-align:middle}span.swp_label{display:block;font-size:9px!important;margin-top:13px;position:absolute;text-align:center!important;text-transform:uppercase}.swp_social_panelSide span.swp_label{margin-top:0}.swp_social_panel.swp_leaf .nc_tweetContainer{-webkit-border-radius:15px 0!important;border-radius:15px 0!important;border-width:1px}.swp_social_panel.swp_pill .nc_tweetContainer{-webkit-border-radius:50px;border-radius:50px;border-width:1px}.swp_social_panel.swp_shift .nc_tweetContainer:not(.total_shares){border-width:1px;-moz-transform:skew(-25deg);-o-transform:skew(-25deg);-webkit-transform:skew(-25deg)}.swp_social_panel.swp_shift .nc_tweetContainer a{-moz-transform:skew(25deg);-o-transform:skew(25deg);-webkit-transform:skew(25deg)}.swp_connected .nc_tweetContainer,.swp_connected .nc_tweetContainer:hover,.swp_connected:hover .nc_tweetContainer{-webkit-border-radius:0!important;border-radius:0!important;border-width:1px;margin:0!important}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_google_plus,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_google_plus:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_google_plus:hover{border:1px solid #df4b37}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_twitter,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_twitter:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_twitter:hover{border:1px solid #429cd6}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_facebook,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_facebook:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_facebook:hover{border:1px solid #3a589e}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_pinterest,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_pinterest:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_pinterest:hover{border:1px solid #cd2029}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_linkedin,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_linkedin:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_linkedin:hover{border:1px solid #0d77b7}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_tumblr,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_tumblr:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_tumblr:hover{border:1px solid #39475d}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_stumbleupon,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_stumbleupon:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_stumbleupon:hover{border:1px solid #ef5025}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_yummly,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_yummly:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_yummly:hover{border:1px solid #e26426}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_reddit,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_reddit:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_reddit:hover{border:1px solid #f04b23}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_email,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_email:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_email:hover{border:1px solid #6bcce9}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_whatsapp,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_whatsapp:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_whatsapp:hover{border:1px solid #71c169}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_pocket,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_pocket:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_pocket:hover{border:1px solid #ef4056}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_buffer,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_buffer:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_buffer:hover{border:1px solid #323b43}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_hacker_news,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_hacker_news:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_hacker_news:hover{border:1px solid #d85623}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_flipboard,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_flipboard:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_flipboard:hover{border:1px solid #bf2626}.swp_social_panel.swp_default_full_color .swp_google_plus,body .swp_social_panel.swp_other_full_color:hover .swp_google_plus,html body .swp_social_panel.swp_individual_full_color .swp_google_plus:hover{background:#df4b37;border:1px solid #c44133}.swp_social_panel.swp_default_full_color .swp_twitter,body .swp_social_panel.swp_other_full_color:hover .swp_twitter,html body .swp_social_panel.swp_individual_full_color .swp_twitter:hover{background:#429cd6;border:1px solid #3c87b2}.swp_social_panel.swp_default_full_color .swp_facebook,body .swp_social_panel.swp_other_full_color:hover .swp_facebook,html body .swp_social_panel.swp_individual_full_color .swp_facebook:hover{background:#3a589e;border:1px solid #2e4675}.swp_social_panel.swp_default_full_color .swp_pinterest,body .swp_social_panel.swp_other_full_color:hover .swp_pinterest,html body .swp_social_panel.swp_individual_full_color .swp_pinterest:hover{background:#cd2029;border:1px solid #aa1b29}.swp_social_panel.swp_default_full_color .swp_linkedin,body .swp_social_panel.swp_other_full_color:hover .swp_linkedin,html body .swp_social_panel.swp_individual_full_color .swp_linkedin:hover{background:#0d77b7;border:1px solid #0c6591}.swp_social_panel.swp_default_full_color .swp_tumblr,body .swp_social_panel.swp_other_full_color:hover .swp_tumblr,html body .swp_social_panel.swp_individual_full_color .swp_tumblr:hover{background:#39475d;border:1px solid #27313f}.swp_social_panel.swp_default_full_color .swp_stumbleupon,body .swp_social_panel.swp_other_full_color:hover .swp_stumbleupon,html body .swp_social_panel.swp_individual_full_color .swp_stumbleupon:hover{background:#ef5025;border:1px solid #d34427}.swp_social_panel.swp_default_full_color .swp_yummly,body .swp_social_panel.swp_other_full_color:hover .swp_yummly,html body .swp_social_panel.swp_individual_full_color .swp_yummly:hover{background:#e26426;border:1px solid #b65027}.swp_social_panel.swp_default_full_color .swp_reddit,body .swp_social_panel.swp_other_full_color:hover .swp_reddit,html body .swp_social_panel.swp_individual_full_color .swp_reddit:hover{background:#f04b23;border:1px solid #d33f27}.swp_social_panel.swp_default_full_color .swp_email,body .swp_social_panel.swp_other_full_color:hover .swp_email,html body .swp_social_panel.swp_individual_full_color .swp_email:hover{background:#6bcce9;border:1px solid #61bace}.swp_social_panel.swp_default_full_color .swp_whatsapp,body .swp_social_panel.swp_other_full_color:hover .swp_whatsapp,html body .swp_social_panel.swp_individual_full_color .swp_whatsapp:hover{background:#71c169;border:1px solid #28b04b}.swp_social_panel.swp_default_full_color .swp_pocket,body .swp_social_panel.swp_other_full_color:hover .swp_pocket,html body .swp_social_panel.swp_individual_full_color .swp_pocket:hover{background:#ef4056;border:1px solid #ce3d55}.swp_social_panel.swp_default_full_color .swp_buffer,body .swp_social_panel.swp_other_full_color:hover .swp_buffer,html body .swp_social_panel.swp_individual_full_color .swp_buffer:hover{background:#323b43;border:1px solid #000}.swp_social_panel.swp_default_full_color .swp_hacker_news,body .swp_social_panel.swp_other_full_color:hover .swp_hacker_news,html body .swp_social_panel.swp_individual_full_color .swp_hacker_news:hover{background:#f16522;border:1px solid #d85623}.swp_social_panel.swp_default_full_color .swp_flipboard,body .swp_social_panel.swp_other_full_color:hover .swp_flipboard,html body .swp_social_panel.swp_individual_full_color .swp_flipboard:hover{background:#e02828;border:1px solid #bf2626}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_google_plus,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_google_plus,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_google_plus:hover{border-bottom:3px solid #c44133}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_twitter,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_twitter,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_twitter:hover{border-bottom:3px solid #5595bc}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_facebook,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_facebook,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_facebook:hover{border-bottom:3px solid #2e4675}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_pinterest,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_pinterest,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_pinterest:hover{border-bottom:3px solid #aa1b29}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_linkedin,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_linkedin,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_linkedin:hover{border-bottom:3px solid #0c6591}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_tumblr,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_tumblr,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_tumblr:hover{border-bottom:3px solid #27313f}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_stumbleupon,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_stumbleupon,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_stumbleupon:hover{border-bottom:3px solid #d34427}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_yummly,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_yummly,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_yummly:hover{border-bottom:3px solid #b65027}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_reddit,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_reddit,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_reddit:hover{border-bottom:3px solid #d33f27}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_email,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_email,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_email:hover{border-bottom:3px solid #61bace}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_whatsapp,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_whatsapp,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_whatsapp:hover{border-bottom:3px solid #28b04b}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_pocket,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_pocket,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_pocket:hover{border-bottom:3px solid #ce3d55}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_buffer,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_buffer,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_buffer:hover{border-bottom:3px solid #000}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_hacker_news,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_hacker_news,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_hacker_news:hover{border-bottom:3px solid #d85623}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_flipboard,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_flipboard,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_flipboard:hover{border-bottom:3px solid #bf2626}.swp_social_panel.swp_default_light_gray .nc_tweetContainer,body .swp_social_panel.swp_other_light_gray:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_light_gray .nc_tweetContainer:hover{background-color:#ccc;border:1px solid #ccc}.swp_social_panel.swp_three_dee.swp_default_light_gray .nc_tweetContainer:not(.total_sharesalt),body .swp_social_panel.swp_three_dee.swp_other_light_gray:hover .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_light_gray .nc_tweetContainer:not(.total_sharesalt):hover{border-bottom:3px solid #999}.swp_social_panel.swp_default_medium_gray .nc_tweetContainer,body .swp_social_panel.swp_other_medium_gray:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_medium_gray .nc_tweetContainer:hover{background-color:#999;border:1px solid #999}.swp_social_panel.swp_three_dee.swp_default_medium_gray .nc_tweetContainer:not(.total_sharesalt),body .swp_social_panel.swp_three_dee.swp_other_medium_gray:hover .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_medium_gray .nc_tweetContainer:not(.total_sharesalt):hover{border-bottom:3px solid #444}.swp_social_panel.swp_default_dark_gray .nc_tweetContainer,body .swp_social_panel.swp_other_dark_gray:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_dark_gray .nc_tweetContainer:hover{background-color:#444;border:1px solid #444}.swp_social_panel.swp_three_dee.swp_default_dark_gray .nc_tweetContainer:not(.total_sharesalt),body .swp_social_panel.swp_three_dee.swp_other_dark_gray:hover .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_dark_gray .nc_tweetContainer:not(.total_sharesalt):hover{border-bottom:3px solid #222}.swp_social_panel.swp_default_light_gray_outlines a,body .swp_social_panel.swp_other_light_gray_outlines:hover a,html body .swp_social_panel.swp_individual_light_gray_outlines a:hover{color:#ccc}.swp_social_panel.swp_default_light_gray_outlines .nc_tweetContainer,body .swp_social_panel.swp_other_light_gray_outlines:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_light_gray_outlines .nc_tweetContainer:hover{background:0 0;border:1px solid #ccc}.swp_social_panel.swp_default_medium_gray_outlines a,body .swp_social_panel.swp_other_medium_gray_outlines:hover a,html body .swp_social_panel.swp_individual_medium_gray_outlines a:hover{color:#999}.swp_social_panel.swp_default_medium_gray_outlines .nc_tweetContainer,body .swp_social_panel.swp_other_medium_gray_outlines:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_medium_gray_outlines .nc_tweetContainer:hover{background:0 0;border:1px solid #999}.swp_social_panel.swp_default_dark_gray_outlines a,body .swp_social_panel.swp_other_dark_gray_outlines:hover a,html body .swp_social_panel.swp_individual_dark_gray_outlines a:hover{color:#444}.swp_social_panel.swp_default_dark_gray_outlines .nc_tweetContainer,body .swp_social_panel.swp_other_dark_gray_outlines:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_dark_gray_outlines .nc_tweetContainer:hover{background:0 0;border:1px solid #444}.swp_social_panel.swp_default_color_outlines .swp_google_plus a,body .swp_social_panel.swp_other_color_outlines:hover .swp_google_plus a,html body .swp_social_panel.swp_individual_color_outlines .swp_google_plus a:hover{color:#df4b37}.swp_social_panel.swp_default_color_outlines .swp_facebook a,body .swp_social_panel.swp_other_color_outlines:hover .swp_facebook a,html body .swp_social_panel.swp_individual_color_outlines .swp_facebook a:hover{color:#3a589e}.swp_social_panel.swp_default_color_outlines .swp_pinterest a,body .swp_social_panel.swp_other_color_outlines:hover .swp_pinterest a,html body .swp_social_panel.swp_individual_color_outlines .swp_pinterest a:hover{color:#cd2029}.swp_social_panel.swp_default_color_outlines .swp_linkedin a,body .swp_social_panel.swp_other_color_outlines:hover .swp_linkedin a,html body .swp_social_panel.swp_individual_color_outlines .swp_linkedin a:hover{color:#0d77b7}.swp_social_panel.swp_default_color_outlines .swp_tumblr a,body .swp_social_panel.swp_other_color_outlines:hover .swp_tumblr a,html body .swp_social_panel.swp_individual_color_outlines .swp_tumblr a:hover{color:#39475d}.swp_social_panel.swp_default_color_outlines .swp_stumbleupon a,body .swp_social_panel.swp_other_color_outlines:hover .swp_stumbleupon a,html body .swp_social_panel.swp_individual_color_outlines .swp_stumbleupon a:hover{color:#ef5025}.swp_social_panel.swp_default_color_outlines .swp_yummly a,body .swp_social_panel.swp_other_color_outlines:hover .swp_yummly a,html body .swp_social_panel.swp_individual_color_outlines .swp_yummly a:hover{color:#e26426}.swp_social_panel.swp_default_color_outlines .swp_whatsapp a,body .swp_social_panel.swp_other_color_outlines:hover .swp_whatsapp a,html body .swp_social_panel.swp_individual_color_outlines .swp_whatsapp a:hover{color:#71c169}.swp_social_panel.swp_default_color_outlines .swp_pocket a,body .swp_social_panel.swp_other_color_outlines:hover .swp_pocket a,html body .swp_social_panel.swp_individual_color_outlines .swp_pocket a:hover{color:#ef4056}.swp_social_panel.swp_default_color_outlines .swp_reddit a,body .swp_social_panel.swp_other_color_outlines:hover .swp_reddit a,html body .swp_social_panel.swp_individual_color_outlines .swp_reddit a:hover{color:#f04b23}.swp_social_panel.swp_default_color_outlines .swp_email a,body .swp_social_panel.swp_other_color_outlines:hover .swp_email a,html body .swp_social_panel.swp_individual_color_outlines .swp_email a:hover{color:#6bcce9}.swp_social_panel.swp_default_color_outlines .swp_buffer a,body .swp_social_panel.swp_other_color_outlines:hover .swp_buffer a,html body .swp_social_panel.swp_individual_color_outlines .swp_buffer a:hover{color:#323b43}.swp_social_panel.swp_default_color_outlines .swp_hacker_news a,body .swp_social_panel.swp_other_color_outlines:hover .swp_hacker_news a,html body .swp_social_panel.swp_individual_color_outlines .swp_hacker_news a:hover{color:#f16522}.swp_social_panel.swp_default_color_outlines .swp_flipboard a,body .swp_social_panel.swp_other_color_outlines:hover .swp_flipboard a,html body .swp_social_panel.swp_individual_color_outlines .swp_flipboard a:hover{color:#e02828}.swp_social_panel.swp_default_color_outlines .swp_google_plus,body .swp_social_panel.swp_other_color_outlines:hover .swp_google_plus,html body .swp_social_panel.swp_individual_color_outlines .swp_google_plus:hover{background:0 0;border:1px solid #df4b37}.swp_social_panel.swp_default_color_outlines .swp_twitter,body .swp_social_panel.swp_other_color_outlines:hover .swp_twitter,html body .swp_social_panel.swp_individual_color_outlines .swp_twitter:hover{background:0 0;border:1px solid #429cd6}.swp_social_panel.swp_default_color_outlines .swp_facebook,body .swp_social_panel.swp_other_color_outlines:hover .swp_facebook,html body .swp_social_panel.swp_individual_color_outlines .swp_facebook:hover{background:0 0;border:1px solid #3a589e}.swp_social_panel.swp_default_color_outlines .swp_pinterest,body .swp_social_panel.swp_other_color_outlines:hover .swp_pinterest,html body .swp_social_panel.swp_individual_color_outlines .swp_pinterest:hover{background:0 0;border:1px solid #cd2029}.swp_social_panel.swp_default_color_outlines .swp_linkedin,body .swp_social_panel.swp_other_color_outlines:hover .swp_linkedin,html body .swp_social_panel.swp_individual_color_outlines .swp_linkedin:hover{background:0 0;border:1px solid #0d77b7}.swp_social_panel.swp_default_color_outlines .swp_tumblr,body .swp_social_panel.swp_other_color_outlines:hover .swp_tumblr,html body .swp_social_panel.swp_individual_color_outlines .swp_tumblr:hover{background:0 0;border:1px solid #39475d}.swp_social_panel.swp_default_color_outlines .swp_stumbleupon,body .swp_social_panel.swp_other_color_outlines:hover .swp_stumbleupon,html body .swp_social_panel.swp_individual_color_outlines .swp_stumbleupon:hover{background:0 0;border:1px solid #ef5025}.swp_social_panel.swp_default_color_outlines .swp_yummly,body .swp_social_panel.swp_other_color_outlines:hover .swp_yummly,html body .swp_social_panel.swp_individual_color_outlines .swp_yummly:hover{background:0 0;border:1px solid #e26426}.swp_social_panel.swp_default_color_outlines .swp_whatsapp,body .swp_social_panel.swp_other_color_outlines:hover .swp_whatsapp,html body .swp_social_panel.swp_individual_color_outlines .swp_whatsapp:hover{background:0 0;border:1px solid #71c169}.swp_social_panel.swp_default_color_outlines .swp_reddit,body .swp_social_panel.swp_other_color_outlines:hover .swp_reddit,html body .swp_social_panel.swp_individual_color_outlines .swp_reddit:hover{background:0 0;border:1px solid #f04b23}.swp_social_panel.swp_default_color_outlines .swp_email,body .swp_social_panel.swp_other_color_outlines:hover .swp_email,html body .swp_social_panel.swp_individual_color_outlines .swp_email:hover{background:0 0;border:1px solid #6bcce9}.swp_social_panel.swp_default_color_outlines .swp_pocket,body .swp_social_panel.swp_other_color_outlines:hover .swp_pocket,html body .swp_social_panel.swp_individual_color_outlines .swp_pocket:hover{background:0 0;border:1px solid #ef4056}.swp_social_panel.swp_default_color_outlines .swp_buffer,body .swp_social_panel.swp_other_color_outlines:hover .swp_buffer,html body .swp_social_panel.swp_individual_color_outlines .swp_buffer:hover{background:0 0;border:1px solid #323b43}.swp_social_panel.swp_default_color_outlines .swp_hacker_news,body .swp_social_panel.swp_other_color_outlines:hover .swp_hacker_news,html body .swp_social_panel.swp_individual_color_outlines .swp_hacker_news:hover{background:0 0;border:1px solid #f16522}.swp_social_panel.swp_default_color_outlines .swp_flipboard,body .swp_social_panel.swp_other_color_outlines:hover .swp_flipboard,html body .swp_social_panel.swp_individual_color_outlines .swp_flipboard:hover{background:0 0;border:1px solid #bf2626}.swp_social_panelSide{flex-direction:column;height:auto;overflow:visible;-webkit-transition:all .2s linear;transition:all .2s linear;width:100px!important;z-index:9999999;margin:10px 5px!important;padding:0;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column}.swp_social_panelSide.fade,.swp_social_panelSide.slide{position:fixed;-webkit-transition:all .2s linear;transition:all .2s linear}.swp_social_panelSide.fade{display:none}.swp_social_panelSide.fade.swp_float_left{left:5px}.swp_social_panelSide.fade.swp_float_right{right:5px}.swp_social_panelSide[class*=swp_side]{height:100vh;display:flex;position:fixed;padding:30px 0;top:0}.swp_social_panelSide.swp_float_right{align-content:flex-end}.swp_social_panelSide.swp_side_top{justify-content:flex-start}.swp_social_panelSide.swp_side_bottom{justify-content:flex-end}.swp_social_panelSide.swp_side_center{justify-content:center}.swp_social_panelSide .nc_tweetContainer{background:#dd4b38;-webkit-border-radius:3px;border-radius:3px;clear:both;display:block;font-family:Lato,sans-serif;height:32px;margin:3px 0!important;overflow:hidden;padding:0;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:top;width:90px}.swp_social_panelSide .nc_tweetContainer .iconFiller{display:inline-block;height:40px;margin:0 6px;padding:0;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:middle;width:21px}.swp_social_panelSide .nc_tweetContainer .swp_count{display:inline-block;font-size:14px;height:32px;line-height:16px;margin:0;overflow:hidden;padding:0;text-align:right;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:top;width:0}.swp_social_panelSide .nc_tweetContainer a{cursor:pointer;display:block;font-weight:500;height:36px;margin:0;padding:0;text-decoration:none;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:top}.swp_social_panelSide .nc_tweetContainer .sw,.swp_social_panelSide .nc_tweetContainer .swp_share{float:left;line-height:34px}.swp_social_panelSide.swp_default .nc_tweetContainer .sw{line-height:32px}.swp_social_panelSide.swp_default .nc_tweetContainer .swp_share{line-height:30px}.swp_social_panelSide .nc_tweetContainer .swp_share{font-size:13px}.swp_social_panelSide .nc_tweetContainer:hover,.swp_social_panelSide .nc_tweetContainer:hover .iconFiller,.swp_social_panelSide .nc_tweetContainer:hover .swp_count{-webkit-transition:all .1s linear;transition:all .1s linear}.swp_social_panelSide.swp_boxed .nc_tweetContainer,.swp_social_panelSide.swp_circles .nc_tweetContainer{margin-bottom:5px;width:67.5px!important}.swp_social_panelSide.swp_boxed .nc_tweetContainer,.swp_social_panelSide.swp_boxed .nc_tweetContainer a,.swp_social_panelSide.swp_circles .nc_tweetContainer,.swp_social_panelSide.swp_circles .nc_tweetContainer a{width:67.5px;height:67.5px;position:relative}.swp_social_panelSide.swp_circles .nc_tweetContainer,.swp_social_panelSide.swp_circles .nc_tweetContainer a{border-radius:50%!important}.swp_social_panelSide.swp_boxed .nc_tweetContainer i.sw,.swp_social_panelSide.swp_circles .nc_tweetContainer i.sw{font-size:27px;height:40px;margin:0;padding-top:10px;text-align:center;width:100%}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_share,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_share{height:35px;opacity:0;position:absolute;bottom:0;left:0;text-align:center;width:67.5px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_count,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_count{height:35px;margin:0;padding:0;position:absolute;bottom:0;left:0;text-align:center;-webkit-transition:padding .1s linear;transition:padding .1s linear;width:100%}.swp_social_panelSide.swp_boxed .nc_tweetContainer span.swp_hide .iconFiller,.swp_social_panelSide.swp_boxed .nc_tweetContainer span.swp_hide .spaceManWilly,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_count.swp_hide,.swp_social_panelSide.swp_circles .nc_tweetContainer span.swp_hide .iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer span.swp_hide .spaceManWilly,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_count.swp_hide{height:67.5px;opacity:1}.swp_social_panelSide.swp_boxed .nc_tweetContainer span.iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer span.iconFiller{height:40px;width:67.5px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover span.swp_count:not(.swp_hide),.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover span.swp_count:not(.swp_hide){opacity:0}.swp_social_panelSide.swp_boxed .total_shares,.swp_social_panelSide.swp_circles .total_shares{padding:0;width:67.5px!important}.swp_social_panelSide .nc_tweetContainer:not(.total_shares){line-height:34px}.swp_social_panelSide:not(.swp_boxed):not(.swp_circles) .nc_tweetContainer:not(.total_shares) .iconFiller{margin-left:2px;width:30px}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_count{padding:0 8px;width:48px}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_count.swp_hide{padding:0;width:100%}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_hide .iconFiller{display:block;float:none;margin:0 auto}.swp_social_panelSide:not(.swp_boxed):not(.swp_circles) .nc_tweetContainer:not(.total_shares):hover{width:150px}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide .nc_tweetContainer:not(.total_shares):hover .iconFiller{width:90px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover .iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover .iconFiller{width:100%}.swp_social_panelSide .nc_tweetContainer.total_shares{background:rgba(0,0,0,0);border:0!important;font-weight:800;height:45px;margin:0;padding:0;text-align:center;width:90px;order:-100}.swp_social_panelSide .nc_tweetContainer.total_shares .swp_count{color:#444;display:block;font-family:Lato,sans-serif;height:28px;text-align:center;width:100%}.swp_social_panelSide .nc_tweetContainer.total_shares .swp_label{color:#444;display:block;font-family:Lato,sans-serif;font-size:50%;position:relative;text-align:center;width:100%}.nc_wrapper{background:#fff;position:fixed;-webkit-transition:top .5s bottom .5s;transition:top .5s bottom .5s;width:100%;z-index:99999}.nc_wrapper.bottom{bottom:0;left:0}.nc_wrapper.top{top:0;left:0}.nc_floater{margin:10px 0;position:relative;left:304px;width:740px}.swp_social_panelSide.hideCounts a{text-align:center}.swp_social_panelSide.hideCounts .iconFiller{float:none;text-align:left}.sw{display:inline-block;font-family:sw-icon-font!important;font-size:inherit;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-style:normal;font-weight:400;text-rendering:auto;text-transform:none!important;-ms-transform:translate(0,0);-webkit-transform:translate(0,0);transform:translate(0,0)}.sw:before{display:block!important}.wp-editor-container .sw:before{font-size:18px;line-height:22px}.wp-editor-container .sw-social-warfare:before{color:#ee464f}.mce-container .sw-social-warfare{color:#ee464f;font-size:20px;margin-right:15px;vertical-align:middle}i.swp_google_plus_icon:before{content:"h"}i.swp_pinterest_icon:before{content:"b"}i.swp_twitter_icon:before{content:"s"}i.swp_facebook_icon:before{content:"j"}i.swp_linkedin_icon:before{content:"f"}i.swp_tumblr_icon:before{content:"r"}i.swp_stumbleupon_icon:before{content:"q"}i.swp_reddit_icon:before{content:"a"}i.swp_email_icon:before{content:"k"}i.swp_yummly_icon:before{content:"x"}i.swp_whatsapp_icon:before{content:"y"}i.swp_pocket_icon:before{content:"B"}i.swp_buffer_icon:before{content:"z"}i.swp_hacker_news_icon:before{content:"D"}i.swp_flipboard_icon:before{content:"C"}.sw-social-warfare:before{content:"p"}.sw-click-to-tweet:after,.sw-tweet-clear:after{content:".";height:0;clear:both;visibility:hidden;display:block}.swp_CTT{text-decoration:none!important}.sw-tweet-clear{zoom:1}.sw-click-to-tweet{display:block;margin:15px 0;padding:15px 30px;position:relative}.sw-click-to-tweet:after{line-height:0}.sw-click-to-tweet .sw-ctt-text{margin:0 0 10px;padding:0;position:relative;word-wrap:break-word}a .sw-click-to-tweet .sw-ctt-text{display:block;font-size:24px;font-weight:500;line-height:140%;margin:0;padding:0;position:relative;text-decoration:none;text-transform:none}.sw-click-to-tweet .sw-ctt-btn{display:block;float:right;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:700;line-height:100%;margin:10px 0 0;padding:3px 5px 3px 3px;position:relative;text-decoration:none;text-transform:uppercase}.sw-click-to-tweet i.swp_twitter_icon{float:right;font-size:21px;margin-left:15px!important;margin-top:2px;text-transform:none}a.swp_CTT.style1 .sw-click-to-tweet{background-color:#fff;border:1px solid #ddd;-webkit-border-radius:4px;border-radius:4px}a.swp_CTT.style2 .sw-click-to-tweet{background-color:#fff;border:4px double #ddd;-webkit-border-radius:0;border-radius:0}a.style2 .sw-click-to-tweet .sw-ctt-text{color:#666;font-style:italic;text-decoration:none}a.swp_CTT.style3:hover .sw-click-to-tweet{border-left:10px solid #3c87b2;padding-right:20px;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style3 .sw-click-to-tweet{background-color:#429cd6;border:none;border-left:10px solid #429cd6;-webkit-border-radius:0;border-radius:0;padding-right:20px;-webkit-transition:all .25s linear;transition:all .25s linear}a.style3 .sw-click-to-tweet .sw-ctt-text{color:#fff;font-style:italic;text-decoration:none}a.swp_CTT.style4:hover .sw-click-to-tweet{border-left:10px solid #3c87b2;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style4 .sw-click-to-tweet{background-color:#333;border-left:10px solid #c33;-webkit-border-radius:0;border-radius:0;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style5:hover .sw-click-to-tweet{background-color:#d34250;border-left:10px solid #30394f;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style5 .sw-click-to-tweet{background-color:#30394f;border-left:10px solid #d34250;-webkit-border-radius:0;border-radius:0;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style6:hover .sw-click-to-tweet{background-color:#ced3dc;border-left:10px solid #d34250;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style6 .sw-click-to-tweet{background-color:#eee;border-left:10px solid #d34250;-webkit-border-radius:0;border-radius:0;-webkit-transition:all .25s linear;transition:all .25s linear}a.style6 .sw-click-to-tweet i.swp_twitter{color:#30394f}.swp_pop_thumb{-webkit-border-radius:3px;border-radius:3px;float:left;height:100px;margin:5px 25px 5px 0;width:100px}.swp_popular_post{clear:both}.swp_clearfix:after{clear:both;content:" ";display:block;height:0;visibility:hidden}.swp_popular_post a.swp_popularity{border:none;display:block;line-height:1.5;margin:20px 0}span.swp_pop_count{display:block;font-size:70%}.swp_widget_box{-webkit-border-radius:3px;border-radius:3px}div.sw-pinit{display:table!important;line-height:0;position:relative!important}div.sw-pinit a.sw-pinit-button,div.sw-pinit a.sw-pinit-button:visited{background:#cd2029;border:1px solid #aa1b29;border:0;border-bottom:none;-webkit-border-radius:4px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;color:#fff;font-family:Lato,sans-serif;font-size:20px;font-size:15px;height:32px;line-height:32px;opacity:0;padding:0 20px;position:absolute;text-decoration:none;-webkit-transition:opacity .5s;transition:opacity .5s;z-index:200}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) .swp_hide span.swp_share,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover span.swp_share:not(.swp_hide),.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) .swp_hide span.swp_share,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover span.swp_share:not(.swp_hide),div.sw-pinit:focus a.sw-pinit-button,div.sw-pinit:hover a.sw-pinit-button{opacity:1}div.sw-pinit a.sw-pinit-button::before{color:#fff;content:"b";float:left;font-family:sw-icon-font;font-size:20px;font-weight:400;line-height:36px;margin-left:-5px;margin-right:10px}div.sw-pinit a.sw-pinit-button:hover::before{content:"F"}div.sw-pinit a.sw-pinit-button:focus,div.sw-pinit a.sw-pinit-button:hover{background:#aa1b29;color:#fff;text-decoration:none}div.sw-pinit .sw-pinit-left{left:30px}div.sw-pinit .sw-pinit-center{margin-left:-60px;left:50%}div.sw-pinit .sw-pinit-right{right:30px}div.sw-pinit .sw-pinit-top{top:30px}div.sw-pinit .sw-pinit-middle{margin-top:-25px;top:50%}div.sw-pinit .sw-pinit-bottom{bottom:30px}.mobile .nc_tweetContainer:nth-last-child(2),.nc_tweetContainer.total_shares:nth-last-child(1),.swp_social_panel.notMobile .nc_tweetContainer:nth-last-child(1){margin-right:0}.swp_social_panel.swp_default_dark_gray a,.swp_social_panel.swp_default_full_color a,.swp_social_panel.swp_default_light_gray a,.swp_social_panel.swp_default_medium_gray a,body .swp_social_panel.swp_other_dark_gray:hover a,body .swp_social_panel.swp_other_full_color:hover a,body .swp_social_panel.swp_other_light_gray:hover a,body .swp_social_panel.swp_other_medium_gray:hover a,html body .swp_social_panel.swp_individual_dark_gray a:hover,html body .swp_social_panel.swp_individual_full_color .nc_tweetContainer:hover a,html body .swp_social_panel.swp_individual_light_gray .nc_tweetContainer:hover a,html body .swp_social_panel.swp_individual_medium_gray a:hover{color:#fff}.swp_social_panel.swp_default_color_outlines .swp_twitter a,.wp-editor-container .swp_twitter:before,a.style1 .sw-click-to-tweet i.swp_twitter,a.style2 .sw-click-to-tweet i.swp_twitter,body .swp_social_panel.swp_other_color_outlines:hover .swp_twitter a,html body .swp_social_panel.swp_individual_color_outlines .swp_twitter a:hover{color:#429cd6}.sw-content-locator,.swp_social_panel.mobile .iconFiller~.swp_count{display:none}a.style1 .sw-click-to-tweet .sw-ctt-btn,a.style1 .sw-click-to-tweet .sw-ctt-text{color:#999;text-decoration:none}a.style1:hover .sw-click-to-tweet .sw-ctt-btn,a.style1:hover .sw-click-to-tweet .sw-ctt-text,a.style2 .sw-click-to-tweet .sw-ctt-btn,a.style2:hover .sw-click-to-tweet .sw-ctt-btn,a.style2:hover .sw-click-to-tweet .sw-ctt-text{color:#666;text-decoration:none}a.style3 .sw-click-to-tweet .sw-ctt-btn,a.style3 .sw-click-to-tweet i.swp_twitter,a.style3:hover .sw-click-to-tweet .sw-ctt-btn,a.style3:hover .sw-click-to-tweet .sw-ctt-text,a.style4 .sw-click-to-tweet .sw-ctt-btn,a.style4 .sw-click-to-tweet .sw-ctt-text,a.style4:hover .sw-click-to-tweet .sw-ctt-btn,a.style4:hover .sw-click-to-tweet .sw-ctt-text,a.style5 .sw-click-to-tweet .sw-ctt-btn,a.style5 .sw-click-to-tweet .sw-ctt-text,a.style5:hover .sw-click-to-tweet .sw-ctt-btn,a.style5:hover .sw-click-to-tweet .sw-ctt-text{color:#fff;text-decoration:none}a.style4 .sw-click-to-tweet i.swp_twitter,a.style5 .sw-click-to-tweet i.swp_twitter{color:#fff}a.style6 .sw-click-to-tweet .sw-ctt-btn,a.style6 .sw-click-to-tweet .sw-ctt-text{color:#30394f;text-decoration:none}a.style6:hover .sw-click-to-tweet .sw-ctt-btn,a.style6:hover .sw-click-to-tweet .sw-ctt-text,a.style6:hover .sw-click-to-tweet i.swp_twitter{color:#2a2d34;text-decoration:none}.scale-70{-ms-transform:scale(.7);-webkit-transform:scale(.7);transform:scale(.7)}.swp_social_panel:not(.nc_floater).scale-70.scale-full_width{width:142.8571428571429%!important}.scale-80{-ms-transform:scale(.8);-webkit-transform:scale(.8);transform:scale(.8)}.swp_social_panel:not(.nc_floater).scale-80.scale-full_width{width:125%!important}.scale-90{-ms-transform:scale(.9);-webkit-transform:scale(.9);transform:scale(.9)}.swp_social_panel:not(.nc_floater).scale-90.scale-full_width{width:111.111111111111%!important}.scale-110{-ms-transform:scale(1.1);-webkit-transform:scale(1.1);transform:scale(1.1)}.swp_social_panel:not(.nc_floater).scale-110.scale-full_width{width:90.90909090909091%!important}.scale-120{-ms-transform:scale(1.2);-webkit-transform:scale(1.2);transform:scale(1.2)}.swp_social_panel:not(.nc_floater).scale-120.scale-full_width{width:83.33333333333333%!important}.scale-130{-ms-transform:scale(1.3);-webkit-transform:scale(1.3);transform:scale(1.3)}.swp_social_panel:not(.nc_floater).scale-130.scale-full_width{width:76.92307692307692%!important}.scale-140{-ms-transform:scale(1.4);-webkit-transform:scale(1.4);transform:scale(1.4)}.swp_social_panel:not(.nc_floater).scale-140.scale-full_width{width:71.42857142857143%!important}.nc_floater.scale-center,.nc_floater.scale-right,.scale-full_width,.scale-left{-ms-transform-origin:left;-webkit-transform-origin:left;transform-origin:left}.scale-right{-ms-transform-origin:right;-webkit-transform-origin:right;transform-origin:right}.scale-center{-ms-transform-origin:center;-webkit-transform-origin:center;transform-origin:center}div.swp_social_panel .nc_tweetContainer.swp_emphasize{-webkit-box-flex:2;-moz-box-flex:2;-webkit-flex:2;-ms-flex:2;flex:2}.sw-pinit.aligncenter{margin:0 auto}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){div.sw-pinit{display:inline-block!important;max-width:100%}}.swp_hidden_pin_image{height:0;opacity:0;position:absolute;top:0;width:0}.fl-module-content .uabb-blog-posts .uabb-post-thumbnail .sw-pinit.lazyloaded{display:block!important}@-moz-document url-prefix(){.swp_social_panel .total_shares .swp_label{margin-top:8px}}.swp-content-locator{display:none!important;margin:0!important}.float-position-top-left{transform-origin:top left}.float-position-center-left{transform-origin:center left}.float-position-bottom-left{transform-origin:bottom left}.float-position-top-right{transform-origin:top right}.float-position-center-right{transform-origin:center right}.float-position-bottom-right{transform-origin:bottom right}div[class*=custom_color][class^=_wrapper]{display:none}
1
+ .swp_social_panel{clear:both;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;height:34px;line-height:1;margin-bottom:20px!important;margin-top:20px!important;overflow:hidden;padding:0;-webkit-align-items:stretch;align-items:stretch;-webkit-box-align:stretch;-moz-box-align:stretch;-webkit-box-pack:justify;-moz-box-pack:justify;direction:ltr;-ms-flex-align:stretch;-ms-flex-line-pack:center;-ms-flex-pack:justify;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-justify-content:space-between;justify-content:space-between}.swp_social_panel:not(.nc_floater):not(.swp_social_panelSide){width:100%!important}.nc_wrapper .swp_social_panel{margin-bottom:10px!important;margin-top:10px!important}div.swp_social_panel .nc_tweetContainer{-webkit-border-radius:2px;border-radius:2px;cursor:pointer;float:left;font-family:Lato;height:32px;margin:0 5px 3px;min-width:34px;overflow:hidden;text-align:center;-webkit-transition:all .1s linear;transition:all .1s linear}div.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.swp_social_panel .nc_tweetContainer a.nc_tweet,.swp_social_panel .total_shares .swp_count{display:block;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;font-family:Lato,sans-serif;font-size:18px!important;font-weight:700;height:30px;text-decoration:none;text-decoration:none!important;text-transform:none;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap}.swp_social_panel:not(.nc_floater):not(.swp_social_panelSide).swp_shift{padding:0 10px}.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:nth-child(1){margin-left:0}.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:nth-last-child(1){margin-right:0}.swp_social_panel a .swp_count:not(.swp_hide){display:inline-block;line-height:32px;margin:0;padding:0 5px;-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.swp_social_panel .total_shares .swp_count,span.swp_share{line-height:30px}.swp_social_panel a .swp_count.swp_hide{margin:0 auto}.swp_social_panel span:before{content:initial!important}.swp_social_panel span.swp_count{font-size:14px}.swp_social_panel span.iconFiller{font-size:18px;margin:0 auto}.swp_social_panel.notMobile .nc_tweetContainer:nth-child(1){margin-left:0}.swp_social_panel:not(.swp_social_panelSide){-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.swp_social_panel:not(.swp_social_panelSide) div.total_shares.total_sharesalt:nth-child(1){margin-left:0;margin-right:15px;padding-left:0}.swp_social_panel:not(.swp_social_panelSide) div.total_shares.total_sharesalt:nth-last-child(1){margin-right:0;padding-right:0}a.swp_CTT{cursor:pointer}span.swp_share{display:block;float:right;float:left;font-size:14px;font-weight:400;height:30px;margin:0 0 0 6px;max-width:none!important;vertical-align:middle}.swp_social_panelSide span.swp_share{margin:0}.swp_social_panel .sw{float:left;height:30px;line-height:32px;margin:0 5px;text-shadow:none!important;width:20px}.iconFiller{display:block;float:left;height:30px;overflow:hidden;-webkit-transition:width .1s linear;transition:width .1s linear}.swp_social_panel .iconFiller{width:30px}span.spaceManWilly{display:block;width:120px}.swp_social_panel .total_shares{background:#c4c4c4;border:1px solid #e08a0f;-webkit-border-radius:2px;border-radius:2px;color:#fff;cursor:default;display:block;font-size:19px;padding:0 10px;-webkit-box-flex:0!important;-moz-box-flex:0!important;-webkit-flex:none!important;-ms-flex:none!important;flex:none!important}.swp_social_panel div.total_shares.total_sharesalt,.swp_social_panel:hover div.total_shares.total_sharesalt:not(:nth-child(1)){background:0 0!important;border:none;color:#474b4d;margin-left:0!important}div.swp_social_panel:hover div.total_shares.total_sharesalt:not(:nth-child(1)){background:0 0;color:#474b4d;margin-left:10px}.swp_social_panel .total_shares.total_sharesalt .swp_label{color:#474b4d;font-size:10px;letter-spacing:0;min-width:40px;vertical-align:middle}.swp_social_panel .total_shares .swp_label{font-size:10px;vertical-align:middle}.swp_social_panel .total_shares.total_sharesalt .swp_count{color:#474b4d;font-size:24px}.swp_social_panel.swp_customFull:hover div.total_shares,.swp_social_panel.swp_fade .total_shares,.swp_social_panel.swp_full_color .total_shares,.swp_social_panel:hover .total_shares{background:#e08a0f}.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer.total_shares.total_sharesalt:before{content:"o";display:inline-block;font-family:sw-icon-font;margin-top:7px;vertical-align:top}.swp_social_panel:not(.swp_social_panelSide) .total_shares.total_sharesalt .swp_count{display:inline-block;line-height:0;margin-left:8px;margin-top:12px;min-width:45px;position:relative;vertical-align:middle}span.swp_label{display:block;font-size:9px!important;margin-top:13px;position:absolute;text-align:center!important;text-transform:uppercase}.swp_social_panelSide span.swp_label{margin-top:0}.swp_social_panel.swp_leaf .nc_tweetContainer{-webkit-border-radius:15px 0!important;border-radius:15px 0!important;border-width:1px}.swp_social_panel.swp_pill .nc_tweetContainer{-webkit-border-radius:50px;border-radius:50px;border-width:1px}.swp_social_panel.swp_shift .nc_tweetContainer:not(.total_shares){border-width:1px;-moz-transform:skew(-25deg);-o-transform:skew(-25deg);-webkit-transform:skew(-25deg)}.swp_social_panel.swp_shift .nc_tweetContainer a{-moz-transform:skew(25deg);-o-transform:skew(25deg);-webkit-transform:skew(25deg)}.swp_connected .nc_tweetContainer,.swp_connected .nc_tweetContainer:hover,.swp_connected:hover .nc_tweetContainer{-webkit-border-radius:0!important;border-radius:0!important;border-width:1px;margin:0!important}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_google_plus,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_google_plus:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_google_plus:hover{border:1px solid #df4b37}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_twitter,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_twitter:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_twitter:hover{border:1px solid #429cd6}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_facebook,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_facebook:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_facebook:hover{border:1px solid #3a589e}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_pinterest,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_pinterest:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_pinterest:hover{border:1px solid #cd2029}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_linkedin,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_linkedin:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_linkedin:hover{border:1px solid #0d77b7}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_tumblr,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_tumblr:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_tumblr:hover{border:1px solid #39475d}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_stumbleupon,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_stumbleupon:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_stumbleupon:hover{border:1px solid #ef5025}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_yummly,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_yummly:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_yummly:hover{border:1px solid #e26426}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_reddit,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_reddit:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_reddit:hover{border:1px solid #f04b23}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_email,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_email:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_email:hover{border:1px solid #6bcce9}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_whatsapp,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_whatsapp:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_whatsapp:hover{border:1px solid #71c169}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_pocket,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_pocket:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_pocket:hover{border:1px solid #ef4056}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_buffer,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_buffer:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_buffer:hover{border:1px solid #323b43}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_hacker_news,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_hacker_news:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_hacker_news:hover{border:1px solid #d85623}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_flipboard,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_flipboard:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_flipboard:hover{border:1px solid #bf2626}.swp_social_panel.swp_default_full_color .swp_google_plus,body .swp_social_panel.swp_other_full_color:hover .swp_google_plus,html body .swp_social_panel.swp_individual_full_color .swp_google_plus:hover{background:#df4b37;border:1px solid #c44133}.swp_social_panel.swp_default_full_color .swp_twitter,body .swp_social_panel.swp_other_full_color:hover .swp_twitter,html body .swp_social_panel.swp_individual_full_color .swp_twitter:hover{background:#429cd6;border:1px solid #3c87b2}.swp_social_panel.swp_default_full_color .swp_facebook,body .swp_social_panel.swp_other_full_color:hover .swp_facebook,html body .swp_social_panel.swp_individual_full_color .swp_facebook:hover{background:#3a589e;border:1px solid #2e4675}.swp_social_panel.swp_default_full_color .swp_pinterest,body .swp_social_panel.swp_other_full_color:hover .swp_pinterest,html body .swp_social_panel.swp_individual_full_color .swp_pinterest:hover{background:#cd2029;border:1px solid #aa1b29}.swp_social_panel.swp_default_full_color .swp_linkedin,body .swp_social_panel.swp_other_full_color:hover .swp_linkedin,html body .swp_social_panel.swp_individual_full_color .swp_linkedin:hover{background:#0d77b7;border:1px solid #0c6591}.swp_social_panel.swp_default_full_color .swp_tumblr,body .swp_social_panel.swp_other_full_color:hover .swp_tumblr,html body .swp_social_panel.swp_individual_full_color .swp_tumblr:hover{background:#39475d;border:1px solid #27313f}.swp_social_panel.swp_default_full_color .swp_stumbleupon,body .swp_social_panel.swp_other_full_color:hover .swp_stumbleupon,html body .swp_social_panel.swp_individual_full_color .swp_stumbleupon:hover{background:#ef5025;border:1px solid #d34427}.swp_social_panel.swp_default_full_color .swp_yummly,body .swp_social_panel.swp_other_full_color:hover .swp_yummly,html body .swp_social_panel.swp_individual_full_color .swp_yummly:hover{background:#e26426;border:1px solid #b65027}.swp_social_panel.swp_default_full_color .swp_reddit,body .swp_social_panel.swp_other_full_color:hover .swp_reddit,html body .swp_social_panel.swp_individual_full_color .swp_reddit:hover{background:#f04b23;border:1px solid #d33f27}.swp_social_panel.swp_default_full_color .swp_email,body .swp_social_panel.swp_other_full_color:hover .swp_email,html body .swp_social_panel.swp_individual_full_color .swp_email:hover{background:#6bcce9;border:1px solid #61bace}.swp_social_panel.swp_default_full_color .swp_whatsapp,body .swp_social_panel.swp_other_full_color:hover .swp_whatsapp,html body .swp_social_panel.swp_individual_full_color .swp_whatsapp:hover{background:#71c169;border:1px solid #28b04b}.swp_social_panel.swp_default_full_color .swp_pocket,body .swp_social_panel.swp_other_full_color:hover .swp_pocket,html body .swp_social_panel.swp_individual_full_color .swp_pocket:hover{background:#ef4056;border:1px solid #ce3d55}.swp_social_panel.swp_default_full_color .swp_buffer,body .swp_social_panel.swp_other_full_color:hover .swp_buffer,html body .swp_social_panel.swp_individual_full_color .swp_buffer:hover{background:#323b43;border:1px solid #000}.swp_social_panel.swp_default_full_color .swp_hacker_news,body .swp_social_panel.swp_other_full_color:hover .swp_hacker_news,html body .swp_social_panel.swp_individual_full_color .swp_hacker_news:hover{background:#f16522;border:1px solid #d85623}.swp_social_panel.swp_default_full_color .swp_flipboard,body .swp_social_panel.swp_other_full_color:hover .swp_flipboard,html body .swp_social_panel.swp_individual_full_color .swp_flipboard:hover{background:#e02828;border:1px solid #bf2626}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_google_plus,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_google_plus,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_google_plus:hover{border-bottom:3px solid #c44133}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_twitter,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_twitter,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_twitter:hover{border-bottom:3px solid #5595bc}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_facebook,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_facebook,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_facebook:hover{border-bottom:3px solid #2e4675}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_pinterest,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_pinterest,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_pinterest:hover{border-bottom:3px solid #aa1b29}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_linkedin,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_linkedin,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_linkedin:hover{border-bottom:3px solid #0c6591}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_tumblr,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_tumblr,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_tumblr:hover{border-bottom:3px solid #27313f}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_stumbleupon,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_stumbleupon,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_stumbleupon:hover{border-bottom:3px solid #d34427}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_yummly,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_yummly,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_yummly:hover{border-bottom:3px solid #b65027}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_reddit,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_reddit,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_reddit:hover{border-bottom:3px solid #d33f27}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_email,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_email,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_email:hover{border-bottom:3px solid #61bace}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_whatsapp,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_whatsapp,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_whatsapp:hover{border-bottom:3px solid #28b04b}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_pocket,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_pocket,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_pocket:hover{border-bottom:3px solid #ce3d55}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_buffer,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_buffer,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_buffer:hover{border-bottom:3px solid #000}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_hacker_news,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_hacker_news,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_hacker_news:hover{border-bottom:3px solid #d85623}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_flipboard,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_flipboard,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_flipboard:hover{border-bottom:3px solid #bf2626}.swp_social_panel.swp_default_light_gray .nc_tweetContainer,body .swp_social_panel.swp_other_light_gray:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_light_gray .nc_tweetContainer:hover{background-color:#ccc;border:1px solid #ccc}.swp_social_panel.swp_three_dee.swp_default_light_gray .nc_tweetContainer:not(.total_sharesalt),body .swp_social_panel.swp_three_dee.swp_other_light_gray:hover .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_light_gray .nc_tweetContainer:not(.total_sharesalt):hover{border-bottom:3px solid #999}.swp_social_panel.swp_default_medium_gray .nc_tweetContainer,body .swp_social_panel.swp_other_medium_gray:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_medium_gray .nc_tweetContainer:hover{background-color:#999;border:1px solid #999}.swp_social_panel.swp_three_dee.swp_default_medium_gray .nc_tweetContainer:not(.total_sharesalt),body .swp_social_panel.swp_three_dee.swp_other_medium_gray:hover .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_medium_gray .nc_tweetContainer:not(.total_sharesalt):hover{border-bottom:3px solid #444}.swp_social_panel.swp_default_dark_gray .nc_tweetContainer,body .swp_social_panel.swp_other_dark_gray:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_dark_gray .nc_tweetContainer:hover{background-color:#444;border:1px solid #444}.swp_social_panel.swp_three_dee.swp_default_dark_gray .nc_tweetContainer:not(.total_sharesalt),body .swp_social_panel.swp_three_dee.swp_other_dark_gray:hover .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_dark_gray .nc_tweetContainer:not(.total_sharesalt):hover{border-bottom:3px solid #222}.swp_social_panel.swp_default_light_gray_outlines a,body .swp_social_panel.swp_other_light_gray_outlines:hover a,html body .swp_social_panel.swp_individual_light_gray_outlines a:hover{color:#ccc}.swp_social_panel.swp_default_light_gray_outlines .nc_tweetContainer,body .swp_social_panel.swp_other_light_gray_outlines:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_light_gray_outlines .nc_tweetContainer:hover{background:0 0;border:1px solid #ccc}.swp_social_panel.swp_default_medium_gray_outlines a,body .swp_social_panel.swp_other_medium_gray_outlines:hover a,html body .swp_social_panel.swp_individual_medium_gray_outlines a:hover{color:#999}.swp_social_panel.swp_default_medium_gray_outlines .nc_tweetContainer,body .swp_social_panel.swp_other_medium_gray_outlines:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_medium_gray_outlines .nc_tweetContainer:hover{background:0 0;border:1px solid #999}.swp_social_panel.swp_default_dark_gray_outlines a,body .swp_social_panel.swp_other_dark_gray_outlines:hover a,html body .swp_social_panel.swp_individual_dark_gray_outlines a:hover{color:#444}.swp_social_panel.swp_default_dark_gray_outlines .nc_tweetContainer,body .swp_social_panel.swp_other_dark_gray_outlines:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_dark_gray_outlines .nc_tweetContainer:hover{background:0 0;border:1px solid #444}.swp_social_panel.swp_default_color_outlines .swp_google_plus a,body .swp_social_panel.swp_other_color_outlines:hover .swp_google_plus a,html body .swp_social_panel.swp_individual_color_outlines .swp_google_plus a:hover{color:#df4b37}.swp_social_panel.swp_default_color_outlines .swp_facebook a,body .swp_social_panel.swp_other_color_outlines:hover .swp_facebook a,html body .swp_social_panel.swp_individual_color_outlines .swp_facebook a:hover{color:#3a589e}.swp_social_panel.swp_default_color_outlines .swp_pinterest a,body .swp_social_panel.swp_other_color_outlines:hover .swp_pinterest a,html body .swp_social_panel.swp_individual_color_outlines .swp_pinterest a:hover{color:#cd2029}.swp_social_panel.swp_default_color_outlines .swp_linkedin a,body .swp_social_panel.swp_other_color_outlines:hover .swp_linkedin a,html body .swp_social_panel.swp_individual_color_outlines .swp_linkedin a:hover{color:#0d77b7}.swp_social_panel.swp_default_color_outlines .swp_tumblr a,body .swp_social_panel.swp_other_color_outlines:hover .swp_tumblr a,html body .swp_social_panel.swp_individual_color_outlines .swp_tumblr a:hover{color:#39475d}.swp_social_panel.swp_default_color_outlines .swp_stumbleupon a,body .swp_social_panel.swp_other_color_outlines:hover .swp_stumbleupon a,html body .swp_social_panel.swp_individual_color_outlines .swp_stumbleupon a:hover{color:#ef5025}.swp_social_panel.swp_default_color_outlines .swp_yummly a,body .swp_social_panel.swp_other_color_outlines:hover .swp_yummly a,html body .swp_social_panel.swp_individual_color_outlines .swp_yummly a:hover{color:#e26426}.swp_social_panel.swp_default_color_outlines .swp_whatsapp a,body .swp_social_panel.swp_other_color_outlines:hover .swp_whatsapp a,html body .swp_social_panel.swp_individual_color_outlines .swp_whatsapp a:hover{color:#71c169}.swp_social_panel.swp_default_color_outlines .swp_pocket a,body .swp_social_panel.swp_other_color_outlines:hover .swp_pocket a,html body .swp_social_panel.swp_individual_color_outlines .swp_pocket a:hover{color:#ef4056}.swp_social_panel.swp_default_color_outlines .swp_reddit a,body .swp_social_panel.swp_other_color_outlines:hover .swp_reddit a,html body .swp_social_panel.swp_individual_color_outlines .swp_reddit a:hover{color:#f04b23}.swp_social_panel.swp_default_color_outlines .swp_email a,body .swp_social_panel.swp_other_color_outlines:hover .swp_email a,html body .swp_social_panel.swp_individual_color_outlines .swp_email a:hover{color:#6bcce9}.swp_social_panel.swp_default_color_outlines .swp_buffer a,body .swp_social_panel.swp_other_color_outlines:hover .swp_buffer a,html body .swp_social_panel.swp_individual_color_outlines .swp_buffer a:hover{color:#323b43}.swp_social_panel.swp_default_color_outlines .swp_hacker_news a,body .swp_social_panel.swp_other_color_outlines:hover .swp_hacker_news a,html body .swp_social_panel.swp_individual_color_outlines .swp_hacker_news a:hover{color:#f16522}.swp_social_panel.swp_default_color_outlines .swp_flipboard a,body .swp_social_panel.swp_other_color_outlines:hover .swp_flipboard a,html body .swp_social_panel.swp_individual_color_outlines .swp_flipboard a:hover{color:#e02828}.swp_social_panel.swp_default_color_outlines .swp_google_plus,body .swp_social_panel.swp_other_color_outlines:hover .swp_google_plus,html body .swp_social_panel.swp_individual_color_outlines .swp_google_plus:hover{background:0 0;border:1px solid #df4b37}.swp_social_panel.swp_default_color_outlines .swp_twitter,body .swp_social_panel.swp_other_color_outlines:hover .swp_twitter,html body .swp_social_panel.swp_individual_color_outlines .swp_twitter:hover{background:0 0;border:1px solid #429cd6}.swp_social_panel.swp_default_color_outlines .swp_facebook,body .swp_social_panel.swp_other_color_outlines:hover .swp_facebook,html body .swp_social_panel.swp_individual_color_outlines .swp_facebook:hover{background:0 0;border:1px solid #3a589e}.swp_social_panel.swp_default_color_outlines .swp_pinterest,body .swp_social_panel.swp_other_color_outlines:hover .swp_pinterest,html body .swp_social_panel.swp_individual_color_outlines .swp_pinterest:hover{background:0 0;border:1px solid #cd2029}.swp_social_panel.swp_default_color_outlines .swp_linkedin,body .swp_social_panel.swp_other_color_outlines:hover .swp_linkedin,html body .swp_social_panel.swp_individual_color_outlines .swp_linkedin:hover{background:0 0;border:1px solid #0d77b7}.swp_social_panel.swp_default_color_outlines .swp_tumblr,body .swp_social_panel.swp_other_color_outlines:hover .swp_tumblr,html body .swp_social_panel.swp_individual_color_outlines .swp_tumblr:hover{background:0 0;border:1px solid #39475d}.swp_social_panel.swp_default_color_outlines .swp_stumbleupon,body .swp_social_panel.swp_other_color_outlines:hover .swp_stumbleupon,html body .swp_social_panel.swp_individual_color_outlines .swp_stumbleupon:hover{background:0 0;border:1px solid #ef5025}.swp_social_panel.swp_default_color_outlines .swp_yummly,body .swp_social_panel.swp_other_color_outlines:hover .swp_yummly,html body .swp_social_panel.swp_individual_color_outlines .swp_yummly:hover{background:0 0;border:1px solid #e26426}.swp_social_panel.swp_default_color_outlines .swp_whatsapp,body .swp_social_panel.swp_other_color_outlines:hover .swp_whatsapp,html body .swp_social_panel.swp_individual_color_outlines .swp_whatsapp:hover{background:0 0;border:1px solid #71c169}.swp_social_panel.swp_default_color_outlines .swp_reddit,body .swp_social_panel.swp_other_color_outlines:hover .swp_reddit,html body .swp_social_panel.swp_individual_color_outlines .swp_reddit:hover{background:0 0;border:1px solid #f04b23}.swp_social_panel.swp_default_color_outlines .swp_email,body .swp_social_panel.swp_other_color_outlines:hover .swp_email,html body .swp_social_panel.swp_individual_color_outlines .swp_email:hover{background:0 0;border:1px solid #6bcce9}.swp_social_panel.swp_default_color_outlines .swp_pocket,body .swp_social_panel.swp_other_color_outlines:hover .swp_pocket,html body .swp_social_panel.swp_individual_color_outlines .swp_pocket:hover{background:0 0;border:1px solid #ef4056}.swp_social_panel.swp_default_color_outlines .swp_buffer,body .swp_social_panel.swp_other_color_outlines:hover .swp_buffer,html body .swp_social_panel.swp_individual_color_outlines .swp_buffer:hover{background:0 0;border:1px solid #323b43}.swp_social_panel.swp_default_color_outlines .swp_hacker_news,body .swp_social_panel.swp_other_color_outlines:hover .swp_hacker_news,html body .swp_social_panel.swp_individual_color_outlines .swp_hacker_news:hover{background:0 0;border:1px solid #f16522}.swp_social_panel.swp_default_color_outlines .swp_flipboard,body .swp_social_panel.swp_other_color_outlines:hover .swp_flipboard,html body .swp_social_panel.swp_individual_color_outlines .swp_flipboard:hover{background:0 0;border:1px solid #bf2626}.swp_social_panelSide{flex-direction:column;height:auto;overflow:visible;-webkit-transition:all .2s linear;transition:all .2s linear;width:100px!important;z-index:9999999;margin:10px 5px!important;padding:0;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column}.swp_social_panelSide.fade,.swp_social_panelSide.slide{position:fixed;-webkit-transition:all .2s linear;transition:all .2s linear}.swp_social_panelSide.fade{display:none}.swp_social_panelSide.fade.swp_float_left{left:5px}.swp_social_panelSide.fade.swp_float_right{right:5px}.swp_social_panelSide[class*=swp_side]{height:100vh;display:flex;position:fixed;padding:30px 0;top:0}.swp_social_panelSide.swp_float_right{align-content:flex-end}.swp_social_panelSide.swp_side_top{justify-content:flex-start}.swp_social_panelSide.swp_side_bottom{justify-content:flex-end}.swp_social_panelSide.swp_side_center{justify-content:center}.swp_social_panelSide .nc_tweetContainer{background:#dd4b38;-webkit-border-radius:3px;border-radius:3px;clear:both;display:block;font-family:Lato,sans-serif;height:32px;margin:3px 0!important;overflow:hidden;padding:0;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:top;width:90px}.swp_social_panelSide .nc_tweetContainer .iconFiller{display:inline-block;height:40px;margin:0 6px;padding:0;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:middle;width:21px}.swp_social_panelSide .nc_tweetContainer .swp_count{display:inline-block;font-size:14px;height:32px;line-height:16px;margin:0;overflow:hidden;padding:0;text-align:right;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:top;width:0}.swp_social_panelSide .nc_tweetContainer a{cursor:pointer;display:block;font-weight:500;height:36px;margin:0;padding:0;text-decoration:none;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:top}.swp_social_panelSide .nc_tweetContainer .sw,.swp_social_panelSide .nc_tweetContainer .swp_share{float:left;line-height:34px}.swp_social_panelSide.swp_default .nc_tweetContainer .sw{line-height:32px}.swp_social_panelSide.swp_default .nc_tweetContainer .swp_share{line-height:30px}.swp_social_panelSide .nc_tweetContainer .swp_share{font-size:13px}.swp_social_panelSide .nc_tweetContainer:hover,.swp_social_panelSide .nc_tweetContainer:hover .iconFiller,.swp_social_panelSide .nc_tweetContainer:hover .swp_count{-webkit-transition:all .1s linear;transition:all .1s linear}.swp_social_panelSide.swp_boxed .nc_tweetContainer,.swp_social_panelSide.swp_circles .nc_tweetContainer{margin-bottom:5px;width:67.5px!important}.swp_social_panelSide.swp_boxed .nc_tweetContainer,.swp_social_panelSide.swp_boxed .nc_tweetContainer a,.swp_social_panelSide.swp_circles .nc_tweetContainer,.swp_social_panelSide.swp_circles .nc_tweetContainer a{width:67.5px;height:67.5px;position:relative}.swp_social_panelSide.swp_circles .nc_tweetContainer,.swp_social_panelSide.swp_circles .nc_tweetContainer a{border-radius:50%!important}.swp_social_panelSide.swp_boxed .nc_tweetContainer i.sw,.swp_social_panelSide.swp_circles .nc_tweetContainer i.sw{font-size:27px;height:40px;margin:0;padding-top:10px;text-align:center;width:100%}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_share,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_share{height:35px;opacity:0;position:absolute;bottom:0;left:0;text-align:center;width:67.5px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_count,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_count{height:35px;margin:0;padding:0;position:absolute;bottom:0;left:0;text-align:center;-webkit-transition:padding .1s linear;transition:padding .1s linear;width:100%}.swp_social_panelSide.swp_boxed .nc_tweetContainer span.swp_hide .iconFiller,.swp_social_panelSide.swp_boxed .nc_tweetContainer span.swp_hide .spaceManWilly,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_count.swp_hide,.swp_social_panelSide.swp_circles .nc_tweetContainer span.swp_hide .iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer span.swp_hide .spaceManWilly,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_count.swp_hide{height:67.5px;opacity:1}.swp_social_panelSide.swp_boxed .nc_tweetContainer span.iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer span.iconFiller{height:40px;width:67.5px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover span.swp_count:not(.swp_hide),.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover span.swp_count:not(.swp_hide){opacity:0}.swp_social_panelSide.swp_boxed .total_shares,.swp_social_panelSide.swp_circles .total_shares{padding:0;width:67.5px!important}.swp_social_panelSide .nc_tweetContainer:not(.total_shares){line-height:34px}.swp_social_panelSide:not(.swp_boxed):not(.swp_circles) .nc_tweetContainer:not(.total_shares) .iconFiller{margin-left:2px;width:30px}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_count{padding:0 8px;width:48px}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_count.swp_hide{padding:0;width:100%}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_count.swp_hide .iconFiller{display:block;float:none;margin:0 auto}.swp_social_panelSide:not(.swp_boxed):not(.swp_circles) .nc_tweetContainer:not(.total_shares):hover{width:150px}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide .nc_tweetContainer[data-network]:not(.total_shares):hover .iconFiller{width:90px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover .iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover .iconFiller{width:100%}.swp_social_panelSide .nc_tweetContainer.total_shares{background:rgba(0,0,0,0);border:0!important;font-weight:800;height:45px;margin:0;padding:0;text-align:center;width:90px;order:-100}.swp_social_panelSide .nc_tweetContainer.total_shares .swp_count{color:#444;display:block;font-family:Lato,sans-serif;height:28px;text-align:center;width:100%}.swp_social_panelSide .nc_tweetContainer.total_shares .swp_label{color:#444;display:block;font-family:Lato,sans-serif;font-size:50%;position:relative;text-align:center;width:100%}.nc_wrapper{background:#fff;position:fixed;-webkit-transition:top .5s bottom .5s;transition:top .5s bottom .5s;width:100%;z-index:99999}.nc_wrapper.bottom{bottom:0;left:0}.nc_wrapper.top{top:0;left:0}.nc_floater{margin:10px 0;position:relative;left:304px;width:740px}.swp_social_panelSide.hideCounts a{text-align:center}.swp_social_panelSide.hideCounts .iconFiller{float:none;text-align:left}.sw{display:inline-block;font-family:sw-icon-font!important;font-size:inherit;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-style:normal;font-weight:400;text-rendering:auto;text-transform:none!important;-ms-transform:translate(0,0);-webkit-transform:translate(0,0);transform:translate(0,0)}.sw:before{display:block!important}.wp-editor-container .sw:before{font-size:18px;line-height:22px}.wp-editor-container .sw-social-warfare:before{color:#ee464f}.mce-container .sw-social-warfare{color:#ee464f;font-size:20px;margin-right:15px;vertical-align:middle}i.swp_google_plus_icon:before{content:"h"}i.swp_pinterest_icon:before{content:"b"}i.swp_twitter_icon:before{content:"s"}i.swp_facebook_icon:before{content:"j"}i.swp_linkedin_icon:before{content:"f"}i.swp_tumblr_icon:before{content:"r"}i.swp_stumbleupon_icon:before{content:"q"}i.swp_reddit_icon:before{content:"a"}i.swp_email_icon:before{content:"k"}i.swp_yummly_icon:before{content:"x"}i.swp_whatsapp_icon:before{content:"y"}i.swp_pocket_icon:before{content:"B"}i.swp_buffer_icon:before{content:"z"}i.swp_hacker_news_icon:before{content:"D"}i.swp_flipboard_icon:before{content:"C"}.sw-social-warfare:before{content:"p"}.sw-click-to-tweet:after,.sw-tweet-clear:after{content:".";height:0;clear:both;visibility:hidden;display:block}.swp_CTT{text-decoration:none!important}.sw-tweet-clear{zoom:1}.sw-click-to-tweet{display:block;margin:15px 0;padding:15px 30px;position:relative}.sw-click-to-tweet:after{line-height:0}.sw-click-to-tweet .sw-ctt-text{margin:0 0 10px;padding:0;position:relative;word-wrap:break-word}a .sw-click-to-tweet .sw-ctt-text{display:block;font-size:24px;font-weight:500;line-height:140%;margin:0;padding:0;position:relative;text-decoration:none;text-transform:none}.sw-click-to-tweet .sw-ctt-btn{display:block;float:right;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:700;line-height:100%;margin:10px 0 0;padding:3px 5px 3px 3px;position:relative;text-decoration:none;text-transform:uppercase}.sw-click-to-tweet i.swp_twitter_icon{float:right;font-size:21px;margin-left:15px!important;margin-top:2px;text-transform:none}a.swp_CTT.style1 .sw-click-to-tweet{background-color:#fff;border:1px solid #ddd;-webkit-border-radius:4px;border-radius:4px}a.swp_CTT.style2 .sw-click-to-tweet{background-color:#fff;border:4px double #ddd;-webkit-border-radius:0;border-radius:0}a.style2 .sw-click-to-tweet .sw-ctt-text{color:#666;font-style:italic;text-decoration:none}a.swp_CTT.style3:hover .sw-click-to-tweet{border-left:10px solid #3c87b2;padding-right:20px;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style3 .sw-click-to-tweet{background-color:#429cd6;border:none;border-left:10px solid #429cd6;-webkit-border-radius:0;border-radius:0;padding-right:20px;-webkit-transition:all .25s linear;transition:all .25s linear}a.style3 .sw-click-to-tweet .sw-ctt-text{color:#fff;font-style:italic;text-decoration:none}a.swp_CTT.style4:hover .sw-click-to-tweet{border-left:10px solid #3c87b2;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style4 .sw-click-to-tweet{background-color:#333;border-left:10px solid #c33;-webkit-border-radius:0;border-radius:0;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style5:hover .sw-click-to-tweet{background-color:#d34250;border-left:10px solid #30394f;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style5 .sw-click-to-tweet{background-color:#30394f;border-left:10px solid #d34250;-webkit-border-radius:0;border-radius:0;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style6:hover .sw-click-to-tweet{background-color:#ced3dc;border-left:10px solid #d34250;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style6 .sw-click-to-tweet{background-color:#eee;border-left:10px solid #d34250;-webkit-border-radius:0;border-radius:0;-webkit-transition:all .25s linear;transition:all .25s linear}a.style6 .sw-click-to-tweet i.swp_twitter{color:#30394f}.swp_pop_thumb{-webkit-border-radius:3px;border-radius:3px;float:left;height:100px;margin:5px 25px 5px 0;width:100px}.swp_popular_post{clear:both}.swp_clearfix:after{clear:both;content:" ";display:block;height:0;visibility:hidden}.swp_popular_post a.swp_popularity{border:none;display:block;line-height:1.5;margin:20px 0}span.swp_pop_count{display:block;font-size:70%}.swp_widget_box{-webkit-border-radius:3px;border-radius:3px}div.sw-pinit{display:table!important;line-height:0;position:relative!important}div.sw-pinit a.sw-pinit-button,div.sw-pinit a.sw-pinit-button:visited{background:#cd2029;border:1px solid #aa1b29;border:0;border-bottom:none;-webkit-border-radius:4px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;color:#fff;font-family:Lato,sans-serif;font-size:20px;font-size:15px;height:32px;line-height:32px;opacity:0;padding:0 20px;position:absolute;text-decoration:none;-webkit-transition:opacity .5s;transition:opacity .5s;z-index:200}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) .swp_hide span.swp_share,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover span.swp_share:not(.swp_hide),.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) .swp_hide span.swp_share,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover span.swp_share:not(.swp_hide),div.sw-pinit:focus a.sw-pinit-button,div.sw-pinit:hover a.sw-pinit-button{opacity:1}div.sw-pinit a.sw-pinit-button::before{color:#fff;content:"b";float:left;font-family:sw-icon-font;font-size:20px;font-weight:400;line-height:36px;margin-left:-5px;margin-right:10px}div.sw-pinit a.sw-pinit-button:hover::before{content:"F"}div.sw-pinit a.sw-pinit-button:focus,div.sw-pinit a.sw-pinit-button:hover{background:#aa1b29;color:#fff;text-decoration:none}div.sw-pinit .sw-pinit-left{left:30px}div.sw-pinit .sw-pinit-center{margin-left:-60px;left:50%}div.sw-pinit .sw-pinit-right{right:30px}div.sw-pinit .sw-pinit-top{top:30px}div.sw-pinit .sw-pinit-middle{margin-top:-25px;top:50%}div.sw-pinit .sw-pinit-bottom{bottom:30px}.mobile .nc_tweetContainer:nth-last-child(2),.nc_tweetContainer.total_shares:nth-last-child(1),.swp_social_panel.notMobile .nc_tweetContainer:nth-last-child(1){margin-right:0}.swp_social_panel.swp_default_dark_gray a,.swp_social_panel.swp_default_full_color a,.swp_social_panel.swp_default_light_gray a,.swp_social_panel.swp_default_medium_gray a,body .swp_social_panel.swp_other_dark_gray:hover a,body .swp_social_panel.swp_other_full_color:hover a,body .swp_social_panel.swp_other_light_gray:hover a,body .swp_social_panel.swp_other_medium_gray:hover a,html body .swp_social_panel.swp_individual_dark_gray a:hover,html body .swp_social_panel.swp_individual_full_color .nc_tweetContainer:hover a,html body .swp_social_panel.swp_individual_light_gray .nc_tweetContainer:hover a,html body .swp_social_panel.swp_individual_medium_gray a:hover{color:#fff}.swp_social_panel.swp_default_color_outlines .swp_twitter a,.wp-editor-container .swp_twitter:before,a.style1 .sw-click-to-tweet i.swp_twitter,a.style2 .sw-click-to-tweet i.swp_twitter,body .swp_social_panel.swp_other_color_outlines:hover .swp_twitter a,html body .swp_social_panel.swp_individual_color_outlines .swp_twitter a:hover{color:#429cd6}.sw-content-locator,.swp_social_panel.mobile .iconFiller~.swp_count{display:none}a.style1 .sw-click-to-tweet .sw-ctt-btn,a.style1 .sw-click-to-tweet .sw-ctt-text{color:#999;text-decoration:none}a.style1:hover .sw-click-to-tweet .sw-ctt-btn,a.style1:hover .sw-click-to-tweet .sw-ctt-text,a.style2 .sw-click-to-tweet .sw-ctt-btn,a.style2:hover .sw-click-to-tweet .sw-ctt-btn,a.style2:hover .sw-click-to-tweet .sw-ctt-text{color:#666;text-decoration:none}a.style3 .sw-click-to-tweet .sw-ctt-btn,a.style3 .sw-click-to-tweet i.swp_twitter,a.style3:hover .sw-click-to-tweet .sw-ctt-btn,a.style3:hover .sw-click-to-tweet .sw-ctt-text,a.style4 .sw-click-to-tweet .sw-ctt-btn,a.style4 .sw-click-to-tweet .sw-ctt-text,a.style4:hover .sw-click-to-tweet .sw-ctt-btn,a.style4:hover .sw-click-to-tweet .sw-ctt-text,a.style5 .sw-click-to-tweet .sw-ctt-btn,a.style5 .sw-click-to-tweet .sw-ctt-text,a.style5:hover .sw-click-to-tweet .sw-ctt-btn,a.style5:hover .sw-click-to-tweet .sw-ctt-text{color:#fff;text-decoration:none}a.style4 .sw-click-to-tweet i.swp_twitter,a.style5 .sw-click-to-tweet i.swp_twitter{color:#fff}a.style6 .sw-click-to-tweet .sw-ctt-btn,a.style6 .sw-click-to-tweet .sw-ctt-text{color:#30394f;text-decoration:none}a.style6:hover .sw-click-to-tweet .sw-ctt-btn,a.style6:hover .sw-click-to-tweet .sw-ctt-text,a.style6:hover .sw-click-to-tweet i.swp_twitter{color:#2a2d34;text-decoration:none}.scale-70{-ms-transform:scale(.7);-webkit-transform:scale(.7);transform:scale(.7)}.swp_social_panel:not(.nc_floater).scale-70.scale-full_width{width:142.8571428571429%!important}.scale-80{-ms-transform:scale(.8);-webkit-transform:scale(.8);transform:scale(.8)}.swp_social_panel:not(.nc_floater).scale-80.scale-full_width{width:125%!important}.scale-90{-ms-transform:scale(.9);-webkit-transform:scale(.9);transform:scale(.9)}.swp_social_panel:not(.nc_floater).scale-90.scale-full_width{width:111.111111111111%!important}.scale-110{-ms-transform:scale(1.1);-webkit-transform:scale(1.1);transform:scale(1.1)}.swp_social_panel:not(.nc_floater).scale-110.scale-full_width{width:90.90909090909091%!important}.scale-120{-ms-transform:scale(1.2);-webkit-transform:scale(1.2);transform:scale(1.2)}.swp_social_panel:not(.nc_floater).scale-120.scale-full_width{width:83.33333333333333%!important}.scale-130{-ms-transform:scale(1.3);-webkit-transform:scale(1.3);transform:scale(1.3)}.swp_social_panel:not(.nc_floater).scale-130.scale-full_width{width:76.92307692307692%!important}.scale-140{-ms-transform:scale(1.4);-webkit-transform:scale(1.4);transform:scale(1.4)}.swp_social_panel:not(.nc_floater).scale-140.scale-full_width{width:71.42857142857143%!important}.nc_floater.scale-center,.nc_floater.scale-right,.scale-full_width,.scale-left{-ms-transform-origin:left;-webkit-transform-origin:left;transform-origin:left}.scale-right{-ms-transform-origin:right;-webkit-transform-origin:right;transform-origin:right}.scale-center{-ms-transform-origin:center;-webkit-transform-origin:center;transform-origin:center}div.swp_social_panel .nc_tweetContainer.swp_emphasize{-webkit-box-flex:2;-moz-box-flex:2;-webkit-flex:2;-ms-flex:2;flex:2}.sw-pinit.aligncenter{margin:0 auto}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){div.sw-pinit{display:inline-block!important;max-width:100%}}.swp_hidden_pin_image{height:0;opacity:0;position:absolute;top:0;width:0}.fl-module-content .uabb-blog-posts .uabb-post-thumbnail .sw-pinit.lazyloaded{display:block!important}@-moz-document url-prefix(){.swp_social_panel .total_shares .swp_label{margin-top:8px}}.swp-content-locator{display:none!important;margin:0!important}.float-position-top-left{transform-origin:top left}.float-position-center-left{transform-origin:center left}.float-position-bottom-left{transform-origin:bottom left}.float-position-top-right{transform-origin:top right}.float-position-center-right{transform-origin:center right}.float-position-bottom-right{transform-origin:bottom right}div[class*=custom_color][class^=_wrapper]{display:none}
functions/admin/options-registration.php CHANGED
@@ -1,87 +1,87 @@
1
- <?php
2
- /**
3
- * Functions for loading the admin options page.
4
- *
5
- * @package SocialWarfare\Admin\Functions
6
- * @copyright Copyright (c) 2018, Warfare Plugins, LLC
7
- * @license GPL-3.0+
8
- * @since 1.0.0
9
- */
10
-
11
- $premium_code = '';
12
- $email = '';
13
-
14
- // Fetch the registration keys from pro and all other addons
15
- $array = array();
16
- $registrations = apply_filters('swp_registrations' , $array);
17
-
18
- foreach($registrations as $registration):
19
- if ( ! empty( $swp_user_options[$registration['key'].'_license_key'] ) ) {
20
- $license_key = $swp_user_options[$registration['key'].'_license_key'];
21
- $registered = 1;
22
- } else {
23
- $license_key = '';
24
- $registered = 0;
25
- }
26
- ?>
27
-
28
- <div class="registration-wrapper <?php echo $registration['key'] ?>" registration="<?php echo $registered; ?>">
29
-
30
- <h2><?php esc_html_e( $registration['plugin_name'].' Registration' , 'social-warfare' ); ?></h2>
31
-
32
- <div class="sw-grid sw-col-940 swp_is_not_registered">
33
-
34
- <div class="sw-red-notice">
35
- <?php _e( 'This copy of '.$registration['plugin_name'].' is NOT registered. <a target="_blank" href="https://warfareplugins.com">Click here</a> to purchase a license or add your account info below.' , 'social-warfare' ); ?>
36
- </div>
37
-
38
- <p class="sw-subtitle sw-registration-text">
39
- <?php esc_html_e( 'Enter your registration key for '.$registration['plugin_name'] .' and then click Register Plugin.' , 'social-warfare' ); ?>
40
- </p>
41
-
42
- <div class="sw-grid sw-col-300">
43
- <p class="sw-input-label">
44
- <?php esc_html_e( $registration['plugin_name'].' License Key' , 'social-warfare' ); ?>
45
- </p>
46
- </div>
47
-
48
- <div class="sw-grid sw-col-300">
49
- <input name="<?php echo $registration['key'] ?>_license_key" type="text" class="sw-admin-input" placeholder="License Key" value="<?php echo $license_key; ?>" />
50
- </div>
51
-
52
- <div class="sw-grid sw-col-300 sw-fit register_button_grid">
53
- <a href="#" class="register-plugin button sw-navy-button" swp-addon="<?php echo $registration['key']; ?>" swp-item-id="<?php echo $registration["product_id"]; ?>">
54
- <?php esc_html_e( 'Register Plugin' , 'social-warfare' ); ?>
55
- </a>
56
- </div>
57
-
58
- <div class="sw-clearfix"></div>
59
- </div>
60
-
61
- <div class="sw-grid sw-col-940 swp_is_registered">
62
-
63
- <div class="sw-green-notice">
64
- <?php esc_html_e( 'This copy of '.$registration['plugin_name'].' is registered. Wah-hoo!', 'social-warfare' ); ?>
65
- </div>
66
-
67
- <p class="sw-subtitle sw-registration-text">
68
- <?php esc_html_e( 'To unregister your license click the button below to free it up for use on another domain.' , 'social-warfare' ); ?>
69
- </p>
70
-
71
- <div class="sw-grid sw-col-300">
72
- <p class="sw-authenticate-label">
73
- <?php esc_html_e( 'Deactivate Registration' , 'social-warfare' ); ?>
74
- </p>
75
- </div>
76
-
77
- <div class="sw-grid sw-col-300">
78
- <a href="#" class="unregister-plugin button sw-navy-button" swp-addon="<?php echo $registration['key']; ?>" swp-item-id="<?php echo $registration["product_id"]; ?>">
79
- <?php esc_html_e( 'Unregister Plugin' , 'social-warfare' ); ?>
80
- </a>
81
- </div>
82
- <div class="sw-grid sw-col-300 sw-fit"></div>
83
-
84
- </div>
85
-
86
- </div>
87
- <?php endforeach; ?>
1
+ <?php
2
+ /**
3
+ * Functions for loading the admin options page.
4
+ *
5
+ * @package SocialWarfare\Admin\Functions
6
+ * @copyright Copyright (c) 2018, Warfare Plugins, LLC
7
+ * @license GPL-3.0+
8
+ * @since 1.0.0
9
+ */
10
+
11
+ $premium_code = '';
12
+ $email = '';
13
+
14
+ // Fetch the registration keys from pro and all other addons
15
+ $array = array();
16
+ $registrations = apply_filters('swp_registrations' , $array);
17
+
18
+ foreach($registrations as $registration):
19
+ if ( ! empty( $swp_user_options[$registration['key'].'_license_key'] ) ) {
20
+ $license_key = $swp_user_options[$registration['key'].'_license_key'];
21
+ $registered = 1;
22
+ } else {
23
+ $license_key = '';
24
+ $registered = 0;
25
+ }
26
+ ?>
27
+
28
+ <div class="registration-wrapper <?php echo $registration['key'] ?>" registration="<?php echo $registered; ?>">
29
+
30
+ <h2><?php esc_html_e( $registration['plugin_name'].' Registration' , 'social-warfare' ); ?></h2>
31
+
32
+ <div class="sw-grid sw-col-940 swp_is_not_registered">
33
+
34
+ <div class="sw-red-notice">
35
+ <?php _e( 'This copy of '.$registration['plugin_name'].' is NOT registered. <a target="_blank" href="https://warfareplugins.com">Click here</a> to purchase a license or add your account info below.' , 'social-warfare' ); ?>
36
+ </div>
37
+
38
+ <p class="sw-subtitle sw-registration-text">
39
+ <?php esc_html_e( 'Enter your registration key for '.$registration['plugin_name'] .' and then click Register Plugin.' , 'social-warfare' ); ?>
40
+ </p>
41
+
42
+ <div class="sw-grid sw-col-300">
43
+ <p class="sw-input-label">
44
+ <?php esc_html_e( $registration['plugin_name'].' License Key' , 'social-warfare' ); ?>
45
+ </p>
46
+ </div>
47
+
48
+ <div class="sw-grid sw-col-300">
49
+ <input name="<?php echo $registration['key'] ?>_license_key" type="text" class="sw-admin-input" placeholder="License Key" value="<?php echo $license_key; ?>" />
50
+ </div>
51
+
52
+ <div class="sw-grid sw-col-300 sw-fit register_button_grid">
53
+ <a href="#" class="register-plugin button sw-navy-button" swp-addon="<?php echo $registration['key']; ?>" swp-item-id="<?php echo $registration["product_id"]; ?>">
54
+ <?php esc_html_e( 'Register Plugin' , 'social-warfare' ); ?>
55
+ </a>
56
+ </div>
57
+
58
+ <div class="sw-clearfix"></div>
59
+ </div>
60
+
61
+ <div class="sw-grid sw-col-940 swp_is_registered">
62
+
63
+ <div class="sw-green-notice">
64
+ <?php esc_html_e( 'This copy of '.$registration['plugin_name'].' is registered. Wah-hoo!', 'social-warfare' ); ?>
65
+ </div>
66
+
67
+ <p class="sw-subtitle sw-registration-text">
68
+ <?php esc_html_e( 'To unregister your license click the button below to free it up for use on another domain.' , 'social-warfare' ); ?>
69
+ </p>
70
+
71
+ <div class="sw-grid sw-col-300">
72
+ <p class="sw-authenticate-label">
73
+ <?php esc_html_e( 'Deactivate Registration' , 'social-warfare' ); ?>
74
+ </p>
75
+ </div>
76
+
77
+ <div class="sw-grid sw-col-300">
78
+ <a href="#" class="unregister-plugin button sw-navy-button" swp-addon="<?php echo $registration['key']; ?>" swp-item-id="<?php echo $registration["product_id"]; ?>">
79
+ <?php esc_html_e( 'Unregister Plugin' , 'social-warfare' ); ?>
80
+ </a>
81
+ </div>
82
+ <div class="sw-grid sw-col-300 sw-fit"></div>
83
+
84
+ </div>
85
+
86
+ </div>
87
+ <?php endforeach; ?>
functions/admin/registration.php CHANGED
@@ -59,6 +59,7 @@ function swp_get_registration_key( $domain, $context = 'api' ) {
59
  * Once per week, we'll ping our server to ask if the license key is still valid.
60
  *
61
  * @since 2.3.3 - Created the function to work for all addons, not just the pro addon
 
62
  * @param string The unique key for the addon
63
  * @return bool True if the plugin is registered, false otherwise.
64
  */
@@ -91,6 +92,11 @@ function is_swp_addon_registered($key) {
91
  $store_url = 'https://warfareplugins.com';
92
  $registration_array = array();
93
  $registration_array = apply_filters( 'swp_registrations' , $registration_array );
 
 
 
 
 
94
  $item_id = $registration_array[$key]['product_id'];
95
 
96
 
59
  * Once per week, we'll ping our server to ask if the license key is still valid.
60
  *
61
  * @since 2.3.3 - Created the function to work for all addons, not just the pro addon
62
+ * @since 3.0.6 | 14 MAY 2018 | Added check for array key to prevent undefined index notice.
63
  * @param string The unique key for the addon
64
  * @return bool True if the plugin is registered, false otherwise.
65
  */
92
  $store_url = 'https://warfareplugins.com';
93
  $registration_array = array();
94
  $registration_array = apply_filters( 'swp_registrations' , $registration_array );
95
+
96
+ if ( !array_key_exists( $key, $registration_array ) ) :
97
+ return $is_registered;
98
+ endif;
99
+
100
  $item_id = $registration_array[$key]['product_id'];
101
 
102
 
functions/admin/swp_system_checker.php CHANGED
@@ -1,147 +1,147 @@
1
- <?php
2
- /**
3
- * A series of classes to check the user's system for minimum system requirements
4
- *
5
- * @package social-warfare\functions\admin
6
- * @copyright Copyright (c) 2018, Warfare Plugins, LLC
7
- * @license GPL-3.0+
8
- * @since 2.2.4 | Created | 1 MAY 2017
9
- */
10
-
11
- /**
12
- * A class for initializing the system checks
13
- *
14
- * @since 2.2.4 | Created | 1 MAY 2017
15
- * @access public
16
- */
17
- abstract class swp_custom_check
18
- {
19
- public $name = "";
20
- public $whats_wrong = "";
21
- public $how_to_fix= "";
22
- public $check_passed = null;
23
- public $additional_message = null;
24
-
25
- /**
26
- * Force children to have an executable run method.
27
- */
28
- abstract public function run();
29
- }
30
-
31
- /**
32
- * A series of classes to check the user's system for minimum system requirements
33
- *
34
- * @since 2.2.4 | Created | 6 March 2017
35
- * @access public
36
- * @return string The HTML for an error notice if triggered
37
- */
38
- class swp_system_checker
39
- {
40
- public static $custom_checks = array();
41
- public static $has_error = FALSE;
42
-
43
- public static function full_system_check()
44
- {
45
- swp_system_checker::load_all_checks();
46
- swp_system_checker::run_all_checks();
47
- swp_system_checker::print_all_errors();
48
-
49
- }
50
-
51
- public static function load_all_checks()
52
- {
53
- swp_system_checker::$custom_checks[ 'swp_php_check' ] = new swp_php_check();
54
- swp_system_checker::$custom_checks[ 'swp_curl_check' ] = new swp_curl_check();
55
- }
56
-
57
- public static function run_all_checks()
58
- {
59
- foreach( swp_system_checker::$custom_checks as $custom_check )
60
- {
61
- if( method_exists( $custom_check, 'run' ) ) {
62
- if( !$custom_check->run() && !$custom_check->check_passed ) {
63
- swp_system_checker::$has_error = true;
64
- }
65
- }
66
- }
67
- }
68
-
69
- public static function print_all_errors()
70
- {
71
- if( !isset( swp_system_checker::$has_error ) || empty( swp_system_checker::$has_error ) ) {
72
- return FALSE;
73
- }
74
-
75
- foreach( swp_system_checker::$custom_checks as $custom_check )
76
- {
77
- if( $custom_check->check_passed ) {
78
- continue;
79
- }
80
-
81
- echo '<div class="sw-red-notice">' . $custom_check->whats_wrong . $custom_check->how_to_fix . '</div>';
82
- }
83
- }
84
- }
85
-
86
- /**
87
- * A class to detect if the user is using a compatible version of PHP (5.3+) on their server
88
- *
89
- * @since 2.2.4 | Created | 1 MAY 2017
90
- * @access public
91
- * @return string The HTML for an error notice if triggered
92
- */
93
- class swp_php_check extends swp_custom_check
94
- {
95
- public function __construct()
96
- {
97
- $this->name = 'PHP Check';
98
- }
99
-
100
- public function run()
101
- {
102
- if( version_compare( PHP_VERSION, '5.2.0' ) >= 0 )
103
- {
104
- $this->check_passed = true;
105
- }
106
- else
107
- {
108
- $this->check_passed = false;
109
- $this->whats_wrong = 'Your server is currently using PHP version '.PHP_VERSION.'. In order for our plugin to fetch share counts properly, you must be using PHP 5.3 or newer.';
110
- $this->how_to_fix = 'To fix this, simply contact your hosting provider and ask them to update your server to the latest stable version of PHP.';
111
- }
112
-
113
- return $this->check_passed;
114
- }
115
- }
116
-
117
- /**
118
- * A class to detect if the user has cURL enabled on their server. cURL is a requirement of the plugin.
119
- *
120
- * @since 2.2.4 | Created | 1 MAY 2017
121
- * @access public
122
- * @return string The HTML for an error notice if triggered
123
- */
124
- class swp_curl_check extends swp_custom_check
125
- {
126
- public function __construct()
127
- {
128
- $this->name = 'Curl Check';
129
- }
130
-
131
- public function run()
132
- {
133
-
134
- if( function_exists( 'curl_version' ) )
135
- {
136
- $this->check_passed = true;
137
- }
138
- else
139
- {
140
- $this->check_passed = false;
141
- $this->whats_wrong = 'Your server has cURL disabled. In order for our plugin to fetch share counts, you must have cURL enabled on your server.';
142
- $this->how_to_fix = 'To fix this, simply contact your hosting provider and ask them to activate cURL on your server.';
143
- }
144
-
145
- return $this->check_passed;
146
- }
147
- }
1
+ <?php
2
+ /**
3
+ * A series of classes to check the user's system for minimum system requirements
4
+ *
5
+ * @package social-warfare\functions\admin
6
+ * @copyright Copyright (c) 2018, Warfare Plugins, LLC
7
+ * @license GPL-3.0+
8
+ * @since 2.2.4 | Created | 1 MAY 2017
9
+ */
10
+
11
+ /**
12
+ * A class for initializing the system checks
13
+ *
14
+ * @since 2.2.4 | Created | 1 MAY 2017
15
+ * @access public
16
+ */
17
+ abstract class swp_custom_check
18
+ {
19
+ public $name = "";
20
+ public $whats_wrong = "";
21
+ public $how_to_fix= "";
22
+ public $check_passed = null;
23
+ public $additional_message = null;
24
+
25
+ /**
26
+ * Force children to have an executable run method.
27
+ */
28
+ abstract public function run();
29
+ }
30
+
31
+ /**
32
+ * A series of classes to check the user's system for minimum system requirements
33
+ *
34
+ * @since 2.2.4 | Created | 6 March 2017
35
+ * @access public
36
+ * @return string The HTML for an error notice if triggered
37
+ */
38
+ class swp_system_checker
39
+ {
40
+ public static $custom_checks = array();
41
+ public static $has_error = FALSE;
42
+
43
+ public static function full_system_check()
44
+ {
45
+ swp_system_checker::load_all_checks();
46
+ swp_system_checker::run_all_checks();
47
+ swp_system_checker::print_all_errors();
48
+
49
+ }
50
+
51
+ public static function load_all_checks()
52
+ {
53
+ swp_system_checker::$custom_checks[ 'swp_php_check' ] = new swp_php_check();
54
+ swp_system_checker::$custom_checks[ 'swp_curl_check' ] = new swp_curl_check();
55
+ }
56
+
57
+ public static function run_all_checks()
58
+ {
59
+ foreach( swp_system_checker::$custom_checks as $custom_check )
60
+ {
61
+ if( method_exists( $custom_check, 'run' ) ) {
62
+ if( !$custom_check->run() && !$custom_check->check_passed ) {
63
+ swp_system_checker::$has_error = true;
64
+ }
65
+ }
66
+ }
67
+ }
68
+
69
+ public static function print_all_errors()
70
+ {
71
+ if( !isset( swp_system_checker::$has_error ) || empty( swp_system_checker::$has_error ) ) {
72
+ return FALSE;
73
+ }
74
+
75
+ foreach( swp_system_checker::$custom_checks as $custom_check )
76
+ {
77
+ if( $custom_check->check_passed ) {
78
+ continue;
79
+ }
80
+
81
+ echo '<div class="sw-red-notice">' . $custom_check->whats_wrong . $custom_check->how_to_fix . '</div>';
82
+ }
83
+ }
84
+ }
85
+
86
+ /**
87
+ * A class to detect if the user is using a compatible version of PHP (5.3+) on their server
88
+ *
89
+ * @since 2.2.4 | Created | 1 MAY 2017
90
+ * @access public
91
+ * @return string The HTML for an error notice if triggered
92
+ */
93
+ class swp_php_check extends swp_custom_check
94
+ {
95
+ public function __construct()
96
+ {
97
+ $this->name = 'PHP Check';
98
+ }
99
+
100
+ public function run()
101
+ {
102
+ if( version_compare( PHP_VERSION, '5.2.0' ) >= 0 )
103
+ {
104
+ $this->check_passed = true;
105
+ }
106
+ else
107
+ {
108
+ $this->check_passed = false;
109
+ $this->whats_wrong = 'Your server is currently using PHP version '.PHP_VERSION.'. In order for our plugin to fetch share counts properly, you must be using PHP 5.3 or newer.';
110
+ $this->how_to_fix = 'To fix this, simply contact your hosting provider and ask them to update your server to the latest stable version of PHP.';
111
+ }
112
+
113
+ return $this->check_passed;
114
+ }
115
+ }
116
+
117
+ /**
118
+ * A class to detect if the user has cURL enabled on their server. cURL is a requirement of the plugin.
119
+ *
120
+ * @since 2.2.4 | Created | 1 MAY 2017
121
+ * @access public
122
+ * @return string The HTML for an error notice if triggered
123
+ */
124
+ class swp_curl_check extends swp_custom_check
125
+ {
126
+ public function __construct()
127
+ {
128
+ $this->name = 'Curl Check';
129
+ }
130
+
131
+ public function run()
132
+ {
133
+
134
+ if( function_exists( 'curl_version' ) )
135
+ {
136
+ $this->check_passed = true;
137
+ }
138
+ else
139
+ {
140
+ $this->check_passed = false;
141
+ $this->whats_wrong = 'Your server has cURL disabled. In order for our plugin to fetch share counts, you must have cURL enabled on your server.';
142
+ $this->how_to_fix = 'To fix this, simply contact your hosting provider and ask them to activate cURL on your server.';
143
+ }
144
+
145
+ return $this->check_passed;
146
+ }
147
+ }
functions/frontend-output/SWP_Buttons_Panel.php CHANGED
@@ -93,7 +93,7 @@ class SWP_Buttons_Panel {
93
  * @param optional array $args The arguments passed in via shortcode.
94
  *
95
  */
96
- public function __construct( $args = array() ) {
97
  global $swp_social_networks, $post;
98
  $this->networks = $swp_social_networks;
99
  $this->args = $args;
@@ -107,6 +107,7 @@ class SWP_Buttons_Panel {
107
  'post_status' => $post->post_status,
108
  'post_content' => $post->post_content
109
  ];
 
110
  $this->localize_options( $args );
111
  $this->establish_post_id();
112
  $this->shares = get_social_warfare_shares( $this->post_data['ID'] );
@@ -114,6 +115,12 @@ class SWP_Buttons_Panel {
114
  $this->establish_float_location();
115
  $this->establish_permalink();
116
  $this->establish_active_buttons();
 
 
 
 
 
 
117
  }
118
  /**
119
  * Localize the global options
@@ -264,6 +271,8 @@ class SWP_Buttons_Panel {
264
  $this->location = $this->options['location_archive_categories'];
265
  endif;
266
  }
 
 
267
  /**
268
  * Takes a display name and returns the snake_cased key of that name.
269
  *
@@ -278,6 +287,8 @@ class SWP_Buttons_Panel {
278
  public function display_name_to_key( $string ) {
279
  return preg_replace( '/[\s]+/', '_', strtolower( trim ( $string ) ) );
280
  }
 
 
281
  protected function establish_float_location() {
282
  // Set the options for the horizontal floating bar
283
  // $spec_float_where = get_post_meta( $this->post_data['ID'] , 'nc_float_location' , true );
@@ -292,9 +303,13 @@ class SWP_Buttons_Panel {
292
  // $floatOption = 'floatNone';
293
  // endif;
294
  }
 
 
295
  protected function establish_permalink() {
296
  $this->permalink = get_permalink( $this->post_data['ID'] );
297
  }
 
 
298
  //* When we have known incompatability with other themes/plugins,
299
  //* we can put those checks in here.
300
  /**
@@ -350,6 +365,7 @@ class SWP_Buttons_Panel {
350
  * @since 3.0.0 | 25 APR 2018 | Created
351
  * @since 3.0.3 | 09 MAY 2018 | Switched the button locations to use the
352
  * location methods instead of the raw options value.
 
353
  * @param boolean $echo Echo's the content or returns it if false.
354
  * @return string The string of HTML.
355
  *
@@ -363,21 +379,21 @@ class SWP_Buttons_Panel {
363
  $total_shares_html = $this->render_total_shares_html();
364
  $buttons = $this->render_buttons_html();
365
  // Create the HTML Buttons panel wrapper
366
- $container = '<div class="swp_social_panel swp_' . $this->options['button_shape'] .
367
- ' swp_default_' . $this->options['default_colors'] .
368
- ' swp_individual_' . $this->options['single_colors'] .
369
- ' swp_other_' . $this->options['hover_colors'] .
370
- ' scale-' . $this->options['button_size'] * 100 .
371
- ' scale-' . $this->options['button_alignment'] .
372
- '" data-position="' . $this->options['location_post'] .
373
  '" data-float="' . $this->get_float_location() .
374
  '" data-float-mobile="' . $this->get_mobile_float_location() .
375
  '" data-count="' . $this->total_shares .
376
- '" data-floatcolor="' . $this->options['float_background_color'] . '
377
  ">';
378
  //* This should be inserted via addon, not here.
379
- //'" data-emphasize="'.$this->options['emphasize_icons'].'
380
- if ($this->options['totals_alignment'] === 'totals_left') :
381
  $buttons = $total_shares_html . $buttons;
382
  else:
383
  $buttons .= $total_shares_html;
@@ -417,6 +433,7 @@ class SWP_Buttons_Panel {
417
 
418
  }
419
 
 
420
  /**
421
  * A Method to determine the location of the floating buttons
422
  *
@@ -466,6 +483,7 @@ class SWP_Buttons_Panel {
466
  endif;
467
  }
468
 
 
469
  public function render_floating_HTML( $echo = true ) {
470
  //* BEGIN Old boilerplate that needs to be refactored.
471
 
@@ -535,6 +553,8 @@ class SWP_Buttons_Panel {
535
  return $html;
536
  endif;
537
  }
 
 
538
  /**
539
  * A method to establish the active buttons for this panel.
540
  *
@@ -586,6 +606,8 @@ class SWP_Buttons_Panel {
586
  $this->networks = $network_objects;
587
  return $this;
588
  }
 
 
589
  /**
590
  * A method to order the networks dynamically.
591
  *
@@ -608,6 +630,8 @@ class SWP_Buttons_Panel {
608
  endif;
609
  return $order;
610
  }
 
 
611
  /**
612
  * A method to shuffle the array of network objects.
613
  *
@@ -627,6 +651,8 @@ class SWP_Buttons_Panel {
627
  }
628
  return $network_objects;
629
  }
 
 
630
  public function render_buttons_HTML( $max_count = null) {
631
  $html = '';
632
  $count = 0;
@@ -656,7 +682,9 @@ class SWP_Buttons_Panel {
656
  *
657
  */
658
  public function render_total_shares_html() {
659
- if ( empty( $this->shares['total_shares']) || $this->shares['total_shares'] < $this->option('minimum_shares') || false == $this->option('total_shares') ) {
 
 
660
  return '';
661
  }
662
  $html = '<div class="nc_tweetContainer total_shares total_sharesalt" >';
@@ -664,6 +692,8 @@ class SWP_Buttons_Panel {
664
  $html .= '</div>';
665
  return $html;
666
  }
 
 
667
  //* TODO: This has not been refactored.
668
  protected function handle_timestamp() {
669
  if ( swp_is_cache_fresh( $this->post_data['ID'] ) == false && isset($this->options['cache_method']) && 'legacy' === $this->options['cache_method'] ) :
@@ -671,16 +701,18 @@ class SWP_Buttons_Panel {
671
  update_post_meta( $this->post_data['ID'],'swp_cache_timestamp',floor( ((date( 'U' ) / 60) / 60) ) );
672
  endif;
673
  }
 
 
674
  /**
675
  * Handles whether to echo the HTML or return it as a string.
676
  *
677
  * @return mixed null if set to echo, else a string of HTML.
 
678
  *
679
  */
680
  public function do_print() {
681
 
682
  $this->render_HTML();
683
- $content = $this->content . '<p class="swp-content-locator"></p>';
684
 
685
  //* Add the Panel markup based on the location.
686
  if ( $this->location === 'both' ) :
@@ -703,6 +735,14 @@ class SWP_Buttons_Panel {
703
  return $this->content;
704
  }
705
 
 
 
 
 
 
 
 
 
706
  public function the_buttons( $content = null ) {
707
  if ( empty( $this->content ) ) :
708
  return $this->do_print();
@@ -722,10 +762,6 @@ class SWP_Buttons_Panel {
722
 
723
  $this->handle_timestamp();
724
 
725
- if ( strpos( $this->content, 'swp-content-locator' ) === false ) {
726
- $this->content .= '<p class="swp-content-locator"></p>';
727
- }
728
-
729
  return $this->do_print();
730
  }
731
  }
93
  * @param optional array $args The arguments passed in via shortcode.
94
  *
95
  */
96
+ public function __construct( $args = array(), $shortcode = false ) {
97
  global $swp_social_networks, $post;
98
  $this->networks = $swp_social_networks;
99
  $this->args = $args;
107
  'post_status' => $post->post_status,
108
  'post_content' => $post->post_content
109
  ];
110
+ $this->is_shortcode = $shortcode;
111
  $this->localize_options( $args );
112
  $this->establish_post_id();
113
  $this->shares = get_social_warfare_shares( $this->post_data['ID'] );
115
  $this->establish_float_location();
116
  $this->establish_permalink();
117
  $this->establish_active_buttons();
118
+
119
+ if ( true === _swp_is_debug( 'show_button_panel_data' ) ) :
120
+ echo "<pre>";
121
+ var_dump($this);
122
+ echo "</pre>";
123
+ endif;
124
  }
125
  /**
126
  * Localize the global options
271
  $this->location = $this->options['location_archive_categories'];
272
  endif;
273
  }
274
+
275
+
276
  /**
277
  * Takes a display name and returns the snake_cased key of that name.
278
  *
287
  public function display_name_to_key( $string ) {
288
  return preg_replace( '/[\s]+/', '_', strtolower( trim ( $string ) ) );
289
  }
290
+
291
+
292
  protected function establish_float_location() {
293
  // Set the options for the horizontal floating bar
294
  // $spec_float_where = get_post_meta( $this->post_data['ID'] , 'nc_float_location' , true );
303
  // $floatOption = 'floatNone';
304
  // endif;
305
  }
306
+
307
+
308
  protected function establish_permalink() {
309
  $this->permalink = get_permalink( $this->post_data['ID'] );
310
  }
311
+
312
+
313
  //* When we have known incompatability with other themes/plugins,
314
  //* we can put those checks in here.
315
  /**
365
  * @since 3.0.0 | 25 APR 2018 | Created
366
  * @since 3.0.3 | 09 MAY 2018 | Switched the button locations to use the
367
  * location methods instead of the raw options value.
368
+ * @since 3.0.6 | 15 MAY 2018 | Uses $this->option() method to prevent undefined index error.
369
  * @param boolean $echo Echo's the content or returns it if false.
370
  * @return string The string of HTML.
371
  *
379
  $total_shares_html = $this->render_total_shares_html();
380
  $buttons = $this->render_buttons_html();
381
  // Create the HTML Buttons panel wrapper
382
+ $container = '<div class="swp_social_panel swp_' . $this->option('button_shape') .
383
+ ' swp_default_' . $this->option('default_colors') .
384
+ ' swp_individual_' . $this->option('single_colors') .
385
+ ' swp_other_' . $this->option('hover_colors') .
386
+ ' scale-' . $this->option('button_size') * 100 .
387
+ ' scale-' . $this->option('button_alignment') .
388
+ '" data-position="' . $this->option('location_post') .
389
  '" data-float="' . $this->get_float_location() .
390
  '" data-float-mobile="' . $this->get_mobile_float_location() .
391
  '" data-count="' . $this->total_shares .
392
+ '" data-floatcolor="' . $this->option('float_background_color') . '
393
  ">';
394
  //* This should be inserted via addon, not here.
395
+ //'" data-emphasize="'.$this->option('emphasize_icons').'
396
+ if ($this->option('totals_alignment') === 'totals_left') :
397
  $buttons = $total_shares_html . $buttons;
398
  else:
399
  $buttons .= $total_shares_html;
433
 
434
  }
435
 
436
+
437
  /**
438
  * A Method to determine the location of the floating buttons
439
  *
483
  endif;
484
  }
485
 
486
+
487
  public function render_floating_HTML( $echo = true ) {
488
  //* BEGIN Old boilerplate that needs to be refactored.
489
 
553
  return $html;
554
  endif;
555
  }
556
+
557
+
558
  /**
559
  * A method to establish the active buttons for this panel.
560
  *
606
  $this->networks = $network_objects;
607
  return $this;
608
  }
609
+
610
+
611
  /**
612
  * A method to order the networks dynamically.
613
  *
630
  endif;
631
  return $order;
632
  }
633
+
634
+
635
  /**
636
  * A method to shuffle the array of network objects.
637
  *
651
  }
652
  return $network_objects;
653
  }
654
+
655
+
656
  public function render_buttons_HTML( $max_count = null) {
657
  $html = '';
658
  $count = 0;
682
  *
683
  */
684
  public function render_total_shares_html() {
685
+ $buttons = isset( $this->args['buttons'] ) ? $this->args['buttons'] : [];
686
+
687
+ if ( empty( $this->shares['total_shares']) || $this->shares['total_shares'] < $this->option('minimum_shares') || false == $this->option('total_shares') || $this->is_shortcode && !in_array( 'total', $buttons ) ) {
688
  return '';
689
  }
690
  $html = '<div class="nc_tweetContainer total_shares total_sharesalt" >';
692
  $html .= '</div>';
693
  return $html;
694
  }
695
+
696
+
697
  //* TODO: This has not been refactored.
698
  protected function handle_timestamp() {
699
  if ( swp_is_cache_fresh( $this->post_data['ID'] ) == false && isset($this->options['cache_method']) && 'legacy' === $this->options['cache_method'] ) :
701
  update_post_meta( $this->post_data['ID'],'swp_cache_timestamp',floor( ((date( 'U' ) / 60) / 60) ) );
702
  endif;
703
  }
704
+
705
+
706
  /**
707
  * Handles whether to echo the HTML or return it as a string.
708
  *
709
  * @return mixed null if set to echo, else a string of HTML.
710
+ * @since 3.0.6 | 14 MAY 2018 | Removed the swp-content-locator div.
711
  *
712
  */
713
  public function do_print() {
714
 
715
  $this->render_HTML();
 
716
 
717
  //* Add the Panel markup based on the location.
718
  if ( $this->location === 'both' ) :
735
  return $this->content;
736
  }
737
 
738
+ /**
739
+ * Runs checks before ordering a set of buttons.
740
+ *
741
+ * @param string $content The WordPress content, if passed in.
742
+ * @return function @see $this->do_print
743
+ * @since 3.0.6 | 14 MAY 2018 | Removed the swp-content-locator div.
744
+ *
745
+ */
746
  public function the_buttons( $content = null ) {
747
  if ( empty( $this->content ) ) :
748
  return $this->do_print();
762
 
763
  $this->handle_timestamp();
764
 
 
 
 
 
765
  return $this->do_print();
766
  }
767
  }
functions/frontend-output/SWP_Display.php CHANGED
@@ -22,19 +22,19 @@ class SWP_Display {
22
  */
23
  global $swp_already_print;
24
  global $swp_user_options;
 
25
  if ( !is_array( $swp_already_print ) ) {
26
- $swp_already_print = array();
27
  }
28
 
29
-
30
  $this->already_printed = $swp_already_print;
31
  $this->options = $swp_user_options;
32
 
33
  // Hook into the template_redirect so that is_singular() conditionals will be ready
34
- add_action('template_redirect', array($this, 'activate_buttons') );
35
 
36
  // Add the side floating buttons to the footer if they are activated
37
- if ( in_array( swp_get_option('float_location') , array( 'left', 'right' ), true ) ) {
38
  add_action( 'wp_footer', [$this, 'floating_buttons_side'] );
39
  }
40
  }
@@ -42,6 +42,7 @@ class SWP_Display {
42
  * A function to add the buttons
43
  *
44
  * @since 2.1.4
 
45
  * @param none
46
  * @return none
47
  *
@@ -52,17 +53,30 @@ class SWP_Display {
52
 
53
  // Only hook into the_content filter if we're is_singular() is true or they don't use excerpts
54
  if( true === is_singular() || true === $swp_user_options['full_content'] ):
55
- add_filter( 'the_content', array($this, 'social_warfare_wrapper'), 20 );
 
56
  endif;
57
 
58
  if (false == is_singular()) {
59
  global $wp_filter;
60
  // Add the buttons to the excerpts
61
 
62
- add_filter( 'the_excerpt', array($this, 'social_warfare_wrapper') );
63
  }
64
  }
65
 
 
 
 
 
 
 
 
 
 
 
 
 
66
 
67
  /**
68
  * A wrapper function for adding the buttons, content, or excerpt.
@@ -91,8 +105,6 @@ class SWP_Display {
91
 
92
  }
93
 
94
-
95
-
96
  /**
97
  * The main social_warfare function used to create the buttons.
98
  *
@@ -101,7 +113,7 @@ class SWP_Display {
101
  * @return string $content The modified content
102
  *
103
  */
104
- public static function social_warfare( $args = array() ) {
105
  $Buttons_Panel = new SWP_Buttons_Panel( $args );
106
 
107
  echo $Buttons_Panel->render_HTML();
22
  */
23
  global $swp_already_print;
24
  global $swp_user_options;
25
+
26
  if ( !is_array( $swp_already_print ) ) {
27
+ $swp_already_print = [];
28
  }
29
 
 
30
  $this->already_printed = $swp_already_print;
31
  $this->options = $swp_user_options;
32
 
33
  // Hook into the template_redirect so that is_singular() conditionals will be ready
34
+ add_action('template_redirect', [$this, 'activate_buttons'] );
35
 
36
  // Add the side floating buttons to the footer if they are activated
37
+ if ( in_array( swp_get_option('float_location') , ['left', 'right'], true ) ) {
38
  add_action( 'wp_footer', [$this, 'floating_buttons_side'] );
39
  }
40
  }
42
  * A function to add the buttons
43
  *
44
  * @since 2.1.4
45
+ * @since 3.0.6 | 14 MAY | Added second filter for the_content.
46
  * @param none
47
  * @return none
48
  *
53
 
54
  // Only hook into the_content filter if we're is_singular() is true or they don't use excerpts
55
  if( true === is_singular() || true === $swp_user_options['full_content'] ):
56
+ add_filter( 'the_content', [$this, 'social_warfare_wrapper'], 20 );
57
+ add_filter( 'the_content', [$this, 'add_content_locator'], 20);
58
  endif;
59
 
60
  if (false == is_singular()) {
61
  global $wp_filter;
62
  // Add the buttons to the excerpts
63
 
64
+ add_filter( 'the_excerpt', [$this, 'social_warfare_wrapper'] );
65
  }
66
  }
67
 
68
+ /**
69
+ * Inserts the empty div for locating Pin images (with javascript).
70
+ *
71
+ * @param string $content The WordPress content passed via filter.
72
+ * @since 3.0.6 | 14 MAY | Created the method.
73
+ *
74
+ */
75
+ public function add_content_locator( $content ) {
76
+ $content .= '<div class="swp-content-locator"></div>';
77
+ return $content;
78
+ }
79
+
80
 
81
  /**
82
  * A wrapper function for adding the buttons, content, or excerpt.
105
 
106
  }
107
 
 
 
108
  /**
109
  * The main social_warfare function used to create the buttons.
110
  *
113
  * @return string $content The modified content
114
  *
115
  */
116
+ public static function social_warfare( $args = [] ) {
117
  $Buttons_Panel = new SWP_Buttons_Panel( $args );
118
 
119
  echo $Buttons_Panel->render_HTML();
functions/frontend-output/SWP_Shortcode.php CHANGED
@@ -73,7 +73,7 @@ class SWP_Shortcode {
73
  $args = array();
74
  endif;
75
 
76
- $buttons_panel = new SWP_Buttons_Panel( $args );
77
  return $buttons_panel->render_HTML();
78
  }
79
 
73
  $args = array();
74
  endif;
75
 
76
+ $buttons_panel = new SWP_Buttons_Panel( $args, true );
77
  return $buttons_panel->render_HTML();
78
  }
79
 
functions/legacy/update-checker.php ADDED
@@ -0,0 +1,491 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) exit;
5
+
6
+ /**
7
+ * Allows plugins to use their own update API.
8
+ *
9
+ * @author Easy Digital Downloads
10
+ * @version 1.6.14
11
+ */
12
+ class SW_EDD_SL_Plugin_Updater {
13
+
14
+ private $api_url = '';
15
+ private $api_data = array();
16
+ private $name = '';
17
+ private $slug = '';
18
+ private $version = '';
19
+ private $wp_override = false;
20
+ private $cache_key = '';
21
+
22
+ /**
23
+ * Class constructor.
24
+ *
25
+ * @uses plugin_basename()
26
+ * @uses hook()
27
+ *
28
+ * @param string $_api_url The URL pointing to the custom API endpoint.
29
+ * @param string $_plugin_file Path to the plugin file.
30
+ * @param array $_api_data Optional data to send with API calls.
31
+ */
32
+ public function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
33
+
34
+ global $edd_plugin_data;
35
+
36
+ $this->api_url = trailingslashit( $_api_url );
37
+ $this->api_data = $_api_data;
38
+ $this->name = plugin_basename( $_plugin_file );
39
+ $this->slug = basename( $_plugin_file, '.php' );
40
+ $this->version = $_api_data['version'];
41
+ $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
42
+ $this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
43
+ $this->cache_key = md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
44
+
45
+ $edd_plugin_data[ $this->slug ] = $this->api_data;
46
+
47
+ // Set up hooks.
48
+ $this->init();
49
+
50
+ }
51
+
52
+ /**
53
+ * Set up WordPress filters to hook into WP's update process.
54
+ *
55
+ * @uses add_filter()
56
+ *
57
+ * @return void
58
+ */
59
+ public function init() {
60
+
61
+ add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
62
+ add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
63
+ remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10 );
64
+ add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
65
+ add_action( 'admin_init', array( $this, 'show_changelog' ) );
66
+
67
+ }
68
+
69
+ /**
70
+ * Check for Updates at the defined API endpoint and modify the update array.
71
+ *
72
+ * This function dives into the update API just when WordPress creates its update array,
73
+ * then adds a custom API call and injects the custom plugin data retrieved from the API.
74
+ * It is reassembled from parts of the native WordPress plugin update code.
75
+ * See wp-includes/update.php line 121 for the original wp_update_plugins() function.
76
+ *
77
+ * @uses api_request()
78
+ *
79
+ * @param array $_transient_data Update array build by WordPress.
80
+ * @return array Modified update array with custom plugin data.
81
+ */
82
+ public function check_update( $_transient_data ) {
83
+
84
+ global $pagenow;
85
+
86
+ if ( ! is_object( $_transient_data ) ) {
87
+ $_transient_data = new stdClass;
88
+ }
89
+
90
+ if ( 'plugins.php' == $pagenow && is_multisite() ) {
91
+ return $_transient_data;
92
+ }
93
+
94
+ if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) {
95
+ return $_transient_data;
96
+ }
97
+
98
+ $version_info = $this->get_cached_version_info();
99
+
100
+ if ( false === $version_info ) {
101
+ $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
102
+
103
+ $this->set_version_info_cache( $version_info );
104
+
105
+ }
106
+
107
+ if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) {
108
+
109
+ if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
110
+
111
+ $_transient_data->response[ $this->name ] = $version_info;
112
+
113
+ }
114
+
115
+ $_transient_data->last_checked = current_time( 'timestamp' );
116
+ $_transient_data->checked[ $this->name ] = $this->version;
117
+
118
+ }
119
+
120
+ return $_transient_data;
121
+ }
122
+
123
+ /**
124
+ * show update nofication row -- needed for multisite subsites, because WP won't tell you otherwise!
125
+ *
126
+ * @param string $file
127
+ * @param array $plugin
128
+ */
129
+ public function show_update_notification( $file, $plugin ) {
130
+
131
+ if ( is_network_admin() ) {
132
+ return;
133
+ }
134
+
135
+ if( ! current_user_can( 'update_plugins' ) ) {
136
+ return;
137
+ }
138
+
139
+ if( ! is_multisite() ) {
140
+ return;
141
+ }
142
+
143
+ if ( $this->name != $file ) {
144
+ return;
145
+ }
146
+
147
+ // Remove our filter on the site transient
148
+ remove_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ), 10 );
149
+
150
+ $update_cache = get_site_transient( 'update_plugins' );
151
+
152
+ $update_cache = is_object( $update_cache ) ? $update_cache : new stdClass();
153
+
154
+ if ( empty( $update_cache->response ) || empty( $update_cache->response[ $this->name ] ) ) {
155
+
156
+ $version_info = $this->get_cached_version_info();
157
+
158
+ if ( false === $version_info ) {
159
+ $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
160
+
161
+ $this->set_version_info_cache( $version_info );
162
+ }
163
+
164
+ if ( ! is_object( $version_info ) ) {
165
+ return;
166
+ }
167
+
168
+ if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
169
+
170
+ $update_cache->response[ $this->name ] = $version_info;
171
+
172
+ }
173
+
174
+ $update_cache->last_checked = current_time( 'timestamp' );
175
+ $update_cache->checked[ $this->name ] = $this->version;
176
+
177
+ set_site_transient( 'update_plugins', $update_cache );
178
+
179
+ } else {
180
+
181
+ $version_info = $update_cache->response[ $this->name ];
182
+
183
+ }
184
+
185
+ // Restore our filter
186
+ add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
187
+
188
+ if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) {
189
+
190
+ // build a plugin list row, with update notification
191
+ $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
192
+ # <tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">
193
+ echo '<tr class="plugin-update-tr" id="' . $this->slug . '-update" data-slug="' . $this->slug . '" data-plugin="' . $this->slug . '/' . $file . '">';
194
+ echo '<td colspan="3" class="plugin-update colspanchange">';
195
+ echo '<div class="update-message notice inline notice-warning notice-alt">';
196
+
197
+ $changelog_link = self_admin_url( 'index.php?edd_sl_action=view_plugin_changelog&plugin=' . $this->name . '&slug=' . $this->slug . '&TB_iframe=true&width=772&height=911' );
198
+
199
+ if ( empty( $version_info->download_link ) ) {
200
+ printf(
201
+ __( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s.', 'easy-digital-downloads' ),
202
+ esc_html( $version_info->name ),
203
+ '<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
204
+ esc_html( $version_info->new_version ),
205
+ '</a>'
206
+ );
207
+ } else {
208
+ printf(
209
+ __( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s or %5$supdate now%6$s.', 'easy-digital-downloads' ),
210
+ esc_html( $version_info->name ),
211
+ '<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
212
+ esc_html( $version_info->new_version ),
213
+ '</a>',
214
+ '<a href="' . esc_url( wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $this->name, 'upgrade-plugin_' . $this->name ) ) .'">',
215
+ '</a>'
216
+ );
217
+ }
218
+
219
+ do_action( "in_plugin_update_message-{$file}", $plugin, $version_info );
220
+
221
+ echo '</div></td></tr>';
222
+ }
223
+ }
224
+
225
+ /**
226
+ * Updates information on the "View version x.x details" page with custom data.
227
+ *
228
+ * @uses api_request()
229
+ *
230
+ * @param mixed $_data
231
+ * @param string $_action
232
+ * @param object $_args
233
+ * @return object $_data
234
+ */
235
+ public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
236
+
237
+ if ( $_action != 'plugin_information' ) {
238
+
239
+ return $_data;
240
+
241
+ }
242
+
243
+ if ( ! isset( $_args->slug ) || ( $_args->slug != $this->slug ) ) {
244
+
245
+ return $_data;
246
+
247
+ }
248
+
249
+ $to_send = array(
250
+ 'slug' => $this->slug,
251
+ 'is_ssl' => is_ssl(),
252
+ 'fields' => array(
253
+ 'banners' => array(),
254
+ 'reviews' => false
255
+ )
256
+ );
257
+
258
+ $cache_key = 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
259
+
260
+ // Get the transient where we store the api request for this plugin for 24 hours
261
+ $edd_api_request_transient = $this->get_cached_version_info( $cache_key );
262
+
263
+ //If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now.
264
+ if ( empty( $edd_api_request_transient ) ) {
265
+
266
+ $api_response = $this->api_request( 'plugin_information', $to_send );
267
+
268
+ // Expires in 3 hours
269
+ $this->set_version_info_cache( $api_response, $cache_key );
270
+
271
+ if ( false !== $api_response ) {
272
+ $_data = $api_response;
273
+ }
274
+
275
+ } else {
276
+ $_data = $edd_api_request_transient;
277
+ }
278
+
279
+ // Convert sections into an associative array, since we're getting an object, but Core expects an array.
280
+ if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) {
281
+ $new_sections = array();
282
+ foreach ( $_data->sections as $key => $value ) {
283
+ $new_sections[ $key ] = $value;
284
+ }
285
+
286
+ $_data->sections = $new_sections;
287
+ }
288
+
289
+ // Convert banners into an associative array, since we're getting an object, but Core expects an array.
290
+ if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
291
+ $new_banners = array();
292
+ foreach ( $_data->banners as $key => $value ) {
293
+ $new_banners[ $key ] = $value;
294
+ }
295
+
296
+ $_data->banners = $new_banners;
297
+ }
298
+
299
+ return $_data;
300
+ }
301
+
302
+ /**
303
+ * Disable SSL verification in order to prevent download update failures
304
+ *
305
+ * @param array $args
306
+ * @param string $url
307
+ * @return object $array
308
+ */
309
+ public function http_request_args( $args, $url ) {
310
+
311
+ $verify_ssl = $this->verify_ssl();
312
+ if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
313
+ $args['sslverify'] = $verify_ssl;
314
+ }
315
+ return $args;
316
+
317
+ }
318
+
319
+ /**
320
+ * Calls the API and, if successfull, returns the object delivered by the API.
321
+ *
322
+ * @uses get_bloginfo()
323
+ * @uses wp_remote_post()
324
+ * @uses is_wp_error()
325
+ *
326
+ * @param string $_action The requested action.
327
+ * @param array $_data Parameters for the API action.
328
+ * @return false|object
329
+ */
330
+ private function api_request( $_action, $_data ) {
331
+
332
+ global $wp_version;
333
+
334
+ $data = array_merge( $this->api_data, $_data );
335
+
336
+ if ( $data['slug'] != $this->slug ) {
337
+ return;
338
+ }
339
+
340
+ if( $this->api_url == trailingslashit (home_url() ) ) {
341
+ return false; // Don't allow a plugin to ping itself
342
+ }
343
+
344
+ $api_params = array(
345
+ 'edd_action' => 'get_version',
346
+ 'license' => ! empty( $data['license'] ) ? $data['license'] : '',
347
+ 'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
348
+ 'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
349
+ 'version' => isset( $data['version'] ) ? $data['version'] : false,
350
+ 'slug' => $data['slug'],
351
+ 'author' => $data['author'],
352
+ 'url' => home_url(),
353
+ 'beta' => ! empty( $data['beta'] ),
354
+ );
355
+
356
+ $verify_ssl = $this->verify_ssl();
357
+ $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) );
358
+
359
+ if ( ! is_wp_error( $request ) ) {
360
+ $request = json_decode( wp_remote_retrieve_body( $request ) );
361
+ }
362
+
363
+ if ( $request && isset( $request->sections ) ) {
364
+ $request->sections = maybe_unserialize( $request->sections );
365
+ } else {
366
+ $request = false;
367
+ }
368
+
369
+ if ( $request && isset( $request->banners ) ) {
370
+ $request->banners = maybe_unserialize( $request->banners );
371
+ }
372
+
373
+ if( ! empty( $request->sections ) ) {
374
+ foreach( $request->sections as $key => $section ) {
375
+ $request->$key = (array) $section;
376
+ }
377
+ }
378
+
379
+ return $request;
380
+ }
381
+
382
+ public function show_changelog() {
383
+
384
+ global $edd_plugin_data;
385
+
386
+ if( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' != $_REQUEST['edd_sl_action'] ) {
387
+ return;
388
+ }
389
+
390
+ if( empty( $_REQUEST['plugin'] ) ) {
391
+ return;
392
+ }
393
+
394
+ if( empty( $_REQUEST['slug'] ) ) {
395
+ return;
396
+ }
397
+
398
+ if( ! current_user_can( 'update_plugins' ) ) {
399
+ wp_die( __( 'You do not have permission to install plugin updates', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) );
400
+ }
401
+
402
+ $data = $edd_plugin_data[ $_REQUEST['slug'] ];
403
+ $beta = ! empty( $data['beta'] ) ? true : false;
404
+ $cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_' . $beta . '_version_info' );
405
+ $version_info = $this->get_cached_version_info( $cache_key );
406
+
407
+ if( false === $version_info ) {
408
+
409
+ $api_params = array(
410
+ 'edd_action' => 'get_version',
411
+ 'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
412
+ 'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
413
+ 'slug' => $_REQUEST['slug'],
414
+ 'author' => $data['author'],
415
+ 'url' => home_url(),
416
+ 'beta' => ! empty( $data['beta'] )
417
+ );
418
+
419
+ $verify_ssl = $this->verify_ssl();
420
+ $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) );
421
+
422
+ if ( ! is_wp_error( $request ) ) {
423
+ $version_info = json_decode( wp_remote_retrieve_body( $request ) );
424
+ }
425
+
426
+
427
+ if ( ! empty( $version_info ) && isset( $version_info->sections ) ) {
428
+ $version_info->sections = maybe_unserialize( $version_info->sections );
429
+ } else {
430
+ $version_info = false;
431
+ }
432
+
433
+ if( ! empty( $version_info ) ) {
434
+ foreach( $version_info->sections as $key => $section ) {
435
+ $version_info->$key = (array) $section;
436
+ }
437
+ }
438
+
439
+ $this->set_version_info_cache( $version_info, $cache_key );
440
+
441
+ }
442
+
443
+ if( ! empty( $version_info ) && isset( $version_info->sections['changelog'] ) ) {
444
+ echo '<div style="background:#fff;padding:10px;">' . $version_info->sections['changelog'] . '</div>';
445
+ }
446
+
447
+ exit;
448
+ }
449
+
450
+ public function get_cached_version_info( $cache_key = '' ) {
451
+
452
+ if( empty( $cache_key ) ) {
453
+ $cache_key = $this->cache_key;
454
+ }
455
+
456
+ $cache = get_option( $cache_key );
457
+
458
+ if( empty( $cache['timeout'] ) || current_time( 'timestamp' ) > $cache['timeout'] ) {
459
+ return false; // Cache is expired
460
+ }
461
+
462
+ return json_decode( $cache['value'] );
463
+
464
+ }
465
+
466
+ public function set_version_info_cache( $value = '', $cache_key = '' ) {
467
+
468
+ if( empty( $cache_key ) ) {
469
+ $cache_key = $this->cache_key;
470
+ }
471
+
472
+ $data = array(
473
+ 'timeout' => strtotime( '+3 hours', current_time( 'timestamp' ) ),
474
+ 'value' => json_encode( $value )
475
+ );
476
+
477
+ update_option( $cache_key, $data, 'no' );
478
+
479
+ }
480
+
481
+ /**
482
+ * Returns if the SSL of the store should be verified.
483
+ *
484
+ * @since 1.6.13
485
+ * @return bool
486
+ */
487
+ private function verify_ssl() {
488
+ return (bool) apply_filters( 'edd_sl_api_request_verify_ssl', true, $this );
489
+ }
490
+
491
+ }
functions/options/SWP_Option_Icons.php CHANGED
@@ -79,11 +79,17 @@ class SWP_Option_Icons extends SWP_Option {
79
  if ( array_key_exists( 0, $all_icons) ) :
80
  //* If $all_icons is numerically indexed, just diff the array.
81
  $inactive_icons = array_diff( $all_icons, $user_icons );
 
82
  elseif ( gettype( array_pop( $all_icons ) === 'object' ) ) :
83
  //* Get the keys first, then diff the array.
84
- $inactive_icons = array_diff( array_keys( $all_icons ), $user_icons );
 
 
 
 
 
85
  else :
86
- write_log( $all_icons, 'Showing $all_icons from SWP_Option_Icons->render_inactive_icons().');
87
  endif;
88
 
89
  $html = '<div class="sw-grid sw-col-300">';
79
  if ( array_key_exists( 0, $all_icons) ) :
80
  //* If $all_icons is numerically indexed, just diff the array.
81
  $inactive_icons = array_diff( $all_icons, $user_icons );
82
+
83
  elseif ( gettype( array_pop( $all_icons ) === 'object' ) ) :
84
  //* Get the keys first, then diff the array.
85
+ $keys = [];
86
+ foreach( $all_icons as $object) {
87
+ $keys[] = $object->key;
88
+ }
89
+ $inactive_icons = array_diff( $keys, $user_icons );
90
+
91
  else :
92
+ // write_log( $all_icons, 'Showing $all_icons from SWP_Option_Icons->render_inactive_icons().');
93
  endif;
94
 
95
  $html = '<div class="sw-grid sw-col-300">';
functions/options/SWP_Option_Select.php CHANGED
@@ -47,10 +47,6 @@ class SWP_Option_Select extends SWP_Option {
47
  *
48
  * @since 3.0.0 | 02 MAR 2018 | Created
49
  * @param string $choice The choice to add to the select.
50
- * @return object $this Allows for method chaining
51
- * @TODO: Sanitize the input with the throw() method.
52
- * @TODO: Make this function actually do something (i.e. make it merge these choices
53
- * into the existing array of choices.)
54
  * @return SWP_Option_Select $this The calling object with an updated chocies array.
55
  */
56
  public function add_choice( $choice ) {
47
  *
48
  * @since 3.0.0 | 02 MAR 2018 | Created
49
  * @param string $choice The choice to add to the select.
 
 
 
 
50
  * @return SWP_Option_Select $this The calling object with an updated chocies array.
51
  */
52
  public function add_choice( $choice ) {
functions/social-networks/SWP_Pinterest.php CHANGED
@@ -72,7 +72,8 @@ class SWP_Pinterest extends SWP_Social_Network {
72
  * Create the HTML to display the share button
73
  *
74
  * @since 1.0.0
75
- * @since 3.0.0 | 01 May 2018 | Re-wrote the function to a class method.
 
76
  * @access public
77
  * @return array $panel_context Array of
78
  * ['post_data'] => metadata about the post;
@@ -108,9 +109,11 @@ class SWP_Pinterest extends SWP_Social_Network {
108
  }
109
 
110
  if ( empty( $pinterest_description ) ) :
111
- $pinterest_description = $title . $pinterest_username;
112
  endif;
113
 
 
 
114
  if ( $pinterest_image != '') :
115
  $anchor = '<a rel="nofollow" class="nc_tweet" data-count="0" ' .
116
  'data-link="https://pinterest.com/pin/create/button/' .
72
  * Create the HTML to display the share button
73
  *
74
  * @since 1.0.0
75
+ * @since 3.0.0 | 01 MAY 2018 | Re-wrote the function to a class method.
76
+ * @since 3.0.6 | 14 MAY 2018 | Appended $pinterest_username to $pinterest_description.
77
  * @access public
78
  * @return array $panel_context Array of
79
  * ['post_data'] => metadata about the post;
109
  }
110
 
111
  if ( empty( $pinterest_description ) ) :
112
+ $pinterest_description = $title;
113
  endif;
114
 
115
+ $pinterest_description .= $pinterest_username;
116
+
117
  if ( $pinterest_image != '') :
118
  $anchor = '<a rel="nofollow" class="nc_tweet" data-count="0" ' .
119
  'data-link="https://pinterest.com/pin/create/button/' .
functions/utilities/SWP_CURL.php CHANGED
@@ -85,6 +85,12 @@ class SWP_CURL {
85
  // all done
86
  curl_multi_close( $mh );
87
 
 
 
 
 
 
 
88
  return $result;
89
  }
90
 
85
  // all done
86
  curl_multi_close( $mh );
87
 
88
+ if( true == _swp_is_debug('show_share_data') ) :
89
+ echo "<pre>";
90
+ var_dump($result);
91
+ echo "</pre>";
92
+ endif;
93
+
94
  return $result;
95
  }
96
 
functions/utilities/SWP_Database_Migration.php CHANGED
@@ -4,9 +4,22 @@
4
  *
5
  * This willl either migrate previous options to social_warfare_settings,
6
  * or create the new default settings.
 
 
 
 
7
  */
8
-
9
  class SWP_Database_Migration {
 
 
 
 
 
 
 
 
 
 
10
  /**
11
  * Checks to see if we are on the most up-to-date database schema.
12
  *
@@ -16,8 +29,6 @@ class SWP_Database_Migration {
16
  *
17
  */
18
  public function __construct() {
19
- $this->update_hidden_post_meta();
20
-
21
  if ( !$this->database_is_migrated() ) {
22
  $this->migrate();
23
  }
@@ -94,7 +105,7 @@ class SWP_Database_Migration {
94
  //* Fetch posts with 2.3.5 metadata.
95
  $old_metadata = get_posts( ['meta_key' => 'swp_postLocation', 'numberposts' => 1] );
96
 
97
- if( '2.3.5' !== $this->get_last_migrated() ) {
98
  return false;
99
  }
100
 
@@ -104,6 +115,8 @@ class SWP_Database_Migration {
104
  public function update_hidden_post_meta() {
105
  global $wpdb;
106
 
 
 
107
  $hidden_map = [
108
  '_googlePlus_shares' => '_google_plus_shares',
109
  '_linkedIn_shares' => '_linkedin_shares',
@@ -129,10 +142,13 @@ class SWP_Database_Migration {
129
  * Replaces 2.3.5 camelCased keys with 3.0.0 standardized snake_cased keys.
130
  *
131
  * @since 3.0.0 | 01 MAY 2018 | Created the function
 
132
  */
133
  public function update_post_meta() {
134
  global $wpdb;
135
 
 
 
136
  //* Notice there is no prefix on any of the indices.
137
  //* Old code has prefixed these with either "nc_" or "swp_".
138
  //* For simplicity's sake, we'll just check each for both.
@@ -435,7 +451,7 @@ class SWP_Database_Migration {
435
 
436
  public function update_last_migrated() {
437
  $options = get_option( 'social_warfare_settings' );
438
- $options['last_migrated'] = '3.0.5';
439
 
440
  update_option( 'social_warfare_settings', $options );
441
  }
4
  *
5
  * This willl either migrate previous options to social_warfare_settings,
6
  * or create the new default settings.
7
+ *
8
+ * @since 3.0.0 | 08 MAY 2018 | Created
9
+ * @since 3.0.6 | 14 MAY 2018 | Added local $last_migrated property.
10
+ *
11
  */
 
12
  class SWP_Database_Migration {
13
+
14
+
15
+ /**
16
+ * This property represents the version during which we last made changes
17
+ * and therefore want the database migrator to have run up to this version.
18
+ *
19
+ * @var string
20
+ */
21
+ public $last_migrated = '3.0.5';
22
+
23
  /**
24
  * Checks to see if we are on the most up-to-date database schema.
25
  *
29
  *
30
  */
31
  public function __construct() {
 
 
32
  if ( !$this->database_is_migrated() ) {
33
  $this->migrate();
34
  }
105
  //* Fetch posts with 2.3.5 metadata.
106
  $old_metadata = get_posts( ['meta_key' => 'swp_postLocation', 'numberposts' => 1] );
107
 
108
+ if( $this->last_migrated !== $this->get_last_migrated() ) {
109
  return false;
110
  }
111
 
115
  public function update_hidden_post_meta() {
116
  global $wpdb;
117
 
118
+ set_time_limit(300);
119
+
120
  $hidden_map = [
121
  '_googlePlus_shares' => '_google_plus_shares',
122
  '_linkedIn_shares' => '_linkedin_shares',
142
  * Replaces 2.3.5 camelCased keys with 3.0.0 standardized snake_cased keys.
143
  *
144
  * @since 3.0.0 | 01 MAY 2018 | Created the function
145
+ * @since 3.0.6 | 14 MAY 2018 | Added time limit to prevent very large datasets from timing out.
146
  */
147
  public function update_post_meta() {
148
  global $wpdb;
149
 
150
+ set_time_limit(300);
151
+
152
  //* Notice there is no prefix on any of the indices.
153
  //* Old code has prefixed these with either "nc_" or "swp_".
154
  //* For simplicity's sake, we'll just check each for both.
451
 
452
  public function update_last_migrated() {
453
  $options = get_option( 'social_warfare_settings' );
454
+ $options['last_migrated'] = $this->last_migrated;
455
 
456
  update_option( 'social_warfare_settings', $options );
457
  }
functions/utilities/share-cache.php CHANGED
@@ -122,6 +122,10 @@ function swp_is_cache_fresh( $post_id, $output = false, $ajax = false ) {
122
  $fresh_cache = false;
123
  }
124
 
 
 
 
 
125
  return $fresh_cache;
126
  }
127
 
@@ -357,7 +361,7 @@ function swp_output_cache_trigger( $info ) {
357
  // Fetch the alternate URL if share recovery is turned on
358
  if( $info['swp_user_options']['recover_shares'] == true ) {
359
  $alternateURL = SWP_Permalink::get_alt_permalink( $info['postID'] );
360
- $alternateURL = apply_filters( 'swp_recovery_filter',$alternateURL );
361
  } else {
362
  $alternateURL = false;
363
  }
122
  $fresh_cache = false;
123
  }
124
 
125
+ if ( _swp_is_debug( 'is_cache_fresh' ) ) {
126
+ echo "The cache is fresh: " . (int) $fresh_cache;
127
+ }
128
+
129
  return $fresh_cache;
130
  }
131
 
361
  // Fetch the alternate URL if share recovery is turned on
362
  if( $info['swp_user_options']['recover_shares'] == true ) {
363
  $alternateURL = SWP_Permalink::get_alt_permalink( $info['postID'] );
364
+ $alternateURL = apply_filters( 'swp_recovery_filter', $alternateURL );
365
  } else {
366
  $alternateURL = false;
367
  }
functions/utilities/share-count-function.php CHANGED
@@ -18,16 +18,16 @@ function get_social_warfare_shares( $postID ) {
18
  return false;
19
  endif;
20
 
 
21
  // Set the initial options
22
  $options = $swp_user_options;
23
- $url = get_permalink( $postID );
24
- $url = apply_filters( 'swp_url_filter_function', $url );
25
 
26
  /**
27
  * Check if the cache is fresh or expired
28
  * @var boolean
29
  */
30
- $freshCache = swp_is_cache_fresh( $postID );
31
 
32
  /**
33
  * Setup the networks array that we'll loop through
@@ -39,8 +39,9 @@ function get_social_warfare_shares( $postID ) {
39
  // Queue up the networks that are available
40
  $networks = $options['order_of_icons'];
41
 
42
- if ( !is_array( $networks ) ) :
43
- write_log( $networks, "Variable: \$networks. In share-count-function.php" );
 
44
  return $shares;
45
  endif;
46
 
@@ -53,15 +54,13 @@ function get_social_warfare_shares( $postID ) {
53
  if( isset( $swp_social_networks[$network] ) ):
54
 
55
  // Check if we can used the cached share numbers
56
- if ( $freshCache == true ) :
57
  $shares[$network] = get_post_meta( $postID,'_' . $network . '_shares',true );
58
 
59
  // If cache is expired, fetch new and update the cache
60
  else :
61
- if( isset( $swp_social_networks[$network] ) ):
62
- $old_shares[$network] = get_post_meta( $postID,'_' . $network . '_shares',true );
63
- $api_responses[$network] = $swp_social_networks[$network]->get_api_link( $url );
64
- endif;
65
  endif;
66
 
67
  endif;
@@ -69,7 +68,7 @@ function get_social_warfare_shares( $postID ) {
69
  endforeach;
70
 
71
  // Recover Shares From Previously Used URL Patterns
72
- if ( true == $options['recover_shares'] && false == $freshCache ) :
73
 
74
  $alternateURL = SWP_Permalink::get_alt_permalink( $postID );
75
  $alternateURL = apply_filters( 'swp_recovery_filter', $alternateURL );
@@ -98,7 +97,7 @@ function get_social_warfare_shares( $postID ) {
98
  endforeach;
99
  endif;
100
 
101
- if ( $freshCache == true ) :
102
  if ( get_post_meta( $postID,'_total_shares',true ) ) :
103
  $shares['total_shares'] = get_post_meta( $postID, '_total_shares', true );
104
 
@@ -108,7 +107,7 @@ function get_social_warfare_shares( $postID ) {
108
  else :
109
 
110
  // Fetch all the share counts asyncrounously
111
- $raw_shares_array = SWP_CURL::fetch_shares_via_curl_multi( $api_responses );
112
 
113
  if ( $options['recover_shares'] == true ) :
114
  $old_raw_shares_array = SWP_CURL::fetch_shares_via_curl_multi( $old_share_links );
@@ -126,7 +125,7 @@ function get_social_warfare_shares( $postID ) {
126
  $old_raw_shares_array[$network] = 0;
127
  }
128
 
129
- $shares[$network] = $swp_social_networks[$network]->parse_api_response($api_responses[$network]);
130
 
131
  if ( $options['recover_shares'] == true ) :
132
 
@@ -167,7 +166,7 @@ function get_social_warfare_shares( $postID ) {
167
  /**
168
  * Update the Cache and Return the Share Counts
169
  */
170
- if ( $freshCache != true ) :
171
 
172
  // Clean out the previously used custom meta fields
173
  delete_post_meta( $postID,'_total_shares' );
18
  return false;
19
  endif;
20
 
21
+
22
  // Set the initial options
23
  $options = $swp_user_options;
24
+ $url = apply_filters( 'swp_url_filter_function', get_permalink( $postID ) );
 
25
 
26
  /**
27
  * Check if the cache is fresh or expired
28
  * @var boolean
29
  */
30
+ $fresh_cache = swp_is_cache_fresh( $postID );
31
 
32
  /**
33
  * Setup the networks array that we'll loop through
39
  // Queue up the networks that are available
40
  $networks = $options['order_of_icons'];
41
 
42
+
43
+
44
+ if ( !is_array( $networks ) || count ( $networks ) === 0 ) :
45
  return $shares;
46
  endif;
47
 
54
  if( isset( $swp_social_networks[$network] ) ):
55
 
56
  // Check if we can used the cached share numbers
57
+ if ( $fresh_cache == true ) :
58
  $shares[$network] = get_post_meta( $postID,'_' . $network . '_shares',true );
59
 
60
  // If cache is expired, fetch new and update the cache
61
  else :
62
+ $old_shares[$network] = get_post_meta( $postID,'_' . $network . '_shares',true );
63
+ $api_links[$network] = $swp_social_networks[$network]->get_api_link( $url );
 
 
64
  endif;
65
 
66
  endif;
68
  endforeach;
69
 
70
  // Recover Shares From Previously Used URL Patterns
71
+ if ( true == $options['recover_shares'] && false == $fresh_cache ) :
72
 
73
  $alternateURL = SWP_Permalink::get_alt_permalink( $postID );
74
  $alternateURL = apply_filters( 'swp_recovery_filter', $alternateURL );
97
  endforeach;
98
  endif;
99
 
100
+ if ( $fresh_cache == true ) :
101
  if ( get_post_meta( $postID,'_total_shares',true ) ) :
102
  $shares['total_shares'] = get_post_meta( $postID, '_total_shares', true );
103
 
107
  else :
108
 
109
  // Fetch all the share counts asyncrounously
110
+ $raw_shares_array = SWP_CURL::fetch_shares_via_curl_multi( $api_links );
111
 
112
  if ( $options['recover_shares'] == true ) :
113
  $old_raw_shares_array = SWP_CURL::fetch_shares_via_curl_multi( $old_share_links );
125
  $old_raw_shares_array[$network] = 0;
126
  }
127
 
128
+ $shares[$network] = $swp_social_networks[$network]->parse_api_response($raw_shares_array[$network]);
129
 
130
  if ( $options['recover_shares'] == true ) :
131
 
166
  /**
167
  * Update the Cache and Return the Share Counts
168
  */
169
+ if ( $fresh_cache != true ) :
170
 
171
  // Clean out the previously used custom meta fields
172
  delete_post_meta( $postID,'_total_shares' );
functions/utilities/utility.php CHANGED
@@ -128,7 +128,28 @@ function swp_store_the_settings() {
128
  return social_warfare( $array );
129
  }
130
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  function social_warfare( $args = array() ) {
 
 
 
 
 
132
  $buttons_panel = new SWP_Buttons_Panel( $args );
133
  echo $buttons_panel->render_HTML();
134
  }
128
  return social_warfare( $array );
129
  }
130
 
131
+
132
+ /**
133
+ * The primary social_warfare function
134
+ *
135
+ * This is the function that we encourage users to use in their themes and whatnot
136
+ * if they want to be able to directly output the buttons in their theme. It accepts
137
+ * an array of arguments that correspond to the arguments that the SWP_Buttons_Panel
138
+ * accepts.
139
+ *
140
+ * @since 1.0.0 | Unknown | Created
141
+ * @since 3.0.0 | 08 MAY 2018 | Converted to a passthrough function that calls
142
+ * the buttons panel class.
143
+ * @param array $args An array of arguments to manipulate the output of the buttons.
144
+ * @return none The html of the buttons will be output to the screen.
145
+ *
146
+ */
147
  function social_warfare( $args = array() ) {
148
+
149
+ if( !is_array($args) ):
150
+ $args = array();
151
+ endif;
152
+
153
  $buttons_panel = new SWP_Buttons_Panel( $args );
154
  echo $buttons_panel->render_HTML();
155
  }
functions/widgets/SWP_Popular_Posts_Widget.php CHANGED
@@ -475,7 +475,7 @@ class SWP_Popular_Posts_Widget extends WP_Widget {
475
  echo $args['before_title'];
476
  endif;
477
 
478
- echo '<h4 class="widgettitle widget-title swp_popular_posts_title" style="' . $styles[ $style ]['links'] . '">' . $title . '</h4>';
479
 
480
  // Output the "After Title" content
481
  if( isset( $args['after_title'] ) ) :
475
  echo $args['before_title'];
476
  endif;
477
 
478
+ echo '<span class="widgettitle widget-title swp_popular_posts_title" style="' . $styles[ $style ]['links'] . '">' . $title . '</span>';
479
 
480
  // Output the "After Title" content
481
  if( isset( $args['after_title'] ) ) :
functions/widgets/notes.txt ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Feb 5 2018
2
+
3
+ Brief phone call w/Nick go over items
4
+
5
+ Debugged Meta tag output for #454
6
+ Resolved issues #454, 455,
7
+
8
+ Grabbed dev screenshot of CTT for Nick
9
+
10
+ keys
11
+ "top"
12
+ "middle"
13
+ "bottom"
14
+
js/admin-options-page.js CHANGED
@@ -6,14 +6,16 @@
6
  /*********************************************************
7
  Temporary patch for the custom color selects.
8
  *********************************************************/
9
-
10
  /*
11
- * Temp patch on the Visual Options color s.
12
  * This makes the custom colors appear/disappear as necessary.
13
  */
14
  var panelSelector = "[name=default_colors],[name=hover_colors], [name=single_colors]";
15
  var floatSelector = "[name=float_default_colors], [name=float_hover_colors], [name=float_single_colors]";
16
 
 
 
 
17
  //* Show custom fields if they have already been selected.
18
  $(panelSelector).each(function(index, select) {
19
  var value = $(select).val();
@@ -21,20 +23,30 @@
21
  var customOutlines = $("[name=custom_color_outlines]").parent().parent();
22
 
23
  if ( value.indexOf("custom") !== -1) {
24
- value.indexOf('outlines') > 0 ? customOutlines.show() : customColor.show();
 
 
 
 
 
 
25
  }
26
  });
27
 
 
 
28
  $(floatSelector).each(function(index, select) {
29
  var value = $(select).val();
30
  var customColor = $("[name=float_custom_color]").parent().parent();
31
  var customOutlines = $("[name=float_custom_color_outlines]").parent().parent();
32
 
33
  if ( value.indexOf("custom") !== -1) {
 
34
  value.indexOf('outlines') > 0 ? customOutlines.show() : customColor.show();
35
  }
36
  });
37
 
 
38
  //* Change handlers for style.
39
  $(panelSelector).on("change", function(e) {
40
  var value = e.target.value;
@@ -44,42 +56,43 @@
44
  handleCustomColors(e, panelSelector, customColor, customOutlines, value);
45
  });
46
 
 
 
47
  $(floatSelector).on("change", function(e) {
48
  var value = e.target.value;
49
  var customColor = $("[name=float_custom_color]").parent().parent();
50
  var customOutlines = $("[name=float_custom_color_outlines]").parent().parent();
51
- handleCustomColors(e, floatSelector, customColor, customOutlines, value);
52
 
 
 
 
 
53
  });
54
  }
55
 
56
  function handleCustomColors(event, selector, customColor, customOutlines) {
57
  var visible = false;
58
  var value = event.target.value;
 
 
 
 
59
 
60
- //* Check to see if this or a sibling input has custom_color selected.
61
  $(selector).each(function(index, select) {
 
62
  //* Check to see if this or a sibling input has custom_color selected.
63
- if ($(select).val().indexOf("custom") !== -1) {
64
- visible = true;
 
 
 
 
65
  }
66
  });
67
 
68
- if (!visible) {
69
- customColor.hide();
70
- customOutlines.hide();
71
- return;
72
- }
73
-
74
- if ( value === "custom_color" ) {
75
- customColor.show();
76
- }
77
 
78
- if ( value === 'custom_color_outlines' ) {
79
- customOutlines.show();
80
- }
81
-
82
- return;
83
  }
84
 
85
  /*********************************************************
@@ -324,9 +337,7 @@
324
  var value = $( 'select[name="' + selector + '"]' ).val();
325
 
326
  if (value.indexOf("custom") === 0) {
327
- console.log("Selected a custom color.")
328
  var prefix = selector.slice(0, selector.indexOf("_"));
329
- console.log("returning: ", prefix);
330
  return prefix + "_full_color";
331
  }
332
 
@@ -634,7 +645,7 @@
634
  toggleRegistration( '0' , key );
635
  unregistered = true;
636
  }
637
-
638
  //* Passing in true forces reload from the server rather than cache.
639
  window.location.reload(true);
640
  clearLoadingScreen();
6
  /*********************************************************
7
  Temporary patch for the custom color selects.
8
  *********************************************************/
 
9
  /*
10
+ * Temp patch on the Visual Options colors.
11
  * This makes the custom colors appear/disappear as necessary.
12
  */
13
  var panelSelector = "[name=default_colors],[name=hover_colors], [name=single_colors]";
14
  var floatSelector = "[name=float_default_colors], [name=float_hover_colors], [name=float_single_colors]";
15
 
16
+ //* Hide the custom color inputs by default.
17
+ $("[name=custom_color],[name=custom_color_outlines],[name=float_custom_color],[name=float_custom_color_outlines]").parent().parent().hide();
18
+
19
  //* Show custom fields if they have already been selected.
20
  $(panelSelector).each(function(index, select) {
21
  var value = $(select).val();
23
  var customOutlines = $("[name=custom_color_outlines]").parent().parent();
24
 
25
  if ( value.indexOf("custom") !== -1) {
26
+ //* A custom value is set for this input.
27
+ if (value.indexOf('outlines') > 0 ) {
28
+ customOutlines.show();
29
+
30
+ } else {
31
+ customColor.show();
32
+ }
33
  }
34
  });
35
 
36
+
37
+ //* Same, for floating button options.
38
  $(floatSelector).each(function(index, select) {
39
  var value = $(select).val();
40
  var customColor = $("[name=float_custom_color]").parent().parent();
41
  var customOutlines = $("[name=float_custom_color_outlines]").parent().parent();
42
 
43
  if ( value.indexOf("custom") !== -1) {
44
+ //* A custom value is set for this input.
45
  value.indexOf('outlines') > 0 ? customOutlines.show() : customColor.show();
46
  }
47
  });
48
 
49
+
50
  //* Change handlers for style.
51
  $(panelSelector).on("change", function(e) {
52
  var value = e.target.value;
56
  handleCustomColors(e, panelSelector, customColor, customOutlines, value);
57
  });
58
 
59
+
60
+ //* Same, for floating button options.
61
  $(floatSelector).on("change", function(e) {
62
  var value = e.target.value;
63
  var customColor = $("[name=float_custom_color]").parent().parent();
64
  var customOutlines = $("[name=float_custom_color_outlines]").parent().parent();
 
65
 
66
+ customColor.hide();
67
+ customOutlines.hide();
68
+
69
+ handleCustomColors(e, floatSelector, customColor, customOutlines, value);
70
  });
71
  }
72
 
73
  function handleCustomColors(event, selector, customColor, customOutlines) {
74
  var visible = false;
75
  var value = event.target.value;
76
+ var visibility = {
77
+ customColor: false,
78
+ customOutlines: false
79
+ };
80
 
 
81
  $(selector).each(function(index, select) {
82
+ var val = $(select).val();
83
  //* Check to see if this or a sibling input has custom_color selected.
84
+ if (val.indexOf("custom") !== -1) {
85
+ if (val.indexOf("outlines") > 0) {
86
+ visibility.customOutlines = true;
87
+ } else {
88
+ visibility.customColor = true;
89
+ }
90
  }
91
  });
92
 
93
+ visibility.customColor ? customColor.slideDown() : customColor.slideUp();
94
+ visibility.customOutlines ? customOutlines.slideDown() : customOutlines.slideUp();
 
 
 
 
 
 
 
95
 
 
 
 
 
 
96
  }
97
 
98
  /*********************************************************
337
  var value = $( 'select[name="' + selector + '"]' ).val();
338
 
339
  if (value.indexOf("custom") === 0) {
 
340
  var prefix = selector.slice(0, selector.indexOf("_"));
 
341
  return prefix + "_full_color";
342
  }
343
 
645
  toggleRegistration( '0' , key );
646
  unregistered = true;
647
  }
648
+
649
  //* Passing in true forces reload from the server rather than cache.
650
  window.location.reload(true);
651
  clearLoadingScreen();
js/admin-options-page.min.js CHANGED
@@ -1 +1 @@
1
- !function(e,t,o){"use strict";function s(e,o,s,n){var a=!1,l=e.target.value;if(t(o).each(function(e,o){-1!==t(o).val().indexOf("custom")&&(a=!0)}),!a)return s.hide(),void n.hide();"custom_color"===l&&s.show(),"custom_color_outlines"===l&&n.show()}function n(t){var o,s;document.body.createTextRange?(o=document.body.createTextRange(),o.moveToElementText(t),o.select()):e.getSelection&&(s=e.getSelection(),o=document.createRange(),o.selectNodeContents(t),s.removeAllRanges(),s.addRange(o))}function a(){var e={};return t("form.sw-admin-settings-form input, form.sw-admin-settings-form select, form.sw-admin-settings-form textarea").each(function(){var o,s=t(this),n=s.attr("name");o="checkbox"===s.attr("type")?s.prop("checked"):s.val(),e[n]=o}),e.order_of_icons={},t(".sw-active i").each(function(){var o=t(this).data("network");e.order_of_icons[o]=o}),e}function l(){var e=t(".sw-top-menu").offset(),o=t(".sw-top-menu").width();t(".sw-top-menu").css({position:"fixed",left:e.left,top:e.top,width:o}),t(".sw-admin-wrapper").css("padding-top","75px")}function i(){t(".sw-tab-selector").on("click",function(e){e.preventDefault(),t("html, body").animate({scrollTop:0},300);var o=t(this).attr("data-link");t(".sw-admin-tab").hide(),t("#"+o).show(),t(".sw-header-menu li").removeClass("sw-active-tab"),t(this).parents("li").addClass("sw-active-tab"),"swp_styles"===o&&socialWarfarePlugin.activateHoverStates(),swpConditionalFields()})}function r(){t(".sw-checkbox-toggle").on("click",function(){var e=t(this).attr("status"),o=t(this).attr("field");"on"===e?(t(this).attr("status","off"),t(o).prop("checked",!1)):(t(this).attr("status","on"),t(o).prop("checked",!0)),u(),swpConditionalFields()})}function c(){t("form.sw-admin-settings-form input, form.sw-admin-settings-form select").on("change",function(){swpConditionalFields(),socialWarfarePlugin.newOptions=a(),u()}),socialWarfarePlugin.defaultOptions=a()}function u(){socialWarfarePlugin.newOptions=a(),JSON.stringify(socialWarfarePlugin.newOptions)!==JSON.stringify(socialWarfarePlugin.defaultOptions)?t(".sw-save-settings").removeClass("sw-navy-button").addClass("sw-red-button"):t(".sw-save-settings").removeClass("sw-red-button").addClass("sw-navy-button")}function _(){t(".sw-save-settings").on("click",function(e){e.preventDefault?e.preventDefault():e.returnValue=!1,p();var o=a(),s={action:"swp_store_settings",security:swpAdminOptionsData.optionsNonce,settings:o};t.post(ajaxurl,s,function(e){d(),socialWarfarePlugin.defaultOptions=a(),u()})})}function p(){t("body").append('<div class="sw-loading-bg"><div class="sw-loading-message">Saving Changes</div></div>')}function d(){t(".sw-loading-message").html("Success!").removeClass("sw-loading-message").addClass("sw-loading-complete"),t(".sw-loading-bg").delay(1e3).fadeOut(1e3),setTimeout(function(){t(".sw-loading-bg").remove()},2e3)}function m(){var e=(t('select[name="button_shape"]').val(),t('select[name="default_colors"]').val()),o=t('select[name="single_colors"]').val(),s=t('select[name="hover_colors"]').val();t("style.swp_customColorStuff").remove();var n=t('input[name="custom_color"]').val(),a="";"custom_color"!=e&&"custom_color"!=o&&"custom_color"!=s||(a=".swp_social_panel.swp_default_customColor a, html body .swp_social_panel.swp_individual_customColor .nc_tweetContainer:hover a, body .swp_social_panel.swp_other_customColor:hover a {color:white} .swp_social_panel.swp_default_customColor .nc_tweetContainer, html body .swp_social_panel.swp_individual_customColor .nc_tweetContainer:hover, body .swp_social_panel.swp_other_customColor:hover .nc_tweetContainer {background-color:"+n+";border:1px solid "+n+";}"),"custom_color_outlines"!=e&&"custom_color_outlines"!=o&&"custom_color_outlines"!=s||(a=a+" .swp_social_panel.swp_default_custom_color_outlines a, html body .swp_social_panel.swp_individual_custom_color_outlines .nc_tweetContainer:hover a, body .swp_social_panel.swp_other_custom_color_outlines:hover a { color:"+n+"; } .swp_social_panel.swp_default_custom_color_outlines .nc_tweetContainer, html body .swp_social_panel.swp_individual_custom_color_outlines .nc_tweetContainer:hover, body .swp_social_panel.swp_other_custom_color_outlines:hover .nc_tweetContainer { background:transparent; border:1px solid "+n+"; }"),t("head").append('<style type="text/css" class="swp_customColorStuff">'+a+"</style>")}function f(){function e(e){var o=t('select[name="'+e+'"]').val();if(0===o.indexOf("custom")){console.log("Selected a custom color.");var s=e.slice(0,e.indexOf("_"));return console.log("returning: ",s),s+"_full_color"}return o}var o=e("button_shape"),s=e("default_colors"),n=e("single_colors"),a=e("hover_colors"),l="swp_"+o+" swp_default_"+s+" swp_individual_"+n+" swp_other_"+a;void 0===socialWarfarePlugin.lastClass&&(socialWarfarePlugin.lastClass="swp_flat_fresh swp_default_full_color swp_individual_full_color swp_other_full_color");var l="swp_"+o+" swp_default_"+s+" swp_individual_"+n+" swp_other_"+a;t(".swp_social_panel").removeClass("swp_other_medium_gray"),t(".swp_social_panel").removeClass(socialWarfarePlugin.lastClass).addClass(l),socialWarfarePlugin.lastClass=l}function v(){var e={full_color:"Full Color",light_gray:"Light Gray",medium_gray:"Medium Gray",dark_gray:"Dark Gray",light_gray_outlines:"Light Gray Outlines",medium_gray_outlines:"Medium Gray Outlines",dark_gray_outlines:"Dark Gray Outlines",color_outlines:"Color Outlines",custom_color:"Custom Color",custom_color_outlines:"Custom Color Outlines"},o={flat_fresh:e,leaf:e,pill:e,three_dee:{full_color:"Full Color",light_gray:"Light Gray",medium_gray:"Medium Gray",dark_gray:"Dark Gray"},connected:e,shift:e,boxed:e};if(0!==t('select[name="button_shape"]').length){var s=t('select[name="button_shape"]').val(),n=t('select[name="default_colors"]').val(),a=t('select[name="single_colors"]').val(),l=t('select[name="hover_colors"]').val();t('select[name="default_colors"] option, select[name="single_colors"] option, select[name="hover_colors"] option').remove(),t.each(o[s],function(e,o){e===n?t('select[name="default_colors"]').append('<option value="'+e+'" selected>'+o+"</option>"):t('select[name="default_colors"]').append('<option value="'+e+'">'+o+"</option>"),e===a?t('select[name="single_colors"]').append('<option value="'+e+'" selected>'+o+"</option>"):t('select[name="single_colors"]').append('<option value="'+e+'">'+o+"</option>"),e===l?t('select[name="hover_colors"]').append('<option value="'+e+'" selected>'+o+"</option>"):t('select[name="hover_colors"]').append('<option value="'+e+'">'+o+"</option>"),"custom_color"==n||"custom_color_outlines"==n||"custom_color"==a||"custom_color_outlines"==a||"custom_color"==l||"custom_color_outlines"==l?(t(".customColor_wrapper").slideDown(),m()):t(".customColor_wrapper").slideUp()}),t('select[name="default_colors"], select[name="single_colors"], select[name="hover_colors"]').on("change",f),t('select[name="button_shape"]').on("change",function(){var e=t('select[name="button_shape"]').val(),s=t('select[name="default_colors"]').val(),n=t('select[name="single_colors"]').val(),a=t('select[name="hover_colors"]').val(),l=0,i=o[e],r=i.hasOwnProperty(s),c=i.hasOwnProperty(n),u=i.hasOwnProperty(a);t('select[name="default_colors"] option, select[name="single_colors"] option, select[name="hover_colors"] option').remove(),t.each(o[e],function(e,o){e===s||0==r&&0==l?t('select[name="default_colors"]').append('<option value="'+e+'" selected>'+o+"</option>"):t('select[name="default_colors"]').append('<option value="'+e+'">'+o+"</option>"),e===n||0==c&&0==l?t('select[name="single_colors"]').append('<option value="'+e+'" selected>'+o+"</option>"):t('select[name="single_colors"]').append('<option value="'+e+'">'+o+"</option>"),e===a||0==u&&0==l?t('select[name="hover_colors"]').append('<option value="'+e+'" selected>'+o+"</option>"):t('select[name="hover_colors"]').append('<option value="'+e+'">'+o+"</option>"),++l}),void 0===socialWarfarePlugin.lastClass&&(socialWarfarePlugin.lastClass="swp_flat_fresh swp_default_full_color swp_individual_full_color swp_other_full_color");var _="swp_"+e+" swp_default_"+s+" swp_individual_"+n+" swp_other_"+a;t(".swp_social_panel").removeClass(socialWarfarePlugin.lastClass).addClass(_),socialWarfarePlugin.lastClass=_})}}function w(){t('select[name="button_size"],select[name="button_alignment"]').on("change",function(){t(".swp_social_panel").css({width:"100%"});var e,o=t(".swp_social_panel").width(),s=t('select[name="button_size"]').val(),n=t('select[name="button_alignment"]').val();"full_width"==n&&1!=s||s>=1?(e=o/s,t(".swp_social_panel").css("cssText","width:"+e+"px!important;"),t(".swp_social_panel").css({transform:"scale("+s+")","transform-origin":"left"})):"full_width"!=n&&s<1&&(e=o/s,t(".swp_social_panel").css({transform:"scale("+s+")","transform-origin":n})),socialWarfarePlugin.activateHoverStates()})}function g(){var e=t('select[name="ctt_theme"]');e.on("change",function(){var e=t('select[name="ctt_theme"]').val();t(".swp_CTT").attr("class","swp_CTT").addClass(e)}),e.trigger("change")}function h(e,o){var s=t(".sw-admin-wrapper");s.attr("swp-addons"),s.attr("swp-registrations");t(".registration-wrapper."+o).attr("registration",e),1===parseInt(e)?(s.attr("sw-registered",e),t(".sw-top-menu").attr("sw-registered",e),C(s,"swp-registrations",o)):y(s,"swp-registrations",o)}function y(e,o,s){var n=t(e).attr(o),a=n.indexOf(s);if(-1!==a){var l=a+s.length,i=n.slice(0,a)+n.slice(l);t(e).attr(o,i)}}function C(e,o,s){var n=t(e).attr(o);n.includes(s)||t(e).attr(o,n+s)}function b(o,s){var n=!1,a={action:"swp_register_plugin",security:swpAdminOptionsData.registerNonce,activity:"register",name_key:o,item_id:s,license_key:t('input[name="'+o+'_license_key"]').val()};return p(),t.post(ajaxurl,a,function(t){t=JSON.parse(t),t.success?(h("1",o),n=!0):alert("Failure: "+t.data),e.location.reload(!0),d()}),n}function O(o,s){var n=!1,a={action:"swp_unregister_plugin",security:swpAdminOptionsData.registerNonce,activity:"unregister",name_key:o,item_id:s};return p(),t.post(ajaxurl,a,function(s){s=JSON.parse(s),s.success?(t('input[name="'+o+'_license_key"]').val(""),h("0",o),n=!0):alert("Failure: "+s.data),e.location.reload(!0),d()}),n}function k(){t(".register-plugin").on("click",function(){return b(t(this).attr("swp-addon"),t(this).attr("swp-item-id")),!1}),t(".unregister-plugin").on("click",function(){return O(t(this).attr("swp-addon"),t(this).attr("swp-item-id")),!1})}function x(){t(".sw-buttons-sort.sw-active").sortable({connectWith:".sw-buttons-sort.sw-inactive",update:function(){u()}}),t(".sw-buttons-sort.sw-inactive").sortable({connectWith:".sw-buttons-sort.sw-active",update:function(){u()}})}function P(){t(".sw-system-status").on("click",function(e){e.preventDefault?e.preventDefault():e.returnValue=!1,t(".system-status-wrapper").slideToggle(),n(t(".system-status-container").get(0))})}function W(){t(".sw-premium-blocker").tooltip({items:".sw-premium-blocker",content:"<i></i>Unlock this feature by registering your license.",position:{my:"center top",at:"center top"},tooltipClass:"sw-admin-hover-notice",open:function(e,o){if(void 0===e.originalEvent)return!1;var s=t(o.tooltip).attr("id");t("div.ui-tooltip").not("#"+s).remove()},close:function(e,o){o.tooltip.hover(function(){t(this).stop(!0).fadeTo(400,1)},function(){t(this).fadeOut("400",function(){t(this).remove()})})}})}function S(){var e;t(".swp_upload_image_button").click(function(o){o.preventDefault();var s=t(this).attr("for");if(e)return void e.open();e=wp.media.frames.file_frame=wp.media({title:"Choose Image",button:{text:"Choose Image"},multiple:!1}),e.on("select",function(){var o=e.state().get("selection").first().toJSON();t('input[name="'+s+'"').val(o.url)}),e.open()})}function D(){var e=t("#ctt_preview"),o=t("select[name=ctt_theme]");e.length||(e=t('<style id="ctt_preview"></style>'),t("head").append(e)),"none"===t(o).val()&&T(),t(o).on("change",function(e){"none"===e.target.value&&T()}),t("textarea[name=ctt_css]").on("keyup",T)}function T(){var e=t("#ctt_preview"),o=t("textarea[name=ctt_css]");t(e).text(t(o).val())}e.onload=function(){var e="[name=default_colors],[name=hover_colors], [name=single_colors]",o="[name=float_default_colors], [name=float_hover_colors], [name=float_single_colors]";t(e).each(function(e,o){var s=t(o).val(),n=t("[name=custom_color]").parent().parent(),a=t("[name=custom_color_outlines]").parent().parent();-1!==s.indexOf("custom")&&(s.indexOf("outlines")>0?a.show():n.show())}),t(o).each(function(e,o){var s=t(o).val(),n=t("[name=float_custom_color]").parent().parent(),a=t("[name=float_custom_color_outlines]").parent().parent();-1!==s.indexOf("custom")&&(s.indexOf("outlines")>0?a.show():n.show())}),t(e).on("change",function(o){var n=(o.target.value,t("[name=custom_color]").parent().parent()),a=t("[name=custom_color_outlines]").parent().parent();s(o,e,n,a)}),t(o).on("change",function(e){var n=(e.target.value,t("[name=float_custom_color]").parent().parent()),a=t("[name=float_custom_color_outlines]").parent().parent();s(e,o,n,a)})},t(document).ready(function(){_(),c(),l(),i(),r(),v(),swpConditionalFields(),g(),w(),k(),x(),P(),W(),S(),D()})}(this,jQuery);
1
+ !function(e,t,o){"use strict";function s(e,o,s,n){var a=(e.target.value,{customColor:!1,customOutlines:!1});t(o).each(function(e,o){var s=t(o).val();-1!==s.indexOf("custom")&&(s.indexOf("outlines")>0?a.customOutlines=!0:a.customColor=!0)}),a.customColor?s.slideDown():s.slideUp(),a.customOutlines?n.slideDown():n.slideUp()}function n(t){var o,s;document.body.createTextRange?(o=document.body.createTextRange(),o.moveToElementText(t),o.select()):e.getSelection&&(s=e.getSelection(),o=document.createRange(),o.selectNodeContents(t),s.removeAllRanges(),s.addRange(o))}function a(){var e={};return t("form.sw-admin-settings-form input, form.sw-admin-settings-form select, form.sw-admin-settings-form textarea").each(function(){var o,s=t(this),n=s.attr("name");o="checkbox"===s.attr("type")?s.prop("checked"):s.val(),e[n]=o}),e.order_of_icons={},t(".sw-active i").each(function(){var o=t(this).data("network");e.order_of_icons[o]=o}),e}function l(){var e=t(".sw-top-menu").offset(),o=t(".sw-top-menu").width();t(".sw-top-menu").css({position:"fixed",left:e.left,top:e.top,width:o}),t(".sw-admin-wrapper").css("padding-top","75px")}function i(){t(".sw-tab-selector").on("click",function(e){e.preventDefault(),t("html, body").animate({scrollTop:0},300);var o=t(this).attr("data-link");t(".sw-admin-tab").hide(),t("#"+o).show(),t(".sw-header-menu li").removeClass("sw-active-tab"),t(this).parents("li").addClass("sw-active-tab"),"swp_styles"===o&&socialWarfarePlugin.activateHoverStates(),swpConditionalFields()})}function r(){t(".sw-checkbox-toggle").on("click",function(){var e=t(this).attr("status"),o=t(this).attr("field");"on"===e?(t(this).attr("status","off"),t(o).prop("checked",!1)):(t(this).attr("status","on"),t(o).prop("checked",!0)),u(),swpConditionalFields()})}function c(){t("form.sw-admin-settings-form input, form.sw-admin-settings-form select").on("change",function(){swpConditionalFields(),socialWarfarePlugin.newOptions=a(),u()}),socialWarfarePlugin.defaultOptions=a()}function u(){socialWarfarePlugin.newOptions=a(),JSON.stringify(socialWarfarePlugin.newOptions)!==JSON.stringify(socialWarfarePlugin.defaultOptions)?t(".sw-save-settings").removeClass("sw-navy-button").addClass("sw-red-button"):t(".sw-save-settings").removeClass("sw-red-button").addClass("sw-navy-button")}function _(){t(".sw-save-settings").on("click",function(e){e.preventDefault?e.preventDefault():e.returnValue=!1,p();var o=a(),s={action:"swp_store_settings",security:swpAdminOptionsData.optionsNonce,settings:o};t.post(ajaxurl,s,function(e){m(),socialWarfarePlugin.defaultOptions=a(),u()})})}function p(){t("body").append('<div class="sw-loading-bg"><div class="sw-loading-message">Saving Changes</div></div>')}function m(){t(".sw-loading-message").html("Success!").removeClass("sw-loading-message").addClass("sw-loading-complete"),t(".sw-loading-bg").delay(1e3).fadeOut(1e3),setTimeout(function(){t(".sw-loading-bg").remove()},2e3)}function d(){var e=(t('select[name="button_shape"]').val(),t('select[name="default_colors"]').val()),o=t('select[name="single_colors"]').val(),s=t('select[name="hover_colors"]').val();t("style.swp_customColorStuff").remove();var n=t('input[name="custom_color"]').val(),a="";"custom_color"!=e&&"custom_color"!=o&&"custom_color"!=s||(a=".swp_social_panel.swp_default_customColor a, html body .swp_social_panel.swp_individual_customColor .nc_tweetContainer:hover a, body .swp_social_panel.swp_other_customColor:hover a {color:white} .swp_social_panel.swp_default_customColor .nc_tweetContainer, html body .swp_social_panel.swp_individual_customColor .nc_tweetContainer:hover, body .swp_social_panel.swp_other_customColor:hover .nc_tweetContainer {background-color:"+n+";border:1px solid "+n+";}"),"custom_color_outlines"!=e&&"custom_color_outlines"!=o&&"custom_color_outlines"!=s||(a=a+" .swp_social_panel.swp_default_custom_color_outlines a, html body .swp_social_panel.swp_individual_custom_color_outlines .nc_tweetContainer:hover a, body .swp_social_panel.swp_other_custom_color_outlines:hover a { color:"+n+"; } .swp_social_panel.swp_default_custom_color_outlines .nc_tweetContainer, html body .swp_social_panel.swp_individual_custom_color_outlines .nc_tweetContainer:hover, body .swp_social_panel.swp_other_custom_color_outlines:hover .nc_tweetContainer { background:transparent; border:1px solid "+n+"; }"),t("head").append('<style type="text/css" class="swp_customColorStuff">'+a+"</style>")}function f(){function e(e){var o=t('select[name="'+e+'"]').val();if(0===o.indexOf("custom")){return e.slice(0,e.indexOf("_"))+"_full_color"}return o}var o=e("button_shape"),s=e("default_colors"),n=e("single_colors"),a=e("hover_colors"),l="swp_"+o+" swp_default_"+s+" swp_individual_"+n+" swp_other_"+a;void 0===socialWarfarePlugin.lastClass&&(socialWarfarePlugin.lastClass="swp_flat_fresh swp_default_full_color swp_individual_full_color swp_other_full_color");var l="swp_"+o+" swp_default_"+s+" swp_individual_"+n+" swp_other_"+a;t(".swp_social_panel").removeClass("swp_other_medium_gray"),t(".swp_social_panel").removeClass(socialWarfarePlugin.lastClass).addClass(l),socialWarfarePlugin.lastClass=l}function v(){var e={full_color:"Full Color",light_gray:"Light Gray",medium_gray:"Medium Gray",dark_gray:"Dark Gray",light_gray_outlines:"Light Gray Outlines",medium_gray_outlines:"Medium Gray Outlines",dark_gray_outlines:"Dark Gray Outlines",color_outlines:"Color Outlines",custom_color:"Custom Color",custom_color_outlines:"Custom Color Outlines"},o={flat_fresh:e,leaf:e,pill:e,three_dee:{full_color:"Full Color",light_gray:"Light Gray",medium_gray:"Medium Gray",dark_gray:"Dark Gray"},connected:e,shift:e,boxed:e};if(0!==t('select[name="button_shape"]').length){var s=t('select[name="button_shape"]').val(),n=t('select[name="default_colors"]').val(),a=t('select[name="single_colors"]').val(),l=t('select[name="hover_colors"]').val();t('select[name="default_colors"] option, select[name="single_colors"] option, select[name="hover_colors"] option').remove(),t.each(o[s],function(e,o){e===n?t('select[name="default_colors"]').append('<option value="'+e+'" selected>'+o+"</option>"):t('select[name="default_colors"]').append('<option value="'+e+'">'+o+"</option>"),e===a?t('select[name="single_colors"]').append('<option value="'+e+'" selected>'+o+"</option>"):t('select[name="single_colors"]').append('<option value="'+e+'">'+o+"</option>"),e===l?t('select[name="hover_colors"]').append('<option value="'+e+'" selected>'+o+"</option>"):t('select[name="hover_colors"]').append('<option value="'+e+'">'+o+"</option>"),"custom_color"==n||"custom_color_outlines"==n||"custom_color"==a||"custom_color_outlines"==a||"custom_color"==l||"custom_color_outlines"==l?(t(".customColor_wrapper").slideDown(),d()):t(".customColor_wrapper").slideUp()}),t('select[name="default_colors"], select[name="single_colors"], select[name="hover_colors"]').on("change",f),t('select[name="button_shape"]').on("change",function(){var e=t('select[name="button_shape"]').val(),s=t('select[name="default_colors"]').val(),n=t('select[name="single_colors"]').val(),a=t('select[name="hover_colors"]').val(),l=0,i=o[e],r=i.hasOwnProperty(s),c=i.hasOwnProperty(n),u=i.hasOwnProperty(a);t('select[name="default_colors"] option, select[name="single_colors"] option, select[name="hover_colors"] option').remove(),t.each(o[e],function(e,o){e===s||0==r&&0==l?t('select[name="default_colors"]').append('<option value="'+e+'" selected>'+o+"</option>"):t('select[name="default_colors"]').append('<option value="'+e+'">'+o+"</option>"),e===n||0==c&&0==l?t('select[name="single_colors"]').append('<option value="'+e+'" selected>'+o+"</option>"):t('select[name="single_colors"]').append('<option value="'+e+'">'+o+"</option>"),e===a||0==u&&0==l?t('select[name="hover_colors"]').append('<option value="'+e+'" selected>'+o+"</option>"):t('select[name="hover_colors"]').append('<option value="'+e+'">'+o+"</option>"),++l}),void 0===socialWarfarePlugin.lastClass&&(socialWarfarePlugin.lastClass="swp_flat_fresh swp_default_full_color swp_individual_full_color swp_other_full_color");var _="swp_"+e+" swp_default_"+s+" swp_individual_"+n+" swp_other_"+a;t(".swp_social_panel").removeClass(socialWarfarePlugin.lastClass).addClass(_),socialWarfarePlugin.lastClass=_})}}function w(){t('select[name="button_size"],select[name="button_alignment"]').on("change",function(){t(".swp_social_panel").css({width:"100%"});var e,o=t(".swp_social_panel").width(),s=t('select[name="button_size"]').val(),n=t('select[name="button_alignment"]').val();"full_width"==n&&1!=s||s>=1?(e=o/s,t(".swp_social_panel").css("cssText","width:"+e+"px!important;"),t(".swp_social_panel").css({transform:"scale("+s+")","transform-origin":"left"})):"full_width"!=n&&s<1&&(e=o/s,t(".swp_social_panel").css({transform:"scale("+s+")","transform-origin":n})),socialWarfarePlugin.activateHoverStates()})}function g(){var e=t('select[name="ctt_theme"]');e.on("change",function(){var e=t('select[name="ctt_theme"]').val();t(".swp_CTT").attr("class","swp_CTT").addClass(e)}),e.trigger("change")}function h(e,o){var s=t(".sw-admin-wrapper");s.attr("swp-addons"),s.attr("swp-registrations");t(".registration-wrapper."+o).attr("registration",e),1===parseInt(e)?(s.attr("sw-registered",e),t(".sw-top-menu").attr("sw-registered",e),C(s,"swp-registrations",o)):y(s,"swp-registrations",o)}function y(e,o,s){var n=t(e).attr(o),a=n.indexOf(s);if(-1!==a){var l=a+s.length,i=n.slice(0,a)+n.slice(l);t(e).attr(o,i)}}function C(e,o,s){var n=t(e).attr(o);n.includes(s)||t(e).attr(o,n+s)}function b(o,s){var n=!1,a={action:"swp_register_plugin",security:swpAdminOptionsData.registerNonce,activity:"register",name_key:o,item_id:s,license_key:t('input[name="'+o+'_license_key"]').val()};return p(),t.post(ajaxurl,a,function(t){t=JSON.parse(t),t.success?(h("1",o),n=!0):alert("Failure: "+t.data),e.location.reload(!0),m()}),n}function O(o,s){var n=!1,a={action:"swp_unregister_plugin",security:swpAdminOptionsData.registerNonce,activity:"unregister",name_key:o,item_id:s};return p(),t.post(ajaxurl,a,function(s){s=JSON.parse(s),s.success?(t('input[name="'+o+'_license_key"]').val(""),h("0",o),n=!0):alert("Failure: "+s.data),e.location.reload(!0),m()}),n}function k(){t(".register-plugin").on("click",function(){return b(t(this).attr("swp-addon"),t(this).attr("swp-item-id")),!1}),t(".unregister-plugin").on("click",function(){return O(t(this).attr("swp-addon"),t(this).attr("swp-item-id")),!1})}function x(){t(".sw-buttons-sort.sw-active").sortable({connectWith:".sw-buttons-sort.sw-inactive",update:function(){u()}}),t(".sw-buttons-sort.sw-inactive").sortable({connectWith:".sw-buttons-sort.sw-active",update:function(){u()}})}function P(){t(".sw-system-status").on("click",function(e){e.preventDefault?e.preventDefault():e.returnValue=!1,t(".system-status-wrapper").slideToggle(),n(t(".system-status-container").get(0))})}function W(){t(".sw-premium-blocker").tooltip({items:".sw-premium-blocker",content:"<i></i>Unlock this feature by registering your license.",position:{my:"center top",at:"center top"},tooltipClass:"sw-admin-hover-notice",open:function(e,o){if(void 0===e.originalEvent)return!1;var s=t(o.tooltip).attr("id");t("div.ui-tooltip").not("#"+s).remove()},close:function(e,o){o.tooltip.hover(function(){t(this).stop(!0).fadeTo(400,1)},function(){t(this).fadeOut("400",function(){t(this).remove()})})}})}function D(){var e;t(".swp_upload_image_button").click(function(o){o.preventDefault();var s=t(this).attr("for");if(e)return void e.open();e=wp.media.frames.file_frame=wp.media({title:"Choose Image",button:{text:"Choose Image"},multiple:!1}),e.on("select",function(){var o=e.state().get("selection").first().toJSON();t('input[name="'+s+'"').val(o.url)}),e.open()})}function S(){var e=t("#ctt_preview"),o=t("select[name=ctt_theme]");e.length||(e=t('<style id="ctt_preview"></style>'),t("head").append(e)),"none"===t(o).val()&&T(),t(o).on("change",function(e){"none"===e.target.value&&T()}),t("textarea[name=ctt_css]").on("keyup",T)}function T(){var e=t("#ctt_preview"),o=t("textarea[name=ctt_css]");t(e).text(t(o).val())}e.onload=function(){var e="[name=default_colors],[name=hover_colors], [name=single_colors]",o="[name=float_default_colors], [name=float_hover_colors], [name=float_single_colors]";t("[name=custom_color],[name=custom_color_outlines],[name=float_custom_color],[name=float_custom_color_outlines]").parent().parent().hide(),t(e).each(function(e,o){var s=t(o).val(),n=t("[name=custom_color]").parent().parent(),a=t("[name=custom_color_outlines]").parent().parent();-1!==s.indexOf("custom")&&(s.indexOf("outlines")>0?a.show():n.show())}),t(o).each(function(e,o){var s=t(o).val(),n=t("[name=float_custom_color]").parent().parent(),a=t("[name=float_custom_color_outlines]").parent().parent();-1!==s.indexOf("custom")&&(s.indexOf("outlines")>0?a.show():n.show())}),t(e).on("change",function(o){var n=(o.target.value,t("[name=custom_color]").parent().parent()),a=t("[name=custom_color_outlines]").parent().parent();s(o,e,n,a)}),t(o).on("change",function(e){var n=(e.target.value,t("[name=float_custom_color]").parent().parent()),a=t("[name=float_custom_color_outlines]").parent().parent();n.hide(),a.hide(),s(e,o,n,a)})},t(document).ready(function(){_(),c(),l(),i(),r(),v(),swpConditionalFields(),g(),w(),k(),x(),P(),W(),D(),S()})}(this,jQuery);
js/script.js CHANGED
@@ -100,6 +100,7 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
100
  'use strict';
101
 
102
  var swp = window.socialWarfarePlugin;
 
103
 
104
  function absint( $int ) {
105
  return parseInt( $int, 10 );
@@ -222,7 +223,7 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
222
 
223
  var el = $( '<div class="nc_wrapper" style="background-color:' + backgroundColor + '"></div>' );
224
  el.appendTo( 'body' );
225
- // var position = firstSocialPanel.data( 'float' );
226
  firstSocialPanel.clone().appendTo( el );
227
 
228
  $( '.nc_wrapper' ).hide().addClass( position );
@@ -255,6 +256,7 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
255
  var scrollPos = windowElement.scrollTop();
256
  var st = $( window ).scrollTop();
257
  var visible = false;
 
258
 
259
  if ( typeof window.swpOffsets == 'undefined' ) {
260
  window.swpOffsets = {};
@@ -277,10 +279,8 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
277
  if ( floatLeftMobile == 'bottom' ) {
278
  location = 'bottom';
279
  } else if ( floatLeftMobile == 'top' ) {
280
- location = 'top';
281
  }
282
- } else if (visible) {
283
- visible == true;
284
  } else {
285
  visible = false;
286
  }
@@ -302,17 +302,28 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
302
 
303
  if ( transition == 'slide' ) {
304
  if ( visible == true ) {
305
- ncSideFloater.css(direction, "-100px");
306
  } else {
307
  ncSideFloater.css(direction, "5px");
308
  }
309
 
310
  } else if ( transition == 'fade' ) {
311
- if ( visible == true ) {
312
- ncSideFloater.fadeOut( 200 );
313
- } else {
314
- ncSideFloater.fadeIn( 200 ).css("display", "flex")
315
- }
 
 
 
 
 
 
 
 
 
 
 
316
  }
317
  }
318
 
100
  'use strict';
101
 
102
  var swp = window.socialWarfarePlugin;
103
+ var animating = false;
104
 
105
  function absint( $int ) {
106
  return parseInt( $int, 10 );
223
 
224
  var el = $( '<div class="nc_wrapper" style="background-color:' + backgroundColor + '"></div>' );
225
  el.appendTo( 'body' );
226
+ var position = firstSocialPanel.data( 'float' );
227
  firstSocialPanel.clone().appendTo( el );
228
 
229
  $( '.nc_wrapper' ).hide().addClass( position );
256
  var scrollPos = windowElement.scrollTop();
257
  var st = $( window ).scrollTop();
258
  var visible = false;
259
+ console.log("Animating: ", animating);
260
 
261
  if ( typeof window.swpOffsets == 'undefined' ) {
262
  window.swpOffsets = {};
279
  if ( floatLeftMobile == 'bottom' ) {
280
  location = 'bottom';
281
  } else if ( floatLeftMobile == 'top' ) {
282
+ location = 'top';``
283
  }
 
 
284
  } else {
285
  visible = false;
286
  }
302
 
303
  if ( transition == 'slide' ) {
304
  if ( visible == true ) {
305
+ ncSideFloater.css(direction, "-150px");
306
  } else {
307
  ncSideFloater.css(direction, "5px");
308
  }
309
 
310
  } else if ( transition == 'fade' ) {
311
+ console.log("Pre-fade controls. 1200");
312
+ if (false === animating) {
313
+ console.log("Inner if.");
314
+ animating = true;
315
+ console.log("Visible: ", visible);
316
+ if ( visible == true ) {
317
+ console.log("fadingOut");
318
+ // !animating ? ncSideFloater.animate({opacity:0}, 2000, function() {animating = false} ) : '';
319
+ ncSideFloater.fadeOut(1200, function() {animating = false; console.log("done fade out.")});
320
+ } else {
321
+ console.log("fadingIn");
322
+ ncSideFloater.fadeIn(1200, function() {animating = false; console.log("done fade in.")}).css("display", "flex");
323
+ // !animating ? ncSideFloater.animate({opacity: 1}, function() {animating = false} ).css("display", "flex") : '';
324
+ }
325
+ }
326
+
327
  }
328
  }
329
 
js/script.min.js CHANGED
@@ -1 +1 @@
1
- var socialWarfarePlugin=socialWarfarePlugin||{};!function(t,e){var i,a=t.socialWarfarePlugin;a.throttle=i=function(t,i,o,n){function s(){function a(){l=+new Date,o.apply(p,c)}function s(){r=e}var p=this,d=+new Date-l,c=arguments;n&&!r&&a(),r&&clearTimeout(r),n===e&&d>t?a():!0!==i&&(r=setTimeout(n?s:a,n===e?t-d:t))}var r,l=0;return"boolean"!=typeof i&&(n=o,o=i,i=e),a.guid&&(s.guid=o.guid=o.guid||a.guid++),s},a.debounce=function(t,a,o){return o===e?i(t,a,!1):i(t,o,!1!==a)}}(this),function(t,e,i){"use strict";function a(t){return parseInt(t,10)}function o(i){var a=e.Event(i);e(t).trigger(a)}function n(){e(".swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:not(.swp_nohover) .iconFiller").removeAttr("style"),e(".swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:not(.swp_nohover)").removeAttr("style")}function s(){e(".nc_wrapper").length&&e(".nc_wrapper").remove();var i=e(".swp_social_panel").not('[data-float="ignore"]').first(),a=i.data("float"),o=i.data("align");if(a){if(e(".swp_social_panel").not(".swp_social_panelSide").length){var n=e(".swp_social_panelSide").data("float-mobile"),s=i.offset(),r=e(".swp_social_panelSide").filter(":not(.mobile)"),l=r.data("screen-width");if(s.left<100||e(t).width()<l)var p=n;else var p=a}else var p=a;var d=e(".swp_social_panel").data("floatcolor"),c=e('<div class="nc_wrapper" style="background-color:'+d+'"></div>');c.appendTo("body"),i.clone().appendTo(c),e(".nc_wrapper").hide().addClass(p);var f=i.outerWidth(!0),h=i.offset();e(".swp_social_panel").last().addClass("nc_floater").css({width:f,left:"center"==o?0:h.left}),e(".swp_social_panel .swp_count").css({transition:"padding .1s linear"}),e(".swp_social_panel").eq(0).addClass("swp_one"),e(".swp_social_panel").eq(2).addClass("swp_two"),e(".swp_social_panel").eq(1).addClass("swp_three")}}function r(){var i=e(".swp_social_panel"),a=i.not('[data-float="float_ignore"]').eq(0).data("float"),o=e(t),n=o.height(),s=e(".nc_wrapper"),r=e(".swp_social_panelSide").filter(":not(.mobile)"),l=(e(".swp_social_panel").data("position"),r.data("screen-width")),p=i.eq(0).offset(),d=o.scrollTop(),c=(e(t).scrollTop(),!1);if(void 0===t.swpOffsets&&(t.swpOffsets={}),"right"===a||"left"===a){var f=e(".swp_social_panelSide").data("float-mobile"),h=-1!==a.indexOf("left")?"left":"right";e(".swp_social_panel").not(".swp_social_panelSide").length?(e(".swp_social_panel").not(".swp_social_panelSide, .nc_floater").each(function(){var t=e(this).offset(),i=e(this).height();t.top+i>d&&t.top<d+n&&(c=!0)}),p.left<100||e(t).width()<l?(c=!0,"bottom"==f?a="bottom":"top"==f&&(a="top")):c||(c=!1)):e(t).width()>l?c=!1:(c=!0,"bottom"==f?a="bottom":"top"==f&&(a="top"));var _=r.data("transition");"slide"==_?1==c?r.css(h,"-100px"):r.css(h,"5px"):"fade"==_&&(1==c?r.fadeOut(200):r.fadeIn(200).css("display","flex"))}if("bottom"==a||"top"==a)if(c=!1,e(".swp_social_panel").not(".swp_social_panelSide, .nc_floater").each(function(){var t=e(this).offset(),i=e(this).height();t.top+i>d&&t.top<d+n&&(c=!0)}),c)s.hide(),"bottom"==a?e("body").animate({"padding-bottom":t.bodyPaddingBottom+"px"},0):"top"==a&&e("body").animate({"padding-top":t.bodyPaddingTop+"px"},0);else{var w,u;s.show(),"bottom"==a?(w=t.bodyPaddingBottom+50,e("body").animate({"padding-bottom":w+"px"},0)):"top"==a&&(u=e(".swp_social_panel").not(".swp_social_panelSide, .nc_wrapper .swp_social_panel").first().offset(),u.top>d+n&&(w=t.bodyPaddingTop+50,e("body").animate({"padding-top":w+"px"},0)))}}function l(){0!==e(".swp_social_panel").length&&(s(),c.activateHoverStates(),d(),e(t).scrollTop(),e(t).scroll(c.throttle(50,function(){r()})),e(t).trigger("scroll"),e(".swp_social_panel").css({opacity:1}))}function p(){var i={wrap:'<div class="sw-pinit" />',pageURL:document.URL},a=e.extend(i,a);e(".swp-content-locator").parent().find("img").each(function(){var i=e(this);if(!(i.outerHeight()<swpPinIt.minHeight||i.outerWidth()<swpPinIt.minWidth)){var o=!1;if(void 0!==swpPinIt.image_source?o=swpPinIt.image_source:i.data("media")?o=i.data("media"):e(this).data("lazy-src")?o=e(this).data("lazy-src"):i[0].src&&(o=i[0].src),!1!==o&&!i.hasClass("no_pin")){var n="";void 0!==swpPinIt.image_description?n=swpPinIt.image_description:i.attr("title")?n=i.attr("title"):i.attr("alt")&&(n=i.attr("alt"));var s="http://pinterest.com/pin/create/bookmarklet/?media="+encodeURI(o)+"&url="+encodeURI(a.pageURL)+"&is_video=false&description="+encodeURIComponent(n),r=i.attr("class"),l=i.attr("style");i.removeClass().attr("style","").wrap(a.wrap),i.after('<a href="'+s+'" class="sw-pinit-button sw-pinit-'+swpPinIt.vLocation+" sw-pinit-"+swpPinIt.hLocation+'">Save</a>'),i.parent(".sw-pinit").addClass(r).attr("style",l),e(".sw-pinit .sw-pinit-button").on("click",function(){if(t.open(e(this).attr("href"),"Pinterest","width=632,height=253,status=0,toolbar=0,menubar=0,location=1,scrollbars=1"),"function"==typeof ga&&!0===swpClickTracking){ga("send","event","social_media","swp_pin_image_share")}return!1})}}})}function d(){e(".nc_tweet, a.swp_CTT").off("click"),e(".nc_tweet, a.swp_CTT").on("click",function(i){if(e(this).hasClass("noPop"))return!1;if(e(this).data("link")){i.preventDefault?i.preventDefault():i.returnValue=!1;var a,o,n,s,r,l=e(this).data("link");if(l=l.replace("’","'"),e(this).hasClass("pinterest")||e(this).hasClass("buffer_link")||e(this).hasClass("flipboard")?(a=550,o=775):(a=270,o=500),n=t.screenY+(t.innerHeight-a)/2,s=t.screenX+(t.innerWidth-o)/2,r="height="+a+",width="+o+",top="+n+",left="+s,t.open(l,"_blank",r),"function"==typeof ga&&!0===swpClickTracking){if(e(this).hasClass("nc_tweet"))var p=e(this).parents(".nc_tweetContainer").attr("data-network");else if(e(this).hasClass("swp_CTT"))var p="ctt";ga("send","event","social_media","swp_"+p+"_share")}return!1}})}var c=t.socialWarfarePlugin,f={};socialWarfarePlugin.fetchShares=function(){e.when(e.get("https://graph.facebook.com/?fields=og_object{likes.summary(true).limit(0)},share&id="+swp_post_url),swp_post_recovery_url?e.get("https://graph.facebook.com/?fields=og_object{likes.summary(true).limit(0)},share&id="+swp_post_recovery_url):"").then(function(t,e){if(void 0!==t[0].share){var i=a(t[0].share.share_count),o=a(t[0].share.comment_count);if(void 0!==t[0].og_object)var n=a(t[0].og_object.likes.summary.total_count);else var n=0;var s=i+o+n;if(swp_post_recovery_url){if(void 0!==e[0].share)var r=a(e[0].share.share_count),l=a(e[0].share.comment_count);else var r=0,l=0;if(void 0!==e[0].og_object)var p=a(e[0].og_object.likes.summary.total_count);else var p=0;var d=r+l+p;s!==d&&(s+=d)}f={action:"swp_facebook_shares_update",post_id:swp_post_id,activity:s}}})},c.activateHoverStates=function(){o("pre_activate_buttons"),e(".swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer").on("mouseenter",function(){if(e(this).hasClass("swp_nohover"));else{n();var t=e(this).find(".swp_share").outerWidth(),i=e(this).find("i.sw").outerWidth(),a=e(this).width(),o=1+(t+35)/a;e(this).find(".iconFiller").width(t+i+25+"px"),e(this).css({flex:o+" 1 0%"})}}),e(".swp_social_panel:not(.swp_social_panelSide)").on("mouseleave",function(){n()})},e(t).on("load",function(){"undefined"!=typeof swpPinIt&&swpPinIt.enabled&&p()}),e(document).ready(function(){d(),l();var i=e(".swp_social_panelSide");t.bodyPaddingTop=a(e("body").css("padding-top").replace("px","")),t.bodyPaddingBottom=a(e("body").css("padding-bottom").replace("px",""));var o=!1;if(e(".swp_social_panel").hover(function(){o=!0},function(){o=!1}),e(t).resize(c.debounce(250,function(){e(".swp_social_panel").length&&!1!==o||(t.swpAdjust=1,l())})),e(document.body).on("post-load",function(){l()}),0!==i.length){if(-1!==e(i).attr("class").indexOf("swp_side"))return;var n=e(i).height(),s=e(t).height(),r=a(s/2-n/2);setTimeout(function(){e(i).animate({top:r},0)},105)}1===e(".swp-content-locator").parent().children().length&&e(".swp-content-locator").parent().hide()})}(this,jQuery),function(t){var e=/iPhone/i,i=/iPod/i,a=/iPad/i,o=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,n=/Android/i,s=/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,r=/(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,l=/Windows Phone/i,p=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,d=/BlackBerry/i,c=/BB10/i,f=/Opera Mini/i,h=/(CriOS|Chrome)(?=.*\bMobile\b)/i,_=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,w=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),u=function(t,e){return t.test(e)},v=function(t){var v=t||navigator.userAgent,b=v.split("[FBAN");if(void 0!==b[1]&&(v=b[0]),b=v.split("Twitter"),void 0!==b[1]&&(v=b[0]),this.apple={phone:u(e,v),ipod:u(i,v),tablet:!u(e,v)&&u(a,v),device:u(e,v)||u(i,v)||u(a,v)},this.amazon={phone:u(s,v),tablet:!u(s,v)&&u(r,v),device:u(s,v)||u(r,v)},this.android={phone:u(s,v)||u(o,v),tablet:!u(s,v)&&!u(o,v)&&(u(r,v)||u(n,v)),device:u(s,v)||u(r,v)||u(o,v)||u(n,v)},this.windows={phone:u(l,v),tablet:u(p,v),device:u(l,v)||u(p,v)},this.other={blackberry:u(d,v),blackberry10:u(c,v),opera:u(f,v),firefox:u(_,v),chrome:u(h,v),device:u(d,v)||u(c,v)||u(f,v)||u(_,v)||u(h,v)},this.seven_inch=u(w,v),this.any=this.apple.device||this.android.device||this.windows.device||this.other.device||this.seven_inch,this.phone=this.apple.phone||this.android.phone||this.windows.phone,this.tablet=this.apple.tablet||this.android.tablet||this.windows.tablet,"undefined"==typeof window)return this},b=function(){var t=new v;return t.Class=v,t};"undefined"!=typeof module&&module.exports&&"undefined"==typeof window?module.exports=v:"undefined"!=typeof module&&module.exports&&"undefined"!=typeof window?module.exports=b():"function"==typeof define&&define.amd?define("swp_isMobile",[],t.swp_isMobile=b()):t.swp_isMobile=b()}(this);
1
+ var socialWarfarePlugin=socialWarfarePlugin||{};!function(e,t){var i,o=e.socialWarfarePlugin;o.throttle=i=function(e,i,a,n){function s(){function o(){r=+new Date,a.apply(p,c)}function s(){l=t}var p=this,d=+new Date-r,c=arguments;n&&!l&&o(),l&&clearTimeout(l),n===t&&d>e?o():!0!==i&&(l=setTimeout(n?s:o,n===t?e-d:e))}var l,r=0;return"boolean"!=typeof i&&(n=a,a=i,i=t),o.guid&&(s.guid=a.guid=a.guid||o.guid++),s},o.debounce=function(e,o,a){return a===t?i(e,o,!1):i(e,a,!1!==o)}}(this),function(e,t,i){"use strict";function o(e){return parseInt(e,10)}function a(i){var o=t.Event(i);t(e).trigger(o)}function n(){t(".swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:not(.swp_nohover) .iconFiller").removeAttr("style"),t(".swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:not(.swp_nohover)").removeAttr("style")}function s(){t(".nc_wrapper").length&&t(".nc_wrapper").remove();var i=t(".swp_social_panel").not('[data-float="ignore"]').first(),o=i.data("float"),a=i.data("align");if(o){if(t(".swp_social_panel").not(".swp_social_panelSide").length){var n=t(".swp_social_panelSide").data("float-mobile"),s=i.offset(),l=t(".swp_social_panelSide").filter(":not(.mobile)"),r=l.data("screen-width");if(s.left<100||t(e).width()<r)var p=n;else var p=o}else var p=o;var d=t(".swp_social_panel").data("floatcolor"),c=t('<div class="nc_wrapper" style="background-color:'+d+'"></div>');c.appendTo("body");var p=i.data("float");i.clone().appendTo(c),t(".nc_wrapper").hide().addClass(p);var f=i.outerWidth(!0),h=i.offset();t(".swp_social_panel").last().addClass("nc_floater").css({width:f,left:"center"==a?0:h.left}),t(".swp_social_panel .swp_count").css({transition:"padding .1s linear"}),t(".swp_social_panel").eq(0).addClass("swp_one"),t(".swp_social_panel").eq(2).addClass("swp_two"),t(".swp_social_panel").eq(1).addClass("swp_three")}}function l(){var i=t(".swp_social_panel"),o=i.not('[data-float="float_ignore"]').eq(0).data("float"),a=t(e),n=a.height(),s=t(".nc_wrapper"),l=t(".swp_social_panelSide").filter(":not(.mobile)"),r=(t(".swp_social_panel").data("position"),l.data("screen-width")),p=i.eq(0).offset(),d=a.scrollTop(),c=(t(e).scrollTop(),!1);if(console.log("Animating: ",f),void 0===e.swpOffsets&&(e.swpOffsets={}),"right"===o||"left"===o){var h=t(".swp_social_panelSide").data("float-mobile"),_=-1!==o.indexOf("left")?"left":"right";t(".swp_social_panel").not(".swp_social_panelSide").length?(t(".swp_social_panel").not(".swp_social_panelSide, .nc_floater").each(function(){var e=t(this).offset(),i=t(this).height();e.top+i>d&&e.top<d+n&&(c=!0)}),p.left<100||t(e).width()<r?(c=!0,"bottom"==h?o="bottom":"top"==h&&(o="top")):c||(c=!1)):t(e).width()>r?c=!1:(c=!0,"bottom"==h?o="bottom":"top"==h&&(o="top"));var w=l.data("transition");"slide"==w?1==c?l.css(_,"-150px"):l.css(_,"5px"):"fade"==w&&(console.log("Pre-fade controls."),!1===f&&(console.log("Inner if."),f=!0,console.log("Visible: ",c),1==c?(console.log("fadingOut"),l.fadeOut(200,function(){f=!1,console.log("done fade out.")})):(console.log("fadingIn"),l.fadeIn(200,function(){f=!1,console.log("done fade out.")}).css("display","flex"))))}if("bottom"==o||"top"==o)if(c=!1,t(".swp_social_panel").not(".swp_social_panelSide, .nc_floater").each(function(){var e=t(this).offset(),i=t(this).height();e.top+i>d&&e.top<d+n&&(c=!0)}),c)s.hide(),"bottom"==o?t("body").animate({"padding-bottom":e.bodyPaddingBottom+"px"},0):"top"==o&&t("body").animate({"padding-top":e.bodyPaddingTop+"px"},0);else{var u,v;s.show(),"bottom"==o?(u=e.bodyPaddingBottom+50,t("body").animate({"padding-bottom":u+"px"},0)):"top"==o&&(v=t(".swp_social_panel").not(".swp_social_panelSide, .nc_wrapper .swp_social_panel").first().offset(),v.top>d+n&&(u=e.bodyPaddingTop+50,t("body").animate({"padding-top":u+"px"},0)))}}function r(){0!==t(".swp_social_panel").length&&(s(),c.activateHoverStates(),d(),t(e).scrollTop(),t(e).scroll(c.throttle(50,function(){l()})),t(e).trigger("scroll"),t(".swp_social_panel").css({opacity:1}))}function p(){var i={wrap:'<div class="sw-pinit" />',pageURL:document.URL},o=t.extend(i,o);t(".swp-content-locator").parent().find("img").each(function(){var i=t(this);if(!(i.outerHeight()<swpPinIt.minHeight||i.outerWidth()<swpPinIt.minWidth)){var a=!1;if(void 0!==swpPinIt.image_source?a=swpPinIt.image_source:i.data("media")?a=i.data("media"):t(this).data("lazy-src")?a=t(this).data("lazy-src"):i[0].src&&(a=i[0].src),!1!==a&&!i.hasClass("no_pin")){var n="";void 0!==swpPinIt.image_description?n=swpPinIt.image_description:i.attr("title")?n=i.attr("title"):i.attr("alt")&&(n=i.attr("alt"));var s="http://pinterest.com/pin/create/bookmarklet/?media="+encodeURI(a)+"&url="+encodeURI(o.pageURL)+"&is_video=false&description="+encodeURIComponent(n),l=i.attr("class"),r=i.attr("style");i.removeClass().attr("style","").wrap(o.wrap),i.after('<a href="'+s+'" class="sw-pinit-button sw-pinit-'+swpPinIt.vLocation+" sw-pinit-"+swpPinIt.hLocation+'">Save</a>'),i.parent(".sw-pinit").addClass(l).attr("style",r),t(".sw-pinit .sw-pinit-button").on("click",function(){if(e.open(t(this).attr("href"),"Pinterest","width=632,height=253,status=0,toolbar=0,menubar=0,location=1,scrollbars=1"),"function"==typeof ga&&!0===swpClickTracking){ga("send","event","social_media","swp_pin_image_share")}return!1})}}})}function d(){t(".nc_tweet, a.swp_CTT").off("click"),t(".nc_tweet, a.swp_CTT").on("click",function(i){if(t(this).hasClass("noPop"))return!1;if(t(this).data("link")){i.preventDefault?i.preventDefault():i.returnValue=!1;var o,a,n,s,l,r=t(this).data("link");if(r=r.replace("’","'"),t(this).hasClass("pinterest")||t(this).hasClass("buffer_link")||t(this).hasClass("flipboard")?(o=550,a=775):(o=270,a=500),n=e.screenY+(e.innerHeight-o)/2,s=e.screenX+(e.innerWidth-a)/2,l="height="+o+",width="+a+",top="+n+",left="+s,e.open(r,"_blank",l),"function"==typeof ga&&!0===swpClickTracking){if(t(this).hasClass("nc_tweet"))var p=t(this).parents(".nc_tweetContainer").attr("data-network");else if(t(this).hasClass("swp_CTT"))var p="ctt";ga("send","event","social_media","swp_"+p+"_share")}return!1}})}var c=e.socialWarfarePlugin,f=!1,h={};socialWarfarePlugin.fetchShares=function(){t.when(t.get("https://graph.facebook.com/?fields=og_object{likes.summary(true).limit(0)},share&id="+swp_post_url),swp_post_recovery_url?t.get("https://graph.facebook.com/?fields=og_object{likes.summary(true).limit(0)},share&id="+swp_post_recovery_url):"").then(function(e,t){if(void 0!==e[0].share){var i=o(e[0].share.share_count),a=o(e[0].share.comment_count);if(void 0!==e[0].og_object)var n=o(e[0].og_object.likes.summary.total_count);else var n=0;var s=i+a+n;if(swp_post_recovery_url){if(void 0!==t[0].share)var l=o(t[0].share.share_count),r=o(t[0].share.comment_count);else var l=0,r=0;if(void 0!==t[0].og_object)var p=o(t[0].og_object.likes.summary.total_count);else var p=0;var d=l+r+p;s!==d&&(s+=d)}h={action:"swp_facebook_shares_update",post_id:swp_post_id,activity:s}}})},c.activateHoverStates=function(){a("pre_activate_buttons"),t(".swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer").on("mouseenter",function(){if(t(this).hasClass("swp_nohover"));else{n();var e=t(this).find(".swp_share").outerWidth(),i=t(this).find("i.sw").outerWidth(),o=t(this).width(),a=1+(e+35)/o;t(this).find(".iconFiller").width(e+i+25+"px"),t(this).css({flex:a+" 1 0%"})}}),t(".swp_social_panel:not(.swp_social_panelSide)").on("mouseleave",function(){n()})},t(e).on("load",function(){"undefined"!=typeof swpPinIt&&swpPinIt.enabled&&p()}),t(document).ready(function(){d(),r();var i=t(".swp_social_panelSide");e.bodyPaddingTop=o(t("body").css("padding-top").replace("px","")),e.bodyPaddingBottom=o(t("body").css("padding-bottom").replace("px",""));var a=!1;if(t(".swp_social_panel").hover(function(){a=!0},function(){a=!1}),t(e).resize(c.debounce(250,function(){t(".swp_social_panel").length&&!1!==a||(e.swpAdjust=1,r())})),t(document.body).on("post-load",function(){r()}),0!==i.length){if(-1!==t(i).attr("class").indexOf("swp_side"))return;var n=t(i).height(),s=t(e).height(),l=o(s/2-n/2);setTimeout(function(){t(i).animate({top:l},0)},105)}1===t(".swp-content-locator").parent().children().length&&t(".swp-content-locator").parent().hide()})}(this,jQuery),function(e){var t=/iPhone/i,i=/iPod/i,o=/iPad/i,a=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,n=/Android/i,s=/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,l=/(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,r=/Windows Phone/i,p=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,d=/BlackBerry/i,c=/BB10/i,f=/Opera Mini/i,h=/(CriOS|Chrome)(?=.*\bMobile\b)/i,_=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,w=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),u=function(e,t){return e.test(t)},v=function(e){var v=e||navigator.userAgent,b=v.split("[FBAN");if(void 0!==b[1]&&(v=b[0]),b=v.split("Twitter"),void 0!==b[1]&&(v=b[0]),this.apple={phone:u(t,v),ipod:u(i,v),tablet:!u(t,v)&&u(o,v),device:u(t,v)||u(i,v)||u(o,v)},this.amazon={phone:u(s,v),tablet:!u(s,v)&&u(l,v),device:u(s,v)||u(l,v)},this.android={phone:u(s,v)||u(a,v),tablet:!u(s,v)&&!u(a,v)&&(u(l,v)||u(n,v)),device:u(s,v)||u(l,v)||u(a,v)||u(n,v)},this.windows={phone:u(r,v),tablet:u(p,v),device:u(r,v)||u(p,v)},this.other={blackberry:u(d,v),blackberry10:u(c,v),opera:u(f,v),firefox:u(_,v),chrome:u(h,v),device:u(d,v)||u(c,v)||u(f,v)||u(_,v)||u(h,v)},this.seven_inch=u(w,v),this.any=this.apple.device||this.android.device||this.windows.device||this.other.device||this.seven_inch,this.phone=this.apple.phone||this.android.phone||this.windows.phone,this.tablet=this.apple.tablet||this.android.tablet||this.windows.tablet,"undefined"==typeof window)return this},b=function(){var e=new v;return e.Class=v,e};"undefined"!=typeof module&&module.exports&&"undefined"==typeof window?module.exports=v:"undefined"!=typeof module&&module.exports&&"undefined"!=typeof window?module.exports=b():"function"==typeof define&&define.amd?define("swp_isMobile",[],e.swp_isMobile=b()):e.swp_isMobile=b()}(this);
js/sw-shortcode-generator.js CHANGED
@@ -1,73 +1,73 @@
1
- (function() {
2
- tinymce.PluginManager.add( 'swp_shortcode_generator', function( editor, url ) {
3
- editor.addButton( 'swp_shortcode_generator', {
4
- title: 'Social Warfare Buttons',
5
- icon: 'sw sw sw-social-warfare',
6
- onclick: function() {
7
- editor.windowManager.open( {
8
- title: 'Insert Social Warfare Buttons',
9
- body: [
10
- {
11
- type: 'listbox',
12
- name: 'reflection',
13
- label: 'Should the buttons reflect this post or another one?',
14
- values: [
15
- { text: 'This Post', value: 'default' },
16
- { text: 'A Different Post', value: 'alt' }
17
- ],
18
- onselect: function( v ) {
19
- if ( this.value() == 'alt' ) {
20
- jQuery( '.mce-postid' ).parent().parent().slideDown();
21
- } else {
22
- jQuery( '.mce-postid' ).parent().parent().slideUp();
23
- }
24
- }
25
- },
26
- {
27
- type: 'textbox',
28
- multiline: false,
29
- name: 'postID',
30
- classes: 'postid',
31
- label: 'The ID of the post or page to reflect:'
32
- },
33
- {
34
- type: 'textbox',
35
- multiline: false,
36
- name: 'buttons',
37
- classes: 'buttons',
38
- label: 'Buttons to Include:'
39
- },
40
- {
41
- type: 'label',
42
- name: 'someHelpText',
43
- onPostRender: function() {
44
- this.getEl().innerHTML =
45
- '<span style="float:right;">Comma separated list of social network (e.g. "Facebook,Twitter,Total"). Leave blank to use site-wide defaults.</span>';
46
- },
47
- text: ''
48
- }
49
- ],
50
- onPostRender: function() {
51
- jQuery( '.mce-postid' ).parent().parent().slideUp();
52
- jQuery( '.mce-title' ).prepend( '<i class="sw sw-social-warfare"></i>' );
53
- },
54
- onsubmit: function( e ) {
55
- // Check if this is supposed to refelct a different post_id
56
- if ( e.data.reflection == 'alt' && e.data.postID != '' ) {
57
- var post_information = ' post_id="' + e.data.postID + '"';
58
- } else {
59
- var post_information = '';
60
- }
61
- // Check if this is a custom set of buttons
62
- if ( e.data.buttons != '' ) {
63
- var button_set = ' buttons="' + e.data.buttons + '"';
64
- } else {
65
- var button_set = '';
66
- }
67
- editor.insertContent( '[social_warfare' + post_information + '' + button_set + ']' );
68
- }
69
- });
70
- }
71
- });
72
- });
73
- })();
1
+ (function() {
2
+ tinymce.PluginManager.add( 'swp_shortcode_generator', function( editor, url ) {
3
+ editor.addButton( 'swp_shortcode_generator', {
4
+ title: 'Social Warfare Buttons',
5
+ icon: 'sw sw sw-social-warfare',
6
+ onclick: function() {
7
+ editor.windowManager.open( {
8
+ title: 'Insert Social Warfare Buttons',
9
+ body: [
10
+ {
11
+ type: 'listbox',
12
+ name: 'reflection',
13
+ label: 'Should the buttons reflect this post or another one?',
14
+ values: [
15
+ { text: 'This Post', value: 'default' },
16
+ { text: 'A Different Post', value: 'alt' }
17
+ ],
18
+ onselect: function( v ) {
19
+ if ( this.value() == 'alt' ) {
20
+ jQuery( '.mce-postid' ).parent().parent().slideDown();
21
+ } else {
22
+ jQuery( '.mce-postid' ).parent().parent().slideUp();
23
+ }
24
+ }
25
+ },
26
+ {
27
+ type: 'textbox',
28
+ multiline: false,
29
+ name: 'postID',
30
+ classes: 'postid',
31
+ label: 'The ID of the post or page to reflect:'
32
+ },
33
+ {
34
+ type: 'textbox',
35
+ multiline: false,
36
+ name: 'buttons',
37
+ classes: 'buttons',
38
+ label: 'Buttons to Include:'
39
+ },
40
+ {
41
+ type: 'label',
42
+ name: 'someHelpText',
43
+ onPostRender: function() {
44
+ this.getEl().innerHTML =
45
+ '<span style="float:right;">Comma separated list of social network (e.g. "Facebook,Twitter,Total"). Leave blank to use site-wide defaults.</span>';
46
+ },
47
+ text: ''
48
+ }
49
+ ],
50
+ onPostRender: function() {
51
+ jQuery( '.mce-postid' ).parent().parent().slideUp();
52
+ jQuery( '.mce-title' ).prepend( '<i class="sw sw-social-warfare"></i>' );
53
+ },
54
+ onsubmit: function( e ) {
55
+ // Check if this is supposed to refelct a different post_id
56
+ if ( e.data.reflection == 'alt' && e.data.postID != '' ) {
57
+ var post_information = ' post_id="' + e.data.postID + '"';
58
+ } else {
59
+ var post_information = '';
60
+ }
61
+ // Check if this is a custom set of buttons
62
+ if ( e.data.buttons != '' ) {
63
+ var button_set = ' buttons="' + e.data.buttons + '"';
64
+ } else {
65
+ var button_set = '';
66
+ }
67
+ editor.insertContent( '[social_warfare' + post_information + '' + button_set + ']' );
68
+ }
69
+ });
70
+ }
71
+ });
72
+ });
73
+ })();
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: holas84, dustinwstout, webinator, warfareplugins, nutsandboltsmedi
3
  Tags: sharing buttons, social media share, floating share buttons, facebook share, google plus share, linkedin share, pin it, pinterest save, stumbleupon button, tweet button, twitter share, click to tweet, social sharing buttons, social share, social sharing, social media sharing, wordpress social sharing plugin, social sharing plugin, share buttons, share counts
4
  Requires at least: 3.5.1
5
  Tested up to: 4.9
6
- Stable tag: 3.0.5
7
  License: GNU General Public License v2.0 or later
8
 
9
  The most beautiful, responsive, lightning fast social share buttons built to boost shares and drive more traffic without slowing down your site.
@@ -13,7 +13,7 @@ The most beautiful, responsive, lightning fast social share buttons built to boo
13
  Get more social shares which can lead to more website traffic with the best WordPress social sharing plugin! Built by a group of social media marketing experts and world class developers who are obsessed with performance. Learn more at <a href="https://warfareplugins.com/?utm_medium=repository&utm_campaign=description&utm_source=wordpress_org&utm_content=repo_description" rel="friend" target="_blank">Warfare Plugins</a>.
14
 
15
  = WordPress Sharing Plugin =
16
- Most WordPress social sharing plugins slow down your site, are not attractive, and don't work the way you would hope. Social Warfare’s share buttons are both lightning fast and beautiful.
17
 
18
  Not only will it never slow down your website like other sharing plugins, we give you the most attractive share buttons available that look great no matter what screen size or resolution.
19
 
@@ -64,14 +64,14 @@ A simple and effective way to create tweetable quotes right inside your posts or
64
  = Use Shortcodes to Manually Place Social Share Buttons Anywhere =
65
  If you want to place buttons in the middle of an article, you can with our `[social_warfare]` shortcode.
66
 
67
- What if you wanted to add share buttons to a page but actually have them share out a different page altogether (like being able to share your “Sign-up” page from your “Thank You” page)? Social Warfare allows you to do this!
68
 
69
  If you're experienced with PHP, you can also hook Social Warfare into your theme templates for hyper customization.
70
 
71
  = Content Protection =
72
  We've built our highly demanded <a href="https://wordpress.org/plugins/frame-buster/">Frame Buster</a> right into Social Warfare so that you are protected from content hijackers seeking to place their advertisements on top of your content without your permission.
73
 
74
- > Social Warfare is by far the best social sharing plugin I’ve ever used. I recommend it to all of my clients.<br>
75
  > Andrew Wilder, Marketing Consultant
76
 
77
  = Premium Social Sharing Options =
@@ -93,7 +93,7 @@ In addition to the extra social networks, you can also reactivate, track and dis
93
  Enabling the Image Hover Pin Button will place a "Pin" button over top of every image inside of your content when a reader hovers their mouse over it. This makes every image on your page highly sharable to Pinterest!
94
 
95
  = Powerful Share Customization =
96
- > "I use Social Warfare - Pro because how things are shared when I’m not there to do it is important!"<br>
97
  > Peg Fitzpatrick, author of The Art and Science of Social Media
98
 
99
  Social Warfare is among the pioneers of customizing how your content is shared, particularly with Pinterest. The _Social Warfare - Pro_ add-on allows you to decide exactly which image, title and description appears when your content is shared on sites like Facebook and Google+. This also applies to any other networks that use Open Graph data for social shares.
@@ -170,10 +170,10 @@ We have a growing archive of <a href="https://warfareplugins.com/support/" rel="
170
 
171
  = Testimonial =
172
 
173
- > I use Social Warfare - Pro because how things are shared when I’m not there to do it is important!<br>
174
  > Peg Fitzpatrick, Social Media Strategist
175
 
176
- > Social Warfare is by far the best social-sharing-button plugin I’ve ever used. I recommend it to all of my clients.<br>
177
  > Andrew Wilder, Consultant
178
 
179
  > It's a beautiful, super lightweight, and highly customizable plugin. I love everything about it!<br>
3
  Tags: sharing buttons, social media share, floating share buttons, facebook share, google plus share, linkedin share, pin it, pinterest save, stumbleupon button, tweet button, twitter share, click to tweet, social sharing buttons, social share, social sharing, social media sharing, wordpress social sharing plugin, social sharing plugin, share buttons, share counts
4
  Requires at least: 3.5.1
5
  Tested up to: 4.9
6
+ Stable tag: 3.0.6
7
  License: GNU General Public License v2.0 or later
8
 
9
  The most beautiful, responsive, lightning fast social share buttons built to boost shares and drive more traffic without slowing down your site.
13
  Get more social shares which can lead to more website traffic with the best WordPress social sharing plugin! Built by a group of social media marketing experts and world class developers who are obsessed with performance. Learn more at <a href="https://warfareplugins.com/?utm_medium=repository&utm_campaign=description&utm_source=wordpress_org&utm_content=repo_description" rel="friend" target="_blank">Warfare Plugins</a>.
14
 
15
  = WordPress Sharing Plugin =
16
+ Most WordPress social sharing plugins slow down your site, are not attractive, and don't work the way you would hope. Social Warfare share buttons are both lightning fast and beautiful.
17
 
18
  Not only will it never slow down your website like other sharing plugins, we give you the most attractive share buttons available that look great no matter what screen size or resolution.
19
 
64
  = Use Shortcodes to Manually Place Social Share Buttons Anywhere =
65
  If you want to place buttons in the middle of an article, you can with our `[social_warfare]` shortcode.
66
 
67
+ What if you wanted to add share buttons to a page but actually have them share out a different page altogether (like being able to share your Subscribe page from your Thank You)? Social Warfare allows you to do this!
68
 
69
  If you're experienced with PHP, you can also hook Social Warfare into your theme templates for hyper customization.
70
 
71
  = Content Protection =
72
  We've built our highly demanded <a href="https://wordpress.org/plugins/frame-buster/">Frame Buster</a> right into Social Warfare so that you are protected from content hijackers seeking to place their advertisements on top of your content without your permission.
73
 
74
+ > Social Warfare is by far the best social sharing plugin I've ever used. I recommend it to all of my clients.<br>
75
  > Andrew Wilder, Marketing Consultant
76
 
77
  = Premium Social Sharing Options =
93
  Enabling the Image Hover Pin Button will place a "Pin" button over top of every image inside of your content when a reader hovers their mouse over it. This makes every image on your page highly sharable to Pinterest!
94
 
95
  = Powerful Share Customization =
96
+ > "I use Social Warfare - Pro because how things are shared when I'm not there to do it is important!"<br>
97
  > Peg Fitzpatrick, author of The Art and Science of Social Media
98
 
99
  Social Warfare is among the pioneers of customizing how your content is shared, particularly with Pinterest. The _Social Warfare - Pro_ add-on allows you to decide exactly which image, title and description appears when your content is shared on sites like Facebook and Google+. This also applies to any other networks that use Open Graph data for social shares.
170
 
171
  = Testimonial =
172
 
173
+ > I use Social Warfare - Pro because how things are shared when I'm not there to do it is important!<br>
174
  > Peg Fitzpatrick, Social Media Strategist
175
 
176
+ > Social Warfare is by far the best social-sharing-button plugin I've ever used. I recommend it to all of my clients.<br>
177
  > Andrew Wilder, Consultant
178
 
179
  > It's a beautiful, super lightweight, and highly customizable plugin. I love everything about it!<br>
social-warfare.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Social Warfare
4
  * Plugin URI: http://warfareplugins.com
5
  * Description: A plugin to maximize social shares and drive more traffic using the fastest and most intelligent share buttons on the market, calls to action via in-post click-to-tweets, popular posts widgets based on share popularity, link-shortening, Google Analytics and much, much more!
6
- * Version: 3.0.5
7
  * Author: Warfare Plugins
8
  * Author URI: http://warfareplugins.com
9
  * Text Domain: social-warfare
@@ -16,12 +16,21 @@ defined( 'WPINC' ) || die;
16
  * Define plugin constants for use throughout the plugin (Version and Directories)
17
  *
18
  */
19
- define( 'SWP_VERSION' , '3.0.5' );
20
  define( 'SWP_PLUGIN_FILE', __FILE__ );
21
  define( 'SWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
22
  define( 'SWP_PLUGIN_DIR', dirname( __FILE__ ) );
23
  define( 'SWP_STORE_URL', 'https://warfareplugins.com' );
24
 
 
 
 
 
 
 
 
 
 
25
  add_filter('the_excerpt', 'do_shortcode', 1);
26
 
27
  // Load the main Social_Warfare class and fire up the plugin.
3
  * Plugin Name: Social Warfare
4
  * Plugin URI: http://warfareplugins.com
5
  * Description: A plugin to maximize social shares and drive more traffic using the fastest and most intelligent share buttons on the market, calls to action via in-post click-to-tweets, popular posts widgets based on share popularity, link-shortening, Google Analytics and much, much more!
6
+ * Version: 3.0.6
7
  * Author: Warfare Plugins
8
  * Author URI: http://warfareplugins.com
9
  * Text Domain: social-warfare
16
  * Define plugin constants for use throughout the plugin (Version and Directories)
17
  *
18
  */
19
+ define( 'SWP_VERSION' , '3.0.6' );
20
  define( 'SWP_PLUGIN_FILE', __FILE__ );
21
  define( 'SWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
22
  define( 'SWP_PLUGIN_DIR', dirname( __FILE__ ) );
23
  define( 'SWP_STORE_URL', 'https://warfareplugins.com' );
24
 
25
+ /**
26
+ * Legacy version of the update cheker.
27
+ *
28
+ * @since 3.0.6 | 15 MAY 2018 | Added the requirement statement for legacy support.
29
+ * @TODO THis should be removed after 31 DEC 2018.
30
+ *
31
+ */
32
+ require_once SWP_PLUGIN_DIR . '/functions/legacy/update-checker.php';
33
+
34
  add_filter('the_excerpt', 'do_shortcode', 1);
35
 
36
  // Load the main Social_Warfare class and fire up the plugin.