WordPress Social Sharing Plugin – Social Warfare - Version 3.0.5

Version Description

Download this release

Release Info

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

Code changes from version 3.0.1 to 3.0.5

README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Social Warfare Repository and Issue Tracker
2
+ This is a public repository for the Social Warfare WordPress plugin created primarily for the purpose of publishing and maintaining a public list of bugs, known issues, and feature requests with the community at large. Please use the "Issues" link above to track or add information to existing issues or to submit new issues altogether (see the guidelines below prior to adding a new issue).
3
+
4
+ ***
5
+
6
+ ## Guidelines & Standards for Creating & Updating Code on This Project
7
+
8
+ Coding Standards are an important factor for achieving a high code quality. A common visual style, naming conventions and other technical settings allow us to produce a homogenous code which is easy to read and maintain.
9
+
10
+ While this project has used various coding standards over time, this guide should provide the framework for all new code additions and to updates made to existing code.
11
+
12
+ ### WordPress Coding Standards
13
+ All WordPress coding standards should be followed. Anything not specifically defined here should defer to WordPress's recommended coding standards found here: [WordPress Coding Standards](https://codex.wordpress.org/WordPress_Coding_Standards).
14
+
15
+ ### Variables and Class Names
16
+ All PHP and Javascript variables, functions and classes, and CSS classes and ID's should follow the following naming standards.
17
+
18
+ **PHP:** All names in PHP will use the Snake Case nomenclature. Independent function names will be preceded with the swp_ vendor prefix (e.g. swp_my_function_name). Methods and properties within classes do not require this prefix.
19
+
20
+ Classes will be snake cased as well, but will also have the first letter of each word capitalized. Class names will also use the singular and never plural (e.g. My_Thing, not My_Things). The first letter will be capitalized on variables containing an instance of a class as well (e.g. $Class = new SWP_Class() ).
21
+
22
+ Line breaks in PHP will be used generously to make the code more easily readable. Two blank lines will be used after a function or method and before the beginning of the docblock for the next function or method. One blank line will appear at the end (but within) each standard dockblock. One blank line will appear immediately before any forward-slashed comments.
23
+
24
+ **Javascript:** In Javascript, we will use the camelCase nomenclature.
25
+
26
+ **CSS:** CSS selectors will use the snake_case nomenclature just as in our PHP code.
27
+
28
+ ### Conditionals and Loops
29
+ No inline/same-line conditionals or loops will be used, nor will we continue to use brace syntax. Rather we will use the colin/endif syntax.
30
+
31
+ ### Docblocking
32
+ Each file should begin with a docblock, as well as each function and class should be preceded with a docblock to explain it's purpose and functionality. There is no such thing as too much documentation on this project. The purpose is that any developer or even a non-developer should be able to easily browse each file and know exactly what is happening in that file.
33
+
34
+ ***
35
+
36
+ ## Guidelines for Submitting Issues to this GitHub Issue Tracker
37
+ Before submitting an issue to the issue tracker, please be sure of a few things. By following these guidelines, you maximize the possibility of our development team being able to find a solution to the issue in a quick and thorough manner.
38
+
39
+ ### Prerequisites: Do this BEFORE submitting an issue
40
+
41
+ #### 1. Check the Documentation
42
+ First check the [support documentation](https://warfareplugins.com/support/) on the Warfare Plugins website to ensure that a solution to your issue has not already been addressed. Once you've determined that there is no useful information for your particular issue, you may proceed to step 2.
43
+
44
+ #### 2. Submit a Support Ticket First
45
+ Once you have completed step 1, you need to submit a ticket using the [contact form on the Warfare Plugins website](https://warfareplugins.com/). Once submitted, most tickets are responded to on the same or next business day so please allow until the end of the next business day for a response.
46
+
47
+ Many tickets being posted here are issues that simply require adjusting a single setting to accomodate themes or plugins in certain ways. The support team is able to respond to these much, much more quickly than here in the developer's workspace. Since this is the case, any issues submitted without first going through the support team will be deleted. Otherwise it is a waste of both your time and ours.
48
+
49
+ #### 3. Create an Issue on GitHub
50
+ Only once you have completed the above steps should you submit an issue to GitHub. GitHub is the workspace of the development team. In the rare instances where the support team is unable to solve a particular issue, it will be brought here to be tracked and solved by the development team. GitHub is public so that not only the support team, but also all users can view and track the progress of issues as well as commenting and participating in the conversation regarding each issue.
51
+
52
+ ### Required Information: Provide this information WHILE submitting an issue
53
+ Once you've gone through support and you're ready to submit a GitHub issue, please **copy and paste the following information into your GitHub issue and fill out the blanks**:
54
+
55
+ #### Description of the Issue
56
+
57
+ A. Describe the nature of the issue:
58
+
59
+ B. How can this issue be replicated?:
60
+
61
+ C. Is this issue able to be viewed on your site right now? If so, where?
62
+
63
+ #### Additional Information
64
+
65
+ A. What version of the plugin are you using?
66
+
67
+ B. What version of WordPress are you using?
68
+
69
+ C. What caching plugin(s) are you using?
70
+
71
+ D. What version of PHP are you using?
css/admin-options.min.css CHANGED
@@ -1,5 +1,5 @@
1
- border: rgb(221, 221, 221);
2
- box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
3
- height: 120px;
4
- width: 97%
5
  __ESCAPED_SOURCE_END_CLEAN_CSS__
1
+ border: rgb(221, 221, 221);
2
+ box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
3
+ height: 120px;
4
+ width: 97%
5
  __ESCAPED_SOURCE_END_CLEAN_CSS__
css/style.css CHANGED
@@ -1695,7 +1695,7 @@ a.style6:hover .sw-click-to-tweet i.swp_twitter {
1695
  transform: scale(0.7);
1696
  }
1697
 
1698
- .swp_social_panel:not(.nc_floater).scale-70.scale-fullWidth {
1699
  width: 142.8571428571429%!important;
1700
  }
1701
 
@@ -1705,7 +1705,7 @@ a.style6:hover .sw-click-to-tweet i.swp_twitter {
1705
  transform: scale(0.8);
1706
  }
1707
 
1708
- .swp_social_panel:not(.nc_floater).scale-80.scale-fullWidth {
1709
  width: 125%!important;
1710
  }
1711
 
@@ -1715,7 +1715,7 @@ a.style6:hover .sw-click-to-tweet i.swp_twitter {
1715
  transform: scale(0.9);
1716
  }
1717
 
1718
- .swp_social_panel:not(.nc_floater).scale-90.scale-fullWidth {
1719
  width: 111.111111111111%!important;
1720
  }
1721
 
@@ -1725,7 +1725,7 @@ a.style6:hover .sw-click-to-tweet i.swp_twitter {
1725
  transform: scale(1.1);
1726
  }
1727
 
1728
- .swp_social_panel:not(.nc_floater).scale-110.scale-fullWidth {
1729
  width: 90.90909090909091%!important;
1730
  }
1731
 
@@ -1735,7 +1735,7 @@ a.style6:hover .sw-click-to-tweet i.swp_twitter {
1735
  transform: scale(1.2);
1736
  }
1737
 
1738
- .swp_social_panel:not(.nc_floater).scale-120.scale-fullWidth {
1739
  width: 83.33333333333333%!important;
1740
  }
1741
 
@@ -1745,7 +1745,7 @@ a.style6:hover .sw-click-to-tweet i.swp_twitter {
1745
  transform: scale(1.3);
1746
  }
1747
 
1748
- .swp_social_panel:not(.nc_floater).scale-130.scale-fullWidth {
1749
  width: 76.92307692307692%!important;
1750
  }
1751
 
@@ -1755,11 +1755,11 @@ a.style6:hover .sw-click-to-tweet i.swp_twitter {
1755
  transform: scale(1.4);
1756
  }
1757
 
1758
- .swp_social_panel:not(.nc_floater).scale-140.scale-fullWidth {
1759
  width: 71.42857142857143%!important;
1760
  }
1761
 
1762
- .scale-fullWidth,
1763
  .scale-left,
1764
  .nc_floater.scale-center,
1765
  .nc_floater.scale-right {
1695
  transform: scale(0.7);
1696
  }
1697
 
1698
+ .swp_social_panel:not(.nc_floater).scale-70.scale-full_width {
1699
  width: 142.8571428571429%!important;
1700
  }
1701
 
1705
  transform: scale(0.8);
1706
  }
1707
 
1708
+ .swp_social_panel:not(.nc_floater).scale-80.scale-full_width {
1709
  width: 125%!important;
1710
  }
1711
 
1715
  transform: scale(0.9);
1716
  }
1717
 
1718
+ .swp_social_panel:not(.nc_floater).scale-90.scale-full_width {
1719
  width: 111.111111111111%!important;
1720
  }
1721
 
1725
  transform: scale(1.1);
1726
  }
1727
 
1728
+ .swp_social_panel:not(.nc_floater).scale-110.scale-full_width {
1729
  width: 90.90909090909091%!important;
1730
  }
1731
 
1735
  transform: scale(1.2);
1736
  }
1737
 
1738
+ .swp_social_panel:not(.nc_floater).scale-120.scale-full_width {
1739
  width: 83.33333333333333%!important;
1740
  }
1741
 
1745
  transform: scale(1.3);
1746
  }
1747
 
1748
+ .swp_social_panel:not(.nc_floater).scale-130.scale-full_width {
1749
  width: 76.92307692307692%!important;
1750
  }
1751
 
1755
  transform: scale(1.4);
1756
  }
1757
 
1758
+ .swp_social_panel:not(.nc_floater).scale-140.scale-full_width {
1759
  width: 71.42857142857143%!important;
1760
  }
1761
 
1762
+ .scale-full_width,
1763
  .scale-left,
1764
  .nc_floater.scale-center,
1765
  .nc_floater.scale-right {
css/style.min.css CHANGED
@@ -1 +1 @@
1
- .swp_social_panel{clear:both;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;height:34px;line-height:1;margin-bottom:20px!important;margin-top:20px!important;overflow:hidden;padding:0;-webkit-align-items:stretch;align-items:stretch;-webkit-box-align:stretch;-moz-box-align:stretch;-webkit-box-pack:justify;-moz-box-pack:justify;direction:ltr;-ms-flex-align:stretch;-ms-flex-line-pack:center;-ms-flex-pack:justify;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-justify-content:space-between;justify-content:space-between}.swp_social_panel:not(.nc_floater):not(.swp_social_panelSide){width:100%!important}.nc_wrapper .swp_social_panel{margin-bottom:10px!important;margin-top:10px!important}div.swp_social_panel .nc_tweetContainer{-webkit-border-radius:2px;border-radius:2px;cursor:pointer;float:left;font-family:Lato;height:32px;margin:0 5px 3px;min-width:34px;overflow:hidden;text-align:center;-webkit-transition:all .1s linear;transition:all .1s linear}div.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.swp_social_panel .nc_tweetContainer a.nc_tweet,.swp_social_panel .total_shares .swp_count{display:block;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;font-family:Lato,sans-serif;font-size:18px!important;font-weight:700;height:30px;text-decoration:none;text-decoration:none!important;text-transform:none;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap}.swp_social_panel:not(.nc_floater):not(.swp_social_panelSide).swp_shift{padding:0 10px}.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:nth-child(1){margin-left:0}.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:nth-last-child(1){margin-right:0}.swp_social_panel a .swp_count:not(.swp_hide){display:inline-block;line-height:32px;margin:0;padding:0 5px;-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.swp_social_panel .total_shares .swp_count,span.swp_share{line-height:30px}.swp_social_panel a .swp_count.swp_hide{margin:0 auto}.swp_social_panel span:before{content:initial!important}.swp_social_panel span.swp_count{font-size:14px}.swp_social_panel span.iconFiller{font-size:18px;margin:0 auto}.swp_social_panel.notMobile .nc_tweetContainer:nth-child(1){margin-left:0}.swp_social_panel:not(.swp_social_panelSide){-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.swp_social_panel:not(.swp_social_panelSide) div.total_shares.total_sharesalt:nth-child(1){margin-left:0;margin-right:15px;padding-left:0}.swp_social_panel:not(.swp_social_panelSide) div.total_shares.total_sharesalt:nth-last-child(1){margin-right:0;padding-right:0}a.swp_CTT{cursor:pointer}span.swp_share{display:block;float:right;float:left;font-size:14px;font-weight:400;height:30px;margin:0 0 0 6px;max-width:none!important;vertical-align:middle}.swp_social_panelSide span.swp_share{margin:0}.swp_social_panel .sw{float:left;height:30px;line-height:32px;margin:0 5px;text-shadow:none!important;width:20px}.iconFiller{display:block;float:left;height:30px;overflow:hidden;-webkit-transition:width .1s linear;transition:width .1s linear}.swp_social_panel .iconFiller{width:30px}span.spaceManWilly{display:block;width:120px}.swp_social_panel .total_shares{background:#c4c4c4;border:1px solid #e08a0f;-webkit-border-radius:2px;border-radius:2px;color:#fff;cursor:default;display:block;font-size:19px;padding:0 10px;-webkit-box-flex:0!important;-moz-box-flex:0!important;-webkit-flex:none!important;-ms-flex:none!important;flex:none!important}.swp_social_panel div.total_shares.total_sharesalt,.swp_social_panel:hover div.total_shares.total_sharesalt:not(:nth-child(1)){background:0 0!important;border:none;color:#474b4d;margin-left:0!important}div.swp_social_panel:hover div.total_shares.total_sharesalt:not(:nth-child(1)){background:0 0;color:#474b4d;margin-left:10px}.swp_social_panel .total_shares.total_sharesalt .swp_label{color:#474b4d;font-size:10px;letter-spacing:0;min-width:40px;vertical-align:middle}.swp_social_panel .total_shares .swp_label{font-size:10px;vertical-align:middle}.swp_social_panel .total_shares.total_sharesalt .swp_count{color:#474b4d;font-size:24px}.swp_social_panel.swp_customFull:hover div.total_shares,.swp_social_panel.swp_fade .total_shares,.swp_social_panel.swp_full_color .total_shares,.swp_social_panel:hover .total_shares{background:#e08a0f}.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer.total_shares.total_sharesalt:before{content:"o";display:inline-block;font-family:sw-icon-font;margin-top:7px;vertical-align:top}.swp_social_panel:not(.swp_social_panelSide) .total_shares.total_sharesalt .swp_count{display:inline-block;line-height:0;margin-left:8px;margin-top:12px;min-width:45px;position:relative;vertical-align:middle}span.swp_label{display:block;font-size:9px!important;margin-top:13px;position:absolute;text-align:center!important;text-transform:uppercase}.swp_social_panelSide span.swp_label{margin-top:0}.swp_social_panel.swp_leaf .nc_tweetContainer{-webkit-border-radius:15px 0!important;border-radius:15px 0!important;border-width:1px}.swp_social_panel.swp_pill .nc_tweetContainer{-webkit-border-radius:50px;border-radius:50px;border-width:1px}.swp_social_panel.swp_shift .nc_tweetContainer:not(.total_shares){border-width:1px;-moz-transform:skew(-25deg);-o-transform:skew(-25deg);-webkit-transform:skew(-25deg)}.swp_social_panel.swp_shift .nc_tweetContainer a{-moz-transform:skew(25deg);-o-transform:skew(25deg);-webkit-transform:skew(25deg)}.swp_connected .nc_tweetContainer,.swp_connected .nc_tweetContainer:hover,.swp_connected:hover .nc_tweetContainer{-webkit-border-radius:0!important;border-radius:0!important;border-width:1px;margin:0!important}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_google_plus,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_google_plus:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_google_plus:hover{border:1px solid #df4b37}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_twitter,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_twitter:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_twitter:hover{border:1px solid #429cd6}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_facebook,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_facebook:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_facebook:hover{border:1px solid #3a589e}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_pinterest,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_pinterest:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_pinterest:hover{border:1px solid #cd2029}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_linkedin,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_linkedin:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_linkedin:hover{border:1px solid #0d77b7}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_tumblr,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_tumblr:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_tumblr:hover{border:1px solid #39475d}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_stumbleupon,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_stumbleupon:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_stumbleupon:hover{border:1px solid #ef5025}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_yummly,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_yummly:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_yummly:hover{border:1px solid #e26426}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_reddit,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_reddit:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_reddit:hover{border:1px solid #f04b23}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_email,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_email:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_email:hover{border:1px solid #6bcce9}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_whatsapp,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_whatsapp:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_whatsapp:hover{border:1px solid #71c169}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_pocket,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_pocket:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_pocket:hover{border:1px solid #ef4056}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_buffer,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_buffer:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_buffer:hover{border:1px solid #323b43}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_hacker_news,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_hacker_news:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_hacker_news:hover{border:1px solid #d85623}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_flipboard,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_flipboard:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_flipboard:hover{border:1px solid #bf2626}.swp_social_panel.swp_default_full_color .swp_google_plus,body .swp_social_panel.swp_other_full_color:hover .swp_google_plus,html body .swp_social_panel.swp_individual_full_color .swp_google_plus:hover{background:#df4b37;border:1px solid #c44133}.swp_social_panel.swp_default_full_color .swp_twitter,body .swp_social_panel.swp_other_full_color:hover .swp_twitter,html body .swp_social_panel.swp_individual_full_color .swp_twitter:hover{background:#429cd6;border:1px solid #3c87b2}.swp_social_panel.swp_default_full_color .swp_facebook,body .swp_social_panel.swp_other_full_color:hover .swp_facebook,html body .swp_social_panel.swp_individual_full_color .swp_facebook:hover{background:#3a589e;border:1px solid #2e4675}.swp_social_panel.swp_default_full_color .swp_pinterest,body .swp_social_panel.swp_other_full_color:hover .swp_pinterest,html body .swp_social_panel.swp_individual_full_color .swp_pinterest:hover{background:#cd2029;border:1px solid #aa1b29}.swp_social_panel.swp_default_full_color .swp_linkedin,body .swp_social_panel.swp_other_full_color:hover .swp_linkedin,html body .swp_social_panel.swp_individual_full_color .swp_linkedin:hover{background:#0d77b7;border:1px solid #0c6591}.swp_social_panel.swp_default_full_color .swp_tumblr,body .swp_social_panel.swp_other_full_color:hover .swp_tumblr,html body .swp_social_panel.swp_individual_full_color .swp_tumblr:hover{background:#39475d;border:1px solid #27313f}.swp_social_panel.swp_default_full_color .swp_stumbleupon,body .swp_social_panel.swp_other_full_color:hover .swp_stumbleupon,html body .swp_social_panel.swp_individual_full_color .swp_stumbleupon:hover{background:#ef5025;border:1px solid #d34427}.swp_social_panel.swp_default_full_color .swp_yummly,body .swp_social_panel.swp_other_full_color:hover .swp_yummly,html body .swp_social_panel.swp_individual_full_color .swp_yummly:hover{background:#e26426;border:1px solid #b65027}.swp_social_panel.swp_default_full_color .swp_reddit,body .swp_social_panel.swp_other_full_color:hover .swp_reddit,html body .swp_social_panel.swp_individual_full_color .swp_reddit:hover{background:#f04b23;border:1px solid #d33f27}.swp_social_panel.swp_default_full_color .swp_email,body .swp_social_panel.swp_other_full_color:hover .swp_email,html body .swp_social_panel.swp_individual_full_color .swp_email:hover{background:#6bcce9;border:1px solid #61bace}.swp_social_panel.swp_default_full_color .swp_whatsapp,body .swp_social_panel.swp_other_full_color:hover .swp_whatsapp,html body .swp_social_panel.swp_individual_full_color .swp_whatsapp:hover{background:#71c169;border:1px solid #28b04b}.swp_social_panel.swp_default_full_color .swp_pocket,body .swp_social_panel.swp_other_full_color:hover .swp_pocket,html body .swp_social_panel.swp_individual_full_color .swp_pocket:hover{background:#ef4056;border:1px solid #ce3d55}.swp_social_panel.swp_default_full_color .swp_buffer,body .swp_social_panel.swp_other_full_color:hover .swp_buffer,html body .swp_social_panel.swp_individual_full_color .swp_buffer:hover{background:#323b43;border:1px solid #000}.swp_social_panel.swp_default_full_color .swp_hacker_news,body .swp_social_panel.swp_other_full_color:hover .swp_hacker_news,html body .swp_social_panel.swp_individual_full_color .swp_hacker_news:hover{background:#f16522;border:1px solid #d85623}.swp_social_panel.swp_default_full_color .swp_flipboard,body .swp_social_panel.swp_other_full_color:hover .swp_flipboard,html body .swp_social_panel.swp_individual_full_color .swp_flipboard:hover{background:#e02828;border:1px solid #bf2626}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_google_plus,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_google_plus,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_google_plus:hover{border-bottom:3px solid #c44133}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_twitter,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_twitter,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_twitter:hover{border-bottom:3px solid #5595bc}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_facebook,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_facebook,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_facebook:hover{border-bottom:3px solid #2e4675}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_pinterest,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_pinterest,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_pinterest:hover{border-bottom:3px solid #aa1b29}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_linkedin,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_linkedin,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_linkedin:hover{border-bottom:3px solid #0c6591}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_tumblr,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_tumblr,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_tumblr:hover{border-bottom:3px solid #27313f}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_stumbleupon,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_stumbleupon,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_stumbleupon:hover{border-bottom:3px solid #d34427}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_yummly,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_yummly,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_yummly:hover{border-bottom:3px solid #b65027}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_reddit,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_reddit,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_reddit:hover{border-bottom:3px solid #d33f27}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_email,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_email,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_email:hover{border-bottom:3px solid #61bace}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_whatsapp,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_whatsapp,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_whatsapp:hover{border-bottom:3px solid #28b04b}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_pocket,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_pocket,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_pocket:hover{border-bottom:3px solid #ce3d55}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_buffer,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_buffer,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_buffer:hover{border-bottom:3px solid #000}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_hacker_news,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_hacker_news,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_hacker_news:hover{border-bottom:3px solid #d85623}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_flipboard,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_flipboard,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_flipboard:hover{border-bottom:3px solid #bf2626}.swp_social_panel.swp_default_light_gray .nc_tweetContainer,body .swp_social_panel.swp_other_light_gray:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_light_gray .nc_tweetContainer:hover{background-color:#ccc;border:1px solid #ccc}.swp_social_panel.swp_three_dee.swp_default_light_gray .nc_tweetContainer:not(.total_sharesalt),body .swp_social_panel.swp_three_dee.swp_other_light_gray:hover .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_light_gray .nc_tweetContainer:not(.total_sharesalt):hover{border-bottom:3px solid #999}.swp_social_panel.swp_default_medium_gray .nc_tweetContainer,body .swp_social_panel.swp_other_medium_gray:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_medium_gray .nc_tweetContainer:hover{background-color:#999;border:1px solid #999}.swp_social_panel.swp_three_dee.swp_default_medium_gray .nc_tweetContainer:not(.total_sharesalt),body .swp_social_panel.swp_three_dee.swp_other_medium_gray:hover .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_medium_gray .nc_tweetContainer:not(.total_sharesalt):hover{border-bottom:3px solid #444}.swp_social_panel.swp_default_dark_gray .nc_tweetContainer,body .swp_social_panel.swp_other_dark_gray:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_dark_gray .nc_tweetContainer:hover{background-color:#444;border:1px solid #444}.swp_social_panel.swp_three_dee.swp_default_dark_gray .nc_tweetContainer:not(.total_sharesalt),body .swp_social_panel.swp_three_dee.swp_other_dark_gray:hover .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_dark_gray .nc_tweetContainer:not(.total_sharesalt):hover{border-bottom:3px solid #222}.swp_social_panel.swp_default_light_gray_outlines a,body .swp_social_panel.swp_other_light_gray_outlines:hover a,html body .swp_social_panel.swp_individual_light_gray_outlines a:hover{color:#ccc}.swp_social_panel.swp_default_light_gray_outlines .nc_tweetContainer,body .swp_social_panel.swp_other_light_gray_outlines:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_light_gray_outlines .nc_tweetContainer:hover{background:0 0;border:1px solid #ccc}.swp_social_panel.swp_default_medium_gray_outlines a,body .swp_social_panel.swp_other_medium_gray_outlines:hover a,html body .swp_social_panel.swp_individual_medium_gray_outlines a:hover{color:#999}.swp_social_panel.swp_default_medium_gray_outlines .nc_tweetContainer,body .swp_social_panel.swp_other_medium_gray_outlines:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_medium_gray_outlines .nc_tweetContainer:hover{background:0 0;border:1px solid #999}.swp_social_panel.swp_default_dark_gray_outlines a,body .swp_social_panel.swp_other_dark_gray_outlines:hover a,html body .swp_social_panel.swp_individual_dark_gray_outlines a:hover{color:#444}.swp_social_panel.swp_default_dark_gray_outlines .nc_tweetContainer,body .swp_social_panel.swp_other_dark_gray_outlines:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_dark_gray_outlines .nc_tweetContainer:hover{background:0 0;border:1px solid #444}.swp_social_panel.swp_default_color_outlines .swp_google_plus a,body .swp_social_panel.swp_other_color_outlines:hover .swp_google_plus a,html body .swp_social_panel.swp_individual_color_outlines .swp_google_plus a:hover{color:#df4b37}.swp_social_panel.swp_default_color_outlines .swp_facebook a,body .swp_social_panel.swp_other_color_outlines:hover .swp_facebook a,html body .swp_social_panel.swp_individual_color_outlines .swp_facebook a:hover{color:#3a589e}.swp_social_panel.swp_default_color_outlines .swp_pinterest a,body .swp_social_panel.swp_other_color_outlines:hover .swp_pinterest a,html body .swp_social_panel.swp_individual_color_outlines .swp_pinterest a:hover{color:#cd2029}.swp_social_panel.swp_default_color_outlines .swp_linkedin a,body .swp_social_panel.swp_other_color_outlines:hover .swp_linkedin a,html body .swp_social_panel.swp_individual_color_outlines .swp_linkedin a:hover{color:#0d77b7}.swp_social_panel.swp_default_color_outlines .swp_tumblr a,body .swp_social_panel.swp_other_color_outlines:hover .swp_tumblr a,html body .swp_social_panel.swp_individual_color_outlines .swp_tumblr a:hover{color:#39475d}.swp_social_panel.swp_default_color_outlines .swp_stumbleupon a,body .swp_social_panel.swp_other_color_outlines:hover .swp_stumbleupon a,html body .swp_social_panel.swp_individual_color_outlines .swp_stumbleupon a:hover{color:#ef5025}.swp_social_panel.swp_default_color_outlines .swp_yummly a,body .swp_social_panel.swp_other_color_outlines:hover .swp_yummly a,html body .swp_social_panel.swp_individual_color_outlines .swp_yummly a:hover{color:#e26426}.swp_social_panel.swp_default_color_outlines .swp_whatsapp a,body .swp_social_panel.swp_other_color_outlines:hover .swp_whatsapp a,html body .swp_social_panel.swp_individual_color_outlines .swp_whatsapp a:hover{color:#71c169}.swp_social_panel.swp_default_color_outlines .swp_pocket a,body .swp_social_panel.swp_other_color_outlines:hover .swp_pocket a,html body .swp_social_panel.swp_individual_color_outlines .swp_pocket a:hover{color:#ef4056}.swp_social_panel.swp_default_color_outlines .swp_reddit a,body .swp_social_panel.swp_other_color_outlines:hover .swp_reddit a,html body .swp_social_panel.swp_individual_color_outlines .swp_reddit a:hover{color:#f04b23}.swp_social_panel.swp_default_color_outlines .swp_email a,body .swp_social_panel.swp_other_color_outlines:hover .swp_email a,html body .swp_social_panel.swp_individual_color_outlines .swp_email a:hover{color:#6bcce9}.swp_social_panel.swp_default_color_outlines .swp_buffer a,body .swp_social_panel.swp_other_color_outlines:hover .swp_buffer a,html body .swp_social_panel.swp_individual_color_outlines .swp_buffer a:hover{color:#323b43}.swp_social_panel.swp_default_color_outlines .swp_hacker_news a,body .swp_social_panel.swp_other_color_outlines:hover .swp_hacker_news a,html body .swp_social_panel.swp_individual_color_outlines .swp_hacker_news a:hover{color:#f16522}.swp_social_panel.swp_default_color_outlines .swp_flipboard a,body .swp_social_panel.swp_other_color_outlines:hover .swp_flipboard a,html body .swp_social_panel.swp_individual_color_outlines .swp_flipboard a:hover{color:#e02828}.swp_social_panel.swp_default_color_outlines .swp_google_plus,body .swp_social_panel.swp_other_color_outlines:hover .swp_google_plus,html body .swp_social_panel.swp_individual_color_outlines .swp_google_plus:hover{background:0 0;border:1px solid #df4b37}.swp_social_panel.swp_default_color_outlines .swp_twitter,body .swp_social_panel.swp_other_color_outlines:hover .swp_twitter,html body .swp_social_panel.swp_individual_color_outlines .swp_twitter:hover{background:0 0;border:1px solid #429cd6}.swp_social_panel.swp_default_color_outlines .swp_facebook,body .swp_social_panel.swp_other_color_outlines:hover .swp_facebook,html body .swp_social_panel.swp_individual_color_outlines .swp_facebook:hover{background:0 0;border:1px solid #3a589e}.swp_social_panel.swp_default_color_outlines .swp_pinterest,body .swp_social_panel.swp_other_color_outlines:hover .swp_pinterest,html body .swp_social_panel.swp_individual_color_outlines .swp_pinterest:hover{background:0 0;border:1px solid #cd2029}.swp_social_panel.swp_default_color_outlines .swp_linkedin,body .swp_social_panel.swp_other_color_outlines:hover .swp_linkedin,html body .swp_social_panel.swp_individual_color_outlines .swp_linkedin:hover{background:0 0;border:1px solid #0d77b7}.swp_social_panel.swp_default_color_outlines .swp_tumblr,body .swp_social_panel.swp_other_color_outlines:hover .swp_tumblr,html body .swp_social_panel.swp_individual_color_outlines .swp_tumblr:hover{background:0 0;border:1px solid #39475d}.swp_social_panel.swp_default_color_outlines .swp_stumbleupon,body .swp_social_panel.swp_other_color_outlines:hover .swp_stumbleupon,html body .swp_social_panel.swp_individual_color_outlines .swp_stumbleupon:hover{background:0 0;border:1px solid #ef5025}.swp_social_panel.swp_default_color_outlines .swp_yummly,body .swp_social_panel.swp_other_color_outlines:hover .swp_yummly,html body .swp_social_panel.swp_individual_color_outlines .swp_yummly:hover{background:0 0;border:1px solid #e26426}.swp_social_panel.swp_default_color_outlines .swp_whatsapp,body .swp_social_panel.swp_other_color_outlines:hover .swp_whatsapp,html body .swp_social_panel.swp_individual_color_outlines .swp_whatsapp:hover{background:0 0;border:1px solid #71c169}.swp_social_panel.swp_default_color_outlines .swp_reddit,body .swp_social_panel.swp_other_color_outlines:hover .swp_reddit,html body .swp_social_panel.swp_individual_color_outlines .swp_reddit:hover{background:0 0;border:1px solid #f04b23}.swp_social_panel.swp_default_color_outlines .swp_email,body .swp_social_panel.swp_other_color_outlines:hover .swp_email,html body .swp_social_panel.swp_individual_color_outlines .swp_email:hover{background:0 0;border:1px solid #6bcce9}.swp_social_panel.swp_default_color_outlines .swp_pocket,body .swp_social_panel.swp_other_color_outlines:hover .swp_pocket,html body .swp_social_panel.swp_individual_color_outlines .swp_pocket:hover{background:0 0;border:1px solid #ef4056}.swp_social_panel.swp_default_color_outlines .swp_buffer,body .swp_social_panel.swp_other_color_outlines:hover .swp_buffer,html body .swp_social_panel.swp_individual_color_outlines .swp_buffer:hover{background:0 0;border:1px solid #323b43}.swp_social_panel.swp_default_color_outlines .swp_hacker_news,body .swp_social_panel.swp_other_color_outlines:hover .swp_hacker_news,html body .swp_social_panel.swp_individual_color_outlines .swp_hacker_news:hover{background:0 0;border:1px solid #f16522}.swp_social_panel.swp_default_color_outlines .swp_flipboard,body .swp_social_panel.swp_other_color_outlines:hover .swp_flipboard,html body .swp_social_panel.swp_individual_color_outlines .swp_flipboard:hover{background:0 0;border:1px solid #bf2626}.swp_social_panelSide{flex-direction:column;height:auto;overflow:visible;-webkit-transition:all .2s linear;transition:all .2s linear;width:100px!important;z-index:9999999;margin:10px 5px!important;padding:0;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column}.swp_social_panelSide.fade,.swp_social_panelSide.slide{position:fixed;-webkit-transition:all .2s linear;transition:all .2s linear}.swp_social_panelSide.fade{display:none}.swp_social_panelSide.fade.swp_float_left{left:5px}.swp_social_panelSide.fade.swp_float_right{right:5px}.swp_social_panelSide[class*=swp_side]{height:100vh;display:flex;position:fixed;padding:30px 0;top:0}.swp_social_panelSide.swp_float_right{align-content:flex-end}.swp_social_panelSide.swp_side_top{justify-content:flex-start}.swp_social_panelSide.swp_side_bottom{justify-content:flex-end}.swp_social_panelSide.swp_side_center{justify-content:center}.swp_social_panelSide .nc_tweetContainer{background:#dd4b38;-webkit-border-radius:3px;border-radius:3px;clear:both;display:block;font-family:Lato,sans-serif;height:32px;margin:3px 0!important;overflow:hidden;padding:0;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:top;width:90px}.swp_social_panelSide .nc_tweetContainer .iconFiller{display:inline-block;height:40px;margin:0 6px;padding:0;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:middle;width:21px}.swp_social_panelSide .nc_tweetContainer .swp_count{display:inline-block;font-size:14px;height:32px;line-height:16px;margin:0;overflow:hidden;padding:0;text-align:right;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:top;width:0}.swp_social_panelSide .nc_tweetContainer a{cursor:pointer;display:block;font-weight:500;height:36px;margin:0;padding:0;text-decoration:none;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:top}.swp_social_panelSide .nc_tweetContainer .sw,.swp_social_panelSide .nc_tweetContainer .swp_share{float:left;line-height:34px}.swp_social_panelSide.swp_default .nc_tweetContainer .sw{line-height:32px}.swp_social_panelSide.swp_default .nc_tweetContainer .swp_share{line-height:30px}.swp_social_panelSide .nc_tweetContainer .swp_share{font-size:13px}.swp_social_panelSide .nc_tweetContainer:hover,.swp_social_panelSide .nc_tweetContainer:hover .iconFiller,.swp_social_panelSide .nc_tweetContainer:hover .swp_count{-webkit-transition:all .1s linear;transition:all .1s linear}.swp_social_panelSide.swp_boxed .nc_tweetContainer,.swp_social_panelSide.swp_circles .nc_tweetContainer{margin-bottom:5px;width:67.5px!important}.swp_social_panelSide.swp_boxed .nc_tweetContainer,.swp_social_panelSide.swp_boxed .nc_tweetContainer a,.swp_social_panelSide.swp_circles .nc_tweetContainer,.swp_social_panelSide.swp_circles .nc_tweetContainer a{width:67.5px;height:67.5px;position:relative}.swp_social_panelSide.swp_circles .nc_tweetContainer,.swp_social_panelSide.swp_circles .nc_tweetContainer a{border-radius:50%!important}.swp_social_panelSide.swp_boxed .nc_tweetContainer i.sw,.swp_social_panelSide.swp_circles .nc_tweetContainer i.sw{font-size:27px;height:40px;margin:0;padding-top:10px;text-align:center;width:100%}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_share,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_share{height:35px;opacity:0;position:absolute;bottom:0;left:0;text-align:center;width:67.5px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_count,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_count{height:35px;margin:0;padding:0;position:absolute;bottom:0;left:0;text-align:center;-webkit-transition:padding .1s linear;transition:padding .1s linear;width:100%}.swp_social_panelSide.swp_boxed .nc_tweetContainer span.swp_hide .iconFiller,.swp_social_panelSide.swp_boxed .nc_tweetContainer span.swp_hide .spaceManWilly,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_count.swp_hide,.swp_social_panelSide.swp_circles .nc_tweetContainer span.swp_hide .iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer span.swp_hide .spaceManWilly,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_count.swp_hide{height:67.5px;opacity:1}.swp_social_panelSide.swp_boxed .nc_tweetContainer span.iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer span.iconFiller{height:40px;width:67.5px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover span.swp_count:not(.swp_hide),.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover span.swp_count:not(.swp_hide){opacity:0}.swp_social_panelSide.swp_boxed .total_shares,.swp_social_panelSide.swp_circles .total_shares{padding:0;width:67.5px!important}.swp_social_panelSide .nc_tweetContainer:not(.total_shares){line-height:34px}.swp_social_panelSide:not(.swp_boxed):not(.swp_circles) .nc_tweetContainer:not(.total_shares) .iconFiller{margin-left:2px;width:30px}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_count{padding:0 8px;width:48px}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_count.swp_hide{padding:0;width:100%}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_hide .iconFiller{display:block;float:none;margin:0 auto}.swp_social_panelSide:not(.swp_boxed):not(.swp_circles) .nc_tweetContainer:not(.total_shares):hover{width:150px}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide .nc_tweetContainer:not(.total_shares):hover .iconFiller{width:90px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover .iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover .iconFiller{width:100%}.swp_social_panelSide .nc_tweetContainer.total_shares{background:rgba(0,0,0,0);border:0!important;font-weight:800;height:45px;margin:0;padding:0;text-align:center;width:90px;order:-100}.swp_social_panelSide .nc_tweetContainer.total_shares .swp_count{color:#444;display:block;font-family:Lato,sans-serif;height:28px;text-align:center;width:100%}.swp_social_panelSide .nc_tweetContainer.total_shares .swp_label{color:#444;display:block;font-family:Lato,sans-serif;font-size:50%;position:relative;text-align:center;width:100%}.nc_wrapper{background:#fff;position:fixed;-webkit-transition:top .5s bottom .5s;transition:top .5s bottom .5s;width:100%;z-index:99999}.nc_wrapper.bottom{bottom:0;left:0}.nc_wrapper.top{top:0;left:0}.nc_floater{margin:10px 0;position:relative;left:304px;width:740px}.swp_social_panelSide.hideCounts a{text-align:center}.swp_social_panelSide.hideCounts .iconFiller{float:none;text-align:left}.sw{display:inline-block;font-family:sw-icon-font!important;font-size:inherit;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-style:normal;font-weight:400;text-rendering:auto;text-transform:none!important;-ms-transform:translate(0,0);-webkit-transform:translate(0,0);transform:translate(0,0)}.sw:before{display:block!important}.wp-editor-container .sw:before{font-size:18px;line-height:22px}.wp-editor-container .sw-social-warfare:before{color:#ee464f}.mce-container .sw-social-warfare{color:#ee464f;font-size:20px;margin-right:15px;vertical-align:middle}i.swp_google_plus_icon:before{content:"h"}i.swp_pinterest_icon:before{content:"b"}i.swp_twitter_icon:before{content:"s"}i.swp_facebook_icon:before{content:"j"}i.swp_linkedin_icon:before{content:"f"}i.swp_tumblr_icon:before{content:"r"}i.swp_stumbleupon_icon:before{content:"q"}i.swp_reddit_icon:before{content:"a"}i.swp_email_icon:before{content:"k"}i.swp_yummly_icon:before{content:"x"}i.swp_whatsapp_icon:before{content:"y"}i.swp_pocket_icon:before{content:"B"}i.swp_buffer_icon:before{content:"z"}i.swp_hacker_news_icon:before{content:"D"}i.swp_flipboard_icon:before{content:"C"}.sw-social-warfare:before{content:"p"}.sw-click-to-tweet:after,.sw-tweet-clear:after{content:".";height:0;clear:both;visibility:hidden;display:block}.swp_CTT{text-decoration:none!important}.sw-tweet-clear{zoom:1}.sw-click-to-tweet{display:block;margin:15px 0;padding:15px 30px;position:relative}.sw-click-to-tweet:after{line-height:0}.sw-click-to-tweet .sw-ctt-text{margin:0 0 10px;padding:0;position:relative;word-wrap:break-word}a .sw-click-to-tweet .sw-ctt-text{display:block;font-size:24px;font-weight:500;line-height:140%;margin:0;padding:0;position:relative;text-decoration:none;text-transform:none}.sw-click-to-tweet .sw-ctt-btn{display:block;float:right;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:700;line-height:100%;margin:10px 0 0;padding:3px 5px 3px 3px;position:relative;text-decoration:none;text-transform:uppercase}.sw-click-to-tweet i.swp_twitter_icon{float:right;font-size:21px;margin-left:15px!important;margin-top:2px;text-transform:none}a.swp_CTT.style1 .sw-click-to-tweet{background-color:#fff;border:1px solid #ddd;-webkit-border-radius:4px;border-radius:4px}a.swp_CTT.style2 .sw-click-to-tweet{background-color:#fff;border:4px double #ddd;-webkit-border-radius:0;border-radius:0}a.style2 .sw-click-to-tweet .sw-ctt-text{color:#666;font-style:italic;text-decoration:none}a.swp_CTT.style3:hover .sw-click-to-tweet{border-left:10px solid #3c87b2;padding-right:20px;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style3 .sw-click-to-tweet{background-color:#429cd6;border:none;border-left:10px solid #429cd6;-webkit-border-radius:0;border-radius:0;padding-right:20px;-webkit-transition:all .25s linear;transition:all .25s linear}a.style3 .sw-click-to-tweet .sw-ctt-text{color:#fff;font-style:italic;text-decoration:none}a.swp_CTT.style4:hover .sw-click-to-tweet{border-left:10px solid #3c87b2;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style4 .sw-click-to-tweet{background-color:#333;border-left:10px solid #c33;-webkit-border-radius:0;border-radius:0;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style5:hover .sw-click-to-tweet{background-color:#d34250;border-left:10px solid #30394f;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style5 .sw-click-to-tweet{background-color:#30394f;border-left:10px solid #d34250;-webkit-border-radius:0;border-radius:0;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style6:hover .sw-click-to-tweet{background-color:#ced3dc;border-left:10px solid #d34250;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style6 .sw-click-to-tweet{background-color:#eee;border-left:10px solid #d34250;-webkit-border-radius:0;border-radius:0;-webkit-transition:all .25s linear;transition:all .25s linear}a.style6 .sw-click-to-tweet i.swp_twitter{color:#30394f}.swp_pop_thumb{-webkit-border-radius:3px;border-radius:3px;float:left;height:100px;margin:5px 25px 5px 0;width:100px}.swp_popular_post{clear:both}.swp_clearfix:after{clear:both;content:" ";display:block;height:0;visibility:hidden}.swp_popular_post a.swp_popularity{border:none;display:block;line-height:1.5;margin:20px 0}span.swp_pop_count{display:block;font-size:70%}.swp_widget_box{-webkit-border-radius:3px;border-radius:3px}div.sw-pinit{display:table!important;line-height:0;position:relative!important}div.sw-pinit a.sw-pinit-button,div.sw-pinit a.sw-pinit-button:visited{background:#cd2029;border:1px solid #aa1b29;border:0;border-bottom:none;-webkit-border-radius:4px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;color:#fff;font-family:Lato,sans-serif;font-size:20px;font-size:15px;height:32px;line-height:32px;opacity:0;padding:0 20px;position:absolute;text-decoration:none;-webkit-transition:opacity .5s;transition:opacity .5s;z-index:200}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) .swp_hide span.swp_share,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover span.swp_share:not(.swp_hide),.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) .swp_hide span.swp_share,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover span.swp_share:not(.swp_hide),div.sw-pinit:focus a.sw-pinit-button,div.sw-pinit:hover a.sw-pinit-button{opacity:1}div.sw-pinit a.sw-pinit-button::before{color:#fff;content:"b";float:left;font-family:sw-icon-font;font-size:20px;font-weight:400;line-height:36px;margin-left:-5px;margin-right:10px}div.sw-pinit a.sw-pinit-button:hover::before{content:"F"}div.sw-pinit a.sw-pinit-button:focus,div.sw-pinit a.sw-pinit-button:hover{background:#aa1b29;color:#fff;text-decoration:none}div.sw-pinit .sw-pinit-left{left:30px}div.sw-pinit .sw-pinit-center{margin-left:-60px;left:50%}div.sw-pinit .sw-pinit-right{right:30px}div.sw-pinit .sw-pinit-top{top:30px}div.sw-pinit .sw-pinit-middle{margin-top:-25px;top:50%}div.sw-pinit .sw-pinit-bottom{bottom:30px}.mobile .nc_tweetContainer:nth-last-child(2),.nc_tweetContainer.total_shares:nth-last-child(1),.swp_social_panel.notMobile .nc_tweetContainer:nth-last-child(1){margin-right:0}.swp_social_panel.swp_default_dark_gray a,.swp_social_panel.swp_default_full_color a,.swp_social_panel.swp_default_light_gray a,.swp_social_panel.swp_default_medium_gray a,body .swp_social_panel.swp_other_dark_gray:hover a,body .swp_social_panel.swp_other_full_color:hover a,body .swp_social_panel.swp_other_light_gray:hover a,body .swp_social_panel.swp_other_medium_gray:hover a,html body .swp_social_panel.swp_individual_dark_gray a:hover,html body .swp_social_panel.swp_individual_full_color .nc_tweetContainer:hover a,html body .swp_social_panel.swp_individual_light_gray .nc_tweetContainer:hover a,html body .swp_social_panel.swp_individual_medium_gray a:hover{color:#fff}.swp_social_panel.swp_default_color_outlines .swp_twitter a,.wp-editor-container .swp_twitter:before,a.style1 .sw-click-to-tweet i.swp_twitter,a.style2 .sw-click-to-tweet i.swp_twitter,body .swp_social_panel.swp_other_color_outlines:hover .swp_twitter a,html body .swp_social_panel.swp_individual_color_outlines .swp_twitter a:hover{color:#429cd6}.sw-content-locator,.swp_social_panel.mobile .iconFiller~.swp_count{display:none}a.style1 .sw-click-to-tweet .sw-ctt-btn,a.style1 .sw-click-to-tweet .sw-ctt-text{color:#999;text-decoration:none}a.style1:hover .sw-click-to-tweet .sw-ctt-btn,a.style1:hover .sw-click-to-tweet .sw-ctt-text,a.style2 .sw-click-to-tweet .sw-ctt-btn,a.style2:hover .sw-click-to-tweet .sw-ctt-btn,a.style2:hover .sw-click-to-tweet .sw-ctt-text{color:#666;text-decoration:none}a.style3 .sw-click-to-tweet .sw-ctt-btn,a.style3 .sw-click-to-tweet i.swp_twitter,a.style3:hover .sw-click-to-tweet .sw-ctt-btn,a.style3:hover .sw-click-to-tweet .sw-ctt-text,a.style4 .sw-click-to-tweet .sw-ctt-btn,a.style4 .sw-click-to-tweet .sw-ctt-text,a.style4:hover .sw-click-to-tweet .sw-ctt-btn,a.style4:hover .sw-click-to-tweet .sw-ctt-text,a.style5 .sw-click-to-tweet .sw-ctt-btn,a.style5 .sw-click-to-tweet .sw-ctt-text,a.style5:hover .sw-click-to-tweet .sw-ctt-btn,a.style5:hover .sw-click-to-tweet .sw-ctt-text{color:#fff;text-decoration:none}a.style4 .sw-click-to-tweet i.swp_twitter,a.style5 .sw-click-to-tweet i.swp_twitter{color:#fff}a.style6 .sw-click-to-tweet .sw-ctt-btn,a.style6 .sw-click-to-tweet .sw-ctt-text{color:#30394f;text-decoration:none}a.style6:hover .sw-click-to-tweet .sw-ctt-btn,a.style6:hover .sw-click-to-tweet .sw-ctt-text,a.style6:hover .sw-click-to-tweet i.swp_twitter{color:#2a2d34;text-decoration:none}.scale-70{-ms-transform:scale(.7);-webkit-transform:scale(.7);transform:scale(.7)}.swp_social_panel:not(.nc_floater).scale-70.scale-fullWidth{width:142.8571428571429%!important}.scale-80{-ms-transform:scale(.8);-webkit-transform:scale(.8);transform:scale(.8)}.swp_social_panel:not(.nc_floater).scale-80.scale-fullWidth{width:125%!important}.scale-90{-ms-transform:scale(.9);-webkit-transform:scale(.9);transform:scale(.9)}.swp_social_panel:not(.nc_floater).scale-90.scale-fullWidth{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-fullWidth{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-fullWidth{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-fullWidth{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-fullWidth{width:71.42857142857143%!important}.nc_floater.scale-center,.nc_floater.scale-right,.scale-fullWidth,.scale-left{-ms-transform-origin:left;-webkit-transform-origin:left;transform-origin:left}.scale-right{-ms-transform-origin:right;-webkit-transform-origin:right;transform-origin:right}.scale-center{-ms-transform-origin:center;-webkit-transform-origin:center;transform-origin:center}div.swp_social_panel .nc_tweetContainer.swp_emphasize{-webkit-box-flex:2;-moz-box-flex:2;-webkit-flex:2;-ms-flex:2;flex:2}.sw-pinit.aligncenter{margin:0 auto}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){div.sw-pinit{display:inline-block!important;max-width:100%}}.swp_hidden_pin_image{height:0;opacity:0;position:absolute;top:0;width:0}.fl-module-content .uabb-blog-posts .uabb-post-thumbnail .sw-pinit.lazyloaded{display:block!important}@-moz-document url-prefix(){.swp_social_panel .total_shares .swp_label{margin-top:8px}}.swp-content-locator{display:none!important;margin:0!important}.float-position-top-left{transform-origin:top left}.float-position-center-left{transform-origin:center left}.float-position-bottom-left{transform-origin:bottom left}.float-position-top-right{transform-origin:top right}.float-position-center-right{transform-origin:center right}.float-position-bottom-right{transform-origin:bottom right}div[class*=custom_color][class^=_wrapper]{display:none}
1
+ .swp_social_panel{clear:both;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;height:34px;line-height:1;margin-bottom:20px!important;margin-top:20px!important;overflow:hidden;padding:0;-webkit-align-items:stretch;align-items:stretch;-webkit-box-align:stretch;-moz-box-align:stretch;-webkit-box-pack:justify;-moz-box-pack:justify;direction:ltr;-ms-flex-align:stretch;-ms-flex-line-pack:center;-ms-flex-pack:justify;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-justify-content:space-between;justify-content:space-between}.swp_social_panel:not(.nc_floater):not(.swp_social_panelSide){width:100%!important}.nc_wrapper .swp_social_panel{margin-bottom:10px!important;margin-top:10px!important}div.swp_social_panel .nc_tweetContainer{-webkit-border-radius:2px;border-radius:2px;cursor:pointer;float:left;font-family:Lato;height:32px;margin:0 5px 3px;min-width:34px;overflow:hidden;text-align:center;-webkit-transition:all .1s linear;transition:all .1s linear}div.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.swp_social_panel .nc_tweetContainer a.nc_tweet,.swp_social_panel .total_shares .swp_count{display:block;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;font-family:Lato,sans-serif;font-size:18px!important;font-weight:700;height:30px;text-decoration:none;text-decoration:none!important;text-transform:none;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap}.swp_social_panel:not(.nc_floater):not(.swp_social_panelSide).swp_shift{padding:0 10px}.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:nth-child(1){margin-left:0}.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:nth-last-child(1){margin-right:0}.swp_social_panel a .swp_count:not(.swp_hide){display:inline-block;line-height:32px;margin:0;padding:0 5px;-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.swp_social_panel .total_shares .swp_count,span.swp_share{line-height:30px}.swp_social_panel a .swp_count.swp_hide{margin:0 auto}.swp_social_panel span:before{content:initial!important}.swp_social_panel span.swp_count{font-size:14px}.swp_social_panel span.iconFiller{font-size:18px;margin:0 auto}.swp_social_panel.notMobile .nc_tweetContainer:nth-child(1){margin-left:0}.swp_social_panel:not(.swp_social_panelSide){-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.swp_social_panel:not(.swp_social_panelSide) div.total_shares.total_sharesalt:nth-child(1){margin-left:0;margin-right:15px;padding-left:0}.swp_social_panel:not(.swp_social_panelSide) div.total_shares.total_sharesalt:nth-last-child(1){margin-right:0;padding-right:0}a.swp_CTT{cursor:pointer}span.swp_share{display:block;float:right;float:left;font-size:14px;font-weight:400;height:30px;margin:0 0 0 6px;max-width:none!important;vertical-align:middle}.swp_social_panelSide span.swp_share{margin:0}.swp_social_panel .sw{float:left;height:30px;line-height:32px;margin:0 5px;text-shadow:none!important;width:20px}.iconFiller{display:block;float:left;height:30px;overflow:hidden;-webkit-transition:width .1s linear;transition:width .1s linear}.swp_social_panel .iconFiller{width:30px}span.spaceManWilly{display:block;width:120px}.swp_social_panel .total_shares{background:#c4c4c4;border:1px solid #e08a0f;-webkit-border-radius:2px;border-radius:2px;color:#fff;cursor:default;display:block;font-size:19px;padding:0 10px;-webkit-box-flex:0!important;-moz-box-flex:0!important;-webkit-flex:none!important;-ms-flex:none!important;flex:none!important}.swp_social_panel div.total_shares.total_sharesalt,.swp_social_panel:hover div.total_shares.total_sharesalt:not(:nth-child(1)){background:0 0!important;border:none;color:#474b4d;margin-left:0!important}div.swp_social_panel:hover div.total_shares.total_sharesalt:not(:nth-child(1)){background:0 0;color:#474b4d;margin-left:10px}.swp_social_panel .total_shares.total_sharesalt .swp_label{color:#474b4d;font-size:10px;letter-spacing:0;min-width:40px;vertical-align:middle}.swp_social_panel .total_shares .swp_label{font-size:10px;vertical-align:middle}.swp_social_panel .total_shares.total_sharesalt .swp_count{color:#474b4d;font-size:24px}.swp_social_panel.swp_customFull:hover div.total_shares,.swp_social_panel.swp_fade .total_shares,.swp_social_panel.swp_full_color .total_shares,.swp_social_panel:hover .total_shares{background:#e08a0f}.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer.total_shares.total_sharesalt:before{content:"o";display:inline-block;font-family:sw-icon-font;margin-top:7px;vertical-align:top}.swp_social_panel:not(.swp_social_panelSide) .total_shares.total_sharesalt .swp_count{display:inline-block;line-height:0;margin-left:8px;margin-top:12px;min-width:45px;position:relative;vertical-align:middle}span.swp_label{display:block;font-size:9px!important;margin-top:13px;position:absolute;text-align:center!important;text-transform:uppercase}.swp_social_panelSide span.swp_label{margin-top:0}.swp_social_panel.swp_leaf .nc_tweetContainer{-webkit-border-radius:15px 0!important;border-radius:15px 0!important;border-width:1px}.swp_social_panel.swp_pill .nc_tweetContainer{-webkit-border-radius:50px;border-radius:50px;border-width:1px}.swp_social_panel.swp_shift .nc_tweetContainer:not(.total_shares){border-width:1px;-moz-transform:skew(-25deg);-o-transform:skew(-25deg);-webkit-transform:skew(-25deg)}.swp_social_panel.swp_shift .nc_tweetContainer a{-moz-transform:skew(25deg);-o-transform:skew(25deg);-webkit-transform:skew(25deg)}.swp_connected .nc_tweetContainer,.swp_connected .nc_tweetContainer:hover,.swp_connected:hover .nc_tweetContainer{-webkit-border-radius:0!important;border-radius:0!important;border-width:1px;margin:0!important}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_google_plus,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_google_plus:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_google_plus:hover{border:1px solid #df4b37}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_twitter,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_twitter:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_twitter:hover{border:1px solid #429cd6}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_facebook,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_facebook:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_facebook:hover{border:1px solid #3a589e}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_pinterest,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_pinterest:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_pinterest:hover{border:1px solid #cd2029}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_linkedin,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_linkedin:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_linkedin:hover{border:1px solid #0d77b7}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_tumblr,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_tumblr:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_tumblr:hover{border:1px solid #39475d}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_stumbleupon,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_stumbleupon:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_stumbleupon:hover{border:1px solid #ef5025}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_yummly,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_yummly:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_yummly:hover{border:1px solid #e26426}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_reddit,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_reddit:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_reddit:hover{border:1px solid #f04b23}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_email,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_email:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_email:hover{border:1px solid #6bcce9}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_whatsapp,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_whatsapp:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_whatsapp:hover{border:1px solid #71c169}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_pocket,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_pocket:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_pocket:hover{border:1px solid #ef4056}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_buffer,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_buffer:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_buffer:hover{border:1px solid #323b43}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_hacker_news,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_hacker_news:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_hacker_news:hover{border:1px solid #d85623}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_flipboard,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_flipboard:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_flipboard:hover{border:1px solid #bf2626}.swp_social_panel.swp_default_full_color .swp_google_plus,body .swp_social_panel.swp_other_full_color:hover .swp_google_plus,html body .swp_social_panel.swp_individual_full_color .swp_google_plus:hover{background:#df4b37;border:1px solid #c44133}.swp_social_panel.swp_default_full_color .swp_twitter,body .swp_social_panel.swp_other_full_color:hover .swp_twitter,html body .swp_social_panel.swp_individual_full_color .swp_twitter:hover{background:#429cd6;border:1px solid #3c87b2}.swp_social_panel.swp_default_full_color .swp_facebook,body .swp_social_panel.swp_other_full_color:hover .swp_facebook,html body .swp_social_panel.swp_individual_full_color .swp_facebook:hover{background:#3a589e;border:1px solid #2e4675}.swp_social_panel.swp_default_full_color .swp_pinterest,body .swp_social_panel.swp_other_full_color:hover .swp_pinterest,html body .swp_social_panel.swp_individual_full_color .swp_pinterest:hover{background:#cd2029;border:1px solid #aa1b29}.swp_social_panel.swp_default_full_color .swp_linkedin,body .swp_social_panel.swp_other_full_color:hover .swp_linkedin,html body .swp_social_panel.swp_individual_full_color .swp_linkedin:hover{background:#0d77b7;border:1px solid #0c6591}.swp_social_panel.swp_default_full_color .swp_tumblr,body .swp_social_panel.swp_other_full_color:hover .swp_tumblr,html body .swp_social_panel.swp_individual_full_color .swp_tumblr:hover{background:#39475d;border:1px solid #27313f}.swp_social_panel.swp_default_full_color .swp_stumbleupon,body .swp_social_panel.swp_other_full_color:hover .swp_stumbleupon,html body .swp_social_panel.swp_individual_full_color .swp_stumbleupon:hover{background:#ef5025;border:1px solid #d34427}.swp_social_panel.swp_default_full_color .swp_yummly,body .swp_social_panel.swp_other_full_color:hover .swp_yummly,html body .swp_social_panel.swp_individual_full_color .swp_yummly:hover{background:#e26426;border:1px solid #b65027}.swp_social_panel.swp_default_full_color .swp_reddit,body .swp_social_panel.swp_other_full_color:hover .swp_reddit,html body .swp_social_panel.swp_individual_full_color .swp_reddit:hover{background:#f04b23;border:1px solid #d33f27}.swp_social_panel.swp_default_full_color .swp_email,body .swp_social_panel.swp_other_full_color:hover .swp_email,html body .swp_social_panel.swp_individual_full_color .swp_email:hover{background:#6bcce9;border:1px solid #61bace}.swp_social_panel.swp_default_full_color .swp_whatsapp,body .swp_social_panel.swp_other_full_color:hover .swp_whatsapp,html body .swp_social_panel.swp_individual_full_color .swp_whatsapp:hover{background:#71c169;border:1px solid #28b04b}.swp_social_panel.swp_default_full_color .swp_pocket,body .swp_social_panel.swp_other_full_color:hover .swp_pocket,html body .swp_social_panel.swp_individual_full_color .swp_pocket:hover{background:#ef4056;border:1px solid #ce3d55}.swp_social_panel.swp_default_full_color .swp_buffer,body .swp_social_panel.swp_other_full_color:hover .swp_buffer,html body .swp_social_panel.swp_individual_full_color .swp_buffer:hover{background:#323b43;border:1px solid #000}.swp_social_panel.swp_default_full_color .swp_hacker_news,body .swp_social_panel.swp_other_full_color:hover .swp_hacker_news,html body .swp_social_panel.swp_individual_full_color .swp_hacker_news:hover{background:#f16522;border:1px solid #d85623}.swp_social_panel.swp_default_full_color .swp_flipboard,body .swp_social_panel.swp_other_full_color:hover .swp_flipboard,html body .swp_social_panel.swp_individual_full_color .swp_flipboard:hover{background:#e02828;border:1px solid #bf2626}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_google_plus,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_google_plus,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_google_plus:hover{border-bottom:3px solid #c44133}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_twitter,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_twitter,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_twitter:hover{border-bottom:3px solid #5595bc}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_facebook,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_facebook,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_facebook:hover{border-bottom:3px solid #2e4675}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_pinterest,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_pinterest,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_pinterest:hover{border-bottom:3px solid #aa1b29}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_linkedin,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_linkedin,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_linkedin:hover{border-bottom:3px solid #0c6591}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_tumblr,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_tumblr,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_tumblr:hover{border-bottom:3px solid #27313f}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_stumbleupon,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_stumbleupon,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_stumbleupon:hover{border-bottom:3px solid #d34427}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_yummly,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_yummly,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_yummly:hover{border-bottom:3px solid #b65027}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_reddit,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_reddit,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_reddit:hover{border-bottom:3px solid #d33f27}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_email,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_email,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_email:hover{border-bottom:3px solid #61bace}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_whatsapp,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_whatsapp,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_whatsapp:hover{border-bottom:3px solid #28b04b}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_pocket,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_pocket,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_pocket:hover{border-bottom:3px solid #ce3d55}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_buffer,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_buffer,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_buffer:hover{border-bottom:3px solid #000}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_hacker_news,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_hacker_news,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_hacker_news:hover{border-bottom:3px solid #d85623}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_flipboard,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_flipboard,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_flipboard:hover{border-bottom:3px solid #bf2626}.swp_social_panel.swp_default_light_gray .nc_tweetContainer,body .swp_social_panel.swp_other_light_gray:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_light_gray .nc_tweetContainer:hover{background-color:#ccc;border:1px solid #ccc}.swp_social_panel.swp_three_dee.swp_default_light_gray .nc_tweetContainer:not(.total_sharesalt),body .swp_social_panel.swp_three_dee.swp_other_light_gray:hover .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_light_gray .nc_tweetContainer:not(.total_sharesalt):hover{border-bottom:3px solid #999}.swp_social_panel.swp_default_medium_gray .nc_tweetContainer,body .swp_social_panel.swp_other_medium_gray:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_medium_gray .nc_tweetContainer:hover{background-color:#999;border:1px solid #999}.swp_social_panel.swp_three_dee.swp_default_medium_gray .nc_tweetContainer:not(.total_sharesalt),body .swp_social_panel.swp_three_dee.swp_other_medium_gray:hover .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_medium_gray .nc_tweetContainer:not(.total_sharesalt):hover{border-bottom:3px solid #444}.swp_social_panel.swp_default_dark_gray .nc_tweetContainer,body .swp_social_panel.swp_other_dark_gray:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_dark_gray .nc_tweetContainer:hover{background-color:#444;border:1px solid #444}.swp_social_panel.swp_three_dee.swp_default_dark_gray .nc_tweetContainer:not(.total_sharesalt),body .swp_social_panel.swp_three_dee.swp_other_dark_gray:hover .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_dark_gray .nc_tweetContainer:not(.total_sharesalt):hover{border-bottom:3px solid #222}.swp_social_panel.swp_default_light_gray_outlines a,body .swp_social_panel.swp_other_light_gray_outlines:hover a,html body .swp_social_panel.swp_individual_light_gray_outlines a:hover{color:#ccc}.swp_social_panel.swp_default_light_gray_outlines .nc_tweetContainer,body .swp_social_panel.swp_other_light_gray_outlines:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_light_gray_outlines .nc_tweetContainer:hover{background:0 0;border:1px solid #ccc}.swp_social_panel.swp_default_medium_gray_outlines a,body .swp_social_panel.swp_other_medium_gray_outlines:hover a,html body .swp_social_panel.swp_individual_medium_gray_outlines a:hover{color:#999}.swp_social_panel.swp_default_medium_gray_outlines .nc_tweetContainer,body .swp_social_panel.swp_other_medium_gray_outlines:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_medium_gray_outlines .nc_tweetContainer:hover{background:0 0;border:1px solid #999}.swp_social_panel.swp_default_dark_gray_outlines a,body .swp_social_panel.swp_other_dark_gray_outlines:hover a,html body .swp_social_panel.swp_individual_dark_gray_outlines a:hover{color:#444}.swp_social_panel.swp_default_dark_gray_outlines .nc_tweetContainer,body .swp_social_panel.swp_other_dark_gray_outlines:hover .nc_tweetContainer,html body .swp_social_panel.swp_individual_dark_gray_outlines .nc_tweetContainer:hover{background:0 0;border:1px solid #444}.swp_social_panel.swp_default_color_outlines .swp_google_plus a,body .swp_social_panel.swp_other_color_outlines:hover .swp_google_plus a,html body .swp_social_panel.swp_individual_color_outlines .swp_google_plus a:hover{color:#df4b37}.swp_social_panel.swp_default_color_outlines .swp_facebook a,body .swp_social_panel.swp_other_color_outlines:hover .swp_facebook a,html body .swp_social_panel.swp_individual_color_outlines .swp_facebook a:hover{color:#3a589e}.swp_social_panel.swp_default_color_outlines .swp_pinterest a,body .swp_social_panel.swp_other_color_outlines:hover .swp_pinterest a,html body .swp_social_panel.swp_individual_color_outlines .swp_pinterest a:hover{color:#cd2029}.swp_social_panel.swp_default_color_outlines .swp_linkedin a,body .swp_social_panel.swp_other_color_outlines:hover .swp_linkedin a,html body .swp_social_panel.swp_individual_color_outlines .swp_linkedin a:hover{color:#0d77b7}.swp_social_panel.swp_default_color_outlines .swp_tumblr a,body .swp_social_panel.swp_other_color_outlines:hover .swp_tumblr a,html body .swp_social_panel.swp_individual_color_outlines .swp_tumblr a:hover{color:#39475d}.swp_social_panel.swp_default_color_outlines .swp_stumbleupon a,body .swp_social_panel.swp_other_color_outlines:hover .swp_stumbleupon a,html body .swp_social_panel.swp_individual_color_outlines .swp_stumbleupon a:hover{color:#ef5025}.swp_social_panel.swp_default_color_outlines .swp_yummly a,body .swp_social_panel.swp_other_color_outlines:hover .swp_yummly a,html body .swp_social_panel.swp_individual_color_outlines .swp_yummly a:hover{color:#e26426}.swp_social_panel.swp_default_color_outlines .swp_whatsapp a,body .swp_social_panel.swp_other_color_outlines:hover .swp_whatsapp a,html body .swp_social_panel.swp_individual_color_outlines .swp_whatsapp a:hover{color:#71c169}.swp_social_panel.swp_default_color_outlines .swp_pocket a,body .swp_social_panel.swp_other_color_outlines:hover .swp_pocket a,html body .swp_social_panel.swp_individual_color_outlines .swp_pocket a:hover{color:#ef4056}.swp_social_panel.swp_default_color_outlines .swp_reddit a,body .swp_social_panel.swp_other_color_outlines:hover .swp_reddit a,html body .swp_social_panel.swp_individual_color_outlines .swp_reddit a:hover{color:#f04b23}.swp_social_panel.swp_default_color_outlines .swp_email a,body .swp_social_panel.swp_other_color_outlines:hover .swp_email a,html body .swp_social_panel.swp_individual_color_outlines .swp_email a:hover{color:#6bcce9}.swp_social_panel.swp_default_color_outlines .swp_buffer a,body .swp_social_panel.swp_other_color_outlines:hover .swp_buffer a,html body .swp_social_panel.swp_individual_color_outlines .swp_buffer a:hover{color:#323b43}.swp_social_panel.swp_default_color_outlines .swp_hacker_news a,body .swp_social_panel.swp_other_color_outlines:hover .swp_hacker_news a,html body .swp_social_panel.swp_individual_color_outlines .swp_hacker_news a:hover{color:#f16522}.swp_social_panel.swp_default_color_outlines .swp_flipboard a,body .swp_social_panel.swp_other_color_outlines:hover .swp_flipboard a,html body .swp_social_panel.swp_individual_color_outlines .swp_flipboard a:hover{color:#e02828}.swp_social_panel.swp_default_color_outlines .swp_google_plus,body .swp_social_panel.swp_other_color_outlines:hover .swp_google_plus,html body .swp_social_panel.swp_individual_color_outlines .swp_google_plus:hover{background:0 0;border:1px solid #df4b37}.swp_social_panel.swp_default_color_outlines .swp_twitter,body .swp_social_panel.swp_other_color_outlines:hover .swp_twitter,html body .swp_social_panel.swp_individual_color_outlines .swp_twitter:hover{background:0 0;border:1px solid #429cd6}.swp_social_panel.swp_default_color_outlines .swp_facebook,body .swp_social_panel.swp_other_color_outlines:hover .swp_facebook,html body .swp_social_panel.swp_individual_color_outlines .swp_facebook:hover{background:0 0;border:1px solid #3a589e}.swp_social_panel.swp_default_color_outlines .swp_pinterest,body .swp_social_panel.swp_other_color_outlines:hover .swp_pinterest,html body .swp_social_panel.swp_individual_color_outlines .swp_pinterest:hover{background:0 0;border:1px solid #cd2029}.swp_social_panel.swp_default_color_outlines .swp_linkedin,body .swp_social_panel.swp_other_color_outlines:hover .swp_linkedin,html body .swp_social_panel.swp_individual_color_outlines .swp_linkedin:hover{background:0 0;border:1px solid #0d77b7}.swp_social_panel.swp_default_color_outlines .swp_tumblr,body .swp_social_panel.swp_other_color_outlines:hover .swp_tumblr,html body .swp_social_panel.swp_individual_color_outlines .swp_tumblr:hover{background:0 0;border:1px solid #39475d}.swp_social_panel.swp_default_color_outlines .swp_stumbleupon,body .swp_social_panel.swp_other_color_outlines:hover .swp_stumbleupon,html body .swp_social_panel.swp_individual_color_outlines .swp_stumbleupon:hover{background:0 0;border:1px solid #ef5025}.swp_social_panel.swp_default_color_outlines .swp_yummly,body .swp_social_panel.swp_other_color_outlines:hover .swp_yummly,html body .swp_social_panel.swp_individual_color_outlines .swp_yummly:hover{background:0 0;border:1px solid #e26426}.swp_social_panel.swp_default_color_outlines .swp_whatsapp,body .swp_social_panel.swp_other_color_outlines:hover .swp_whatsapp,html body .swp_social_panel.swp_individual_color_outlines .swp_whatsapp:hover{background:0 0;border:1px solid #71c169}.swp_social_panel.swp_default_color_outlines .swp_reddit,body .swp_social_panel.swp_other_color_outlines:hover .swp_reddit,html body .swp_social_panel.swp_individual_color_outlines .swp_reddit:hover{background:0 0;border:1px solid #f04b23}.swp_social_panel.swp_default_color_outlines .swp_email,body .swp_social_panel.swp_other_color_outlines:hover .swp_email,html body .swp_social_panel.swp_individual_color_outlines .swp_email:hover{background:0 0;border:1px solid #6bcce9}.swp_social_panel.swp_default_color_outlines .swp_pocket,body .swp_social_panel.swp_other_color_outlines:hover .swp_pocket,html body .swp_social_panel.swp_individual_color_outlines .swp_pocket:hover{background:0 0;border:1px solid #ef4056}.swp_social_panel.swp_default_color_outlines .swp_buffer,body .swp_social_panel.swp_other_color_outlines:hover .swp_buffer,html body .swp_social_panel.swp_individual_color_outlines .swp_buffer:hover{background:0 0;border:1px solid #323b43}.swp_social_panel.swp_default_color_outlines .swp_hacker_news,body .swp_social_panel.swp_other_color_outlines:hover .swp_hacker_news,html body .swp_social_panel.swp_individual_color_outlines .swp_hacker_news:hover{background:0 0;border:1px solid #f16522}.swp_social_panel.swp_default_color_outlines .swp_flipboard,body .swp_social_panel.swp_other_color_outlines:hover .swp_flipboard,html body .swp_social_panel.swp_individual_color_outlines .swp_flipboard:hover{background:0 0;border:1px solid #bf2626}.swp_social_panelSide{flex-direction:column;height:auto;overflow:visible;-webkit-transition:all .2s linear;transition:all .2s linear;width:100px!important;z-index:9999999;margin:10px 5px!important;padding:0;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column}.swp_social_panelSide.fade,.swp_social_panelSide.slide{position:fixed;-webkit-transition:all .2s linear;transition:all .2s linear}.swp_social_panelSide.fade{display:none}.swp_social_panelSide.fade.swp_float_left{left:5px}.swp_social_panelSide.fade.swp_float_right{right:5px}.swp_social_panelSide[class*=swp_side]{height:100vh;display:flex;position:fixed;padding:30px 0;top:0}.swp_social_panelSide.swp_float_right{align-content:flex-end}.swp_social_panelSide.swp_side_top{justify-content:flex-start}.swp_social_panelSide.swp_side_bottom{justify-content:flex-end}.swp_social_panelSide.swp_side_center{justify-content:center}.swp_social_panelSide .nc_tweetContainer{background:#dd4b38;-webkit-border-radius:3px;border-radius:3px;clear:both;display:block;font-family:Lato,sans-serif;height:32px;margin:3px 0!important;overflow:hidden;padding:0;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:top;width:90px}.swp_social_panelSide .nc_tweetContainer .iconFiller{display:inline-block;height:40px;margin:0 6px;padding:0;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:middle;width:21px}.swp_social_panelSide .nc_tweetContainer .swp_count{display:inline-block;font-size:14px;height:32px;line-height:16px;margin:0;overflow:hidden;padding:0;text-align:right;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:top;width:0}.swp_social_panelSide .nc_tweetContainer a{cursor:pointer;display:block;font-weight:500;height:36px;margin:0;padding:0;text-decoration:none;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:top}.swp_social_panelSide .nc_tweetContainer .sw,.swp_social_panelSide .nc_tweetContainer .swp_share{float:left;line-height:34px}.swp_social_panelSide.swp_default .nc_tweetContainer .sw{line-height:32px}.swp_social_panelSide.swp_default .nc_tweetContainer .swp_share{line-height:30px}.swp_social_panelSide .nc_tweetContainer .swp_share{font-size:13px}.swp_social_panelSide .nc_tweetContainer:hover,.swp_social_panelSide .nc_tweetContainer:hover .iconFiller,.swp_social_panelSide .nc_tweetContainer:hover .swp_count{-webkit-transition:all .1s linear;transition:all .1s linear}.swp_social_panelSide.swp_boxed .nc_tweetContainer,.swp_social_panelSide.swp_circles .nc_tweetContainer{margin-bottom:5px;width:67.5px!important}.swp_social_panelSide.swp_boxed .nc_tweetContainer,.swp_social_panelSide.swp_boxed .nc_tweetContainer a,.swp_social_panelSide.swp_circles .nc_tweetContainer,.swp_social_panelSide.swp_circles .nc_tweetContainer a{width:67.5px;height:67.5px;position:relative}.swp_social_panelSide.swp_circles .nc_tweetContainer,.swp_social_panelSide.swp_circles .nc_tweetContainer a{border-radius:50%!important}.swp_social_panelSide.swp_boxed .nc_tweetContainer i.sw,.swp_social_panelSide.swp_circles .nc_tweetContainer i.sw{font-size:27px;height:40px;margin:0;padding-top:10px;text-align:center;width:100%}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_share,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_share{height:35px;opacity:0;position:absolute;bottom:0;left:0;text-align:center;width:67.5px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_count,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_count{height:35px;margin:0;padding:0;position:absolute;bottom:0;left:0;text-align:center;-webkit-transition:padding .1s linear;transition:padding .1s linear;width:100%}.swp_social_panelSide.swp_boxed .nc_tweetContainer span.swp_hide .iconFiller,.swp_social_panelSide.swp_boxed .nc_tweetContainer span.swp_hide .spaceManWilly,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_count.swp_hide,.swp_social_panelSide.swp_circles .nc_tweetContainer span.swp_hide .iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer span.swp_hide .spaceManWilly,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_count.swp_hide{height:67.5px;opacity:1}.swp_social_panelSide.swp_boxed .nc_tweetContainer span.iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer span.iconFiller{height:40px;width:67.5px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover span.swp_count:not(.swp_hide),.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover span.swp_count:not(.swp_hide){opacity:0}.swp_social_panelSide.swp_boxed .total_shares,.swp_social_panelSide.swp_circles .total_shares{padding:0;width:67.5px!important}.swp_social_panelSide .nc_tweetContainer:not(.total_shares){line-height:34px}.swp_social_panelSide:not(.swp_boxed):not(.swp_circles) .nc_tweetContainer:not(.total_shares) .iconFiller{margin-left:2px;width:30px}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_count{padding:0 8px;width:48px}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_count.swp_hide{padding:0;width:100%}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_hide .iconFiller{display:block;float:none;margin:0 auto}.swp_social_panelSide:not(.swp_boxed):not(.swp_circles) .nc_tweetContainer:not(.total_shares):hover{width:150px}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide .nc_tweetContainer:not(.total_shares):hover .iconFiller{width:90px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover .iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover .iconFiller{width:100%}.swp_social_panelSide .nc_tweetContainer.total_shares{background:rgba(0,0,0,0);border:0!important;font-weight:800;height:45px;margin:0;padding:0;text-align:center;width:90px;order:-100}.swp_social_panelSide .nc_tweetContainer.total_shares .swp_count{color:#444;display:block;font-family:Lato,sans-serif;height:28px;text-align:center;width:100%}.swp_social_panelSide .nc_tweetContainer.total_shares .swp_label{color:#444;display:block;font-family:Lato,sans-serif;font-size:50%;position:relative;text-align:center;width:100%}.nc_wrapper{background:#fff;position:fixed;-webkit-transition:top .5s bottom .5s;transition:top .5s bottom .5s;width:100%;z-index:99999}.nc_wrapper.bottom{bottom:0;left:0}.nc_wrapper.top{top:0;left:0}.nc_floater{margin:10px 0;position:relative;left:304px;width:740px}.swp_social_panelSide.hideCounts a{text-align:center}.swp_social_panelSide.hideCounts .iconFiller{float:none;text-align:left}.sw{display:inline-block;font-family:sw-icon-font!important;font-size:inherit;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-style:normal;font-weight:400;text-rendering:auto;text-transform:none!important;-ms-transform:translate(0,0);-webkit-transform:translate(0,0);transform:translate(0,0)}.sw:before{display:block!important}.wp-editor-container .sw:before{font-size:18px;line-height:22px}.wp-editor-container .sw-social-warfare:before{color:#ee464f}.mce-container .sw-social-warfare{color:#ee464f;font-size:20px;margin-right:15px;vertical-align:middle}i.swp_google_plus_icon:before{content:"h"}i.swp_pinterest_icon:before{content:"b"}i.swp_twitter_icon:before{content:"s"}i.swp_facebook_icon:before{content:"j"}i.swp_linkedin_icon:before{content:"f"}i.swp_tumblr_icon:before{content:"r"}i.swp_stumbleupon_icon:before{content:"q"}i.swp_reddit_icon:before{content:"a"}i.swp_email_icon:before{content:"k"}i.swp_yummly_icon:before{content:"x"}i.swp_whatsapp_icon:before{content:"y"}i.swp_pocket_icon:before{content:"B"}i.swp_buffer_icon:before{content:"z"}i.swp_hacker_news_icon:before{content:"D"}i.swp_flipboard_icon:before{content:"C"}.sw-social-warfare:before{content:"p"}.sw-click-to-tweet:after,.sw-tweet-clear:after{content:".";height:0;clear:both;visibility:hidden;display:block}.swp_CTT{text-decoration:none!important}.sw-tweet-clear{zoom:1}.sw-click-to-tweet{display:block;margin:15px 0;padding:15px 30px;position:relative}.sw-click-to-tweet:after{line-height:0}.sw-click-to-tweet .sw-ctt-text{margin:0 0 10px;padding:0;position:relative;word-wrap:break-word}a .sw-click-to-tweet .sw-ctt-text{display:block;font-size:24px;font-weight:500;line-height:140%;margin:0;padding:0;position:relative;text-decoration:none;text-transform:none}.sw-click-to-tweet .sw-ctt-btn{display:block;float:right;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:700;line-height:100%;margin:10px 0 0;padding:3px 5px 3px 3px;position:relative;text-decoration:none;text-transform:uppercase}.sw-click-to-tweet i.swp_twitter_icon{float:right;font-size:21px;margin-left:15px!important;margin-top:2px;text-transform:none}a.swp_CTT.style1 .sw-click-to-tweet{background-color:#fff;border:1px solid #ddd;-webkit-border-radius:4px;border-radius:4px}a.swp_CTT.style2 .sw-click-to-tweet{background-color:#fff;border:4px double #ddd;-webkit-border-radius:0;border-radius:0}a.style2 .sw-click-to-tweet .sw-ctt-text{color:#666;font-style:italic;text-decoration:none}a.swp_CTT.style3:hover .sw-click-to-tweet{border-left:10px solid #3c87b2;padding-right:20px;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style3 .sw-click-to-tweet{background-color:#429cd6;border:none;border-left:10px solid #429cd6;-webkit-border-radius:0;border-radius:0;padding-right:20px;-webkit-transition:all .25s linear;transition:all .25s linear}a.style3 .sw-click-to-tweet .sw-ctt-text{color:#fff;font-style:italic;text-decoration:none}a.swp_CTT.style4:hover .sw-click-to-tweet{border-left:10px solid #3c87b2;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style4 .sw-click-to-tweet{background-color:#333;border-left:10px solid #c33;-webkit-border-radius:0;border-radius:0;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style5:hover .sw-click-to-tweet{background-color:#d34250;border-left:10px solid #30394f;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style5 .sw-click-to-tweet{background-color:#30394f;border-left:10px solid #d34250;-webkit-border-radius:0;border-radius:0;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style6:hover .sw-click-to-tweet{background-color:#ced3dc;border-left:10px solid #d34250;-webkit-transition:all .25s linear;transition:all .25s linear}a.swp_CTT.style6 .sw-click-to-tweet{background-color:#eee;border-left:10px solid #d34250;-webkit-border-radius:0;border-radius:0;-webkit-transition:all .25s linear;transition:all .25s linear}a.style6 .sw-click-to-tweet i.swp_twitter{color:#30394f}.swp_pop_thumb{-webkit-border-radius:3px;border-radius:3px;float:left;height:100px;margin:5px 25px 5px 0;width:100px}.swp_popular_post{clear:both}.swp_clearfix:after{clear:both;content:" ";display:block;height:0;visibility:hidden}.swp_popular_post a.swp_popularity{border:none;display:block;line-height:1.5;margin:20px 0}span.swp_pop_count{display:block;font-size:70%}.swp_widget_box{-webkit-border-radius:3px;border-radius:3px}div.sw-pinit{display:table!important;line-height:0;position:relative!important}div.sw-pinit a.sw-pinit-button,div.sw-pinit a.sw-pinit-button:visited{background:#cd2029;border:1px solid #aa1b29;border:0;border-bottom:none;-webkit-border-radius:4px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;color:#fff;font-family:Lato,sans-serif;font-size:20px;font-size:15px;height:32px;line-height:32px;opacity:0;padding:0 20px;position:absolute;text-decoration:none;-webkit-transition:opacity .5s;transition:opacity .5s;z-index:200}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) .swp_hide span.swp_share,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover span.swp_share:not(.swp_hide),.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) .swp_hide span.swp_share,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover span.swp_share:not(.swp_hide),div.sw-pinit:focus a.sw-pinit-button,div.sw-pinit:hover a.sw-pinit-button{opacity:1}div.sw-pinit a.sw-pinit-button::before{color:#fff;content:"b";float:left;font-family:sw-icon-font;font-size:20px;font-weight:400;line-height:36px;margin-left:-5px;margin-right:10px}div.sw-pinit a.sw-pinit-button:hover::before{content:"F"}div.sw-pinit a.sw-pinit-button:focus,div.sw-pinit a.sw-pinit-button:hover{background:#aa1b29;color:#fff;text-decoration:none}div.sw-pinit .sw-pinit-left{left:30px}div.sw-pinit .sw-pinit-center{margin-left:-60px;left:50%}div.sw-pinit .sw-pinit-right{right:30px}div.sw-pinit .sw-pinit-top{top:30px}div.sw-pinit .sw-pinit-middle{margin-top:-25px;top:50%}div.sw-pinit .sw-pinit-bottom{bottom:30px}.mobile .nc_tweetContainer:nth-last-child(2),.nc_tweetContainer.total_shares:nth-last-child(1),.swp_social_panel.notMobile .nc_tweetContainer:nth-last-child(1){margin-right:0}.swp_social_panel.swp_default_dark_gray a,.swp_social_panel.swp_default_full_color a,.swp_social_panel.swp_default_light_gray a,.swp_social_panel.swp_default_medium_gray a,body .swp_social_panel.swp_other_dark_gray:hover a,body .swp_social_panel.swp_other_full_color:hover a,body .swp_social_panel.swp_other_light_gray:hover a,body .swp_social_panel.swp_other_medium_gray:hover a,html body .swp_social_panel.swp_individual_dark_gray a:hover,html body .swp_social_panel.swp_individual_full_color .nc_tweetContainer:hover a,html body .swp_social_panel.swp_individual_light_gray .nc_tweetContainer:hover a,html body .swp_social_panel.swp_individual_medium_gray a:hover{color:#fff}.swp_social_panel.swp_default_color_outlines .swp_twitter a,.wp-editor-container .swp_twitter:before,a.style1 .sw-click-to-tweet i.swp_twitter,a.style2 .sw-click-to-tweet i.swp_twitter,body .swp_social_panel.swp_other_color_outlines:hover .swp_twitter a,html body .swp_social_panel.swp_individual_color_outlines .swp_twitter a:hover{color:#429cd6}.sw-content-locator,.swp_social_panel.mobile .iconFiller~.swp_count{display:none}a.style1 .sw-click-to-tweet .sw-ctt-btn,a.style1 .sw-click-to-tweet .sw-ctt-text{color:#999;text-decoration:none}a.style1:hover .sw-click-to-tweet .sw-ctt-btn,a.style1:hover .sw-click-to-tweet .sw-ctt-text,a.style2 .sw-click-to-tweet .sw-ctt-btn,a.style2:hover .sw-click-to-tweet .sw-ctt-btn,a.style2:hover .sw-click-to-tweet .sw-ctt-text{color:#666;text-decoration:none}a.style3 .sw-click-to-tweet .sw-ctt-btn,a.style3 .sw-click-to-tweet i.swp_twitter,a.style3:hover .sw-click-to-tweet .sw-ctt-btn,a.style3:hover .sw-click-to-tweet .sw-ctt-text,a.style4 .sw-click-to-tweet .sw-ctt-btn,a.style4 .sw-click-to-tweet .sw-ctt-text,a.style4:hover .sw-click-to-tweet .sw-ctt-btn,a.style4:hover .sw-click-to-tweet .sw-ctt-text,a.style5 .sw-click-to-tweet .sw-ctt-btn,a.style5 .sw-click-to-tweet .sw-ctt-text,a.style5:hover .sw-click-to-tweet .sw-ctt-btn,a.style5:hover .sw-click-to-tweet .sw-ctt-text{color:#fff;text-decoration:none}a.style4 .sw-click-to-tweet i.swp_twitter,a.style5 .sw-click-to-tweet i.swp_twitter{color:#fff}a.style6 .sw-click-to-tweet .sw-ctt-btn,a.style6 .sw-click-to-tweet .sw-ctt-text{color:#30394f;text-decoration:none}a.style6:hover .sw-click-to-tweet .sw-ctt-btn,a.style6:hover .sw-click-to-tweet .sw-ctt-text,a.style6:hover .sw-click-to-tweet i.swp_twitter{color:#2a2d34;text-decoration:none}.scale-70{-ms-transform:scale(.7);-webkit-transform:scale(.7);transform:scale(.7)}.swp_social_panel:not(.nc_floater).scale-70.scale-full_width{width:142.8571428571429%!important}.scale-80{-ms-transform:scale(.8);-webkit-transform:scale(.8);transform:scale(.8)}.swp_social_panel:not(.nc_floater).scale-80.scale-full_width{width:125%!important}.scale-90{-ms-transform:scale(.9);-webkit-transform:scale(.9);transform:scale(.9)}.swp_social_panel:not(.nc_floater).scale-90.scale-full_width{width:111.111111111111%!important}.scale-110{-ms-transform:scale(1.1);-webkit-transform:scale(1.1);transform:scale(1.1)}.swp_social_panel:not(.nc_floater).scale-110.scale-full_width{width:90.90909090909091%!important}.scale-120{-ms-transform:scale(1.2);-webkit-transform:scale(1.2);transform:scale(1.2)}.swp_social_panel:not(.nc_floater).scale-120.scale-full_width{width:83.33333333333333%!important}.scale-130{-ms-transform:scale(1.3);-webkit-transform:scale(1.3);transform:scale(1.3)}.swp_social_panel:not(.nc_floater).scale-130.scale-full_width{width:76.92307692307692%!important}.scale-140{-ms-transform:scale(1.4);-webkit-transform:scale(1.4);transform:scale(1.4)}.swp_social_panel:not(.nc_floater).scale-140.scale-full_width{width:71.42857142857143%!important}.nc_floater.scale-center,.nc_floater.scale-right,.scale-full_width,.scale-left{-ms-transform-origin:left;-webkit-transform-origin:left;transform-origin:left}.scale-right{-ms-transform-origin:right;-webkit-transform-origin:right;transform-origin:right}.scale-center{-ms-transform-origin:center;-webkit-transform-origin:center;transform-origin:center}div.swp_social_panel .nc_tweetContainer.swp_emphasize{-webkit-box-flex:2;-moz-box-flex:2;-webkit-flex:2;-ms-flex:2;flex:2}.sw-pinit.aligncenter{margin:0 auto}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){div.sw-pinit{display:inline-block!important;max-width:100%}}.swp_hidden_pin_image{height:0;opacity:0;position:absolute;top:0;width:0}.fl-module-content .uabb-blog-posts .uabb-post-thumbnail .sw-pinit.lazyloaded{display:block!important}@-moz-document url-prefix(){.swp_social_panel .total_shares .swp_label{margin-top:8px}}.swp-content-locator{display:none!important;margin:0!important}.float-position-top-left{transform-origin:top left}.float-position-center-left{transform-origin:center left}.float-position-bottom-left{transform-origin:bottom left}.float-position-top-right{transform-origin:top right}.float-position-center-right{transform-origin:center right}.float-position-bottom-right{transform-origin:bottom right}div[class*=custom_color][class^=_wrapper]{display:none}
functions/admin/options-registration.php CHANGED
@@ -1,87 +1,87 @@
1
- <?php
2
- /**
3
- * Functions for loading the admin options page.
4
- *
5
- * @package SocialWarfare\Admin\Functions
6
- * @copyright Copyright (c) 2018, Warfare Plugins, LLC
7
- * @license GPL-3.0+
8
- * @since 1.0.0
9
- */
10
-
11
- $premium_code = '';
12
- $email = '';
13
-
14
- // Fetch the registration keys from pro and all other addons
15
- $array = array();
16
- $registrations = apply_filters('swp_registrations' , $array);
17
-
18
- foreach($registrations as $registration):
19
- if ( ! empty( $swp_user_options[$registration['key'].'_license_key'] ) ) {
20
- $license_key = $swp_user_options[$registration['key'].'_license_key'];
21
- $registered = 1;
22
- } else {
23
- $license_key = '';
24
- $registered = 0;
25
- }
26
- ?>
27
-
28
- <div class="registration-wrapper <?php echo $registration['key'] ?>" registration="<?php echo $registered; ?>">
29
-
30
- <h2><?php esc_html_e( $registration['plugin_name'].' Registration' , 'social-warfare' ); ?></h2>
31
-
32
- <div class="sw-grid sw-col-940 swp_is_not_registered">
33
-
34
- <div class="sw-red-notice">
35
- <?php _e( 'This copy of '.$registration['plugin_name'].' is NOT registered. <a target="_blank" href="https://warfareplugins.com">Click here</a> to purchase a license or add your account info below.' , 'social-warfare' ); ?>
36
- </div>
37
-
38
- <p class="sw-subtitle sw-registration-text">
39
- <?php esc_html_e( 'Enter your registration key for '.$registration['plugin_name'] .' and then click Register Plugin.' , 'social-warfare' ); ?>
40
- </p>
41
-
42
- <div class="sw-grid sw-col-300">
43
- <p class="sw-input-label">
44
- <?php esc_html_e( $registration['plugin_name'].' License Key' , 'social-warfare' ); ?>
45
- </p>
46
- </div>
47
-
48
- <div class="sw-grid sw-col-300">
49
- <input name="<?php echo $registration['key'] ?>_license_key" type="text" class="sw-admin-input" placeholder="License Key" value="<?php echo $license_key; ?>" />
50
- </div>
51
-
52
- <div class="sw-grid sw-col-300 sw-fit register_button_grid">
53
- <a href="#" class="register-plugin button sw-navy-button" swp-addon="<?php echo $registration['key']; ?>" swp-item-id="<?php echo $registration["product_id"]; ?>">
54
- <?php esc_html_e( 'Register Plugin' , 'social-warfare' ); ?>
55
- </a>
56
- </div>
57
-
58
- <div class="sw-clearfix"></div>
59
- </div>
60
-
61
- <div class="sw-grid sw-col-940 swp_is_registered">
62
-
63
- <div class="sw-green-notice">
64
- <?php esc_html_e( 'This copy of '.$registration['plugin_name'].' is registered. Wah-hoo!', 'social-warfare' ); ?>
65
- </div>
66
-
67
- <p class="sw-subtitle sw-registration-text">
68
- <?php esc_html_e( 'To unregister your license click the button below to free it up for use on another domain.' , 'social-warfare' ); ?>
69
- </p>
70
-
71
- <div class="sw-grid sw-col-300">
72
- <p class="sw-authenticate-label">
73
- <?php esc_html_e( 'Deactivate Registration' , 'social-warfare' ); ?>
74
- </p>
75
- </div>
76
-
77
- <div class="sw-grid sw-col-300">
78
- <a href="#" class="unregister-plugin button sw-navy-button" swp-addon="<?php echo $registration['key']; ?>" swp-item-id="<?php echo $registration["product_id"]; ?>">
79
- <?php esc_html_e( 'Unregister Plugin' , 'social-warfare' ); ?>
80
- </a>
81
- </div>
82
- <div class="sw-grid sw-col-300 sw-fit"></div>
83
-
84
- </div>
85
-
86
- </div>
87
- <?php endforeach; ?>
1
+ <?php
2
+ /**
3
+ * Functions for loading the admin options page.
4
+ *
5
+ * @package SocialWarfare\Admin\Functions
6
+ * @copyright Copyright (c) 2018, Warfare Plugins, LLC
7
+ * @license GPL-3.0+
8
+ * @since 1.0.0
9
+ */
10
+
11
+ $premium_code = '';
12
+ $email = '';
13
+
14
+ // Fetch the registration keys from pro and all other addons
15
+ $array = array();
16
+ $registrations = apply_filters('swp_registrations' , $array);
17
+
18
+ foreach($registrations as $registration):
19
+ if ( ! empty( $swp_user_options[$registration['key'].'_license_key'] ) ) {
20
+ $license_key = $swp_user_options[$registration['key'].'_license_key'];
21
+ $registered = 1;
22
+ } else {
23
+ $license_key = '';
24
+ $registered = 0;
25
+ }
26
+ ?>
27
+
28
+ <div class="registration-wrapper <?php echo $registration['key'] ?>" registration="<?php echo $registered; ?>">
29
+
30
+ <h2><?php esc_html_e( $registration['plugin_name'].' Registration' , 'social-warfare' ); ?></h2>
31
+
32
+ <div class="sw-grid sw-col-940 swp_is_not_registered">
33
+
34
+ <div class="sw-red-notice">
35
+ <?php _e( 'This copy of '.$registration['plugin_name'].' is NOT registered. <a target="_blank" href="https://warfareplugins.com">Click here</a> to purchase a license or add your account info below.' , 'social-warfare' ); ?>
36
+ </div>
37
+
38
+ <p class="sw-subtitle sw-registration-text">
39
+ <?php esc_html_e( 'Enter your registration key for '.$registration['plugin_name'] .' and then click Register Plugin.' , 'social-warfare' ); ?>
40
+ </p>
41
+
42
+ <div class="sw-grid sw-col-300">
43
+ <p class="sw-input-label">
44
+ <?php esc_html_e( $registration['plugin_name'].' License Key' , 'social-warfare' ); ?>
45
+ </p>
46
+ </div>
47
+
48
+ <div class="sw-grid sw-col-300">
49
+ <input name="<?php echo $registration['key'] ?>_license_key" type="text" class="sw-admin-input" placeholder="License Key" value="<?php echo $license_key; ?>" />
50
+ </div>
51
+
52
+ <div class="sw-grid sw-col-300 sw-fit register_button_grid">
53
+ <a href="#" class="register-plugin button sw-navy-button" swp-addon="<?php echo $registration['key']; ?>" swp-item-id="<?php echo $registration["product_id"]; ?>">
54
+ <?php esc_html_e( 'Register Plugin' , 'social-warfare' ); ?>
55
+ </a>
56
+ </div>
57
+
58
+ <div class="sw-clearfix"></div>
59
+ </div>
60
+
61
+ <div class="sw-grid sw-col-940 swp_is_registered">
62
+
63
+ <div class="sw-green-notice">
64
+ <?php esc_html_e( 'This copy of '.$registration['plugin_name'].' is registered. Wah-hoo!', 'social-warfare' ); ?>
65
+ </div>
66
+
67
+ <p class="sw-subtitle sw-registration-text">
68
+ <?php esc_html_e( 'To unregister your license click the button below to free it up for use on another domain.' , 'social-warfare' ); ?>
69
+ </p>
70
+
71
+ <div class="sw-grid sw-col-300">
72
+ <p class="sw-authenticate-label">
73
+ <?php esc_html_e( 'Deactivate Registration' , 'social-warfare' ); ?>
74
+ </p>
75
+ </div>
76
+
77
+ <div class="sw-grid sw-col-300">
78
+ <a href="#" class="unregister-plugin button sw-navy-button" swp-addon="<?php echo $registration['key']; ?>" swp-item-id="<?php echo $registration["product_id"]; ?>">
79
+ <?php esc_html_e( 'Unregister Plugin' , 'social-warfare' ); ?>
80
+ </a>
81
+ </div>
82
+ <div class="sw-grid sw-col-300 sw-fit"></div>
83
+
84
+ </div>
85
+
86
+ </div>
87
+ <?php endforeach; ?>
functions/admin/swp_system_checker.php CHANGED
@@ -1,147 +1,147 @@
1
- <?php
2
- /**
3
- * A series of classes to check the user's system for minimum system requirements
4
- *
5
- * @package social-warfare\functions\admin
6
- * @copyright Copyright (c) 2018, Warfare Plugins, LLC
7
- * @license GPL-3.0+
8
- * @since 2.2.4 | Created | 1 MAY 2017
9
- */
10
-
11
- /**
12
- * A class for initializing the system checks
13
- *
14
- * @since 2.2.4 | Created | 1 MAY 2017
15
- * @access public
16
- */
17
- abstract class swp_custom_check
18
- {
19
- public $name = "";
20
- public $whats_wrong = "";
21
- public $how_to_fix= "";
22
- public $check_passed = null;
23
- public $additional_message = null;
24
-
25
- /**
26
- * Force children to have an executable run method.
27
- */
28
- abstract public function run();
29
- }
30
-
31
- /**
32
- * A series of classes to check the user's system for minimum system requirements
33
- *
34
- * @since 2.2.4 | Created | 6 March 2017
35
- * @access public
36
- * @return string The HTML for an error notice if triggered
37
- */
38
- class swp_system_checker
39
- {
40
- public static $custom_checks = array();
41
- public static $has_error = FALSE;
42
-
43
- public static function full_system_check()
44
- {
45
- swp_system_checker::load_all_checks();
46
- swp_system_checker::run_all_checks();
47
- swp_system_checker::print_all_errors();
48
-
49
- }
50
-
51
- public static function load_all_checks()
52
- {
53
- swp_system_checker::$custom_checks[ 'swp_php_check' ] = new swp_php_check();
54
- swp_system_checker::$custom_checks[ 'swp_curl_check' ] = new swp_curl_check();
55
- }
56
-
57
- public static function run_all_checks()
58
- {
59
- foreach( swp_system_checker::$custom_checks as $custom_check )
60
- {
61
- if( method_exists( $custom_check, 'run' ) ) {
62
- if( !$custom_check->run() && !$custom_check->check_passed ) {
63
- swp_system_checker::$has_error = true;
64
- }
65
- }
66
- }
67
- }
68
-
69
- public static function print_all_errors()
70
- {
71
- if( !isset( swp_system_checker::$has_error ) || empty( swp_system_checker::$has_error ) ) {
72
- return FALSE;
73
- }
74
-
75
- foreach( swp_system_checker::$custom_checks as $custom_check )
76
- {
77
- if( $custom_check->check_passed ) {
78
- continue;
79
- }
80
-
81
- echo '<div class="sw-red-notice">' . $custom_check->whats_wrong . $custom_check->how_to_fix . '</div>';
82
- }
83
- }
84
- }
85
-
86
- /**
87
- * A class to detect if the user is using a compatible version of PHP (5.3+) on their server
88
- *
89
- * @since 2.2.4 | Created | 1 MAY 2017
90
- * @access public
91
- * @return string The HTML for an error notice if triggered
92
- */
93
- class swp_php_check extends swp_custom_check
94
- {
95
- public function __construct()
96
- {
97
- $this->name = 'PHP Check';
98
- }
99
-
100
- public function run()
101
- {
102
- if( version_compare( PHP_VERSION, '5.2.0' ) >= 0 )
103
- {
104
- $this->check_passed = true;
105
- }
106
- else
107
- {
108
- $this->check_passed = false;
109
- $this->whats_wrong = 'Your server is currently using PHP version '.PHP_VERSION.'. In order for our plugin to fetch share counts properly, you must be using PHP 5.3 or newer.';
110
- $this->how_to_fix = 'To fix this, simply contact your hosting provider and ask them to update your server to the latest stable version of PHP.';
111
- }
112
-
113
- return $this->check_passed;
114
- }
115
- }
116
-
117
- /**
118
- * A class to detect if the user has cURL enabled on their server. cURL is a requirement of the plugin.
119
- *
120
- * @since 2.2.4 | Created | 1 MAY 2017
121
- * @access public
122
- * @return string The HTML for an error notice if triggered
123
- */
124
- class swp_curl_check extends swp_custom_check
125
- {
126
- public function __construct()
127
- {
128
- $this->name = 'Curl Check';
129
- }
130
-
131
- public function run()
132
- {
133
-
134
- if( function_exists( 'curl_version' ) )
135
- {
136
- $this->check_passed = true;
137
- }
138
- else
139
- {
140
- $this->check_passed = false;
141
- $this->whats_wrong = 'Your server has cURL disabled. In order for our plugin to fetch share counts, you must have cURL enabled on your server.';
142
- $this->how_to_fix = 'To fix this, simply contact your hosting provider and ask them to activate cURL on your server.';
143
- }
144
-
145
- return $this->check_passed;
146
- }
147
- }
1
+ <?php
2
+ /**
3
+ * A series of classes to check the user's system for minimum system requirements
4
+ *
5
+ * @package social-warfare\functions\admin
6
+ * @copyright Copyright (c) 2018, Warfare Plugins, LLC
7
+ * @license GPL-3.0+
8
+ * @since 2.2.4 | Created | 1 MAY 2017
9
+ */
10
+
11
+ /**
12
+ * A class for initializing the system checks
13
+ *
14
+ * @since 2.2.4 | Created | 1 MAY 2017
15
+ * @access public
16
+ */
17
+ abstract class swp_custom_check
18
+ {
19
+ public $name = "";
20
+ public $whats_wrong = "";
21
+ public $how_to_fix= "";
22
+ public $check_passed = null;
23
+ public $additional_message = null;
24
+
25
+ /**
26
+ * Force children to have an executable run method.
27
+ */
28
+ abstract public function run();
29
+ }
30
+
31
+ /**
32
+ * A series of classes to check the user's system for minimum system requirements
33
+ *
34
+ * @since 2.2.4 | Created | 6 March 2017
35
+ * @access public
36
+ * @return string The HTML for an error notice if triggered
37
+ */
38
+ class swp_system_checker
39
+ {
40
+ public static $custom_checks = array();
41
+ public static $has_error = FALSE;
42
+
43
+ public static function full_system_check()
44
+ {
45
+ swp_system_checker::load_all_checks();
46
+ swp_system_checker::run_all_checks();
47
+ swp_system_checker::print_all_errors();
48
+
49
+ }
50
+
51
+ public static function load_all_checks()
52
+ {
53
+ swp_system_checker::$custom_checks[ 'swp_php_check' ] = new swp_php_check();
54
+ swp_system_checker::$custom_checks[ 'swp_curl_check' ] = new swp_curl_check();
55
+ }
56
+
57
+ public static function run_all_checks()
58
+ {
59
+ foreach( swp_system_checker::$custom_checks as $custom_check )
60
+ {
61
+ if( method_exists( $custom_check, 'run' ) ) {
62
+ if( !$custom_check->run() && !$custom_check->check_passed ) {
63
+ swp_system_checker::$has_error = true;
64
+ }
65
+ }
66
+ }
67
+ }
68
+
69
+ public static function print_all_errors()
70
+ {
71
+ if( !isset( swp_system_checker::$has_error ) || empty( swp_system_checker::$has_error ) ) {
72
+ return FALSE;
73
+ }
74
+
75
+ foreach( swp_system_checker::$custom_checks as $custom_check )
76
+ {
77
+ if( $custom_check->check_passed ) {
78
+ continue;
79
+ }
80
+
81
+ echo '<div class="sw-red-notice">' . $custom_check->whats_wrong . $custom_check->how_to_fix . '</div>';
82
+ }
83
+ }
84
+ }
85
+
86
+ /**
87
+ * A class to detect if the user is using a compatible version of PHP (5.3+) on their server
88
+ *
89
+ * @since 2.2.4 | Created | 1 MAY 2017
90
+ * @access public
91
+ * @return string The HTML for an error notice if triggered
92
+ */
93
+ class swp_php_check extends swp_custom_check
94
+ {
95
+ public function __construct()
96
+ {
97
+ $this->name = 'PHP Check';
98
+ }
99
+
100
+ public function run()
101
+ {
102
+ if( version_compare( PHP_VERSION, '5.2.0' ) >= 0 )
103
+ {
104
+ $this->check_passed = true;
105
+ }
106
+ else
107
+ {
108
+ $this->check_passed = false;
109
+ $this->whats_wrong = 'Your server is currently using PHP version '.PHP_VERSION.'. In order for our plugin to fetch share counts properly, you must be using PHP 5.3 or newer.';
110
+ $this->how_to_fix = 'To fix this, simply contact your hosting provider and ask them to update your server to the latest stable version of PHP.';
111
+ }
112
+
113
+ return $this->check_passed;
114
+ }
115
+ }
116
+
117
+ /**
118
+ * A class to detect if the user has cURL enabled on their server. cURL is a requirement of the plugin.
119
+ *
120
+ * @since 2.2.4 | Created | 1 MAY 2017
121
+ * @access public
122
+ * @return string The HTML for an error notice if triggered
123
+ */
124
+ class swp_curl_check extends swp_custom_check
125
+ {
126
+ public function __construct()
127
+ {
128
+ $this->name = 'Curl Check';
129
+ }
130
+
131
+ public function run()
132
+ {
133
+
134
+ if( function_exists( 'curl_version' ) )
135
+ {
136
+ $this->check_passed = true;
137
+ }
138
+ else
139
+ {
140
+ $this->check_passed = false;
141
+ $this->whats_wrong = 'Your server has cURL disabled. In order for our plugin to fetch share counts, you must have cURL enabled on your server.';
142
+ $this->how_to_fix = 'To fix this, simply contact your hosting provider and ask them to activate cURL on your server.';
143
+ }
144
+
145
+ return $this->check_passed;
146
+ }
147
+ }
functions/frontend-output/SWP_Buttons_Panel.php CHANGED
@@ -19,6 +19,8 @@ class SWP_Buttons_Panel {
19
  *
20
  */
21
  public $options = array();
 
 
22
  /**
23
  * The Post ID
24
  *
@@ -26,6 +28,8 @@ class SWP_Buttons_Panel {
26
  *
27
  */
28
  public $post_id;
 
 
29
  /**
30
  * The location of the buttons in relation to the content.
31
  *
@@ -33,6 +37,8 @@ class SWP_Buttons_Panel {
33
  *
34
  */
35
  public $location = 'above';
 
 
36
  /**
37
  * Arguments
38
  *
@@ -44,6 +50,8 @@ class SWP_Buttons_Panel {
44
  *
45
  */
46
  public $args = [];
 
 
47
  /**
48
  * The Content
49
  *
@@ -53,24 +61,32 @@ class SWP_Buttons_Panel {
53
  *
54
  */
55
  public $content = '';
56
- /**
 
 
57
  * The fully qualified HTML for the Buttons Panel.
58
  *
59
  * @var string $html;
60
  */
61
  public $html = '';
62
- /**
 
 
63
  * The array of active buttons for $this Social Panel.
64
  *
65
  * @var array $active_buttons;
66
  */
67
  public $active_buttons = [];
68
- /**
 
 
69
  * The sum of share counts across active networks.
70
  *
71
  * @var integer $total_shares;
72
  */
73
  public $total_shares = 0;
 
 
74
  /**
75
  * The Construct Method
76
  *
@@ -81,7 +97,7 @@ class SWP_Buttons_Panel {
81
  global $swp_social_networks, $post;
82
  $this->networks = $swp_social_networks;
83
  $this->args = $args;
84
- $this->content = isset( $args['content'] ) ? $args['content'] : $post->post_content;
85
  //* Access the $post once while we have it. Values may be overwritten.
86
  $this->post_data = [
87
  'ID' => $post->ID,
@@ -196,6 +212,7 @@ class SWP_Buttons_Panel {
196
  * content to which to append.
197
  *
198
  * @since 3.0.0 | 10 APR 2018 | Created
 
199
  * @param none
200
  * @return none All values are stored in local properties.
201
  * @access public
@@ -204,6 +221,11 @@ class SWP_Buttons_Panel {
204
  public function establish_location() {
205
  //* Establish a default.
206
  $this->location = 'none';
 
 
 
 
 
207
  /**
208
  * Location from the Post Options
209
  *
@@ -215,6 +237,7 @@ class SWP_Buttons_Panel {
215
  // If the location is set in the post options, use that.
216
  if ( !empty( $preset_location ) && 'default' !== $preset_location ) {
217
  $this->location = $preset_location;
 
218
  };
219
  /**
220
  * Global Location Settings
@@ -227,15 +250,17 @@ class SWP_Buttons_Panel {
227
  if( is_front_page() ):
228
  $home = $this->options['location_home'];
229
  $this->location = isset( $home ) ? $home : 'none';
 
230
  endif;
231
  // If we are on a singular page
232
- if ( is_singular() && !is_home() ) :
233
  $location = $this->options[ 'location_' . $this->post_data['post_type'] ];
234
  if ( isset( $location ) ) :
235
  $this->location = $location;
 
236
  endif;
237
  endif;
238
- if ( is_archive() ) :
239
  $this->location = $this->options['location_archive_categories'];
240
  endif;
241
  }
@@ -294,6 +319,8 @@ class SWP_Buttons_Panel {
294
  endif;
295
  return $conflict;
296
  }
 
 
297
  /**
298
  * Tells you true/false if the buttons should print on this page.
299
  *
@@ -304,18 +331,35 @@ class SWP_Buttons_Panel {
304
  * $desired_conditions: WordPress conditions we require for the buttons.
305
  * $undesired_conditions: WordPress pages where we do not display the buttons.
306
  *
 
307
  * @return Boolean True if the buttons are okay to print, else false.
308
  */
309
  public function should_print() {
310
  $user_settings = $this->location !== 'none';
 
311
  $desired_conditions = is_main_query() && in_the_loop() && get_post_status( $this->post_data['ID'] ) === 'publish';
 
312
  $undesired_conditions = !is_admin() && !is_feed() && !is_search() && !is_attachment();
313
  return $user_settings && $desired_conditions && $undesired_conditions;
314
  }
 
 
 
 
 
 
 
 
 
 
 
 
315
  public function render_HTML( $echo = false ) {
 
316
  if ( ! $this->should_print() ) :
317
  return $this->content;
318
  endif;
 
319
  $total_shares_html = $this->render_total_shares_html();
320
  $buttons = $this->render_buttons_html();
321
  // Create the HTML Buttons panel wrapper
@@ -326,8 +370,8 @@ class SWP_Buttons_Panel {
326
  ' scale-' . $this->options['button_size'] * 100 .
327
  ' scale-' . $this->options['button_alignment'] .
328
  '" data-position="' . $this->options['location_post'] .
329
- '" data-float="' . $this->options['float_location'] .
330
- '" data-float-mobile="' . $this->options['float_mobile'] .
331
  '" data-count="' . $this->total_shares .
332
  '" data-floatcolor="' . $this->options['float_background_color'] . '
333
  ">';
@@ -341,70 +385,155 @@ class SWP_Buttons_Panel {
341
  $html = $container . $buttons . '</div>';
342
  $this->html = $html;
343
  if ( $echo ) :
 
 
 
344
  echo $html;
345
  endif;
346
  return $html;
347
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348
  public function render_floating_HTML( $echo = true ) {
349
  //* BEGIN Old boilerplate that needs to be refactored.
350
- $class = "";
351
- $size = $this->options['float_size'] * 100;
352
- $side = $this->options['float_location'];
353
- $max_buttons = swp_get_option( 'float_button_count' );
354
- // Acquire the social stats from the networks
355
- if ( isset( $array['url'] ) ) :
356
- $buttonsArray['url'] = $array['url'];
357
- else :
358
- $buttonsArray['url'] = get_permalink( $this->post_id );
359
- endif;
360
- if ( $this->options['floating_panel'] && is_singular() ) :
361
- $float_location = $this->options['float_location'];
362
- $class = "swp_float_" . $this->options['float_location'];
363
- else :
364
- $float_location = 'ignore';
365
- endif;
366
- if ( $this->options['float_style_source'] == true ) :
367
- $this->options['float_default_colors'] = $this->options['default_colors'];
368
- $this->options['float_single_colors'] = $this->options['single_colors'];
369
- $this->options['float_hover_colors'] = $this->options['hover_colors'];
370
- endif;
371
- // *Get the vertical position
372
- if ($this->options['float_alignment'] ) :
373
- $class .= " swp_side_" . $this->options['float_alignment'];
374
- endif;
375
- // *Set button size
376
- if ( isset($this->options['float_size']) ) :
377
- $position = $this->options['float_alignment'];
378
- $class .= " scale-${size} float-position-${position}-${side}";
379
- endif;
380
- //* END old boilerplate.
381
- $share_counts = $this->render_total_shares_HTML();
382
- $buttons = $this->render_buttons_HTML( (int) $max_buttons );
383
- $container = '<div class="swp_social_panelSide swp_social_panel swp_'. $this->options['float_button_shape'] .
384
- ' swp_default_' . $this->options['float_default_colors'] .
385
- ' swp_individual_' . $this->options['float_single_colors'] .
386
- ' swp_other_' . $this->options['float_hover_colors'] . '
387
- ' . $this->options['transition'] . '
388
- ' . $class . '
389
- ' . '" data-position="' . $this->options['location_post'] .
390
- ' scale-' . $this->options['float_size'] * 100 .
391
- '" data-float="' . $float_location .
392
- '" data-count="' . count($this->networks) .
393
- '" data-floatColor="' . $this->options['float_background_color'] .
394
- '" data-screen-width="' . $this->options['float_screen_width'] .
395
- '" data-transition="' . $this->options['transition'] .
396
- '" data-float-mobile="'.$this->options['float_mobile'].'">';
397
- if ($this->options['totals_alignment'] === 'totals_left') :
398
- $buttons = $share_counts . $buttons;
399
- else:
400
- $buttons .= $share_counts;
401
- endif;
402
- $html = $container . $buttons . '</div>';
403
- $this->html = $html;
404
- if ( $echo ) :
405
- echo $html;
406
- endif;
407
- return $html;
 
 
 
 
 
 
 
 
408
  }
409
  /**
410
  * A method to establish the active buttons for this panel.
@@ -425,9 +554,11 @@ class SWP_Buttons_Panel {
425
  */
426
  public function establish_active_buttons() {
427
  $network_objects = [];
 
428
  //* Specified buttons take precedence to global options.
429
  if ( isset( $this->args['buttons'] ) ) :
430
  $this->args['buttons'] = explode( ',', $this->args['buttons'] );
 
431
  foreach ( $this->args['buttons'] as $counts_key ) {
432
  $network_key = $this->display_name_to_key( $counts_key );
433
  foreach( $this->networks as $key => $network ):
@@ -436,17 +567,22 @@ class SWP_Buttons_Panel {
436
  endif;
437
  endforeach;
438
  }
 
439
  //* Use global button settings.
440
  else :
 
441
  // Order manually using the user's specified order.
442
  if ( $this->options['order_of_icons_method'] === 'manual' ) :
443
  $order = $this->options['order_of_icons'];
 
444
  // Order them dynamically according to share counts.
445
  else :
446
  $order = $this->get_dynamic_buttons_order();
447
  endif;
 
448
  $network_objects = $this->order_network_objects($order);
449
  endif;
 
450
  $this->networks = $network_objects;
451
  return $this;
452
  }
@@ -459,13 +595,17 @@ class SWP_Buttons_Panel {
459
  */
460
  protected function get_dynamic_buttons_order() {
461
  $order = array();
462
- arsort($this->shares);
463
- foreach( $this->shares as $key => $value ):
464
- if($key !== 'total_shares'):
465
- $order[$key] = $key;
466
- endif;
467
- endforeach;
468
- $this->options['order_of_icons'] = $order;
 
 
 
 
469
  return $order;
470
  }
471
  /**
@@ -503,6 +643,8 @@ class SWP_Buttons_Panel {
503
  }
504
  return $html;
505
  }
 
 
506
  /**
507
  * The Total Shares Count
508
  *
@@ -514,7 +656,7 @@ class SWP_Buttons_Panel {
514
  *
515
  */
516
  public function render_total_shares_html() {
517
- if ( empty( $this->shares['total_shares']) || $this->shares['total_shares'] <= $this->options['minimum_shares'] ) {
518
  return '';
519
  }
520
  $html = '<div class="nc_tweetContainer total_shares total_sharesalt" >';
@@ -536,9 +678,7 @@ class SWP_Buttons_Panel {
536
  *
537
  */
538
  public function do_print() {
539
- if ( isset( $this->args['echo']) && true === $this->args['echo'] || $this->content == false ) {
540
- return;
541
- }
542
  $this->render_HTML();
543
  $content = $this->content . '<p class="swp-content-locator"></p>';
544
 
@@ -552,14 +692,30 @@ class SWP_Buttons_Panel {
552
  endif;
553
 
554
  $this->content = $content;
 
 
 
 
 
 
 
 
555
  return $this->content;
556
  }
557
 
558
- public function the_buttons() {
 
 
 
 
559
  if ( ! $this->should_print() ) :
560
  return $this->args['content'];
561
  endif;
562
 
 
 
 
 
563
  if ( $this->has_plugin_conflict() ) {
564
  return;
565
  }
19
  *
20
  */
21
  public $options = array();
22
+
23
+
24
  /**
25
  * The Post ID
26
  *
28
  *
29
  */
30
  public $post_id;
31
+
32
+
33
  /**
34
  * The location of the buttons in relation to the content.
35
  *
37
  *
38
  */
39
  public $location = 'above';
40
+
41
+
42
  /**
43
  * Arguments
44
  *
50
  *
51
  */
52
  public $args = [];
53
+
54
+
55
  /**
56
  * The Content
57
  *
61
  *
62
  */
63
  public $content = '';
64
+
65
+
66
+ /**
67
  * The fully qualified HTML for the Buttons Panel.
68
  *
69
  * @var string $html;
70
  */
71
  public $html = '';
72
+
73
+
74
+ /**
75
  * The array of active buttons for $this Social Panel.
76
  *
77
  * @var array $active_buttons;
78
  */
79
  public $active_buttons = [];
80
+
81
+
82
+ /**
83
  * The sum of share counts across active networks.
84
  *
85
  * @var integer $total_shares;
86
  */
87
  public $total_shares = 0;
88
+
89
+
90
  /**
91
  * The Construct Method
92
  *
97
  global $swp_social_networks, $post;
98
  $this->networks = $swp_social_networks;
99
  $this->args = $args;
100
+ $this->content = isset( $args['content'] ) ? $args['content'] : '';
101
  //* Access the $post once while we have it. Values may be overwritten.
102
  $this->post_data = [
103
  'ID' => $post->ID,
212
  * content to which to append.
213
  *
214
  * @since 3.0.0 | 10 APR 2018 | Created
215
+ * @since 3.0.5 | 11 MAY 2018 | Added returns to the method won't keep processing.
216
  * @param none
217
  * @return none All values are stored in local properties.
218
  * @access public
221
  public function establish_location() {
222
  //* Establish a default.
223
  $this->location = 'none';
224
+
225
+ if(empty($this->content)):
226
+ $this->location = 'above';
227
+ return;
228
+ endif;
229
  /**
230
  * Location from the Post Options
231
  *
237
  // If the location is set in the post options, use that.
238
  if ( !empty( $preset_location ) && 'default' !== $preset_location ) {
239
  $this->location = $preset_location;
240
+ return;
241
  };
242
  /**
243
  * Global Location Settings
250
  if( is_front_page() ):
251
  $home = $this->options['location_home'];
252
  $this->location = isset( $home ) ? $home : 'none';
253
+ return;
254
  endif;
255
  // If we are on a singular page
256
+ if ( is_singular() && !is_front_page() ) :
257
  $location = $this->options[ 'location_' . $this->post_data['post_type'] ];
258
  if ( isset( $location ) ) :
259
  $this->location = $location;
260
+ return;
261
  endif;
262
  endif;
263
+ if ( is_archive() || is_home() ) :
264
  $this->location = $this->options['location_archive_categories'];
265
  endif;
266
  }
319
  endif;
320
  return $conflict;
321
  }
322
+
323
+
324
  /**
325
  * Tells you true/false if the buttons should print on this page.
326
  *
331
  * $desired_conditions: WordPress conditions we require for the buttons.
332
  * $undesired_conditions: WordPress pages where we do not display the buttons.
333
  *
334
+ *
335
  * @return Boolean True if the buttons are okay to print, else false.
336
  */
337
  public function should_print() {
338
  $user_settings = $this->location !== 'none';
339
+
340
  $desired_conditions = is_main_query() && in_the_loop() && get_post_status( $this->post_data['ID'] ) === 'publish';
341
+
342
  $undesired_conditions = !is_admin() && !is_feed() && !is_search() && !is_attachment();
343
  return $user_settings && $desired_conditions && $undesired_conditions;
344
  }
345
+
346
+
347
+ /**
348
+ * The method that renderes the button panel HTML.
349
+ *
350
+ * @since 3.0.0 | 25 APR 2018 | Created
351
+ * @since 3.0.3 | 09 MAY 2018 | Switched the button locations to use the
352
+ * location methods instead of the raw options value.
353
+ * @param boolean $echo Echo's the content or returns it if false.
354
+ * @return string The string of HTML.
355
+ *
356
+ */
357
  public function render_HTML( $echo = false ) {
358
+
359
  if ( ! $this->should_print() ) :
360
  return $this->content;
361
  endif;
362
+
363
  $total_shares_html = $this->render_total_shares_html();
364
  $buttons = $this->render_buttons_html();
365
  // Create the HTML Buttons panel wrapper
370
  ' scale-' . $this->options['button_size'] * 100 .
371
  ' scale-' . $this->options['button_alignment'] .
372
  '" data-position="' . $this->options['location_post'] .
373
+ '" data-float="' . $this->get_float_location() .
374
+ '" data-float-mobile="' . $this->get_mobile_float_location() .
375
  '" data-count="' . $this->total_shares .
376
  '" data-floatcolor="' . $this->options['float_background_color'] . '
377
  ">';
385
  $html = $container . $buttons . '</div>';
386
  $this->html = $html;
387
  if ( $echo ) :
388
+ if( true == _swp_is_debug('buttons_output')):
389
+ echo 'Echoing, not returning. In SWP_Buttons_Panel on line '.__LINE__;
390
+ endif;
391
  echo $html;
392
  endif;
393
  return $html;
394
  }
395
+
396
+
397
+ /**
398
+ * A function to avoid getting undefined index notices.
399
+ *
400
+ * @since 3.0.5 | 10 MAY 2018 | Created
401
+ * @param string $key The name of the option.
402
+ * @return mixed The value of that option.
403
+ *
404
+ */
405
+ private function option($key) {
406
+
407
+ $defaults = array();
408
+ $defaults = apply_filters('swp_options_page_defaults' , $defaults );
409
+
410
+ if( isset( $this->options[$key] ) ):
411
+ return $this->options[$key];
412
+ elseif( isset( $defaults[$key] ) ):
413
+ return $defaults[$key];
414
+ else:
415
+ return false;
416
+ endif;
417
+
418
+ }
419
+
420
+ /**
421
+ * A Method to determine the location of the floating buttons
422
+ *
423
+ * This method was created because we can't just use the option as it is set
424
+ * in the options page. Instead, we must first check that we are on a single.php
425
+ * page and second we must check that the floating buttons toggle is turned on.
426
+ * Then and only then will we check the actual floating location and return it.
427
+ *
428
+ * @since 3.0.0 | 09 MAY 2018 | Created
429
+ * @since 3.0.4 | 09 MAY 2018 | Added check for the global post type on/off toggle.
430
+ * @param none
431
+ * @return string A string containing the float bar location.
432
+ *
433
+ */
434
+ public function get_float_location() {
435
+ if( is_home() || is_front_page() ):
436
+ return 'none';
437
+ elseif( is_single() && true == $this->option('floating_panel') && 'on' == $this->option('float_location_' . $this->post_data['post_type'] ) ):
438
+ return $this->option('float_location');
439
+ else:
440
+ return 'none';
441
+ endif;
442
+ }
443
+
444
+
445
+ /**
446
+ * A Method to determine the location of the floating buttons on mobile devices
447
+ *
448
+ * This method was created because we can't just use the option as it is set
449
+ * in the options page. Instead, we must first check that we are on a single.php
450
+ * page and second we must check that the floating buttons toggle is turned on.
451
+ * Then and only then will we check the actual floating location and return it.
452
+ *
453
+ * @since 3.0.0 | 09 MAY 2018 | Created
454
+ * @since 3.0.4 | 09 MAY 2018 | Added check for the global post type on/off toggle.
455
+ * @param none
456
+ * @return string A string containing the float bar location.
457
+ *
458
+ */
459
+ public function get_mobile_float_location() {
460
+ if( is_home() || is_front_page() ):
461
+ return 'none';
462
+ elseif( is_single() && true == $this->option('floating_panel') && 'on' == $this->option('float_location_' . $this->post_data['post_type'] ) ):
463
+ return $this->option('float_mobile');
464
+ else:
465
+ return 'none';
466
+ endif;
467
+ }
468
+
469
  public function render_floating_HTML( $echo = true ) {
470
  //* BEGIN Old boilerplate that needs to be refactored.
471
+
472
+ if( is_singular() && 'none' !== $this->get_float_location() ):
473
+
474
+ $class = "";
475
+ $size = $this->option('float_size') * 100;
476
+ $side = $this->option('float_location');
477
+ $max_buttons = $this->option( 'float_button_count' );
478
+ if( false == $max_buttons || 0 == $max_buttons ):
479
+ $max_buttons = 5;
480
+ endif;
481
+ // Acquire the social stats from the networks
482
+ if ( isset( $array['url'] ) ) :
483
+ $buttonsArray['url'] = $array['url'];
484
+ else :
485
+ $buttonsArray['url'] = get_permalink( $this->post_id );
486
+ endif;
487
+ if ( 'none' != $this->get_float_location() ) :
488
+ $float_location = $this->option('float_location');
489
+ $class = "swp_float_" . $this->option('float_location');
490
+ else :
491
+ $float_location = 'ignore';
492
+ endif;
493
+ if ( $this->options['float_style_source'] == true ) :
494
+ $this->options['float_default_colors'] = $this->option('default_colors');
495
+ $this->options['float_single_colors'] = $this->option('single_colors');
496
+ $this->options['float_hover_colors'] = $this->option('hover_colors');
497
+ endif;
498
+ // *Get the vertical position
499
+ if ($this->option('float_alignment') ) :
500
+ $class .= " swp_side_" . $this->option('float_alignment');
501
+ endif;
502
+ // *Set button size
503
+ if ( isset($this->options['float_size']) ) :
504
+ $position = $this->option('float_alignment');
505
+ $class .= " scale-${size} float-position-${position}-${side}";
506
+ endif;
507
+ //* END old boilerplate.
508
+ $share_counts = $this->render_total_shares_HTML();
509
+
510
+ $buttons = $this->render_buttons_HTML( (int) $max_buttons );
511
+ $container = '<div class="swp_social_panelSide swp_social_panel swp_'. $this->option('float_button_shape') .
512
+ ' swp_default_' . $this->option('float_default_colors') .
513
+ ' swp_individual_' . $this->option('float_single_colors') .
514
+ ' swp_other_' . $this->option('float_hover_colors') . '
515
+ ' . $this->option('transition') . '
516
+ ' . $class . '
517
+ ' . '" data-position="' . $this->option('location_post') .
518
+ ' scale-' . $this->option('float_size') * 100 .
519
+ '" data-float="' . $float_location .
520
+ '" data-count="' . count($this->networks) .
521
+ '" data-floatColor="' . $this->option('float_background_color') .
522
+ '" data-screen-width="' . $this->option('float_screen_width') .
523
+ '" data-transition="' . $this->option('transition') .
524
+ '" data-float-mobile="'.$this->option('float_mobile').'">';
525
+ if ($this->option('totals_alignment') === 'totals_left') :
526
+ $buttons = $share_counts . $buttons;
527
+ else:
528
+ $buttons .= $share_counts;
529
+ endif;
530
+ $html = $container . $buttons . '</div>';
531
+ $this->html = $html;
532
+ if ( $echo ) :
533
+ echo $html;
534
+ endif;
535
+ return $html;
536
+ endif;
537
  }
538
  /**
539
  * A method to establish the active buttons for this panel.
554
  */
555
  public function establish_active_buttons() {
556
  $network_objects = [];
557
+
558
  //* Specified buttons take precedence to global options.
559
  if ( isset( $this->args['buttons'] ) ) :
560
  $this->args['buttons'] = explode( ',', $this->args['buttons'] );
561
+
562
  foreach ( $this->args['buttons'] as $counts_key ) {
563
  $network_key = $this->display_name_to_key( $counts_key );
564
  foreach( $this->networks as $key => $network ):
567
  endif;
568
  endforeach;
569
  }
570
+
571
  //* Use global button settings.
572
  else :
573
+
574
  // Order manually using the user's specified order.
575
  if ( $this->options['order_of_icons_method'] === 'manual' ) :
576
  $order = $this->options['order_of_icons'];
577
+
578
  // Order them dynamically according to share counts.
579
  else :
580
  $order = $this->get_dynamic_buttons_order();
581
  endif;
582
+
583
  $network_objects = $this->order_network_objects($order);
584
  endif;
585
+
586
  $this->networks = $network_objects;
587
  return $this;
588
  }
595
  */
596
  protected function get_dynamic_buttons_order() {
597
  $order = array();
598
+ if( !empty( $this->shares ) && is_array( $this->shares ) ):
599
+ arsort( $this->shares );
600
+ foreach( $this->shares as $key => $value ):
601
+ if($key !== 'total_shares'):
602
+ $order[$key] = $key;
603
+ endif;
604
+ endforeach;
605
+ $this->options['order_of_icons'] = $order;
606
+ else:
607
+ $order = $this->options['order_of_icons'];
608
+ endif;
609
  return $order;
610
  }
611
  /**
643
  }
644
  return $html;
645
  }
646
+
647
+
648
  /**
649
  * The Total Shares Count
650
  *
656
  *
657
  */
658
  public function render_total_shares_html() {
659
+ if ( empty( $this->shares['total_shares']) || $this->shares['total_shares'] < $this->option('minimum_shares') || false == $this->option('total_shares') ) {
660
  return '';
661
  }
662
  $html = '<div class="nc_tweetContainer total_shares total_sharesalt" >';
678
  *
679
  */
680
  public function do_print() {
681
+
 
 
682
  $this->render_HTML();
683
  $content = $this->content . '<p class="swp-content-locator"></p>';
684
 
692
  endif;
693
 
694
  $this->content = $content;
695
+
696
+ if ( isset( $this->args['echo']) && true === $this->args['echo'] ) {
697
+ if( true == _swp_is_debug('buttons_output')):
698
+ echo 'Echoing, not returning. In SWP_Buttons_Panel on line '.__LINE__;
699
+ endif;
700
+ echo $this->content;
701
+ }
702
+
703
  return $this->content;
704
  }
705
 
706
+ public function the_buttons( $content = null ) {
707
+ if ( empty( $this->content ) ) :
708
+ return $this->do_print();
709
+ endif;
710
+
711
  if ( ! $this->should_print() ) :
712
  return $this->args['content'];
713
  endif;
714
 
715
+ if ( null !== $content && gettype( $content ) === 'string' ) :
716
+ $this->args['content'] = $content;
717
+ endif;
718
+
719
  if ( $this->has_plugin_conflict() ) {
720
  return;
721
  }
functions/frontend-output/SWP_Display.php CHANGED
@@ -11,7 +11,8 @@
11
  */
12
  class SWP_Display {
13
  public $already_print;
14
- public $Button;
 
15
  public function __construct() {
16
  /**
17
  * A global for storing post ID's to prevent duplicate processing on the same posts
@@ -24,6 +25,8 @@ class SWP_Display {
24
  if ( !is_array( $swp_already_print ) ) {
25
  $swp_already_print = array();
26
  }
 
 
27
  $this->already_printed = $swp_already_print;
28
  $this->options = $swp_user_options;
29
 
@@ -46,13 +49,17 @@ class SWP_Display {
46
  public function activate_buttons() {
47
  // Fetch the user's settings
48
  global $swp_user_options;
 
49
  // Only hook into the_content filter if we're is_singular() is true or they don't use excerpts
50
  if( true === is_singular() || true === $swp_user_options['full_content'] ):
51
  add_filter( 'the_content', array($this, 'social_warfare_wrapper'), 20 );
52
  endif;
53
- if (false === is_singular()) {
 
 
54
  // Add the buttons to the excerpts
55
- add_filter( 'the_excerpt', array($this, 'social_warfare_wrapper'), 20 );
 
56
  }
57
  }
58
 
@@ -71,11 +78,10 @@ class SWP_Display {
71
  if (true === is_singular() && $post->ID !== get_queried_object_id()) {
72
  return $content;
73
  }
74
-
75
  // Pass the content to the buttons constructor to place them inside.
76
  $buttons_panel = new SWP_Buttons_Panel( ['content' => $content ]);
77
 
78
- return $buttons_panel->the_buttons();
79
  }
80
 
81
  function floating_buttons_side() {
@@ -98,6 +104,6 @@ class SWP_Display {
98
  public static function social_warfare( $args = array() ) {
99
  $Buttons_Panel = new SWP_Buttons_Panel( $args );
100
 
101
- return $Buttons_Panel->render_HTML();
102
  }
103
  }
11
  */
12
  class SWP_Display {
13
  public $already_print;
14
+ // public $Button;
15
+
16
  public function __construct() {
17
  /**
18
  * A global for storing post ID's to prevent duplicate processing on the same posts
25
  if ( !is_array( $swp_already_print ) ) {
26
  $swp_already_print = array();
27
  }
28
+
29
+
30
  $this->already_printed = $swp_already_print;
31
  $this->options = $swp_user_options;
32
 
49
  public function activate_buttons() {
50
  // Fetch the user's settings
51
  global $swp_user_options;
52
+
53
  // Only hook into the_content filter if we're is_singular() is true or they don't use excerpts
54
  if( true === is_singular() || true === $swp_user_options['full_content'] ):
55
  add_filter( 'the_content', array($this, 'social_warfare_wrapper'), 20 );
56
  endif;
57
+
58
+ if (false == is_singular()) {
59
+ global $wp_filter;
60
  // Add the buttons to the excerpts
61
+
62
+ add_filter( 'the_excerpt', array($this, 'social_warfare_wrapper') );
63
  }
64
  }
65
 
78
  if (true === is_singular() && $post->ID !== get_queried_object_id()) {
79
  return $content;
80
  }
 
81
  // Pass the content to the buttons constructor to place them inside.
82
  $buttons_panel = new SWP_Buttons_Panel( ['content' => $content ]);
83
 
84
+ return $buttons_panel->the_buttons( $content );
85
  }
86
 
87
  function floating_buttons_side() {
104
  public static function social_warfare( $args = array() ) {
105
  $Buttons_Panel = new SWP_Buttons_Panel( $args );
106
 
107
+ echo $Buttons_Panel->render_HTML();
108
  }
109
  }
functions/frontend-output/SWP_Shortcode.php CHANGED
@@ -73,14 +73,8 @@ class SWP_Shortcode {
73
  $args = array();
74
  endif;
75
 
76
- $defaults = array(
77
- 'location' => 'after',
78
- 'echo' => false,
79
- );
80
-
81
- array_merge( $args, $defaults );
82
-
83
- return SWP_Display::social_warfare( $args );
84
  }
85
 
86
 
73
  $args = array();
74
  endif;
75
 
76
+ $buttons_panel = new SWP_Buttons_Panel( $args );
77
+ return $buttons_panel->render_HTML();
 
 
 
 
 
 
78
  }
79
 
80
 
functions/options/SWP_Option_Icons.php CHANGED
@@ -41,10 +41,14 @@ class SWP_Option_Icons extends SWP_Option {
41
 
42
  if ( count($user_icons) > 0 ):
43
  foreach( $user_icons as $network_key) {
44
- if ( isset( $all_icons[$network_key]) ) :
45
  $network = $all_icons[$network_key];
46
 
47
  $html .= $this->render_icon_HTML( $network );
 
 
 
 
48
  endif;
49
  }
50
  endif;
@@ -67,11 +71,20 @@ class SWP_Option_Icons extends SWP_Option {
67
  public function render_inactive_icons() {
68
  $all_icons = $this->get_all_icons();
69
  $user_icons = $this->get_user_icons();
 
70
  if ( empty($user_icons) ) :
71
  $user_icons = [];
72
  endif;
73
 
74
- $inactive_icons = array_diff( array_keys( $all_icons ), $user_icons );
 
 
 
 
 
 
 
 
75
 
76
  $html = '<div class="sw-grid sw-col-300">';
77
  $html .= '<h3 class="sw-buttons-toggle">' . __( 'Inactive' , 'social-warfare' ) . '</h3>';
41
 
42
  if ( count($user_icons) > 0 ):
43
  foreach( $user_icons as $network_key) {
44
+ if ( array_key_exists( $network_key, $all_icons ) && isset( $all_icons[$network_key]) ) :
45
  $network = $all_icons[$network_key];
46
 
47
  $html .= $this->render_icon_HTML( $network );
48
+
49
+ else :
50
+ write_log( $network_key, "We are looking for this index in the following icons array.");
51
+ write_log( $all_icons );
52
  endif;
53
  }
54
  endif;
71
  public function render_inactive_icons() {
72
  $all_icons = $this->get_all_icons();
73
  $user_icons = $this->get_user_icons();
74
+
75
  if ( empty($user_icons) ) :
76
  $user_icons = [];
77
  endif;
78
 
79
+ if ( array_key_exists( 0, $all_icons) ) :
80
+ //* If $all_icons is numerically indexed, just diff the array.
81
+ $inactive_icons = array_diff( $all_icons, $user_icons );
82
+ elseif ( gettype( array_pop( $all_icons ) === 'object' ) ) :
83
+ //* Get the keys first, then diff the array.
84
+ $inactive_icons = array_diff( array_keys( $all_icons ), $user_icons );
85
+ else :
86
+ write_log( $all_icons, 'Showing $all_icons from SWP_Option_Icons->render_inactive_icons().');
87
+ endif;
88
 
89
  $html = '<div class="sw-grid sw-col-300">';
90
  $html .= '<h3 class="sw-buttons-toggle">' . __( 'Inactive' , 'social-warfare' ) . '</h3>';
functions/options/SWP_Options_Page.php CHANGED
@@ -80,6 +80,8 @@ class SWP_Options_Page extends SWP_Abstract {
80
  ->init_social_tab()
81
  ->init_advanced_tab();
82
 
 
 
83
  /**
84
  * STEP #2: Addons can now access this object to add their own
85
  * tabs, sections, and options prior to the page being rendered.
@@ -99,6 +101,10 @@ class SWP_Options_Page extends SWP_Abstract {
99
  add_action( 'admin_menu', array( $this, 'options_page') );
100
  }
101
 
 
 
 
 
102
 
103
  /**
104
  * Create the admin menu options page
@@ -259,7 +265,7 @@ class SWP_Options_Page extends SWP_Abstract {
259
 
260
 
261
  /**
262
- * Handwritten list of custom post types.
263
  *
264
  * @return array Custom Post Types.
265
  */
@@ -417,8 +423,8 @@ class SWP_Options_Page extends SWP_Abstract {
417
  ->set_priority( 40 )
418
  ->set_information_link( 'https://warfareplugins.com/support/options-page-display-tab-position-share-buttons/' );
419
 
420
- $button_position_table = new SWP_Section_HTML( __( 'Position Table', 'social-warfare' ) );
421
- $button_position_table->do_button_position_table();
422
 
423
  $button_position->add_option( $button_position_table );
424
 
80
  ->init_social_tab()
81
  ->init_advanced_tab();
82
 
83
+ add_action('wp_loaded', [$this, 'load_deferred_options']);
84
+
85
  /**
86
  * STEP #2: Addons can now access this object to add their own
87
  * tabs, sections, and options prior to the page being rendered.
101
  add_action( 'admin_menu', array( $this, 'options_page') );
102
  }
103
 
104
+ public function load_deferred_options() {
105
+ $this->tabs->display->sections->button_position->options->button_position_table->do_button_position_table();
106
+ }
107
+
108
 
109
  /**
110
  * Create the admin menu options page
265
 
266
 
267
  /**
268
+ * Handwritten list of og meta types.
269
  *
270
  * @return array Custom Post Types.
271
  */
423
  ->set_priority( 40 )
424
  ->set_information_link( 'https://warfareplugins.com/support/options-page-display-tab-position-share-buttons/' );
425
 
426
+ $button_position_table = new SWP_Section_HTML( __( 'Position Table', 'social-warfare' ), 'button_position_table' );
427
+ // $button_position_table->do_button_position_table();
428
 
429
  $button_position->add_option( $button_position_table );
430
 
functions/options/SWP_Section_HTML.php CHANGED
@@ -172,14 +172,10 @@ class SWP_Section_HTML extends SWP_Option {
172
  // Begin Registration Wrapper
173
  $html .= '<div class="tweet-count-wrapper" registration="false">';
174
 
175
- // Registration Title
176
- $html .= '<h2>' . __( 'Tweet Count Registration' , 'social-warfare' ) . '</h2>';
177
-
178
  // Open the IS NOT Activated container
179
  $html .= '<div class="sw-grid sw-col-940 swp_tweets_not_activated">';
180
 
181
  // The Warning Notice & Instructions
182
- $html .= '<p class="sw-subtitle sw-registration-text">' . __( 'In order to allow Social Warfare to track tweet counts, we\'ve partnered with a couple of third-party share counting tools. Follow the steps below to register with one of these platforms and allow us to track your Twitter shares.' , 'social-warfare' ) . '</p>';
183
  $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>&nbsp;<a style="float:none;" class="button sw-navy-button" href="http://newsharecounts.com" target="_blank">' . __( 'Click here to visit NewShareCounts.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>';
184
 
185
  // Close the IS NOT ACTIVATED container
@@ -326,7 +322,12 @@ class SWP_Section_HTML extends SWP_Option {
326
  /**
327
  * Renders the three column table on the Display tab.
328
  *
 
 
 
 
329
  * @return SWP_Section_HTML $this The calling instance, for method chaining.
 
330
  */
331
  public function do_button_position_table() {
332
  $static_options = [
@@ -337,7 +338,9 @@ class SWP_Section_HTML extends SWP_Option {
337
  ];
338
 
339
  $default_types = ['page', 'post', 'home', 'archive_categories'];
340
- $post_types = array_merge( $default_types, get_post_types( ['public' => true, '_builtin' => false ], 'names' ) );
 
 
341
 
342
  $panel_locations = [
343
  'above' => 'Above the Content',
@@ -366,8 +369,10 @@ class SWP_Section_HTML extends SWP_Option {
366
  $html .= '<p class="sw-select-label sw-short sw-no-padding">' . __( 'Floating Buttons (If Activated)' ,'social-warfare' ) . '</p>';
367
  $html .= '</div>';
368
 
 
369
  foreach( $post_types as $index => $post ) {
370
- $priority = ($index + 1) * 10;
 
371
 
372
  $html .= '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $post . '_wrapper">';
373
 
@@ -475,7 +480,7 @@ class SWP_Section_HTML extends SWP_Option {
475
  ->render_HTML_element();
476
 
477
  $yummly_tags = new SWP_Option_Text( 'Yummly Tags', 'yummly_tags' );
478
- $tags_html = $yummly_categories->set_priority( 10 )
479
  ->set_default( '' )
480
  ->render_HTML_element();
481
 
172
  // Begin Registration Wrapper
173
  $html .= '<div class="tweet-count-wrapper" registration="false">';
174
 
 
 
 
175
  // Open the IS NOT Activated container
176
  $html .= '<div class="sw-grid sw-col-940 swp_tweets_not_activated">';
177
 
178
  // The Warning Notice & Instructions
 
179
  $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>&nbsp;<a style="float:none;" class="button sw-navy-button" href="http://newsharecounts.com" target="_blank">' . __( 'Click here to visit NewShareCounts.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>';
180
 
181
  // Close the IS NOT ACTIVATED container
322
  /**
323
  * Renders the three column table on the Display tab.
324
  *
325
+ * @since 3.0.4 | 09 MAY 2018 | Added check for is_numeric to avoid throwing errors.
326
+ * @since 3.0.5 | 09 MAY 2018 | Switched to using an iterator. Many post types are
327
+ * being returned with associative keys, not numeric ones.
328
+ * @param none
329
  * @return SWP_Section_HTML $this The calling instance, for method chaining.
330
+ *
331
  */
332
  public function do_button_position_table() {
333
  $static_options = [
338
  ];
339
 
340
  $default_types = ['page', 'post', 'home', 'archive_categories'];
341
+ $other_types = get_post_types( ['public' => true, '_builtin' => false ], 'names' );
342
+
343
+ $post_types = array_merge( $default_types, $other_types );
344
 
345
  $panel_locations = [
346
  'above' => 'Above the Content',
369
  $html .= '<p class="sw-select-label sw-short sw-no-padding">' . __( 'Floating Buttons (If Activated)' ,'social-warfare' ) . '</p>';
370
  $html .= '</div>';
371
 
372
+ $i = 0;
373
  foreach( $post_types as $index => $post ) {
374
+
375
+ $priority = ($i + 1) * 10; $i++;
376
 
377
  $html .= '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $post . '_wrapper">';
378
 
480
  ->render_HTML_element();
481
 
482
  $yummly_tags = new SWP_Option_Text( 'Yummly Tags', 'yummly_tags' );
483
+ $tags_html = $yummly_tags->set_priority( 10 )
484
  ->set_default( '' )
485
  ->render_HTML_element();
486
 
functions/social-networks/SWP_Twitter.php CHANGED
@@ -57,10 +57,10 @@ class SWP_Twitter extends SWP_Social_Network {
57
  global $swp_user_options;
58
 
59
  // If the user has enabled Twitter shares....
60
- if ( $swp_user_options['twitter_shares'] ) :
61
 
62
  // Return the correct Twitter JSON endpoint URL
63
- if('opensharecount' == $swp_user_options['tweet_count_source']){
64
  $request_url = 'https://opensharecount.com/count.json?url='. $url;
65
  } else {
66
  $request_url = 'http://public.newsharecounts.com/count.json?url=' . $url;
@@ -138,9 +138,14 @@ class SWP_Twitter extends SWP_Social_Network {
138
  $title = str_replace( '|', '', strip_tags( $post_data['post_title'] ) );
139
 
140
  // Check for a custom tweet from the post options.
141
- $custom_tweet = get_post_meta( $post_data['ID'] , 'nc_customTweet' , true );
 
 
 
 
 
 
142
 
143
- $custom_tweet = $custom_tweet !== '' ? urlencode( html_entity_decode( $custom_tweet, ENT_COMPAT, 'UTF-8' ) ) : urlencode( html_entity_decode( $title, ENT_COMPAT, 'UTF-8' ) );
144
  $twitter_link = $this->get_shareable_permalink( $post_data );
145
 
146
  // If the custom tweet contains a link, block Twitter for auto adding another one.
57
  global $swp_user_options;
58
 
59
  // If the user has enabled Twitter shares....
60
+ if ( $swp_user_options['twitter_shares'] && isset( $swp_user_options['tweet_count_source'] ) ) :
61
 
62
  // Return the correct Twitter JSON endpoint URL
63
+ if ('opensharecount' == $swp_user_options['tweet_count_source']) {
64
  $request_url = 'https://opensharecount.com/count.json?url='. $url;
65
  } else {
66
  $request_url = 'http://public.newsharecounts.com/count.json?url=' . $url;
138
  $title = str_replace( '|', '', strip_tags( $post_data['post_title'] ) );
139
 
140
  // Check for a custom tweet from the post options.
141
+ $custom_tweet = get_post_meta( $post_data['ID'] , 'swp_custom_tweet' , true );
142
+
143
+ if ( gettype( $custom_tweet) === 'string' && !empty( $custom_tweet ) ) :
144
+ $custom_tweet = urlencode( html_entity_decode( $custom_tweet, ENT_COMPAT, 'UTF-8' ) );
145
+ else :
146
+ $custom_tweet = urlencode( html_entity_decode( $title, ENT_COMPAT, 'UTF-8' ) );
147
+ endif;
148
 
 
149
  $twitter_link = $this->get_shareable_permalink( $post_data );
150
 
151
  // If the custom tweet contains a link, block Twitter for auto adding another one.
functions/utilities/SWP_Database_Migration.php CHANGED
@@ -17,6 +17,7 @@ class SWP_Database_Migration {
17
  */
18
  public function __construct() {
19
  $this->update_hidden_post_meta();
 
20
  if ( !$this->database_is_migrated() ) {
21
  $this->migrate();
22
  }
@@ -36,6 +37,19 @@ class SWP_Database_Migration {
36
 
37
  if ( true === _swp_is_debug('initialize_db') ) {
38
  $this->initialize_db();
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  }
40
  }
41
 
@@ -80,6 +94,10 @@ class SWP_Database_Migration {
80
  //* Fetch posts with 2.3.5 metadata.
81
  $old_metadata = get_posts( ['meta_key' => 'swp_postLocation', 'numberposts' => 1] );
82
 
 
 
 
 
83
  return count( $old_metadata ) === 0;
84
  }
85
 
@@ -114,21 +132,20 @@ class SWP_Database_Migration {
114
  */
115
  public function update_post_meta() {
116
  global $wpdb;
117
- echo "Updating post meta.";
118
 
119
  //* Notice there is no prefix on any of the indices.
120
  //* Old code has prefixed these with either "nc_" or "swp_".
121
  //* For simplicity's sake, we'll just check each for both.
122
  $metadata_map = [
123
  'ogImage' => 'swp_og_image',
124
- 'ogTitleWrapper' => 'swp_og_title',
125
  'pinterestImage' => 'swp_pinterest_image',
126
  'customTweet' => 'swp_custom_tweet',
127
  'postLocation' => 'swp_post_location',
128
  'floatLocation' => 'swp_float_location',
129
  'pinterestDescription' => 'swp_pinterest_description',
130
  'twitterID' => 'swp_twitter_id',
131
- 'ogDescriptionWrapper' => 'swp_og_description',
132
  'cache_timestamp' => 'swp_cache_timestamp',
133
  'pin_browser_extension' => 'swp_pin_browser_extension',
134
  'pin_browser_extension_location' => 'swp_pin_browser_extension_location',
@@ -396,4 +413,30 @@ class SWP_Database_Migration {
396
  //* Leave socialWarfareOptions in the database.
397
  // delete_option( 'socialWarfareOptions' );
398
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
399
  }
17
  */
18
  public function __construct() {
19
  $this->update_hidden_post_meta();
20
+
21
  if ( !$this->database_is_migrated() ) {
22
  $this->migrate();
23
  }
37
 
38
  if ( true === _swp_is_debug('initialize_db') ) {
39
  $this->initialize_db();
40
+ }
41
+
42
+ if ( true === _swp_is_debug('migrate_post_meta') ) {
43
+ $this->update_post_meta();
44
+ $this->update_hidden_post_meta();
45
+ }
46
+
47
+ if ( true === _swp_is_Debug('get_last_migrated') ) {
48
+ $this->get_last_migrated( true );
49
+ }
50
+
51
+ if ( true === _swp_is_Debug('update_last_migrated') ) {
52
+ $this->update_last_migrated();
53
  }
54
  }
55
 
94
  //* Fetch posts with 2.3.5 metadata.
95
  $old_metadata = get_posts( ['meta_key' => 'swp_postLocation', 'numberposts' => 1] );
96
 
97
+ if( '2.3.5' !== $this->get_last_migrated() ) {
98
+ return false;
99
+ }
100
+
101
  return count( $old_metadata ) === 0;
102
  }
103
 
132
  */
133
  public function update_post_meta() {
134
  global $wpdb;
 
135
 
136
  //* Notice there is no prefix on any of the indices.
137
  //* Old code has prefixed these with either "nc_" or "swp_".
138
  //* For simplicity's sake, we'll just check each for both.
139
  $metadata_map = [
140
  'ogImage' => 'swp_og_image',
141
+ 'ogTitle' => 'swp_og_title',
142
  'pinterestImage' => 'swp_pinterest_image',
143
  'customTweet' => 'swp_custom_tweet',
144
  'postLocation' => 'swp_post_location',
145
  'floatLocation' => 'swp_float_location',
146
  'pinterestDescription' => 'swp_pinterest_description',
147
  'twitterID' => 'swp_twitter_id',
148
+ 'ogDescription' => 'swp_og_description',
149
  'cache_timestamp' => 'swp_cache_timestamp',
150
  'pin_browser_extension' => 'swp_pin_browser_extension',
151
  'pin_browser_extension_location' => 'swp_pin_browser_extension_location',
413
  //* Leave socialWarfareOptions in the database.
414
  // delete_option( 'socialWarfareOptions' );
415
  }
416
+
417
+ public function get_last_migrated( $echo = false ) {
418
+ $options = get_option( 'social_warfare_settings' );
419
+
420
+ if ( array_key_exists( 'last_migrated', $options ) ) :
421
+ if ( true === $echo ) :
422
+ var_dump( $options['last_migrated'] );
423
+ endif;
424
+
425
+ return $options['last_migrated'];
426
+ endif;
427
+
428
+ if ( true === $echo ) :
429
+ echo "No previous migration version has been set.";
430
+ endif;
431
+
432
+ return false;
433
+
434
+ }
435
+
436
+ public function update_last_migrated() {
437
+ $options = get_option( 'social_warfare_settings' );
438
+ $options['last_migrated'] = '3.0.5';
439
+
440
+ update_option( 'social_warfare_settings', $options );
441
+ }
442
  }
functions/utilities/SWP_URL_Management.php CHANGED
@@ -55,7 +55,7 @@ class SWP_URL_Management {
55
  $options = $swp_user_options;
56
  $url = $array['url'];
57
  $network = $array['network'];
58
-
59
  if( ( 'pinterest' === $network && isset( $swp_user_options['utm_on_pins']) && true === $swp_user_options['utm_on_pins']) || $network !== 'pinterest' ):
60
 
61
  if ( true === is_attachment() ) :
55
  $options = $swp_user_options;
56
  $url = $array['url'];
57
  $network = $array['network'];
58
+
59
  if( ( 'pinterest' === $network && isset( $swp_user_options['utm_on_pins']) && true === $swp_user_options['utm_on_pins']) || $network !== 'pinterest' ):
60
 
61
  if ( true === is_attachment() ) :
functions/utilities/share-count-function.php CHANGED
@@ -3,7 +3,11 @@
3
  /**
4
  * A function to fetch all the social shares
5
  *
6
- * @since 1.0.0
 
 
 
 
7
  * @param integer $postID The post ID
8
  * @return array $shares An array of share data
9
  */
@@ -35,22 +39,31 @@ function get_social_warfare_shares( $postID ) {
35
  // Queue up the networks that are available
36
  $networks = $options['order_of_icons'];
37
 
 
 
 
 
 
38
  $icons_array = array(
39
- 'type' => 'buttons'
40
  );
41
 
42
  foreach ( $networks as $network ) :
43
 
44
- // Check if we can used the cached share numbers
45
- if ( $freshCache == true ) :
46
- $shares[$network] = get_post_meta( $postID,'_' . $network . '_shares',true );
47
 
48
- // If cache is expired, fetch new and update the cache
49
- else :
50
- if( isset( $swp_social_networks[$network] ) ):
51
- $old_shares[$network] = get_post_meta( $postID,'_' . $network . '_shares',true );
52
- $api_responses[$network] = $swp_social_networks[$network]->get_api_link( $url );
 
 
 
 
 
53
  endif;
 
54
  endif;
55
 
56
  endforeach;
@@ -72,10 +85,14 @@ function get_social_warfare_shares( $postID ) {
72
 
73
  foreach ( $networks as $network ) :
74
 
75
- $old_share_links[$network] = call_user_func( 'swp_' . $network . '_request_link',$alternateURL );
 
 
 
 
 
 
76
 
77
- if( !empty($altURLs) ):
78
- $altURLs_share_links[$network] = call_user_func( 'swp_' . $network . '_request_link' , $altURLs );
79
  endif;
80
 
81
  endforeach;
@@ -93,49 +110,55 @@ function get_social_warfare_shares( $postID ) {
93
  // Fetch all the share counts asyncrounously
94
  $raw_shares_array = SWP_CURL::fetch_shares_via_curl_multi( $api_responses );
95
 
 
 
 
 
96
  foreach ( $networks as $network ) :
97
 
98
- if ( ! isset( $raw_shares_array[$network] ) ) {
99
- $raw_shares_array[$network] = 0;
100
- }
101
 
102
- if ( ! isset( $old_raw_shares_array[$network] ) ) {
103
- $old_raw_shares_array[$network] = 0;
104
- }
105
 
106
- $shares[$network] = $swp_social_networks[$network]->parse_api_response($api_responses[$network]);
 
 
107
 
108
- if ( $options['recover_shares'] == true ) :
109
- $old_raw_shares_array = SWP_CURL::fetch_shares_via_curl_multi( $old_share_links );
110
 
111
- $recovered_shares[$network] = call_user_func( 'swp_format_' . $network . '_response', $old_raw_shares_array[$network] );
112
 
113
- if( !empty($altURLs) ):
114
- $altURLs_raw_shares_array = SWP_CURL::fetch_shares_via_curl_multi( $altURLs_share_links );
115
- $altURLs_recovered_shares[$network] = call_user_func( 'swp_format_' . $network . '_response', $altURLs_raw_shares_array[$network] );
116
- endif;
117
 
118
- if ( $shares[$network] != $recovered_shares[$network] ) :
119
- $shares[$network] = $shares[$network] + $recovered_shares[$network];
120
- endif;
 
121
 
122
- if( !empty($altURLs) ):
123
- $shares[$network] = $shares[$network] + $altURLs_recovered_shares[$network];
 
 
 
 
 
124
  endif;
125
- endif;
126
 
127
- if ( $shares[$network] < $old_shares[$network] && false === _swp_is_debug('force_new_shares') ) :
128
- $shares[$network] = $old_shares[$network];
129
 
130
- elseif($shares[$network] > 0) :
131
- delete_post_meta( $postID,'_' . $network . '_shares' );
132
- update_post_meta( $postID,'_' . $network . '_shares',$shares[$network] );
133
 
134
- endif;
135
 
136
- if (is_numeric( $shares[$network] ) ):
137
- $shares['total_shares'] += $shares[$network];
138
 
 
139
  endif;
140
 
141
  endforeach;
3
  /**
4
  * A function to fetch all the social shares
5
  *
6
+ * @since 1.0.0 | Unknown | Created
7
+ * @since 3.0.3 | 09 MAY 2018 | Added checks for the network objects (isset) to ensure
8
+ * we're not calling those methods from strings or other
9
+ * random items that will throw errors.
10
+ * @since 3.0.4 | 09 MAY 2018 | Replaced $network-> with $swp_social_networks[$network]->
11
  * @param integer $postID The post ID
12
  * @return array $shares An array of share data
13
  */
39
  // Queue up the networks that are available
40
  $networks = $options['order_of_icons'];
41
 
42
+ if ( !is_array( $networks ) ) :
43
+ write_log( $networks, "Variable: \$networks. In share-count-function.php" );
44
+ return $shares;
45
+ endif;
46
+
47
  $icons_array = array(
48
+ 'type' => 'buttons'
49
  );
50
 
51
  foreach ( $networks as $network ) :
52
 
53
+ if( isset( $swp_social_networks[$network] ) ):
 
 
54
 
55
+ // Check if we can used the cached share numbers
56
+ if ( $freshCache == true ) :
57
+ $shares[$network] = get_post_meta( $postID,'_' . $network . '_shares',true );
58
+
59
+ // If cache is expired, fetch new and update the cache
60
+ else :
61
+ if( isset( $swp_social_networks[$network] ) ):
62
+ $old_shares[$network] = get_post_meta( $postID,'_' . $network . '_shares',true );
63
+ $api_responses[$network] = $swp_social_networks[$network]->get_api_link( $url );
64
+ endif;
65
  endif;
66
+
67
  endif;
68
 
69
  endforeach;
85
 
86
  foreach ( $networks as $network ) :
87
 
88
+ if( isset( $swp_social_networks[$network] ) ):
89
+
90
+ $old_share_links[$network] = $swp_social_networks[$network]->get_api_link( $alternateURL );
91
+
92
+ if( !empty($altURLs) ):
93
+ $altURLs_share_links[$network] = $swp_social_networks[$network]->get_api_link( $altURLs );
94
+ endif;
95
 
 
 
96
  endif;
97
 
98
  endforeach;
110
  // Fetch all the share counts asyncrounously
111
  $raw_shares_array = SWP_CURL::fetch_shares_via_curl_multi( $api_responses );
112
 
113
+ if ( $options['recover_shares'] == true ) :
114
+ $old_raw_shares_array = SWP_CURL::fetch_shares_via_curl_multi( $old_share_links );
115
+ endif;
116
+
117
  foreach ( $networks as $network ) :
118
 
119
+ if( isset( $swp_social_networks[$network] ) ):
 
 
120
 
121
+ if ( ! isset( $raw_shares_array[$network] ) ) {
122
+ $raw_shares_array[$network] = 0;
123
+ }
124
 
125
+ if ( ! isset( $old_raw_shares_array[$network] ) ) {
126
+ $old_raw_shares_array[$network] = 0;
127
+ }
128
 
129
+ $shares[$network] = $swp_social_networks[$network]->parse_api_response($api_responses[$network]);
 
130
 
131
+ if ( $options['recover_shares'] == true ) :
132
 
133
+ $recovered_shares[$network] = $swp_social_networks[$network]->parse_api_response( $old_raw_shares_array[$network] );
 
 
 
134
 
135
+ if( !empty($altURLs) ):
136
+ $altURLs_raw_shares_array = SWP_CURL::fetch_shares_via_curl_multi( $altURLs_share_links );
137
+ $altURLs_recovered_shares[$network] = $swp_social_networks[$network]->parse_api_response( $altURLs_raw_shares_array[$network] );
138
+ endif;
139
 
140
+ if ( $shares[$network] != $recovered_shares[$network] ) :
141
+ $shares[$network] = $shares[$network] + $recovered_shares[$network];
142
+ endif;
143
+
144
+ if( !empty($altURLs) ):
145
+ $shares[$network] = $shares[$network] + $altURLs_recovered_shares[$network];
146
+ endif;
147
  endif;
 
148
 
149
+ if ( $shares[$network] < $old_shares[$network] && false === _swp_is_debug('force_new_shares') ) :
150
+ $shares[$network] = $old_shares[$network];
151
 
152
+ elseif($shares[$network] > 0) :
153
+ delete_post_meta( $postID,'_' . $network . '_shares' );
154
+ update_post_meta( $postID,'_' . $network . '_shares',$shares[$network] );
155
 
156
+ endif;
157
 
158
+ if (is_numeric( $shares[$network] ) ):
159
+ $shares['total_shares'] += $shares[$network];
160
 
161
+ endif;
162
  endif;
163
 
164
  endforeach;
functions/utilities/utility.php CHANGED
@@ -9,6 +9,24 @@
9
  */
10
 
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  /**
13
  * A global function to ensure that we always have a value for
14
  * every option. Grab and use the default value if it hasn't been
@@ -20,7 +38,7 @@
20
  *
21
  */
22
 
23
- function swp_get_option($key){
24
  global $swp_user_options;
25
  $defaults = array();
26
  $defaults = apply_filters('swp_options_page_defaults' , $defaults );
@@ -107,11 +125,12 @@ function swp_store_the_settings() {
107
  $array['devs'] = true;
108
 
109
  // Pass the array into the new function
110
- return SWP_Display::social_warfare( $array );
111
  }
112
 
113
  function social_warfare( $args = array() ) {
114
- return SWP_Display::social_warfare( $args );
 
115
  }
116
 
117
 
@@ -502,7 +521,7 @@ function swp_get_site_url() {
502
  * @since 3.0.0 | 02 MAY 2018 | Created
503
  * @param string $string The string to be modified.
504
  * @return string The snake_case modified string.
505
- *
506
  */
507
  function swp_snake_case( $string ) {
508
  $snake_case = str_replace( ' ' , '_' , strtolower($string) );
9
  */
10
 
11
 
12
+ /**
13
+ * Writes data to the wordpress log.
14
+ *
15
+ * @var mixed $log The data you want to print.
16
+ * @var string optional $context Context about the data you are writing.
17
+ */
18
+ if ( ! function_exists('write_log')) {
19
+ function write_log ( $log, $context = '' ) {
20
+ error_log( "Context: " . $context );
21
+ if ( is_array( $log ) || is_object( $log ) ) {
22
+ error_log( print_r( $log, true ) );
23
+ } else {
24
+ error_log( $log );
25
+ }
26
+ }
27
+ }
28
+
29
+
30
  /**
31
  * A global function to ensure that we always have a value for
32
  * every option. Grab and use the default value if it hasn't been
38
  *
39
  */
40
 
41
+ function swp_get_option( $key ){
42
  global $swp_user_options;
43
  $defaults = array();
44
  $defaults = apply_filters('swp_options_page_defaults' , $defaults );
125
  $array['devs'] = true;
126
 
127
  // Pass the array into the new function
128
+ return social_warfare( $array );
129
  }
130
 
131
  function social_warfare( $args = array() ) {
132
+ $buttons_panel = new SWP_Buttons_Panel( $args );
133
+ echo $buttons_panel->render_HTML();
134
  }
135
 
136
 
521
  * @since 3.0.0 | 02 MAY 2018 | Created
522
  * @param string $string The string to be modified.
523
  * @return string The snake_case modified string.
524
+ *
525
  */
526
  function swp_snake_case( $string ) {
527
  $snake_case = str_replace( ' ' , '_' , strtolower($string) );
functions/widgets/notes.txt DELETED
@@ -1,14 +0,0 @@
1
- Feb 5 2018
2
-
3
- Brief phone call w/Nick go over items
4
-
5
- Debugged Meta tag output for #454
6
- Resolved issues #454, 455,
7
-
8
- Grabbed dev screenshot of CTT for Nick
9
-
10
- keys
11
- "top"
12
- "middle"
13
- "bottom"
14
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/admin.js CHANGED
@@ -11,10 +11,6 @@
11
  var socialWarfareAdmin = socialWarfareAdmin || {};
12
  var swpWidget, widgetSubmit;
13
 
14
- if (typeof $ === 'undefined') {
15
- $ = jQuery;
16
- }
17
-
18
  /**
19
  * Show and hide input fields based on conditional values.
20
  *
@@ -31,11 +27,11 @@ if (typeof $ === 'undefined') {
31
  function swpConditionalFields() {
32
 
33
  function swp_selected(name) {
34
- return $('select[name="' + name + '"]').val();
35
  }
36
 
37
  function swp_checked(name) {
38
- return $( '[name="' + name + '"]' ).prop( 'checked' );
39
  }
40
 
41
  function string_to_bool(string) {
@@ -45,34 +41,34 @@ function swpConditionalFields() {
45
  }
46
 
47
  // Loop through all the fields that have dependancies
48
- $( '[data-dep]' ).each( function() {
49
 
50
  // Fetch the conditional values
51
- var condition = $(this).data( 'dep' );
52
- var required = JSON.parse( JSON.stringify( $(this).data( 'dep_val' ) ) );
53
 
54
  // Check if we're on the options page or somewhere else
55
  if (window.location.href.indexOf("page=social-warfare") === -1) {
56
- var conditionEl = $(this).parents('.widgets-holder-wrap').find( '[data-swp-name="' + condition + '"]' );
57
  } else {
58
- var conditionEl = $( '[name="' + condition + '"]' )[0];
59
  }
60
 
61
  var value;
62
 
63
  if (typeof conditionEl === 'undefined') {
64
- conditionEl = $( '[name="' + condition + '"]' )[0];
65
 
66
  if (typeof conditionEl === 'undefined') {
67
- conditionEl = $( '[field$=' + condition + ']' )[0];
68
  }
69
  }
70
 
71
  // Fetch the value of checkboxes or other input types
72
- if ( $( conditionEl ).attr( 'type' ) == 'checkbox' ) {
73
- value = $( conditionEl ).prop( 'checked' );
74
  } else {
75
- value = $( conditionEl ).val();
76
  }
77
  value = string_to_bool(value);
78
 
@@ -82,18 +78,18 @@ function swpConditionalFields() {
82
  if (window.location.href.indexOf("page=social-warfare") !== -1) {
83
 
84
  // If the required value matches and it's parent is also being shown, show this conditional field
85
- if ($.inArray( value, required ) !== -1 && $( conditionEl ).parent( '.sw-grid' ).is( ':visible' ) ) {
86
- $(this).show();
87
  } else {
88
- $(this).hide();
89
  }
90
  } else {
91
 
92
  // If the required value matches, show this conditional field
93
- if ($.inArray( value, required ) !== -1 || value === required ) {
94
- $(this).show();
95
  } else {
96
- $(this).hide();
97
  }
98
  }
99
  });
@@ -105,33 +101,33 @@ function swpConditionalFields() {
105
  || 'custom_color_outlines' === swp_selected('float_single_colors')
106
  || 'custom_color' === swp_selected('float_hover_colors')
107
  || 'custom_color_outlines' === swp_selected('float_hover_colors') ) {
108
- $( '.sideCustomColor_wrapper' ).slideDown();
109
 
110
  } else {
111
- $( '.sideCustomColor_wrapper' ).slideUp();
112
  }
113
  }
114
 
115
  //* Only run on widgets.php
116
- if (window.location.href.indexOf("widgets.php")) {
117
 
118
  //* Make sure the elements exist before trying to read them.
119
  var widgetFinder = setInterval(function() {
120
  if (typeof swpWidget !== 'undefined') clearInterval(widgetFinder);
121
 
122
- swpWidget = $("#widgets-right [id*=_swp_popular_posts_widget], [id*=_swp_popular_posts_widget].open")[0];
123
- widgetSubmit = $(swpWidget).find("[id$=savewidget]")[0];
124
 
125
  //* Force swpConditionalFields to run when the widget is opened or saved.
126
- $(swpWidget).on("click", swpConditionalFields);
127
- $(widgetSubmit).on("click", function() {
128
  setTimeout(swpConditionalFields, 600);
129
  });
130
 
131
  }, 50);
132
  }
133
 
134
- (function( window, $, undefined ) {
135
  'use strict';
136
 
137
  socialWarfareAdmin.linkLength = function( input ) {
@@ -146,44 +142,44 @@ if (window.location.href.indexOf("widgets.php")) {
146
 
147
  // Function for SM Title Counting
148
  function smTitleRemaining() {
149
- var smTitle = $( '#social_warfare textarea#swp_ogTitle' ).val();
150
  var remaining = 60 - smTitle.length;
151
  if ( smTitle.length > 0 && remaining >= 0 ) {
152
- $( '#social_warfare .swp_og_title .swp_CountDown' ).removeClass( 'swp_red' ).addClass( 'swp_blue' );
153
  } else if ( smTitle.length > 0 && remaining < 0 ) {
154
- $( '#social_warfare .swp_og_title .swp_CountDown' ).removeClass( 'swp_blue' ).addClass( 'swp_red' );
155
  } else {
156
- $( '#social_warfare .swp_og_title .swp_CountDown' ).removeClass( 'swp_blue' ).removeClass( 'swp_red' );
157
  }
158
- $( '#social_warfare .swp_og_title .counterNumber' ).html( remaining );
159
  }
160
 
161
  // Function for SM Description Counting
162
  function smDescriptionRemaining() {
163
- var smDescription = $( '#social_warfare textarea#swp_ogDescription' ).val();
164
  var remaining = 160 - smDescription.length;
165
  if ( smDescription.length > 0 && remaining >= 0 ) {
166
- $( '#social_warfare .swp_og_description .swp_CountDown' ).removeClass( 'swp_red' ).addClass( 'swp_blue' );
167
  } else if ( smDescription.length > 0 && remaining < 0 ) {
168
- $( '#social_warfare .swp_og_description .swp_CountDown' ).removeClass( 'swp_blue' ).addClass( 'swp_red' );
169
  } else {
170
- $( '#social_warfare .swp_og_description .swp_CountDown' ).removeClass( 'swp_blue' ).removeClass( 'swp_red' );
171
  }
172
- $( '#social_warfare .swp_og_description .counterNumber' ).html( remaining );
173
  }
174
 
175
  // Function for Twitter Box Counting
176
  function twitterRemaining() {
177
- var smTwitter = $( '#social_warfare textarea#swp_customTweet' ).val();
178
- var handle = $( '#social_warfare .twitterIDWrapper label' ).html();
179
  var linkSpace;
180
 
181
  if ( smTwitter.indexOf( 'http' ) > -1 || smTwitter.indexOf( 'https' ) > -1 ) {
182
  linkSpace = 0;
183
- $( '.tweetLinkSection' ).css({ 'text-decoration': 'line-through' });
184
  } else {
185
  linkSpace = 23;
186
- $( '.tweetLinkSection' ).css({ 'text-decoration': 'none' });
187
  }
188
 
189
  var remaining;
@@ -194,59 +190,59 @@ if (window.location.href.indexOf("widgets.php")) {
194
  }
195
 
196
  if ( smTwitter.length > 0 && remaining >= 0 ) {
197
- $( '#social_warfare .swp_customTweetWrapper .swp_CountDown' ).removeClass( 'swp_red' ).addClass( 'swp_blue' );
198
  } else if ( smTwitter.length > 0 && remaining < 0 ) {
199
- $( '#social_warfare .swp_customTweetWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).addClass( 'swp_red' );
200
  } else {
201
- $( '#social_warfare .swp_customTweetWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).removeClass( 'swp_red' );
202
  }
203
 
204
- $( '#social_warfare .swp_customTweetWrapper .counterNumber' ).html( remaining );
205
  }
206
 
207
  function toggleCustomThumbnailFields(show) {
208
  if (typeof show === 'undefined') show = true;
209
 
210
  if (show) {
211
- $(".custom_thumb_size").show();
212
  }
213
  else {
214
- $(".custom_thumb_size").hide();
215
  }
216
  }
217
 
218
- $( document ).ready( function() {
219
- if ( $( '#social_warfare.postbox' ).length ) {
220
 
221
  // Add the CountDown Box for the Social Media Title
222
- $( '#social_warfare #swp_ogTitle' ).parent().prepend( '<div class="swp_CountDown"><span class="counterNumber">60</span> ' + swp_localize_admin.swp_characters_remaining + '</div>' );
223
 
224
  // Add the CountDown Box for the Social Media Description
225
- $( '#social_warfare #swp_ogDescription' ).parent().prepend( '<div class="swp_CountDown"><span class="counterNumber">150</span> ' + swp_localize_admin.swp_characters_remaining + '</div>' );
226
 
227
  // Add the CountDown Box for the Twitter Box
228
- $( '#social_warfare #swp_customTweet' ).parent().prepend( '<div class="swp_CountDown"><span class="counterNumber">118</span> ' + swp_localize_admin.swp_characters_remaining + '</div>' );
229
 
230
  smTitleRemaining();
231
- $( '#social_warfare textarea#swp_ogTitle' ).on( 'input', function() {
232
  smTitleRemaining();
233
  });
234
 
235
  smDescriptionRemaining();
236
- $( '#social_warfare textarea#swp_ogDescription' ).on( 'input', function() {
237
  smDescriptionRemaining();
238
  });
239
 
240
  twitterRemaining();
241
- $( '#social_warfare textarea#swp_customTweet' ).on( 'input', function() {
242
  twitterRemaining();
243
  });
244
 
245
  // Setup an initilazation loop
246
  var swpPostInit = setInterval( function() {
247
 
248
- var swpOgImage = $( '.swp_og_imageWrapper ul.swpmb-media-list' );
249
- var swpPinImage = $( '.swp_pinterest_imageWrapper ul.swpmb-media-list' );
250
 
251
  var smWidth, smHeight;
252
 
@@ -278,18 +274,18 @@ if (window.location.href.indexOf("widgets.php")) {
278
  }
279
 
280
  swpConditionalFields();
281
- $( '.swp_popular_post_options select' ).on( 'change', function() {
282
  swpConditionalFields();
283
  });
284
 
285
- if ( $( '.postbox#social_warfare' ).length ) {
286
- var registrationStatus = $( '#social_warfare .registrationWrapper input' ).attr( 'id' );
287
  if ( registrationStatus == 'false' ) {
288
- $( '.postbox#social_warfare' )
289
  .css({ position: 'relative',opacity: '0.3' })
290
  .append( '<div class="sw-premium-blocker"></div>' );
291
 
292
- $( '#social_warfare .sw-premium-blocker' ).tooltip({
293
  items: '#social_warfare .sw-premium-blocker',
294
  content: '<i></i>Unlock these features by registering your license.',
295
  position: {
@@ -302,20 +298,20 @@ if (window.location.href.indexOf("widgets.php")) {
302
  return false;
303
  }
304
 
305
- var $id = $( ui.tooltip ).attr( 'id' );
306
 
307
  // close any lingering tooltips
308
- $( 'div.ui-tooltip' ).not( '#' + $id ).remove();
309
 
310
  // ajax function to pull in data and add it to the tooltip goes here
311
  },
312
  close: function( event, ui ) {
313
  ui.tooltip.hover(function() {
314
- $(this).stop( true ).fadeTo( 400, 1 );
315
  },
316
  function() {
317
- $(this).fadeOut( '400', function() {
318
- $(this).remove();
319
  });
320
  });
321
  }
@@ -324,13 +320,13 @@ if (window.location.href.indexOf("widgets.php")) {
324
  }
325
 
326
  /*
327
- var customThumbnailSelect = $("#widget-swp_popular_posts_widget-2-thumb_size");
328
 
329
  if (customThumbnailSelect.value === 'custom') {
330
  toggleCustomThumbnailFields();
331
  }
332
 
333
- $(customThumbnailSelect).on("change", function(e) {
334
  console.log("changing");
335
  console.log(e.target.value);
336
  if (e.target.value === 'custom') {
11
  var socialWarfareAdmin = socialWarfareAdmin || {};
12
  var swpWidget, widgetSubmit;
13
 
 
 
 
 
14
  /**
15
  * Show and hide input fields based on conditional values.
16
  *
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) {
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
 
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
  });
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 ) {
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 Twitter Box Counting
172
  function twitterRemaining() {
173
+ var smTwitter = jQuery( '#social_warfare textarea#swp_custom_tweet' ).val();
174
+ var handle = jQuery( '#social_warfare .twitterIDWrapper label' ).html();
175
  var linkSpace;
176
 
177
  if ( smTwitter.indexOf( 'http' ) > -1 || smTwitter.indexOf( 'https' ) > -1 ) {
178
  linkSpace = 0;
179
+ jQuery( '.tweetLinkSection' ).css({ 'text-decoration': 'line-through' });
180
  } else {
181
  linkSpace = 23;
182
+ jQuery( '.tweetLinkSection' ).css({ 'text-decoration': 'none' });
183
  }
184
 
185
  var remaining;
190
  }
191
 
192
  if ( smTwitter.length > 0 && remaining >= 0 ) {
193
+ jQuery( '#social_warfare .swp_customTweetWrapper .swp_CountDown' ).removeClass( 'swp_red' ).addClass( 'swp_blue' );
194
  } else if ( smTwitter.length > 0 && remaining < 0 ) {
195
+ jQuery( '#social_warfare .swp_customTweetWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).addClass( 'swp_red' );
196
  } else {
197
+ jQuery( '#social_warfare .swp_customTweetWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).removeClass( 'swp_red' );
198
  }
199
 
200
+ jQuery( '#social_warfare .swp_customTweetWrapper .counterNumber' ).html( remaining );
201
  }
202
 
203
  function toggleCustomThumbnailFields(show) {
204
  if (typeof show === 'undefined') show = true;
205
 
206
  if (show) {
207
+ jQuery(".custom_thumb_size").show();
208
  }
209
  else {
210
+ jQuery(".custom_thumb_size").hide();
211
  }
212
  }
213
 
214
+ jQuery( document ).ready( function() {
215
+ if ( jQuery( '#social_warfare.postbox' ).length ) {
216
 
217
  // Add the CountDown Box for the Social Media Title
218
+ jQuery( '#social_warfare #swp_og_title' ).parent().prepend( '<div class="swp_CountDown"><span class="counterNumber">60</span> ' + swp_localize_admin.swp_characters_remaining + '</div>' );
219
 
220
  // Add the CountDown Box for the Social Media Description
221
+ jQuery( '#social_warfare #swp_og_description' ).parent().prepend( '<div class="swp_CountDown"><span class="counterNumber">150</span> ' + swp_localize_admin.swp_characters_remaining + '</div>' );
222
 
223
  // Add the CountDown Box for the Twitter Box
224
+ jQuery( '#social_warfare #swp_customTweet' ).parent().prepend( '<div class="swp_CountDown"><span class="counterNumber">118</span> ' + swp_localize_admin.swp_characters_remaining + '</div>' );
225
 
226
  smTitleRemaining();
227
+ jQuery( '#social_warfare textarea#swp_og_title' ).on( 'input', function() {
228
  smTitleRemaining();
229
  });
230
 
231
  smDescriptionRemaining();
232
+ jQuery( '#social_warfare textarea#swp_og_description' ).on( 'input', function() {
233
  smDescriptionRemaining();
234
  });
235
 
236
  twitterRemaining();
237
+ jQuery( '#social_warfare textarea#swp_customTweet' ).on( 'input', function() {
238
  twitterRemaining();
239
  });
240
 
241
  // Setup an initilazation loop
242
  var swpPostInit = setInterval( function() {
243
 
244
+ var swpOgImage = jQuery( '.swp_og_imageWrapper ul.swpmb-media-list' );
245
+ var swpPinImage = jQuery( '.swp_pinterest_imageWrapper ul.swpmb-media-list' );
246
 
247
  var smWidth, smHeight;
248
 
274
  }
275
 
276
  swpConditionalFields();
277
+ jQuery( '.swp_popular_post_options select' ).on( 'change', function() {
278
  swpConditionalFields();
279
  });
280
 
281
+ if ( jQuery( '.postbox#social_warfare' ).length ) {
282
+ var registrationStatus = jQuery( '#social_warfare .registrationWrapper input' ).attr( 'id' );
283
  if ( registrationStatus == 'false' ) {
284
+ jQuery( '.postbox#social_warfare' )
285
  .css({ position: 'relative',opacity: '0.3' })
286
  .append( '<div class="sw-premium-blocker"></div>' );
287
 
288
+ jQuery( '#social_warfare .sw-premium-blocker' ).tooltip({
289
  items: '#social_warfare .sw-premium-blocker',
290
  content: '<i></i>Unlock these features by registering your license.',
291
  position: {
298
  return false;
299
  }
300
 
301
+ var jQueryid = jQuery( ui.tooltip ).attr( 'id' );
302
 
303
  // close any lingering tooltips
304
+ jQuery( 'div.ui-tooltip' ).not( '#' + jQueryid ).remove();
305
 
306
  // ajax function to pull in data and add it to the tooltip goes here
307
  },
308
  close: function( event, ui ) {
309
  ui.tooltip.hover(function() {
310
+ jQuery(this).stop( true ).fadeTo( 400, 1 );
311
  },
312
  function() {
313
+ jQuery(this).fadeOut( '400', function() {
314
+ jQuery(this).remove();
315
  });
316
  });
317
  }
320
  }
321
 
322
  /*
323
+ var customThumbnailSelect = jQuery("#widget-swp_popular_posts_widget-2-thumb_size");
324
 
325
  if (customThumbnailSelect.value === 'custom') {
326
  toggleCustomThumbnailFields();
327
  }
328
 
329
+ jQuery(customThumbnailSelect).on("change", function(e) {
330
  console.log("changing");
331
  console.log(e.target.value);
332
  if (e.target.value === 'custom') {
js/admin.min.js CHANGED
@@ -1 +1 @@
1
- function swpConditionalFields(){function e(e){return $('select[name="'+e+'"]').val()}function s(e){return"true"===e&&(e=!0),"false"===e&&(e=!1),e}$("[data-dep]").each(function(){var e=$(this).data("dep"),t=JSON.parse(JSON.stringify($(this).data("dep_val")));if(-1===window.location.href.indexOf("page=social-warfare"))var o=$(this).parents(".widgets-holder-wrap").find('[data-swp-name="'+e+'"]');else var o=$('[name="'+e+'"]')[0];var a;void 0===o&&void 0===(o=$('[name="'+e+'"]')[0])&&(o=$("[field$="+e+"]")[0]),a="checkbox"==$(o).attr("type")?$(o).prop("checked"):$(o).val(),a=s(a),-1!==window.location.href.indexOf("page=social-warfare")?-1!==$.inArray(a,t)&&$(o).parent(".sw-grid").is(":visible")?$(this).show():$(this).hide():-1!==$.inArray(a,t)||a===t?$(this).show():$(this).hide()}),!1===function(e){return $('[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")?$(".sideCustomColor_wrapper").slideDown():$(".sideCustomColor_wrapper").slideUp()}var socialWarfareAdmin=socialWarfareAdmin||{},swpWidget,widgetSubmit;if("undefined"==typeof $&&($=jQuery),window.location.href.indexOf("widgets.php"))var widgetFinder=setInterval(function(){void 0!==swpWidget&&clearInterval(widgetFinder),swpWidget=$("#widgets-right [id*=_swp_popular_posts_widget], [id*=_swp_popular_posts_widget].open")[0],widgetSubmit=$(swpWidget).find("[id$=savewidget]")[0],$(swpWidget).on("click",swpConditionalFields),$(widgetSubmit).on("click",function(){setTimeout(swpConditionalFields,600)})},50);!function(e,s,t){"use strict";function o(){var e=s("#social_warfare textarea#swp_ogTitle").val(),t=60-e.length;e.length>0&&t>=0?s("#social_warfare .swp_og_title .swp_CountDown").removeClass("swp_red").addClass("swp_blue"):e.length>0&&t<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(t)}function a(){var e=s("#social_warfare textarea#swp_ogDescription").val(),t=160-e.length;e.length>0&&t>=0?s("#social_warfare .swp_og_description .swp_CountDown").removeClass("swp_red").addClass("swp_blue"):e.length>0&&t<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(t)}function i(){var e,t=s("#social_warfare textarea#swp_customTweet").val(),o=s("#social_warfare .twitterIDWrapper label").html();t.indexOf("http")>-1||t.indexOf("https")>-1?(e=0,s(".tweetLinkSection").css({"text-decoration":"line-through"})):(e=23,s(".tweetLinkSection").css({"text-decoration":"none"}));var a;a=void 0===o?280-socialWarfareAdmin.linkLength(t)-e:280-socialWarfareAdmin.linkLength(t)-e-o.length-6,t.length>0&&a>=0?s("#social_warfare .swp_customTweetWrapper .swp_CountDown").removeClass("swp_red").addClass("swp_blue"):t.length>0&&a<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(a)}socialWarfareAdmin.linkLength=function(e){for(var s="",t=0;t<23;t++)s+="o";return e.replace(/(http:\/\/[\S]*)/g,s).length},s(document).ready(function(){if(s("#social_warfare.postbox").length){s("#social_warfare #swp_ogTitle").parent().prepend('<div class="swp_CountDown"><span class="counterNumber">60</span> '+swp_localize_admin.swp_characters_remaining+"</div>"),s("#social_warfare #swp_ogDescription").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>"),o(),s("#social_warfare textarea#swp_ogTitle").on("input",function(){o()}),a(),s("#social_warfare textarea#swp_ogDescription").on("input",function(){a()}),i(),s("#social_warfare textarea#swp_customTweet").on("input",function(){i()});setInterval(function(){var e,t,o=s(".swp_og_imageWrapper ul.swpmb-media-list"),a=s(".swp_pinterest_imageWrapper ul.swpmb-media-list");o.length&&o.is(":empty")?(e=o.width(),t=e*(9/16),o.css({height:t+"px"})):(t=o.find("img").height(),o.css({height:t+"px"}));var i,r;a.length&&a.is(":empty")?(i=a.width(),r=1.5*i,a.css({height:r+"px"})):(r=a.find("img").height(),a.css({height:r+"px"}))},1e3)}if(swpConditionalFields(),s(".swp_popular_post_options select").on("change",function(){swpConditionalFields()}),s(".postbox#social_warfare").length){"false"==s("#social_warfare .registrationWrapper input").attr("id")&&(s(".postbox#social_warfare").css({position:"relative",opacity:"0.3"}).append('<div class="sw-premium-blocker"></div>'),s("#social_warfare .sw-premium-blocker").tooltip({items:"#social_warfare .sw-premium-blocker",content:"<i></i>Unlock these features by registering your license.",position:{my:"center top",at:"center top"},tooltipClass:"sw-admin-hover-notice",open:function(e,t){if(void 0===e.originalEvent)return!1;var o=s(t.tooltip).attr("id");s("div.ui-tooltip").not("#"+o).remove()},close:function(e,t){t.tooltip.hover(function(){s(this).stop(!0).fadeTo(400,1)},function(){s(this).fadeOut("400",function(){s(this).remove()})})}}))}})}(0,jQuery);
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"),t=JSON.parse(JSON.stringify(jQuery(this).data("dep_val")));if(-1===window.location.href.indexOf("page=social-warfare"))var o=jQuery(this).parents(".widgets-holder-wrap").find('[data-swp-name="'+e+'"]');else var o=jQuery('[name="'+e+'"]')[0];var r;void 0===o&&void 0===(o=jQuery('[name="'+e+'"]')[0])&&(o=jQuery("[fieldjQuery="+e+"]")[0]),r="checkbox"==jQuery(o).attr("type")?jQuery(o).prop("checked"):jQuery(o).val(),r=s(r),-1!==window.location.href.indexOf("page=social-warfare")?-1!==jQuery.inArray(r,t)&&jQuery(o).parent(".sw-grid").is(":visible")?jQuery(this).show():jQuery(this).hide():-1!==jQuery.inArray(r,t)||r===t?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,t){"use strict";function o(){var e=s("#social_warfare textarea#swp_og_title").val(),t=60-e.length;e.length>0&&t>=0?s("#social_warfare .swp_og_title .swp_CountDown").removeClass("swp_red").addClass("swp_blue"):e.length>0&&t<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(t)}function r(){var e=s("#social_warfare textarea#swp_og_description").val(),t=160-e.length;e.length>0&&t>=0?s("#social_warfare .swp_og_description .swp_CountDown").removeClass("swp_red").addClass("swp_blue"):e.length>0&&t<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(t)}function a(){var e,t=s("#social_warfare textarea#swp_custom_tweet").val(),o=s("#social_warfare .twitterIDWrapper label").html();t.indexOf("http")>-1||t.indexOf("https")>-1?(e=0,s(".tweetLinkSection").css({"text-decoration":"line-through"})):(e=23,s(".tweetLinkSection").css({"text-decoration":"none"}));var r;r=void 0===o?280-socialWarfareAdmin.linkLength(t)-e:280-socialWarfareAdmin.linkLength(t)-e-o.length-6,t.length>0&&r>=0?s("#social_warfare .swp_customTweetWrapper .swp_CountDown").removeClass("swp_red").addClass("swp_blue"):t.length>0&&r<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(r)}socialWarfareAdmin.linkLength=function(e){for(var s="",t=0;t<23;t++)s+="o";return e.replace(/(http:\/\/[\S]*)/g,s).length},s(document).ready(function(){if(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>"),o(),s("#social_warfare textarea#swp_og_title").on("input",function(){o()}),r(),s("#social_warfare textarea#swp_og_description").on("input",function(){r()}),a(),s("#social_warfare textarea#swp_customTweet").on("input",function(){a()});setInterval(function(){var e,t,o=s(".swp_og_imageWrapper ul.swpmb-media-list"),r=s(".swp_pinterest_imageWrapper ul.swpmb-media-list");o.length&&o.is(":empty")?(e=o.width(),t=e*(9/16),o.css({height:t+"px"})):(t=o.find("img").height(),o.css({height:t+"px"}));var a,i;r.length&&r.is(":empty")?(a=r.width(),i=1.5*a,r.css({height:i+"px"})):(i=r.find("img").height(),r.css({height:i+"px"}))},1e3)}if(swpConditionalFields(),s(".swp_popular_post_options select").on("change",function(){swpConditionalFields()}),s(".postbox#social_warfare").length){"false"==s("#social_warfare .registrationWrapper input").attr("id")&&(s(".postbox#social_warfare").css({position:"relative",opacity:"0.3"}).append('<div class="sw-premium-blocker"></div>'),s("#social_warfare .sw-premium-blocker").tooltip({items:"#social_warfare .sw-premium-blocker",content:"<i></i>Unlock these features by registering your license.",position:{my:"center top",at:"center top"},tooltipClass:"sw-admin-hover-notice",open:function(e,t){if(void 0===e.originalEvent)return!1;var o=s(t.tooltip).attr("id");s("div.ui-tooltip").not("#"+o).remove()},close:function(e,t){t.tooltip.hover(function(){s(this).stop(!0).fadeTo(400,1)},function(){s(this).fadeOut("400",function(){s(this).remove()})})}}))}})}(0,jQuery);
js/sw-shortcode-generator.js CHANGED
@@ -1,73 +1,73 @@
1
- (function() {
2
- tinymce.PluginManager.add( 'swp_shortcode_generator', function( editor, url ) {
3
- editor.addButton( 'swp_shortcode_generator', {
4
- title: 'Social Warfare Buttons',
5
- icon: 'sw sw sw-social-warfare',
6
- onclick: function() {
7
- editor.windowManager.open( {
8
- title: 'Insert Social Warfare Buttons',
9
- body: [
10
- {
11
- type: 'listbox',
12
- name: 'reflection',
13
- label: 'Should the buttons reflect this post or another one?',
14
- values: [
15
- { text: 'This Post', value: 'default' },
16
- { text: 'A Different Post', value: 'alt' }
17
- ],
18
- onselect: function( v ) {
19
- if ( this.value() == 'alt' ) {
20
- jQuery( '.mce-postid' ).parent().parent().slideDown();
21
- } else {
22
- jQuery( '.mce-postid' ).parent().parent().slideUp();
23
- }
24
- }
25
- },
26
- {
27
- type: 'textbox',
28
- multiline: false,
29
- name: 'postID',
30
- classes: 'postid',
31
- label: 'The ID of the post or page to reflect:'
32
- },
33
- {
34
- type: 'textbox',
35
- multiline: false,
36
- name: 'buttons',
37
- classes: 'buttons',
38
- label: 'Buttons to Include:'
39
- },
40
- {
41
- type: 'label',
42
- name: 'someHelpText',
43
- onPostRender: function() {
44
- this.getEl().innerHTML =
45
- '<span style="float:right;">Comma separated list of social network (e.g. "Facebook,Twitter,Total"). Leave blank to use site-wide defaults.</span>';
46
- },
47
- text: ''
48
- }
49
- ],
50
- onPostRender: function() {
51
- jQuery( '.mce-postid' ).parent().parent().slideUp();
52
- jQuery( '.mce-title' ).prepend( '<i class="sw sw-social-warfare"></i>' );
53
- },
54
- onsubmit: function( e ) {
55
- // Check if this is supposed to refelct a different post_id
56
- if ( e.data.reflection == 'alt' && e.data.postID != '' ) {
57
- var post_information = ' post_id="' + e.data.postID + '"';
58
- } else {
59
- var post_information = '';
60
- }
61
- // Check if this is a custom set of buttons
62
- if ( e.data.buttons != '' ) {
63
- var button_set = ' buttons="' + e.data.buttons + '"';
64
- } else {
65
- var button_set = '';
66
- }
67
- editor.insertContent( '[social_warfare' + post_information + '' + button_set + ']' );
68
- }
69
- });
70
- }
71
- });
72
- });
73
- })();
1
+ (function() {
2
+ tinymce.PluginManager.add( 'swp_shortcode_generator', function( editor, url ) {
3
+ editor.addButton( 'swp_shortcode_generator', {
4
+ title: 'Social Warfare Buttons',
5
+ icon: 'sw sw sw-social-warfare',
6
+ onclick: function() {
7
+ editor.windowManager.open( {
8
+ title: 'Insert Social Warfare Buttons',
9
+ body: [
10
+ {
11
+ type: 'listbox',
12
+ name: 'reflection',
13
+ label: 'Should the buttons reflect this post or another one?',
14
+ values: [
15
+ { text: 'This Post', value: 'default' },
16
+ { text: 'A Different Post', value: 'alt' }
17
+ ],
18
+ onselect: function( v ) {
19
+ if ( this.value() == 'alt' ) {
20
+ jQuery( '.mce-postid' ).parent().parent().slideDown();
21
+ } else {
22
+ jQuery( '.mce-postid' ).parent().parent().slideUp();
23
+ }
24
+ }
25
+ },
26
+ {
27
+ type: 'textbox',
28
+ multiline: false,
29
+ name: 'postID',
30
+ classes: 'postid',
31
+ label: 'The ID of the post or page to reflect:'
32
+ },
33
+ {
34
+ type: 'textbox',
35
+ multiline: false,
36
+ name: 'buttons',
37
+ classes: 'buttons',
38
+ label: 'Buttons to Include:'
39
+ },
40
+ {
41
+ type: 'label',
42
+ name: 'someHelpText',
43
+ onPostRender: function() {
44
+ this.getEl().innerHTML =
45
+ '<span style="float:right;">Comma separated list of social network (e.g. "Facebook,Twitter,Total"). Leave blank to use site-wide defaults.</span>';
46
+ },
47
+ text: ''
48
+ }
49
+ ],
50
+ onPostRender: function() {
51
+ jQuery( '.mce-postid' ).parent().parent().slideUp();
52
+ jQuery( '.mce-title' ).prepend( '<i class="sw sw-social-warfare"></i>' );
53
+ },
54
+ onsubmit: function( e ) {
55
+ // Check if this is supposed to refelct a different post_id
56
+ if ( e.data.reflection == 'alt' && e.data.postID != '' ) {
57
+ var post_information = ' post_id="' + e.data.postID + '"';
58
+ } else {
59
+ var post_information = '';
60
+ }
61
+ // Check if this is a custom set of buttons
62
+ if ( e.data.buttons != '' ) {
63
+ var button_set = ' buttons="' + e.data.buttons + '"';
64
+ } else {
65
+ var button_set = '';
66
+ }
67
+ editor.insertContent( '[social_warfare' + post_information + '' + button_set + ']' );
68
+ }
69
+ });
70
+ }
71
+ });
72
+ });
73
+ })();
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: holas84, dustinwstout, webinator, warfareplugins, nutsandboltsmedi
3
  Tags: sharing buttons, social media share, floating share buttons, facebook share, google plus share, linkedin share, pin it, pinterest save, stumbleupon button, tweet button, twitter share, click to tweet, social sharing buttons, social share, social sharing, social media sharing, wordpress social sharing plugin, social sharing plugin, share buttons, share counts
4
  Requires at least: 3.5.1
5
  Tested up to: 4.9
6
- Stable tag: 3.0.1
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.
3
  Tags: sharing buttons, social media share, floating share buttons, facebook share, google plus share, linkedin share, pin it, pinterest save, stumbleupon button, tweet button, twitter share, click to tweet, social sharing buttons, social share, social sharing, social media sharing, wordpress social sharing plugin, social sharing plugin, share buttons, share counts
4
  Requires at least: 3.5.1
5
  Tested up to: 4.9
6
+ Stable tag: 3.0.5
7
  License: GNU General Public License v2.0 or later
8
 
9
  The most beautiful, responsive, lightning fast social share buttons built to boost shares and drive more traffic without slowing down your site.
social-warfare.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Social Warfare
4
  * Plugin URI: http://warfareplugins.com
5
  * Description: A plugin to maximize social shares and drive more traffic using the fastest and most intelligent share buttons on the market, calls to action via in-post click-to-tweets, popular posts widgets based on share popularity, link-shortening, Google Analytics and much, much more!
6
- * Version: 3.0.1
7
  * Author: Warfare Plugins
8
  * Author URI: http://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.0.1' );
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: http://warfareplugins.com
5
  * Description: A plugin to maximize social shares and drive more traffic using the fastest and most intelligent share buttons on the market, calls to action via in-post click-to-tweets, popular posts widgets based on share popularity, link-shortening, Google Analytics and much, much more!
6
+ * Version: 3.0.5
7
  * Author: Warfare Plugins
8
  * Author URI: http://warfareplugins.com
9
  * Text Domain: social-warfare
16
  * Define plugin constants for use throughout the plugin (Version and Directories)
17
  *
18
  */
19
+ define( 'SWP_VERSION' , '3.0.5' );
20
  define( 'SWP_PLUGIN_FILE', __FILE__ );
21
  define( 'SWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
22
  define( 'SWP_PLUGIN_DIR', dirname( __FILE__ ) );