Version Description
(13 AUG 2018) = * Shoutout to our Warfare Community beta testers- thank you so much! * Created shortcode for Pinterest Image. * Created Custom Pinterst Description on a per-image basis. * Fixed the Total Shares icon/counts not displaying. * Fixed many JS related issues on floating and mobile buttons. * Fixed an issue where some buttons did not display on some posts (after 'post_updated' fires). * Fixed the total shares missing counts from LinkedIn and Google Plus. * Fixed floating buttons not showing until bottom of content. * Fixed where posts were receiving false share counts from Facebook. * Fixed the update process for addons (like Pro) so it should now receive dashboard notifications. * Fixed sharing on Pinterest when images use relative paths instead of absolute paths. * Fixed hidden Pinterest image from covering content "below". * Changed the cursor from cursor to pointer for Total Shares hover state. * Added option to add data-pin-description to all images in a post. * Added !important tags for our Custom Color option. * Added check for whether or not to fetch share counts (based on Button Count and Total Count settings). * Updated the visibility of Mobile Float Location option. * Replaced New Share Counts with Twitcount.
Release Info
Developer | WarfarePlugins |
Plugin | WordPress Social Sharing Plugin – Social Warfare |
Version | 3.2.0 |
Comparing to | |
See all releases |
Code changes from version 3.1.1 to 3.2.0
- .gitignore +6 -0
- css/style.css +5 -4
- css/style.min.css +1 -1
- functions/Social_Warfare.php +9 -7
- functions/frontend-output/SWP_Buttons_Panel.php +31 -11
- functions/frontend-output/SWP_Script.php +8 -12
- functions/frontend-output/SWP_Shortcode.php +4 -5
- functions/legacy/update-checker.php +0 -491
- functions/options/SWP_Section_HTML.php +1 -1
- functions/social-networks/SWP_Twitter.php +67 -20
- functions/utilities/SWP_Notice.php +12 -19
- functions/utilities/SWP_Notice_Loader.php +12 -35
- functions/utilities/SWP_Plugin_Updater.php +78 -51
- functions/utilities/SWP_Post_Cache.php +107 -27
- images/admin-options-page/Thumbs.db +0 -0
- js/admin.js +356 -353
- js/admin.min.js +1 -1
- js/script.js +98 -44
- js/script.min.js +1 -1
- readme.txt +23 -3
- social-warfare.php +2 -2
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
functions/admin/SWP_Options_Pseudo_Code.php
|
2 |
+
functions/options/options-page-working.php
|
3 |
+
functions/options/options.txt
|
4 |
+
remote-sync.json
|
5 |
+
.remote-sync.json
|
6 |
+
.DS_Store
|
@@ -38,7 +38,7 @@
|
|
38 |
margin-top: 10px!important;
|
39 |
}
|
40 |
|
41 |
-
div.swp_social_panel .nc_tweetContainer {
|
42 |
-webkit-border-radius: 2px;
|
43 |
border-radius: 2px;
|
44 |
cursor: pointer;
|
@@ -301,8 +301,8 @@ span.swp_label {
|
|
301 |
}
|
302 |
|
303 |
.swp_social_panel.swp_pill .nc_tweetContainer {
|
304 |
-
-webkit-border-radius: 50px;
|
305 |
-
border-radius: 50px;
|
306 |
border-width: 1px;
|
307 |
}
|
308 |
|
@@ -1031,7 +1031,7 @@ body .swp_social_panel.swp_other_color_outlines:hover .swp_flipboard {
|
|
1031 |
.swp_social_panelSide.swp_circles .nc_tweetContainer,
|
1032 |
.swp_social_panelSide.swp_circles .nc_tweetContainer a {
|
1033 |
width: 67.5px;
|
1034 |
-
height: 67.5px;
|
1035 |
position: relative;
|
1036 |
}
|
1037 |
.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares),
|
@@ -1808,6 +1808,7 @@ div.swp_social_panel .nc_tweetContainer.swp_emphasize {
|
|
1808 |
position: absolute;
|
1809 |
top: 0;
|
1810 |
width: 0;
|
|
|
1811 |
}
|
1812 |
.fl-module-content .uabb-blog-posts .uabb-post-thumbnail .sw-pinit.lazyloaded {
|
1813 |
display: block !important;
|
38 |
margin-top: 10px!important;
|
39 |
}
|
40 |
|
41 |
+
div.swp_social_panel .nc_tweetContainer:not(.total_shares):not(.total_sharesalt) {
|
42 |
-webkit-border-radius: 2px;
|
43 |
border-radius: 2px;
|
44 |
cursor: pointer;
|
301 |
}
|
302 |
|
303 |
.swp_social_panel.swp_pill .nc_tweetContainer {
|
304 |
+
-webkit-border-radius: 50px !important;
|
305 |
+
border-radius: 50px !important;
|
306 |
border-width: 1px;
|
307 |
}
|
308 |
|
1031 |
.swp_social_panelSide.swp_circles .nc_tweetContainer,
|
1032 |
.swp_social_panelSide.swp_circles .nc_tweetContainer a {
|
1033 |
width: 67.5px;
|
1034 |
+
height: 67.5px !important;
|
1035 |
position: relative;
|
1036 |
}
|
1037 |
.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares),
|
1808 |
position: absolute;
|
1809 |
top: 0;
|
1810 |
width: 0;
|
1811 |
+
z-index: -10;
|
1812 |
}
|
1813 |
.fl-module-content .uabb-blog-posts .uabb-post-thumbnail .sw-pinit.lazyloaded {
|
1814 |
display: block !important;
|
@@ -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 5px;min-width:34px;overflow:hidden;text-align:center;-webkit-transition:all 0.1s linear;transition:all 0.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:bold;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 a .swp_count.swp_hide{margin:0 auto}.swp_social_panel span:before{content:initial!important}.swp_social_panel .total_shares .swp_count{line-height:30px}.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 0.2s ease-in-out;transition:opacity 0.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:normal;height:30px;line-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 0.1s linear;transition:width 0.1s linear}.swp_social_panel .iconFiller{width:30px}span.spaceManWilly{display:block;width:120px}.swp_social_panel .total_shares{background:transparent!important;;border:none!important;-webkit-border-radius:2px;border-radius:2px;color:white;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 .total_sharesalt{background:transparent!important;border:none!important}.swp_social_panel div.total_shares.total_sharesalt,.swp_social_panel:hover div.total_shares.total_sharesalt:not(:nth-child(1)){background:transparent!important;border:none;color:#474b4d;margin-left:0!important;margin-bottom:10px!important}div.swp_social_panel:hover div.total_shares.total_sharesalt:not(:nth-child(1)){background:transparent;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:hover .total_shares,.swp_social_panel.swp_full_color .total_shares,.swp_social_panel.swp_fade .total_shares,.swp_social_panel.swp_customFull:hover div.total_shares{background:#e08a0f}.swp_social_panel .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:hover .nc_tweetContainer,.swp_connected .nc_tweetContainer:hover{-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,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_google_plus:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_google_plus:not(:hover){border:1px solid #df4b37}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_twitter,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_twitter:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_twitter:not(:hover){border:1px solid #429cd6}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_facebook,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_facebook:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_facebook:not(:hover){border:1px solid #3a589e}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_pinterest,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_pinterest:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_pinterest:not(:hover){border:1px solid #cd2029}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_linkedin,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_linkedin:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_linkedin:not(:hover){border:1px solid #0d77b7}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_tumblr,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_tumblr:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_tumblr:not(:hover){border:1px solid #39475d}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_stumbleupon,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_stumbleupon:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_stumbleupon:not(:hover){border:1px solid #ef5025}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_yummly,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_yummly:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_yummly:not(:hover){border:1px solid #e26426}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_reddit,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_reddit:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_reddit:not(:hover){border:1px solid #f04b23}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_email,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_email:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_email:not(:hover){border:1px solid #6bcce9}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_whatsapp,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_whatsapp:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_whatsapp:not(:hover){border:1px solid #71c169}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_pocket,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_pocket:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_pocket:not(:hover){border:1px solid #ef4056}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_buffer,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_buffer:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_buffer:not(:hover){border:1px solid #323b43}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_hacker_news,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_hacker_news:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_hacker_news:not(:hover){border:1px solid #d85623}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_flipboard,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_flipboard:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_flipboard:not(:hover){border:1px solid #bf2626}.swp_social_panel.swp_default_full_color .swp_google_plus,html body .swp_social_panel.swp_individual_full_color .swp_google_plus:hover,body .swp_social_panel.swp_other_full_color:hover .swp_google_plus{background:#df4b37;border:1px solid #c44133}.swp_social_panel.swp_default_full_color .swp_twitter,html body .swp_social_panel.swp_individual_full_color .swp_twitter:hover,body .swp_social_panel.swp_other_full_color:hover .swp_twitter{background:#429cd6;border:1px solid #3c87b2}.swp_social_panel.swp_default_full_color .swp_facebook,html body .swp_social_panel.swp_individual_full_color .swp_facebook:hover,body .swp_social_panel.swp_other_full_color:hover .swp_facebook{background:#3a589e;border:1px solid #2e4675}.swp_social_panel.swp_default_full_color .swp_pinterest,html body .swp_social_panel.swp_individual_full_color .swp_pinterest:hover,body .swp_social_panel.swp_other_full_color:hover .swp_pinterest{background:#cd2029;border:1px solid #aa1b29}.swp_social_panel.swp_default_full_color .swp_linkedin,html body .swp_social_panel.swp_individual_full_color .swp_linkedin:hover,body .swp_social_panel.swp_other_full_color:hover .swp_linkedin{background:#0d77b7;border:1px solid #0c6591}.swp_social_panel.swp_default_full_color .swp_tumblr,html body .swp_social_panel.swp_individual_full_color .swp_tumblr:hover,body .swp_social_panel.swp_other_full_color:hover .swp_tumblr{background:#39475d;border:1px solid #27313f}.swp_social_panel.swp_default_full_color .swp_stumbleupon,html body .swp_social_panel.swp_individual_full_color .swp_stumbleupon:hover,body .swp_social_panel.swp_other_full_color:hover .swp_stumbleupon{background:#ef5025;border:1px solid #d34427}.swp_social_panel.swp_default_full_color .swp_yummly,html body .swp_social_panel.swp_individual_full_color .swp_yummly:hover,body .swp_social_panel.swp_other_full_color:hover .swp_yummly{background:#e26426;border:1px solid #b65027}.swp_social_panel.swp_default_full_color .swp_reddit,html body .swp_social_panel.swp_individual_full_color .swp_reddit:hover,body .swp_social_panel.swp_other_full_color:hover .swp_reddit{background:#f04b23;border:1px solid #d33f27}.swp_social_panel.swp_default_full_color .swp_email,html body .swp_social_panel.swp_individual_full_color .swp_email:hover,body .swp_social_panel.swp_other_full_color:hover .swp_email{background:#6bcce9;border:1px solid #61bace}.swp_social_panel.swp_default_full_color .swp_whatsapp,html body .swp_social_panel.swp_individual_full_color .swp_whatsapp:hover,body .swp_social_panel.swp_other_full_color:hover .swp_whatsapp{background:#71c169;border:1px solid #28b04b}.swp_social_panel.swp_default_full_color .swp_pocket,html body .swp_social_panel.swp_individual_full_color .swp_pocket:hover,body .swp_social_panel.swp_other_full_color:hover .swp_pocket{background:#ef4056;border:1px solid #ce3d55}.swp_social_panel.swp_default_full_color .swp_buffer,html body .swp_social_panel.swp_individual_full_color .swp_buffer:hover,body .swp_social_panel.swp_other_full_color:hover .swp_buffer{background:#323b43;border:1px solid #000}.swp_social_panel.swp_default_full_color .swp_hacker_news,html body .swp_social_panel.swp_individual_full_color .swp_hacker_news:hover,body .swp_social_panel.swp_other_full_color:hover .swp_hacker_news{background:#f16522;border:1px solid #d85623}.swp_social_panel.swp_default_full_color .swp_flipboard,html body .swp_social_panel.swp_individual_full_color .swp_flipboard:hover,body .swp_social_panel.swp_other_full_color:hover .swp_flipboard{background:#e02828;border:1px solid #bf2626}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_google_plus,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_google_plus:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_google_plus{border-bottom:3px solid #c44133}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_twitter,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_twitter:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_twitter{border-bottom:3px solid #5595bc}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_facebook,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_facebook:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_facebook{border-bottom:3px solid #2e4675}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_pinterest,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_pinterest:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_pinterest{border-bottom:3px solid #aa1b29}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_linkedin,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_linkedin:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_linkedin{border-bottom:3px solid #0c6591}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_tumblr,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_tumblr:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_tumblr{border-bottom:3px solid #27313f}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_stumbleupon,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_stumbleupon:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_stumbleupon{border-bottom:3px solid #d34427}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_yummly,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_yummly:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_yummly{border-bottom:3px solid #b65027}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_reddit,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_reddit:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_reddit{border-bottom:3px solid #d33f27}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_email,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_email:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_email{border-bottom:3px solid #61bace}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_whatsapp,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_whatsapp:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_whatsapp{border-bottom:3px solid #28b04b}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_pocket,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_pocket:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_pocket{border-bottom:3px solid #ce3d55}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_buffer,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_buffer:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_buffer{border-bottom:3px solid #000}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_hacker_news,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_hacker_news:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_hacker_news{border-bottom:3px solid #d85623}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_flipboard,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_flipboard:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_flipboard{border-bottom:3px solid #bf2626}.swp_social_panel.swp_default_light_gray .nc_tweetContainer,html body .swp_social_panel.swp_individual_light_gray .nc_tweetContainer:hover,body .swp_social_panel.swp_other_light_gray:hover .nc_tweetContainer{background-color:#ccc;border:1px solid #ccc}.swp_social_panel.swp_three_dee.swp_default_light_gray .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_light_gray .nc_tweetContainer:not(.total_sharesalt):hover,body .swp_social_panel.swp_three_dee.swp_other_light_gray:hover .nc_tweetContainer:not(.total_sharesalt){border-bottom:3px solid #999}.swp_social_panel.swp_default_medium_gray .nc_tweetContainer,html body .swp_social_panel.swp_individual_medium_gray .nc_tweetContainer:hover,body .swp_social_panel.swp_other_medium_gray:hover .nc_tweetContainer{background-color:#999;border:1px solid #999}.swp_social_panel.swp_three_dee.swp_default_medium_gray .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_medium_gray .nc_tweetContainer:not(.total_sharesalt):hover,body .swp_social_panel.swp_three_dee.swp_other_medium_gray:hover .nc_tweetContainer:not(.total_sharesalt){border-bottom:3px solid #444}.swp_social_panel.swp_default_dark_gray .nc_tweetContainer,html body .swp_social_panel.swp_individual_dark_gray .nc_tweetContainer:hover,body .swp_social_panel.swp_other_dark_gray:hover .nc_tweetContainer{background-color:#444;border:1px solid #444}.swp_social_panel.swp_three_dee.swp_default_dark_gray .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_dark_gray .nc_tweetContainer:not(.total_sharesalt):hover,body .swp_social_panel.swp_three_dee.swp_other_dark_gray:hover .nc_tweetContainer:not(.total_sharesalt){border-bottom:3px solid #222}.swp_social_panel.swp_default_light_gray_outlines a,html body .swp_social_panel.swp_individual_light_gray_outlines a:hover,body .swp_social_panel.swp_other_light_gray_outlines:hover a{color:#ccc}.swp_social_panel.swp_default_light_gray_outlines .nc_tweetContainer,html body .swp_social_panel.swp_individual_light_gray_outlines .nc_tweetContainer:hover,body .swp_social_panel.swp_other_light_gray_outlines:hover .nc_tweetContainer{background:transparent;border:1px solid #ccc}.swp_social_panel.swp_default_medium_gray_outlines a,html body .swp_social_panel.swp_individual_medium_gray_outlines a:hover,body .swp_social_panel.swp_other_medium_gray_outlines:hover a{color:#999}.swp_social_panel.swp_default_medium_gray_outlines .nc_tweetContainer,html body .swp_social_panel.swp_individual_medium_gray_outlines .nc_tweetContainer:hover,body .swp_social_panel.swp_other_medium_gray_outlines:hover .nc_tweetContainer{background:transparent;border:1px solid #999}.swp_social_panel.swp_default_dark_gray_outlines a,html body .swp_social_panel.swp_individual_dark_gray_outlines a:hover,body .swp_social_panel.swp_other_dark_gray_outlines:hover a{color:#444}.swp_social_panel.swp_default_dark_gray_outlines .nc_tweetContainer,html body .swp_social_panel.swp_individual_dark_gray_outlines .nc_tweetContainer:hover,body .swp_social_panel.swp_other_dark_gray_outlines:hover .nc_tweetContainer{background:transparent;border:1px solid #444}.swp_social_panel.swp_default_color_outlines .swp_google_plus a,html body .swp_social_panel.swp_individual_color_outlines .swp_google_plus a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_google_plus a{color:#df4b37}.swp_social_panel.swp_default_color_outlines .swp_facebook a,html body .swp_social_panel.swp_individual_color_outlines .swp_facebook a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_facebook a{color:#3a589e}.swp_social_panel.swp_default_color_outlines .swp_pinterest a,html body .swp_social_panel.swp_individual_color_outlines .swp_pinterest a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_pinterest a{color:#cd2029}.swp_social_panel.swp_default_color_outlines .swp_linkedin a,html body .swp_social_panel.swp_individual_color_outlines .swp_linkedin a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_linkedin a{color:#0d77b7}.swp_social_panel.swp_default_color_outlines .swp_tumblr a,html body .swp_social_panel.swp_individual_color_outlines .swp_tumblr a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_tumblr a{color:#39475d}.swp_social_panel.swp_default_color_outlines .swp_stumbleupon a,html body .swp_social_panel.swp_individual_color_outlines .swp_stumbleupon a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_stumbleupon a{color:#ef5025}.swp_social_panel.swp_default_color_outlines .swp_yummly a,html body .swp_social_panel.swp_individual_color_outlines .swp_yummly a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_yummly a{color:#e26426}.swp_social_panel.swp_default_color_outlines .swp_whatsapp a,html body .swp_social_panel.swp_individual_color_outlines .swp_whatsapp a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_whatsapp a{color:#71c169}.swp_social_panel.swp_default_color_outlines .swp_pocket a,html body .swp_social_panel.swp_individual_color_outlines .swp_pocket a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_pocket a{color:#ef4056}.swp_social_panel.swp_default_color_outlines .swp_reddit a,html body .swp_social_panel.swp_individual_color_outlines .swp_reddit a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_reddit a{color:#f04b23}.swp_social_panel.swp_default_color_outlines .swp_email a,html body .swp_social_panel.swp_individual_color_outlines .swp_email a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_email a{color:#6bcce9}.swp_social_panel.swp_default_color_outlines .swp_buffer a,html body .swp_social_panel.swp_individual_color_outlines .swp_buffer a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_buffer a{color:#323b43}.swp_social_panel.swp_default_color_outlines .swp_hacker_news a,html body .swp_social_panel.swp_individual_color_outlines .swp_hacker_news a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_hacker_news a{color:#f16522}.swp_social_panel.swp_default_color_outlines .swp_flipboard a,html body .swp_social_panel.swp_individual_color_outlines .swp_flipboard a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_flipboard a{color:#e02828}.swp_social_panel.swp_default_color_outlines .swp_google_plus,html body .swp_social_panel.swp_individual_color_outlines .swp_google_plus:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_google_plus{background:transparent;border:1px solid #df4b37}.swp_social_panel.swp_default_color_outlines .swp_twitter,html body .swp_social_panel.swp_individual_color_outlines .swp_twitter:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_twitter{background:transparent;border:1px solid #429cd6}.swp_social_panel.swp_default_color_outlines .swp_facebook,html body .swp_social_panel.swp_individual_color_outlines .swp_facebook:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_facebook{background:transparent;border:1px solid #3a589e}.swp_social_panel.swp_default_color_outlines .swp_pinterest,html body .swp_social_panel.swp_individual_color_outlines .swp_pinterest:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_pinterest{background:transparent;border:1px solid #cd2029}.swp_social_panel.swp_default_color_outlines .swp_linkedin,html body .swp_social_panel.swp_individual_color_outlines .swp_linkedin:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_linkedin{background:transparent;border:1px solid #0d77b7}.swp_social_panel.swp_default_color_outlines .swp_tumblr,html body .swp_social_panel.swp_individual_color_outlines .swp_tumblr:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_tumblr{background:transparent;border:1px solid #39475d}.swp_social_panel.swp_default_color_outlines .swp_stumbleupon,html body .swp_social_panel.swp_individual_color_outlines .swp_stumbleupon:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_stumbleupon{background:transparent;border:1px solid #ef5025}.swp_social_panel.swp_default_color_outlines .swp_yummly,html body .swp_social_panel.swp_individual_color_outlines .swp_yummly:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_yummly{background:transparent;border:1px solid #e26426}.swp_social_panel.swp_default_color_outlines .swp_whatsapp,html body .swp_social_panel.swp_individual_color_outlines .swp_whatsapp:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_whatsapp{background:transparent;border:1px solid #71c169}.swp_social_panel.swp_default_color_outlines .swp_reddit,html body .swp_social_panel.swp_individual_color_outlines .swp_reddit:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_reddit{background:transparent;border:1px solid #f04b23}.swp_social_panel.swp_default_color_outlines .swp_email,html body .swp_social_panel.swp_individual_color_outlines .swp_email:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_email{background:transparent;border:1px solid #6bcce9}.swp_social_panel.swp_default_color_outlines .swp_pocket,html body .swp_social_panel.swp_individual_color_outlines .swp_pocket:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_pocket{background:transparent;border:1px solid #ef4056}.swp_social_panel.swp_default_color_outlines .swp_buffer,html body .swp_social_panel.swp_individual_color_outlines .swp_buffer:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_buffer{background:transparent;border:1px solid #323b43}.swp_social_panel.swp_default_color_outlines .swp_hacker_news,html body .swp_social_panel.swp_individual_color_outlines .swp_hacker_news:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_hacker_news{background:transparent;border:1px solid #f16522}.swp_social_panel.swp_default_color_outlines .swp_flipboard,html body .swp_social_panel.swp_individual_color_outlines .swp_flipboard:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_flipboard{background:transparent;border:1px solid #bf2626}.swp_social_panelSide{flex-direction:column;height:auto;overflow:visible;-webkit-transition:all 0.2s linear;transition:all 0.2s linear;z-index:9998;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.slide,.swp_social_panelSide.fade{position:fixed;-webkit-transition:all 0.2s linear;transition:all 0.2s linear}.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:auto;display:flex;position:fixed;padding:30px 0}.swp_social_panelSide.fade{display:none}.swp_social_panelSide.swp_float_right{align-content:flex-end}.swp_social_panelSide.swp_side_top{top:15px}.swp_social_panelSide.swp_side_bottom{bottom:15px}.swp_social_panelSide.swp_side_center{}.swp_social_panelSide .nc_tweetContainer{-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 0.1s linear;transition:all 0.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 0.1s linear;transition:all 0.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 0.1s linear;transition:all 0.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 0.1s linear;transition:all 0.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 0.1s linear;transition:all 0.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:not(.total_shares),.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) 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 0.1s linear;transition:padding 0.1s linear;width:100%}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_count.swp_hide,.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_circles .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{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[data-network]:not(.total_shares):hover .iconFiller,.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .spaceManWilly{width:90px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover .iconFiller,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover .iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) .spaceManWilly{width:100%}.swp_social_panelSide .nc_tweetContainer.total_shares{background:rgba(0,0,0,0);border:0!important;font-weight:800;height:55px;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:white;position:fixed;-webkit-transition:top 0.5s bottom 0.5s;transition:top 0.5s bottom 0.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:normal;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"}.swp_CTT{text-decoration:none!important}.sw-tweet-clear{zoom:1}.sw-tweet-clear:after{clear:both;content:".";display:block;height:0;visibility:hidden}.sw-click-to-tweet{display:block;margin:15px 0;padding:15px 30px;position:relative}.sw-click-to-tweet:after{clear:both;content:".";display:block;height:0;line-height:0;visibility:hidden}.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:bold;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 0.25s linear;transition:all 0.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 0.25s linear;transition:all 0.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 0.25s linear;transition:all 0.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 0.25s linear;transition:all 0.25s linear}a.swp_CTT.style5:hover .sw-click-to-tweet{background-color:#d34250;border-left:10px solid #30394f;-webkit-transition:all 0.25s linear;transition:all 0.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 0.25s linear;transition:all 0.25s linear}a.swp_CTT.style6:hover .sw-click-to-tweet{background-color:#ced3dc;border-left:10px solid #d34250;-webkit-transition:all 0.25s linear;transition:all 0.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 0.25s linear;transition:all 0.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;text-decoration:none;-webkit-transition:opacity 0.5s;transition:opacity 0.5s;z-index:200}div.sw-pinit:hover a.sw-pinit-button,div.sw-pinit:focus 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:hover,div.sw-pinit a.sw-pinit-button:focus{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}.swp_social_panel.notMobile .nc_tweetContainer:nth-last-child(1),.mobile .nc_tweetContainer:nth-last-child(2),.nc_tweetContainer.total_shares:nth-last-child(1){margin-right:0}.swp_social_panel.swp_default_full_color a,html body .swp_social_panel.swp_individual_full_color .nc_tweetContainer:hover a,body .swp_social_panel.swp_other_full_color:hover a,.swp_social_panel.swp_default_light_gray a,html body .swp_social_panel.swp_individual_light_gray .nc_tweetContainer:hover a,body .swp_social_panel.swp_other_light_gray:hover a,.swp_social_panel.swp_default_medium_gray a,html body .swp_social_panel.swp_individual_medium_gray a:hover,body .swp_social_panel.swp_other_medium_gray:hover a,.swp_social_panel.swp_default_dark_gray a,html body .swp_social_panel.swp_individual_dark_gray a:hover,body .swp_social_panel.swp_other_dark_gray:hover a{color:white}.swp_social_panel.swp_default_color_outlines .swp_twitter a,html body .swp_social_panel.swp_individual_color_outlines .swp_twitter a:hover,body .swp_social_panel.swp_other_color_outlines:hover .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{color:#429cd6}.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){opacity:1}.swp_social_panel.mobile .iconFiller ~ .swp_count,.sw-content-locator{display:none}a.style1 .sw-click-to-tweet .sw-ctt-text,a.style1 .sw-click-to-tweet .sw-ctt-btn{color:#999;text-decoration:none}a.style1:hover .sw-click-to-tweet .sw-ctt-text,a.style1:hover .sw-click-to-tweet .sw-ctt-btn,a.style2: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{color:#666;text-decoration:none}a.style3:hover .sw-click-to-tweet .sw-ctt-text,a.style3 .sw-click-to-tweet .sw-ctt-btn,a.style3:hover .sw-click-to-tweet .sw-ctt-btn,a.style3 .sw-click-to-tweet i.swp_twitter,a.style4 .sw-click-to-tweet .sw-ctt-text,a.style4:hover .sw-click-to-tweet .sw-ctt-text,a.style4 .sw-click-to-tweet .sw-ctt-btn,a.style4:hover .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-text,a.style5 .sw-click-to-tweet .sw-ctt-btn,a.style5:hover .sw-click-to-tweet .sw-ctt-btn{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-text,a.style6 .sw-click-to-tweet .sw-ctt-btn{color:#30394f;text-decoration:none}a.style6:hover .sw-click-to-tweet .sw-ctt-text,a.style6:hover .sw-click-to-tweet .sw-ctt-btn,a.style6:hover .sw-click-to-tweet i.swp_twitter{color:#2a2d34;text-decoration:none}.scale-70{-ms-transform:scale(0.7);-webkit-transform:scale(0.7);transform:scale(0.7)}.swp_social_panel:not(.nc_floater).scale-70.scale-full_width{width:142.8571428571429%!important}.scale-80{-ms-transform:scale(0.8);-webkit-transform:scale(0.8);transform:scale(0.8)}.swp_social_panel:not(.nc_floater).scale-80.scale-full_width{width:125%!important}.scale-90{-ms-transform:scale(0.9);-webkit-transform:scale(0.9);transform:scale(0.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}.scale-full_width,.scale-left,.nc_floater.scale-center,.nc_floater.scale-right{-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}.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:not(.total_shares):not(.total_sharesalt){-webkit-border-radius:2px;border-radius:2px;cursor:pointer;float:left;font-family:Lato;height:32px;margin:0 5px 3px 5px;min-width:34px;overflow:hidden;text-align:center;-webkit-transition:all 0.1s linear;transition:all 0.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:bold;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 a .swp_count.swp_hide{margin:0 auto}.swp_social_panel span:before{content:initial!important}.swp_social_panel .total_shares .swp_count{line-height:30px}.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 0.2s ease-in-out;transition:opacity 0.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:normal;height:30px;line-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 0.1s linear;transition:width 0.1s linear}.swp_social_panel .iconFiller{width:30px}span.spaceManWilly{display:block;width:120px}.swp_social_panel .total_shares{background:transparent!important;;border:none!important;-webkit-border-radius:2px;border-radius:2px;color:white;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 .total_sharesalt{background:transparent!important;border:none!important}.swp_social_panel div.total_shares.total_sharesalt,.swp_social_panel:hover div.total_shares.total_sharesalt:not(:nth-child(1)){background:transparent!important;border:none;color:#474b4d;margin-left:0!important;margin-bottom:10px!important}div.swp_social_panel:hover div.total_shares.total_sharesalt:not(:nth-child(1)){background:transparent;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:hover .total_shares,.swp_social_panel.swp_full_color .total_shares,.swp_social_panel.swp_fade .total_shares,.swp_social_panel.swp_customFull:hover div.total_shares{background:#e08a0f}.swp_social_panel .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!important;border-radius:50px!important;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:hover .nc_tweetContainer,.swp_connected .nc_tweetContainer:hover{-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,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_google_plus:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_google_plus:not(:hover){border:1px solid #df4b37}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_twitter,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_twitter:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_twitter:not(:hover){border:1px solid #429cd6}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_facebook,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_facebook:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_facebook:not(:hover){border:1px solid #3a589e}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_pinterest,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_pinterest:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_pinterest:not(:hover){border:1px solid #cd2029}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_linkedin,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_linkedin:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_linkedin:not(:hover){border:1px solid #0d77b7}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_tumblr,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_tumblr:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_tumblr:not(:hover){border:1px solid #39475d}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_stumbleupon,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_stumbleupon:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_stumbleupon:not(:hover){border:1px solid #ef5025}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_yummly,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_yummly:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_yummly:not(:hover){border:1px solid #e26426}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_reddit,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_reddit:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_reddit:not(:hover){border:1px solid #f04b23}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_email,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_email:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_email:not(:hover){border:1px solid #6bcce9}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_whatsapp,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_whatsapp:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_whatsapp:not(:hover){border:1px solid #71c169}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_pocket,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_pocket:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_pocket:not(:hover){border:1px solid #ef4056}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_buffer,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_buffer:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_buffer:not(:hover){border:1px solid #323b43}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_hacker_news,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_hacker_news:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_hacker_news:not(:hover){border:1px solid #d85623}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_flipboard,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_flipboard:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_flipboard:not(:hover){border:1px solid #bf2626}.swp_social_panel.swp_default_full_color .swp_google_plus,html body .swp_social_panel.swp_individual_full_color .swp_google_plus:hover,body .swp_social_panel.swp_other_full_color:hover .swp_google_plus{background:#df4b37;border:1px solid #c44133}.swp_social_panel.swp_default_full_color .swp_twitter,html body .swp_social_panel.swp_individual_full_color .swp_twitter:hover,body .swp_social_panel.swp_other_full_color:hover .swp_twitter{background:#429cd6;border:1px solid #3c87b2}.swp_social_panel.swp_default_full_color .swp_facebook,html body .swp_social_panel.swp_individual_full_color .swp_facebook:hover,body .swp_social_panel.swp_other_full_color:hover .swp_facebook{background:#3a589e;border:1px solid #2e4675}.swp_social_panel.swp_default_full_color .swp_pinterest,html body .swp_social_panel.swp_individual_full_color .swp_pinterest:hover,body .swp_social_panel.swp_other_full_color:hover .swp_pinterest{background:#cd2029;border:1px solid #aa1b29}.swp_social_panel.swp_default_full_color .swp_linkedin,html body .swp_social_panel.swp_individual_full_color .swp_linkedin:hover,body .swp_social_panel.swp_other_full_color:hover .swp_linkedin{background:#0d77b7;border:1px solid #0c6591}.swp_social_panel.swp_default_full_color .swp_tumblr,html body .swp_social_panel.swp_individual_full_color .swp_tumblr:hover,body .swp_social_panel.swp_other_full_color:hover .swp_tumblr{background:#39475d;border:1px solid #27313f}.swp_social_panel.swp_default_full_color .swp_stumbleupon,html body .swp_social_panel.swp_individual_full_color .swp_stumbleupon:hover,body .swp_social_panel.swp_other_full_color:hover .swp_stumbleupon{background:#ef5025;border:1px solid #d34427}.swp_social_panel.swp_default_full_color .swp_yummly,html body .swp_social_panel.swp_individual_full_color .swp_yummly:hover,body .swp_social_panel.swp_other_full_color:hover .swp_yummly{background:#e26426;border:1px solid #b65027}.swp_social_panel.swp_default_full_color .swp_reddit,html body .swp_social_panel.swp_individual_full_color .swp_reddit:hover,body .swp_social_panel.swp_other_full_color:hover .swp_reddit{background:#f04b23;border:1px solid #d33f27}.swp_social_panel.swp_default_full_color .swp_email,html body .swp_social_panel.swp_individual_full_color .swp_email:hover,body .swp_social_panel.swp_other_full_color:hover .swp_email{background:#6bcce9;border:1px solid #61bace}.swp_social_panel.swp_default_full_color .swp_whatsapp,html body .swp_social_panel.swp_individual_full_color .swp_whatsapp:hover,body .swp_social_panel.swp_other_full_color:hover .swp_whatsapp{background:#71c169;border:1px solid #28b04b}.swp_social_panel.swp_default_full_color .swp_pocket,html body .swp_social_panel.swp_individual_full_color .swp_pocket:hover,body .swp_social_panel.swp_other_full_color:hover .swp_pocket{background:#ef4056;border:1px solid #ce3d55}.swp_social_panel.swp_default_full_color .swp_buffer,html body .swp_social_panel.swp_individual_full_color .swp_buffer:hover,body .swp_social_panel.swp_other_full_color:hover .swp_buffer{background:#323b43;border:1px solid #000}.swp_social_panel.swp_default_full_color .swp_hacker_news,html body .swp_social_panel.swp_individual_full_color .swp_hacker_news:hover,body .swp_social_panel.swp_other_full_color:hover .swp_hacker_news{background:#f16522;border:1px solid #d85623}.swp_social_panel.swp_default_full_color .swp_flipboard,html body .swp_social_panel.swp_individual_full_color .swp_flipboard:hover,body .swp_social_panel.swp_other_full_color:hover .swp_flipboard{background:#e02828;border:1px solid #bf2626}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_google_plus,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_google_plus:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_google_plus{border-bottom:3px solid #c44133}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_twitter,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_twitter:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_twitter{border-bottom:3px solid #5595bc}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_facebook,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_facebook:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_facebook{border-bottom:3px solid #2e4675}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_pinterest,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_pinterest:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_pinterest{border-bottom:3px solid #aa1b29}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_linkedin,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_linkedin:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_linkedin{border-bottom:3px solid #0c6591}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_tumblr,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_tumblr:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_tumblr{border-bottom:3px solid #27313f}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_stumbleupon,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_stumbleupon:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_stumbleupon{border-bottom:3px solid #d34427}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_yummly,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_yummly:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_yummly{border-bottom:3px solid #b65027}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_reddit,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_reddit:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_reddit{border-bottom:3px solid #d33f27}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_email,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_email:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_email{border-bottom:3px solid #61bace}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_whatsapp,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_whatsapp:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_whatsapp{border-bottom:3px solid #28b04b}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_pocket,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_pocket:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_pocket{border-bottom:3px solid #ce3d55}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_buffer,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_buffer:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_buffer{border-bottom:3px solid #000}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_hacker_news,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_hacker_news:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_hacker_news{border-bottom:3px solid #d85623}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_flipboard,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_flipboard:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_flipboard{border-bottom:3px solid #bf2626}.swp_social_panel.swp_default_light_gray .nc_tweetContainer,html body .swp_social_panel.swp_individual_light_gray .nc_tweetContainer:hover,body .swp_social_panel.swp_other_light_gray:hover .nc_tweetContainer{background-color:#ccc;border:1px solid #ccc}.swp_social_panel.swp_three_dee.swp_default_light_gray .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_light_gray .nc_tweetContainer:not(.total_sharesalt):hover,body .swp_social_panel.swp_three_dee.swp_other_light_gray:hover .nc_tweetContainer:not(.total_sharesalt){border-bottom:3px solid #999}.swp_social_panel.swp_default_medium_gray .nc_tweetContainer,html body .swp_social_panel.swp_individual_medium_gray .nc_tweetContainer:hover,body .swp_social_panel.swp_other_medium_gray:hover .nc_tweetContainer{background-color:#999;border:1px solid #999}.swp_social_panel.swp_three_dee.swp_default_medium_gray .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_medium_gray .nc_tweetContainer:not(.total_sharesalt):hover,body .swp_social_panel.swp_three_dee.swp_other_medium_gray:hover .nc_tweetContainer:not(.total_sharesalt){border-bottom:3px solid #444}.swp_social_panel.swp_default_dark_gray .nc_tweetContainer,html body .swp_social_panel.swp_individual_dark_gray .nc_tweetContainer:hover,body .swp_social_panel.swp_other_dark_gray:hover .nc_tweetContainer{background-color:#444;border:1px solid #444}.swp_social_panel.swp_three_dee.swp_default_dark_gray .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_dark_gray .nc_tweetContainer:not(.total_sharesalt):hover,body .swp_social_panel.swp_three_dee.swp_other_dark_gray:hover .nc_tweetContainer:not(.total_sharesalt){border-bottom:3px solid #222}.swp_social_panel.swp_default_light_gray_outlines a,html body .swp_social_panel.swp_individual_light_gray_outlines a:hover,body .swp_social_panel.swp_other_light_gray_outlines:hover a{color:#ccc}.swp_social_panel.swp_default_light_gray_outlines .nc_tweetContainer,html body .swp_social_panel.swp_individual_light_gray_outlines .nc_tweetContainer:hover,body .swp_social_panel.swp_other_light_gray_outlines:hover .nc_tweetContainer{background:transparent;border:1px solid #ccc}.swp_social_panel.swp_default_medium_gray_outlines a,html body .swp_social_panel.swp_individual_medium_gray_outlines a:hover,body .swp_social_panel.swp_other_medium_gray_outlines:hover a{color:#999}.swp_social_panel.swp_default_medium_gray_outlines .nc_tweetContainer,html body .swp_social_panel.swp_individual_medium_gray_outlines .nc_tweetContainer:hover,body .swp_social_panel.swp_other_medium_gray_outlines:hover .nc_tweetContainer{background:transparent;border:1px solid #999}.swp_social_panel.swp_default_dark_gray_outlines a,html body .swp_social_panel.swp_individual_dark_gray_outlines a:hover,body .swp_social_panel.swp_other_dark_gray_outlines:hover a{color:#444}.swp_social_panel.swp_default_dark_gray_outlines .nc_tweetContainer,html body .swp_social_panel.swp_individual_dark_gray_outlines .nc_tweetContainer:hover,body .swp_social_panel.swp_other_dark_gray_outlines:hover .nc_tweetContainer{background:transparent;border:1px solid #444}.swp_social_panel.swp_default_color_outlines .swp_google_plus a,html body .swp_social_panel.swp_individual_color_outlines .swp_google_plus a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_google_plus a{color:#df4b37}.swp_social_panel.swp_default_color_outlines .swp_facebook a,html body .swp_social_panel.swp_individual_color_outlines .swp_facebook a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_facebook a{color:#3a589e}.swp_social_panel.swp_default_color_outlines .swp_pinterest a,html body .swp_social_panel.swp_individual_color_outlines .swp_pinterest a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_pinterest a{color:#cd2029}.swp_social_panel.swp_default_color_outlines .swp_linkedin a,html body .swp_social_panel.swp_individual_color_outlines .swp_linkedin a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_linkedin a{color:#0d77b7}.swp_social_panel.swp_default_color_outlines .swp_tumblr a,html body .swp_social_panel.swp_individual_color_outlines .swp_tumblr a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_tumblr a{color:#39475d}.swp_social_panel.swp_default_color_outlines .swp_stumbleupon a,html body .swp_social_panel.swp_individual_color_outlines .swp_stumbleupon a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_stumbleupon a{color:#ef5025}.swp_social_panel.swp_default_color_outlines .swp_yummly a,html body .swp_social_panel.swp_individual_color_outlines .swp_yummly a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_yummly a{color:#e26426}.swp_social_panel.swp_default_color_outlines .swp_whatsapp a,html body .swp_social_panel.swp_individual_color_outlines .swp_whatsapp a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_whatsapp a{color:#71c169}.swp_social_panel.swp_default_color_outlines .swp_pocket a,html body .swp_social_panel.swp_individual_color_outlines .swp_pocket a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_pocket a{color:#ef4056}.swp_social_panel.swp_default_color_outlines .swp_reddit a,html body .swp_social_panel.swp_individual_color_outlines .swp_reddit a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_reddit a{color:#f04b23}.swp_social_panel.swp_default_color_outlines .swp_email a,html body .swp_social_panel.swp_individual_color_outlines .swp_email a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_email a{color:#6bcce9}.swp_social_panel.swp_default_color_outlines .swp_buffer a,html body .swp_social_panel.swp_individual_color_outlines .swp_buffer a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_buffer a{color:#323b43}.swp_social_panel.swp_default_color_outlines .swp_hacker_news a,html body .swp_social_panel.swp_individual_color_outlines .swp_hacker_news a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_hacker_news a{color:#f16522}.swp_social_panel.swp_default_color_outlines .swp_flipboard a,html body .swp_social_panel.swp_individual_color_outlines .swp_flipboard a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_flipboard a{color:#e02828}.swp_social_panel.swp_default_color_outlines .swp_google_plus,html body .swp_social_panel.swp_individual_color_outlines .swp_google_plus:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_google_plus{background:transparent;border:1px solid #df4b37}.swp_social_panel.swp_default_color_outlines .swp_twitter,html body .swp_social_panel.swp_individual_color_outlines .swp_twitter:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_twitter{background:transparent;border:1px solid #429cd6}.swp_social_panel.swp_default_color_outlines .swp_facebook,html body .swp_social_panel.swp_individual_color_outlines .swp_facebook:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_facebook{background:transparent;border:1px solid #3a589e}.swp_social_panel.swp_default_color_outlines .swp_pinterest,html body .swp_social_panel.swp_individual_color_outlines .swp_pinterest:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_pinterest{background:transparent;border:1px solid #cd2029}.swp_social_panel.swp_default_color_outlines .swp_linkedin,html body .swp_social_panel.swp_individual_color_outlines .swp_linkedin:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_linkedin{background:transparent;border:1px solid #0d77b7}.swp_social_panel.swp_default_color_outlines .swp_tumblr,html body .swp_social_panel.swp_individual_color_outlines .swp_tumblr:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_tumblr{background:transparent;border:1px solid #39475d}.swp_social_panel.swp_default_color_outlines .swp_stumbleupon,html body .swp_social_panel.swp_individual_color_outlines .swp_stumbleupon:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_stumbleupon{background:transparent;border:1px solid #ef5025}.swp_social_panel.swp_default_color_outlines .swp_yummly,html body .swp_social_panel.swp_individual_color_outlines .swp_yummly:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_yummly{background:transparent;border:1px solid #e26426}.swp_social_panel.swp_default_color_outlines .swp_whatsapp,html body .swp_social_panel.swp_individual_color_outlines .swp_whatsapp:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_whatsapp{background:transparent;border:1px solid #71c169}.swp_social_panel.swp_default_color_outlines .swp_reddit,html body .swp_social_panel.swp_individual_color_outlines .swp_reddit:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_reddit{background:transparent;border:1px solid #f04b23}.swp_social_panel.swp_default_color_outlines .swp_email,html body .swp_social_panel.swp_individual_color_outlines .swp_email:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_email{background:transparent;border:1px solid #6bcce9}.swp_social_panel.swp_default_color_outlines .swp_pocket,html body .swp_social_panel.swp_individual_color_outlines .swp_pocket:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_pocket{background:transparent;border:1px solid #ef4056}.swp_social_panel.swp_default_color_outlines .swp_buffer,html body .swp_social_panel.swp_individual_color_outlines .swp_buffer:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_buffer{background:transparent;border:1px solid #323b43}.swp_social_panel.swp_default_color_outlines .swp_hacker_news,html body .swp_social_panel.swp_individual_color_outlines .swp_hacker_news:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_hacker_news{background:transparent;border:1px solid #f16522}.swp_social_panel.swp_default_color_outlines .swp_flipboard,html body .swp_social_panel.swp_individual_color_outlines .swp_flipboard:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_flipboard{background:transparent;border:1px solid #bf2626}.swp_social_panelSide{flex-direction:column;height:auto;overflow:visible;-webkit-transition:all 0.2s linear;transition:all 0.2s linear;z-index:9998;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.slide,.swp_social_panelSide.fade{position:fixed;-webkit-transition:all 0.2s linear;transition:all 0.2s linear}.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:auto;display:flex;position:fixed;padding:30px 0}.swp_social_panelSide.fade{display:none}.swp_social_panelSide.swp_float_right{align-content:flex-end}.swp_social_panelSide.swp_side_top{top:15px}.swp_social_panelSide.swp_side_bottom{bottom:15px}.swp_social_panelSide.swp_side_center{}.swp_social_panelSide .nc_tweetContainer{-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 0.1s linear;transition:all 0.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 0.1s linear;transition:all 0.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 0.1s linear;transition:all 0.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 0.1s linear;transition:all 0.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 0.1s linear;transition:all 0.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!important;position:relative}.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares),.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) 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 0.1s linear;transition:padding 0.1s linear;width:100%}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_count.swp_hide,.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_circles .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{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[data-network]:not(.total_shares):hover .iconFiller,.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .spaceManWilly{width:90px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover .iconFiller,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover .iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) .spaceManWilly{width:100%}.swp_social_panelSide .nc_tweetContainer.total_shares{background:rgba(0,0,0,0);border:0!important;font-weight:800;height:55px;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:white;position:fixed;-webkit-transition:top 0.5s bottom 0.5s;transition:top 0.5s bottom 0.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:normal;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"}.swp_CTT{text-decoration:none!important}.sw-tweet-clear{zoom:1}.sw-tweet-clear:after{clear:both;content:".";display:block;height:0;visibility:hidden}.sw-click-to-tweet{display:block;margin:15px 0;padding:15px 30px;position:relative}.sw-click-to-tweet:after{clear:both;content:".";display:block;height:0;line-height:0;visibility:hidden}.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:bold;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 0.25s linear;transition:all 0.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 0.25s linear;transition:all 0.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 0.25s linear;transition:all 0.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 0.25s linear;transition:all 0.25s linear}a.swp_CTT.style5:hover .sw-click-to-tweet{background-color:#d34250;border-left:10px solid #30394f;-webkit-transition:all 0.25s linear;transition:all 0.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 0.25s linear;transition:all 0.25s linear}a.swp_CTT.style6:hover .sw-click-to-tweet{background-color:#ced3dc;border-left:10px solid #d34250;-webkit-transition:all 0.25s linear;transition:all 0.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 0.25s linear;transition:all 0.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;text-decoration:none;-webkit-transition:opacity 0.5s;transition:opacity 0.5s;z-index:200}div.sw-pinit:hover a.sw-pinit-button,div.sw-pinit:focus 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:hover,div.sw-pinit a.sw-pinit-button:focus{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}.swp_social_panel.notMobile .nc_tweetContainer:nth-last-child(1),.mobile .nc_tweetContainer:nth-last-child(2),.nc_tweetContainer.total_shares:nth-last-child(1){margin-right:0}.swp_social_panel.swp_default_full_color a,html body .swp_social_panel.swp_individual_full_color .nc_tweetContainer:hover a,body .swp_social_panel.swp_other_full_color:hover a,.swp_social_panel.swp_default_light_gray a,html body .swp_social_panel.swp_individual_light_gray .nc_tweetContainer:hover a,body .swp_social_panel.swp_other_light_gray:hover a,.swp_social_panel.swp_default_medium_gray a,html body .swp_social_panel.swp_individual_medium_gray a:hover,body .swp_social_panel.swp_other_medium_gray:hover a,.swp_social_panel.swp_default_dark_gray a,html body .swp_social_panel.swp_individual_dark_gray a:hover,body .swp_social_panel.swp_other_dark_gray:hover a{color:white}.swp_social_panel.swp_default_color_outlines .swp_twitter a,html body .swp_social_panel.swp_individual_color_outlines .swp_twitter a:hover,body .swp_social_panel.swp_other_color_outlines:hover .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{color:#429cd6}.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){opacity:1}.swp_social_panel.mobile .iconFiller ~ .swp_count,.sw-content-locator{display:none}a.style1 .sw-click-to-tweet .sw-ctt-text,a.style1 .sw-click-to-tweet .sw-ctt-btn{color:#999;text-decoration:none}a.style1:hover .sw-click-to-tweet .sw-ctt-text,a.style1:hover .sw-click-to-tweet .sw-ctt-btn,a.style2: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{color:#666;text-decoration:none}a.style3:hover .sw-click-to-tweet .sw-ctt-text,a.style3 .sw-click-to-tweet .sw-ctt-btn,a.style3:hover .sw-click-to-tweet .sw-ctt-btn,a.style3 .sw-click-to-tweet i.swp_twitter,a.style4 .sw-click-to-tweet .sw-ctt-text,a.style4:hover .sw-click-to-tweet .sw-ctt-text,a.style4 .sw-click-to-tweet .sw-ctt-btn,a.style4:hover .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-text,a.style5 .sw-click-to-tweet .sw-ctt-btn,a.style5:hover .sw-click-to-tweet .sw-ctt-btn{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-text,a.style6 .sw-click-to-tweet .sw-ctt-btn{color:#30394f;text-decoration:none}a.style6:hover .sw-click-to-tweet .sw-ctt-text,a.style6:hover .sw-click-to-tweet .sw-ctt-btn,a.style6:hover .sw-click-to-tweet i.swp_twitter{color:#2a2d34;text-decoration:none}.scale-70{-ms-transform:scale(0.7);-webkit-transform:scale(0.7);transform:scale(0.7)}.swp_social_panel:not(.nc_floater).scale-70.scale-full_width{width:142.8571428571429%!important}.scale-80{-ms-transform:scale(0.8);-webkit-transform:scale(0.8);transform:scale(0.8)}.swp_social_panel:not(.nc_floater).scale-80.scale-full_width{width:125%!important}.scale-90{-ms-transform:scale(0.9);-webkit-transform:scale(0.9);transform:scale(0.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}.scale-full_width,.scale-left,.nc_floater.scale-center,.nc_floater.scale-right{-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;z-index:-10}.fl-module-content .uabb-blog-posts .uabb-post-thumbnail .sw-pinit.lazyloaded{display:block!important}.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}
|
@@ -286,12 +286,15 @@ class Social_Warfare {
|
|
286 |
|
287 |
new SWP_JSON_Cache_Handler();
|
288 |
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
|
|
|
|
|
|
295 |
}
|
296 |
|
297 |
|
@@ -324,7 +327,6 @@ class Social_Warfare {
|
|
324 |
'CURL',
|
325 |
'Localization',
|
326 |
'Permalink',
|
327 |
-
'Plugin_Updater',
|
328 |
'Database_Migration',
|
329 |
'URL_Management',
|
330 |
'Notice',
|
286 |
|
287 |
new SWP_JSON_Cache_Handler();
|
288 |
|
289 |
+
add_action('plugins_loaded', function() {
|
290 |
+
/**
|
291 |
+
* Instantiates all of our notices.
|
292 |
+
*
|
293 |
+
*/
|
294 |
+
new SWP_Notice_Loader();
|
295 |
+
}, 50);
|
296 |
+
|
297 |
+
require_once SWP_PLUGIN_DIR . '/functions/utilities/SWP_Plugin_Updater.php';
|
298 |
}
|
299 |
|
300 |
|
327 |
'CURL',
|
328 |
'Localization',
|
329 |
'Permalink',
|
|
|
330 |
'Database_Migration',
|
331 |
'URL_Management',
|
332 |
'Notice',
|
@@ -228,9 +228,11 @@ class SWP_Buttons_Panel {
|
|
228 |
public function establish_post_data() {
|
229 |
if( !empty( $this->post_id ) ):
|
230 |
$post = get_post( $this->post_id );
|
231 |
-
endif;
|
232 |
|
233 |
-
|
|
|
|
|
|
|
234 |
$this->post_data = array(
|
235 |
'ID' => $post->ID,
|
236 |
'post_type' => $post->post_type,
|
@@ -254,6 +256,7 @@ class SWP_Buttons_Panel {
|
|
254 |
public function establish_share_data() {
|
255 |
global $SWP_Post_Caches;
|
256 |
$this->shares = $SWP_Post_Caches->get_post_cache( $this->post_id )->get_shares();
|
|
|
257 |
return $this;
|
258 |
}
|
259 |
|
@@ -458,12 +461,20 @@ class SWP_Buttons_Panel {
|
|
458 |
return;
|
459 |
endif;
|
460 |
|
|
|
|
|
461 |
if ( !$this->should_print() ) :
|
462 |
-
|
463 |
-
|
464 |
|
465 |
-
|
466 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
|
468 |
// Create the HTML Buttons panel wrapper
|
469 |
$container = '<div class="swp_social_panel swp_' . $this->option('button_shape') .
|
@@ -472,6 +483,7 @@ class SWP_Buttons_Panel {
|
|
472 |
' swp_other_' . $this->option('hover_colors') .
|
473 |
' scale-' . $this->option('button_size') * 100 .
|
474 |
' scale-' . $this->option('button_alignment') .
|
|
|
475 |
'" data-min-width="' . $this->option('float_screen_width') .
|
476 |
'" data-panel-position="' . $this->option('location_post') .
|
477 |
'" data-float="' . $this->get_float_location() .
|
@@ -482,6 +494,9 @@ class SWP_Buttons_Panel {
|
|
482 |
//* This should be inserted via addon, not here.
|
483 |
//'" data-emphasize="'.$this->option('emphasize_icons').'
|
484 |
|
|
|
|
|
|
|
485 |
if ($this->option('totals_alignment') === 'totals_left') :
|
486 |
$buttons = $total_shares_html . $buttons;
|
487 |
else:
|
@@ -829,12 +844,17 @@ class SWP_Buttons_Panel {
|
|
829 |
public function render_total_shares_html() {
|
830 |
$buttons = isset( $this->args['buttons'] ) ? $this->args['buttons'] : array();
|
831 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
832 |
$totals_argument = in_array( 'total', $buttons ) || in_array( 'totals', $buttons );
|
833 |
|
834 |
-
if (
|
835 |
-
|| $this->shares['total_shares'] < $this->option('minimum_shares')
|
836 |
-
|| false == $this->option('total_shares')
|
837 |
-
|| $this->is_shortcode && !$totals_argument ) {
|
838 |
return '';
|
839 |
}
|
840 |
|
@@ -892,7 +912,7 @@ class SWP_Buttons_Panel {
|
|
892 |
endif;
|
893 |
|
894 |
if ( ! $this->should_print() ) :
|
895 |
-
return $this->args['content'];
|
896 |
endif;
|
897 |
|
898 |
if ( null !== $content && gettype( $content ) === 'string' ) :
|
228 |
public function establish_post_data() {
|
229 |
if( !empty( $this->post_id ) ):
|
230 |
$post = get_post( $this->post_id );
|
|
|
231 |
|
232 |
+
if ( !is_object( $post ) ) :
|
233 |
+
return;
|
234 |
+
endif;
|
235 |
+
|
236 |
$this->post_data = array(
|
237 |
'ID' => $post->ID,
|
238 |
'post_type' => $post->post_type,
|
256 |
public function establish_share_data() {
|
257 |
global $SWP_Post_Caches;
|
258 |
$this->shares = $SWP_Post_Caches->get_post_cache( $this->post_id )->get_shares();
|
259 |
+
// echo "The post cache", var_dump($SWP_Post_Caches->get_post_cache( $this->post_id ));
|
260 |
return $this;
|
261 |
}
|
262 |
|
461 |
return;
|
462 |
endif;
|
463 |
|
464 |
+
$style = "";
|
465 |
+
|
466 |
if ( !$this->should_print() ) :
|
467 |
+
//* Top and bottom floating buttons require a button panel present on the page.
|
468 |
+
$float_location = $this->get_float_location();
|
469 |
|
470 |
+
if ( true === $this->option( 'floating_panel' ) && 'top' == $float_location || 'bottom' == $float_location ) :
|
471 |
+
//* Using display: none interfere's with the element's position,
|
472 |
+
//* Which we need to be calculated correctly.
|
473 |
+
$style = 'opacity: 0;';
|
474 |
+
else :
|
475 |
+
return $this->content;
|
476 |
+
endif;
|
477 |
+
endif;
|
478 |
|
479 |
// Create the HTML Buttons panel wrapper
|
480 |
$container = '<div class="swp_social_panel swp_' . $this->option('button_shape') .
|
483 |
' swp_other_' . $this->option('hover_colors') .
|
484 |
' scale-' . $this->option('button_size') * 100 .
|
485 |
' scale-' . $this->option('button_alignment') .
|
486 |
+
'" style="' . $style .
|
487 |
'" data-min-width="' . $this->option('float_screen_width') .
|
488 |
'" data-panel-position="' . $this->option('location_post') .
|
489 |
'" data-float="' . $this->get_float_location() .
|
494 |
//* This should be inserted via addon, not here.
|
495 |
//'" data-emphasize="'.$this->option('emphasize_icons').'
|
496 |
|
497 |
+
$total_shares_html = $this->render_total_shares_html();
|
498 |
+
$buttons = $this->render_buttons_html();
|
499 |
+
|
500 |
if ($this->option('totals_alignment') === 'totals_left') :
|
501 |
$buttons = $total_shares_html . $buttons;
|
502 |
else:
|
844 |
public function render_total_shares_html() {
|
845 |
$buttons = isset( $this->args['buttons'] ) ? $this->args['buttons'] : array();
|
846 |
|
847 |
+
if ( false == $this->option('total_shares') ) {
|
848 |
+
return '';
|
849 |
+
}
|
850 |
+
|
851 |
+
if ( $this->shares['total_shares'] < $this->option('minimum_shares') ) {
|
852 |
+
return '';
|
853 |
+
}
|
854 |
+
|
855 |
$totals_argument = in_array( 'total', $buttons ) || in_array( 'totals', $buttons );
|
856 |
|
857 |
+
if ( $this->is_shortcode && !$totals_argument ) {
|
|
|
|
|
|
|
858 |
return '';
|
859 |
}
|
860 |
|
912 |
endif;
|
913 |
|
914 |
if ( ! $this->should_print() ) :
|
915 |
+
// return $this->args['content'];
|
916 |
endif;
|
917 |
|
918 |
if ( null !== $content && gettype( $content ) === 'string' ) :
|
@@ -82,12 +82,11 @@ class SWP_Script {
|
|
82 |
*
|
83 |
* @since 1.0.0
|
84 |
* @access public
|
85 |
-
* @global $swp_user_options
|
86 |
* @param void
|
87 |
* @return void
|
88 |
*/
|
89 |
public function enqueue_scripts() {
|
90 |
-
|
91 |
|
92 |
$suffix = SWP_Script::get_suffix();
|
93 |
|
@@ -119,7 +118,6 @@ class SWP_Script {
|
|
119 |
*
|
120 |
*/
|
121 |
public function enqueue_admin_scripts( $screen ) {
|
122 |
-
|
123 |
$this->enqueue_scripts();
|
124 |
|
125 |
$suffix = SWP_Script::get_suffix();
|
@@ -155,12 +153,10 @@ class SWP_Script {
|
|
155 |
*
|
156 |
*/
|
157 |
public function footer_functions() {
|
158 |
-
|
159 |
-
global $swp_user_options;
|
160 |
|
161 |
// Fetch a few variables.
|
162 |
$info['postID'] = get_the_ID();
|
163 |
-
$info['swp_user_options'] = $swp_user_options;
|
164 |
$info['footer_output'] = '';
|
165 |
|
166 |
// Pass the array through our custom filters.
|
@@ -185,9 +181,10 @@ class SWP_Script {
|
|
185 |
*
|
186 |
*/
|
187 |
public function click_tracking( $info ) {
|
|
|
188 |
|
189 |
// Output the JS variable for click tracking if it is turned on.
|
190 |
-
if ( isset( $
|
191 |
$info['footer_output'] .= 'var swpClickTracking = true;';
|
192 |
} else {
|
193 |
$info['footer_output'] .= 'var swpClickTracking = false;';
|
@@ -207,10 +204,9 @@ class SWP_Script {
|
|
207 |
*
|
208 |
*/
|
209 |
public function frame_buster( $info ) {
|
|
|
210 |
|
211 |
-
|
212 |
-
|
213 |
-
if ( true === $swp_user_options['frame_buster'] ) :
|
214 |
$info['footer_output'] .= PHP_EOL . 'function parentIsEvil() { var html = null; try { var doc = top.location.pathname; } catch(err){ }; if(typeof doc === "undefined") { return true } else { return false }; }; if (parentIsEvil()) { top.location = self.location.href; };var url = "' . get_permalink() . '";if(url.indexOf("stfi.re") != -1) { var canonical = ""; var links = document.getElementsByTagName("link"); for (var i = 0; i < links.length; i ++) { if (links[i].getAttribute("rel") === "canonical") { canonical = links[i].getAttribute("href")}}; canonical = canonical.replace("?sfr=1", "");top.location = canonical; console.log(canonical);};';
|
215 |
endif;
|
216 |
|
@@ -269,8 +265,8 @@ class SWP_Script {
|
|
269 |
*
|
270 |
*/
|
271 |
public function float_before_content( $vars ) {
|
272 |
-
|
273 |
-
$float_before_content = $
|
274 |
|
275 |
$vars['footer_output'] = "var swpFloatBeforeContent = " . json_encode($float_before_content) . ";";
|
276 |
|
82 |
*
|
83 |
* @since 1.0.0
|
84 |
* @access public
|
|
|
85 |
* @param void
|
86 |
* @return void
|
87 |
*/
|
88 |
public function enqueue_scripts() {
|
89 |
+
$options = get_option( 'social_warfare_settings ', array() );
|
90 |
|
91 |
$suffix = SWP_Script::get_suffix();
|
92 |
|
118 |
*
|
119 |
*/
|
120 |
public function enqueue_admin_scripts( $screen ) {
|
|
|
121 |
$this->enqueue_scripts();
|
122 |
|
123 |
$suffix = SWP_Script::get_suffix();
|
153 |
*
|
154 |
*/
|
155 |
public function footer_functions() {
|
156 |
+
$options = get_option( 'social_warfare_settings ', array() );
|
|
|
157 |
|
158 |
// Fetch a few variables.
|
159 |
$info['postID'] = get_the_ID();
|
|
|
160 |
$info['footer_output'] = '';
|
161 |
|
162 |
// Pass the array through our custom filters.
|
181 |
*
|
182 |
*/
|
183 |
public function click_tracking( $info ) {
|
184 |
+
$options = get_option( 'social_warfare_settings', array() );
|
185 |
|
186 |
// Output the JS variable for click tracking if it is turned on.
|
187 |
+
if ( isset( $options['click_tracking'] ) && true === $options['click_tracking'] ) {
|
188 |
$info['footer_output'] .= 'var swpClickTracking = true;';
|
189 |
} else {
|
190 |
$info['footer_output'] .= 'var swpClickTracking = false;';
|
204 |
*
|
205 |
*/
|
206 |
public function frame_buster( $info ) {
|
207 |
+
$options = get_option( 'social_warfare_settings ', array() );
|
208 |
|
209 |
+
if ( true === $options['frame_buster'] ) :
|
|
|
|
|
210 |
$info['footer_output'] .= PHP_EOL . 'function parentIsEvil() { var html = null; try { var doc = top.location.pathname; } catch(err){ }; if(typeof doc === "undefined") { return true } else { return false }; }; if (parentIsEvil()) { top.location = self.location.href; };var url = "' . get_permalink() . '";if(url.indexOf("stfi.re") != -1) { var canonical = ""; var links = document.getElementsByTagName("link"); for (var i = 0; i < links.length; i ++) { if (links[i].getAttribute("rel") === "canonical") { canonical = links[i].getAttribute("href")}}; canonical = canonical.replace("?sfr=1", "");top.location = canonical; console.log(canonical);};';
|
211 |
endif;
|
212 |
|
265 |
*
|
266 |
*/
|
267 |
public function float_before_content( $vars ) {
|
268 |
+
$options = get_option( 'social_warfare_settings ', array() );
|
269 |
+
$float_before_content = $options['float_before_content'];
|
270 |
|
271 |
$vars['footer_output'] = "var swpFloatBeforeContent = " . json_encode($float_before_content) . ";";
|
272 |
|
@@ -26,10 +26,10 @@ class SWP_Shortcode {
|
|
26 |
*
|
27 |
*/
|
28 |
public function __construct() {
|
29 |
-
add_shortcode( 'social_warfare', array( $this
|
30 |
-
add_shortcode( 'total_shares', array ( $this
|
31 |
-
add_shortcode( 'sitewide_shares', array ( $this
|
32 |
-
add_shortcode( 'click_to_tweet', array( $this
|
33 |
|
34 |
/**
|
35 |
* These are old legacy shortcodes that have been replaced with the ones seen above.
|
@@ -186,5 +186,4 @@ class SWP_Shortcode {
|
|
186 |
|
187 |
return $html;
|
188 |
}
|
189 |
-
|
190 |
}
|
26 |
*
|
27 |
*/
|
28 |
public function __construct() {
|
29 |
+
add_shortcode( 'social_warfare', array( $this, 'buttons_shortcode' ) );
|
30 |
+
add_shortcode( 'total_shares', array ( $this, 'post_total_shares' ) );
|
31 |
+
add_shortcode( 'sitewide_shares', array ( $this, 'sitewide_total_shares' ) );
|
32 |
+
add_shortcode( 'click_to_tweet', array( $this, 'click_to_tweet' ) );
|
33 |
|
34 |
/**
|
35 |
* These are old legacy shortcodes that have been replaced with the ones seen above.
|
186 |
|
187 |
return $html;
|
188 |
}
|
|
|
189 |
}
|
@@ -1,491 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -210,7 +210,7 @@ class SWP_Section_HTML extends SWP_Option {
|
|
210 |
$html .= '<div class="sw-grid sw-col-940 swp_tweets_not_activated">';
|
211 |
|
212 |
// The Warning Notice & Instructions
|
213 |
-
$html .= '<p class="sw-subtitle sw-registration-text sw-italic">Step 1: <a style="float:none;" class="button sw-navy-button" href="https://opensharecount.com" target="_blank">' . __( 'Click here to visit OpenShareCount.com (Recommended)' , 'social-warfare' ) . '</a> <a style="float:none;" class="button sw-navy-button" href="http://
|
214 |
|
215 |
// Close the IS NOT ACTIVATED container
|
216 |
$html .= '</div>';
|
210 |
$html .= '<div class="sw-grid sw-col-940 swp_tweets_not_activated">';
|
211 |
|
212 |
// The Warning Notice & Instructions
|
213 |
+
$html .= '<p class="sw-subtitle sw-registration-text sw-italic">Step 1: <a style="float:none;" class="button sw-navy-button" href="https://opensharecount.com" target="_blank">' . __( 'Click here to visit OpenShareCount.com (Recommended)' , 'social-warfare' ) . '</a> <a style="float:none;" class="button sw-navy-button" href="http://twitcount.com" target="_blank">' . __( 'Click here to visit TwitCount.com' , 'social-warfare' ) . '</a><br />' . __( 'Step 2: Follow the prompts on their website to create an account and add your domain to be tracked for share counts.' , 'social-warfare' ) . '<br />' . __( 'Step 3: Flip the switch below to "ON", select which tracking service the plugin should use, then save your changes.' , 'social-warfare' ) . '</p>';
|
214 |
|
215 |
// Close the IS NOT ACTIVATED container
|
216 |
$html .= '</div>';
|
@@ -39,6 +39,7 @@ class SWP_Twitter extends SWP_Social_Network {
|
|
39 |
$this->key = 'twitter';
|
40 |
$this->default = 'true';
|
41 |
|
|
|
42 |
$this->init_social_network();
|
43 |
}
|
44 |
|
@@ -52,17 +53,21 @@ class SWP_Twitter extends SWP_Social_Network {
|
|
52 |
*
|
53 |
*/
|
54 |
public function get_api_link( $url ) {
|
|
|
55 |
// Fetch the user's options
|
56 |
global $swp_user_options;
|
57 |
|
58 |
// If the user has enabled Twitter shares....
|
59 |
-
if
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
-
//
|
62 |
-
if
|
63 |
-
|
64 |
-
} else {
|
65 |
-
$request_url = 'http://public.newsharecounts.com/count.json?url=' . $url;
|
66 |
}
|
67 |
|
68 |
// Debugging
|
@@ -70,15 +75,9 @@ class SWP_Twitter extends SWP_Social_Network {
|
|
70 |
echo '<b>Request URL:</b> ' . $request_url . '<br />';
|
71 |
}
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
// If the user has not enabled Twitter shares....
|
76 |
-
else :
|
77 |
|
78 |
-
|
79 |
-
return 0;
|
80 |
-
|
81 |
-
endif;
|
82 |
}
|
83 |
|
84 |
|
@@ -139,16 +138,19 @@ class SWP_Twitter extends SWP_Social_Network {
|
|
139 |
// Check for a custom tweet from the post options.
|
140 |
$custom_tweet = get_post_meta( $post_data['ID'] , 'swp_custom_tweet' , true );
|
141 |
|
142 |
-
|
143 |
-
|
|
|
|
|
|
|
144 |
else :
|
145 |
-
$
|
146 |
endif;
|
147 |
|
148 |
$twitter_link = $this->get_shareable_permalink( $post_data );
|
149 |
|
150 |
// If the custom tweet contains a link, block Twitter for auto adding another one.
|
151 |
-
if ( false !== strpos( $
|
152 |
$url_parameter = '&url=/';
|
153 |
else :
|
154 |
$url_parameter = '&url=' . $twitter_link;
|
@@ -157,7 +159,7 @@ class SWP_Twitter extends SWP_Social_Network {
|
|
157 |
$twitter_mention = get_post_meta( $post_data['ID'] , 'swp_twitter_mention' , true );
|
158 |
|
159 |
if (false != $twitter_mention):
|
160 |
-
$
|
161 |
endif;
|
162 |
|
163 |
$user_twitter_handle = get_the_author_meta( 'swp_twitter' , SWP_User_Profile::get_author( $post_data['ID'] ) );
|
@@ -170,7 +172,7 @@ class SWP_Twitter extends SWP_Social_Network {
|
|
170 |
$via_parameter = '';
|
171 |
endif;
|
172 |
|
173 |
-
$parameters = $
|
174 |
|
175 |
$intent_link = "https://twitter.com/intent/tweet?text=$parameters";
|
176 |
|
@@ -178,4 +180,49 @@ class SWP_Twitter extends SWP_Social_Network {
|
|
178 |
|
179 |
}
|
180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
}
|
39 |
$this->key = 'twitter';
|
40 |
$this->default = 'true';
|
41 |
|
42 |
+
$this->reset_share_count_source();
|
43 |
$this->init_social_network();
|
44 |
}
|
45 |
|
53 |
*
|
54 |
*/
|
55 |
public function get_api_link( $url ) {
|
56 |
+
|
57 |
// Fetch the user's options
|
58 |
global $swp_user_options;
|
59 |
|
60 |
// If the user has enabled Twitter shares....
|
61 |
+
if( !empty( $swp_user_options['tweet_count_source'] ) ) {
|
62 |
+
|
63 |
+
// Open Share Counts
|
64 |
+
if( 'opensharecount' == $swp_user_options['tweet_count_source'] ) {
|
65 |
+
return 'https://opensharecount.com/count.json?url='. $url;
|
66 |
+
}
|
67 |
|
68 |
+
// TwitCount
|
69 |
+
if( 'twitcount' == $swp_user_options['tweet_count_source'] ) {
|
70 |
+
return 'https://counts.twitcount.com/counts.php?url=' . $url;
|
|
|
|
|
71 |
}
|
72 |
|
73 |
// Debugging
|
75 |
echo '<b>Request URL:</b> ' . $request_url . '<br />';
|
76 |
}
|
77 |
|
78 |
+
}
|
|
|
|
|
|
|
79 |
|
80 |
+
return 0;
|
|
|
|
|
|
|
81 |
}
|
82 |
|
83 |
|
138 |
// Check for a custom tweet from the post options.
|
139 |
$custom_tweet = get_post_meta( $post_data['ID'] , 'swp_custom_tweet' , true );
|
140 |
|
141 |
+
$tweet = empty( $custom_tweet ) ? $title : $custom_tweet;
|
142 |
+
$tweet = is_array( $tweet ) ? $tweet[0] : $tweet;
|
143 |
+
|
144 |
+
if ( function_exists( 'normalizer_normalize' ) ) :
|
145 |
+
$tweet = urlencode( normalizer_normalize( html_entity_decode( $tweet, ENT_COMPAT, 'UTF-8' ) ) );
|
146 |
else :
|
147 |
+
$tweet = urlencode( html_entity_decode( $tweet, ENT_COMPAT, 'UTF-8' ) );
|
148 |
endif;
|
149 |
|
150 |
$twitter_link = $this->get_shareable_permalink( $post_data );
|
151 |
|
152 |
// If the custom tweet contains a link, block Twitter for auto adding another one.
|
153 |
+
if ( false !== strpos( $tweet , 'http' ) ) :
|
154 |
$url_parameter = '&url=/';
|
155 |
else :
|
156 |
$url_parameter = '&url=' . $twitter_link;
|
159 |
$twitter_mention = get_post_meta( $post_data['ID'] , 'swp_twitter_mention' , true );
|
160 |
|
161 |
if (false != $twitter_mention):
|
162 |
+
$tweet .= ' @'.str_replace('@','',$twitter_mention);
|
163 |
endif;
|
164 |
|
165 |
$user_twitter_handle = get_the_author_meta( 'swp_twitter' , SWP_User_Profile::get_author( $post_data['ID'] ) );
|
172 |
$via_parameter = '';
|
173 |
endif;
|
174 |
|
175 |
+
$parameters = $tweet . $url_parameter . $via_parameter;
|
176 |
|
177 |
$intent_link = "https://twitter.com/intent/tweet?text=$parameters";
|
178 |
|
180 |
|
181 |
}
|
182 |
|
183 |
+
|
184 |
+
/**
|
185 |
+
* A method for resetting the share count source if they were using
|
186 |
+
* newsharecounts.com which has shut down.
|
187 |
+
*
|
188 |
+
* @since 3.2.0 | 24 JUL 2018 | Created
|
189 |
+
* @param void
|
190 |
+
* @return void
|
191 |
+
*
|
192 |
+
*/
|
193 |
+
public function reset_share_count_source() {
|
194 |
+
$options = get_option( 'social_warfare_settings' );
|
195 |
+
|
196 |
+
if( !empty( $options['tweet_count_source']) && 'newsharecounts' == $options['tweet_count_source'] ) {
|
197 |
+
|
198 |
+
unset( $options['tweet_count_source'] );
|
199 |
+
$options['twitter_shares'] = false;
|
200 |
+
update_option( 'social_warfare_settings', $options );
|
201 |
+
|
202 |
+
add_filter( 'swp_admin_notices', array( $this, 'print_twitter_notice' ) );
|
203 |
+
}
|
204 |
+
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Displays the admin notice about New Share Counts.
|
208 |
+
*
|
209 |
+
* @since 3.2.0 | Created
|
210 |
+
* @param array $notices All admin notices passed in the 'swp_admin_notices' hook.
|
211 |
+
* @return array $notices The updated notice array.
|
212 |
+
*/
|
213 |
+
public function print_twitter_notice( $notices ) {
|
214 |
+
$notice = array(
|
215 |
+
'key' => 'new_share_counts_admin_used_service',
|
216 |
+
'message' => 'Because New Share Counts is not in service, we have switched your Tweet Count Registration to "OFF". To re-activate tweet counts, please visit Settings -> Social Identity -> Tweet Count Registration and follow the directions for one of our alternative counting services.',
|
217 |
+
array(
|
218 |
+
'action' => 'Thank you, I understand.',
|
219 |
+
'timeframe' => 0
|
220 |
+
),
|
221 |
+
);
|
222 |
+
|
223 |
+
$notices[] = $notice;
|
224 |
+
|
225 |
+
return $notices;
|
226 |
+
}
|
227 |
+
|
228 |
}
|
@@ -30,11 +30,11 @@ class SWP_Notice {
|
|
30 |
* @param string $message The message for this notice
|
31 |
*
|
32 |
*/
|
33 |
-
public function __construct( $key, $message ) {
|
34 |
$this->set_key( $key );
|
35 |
$this->init();
|
36 |
$this->set_message( $message );
|
37 |
-
$this->actions =
|
38 |
$this->no_cta = false;
|
39 |
|
40 |
// Add hooks to display our admin notices in the dashbaord and on our settings page.
|
@@ -262,20 +262,13 @@ class SWP_Notice {
|
|
262 |
* @return $this Allows for method chaining.
|
263 |
*
|
264 |
*/
|
265 |
-
public function
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
endif;
|
273 |
-
|
274 |
-
$cta = array();
|
275 |
-
$cta['action'] = $action;
|
276 |
-
$cta['href'] = $href;
|
277 |
-
$cta['class'] = $class;
|
278 |
-
$cta['timeframe'] = $timeframe;
|
279 |
|
280 |
$this->actions[] = $cta;
|
281 |
|
@@ -296,8 +289,8 @@ class SWP_Notice {
|
|
296 |
*
|
297 |
*/
|
298 |
public function render_HTML() {
|
299 |
-
if ( empty( $this->actions) && false === $this->no_cta) :
|
300 |
-
$this->
|
301 |
endif;
|
302 |
|
303 |
$html = '<div class="swp-dismiss-notice notice notice-info " data-key="' . $this->key . '">';
|
@@ -305,7 +298,7 @@ class SWP_Notice {
|
|
305 |
$html .= '<div class="swp-actions">';
|
306 |
|
307 |
foreach( $this->actions as $cta) {
|
308 |
-
$html .= '<a class="swp-notice-cta ' . $cta['class'] . '" ' . $cta['href'] . ' data-timeframe="'
|
309 |
$html .= $cta['action'];
|
310 |
$html .= "</a>";
|
311 |
}
|
30 |
* @param string $message The message for this notice
|
31 |
*
|
32 |
*/
|
33 |
+
public function __construct( $key = "", $message = "", $ctas = array() ) {
|
34 |
$this->set_key( $key );
|
35 |
$this->init();
|
36 |
$this->set_message( $message );
|
37 |
+
$this->actions = $ctas;
|
38 |
$this->no_cta = false;
|
39 |
|
40 |
// Add hooks to display our admin notices in the dashbaord and on our settings page.
|
262 |
* @return $this Allows for method chaining.
|
263 |
*
|
264 |
*/
|
265 |
+
public function add_default_cta() {
|
266 |
+
$cta = array();
|
267 |
+
$cta['action'] = "Thanks, I understand.";
|
268 |
+
$cta['href'] = '';
|
269 |
+
$cta['target'] = '_self';
|
270 |
+
$cta['class'] = '';
|
271 |
+
$cta['timeframe'] = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
|
273 |
$this->actions[] = $cta;
|
274 |
|
289 |
*
|
290 |
*/
|
291 |
public function render_HTML() {
|
292 |
+
if ( empty( $this->actions ) && false === $this->no_cta) :
|
293 |
+
$this->add_default_cta();
|
294 |
endif;
|
295 |
|
296 |
$html = '<div class="swp-dismiss-notice notice notice-info " data-key="' . $this->key . '">';
|
298 |
$html .= '<div class="swp-actions">';
|
299 |
|
300 |
foreach( $this->actions as $cta) {
|
301 |
+
$html .= '<a class="swp-notice-cta ' . $cta['class'] . '" href="' . $cta['href'] . '" target="' . $cta['target'] . '" data-timeframe="' . $cta['timeframe'].'">';
|
302 |
$html .= $cta['action'];
|
303 |
$html .= "</a>";
|
304 |
}
|
@@ -54,53 +54,30 @@ class SWP_Notice_Loader {
|
|
54 |
return;
|
55 |
endif;
|
56 |
|
57 |
-
|
58 |
-
|
|
|
|
|
59 |
continue;
|
60 |
}
|
61 |
|
62 |
-
|
63 |
-
$message = $notice['message'];
|
64 |
-
|
65 |
-
$n = new SWP_Notice( $key, $message );
|
66 |
-
|
67 |
-
if ( !empty( $notice['ctas'] ) ) {
|
68 |
-
|
69 |
-
foreach( $notice['ctas'] as $cta) {
|
70 |
-
$fields = [
|
71 |
-
'action' => '',
|
72 |
-
'link' => '',
|
73 |
-
'class' => '',
|
74 |
-
'timeframe' => 0
|
75 |
-
];
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
foreach( $fields as $field => $default ) {
|
80 |
-
if ( isset( $cta[$field] ) ) {
|
81 |
-
$_cta[$field] = $cta[$field];
|
82 |
-
} else {
|
83 |
-
$_cta[$field] = $default;
|
84 |
-
}
|
85 |
-
}
|
86 |
-
|
87 |
-
$n->add_cta( $_cta['action'], $_cta['link'], $_cta['class'], $_cta['timeframe'] );
|
88 |
-
}
|
89 |
-
}
|
90 |
|
91 |
-
if ( isset( $
|
92 |
-
$n->set_start_date( $
|
93 |
}
|
94 |
|
95 |
-
if ( isset( $
|
96 |
-
$n->set_end_date( $
|
97 |
}
|
98 |
|
99 |
-
if ( isset( $
|
100 |
$n->remove_cta();
|
101 |
}
|
102 |
|
103 |
-
$this->notices[] = $
|
104 |
|
105 |
endforeach;
|
106 |
}
|
54 |
return;
|
55 |
endif;
|
56 |
|
57 |
+
$notices = array_merge($cache_data['notices'], apply_filters( 'swp_admin_notices', array() ) );
|
58 |
+
|
59 |
+
foreach( $notices as $data ) :
|
60 |
+
if ( empty( $data['key'] ) || empty( $data['message'] ) ) {
|
61 |
continue;
|
62 |
}
|
63 |
|
64 |
+
$ctas = !empty( $data['ctas'] ) ? $data['ctas'] : [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
|
66 |
+
$notice = new SWP_Notice( $data['key'], $data['message'], $ctas );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
+
if ( isset( $data['start_date'] ) ) {
|
69 |
+
$n->set_start_date( $data['start_date'] );
|
70 |
}
|
71 |
|
72 |
+
if ( isset( $data['end_date'] ) ) {
|
73 |
+
$n->set_end_date( $data['end_date'] );
|
74 |
}
|
75 |
|
76 |
+
if ( isset( $data['no_cta'] ) ) {
|
77 |
$n->remove_cta();
|
78 |
}
|
79 |
|
80 |
+
$this->notices[] = $notice;
|
81 |
|
82 |
endforeach;
|
83 |
}
|
@@ -1,17 +1,18 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Allows plugins to use their own update API.
|
5 |
*
|
6 |
-
*
|
7 |
-
*
|
8 |
-
* at periodic intervals in order to check for available updates. We
|
9 |
-
* host this class here in core so that it can be accessed via each
|
10 |
-
* installed premium addon to the plugin.
|
11 |
*
|
12 |
-
*
|
13 |
-
* @version 1.6.14
|
14 |
*
|
|
|
|
|
15 |
*/
|
16 |
class SWP_Plugin_Updater {
|
17 |
|
@@ -44,12 +45,23 @@ class SWP_Plugin_Updater {
|
|
44 |
$this->version = $_api_data['version'];
|
45 |
$this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
|
46 |
$this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
|
47 |
-
$this->cache_key = md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
|
|
|
48 |
|
49 |
$edd_plugin_data[ $this->slug ] = $this->api_data;
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
// Set up hooks.
|
52 |
$this->init();
|
|
|
53 |
|
54 |
}
|
55 |
|
@@ -92,18 +104,17 @@ class SWP_Plugin_Updater {
|
|
92 |
}
|
93 |
|
94 |
if ( 'plugins.php' == $pagenow && is_multisite() ) {
|
95 |
-
return $_transient_data;
|
96 |
}
|
97 |
|
98 |
if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) {
|
99 |
-
return $_transient_data;
|
100 |
}
|
101 |
|
102 |
$version_info = $this->get_cached_version_info();
|
103 |
|
104 |
if ( false === $version_info ) {
|
105 |
$version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
|
106 |
-
|
107 |
$this->set_version_info_cache( $version_info );
|
108 |
|
109 |
}
|
@@ -116,7 +127,7 @@ class SWP_Plugin_Updater {
|
|
116 |
|
117 |
}
|
118 |
|
119 |
-
$_transient_data->last_checked =
|
120 |
$_transient_data->checked[ $this->name ] = $this->version;
|
121 |
|
122 |
}
|
@@ -141,7 +152,7 @@ class SWP_Plugin_Updater {
|
|
141 |
}
|
142 |
|
143 |
if( ! is_multisite() ) {
|
144 |
-
return;
|
145 |
}
|
146 |
|
147 |
if ( $this->name != $file ) {
|
@@ -156,7 +167,6 @@ class SWP_Plugin_Updater {
|
|
156 |
$update_cache = is_object( $update_cache ) ? $update_cache : new stdClass();
|
157 |
|
158 |
if ( empty( $update_cache->response ) || empty( $update_cache->response[ $this->name ] ) ) {
|
159 |
-
|
160 |
$version_info = $this->get_cached_version_info();
|
161 |
|
162 |
if ( false === $version_info ) {
|
@@ -175,13 +185,12 @@ class SWP_Plugin_Updater {
|
|
175 |
|
176 |
}
|
177 |
|
178 |
-
$update_cache->last_checked =
|
179 |
$update_cache->checked[ $this->name ] = $this->version;
|
180 |
|
181 |
set_site_transient( 'update_plugins', $update_cache );
|
182 |
|
183 |
} else {
|
184 |
-
|
185 |
$version_info = $update_cache->response[ $this->name ];
|
186 |
|
187 |
}
|
@@ -190,37 +199,43 @@ class SWP_Plugin_Updater {
|
|
190 |
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
|
191 |
|
192 |
if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
$
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
|
225 |
echo '</div></td></tr>';
|
226 |
}
|
@@ -237,7 +252,6 @@ class SWP_Plugin_Updater {
|
|
237 |
* @return object $_data
|
238 |
*/
|
239 |
public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
|
240 |
-
|
241 |
if ( $_action != 'plugin_information' ) {
|
242 |
|
243 |
return $_data;
|
@@ -452,6 +466,8 @@ class SWP_Plugin_Updater {
|
|
452 |
}
|
453 |
|
454 |
public function get_cached_version_info( $cache_key = '' ) {
|
|
|
|
|
455 |
|
456 |
if( empty( $cache_key ) ) {
|
457 |
$cache_key = $this->cache_key;
|
@@ -459,7 +475,7 @@ class SWP_Plugin_Updater {
|
|
459 |
|
460 |
$cache = get_option( $cache_key );
|
461 |
|
462 |
-
if( empty( $cache['timeout'] ) ||
|
463 |
return false; // Cache is expired
|
464 |
}
|
465 |
|
@@ -474,11 +490,12 @@ class SWP_Plugin_Updater {
|
|
474 |
}
|
475 |
|
476 |
$data = array(
|
477 |
-
'timeout' => strtotime( '+3 hours',
|
478 |
'value' => json_encode( $value )
|
479 |
);
|
480 |
|
481 |
-
|
|
|
482 |
|
483 |
}
|
484 |
|
@@ -492,4 +509,14 @@ class SWP_Plugin_Updater {
|
|
492 |
return (bool) apply_filters( 'edd_sl_api_request_verify_ssl', true, $this );
|
493 |
}
|
494 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
495 |
}
|
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 |
+
* Class renamed from EDD_SL_Product_Updater to SWP_Plugin_Updater to ensure
|
10 |
+
* we are working with the expected version of the class.
|
|
|
|
|
|
|
11 |
*
|
12 |
+
* No other modifications were made. Provided by Easy Digital Downloads.
|
|
|
13 |
*
|
14 |
+
* @author Easy Digital Downloads
|
15 |
+
* @version 1.6.16
|
16 |
*/
|
17 |
class SWP_Plugin_Updater {
|
18 |
|
45 |
$this->version = $_api_data['version'];
|
46 |
$this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
|
47 |
$this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
|
48 |
+
$this->cache_key = 'edd_sl_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
|
49 |
+
delete_option($this->cache_key);
|
50 |
|
51 |
$edd_plugin_data[ $this->slug ] = $this->api_data;
|
52 |
|
53 |
+
/**
|
54 |
+
* Fires after the $edd_plugin_data is setup.
|
55 |
+
*
|
56 |
+
* @since x.x.x
|
57 |
+
*
|
58 |
+
* @param array $edd_plugin_data Array of EDD SL plugin data.
|
59 |
+
*/
|
60 |
+
do_action( 'post_edd_sl_plugin_updater_setup', $edd_plugin_data );
|
61 |
+
|
62 |
// Set up hooks.
|
63 |
$this->init();
|
64 |
+
$this->debug();
|
65 |
|
66 |
}
|
67 |
|
104 |
}
|
105 |
|
106 |
if ( 'plugins.php' == $pagenow && is_multisite() ) {
|
107 |
+
//* SWP return $_transient_data;
|
108 |
}
|
109 |
|
110 |
if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) {
|
111 |
+
//* SWP return $_transient_data;
|
112 |
}
|
113 |
|
114 |
$version_info = $this->get_cached_version_info();
|
115 |
|
116 |
if ( false === $version_info ) {
|
117 |
$version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
|
|
|
118 |
$this->set_version_info_cache( $version_info );
|
119 |
|
120 |
}
|
127 |
|
128 |
}
|
129 |
|
130 |
+
$_transient_data->last_checked = time();
|
131 |
$_transient_data->checked[ $this->name ] = $this->version;
|
132 |
|
133 |
}
|
152 |
}
|
153 |
|
154 |
if( ! is_multisite() ) {
|
155 |
+
//* return;
|
156 |
}
|
157 |
|
158 |
if ( $this->name != $file ) {
|
167 |
$update_cache = is_object( $update_cache ) ? $update_cache : new stdClass();
|
168 |
|
169 |
if ( empty( $update_cache->response ) || empty( $update_cache->response[ $this->name ] ) ) {
|
|
|
170 |
$version_info = $this->get_cached_version_info();
|
171 |
|
172 |
if ( false === $version_info ) {
|
185 |
|
186 |
}
|
187 |
|
188 |
+
$update_cache->last_checked = time();
|
189 |
$update_cache->checked[ $this->name ] = $this->version;
|
190 |
|
191 |
set_site_transient( 'update_plugins', $update_cache );
|
192 |
|
193 |
} else {
|
|
|
194 |
$version_info = $update_cache->response[ $this->name ];
|
195 |
|
196 |
}
|
199 |
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
|
200 |
|
201 |
if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
202 |
+
/** Note by Social Warfare Plugins:
|
203 |
+
*
|
204 |
+
* This adds EDD's version of the update notification.
|
205 |
+
* It is not the same style as WP's, and we don't want it.
|
206 |
+
*
|
207 |
+
*/
|
208 |
+
|
209 |
+
// // build a plugin list row, with update notification
|
210 |
+
// $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
|
211 |
+
// # <tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">
|
212 |
+
// echo '<tr class="plugin-update-tr" id="' . $this->slug . '-update" data-slug="' . $this->slug . '" data-plugin="' . $this->slug . '/' . $file . '">';
|
213 |
+
// echo '<td colspan="3" class="plugin-update colspanchange">';
|
214 |
+
// echo '<div class="update-message notice inline notice-warning notice-alt">';
|
215 |
+
//
|
216 |
+
// $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' );
|
217 |
+
//
|
218 |
+
// if ( empty( $version_info->download_link ) ) {
|
219 |
+
// printf(
|
220 |
+
// __( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s.', 'easy-digital-downloads' ),
|
221 |
+
// esc_html( $version_info->name ),
|
222 |
+
// '<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
|
223 |
+
// esc_html( $version_info->new_version ),
|
224 |
+
// '</a>'
|
225 |
+
// );
|
226 |
+
// } else {
|
227 |
+
// printf(
|
228 |
+
// __( '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' ),
|
229 |
+
// esc_html( $version_info->name ),
|
230 |
+
// '<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
|
231 |
+
// esc_html( $version_info->new_version ),
|
232 |
+
// '</a>',
|
233 |
+
// '<a href="' . esc_url( wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $this->name, 'upgrade-plugin_' . $this->name ) ) .'">',
|
234 |
+
// '</a>'
|
235 |
+
// );
|
236 |
+
// }
|
237 |
+
//
|
238 |
+
// do_action( "in_plugin_update_message-{$file}", $plugin, $version_info );
|
239 |
|
240 |
echo '</div></td></tr>';
|
241 |
}
|
252 |
* @return object $_data
|
253 |
*/
|
254 |
public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
|
|
|
255 |
if ( $_action != 'plugin_information' ) {
|
256 |
|
257 |
return $_data;
|
466 |
}
|
467 |
|
468 |
public function get_cached_version_info( $cache_key = '' ) {
|
469 |
+
//* SWP Force return false
|
470 |
+
return false;
|
471 |
|
472 |
if( empty( $cache_key ) ) {
|
473 |
$cache_key = $this->cache_key;
|
475 |
|
476 |
$cache = get_option( $cache_key );
|
477 |
|
478 |
+
if( empty( $cache['timeout'] ) || time() > $cache['timeout'] ) {
|
479 |
return false; // Cache is expired
|
480 |
}
|
481 |
|
490 |
}
|
491 |
|
492 |
$data = array(
|
493 |
+
'timeout' => strtotime( '+3 hours', time() ),
|
494 |
'value' => json_encode( $value )
|
495 |
);
|
496 |
|
497 |
+
//* SWP Do not store cache data.
|
498 |
+
// update_option( $cache_key, $data, 'no' );
|
499 |
|
500 |
}
|
501 |
|
509 |
return (bool) apply_filters( 'edd_sl_api_request_verify_ssl', true, $this );
|
510 |
}
|
511 |
|
512 |
+
private function debug() {
|
513 |
+
if ( true === _swp_is_debug( 'remove_plugin_transient' ) ) :
|
514 |
+
add_filter('site_transient_update_plugins', function($transient_data) {
|
515 |
+
unset($transient_data->response['social-warfare-pro/social-warfare-pro.php']);
|
516 |
+
unset($transient_data->response['social-warfare-affiliatewp/social-warfare-affiliatewp.php']);
|
517 |
+
return $transient_data;
|
518 |
+
}, 1);
|
519 |
+
endif;
|
520 |
+
}
|
521 |
+
|
522 |
}
|
@@ -104,6 +104,21 @@ class SWP_Post_Cache {
|
|
104 |
}
|
105 |
|
106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
/**
|
108 |
* SECTION #2: CHECKING IF THE CACHE IS FRESH
|
109 |
*
|
@@ -279,27 +294,68 @@ class SWP_Post_Cache {
|
|
279 |
* @return void
|
280 |
*
|
281 |
*/
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
|
|
|
|
|
|
|
|
292 |
|
293 |
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
endif;
|
301 |
endforeach;
|
302 |
-
|
303 |
|
304 |
|
305 |
/**
|
@@ -429,7 +485,6 @@ class SWP_Post_Cache {
|
|
429 |
$this->fetch_api_responses();
|
430 |
$this->parse_api_responses();
|
431 |
$this->calculate_network_shares();
|
432 |
-
$this->calculate_network_shares();
|
433 |
$this->cache_share_counts();
|
434 |
}
|
435 |
|
@@ -463,7 +518,7 @@ class SWP_Post_Cache {
|
|
463 |
|
464 |
$this->permalinks[$key][] = get_permalink( $this->id );
|
465 |
|
466 |
-
if( true === $swp_user_options['recover_shares'] ) :
|
467 |
$this->permalinks[$key][] = SWP_Permalink::get_alt_permalink( $this->id );
|
468 |
endif;
|
469 |
|
@@ -534,6 +589,11 @@ class SWP_Post_Cache {
|
|
534 |
*/
|
535 |
private function parse_api_responses() {
|
536 |
global $swp_social_networks;
|
|
|
|
|
|
|
|
|
|
|
537 |
$this->parsed_api_responses = array();
|
538 |
|
539 |
foreach( $this->raw_api_responses as $request => $responses ) {
|
@@ -563,23 +623,38 @@ class SWP_Post_Cache {
|
|
563 |
*
|
564 |
*/
|
565 |
private function calculate_network_shares() {
|
566 |
-
global $swp_social_networks;
|
567 |
|
568 |
$share_counts = array();
|
569 |
|
|
|
|
|
570 |
foreach ( $this->parsed_api_responses as $request => $networks ) {
|
571 |
-
foreach ( $networks as $
|
572 |
foreach ( $count_array as $count ) {
|
573 |
-
if ( !isset( $share_counts[$
|
574 |
-
$share_counts[$
|
575 |
}
|
576 |
|
577 |
-
$share_counts[$
|
578 |
}
|
579 |
-
|
580 |
}
|
581 |
}
|
582 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
583 |
$this->share_counts = $share_counts;
|
584 |
}
|
585 |
|
@@ -601,6 +676,10 @@ class SWP_Post_Cache {
|
|
601 |
private function cache_share_counts() {
|
602 |
$this->share_counts['total_shares'] = 0;
|
603 |
|
|
|
|
|
|
|
|
|
604 |
foreach( $this->share_counts as $key => $count ) {
|
605 |
if ( 'total_shares' === $key ) {
|
606 |
continue;
|
@@ -616,10 +695,11 @@ class SWP_Post_Cache {
|
|
616 |
// the old ones unless the url parameter is forcing it to take.
|
617 |
if ( $count <= $previous_count && false === _swp_is_debug( 'force_new_shares' ) ) {
|
618 |
$this->share_counts[$key] = $previous_count;
|
|
|
|
|
|
|
619 |
}
|
620 |
|
621 |
-
$this->share_counts['total_shares'] += $this->share_counts[$key];
|
622 |
-
|
623 |
delete_post_meta( $this->id, "_${key}_shares");
|
624 |
update_post_meta( $this->id, "_${key}_shares", $this->share_counts[$key] );
|
625 |
}
|
104 |
}
|
105 |
|
106 |
|
107 |
+
/**
|
108 |
+
* A method for outputting debug notices when cache rebuild parameters are present.
|
109 |
+
*
|
110 |
+
* @since 3.2.0 | 31 JUL 2018 | Created
|
111 |
+
* @param string $string The message to be displayed.
|
112 |
+
* @return void
|
113 |
+
*
|
114 |
+
*/
|
115 |
+
private function debug_message( $string ) {
|
116 |
+
if( isset( $_GET['swp_cache'] ) && 'rebuild' === $_GET['swp_cache'] ) {
|
117 |
+
echo $string;
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
|
122 |
/**
|
123 |
* SECTION #2: CHECKING IF THE CACHE IS FRESH
|
124 |
*
|
294 |
* @return void
|
295 |
*
|
296 |
*/
|
297 |
+
public function rebuild_cached_data() {
|
298 |
+
|
299 |
+
if( true === $this->should_shares_be_fetched() ):
|
300 |
+
$this->rebuild_share_counts();
|
301 |
+
endif;
|
302 |
+
|
303 |
+
$this->rebuild_pinterest_image();
|
304 |
+
$this->rebuild_open_graph_image();
|
305 |
+
$this->process_urls();
|
306 |
+
$this->reset_timestamp();
|
307 |
+
|
308 |
+
// A hook to allow third-party functions to run.
|
309 |
+
do_action( 'swp_cache_rebuild', $this->id );
|
310 |
+
}
|
311 |
|
312 |
|
313 |
+
/**
|
314 |
+
* Should we fetch share counts for this post?
|
315 |
+
*
|
316 |
+
* This method controls which instances we should be fetching share counts
|
317 |
+
* and which instances whe shouldn't.
|
318 |
+
*
|
319 |
+
* @since 3.2.0 | 24 JUL 2018 | Created
|
320 |
+
* @param void
|
321 |
+
* @return bool True: fetch share counts; False: don't fetch counts.
|
322 |
+
*
|
323 |
+
*/
|
324 |
+
private function should_shares_be_fetched() {
|
325 |
+
|
326 |
+
// Don't fetch if all share counts are disabled.
|
327 |
+
if( false == swp_get_option( 'network_shares' ) && false == swp_get_option( 'total_shares' ) ) {
|
328 |
+
$this->debug_message( 'No Shares Fetched. Share counts are disabled in the settings.' );
|
329 |
+
return false;
|
330 |
+
}
|
331 |
+
|
332 |
+
// Only fetch on published posts
|
333 |
+
if( 'publish' !== get_post_status( $this->id ) ) {
|
334 |
+
$this->debug_message( 'No Shares Fetched. This post is not yet published.' );
|
335 |
+
return false;
|
336 |
+
}
|
337 |
+
|
338 |
+
return true;
|
339 |
+
}
|
340 |
+
|
341 |
+
|
342 |
+
/**
|
343 |
+
* Process the URLs for shortlinks, UTM, etc.
|
344 |
+
*
|
345 |
+
* @since 3.1.0 | 20 JUN 2018 | Created
|
346 |
+
* @param void
|
347 |
+
* @return void
|
348 |
+
*
|
349 |
+
*/
|
350 |
+
public function process_urls() {
|
351 |
+
global $swp_social_networks;
|
352 |
+
$permalink = get_permalink( $this->id );
|
353 |
+
foreach( $swp_social_networks as $network ):
|
354 |
+
if( $network->is_active() ):
|
355 |
+
SWP_URL_Management::process_url( $permalink, $network->key, $this->id, false );
|
356 |
endif;
|
357 |
endforeach;
|
358 |
+
}
|
359 |
|
360 |
|
361 |
/**
|
485 |
$this->fetch_api_responses();
|
486 |
$this->parse_api_responses();
|
487 |
$this->calculate_network_shares();
|
|
|
488 |
$this->cache_share_counts();
|
489 |
}
|
490 |
|
518 |
|
519 |
$this->permalinks[$key][] = get_permalink( $this->id );
|
520 |
|
521 |
+
if( isset( $swp_user_options['recover_shares'] ) && true === $swp_user_options['recover_shares'] ) :
|
522 |
$this->permalinks[$key][] = SWP_Permalink::get_alt_permalink( $this->id );
|
523 |
endif;
|
524 |
|
589 |
*/
|
590 |
private function parse_api_responses() {
|
591 |
global $swp_social_networks;
|
592 |
+
|
593 |
+
if ( empty( $this->raw_api_responses ) ) :
|
594 |
+
return;
|
595 |
+
endif;
|
596 |
+
|
597 |
$this->parsed_api_responses = array();
|
598 |
|
599 |
foreach( $this->raw_api_responses as $request => $responses ) {
|
623 |
*
|
624 |
*/
|
625 |
private function calculate_network_shares() {
|
626 |
+
global $swp_social_networks, $swp_user_options;
|
627 |
|
628 |
$share_counts = array();
|
629 |
|
630 |
+
$checked_networks = array();
|
631 |
+
|
632 |
foreach ( $this->parsed_api_responses as $request => $networks ) {
|
633 |
+
foreach ( $networks as $network => $count_array ) {
|
634 |
foreach ( $count_array as $count ) {
|
635 |
+
if ( !isset( $share_counts[$network] ) ) {
|
636 |
+
$share_counts[$network] = 0;
|
637 |
}
|
638 |
|
639 |
+
$share_counts[$network] += $count;
|
640 |
}
|
641 |
+
$checked_networks[] = $network;
|
642 |
}
|
643 |
}
|
644 |
|
645 |
+
if ( isset( $swp_user_options['order_of_icons'] ) ) :
|
646 |
+
|
647 |
+
//* For defunct network shares (e.g. Google Plus, LinkedIn, StumbleUpon)
|
648 |
+
foreach( $swp_user_options['order_of_icons'] as $network ) {
|
649 |
+
if ( !in_array( $network, $checked_networks ) ) :
|
650 |
+
$count = get_post_meta( $this->id, "_${network}_shares", true );
|
651 |
+
$count = isset($count) ? $count : 0;
|
652 |
+
$share_counts[$network] = $count;
|
653 |
+
endif;
|
654 |
+
}
|
655 |
+
|
656 |
+
endif;
|
657 |
+
|
658 |
$this->share_counts = $share_counts;
|
659 |
}
|
660 |
|
676 |
private function cache_share_counts() {
|
677 |
$this->share_counts['total_shares'] = 0;
|
678 |
|
679 |
+
if ( empty( $this->share_counts ) ) :
|
680 |
+
return;
|
681 |
+
endif;
|
682 |
+
|
683 |
foreach( $this->share_counts as $key => $count ) {
|
684 |
if ( 'total_shares' === $key ) {
|
685 |
continue;
|
695 |
// the old ones unless the url parameter is forcing it to take.
|
696 |
if ( $count <= $previous_count && false === _swp_is_debug( 'force_new_shares' ) ) {
|
697 |
$this->share_counts[$key] = $previous_count;
|
698 |
+
$this->share_counts['total_shares'] += $previous_count;
|
699 |
+
} else {
|
700 |
+
$this->share_counts['total_shares'] += $count;
|
701 |
}
|
702 |
|
|
|
|
|
703 |
delete_post_meta( $this->id, "_${key}_shares");
|
704 |
update_post_meta( $this->id, "_${key}_shares", $this->share_counts[$key] );
|
705 |
}
|
Binary file
|
@@ -1,353 +1,356 @@
|
|
1 |
-
/**
|
2 |
-
*
|
3 |
-
* Functions for widgets and global utility functions.
|
4 |
-
*
|
5 |
-
* @since 1.0.0
|
6 |
-
* @package SocialWarfare\Admin\Functions
|
7 |
-
* @copyright Copyright (c) 2018, Warfare Plugins, LLC
|
8 |
-
* @license GPL-3.0+
|
9 |
-
*/
|
10 |
-
|
11 |
-
var socialWarfareAdmin = socialWarfareAdmin || {};
|
12 |
-
var swpWidget, widgetSubmit;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Show and hide input fields based on conditional values.
|
16 |
-
*
|
17 |
-
* This function iterates over each element with the "dep" data attribute. For each
|
18 |
-
* such dependant element, its parent element controls whether the dependant is shown or hidden
|
19 |
-
* if the parent's value matches the condition.
|
20 |
-
*
|
21 |
-
* @since 3.0.0 Feb 12 2018 | Brought func in from admin-options-page.js and set to global scope; Updated variable names for semantics, switched to Yoda condietionals.
|
22 |
-
* @since 3.0.0 Feb 14 2018 | Mapped the required array from variable types to string.
|
23 |
-
*
|
24 |
-
* @see admin-options-page.js
|
25 |
-
* @return none
|
26 |
-
*/
|
27 |
-
function swpConditionalFields() {
|
28 |
-
|
29 |
-
function swp_selected(name) {
|
30 |
-
return jQuery('select[name="' + name + '"]').val();
|
31 |
-
}
|
32 |
-
|
33 |
-
function swp_checked(name) {
|
34 |
-
return jQuery( '[name="' + name + '"]' ).prop( 'checked' );
|
35 |
-
}
|
36 |
-
|
37 |
-
function string_to_bool(string) {
|
38 |
-
if( string === 'true') { string = true };
|
39 |
-
if( string === 'false') { string = false };
|
40 |
-
return string;
|
41 |
-
}
|
42 |
-
|
43 |
-
// Loop through all the fields that have dependancies
|
44 |
-
jQuery( '[data-dep]' ).each( function() {
|
45 |
-
|
46 |
-
// Fetch the conditional values
|
47 |
-
var condition = jQuery(this).data( 'dep' );
|
48 |
-
var required = JSON.parse( JSON.stringify( jQuery(this).data( 'dep_val' ) ) );
|
49 |
-
|
50 |
-
// Check if we're on the options page or somewhere else
|
51 |
-
if (window.location.href.indexOf("page=social-warfare") === -1) {
|
52 |
-
var conditionEl = jQuery(this).parents('.widgets-holder-wrap').find( '[data-swp-name="' + condition + '"]' );
|
53 |
-
} else {
|
54 |
-
var conditionEl = jQuery( '[name="' + condition + '"]' )[0];
|
55 |
-
}
|
56 |
-
|
57 |
-
var value;
|
58 |
-
|
59 |
-
if (typeof conditionEl === 'undefined') {
|
60 |
-
conditionEl = jQuery( '[name="' + condition + '"]' )[0];
|
61 |
-
|
62 |
-
if (typeof conditionEl === 'undefined') {
|
63 |
-
conditionEl = jQuery( '[fieldjQuery=' + condition + ']' )[0];
|
64 |
-
}
|
65 |
-
}
|
66 |
-
|
67 |
-
// Fetch the value of checkboxes or other input types
|
68 |
-
if ( jQuery( conditionEl ).attr( 'type' ) == 'checkbox' ) {
|
69 |
-
value = jQuery( conditionEl ).prop( 'checked' );
|
70 |
-
} else {
|
71 |
-
value = jQuery( conditionEl ).val();
|
72 |
-
}
|
73 |
-
value = string_to_bool(value);
|
74 |
-
|
75 |
-
//* Options page uses parent visibilty to check. Widget page does not. This could definiitely look better.
|
76 |
-
// Show or hide based on the conditional values (and the dependancy must be visible in case it is dependant)
|
77 |
-
|
78 |
-
if (window.location.href.indexOf("page=social-warfare") !== -1) {
|
79 |
-
|
80 |
-
// If the required value matches and it's parent is also being shown, show this conditional field
|
81 |
-
if (jQuery.inArray( value, required ) !== -1 && jQuery( conditionEl ).parent( '.sw-grid' ).is( ':visible' ) ) {
|
82 |
-
jQuery(this).show();
|
83 |
-
} else {
|
84 |
-
jQuery(this).hide();
|
85 |
-
}
|
86 |
-
} else {
|
87 |
-
|
88 |
-
// If the required value matches, show this conditional field
|
89 |
-
if (jQuery.inArray( value, required ) !== -1 || value === required ) {
|
90 |
-
jQuery(this).show();
|
91 |
-
} else {
|
92 |
-
jQuery(this).hide();
|
93 |
-
}
|
94 |
-
}
|
95 |
-
});
|
96 |
-
|
97 |
-
if ( false === swp_checked('float_style_source') &&
|
98 |
-
'custom_color' === swp_selected('float_default_colors')
|
99 |
-
|| 'custom_color_outlines' === swp_selected('float_default_colors')
|
100 |
-
|| 'custom_color' === swp_selected('float_single_colors')
|
101 |
-
|| 'custom_color_outlines' === swp_selected('float_single_colors')
|
102 |
-
|| 'custom_color' === swp_selected('float_hover_colors')
|
103 |
-
|| 'custom_color_outlines' === swp_selected('float_hover_colors') ) {
|
104 |
-
jQuery( '.sideCustomColor_wrapper' ).slideDown();
|
105 |
-
|
106 |
-
} else {
|
107 |
-
jQuery( '.sideCustomColor_wrapper' ).slideUp();
|
108 |
-
}
|
109 |
-
}
|
110 |
-
|
111 |
-
//* Only run on widgets.php
|
112 |
-
if (window.location.href.indexOf("widgets.php") > -1 ) {
|
113 |
-
|
114 |
-
//* Make sure the elements exist before trying to read them.
|
115 |
-
var widgetFinder = setInterval(function() {
|
116 |
-
if (typeof swpWidget !== 'undefined') clearInterval(widgetFinder);
|
117 |
-
|
118 |
-
swpWidget = jQuery("#widgets-right [id*=_swp_popular_posts_widget], [id*=_swp_popular_posts_widget].open")[0];
|
119 |
-
widgetSubmit = jQuery(swpWidget).find("[idjQuery=savewidget]")[0];
|
120 |
-
|
121 |
-
//* Force swpConditionalFields to run when the widget is opened or saved.
|
122 |
-
jQuery(swpWidget).on("click", swpConditionalFields);
|
123 |
-
jQuery(widgetSubmit).on("click", function() {
|
124 |
-
setTimeout(swpConditionalFields, 600);
|
125 |
-
});
|
126 |
-
|
127 |
-
}, 50);
|
128 |
-
}
|
129 |
-
|
130 |
-
(function( window, jQuery, undefined ) {
|
131 |
-
'use strict';
|
132 |
-
|
133 |
-
socialWarfareAdmin.linkLength = function( input ) {
|
134 |
-
var tmp = '';
|
135 |
-
|
136 |
-
for ( var i = 0; i < 23; i++ ) {
|
137 |
-
tmp += 'o';
|
138 |
-
}
|
139 |
-
|
140 |
-
return input.replace( /(http:\/\/[\S]*)/g, tmp ).length;
|
141 |
-
};
|
142 |
-
|
143 |
-
// Function for SM Title Counting
|
144 |
-
function smTitleRemaining() {
|
145 |
-
var smTitle = jQuery( '#social_warfare textarea#swp_og_title' ).val();
|
146 |
-
var remaining = 60 - smTitle.length;
|
147 |
-
if ( smTitle.length > 0 && remaining >= 0 ) {
|
148 |
-
jQuery( '#social_warfare .swp_og_title .swp_CountDown' ).removeClass( 'swp_red' ).addClass( 'swp_blue' );
|
149 |
-
} else if ( smTitle.length > 0 && remaining < 0 ) {
|
150 |
-
jQuery( '#social_warfare .swp_og_title .swp_CountDown' ).removeClass( 'swp_blue' ).addClass( 'swp_red' );
|
151 |
-
} else {
|
152 |
-
jQuery( '#social_warfare .swp_og_title .swp_CountDown' ).removeClass( 'swp_blue' ).removeClass( 'swp_red' );
|
153 |
-
}
|
154 |
-
jQuery( '#social_warfare .swp_og_title .counterNumber' ).html( remaining );
|
155 |
-
}
|
156 |
-
|
157 |
-
// Function for SM Description Counting
|
158 |
-
function smDescriptionRemaining() {
|
159 |
-
var smDescription = jQuery( '#social_warfare textarea#swp_og_description' ).val();
|
160 |
-
var remaining = 160 - smDescription.length;
|
161 |
-
if ( smDescription.length > 0 && remaining >= 0 ) {
|
162 |
-
jQuery( '#social_warfare .swp_og_description .swp_CountDown' ).removeClass( 'swp_red' ).addClass( 'swp_blue' );
|
163 |
-
} else if ( smDescription.length > 0 && remaining < 0 ) {
|
164 |
-
jQuery( '#social_warfare .swp_og_description .swp_CountDown' ).removeClass( 'swp_blue' ).addClass( 'swp_red' );
|
165 |
-
} else {
|
166 |
-
jQuery( '#social_warfare .swp_og_description .swp_CountDown' ).removeClass( 'swp_blue' ).removeClass( 'swp_red' );
|
167 |
-
}
|
168 |
-
jQuery( '#social_warfare .swp_og_description .counterNumber' ).html( remaining );
|
169 |
-
}
|
170 |
-
|
171 |
-
// Function for SM Description Counting
|
172 |
-
function swpPinterestRemaining() {
|
173 |
-
var pinterestDescription = jQuery( '#social_warfare textarea#swp_pinterest_description' ).val();
|
174 |
-
if (!pinterestDescription) {
|
175 |
-
pinterestDescription = '';
|
176 |
-
}
|
177 |
-
var remaining = 500 - pinterestDescription.length;
|
178 |
-
if ( pinterestDescription.length > 0 && remaining >= 0 ) {
|
179 |
-
jQuery( '#social_warfare .swp_pinterest_descriptionWrapper .swp_CountDown' ).removeClass( 'swp_red' ).addClass( 'swp_blue' );
|
180 |
-
} else if ( pinterestDescription.length > 0 && remaining < 0 ) {
|
181 |
-
jQuery( '#social_warfare .swp_pinterest_descriptionWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).addClass( 'swp_red' );
|
182 |
-
} else {
|
183 |
-
jQuery( '#social_warfare .swp_pinterest_descriptionWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).removeClass( 'swp_red' );
|
184 |
-
}
|
185 |
-
jQuery( '#social_warfare .swp_pinterest_descriptionWrapper .counterNumber' ).html( remaining );
|
186 |
-
}
|
187 |
-
|
188 |
-
// Function for Twitter Box Counting
|
189 |
-
function twitterRemaining() {
|
190 |
-
var smTwitter = jQuery( '#social_warfare textarea#swp_custom_tweet' ).val();
|
191 |
-
var handle = jQuery( '#social_warfare .twitterIDWrapper label' ).html();
|
192 |
-
var linkSpace;
|
193 |
-
|
194 |
-
if ( smTwitter.indexOf( 'http' ) > -1 || smTwitter.indexOf( 'https' ) > -1 ) {
|
195 |
-
linkSpace = 0;
|
196 |
-
jQuery( '.tweetLinkSection' ).css({ 'text-decoration': 'line-through' });
|
197 |
-
} else {
|
198 |
-
linkSpace = 23;
|
199 |
-
jQuery( '.tweetLinkSection' ).css({ 'text-decoration': 'none' });
|
200 |
-
}
|
201 |
-
|
202 |
-
var remaining;
|
203 |
-
if ( 'undefined' === typeof handle ) {
|
204 |
-
remaining = 280 - socialWarfareAdmin.linkLength( smTwitter ) - linkSpace;
|
205 |
-
} else {
|
206 |
-
remaining = 280 - socialWarfareAdmin.linkLength( smTwitter ) - linkSpace - handle.length - 6;
|
207 |
-
}
|
208 |
-
|
209 |
-
if ( smTwitter.length > 0 && remaining >= 0 ) {
|
210 |
-
jQuery( '#social_warfare .swp_customTweetWrapper .swp_CountDown' ).removeClass( 'swp_red' ).addClass( 'swp_blue' );
|
211 |
-
} else if ( smTwitter.length > 0 && remaining < 0 ) {
|
212 |
-
jQuery( '#social_warfare .swp_customTweetWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).addClass( 'swp_red' );
|
213 |
-
} else {
|
214 |
-
jQuery( '#social_warfare .swp_customTweetWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).removeClass( 'swp_red' );
|
215 |
-
}
|
216 |
-
|
217 |
-
jQuery( '#social_warfare .swp_customTweetWrapper .counterNumber' ).html( remaining );
|
218 |
-
}
|
219 |
-
|
220 |
-
function toggleCustomThumbnailFields(show) {
|
221 |
-
if (typeof show === 'undefined') show = true;
|
222 |
-
|
223 |
-
if (show) {
|
224 |
-
jQuery(".custom_thumb_size").show();
|
225 |
-
}
|
226 |
-
else {
|
227 |
-
jQuery(".custom_thumb_size").hide();
|
228 |
-
}
|
229 |
-
}
|
230 |
-
|
231 |
-
function noticeClickHandlers() {
|
232 |
-
jQuery(".swp-notice-cta").on("click", function(e) {
|
233 |
-
e.preventDefault();
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
// Add the CountDown Box for the Social Media
|
266 |
-
jQuery( '#social_warfare #
|
267 |
-
|
268 |
-
// Add the CountDown Box for the
|
269 |
-
jQuery( '#social_warfare #
|
270 |
-
|
271 |
-
|
272 |
-
jQuery( '#social_warfare #
|
273 |
-
|
274 |
-
|
275 |
-
jQuery( '#social_warfare
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
var
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
smHeight =
|
310 |
-
swpOgImage.css({ height: smHeight + 'px' });
|
311 |
-
}
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
pinHeight =
|
322 |
-
swpPinImage.css({
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
})
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
*
|
3 |
+
* Functions for widgets and global utility functions.
|
4 |
+
*
|
5 |
+
* @since 1.0.0
|
6 |
+
* @package SocialWarfare\Admin\Functions
|
7 |
+
* @copyright Copyright (c) 2018, Warfare Plugins, LLC
|
8 |
+
* @license GPL-3.0+
|
9 |
+
*/
|
10 |
+
|
11 |
+
var socialWarfareAdmin = socialWarfareAdmin || {};
|
12 |
+
var swpWidget, widgetSubmit;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Show and hide input fields based on conditional values.
|
16 |
+
*
|
17 |
+
* This function iterates over each element with the "dep" data attribute. For each
|
18 |
+
* such dependant element, its parent element controls whether the dependant is shown or hidden
|
19 |
+
* if the parent's value matches the condition.
|
20 |
+
*
|
21 |
+
* @since 3.0.0 Feb 12 2018 | Brought func in from admin-options-page.js and set to global scope; Updated variable names for semantics, switched to Yoda condietionals.
|
22 |
+
* @since 3.0.0 Feb 14 2018 | Mapped the required array from variable types to string.
|
23 |
+
*
|
24 |
+
* @see admin-options-page.js
|
25 |
+
* @return none
|
26 |
+
*/
|
27 |
+
function swpConditionalFields() {
|
28 |
+
|
29 |
+
function swp_selected(name) {
|
30 |
+
return jQuery('select[name="' + name + '"]').val();
|
31 |
+
}
|
32 |
+
|
33 |
+
function swp_checked(name) {
|
34 |
+
return jQuery( '[name="' + name + '"]' ).prop( 'checked' );
|
35 |
+
}
|
36 |
+
|
37 |
+
function string_to_bool(string) {
|
38 |
+
if( string === 'true') { string = true };
|
39 |
+
if( string === 'false') { string = false };
|
40 |
+
return string;
|
41 |
+
}
|
42 |
+
|
43 |
+
// Loop through all the fields that have dependancies
|
44 |
+
jQuery( '[data-dep]' ).each( function() {
|
45 |
+
|
46 |
+
// Fetch the conditional values
|
47 |
+
var condition = jQuery(this).data( 'dep' );
|
48 |
+
var required = JSON.parse( JSON.stringify( jQuery(this).data( 'dep_val' ) ) );
|
49 |
+
|
50 |
+
// Check if we're on the options page or somewhere else
|
51 |
+
if (window.location.href.indexOf("page=social-warfare") === -1) {
|
52 |
+
var conditionEl = jQuery(this).parents('.widgets-holder-wrap').find( '[data-swp-name="' + condition + '"]' );
|
53 |
+
} else {
|
54 |
+
var conditionEl = jQuery( '[name="' + condition + '"]' )[0];
|
55 |
+
}
|
56 |
+
|
57 |
+
var value;
|
58 |
+
|
59 |
+
if (typeof conditionEl === 'undefined') {
|
60 |
+
conditionEl = jQuery( '[name="' + condition + '"]' )[0];
|
61 |
+
|
62 |
+
if (typeof conditionEl === 'undefined') {
|
63 |
+
conditionEl = jQuery( '[fieldjQuery=' + condition + ']' )[0];
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
// Fetch the value of checkboxes or other input types
|
68 |
+
if ( jQuery( conditionEl ).attr( 'type' ) == 'checkbox' ) {
|
69 |
+
value = jQuery( conditionEl ).prop( 'checked' );
|
70 |
+
} else {
|
71 |
+
value = jQuery( conditionEl ).val();
|
72 |
+
}
|
73 |
+
value = string_to_bool(value);
|
74 |
+
|
75 |
+
//* Options page uses parent visibilty to check. Widget page does not. This could definiitely look better.
|
76 |
+
// Show or hide based on the conditional values (and the dependancy must be visible in case it is dependant)
|
77 |
+
|
78 |
+
if (window.location.href.indexOf("page=social-warfare") !== -1) {
|
79 |
+
|
80 |
+
// If the required value matches and it's parent is also being shown, show this conditional field
|
81 |
+
if (jQuery.inArray( value, required ) !== -1 && jQuery( conditionEl ).parent( '.sw-grid' ).is( ':visible' ) ) {
|
82 |
+
jQuery(this).show();
|
83 |
+
} else {
|
84 |
+
jQuery(this).hide();
|
85 |
+
}
|
86 |
+
} else {
|
87 |
+
|
88 |
+
// If the required value matches, show this conditional field
|
89 |
+
if (jQuery.inArray( value, required ) !== -1 || value === required ) {
|
90 |
+
jQuery(this).show();
|
91 |
+
} else {
|
92 |
+
jQuery(this).hide();
|
93 |
+
}
|
94 |
+
}
|
95 |
+
});
|
96 |
+
|
97 |
+
if ( false === swp_checked('float_style_source') &&
|
98 |
+
'custom_color' === swp_selected('float_default_colors')
|
99 |
+
|| 'custom_color_outlines' === swp_selected('float_default_colors')
|
100 |
+
|| 'custom_color' === swp_selected('float_single_colors')
|
101 |
+
|| 'custom_color_outlines' === swp_selected('float_single_colors')
|
102 |
+
|| 'custom_color' === swp_selected('float_hover_colors')
|
103 |
+
|| 'custom_color_outlines' === swp_selected('float_hover_colors') ) {
|
104 |
+
jQuery( '.sideCustomColor_wrapper' ).slideDown();
|
105 |
+
|
106 |
+
} else {
|
107 |
+
jQuery( '.sideCustomColor_wrapper' ).slideUp();
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
//* Only run on widgets.php
|
112 |
+
if (window.location.href.indexOf("widgets.php") > -1 ) {
|
113 |
+
|
114 |
+
//* Make sure the elements exist before trying to read them.
|
115 |
+
var widgetFinder = setInterval(function() {
|
116 |
+
if (typeof swpWidget !== 'undefined') clearInterval(widgetFinder);
|
117 |
+
|
118 |
+
swpWidget = jQuery("#widgets-right [id*=_swp_popular_posts_widget], [id*=_swp_popular_posts_widget].open")[0];
|
119 |
+
widgetSubmit = jQuery(swpWidget).find("[idjQuery=savewidget]")[0];
|
120 |
+
|
121 |
+
//* Force swpConditionalFields to run when the widget is opened or saved.
|
122 |
+
jQuery(swpWidget).on("click", swpConditionalFields);
|
123 |
+
jQuery(widgetSubmit).on("click", function() {
|
124 |
+
setTimeout(swpConditionalFields, 600);
|
125 |
+
});
|
126 |
+
|
127 |
+
}, 50);
|
128 |
+
}
|
129 |
+
|
130 |
+
(function( window, jQuery, undefined ) {
|
131 |
+
'use strict';
|
132 |
+
|
133 |
+
socialWarfareAdmin.linkLength = function( input ) {
|
134 |
+
var tmp = '';
|
135 |
+
|
136 |
+
for ( var i = 0; i < 23; i++ ) {
|
137 |
+
tmp += 'o';
|
138 |
+
}
|
139 |
+
|
140 |
+
return input.replace( /(http:\/\/[\S]*)/g, tmp ).length;
|
141 |
+
};
|
142 |
+
|
143 |
+
// Function for SM Title Counting
|
144 |
+
function smTitleRemaining() {
|
145 |
+
var smTitle = jQuery( '#social_warfare textarea#swp_og_title' ).val();
|
146 |
+
var remaining = 60 - smTitle.length;
|
147 |
+
if ( smTitle.length > 0 && remaining >= 0 ) {
|
148 |
+
jQuery( '#social_warfare .swp_og_title .swp_CountDown' ).removeClass( 'swp_red' ).addClass( 'swp_blue' );
|
149 |
+
} else if ( smTitle.length > 0 && remaining < 0 ) {
|
150 |
+
jQuery( '#social_warfare .swp_og_title .swp_CountDown' ).removeClass( 'swp_blue' ).addClass( 'swp_red' );
|
151 |
+
} else {
|
152 |
+
jQuery( '#social_warfare .swp_og_title .swp_CountDown' ).removeClass( 'swp_blue' ).removeClass( 'swp_red' );
|
153 |
+
}
|
154 |
+
jQuery( '#social_warfare .swp_og_title .counterNumber' ).html( remaining );
|
155 |
+
}
|
156 |
+
|
157 |
+
// Function for SM Description Counting
|
158 |
+
function smDescriptionRemaining() {
|
159 |
+
var smDescription = jQuery( '#social_warfare textarea#swp_og_description' ).val();
|
160 |
+
var remaining = 160 - smDescription.length;
|
161 |
+
if ( smDescription.length > 0 && remaining >= 0 ) {
|
162 |
+
jQuery( '#social_warfare .swp_og_description .swp_CountDown' ).removeClass( 'swp_red' ).addClass( 'swp_blue' );
|
163 |
+
} else if ( smDescription.length > 0 && remaining < 0 ) {
|
164 |
+
jQuery( '#social_warfare .swp_og_description .swp_CountDown' ).removeClass( 'swp_blue' ).addClass( 'swp_red' );
|
165 |
+
} else {
|
166 |
+
jQuery( '#social_warfare .swp_og_description .swp_CountDown' ).removeClass( 'swp_blue' ).removeClass( 'swp_red' );
|
167 |
+
}
|
168 |
+
jQuery( '#social_warfare .swp_og_description .counterNumber' ).html( remaining );
|
169 |
+
}
|
170 |
+
|
171 |
+
// Function for SM Description Counting
|
172 |
+
function swpPinterestRemaining() {
|
173 |
+
var pinterestDescription = jQuery( '#social_warfare textarea#swp_pinterest_description' ).val();
|
174 |
+
if (!pinterestDescription) {
|
175 |
+
pinterestDescription = '';
|
176 |
+
}
|
177 |
+
var remaining = 500 - pinterestDescription.length;
|
178 |
+
if ( pinterestDescription.length > 0 && remaining >= 0 ) {
|
179 |
+
jQuery( '#social_warfare .swp_pinterest_descriptionWrapper .swp_CountDown' ).removeClass( 'swp_red' ).addClass( 'swp_blue' );
|
180 |
+
} else if ( pinterestDescription.length > 0 && remaining < 0 ) {
|
181 |
+
jQuery( '#social_warfare .swp_pinterest_descriptionWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).addClass( 'swp_red' );
|
182 |
+
} else {
|
183 |
+
jQuery( '#social_warfare .swp_pinterest_descriptionWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).removeClass( 'swp_red' );
|
184 |
+
}
|
185 |
+
jQuery( '#social_warfare .swp_pinterest_descriptionWrapper .counterNumber' ).html( remaining );
|
186 |
+
}
|
187 |
+
|
188 |
+
// Function for Twitter Box Counting
|
189 |
+
function twitterRemaining() {
|
190 |
+
var smTwitter = jQuery( '#social_warfare textarea#swp_custom_tweet' ).val();
|
191 |
+
var handle = jQuery( '#social_warfare .twitterIDWrapper label' ).html();
|
192 |
+
var linkSpace;
|
193 |
+
|
194 |
+
if ( smTwitter.indexOf( 'http' ) > -1 || smTwitter.indexOf( 'https' ) > -1 ) {
|
195 |
+
linkSpace = 0;
|
196 |
+
jQuery( '.tweetLinkSection' ).css({ 'text-decoration': 'line-through' });
|
197 |
+
} else {
|
198 |
+
linkSpace = 23;
|
199 |
+
jQuery( '.tweetLinkSection' ).css({ 'text-decoration': 'none' });
|
200 |
+
}
|
201 |
+
|
202 |
+
var remaining;
|
203 |
+
if ( 'undefined' === typeof handle ) {
|
204 |
+
remaining = 280 - socialWarfareAdmin.linkLength( smTwitter ) - linkSpace;
|
205 |
+
} else {
|
206 |
+
remaining = 280 - socialWarfareAdmin.linkLength( smTwitter ) - linkSpace - handle.length - 6;
|
207 |
+
}
|
208 |
+
|
209 |
+
if ( smTwitter.length > 0 && remaining >= 0 ) {
|
210 |
+
jQuery( '#social_warfare .swp_customTweetWrapper .swp_CountDown' ).removeClass( 'swp_red' ).addClass( 'swp_blue' );
|
211 |
+
} else if ( smTwitter.length > 0 && remaining < 0 ) {
|
212 |
+
jQuery( '#social_warfare .swp_customTweetWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).addClass( 'swp_red' );
|
213 |
+
} else {
|
214 |
+
jQuery( '#social_warfare .swp_customTweetWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).removeClass( 'swp_red' );
|
215 |
+
}
|
216 |
+
|
217 |
+
jQuery( '#social_warfare .swp_customTweetWrapper .counterNumber' ).html( remaining );
|
218 |
+
}
|
219 |
+
|
220 |
+
function toggleCustomThumbnailFields(show) {
|
221 |
+
if (typeof show === 'undefined') show = true;
|
222 |
+
|
223 |
+
if (show) {
|
224 |
+
jQuery(".custom_thumb_size").show();
|
225 |
+
}
|
226 |
+
else {
|
227 |
+
jQuery(".custom_thumb_size").hide();
|
228 |
+
}
|
229 |
+
}
|
230 |
+
|
231 |
+
function noticeClickHandlers() {
|
232 |
+
jQuery(".swp-notice-cta").on("click", function(e) {
|
233 |
+
e.preventDefault();
|
234 |
+
//* Do not use jQuery to get href.
|
235 |
+
var link = e.target.getAttribute("href");
|
236 |
+
|
237 |
+
if (typeof link == 'string' && link.length) {
|
238 |
+
window.open(link);
|
239 |
+
}
|
240 |
+
|
241 |
+
var parent = jQuery(this).parents(".swp-dismiss-notice");
|
242 |
+
|
243 |
+
jQuery.post({
|
244 |
+
url: ajaxurl,
|
245 |
+
data: {
|
246 |
+
action: 'dismiss',
|
247 |
+
key: parent.data("key"),
|
248 |
+
timeframe: this.dataset.timeframe
|
249 |
+
},
|
250 |
+
success: function(result) {
|
251 |
+
result = JSON.parse(result)
|
252 |
+
if (result) {
|
253 |
+
parent.slideUp(500);
|
254 |
+
}
|
255 |
+
}
|
256 |
+
});
|
257 |
+
});
|
258 |
+
}
|
259 |
+
|
260 |
+
jQuery( document ).ready( function() {
|
261 |
+
noticeClickHandlers();
|
262 |
+
|
263 |
+
if ( jQuery( '#social_warfare.postbox' ).length ) {
|
264 |
+
|
265 |
+
// Add the CountDown Box for the Social Media Title
|
266 |
+
jQuery( '#social_warfare #swp_og_title' ).parent().prepend( '<div class="swp_CountDown"><span class="counterNumber">60</span> ' + swp_localize_admin.swp_characters_remaining + '</div>' );
|
267 |
+
|
268 |
+
// Add the CountDown Box for the Social Media Description
|
269 |
+
jQuery( '#social_warfare #swp_og_description' ).parent().prepend( '<div class="swp_CountDown"><span class="counterNumber">150</span> ' + swp_localize_admin.swp_characters_remaining + '</div>' );
|
270 |
+
|
271 |
+
// Add the CountDown Box for the Twitter Box
|
272 |
+
jQuery( '#social_warfare #swp_customTweet' ).parent().prepend( '<div class="swp_CountDown"><span class="counterNumber">118</span> ' + swp_localize_admin.swp_characters_remaining + '</div>' );
|
273 |
+
|
274 |
+
// Add the CountDown Box for the Pinterest Box
|
275 |
+
jQuery( '#social_warfare #swp_pinterest_description' ).parent().prepend( '<div class="swp_CountDown"><span class="counterNumber">140</span> ' + swp_localize_admin.swp_characters_remaining + '</div>' );
|
276 |
+
|
277 |
+
smTitleRemaining();
|
278 |
+
jQuery( '#social_warfare textarea#swp_og_title' ).on( 'input', function() {
|
279 |
+
smTitleRemaining();
|
280 |
+
});
|
281 |
+
|
282 |
+
smDescriptionRemaining();
|
283 |
+
jQuery( '#social_warfare textarea#swp_og_description' ).on( 'input', function() {
|
284 |
+
smDescriptionRemaining();
|
285 |
+
});
|
286 |
+
|
287 |
+
twitterRemaining();
|
288 |
+
jQuery( '#social_warfare textarea#swp_customTweet' ).on( 'input', function() {
|
289 |
+
twitterRemaining();
|
290 |
+
});
|
291 |
+
|
292 |
+
swpPinterestRemaining();
|
293 |
+
jQuery( '#social_warfare textarea#swp_pinterest_description' ).on( 'input', function() {
|
294 |
+
swpPinterestRemaining();
|
295 |
+
});
|
296 |
+
|
297 |
+
// Setup an initilazation loop
|
298 |
+
var swpPostInit = setInterval( function() {
|
299 |
+
|
300 |
+
var swpOgImage = jQuery( '.swp_og_imageWrapper ul.swpmb-media-list' );
|
301 |
+
var swpPinImage = jQuery( '.swp_pinterest_imageWrapper ul.swpmb-media-list' );
|
302 |
+
|
303 |
+
var smWidth, smHeight;
|
304 |
+
|
305 |
+
// Check if the media list has been created yet
|
306 |
+
if ( swpOgImage.length && swpOgImage.is( ':empty' ) ) {
|
307 |
+
// Setup the Open Graph Image Placeholder
|
308 |
+
smWidth = swpOgImage.width();
|
309 |
+
smHeight = smWidth * ( 9 / 16 );
|
310 |
+
swpOgImage.css({ height: smHeight + 'px' });
|
311 |
+
} else {
|
312 |
+
smHeight = swpOgImage.find( 'img' ).height();
|
313 |
+
swpOgImage.css({ height: smHeight + 'px' });
|
314 |
+
}
|
315 |
+
|
316 |
+
var pinWidth, pinHeight;
|
317 |
+
|
318 |
+
if ( swpPinImage.length && swpPinImage.is( ':empty' ) ) {
|
319 |
+
// Setup the Open Graph Image Placeholder
|
320 |
+
pinWidth = swpPinImage.width();
|
321 |
+
pinHeight = pinWidth * ( 3 / 2 );
|
322 |
+
swpPinImage.css({ height: pinHeight + 'px' });
|
323 |
+
} else {
|
324 |
+
pinHeight = swpPinImage.find( 'img' ).height();
|
325 |
+
swpPinImage.css({
|
326 |
+
height: pinHeight + 'px'
|
327 |
+
});
|
328 |
+
}
|
329 |
+
}, 1000 );
|
330 |
+
}
|
331 |
+
|
332 |
+
swpConditionalFields();
|
333 |
+
jQuery( '.swp_popular_post_options select' ).on( 'change', function() {
|
334 |
+
swpConditionalFields();
|
335 |
+
});
|
336 |
+
|
337 |
+
|
338 |
+
/*
|
339 |
+
var customThumbnailSelect = jQuery("#widget-swp_popular_posts_widget-2-thumb_size");
|
340 |
+
|
341 |
+
if (customThumbnailSelect.value === 'custom') {
|
342 |
+
toggleCustomThumbnailFields();
|
343 |
+
}
|
344 |
+
|
345 |
+
jQuery(customThumbnailSelect).on("change", function(e) {
|
346 |
+
console.log("changing");
|
347 |
+
console.log(e.target.value);
|
348 |
+
if (e.target.value === 'custom') {
|
349 |
+
toggleCustomThumbnailFields();
|
350 |
+
} else {
|
351 |
+
toggleCustomThumbnailFields(false);
|
352 |
+
}
|
353 |
+
});
|
354 |
+
*/
|
355 |
+
});
|
356 |
+
})( this, jQuery );
|
@@ -1 +1 @@
|
|
1 |
-
function swpConditionalFields(){function e(e){return jQuery('select[name="'+e+'"]').val()}function s(e){return"true"===e&&(e=!0),"false"===e&&(e=!1),e}jQuery("[data-dep]").each(function(){var e=jQuery(this).data("dep"),a=JSON.parse(JSON.stringify(jQuery(this).data("dep_val")));if(-1===window.location.href.indexOf("page=social-warfare"))var r=jQuery(this).parents(".widgets-holder-wrap").find('[data-swp-name="'+e+'"]');else var r=jQuery('[name="'+e+'"]')[0];var t;void 0===r&&void 0===(r=jQuery('[name="'+e+'"]')[0])&&(r=jQuery("[fieldjQuery="+e+"]")[0]),t="checkbox"==jQuery(r).attr("type")?jQuery(r).prop("checked"):jQuery(r).val(),t=s(t),-1!==window.location.href.indexOf("page=social-warfare")?-1!==jQuery.inArray(t,a)&&jQuery(r).parent(".sw-grid").is(":visible")?jQuery(this).show():jQuery(this).hide():-1!==jQuery.inArray(t,a)||t===a?jQuery(this).show():jQuery(this).hide()}),!1===function(e){return jQuery('[name="'+e+'"]').prop("checked")}("float_style_source")&&"custom_color"===e("float_default_colors")||"custom_color_outlines"===e("float_default_colors")||"custom_color"===e("float_single_colors")||"custom_color_outlines"===e("float_single_colors")||"custom_color"===e("float_hover_colors")||"custom_color_outlines"===e("float_hover_colors")?jQuery(".sideCustomColor_wrapper").slideDown():jQuery(".sideCustomColor_wrapper").slideUp()}var socialWarfareAdmin=socialWarfareAdmin||{},swpWidget,widgetSubmit;if(window.location.href.indexOf("widgets.php")>-1)var widgetFinder=setInterval(function(){void 0!==swpWidget&&clearInterval(widgetFinder),swpWidget=jQuery("#widgets-right [id*=_swp_popular_posts_widget], [id*=_swp_popular_posts_widget].open")[0],widgetSubmit=jQuery(swpWidget).find("[idjQuery=savewidget]")[0],jQuery(swpWidget).on("click",swpConditionalFields),jQuery(widgetSubmit).on("click",function(){setTimeout(swpConditionalFields,600)})},50);!function(e,s,a){"use strict";function r(){var e=s("#social_warfare textarea#swp_og_title").val(),a=60-e.length;e.length>0&&a>=0?s("#social_warfare .swp_og_title .swp_CountDown").removeClass("swp_red").addClass("swp_blue"):e.length>0&&a<0?s("#social_warfare .swp_og_title .swp_CountDown").removeClass("swp_blue").addClass("swp_red"):s("#social_warfare .swp_og_title .swp_CountDown").removeClass("swp_blue").removeClass("swp_red"),s("#social_warfare .swp_og_title .counterNumber").html(a)}function t(){var e=s("#social_warfare textarea#swp_og_description").val(),a=160-e.length;e.length>0&&a>=0?s("#social_warfare .swp_og_description .swp_CountDown").removeClass("swp_red").addClass("swp_blue"):e.length>0&&a<0?s("#social_warfare .swp_og_description .swp_CountDown").removeClass("swp_blue").addClass("swp_red"):s("#social_warfare .swp_og_description .swp_CountDown").removeClass("swp_blue").removeClass("swp_red"),s("#social_warfare .swp_og_description .counterNumber").html(a)}function i(){var e=s("#social_warfare textarea#swp_pinterest_description").val();e||(e="");var a=500-e.length;e.length>0&&a>=0?s("#social_warfare .swp_pinterest_descriptionWrapper .swp_CountDown").removeClass("swp_red").addClass("swp_blue"):e.length>0&&a<0?s("#social_warfare .swp_pinterest_descriptionWrapper .swp_CountDown").removeClass("swp_blue").addClass("swp_red"):s("#social_warfare .swp_pinterest_descriptionWrapper .swp_CountDown").removeClass("swp_blue").removeClass("swp_red"),s("#social_warfare .swp_pinterest_descriptionWrapper .counterNumber").html(a)}function o(){var e,a=s("#social_warfare textarea#swp_custom_tweet").val(),r=s("#social_warfare .twitterIDWrapper label").html();a.indexOf("http")>-1||a.indexOf("https")>-1?(e=0,s(".tweetLinkSection").css({"text-decoration":"line-through"})):(e=23,s(".tweetLinkSection").css({"text-decoration":"none"}));var t;t=void 0===r?280-socialWarfareAdmin.linkLength(a)-e:280-socialWarfareAdmin.linkLength(a)-e-r.length-6,a.length>0&&t>=0?s("#social_warfare .swp_customTweetWrapper .swp_CountDown").removeClass("swp_red").addClass("swp_blue"):a.length>0&&t<0?s("#social_warfare .swp_customTweetWrapper .swp_CountDown").removeClass("swp_blue").addClass("swp_red"):s("#social_warfare .swp_customTweetWrapper .swp_CountDown").removeClass("swp_blue").removeClass("swp_red"),s("#social_warfare .swp_customTweetWrapper .counterNumber").html(t)}function n(){s(".swp-notice-cta").on("click",function(a){a.preventDefault()
|
1 |
+
function swpConditionalFields(){function e(e){return jQuery('select[name="'+e+'"]').val()}function s(e){return"true"===e&&(e=!0),"false"===e&&(e=!1),e}jQuery("[data-dep]").each(function(){var e=jQuery(this).data("dep"),a=JSON.parse(JSON.stringify(jQuery(this).data("dep_val")));if(-1===window.location.href.indexOf("page=social-warfare"))var r=jQuery(this).parents(".widgets-holder-wrap").find('[data-swp-name="'+e+'"]');else var r=jQuery('[name="'+e+'"]')[0];var t;void 0===r&&void 0===(r=jQuery('[name="'+e+'"]')[0])&&(r=jQuery("[fieldjQuery="+e+"]")[0]),t="checkbox"==jQuery(r).attr("type")?jQuery(r).prop("checked"):jQuery(r).val(),t=s(t),-1!==window.location.href.indexOf("page=social-warfare")?-1!==jQuery.inArray(t,a)&&jQuery(r).parent(".sw-grid").is(":visible")?jQuery(this).show():jQuery(this).hide():-1!==jQuery.inArray(t,a)||t===a?jQuery(this).show():jQuery(this).hide()}),!1===function(e){return jQuery('[name="'+e+'"]').prop("checked")}("float_style_source")&&"custom_color"===e("float_default_colors")||"custom_color_outlines"===e("float_default_colors")||"custom_color"===e("float_single_colors")||"custom_color_outlines"===e("float_single_colors")||"custom_color"===e("float_hover_colors")||"custom_color_outlines"===e("float_hover_colors")?jQuery(".sideCustomColor_wrapper").slideDown():jQuery(".sideCustomColor_wrapper").slideUp()}var socialWarfareAdmin=socialWarfareAdmin||{},swpWidget,widgetSubmit;if(window.location.href.indexOf("widgets.php")>-1)var widgetFinder=setInterval(function(){void 0!==swpWidget&&clearInterval(widgetFinder),swpWidget=jQuery("#widgets-right [id*=_swp_popular_posts_widget], [id*=_swp_popular_posts_widget].open")[0],widgetSubmit=jQuery(swpWidget).find("[idjQuery=savewidget]")[0],jQuery(swpWidget).on("click",swpConditionalFields),jQuery(widgetSubmit).on("click",function(){setTimeout(swpConditionalFields,600)})},50);!function(e,s,a){"use strict";function r(){var e=s("#social_warfare textarea#swp_og_title").val(),a=60-e.length;e.length>0&&a>=0?s("#social_warfare .swp_og_title .swp_CountDown").removeClass("swp_red").addClass("swp_blue"):e.length>0&&a<0?s("#social_warfare .swp_og_title .swp_CountDown").removeClass("swp_blue").addClass("swp_red"):s("#social_warfare .swp_og_title .swp_CountDown").removeClass("swp_blue").removeClass("swp_red"),s("#social_warfare .swp_og_title .counterNumber").html(a)}function t(){var e=s("#social_warfare textarea#swp_og_description").val(),a=160-e.length;e.length>0&&a>=0?s("#social_warfare .swp_og_description .swp_CountDown").removeClass("swp_red").addClass("swp_blue"):e.length>0&&a<0?s("#social_warfare .swp_og_description .swp_CountDown").removeClass("swp_blue").addClass("swp_red"):s("#social_warfare .swp_og_description .swp_CountDown").removeClass("swp_blue").removeClass("swp_red"),s("#social_warfare .swp_og_description .counterNumber").html(a)}function i(){var e=s("#social_warfare textarea#swp_pinterest_description").val();e||(e="");var a=500-e.length;e.length>0&&a>=0?s("#social_warfare .swp_pinterest_descriptionWrapper .swp_CountDown").removeClass("swp_red").addClass("swp_blue"):e.length>0&&a<0?s("#social_warfare .swp_pinterest_descriptionWrapper .swp_CountDown").removeClass("swp_blue").addClass("swp_red"):s("#social_warfare .swp_pinterest_descriptionWrapper .swp_CountDown").removeClass("swp_blue").removeClass("swp_red"),s("#social_warfare .swp_pinterest_descriptionWrapper .counterNumber").html(a)}function o(){var e,a=s("#social_warfare textarea#swp_custom_tweet").val(),r=s("#social_warfare .twitterIDWrapper label").html();a.indexOf("http")>-1||a.indexOf("https")>-1?(e=0,s(".tweetLinkSection").css({"text-decoration":"line-through"})):(e=23,s(".tweetLinkSection").css({"text-decoration":"none"}));var t;t=void 0===r?280-socialWarfareAdmin.linkLength(a)-e:280-socialWarfareAdmin.linkLength(a)-e-r.length-6,a.length>0&&t>=0?s("#social_warfare .swp_customTweetWrapper .swp_CountDown").removeClass("swp_red").addClass("swp_blue"):a.length>0&&t<0?s("#social_warfare .swp_customTweetWrapper .swp_CountDown").removeClass("swp_blue").addClass("swp_red"):s("#social_warfare .swp_customTweetWrapper .swp_CountDown").removeClass("swp_blue").removeClass("swp_red"),s("#social_warfare .swp_customTweetWrapper .counterNumber").html(t)}function n(){s(".swp-notice-cta").on("click",function(a){a.preventDefault();var r=a.target.getAttribute("href");"string"==typeof r&&r.length&&e.open(r);var t=s(this).parents(".swp-dismiss-notice");s.post({url:ajaxurl,data:{action:"dismiss",key:t.data("key"),timeframe:this.dataset.timeframe},success:function(e){(e=JSON.parse(e))&&t.slideUp(500)}})})}socialWarfareAdmin.linkLength=function(e){for(var s="",a=0;a<23;a++)s+="o";return e.replace(/(http:\/\/[\S]*)/g,s).length},s(document).ready(function(){if(n(),s("#social_warfare.postbox").length){s("#social_warfare #swp_og_title").parent().prepend('<div class="swp_CountDown"><span class="counterNumber">60</span> '+swp_localize_admin.swp_characters_remaining+"</div>"),s("#social_warfare #swp_og_description").parent().prepend('<div class="swp_CountDown"><span class="counterNumber">150</span> '+swp_localize_admin.swp_characters_remaining+"</div>"),s("#social_warfare #swp_customTweet").parent().prepend('<div class="swp_CountDown"><span class="counterNumber">118</span> '+swp_localize_admin.swp_characters_remaining+"</div>"),s("#social_warfare #swp_pinterest_description").parent().prepend('<div class="swp_CountDown"><span class="counterNumber">140</span> '+swp_localize_admin.swp_characters_remaining+"</div>"),r(),s("#social_warfare textarea#swp_og_title").on("input",function(){r()}),t(),s("#social_warfare textarea#swp_og_description").on("input",function(){t()}),o(),s("#social_warfare textarea#swp_customTweet").on("input",function(){o()}),i(),s("#social_warfare textarea#swp_pinterest_description").on("input",function(){i()});setInterval(function(){var e,a,r=s(".swp_og_imageWrapper ul.swpmb-media-list"),t=s(".swp_pinterest_imageWrapper ul.swpmb-media-list");r.length&&r.is(":empty")?(e=r.width(),a=e*(9/16),r.css({height:a+"px"})):(a=r.find("img").height(),r.css({height:a+"px"}));var i,o;t.length&&t.is(":empty")?(i=t.width(),o=1.5*i,t.css({height:o+"px"})):(o=t.find("img").height(),t.css({height:o+"px"}))},1e3)}swpConditionalFields(),s(".swp_popular_post_options select").on("change",function(){swpConditionalFields()})})}(this,jQuery);
|
@@ -210,19 +210,20 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
|
|
210 |
var visible = false;
|
211 |
var scrollPos = $(window).scrollTop();
|
212 |
|
213 |
-
|
214 |
$(".swp_social_panel").not(".swp_social_panelSide, .nc_floater").each(function(index) {
|
215 |
var offset = $(this).offset();
|
216 |
|
|
|
217 |
if (typeof swpFloatBeforeContent != 'undefined' && false === swpFloatBeforeContent) {
|
218 |
-
|
219 |
-
|
|
|
220 |
visible = true;
|
221 |
}
|
222 |
}
|
223 |
|
224 |
//* Do not display floating buttons if a panel is currently visible.
|
225 |
-
if (offset.top + $(this).height() > scrollPos && offset.top < scrollPos + $(window).height()) {
|
226 |
visible = true;
|
227 |
}
|
228 |
});
|
@@ -233,39 +234,36 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
|
|
233 |
|
234 |
function createFloatBar() {
|
235 |
//* .swp_social_panelSide is the side floater.
|
236 |
-
|
|
|
|
|
|
|
|
|
|
|
237 |
|
238 |
//* If a horizontal panel does not exist,
|
239 |
-
if (
|
240 |
return;
|
241 |
}
|
242 |
|
243 |
//* Or we are on desktop and not using top/bottom floaters:
|
244 |
-
if ($(window).width() > panel.data("min-width" &&
|
245 |
return;
|
246 |
}
|
247 |
|
248 |
-
var offset = panel.offset();
|
249 |
var backgroundColor = panel.data("float-color");
|
250 |
-
var left = panel.data("align") == "center" ? 0 : offset.left;
|
251 |
var wrapper = $('<div class="nc_wrapper" style="background-color:' + backgroundColor + '"></div>');
|
252 |
-
var location = panel.data('float');
|
253 |
-
|
254 |
-
if ($(window).width() < panel.data("min-width")) {
|
255 |
-
location = panel.data("float-mobile")
|
256 |
-
}
|
257 |
-
|
258 |
-
if (offset.left < 100 || $(window).width() < panel.data("min-width")) {
|
259 |
-
location = panel.data("float-mobile");
|
260 |
-
}
|
261 |
|
262 |
-
if (
|
263 |
-
|
|
|
|
|
264 |
}
|
265 |
|
266 |
-
wrapper.addClass(
|
267 |
|
268 |
-
var clone = panel.clone();
|
269 |
clone.addClass("nc_floater").css({width: panel.outerWidth(true), left: left}).appendTo(wrapper)
|
270 |
|
271 |
$(".swp_social_panel .swp_count").css({ transition: "padding .1s linear" });
|
@@ -277,10 +275,13 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
|
|
277 |
var panel = $(".swp_social_panel").first();
|
278 |
var location = panel.data('float');
|
279 |
|
280 |
-
if (
|
281 |
-
|
282 |
-
|
283 |
-
|
|
|
|
|
|
|
284 |
toggleMobileButtons();
|
285 |
toggleFloatingBar();
|
286 |
}
|
@@ -297,8 +298,7 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
|
|
297 |
|
298 |
function toggleMobileButtons() {
|
299 |
var panel = $(".swp_social_panel").first();
|
300 |
-
var
|
301 |
-
var direction = (location.indexOf("left") !== -1) ? "left" : "right";
|
302 |
var visibility = panelIsVisible() ? "collapse" : "visible";
|
303 |
|
304 |
//* Force side floating panel to be hidden.
|
@@ -311,8 +311,8 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
|
|
311 |
|
312 |
function toggleSideButtons() {
|
313 |
var panel = $(".swp_social_panel").not(".swp_social_panelSide").first();
|
314 |
-
var sidePanel = $(".swp_social_panelSide")
|
315 |
-
var location =
|
316 |
var visible = panelIsVisible();
|
317 |
|
318 |
if ($(window).width() < panel.data("min-width") && $(".nc_wrapper").length) {
|
@@ -349,25 +349,26 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
|
|
349 |
//* Note: All of the other logic for padding now lives in createFloatBar.
|
350 |
//* Otherwise, it added the padding every time this was called.
|
351 |
function toggleFloatingBar() {
|
352 |
-
var panel = $(".swp_social_panel").
|
353 |
var location = panel.data("float");
|
354 |
-
|
355 |
-
panelIsVisible() ? $(".nc_wrapper").hide() : $(".nc_wrapper").show();
|
356 |
|
357 |
if (panelIsVisible()) {
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
$("body").animate({ "padding-top": paddingTop + "px" }, 0);
|
363 |
-
}
|
364 |
} else {
|
365 |
-
|
|
|
|
|
|
|
|
|
366 |
|
367 |
// Add some padding to the page so it fits nicely at the top or bottom
|
368 |
if (location == 'bottom') {
|
369 |
newPadding = paddingBottom + 50;
|
370 |
-
$('body').animate({ 'padding-bottom': newPadding + 'px' }, 0);
|
371 |
} else {
|
372 |
if (panel.offset().top > $(window).scrollTop() + $(window).height()) {
|
373 |
newPadding = paddingTop + 50;
|
@@ -376,6 +377,9 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
|
|
376 |
}
|
377 |
}
|
378 |
|
|
|
|
|
|
|
379 |
}
|
380 |
|
381 |
|
@@ -404,7 +408,6 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
|
|
404 |
centerSidePanel();
|
405 |
swp.activateHoverStates();
|
406 |
handleWindowOpens();
|
407 |
-
$(window).scrollTop();
|
408 |
$(window).scroll(swp.throttle(50, function() {
|
409 |
toggleFloatingButtons();
|
410 |
}));
|
@@ -431,6 +434,11 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
|
|
431 |
$('.swp-content-locator').parent().find('img').each(function() {
|
432 |
var $image = $(this);
|
433 |
|
|
|
|
|
|
|
|
|
|
|
434 |
|
435 |
if ($image.outerHeight() < swpPinIt.minHeight || $image.outerWidth() < swpPinIt.minWidth) {
|
436 |
return;
|
@@ -439,7 +447,10 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
|
|
439 |
var pinMedia = false;
|
440 |
|
441 |
if ('undefined' !== typeof swpPinIt.image_source) {
|
442 |
-
|
|
|
|
|
|
|
443 |
} else if ($image.data('media')) {
|
444 |
pinMedia = $image.data('media');
|
445 |
} else if ($(this).data('lazy-src')) {
|
@@ -459,7 +470,9 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
|
|
459 |
|
460 |
var pinDesc = '';
|
461 |
|
462 |
-
if ('undefined'
|
|
|
|
|
463 |
pinDesc = swpPinIt.image_description;
|
464 |
} else if ($image.attr('title')) {
|
465 |
pinDesc = $image.attr('title');
|
@@ -498,6 +511,11 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
|
|
498 |
});
|
499 |
});
|
500 |
|
|
|
|
|
|
|
|
|
|
|
501 |
}
|
502 |
|
503 |
function handleWindowOpens() {
|
@@ -554,6 +572,42 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
|
|
554 |
}
|
555 |
|
556 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
557 |
|
558 |
$(window).on('load' , function() {
|
559 |
if ('undefined' !== typeof swpPinIt && swpPinIt.enabled) {
|
210 |
var visible = false;
|
211 |
var scrollPos = $(window).scrollTop();
|
212 |
|
|
|
213 |
$(".swp_social_panel").not(".swp_social_panelSide, .nc_floater").each(function(index) {
|
214 |
var offset = $(this).offset();
|
215 |
|
216 |
+
//* Do not display floating buttons before the horizontal panel.
|
217 |
if (typeof swpFloatBeforeContent != 'undefined' && false === swpFloatBeforeContent) {
|
218 |
+
var theContent = jQuery(".swp-content-locator").parent();
|
219 |
+
|
220 |
+
if (index === 0 && theContent.offset().top > (scrollPos + jQuery(window).height())) {
|
221 |
visible = true;
|
222 |
}
|
223 |
}
|
224 |
|
225 |
//* Do not display floating buttons if a panel is currently visible.
|
226 |
+
if ((offset.top + $(this).height()) > scrollPos && offset.top < (scrollPos + $(window).height())) {
|
227 |
visible = true;
|
228 |
}
|
229 |
});
|
234 |
|
235 |
function createFloatBar() {
|
236 |
//* .swp_social_panelSide is the side floater.
|
237 |
+
if ($(".nc_wrapper").length) {
|
238 |
+
$(".nc_wrapper").remove();
|
239 |
+
}
|
240 |
+
|
241 |
+
var panel = $(".swp_social_panel");
|
242 |
+
var floatLocation = panel.data("float")
|
243 |
|
244 |
//* If a horizontal panel does not exist,
|
245 |
+
if (typeof panel == "undefined") {
|
246 |
return;
|
247 |
}
|
248 |
|
249 |
//* Or we are on desktop and not using top/bottom floaters:
|
250 |
+
if ($(window).width() > panel.data("min-width") && floatLocation != "top" && floatLocation != "bottom") {
|
251 |
return;
|
252 |
}
|
253 |
|
|
|
254 |
var backgroundColor = panel.data("float-color");
|
255 |
+
var left = panel.data("align") == "center" ? 0 : panel.offset().left;
|
256 |
var wrapper = $('<div class="nc_wrapper" style="background-color:' + backgroundColor + '"></div>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
|
258 |
+
if (floatLocation == 'left' || floatLocation == 'right') {
|
259 |
+
var barLocation = panel.data("float-mobile");
|
260 |
+
} else {
|
261 |
+
var barLocation = floatLocation;
|
262 |
}
|
263 |
|
264 |
+
wrapper.addClass(barLocation).hide().appendTo("body");
|
265 |
|
266 |
+
var clone = panel.first().clone();
|
267 |
clone.addClass("nc_floater").css({width: panel.outerWidth(true), left: left}).appendTo(wrapper)
|
268 |
|
269 |
$(".swp_social_panel .swp_count").css({ transition: "padding .1s linear" });
|
275 |
var panel = $(".swp_social_panel").first();
|
276 |
var location = panel.data('float');
|
277 |
|
278 |
+
if (location == 'none') {
|
279 |
+
jQuery(".nc_wrapper, .swp_social_panelSide").hide();
|
280 |
+
return;
|
281 |
+
}
|
282 |
+
|
283 |
+
if ($(window).width() < panel.data("min-width")) {
|
284 |
+
createFloatBar();
|
285 |
toggleMobileButtons();
|
286 |
toggleFloatingBar();
|
287 |
}
|
298 |
|
299 |
function toggleMobileButtons() {
|
300 |
var panel = $(".swp_social_panel").first();
|
301 |
+
// var direction = (location.indexOf("left") !== -1) ? "left" : "right";
|
|
|
302 |
var visibility = panelIsVisible() ? "collapse" : "visible";
|
303 |
|
304 |
//* Force side floating panel to be hidden.
|
311 |
|
312 |
function toggleSideButtons() {
|
313 |
var panel = $(".swp_social_panel").not(".swp_social_panelSide").first();
|
314 |
+
var sidePanel = $(".swp_social_panelSide");
|
315 |
+
var location = sidePanel.data("float")
|
316 |
var visible = panelIsVisible();
|
317 |
|
318 |
if ($(window).width() < panel.data("min-width") && $(".nc_wrapper").length) {
|
349 |
//* Note: All of the other logic for padding now lives in createFloatBar.
|
350 |
//* Otherwise, it added the padding every time this was called.
|
351 |
function toggleFloatingBar() {
|
352 |
+
var panel = $(".swp_social_panel").first();
|
353 |
var location = panel.data("float");
|
354 |
+
var newPadding = 0;1
|
|
|
355 |
|
356 |
if (panelIsVisible()) {
|
357 |
+
$(".nc_wrapper").hide();
|
358 |
+
|
359 |
+
newPadding = (location == "bottom") ? paddingBottom : paddingTop;
|
360 |
+
|
|
|
|
|
361 |
} else {
|
362 |
+
$(".nc_wrapper").show();
|
363 |
+
|
364 |
+
//* Show the top/bottom floating bar. Force its opacity to normal.
|
365 |
+
//* @see SWP_Buttons_Panel->render_HTML()
|
366 |
+
jQuery(".swp_social_panel.nc_floater").css("opacity", 1)
|
367 |
|
368 |
// Add some padding to the page so it fits nicely at the top or bottom
|
369 |
if (location == 'bottom') {
|
370 |
newPadding = paddingBottom + 50;
|
371 |
+
// $('body').animate({ 'padding-bottom': newPadding + 'px' }, 0);
|
372 |
} else {
|
373 |
if (panel.offset().top > $(window).scrollTop() + $(window).height()) {
|
374 |
newPadding = paddingTop + 50;
|
377 |
}
|
378 |
}
|
379 |
|
380 |
+
var paddingProp = "padding-" + location;
|
381 |
+
$("body").animate({paddingProp: newPadding}, 0);
|
382 |
+
|
383 |
}
|
384 |
|
385 |
|
408 |
centerSidePanel();
|
409 |
swp.activateHoverStates();
|
410 |
handleWindowOpens();
|
|
|
411 |
$(window).scroll(swp.throttle(50, function() {
|
412 |
toggleFloatingButtons();
|
413 |
}));
|
434 |
$('.swp-content-locator').parent().find('img').each(function() {
|
435 |
var $image = $(this);
|
436 |
|
437 |
+
if (typeof swpPinIt.disableOnAnchors != undefined && swpPinIt.disableOnAnchors) {
|
438 |
+
if (jQuery($image).parents().filter("a").length) {
|
439 |
+
return;
|
440 |
+
}
|
441 |
+
}
|
442 |
|
443 |
if ($image.outerHeight() < swpPinIt.minHeight || $image.outerWidth() < swpPinIt.minWidth) {
|
444 |
return;
|
447 |
var pinMedia = false;
|
448 |
|
449 |
if ('undefined' !== typeof swpPinIt.image_source) {
|
450 |
+
//* Create a temp image to force absolute paths via jQuery.
|
451 |
+
var i = new Image();
|
452 |
+
i.src = swpPinIt.image_source;
|
453 |
+
pinMedia = jQuery(i).src;
|
454 |
} else if ($image.data('media')) {
|
455 |
pinMedia = $image.data('media');
|
456 |
} else if ($(this).data('lazy-src')) {
|
470 |
|
471 |
var pinDesc = '';
|
472 |
|
473 |
+
if (typeof $image.data("pin-description") != 'undefined') {
|
474 |
+
pinDesc = $image.data("pin-description");
|
475 |
+
} else if ('undefined' !== typeof swpPinIt.image_description){
|
476 |
pinDesc = swpPinIt.image_description;
|
477 |
} else if ($image.attr('title')) {
|
478 |
pinDesc = $image.attr('title');
|
511 |
});
|
512 |
});
|
513 |
|
514 |
+
var pinterestButton = findPinterestSaveButton();
|
515 |
+
|
516 |
+
if (typeof pinterestButton != 'undefined' && pinterestButton) {
|
517 |
+
removePinterestButton(pinterestButton);
|
518 |
+
}
|
519 |
}
|
520 |
|
521 |
function handleWindowOpens() {
|
572 |
}
|
573 |
|
574 |
|
575 |
+
//* The Pinterest Browser Extension create a single Save button.
|
576 |
+
//* Let's search and destroy.
|
577 |
+
function findPinterestSaveButton() {
|
578 |
+
var pinterestRed = "rgb(189, 8, 28)";
|
579 |
+
var pinterestZIndex = "8675309";
|
580 |
+
var pinterestBackgroundSize = "14px 14px";
|
581 |
+
var button = null;
|
582 |
+
|
583 |
+
document.querySelectorAll("span").forEach(function(el, index) {
|
584 |
+
var style = window.getComputedStyle(el);
|
585 |
+
|
586 |
+
if (style.backgroundColor == pinterestRed) {
|
587 |
+
if (style.backgroundSize == pinterestBackgroundSize && style.zIndex == pinterestZIndex) {
|
588 |
+
button = el;
|
589 |
+
}
|
590 |
+
}
|
591 |
+
});
|
592 |
+
|
593 |
+
return button;
|
594 |
+
}
|
595 |
+
|
596 |
+
function removePinterestButton(button) {
|
597 |
+
var pinterestSquare = button.nextSibling;
|
598 |
+
|
599 |
+
if (typeof pinterestSquare != 'undefined' && pinterestSquare.nodeName == 'SPAN') {
|
600 |
+
var style = window.getComputedStyle(pinterestSquare);
|
601 |
+
var size = "24px";
|
602 |
+
|
603 |
+
if (style.width.indexOf(size) === 0 && style.height.indexOf(size) === 0) {
|
604 |
+
pinterestSquare.remove()
|
605 |
+
}
|
606 |
+
}
|
607 |
+
|
608 |
+
button.remove();
|
609 |
+
}
|
610 |
+
|
611 |
|
612 |
$(window).on('load' , function() {
|
613 |
if ('undefined' !== typeof swpPinIt && swpPinIt.enabled) {
|
@@ -1 +1 @@
|
|
1 |
-
var socialWarfarePlugin=socialWarfarePlugin||{};!function(t,e){var i,a=t.socialWarfarePlugin;a.throttle=i=function(t,i,n,o){function s(){function a(){l=+new Date,n.apply(p,d)}function s(){r=e}var p=this,c=+new Date-l,d=arguments;o&&!r&&a(),r&&clearTimeout(r),o===e&&c>t?a():!0!==i&&(r=setTimeout(o?s:a,o===e?t-c:t))}var r,l=0;return"boolean"!=typeof i&&(o=n,n=i,i=e),a.guid&&(s.guid=n.guid=n.guid||a.guid++),s},a.debounce=function(t,a,n){return n===e?i(t,a,!1):i(t,n,!1!==a)}}(this),function(t,e,i){"use strict";function a(t){return parseInt(t,10)}function n(i){var a=e.Event(i);e(t).trigger(a)}function o(){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(){var i=(e(".swp_social_panel").not(".swp_social_panelSide").first(),!1),a=e(t).scrollTop();return e(".swp_social_panel").not(".swp_social_panelSide, .nc_floater").each(function(n){var o=e(this).offset();"undefined"!=typeof swpFloatBeforeContent&&!1===swpFloatBeforeContent&&0===n&&o.top>a&&(i=!0),o.top+e(this).height()>a&&o.top<a+e(t).height()&&(i=!0)}),i}function r(){var i=e(".swp_social_panel").not(".swp_social_panelSide").first();if(i.length&&!(e(t).width()>i.data("top"!=i.data("float")&&"bottom"!=i.data("float")))){var a=i.offset(),n=i.data("float-color"),o="center"==i.data("align")?0:a.left,s=e('<div class="nc_wrapper" style="background-color:'+n+'"></div>'),r=i.data("float");e(t).width()<i.data("min-width")&&(r=i.data("float-mobile")),(a.left<100||e(t).width()<i.data("min-width"))&&(r=i.data("float-mobile")),e(".nc_wrapper").length&&e(".nc_wrapper").remove(),s.addClass(r).hide().appendTo("body");i.clone().addClass("nc_floater").css({width:i.outerWidth(!0),left:o}).appendTo(s),e(".swp_social_panel .swp_count").css({transition:"padding .1s linear"})}}function l(){var i=e(".swp_social_panel").first(),a=i.data("float");e(t).width()<i.data("min-width")&&(e(".nc_wrapper").length||r(),p(),d()),"right"!=a&&"left"!=a||c(),"bottom"!=a&&"top"!=a||d()}function p(){var t=e(".swp_social_panel").first(),i=t.data("float-mobile"),a=(i.indexOf("left"),s()?"collapse":"visible");e(".swp_social_panelSide").hide(),e(".nc_wrapper").css("visibility",a)}function c(){var i=e(".swp_social_panel").not(".swp_social_panelSide").first(),a=e(".swp_social_panelSide").filter(":not(.mobile)"),n=i.data("float"),o=s();if(e(t).width()<i.data("min-width")&&e(".nc_wrapper").length)return void a.hide();if(i.length||(o=!(e(t).width()>a.data("min-width"))),"slide"==a.data("transition")){var r=-1!==n.indexOf("left")?"left":"right";o?a.css(r,"-150px"):a.css(r,"5px")}else o?a.css("opacity",1).fadeOut(300).css("opacity",0):a.css("opacity",0).fadeIn(300).css({opacity:1,display:"flex"})}function d(){var i=e(".swp_social_panel").not(".swp_social_panelSide").first(),a=i.data("float");if(s()?e(".nc_wrapper").hide():e(".nc_wrapper").show(),s())"bottom"==a?e("body").animate({"padding-bottom":b+"px"},0):e("body").animate({"padding-top":v+"px"},0);else{var n;"bottom"==a?(n=b+50,e("body").animate({"padding-bottom":n+"px"},0)):i.offset().top>e(t).scrollTop()+e(t).height()&&(n=v+50,e("body").animate({"padding-top":n+"px"},0))}}function h(){var e=jQuery("[class*=float-position-center]");if(e.length){var i=e.outerHeight(),a=t.innerHeight;if(i>a)return void e.css("top",0);var n=(a-i)/2;e.css("top",n)}}function f(){0!==e(".swp_social_panel").length&&(r(),h(),w.activateHoverStates(),u(),e(t).scrollTop(),e(t).scroll(w.throttle(50,function(){l()})),e(t).trigger("scroll"))}function _(){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 n=!1;if(void 0!==swpPinIt.image_source?n=swpPinIt.image_source:i.data("media")?n=i.data("media"):e(this).data("lazy-src")?n=e(this).data("lazy-src"):i[0].src&&(n=i[0].src),!1!==n&&!i.hasClass("no_pin")){var o="";void 0!==swpPinIt.image_description?o=swpPinIt.image_description:i.attr("title")?o=i.attr("title"):i.attr("alt")&&(o=i.attr("alt"));var s="http://pinterest.com/pin/create/bookmarklet/?media="+encodeURI(n)+"&url="+encodeURI(a.pageURL)+"&is_video=false&description="+encodeURIComponent(o),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"),!0===swpClickTracking){"function"==typeof ga&&ga("send","event","social_media","swp_pin_image_share"),"object"==typeof dataLayer&&dataLayer.push({event:"swp_pin_image_share"})}return!1})}}})}function u(){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,n,o,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,n=775):(a=270,n=500),o=t.screenY+(t.innerHeight-a)/2,s=t.screenX+(t.innerWidth-n)/2,r="height="+a+",width="+n+",top="+o+",left="+s,t.open(l,"_blank",r),1==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";"function"==typeof ga&&ga("send","event","social_media","swp_"+p+"_share"),"object"==typeof dataLayer&&dataLayer.push({event:"swp_"+p+"_share"})}return!1}})}var w=t.socialWarfarePlugin,v=a(e("body").css("padding-top").replace("px","")),b=a(e("body").css("padding-bottom").replace("px","")),m={};socialWarfarePlugin.fetchFacebookShares=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,i){if(void 0!==t[0].share){var n=a(t[0].share.share_count),o=a(t[0].share.comment_count);if(void 0!==t[0].og_object)var s=a(t[0].og_object.likes.summary.total_count);else var s=0;var r=n+o+s;if(swp_post_recovery_url){if(void 0!==i[0].share)var l=a(i[0].share.share_count),p=a(i[0].share.comment_count);else var l=0,p=0;if(void 0!==i[0].og_object)var c=a(i[0].og_object.likes.summary.total_count);else var c=0;var d=l+p+c;r!==d&&(r+=d)}m={action:"swp_facebook_shares_update",post_id:swp_post_id,share_counts:r},e.post(swp_admin_ajax,m)}})},w.activateHoverStates=function(){n("pre_activate_buttons"),e(".swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer").on("mouseenter",function(){if(!e(this).hasClass("swp_nohover")){o();var t=e(this).find(".swp_share").outerWidth(),i=e(this).find("i.sw").outerWidth(),a=e(this).width(),n=1+(t+35)/a;e(this).find(".iconFiller").width(t+i+25+"px"),e(this).css({flex:n+" 1 0%"})}}),e(".swp_social_panel:not(.swp_social_panelSide)").on("mouseleave",function(){o()})},e(t).on("load",function(){"undefined"!=typeof swpPinIt&&swpPinIt.enabled&&_()}),e(document).ready(function(){u(),f();var i=e(".swp_social_panelSide"),n=!1;if(e(".swp_social_panel").hover(function(){n=!0},function(){n=!1}),e(t).resize(w.debounce(250,function(){e(".swp_social_panel").length&&!1!==n||(t.swpAdjust=1,f())})),e(document.body).on("post-load",function(){f()}),0!==i.length){if(-1!==e(i).attr("class").indexOf("swp_side"))return;var o=e(i).height(),s=e(t).height(),r=a(s/2-o/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,n=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,o=/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,c=/BlackBerry/i,d=/BB10/i,h=/Opera Mini/i,f=/(CriOS|Chrome)(?=.*\bMobile\b)/i,_=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,u=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),w=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:w(e,v),ipod:w(i,v),tablet:!w(e,v)&&w(a,v),device:w(e,v)||w(i,v)||w(a,v)},this.amazon={phone:w(s,v),tablet:!w(s,v)&&w(r,v),device:w(s,v)||w(r,v)},this.android={phone:w(s,v)||w(n,v),tablet:!w(s,v)&&!w(n,v)&&(w(r,v)||w(o,v)),device:w(s,v)||w(r,v)||w(n,v)||w(o,v)},this.windows={phone:w(l,v),tablet:w(p,v),device:w(l,v)||w(p,v)},this.other={blackberry:w(c,v),blackberry10:w(d,v),opera:w(h,v),firefox:w(_,v),chrome:w(f,v),device:w(c,v)||w(d,v)||w(h,v)||w(_,v)||w(f,v)},this.seven_inch=w(u,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,n=e.socialWarfarePlugin;n.throttle=i=function(e,i,a,o){function s(){function n(){p=+new Date,a.apply(l,d)}function s(){r=t}var l=this,c=+new Date-p,d=arguments;o&&!r&&n(),r&&clearTimeout(r),o===t&&c>e?n():!0!==i&&(r=setTimeout(o?s:n,o===t?e-c:e))}var r,p=0;return"boolean"!=typeof i&&(o=a,a=i,i=t),n.guid&&(s.guid=a.guid=a.guid||n.guid++),s},n.debounce=function(e,n,a){return a===t?i(e,n,!1):i(e,a,!1!==n)}}(this),function(e,t,i){"use strict";function n(e){return parseInt(e,10)}function a(i){var n=t.Event(i);t(e).trigger(n)}function o(){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(){var i=(t(".swp_social_panel").not(".swp_social_panelSide").first(),!1),n=t(e).scrollTop();return t(".swp_social_panel").not(".swp_social_panelSide, .nc_floater").each(function(a){var o=t(this).offset();if("undefined"!=typeof swpFloatBeforeContent&&!1===swpFloatBeforeContent){var s=jQuery(".swp-content-locator").parent();0===a&&s.offset().top>n+jQuery(e).height()&&(i=!0)}o.top+t(this).height()>n&&o.top<n+t(e).height()&&(i=!0)}),i}function r(){t(".nc_wrapper").length&&t(".nc_wrapper").remove();var i=t(".swp_social_panel"),n=i.data("float");if(void 0!==i&&!(t(e).width()>i.data("min-width")&&"top"!=n&&"bottom"!=n)){var a=i.data("float-color"),o="center"==i.data("align")?0:i.offset().left,s=t('<div class="nc_wrapper" style="background-color:'+a+'"></div>');if("left"==n||"right"==n)var r=i.data("float-mobile");else var r=n;s.addClass(r).hide().appendTo("body");i.first().clone().addClass("nc_floater").css({width:i.outerWidth(!0),left:o}).appendTo(s),t(".swp_social_panel .swp_count").css({transition:"padding .1s linear"})}}function p(){var i=t(".swp_social_panel").first(),n=i.data("float");if("none"==n)return void jQuery(".nc_wrapper, .swp_social_panelSide").hide();t(e).width()<i.data("min-width")&&(r(),l(),d()),"right"!=n&&"left"!=n||c(),"bottom"!=n&&"top"!=n||d()}function l(){var e=(t(".swp_social_panel").first(),s()?"collapse":"visible");t(".swp_social_panelSide").hide(),t(".nc_wrapper").css("visibility",e)}function c(){var i=t(".swp_social_panel").not(".swp_social_panelSide").first(),n=t(".swp_social_panelSide"),a=n.data("float"),o=s();if(t(e).width()<i.data("min-width")&&t(".nc_wrapper").length)return void n.hide();if(i.length||(o=!(t(e).width()>n.data("min-width"))),"slide"==n.data("transition")){var r=-1!==a.indexOf("left")?"left":"right";o?n.css(r,"-150px"):n.css(r,"5px")}else o?n.css("opacity",1).fadeOut(300).css("opacity",0):n.css("opacity",0).fadeIn(300).css({opacity:1,display:"flex"})}function d(){var i=t(".swp_social_panel").first(),n=i.data("float"),a=0;s()?(t(".nc_wrapper").hide(),a="bottom"==n?m:g):(t(".nc_wrapper").show(),jQuery(".swp_social_panel.nc_floater").css("opacity",1),"bottom"==n?a=m+50:i.offset().top>t(e).scrollTop()+t(e).height()&&(a=g+50,t("body").animate({"padding-top":a+"px"},0)));t("body").animate({paddingProp:a},0)}function h(){var t=jQuery("[class*=float-position-center]");if(t.length){var i=t.outerHeight(),n=e.innerHeight;if(i>n)return void t.css("top",0);var a=(n-i)/2;t.css("top",a)}}function f(){0!==t(".swp_social_panel").length&&(r(),h(),b.activateHoverStates(),_(),t(e).scroll(b.throttle(50,function(){p()})),t(e).trigger("scroll"))}function u(){var n={wrap:'<div class="sw-pinit" />',pageURL:document.URL},a=t.extend(n,a);t(".swp-content-locator").parent().find("img").each(function(){var n=t(this);if(!(typeof swpPinIt.disableOnAnchors!=i&&swpPinIt.disableOnAnchors&&jQuery(n).parents().filter("a").length||n.outerHeight()<swpPinIt.minHeight||n.outerWidth()<swpPinIt.minWidth)){var o=!1;if(void 0!==swpPinIt.image_source){var s=new Image;s.src=swpPinIt.image_source,o=jQuery(s).src}else n.data("media")?o=n.data("media"):t(this).data("lazy-src")?o=t(this).data("lazy-src"):n[0].src&&(o=n[0].src);if(!1!==o&&!n.hasClass("no_pin")){var r="";void 0!==n.data("pin-description")?r=n.data("pin-description"):void 0!==swpPinIt.image_description?r=swpPinIt.image_description:n.attr("title")?r=n.attr("title"):n.attr("alt")&&(r=n.attr("alt"));var p="http://pinterest.com/pin/create/bookmarklet/?media="+encodeURI(o)+"&url="+encodeURI(a.pageURL)+"&is_video=false&description="+encodeURIComponent(r),l=n.attr("class"),c=n.attr("style");n.removeClass().attr("style","").wrap(a.wrap),n.after('<a href="'+p+'" class="sw-pinit-button sw-pinit-'+swpPinIt.vLocation+" sw-pinit-"+swpPinIt.hLocation+'">Save</a>'),n.parent(".sw-pinit").addClass(l).attr("style",c),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"),!0===swpClickTracking){"function"==typeof ga&&ga("send","event","social_media","swp_pin_image_share"),"object"==typeof dataLayer&&dataLayer.push({event:"swp_pin_image_share"})}return!1})}}});var o=w();void 0!==o&&o&&v(o)}function _(){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 n,a,o,s,r,p=t(this).data("link");if(p=p.replace("’","'"),t(this).hasClass("pinterest")||t(this).hasClass("buffer_link")||t(this).hasClass("flipboard")?(n=550,a=775):(n=270,a=500),o=e.screenY+(e.innerHeight-n)/2,s=e.screenX+(e.innerWidth-a)/2,r="height="+n+",width="+a+",top="+o+",left="+s,e.open(p,"_blank",r),1==swpClickTracking){if(t(this).hasClass("nc_tweet"))var l=t(this).parents(".nc_tweetContainer").attr("data-network");else if(t(this).hasClass("swp_CTT"))var l="ctt";"function"==typeof ga&&ga("send","event","social_media","swp_"+l+"_share"),"object"==typeof dataLayer&&dataLayer.push({event:"swp_"+l+"_share"})}return!1}})}function w(){var t=null;return document.querySelectorAll("span").forEach(function(i,n){var a=e.getComputedStyle(i);"rgb(189, 8, 28)"==a.backgroundColor&&"14px 14px"==a.backgroundSize&&"8675309"==a.zIndex&&(t=i)}),t}function v(t){var i=t.nextSibling;if(void 0!==i&&"SPAN"==i.nodeName){var n=e.getComputedStyle(i);0===n.width.indexOf("24px")&&0===n.height.indexOf("24px")&&i.remove()}t.remove()}var b=e.socialWarfarePlugin,g=n(t("body").css("padding-top").replace("px","")),m=n(t("body").css("padding-bottom").replace("px","")),y={};socialWarfarePlugin.fetchFacebookShares=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,i){if(void 0!==e[0].share){var a=n(e[0].share.share_count),o=n(e[0].share.comment_count);if(void 0!==e[0].og_object)var s=n(e[0].og_object.likes.summary.total_count);else var s=0;var r=a+o+s;if(swp_post_recovery_url){if(void 0!==i[0].share)var p=n(i[0].share.share_count),l=n(i[0].share.comment_count);else var p=0,l=0;if(void 0!==i[0].og_object)var c=n(i[0].og_object.likes.summary.total_count);else var c=0;var d=p+l+c;r!==d&&(r+=d)}y={action:"swp_facebook_shares_update",post_id:swp_post_id,share_counts:r},t.post(swp_admin_ajax,y)}})},b.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")){o();var e=t(this).find(".swp_share").outerWidth(),i=t(this).find("i.sw").outerWidth(),n=t(this).width(),a=1+(e+35)/n;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(){o()})},t(e).on("load",function(){"undefined"!=typeof swpPinIt&&swpPinIt.enabled&&u()}),t(document).ready(function(){_(),f();var i=t(".swp_social_panelSide"),a=!1;if(t(".swp_social_panel").hover(function(){a=!0},function(){a=!1}),t(e).resize(b.debounce(250,function(){t(".swp_social_panel").length&&!1!==a||(e.swpAdjust=1,f())})),t(document.body).on("post-load",function(){f()}),0!==i.length){if(-1!==t(i).attr("class").indexOf("swp_side"))return;var o=t(i).height(),s=t(e).height(),r=n(s/2-o/2);setTimeout(function(){t(i).animate({top:r},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,n=/iPad/i,a=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,o=/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,p=/Windows Phone/i,l=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,c=/BlackBerry/i,d=/BB10/i,h=/Opera Mini/i,f=/(CriOS|Chrome)(?=.*\bMobile\b)/i,u=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,_=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),w=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:w(t,v),ipod:w(i,v),tablet:!w(t,v)&&w(n,v),device:w(t,v)||w(i,v)||w(n,v)},this.amazon={phone:w(s,v),tablet:!w(s,v)&&w(r,v),device:w(s,v)||w(r,v)},this.android={phone:w(s,v)||w(a,v),tablet:!w(s,v)&&!w(a,v)&&(w(r,v)||w(o,v)),device:w(s,v)||w(r,v)||w(a,v)||w(o,v)},this.windows={phone:w(p,v),tablet:w(l,v),device:w(p,v)||w(l,v)},this.other={blackberry:w(c,v),blackberry10:w(d,v),opera:w(h,v),firefox:w(u,v),chrome:w(f,v),device:w(c,v)||w(d,v)||w(h,v)||w(u,v)||w(f,v)},this.seven_inch=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);
|
@@ -1,9 +1,9 @@
|
|
1 |
=== WordPress Social Sharing Plugin - Social Warfare ===
|
2 |
Contributors: holas84, dustinwstout, webinator, warfareplugins, nutsandboltsmedia, cdegraff1, ckmahoney
|
3 |
-
Tags: sharing buttons, social media share, floating share buttons, facebook share, google plus share, linkedin share, pin it, pinterest save,
|
4 |
Requires at least: 3.5.1
|
5 |
Tested up to: 4.9
|
6 |
-
Stable tag: 3.
|
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.
|
@@ -193,10 +193,30 @@ We have a growing archive of <a href="https://warfareplugins.com/support/" rel="
|
|
193 |
|
194 |
== Changelog ==
|
195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
= 3.1.1 (12 JUl 2018) =
|
197 |
* Fixed Javascript "minWidth" is undefined.
|
198 |
* Fixed which buttons are displayed when using Dynamic Sorting.
|
199 |
-
* Fixed "Undefined Index: post_id" error.
|
200 |
* Changed default "Float Before Content" from "ON" to "OFF".
|
201 |
* Removed excess printing of "Float Before Content" variable.
|
202 |
|
1 |
=== WordPress Social Sharing Plugin - Social Warfare ===
|
2 |
Contributors: holas84, dustinwstout, webinator, warfareplugins, nutsandboltsmedia, cdegraff1, ckmahoney
|
3 |
+
Tags: sharing buttons, social media share, floating share buttons, facebook share, google plus share, linkedin share, pin it, pinterest save, mix 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.2.0
|
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.
|
193 |
|
194 |
== Changelog ==
|
195 |
|
196 |
+
= 3.2.0 (13 AUG 2018) =
|
197 |
+
* Shoutout to our Warfare Community beta testers- thank you so much!
|
198 |
+
* Created shortcode for Pinterest Image.
|
199 |
+
* Created Custom Pinterst Description on a per-image basis.
|
200 |
+
* Fixed the Total Shares icon/counts not displaying.
|
201 |
+
* Fixed many JS related issues on floating and mobile buttons.
|
202 |
+
* Fixed an issue where some buttons did not display on some posts (after 'post_updated' fires).
|
203 |
+
* Fixed the total shares missing counts from LinkedIn and Google Plus.
|
204 |
+
* Fixed floating buttons not showing until bottom of content.
|
205 |
+
* Fixed where posts were receiving false share counts from Facebook.
|
206 |
+
* Fixed the update process for addons (like Pro) so it should now receive dashboard notifications.
|
207 |
+
* Fixed sharing on Pinterest when images use relative paths instead of absolute paths.
|
208 |
+
* Fixed hidden Pinterest image from covering content "below".
|
209 |
+
* Changed the cursor from cursor to pointer for Total Shares hover state.
|
210 |
+
* Added option to add data-pin-description to all images in a post.
|
211 |
+
* Added !important tags for our Custom Color option.
|
212 |
+
* Added check for whether or not to fetch share counts (based on Button Count and Total Count settings).
|
213 |
+
* Updated the visibility of Mobile Float Location option.
|
214 |
+
* Replaced New Share Counts with Twitcount.
|
215 |
+
|
216 |
= 3.1.1 (12 JUl 2018) =
|
217 |
* Fixed Javascript "minWidth" is undefined.
|
218 |
* Fixed which buttons are displayed when using Dynamic Sorting.
|
219 |
+
* Fixed "Undefined Index: post_id" error.
|
220 |
* Changed default "Float Before Content" from "ON" to "OFF".
|
221 |
* Removed excess printing of "Float Before Content" variable.
|
222 |
|
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Social Warfare
|
4 |
* Plugin URI: https://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.
|
7 |
* Author: Warfare Plugins
|
8 |
* Author URI: https://warfareplugins.com
|
9 |
* Text Domain: social-warfare
|
@@ -16,7 +16,7 @@ defined( 'WPINC' ) || die;
|
|
16 |
* Define plugin constants for use throughout the plugin (Version and Directories)
|
17 |
*
|
18 |
*/
|
19 |
-
define( 'SWP_VERSION' , '3.
|
20 |
define( 'SWP_PLUGIN_FILE', __FILE__ );
|
21 |
define( 'SWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
|
22 |
define( 'SWP_PLUGIN_DIR', dirname( __FILE__ ) );
|
3 |
* Plugin Name: Social Warfare
|
4 |
* Plugin URI: https://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.2.0
|
7 |
* Author: Warfare Plugins
|
8 |
* Author URI: https://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.2.0' );
|
20 |
define( 'SWP_PLUGIN_FILE', __FILE__ );
|
21 |
define( 'SWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
|
22 |
define( 'SWP_PLUGIN_DIR', dirname( __FILE__ ) );
|