WordPress Social Sharing Plugin – Social Warfare - Version 3.3.2

Version Description

(14 SEP 2018) = * Fixed a line of code that caused the 'social_warfare()' function to disappear.

Download this release

Release Info

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

Code changes from version 3.2.2 to 3.3.2

Files changed (197) hide show
  1. README.md +0 -0
  2. {css → assets/css}/admin-options-page.css +5 -5
  3. {css → assets/css}/admin-options-page.min.css +1 -1
  4. {css → assets/css}/admin-options.min.css +0 -0
  5. {css → assets/css}/admin.css +57 -1
  6. {css → assets/css}/admin.min.css +1 -1
  7. {css → assets/css}/style.css +35 -23
  8. assets/css/style.min.css +1 -0
  9. assets/fonts/sw-icon-font.eot +0 -0
  10. {fonts → assets/fonts}/sw-icon-font.svg +3 -4
  11. assets/fonts/sw-icon-font.ttf +0 -0
  12. assets/fonts/sw-icon-font.woff +0 -0
  13. {images → assets/images}/admin-options-page/Thumbs.db +0 -0
  14. {images → assets/images}/admin-options-page/affiliate-300x150.jpg +0 -0
  15. {images → assets/images}/admin-options-page/measure-roi-300x150.jpg +0 -0
  16. {images → assets/images}/admin-options-page/new_share_counts.png +0 -0
  17. {images → assets/images}/admin-options-page/social-warfare-light.png +0 -0
  18. {images → assets/images}/admin-options-page/social-warfare-pro-light.png +0 -0
  19. {images → assets/images}/admin-options-page/socialwarfare-20x20.png +0 -0
  20. {images → assets/images}/admin-options-page/starter-guide-300x150.jpg +0 -0
  21. {images → assets/images}/img-placeholder-og.jpg +0 -0
  22. {images → assets/images}/img-placeholder-pin.jpg +0 -0
  23. {js → assets/js}/admin-options-page.js +0 -0
  24. {js → assets/js}/admin-options-page.min.js +0 -0
  25. {js → assets/js}/admin.js +0 -0
  26. {js → assets/js}/admin.min.js +0 -0
  27. {js → assets/js}/script.js +29 -27
  28. assets/js/script.min.js +1 -0
  29. {js → assets/js}/sw-shortcode-generator.js +0 -0
  30. {js → assets/js}/sw-shortcode-generator.min.js +0 -0
  31. css/style.min.css +0 -1
  32. fonts/sw-icon-font.eot +0 -0
  33. fonts/sw-icon-font.ttf +0 -0
  34. fonts/sw-icon-font.woff +0 -0
  35. functions/admin/options-fetch.php +0 -156
  36. functions/admin/options-registration.php +0 -87
  37. functions/admin/registration.php +0 -347
  38. functions/includes/SWP_Addon.php +0 -271
  39. functions/includes/registration.php +0 -59
  40. functions/options/SWP_User_Options.php +0 -34
  41. functions/utilities/SWP_URL_Management.php +0 -403
  42. functions/utilities/utility.php +0 -564
  43. js/script.min.js +0 -0
  44. languages/social-warfare-da-DK.mo +0 -0
  45. languages/social-warfare-de_DE.mo +0 -0
  46. languages/social-warfare-en_US.mo +0 -0
  47. languages/social-warfare-es_ES.mo +0 -0
  48. languages/social-warfare-fr_FR.mo +0 -0
  49. languages/social-warfare-hy.mo +0 -0
  50. languages/social-warfare-it_IT.mo +0 -0
  51. languages/social-warfare-pt_BR.mo +0 -0
  52. languages/social-warfare-pt_PT.mo +0 -0
  53. languages/social-warfare-ru_RU.mo +0 -0
  54. languages/social-warfare-uk.mo +0 -0
  55. languages/social-warfare.pot +2 -2
  56. languages/social_warfare-el_EL.mo +0 -0
  57. languages/social_warfare-nl_NL.mo +0 -0
  58. {functions → lib}/Social_Warfare.php +124 -81
  59. lib/Social_Warfare_Addon.php +300 -0
  60. {functions → lib}/admin/SWP_Click_To_Tweet.php +0 -0
  61. {functions → lib}/admin/SWP_Column.php +1 -1
  62. {functions → lib}/admin/SWP_Settings_Link.php +0 -0
  63. {functions → lib}/admin/SWP_Shortcode_Generator.php +1 -1
  64. lib/admin/SWP_Sidebar_Loader.php +75 -0
  65. {functions → lib}/admin/SWP_User_Profile.php +0 -0
  66. {functions → lib}/admin/assets/css/admin.css +0 -0
  67. {functions → lib}/admin/assets/css/style1.css +0 -0
  68. {functions → lib}/admin/assets/css/style2.css +0 -0
  69. {functions → lib}/admin/assets/css/style3.css +0 -0
  70. {functions → lib}/admin/assets/css/style4.css +0 -0
  71. {functions → lib}/admin/assets/css/styles.css +0 -0
  72. {functions → lib}/admin/assets/img/twitter-little-bird-button.png +0 -0
  73. {functions → lib}/admin/assets/img/twitter-little-bird-white.png +0 -0
  74. {functions → lib}/admin/assets/img/twitter-little-bird.png +0 -0
  75. {functions → lib}/admin/assets/js/clickToTweet.js +0 -0
  76. {functions → lib}/admin/assets/js/clickToTweet.min.js +0 -0
  77. {functions → lib}/admin/assets/js/tmclicktotweet_plugin.js +0 -0
  78. {functions → lib}/admin/swp_system_checker.php +0 -0
  79. {functions → lib}/frontend-output/SWP_Buttons_Panel.php +322 -178
  80. {functions → lib}/frontend-output/SWP_Display.php +9 -7
  81. {functions → lib}/frontend-output/SWP_Header_Output.php +2 -2
  82. {functions → lib}/frontend-output/SWP_Option_Page_Registration.php +0 -0
  83. {functions → lib}/frontend-output/SWP_Script.php +12 -12
  84. {functions → lib}/frontend-output/SWP_Shortcode.php +50 -35
  85. {functions → lib}/options/SWP_Option.php +19 -3
  86. {functions → lib}/options/SWP_Option_Icons.php +57 -25
  87. {functions → lib}/options/SWP_Option_Select.php +12 -0
  88. {functions → lib}/options/SWP_Option_Text.php +9 -0
  89. {functions → lib}/options/SWP_Option_Textarea.php +0 -0
  90. {functions → lib}/options/SWP_Option_Toggle.php +10 -0
  91. {functions → lib}/options/SWP_Options_Page.php +27 -30
  92. {functions → lib}/options/SWP_Options_Page_Section.php +1 -1
  93. {functions → lib}/options/SWP_Options_Page_Tab.php +0 -0
  94. functions/options/SWP_Addon_Registration.php → lib/options/SWP_Registration_Tab_Template.php +50 -1
  95. {functions → lib}/options/SWP_Section_HTML.php +108 -44
  96. lib/options/SWP_User_Options.php +226 -0
  97. {functions → lib}/social-networks/SWP_Facebook.php +2 -3
  98. {functions → lib}/social-networks/SWP_Google_Plus.php +0 -0
  99. {functions → lib}/social-networks/SWP_Linkedin.php +0 -0
  100. lib/social-networks/SWP_Mix.php +68 -0
  101. {functions → lib}/social-networks/SWP_Pinterest.php +1 -1
  102. {functions → lib}/social-networks/SWP_Social_Network.php +12 -11
  103. {functions → lib}/social-networks/SWP_Social_Networks_Loader.php +0 -0
  104. {functions → lib}/social-networks/SWP_Stumble_Upon.php +0 -0
  105. {functions → lib}/social-networks/SWP_Twitter.php +42 -22
  106. {functions/plugin-update-checker → lib/update-checker}/.editorconfig +0 -0
  107. {functions/plugin-update-checker → lib/update-checker}/Puc/v4/Factory.php +0 -0
  108. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Autoloader.php +0 -0
  109. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/DebugBar/Extension.php +1 -1
  110. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/DebugBar/Panel.php +0 -0
  111. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/DebugBar/PluginExtension.php +0 -0
  112. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/DebugBar/PluginPanel.php +0 -0
  113. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/DebugBar/ThemePanel.php +0 -0
  114. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Factory.php +0 -0
  115. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/InstalledPackage.php +1 -1
  116. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Metadata.php +0 -0
  117. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/OAuthSignature.php +0 -0
  118. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Plugin/Info.php +0 -0
  119. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Plugin/Package.php +0 -0
  120. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Plugin/Ui.php +0 -0
  121. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Plugin/Update.php +0 -0
  122. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Plugin/UpdateChecker.php +0 -0
  123. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Scheduler.php +0 -0
  124. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/StateStore.php +0 -0
  125. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Theme/Package.php +0 -0
  126. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Theme/Update.php +0 -0
  127. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Theme/UpdateChecker.php +0 -0
  128. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Update.php +0 -0
  129. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/UpdateChecker.php +0 -0
  130. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/UpgraderStatus.php +0 -0
  131. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Utils.php +0 -0
  132. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Vcs/Api.php +0 -0
  133. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Vcs/BaseChecker.php +0 -0
  134. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Vcs/BitBucketApi.php +0 -0
  135. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Vcs/GitHubApi.php +0 -0
  136. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Vcs/GitLabApi.php +0 -0
  137. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Vcs/PluginUpdateChecker.php +0 -0
  138. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Vcs/Reference.php +0 -0
  139. {functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Vcs/ThemeUpdateChecker.php +0 -0
  140. {functions/plugin-update-checker → lib/update-checker}/README.md +0 -0
  141. {functions/plugin-update-checker → lib/update-checker}/composer.json +0 -0
  142. {functions/plugin-update-checker → lib/update-checker}/css/puc-debug-bar.css +0 -0
  143. {functions/plugin-update-checker → lib/update-checker}/examples/plugin.json +0 -0
  144. {functions/plugin-update-checker → lib/update-checker}/examples/theme.json +0 -0
  145. {functions/plugin-update-checker → lib/update-checker}/js/debug-bar.js +0 -0
  146. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-cs_CZ.mo +0 -0
  147. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-cs_CZ.po +0 -0
  148. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-da_DK.mo +0 -0
  149. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-da_DK.po +0 -0
  150. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-de_DE.mo +0 -0
  151. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-de_DE.po +0 -0
  152. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-fa_IR.mo +0 -0
  153. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-fa_IR.po +0 -0
  154. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-fr_CA.mo +0 -0
  155. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-fr_CA.po +0 -0
  156. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-fr_FR.mo +0 -0
  157. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-fr_FR.po +0 -0
  158. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-hu_HU.mo +0 -0
  159. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-hu_HU.po +0 -0
  160. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-it_IT.mo +0 -0
  161. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-it_IT.po +0 -0
  162. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-ja.mo +0 -0
  163. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-ja.po +0 -0
  164. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-nl_BE.mo +0 -0
  165. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-nl_BE.po +0 -0
  166. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-nl_NL.mo +0 -0
  167. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-nl_NL.po +0 -0
  168. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-pt_BR.mo +0 -0
  169. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-pt_BR.po +0 -0
  170. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-sv_SE.mo +0 -0
  171. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-sv_SE.po +0 -0
  172. {functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker.pot +0 -0
  173. {functions/plugin-update-checker → lib/update-checker}/license.txt +0 -0
  174. {functions/plugin-update-checker → lib/update-checker}/plugin-update-checker.php +0 -0
  175. {functions/plugin-update-checker → lib/update-checker}/vendor/Parsedown.php +0 -0
  176. {functions/plugin-update-checker → lib/update-checker}/vendor/ParsedownLegacy.php +0 -0
  177. {functions/plugin-update-checker → lib/update-checker}/vendor/readme-parser.php +0 -0
  178. {functions → lib}/utilities/SWP_Abstract.php +13 -17
  179. {functions → lib}/utilities/SWP_CURL.php +1 -1
  180. {functions → lib}/utilities/SWP_Compatibility.php +2 -2
  181. {functions → lib}/utilities/SWP_Database_Migration.php +37 -49
  182. {functions → lib}/utilities/SWP_JSON_Cache_Handler.php +2 -2
  183. {functions → lib}/utilities/SWP_Localization.php +0 -0
  184. {functions → lib}/utilities/SWP_Notice.php +6 -6
  185. {functions → lib}/utilities/SWP_Notice_Loader.php +1 -1
  186. {functions → lib}/utilities/SWP_Permalink.php +0 -0
  187. {functions → lib}/utilities/SWP_Plugin_Updater.php +1 -1
  188. {functions → lib}/utilities/SWP_Post_Cache.php +21 -10
  189. {functions → lib}/utilities/SWP_Post_Cache_Loader.php +0 -0
  190. lib/utilities/SWP_URL_Management.php +315 -0
  191. lib/utilities/SWP_Utility.php +312 -0
  192. {functions → lib}/utilities/SWP_Utility_Trait.php +0 -0
  193. lib/utilities/functions.php +24 -0
  194. {functions → lib}/widgets/SWP_Popular_Posts_Widget.php +2 -2
  195. {functions → lib}/widgets/SWP_Widget.php +0 -0
  196. readme.txt +19 -4
  197. social-warfare.php +5 -5
README.md CHANGED
File without changes
{css → assets/css}/admin-options-page.css RENAMED
@@ -657,13 +657,13 @@ p.sw-subtitle.sw-registration-text {
657
  border-color: #27313f;
658
  }
659
 
660
- .sw-stumbleupon-icon:before {
661
- content: 'q';
662
  }
663
 
664
- .sw-s.sw-stumbleupon-icon {
665
- background-color: #ef5025;
666
- border-color: #d34427;
667
  }
668
 
669
  .sw-reddit-icon:before {
657
  border-color: #27313f;
658
  }
659
 
660
+ .sw-mix-icon:before {
661
+ content: 'g';
662
  }
663
 
664
+ .sw-s.sw-mix-icon {
665
+ background-color: #f4812c;
666
+ border-color: #c96a29;
667
  }
668
 
669
  .sw-reddit-icon:before {
{css → assets/css}/admin-options-page.min.css RENAMED
@@ -1 +1 @@
1
- .sw-grid{float:left;margin-bottom:2.127659574468%;padding-top:0}.sw-grid-right{float:right;margin-bottom:2.127659574468%;padding-top:0}.sw-col-60,.sw-col-140,.sw-col-220,.sw-col-300,.sw-col-380,.sw-col-460,.sw-col-540,.sw-col-620,.sw-col-700,.sw-col-780,.sw-col-860{margin-right:2.127659574468%}.sw-col-60{width:6.382978723404%}.sw-col-140{width:14.893617021277%}.sw-col-220{width:23.404255319149%}.sw-col-300{width:31.914893617021%}.sw-col-380{width:40.425531914894%}.sw-col-460{width:48.936170212766%}.sw-col-540{width:57.446808510638%}.sw-col-620{width:65.957446808511%}.sw-col-700{width:74.468085106383%}.sw-col-780{width:82.978723404255%}.sw-col-860{width:91.489361702128%}.sw-col-940{width:100%}.sw-fit{margin-left:0!important;margin-right:0!important}.sw-option-container *:last-child{margin-left:0!important;margin-right:0!important}.sw-clearfix:after,.sw-clearfix:before{content:' ';display:table}.sw-clearfix:after{clear:both}.sw-clearfix{clear:both;width:100%}img{-ms-interpolation-mode:bicubic;border:0;height:auto;max-width:100%;vertical-align:middle}.sw-admin-divider{width:100%;height:1px;border-bottom:1px solid #CED3DC;margin:20px 0 40px 0}.sw-hidden{display:none!important}.swp_support_link{border:1px solid #ccc;font-size:18px;line-height:20px;text-decoration:none;-webkit-border-radius:50%;border-radius:50%;width:20px;display:block;float:right;text-align:center;color:#ccc;margin-right:20px;margin-top:4px;padding:2px;font-weight:bold}.swp_support_link:hover{color:#6BCCE9;border-color:#6BCCE9}.swp_support_link.swp_four_fourths{margin-left:20px;margin-top:13px}#screen-meta-links .screen-meta-toggle{display:none!important}#wpwrap,#wpcontent{background:#fff;padding-left:0}.sw-top-menu{border-bottom:1px solid #CED3DC;float:none;background:#fff;z-index:5;margin:0}.sw-top-menu[sw-registered="0"] .sw-header-logo{height:75px;float:left}.sw-top-menu[sw-registered="1"] .sw-header-logo-pro{height:75px;float:left}.sw-top-menu[sw-registered="1"] .sw-header-logo{display:none}.sw-top-menu[sw-registered="0"] .sw-header-logo-pro{display:none}.sw-header-menu{height:75px;margin:0}.sw-header-menu li{float:left;margin:0 15px;font-size:16px;display:table;height:75px}.sw-header-menu li:focus,.sw-header-menu li a:focus{outline:none;-webkit-box-shadow:none;box-shadow:none}.sw-header-menu li span{padding:0 5px 5px 5px}.sw-header-menu li.sw-active-tab span,.sw-header-menu li:hover span{border-bottom:4px solid #30394f}.sw-header-menu li a{color:#30394f;text-decoration:none;display:table-cell;vertical-align:middle}.sw-top-menu .sw-grid{margin-bottom:0}.sw-admin-wrapper,.sw-header-wrapper{clear:both;margin:20px auto 20px auto;padding:0 40px 20px 40px;position:relative}.sw-header-wrapper{margin:0}.sw-tabs-container .sw-admin-tab{display:none}.sw-tabs-container .sw-admin-tab:nth-child(1){display:block}.sw-admin-tab h2{font-size:26px;line-height:1.2;margin:0}.sw-admin-tab h2.sw-h-label{line-height:56px}p.sw-subtitle{font-size:16px;line-height:1.2;margin:10px 0 30px 0}p.sw-checkbox-label,p.sw-input-label,p.sw-select-label,p.sw-authenticate-label{font-size:16px;font-weight:bold;padding-left:10%}.sw-select-label.sw-no-padding{padding-left:0}p.sw-short{margin:1em 0 0 0}p.sw-subtext-label{margin-top:-10px}.sw-admin-sidebar img{margin:5px 0 10px 0}.system-status-wrapper{display:none}.system-status-container{width:90%;height:250px;overflow:hidden;border:1px solid #CED3DC;padding:5%}h3.sw-buttons-toggle{width:100px;float:left;clear:left;margin:15px 0 30px 0;padding-left:10%}.sw-checkbox-toggle{width:150px;height:46px;background-color:#30394f;float:right;margin:5px 0;cursor:pointer;-webkit-border-radius:4px;border-radius:4px;overflow:hidden;position:relative}.sw-checkbox-on,.sw-checkbox-off{color:white;font-size:15px;text-align:center;line-height:46px;position:absolute;top:0;width:50%;height:100%}.sw-checkbox-toggle[status="on"] .sw-checkbox-on{left:0;background-color:#71C069}.sw-checkbox-toggle[status="on"] .sw-checkbox-off,.sw-checkbox-toggle[status="off"] .sw-checkbox-on{display:none}.sw-admin-wrapper[sw-registered="0"] .sw-option-container[premium="1"] .sw-checkbox-toggle[status="on"] .sw-checkbox-on{display:none}.sw-admin-wrapper[sw-registered="0"] .sw-option-container[premium="1"] .sw-checkbox-toggle[status="on"] .sw-checkbox-off{right:0;background-color:#ee464f;display:block}.sw-checkbox-toggle[status="off"] .sw-checkbox-off{right:0;background-color:#ee464f}input.sw-admin-input{padding:15px;border:1px solid #ced3cd;-webkit-border-radius:4px;border-radius:4px;float:right;-webkit-box-shadow:none;box-shadow:none;margin:2px 0 1px 0;width:100%}.sw-grid select{width:100%;-webkit-box-shadow:none;box-shadow:none;border:1px solid #ced3cd;height:51px;padding:15px;margin:2px 1px 3px 0;-webkit-border-radius:4px;border-radius:4px}a.button.sw-navy-button,a.button.sw-blue-button,a.button.sw-green-button,a.button.sw-red-button{padding:15px 30px;height:auto;line-height:1;-webkit-border-radius:4px;border-radius:4px;-webkit-box-shadow:none;box-shadow:none;float:right;margin:15px 0}a.button.sw-navy-button,a.button.sw-navy-button:focus{background:#30394f;color:#fff;border-color:#2a2d34;-webkit-box-shadow:none;box-shadow:none}a.button.sw-navy-button:hover,a.button.sw-blue-button:hover{background:#2a2d34;border-color:#2a2d34;color:#fff;-webkit-box-shadow:none;box-shadow:none}a.button.sw-blue-button,a.button.sw-blue-button:focus{background:#6bcce9;border-color:#6bcce9;color:#fff;-webkit-box-shadow:none;box-shadow:none}a.button.sw-green-button,a.button.sw-green-button:focus{background:#71C069;color:#fff;border-color:#71C069;-webkit-box-shadow:none;box-shadow:none}a.button.sw-red-button,a.button.sw-red-button:focus,a.button.sw-red-button:hover{background:#ee464f;color:#fff;border-color:#ee464f;-webkit-box-shadow:none;box-shadow:none}.sw-admin-tab a.button{margin:5px 0 15px 0}.sw-save-settings{width:100%;text-align:center}.sw-red-notice,.sw-green-notice{color:#fff;padding:15px;-webkit-border-radius:2px;border-radius:2px;margin:15px 0}.sw-red-notice,.sw-loading-message{background:#ee464f}.sw-green-notice,.sw-loading-complete{background:#71C069}.sw-loading-bg{width:100%;position:fixed;top:0;left:0;height:100%;background:rgba(0,0,0,0.8);z-index:999999999999}.sw-loading-message:before,.sw-green-notice:before,.sw-loading-complete:before{font-family:'Dashicons';font-size:26px;margin:0 15px 0 0;vertical-align:middle}.sw-red-notice:before,.sw-red-notice:before{font-family:'sw-icon-font';font-size:26px;margin:0 15px 0 0;vertical-align:middle;content:'E'}.sw-red-notice a{color:#fff;font-weight:bold;text-decoration:none;border-bottom:2px solid #fff}.sw-red-notice a:hover{color:#30394f;border-bottom:2px solid #30394f}.sw-loading-message:before{content:"\f158"}.sw-green-notice:before,.sw-loading-complete:before{content:"\f147"}.sw-admin-tab .two-thirds-advanced h2.sw-h-label{line-height:1.2;margin-bottom:15px}.sw-italic{font-style:italic}p.sw-subtitle.sw-registration-text{padding:20px 0 0 0;font-size:120%;line-height:175%}.registration-wrapper[registration="1"] .swp_is_not_registered{display:none}.registration-wrapper[registration="0"] .swp_is_registered{display:none}.tweet-count-wrapper[registration="true"] .swp_tweets_not_activated{display:none}.sw-tweet-count-demo{margin:20px 0}.sw-loading-message,.sw-loading-complete{position:fixed;top:50%;left:50%;-webkit-border-radius:3px;border-radius:3px;padding:25px;text-align:center;font-size:20px;color:white;width:240px;margin-top:-46px;margin-left:-120px}.sw-grid textarea{width:100%;height:120px}.sw-active,.sw-inactive{margin:0 0 5px 0;min-width:50px;min-height:40px;border:1px dashed #ced3dc;padding:0;-webkit-border-radius:4px;border-radius:4px;width:auto;height:auto;display:inline-block;max-width:520px}.sw-s{font-family:'sw-icon-font';color:#fff;padding:5px 30px 4px;margin:7px 5px 7px;-webkit-border-radius:2px;border-radius:2px;display:inline-block;font-style:normal;font-size:15px;line-height:15px;cursor:pointer}.sw-twitter-icon:before{content:'s'}.sw-s.sw-twitter-icon{background-color:#429cd6;border-color:#3c87b2}.sw-google_plus-icon:before{content:'h'}.sw-s.sw-google_plus-icon{background-color:#df4b37;border-color:#c44133}.sw-facebook-icon:before{content:'j'}.sw-s.sw-facebook-icon{background-color:#3a589e;border-color:#2e4675}.sw-pinterest-icon:before{content:'b'}.sw-s.sw-pinterest-icon{background-color:#cd2029;border-color:#aa1b29}.sw-linkedin-icon:before{content:'f'}.sw-s.sw-linkedin-icon{background-color:#0d77b7;border-color:#0c6591}.sw-tumblr-icon:before{content:'r'}.sw-s.sw-tumblr-icon{background-color:#39475d;border-color:#27313f}.sw-stumbleupon-icon:before{content:'q'}.sw-s.sw-stumbleupon-icon{background-color:#ef5025;border-color:#d34427}.sw-reddit-icon:before{content:'a'}.sw-s.sw-reddit-icon{background-color:#f04b23;border-color:#d33f27}.sw-yummly-icon:before{content:'x'}.sw-s.sw-yummly-icon{background-color:#e26426;border-color:#b65027}.sw-whatsapp-icon:before{content:'y'}.sw-s.sw-whatsapp-icon{background-color:#71c169;border-color:#28b04b}.sw-pocket-icon:before{content:'B'}.sw-s.sw-pocket-icon{background-color:#ef4056;border-color:#ce3d55}.sw-buffer-icon:before{content:'z'}.sw-s.sw-buffer-icon{background-color:#323b43;border-color:#59626a}.sw-email-icon:before{content:'k'}.sw-s.sw-email-icon{background-color:#6bcce9;border-color:#6bcce9}.sw-hacker_news-icon:before{content:'D'}.sw-s.sw-hacker_news-icon{background-color:#f16522;border-color:#d85623}.sw-flipboard-icon:before{content:'C'}.sw-s.sw-flipboard-icon{background-color:#e02828;border-color:#bf2626}@media screen and (max-width:1350px){.sw-header-menu li{font-size:12px;margin:0 10px}}@media screen and (max-width:1080px){.sw-header-logo{display:none}}.sw-admin-wrapper[sw-registered="0"] [premium="1"]{display:none!important}.sw-admin-wrapper[sw-registered="0"] .sw-option-container{position:relative}.sw-admin-wrapper[sw-registered="0"] [premium="1"] .sw-premium-blocker{display:none}.sw-admin-wrapper[sw-registered="0"] [premium="1"] .sw-premium-blocker:not(.no-icon):before{font-family:'sw-icon-font';content:'E';font-size:24px;float:right;margin:20px 20px 0 0}.sw-admin-wrapper[sw-registered="0"] i[premium-button="1"]{display:none}.sw-admin-wrapper[sw-registered="1"] .sw-premium-buttons{display:none}.sw-admin-wrapper[swp-addons*="pro"] [premium],.sw-admin-wrapper[swp-addons*="affiliatewp"] [premium],.sw-admin-wrapper[swp-addons*="enhanced_shortcodes"] [premium],.sw-admin-wrapper[swp-addons*="advanced_display"] [premium]{display:none}.sw-admin-wrapper[swp-addons*="pro"][swp-registrations*="pro"] [premium],.sw-admin-wrapper[swp-addons*="affiliatewp"][swp-registrations*="affiliatewp"] [premium],.sw-admin-wrapper[swp-addons*="enhanced_shortcodes"][swp-registrations*="enhanced_shortcodes"] [premium],.sw-admin-wrapper[swp-addons*="advanced_display"][swp-registrations*="advanced_display"] [premium]{display:inherit}.ui-tooltip.sw-admin-hover-notice{background:#ee464f;color:#fff;padding:15px;-webkit-border-radius:2px;border-radius:2px;margin:15px 0;border:0;-webkit-box-shadow:none;box-shadow:none;max-width:none;padding:20px}.sw-admin-hover-notice i:before{font-family:'sw-icon-font';font-size:26px;margin:0 15px 0 0;vertical-align:middle;content:'E';float:left;font-style:normal}.swp_upload_image_field{display:none}.sw-admin-image-preview{max-height:50px;float:right}.toplevel_page_social-warfare .notice-error,.toplevel_page_social-warfare .notice-warning,.toplevel_page_social-warfare .notice-success,.toplevel_page_social-warfare .notice-info,.toplevel_page_social-warfare .is-dismissible,.toplevel_page_social-warfare .update-nag,.toplevel_page_social-warfare #notice-error,.toplevel_page_social-warfare #notice-warning,.toplevel_page_social-warfare #notice-success,.toplevel_page_social-warfare #notice-info,.toplevel_page_social-warfare #is-dismissible,.toplevel_page_social-warfare #update-nag,div.error{display:none}.toplevel_page_social-warfare .sw-admin-wrapper .notice-error,.toplevel_page_social-warfare .sw-admin-wrapper .notice-warning,.toplevel_page_social-warfare .sw-admin-wrapper .notice-success,.toplevel_page_social-warfare .sw-admin-wrapper .notice-info,.toplevel_page_social-warfare .sw-admin-wrapper .is-dismissible,.toplevel_page_social-warfare .sw-admin-wrapper .update-nag,.toplevel_page_social-warfare .sw-admin-wrapper #notice-error,.toplevel_page_social-warfare .sw-admin-wrapper #notice-warning,.toplevel_page_social-warfare .sw-admin-wrapper #notice-success,.toplevel_page_social-warfare .sw-admin-wrapper #notice-info,.toplevel_page_social-warfare .sw-admin-wrapper #is-dismissible,.toplevel_page_social-warfare .sw-admin-wrapper #update-nag,div.error{display:block}.sw-grid-textarea{border:rgb(221,221,221);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);height:120px;width:97%}#color-notice{position:fixed;bottom:15px;margin:0 auto;left:25%;right:25%;background:rgba( 255,225,255,.37 );background-color:#ced3dc;color:#30394f;padding:20px;border-radius:4px;text-align:left;width:650px}#color-notice p{font-size:16px;padding:0;margin:0}#color-notice .color-dismiss{float:right;color:#fff;font-weight:600}#color-notice .color-dismiss:before{content:'x';background:#30394f;border-radius:50%;width:26px;display:block;text-align:center;height:26px;line-height:22px;font-size:22px;cursor:pointer;padding:0;opacity:.4}
1
+ .sw-grid{float:left;margin-bottom:2.127659574468%;padding-top:0}.sw-grid-right{float:right;margin-bottom:2.127659574468%;padding-top:0}.sw-col-60,.sw-col-140,.sw-col-220,.sw-col-300,.sw-col-380,.sw-col-460,.sw-col-540,.sw-col-620,.sw-col-700,.sw-col-780,.sw-col-860{margin-right:2.127659574468%}.sw-col-60{width:6.382978723404%}.sw-col-140{width:14.893617021277%}.sw-col-220{width:23.404255319149%}.sw-col-300{width:31.914893617021%}.sw-col-380{width:40.425531914894%}.sw-col-460{width:48.936170212766%}.sw-col-540{width:57.446808510638%}.sw-col-620{width:65.957446808511%}.sw-col-700{width:74.468085106383%}.sw-col-780{width:82.978723404255%}.sw-col-860{width:91.489361702128%}.sw-col-940{width:100%}.sw-fit{margin-left:0!important;margin-right:0!important}.sw-option-container *:last-child{margin-left:0!important;margin-right:0!important}.sw-clearfix:after,.sw-clearfix:before{content:' ';display:table}.sw-clearfix:after{clear:both}.sw-clearfix{clear:both;width:100%}img{-ms-interpolation-mode:bicubic;border:0;height:auto;max-width:100%;vertical-align:middle}.sw-admin-divider{width:100%;height:1px;border-bottom:1px solid #CED3DC;margin:20px 0 40px 0}.sw-hidden{display:none!important}.swp_support_link{border:1px solid #ccc;font-size:18px;line-height:20px;text-decoration:none;-webkit-border-radius:50%;border-radius:50%;width:20px;display:block;float:right;text-align:center;color:#ccc;margin-right:20px;margin-top:4px;padding:2px;font-weight:bold}.swp_support_link:hover{color:#6BCCE9;border-color:#6BCCE9}.swp_support_link.swp_four_fourths{margin-left:20px;margin-top:13px}#screen-meta-links .screen-meta-toggle{display:none!important}#wpwrap,#wpcontent{background:#fff;padding-left:0}.sw-top-menu{border-bottom:1px solid #CED3DC;float:none;background:#fff;z-index:5;margin:0}.sw-top-menu[sw-registered="0"] .sw-header-logo{height:75px;float:left}.sw-top-menu[sw-registered="1"] .sw-header-logo-pro{height:75px;float:left}.sw-top-menu[sw-registered="1"] .sw-header-logo{display:none}.sw-top-menu[sw-registered="0"] .sw-header-logo-pro{display:none}.sw-header-menu{height:75px;margin:0}.sw-header-menu li{float:left;margin:0 15px;font-size:16px;display:table;height:75px}.sw-header-menu li:focus,.sw-header-menu li a:focus{outline:none;-webkit-box-shadow:none;box-shadow:none}.sw-header-menu li span{padding:0 5px 5px 5px}.sw-header-menu li.sw-active-tab span,.sw-header-menu li:hover span{border-bottom:4px solid #30394f}.sw-header-menu li a{color:#30394f;text-decoration:none;display:table-cell;vertical-align:middle}.sw-top-menu .sw-grid{margin-bottom:0}.sw-admin-wrapper,.sw-header-wrapper{clear:both;margin:20px auto 20px auto;padding:0 40px 20px 40px;position:relative}.sw-header-wrapper{margin:0}.sw-tabs-container .sw-admin-tab{display:none}.sw-tabs-container .sw-admin-tab:nth-child(1){display:block}.sw-admin-tab h2{font-size:26px;line-height:1.2;margin:0}.sw-admin-tab h2.sw-h-label{line-height:56px}p.sw-subtitle{font-size:16px;line-height:1.2;margin:10px 0 30px 0}p.sw-checkbox-label,p.sw-input-label,p.sw-select-label,p.sw-authenticate-label{font-size:16px;font-weight:bold;padding-left:10%}.sw-select-label.sw-no-padding{padding-left:0}p.sw-short{margin:1em 0 0 0}p.sw-subtext-label{margin-top:-10px}.sw-admin-sidebar img{margin:5px 0 10px 0}.system-status-wrapper{display:none}.system-status-container{width:90%;height:250px;overflow:hidden;border:1px solid #CED3DC;padding:5%}h3.sw-buttons-toggle{width:100px;float:left;clear:left;margin:15px 0 30px 0;padding-left:10%}.sw-checkbox-toggle{width:150px;height:46px;background-color:#30394f;float:right;margin:5px 0;cursor:pointer;-webkit-border-radius:4px;border-radius:4px;overflow:hidden;position:relative}.sw-checkbox-on,.sw-checkbox-off{color:white;font-size:15px;text-align:center;line-height:46px;position:absolute;top:0;width:50%;height:100%}.sw-checkbox-toggle[status="on"] .sw-checkbox-on{left:0;background-color:#71C069}.sw-checkbox-toggle[status="on"] .sw-checkbox-off,.sw-checkbox-toggle[status="off"] .sw-checkbox-on{display:none}.sw-admin-wrapper[sw-registered="0"] .sw-option-container[premium="1"] .sw-checkbox-toggle[status="on"] .sw-checkbox-on{display:none}.sw-admin-wrapper[sw-registered="0"] .sw-option-container[premium="1"] .sw-checkbox-toggle[status="on"] .sw-checkbox-off{right:0;background-color:#ee464f;display:block}.sw-checkbox-toggle[status="off"] .sw-checkbox-off{right:0;background-color:#ee464f}input.sw-admin-input{padding:15px;border:1px solid #ced3cd;-webkit-border-radius:4px;border-radius:4px;float:right;-webkit-box-shadow:none;box-shadow:none;margin:2px 0 1px 0;width:100%}.sw-grid select{width:100%;-webkit-box-shadow:none;box-shadow:none;border:1px solid #ced3cd;height:51px;padding:15px;margin:2px 1px 3px 0;-webkit-border-radius:4px;border-radius:4px}a.button.sw-navy-button,a.button.sw-blue-button,a.button.sw-green-button,a.button.sw-red-button{padding:15px 30px;height:auto;line-height:1;-webkit-border-radius:4px;border-radius:4px;-webkit-box-shadow:none;box-shadow:none;float:right;margin:15px 0}a.button.sw-navy-button,a.button.sw-navy-button:focus{background:#30394f;color:#fff;border-color:#2a2d34;-webkit-box-shadow:none;box-shadow:none}a.button.sw-navy-button:hover,a.button.sw-blue-button:hover{background:#2a2d34;border-color:#2a2d34;color:#fff;-webkit-box-shadow:none;box-shadow:none}a.button.sw-blue-button,a.button.sw-blue-button:focus{background:#6bcce9;border-color:#6bcce9;color:#fff;-webkit-box-shadow:none;box-shadow:none}a.button.sw-green-button,a.button.sw-green-button:focus{background:#71C069;color:#fff;border-color:#71C069;-webkit-box-shadow:none;box-shadow:none}a.button.sw-red-button,a.button.sw-red-button:focus,a.button.sw-red-button:hover{background:#ee464f;color:#fff;border-color:#ee464f;-webkit-box-shadow:none;box-shadow:none}.sw-admin-tab a.button{margin:5px 0 15px 0}.sw-save-settings{width:100%;text-align:center}.sw-red-notice,.sw-green-notice{color:#fff;padding:15px;-webkit-border-radius:2px;border-radius:2px;margin:15px 0}.sw-red-notice,.sw-loading-message{background:#ee464f}.sw-green-notice,.sw-loading-complete{background:#71C069}.sw-loading-bg{width:100%;position:fixed;top:0;left:0;height:100%;background:rgba(0,0,0,0.8);z-index:999999999999}.sw-loading-message:before,.sw-green-notice:before,.sw-loading-complete:before{font-family:'Dashicons';font-size:26px;margin:0 15px 0 0;vertical-align:middle}.sw-red-notice:before,.sw-red-notice:before{font-family:'sw-icon-font';font-size:26px;margin:0 15px 0 0;vertical-align:middle;content:'E'}.sw-red-notice a{color:#fff;font-weight:bold;text-decoration:none;border-bottom:2px solid #fff}.sw-red-notice a:hover{color:#30394f;border-bottom:2px solid #30394f}.sw-loading-message:before{content:"\f158"}.sw-green-notice:before,.sw-loading-complete:before{content:"\f147"}.sw-admin-tab .two-thirds-advanced h2.sw-h-label{line-height:1.2;margin-bottom:15px}.sw-italic{font-style:italic}p.sw-subtitle.sw-registration-text{padding:20px 0 0 0;font-size:120%;line-height:175%}.registration-wrapper[registration="1"] .swp_is_not_registered{display:none}.registration-wrapper[registration="0"] .swp_is_registered{display:none}.tweet-count-wrapper[registration="true"] .swp_tweets_not_activated{display:none}.sw-tweet-count-demo{margin:20px 0}.sw-loading-message,.sw-loading-complete{position:fixed;top:50%;left:50%;-webkit-border-radius:3px;border-radius:3px;padding:25px;text-align:center;font-size:20px;color:white;width:240px;margin-top:-46px;margin-left:-120px}.sw-grid textarea{width:100%;height:120px}.sw-active,.sw-inactive{margin:0 0 5px 0;min-width:50px;min-height:40px;border:1px dashed #ced3dc;padding:0;-webkit-border-radius:4px;border-radius:4px;width:auto;height:auto;display:inline-block;max-width:520px}.sw-s{font-family:'sw-icon-font';color:#fff;padding:5px 30px 4px;margin:7px 5px 7px;-webkit-border-radius:2px;border-radius:2px;display:inline-block;font-style:normal;font-size:15px;line-height:15px;cursor:pointer}.sw-twitter-icon:before{content:'s'}.sw-s.sw-twitter-icon{background-color:#429cd6;border-color:#3c87b2}.sw-google_plus-icon:before{content:'h'}.sw-s.sw-google_plus-icon{background-color:#df4b37;border-color:#c44133}.sw-facebook-icon:before{content:'j'}.sw-s.sw-facebook-icon{background-color:#3a589e;border-color:#2e4675}.sw-pinterest-icon:before{content:'b'}.sw-s.sw-pinterest-icon{background-color:#cd2029;border-color:#aa1b29}.sw-linkedin-icon:before{content:'f'}.sw-s.sw-linkedin-icon{background-color:#0d77b7;border-color:#0c6591}.sw-tumblr-icon:before{content:'r'}.sw-s.sw-tumblr-icon{background-color:#39475d;border-color:#27313f}.sw-mix-icon:before{content:'g'}.sw-s.sw-mix-icon{background-color:#f4812c;border-color:#c96a29}.sw-reddit-icon:before{content:'a'}.sw-s.sw-reddit-icon{background-color:#f04b23;border-color:#d33f27}.sw-yummly-icon:before{content:'x'}.sw-s.sw-yummly-icon{background-color:#e26426;border-color:#b65027}.sw-whatsapp-icon:before{content:'y'}.sw-s.sw-whatsapp-icon{background-color:#71c169;border-color:#28b04b}.sw-pocket-icon:before{content:'B'}.sw-s.sw-pocket-icon{background-color:#ef4056;border-color:#ce3d55}.sw-buffer-icon:before{content:'z'}.sw-s.sw-buffer-icon{background-color:#323b43;border-color:#59626a}.sw-email-icon:before{content:'k'}.sw-s.sw-email-icon{background-color:#6bcce9;border-color:#6bcce9}.sw-hacker_news-icon:before{content:'D'}.sw-s.sw-hacker_news-icon{background-color:#f16522;border-color:#d85623}.sw-flipboard-icon:before{content:'C'}.sw-s.sw-flipboard-icon{background-color:#e02828;border-color:#bf2626}@media screen and (max-width:1350px){.sw-header-menu li{font-size:12px;margin:0 10px}}@media screen and (max-width:1080px){.sw-header-logo{display:none}}.sw-admin-wrapper[sw-registered="0"] [premium="1"]{display:none!important}.sw-admin-wrapper[sw-registered="0"] .sw-option-container{position:relative}.sw-admin-wrapper[sw-registered="0"] [premium="1"] .sw-premium-blocker{display:none}.sw-admin-wrapper[sw-registered="0"] [premium="1"] .sw-premium-blocker:not(.no-icon):before{font-family:'sw-icon-font';content:'E';font-size:24px;float:right;margin:20px 20px 0 0}.sw-admin-wrapper[sw-registered="0"] i[premium-button="1"]{display:none}.sw-admin-wrapper[sw-registered="1"] .sw-premium-buttons{display:none}.sw-admin-wrapper[swp-addons*="pro"] [premium],.sw-admin-wrapper[swp-addons*="affiliatewp"] [premium],.sw-admin-wrapper[swp-addons*="enhanced_shortcodes"] [premium],.sw-admin-wrapper[swp-addons*="advanced_display"] [premium]{display:none}.sw-admin-wrapper[swp-addons*="pro"][swp-registrations*="pro"] [premium],.sw-admin-wrapper[swp-addons*="affiliatewp"][swp-registrations*="affiliatewp"] [premium],.sw-admin-wrapper[swp-addons*="enhanced_shortcodes"][swp-registrations*="enhanced_shortcodes"] [premium],.sw-admin-wrapper[swp-addons*="advanced_display"][swp-registrations*="advanced_display"] [premium]{display:inherit}.ui-tooltip.sw-admin-hover-notice{background:#ee464f;color:#fff;padding:15px;-webkit-border-radius:2px;border-radius:2px;margin:15px 0;border:0;-webkit-box-shadow:none;box-shadow:none;max-width:none;padding:20px}.sw-admin-hover-notice i:before{font-family:'sw-icon-font';font-size:26px;margin:0 15px 0 0;vertical-align:middle;content:'E';float:left;font-style:normal}.swp_upload_image_field{display:none}.sw-admin-image-preview{max-height:50px;float:right}.toplevel_page_social-warfare .notice-error,.toplevel_page_social-warfare .notice-warning,.toplevel_page_social-warfare .notice-success,.toplevel_page_social-warfare .notice-info,.toplevel_page_social-warfare .is-dismissible,.toplevel_page_social-warfare .update-nag,.toplevel_page_social-warfare #notice-error,.toplevel_page_social-warfare #notice-warning,.toplevel_page_social-warfare #notice-success,.toplevel_page_social-warfare #notice-info,.toplevel_page_social-warfare #is-dismissible,.toplevel_page_social-warfare #update-nag,div.error{display:none}.toplevel_page_social-warfare .sw-admin-wrapper .notice-error,.toplevel_page_social-warfare .sw-admin-wrapper .notice-warning,.toplevel_page_social-warfare .sw-admin-wrapper .notice-success,.toplevel_page_social-warfare .sw-admin-wrapper .notice-info,.toplevel_page_social-warfare .sw-admin-wrapper .is-dismissible,.toplevel_page_social-warfare .sw-admin-wrapper .update-nag,.toplevel_page_social-warfare .sw-admin-wrapper #notice-error,.toplevel_page_social-warfare .sw-admin-wrapper #notice-warning,.toplevel_page_social-warfare .sw-admin-wrapper #notice-success,.toplevel_page_social-warfare .sw-admin-wrapper #notice-info,.toplevel_page_social-warfare .sw-admin-wrapper #is-dismissible,.toplevel_page_social-warfare .sw-admin-wrapper #update-nag,div.error{display:block}.sw-grid-textarea{border:rgb(221,221,221);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);height:120px;width:97%}#color-notice{position:fixed;bottom:15px;margin:0 auto;left:25%;right:25%;background:rgba( 255,225,255,.37 );background-color:#ced3dc;color:#30394f;padding:20px;border-radius:4px;text-align:left;width:650px}#color-notice p{font-size:16px;padding:0;margin:0}#color-notice .color-dismiss{float:right;color:#fff;font-weight:600}#color-notice .color-dismiss:before{content:'x';background:#30394f;border-radius:50%;width:26px;display:block;text-align:center;height:26px;line-height:22px;font-size:22px;cursor:pointer;padding:0;opacity:.4}
{css → assets/css}/admin-options.min.css RENAMED
File without changes
{css → assets/css}/admin.css RENAMED
@@ -61,7 +61,7 @@
61
  }
62
 
63
  .swpmb-field.swpmb-text-wrapper.swp_share_recoveryWrapper input {
64
- width: 100%;
65
  }
66
 
67
 
@@ -280,3 +280,59 @@ a.swp-notice-cta {
280
  line-height: 30px;
281
  margin-right: 50px;
282
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  }
62
 
63
  .swpmb-field.swpmb-text-wrapper.swp_share_recoveryWrapper input {
64
+ width: 100%;
65
  }
66
 
67
 
280
  line-height: 30px;
281
  margin-right: 50px;
282
  }
283
+
284
+ #swp-admin-sidebar .swp-component.dark-text {
285
+ color: #333;
286
+ }
287
+
288
+ #swp-admin-sidebar .swp-component.light-text {
289
+ color: #eee;
290
+ }
291
+
292
+ #swp-admin-sidebar .swp-component {
293
+ font-size: 13px;
294
+ padding: 20px;
295
+ margin: 20px;
296
+ border-radius: 8px;
297
+ }
298
+
299
+ #swp-admin-sidebar .swp-component.text-center {
300
+ text-align: center;
301
+ }
302
+
303
+ #swp-admin-sidebar .swp-component-cta {
304
+ margin: 0 auto;
305
+ display: block;
306
+ padding: 10px 15px;
307
+ border: 0;
308
+ border-radius: 4px;
309
+ text-align: center;
310
+ text-decoration: none;
311
+ color: white;
312
+ text-transform: uppercase;
313
+ letter-spacing: 2px;
314
+ font-weight: bold;
315
+ cursor: pointer;
316
+ width: 90%;
317
+ }
318
+
319
+ #swp-admin-sidebar button.swp-component-cta {
320
+ width: 100%;
321
+ }
322
+
323
+ #swp-admin-sidebar .swp-component-icon {
324
+ text-align: center;
325
+ }
326
+
327
+ #swp-admin-sidebar .swp-component-icon .dashicons {
328
+ font-size: 40px;
329
+ width: 40px;
330
+ height: 40px;
331
+ text-align: center;
332
+ }
333
+
334
+ #swp-admin-sidebar .swp-component .swp-component-title {
335
+ font-size: 26px;
336
+ text-align: center;
337
+ font-weight: bold;
338
+ }
{css → assets/css}/admin.min.css RENAMED
@@ -1 +1 @@
1
- .notAvailable{opacity:0.3}.swp_CountDown{background-color:#CCC;display:inline-block;float:right;padding:5px 15px;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;color:#FFF;font-weight:bold;margin-top:-27px}.swp_CountDown.swp_blue{background-color:#30394F}.swp_CountDown.swp_red{background-color:#EE464F}#social_warfare textarea.large-text{width:100%}#social_warfare ul.swpmb-media-list.ui-sortable{display:block;width:100%;-webkit-background-size:cover;background-size:cover;background-position-x:center;background-repeat:no-repeat;background-color:#ccc;-webkit-border-radius:4px;border-radius:4px;padding:0}#social_warfare .swp_og_imageWrapper ul.swpmb-media-list{background-image:url('../images/img-placeholder-og.jpg')}#social_warfare .swp_pinterest_imageWrapper ul.swpmb-media-list{background-image:url('../images/img-placeholder-pin.jpg')}.swpmb-field.swpmb-textarea-wrapper.swp_og_title,.swpmb-field.swpmb-textarea-wrapper.swp_og_description,.swpmb-field.swpmb-textarea-wrapper.swp_pinterest_descriptionWrapper,.swpmb-field.swpmb-textarea-wrapper.swp_customTweetWrapper{width:63%;float:left}.swpmb-field.swpmb-text-wrapper.swp_share_recoveryWrapper{width:63%;float:left}.swpmb-field.swpmb-text-wrapper.swp_share_recoveryWrapper input{width:100%}.swpmb-field.swpmb-select-wrapper.swp_pin_browser_extensionWrapper,.swpmb-field.swpmb-select-wrapper.swp_pin_browser_extension_locationWrapper,.swpmb-field.swpmb-select-wrapper.swp_post_locationWrapper,.swpmb-field.swpmb-select-wrapper.swp_float_locationWrapper{width:32%;float:left;min-width:320px}.swpmb-field.swpmb-select-wrapper.swp_pin_browser_extensionWrapper select,.swpmb-field.swpmb-select-wrapper.swp_pin_browser_extension_locationWrapper select,.swpmb-field.swpmb-select-wrapper.swp_post_locationWrapper select,.swpmb-field.swpmb-select-wrapper.swp_float_locationWrapper select{width:90%}.swpmb-field.swpmb-image_advanced-wrapper.swp_og_imageWrapper,.swpmb-field.swpmb-image_advanced-wrapper.swp_pinterest_imageWrapper{width:30%;float:left;margin-right:3%}#social_warfare .swpmb-label,#social_warfare .swpmb-input{width:100%}#social_warfare .swpmb-field{margin-top:10px}#social_warfare .swpmb-image-item,#social_warfare .swpmb-media-preview,#social_warfare .swpmb-media-content .centered,#social_warfare .swpmb-media-content img{width:100%;height:auto;max-height:none;-webkit-transform:none;-ms-transform:none;transform:none}.wp-core-ui #social_warfare a.swpmb-add-media.button{display:block;background:#30394f;color:#fff;font-size:12px;line-height:1;text-align:center;vertical-align:middle;padding:15px 25px;margin:0;-webkit-box-shadow:none;box-shadow:none;border:none;height:auto}.wp-core-ui #social_warfare a.swpmb-add-media.button:hover{background:#EE464F}#social_warfare .swpmb-media-content img{-webkit-transform:translate(0%,0%);-ms-transform:translate(0%,0%);transform:translate(0%,0%)}#social_warfare .swpmb-media-content{overflow:visible}#social_warfare .swpmb-media-preview:before{padding-top:0}#social_warfare .swpmb-media-content{position:inherit}#social_warfare .swpmb-divider-wrapper hr{border:none!important}#social_warfare .swpmb-label label{font-weight:bold;color:#30394f;font-size:18px}#social_warfare .swpmb-divider-wrapper{max-height:1px;clear:both}#social_warfare .swpmb-label{margin-bottom:10px}#social_warfare h2.hndle span:before{content:'p';margin-right:10px;font-family:"sw-icon-font";vertical-align:middle}#social_warfare .dashicons,#social_warfare .sw{vertical-align:middle;margin-right:10px;font-size:18px}#social_warfare .sw-premium-blocker{position:absolute;width:100%;height:100%;top:0;left:0}#social_warfare .sw-premium-blocker:not(.no-icon):before{font-family:'sw-icon-font';content:'E';font-size:24px;float:right;margin:10px 40px 0 0}#social_warfare #swp_recovery_url{}.ui-tooltip.sw-admin-hover-notice{background:#ee464f;color:#fff;padding:15px;-webkit-border-radius:2px;border-radius:2px;margin:15px 0;border:0;-webkit-box-shadow:none;box-shadow:none;max-width:none;padding:20px}.sw-admin-hover-notice i:before{font-family:'sw-icon-font';font-size:26px;margin:0 15px 0 0;vertical-align:middle;content:'E';float:left;font-style:normal}[class$=title_wrapper] ~ [class$=title_wrapper]{border-top:1px solid #CED3DC;padding-top:40px}.swp-notice-wrapper{max-width:73%;margin-top:-15px;margin-bottom:15px}.swp-notice{padding:10px 15px;padding:20px}.swp-actions{display:flex;align-items:center}.swp-notice a{cursor:hover;text-decoration:underline;margin:0 10px}.swp-dismiss-notice.notice.notice-info{font-size:15px;line-height:25px}.swp-dismiss-notice.notice.notice-info{border-left-color:#D34250;padding:20px;margin:15px 0 15px}.swp-dismiss-notice.notice.notice-info p{font-size:15px;line-height:25px;padding:0;margin:0 0 20px}a.swp-notice-cta{cursor:pointer;text-decoration:underline;font-size:15px;line-height:30px;margin-right:50px}
1
+ .notAvailable{opacity:0.3}.swp_CountDown{background-color:#CCC;display:inline-block;float:right;padding:5px 15px;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;color:#FFF;font-weight:bold;margin-top:-27px}.swp_CountDown.swp_blue{background-color:#30394F}.swp_CountDown.swp_red{background-color:#EE464F}#social_warfare textarea.large-text{width:100%}#social_warfare ul.swpmb-media-list.ui-sortable{display:block;width:100%;-webkit-background-size:cover;background-size:cover;background-position-x:center;background-repeat:no-repeat;background-color:#ccc;-webkit-border-radius:4px;border-radius:4px;padding:0}#social_warfare .swp_og_imageWrapper ul.swpmb-media-list{background-image:url('../images/img-placeholder-og.jpg')}#social_warfare .swp_pinterest_imageWrapper ul.swpmb-media-list{background-image:url('../images/img-placeholder-pin.jpg')}.swpmb-field.swpmb-textarea-wrapper.swp_og_title,.swpmb-field.swpmb-textarea-wrapper.swp_og_description,.swpmb-field.swpmb-textarea-wrapper.swp_pinterest_descriptionWrapper,.swpmb-field.swpmb-textarea-wrapper.swp_customTweetWrapper{width:63%;float:left}.swpmb-field.swpmb-text-wrapper.swp_share_recoveryWrapper{width:63%;float:left}.swpmb-field.swpmb-text-wrapper.swp_share_recoveryWrapper input{width:100%}.swpmb-field.swpmb-select-wrapper.swp_pin_browser_extensionWrapper,.swpmb-field.swpmb-select-wrapper.swp_pin_browser_extension_locationWrapper,.swpmb-field.swpmb-select-wrapper.swp_post_locationWrapper,.swpmb-field.swpmb-select-wrapper.swp_float_locationWrapper{width:32%;float:left;min-width:320px}.swpmb-field.swpmb-select-wrapper.swp_pin_browser_extensionWrapper select,.swpmb-field.swpmb-select-wrapper.swp_pin_browser_extension_locationWrapper select,.swpmb-field.swpmb-select-wrapper.swp_post_locationWrapper select,.swpmb-field.swpmb-select-wrapper.swp_float_locationWrapper select{width:90%}.swpmb-field.swpmb-image_advanced-wrapper.swp_og_imageWrapper,.swpmb-field.swpmb-image_advanced-wrapper.swp_pinterest_imageWrapper{width:30%;float:left;margin-right:3%}#social_warfare .swpmb-label,#social_warfare .swpmb-input{width:100%}#social_warfare .swpmb-field{margin-top:10px}#social_warfare .swpmb-image-item,#social_warfare .swpmb-media-preview,#social_warfare .swpmb-media-content .centered,#social_warfare .swpmb-media-content img{width:100%;height:auto;max-height:none;-webkit-transform:none;-ms-transform:none;transform:none}.wp-core-ui #social_warfare a.swpmb-add-media.button{display:block;background:#30394f;color:#fff;font-size:12px;line-height:1;text-align:center;vertical-align:middle;padding:15px 25px;margin:0;-webkit-box-shadow:none;box-shadow:none;border:none;height:auto}.wp-core-ui #social_warfare a.swpmb-add-media.button:hover{background:#EE464F}#social_warfare .swpmb-media-content img{-webkit-transform:translate(0%,0%);-ms-transform:translate(0%,0%);transform:translate(0%,0%)}#social_warfare .swpmb-media-content{overflow:visible}#social_warfare .swpmb-media-preview:before{padding-top:0}#social_warfare .swpmb-media-content{position:inherit}#social_warfare .swpmb-divider-wrapper hr{border:none!important}#social_warfare .swpmb-label label{font-weight:bold;color:#30394f;font-size:18px}#social_warfare .swpmb-divider-wrapper{max-height:1px;clear:both}#social_warfare .swpmb-label{margin-bottom:10px}#social_warfare h2.hndle span:before{content:'p';margin-right:10px;font-family:"sw-icon-font";vertical-align:middle}#social_warfare .dashicons,#social_warfare .sw{vertical-align:middle;margin-right:10px;font-size:18px}#social_warfare .sw-premium-blocker{position:absolute;width:100%;height:100%;top:0;left:0}#social_warfare .sw-premium-blocker:not(.no-icon):before{font-family:'sw-icon-font';content:'E';font-size:24px;float:right;margin:10px 40px 0 0}#social_warfare #swp_recovery_url{}.ui-tooltip.sw-admin-hover-notice{background:#ee464f;color:#fff;padding:15px;-webkit-border-radius:2px;border-radius:2px;margin:15px 0;border:0;-webkit-box-shadow:none;box-shadow:none;max-width:none;padding:20px}.sw-admin-hover-notice i:before{font-family:'sw-icon-font';font-size:26px;margin:0 15px 0 0;vertical-align:middle;content:'E';float:left;font-style:normal}[class$=title_wrapper] ~ [class$=title_wrapper]{border-top:1px solid #CED3DC;padding-top:40px}.swp-notice-wrapper{max-width:73%;margin-top:-15px;margin-bottom:15px}.swp-notice{padding:10px 15px;padding:20px}.swp-actions{display:flex;align-items:center}.swp-notice a{cursor:hover;text-decoration:underline;margin:0 10px}.swp-dismiss-notice.notice.notice-info{font-size:15px;line-height:25px}.swp-dismiss-notice.notice.notice-info{border-left-color:#D34250;padding:20px;margin:15px 0 15px}.swp-dismiss-notice.notice.notice-info p{font-size:15px;line-height:25px;padding:0;margin:0 0 20px}a.swp-notice-cta{cursor:pointer;text-decoration:underline;font-size:15px;line-height:30px;margin-right:50px}#swp-admin-sidebar .swp-component.dark-text{color:#333}#swp-admin-sidebar .swp-component.light-text{color:#eee}#swp-admin-sidebar .swp-component{font-size:13px;padding:20px;margin:20px;border-radius:8px}#swp-admin-sidebar .swp-component.text-center{text-align:center}#swp-admin-sidebar .swp-component-cta{margin:0 auto;display:block;padding:10px 15px;border:0;border-radius:4px;text-align:center;text-decoration:none;color:white;text-transform:uppercase;letter-spacing:2px;font-weight:bold;cursor:pointer;width:90%}#swp-admin-sidebar button.swp-component-cta{width:100%}#swp-admin-sidebar .swp-component-icon{text-align:center}#swp-admin-sidebar .swp-component-icon .dashicons{font-size:40px;width:40px;height:40px;text-align:center}#swp-admin-sidebar .swp-component .swp-component-title{font-size:26px;text-align:center;font-weight:bold}
{css → assets/css}/style.css RENAMED
@@ -29,6 +29,14 @@
29
  justify-content: space-between;
30
  }
31
 
 
 
 
 
 
 
 
 
32
  .swp_social_panel:not(.nc_floater):not(.swp_social_panelSide) {
33
  width: 100%!important;
34
  }
@@ -364,10 +372,10 @@ body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_tumblr:not
364
  border: 1px solid #39475d;
365
  }
366
 
367
- .swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_stumbleupon,
368
- html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_stumbleupon:hover,
369
- body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_stumbleupon:not(:hover) {
370
- border: 1px solid #ef5025;
371
  }
372
 
373
  .swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_yummly,
@@ -460,11 +468,11 @@ body .swp_social_panel.swp_other_full_color:hover .swp_tumblr {
460
  border: 1px solid #27313f;
461
  }
462
 
463
- .swp_social_panel.swp_default_full_color .swp_stumbleupon,
464
- html body .swp_social_panel.swp_individual_full_color .swp_stumbleupon:hover,
465
- body .swp_social_panel.swp_other_full_color:hover .swp_stumbleupon {
466
- background: #ef5025;
467
- border: 1px solid #d34427;
468
  }
469
 
470
  .swp_social_panel.swp_default_full_color .swp_yummly,
@@ -559,10 +567,10 @@ body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_tumblr {
559
  border-bottom: 3px solid #27313f;
560
  }
561
 
562
- .swp_social_panel.swp_three_dee.swp_default_full_color .swp_stumbleupon,
563
- html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_stumbleupon:hover,
564
- body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_stumbleupon {
565
- border-bottom: 3px solid #d34427;
566
  }
567
 
568
  .swp_social_panel.swp_three_dee.swp_default_full_color .swp_yummly,
@@ -721,10 +729,10 @@ body .swp_social_panel.swp_other_color_outlines:hover .swp_tumblr a {
721
  color: #39475d;
722
  }
723
 
724
- .swp_social_panel.swp_default_color_outlines .swp_stumbleupon a,
725
- html body .swp_social_panel.swp_individual_color_outlines .swp_stumbleupon a:hover,
726
- body .swp_social_panel.swp_other_color_outlines:hover .swp_stumbleupon a {
727
- color: #ef5025;
728
  }
729
 
730
  .swp_social_panel.swp_default_color_outlines .swp_yummly a,
@@ -817,11 +825,11 @@ body .swp_social_panel.swp_other_color_outlines:hover .swp_tumblr {
817
  border: 1px solid #39475d;
818
  }
819
 
820
- .swp_social_panel.swp_default_color_outlines .swp_stumbleupon,
821
- html body .swp_social_panel.swp_individual_color_outlines .swp_stumbleupon:hover,
822
- body .swp_social_panel.swp_other_color_outlines:hover .swp_stumbleupon {
823
  background: transparent;
824
- border: 1px solid #ef5025;
825
  }
826
 
827
  .swp_social_panel.swp_default_color_outlines .swp_yummly,
@@ -1269,8 +1277,8 @@ i.swp_tumblr_icon:before {
1269
  content: "r";
1270
  }
1271
 
1272
- i.swp_stumbleupon_icon:before {
1273
- content: "q";
1274
  }
1275
 
1276
  i.swp_reddit_icon:before {
@@ -1846,3 +1854,7 @@ div.swp_social_panel .nc_tweetContainer.swp_emphasize {
1846
  div[class*=custom_color][class^=_wrapper] {
1847
  display: none;
1848
  }
 
 
 
 
29
  justify-content: space-between;
30
  }
31
 
32
+ @media print {
33
+ .swp_social_panel {
34
+ display: none;
35
+ opacity: 0;
36
+ visibility: collapse;
37
+ }
38
+ }
39
+
40
  .swp_social_panel:not(.nc_floater):not(.swp_social_panelSide) {
41
  width: 100%!important;
42
  }
372
  border: 1px solid #39475d;
373
  }
374
 
375
+ .swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_mix,
376
+ html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_mix:hover,
377
+ body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_mix:not(:hover) {
378
+ border: 1px solid #f4812c;
379
  }
380
 
381
  .swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_yummly,
468
  border: 1px solid #27313f;
469
  }
470
 
471
+ .swp_social_panel.swp_default_full_color .swp_mix,
472
+ html body .swp_social_panel.swp_individual_full_color .swp_mix:hover,
473
+ body .swp_social_panel.swp_other_full_color:hover .swp_mix {
474
+ background: #f4812c;
475
+ border: 1px solid #c96a29;
476
  }
477
 
478
  .swp_social_panel.swp_default_full_color .swp_yummly,
567
  border-bottom: 3px solid #27313f;
568
  }
569
 
570
+ .swp_social_panel.swp_three_dee.swp_default_full_color .swp_mix,
571
+ html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_mix:hover,
572
+ body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_mix {
573
+ border-bottom: 3px solid #c96a29;
574
  }
575
 
576
  .swp_social_panel.swp_three_dee.swp_default_full_color .swp_yummly,
729
  color: #39475d;
730
  }
731
 
732
+ .swp_social_panel.swp_default_color_outlines .swp_mix a,
733
+ html body .swp_social_panel.swp_individual_color_outlines .swp_mix a:hover,
734
+ body .swp_social_panel.swp_other_color_outlines:hover .swp_mix a {
735
+ color: #f4812c;
736
  }
737
 
738
  .swp_social_panel.swp_default_color_outlines .swp_yummly a,
825
  border: 1px solid #39475d;
826
  }
827
 
828
+ .swp_social_panel.swp_default_color_outlines .swp_mix,
829
+ html body .swp_social_panel.swp_individual_color_outlines .swp_mix:hover,
830
+ body .swp_social_panel.swp_other_color_outlines:hover .swp_mix {
831
  background: transparent;
832
+ border: 1px solid #f4812c;
833
  }
834
 
835
  .swp_social_panel.swp_default_color_outlines .swp_yummly,
1277
  content: "r";
1278
  }
1279
 
1280
+ i.swp_mix_icon:before {
1281
+ content: "g";
1282
  }
1283
 
1284
  i.swp_reddit_icon:before {
1854
  div[class*=custom_color][class^=_wrapper] {
1855
  display: none;
1856
  }
1857
+
1858
+ .swp-pinterest-image-top {
1859
+ margin-bottom: 20px;
1860
+ }
assets/css/style.min.css ADDED
@@ -0,0 +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}@media print{.swp_social_panel{display:none;opacity:0;visibility:collapse}}.swp_social_panel:not(.nc_floater):not(.swp_social_panelSide){width:100%!important}.nc_wrapper .swp_social_panel{margin-bottom:10px!important;margin-top:10px!important}div.swp_social_panel .nc_tweetContainer:not(.total_shares):not(.total_sharesalt){-webkit-border-radius:2px;border-radius:2px;cursor:pointer;float:left;font-family:Lato;height:32px;margin:0 5px 3px;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:0 0!important;border:none!important;-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 .total_sharesalt{background:0 0!important;border:none!important}.swp_social_panel div.total_shares.total_sharesalt,.swp_social_panel:hover div.total_shares.total_sharesalt:not(:nth-child(1)){background:0 0!important;border:none;color:#474b4d;margin-left:0!important;margin-bottom:10px!important}div.swp_social_panel:hover div.total_shares.total_sharesalt:not(:nth-child(1)){background: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 .nc_tweetContainer.total_shares.total_sharesalt:before{content:"o";display:inline-block;font-family:sw-icon-font;margin-top:7px;vertical-align:top}.swp_social_panel:not(.swp_social_panelSide) .total_shares.total_sharesalt .swp_count{display:inline-block;line-height:0;margin-left:8px;margin-top:12px;min-width:45px;position:relative;vertical-align:middle}span.swp_label{display:block;font-size:9px!important;margin-top:13px;position:absolute;text-align:center!important;text-transform:uppercase}.swp_social_panelSide span.swp_label{margin-top:0}.swp_social_panel.swp_leaf .nc_tweetContainer{-webkit-border-radius:15px 0!important;border-radius:15px 0!important;border-width:1px}.swp_social_panel.swp_pill .nc_tweetContainer{-webkit-border-radius:50px!important;border-radius:50px!important;border-width:1px}.swp_social_panel.swp_shift .nc_tweetContainer:not(.total_shares){border-width:1px;-moz-transform:skew(-25deg);-o-transform:skew(-25deg);-webkit-transform:skew(-25deg)}.swp_social_panel.swp_shift .nc_tweetContainer a{-moz-transform:skew(25deg);-o-transform:skew(25deg);-webkit-transform:skew(25deg)}.swp_connected .nc_tweetContainer,.swp_connected .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_mix,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_mix:not(:hover),html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_mix:hover{border:1px solid #f4812c}.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_mix,body .swp_social_panel.swp_other_full_color:hover .swp_mix,html body .swp_social_panel.swp_individual_full_color .swp_mix:hover{background:#f4812c;border:1px solid #c96a29}.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_mix,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_mix,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_mix:hover{border-bottom:3px solid #c96a29}.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_mix a,body .swp_social_panel.swp_other_color_outlines:hover .swp_mix a,html body .swp_social_panel.swp_individual_color_outlines .swp_mix a:hover{color:#f4812c}.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_mix,body .swp_social_panel.swp_other_color_outlines:hover .swp_mix,html body .swp_social_panel.swp_individual_color_outlines .swp_mix:hover{background:0 0;border:1px solid #f4812c}.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;z-index:9998;margin:10px 5px!important;padding:0;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column}.swp_social_panelSide.fade,.swp_social_panelSide.slide{position:fixed;-webkit-transition:all .2s linear;transition:all .2s linear}.swp_social_panelSide.fade.swp_float_left{left:5px}.swp_social_panelSide.fade.swp_float_right{right:5px}.swp_social_panelSide[class*=swp_side]{height:auto;display:flex;position:fixed;padding:30px 0}.swp_social_panelSide.fade{display:none}.swp_social_panelSide.swp_float_right{align-content:flex-end}.swp_social_panelSide.swp_side_top{top:15px}.swp_social_panelSide.swp_side_bottom{bottom:15px}.swp_social_panelSide .nc_tweetContainer{-webkit-border-radius:3px;border-radius:3px;clear:both;display:block;font-family:Lato,sans-serif;height:32px;margin:3px 0!important;overflow:hidden;padding:0;-webkit-transition:all .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!important;position:relative}.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares),.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) a{border-radius:50%!important}.swp_social_panelSide.swp_boxed .nc_tweetContainer i.sw,.swp_social_panelSide.swp_circles .nc_tweetContainer i.sw{font-size:27px;height:40px;margin:0;padding-top:10px;text-align:center;width:100%}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_share,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_share{height:35px;opacity:0;position:absolute;bottom:0;left:0;text-align:center;width:67.5px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_count,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_count{height:35px;margin:0;padding:0;position:absolute;bottom:0;left:0;text-align:center;-webkit-transition:padding .1s linear;transition:padding .1s linear;width:100%}.swp_social_panelSide.swp_boxed .nc_tweetContainer span.swp_hide .iconFiller,.swp_social_panelSide.swp_boxed .nc_tweetContainer span.swp_hide .spaceManWilly,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_count.swp_hide,.swp_social_panelSide.swp_circles .nc_tweetContainer span.swp_hide .iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer span.swp_hide .spaceManWilly,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_count.swp_hide{height:67.5px;opacity:1}.swp_social_panelSide.swp_boxed .nc_tweetContainer span.iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer span.iconFiller{height:40px;width:67.5px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover span.swp_count:not(.swp_hide),.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover span.swp_count:not(.swp_hide){opacity:0}.swp_social_panelSide.swp_boxed .total_shares,.swp_social_panelSide.swp_circles .total_shares{padding:0;width:67.5px!important}.swp_social_panelSide .nc_tweetContainer:not(.total_shares){line-height:34px}.swp_social_panelSide:not(.swp_boxed):not(.swp_circles) .nc_tweetContainer:not(.total_shares) .iconFiller{margin-left:2px;width:30px}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_count{padding:0 8px;width:48px}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_count.swp_hide{padding:0;width:100%}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_count.swp_hide .iconFiller{display:block;float:none;margin:0 auto}.swp_social_panelSide:not(.swp_boxed):not(.swp_circles) .nc_tweetContainer:not(.total_shares):hover{width:150px}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide .nc_tweetContainer[data-network]:not(.total_shares):hover .iconFiller{width:90px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover .iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover .iconFiller{width:100%}.swp_social_panelSide .nc_tweetContainer.total_shares{background:rgba(0,0,0,0);border:0!important;font-weight:800;height:55px;margin:0;padding:0;text-align:center;width:90px;order:-100}.swp_social_panelSide .nc_tweetContainer.total_shares .swp_count{color:#444;display:block;font-family:Lato,sans-serif;height:28px;text-align:center;width:100%}.swp_social_panelSide .nc_tweetContainer.total_shares .swp_label{color:#444;display:block;font-family:Lato,sans-serif;font-size:50%;position:relative;text-align:center;width:100%}.nc_wrapper{background:#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_mix_icon:before{content:"g"}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;z-index:-10}.fl-module-content .uabb-blog-posts .uabb-post-thumbnail .sw-pinit.lazyloaded{display:block!important}.swp-content-locator{display:none!important;margin:0!important}.float-position-top-left{transform-origin:top left}.float-position-center-left{transform-origin:center left}.float-position-bottom-left{transform-origin:bottom left}.float-position-top-right{transform-origin:top right}.float-position-center-right{transform-origin:center right}.float-position-bottom-right{transform-origin:bottom right}div[class*=custom_color][class^=_wrapper]{display:none}.swp-pinterest-image-top{margin-bottom:20px}
assets/fonts/sw-icon-font.eot ADDED
Binary file
{fonts → assets/fonts}/sw-icon-font.svg RENAMED
@@ -10,9 +10,7 @@
10
  <glyph glyph-name="reddit" unicode="&#97;" d="M448 338c-19 0-38-10-51-26l-3-3c-31 21-72 33-117 37l21 64 56-13c3-27 25-48 54-48 30 0 54 24 54 54 0 31-24 55-54 55-21 0-38-12-48-29l-69 16c-8 1-16-3-19-11l-27-87c-50-1-95-16-128-37l-3 5c-13 15-31 24-50 24-35 0-64-29-64-64 0-27 18-51 43-61l11-4 0 3c0 0 0-2 0-2 0-75 90-136 202-136 110 0 200 61 202 136l11 3c27 8 45 34 45 61-2 34-31 63-66 63z m-40 86c11 0 19-10 19-19 0-11-9-21-19-21-11 0-19 10-19 21 0 9 8 19 19 19z m-355-178c-11 5-18 16-18 28 0 17 13 30 29 30 8 0 16-3 22-10l4-4c-15-13-24-29-31-45z m201-139c-92 0-168 47-168 104 0 58 76 104 168 104 93 0 168-46 168-104 0-57-75-104-168-104z m204 139l-8-3c-7 16-16 32-29 45l5 6c6 7 14 10 22 10 16 0 30-13 30-30-1-12-9-23-20-28z m-237-4c0 16-13 30-31 30-17 0-30-14-30-30 0-16 14-31 30-31 16 0 31 15 31 31z m101 30c-16 0-31-14-31-30 0-16 15-31 31-31 16 0 30 13 30 31-2 17-14 30-30 30z m-2-93c-5 0-8-1-11-5-10-9-27-14-53-14-26 0-42 5-53 14-6 7-17 7-22 0-3-3-5-6-5-11 0-5 2-8 5-11 16-16 40-24 75-24 34 0 59 8 75 24 3 3 5 6 5 11 0 5-2 8-5 11-3 4-6 5-11 5z"/>
11
  <glyph glyph-name="pinterest" unicode="&#98;" d="M256 450c-107 0-194-87-194-194 0-78 48-147 116-178 0 13 0 31 3 45 3 16 25 106 25 106 0 0-6 13-6 30 0 29 16 50 37 50 17 0 25-13 25-29 0-18-11-45-17-69-5-21 9-37 30-37 37 0 61 47 61 103 0 41-29 73-80 73-59 0-94-43-94-92 0-18 4-29 12-39 4-5 5-6 4-11-2-3-4-13-4-16-1-5-4-6-9-5-27 11-40 40-40 74 0 54 46 120 137 120 74 0 122-53 122-111 0-75-42-132-104-132-21 0-40 11-46 24 0 0-12-45-15-53-5-15-13-31-19-42 18-5 35-8 54-8 108 0 194 87 194 194 2 110-85 197-192 197z"/>
12
  <glyph glyph-name="periscope" unicode="&#99;" d="M258 464c-93 0-167-77-167-171 0-98 130-245 167-245 32 0 161 147 161 245 2 94-72 171-161 171z m1-261c-57 0-102 45-102 96 0 24 8 47 21 63 0-21 17-39 40-39 22 0 38 18 38 39 0 16-10 28-24 35 8 1 18 3 26 3 52 0 97-45 97-102 0-50-45-95-96-95z"/>
13
- <glyph glyph-name="medium" unicode="&#101;" d="M493 389l-19 0c-7 0-16-10-16-16l0-232c0-7 9-15 16-15l19 0 0-54-170 0 0 54 35 0 0 242-1 0-83-299-64 0-82 299-2 0 0-245 36 0 0-54-143 0 0 54 18 0c8 0 17 8 17 15l0 233c0 7-9 16-17 16l-18 0 0 56 178 0 57-217 2 0 59 217 178 0z"/>
14
  <glyph glyph-name="linkedin" unicode="&#102;" d="M115 443c-25 0-46-21-46-46 0-26 21-47 46-47 26 2 45 23 45 47 0 25-19 46-45 46z m-40-374l79 0 0 249-79 0z m282 257c0 0-63 5-77-41l0 33-78 0 0-249 78 0 0 133c0 4 2 54 48 54 43 0 40-58 40-58l0-128 77 0 0 144c-2-1 8 112-88 112z"/>
15
- <glyph glyph-name="instagram" unicode="&#103;" d="M400 285l-32 0c2-10 3-19 3-29 0-64-51-115-115-115-64 0-115 51-115 115 0 10 1 19 3 29l-32 0 0-159c0-8 6-14 14-14l260 0c8 0 14 6 14 14z m0 101c0 8-6 14-14 14l-44 0c-8 0-14-6-14-14l0-44c0-8 6-14 14-14l44 0c8 0 14 6 14 14z m-144-58c-40 0-72-32-72-72 0-40 32-72 72-72 40 0 72 32 72 72 0 40-32 72-72 72m144-259l-288 0c-24 0-43 19-43 43l0 288c0 24 19 43 43 43l288 0c24 0 43-19 43-43l0-288c0-24-19-43-43-43"/>
16
  <glyph glyph-name="google-plus" unicode="&#104;" d="M168 280l0-58 96 0c-5-24-29-72-96-72-58 0-102 48-102 106 0 58 44 106 102 106 34 0 54-15 67-26l45 43c-29 29-67 45-112 45-94 0-168-75-168-168 0-93 74-168 168-168 96 0 160 67 160 163 0 11 0 19-2 29z m344 0l-48 0 0 48-48 0 0-48-48 0 0-48 48 0 0-48 48 0 0 48 48 0"/>
17
  <glyph glyph-name="flickr" unicode="&#105;" d="M510 256c0-66-52-118-118-118-66 0-118 52-118 118 0 66 52 118 118 118 66 0 118-52 118-118z m-270 0c0-66-53-118-118-118-66 0-120 52-120 118 0 66 52 118 118 118 66 0 120-52 120-118z"/>
18
  <glyph glyph-name="facebook" unicode="&#106;" d="M288 48l0 190 64 0 10 74-74 0 0 48c0 21 6 37 37 37l40 0 0 64c-8 1-31 3-58 3-56 0-96-35-96-98l0-54-64 0 0-74 64 0 0-190z"/>
@@ -26,17 +24,18 @@
26
  <glyph glyph-name="tumblr" unicode="&#114;" d="M355 133c-65-29-73 24-73 24l0 131 78 0 0 70-78 0 0 106-64 0c0 0-8-94-82-115l0-61 46 0 0-136c0-67 56-104 116-104 59 0 78 26 78 26z"/>
27
  <glyph glyph-name="twitter" unicode="&#115;" d="M491 402c-17-8-35-13-56-15 19 11 35 31 43 53-19-11-40-19-60-24-18 19-44 30-71 30-62 0-109-57-94-118-80 5-152 43-199 101-25-43-12-101 31-130-16 0-31 5-43 13-2-45 30-86 76-96-12-3-28-5-43-2 13-38 48-65 90-67-40-32-91-46-143-40 44-27 93-43 148-43 179 0 280 152 273 286 19 15 35 32 48 52z"/>
28
  <glyph glyph-name="vimeo" unicode="&#116;" d="M11 354l19-26c0 0 42 32 55 16 14-16 65-211 83-248 16-32 58-74 104-43 46 30 198 160 227 315 27 154-184 122-206-13 56 34 86-14 57-67-28-53-54-88-68-88-15 0-24 35-40 98-16 64-16 180-84 168-64-13-147-112-147-112z"/>
29
- <glyph glyph-name="vine" unicode="&#117;" d="M438 258c-11-4-20-4-30-4-53 0-93 37-93 101 0 32 13 48 29 48 16 0 27-14 27-45 0-17-5-35-8-46 0 0 16-29 61-19 10 21 14 48 14 72 0 64-32 101-92 101-61 0-98-48-98-109 0-63 29-115 77-139-21-40-45-76-72-103-48 58-91 136-109 288l-70 0c33-253 131-333 156-349 15-8 28-8 40-1 21 11 85 75 119 149 14 0 32 1 49 6z"/>
30
  <glyph glyph-name="warfare-plugins" unicode="&#118;" d="M424 365l-32-163c-2-7 3-7 6 0l52 104c-4 20-13 41-26 59z m-155 86l-55-249c-1-7 4-7 7 0l120 233c-23 10-47 16-74 18 2 0 2 0 2-2z m38-240l-85-147c0 0-1-2-1-2 13-1 25-3 38-3 13 0 24 2 37 3 0 0 0 2 0 2l19 147c0 5-5 5-8 0z m-246 45c0-50 17-94 48-130l48 300c-58-34-96-98-96-170z"/>
31
  <glyph glyph-name="youtube" unicode="&#119;" d="M365 437l-218 0c-123 0-142-7-142-127l0-108c0-120 19-127 142-127l216 0c123 0 143 7 143 127l0 108c1 120-18 127-141 127z m-160-271l0 188 142-95z"/>
32
  <glyph glyph-name="yummly" unicode="&#120;" d="M91 430c2 7 8 12 13 15 19 13 42 21 64 19 19-2 34-11 37-34 3-14 0-28-3-43-8-30-16-61-24-91-2-6-2-11-2-18 0-8 5-12 13-12 9-2 17 0 25 3 15 3 28 9 40 16 2 1 4 3 4 5 3 19 6 36 9 56 3 19 7 36 10 56 1 12 5 24 6 36 0 4 0 8-1 13-2 5 0 7 3 8 9 5 21 7 32 3 9-1 14-8 14-17 0-10-1-19-3-31-3-20-6-40-11-60-3-21-8-44-11-64-4-21-8-44-12-64-1-8-3-18-4-26 0-2 0-3 1-3 35-5 71-15 103-29 4-3 11-3 17-5 5-1 7-3 7-6 0-8-2-15-7-23-8-11-21-16-35-11-10 3-18 8-26 13-19 11-38 18-60 21-2 0-5 0-7 0-1 0-3 0-3-3-3-20-10-37-18-53-6-13-16-26-27-35-11-10-24-15-38-16-3 0-7-2-10-2-3 0-6 0-9 0-2 0-4 0-4 0-14 2-28 8-38 19-11 15-13 31-10 47 5 27 21 48 45 62 21 11 43 18 66 21 1 0 3 0 3 3 2 5 2 10 3 14 2 7 2 12 3 18-3-2-4-3-6-3-26-15-53-21-83-18-15 2-26 8-32 21-7 13-8 26-5 38 6 28 14 56 22 84 8 16 12 30 15 44 1 12-2 20-16 15-10-2-18-8-24-15-2-3-5-3-8 0-7 5-10 10-13 16-2 4-3 7-5 12 0 1 0 3 0 4z m144-273c-17-3-32-8-45-21-6-6-9-14-9-24 0-10 8-16 17-13 8 2 15 7 20 13 6 10 9 19 12 30 4 4 4 10 5 15z"/>
33
  <glyph glyph-name="whatsapp" unicode="&#121;" d="M400 402c-38 38-90 59-144 59-112 0-203-91-203-203 0-36 9-71 27-101l-29-106 109 29c29-16 62-24 98-24 112 0 203 91 203 203-2 53-23 104-61 143z m-142-312c-31 0-60 8-87 24l-6 3-64-16 17 62-4 7c-18 27-26 57-26 89 0 93 75 168 168 168 45 0 88-17 118-49 32-32 50-74 50-119 2-94-74-169-166-169z m91 126c-5 3-31 14-35 16-5 2-8 3-12-3-3-5-12-16-16-19-3-4-6-4-11-2-5 3-21 8-40 26-14 12-25 30-29 35-3 5 0 8 2 9 2 2 5 7 8 10 3 3 3 5 5 8 1 3 1 6 0 10-2 3-11 27-16 36-3 8-8 8-11 8-4 0-7 0-10 0-3 0-10-1-13-6-5-5-17-18-17-42 0-25 17-49 20-52 4-4 36-56 87-77 43-18 51-13 61-13 9 2 30 13 33 24 5 11 5 22 3 24 0 3-4 5-9 8z"/>
34
  <glyph glyph-name="buffer" unicode="&#122;" d="M72 357l170-80c9-5 20-5 28 0l170 80c3 1 3 6 0 8l-168 80c-10 5-22 5-32 0l-170-80c-1-3-1-7 2-8z m368-98l-35 16c-7 3-15 3-23 0l-112-53c-9-4-20-4-28 0l-112 53c-7 3-15 3-21 0l-37-17c-3-2-3-7 0-8l170-80c9-5 20-5 28 0l170 80c3 3 3 8 0 9z m0-102l-35 16c-7 3-15 3-23 0l-112-53c-9-5-20-5-28 0l-112 53c-7 3-15 3-21 0l-37-18c-3-1-3-6 0-8l170-80c9-5 20-5 28 0l170 80c3 2 3 8 0 10z"/>
35
  <glyph glyph-name="print" unicode="&#65;" d="M378 326l0 106-244 0 0-106-44 0 0-180 40 0 0-66 252 0 0 66 40 0 0 180z m-26-216l-192 0 0 36 192 0z m5 133l-202 0 0 168 202 0z m25-77c-3 0-4 0-8 2-1 0-3 2-3 2-1 0-1 1-3 1-2 2-2 2-3 3 0 0 0 2-2 2-1 2-1 3-3 5 0 1-2 5-2 6 0 13 10 23 23 23 13 0 22-10 22-23 0-13-8-21-21-21z m-44 204l-164 0 0-21 164 0z m0-37l-164 0 0-21 164 0z m0-39l-164 0 0-20 164 0z"/>
36
- <glyph glyph-name="meerkat" unicode="&#100;" d="M205 384c-11 10-24 13-39 8-9-2-17-8-24-14-9-10-14-21-14-34 0-3 0-5 0-8 2-5 3-10 5-14 3-8 8-13 14-18 3-3 7-5 10-6 1-2 5-2 6 0 3 1 3 6 0 8-3 1-6 4-8 8-3 3-5 6-8 11-1 3-3 9-3 16 0 3 0 5 2 8 0 3 1 8 4 11 5 5 10 11 16 14 4 2 7 4 10 4 5 1 11 0 16-4 8-3 14-8 19-16 2-3 3-4 7-8 0 0 0-1 0-1 0-2 1-3 3-5 1-2 3 0 5 2 1 1 1 3 1 4 0 4-1 7-1 10-7 10-13 18-21 24z m219-26c-8 5-16 8-24 10-6 2-14 3-19 6-5 4-10 7-15 10-8 6-16 14-24 22-11 12-24 23-36 34-15 13-32 19-52 22-16 2-30 0-46-3-21-5-40-11-58-19-16-5-28-11-41-21-23-17-35-41-35-70 0-11 1-24 4-35 4-18 8-36 10-55 3-22 3-43 3-65 0-21 0-40-1-61 0-18-2-37-4-55 0-11-1-20-3-32l226 0c-2 4-3 7-5 10-10 19-19 40-29 59-6 13-11 27-13 42-1 11-1 22-1 32 0 14 1 29 5 43 1 6 4 10 9 10 5 0 10 1 15 1 11 2 22 2 33 2 24 1 48 9 69 24 6 5 13 9 19 14 5 3 10 8 13 13 6 11 10 22 10 35 4 13 0 23-10 27z m-24-52c-10-7-19-13-30-18-2 0-2 0-4 0-16 5-30 11-44 21-2 0-4 1-5 1-2 0-3-1-3-3 0-1 0-5 1-5 3-3 8-4 11-8 8-3 16-8 24-11 0 0 2 0 2 0-6-1-13-3-19-5-10-1-21-1-31-3-11-1-22-1-32-5-12-3-20-11-24-24-3-11-4-22-6-35 0-16 0-33 2-49 1-18 6-34 12-52 7-14 13-28 21-43l-163 0c0 2 0 2 0 3 2 26 3 53 5 79 0 13 0 25 1 37 0 19 0 38-1 56-2 16-3 32-7 48-1 12-4 24-6 36-3 10-5 20-5 29 0 18 8 32 21 43 10 8 22 15 34 20 16 8 33 14 51 19 11 3 21 5 32 5 19 0 37-7 53-20 14-11 27-24 41-38 11-11 23-21 35-29 5-3 12-6 18-8 0 0 2-1 2-1 4-13 11-26 17-37 0-2-1-2-3-3z m-94 80c-12 0-21-10-21-21 0-2 0-5 0-8-3 0-7 1-10 1-1 0-5 0-5-1 0-2 0-5 2-5 2-2 5-2 6-3 8-3 18-5 26-5 11 0 21 10 21 21 1 11-8 21-19 21z"/>
37
  <glyph glyph-name="pocket" unicode="&#66;" d="M462 418c-4 14-19 25-35 25l-342 0c-16 0-31-9-35-24-2-5-4-9-4-14l0-127 2-25c6-58 35-107 82-141 1 0 1-2 3-2 24-17 53-30 81-36 15-4 28-5 42-5 13 0 26 1 38 3 2 0 4 0 5 2 0 0 2 0 2 0 29 6 54 17 78 35 2 0 2 1 3 1 47 36 76 85 82 141l2 26 0 128c0 5-2 8-4 13z m-88-132l-97-94c-5-5-13-8-19-8-7 0-15 3-20 8l-97 94c-11 12-11 29-2 40 11 12 29 12 40 2l79-75 78 75c11 11 29 11 40-2 10-11 10-28-2-40z"/>
38
  <glyph glyph-name="flipboard" unicode="&#67;" d="M69 443l0-374 125 0 0 125 124 0 0 124 125 0 0 125z"/>
39
  <glyph glyph-name="hacker-news" unicode="&#68;" d="M96 464l61 0 78-160c11-24 21-46 21-46 0 0 10 22 22 46l80 160 58 0-136-254 0-162-51 0 0 165z"/>
40
  <glyph glyph-name="upgrade" unicode="&#69;" d="M376 298l0 40c0 62-46 118-109 123-64 5-118-40-128-99 5 0 45 0 48 0 10 35 47 60 87 49 32-8 52-38 52-72l0-40c0-1 0-1 0-1l-190 0c-26-2-45-23-45-48l0-152c0-28 23-48 48-48l231 0c27 0 48 22 48 48l0 152c1 25-18 46-42 48z m-35-159c-7-6-18-6-26 0l-59 59-61-60c-3-4-8-5-13-5-4 0-9 1-12 5-7 6-7 17 0 25l73 74c7 6 18 6 26 0l72-72c8-8 8-19 0-26z"/>
41
  <glyph glyph-name="pin" unicode="&#70;" d="M366 222c-1 39-20 71-49 90l0 112c24 18 37 40 37 40l-196 0c0 0 13-24 39-42l0-110c-31-19-50-53-50-90l90 0 0-112c0-11 9-62 21-62 11 0 20 51 20 62l0 112z"/>
 
 
 
42
  </font></defs></svg>
10
  <glyph glyph-name="reddit" unicode="&#97;" d="M448 338c-19 0-38-10-51-26l-3-3c-31 21-72 33-117 37l21 64 56-13c3-27 25-48 54-48 30 0 54 24 54 54 0 31-24 55-54 55-21 0-38-12-48-29l-69 16c-8 1-16-3-19-11l-27-87c-50-1-95-16-128-37l-3 5c-13 15-31 24-50 24-35 0-64-29-64-64 0-27 18-51 43-61l11-4 0 3c0 0 0-2 0-2 0-75 90-136 202-136 110 0 200 61 202 136l11 3c27 8 45 34 45 61-2 34-31 63-66 63z m-40 86c11 0 19-10 19-19 0-11-9-21-19-21-11 0-19 10-19 21 0 9 8 19 19 19z m-355-178c-11 5-18 16-18 28 0 17 13 30 29 30 8 0 16-3 22-10l4-4c-15-13-24-29-31-45z m201-139c-92 0-168 47-168 104 0 58 76 104 168 104 93 0 168-46 168-104 0-57-75-104-168-104z m204 139l-8-3c-7 16-16 32-29 45l5 6c6 7 14 10 22 10 16 0 30-13 30-30-1-12-9-23-20-28z m-237-4c0 16-13 30-31 30-17 0-30-14-30-30 0-16 14-31 30-31 16 0 31 15 31 31z m101 30c-16 0-31-14-31-30 0-16 15-31 31-31 16 0 30 13 30 31-2 17-14 30-30 30z m-2-93c-5 0-8-1-11-5-10-9-27-14-53-14-26 0-42 5-53 14-6 7-17 7-22 0-3-3-5-6-5-11 0-5 2-8 5-11 16-16 40-24 75-24 34 0 59 8 75 24 3 3 5 6 5 11 0 5-2 8-5 11-3 4-6 5-11 5z"/>
11
  <glyph glyph-name="pinterest" unicode="&#98;" d="M256 450c-107 0-194-87-194-194 0-78 48-147 116-178 0 13 0 31 3 45 3 16 25 106 25 106 0 0-6 13-6 30 0 29 16 50 37 50 17 0 25-13 25-29 0-18-11-45-17-69-5-21 9-37 30-37 37 0 61 47 61 103 0 41-29 73-80 73-59 0-94-43-94-92 0-18 4-29 12-39 4-5 5-6 4-11-2-3-4-13-4-16-1-5-4-6-9-5-27 11-40 40-40 74 0 54 46 120 137 120 74 0 122-53 122-111 0-75-42-132-104-132-21 0-40 11-46 24 0 0-12-45-15-53-5-15-13-31-19-42 18-5 35-8 54-8 108 0 194 87 194 194 2 110-85 197-192 197z"/>
12
  <glyph glyph-name="periscope" unicode="&#99;" d="M258 464c-93 0-167-77-167-171 0-98 130-245 167-245 32 0 161 147 161 245 2 94-72 171-161 171z m1-261c-57 0-102 45-102 96 0 24 8 47 21 63 0-21 17-39 40-39 22 0 38 18 38 39 0 16-10 28-24 35 8 1 18 3 26 3 52 0 97-45 97-102 0-50-45-95-96-95z"/>
 
13
  <glyph glyph-name="linkedin" unicode="&#102;" d="M115 443c-25 0-46-21-46-46 0-26 21-47 46-47 26 2 45 23 45 47 0 25-19 46-45 46z m-40-374l79 0 0 249-79 0z m282 257c0 0-63 5-77-41l0 33-78 0 0-249 78 0 0 133c0 4 2 54 48 54 43 0 40-58 40-58l0-128 77 0 0 144c-2-1 8 112-88 112z"/>
 
14
  <glyph glyph-name="google-plus" unicode="&#104;" d="M168 280l0-58 96 0c-5-24-29-72-96-72-58 0-102 48-102 106 0 58 44 106 102 106 34 0 54-15 67-26l45 43c-29 29-67 45-112 45-94 0-168-75-168-168 0-93 74-168 168-168 96 0 160 67 160 163 0 11 0 19-2 29z m344 0l-48 0 0 48-48 0 0-48-48 0 0-48 48 0 0-48 48 0 0 48 48 0"/>
15
  <glyph glyph-name="flickr" unicode="&#105;" d="M510 256c0-66-52-118-118-118-66 0-118 52-118 118 0 66 52 118 118 118 66 0 118-52 118-118z m-270 0c0-66-53-118-118-118-66 0-120 52-120 118 0 66 52 118 118 118 66 0 120-52 120-118z"/>
16
  <glyph glyph-name="facebook" unicode="&#106;" d="M288 48l0 190 64 0 10 74-74 0 0 48c0 21 6 37 37 37l40 0 0 64c-8 1-31 3-58 3-56 0-96-35-96-98l0-54-64 0 0-74 64 0 0-190z"/>
24
  <glyph glyph-name="tumblr" unicode="&#114;" d="M355 133c-65-29-73 24-73 24l0 131 78 0 0 70-78 0 0 106-64 0c0 0-8-94-82-115l0-61 46 0 0-136c0-67 56-104 116-104 59 0 78 26 78 26z"/>
25
  <glyph glyph-name="twitter" unicode="&#115;" d="M491 402c-17-8-35-13-56-15 19 11 35 31 43 53-19-11-40-19-60-24-18 19-44 30-71 30-62 0-109-57-94-118-80 5-152 43-199 101-25-43-12-101 31-130-16 0-31 5-43 13-2-45 30-86 76-96-12-3-28-5-43-2 13-38 48-65 90-67-40-32-91-46-143-40 44-27 93-43 148-43 179 0 280 152 273 286 19 15 35 32 48 52z"/>
26
  <glyph glyph-name="vimeo" unicode="&#116;" d="M11 354l19-26c0 0 42 32 55 16 14-16 65-211 83-248 16-32 58-74 104-43 46 30 198 160 227 315 27 154-184 122-206-13 56 34 86-14 57-67-28-53-54-88-68-88-15 0-24 35-40 98-16 64-16 180-84 168-64-13-147-112-147-112z"/>
 
27
  <glyph glyph-name="warfare-plugins" unicode="&#118;" d="M424 365l-32-163c-2-7 3-7 6 0l52 104c-4 20-13 41-26 59z m-155 86l-55-249c-1-7 4-7 7 0l120 233c-23 10-47 16-74 18 2 0 2 0 2-2z m38-240l-85-147c0 0-1-2-1-2 13-1 25-3 38-3 13 0 24 2 37 3 0 0 0 2 0 2l19 147c0 5-5 5-8 0z m-246 45c0-50 17-94 48-130l48 300c-58-34-96-98-96-170z"/>
28
  <glyph glyph-name="youtube" unicode="&#119;" d="M365 437l-218 0c-123 0-142-7-142-127l0-108c0-120 19-127 142-127l216 0c123 0 143 7 143 127l0 108c1 120-18 127-141 127z m-160-271l0 188 142-95z"/>
29
  <glyph glyph-name="yummly" unicode="&#120;" d="M91 430c2 7 8 12 13 15 19 13 42 21 64 19 19-2 34-11 37-34 3-14 0-28-3-43-8-30-16-61-24-91-2-6-2-11-2-18 0-8 5-12 13-12 9-2 17 0 25 3 15 3 28 9 40 16 2 1 4 3 4 5 3 19 6 36 9 56 3 19 7 36 10 56 1 12 5 24 6 36 0 4 0 8-1 13-2 5 0 7 3 8 9 5 21 7 32 3 9-1 14-8 14-17 0-10-1-19-3-31-3-20-6-40-11-60-3-21-8-44-11-64-4-21-8-44-12-64-1-8-3-18-4-26 0-2 0-3 1-3 35-5 71-15 103-29 4-3 11-3 17-5 5-1 7-3 7-6 0-8-2-15-7-23-8-11-21-16-35-11-10 3-18 8-26 13-19 11-38 18-60 21-2 0-5 0-7 0-1 0-3 0-3-3-3-20-10-37-18-53-6-13-16-26-27-35-11-10-24-15-38-16-3 0-7-2-10-2-3 0-6 0-9 0-2 0-4 0-4 0-14 2-28 8-38 19-11 15-13 31-10 47 5 27 21 48 45 62 21 11 43 18 66 21 1 0 3 0 3 3 2 5 2 10 3 14 2 7 2 12 3 18-3-2-4-3-6-3-26-15-53-21-83-18-15 2-26 8-32 21-7 13-8 26-5 38 6 28 14 56 22 84 8 16 12 30 15 44 1 12-2 20-16 15-10-2-18-8-24-15-2-3-5-3-8 0-7 5-10 10-13 16-2 4-3 7-5 12 0 1 0 3 0 4z m144-273c-17-3-32-8-45-21-6-6-9-14-9-24 0-10 8-16 17-13 8 2 15 7 20 13 6 10 9 19 12 30 4 4 4 10 5 15z"/>
30
  <glyph glyph-name="whatsapp" unicode="&#121;" d="M400 402c-38 38-90 59-144 59-112 0-203-91-203-203 0-36 9-71 27-101l-29-106 109 29c29-16 62-24 98-24 112 0 203 91 203 203-2 53-23 104-61 143z m-142-312c-31 0-60 8-87 24l-6 3-64-16 17 62-4 7c-18 27-26 57-26 89 0 93 75 168 168 168 45 0 88-17 118-49 32-32 50-74 50-119 2-94-74-169-166-169z m91 126c-5 3-31 14-35 16-5 2-8 3-12-3-3-5-12-16-16-19-3-4-6-4-11-2-5 3-21 8-40 26-14 12-25 30-29 35-3 5 0 8 2 9 2 2 5 7 8 10 3 3 3 5 5 8 1 3 1 6 0 10-2 3-11 27-16 36-3 8-8 8-11 8-4 0-7 0-10 0-3 0-10-1-13-6-5-5-17-18-17-42 0-25 17-49 20-52 4-4 36-56 87-77 43-18 51-13 61-13 9 2 30 13 33 24 5 11 5 22 3 24 0 3-4 5-9 8z"/>
31
  <glyph glyph-name="buffer" unicode="&#122;" d="M72 357l170-80c9-5 20-5 28 0l170 80c3 1 3 6 0 8l-168 80c-10 5-22 5-32 0l-170-80c-1-3-1-7 2-8z m368-98l-35 16c-7 3-15 3-23 0l-112-53c-9-4-20-4-28 0l-112 53c-7 3-15 3-21 0l-37-17c-3-2-3-7 0-8l170-80c9-5 20-5 28 0l170 80c3 3 3 8 0 9z m0-102l-35 16c-7 3-15 3-23 0l-112-53c-9-5-20-5-28 0l-112 53c-7 3-15 3-21 0l-37-18c-3-1-3-6 0-8l170-80c9-5 20-5 28 0l170 80c3 2 3 8 0 10z"/>
32
  <glyph glyph-name="print" unicode="&#65;" d="M378 326l0 106-244 0 0-106-44 0 0-180 40 0 0-66 252 0 0 66 40 0 0 180z m-26-216l-192 0 0 36 192 0z m5 133l-202 0 0 168 202 0z m25-77c-3 0-4 0-8 2-1 0-3 2-3 2-1 0-1 1-3 1-2 2-2 2-3 3 0 0 0 2-2 2-1 2-1 3-3 5 0 1-2 5-2 6 0 13 10 23 23 23 13 0 22-10 22-23 0-13-8-21-21-21z m-44 204l-164 0 0-21 164 0z m0-37l-164 0 0-21 164 0z m0-39l-164 0 0-20 164 0z"/>
 
33
  <glyph glyph-name="pocket" unicode="&#66;" d="M462 418c-4 14-19 25-35 25l-342 0c-16 0-31-9-35-24-2-5-4-9-4-14l0-127 2-25c6-58 35-107 82-141 1 0 1-2 3-2 24-17 53-30 81-36 15-4 28-5 42-5 13 0 26 1 38 3 2 0 4 0 5 2 0 0 2 0 2 0 29 6 54 17 78 35 2 0 2 1 3 1 47 36 76 85 82 141l2 26 0 128c0 5-2 8-4 13z m-88-132l-97-94c-5-5-13-8-19-8-7 0-15 3-20 8l-97 94c-11 12-11 29-2 40 11 12 29 12 40 2l79-75 78 75c11 11 29 11 40-2 10-11 10-28-2-40z"/>
34
  <glyph glyph-name="flipboard" unicode="&#67;" d="M69 443l0-374 125 0 0 125 124 0 0 124 125 0 0 125z"/>
35
  <glyph glyph-name="hacker-news" unicode="&#68;" d="M96 464l61 0 78-160c11-24 21-46 21-46 0 0 10 22 22 46l80 160 58 0-136-254 0-162-51 0 0 165z"/>
36
  <glyph glyph-name="upgrade" unicode="&#69;" d="M376 298l0 40c0 62-46 118-109 123-64 5-118-40-128-99 5 0 45 0 48 0 10 35 47 60 87 49 32-8 52-38 52-72l0-40c0-1 0-1 0-1l-190 0c-26-2-45-23-45-48l0-152c0-28 23-48 48-48l231 0c27 0 48 22 48 48l0 152c1 25-18 46-42 48z m-35-159c-7-6-18-6-26 0l-59 59-61-60c-3-4-8-5-13-5-4 0-9 1-12 5-7 6-7 17 0 25l73 74c7 6 18 6 26 0l72-72c8-8 8-19 0-26z"/>
37
  <glyph glyph-name="pin" unicode="&#70;" d="M366 222c-1 39-20 71-49 90l0 112c24 18 37 40 37 40l-196 0c0 0 13-24 39-42l0-110c-31-19-50-53-50-90l90 0 0-112c0-11 9-62 21-62 11 0 20 51 20 62l0 112z"/>
38
+ <glyph glyph-name="medium" unicode="&#101;" d="M109 347c0 5-2 10-5 13l-35 43 0 7 112 0 86-189 75 189 106 0 0-7-30-29c-2-3-4-6-4-9l0-216c0-3 0-7 4-8l30-29 0-6-150 0 0 6 30 30c3 4 3 4 3 8l0 173-86-219-11 0-101 219 0-147c-2-6 1-13 5-18l40-49 0-7-114 0 0 7 40 51c5 5 6 11 5 18z"/>
39
+ <glyph glyph-name="mix" unicode="&#103;" d="M70 418l0-288c0-47 72-48 72 0l0 196c7 44 72 42 72-4l0-144c0-48 80-48 80 0l0 96c5 44 72 43 72-4l0-19c0-49 72-46 72 0l0 167z"/>
40
+ <glyph glyph-name="instagram" unicode="&#100;" d="M448 333c-2 19-3 33-10 48-4 14-11 24-22 35-11 11-21 18-35 22-15 7-29 10-48 10-21 2-27 2-77 2-51 0-58 0-77-2-19 0-33-3-48-10-14-4-24-11-35-22-11-11-18-21-22-35-7-15-10-29-10-48-2-21-2-27-2-77 0-51 0-58 2-77 2-19 3-33 10-48 4-14 11-24 22-35 11-11 21-18 35-22 15-5 29-8 48-10 19-2 27-2 77-2 51 0 58 0 77 2 19 2 33 3 48 10 14 4 24 12 35 22 11 11 18 21 22 35 5 15 8 29 10 48 2 19 2 27 2 77 0 51 0 58-2 77z m-45-152c0-18-3-27-6-34-3-8-7-13-13-19-6-6-11-10-19-13-7-1-16-5-34-6-19-2-25-2-75-2-50 0-56 0-75 2-18 0-27 3-34 6-8 3-13 7-19 13-6 6-10 11-13 19-1 7-5 16-6 34-2 19-2 25-2 75 0 50 0 56 2 75 0 18 3 27 6 34 3 8 7 13 13 19 6 6 11 10 19 13 7 1 16 5 34 6 19 2 25 2 75 2 50 0 56 0 75-2 18 0 27-3 34-6 8-3 13-7 19-13 6-6 10-11 13-19 1-7 5-16 6-34 2-19 2-25 2-75-2-50-2-56-2-75z m-147 177c-56 0-102-46-102-102 0-56 46-102 102-102 56 0 102 46 102 102 0 56-46 102-102 102z m0-158c-30 0-56 26-56 56 0 30 26 56 56 56 30 0 56-26 56-56 0-30-26-56-56-56z m99 184c-16 0-29-13-29-29 0-16 13-29 29-29 16 0 29 15 29 29 0 15-13 29-29 29z"/>
41
  </font></defs></svg>
assets/fonts/sw-icon-font.ttf ADDED
Binary file
assets/fonts/sw-icon-font.woff ADDED
Binary file
{images → assets/images}/admin-options-page/Thumbs.db RENAMED
File without changes
{images → assets/images}/admin-options-page/affiliate-300x150.jpg RENAMED
File without changes
{images → assets/images}/admin-options-page/measure-roi-300x150.jpg RENAMED
File without changes
{images → assets/images}/admin-options-page/new_share_counts.png RENAMED
File without changes
{images → assets/images}/admin-options-page/social-warfare-light.png RENAMED
File without changes
{images → assets/images}/admin-options-page/social-warfare-pro-light.png RENAMED
File without changes
{images → assets/images}/admin-options-page/socialwarfare-20x20.png RENAMED
File without changes
{images → assets/images}/admin-options-page/starter-guide-300x150.jpg RENAMED
File without changes
{images → assets/images}/img-placeholder-og.jpg RENAMED
File without changes
{images → assets/images}/img-placeholder-pin.jpg RENAMED
File without changes
{js → assets/js}/admin-options-page.js RENAMED
File without changes
{js → assets/js}/admin-options-page.min.js RENAMED
File without changes
{js → assets/js}/admin.js RENAMED
File without changes
{js → assets/js}/admin.min.js RENAMED
File without changes
{js → assets/js}/script.js RENAMED
@@ -350,9 +350,15 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
350
  //* Otherwise, it added the padding every time this was called.
351
  function toggleFloatingBar() {
352
  var panel = $(".swp_social_panel").first();
353
- var location = panel.data("float");
354
  var newPadding = 0;
355
 
 
 
 
 
 
 
 
356
  if (panelIsVisible()) {
357
  $(".nc_wrapper").hide();
358
 
@@ -432,15 +438,19 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
432
 
433
  // Iterate over the current set of matched elements.
434
  $('.swp-content-locator').parent().find('img').each(function() {
435
- var $image = $(this);
436
 
437
  if (typeof swpPinIt.disableOnAnchors != undefined && swpPinIt.disableOnAnchors) {
438
- if (jQuery($image).parents().filter("a").length) {
439
  return;
440
  }
441
  }
442
 
443
- if ($image.outerHeight() < swpPinIt.minHeight || $image.outerWidth() < swpPinIt.minWidth) {
 
 
 
 
444
  return;
445
  }
446
 
@@ -451,16 +461,12 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
451
  var i = new Image();
452
  i.src = swpPinIt.image_source;
453
  pinMedia = jQuery(i).src;
454
-
455
- if (typeof pinMedia == 'undefined') {
456
- pinMedia = jQuery(i).attr('src')
457
- }
458
- } else if ($image.data('media')) {
459
- pinMedia = $image.data('media');
460
  } else if ($(this).data('lazy-src')) {
461
  pinMedia = $(this).data('lazy-src');
462
- } else if ($image[0].src) {
463
- pinMedia = $image[0].src;
464
  }
465
 
466
  // Bail if we don't have any media to pin.
@@ -468,31 +474,27 @@ var socialWarfarePlugin = socialWarfarePlugin || {};
468
  return;
469
  }
470
 
471
- if ($image.hasClass('no_pin')) {
472
- return;
473
- }
474
-
475
  var pinDesc = '';
476
 
477
- if (typeof $image.data("pin-description") != 'undefined') {
478
- pinDesc = $image.data("pin-description");
479
  } else if ('undefined' !== typeof swpPinIt.image_description){
480
  pinDesc = swpPinIt.image_description;
481
- } else if ($image.attr('title')) {
482
- pinDesc = $image.attr('title');
483
- } else if ($image.attr('alt')) {
484
- pinDesc = $image.attr('alt');
485
  }
486
 
487
  var bookmark = 'http://pinterest.com/pin/create/bookmarklet/?media=' + encodeURI(pinMedia) + '&url=' + encodeURI(options.pageURL) + '&is_video=false' + '&description=' + encodeURIComponent(pinDesc);
488
- var imageClasses = $image.attr('class');
489
- var imageStyle = $image.attr('style');
490
 
491
- $image.removeClass().attr('style', '').wrap(options.wrap);
492
 
493
- $image.after('<a href="' + bookmark + '" class="sw-pinit-button sw-pinit-' + swpPinIt.vLocation + ' sw-pinit-' + swpPinIt.hLocation + '">Save</a>');
494
 
495
- $image.parent('.sw-pinit').addClass(imageClasses).attr('style', imageStyle);
496
 
497
  $('.sw-pinit .sw-pinit-button').on('click', function() {
498
  window.open($(this).attr('href'), 'Pinterest', 'width=632,height=253,status=0,toolbar=0,menubar=0,location=1,scrollbars=1');
350
  //* Otherwise, it added the padding every time this was called.
351
  function toggleFloatingBar() {
352
  var panel = $(".swp_social_panel").first();
 
353
  var newPadding = 0;
354
 
355
+ //* Are we on desktop or mobile?
356
+ if ($(window).width() > $(panel).data("min-width")) {
357
+ var location = $(panel).data("float");
358
+ } else {
359
+ var location = $(panel).data("float-mobile")
360
+ }
361
+
362
  if (panelIsVisible()) {
363
  $(".nc_wrapper").hide();
364
 
438
 
439
  // Iterate over the current set of matched elements.
440
  $('.swp-content-locator').parent().find('img').each(function() {
441
+ var image = $(this);
442
 
443
  if (typeof swpPinIt.disableOnAnchors != undefined && swpPinIt.disableOnAnchors) {
444
+ if (jQuery(image).parents().filter("a").length) {
445
  return;
446
  }
447
  }
448
 
449
+ if (image.outerHeight() < swpPinIt.minHeight || image.outerWidth() < swpPinIt.minWidth) {
450
+ return;
451
+ }
452
+
453
+ if (image.hasClass('no_pin') || image.hasClass('no-pin')) {
454
  return;
455
  }
456
 
461
  var i = new Image();
462
  i.src = swpPinIt.image_source;
463
  pinMedia = jQuery(i).src;
464
+ } else if (image.data('media')) {
465
+ pinMedia = image.data('media');
 
 
 
 
466
  } else if ($(this).data('lazy-src')) {
467
  pinMedia = $(this).data('lazy-src');
468
+ } else if (image[0].src) {
469
+ pinMedia = image[0].src;
470
  }
471
 
472
  // Bail if we don't have any media to pin.
474
  return;
475
  }
476
 
 
 
 
 
477
  var pinDesc = '';
478
 
479
+ if (typeof image.data("pin-description") != 'undefined') {
480
+ pinDesc = image.data("pin-description");
481
  } else if ('undefined' !== typeof swpPinIt.image_description){
482
  pinDesc = swpPinIt.image_description;
483
+ } else if (image.attr('title')) {
484
+ pinDesc = image.attr('title');
485
+ } else if (image.attr('alt')) {
486
+ pinDesc = image.attr('alt');
487
  }
488
 
489
  var bookmark = 'http://pinterest.com/pin/create/bookmarklet/?media=' + encodeURI(pinMedia) + '&url=' + encodeURI(options.pageURL) + '&is_video=false' + '&description=' + encodeURIComponent(pinDesc);
490
+ var imageClasses = image.attr('class');
491
+ var imageStyle = image.attr('style');
492
 
493
+ image.removeClass().attr('style', '').wrap(options.wrap);
494
 
495
+ image.after('<a href="' + bookmark + '" class="sw-pinit-button sw-pinit-' + swpPinIt.vLocation + ' sw-pinit-' + swpPinIt.hLocation + '">Save</a>');
496
 
497
+ image.parent('.sw-pinit').addClass(imageClasses).attr('style', imageStyle);
498
 
499
  $('.sw-pinit .sw-pinit-button').on('click', function() {
500
  window.open($(this).attr('href'), 'Pinterest', 'width=632,height=253,status=0,toolbar=0,menubar=0,location=1,scrollbars=1');
assets/js/script.min.js ADDED
@@ -0,0 +1 @@
 
1
+ var socialWarfarePlugin=socialWarfarePlugin||{};!function(e,t){var i,a=e.socialWarfarePlugin;a.throttle=i=function(e,i,n,o){function s(){function a(){p=+new Date,n.apply(l,d)}function s(){r=t}var l=this,c=+new Date-p,d=arguments;o&&!r&&a(),r&&clearTimeout(r),o===t&&c>e?a():!0!==i&&(r=setTimeout(o?s:a,o===t?e-c:e))}var r,p=0;return"boolean"!=typeof i&&(o=n,n=i,i=t),a.guid&&(s.guid=n.guid=n.guid||a.guid++),s},a.debounce=function(e,a,n){return n===t?i(e,a,!1):i(e,n,!1!==a)}}(this),function(e,t,i){"use strict";function a(e){return parseInt(e,10)}function n(i){var a=t.Event(i);t(e).trigger(a)}function o(){t(".swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:not(.swp_nohover) .iconFiller").removeAttr("style"),t(".swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:not(.swp_nohover)").removeAttr("style")}function s(){var i=(t(".swp_social_panel").not(".swp_social_panelSide").first(),!1),a=t(e).scrollTop();return t(".swp_social_panel").not(".swp_social_panelSide, .nc_floater").each(function(n){var o=t(this).offset();if("undefined"!=typeof swpFloatBeforeContent&&!1===swpFloatBeforeContent){var s=jQuery(".swp-content-locator").parent();0===n&&s.offset().top>a+jQuery(e).height()&&(i=!0)}o.top+t(this).height()>a&&o.top<a+t(e).height()&&(i=!0)}),i}function r(){t(".nc_wrapper").length&&t(".nc_wrapper").remove();var i=t(".swp_social_panel"),a=i.data("float");if(void 0!==i&&!(t(e).width()>i.data("min-width")&&"top"!=a&&"bottom"!=a)){var n=i.data("float-color"),o="center"==i.data("align")?0:i.offset().left,s=t('<div class="nc_wrapper" style="background-color:'+n+'"></div>');if("left"==a||"right"==a)var r=i.data("float-mobile");else var r=a;s.addClass(r).hide().appendTo("body");i.first().clone().addClass("nc_floater").css({width:i.outerWidth(!0),left:o}).appendTo(s),t(".swp_social_panel .swp_count").css({transition:"padding .1s linear"})}}function p(){var i=t(".swp_social_panel").first(),a=i.data("float");if("none"==a)return void jQuery(".nc_wrapper, .swp_social_panelSide").hide();t(e).width()<i.data("min-width")&&(r(),l(),d()),"right"!=a&&"left"!=a||c(),"bottom"!=a&&"top"!=a||d()}function l(){var e=(t(".swp_social_panel").first(),s()?"collapse":"visible");t(".swp_social_panelSide").hide(),t(".nc_wrapper").css("visibility",e)}function c(){var i=t(".swp_social_panel").not(".swp_social_panelSide").first(),a=t(".swp_social_panelSide"),n=a.data("float"),o=s();if(t(e).width()<i.data("min-width")&&t(".nc_wrapper").length)return void a.hide();if(i.length||(o=!(t(e).width()>a.data("min-width"))),"slide"==a.data("transition")){var r=-1!==n.indexOf("left")?"left":"right";o?a.css(r,"-150px"):a.css(r,"5px")}else o?a.css("opacity",1).fadeOut(300).css("opacity",0):a.css("opacity",0).fadeIn(300).css({opacity:1,display:"flex"})}function d(){var i=t(".swp_social_panel").first(),a=0;if(t(e).width()>t(i).data("min-width"))var n=t(i).data("float");else var n=t(i).data("float-mobile");s()?(t(".nc_wrapper").hide(),a="bottom"==n?m:g):(t(".nc_wrapper").show(),jQuery(".swp_social_panel.nc_floater").css("opacity",1),"bottom"==n?a=m+50:i.offset().top>t(e).scrollTop()+t(e).height()&&(a=g+50,t("body").animate({"padding-top":a+"px"},0)));t("body").animate({paddingProp:a},0)}function h(){var t=jQuery("[class*=float-position-center]");if(t.length){var i=t.outerHeight(),a=e.innerHeight;if(i>a)return void t.css("top",0);var n=(a-i)/2;t.css("top",n)}}function f(){0!==t(".swp_social_panel").length&&(r(),h(),b.activateHoverStates(),_(),t(e).scroll(b.throttle(50,function(){p()})),t(e).trigger("scroll"))}function u(){var a={wrap:'<div class="sw-pinit" />',pageURL:document.URL},n=t.extend(a,n);t(".swp-content-locator").parent().find("img").each(function(){var a=t(this);if(!(typeof swpPinIt.disableOnAnchors!=i&&swpPinIt.disableOnAnchors&&jQuery(a).parents().filter("a").length||a.outerHeight()<swpPinIt.minHeight||a.outerWidth()<swpPinIt.minWidth||a.hasClass("no_pin")||a.hasClass("no-pin"))){var o=!1;if(void 0!==swpPinIt.image_source){var s=new Image;s.src=swpPinIt.image_source,o=jQuery(s).src}else a.data("media")?o=a.data("media"):t(this).data("lazy-src")?o=t(this).data("lazy-src"):a[0].src&&(o=a[0].src);if(!1!==o){var r="";void 0!==a.data("pin-description")?r=a.data("pin-description"):void 0!==swpPinIt.image_description?r=swpPinIt.image_description:a.attr("title")?r=a.attr("title"):a.attr("alt")&&(r=a.attr("alt"));var p="http://pinterest.com/pin/create/bookmarklet/?media="+encodeURI(o)+"&url="+encodeURI(n.pageURL)+"&is_video=false&description="+encodeURIComponent(r),l=a.attr("class"),c=a.attr("style");a.removeClass().attr("style","").wrap(n.wrap),a.after('<a href="'+p+'" class="sw-pinit-button sw-pinit-'+swpPinIt.vLocation+" sw-pinit-"+swpPinIt.hLocation+'">Save</a>'),a.parent(".sw-pinit").addClass(l).attr("style",c),t(".sw-pinit .sw-pinit-button").on("click",function(){if(e.open(t(this).attr("href"),"Pinterest","width=632,height=253,status=0,toolbar=0,menubar=0,location=1,scrollbars=1"),!0===swpClickTracking){"function"==typeof ga&&ga("send","event","social_media","swp_pin_image_share"),"object"==typeof dataLayer&&dataLayer.push({event:"swp_pin_image_share"})}return!1})}}});var o=w();void 0!==o&&o&&v(o)}function _(){t(".nc_tweet, a.swp_CTT").off("click"),t(".nc_tweet, a.swp_CTT").on("click",function(i){if(t(this).hasClass("noPop"))return!1;if(t(this).data("link")){i.preventDefault();var a,n,o,s,r=t(this).data("link");r=r.replace("’","'"),t(this).hasClass("pinterest")||t(this).hasClass("buffer_link")||t(this).hasClass("flipboard")?(a=550,n=775):(a=270,n=500),o=e.screenY+(e.innerHeight-a)/2,s=e.screenX+(e.innerWidth-n)/2;var p="height="+a+",width="+n+",top="+o+",left="+s;e.open(r,"_blank",p);if(1==swpClickTracking){if(t(this).hasClass("nc_tweet"))var l=t(this).parents(".nc_tweetContainer").attr("data-network");else if(t(this).hasClass("swp_CTT"))var l="ctt";"function"==typeof ga&&ga("send","event","social_media","swp_"+l+"_share"),"object"==typeof dataLayer&&dataLayer.push({event:"swp_"+l+"_share"})}return!1}})}function w(){var t=null;return document.querySelectorAll("span").forEach(function(i,a){var n=e.getComputedStyle(i);"rgb(189, 8, 28)"==n.backgroundColor&&"14px 14px"==n.backgroundSize&&"8675309"==n.zIndex&&(t=i)}),t}function v(t){var i=t.nextSibling;if(void 0!==i&&"SPAN"==i.nodeName){var a=e.getComputedStyle(i);0===a.width.indexOf("24px")&&0===a.height.indexOf("24px")&&i.remove()}t.remove()}var b=e.socialWarfarePlugin,g=a(t("body").css("padding-top").replace("px","")),m=a(t("body").css("padding-bottom").replace("px","")),y={};socialWarfarePlugin.fetchFacebookShares=function(){t.when(t.get("https://graph.facebook.com/?fields=og_object{likes.summary(true).limit(0)},share&id="+swp_post_url),swp_post_recovery_url?t.get("https://graph.facebook.com/?fields=og_object{likes.summary(true).limit(0)},share&id="+swp_post_recovery_url):"").then(function(e,i){if(void 0!==e[0].share){var n=a(e[0].share.share_count),o=a(e[0].share.comment_count);if(void 0!==e[0].og_object)var s=a(e[0].og_object.likes.summary.total_count);else var s=0;var r=n+o+s;if(swp_post_recovery_url){if(void 0!==i[0].share)var p=a(i[0].share.share_count),l=a(i[0].share.comment_count);else var p=0,l=0;if(void 0!==i[0].og_object)var c=a(i[0].og_object.likes.summary.total_count);else var c=0;var d=p+l+c;r!==d&&(r+=d)}y={action:"swp_facebook_shares_update",post_id:swp_post_id,share_counts:r},t.post(swp_admin_ajax,y)}})},b.activateHoverStates=function(){n("pre_activate_buttons"),t(".swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer").on("mouseenter",function(){if(!t(this).hasClass("swp_nohover")){o();var e=t(this).find(".swp_share").outerWidth(),i=t(this).find("i.sw").outerWidth(),a=t(this).width(),n=1+(e+35)/a;t(this).find(".iconFiller").width(e+i+25+"px"),t(this).css({flex:n+" 1 0%"})}}),t(".swp_social_panel:not(.swp_social_panelSide)").on("mouseleave",function(){o()})},t(e).on("load",function(){"undefined"!=typeof swpPinIt&&swpPinIt.enabled&&u()}),t(document).ready(function(){_(),f();var i=t(".swp_social_panelSide"),n=!1;if(t(".swp_social_panel").hover(function(){n=!0},function(){n=!1}),t(e).resize(b.debounce(250,function(){t(".swp_social_panel").length&&!1!==n||(e.swpAdjust=1,f())})),t(document.body).on("post-load",function(){f()}),0!==i.length){if(-1!==t(i).attr("class").indexOf("swp_side"))return;var o=t(i).height(),s=t(e).height(),r=a(s/2-o/2);setTimeout(function(){t(i).animate({top:r},0)},105)}1===t(".swp-content-locator").parent().children().length&&t(".swp-content-locator").parent().hide()})}(this,jQuery),function(e){var t=/iPhone/i,i=/iPod/i,a=/iPad/i,n=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,o=/Android/i,s=/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,r=/(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,p=/Windows Phone/i,l=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,c=/BlackBerry/i,d=/BB10/i,h=/Opera Mini/i,f=/(CriOS|Chrome)(?=.*\bMobile\b)/i,u=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,_=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),w=function(e,t){return e.test(t)},v=function(e){var v=e||navigator.userAgent,b=v.split("[FBAN");if(void 0!==b[1]&&(v=b[0]),b=v.split("Twitter"),void 0!==b[1]&&(v=b[0]),this.apple={phone:w(t,v),ipod:w(i,v),tablet:!w(t,v)&&w(a,v),device:w(t,v)||w(i,v)||w(a,v)},this.amazon={phone:w(s,v),tablet:!w(s,v)&&w(r,v),device:w(s,v)||w(r,v)},this.android={phone:w(s,v)||w(n,v),tablet:!w(s,v)&&!w(n,v)&&(w(r,v)||w(o,v)),device:w(s,v)||w(r,v)||w(n,v)||w(o,v)},this.windows={phone:w(p,v),tablet:w(l,v),device:w(p,v)||w(l,v)},this.other={blackberry:w(c,v),blackberry10:w(d,v),opera:w(h,v),firefox:w(u,v),chrome:w(f,v),device:w(c,v)||w(d,v)||w(h,v)||w(u,v)||w(f,v)},this.seven_inch=w(_,v),this.any=this.apple.device||this.android.device||this.windows.device||this.other.device||this.seven_inch,this.phone=this.apple.phone||this.android.phone||this.windows.phone,this.tablet=this.apple.tablet||this.android.tablet||this.windows.tablet,"undefined"==typeof window)return this},b=function(){var e=new v;return e.Class=v,e};"undefined"!=typeof module&&module.exports&&"undefined"==typeof window?module.exports=v:"undefined"!=typeof module&&module.exports&&"undefined"!=typeof window?module.exports=b():"function"==typeof define&&define.amd?define("swp_isMobile",[],e.swp_isMobile=b()):e.swp_isMobile=b()}(this);
{js → assets/js}/sw-shortcode-generator.js RENAMED
File without changes
{js → assets/js}/sw-shortcode-generator.min.js RENAMED
File without changes
css/style.min.css DELETED
@@ -1 +0,0 @@
1
- .swp_social_panel{clear:both;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;height:34px;line-height:1;margin-bottom:20px!important;margin-top:20px!important;overflow:hidden;padding:0;-webkit-align-items:stretch;align-items:stretch;-webkit-box-align:stretch;-moz-box-align:stretch;-webkit-box-pack:justify;-moz-box-pack:justify;direction:ltr;-ms-flex-align:stretch;-ms-flex-line-pack:center;-ms-flex-pack:justify;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-justify-content:space-between;justify-content:space-between}.swp_social_panel:not(.nc_floater):not(.swp_social_panelSide){width:100%!important}.nc_wrapper .swp_social_panel{margin-bottom:10px!important;margin-top:10px!important}div.swp_social_panel .nc_tweetContainer:not(.total_shares):not(.total_sharesalt){-webkit-border-radius:2px;border-radius:2px;cursor:pointer;float:left;font-family:Lato;height:32px;margin:0 5px 3px 5px;min-width:34px;overflow:hidden;text-align:center;-webkit-transition:all 0.1s linear;transition:all 0.1s linear}div.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.swp_social_panel .nc_tweetContainer a.nc_tweet,.swp_social_panel .total_shares .swp_count{display:block;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;font-family:Lato,sans-serif;font-size:18px!important;font-weight:bold;height:30px;text-decoration:none;text-decoration:none!important;text-transform:none;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap}.swp_social_panel:not(.nc_floater):not(.swp_social_panelSide).swp_shift{padding:0 10px}.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:nth-child(1){margin-left:0}.swp_social_panel:not(.swp_social_panelSide) .nc_tweetContainer:nth-last-child(1){margin-right:0}.swp_social_panel a .swp_count:not(.swp_hide){display:inline-block;line-height:32px;margin:0;padding:0 5px;-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.swp_social_panel a .swp_count.swp_hide{margin:0 auto}.swp_social_panel span:before{content:initial!important}.swp_social_panel .total_shares .swp_count{line-height:30px}.swp_social_panel span.swp_count{font-size:14px}.swp_social_panel span.iconFiller{font-size:18px;margin:0 auto}.swp_social_panel.notMobile .nc_tweetContainer:nth-child(1){margin-left:0}.swp_social_panel:not(.swp_social_panelSide){-webkit-transition:opacity 0.2s ease-in-out;transition:opacity 0.2s ease-in-out}.swp_social_panel:not(.swp_social_panelSide) div.total_shares.total_sharesalt:nth-child(1){margin-left:0;margin-right:15px;padding-left:0}.swp_social_panel:not(.swp_social_panelSide) div.total_shares.total_sharesalt:nth-last-child(1){margin-right:0;padding-right:0}a.swp_CTT{cursor:pointer}span.swp_share{display:block;float:right;float:left;font-size:14px;font-weight:normal;height:30px;line-height:30px;margin:0 0 0 6px;max-width:none!important;vertical-align:middle}.swp_social_panelSide span.swp_share{margin:0}.swp_social_panel .sw{float:left;height:30px;line-height:32px;margin:0 5px;text-shadow:none!important;width:20px}.iconFiller{display:block;float:left;height:30px;overflow:hidden;-webkit-transition:width 0.1s linear;transition:width 0.1s linear}.swp_social_panel .iconFiller{width:30px}span.spaceManWilly{display:block;width:120px}.swp_social_panel .total_shares{background:transparent!important;;border:none!important;-webkit-border-radius:2px;border-radius:2px;color:white;cursor:default;display:block;font-size:19px;padding:0 10px;-webkit-box-flex:0!important;-moz-box-flex:0!important;-webkit-flex:none!important;-ms-flex:none!important;flex:none!important}.swp_social_panel .total_sharesalt{background:transparent!important;border:none!important}.swp_social_panel div.total_shares.total_sharesalt,.swp_social_panel:hover div.total_shares.total_sharesalt:not(:nth-child(1)){background:transparent!important;border:none;color:#474b4d;margin-left:0!important;margin-bottom:10px!important}div.swp_social_panel:hover div.total_shares.total_sharesalt:not(:nth-child(1)){background:transparent;color:#474b4d;margin-left:10px}.swp_social_panel .total_shares.total_sharesalt .swp_label{color:#474b4d;font-size:10px;letter-spacing:0;min-width:40px;vertical-align:middle}.swp_social_panel .total_shares .swp_label{font-size:10px;vertical-align:middle}.swp_social_panel .total_shares.total_sharesalt .swp_count{color:#474b4d;font-size:24px}.swp_social_panel:hover .total_shares,.swp_social_panel.swp_full_color .total_shares,.swp_social_panel.swp_fade .total_shares,.swp_social_panel.swp_customFull:hover div.total_shares{background:#e08a0f}.swp_social_panel .nc_tweetContainer.total_shares.total_sharesalt:before{content:"o";display:inline-block;font-family:sw-icon-font;margin-top:7px;vertical-align:top}.swp_social_panel:not(.swp_social_panelSide) .total_shares.total_sharesalt .swp_count{display:inline-block;line-height:0;margin-left:8px;margin-top:12px;min-width:45px;position:relative;vertical-align:middle}span.swp_label{display:block;font-size:9px!important;margin-top:13px;position:absolute;text-align:center!important;text-transform:uppercase}.swp_social_panelSide span.swp_label{margin-top:0}.swp_social_panel.swp_leaf .nc_tweetContainer{-webkit-border-radius:15px 0!important;border-radius:15px 0!important;border-width:1px}.swp_social_panel.swp_pill .nc_tweetContainer{-webkit-border-radius:50px!important;border-radius:50px!important;border-width:1px}.swp_social_panel.swp_shift .nc_tweetContainer:not(.total_shares){border-width:1px;-moz-transform:skew(-25deg);-o-transform:skew(-25deg);-webkit-transform:skew(-25deg)}.swp_social_panel.swp_shift .nc_tweetContainer a{-moz-transform:skew(25deg);-o-transform:skew(25deg);-webkit-transform:skew(25deg)}.swp_connected .nc_tweetContainer,.swp_connected:hover .nc_tweetContainer,.swp_connected .nc_tweetContainer:hover{-webkit-border-radius:0!important;border-radius:0!important;border-width:1px;margin:0!important}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_google_plus,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_google_plus:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_google_plus:not(:hover){border:1px solid #df4b37}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_twitter,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_twitter:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_twitter:not(:hover){border:1px solid #429cd6}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_facebook,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_facebook:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_facebook:not(:hover){border:1px solid #3a589e}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_pinterest,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_pinterest:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_pinterest:not(:hover){border:1px solid #cd2029}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_linkedin,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_linkedin:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_linkedin:not(:hover){border:1px solid #0d77b7}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_tumblr,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_tumblr:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_tumblr:not(:hover){border:1px solid #39475d}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_stumbleupon,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_stumbleupon:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_stumbleupon:not(:hover){border:1px solid #ef5025}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_yummly,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_yummly:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_yummly:not(:hover){border:1px solid #e26426}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_reddit,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_reddit:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_reddit:not(:hover){border:1px solid #f04b23}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_email,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_email:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_email:not(:hover){border:1px solid #6bcce9}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_whatsapp,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_whatsapp:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_whatsapp:not(:hover){border:1px solid #71c169}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_pocket,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_pocket:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_pocket:not(:hover){border:1px solid #ef4056}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_buffer,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_buffer:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_buffer:not(:hover){border:1px solid #323b43}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_hacker_news,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_hacker_news:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_hacker_news:not(:hover){border:1px solid #d85623}.swp_social_panel.swp_flat_fresh.swp_default_full_color .swp_flipboard,html body .swp_social_panel.swp_flat_fresh.swp_individual_full_color .swp_flipboard:hover,body .swp_social_panel.swp_flat_fresh.swp_other_full_color:hover .swp_flipboard:not(:hover){border:1px solid #bf2626}.swp_social_panel.swp_default_full_color .swp_google_plus,html body .swp_social_panel.swp_individual_full_color .swp_google_plus:hover,body .swp_social_panel.swp_other_full_color:hover .swp_google_plus{background:#df4b37;border:1px solid #c44133}.swp_social_panel.swp_default_full_color .swp_twitter,html body .swp_social_panel.swp_individual_full_color .swp_twitter:hover,body .swp_social_panel.swp_other_full_color:hover .swp_twitter{background:#429cd6;border:1px solid #3c87b2}.swp_social_panel.swp_default_full_color .swp_facebook,html body .swp_social_panel.swp_individual_full_color .swp_facebook:hover,body .swp_social_panel.swp_other_full_color:hover .swp_facebook{background:#3a589e;border:1px solid #2e4675}.swp_social_panel.swp_default_full_color .swp_pinterest,html body .swp_social_panel.swp_individual_full_color .swp_pinterest:hover,body .swp_social_panel.swp_other_full_color:hover .swp_pinterest{background:#cd2029;border:1px solid #aa1b29}.swp_social_panel.swp_default_full_color .swp_linkedin,html body .swp_social_panel.swp_individual_full_color .swp_linkedin:hover,body .swp_social_panel.swp_other_full_color:hover .swp_linkedin{background:#0d77b7;border:1px solid #0c6591}.swp_social_panel.swp_default_full_color .swp_tumblr,html body .swp_social_panel.swp_individual_full_color .swp_tumblr:hover,body .swp_social_panel.swp_other_full_color:hover .swp_tumblr{background:#39475d;border:1px solid #27313f}.swp_social_panel.swp_default_full_color .swp_stumbleupon,html body .swp_social_panel.swp_individual_full_color .swp_stumbleupon:hover,body .swp_social_panel.swp_other_full_color:hover .swp_stumbleupon{background:#ef5025;border:1px solid #d34427}.swp_social_panel.swp_default_full_color .swp_yummly,html body .swp_social_panel.swp_individual_full_color .swp_yummly:hover,body .swp_social_panel.swp_other_full_color:hover .swp_yummly{background:#e26426;border:1px solid #b65027}.swp_social_panel.swp_default_full_color .swp_reddit,html body .swp_social_panel.swp_individual_full_color .swp_reddit:hover,body .swp_social_panel.swp_other_full_color:hover .swp_reddit{background:#f04b23;border:1px solid #d33f27}.swp_social_panel.swp_default_full_color .swp_email,html body .swp_social_panel.swp_individual_full_color .swp_email:hover,body .swp_social_panel.swp_other_full_color:hover .swp_email{background:#6bcce9;border:1px solid #61bace}.swp_social_panel.swp_default_full_color .swp_whatsapp,html body .swp_social_panel.swp_individual_full_color .swp_whatsapp:hover,body .swp_social_panel.swp_other_full_color:hover .swp_whatsapp{background:#71c169;border:1px solid #28b04b}.swp_social_panel.swp_default_full_color .swp_pocket,html body .swp_social_panel.swp_individual_full_color .swp_pocket:hover,body .swp_social_panel.swp_other_full_color:hover .swp_pocket{background:#ef4056;border:1px solid #ce3d55}.swp_social_panel.swp_default_full_color .swp_buffer,html body .swp_social_panel.swp_individual_full_color .swp_buffer:hover,body .swp_social_panel.swp_other_full_color:hover .swp_buffer{background:#323b43;border:1px solid #000}.swp_social_panel.swp_default_full_color .swp_hacker_news,html body .swp_social_panel.swp_individual_full_color .swp_hacker_news:hover,body .swp_social_panel.swp_other_full_color:hover .swp_hacker_news{background:#f16522;border:1px solid #d85623}.swp_social_panel.swp_default_full_color .swp_flipboard,html body .swp_social_panel.swp_individual_full_color .swp_flipboard:hover,body .swp_social_panel.swp_other_full_color:hover .swp_flipboard{background:#e02828;border:1px solid #bf2626}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_google_plus,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_google_plus:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_google_plus{border-bottom:3px solid #c44133}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_twitter,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_twitter:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_twitter{border-bottom:3px solid #5595bc}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_facebook,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_facebook:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_facebook{border-bottom:3px solid #2e4675}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_pinterest,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_pinterest:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_pinterest{border-bottom:3px solid #aa1b29}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_linkedin,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_linkedin:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_linkedin{border-bottom:3px solid #0c6591}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_tumblr,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_tumblr:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_tumblr{border-bottom:3px solid #27313f}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_stumbleupon,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_stumbleupon:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_stumbleupon{border-bottom:3px solid #d34427}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_yummly,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_yummly:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_yummly{border-bottom:3px solid #b65027}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_reddit,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_reddit:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_reddit{border-bottom:3px solid #d33f27}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_email,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_email:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_email{border-bottom:3px solid #61bace}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_whatsapp,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_whatsapp:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_whatsapp{border-bottom:3px solid #28b04b}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_pocket,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_pocket:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_pocket{border-bottom:3px solid #ce3d55}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_buffer,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_buffer:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_buffer{border-bottom:3px solid #000}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_hacker_news,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_hacker_news:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_hacker_news{border-bottom:3px solid #d85623}.swp_social_panel.swp_three_dee.swp_default_full_color .swp_flipboard,html body .swp_social_panel.swp_three_dee.swp_individual_full_color .swp_flipboard:hover,body .swp_social_panel.swp_three_dee.swp_other_full_color:hover .swp_flipboard{border-bottom:3px solid #bf2626}.swp_social_panel.swp_default_light_gray .nc_tweetContainer,html body .swp_social_panel.swp_individual_light_gray .nc_tweetContainer:hover,body .swp_social_panel.swp_other_light_gray:hover .nc_tweetContainer{background-color:#ccc;border:1px solid #ccc}.swp_social_panel.swp_three_dee.swp_default_light_gray .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_light_gray .nc_tweetContainer:not(.total_sharesalt):hover,body .swp_social_panel.swp_three_dee.swp_other_light_gray:hover .nc_tweetContainer:not(.total_sharesalt){border-bottom:3px solid #999}.swp_social_panel.swp_default_medium_gray .nc_tweetContainer,html body .swp_social_panel.swp_individual_medium_gray .nc_tweetContainer:hover,body .swp_social_panel.swp_other_medium_gray:hover .nc_tweetContainer{background-color:#999;border:1px solid #999}.swp_social_panel.swp_three_dee.swp_default_medium_gray .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_medium_gray .nc_tweetContainer:not(.total_sharesalt):hover,body .swp_social_panel.swp_three_dee.swp_other_medium_gray:hover .nc_tweetContainer:not(.total_sharesalt){border-bottom:3px solid #444}.swp_social_panel.swp_default_dark_gray .nc_tweetContainer,html body .swp_social_panel.swp_individual_dark_gray .nc_tweetContainer:hover,body .swp_social_panel.swp_other_dark_gray:hover .nc_tweetContainer{background-color:#444;border:1px solid #444}.swp_social_panel.swp_three_dee.swp_default_dark_gray .nc_tweetContainer:not(.total_sharesalt),html body .swp_social_panel.swp_three_dee.swp_individual_dark_gray .nc_tweetContainer:not(.total_sharesalt):hover,body .swp_social_panel.swp_three_dee.swp_other_dark_gray:hover .nc_tweetContainer:not(.total_sharesalt){border-bottom:3px solid #222}.swp_social_panel.swp_default_light_gray_outlines a,html body .swp_social_panel.swp_individual_light_gray_outlines a:hover,body .swp_social_panel.swp_other_light_gray_outlines:hover a{color:#ccc}.swp_social_panel.swp_default_light_gray_outlines .nc_tweetContainer,html body .swp_social_panel.swp_individual_light_gray_outlines .nc_tweetContainer:hover,body .swp_social_panel.swp_other_light_gray_outlines:hover .nc_tweetContainer{background:transparent;border:1px solid #ccc}.swp_social_panel.swp_default_medium_gray_outlines a,html body .swp_social_panel.swp_individual_medium_gray_outlines a:hover,body .swp_social_panel.swp_other_medium_gray_outlines:hover a{color:#999}.swp_social_panel.swp_default_medium_gray_outlines .nc_tweetContainer,html body .swp_social_panel.swp_individual_medium_gray_outlines .nc_tweetContainer:hover,body .swp_social_panel.swp_other_medium_gray_outlines:hover .nc_tweetContainer{background:transparent;border:1px solid #999}.swp_social_panel.swp_default_dark_gray_outlines a,html body .swp_social_panel.swp_individual_dark_gray_outlines a:hover,body .swp_social_panel.swp_other_dark_gray_outlines:hover a{color:#444}.swp_social_panel.swp_default_dark_gray_outlines .nc_tweetContainer,html body .swp_social_panel.swp_individual_dark_gray_outlines .nc_tweetContainer:hover,body .swp_social_panel.swp_other_dark_gray_outlines:hover .nc_tweetContainer{background:transparent;border:1px solid #444}.swp_social_panel.swp_default_color_outlines .swp_google_plus a,html body .swp_social_panel.swp_individual_color_outlines .swp_google_plus a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_google_plus a{color:#df4b37}.swp_social_panel.swp_default_color_outlines .swp_facebook a,html body .swp_social_panel.swp_individual_color_outlines .swp_facebook a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_facebook a{color:#3a589e}.swp_social_panel.swp_default_color_outlines .swp_pinterest a,html body .swp_social_panel.swp_individual_color_outlines .swp_pinterest a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_pinterest a{color:#cd2029}.swp_social_panel.swp_default_color_outlines .swp_linkedin a,html body .swp_social_panel.swp_individual_color_outlines .swp_linkedin a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_linkedin a{color:#0d77b7}.swp_social_panel.swp_default_color_outlines .swp_tumblr a,html body .swp_social_panel.swp_individual_color_outlines .swp_tumblr a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_tumblr a{color:#39475d}.swp_social_panel.swp_default_color_outlines .swp_stumbleupon a,html body .swp_social_panel.swp_individual_color_outlines .swp_stumbleupon a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_stumbleupon a{color:#ef5025}.swp_social_panel.swp_default_color_outlines .swp_yummly a,html body .swp_social_panel.swp_individual_color_outlines .swp_yummly a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_yummly a{color:#e26426}.swp_social_panel.swp_default_color_outlines .swp_whatsapp a,html body .swp_social_panel.swp_individual_color_outlines .swp_whatsapp a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_whatsapp a{color:#71c169}.swp_social_panel.swp_default_color_outlines .swp_pocket a,html body .swp_social_panel.swp_individual_color_outlines .swp_pocket a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_pocket a{color:#ef4056}.swp_social_panel.swp_default_color_outlines .swp_reddit a,html body .swp_social_panel.swp_individual_color_outlines .swp_reddit a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_reddit a{color:#f04b23}.swp_social_panel.swp_default_color_outlines .swp_email a,html body .swp_social_panel.swp_individual_color_outlines .swp_email a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_email a{color:#6bcce9}.swp_social_panel.swp_default_color_outlines .swp_buffer a,html body .swp_social_panel.swp_individual_color_outlines .swp_buffer a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_buffer a{color:#323b43}.swp_social_panel.swp_default_color_outlines .swp_hacker_news a,html body .swp_social_panel.swp_individual_color_outlines .swp_hacker_news a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_hacker_news a{color:#f16522}.swp_social_panel.swp_default_color_outlines .swp_flipboard a,html body .swp_social_panel.swp_individual_color_outlines .swp_flipboard a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_flipboard a{color:#e02828}.swp_social_panel.swp_default_color_outlines .swp_google_plus,html body .swp_social_panel.swp_individual_color_outlines .swp_google_plus:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_google_plus{background:transparent;border:1px solid #df4b37}.swp_social_panel.swp_default_color_outlines .swp_twitter,html body .swp_social_panel.swp_individual_color_outlines .swp_twitter:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_twitter{background:transparent;border:1px solid #429cd6}.swp_social_panel.swp_default_color_outlines .swp_facebook,html body .swp_social_panel.swp_individual_color_outlines .swp_facebook:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_facebook{background:transparent;border:1px solid #3a589e}.swp_social_panel.swp_default_color_outlines .swp_pinterest,html body .swp_social_panel.swp_individual_color_outlines .swp_pinterest:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_pinterest{background:transparent;border:1px solid #cd2029}.swp_social_panel.swp_default_color_outlines .swp_linkedin,html body .swp_social_panel.swp_individual_color_outlines .swp_linkedin:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_linkedin{background:transparent;border:1px solid #0d77b7}.swp_social_panel.swp_default_color_outlines .swp_tumblr,html body .swp_social_panel.swp_individual_color_outlines .swp_tumblr:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_tumblr{background:transparent;border:1px solid #39475d}.swp_social_panel.swp_default_color_outlines .swp_stumbleupon,html body .swp_social_panel.swp_individual_color_outlines .swp_stumbleupon:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_stumbleupon{background:transparent;border:1px solid #ef5025}.swp_social_panel.swp_default_color_outlines .swp_yummly,html body .swp_social_panel.swp_individual_color_outlines .swp_yummly:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_yummly{background:transparent;border:1px solid #e26426}.swp_social_panel.swp_default_color_outlines .swp_whatsapp,html body .swp_social_panel.swp_individual_color_outlines .swp_whatsapp:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_whatsapp{background:transparent;border:1px solid #71c169}.swp_social_panel.swp_default_color_outlines .swp_reddit,html body .swp_social_panel.swp_individual_color_outlines .swp_reddit:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_reddit{background:transparent;border:1px solid #f04b23}.swp_social_panel.swp_default_color_outlines .swp_email,html body .swp_social_panel.swp_individual_color_outlines .swp_email:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_email{background:transparent;border:1px solid #6bcce9}.swp_social_panel.swp_default_color_outlines .swp_pocket,html body .swp_social_panel.swp_individual_color_outlines .swp_pocket:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_pocket{background:transparent;border:1px solid #ef4056}.swp_social_panel.swp_default_color_outlines .swp_buffer,html body .swp_social_panel.swp_individual_color_outlines .swp_buffer:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_buffer{background:transparent;border:1px solid #323b43}.swp_social_panel.swp_default_color_outlines .swp_hacker_news,html body .swp_social_panel.swp_individual_color_outlines .swp_hacker_news:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_hacker_news{background:transparent;border:1px solid #f16522}.swp_social_panel.swp_default_color_outlines .swp_flipboard,html body .swp_social_panel.swp_individual_color_outlines .swp_flipboard:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_flipboard{background:transparent;border:1px solid #bf2626}.swp_social_panelSide{flex-direction:column;height:auto;overflow:visible;-webkit-transition:all 0.2s linear;transition:all 0.2s linear;z-index:9998;margin:10px 5px!important;padding:0;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column}.swp_social_panelSide.slide,.swp_social_panelSide.fade{position:fixed;-webkit-transition:all 0.2s linear;transition:all 0.2s linear}.swp_social_panelSide.fade.swp_float_left{left:5px}.swp_social_panelSide.fade.swp_float_right{right:5px}.swp_social_panelSide[class*=swp_side]{height:auto;display:flex;position:fixed;padding:30px 0}.swp_social_panelSide.fade{display:none}.swp_social_panelSide.swp_float_right{align-content:flex-end}.swp_social_panelSide.swp_side_top{top:15px}.swp_social_panelSide.swp_side_bottom{bottom:15px}.swp_social_panelSide.swp_side_center{}.swp_social_panelSide .nc_tweetContainer{-webkit-border-radius:3px;border-radius:3px;clear:both;display:block;font-family:Lato,sans-serif;height:32px;margin:3px 0!important;overflow:hidden;padding:0;-webkit-transition:all 0.1s linear;transition:all 0.1s linear;vertical-align:top;width:90px}.swp_social_panelSide .nc_tweetContainer .iconFiller{display:inline-block;height:40px;margin:0 6px;padding:0;-webkit-transition:all 0.1s linear;transition:all 0.1s linear;vertical-align:middle;width:21px}.swp_social_panelSide .nc_tweetContainer .swp_count{display:inline-block;font-size:14px;height:32px;line-height:16px;margin:0;overflow:hidden;padding:0;text-align:right;-webkit-transition:all 0.1s linear;transition:all 0.1s linear;vertical-align:top;width:0}.swp_social_panelSide .nc_tweetContainer a{cursor:pointer;display:block;font-weight:500;height:36px;margin:0;padding:0;text-decoration:none;-webkit-transition:all 0.1s linear;transition:all 0.1s linear;vertical-align:top}.swp_social_panelSide .nc_tweetContainer .sw,.swp_social_panelSide .nc_tweetContainer .swp_share{float:left;line-height:34px}.swp_social_panelSide.swp_default .nc_tweetContainer .sw{line-height:32px}.swp_social_panelSide.swp_default .nc_tweetContainer .swp_share{line-height:30px}.swp_social_panelSide .nc_tweetContainer .swp_share{font-size:13px}.swp_social_panelSide .nc_tweetContainer:hover,.swp_social_panelSide .nc_tweetContainer:hover .iconFiller,.swp_social_panelSide .nc_tweetContainer:hover .swp_count{-webkit-transition:all 0.1s linear;transition:all 0.1s linear}.swp_social_panelSide.swp_boxed .nc_tweetContainer,.swp_social_panelSide.swp_circles .nc_tweetContainer{margin-bottom:5px;width:67.5px!important}.swp_social_panelSide.swp_boxed .nc_tweetContainer,.swp_social_panelSide.swp_boxed .nc_tweetContainer a,.swp_social_panelSide.swp_circles .nc_tweetContainer,.swp_social_panelSide.swp_circles .nc_tweetContainer a{width:67.5px;height:67.5px!important;position:relative}.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares),.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) a{border-radius:50%!important}.swp_social_panelSide.swp_boxed .nc_tweetContainer i.sw,.swp_social_panelSide.swp_circles .nc_tweetContainer i.sw{font-size:27px;height:40px;margin:0;padding-top:10px;text-align:center;width:100%}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_share,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_share{height:35px;opacity:0;position:absolute;bottom:0;left:0;text-align:center;width:67.5px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_count,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_count{height:35px;margin:0;padding:0;position:absolute;bottom:0;left:0;text-align:center;-webkit-transition:padding 0.1s linear;transition:padding 0.1s linear;width:100%}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) span.swp_count.swp_hide,.swp_social_panelSide.swp_boxed .nc_tweetContainer span.swp_hide .iconFiller,.swp_social_panelSide.swp_boxed .nc_tweetContainer span.swp_hide .spaceManWilly,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) span.swp_count.swp_hide,.swp_social_panelSide.swp_circles .nc_tweetContainer span.swp_hide .iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer span.swp_hide .spaceManWilly{height:67.5px;opacity:1}.swp_social_panelSide.swp_boxed .nc_tweetContainer span.iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer span.iconFiller{height:40px;width:67.5px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover span.swp_count:not(.swp_hide),.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover span.swp_count:not(.swp_hide){opacity:0}.swp_social_panelSide.swp_boxed .total_shares,.swp_social_panelSide.swp_circles .total_shares{padding:0;width:67.5px!important}.swp_social_panelSide .nc_tweetContainer:not(.total_shares){line-height:34px}.swp_social_panelSide:not(.swp_boxed):not(.swp_circles) .nc_tweetContainer:not(.total_shares) .iconFiller{margin-left:2px;width:30px}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_count{padding:0 8px;width:48px}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_count.swp_hide{padding:0;width:100%}.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .swp_count.swp_hide .iconFiller{display:block;float:none;margin:0 auto}.swp_social_panelSide:not(.swp_boxed):not(.swp_circles) .nc_tweetContainer:not(.total_shares):hover{width:150px}.swp_social_panelSide .nc_tweetContainer[data-network]:not(.total_shares):hover .iconFiller,.swp_social_panelSide .nc_tweetContainer:not(.total_shares) .spaceManWilly{width:90px}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover .iconFiller,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) .spaceManWilly,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover .iconFiller,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) .spaceManWilly{width:100%}.swp_social_panelSide .nc_tweetContainer.total_shares{background:rgba(0,0,0,0);border:0!important;font-weight:800;height:55px;margin:0;padding:0;text-align:center;width:90px;order:-100}.swp_social_panelSide .nc_tweetContainer.total_shares .swp_count{color:#444;display:block;font-family:Lato,sans-serif;height:28px;text-align:center;width:100%}.swp_social_panelSide .nc_tweetContainer.total_shares .swp_label{color:#444;display:block;font-family:Lato,sans-serif;font-size:50%;position:relative;text-align:center;width:100%}.nc_wrapper{background:white;position:fixed;-webkit-transition:top 0.5s bottom 0.5s;transition:top 0.5s bottom 0.5s;width:100%;z-index:99999}.nc_wrapper.bottom{bottom:0;left:0}.nc_wrapper.top{top:0;left:0}.nc_floater{margin:10px 0;position:relative;left:304px;width:740px}.swp_social_panelSide.hideCounts a{text-align:center}.swp_social_panelSide.hideCounts .iconFiller{float:none;text-align:left}.sw{display:inline-block;font-family:sw-icon-font!important;font-size:inherit;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-style:normal;font-weight:normal;text-rendering:auto;text-transform:none!important;-ms-transform:translate(0,0);-webkit-transform:translate(0,0);transform:translate(0,0)}.sw:before{display:block!important}.wp-editor-container .sw:before{font-size:18px;line-height:22px}.wp-editor-container .sw-social-warfare:before{color:#ee464f}.mce-container .sw-social-warfare{color:#ee464f;font-size:20px;margin-right:15px;vertical-align:middle}i.swp_google_plus_icon:before{content:"h"}i.swp_pinterest_icon:before{content:"b"}i.swp_twitter_icon:before{content:"s"}i.swp_facebook_icon:before{content:"j"}i.swp_linkedin_icon:before{content:"f"}i.swp_tumblr_icon:before{content:"r"}i.swp_stumbleupon_icon:before{content:"q"}i.swp_reddit_icon:before{content:"a"}i.swp_email_icon:before{content:"k"}i.swp_yummly_icon:before{content:"x"}i.swp_whatsapp_icon:before{content:"y"}i.swp_pocket_icon:before{content:"B"}i.swp_buffer_icon:before{content:"z"}i.swp_hacker_news_icon:before{content:"D"}i.swp_flipboard_icon:before{content:"C"}.sw-social-warfare:before{content:"p"}.swp_CTT{text-decoration:none!important}.sw-tweet-clear{zoom:1}.sw-tweet-clear:after{clear:both;content:".";display:block;height:0;visibility:hidden}.sw-click-to-tweet{display:block;margin:15px 0;padding:15px 30px;position:relative}.sw-click-to-tweet:after{clear:both;content:".";display:block;height:0;line-height:0;visibility:hidden}.sw-click-to-tweet .sw-ctt-text{margin:0 0 10px;padding:0;position:relative;word-wrap:break-word}a .sw-click-to-tweet .sw-ctt-text{display:block;font-size:24px;font-weight:500;line-height:140%;margin:0;padding:0;position:relative;text-decoration:none;text-transform:none}.sw-click-to-tweet .sw-ctt-btn{display:block;float:right;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:bold;line-height:100%;margin:10px 0 0;padding:3px 5px 3px 3px;position:relative;text-decoration:none;text-transform:uppercase}.sw-click-to-tweet i.swp_twitter_icon{float:right;font-size:21px;margin-left:15px!important;margin-top:2px;text-transform:none}a.swp_CTT.style1 .sw-click-to-tweet{background-color:#fff;border:1px solid #ddd;-webkit-border-radius:4px;border-radius:4px}a.swp_CTT.style2 .sw-click-to-tweet{background-color:#fff;border:4px double #ddd;-webkit-border-radius:0;border-radius:0}a.style2 .sw-click-to-tweet .sw-ctt-text{color:#666;font-style:italic;text-decoration:none}a.swp_CTT.style3:hover .sw-click-to-tweet{border-left:10px solid #3c87b2;padding-right:20px;-webkit-transition:all 0.25s linear;transition:all 0.25s linear}a.swp_CTT.style3 .sw-click-to-tweet{background-color:#429cd6;border:none;border-left:10px solid #429cd6;-webkit-border-radius:0;border-radius:0;padding-right:20px;-webkit-transition:all 0.25s linear;transition:all 0.25s linear}a.style3 .sw-click-to-tweet .sw-ctt-text{color:#fff;font-style:italic;text-decoration:none}a.swp_CTT.style4:hover .sw-click-to-tweet{border-left:10px solid #3c87b2;-webkit-transition:all 0.25s linear;transition:all 0.25s linear}a.swp_CTT.style4 .sw-click-to-tweet{background-color:#333;border-left:10px solid #c33;-webkit-border-radius:0;border-radius:0;-webkit-transition:all 0.25s linear;transition:all 0.25s linear}a.swp_CTT.style5:hover .sw-click-to-tweet{background-color:#d34250;border-left:10px solid #30394f;-webkit-transition:all 0.25s linear;transition:all 0.25s linear}a.swp_CTT.style5 .sw-click-to-tweet{background-color:#30394f;border-left:10px solid #d34250;-webkit-border-radius:0;border-radius:0;-webkit-transition:all 0.25s linear;transition:all 0.25s linear}a.swp_CTT.style6:hover .sw-click-to-tweet{background-color:#ced3dc;border-left:10px solid #d34250;-webkit-transition:all 0.25s linear;transition:all 0.25s linear}a.swp_CTT.style6 .sw-click-to-tweet{background-color:#eee;border-left:10px solid #d34250;-webkit-border-radius:0;border-radius:0;-webkit-transition:all 0.25s linear;transition:all 0.25s linear}a.style6 .sw-click-to-tweet i.swp_twitter{color:#30394f}.swp_pop_thumb{-webkit-border-radius:3px;border-radius:3px;float:left;height:100px;margin:5px 25px 5px 0;width:100px}.swp_popular_post{clear:both}.swp_clearfix:after{clear:both;content:" ";display:block;height:0;visibility:hidden}.swp_popular_post a.swp_popularity{border:none;display:block;line-height:1.5;margin:20px 0}span.swp_pop_count{display:block;font-size:70%}.swp_widget_box{-webkit-border-radius:3px;border-radius:3px}div.sw-pinit{display:table!important;line-height:0;position:relative!important}div.sw-pinit a.sw-pinit-button,div.sw-pinit a.sw-pinit-button:visited{background:#cd2029;border:1px solid #aa1b29;border:0;border-bottom:none;-webkit-border-radius:4px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;color:#fff;font-family:Lato,sans-serif;font-size:20px;font-size:15px;height:32px;line-height:32px;opacity:0;padding:0 20px;position:absolute;text-decoration:none;text-decoration:none;-webkit-transition:opacity 0.5s;transition:opacity 0.5s;z-index:200}div.sw-pinit:hover a.sw-pinit-button,div.sw-pinit:focus a.sw-pinit-button{opacity:1}div.sw-pinit a.sw-pinit-button::before{color:#fff;content:"b";float:left;font-family:sw-icon-font;font-size:20px;font-weight:400;line-height:36px;margin-left:-5px;margin-right:10px}div.sw-pinit a.sw-pinit-button:hover::before{content:"F"}div.sw-pinit a.sw-pinit-button:hover,div.sw-pinit a.sw-pinit-button:focus{background:#aa1b29;color:#fff;text-decoration:none}div.sw-pinit .sw-pinit-left{left:30px}div.sw-pinit .sw-pinit-center{margin-left:-60px;left:50%}div.sw-pinit .sw-pinit-right{right:30px}div.sw-pinit .sw-pinit-top{top:30px}div.sw-pinit .sw-pinit-middle{margin-top:-25px;top:50%}div.sw-pinit .sw-pinit-bottom{bottom:30px}.swp_social_panel.notMobile .nc_tweetContainer:nth-last-child(1),.mobile .nc_tweetContainer:nth-last-child(2),.nc_tweetContainer.total_shares:nth-last-child(1){margin-right:0}.swp_social_panel.swp_default_full_color a,html body .swp_social_panel.swp_individual_full_color .nc_tweetContainer:hover a,body .swp_social_panel.swp_other_full_color:hover a,.swp_social_panel.swp_default_light_gray a,html body .swp_social_panel.swp_individual_light_gray .nc_tweetContainer:hover a,body .swp_social_panel.swp_other_light_gray:hover a,.swp_social_panel.swp_default_medium_gray a,html body .swp_social_panel.swp_individual_medium_gray a:hover,body .swp_social_panel.swp_other_medium_gray:hover a,.swp_social_panel.swp_default_dark_gray a,html body .swp_social_panel.swp_individual_dark_gray a:hover,body .swp_social_panel.swp_other_dark_gray:hover a{color:white}.swp_social_panel.swp_default_color_outlines .swp_twitter a,html body .swp_social_panel.swp_individual_color_outlines .swp_twitter a:hover,body .swp_social_panel.swp_other_color_outlines:hover .swp_twitter a,.wp-editor-container .swp_twitter:before,a.style1 .sw-click-to-tweet i.swp_twitter,a.style2 .sw-click-to-tweet i.swp_twitter{color:#429cd6}.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares) .swp_hide span.swp_share,.swp_social_panelSide.swp_boxed .nc_tweetContainer:not(.total_shares):hover span.swp_share:not(.swp_hide),.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares) .swp_hide span.swp_share,.swp_social_panelSide.swp_circles .nc_tweetContainer:not(.total_shares):hover span.swp_share:not(.swp_hide){opacity:1}.swp_social_panel.mobile .iconFiller ~ .swp_count,.sw-content-locator{display:none}a.style1 .sw-click-to-tweet .sw-ctt-text,a.style1 .sw-click-to-tweet .sw-ctt-btn{color:#999;text-decoration:none}a.style1:hover .sw-click-to-tweet .sw-ctt-text,a.style1:hover .sw-click-to-tweet .sw-ctt-btn,a.style2:hover .sw-click-to-tweet .sw-ctt-text,a.style2 .sw-click-to-tweet .sw-ctt-btn,a.style2:hover .sw-click-to-tweet .sw-ctt-btn{color:#666;text-decoration:none}a.style3:hover .sw-click-to-tweet .sw-ctt-text,a.style3 .sw-click-to-tweet .sw-ctt-btn,a.style3:hover .sw-click-to-tweet .sw-ctt-btn,a.style3 .sw-click-to-tweet i.swp_twitter,a.style4 .sw-click-to-tweet .sw-ctt-text,a.style4:hover .sw-click-to-tweet .sw-ctt-text,a.style4 .sw-click-to-tweet .sw-ctt-btn,a.style4:hover .sw-click-to-tweet .sw-ctt-btn,a.style5 .sw-click-to-tweet .sw-ctt-text,a.style5:hover .sw-click-to-tweet .sw-ctt-text,a.style5 .sw-click-to-tweet .sw-ctt-btn,a.style5:hover .sw-click-to-tweet .sw-ctt-btn{color:#fff;text-decoration:none}a.style4 .sw-click-to-tweet i.swp_twitter,a.style5 .sw-click-to-tweet i.swp_twitter{color:#fff}a.style6 .sw-click-to-tweet .sw-ctt-text,a.style6 .sw-click-to-tweet .sw-ctt-btn{color:#30394f;text-decoration:none}a.style6:hover .sw-click-to-tweet .sw-ctt-text,a.style6:hover .sw-click-to-tweet .sw-ctt-btn,a.style6:hover .sw-click-to-tweet i.swp_twitter{color:#2a2d34;text-decoration:none}.scale-70{-ms-transform:scale(0.7);-webkit-transform:scale(0.7);transform:scale(0.7)}.swp_social_panel:not(.nc_floater).scale-70.scale-full_width{width:142.8571428571429%!important}.scale-80{-ms-transform:scale(0.8);-webkit-transform:scale(0.8);transform:scale(0.8)}.swp_social_panel:not(.nc_floater).scale-80.scale-full_width{width:125%!important}.scale-90{-ms-transform:scale(0.9);-webkit-transform:scale(0.9);transform:scale(0.9)}.swp_social_panel:not(.nc_floater).scale-90.scale-full_width{width:111.111111111111%!important}.scale-110{-ms-transform:scale(1.1);-webkit-transform:scale(1.1);transform:scale(1.1)}.swp_social_panel:not(.nc_floater).scale-110.scale-full_width{width:90.90909090909091%!important}.scale-120{-ms-transform:scale(1.2);-webkit-transform:scale(1.2);transform:scale(1.2)}.swp_social_panel:not(.nc_floater).scale-120.scale-full_width{width:83.33333333333333%!important}.scale-130{-ms-transform:scale(1.3);-webkit-transform:scale(1.3);transform:scale(1.3)}.swp_social_panel:not(.nc_floater).scale-130.scale-full_width{width:76.92307692307692%!important}.scale-140{-ms-transform:scale(1.4);-webkit-transform:scale(1.4);transform:scale(1.4)}.swp_social_panel:not(.nc_floater).scale-140.scale-full_width{width:71.42857142857143%!important}.scale-full_width,.scale-left,.nc_floater.scale-center,.nc_floater.scale-right{-ms-transform-origin:left;-webkit-transform-origin:left;transform-origin:left}.scale-right{-ms-transform-origin:right;-webkit-transform-origin:right;transform-origin:right}.scale-center{-ms-transform-origin:center;-webkit-transform-origin:center;transform-origin:center}div.swp_social_panel .nc_tweetContainer.swp_emphasize{-webkit-box-flex:2;-moz-box-flex:2;-webkit-flex:2;-ms-flex:2;flex:2}.sw-pinit.aligncenter{margin:0 auto}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){div.sw-pinit{display:inline-block!important;max-width:100%}}.swp_hidden_pin_image{height:0;opacity:0;position:absolute;top:0;width:0;z-index:-10}.fl-module-content .uabb-blog-posts .uabb-post-thumbnail .sw-pinit.lazyloaded{display:block!important}.swp-content-locator{display:none!important;margin:0!important}.float-position-top-left{transform-origin:top left}.float-position-center-left{transform-origin:center left}.float-position-bottom-left{transform-origin:bottom left}.float-position-top-right{transform-origin:top right}.float-position-center-right{transform-origin:center right}.float-position-bottom-right{transform-origin:bottom right}div[class*=custom_color][class^=_wrapper]{display:none}
 
fonts/sw-icon-font.eot DELETED
Binary file
fonts/sw-icon-font.ttf DELETED
Binary file
fonts/sw-icon-font.woff DELETED
Binary file
functions/admin/options-fetch.php DELETED
@@ -1,156 +0,0 @@
1
- <?php
2
- /**
3
- * Functions for getting and setting the plugin's options.
4
- *
5
- * @package SocialWarfare\Functions
6
- * @copyright Copyright (c) 2018, Warfare Plugins, LLC
7
- * @license GPL-3.0+
8
- * @since 1.0.0
9
- */
10
-
11
- defined( 'WPINC' ) || die;
12
-
13
- // Set the global options variable
14
- global $swp_user_options;
15
-
16
- /**
17
- * $swp_user_options Fetch the available options that the user has set
18
- * @var array An array of available options from the options page
19
- */
20
- $swp_user_options = swp_get_user_options( is_admin() );
21
-
22
- /**
23
- * A function to adjust the options and ensure that defaults are set
24
- *
25
- * @param boolean $admin A boolean value to determine if it's being called in the admin or elsewhere
26
- * @return array $options The modified options array
27
- */
28
- function swp_get_user_options( $admin = false ) {
29
- $options = get_option( 'social_warfare_settings', array() );
30
- return $options;
31
-
32
-
33
- if(isset($options['activate_tweet_counts']) && true == $options['activate_tweet_counts'] && !isset($options['tweet_count_source']) ) {
34
- $options['tweet_count_source'] = 'newsharecounts';
35
- }
36
-
37
- /**
38
- * Set the default og:type values for each post type
39
- *
40
- */
41
- $swp_post_types = swp_get_post_types();
42
-
43
- // Make the side custom absorb the main custom color if they haven't set one yet.
44
- if(empty($options['single_custom_color']) ):
45
- $options['single_custom_color'] = $options['custom_color'];
46
- endif;
47
-
48
- // Force the plugin off on certain post types.
49
- $options['locationattachment'] = 'none';
50
- $options['locationrevision'] = 'none';
51
- $options['nav_menu_item'] = 'none';
52
- $options['shop_order'] = 'none';
53
- $options['shop_order_refund'] = 'none';
54
- $options['shop_coupon'] = 'none';
55
- $options['shop_webhook'] = 'none';
56
-
57
- if( function_exists('is_swp_registered') ):
58
- $swp_registration = is_swp_addon_registered('pro');
59
- else:
60
- $swp_registration = false;
61
- endif;
62
-
63
- if ( $admin || true === $swp_registration ) :
64
- if ( 'total_shares' === $options['totals_alignment'] ) :
65
- $options['totals_alignment'] = 'totals_right';
66
- endif;
67
- else:
68
- $options['twitter_cards'] = false;
69
- $options['button_shape'] = 'flat_fresh';
70
- $options['default_colors'] = 'full_color';
71
- $options['single_colors'] = 'full_color';
72
- $options['hover_colors'] = 'full_color';
73
- $options['float_default_colors'] = 'full_color';
74
- $options['float_single_colors'] = 'full_color';
75
- $options['float_hover_colors'] = 'full_color';
76
- $options['float_style_source'] = true;
77
- $options['button_size'] = 1;
78
- $options['button_alignment'] = 'full_width';
79
- $options['ctt_theme'] = 'style1';
80
- $options['ctt_css'] = "";
81
- $options['twitter_shares'] = false;
82
- $options['recover_shares'] = false;
83
- $options['google_analtyics'] = false;
84
- $options['bitly_authentication'] = false;
85
- $options['minimum_shares'] = 0;
86
- $options['swp_click_tracking'] = false;
87
- $options['order_of_icons'] = 'manual';
88
- $options['pinit_toggle'] = false;
89
- $options['pinit_location_horizontal'] = 'center';
90
- $options['pinit_location_vertical'] = 'top';
91
- $options['emphasize_icons'] = 0;
92
- $options['float_mobile'] = 'off';
93
- $options['pin_browser_extension'] = false;
94
- $options['pinterest_image_location'] = 'hidden';
95
- $options['pinterest_fallback'] = 'all';
96
- endif;
97
-
98
- if(isset($options['order_of_icons']['active'])) {
99
- unset($options['order_of_icons']['active']);
100
- }
101
-
102
- /**
103
- * Unset any buttons that may have been put into the options but are no longer actually available
104
- *
105
- */
106
- }
107
-
108
- /**
109
- * Fetch a single option
110
- *
111
- * @since unknown
112
- * @param string $key The key to pull from the array of options.
113
- * @return mixed $options The value of the desired option
114
- */
115
- function swp_get_single_option( $key ) {
116
- global $swp_user_options;
117
-
118
- if ( isset( $swp_user_options[ $key ] ) ) {
119
- return $swp_user_options[ $key ];
120
- }
121
-
122
- return false;
123
- }
124
-
125
- /**
126
- * Update the main plugin options.
127
- *
128
- * @since 2.1.0
129
- * @param array $options The option values to be set.
130
- * @return bool True if the option has been updated.
131
- */
132
- function swp_update_options( $options ) {
133
- if ( ! is_array( $options ) ) {
134
- return false;
135
- }
136
-
137
- unset( $options['orderOfIcons'] );
138
-
139
- return update_option( 'social_warfare_settings', $options );
140
- }
141
-
142
- /**
143
- * Update a single option.
144
- *
145
- * @since 2.1.0
146
- * @param string $key The key to set in the array of options.
147
- * @param mixed $value The option value to be set.
148
- * @return bool True if the option has been updated.
149
- */
150
- function swp_update_option( $key, $value ) {
151
- $options = get_option( 'social_warfare_settings', array() );
152
-
153
- $options[ $key ] = $value;
154
-
155
- return swp_update_options( $options );
156
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/admin/options-registration.php DELETED
@@ -1,87 +0,0 @@
1
- <?php
2
- /**
3
- * Functions for loading the admin options page.
4
- *
5
- * @package SocialWarfare\Admin\Functions
6
- * @copyright Copyright (c) 2018, Warfare Plugins, LLC
7
- * @license GPL-3.0+
8
- * @since 1.0.0
9
- */
10
-
11
- $premium_code = '';
12
- $email = '';
13
-
14
- // Fetch the registration keys from pro and all other addons
15
- $array = array();
16
- $registrations = apply_filters('swp_registrations' , $array);
17
-
18
- foreach($registrations as $registration):
19
- if ( ! empty( $swp_user_options[$registration['key'].'_license_key'] ) ) {
20
- $license_key = $swp_user_options[$registration['key'].'_license_key'];
21
- $registered = 1;
22
- } else {
23
- $license_key = '';
24
- $registered = 0;
25
- }
26
- ?>
27
-
28
- <div class="registration-wrapper <?php echo $registration['key'] ?>" registration="<?php echo $registered; ?>">
29
-
30
- <h2><?php esc_html_e( $registration['plugin_name'].' Registration' , 'social-warfare' ); ?></h2>
31
-
32
- <div class="sw-grid sw-col-940 swp_is_not_registered">
33
-
34
- <div class="sw-red-notice">
35
- <?php _e( 'This copy of '.$registration['plugin_name'].' is NOT registered. <a target="_blank" href="https://warfareplugins.com">Click here</a> to purchase a license or add your account info below.' , 'social-warfare' ); ?>
36
- </div>
37
-
38
- <p class="sw-subtitle sw-registration-text">
39
- <?php esc_html_e( 'Enter your registration key for '.$registration['plugin_name'] .' and then click Register Plugin.' , 'social-warfare' ); ?>
40
- </p>
41
-
42
- <div class="sw-grid sw-col-300">
43
- <p class="sw-input-label">
44
- <?php esc_html_e( $registration['plugin_name'].' License Key' , 'social-warfare' ); ?>
45
- </p>
46
- </div>
47
-
48
- <div class="sw-grid sw-col-300">
49
- <input name="<?php echo $registration['key'] ?>_license_key" type="text" class="sw-admin-input" placeholder="License Key" value="<?php echo $license_key; ?>" />
50
- </div>
51
-
52
- <div class="sw-grid sw-col-300 sw-fit register_button_grid">
53
- <a href="#" class="register-plugin button sw-navy-button" swp-addon="<?php echo $registration['key']; ?>" swp-item-id="<?php echo $registration["product_id"]; ?>">
54
- <?php esc_html_e( 'Register Plugin' , 'social-warfare' ); ?>
55
- </a>
56
- </div>
57
-
58
- <div class="sw-clearfix"></div>
59
- </div>
60
-
61
- <div class="sw-grid sw-col-940 swp_is_registered">
62
-
63
- <div class="sw-green-notice">
64
- <?php esc_html_e( 'This copy of '.$registration['plugin_name'].' is registered. Wah-hoo!', 'social-warfare' ); ?>
65
- </div>
66
-
67
- <p class="sw-subtitle sw-registration-text">
68
- <?php esc_html_e( 'To unregister your license click the button below to free it up for use on another domain.' , 'social-warfare' ); ?>
69
- </p>
70
-
71
- <div class="sw-grid sw-col-300">
72
- <p class="sw-authenticate-label">
73
- <?php esc_html_e( 'Deactivate Registration' , 'social-warfare' ); ?>
74
- </p>
75
- </div>
76
-
77
- <div class="sw-grid sw-col-300">
78
- <a href="#" class="unregister-plugin button sw-navy-button" swp-addon="<?php echo $registration['key']; ?>" swp-item-id="<?php echo $registration["product_id"]; ?>">
79
- <?php esc_html_e( 'Unregister Plugin' , 'social-warfare' ); ?>
80
- </a>
81
- </div>
82
- <div class="sw-grid sw-col-300 sw-fit"></div>
83
-
84
- </div>
85
-
86
- </div>
87
- <?php endforeach; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/admin/registration.php DELETED
@@ -1,347 +0,0 @@
1
- <?php
2
- /**
3
- * Functions for getting and setting the plugin's registration status.
4
- *
5
- * @package SocialWarfare\Functions
6
- * @copyright Copyright (c) 2018, Warfare Plugins, LLC
7
- * @license GPL-3.0+
8
- * @since 1.0.0
9
- */
10
-
11
- /**
12
- * A function to be used to make cURL requests
13
- * @param string $url The URL to be fetched
14
- * @return string The response from the server
15
- *
16
- */
17
- function swpp_file_get_contents_curl( $url ) {
18
- $ch = curl_init();
19
- curl_setopt( $ch, CURLOPT_URL, $url );
20
- curl_setopt( $ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT'] );
21
- curl_setopt( $ch, CURLOPT_FAILONERROR, 0 );
22
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 0 );
23
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER,1 );
24
- curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
25
- curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, false );
26
- curl_setopt( $ch, CURLOPT_TIMEOUT, 5 );
27
- curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 5 );
28
- curl_setopt( $ch, CURLOPT_NOSIGNAL, 1 );
29
- curl_setopt( $ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
30
- $cont = @curl_exec( $ch );
31
- $curl_errno = curl_errno( $ch );
32
- curl_close( $ch );
33
- if ( $curl_errno > 0 ) {
34
- return false;
35
- }
36
- return $cont;
37
- }
38
-
39
- /**
40
- * Check to see if the plugin has been registered once per page load.
41
- *
42
- * @since 2.1.0
43
- * @param string $domain The current site's domain.
44
- * @param string $context The context where the key will be used.
45
- * @return string A registration key based on the site's domain.
46
- */
47
- function swp_get_registration_key( $domain, $context = 'api' ) {
48
- $key = md5( $domain );
49
-
50
- if ( 'db' === $context ) {
51
- $key = md5( $key );
52
- }
53
-
54
- return $key;
55
- }
56
-
57
- /**
58
- * Check to see if an addon has been registered once per page load.
59
- * Once per week, we'll ping our server to ask if the license key is still valid.
60
- *
61
- * @since 2.3.3 - Created the function to work for all addons, not just the pro addon
62
- * @since 3.0.6 | 14 MAY 2018 | Added check for array key to prevent undefined index notice.
63
- * @param string The unique key for the addon
64
- * @return bool True if the plugin is registered, false otherwise.
65
- */
66
- function is_swp_addon_registered($key) {
67
-
68
- // Get the plugin options from the database
69
- $options = get_option( 'social_warfare_settings' );
70
- $is_registered = false;
71
-
72
- // Get the timestamps setup for comparison to see if a week has passed since our last check
73
- $current_time = time();
74
- if(!isset($options[$key.'_license_key_timestamp'])):
75
- $timestamp = 0;
76
- else:
77
- $timestamp = $options[$key.'_license_key_timestamp'];
78
- endif;
79
- $time_to_recheck = $timestamp + 604800;
80
-
81
- // If they have a key and a week hasn't passed since the last check, just return true...the plugin is registered.
82
- if( !empty($options[$key.'_license_key']) && $current_time < $time_to_recheck ) {
83
-
84
- $is_registered = true;
85
-
86
- // If a week has indeed passed since the last check, ping our API to check the validity of the license key
87
- } elseif( !empty($options[$key.'_license_key']) ){
88
-
89
- // Setup the API parameters
90
- $license = $options[$key.'_license_key'];
91
- $site_url = swp_get_site_url();
92
- $store_url = 'https://warfareplugins.com';
93
- $registration_array = array();
94
- $registration_array = apply_filters( 'swp_registrations' , $registration_array );
95
-
96
- if ( !array_key_exists( $key, $registration_array ) ) :
97
- return $is_registered;
98
- endif;
99
-
100
- $item_id = $registration_array[$key]['product_id'];
101
-
102
-
103
- $api_params = array(
104
- 'edd_action' => 'check_license',
105
- 'item_id' => $item_id,
106
- 'license' => $license,
107
- 'url' => $site_url,
108
- );
109
-
110
- $response = wp_remote_retrieve_body( wp_remote_post( $store_url , array('body' => $api_params, 'timeout' => 10 ) ) );
111
-
112
- if( false != $response ) {
113
-
114
- // Parse the response into an object
115
- $license_data = json_decode( $response );
116
-
117
- // If the license was invalid
118
- if( isset($license_data->license) && 'invalid' == $license_data->license) {
119
- $is_registered = false;
120
- $options[$key.'_license_key'] = '';
121
- $options[$key.'_license_key_timestamp'] = $current_time;
122
- update_option( 'social_warfare_settings' , $options );
123
-
124
- // If the property is some other status, just go with it.
125
- } else {
126
- $options[$key.'_license_key_timestamp'] = $current_time;
127
- update_option( 'social_warfare_settings' , $options );
128
- $is_registered = true;
129
- }
130
-
131
- // If we recieved no response from the server, we'll just check again next week
132
- } else {
133
- $options[$key.'_license_key_timestamp'] = $current_time;
134
- update_option( 'social_warfare_settings' , $options );
135
- $is_registered = true;
136
- }
137
- }
138
-
139
- // Return the registration value true/false
140
- return $is_registered;
141
- }
142
-
143
- /**
144
- * Check to see if the plugin has been registered once per page load.
145
- * Once per week, we'll ping our server to ask if the license key is still valid.
146
- *
147
- * @since unknown
148
- * @since 2.3.3 Forward the request to the is_swp_addon_registered() function.
149
- * @return bool True if the plugin is registered, false otherwise.
150
- */
151
- function is_swp_registered($timeline = false) {
152
-
153
- return is_swp_addon_registered('pro');
154
-
155
- }
156
-
157
- /**
158
- * Attempt to register the plugin.
159
- *
160
- * @since 2.1.0
161
- * @since 2.3.0 Hooked registration into the new EDD Software Licensing API
162
- * @param none
163
- * @return JSON Encoded Array (Echoed) - The Response from the EDD API
164
- *
165
- */
166
- add_action( 'wp_ajax_swp_register_plugin', 'swp_register_plugin' );
167
- function swp_register_plugin() {
168
-
169
- // Check to ensure that license key was passed into the function
170
- if(!empty($_POST['license_key'])) {
171
-
172
- // Grab the license key so we can use it below
173
- $name_key = $_POST['name_key'];
174
- $license = $_POST['license_key'];
175
- $item_id = $_POST['item_id'];
176
- $site_url = swp_get_site_url();
177
- $store_url = 'https://warfareplugins.com';
178
-
179
- $api_params = array(
180
- 'edd_action' => 'activate_license',
181
- 'item_id' => $item_id,
182
- 'license' => $license,
183
- 'url' => $site_url
184
- );
185
-
186
- $response = wp_remote_retrieve_body( wp_remote_post( $store_url, array( 'body' => $api_params, 'timeout' => 10 ) ) );
187
-
188
- // $url ='https://warfareplugins.com/?edd_action=activate_license&item_id='.$item_id.'&license='.$license.'&url='.swp_get_site_url();
189
- // $response = swpp_file_get_contents_curl( $url );
190
-
191
- if(false != $response){
192
-
193
- // Parse the response into an object
194
- $license_data = json_decode( $response );
195
-
196
- // If the license is valid store it in the database
197
- if( isset($license_data->license) && 'valid' == $license_data->license ) {
198
-
199
- $current_time = time();
200
- $options = get_option( 'social_warfare_settings' );
201
- $options[$name_key.'_license_key'] = $license;
202
- $options[$name_key.'_license_key_timestamp'] = $current_time;
203
- update_option( 'social_warfare_settings' , $options );
204
-
205
- echo json_encode($license_data);
206
- wp_die();
207
-
208
- // If the license is not valid
209
- } elseif( isset($license_data->license) && 'invalid' == $license_data->license ) {
210
- echo json_encode($license_data);
211
- wp_die();
212
-
213
- // If some other status was returned
214
- } else {
215
- $license_data['success'] = false;
216
- $license_data['data'] = 'Invaid response from the registration server.';
217
- echo json_encode($license_data);
218
- wp_die();
219
- }
220
-
221
- // If we didn't get a response from the registration server
222
- } else {
223
- $license_data['success'] = false;
224
- $license_data['data'] = 'Failed to connect to registration server.';
225
- echo json_encode($license_data);
226
- wp_die();
227
- }
228
- } else {
229
- $license_data['success'] = false;
230
- $license_data['data'] = 'Admin Ajax did not receive valid POST data.';
231
- echo json_encode($license_data);
232
- wp_die();
233
- }
234
-
235
- wp_die();
236
-
237
- }
238
-
239
- /**
240
- * Attempt to unregister the plugin.
241
- *
242
- * @since 2.1.0
243
- * @since 2.3.0 Hooked into the EDD Software Licensing API
244
- * @param none
245
- * @return JSON Encoded Array (Echoed) - The Response from the EDD API
246
- */
247
- add_action( 'wp_ajax_swp_unregister_plugin', 'swp_unregister_plugin' );
248
- function swp_unregister_plugin() {
249
-
250
- // Setup the variables needed for processing
251
- $options = get_option( 'social_warfare_settings' );
252
- $name_key = $_POST['name_key'];
253
- $item_id = $_POST['item_id'];
254
- $site_url = swp_get_site_url();
255
- $store_url = 'https://warfareplugins.com';
256
-
257
- // Check to see if the license key is even in the options
258
- if(empty($options[$name_key.'_license_key'])) {
259
- $response['success'] = true;
260
- echo json_encode($response);
261
- } else {
262
-
263
- // Grab the license key so we can use it below
264
- $license = $options[$name_key.'_license_key'];
265
-
266
- // Setup the API request parameters
267
- $api_params = array(
268
- 'edd_action' => 'deactivate_license',
269
- 'item_id' => $item_id,
270
- 'license' => $license,
271
- 'url' => $site_url,
272
- );
273
-
274
- $response = wp_remote_retrieve_body( wp_remote_post( $store_url, array( 'body' => $api_params, 'timeout' => 10 ) ) );
275
-
276
- // Parse the response into an object
277
- $license_data = json_decode( $response );
278
-
279
- // If the deactivation was valid update the database
280
- if( isset($license_data->license) && $license_data->license == 'valid' ) {
281
-
282
- $options = get_option( 'social_warfare_settings' );
283
- $options[$name_key.'_license_key'] = '';
284
- update_option( 'social_warfare_settings' , $options );
285
- echo json_encode($license_data);
286
- wp_die();
287
-
288
- // If the API request didn't work, just deactivate locally anyways
289
- } else {
290
-
291
- $options = get_option( 'social_warfare_settings' );
292
- $options[$name_key.'_license_key'] = '';
293
- update_option( 'social_warfare_settings' , $options );
294
- echo json_encode($license_data);
295
- wp_die();
296
- }
297
- }
298
-
299
- wp_die();
300
- }
301
-
302
- add_action( 'wp_ajax_swp_ajax_passthrough', 'swp_ajax_passthrough' );
303
- /**
304
- * Pass ajax responses to a remote HTTP request.
305
- *
306
- * @since 2.0.0
307
- * @return void
308
- */
309
- function swp_ajax_passthrough() {
310
- if ( ! check_ajax_referer( 'swp_plugin_registration', 'security', false ) ) {
311
- wp_send_json_error( esc_html__( 'Security failed.', 'social-warfare' ) );
312
- die;
313
- }
314
-
315
- $data = wp_unslash( $_POST ); // Input var okay.
316
-
317
- if ( ! isset( $data['activity'], $data['email'] ) ) {
318
- wp_send_json_error( esc_html__( 'Required fields missing.', 'social-warfare' ) );
319
- die;
320
- }
321
-
322
- if ( 'register' === $data['activity'] ) {
323
- $response = swp_register_plugin( $data['email'], swp_get_site_url() );
324
-
325
- if ( ! $response ) {
326
- wp_send_json_error( esc_html__( 'Plugin could not be registered.', 'social-warfare' ) );
327
- die;
328
- }
329
-
330
- $response['message'] = esc_html__( 'Plugin successfully registered!', 'social-warfare' );
331
- }
332
-
333
- if ( 'unregister' === $data['activity'] && isset( $data['key'] ) ) {
334
- $response = swp_unregister_plugin( $data['email'], $data['key'] );
335
-
336
- if ( ! $response ) {
337
- wp_send_json_error( esc_html__( 'Plugin could not be unregistered.', 'social-warfare' ) );
338
- die;
339
- }
340
-
341
- $response['message'] = esc_html__( 'Plugin successfully unregistered!', 'social-warfare' );
342
- }
343
-
344
- wp_send_json_success( $response );
345
-
346
- die;
347
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/includes/SWP_Addon.php DELETED
@@ -1,271 +0,0 @@
1
- <?php
2
-
3
- class SWP_Addon extends Social_Warfare {
4
- public function __construct() {
5
- parent::__construct();
6
- $this->name = '';
7
- $this->product_id = 0;
8
- $this->key = '';
9
- $this->version = '';
10
- $this->core_required = '3.0.0';
11
- $this->store_url = 'https://warfareplugins.com';
12
- $this->site_url = swp_get_site_url();
13
- add_action( 'wp_ajax_swp_register_plugin', [$this, 'register_plugin'] );
14
- add_action( 'wp_ajax_swp_unregister_plugin', [$this, 'unregister_plugin'] );
15
- add_action( 'wp_ajax_swp_ajax_passthrough', [$this, 'ajax_passthrough'] );
16
- }
17
-
18
-
19
- /**
20
- * The callback function used to add a new instance of this /**
21
- * to our swp_registrations filter.
22
- *
23
- * This should be the last item called in an addon's main file.
24
- *
25
- * @param array $addons The array of addons currently activated.
26
- */
27
- public function add_self( $addons ) {
28
- $this->establish_license_key();
29
- $this->registered = $this->is_registered();
30
-
31
- $addons[] = $this;
32
-
33
- return $addons;
34
- }
35
-
36
- public function register_plugin() {
37
- // Check to ensure that license key was passed into the function
38
- if ( !empty( $_POST['license_key'] ) ) :
39
-
40
- // Grab the license key so we can use it below
41
- $key = $_POST['name_key'];
42
- $license = $_POST['license_key'];
43
- $item_id = $_POST['item_id'];
44
- $this->store_url = 'https://warfareplugins.com';
45
-
46
- $api_params = array(
47
- 'edd_action' => 'activate_license',
48
- 'item_id' => $item_id,
49
- 'license' => $license,
50
- 'url' => $this->site_url
51
- );
52
-
53
- $response = wp_remote_retrieve_body( wp_remote_post( $this->store_url, array( 'body' => $api_params, 'timeout' => 10 ) ) );
54
-
55
- if ( false != $response ) :
56
-
57
- // Parse the response into an object
58
- $license_data = json_decode( $response );
59
-
60
- // If the license is valid store it in the database
61
- if( isset($license_data->license) && 'valid' == $license_data->license ) :
62
-
63
- $current_time = time();
64
- $options = get_option( 'social_warfare_settings' );
65
- $options[$key.'_license_key'] = $license;
66
- $options[$key.'_license_key_timestamp'] = $current_time;
67
- update_option( 'social_warfare_settings' , $options );
68
-
69
- echo json_encode($license_data);
70
- wp_die();
71
-
72
- // If the license is not valid
73
- elseif( isset($license_data->license) && 'invalid' == $license_data->license ) :
74
- echo json_encode($license_data);
75
- wp_die();
76
-
77
- // If some other status was returned
78
- else :
79
- $license_data['success'] = false;
80
- $license_data['data'] = 'Invaid response from the registration server.';
81
- echo json_encode($license_data);
82
- wp_die();
83
- endif;
84
-
85
- // If we didn't get a response from the registration server
86
- else :
87
- $license_data['success'] = false;
88
- $license_data['data'] = 'Failed to connect to registration server.';
89
- echo json_encode($license_data);
90
- wp_die();
91
- endif;
92
- endif;
93
-
94
- $license_data['success'] = false;
95
- $license_data['data'] = 'Admin Ajax did not receive valid POST data.';
96
- echo json_encode($license_data);
97
- wp_die();
98
-
99
- }
100
-
101
- public function establish_license_key() {
102
- $options = get_option( 'social_warfare_settings' );
103
-
104
- if ( isset ( $options[ $this->key . '_license_key'] ) ) :
105
- $this->license_key = $options[ $this->key . '_license_key'];
106
- endif;
107
-
108
- $this->license_key = '';
109
- }
110
-
111
- public function is_registered() {
112
- // Get the plugin options from the database
113
- $options = get_option( 'social_warfare_settings', false );
114
- $old_options = get_option( 'socialWarfareOptions', false );
115
-
116
- if ( isset( $options[$this->key . '_license_key'] ) ) :
117
- $this->license_key = $options[$this->key . '_license_key'];
118
- elseif ( isset( $old_options[$this->key . '_license_key'] ) ) :
119
- $this->license_key = $old_options[$this->key . '_license_key'];
120
- else:
121
- $this->license_key = '';
122
- endif;
123
-
124
-
125
- // Get the timestamps setup for comparison to see if a week has passed since our last check
126
- $current_time = time();
127
-
128
- if ( isset($options[$this->key.'_license_key_timestamp'] ) ) {
129
- $timestamp = $options[$this->key . '_license_key_timestamp'];
130
- }
131
-
132
- $timestamp = isset ( $timestamp ) ? $timestamp : 0;
133
-
134
- $time_to_recheck = $timestamp + 604800;
135
-
136
- // If they have a key and a week hasn't passed since the last check, just return true...the plugin is registered.
137
- if( !empty( $this->license_key) && $current_time < $time_to_recheck ) :
138
- return true;
139
- endif;
140
-
141
- // If a week has passed since the last check, ping our API to check the validity of the license key
142
- if ( !empty( $this->license_key) ) :
143
-
144
- $data = array(
145
- 'edd_action' => 'check_license',
146
- 'item_id' => $this->product_id,
147
- 'license' => $this->license_key,
148
- 'url' => $this->site_url,
149
- );
150
-
151
- $response = wp_remote_retrieve_body( wp_remote_post( $this->store_url , array('body' => $data, 'timeout' => 10 ) ) );
152
-
153
- if( false !== $response ) :
154
-
155
- // Parse the response into an object
156
- $license_data = json_decode( $response );
157
-
158
- $options[$this->key . '_license_key_timestamp'] = $current_time;
159
-
160
- // If the license was invalid
161
- if ( isset( $license_data->license ) && 'invalid' === $license_data->license ) :
162
- $is_registered = false;
163
- $this->license_key = '';
164
-
165
- $options[$this->key . '_license_key'] = '';
166
-
167
- update_option( 'social_warfare_settings' , $options );
168
-
169
- return false;
170
-
171
- // If the property is some other status, just go with it.
172
- else :
173
- $is_registered = true;
174
- update_option( 'social_warfare_settings' , $options );
175
-
176
- return true;
177
-
178
- endif;
179
-
180
- // If we recieved no response from the server, we'll just check again next week
181
- else :
182
- $options[$key.'_license_key_timestamp'] = $current_time;
183
- update_option( 'social_warfare_settings' , $options );
184
-
185
- return true;
186
- endif;
187
- endif;
188
-
189
-
190
- return false;
191
- }
192
-
193
- public function check_for_updates() {
194
- if ( version_compare(SWP_VERSION, $this->core_required) >= 0 ) :
195
-
196
- endif;
197
- }
198
-
199
- public function unregister_plugin() {
200
- // Setup the variables needed for processing
201
- $options = get_option( 'social_warfare_settings' );
202
- $key = $_POST['name_key'];
203
- $item_id = $_POST['item_id'];
204
-
205
- // Check to see if the license key is even in the options
206
- if ( empty( $options[$key.'_license_key'] ) ) :
207
- $response['success'] = true;
208
- echo json_encode($response);
209
- else :
210
- // Grab the license key so we can use it below
211
- $license = $options[$key.'_license_key'];
212
-
213
- // Setup the API request parameters
214
- $api_params = array(
215
- 'edd_action' => 'deactivate_license',
216
- 'item_id' => $item_id,
217
- 'license' => $license,
218
- 'url' => $this->site_url,
219
- );
220
-
221
- $response = wp_remote_retrieve_body( wp_remote_post( $this->store_url, array( 'body' => $api_params, 'timeout' => 10 ) ) );
222
-
223
- $options = get_option( 'social_warfare_settings' );
224
- $options[$key.'_license_key'] = '';
225
- update_option( 'social_warfare_settings' , $options );
226
- echo json_encode($license_data);
227
- endif;
228
-
229
- wp_die();
230
- }
231
-
232
- public function ajax_passthrough() {
233
- if ( ! check_ajax_referer( 'swp_plugin_registration', 'security', false ) ) {
234
- wp_send_json_error( esc_html__( 'Security failed.', 'social-warfare' ) );
235
- die;
236
- }
237
-
238
- $data = wp_unslash( $_POST ); // Input var okay.
239
-
240
- if ( ! isset( $data['activity'], $data['email'] ) ) {
241
- wp_send_json_error( esc_html__( 'Required fields missing.', 'social-warfare' ) );
242
- die;
243
- }
244
-
245
- if ( 'register' === $data['activity'] ) {
246
- $response = swp_register_plugin( $data['email'], swp_get_site_url() );
247
-
248
- if ( ! $response ) {
249
- wp_send_json_error( esc_html__( 'Plugin could not be registered.', 'social-warfare' ) );
250
- die;
251
- }
252
-
253
- $response['message'] = esc_html__( 'Plugin successfully registered!', 'social-warfare' );
254
- }
255
-
256
- if ( 'unregister' === $data['activity'] && isset( $data['key'] ) ) {
257
- $response = swp_unregister_plugin( $data['email'], $data['key'] );
258
-
259
- if ( ! $response ) {
260
- wp_send_json_error( esc_html__( 'Plugin could not be unregistered.', 'social-warfare' ) );
261
- die;
262
- }
263
-
264
- $response['message'] = esc_html__( 'Plugin successfully unregistered!', 'social-warfare' );
265
- }
266
-
267
- wp_send_json_success( $response );
268
-
269
- die;
270
- }
271
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/includes/registration.php DELETED
@@ -1,59 +0,0 @@
1
- <div class="registration-wrapper <?php echo $registration['key'] ?>" registration="<?php echo $registered; ?>">
2
-
3
- <h2><?php esc_html_e( $registration['plugin_name'].' Registration' , 'social-warfare' ); ?></h2>
4
-
5
- <div class="sw-grid sw-col-940 swp_is_not_registered">
6
-
7
- <div class="sw-red-notice">
8
- <?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' ); ?>
9
- </div>
10
-
11
- <p class="sw-subtitle sw-registration-text">
12
- <?php esc_html_e( 'Enter your registration key for '.$registration['plugin_name'] .' and then click Register Plugin.' , 'social-warfare' ); ?>
13
- </p>
14
-
15
- <div class="sw-grid sw-col-300">
16
- <p class="sw-input-label">
17
- <?php esc_html_e( $registration['plugin_name'].' License Key' , 'social-warfare' ); ?>
18
- </p>
19
- </div>
20
-
21
- <div class="sw-grid sw-col-300">
22
- <input name="<?php echo $registration['key'] ?>_license_key" type="text" class="sw-admin-input" placeholder="License Key" value="<?php echo $license_key; ?>" />
23
- </div>
24
-
25
- <div class="sw-grid sw-col-300 sw-fit register_button_grid">
26
- <a href="#" class="register-plugin button sw-navy-button" swp-addon="<?php echo $registration['key']; ?>" swp-item-id="<?php echo $registration["product_id"]; ?>">
27
- <?php esc_html_e( 'Register Plugin' , 'social-warfare' ); ?>
28
- </a>
29
- </div>
30
-
31
- <div class="sw-clearfix"></div>
32
- </div>
33
-
34
- <div class="sw-grid sw-col-940 swp_is_registered">
35
-
36
- <div class="sw-green-notice">
37
- <?php esc_html_e( 'This copy of '.$registration['plugin_name'].' is registered. Wah-hoo!', 'social-warfare' ); ?>
38
- </div>
39
-
40
- <p class="sw-subtitle sw-registration-text">
41
- <?php esc_html_e( 'To unregister your license click the button below to free it up for use on another domain.' , 'social-warfare' ); ?>
42
- </p>
43
-
44
- <div class="sw-grid sw-col-300">
45
- <p class="sw-authenticate-label">
46
- <?php esc_html_e( 'Deactivate Registration' , 'social-warfare' ); ?>
47
- </p>
48
- </div>
49
-
50
- <div class="sw-grid sw-col-300">
51
- <a href="#" class="unregister-plugin button sw-navy-button" swp-addon="<?php echo $registration['key']; ?>" swp-item-id="<?php echo $registration["product_id"]; ?>">
52
- <?php esc_html_e( 'Unregister Plugin' , 'social-warfare' ); ?>
53
- </a>
54
- </div>
55
- <div class="sw-grid sw-col-300 sw-fit"></div>
56
-
57
- </div>
58
-
59
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/options/SWP_User_Options.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
-
3
- class SWP_User_options {
4
-
5
-
6
- public function __construct() {
7
- get_option('Our_Options_In_The_Database');
8
- $this->remove_unavailable_options();
9
- $this->set_defaults();
10
- }
11
-
12
- /**
13
- * This will compare the User Options in the database against the SWP_Options_Page object. If it does
14
- * not exist in the SWP_Options_Page object, that means that the addon that offered this option is not
15
- * active or not registered so delete it from SWP_User_Options.
16
- *
17
- * But DO NOT remove registration keys or registration timestamps.
18
- *
19
- */
20
- public function remove_unavailable_options() {
21
-
22
- }
23
-
24
- /**
25
- * Instead of a giant array of defaults like we have now, have it sort the options against the SWP_Options_Page object.
26
- * Any User Option that isn't set, simply set it to it's default value.
27
- *
28
- */
29
- public function set_defaults() {
30
-
31
- }
32
-
33
-
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/utilities/SWP_URL_Management.php DELETED
@@ -1,403 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * SWP_URL_Management
5
- *
6
- * A class engineered to manage the links that are shared out to the various social
7
- * networks. This class will shorten them via Bitly or add Google Analytics tracking
8
- * parameters if the user has either of these options enabled and configured.
9
- *
10
- * @since 3.0.0 | 14 FEB 2018 | Added check for is_attachment() to swp_google_analytics
11
- * @since 3.0.0 | 04 APR 2018 | Converted to class-based, object-oriented system.
12
- *
13
- */
14
- class SWP_URL_Management {
15
-
16
-
17
- /**
18
- * The magic __construct method.
19
- *
20
- * This method instantiates the SWP_URL_Management object. It's primary function
21
- * is to add the various methods to their approprate hooks for use later on in
22
- * modifying the links.
23
- *
24
- * @since 3.0.0 | 04 APR 2018 | Created
25
- * @param none
26
- * @return none
27
- * @access public
28
- *
29
- */
30
- public function __construct() {
31
-
32
- add_filter( 'swp_link_shortening' , array( $this , 'link_shortener' ) );
33
- add_filter( 'swp_analytics' , array( $this , 'google_analytics' ) );
34
- add_action( 'wp_ajax_nopriv_swp_bitly_oauth', array( $this , 'bitly_oauth_callback' ) );
35
-
36
- }
37
-
38
-
39
- /**
40
- * Google Analytics UTM Tracking Parameters
41
- *
42
- * This is the method used to add Google analytics UTM parameters to the links
43
- * that are being shared on social media.
44
- *
45
- * @since 3.0.0 | 04 APR 2018 | Created
46
- * @param array $array An array of arguments and data used in processing the URL.
47
- * @return array $array The modified array.
48
- * @access public
49
- *
50
- */
51
- public function google_analytics( $array ) {
52
- global $swp_user_options;
53
-
54
- // Fetch the user options
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() ) :
62
- return $array;
63
- endif;
64
-
65
- // Check if Analytics have been enabled or not
66
- if ( true == swp_get_option('google_analytics') ) :
67
- $url_string = 'utm_source=' . $network . '&utm_medium=' . $options['analytics_medium'] . '&utm_campaign=' . $options['analytics_campaign'] . '';
68
-
69
- if ( strpos( $url,'?' ) !== false ) :
70
- $array['url'] = $url . urlencode( '&' . $url_string );
71
- else :
72
- $array['url'] = $url . urlencode( '?' . $url_string );
73
- endif;
74
- endif;
75
-
76
- return $array;
77
- endif;
78
-
79
- return $array;
80
- }
81
-
82
-
83
- /**
84
- * The Bitly Link Shortener Method
85
- *
86
- * This is the function used to manage shortened links via the Bitly link
87
- * shortening service.
88
- *
89
- * @since 3.0.0 | 04 APR 2018 | Created
90
- * @param array $array An array of arguments and information.
91
- * @return array $array The modified array.
92
- * @access public
93
- *
94
- */
95
- public function link_shortener( $array ) {
96
- global $swp_user_options;
97
-
98
- if ( $array['network'] == 'total_shares' || $array['network'] == 'pinterest') :
99
- return $array;
100
- endif;
101
-
102
- $url = $array['url'];
103
- $network = $array['network'];
104
- $postID = $array['postID'];
105
-
106
- // Fetch the User's Options
107
- $options = $swp_user_options;
108
-
109
- // If Link shortening is activated....
110
- if ( $options['bitly_authentication'] == true ) :
111
-
112
- // If Bitly is activated and we have all the appropriate credentials....
113
- if ( isset( $options['bitly_access_token'] ) ) :
114
-
115
- // Collect our bitly login information
116
- $access_token = $options['bitly_access_token'];
117
-
118
- // If Google Analytics is Activated....
119
- if ( swp_get_option('google_analytics') == true ) :
120
-
121
- // If the link has already been shortened....
122
- $existingURL = get_post_meta( $postID,'bitly_link_' . $network,true );
123
-
124
- // If the Cache is still fresh or a previous API request failed....
125
- if ( ( true === $array['fresh_cache'] && $existingURL) || (isset( $_GLOBALS['bitly_status'] ) && $_GLOBALS['bitly_status'] == 'failure') ) :
126
-
127
- if ( $existingURL ) :
128
- if( true === _swp_is_debug('bitly') ){ echo 'Bitly: '. __LINE__; }
129
- $array['url'] = $existingURL;
130
- return $array;
131
-
132
- // If the link has NOT already been shortened
133
- else :
134
- if( true === _swp_is_debug('bitly') ){ echo 'Bitly: '. __LINE__; }
135
- // ....Return the normal URL
136
- return $array;
137
-
138
- endif;
139
-
140
- // If the Cache is NOT fresh....
141
- else :
142
-
143
- // If the API provides a shortened URL...
144
- $shortURL = $this->make_bitly_url( urldecode( $url ) , $network , $access_token );
145
- if ( $shortURL ) :
146
- if( true === _swp_is_debug('bitly') ){ echo 'Bitly: '. __LINE__; }
147
-
148
- // Store the link in the cache and return it to the buttons
149
- delete_post_meta( $postID,'bitly_link_' . $network );
150
- update_post_meta( $postID,'bitly_link_' . $network,$shortURL );
151
- $array['url'] = $shortURL;
152
- return $array;
153
-
154
- // If the API does not provide a shortened URL....
155
- else :
156
- if( true === _swp_is_debug('bitly') ){ echo 'Bitly: '. __LINE__; }
157
-
158
- // Set a variable we'll check to avoid multiple calls to bitly upon the first failure
159
- $_GLOBALS['sw']['bitly_status'] = 'failure';
160
-
161
- // Return the normal URL
162
- return $array;
163
-
164
- // End the check for a shortneing link from the API
165
- endif;
166
-
167
- // End the check for the cache being fresh
168
- endif;
169
-
170
- // If Google Analytics is NOT activated....
171
- else :
172
-
173
- $existingURL = get_post_meta( $postID,'bitly_link',true );
174
-
175
- // If the cache is fresh or if the API has failed already....
176
- if ( ( true === $array['fresh_cache'] && $existingURL) || (isset( $_GLOBALS['bitly_status'] ) && $_GLOBALS['bitly_status'] == 'failure') ) :
177
-
178
- // If we have a shortened URL in the cache....
179
- if ( $existingURL ) :
180
- if( true === _swp_is_debug('bitly') ){ echo 'Bitly: '. __LINE__; }
181
-
182
- // Save the link in a constant for use in other parts of the loops
183
- $_GLOBALS['sw']['links'][ $postID ] = $existingURL;
184
-
185
- // Return the shortened URL
186
- $array['url'] = $existingURL;
187
- return $array;
188
-
189
- // If we don't have a shortlink in the cache....
190
- else :
191
- if( true === _swp_is_debug('bitly') ){ echo 'Bitly: '. __LINE__; }
192
-
193
- // Return the normal URL
194
- return $array;
195
-
196
- endif;
197
-
198
- // If the cache is expired and needs to be rebuilt....
199
- else :
200
-
201
- // If we've already generated this link....
202
- if ( isset( $_GLOBALS['sw']['links'][ $postID ] ) ) :
203
- if( true === _swp_is_debug('bitly') ){ echo 'Bitly: '. __LINE__; }
204
-
205
- $array['url'] = $_GLOBALS['sw']['links'][ $postID ];
206
- return $array;
207
-
208
- // If we've don't already have a generated link....
209
- else :
210
-
211
- // Use the bitly function to construct a shortened link
212
- $shortURL = $this->make_bitly_url( urldecode( $url ) , $network , $access_token );
213
-
214
- // If we got a shortened URL from their API....
215
- if ( $shortURL ) :
216
-
217
- // Save the link in a global so we can skip this part next time
218
- $_GLOBALS['sw']['links'][ $postID ] = $shortURL;
219
-
220
- // Delete the meta fields and then update to keep the database clean and up to date.
221
- delete_post_meta( $postID,'bitly_link_' . $network );
222
- delete_post_meta( $postID,'bitly_link' );
223
- update_post_meta( $postID,'bitly_link',$shortURL );
224
- if( true === _swp_is_debug('bitly') ){ echo 'Bitly: '. __LINE__; }
225
-
226
- // Return the short URL
227
- $array['url'] = $shortURL;
228
- return $array;
229
-
230
- // If didn't get a shortened URL from their API....
231
- else :
232
- if( true === _swp_is_debug('bitly') ){ echo 'Bitly: '. __LINE__; }
233
-
234
- // Set a variable we'll check to avoid multiple calls to bitly upon the first failure
235
- $_GLOBALS['sw']['bitly_status'] = 'failure';
236
-
237
- // Return the normal URL
238
- return $array;
239
-
240
- // End check for shorte URL from the API
241
- endif;
242
-
243
- // End check for link in the Global Variable
244
- endif;
245
-
246
- // End check for the cache freshness
247
- endif;
248
-
249
- // End check for Analytics
250
- endif;
251
-
252
- // If Bitly is not activated or we don't have the credentials provided....
253
- else :
254
- if( true === _swp_is_debug('bitly') ){ echo 'Bitly: '. __LINE__; }
255
-
256
- // Return the normal URL
257
- return $array;
258
-
259
- // End the check for bitly activation and credentials
260
- endif;
261
-
262
- // If link shortening is not activated....
263
- else :
264
- if( true === _swp_is_debug('bitly') ){ echo 'Bitly: '. __LINE__; }
265
-
266
- // Return the normal URL
267
- return $array;
268
-
269
- // End the check for link shortening being activated
270
- endif;
271
-
272
- return $array;
273
- }
274
-
275
-
276
- /**
277
- * Create a new Bitly short URL
278
- *
279
- * This is the method used to interface with the Bitly API with regard to creating
280
- * new shortened URL's via their service.
281
- *
282
- * @since 3.0.0 | 04 APR 2018 | Created
283
- * @param string $url The URL to be shortened
284
- * @param string $network The social network on which this URL is being shared.
285
- * @param string $access_token The user's Bitly access token.
286
- * @return string The shortened URL.
287
- * @access public
288
- *
289
- */
290
- public function make_bitly_url( $url, $network, $access_token ) {
291
- global $swp_user_options;
292
-
293
- // Fetch the user's options
294
- $options = $swp_user_options;
295
-
296
- if ( isset( $bitly_lookup_response['data']['link_lookup'][0]['link'] ) && true == false ) :
297
-
298
- // Store the short url to return to the plugin
299
- $short_url = $bitly_lookup_response['data']['link_lookup'][0]['link'];
300
-
301
- // If the lookup did not return a valid short link....
302
- else :
303
-
304
- // Set the format to json
305
- $format = 'json';
306
-
307
- // Create a link to reach the Bitly API
308
- $bitly_api = 'https://api-ssl.bitly.com/v3/shorten?access_token=' . $access_token . '&longUrl=' . urlencode( $url ) . '&format=' . $format;
309
-
310
- // Fetch a response from the Bitly Shortening API
311
- $data = SWP_CURL::file_get_contents_curl( $bitly_api );
312
-
313
- // Parse the JSON formated response into an array
314
- $data = json_decode( $data , true );
315
-
316
- // If the shortening succeeded....
317
- if ( isset( $data['data']['url'] ) ) :
318
-
319
- // Store the short URL to return to the plugin
320
- $short_url = $data['data']['url'];
321
-
322
- // If the shortening failed....
323
- else :
324
-
325
- // Return a status of false
326
- $short_url = false;
327
-
328
- endif;
329
-
330
- endif;
331
-
332
- return $short_url;
333
-
334
- }
335
-
336
-
337
- /**
338
- * The function that processes a URL
339
- *
340
- * This method is used throughout the plugin to fetch URL's that have been processed
341
- * with the link shorteners and UTM parameters. It processes an array of information
342
- * through the swp_analytics filter and the swp_link_shortening filter.
343
- *
344
- * @since 3.0.0 | 04 APR 2018 | Created
345
- * @param string $url The URL to be modified.
346
- * @param string $network The network on which the URL is being shared.
347
- * @param int $postID The post ID.
348
- * @return string The modified URL.
349
- * @access public static
350
- */
351
- public static function process_url( $url, $network, $postID, $is_cache_fresh = true ) {
352
- global $swp_user_options;
353
-
354
- if ( isset( $_GLOBALS['sw']['links'][ $postID ] ) ) :
355
- return $_GLOBALS['sw']['links'][ $postID ];
356
- else :
357
- // Fetch the parameters into an array for use by the filters
358
- $array['url'] = $url;
359
- $array['network'] = $network;
360
- $array['postID'] = $postID;
361
- $array['fresh_cache'] = $is_cache_fresh;
362
-
363
- if( !is_attachment() ):
364
-
365
- // Run the anaylitcs hook filters
366
-
367
- $array = apply_filters( 'swp_analytics' , $array );
368
-
369
- // Run the link shortening hook filters, but not on Pinterest
370
- $array = apply_filters( 'swp_link_shortening' , $array );
371
- endif;
372
-
373
- return $array['url'];
374
-
375
- endif;
376
- }
377
-
378
-
379
- /**
380
- * The Bitly OAuth Callback Function
381
- *
382
- * When authenticating Bitly to the plugin, Bitly uses a back-and-forth handshake
383
- * system. This function will intercept the ping from Bitly's server, process the
384
- * information and provide a response to Bitly.
385
- *
386
- * @since 3.0.0 | 04 APR 2018 | Created
387
- * @param none
388
- * @return none A response is echoed to the screen for Bitly to read.
389
- * @access public
390
- *
391
- */
392
- public function bitly_oauth_callback() {
393
- $options = swp_get_user_options();
394
-
395
- // Set the premium code to null
396
- $options['bitly_access_token'] = $_GET['access_token'];
397
-
398
- // Update the options array with the premium code nulled
399
- swp_update_options( $options );
400
-
401
- echo admin_url( 'admin.php?page=social-warfare' );
402
- }
403
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/utilities/utility.php DELETED
@@ -1,564 +0,0 @@
1
- <?php
2
- /**
3
- * General utility helper functions.
4
- *
5
- * @package SocialWarfare\Functions
6
- * @copyright Copyright (c) 2018, Warfare Plugins, LLC
7
- * @license GPL-3.0+
8
- * @since 2.1.0
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
33
- * set.
34
- *
35
- * @since 3.0.0 | 24 APR 2018 | Created
36
- * @since 3.0.8 | 16 MAY 2018 | Added $options parameter.
37
- * @param string $key The key associated with the option we want.
38
- * @param optional array $optoins A set of options to read from.
39
- * @return mixed $value The value of the option.
40
- *
41
- */
42
- function swp_get_option( $key, $options = null ){
43
- global $swp_user_options;
44
-
45
- if ( null === $options ) {
46
- $options = $swp_user_options;
47
- }
48
-
49
- $defaults = array();
50
- $defaults = apply_filters('swp_options_page_defaults' , $defaults );
51
-
52
- // If the options exists, return it.
53
- if( !empty( $options[$key] ) ):
54
- return $options[$key];
55
-
56
- // Else check if we have a default to use:
57
- elseif( !empty($defaults[$key]) ):
58
- // init_default( $key );
59
- return $defaults[$key];
60
-
61
- // If neither, just return false.
62
- else:
63
- return false;
64
- endif;
65
- }
66
-
67
- add_action( 'wp_ajax_swp_store_settings', 'swp_store_the_settings' );
68
- /**
69
- * Handle the options save request inside of admin-ajax.php
70
- *
71
- * @since unknown
72
- * @return void
73
- * @since 3.0.9 | 31 MAY 2018 | Added call to wp_cache_delete to make sure settings save
74
- */
75
- function swp_store_the_settings() {
76
- global $swp_user_options;
77
-
78
- if ( ! check_ajax_referer( 'swp_plugin_options_save', 'security', false ) ) {
79
- wp_send_json_error( esc_html__( 'Security failed.', 'social-warfare' ) );
80
- die;
81
- }
82
-
83
- $data = wp_unslash( $_POST );
84
-
85
- if ( empty( $data['settings'] ) ) {
86
- wp_send_json_error( esc_html__( 'No settings to save.', 'social-warfare' ) );
87
- die;
88
- }
89
-
90
- $settings = $data['settings'];
91
- $options = $swp_user_options;
92
-
93
- unset( $options['order_of_icons']['active'] );
94
- unset( $options['order_of_icons']['inactive'] );
95
-
96
- // Loop and check for checkbox values, convert them to boolean.
97
- foreach ( $settings as $key => $value ) {
98
- if ( 'true' == $value ) {
99
- $options[ $key ] = true;
100
- } elseif ( 'false' == $value ) {
101
- $options[ $key ] = false;
102
- } else {
103
- $options[ $key ] = $value;
104
- }
105
- }
106
-
107
- wp_cache_delete ( 'social_warfare_settings', 'options' );
108
- echo json_encode(swp_update_options( $options ));
109
-
110
- die;
111
- }
112
-
113
-
114
- /**
115
- * A wrapper for the legacy version of the function
116
- *
117
- * This version accepted 3 parameters, but was scrapped for a
118
- * new version that now accepts an array of unlimited parameters
119
- *
120
- * @since 1.4.0
121
- * @access public
122
- * @param boolean $content The content to which the buttons will be added
123
- * @param string $where Where the buttons should appear (above, below, both, none)
124
- * @param boolean $echo Echo the content or return it
125
- * @return string Returns the modified content
126
- */
127
- function socialWarfare( $content = false, $where = 'default', $echo = true ) {
128
-
129
- // Collect the deprecated fields and place them into an array
130
- $array['content'] = $content;
131
- $array['where'] = $where;
132
- $array['echo'] = $echo;
133
- $array['devs'] = true;
134
-
135
- // Pass the array into the new function
136
- return social_warfare( $array );
137
- }
138
-
139
-
140
- /**
141
- * The primary social_warfare function
142
- *
143
- * This is the function that we encourage users to use in their themes and whatnot
144
- * if they want to be able to directly output the buttons in their theme. It accepts
145
- * an array of arguments that correspond to the arguments that the SWP_Buttons_Panel
146
- * accepts.
147
- *
148
- * @since 1.0.0 | Unknown | Created
149
- * @since 3.0.0 | 08 MAY 2018 | Converted to a passthrough function that calls
150
- * the buttons panel class.
151
- * @param array $args An array of arguments to manipulate the output of the buttons.
152
- * @return none The html of the buttons will be output to the screen.
153
- *
154
- */
155
- function social_warfare( $args = array() ) {
156
-
157
- if( !is_array($args) ):
158
- $args = array();
159
- endif;
160
-
161
- $buttons_panel = new SWP_Buttons_Panel( $args );
162
- echo $buttons_panel->render_HTML();
163
- }
164
-
165
-
166
- /**
167
- * Round a number to the appropriate thousands.
168
- *
169
- * @since unknown
170
- * @access public
171
- * @param float $val The float to be rounded.
172
- * @return float A rounded number.
173
- */
174
- function swp_kilomega( $val ) {
175
- global $swp_user_options;
176
-
177
- // Fetch the user assigned options
178
- $options = $swp_user_options;
179
-
180
- // Check if we even have a value to format
181
- if ( $val ) :
182
-
183
- // Check if the value is less than 1,000....
184
- if ( $val < 1000 ) :
185
-
186
- // If less than 1,000 just format and kick it back
187
- return number_format( $val );
188
-
189
- // Check if the value is greater than 1,000 and less than 1,000,000....
190
- elseif ( $val < 1000000 ) :
191
-
192
- // Start by deviding the value by 1,000
193
- $val = intval( $val ) / 1000;
194
-
195
- // If the decimal separator is a period
196
- if ( $options['decimal_separator'] == 'period' ) :
197
-
198
- // Then format the number to the appropriate number of decimals
199
- return number_format( $val,$options['decimals'],'.',',' ) . 'K';
200
-
201
- // If the decimal separator is a comma
202
- else :
203
-
204
- // Then format the number to the appropriate number of decimals
205
- return number_format( $val,$options['decimals'],',','.' ) . 'K';
206
-
207
- endif;
208
-
209
- // Check if the value is greater than 1,000,000....
210
- else :
211
-
212
- // Start by deviding the value by 1,000,000
213
- $val = intval( $val ) / 1000000;
214
-
215
- // If the decimal separator is a period
216
- if ( $options['decimal_separator'] == 'period' ) :
217
-
218
- // Then format the number to the appropriate number of decimals
219
- return number_format( $val,$options['decimals'],'.',',' ) . 'M';
220
-
221
- // If the decimal separator is a comma
222
- else :
223
-
224
- // Then format the number to the appropriate number of decimals
225
- return number_format( $val,$options['decimals'],',','.' ) . 'M';
226
-
227
- endif;
228
-
229
- endif;
230
-
231
- endif;
232
-
233
- return 0;
234
- }
235
- /**
236
- * This is a function for removing tags and all of their containing html like inline style or script tags in the excerpt.
237
- * @since 2.2.4 | Created | 6 March 2017
238
- * @access public
239
- * @param string $tag_name The name of the tag to search and destroy
240
- * @param object $document The HTML dom object
241
- * @return none
242
- */
243
- function swp_remove_elements_by_tag_name($tag_name, $document) {
244
- $nodeList = $document->getElementsByTagName($tag_name);
245
- for ($nodeIdx = $nodeList->length; --$nodeIdx >= 0; ) {
246
- $node = $nodeList->item($nodeIdx);
247
- $node->parentNode->removeChild($node);
248
- }
249
- }
250
-
251
- /**
252
- * Process the excerpts for descriptions
253
- *
254
- * @since 1.0.0 | Created | Unknown
255
- * @since 2.2.4 | Updated | 6 March 2017 | Added the filter to remove the script and style tags
256
- * @access public
257
- * @param int $post_id The post ID to use when getting an exceprt.
258
- * @return string The excerpt.
259
- */
260
- function swp_get_excerpt_by_id( $post_id ) {
261
-
262
- // Check if the post has an excerpt
263
- if ( has_excerpt() ) :
264
- $the_post = get_post( $post_id ); // Gets post ID
265
- $the_excerpt = $the_post->post_excerpt;
266
-
267
- // If not, let's create an excerpt
268
- else :
269
- $the_post = get_post( $post_id ); // Gets post ID
270
- $the_excerpt = $the_post->post_content; // Gets post_content to be used as a basis for the excerpt
271
- endif;
272
-
273
- $excerpt_length = 100; // Sets excerpt length by word count
274
-
275
- // Filter out any inline script or style tags as well as their content
276
- if( !empty( $the_excerpt ) ):
277
- $the_excerpt = preg_replace('/(<script[^>]*>.+?<\/script>|<style[^>]*>.+?<\/style>)/s', '', $the_excerpt);
278
- endif;
279
-
280
- $the_excerpt = strip_tags( strip_shortcodes( $the_excerpt ) ); // Strips tags and images
281
- $the_excerpt = preg_replace( '/\[[^\]]+\]/', '', $the_excerpt );
282
- $the_excerpt = str_replace( ']]>', ']]&gt;', $the_excerpt );
283
- $the_excerpt = strip_tags( $the_excerpt );
284
- $excerpt_length = apply_filters( 'excerpt_length', 100 );
285
- $excerpt_more = apply_filters( 'excerpt_more', ' ' . '[...]' );
286
- $words = preg_split( "/[\n\r\t ]+/", $the_excerpt, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY );
287
-
288
- if ( count( $words ) > $excerpt_length ) :
289
- array_pop( $words );
290
- // array_push($words, '…');
291
- $the_excerpt = implode( ' ', $words );
292
- endif;
293
-
294
- $the_excerpt = preg_replace( "/\r|\n/", '', $the_excerpt );
295
-
296
- return $the_excerpt;
297
- }
298
-
299
- if ( ! function_exists( 'swp_mobile_detection' ) ) {
300
- /**
301
- * Check to see if the user is using a mobile device.
302
- *
303
- * @since unknown
304
- * @access public
305
- * @todo Replace this with a more reliable method, probably client-side.
306
- * @return bool true if a mobile user agent.
307
- */
308
- function swp_mobile_detection() {
309
- return preg_match( '/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i', $_SERVER['HTTP_USER_AGENT'] );
310
- }
311
- }
312
-
313
- /**
314
- * Check to see if debugging has been enabled.
315
- *
316
- * @since 2.1.0
317
- * @access private
318
- * @param string $type The type of debugging to check for.
319
- * @return bool true if debugging is enabled.
320
- */
321
- function _swp_is_debug( $type = 'all' ) {
322
- $debug = false;
323
-
324
- if ( ! empty( $_GET['swp_debug'] ) ) {
325
- $debug = sanitize_key( $_GET['swp_debug'] );
326
- }
327
-
328
- if ( ( $debug && 'all' === $type ) || $debug === $type ) {
329
- $debug = true;
330
- } else {
331
- $debug = false;
332
- }
333
-
334
- return (bool) apply_filters( 'swp_is_debug', $debug );
335
- }
336
-
337
- /**
338
- * A function to clean up the available buttons Array
339
- *
340
- * @since 2.1.4
341
- * @param Array $options The options Array
342
- * @return Array $options The modified options array
343
- */
344
- // DEPRECATED
345
- // function swp_buttons_cleanup( $options ) {
346
- // if(isset($options['icons']['active'])) {
347
- // unset($options['icons']['active']);
348
- // }
349
- // return $options;
350
- // }
351
- // add_filter( 'swp_button_options', 'swp_buttons_cleanup', 999 );
352
-
353
- /**
354
- * A function to recursively search arrays
355
- *
356
- * @since 1.0.0
357
- * @access public
358
- * @param string $needle The needle
359
- * @param string $haystack The haystack
360
- * @return string/bool Return the key if found or false if nothing is found
361
- */
362
- function swp_recursive_array_search( $needle, $haystack ) {
363
- foreach ( $haystack as $key => $value ) {
364
- $current_key = $key;
365
- if ( $needle === $value or (is_array( $value ) && swp_recursive_array_search( $needle,$value ) !== false) ) {
366
- return $current_key;
367
- }
368
- }
369
- return false;
370
- }
371
-
372
- /**
373
- * A function to gethe current URL of a page
374
- *
375
- * @since 1.0.0
376
- * @return string The URL of the current page
377
- */
378
- function swp_get_current_url() {
379
- $page_url = 'http';
380
- if ( $_SERVER['HTTPS'] == 'on' ) {$page_url .= 's';}
381
- $page_url .= '://';
382
- $page_url .= $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
383
- $page_url = strtok( $page_url, '?' );
384
-
385
- return $page_url;
386
- }
387
- /**
388
- * A function to disable the buttons on subtitles
389
- *
390
- * @return bool false
391
- */
392
- function swp_disable_subs() {
393
- return false;
394
- }
395
-
396
- /**
397
- * Convert curly quotes to straight quotes
398
- *
399
- * @since 1.4.0
400
- * @param string $content A string of text to be filtered
401
- * @return string $content The modified string of text
402
- */
403
- function convert_smart_quotes( $content ) {
404
- $content = str_replace( '"', '\'', $content );
405
- $content = str_replace( '&#8220;', '\'', $content );
406
- $content = str_replace( '&#8221;', '\'', $content );
407
- $content = str_replace( '&#8216;', '\'', $content );
408
- $content = str_replace( '&#8217;', '\'', $content );
409
- return $content;
410
- }
411
-
412
- /**
413
- * A function to make removing hooks easier
414
- *
415
- * @since 1.4.0
416
- * @access public
417
- * @param string $hook_name The name of the hook
418
- * @param string $method_name The name of the method
419
- * @param integer $priority The hook priority
420
- * @return boolean false
421
- */
422
- function swp_remove_filter( $hook_name = '', $method_name = '', $priority = 0 ) {
423
- global $wp_filter;
424
-
425
- // Take only filters on right hook name and priority
426
- if ( ! isset( $wp_filter[ $hook_name ][ $priority ] ) || ! is_array( $wp_filter[ $hook_name ][ $priority ] ) ) {
427
- return false;
428
- }
429
-
430
- // Loop on filters registered
431
- foreach ( (array) $wp_filter[ $hook_name ][ $priority ] as $unique_id => $filter_array ) {
432
- // Test if filter is an array ! (always for class/method)
433
- if ( isset( $filter_array['function'] ) && is_array( $filter_array['function'] ) ) {
434
- // Test if object is a class and method is equal to param !
435
- if ( is_object( $filter_array['function'][0] ) && get_class( $filter_array['function'][0] ) && $filter_array['function'][1] == $method_name ) {
436
- unset( $wp_filter[ $hook_name ][ $priority ][ $unique_id ] );
437
- }
438
- }
439
- }
440
-
441
- return false;
442
- }
443
-
444
- /**
445
- * Get the SWP supported post types.
446
- *
447
- * @return array $types A list of post type names.
448
- */
449
- function swp_get_post_types() {
450
- $types = get_post_types(
451
- array(
452
- 'public' => true,
453
- '_builtin' => false,
454
- ),
455
- 'names'
456
- );
457
-
458
- $types[] = 'page';
459
- $types[] = 'post';
460
-
461
- return (array) apply_filters( 'swp_post_types', $types );
462
- }
463
-
464
- /**
465
- * A function to add options to the admin options page
466
- *
467
- * @since 2.1.4
468
- * @access public
469
- * @param array $sw_options The array of current options
470
- * @param string $tabName The name of the tab being modified
471
- * @param string $optionName The name of the option that the new option will be inserted next to.
472
- * @param array $option The array of information about the new option being added
473
- * @param string $position Add the new option 'before' or 'after' the needle. Default => 'after'
474
- * @return array $sw_options The modified array of options
475
- */
476
- function swp_insert_option( $sw_options , $tabName , $optionName , $newOptionArray , $position = 'after' ) {
477
-
478
- // Locate the index of the option you want to insert next to
479
- $keyIndex = array_search( $optionName, array_keys( $sw_options['options'][$tabName] ) );
480
-
481
- if('after' === $position) {
482
- ++$keyIndex;
483
- }
484
-
485
- // Split the array at the location of the option above
486
- $first_array = array_splice ( $sw_options['options'][$tabName] , 0 , $keyIndex );
487
-
488
- // Merge the two parts of the split array with your option added in the middle
489
- $sw_options['options'][$tabName] = array_merge (
490
- $first_array,
491
- $newOptionArray,
492
- $sw_options['options'][$tabName]
493
- );
494
-
495
- // Return the option array or the world will explode
496
- return $sw_options;
497
-
498
- }
499
-
500
- /**
501
- * A function to remove the screen options tab from our admin page
502
- * @since 2.2.1
503
- */
504
- function swp_remove_screen_options( $display_boolean, $wp_screen_object ){
505
- $blacklist = array('admin.php?page=social-warfare');
506
- if ( in_array( $GLOBALS['pagenow'], $blacklist ) ) {
507
- $wp_screen_object->render_screen_layout();
508
- $wp_screen_object->render_per_page_options();
509
- return false;
510
- }
511
- return $display_boolean;
512
- }
513
- add_filter( 'screen_options_show_screen', 'swp_remove_screen_options', 10, 2 );
514
-
515
-
516
- function swp_get_license_key($key) {
517
-
518
- if(is_swp_addon_registered($key)):
519
-
520
- $options = get_option( 'social_warfare_settings' );
521
- $license = $options[$key.'_license_key'];
522
- return $license;
523
-
524
- else:
525
-
526
- return false;
527
-
528
- endif;
529
- }
530
-
531
- /**
532
- * A function to return the URL of the website or network
533
- *
534
- * @since 2.3.3 | 25 SEP 2017 | Created
535
- * @return String The URL of the site
536
- *
537
- */
538
- function swp_get_site_url() {
539
- if( true == is_multisite() ) {
540
- return network_site_url();
541
- } else {
542
- return get_site_url();
543
- }
544
- }
545
-
546
-
547
- /**
548
- * A function to convert strings into snake_case
549
- *
550
- * @since 3.0.0 | 02 MAY 2018 | Created
551
- * @param string $string The string to be modified.
552
- * @return string The snake_case modified string.
553
- *
554
- */
555
- function swp_snake_case( $string ) {
556
- $snake_case = str_replace( ' ' , '_' , strtolower($string) );
557
- return $snake_case;
558
- }
559
-
560
- add_action( 'wp_ajax_swp_fetch_user_options', 'swp_fetch_user_options' );
561
- function swp_fetch_user_options() {
562
- echo json_encode( get_option( 'social_warfare_settings', [] ) );
563
- wp_die();
564
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/script.min.js CHANGED
File without changes
languages/social-warfare-da-DK.mo CHANGED
File without changes
languages/social-warfare-de_DE.mo CHANGED
File without changes
languages/social-warfare-en_US.mo CHANGED
File without changes
languages/social-warfare-es_ES.mo CHANGED
File without changes
languages/social-warfare-fr_FR.mo CHANGED
File without changes
languages/social-warfare-hy.mo CHANGED
File without changes
languages/social-warfare-it_IT.mo CHANGED
File without changes
languages/social-warfare-pt_BR.mo CHANGED
File without changes
languages/social-warfare-pt_PT.mo CHANGED
File without changes
languages/social-warfare-ru_RU.mo CHANGED
File without changes
languages/social-warfare-uk.mo CHANGED
File without changes
languages/social-warfare.pot CHANGED
@@ -402,8 +402,8 @@ msgstr ""
402
  msgid "Pin"
403
  msgstr ""
404
 
405
- #: functions/social-networks/stumbleupon.php:100
406
- #: functions/social-networks/stumbleupon.php:104
407
  msgid "Stumble"
408
  msgstr ""
409
 
402
  msgid "Pin"
403
  msgstr ""
404
 
405
+ #: functions/social-networks/mix.php:100
406
+ #: functions/social-networks/mix.php:104
407
  msgid "Stumble"
408
  msgstr ""
409
 
languages/social_warfare-el_EL.mo CHANGED
File without changes
languages/social_warfare-nl_NL.mo CHANGED
File without changes
{functions → lib}/Social_Warfare.php RENAMED
@@ -19,7 +19,6 @@
19
  */
20
  class Social_Warfare {
21
 
22
-
23
  /**
24
  * The magic method used to instantiate this class.
25
  *
@@ -34,31 +33,26 @@ class Social_Warfare {
34
  *
35
  */
36
  public function __construct() {
 
 
 
37
 
38
- // Block these classes from being loaded again if a child class attempts
39
- // to run the parent::__construct() method.
40
- if ( get_class($this) === 'Social_Warfare' ) {
41
-
42
- // Loads the files for each class.
43
- $this->load_classes();
44
-
45
- // Instantiate all the core classes
46
- $this->instantiate_classes();
47
-
48
- // Instantiate the admin-only classes.
49
- if( true === is_admin() ) {
50
- $this->instantiate_admin_classes();
51
- }
52
 
53
- // Instantiate the frontend-only classes.
54
- if( false === is_admin() ) {
55
- $this->instantiate_frontend_classes();
56
- }
57
 
 
 
 
58
  }
59
 
60
- $this->core_version = SWP_VERSION;
61
- }
 
 
62
 
63
 
64
  /**
@@ -74,6 +68,23 @@ class Social_Warfare {
74
  *
75
  */
76
  private function instantiate_classes() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  global $SWP_Options_Page;
78
 
79
 
@@ -198,22 +209,21 @@ class Social_Warfare {
198
  global $SWP_Post_Caches;
199
  $SWP_Post_Caches = new SWP_Post_Cache_Loader();
200
 
201
- }
202
-
203
 
204
- /**
205
- * This method will load up all of the frontend-only classes.
206
- *
207
- * @since 3.1.0 | 20 JUNE 2018 | Created
208
- * @param void
209
- * @return void
210
- * @access private
211
- */
212
- private function instantiate_frontend_classes() {
213
 
 
214
 
215
  }
216
 
 
217
  /**
218
  * This method will load up all of the admin-only classes.
219
  *
@@ -284,17 +294,43 @@ class Social_Warfare {
284
  */
285
  new SWP_User_Profile();
286
 
 
 
 
 
 
 
 
 
 
287
  new SWP_JSON_Cache_Handler();
288
 
289
- add_action('plugins_loaded', function() {
290
- /**
291
- * Instantiates all of our notices.
292
- *
293
- */
294
- new SWP_Notice_Loader();
295
- }, 50);
296
 
297
- require_once SWP_PLUGIN_DIR . '/functions/utilities/SWP_Plugin_Updater.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
298
  }
299
 
300
 
@@ -333,9 +369,11 @@ class Social_Warfare {
333
  'Notice_Loader',
334
  'Post_Cache_Loader',
335
  'Post_Cache',
336
- 'JSON_Cache_Handler'
 
 
337
  );
338
- $this->load_files( '/functions/utilities/', $utilities);
339
 
340
 
341
  /**
@@ -355,24 +393,11 @@ class Social_Warfare {
355
  'Twitter',
356
  'Linkedin',
357
  'Pinterest',
358
- 'Stumble_Upon'
359
  );
360
- $this->load_files( '/functions/social-networks/', $social_networks);
361
 
362
 
363
- /**
364
- * The Addon Classes
365
- *
366
- * This family of classes provide for the management of addons. These
367
- * control the framework for registering addons, checking for updates
368
- * for the addons, and other addon specific tasks.
369
- *
370
- */
371
- $includes = array(
372
- 'Addon'
373
- );
374
- $this->load_files( '/functions/includes/', $includes);
375
-
376
 
377
  /**
378
  * The Frontend Output Classes
@@ -390,11 +415,11 @@ class Social_Warfare {
390
  'Script',
391
  'Shortcode',
392
  );
393
- $this->load_files( '/functions/frontend-output/', $frontends );
394
 
395
 
396
  /**
397
- * The Widget Classes
398
  *
399
  * These are the classes that create the widgets available for output in
400
  * WordPress. Built in is the Popular Posts widget, but these also
@@ -406,7 +431,7 @@ class Social_Warfare {
406
  'Popular_Posts_Widget',
407
  'Widget',
408
  );
409
- $this->load_files( '/functions/widgets/', $widgets );
410
 
411
 
412
  /**
@@ -427,8 +452,9 @@ class Social_Warfare {
427
  'Settings_Link',
428
  'Shortcode_Generator',
429
  'User_Profile',
 
430
  );
431
- $this->load_files( '/functions/admin/', $admins );
432
 
433
 
434
  /**
@@ -440,6 +466,7 @@ class Social_Warfare {
440
  *
441
  */
442
  $options = array(
 
443
  'Option',
444
  'Options_Page',
445
  'Options_Page_Tab',
@@ -450,9 +477,9 @@ class Social_Warfare {
450
  'Option_Textarea',
451
  'Section_HTML',
452
  'Option_Icons',
453
- 'Addon_Registration',
454
  );
455
- $this->load_files( '/functions/options/', $options );
456
 
457
 
458
  /**
@@ -462,7 +489,7 @@ class Social_Warfare {
462
  * needed in order to properly check for updates for addons.
463
  *
464
  */
465
- require_once SWP_PLUGIN_DIR . '/functions/plugin-update-checker/plugin-update-checker.php';
466
 
467
 
468
  }
@@ -484,31 +511,47 @@ class Social_Warfare {
484
  require_once SWP_PLUGIN_DIR . $path . $file . '.php';
485
  }
486
  }
487
- }
488
 
489
 
490
- /*******************************************************************************
491
- *
492
- *
493
- * WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
494
- *
495
- * EVERY FILE BELOW THIS POINT NEEDS TO BE REFACTORED. IT'S "REQUIRE_ONCE" THEN
496
- * NEEDS TO BE MIGRATED INTO THE CLASS ABOVE.
497
- *
498
- *
499
- * *****************************************************************************/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
500
 
 
 
 
 
501
 
502
- // TODO: These files need refactored into classes and to the appropriate sections above.
503
- require_once SWP_PLUGIN_DIR . '/functions/admin/registration.php';
504
- require_once SWP_PLUGIN_DIR . '/functions/admin/options-fetch.php';
505
- require_once SWP_PLUGIN_DIR . '/functions/utilities/utility.php';
506
 
507
  /**
508
  * Include the plugin's admin files.
509
  *
510
  */
511
  if ( is_admin() ) {
512
- require_once SWP_PLUGIN_DIR . '/functions/admin/swp_system_checker.php';
513
- // require_once SWP_PLUGIN_DIR . '/functions/admin/options-page.php';
514
  }
19
  */
20
  class Social_Warfare {
21
 
 
22
  /**
23
  * The magic method used to instantiate this class.
24
  *
33
  *
34
  */
35
  public function __construct() {
36
+ $this->core_version = SWP_VERSION;
37
+ add_action('plugins_loaded', array($this, 'init'));
38
+ }
39
 
40
+ public function init() {
41
+ // Loads the files for each class.
42
+ $this->load_classes();
 
 
 
 
 
 
 
 
 
 
 
43
 
44
+ // Instantiate all the core classes
45
+ $this->instantiate_classes();
 
 
46
 
47
+ // Instantiate the admin-only classes.
48
+ if( true === is_admin() ) {
49
+ $this->instantiate_admin_classes();
50
  }
51
 
52
+ // Instatiate classes that need to be defered.
53
+ add_action('plugins_loaded' , array( $this, 'instantiate_deferred_classes' ) , 100 );
54
+ require_once SWP_PLUGIN_DIR . '/lib/utilities/functions.php';
55
+ }
56
 
57
 
58
  /**
68
  *
69
  */
70
  private function instantiate_classes() {
71
+
72
+
73
+ /**
74
+ * The Global $swp_user_options Loader
75
+ *
76
+ * This creates and filters and manages the user options array.
77
+ *
78
+ */
79
+ new SWP_User_Options();
80
+
81
+
82
+ /**
83
+ * The Global Options Page Object
84
+ *
85
+ * This is created as a global so that all addons can modify it.
86
+ *
87
+ */
88
  global $SWP_Options_Page;
89
 
90
 
209
  global $SWP_Post_Caches;
210
  $SWP_Post_Caches = new SWP_Post_Cache_Loader();
211
 
 
 
212
 
213
+ /**
214
+ * The Utility Class
215
+ *
216
+ * While the methods are all static functions that do not require
217
+ * a class instance to use, there are hooks that need to be set up
218
+ * in the class __construct() method.
219
+ *
220
+ */
 
221
 
222
+ new SWP_Utility();
223
 
224
  }
225
 
226
+
227
  /**
228
  * This method will load up all of the admin-only classes.
229
  *
294
  */
295
  new SWP_User_Profile();
296
 
297
+
298
+ /**
299
+ * The JSON Cache Handler
300
+ *
301
+ * This class fetches the JSON data from our home server and makes it
302
+ * available to the plugin for important information like adding
303
+ * dashboard notices or updating the sidebar in the admin settings page.
304
+ *
305
+ */
306
  new SWP_JSON_Cache_Handler();
307
 
 
 
 
 
 
 
 
308
 
309
+ /**
310
+ * The Settings Page Sidebar Loader
311
+ *
312
+ * This class controls the sidebar on the settings page.
313
+ *
314
+ */
315
+ new SWP_Sidebar_Loader();
316
+
317
+ }
318
+
319
+
320
+ /**
321
+ * Instatiate the classes that we want to load in a deferred manner.
322
+ *
323
+ * @since 3.3.0 | 06 AUG 2018 | Created
324
+ * @param void
325
+ * @return void
326
+ *
327
+ */
328
+ public function instantiate_deferred_classes() {
329
+ /**
330
+ * Instantiates all of our notices.
331
+ *
332
+ */
333
+ new SWP_Notice_Loader();
334
  }
335
 
336
 
369
  'Notice_Loader',
370
  'Post_Cache_Loader',
371
  'Post_Cache',
372
+ 'JSON_Cache_Handler',
373
+ 'Plugin_Updater',
374
+ 'Utility'
375
  );
376
+ $this->load_files( '/lib/utilities/', $utilities);
377
 
378
 
379
  /**
393
  'Twitter',
394
  'Linkedin',
395
  'Pinterest',
396
+ 'Mix'
397
  );
398
+ $this->load_files( '/lib/social-networks/', $social_networks);
399
 
400
 
 
 
 
 
 
 
 
 
 
 
 
 
 
401
 
402
  /**
403
  * The Frontend Output Classes
415
  'Script',
416
  'Shortcode',
417
  );
418
+ $this->load_files( '/lib/frontend-output/', $frontends );
419
 
420
 
421
  /**
422
+ * The Widget ClassesMa
423
  *
424
  * These are the classes that create the widgets available for output in
425
  * WordPress. Built in is the Popular Posts widget, but these also
431
  'Popular_Posts_Widget',
432
  'Widget',
433
  );
434
+ $this->load_files( '/lib/widgets/', $widgets );
435
 
436
 
437
  /**
452
  'Settings_Link',
453
  'Shortcode_Generator',
454
  'User_Profile',
455
+ 'Sidebar_Loader'
456
  );
457
+ $this->load_files( '/lib/admin/', $admins );
458
 
459
 
460
  /**
466
  *
467
  */
468
  $options = array(
469
+ 'User_Options',
470
  'Option',
471
  'Options_Page',
472
  'Options_Page_Tab',
477
  'Option_Textarea',
478
  'Section_HTML',
479
  'Option_Icons',
480
+ 'Registration_Tab_Template',
481
  );
482
+ $this->load_files( '/lib/options/', $options );
483
 
484
 
485
  /**
489
  * needed in order to properly check for updates for addons.
490
  *
491
  */
492
+ require_once SWP_PLUGIN_DIR . '/lib/update-checker/plugin-update-checker.php';
493
 
494
 
495
  }
511
  require_once SWP_PLUGIN_DIR . $path . $file . '.php';
512
  }
513
  }
 
514
 
515
 
516
+ /**
517
+ *
518
+ * When we have known incompatability with other themes/plugins,
519
+ * we can put those checks in here.
520
+ *
521
+ * Checks for known conflicts with other plugins and themes.
522
+ *
523
+ * If there is a fatal conflict, returns true and exits printing.
524
+ * If there are other conflicts, they are silently handled and can still
525
+ * print.
526
+ *
527
+ * @since 3.0.0 | 01 MAR 2018 | Created
528
+ * @since 3.3.0 | 30 AUG 2018 | Moved from SWP_Buttons_Panel to Social_Warfare.
529
+ * @param void
530
+ *
531
+ * @return bool True iff the conflict is fatal, else false.
532
+ *
533
+ */
534
+ public static function has_plugin_conflict() {
535
+
536
+ // Disable subtitles plugin to prevent it from injecting subtitles
537
+ // into our share titles.
538
+ if ( function_exists( 'is_plugin_active' ) && is_plugin_active( 'subtitles/subtitles.php' ) && class_exists( 'Subtitles' ) ) :
539
+ remove_filter( 'the_title', array( Subtitles::getinstance(), 'the_subtitle' ), 10, 2 );
540
+ endif;
541
 
542
+ //* Disable on BuddyPress pages.
543
+ if ( function_exists( 'is_buddypress' ) && is_buddypress() ) :
544
+ return true;
545
+ endif;
546
 
547
+ return false;
548
+ }
549
+ }
 
550
 
551
  /**
552
  * Include the plugin's admin files.
553
  *
554
  */
555
  if ( is_admin() ) {
556
+ require_once SWP_PLUGIN_DIR . '/lib/admin/swp_system_checker.php';
 
557
  }
lib/Social_Warfare_Addon.php ADDED
@@ -0,0 +1,300 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Social_Warfare_Addon {
4
+ public function __construct( $args = array() ) {
5
+ $this->establish_class_properties( $args );
6
+ $this->establish_license_key();
7
+ $this->is_registered = $this->establish_resgistration();
8
+
9
+ add_action( 'wp_ajax_swp_register_plugin', [$this, 'register_plugin'] );
10
+ add_action( 'wp_ajax_swp_unregister_plugin', [$this, 'unregister_plugin'] );
11
+ add_action( 'wp_ajax_swp_ajax_passthrough', [$this, 'ajax_passthrough'] );
12
+
13
+ add_filter( 'swp_registrations', array( $this, 'add_self' ) );
14
+ }
15
+
16
+ private function establish_class_properties( $args = array () ) {
17
+ $required= ['name', 'key', 'product_id', 'version', 'core_required'];
18
+
19
+ foreach($args as $key => $value) {
20
+ $this->$key = $value;
21
+ }
22
+
23
+ foreach($required as $key) {
24
+ if ( !isset( $this->$key ) ) :
25
+ $message = "Hey developer, you must provide us this information for your class: $key => \$value";
26
+ throw new Exception($message);
27
+ endif;
28
+
29
+ }
30
+
31
+ $this->store_url = 'https://warfareplugins.com';
32
+ $this->site_url = SWP_Utility::get_site_url();
33
+ }
34
+
35
+
36
+ /**
37
+ * The callback function used to add a new instance of this
38
+ * to our swp_registrations filter.
39
+ *
40
+ * This should be the last item called in an addon's main file.
41
+ *
42
+ * @param array $addons The array of addons currently activated.
43
+ */
44
+ public function add_self( $addons ) {
45
+ if ( $this->key == 'affiliatewp') return;
46
+
47
+ $addons[] = $this;
48
+
49
+ return $addons;
50
+ }
51
+
52
+
53
+ public function establish_license_key() {
54
+ $key = SWP_Utility::get_option( $this->key . '_license_key' );
55
+
56
+ if ( !$key ) :
57
+ $old_options = get_option( 'socialWarfareOptions', false );
58
+
59
+ if ( isset( $old_options[$this->key . '_license_key']) ) :
60
+ $key = isset( $old_options[$this->key . '_license_key']);
61
+ endif;
62
+
63
+ endif;
64
+
65
+ $this->license_key = $key ? $key : '';
66
+ }
67
+
68
+ public function establish_resgistration() {
69
+ // Get the timestamps setup for comparison to see if a week has passed since our last check
70
+ $current_time = time();
71
+
72
+ if ( SWP_Utility::get_option( $this->key. '_license_key_timestamp' ) ) :
73
+ $timestamp = SWP_Utility::get_option( $this->key.'_license_key_timestamp' );
74
+ else:
75
+ $timestamp = 0;
76
+ endif;
77
+ $time_to_recheck = $timestamp + 604800;
78
+
79
+ // If they have a key and a week hasn't passed since the last check, just return true...the plugin is registered.
80
+ if( !empty( $this->license_key) && $current_time < $time_to_recheck ) :
81
+ return true;
82
+ endif;
83
+
84
+ // If a week has passed since the last check, ping our API to check the validity of the license key
85
+ if ( !empty( $this->license_key) ) :
86
+ global $swp_user_options;
87
+
88
+ $data = array(
89
+ 'edd_action' => 'check_license',
90
+ 'item_id' => $this->product_id,
91
+ 'license' => $this->license_key,
92
+ 'url' => $this->site_url,
93
+ );
94
+
95
+
96
+ $response = wp_remote_retrieve_body( wp_remote_post( $this->store_url , array('body' => $data, 'timeout' => 10 ) ) );
97
+
98
+ if( false !== $response ) :
99
+ $license_data = json_decode( $response );
100
+
101
+ $swp_user_options[$this->key . '_license_key_timestamp'] = $current_time;
102
+
103
+ // If the license was invalid
104
+ if ( isset( $license_data->license ) && 'invalid' === $license_data->license ) :
105
+ $this->license_key = '';
106
+
107
+ $swp_user_options[$this->key . '_license_key'] = '';
108
+
109
+ update_option( 'social_warfare_settings' , $swp_user_options );
110
+
111
+ return false;
112
+
113
+ // If the property is some other status, just go with it.
114
+ else :
115
+ update_option( 'social_warfare_settings' , $swp_user_options );
116
+
117
+ return true;
118
+ endif;
119
+
120
+ // If we recieved no response from the server, we'll just check again next week
121
+ else :
122
+ $swp_user_options[$key.'_license_key_timestamp'] = $current_time;
123
+ update_option( 'social_warfare_settings' , $swp_user_options );
124
+
125
+ return true;
126
+ endif;
127
+ endif;
128
+
129
+ return false;
130
+ }
131
+
132
+ public function check_for_updates() {
133
+ if ( version_compare(SWP_VERSION, $this->core_required) >= 0 ) :
134
+
135
+ endif;
136
+ }
137
+
138
+ /**
139
+ * Request to EDD to activate the licence.
140
+ *
141
+ * @since 2.1.0
142
+ * @since 2.3.0 Hooked registration into the new EDD Software Licensing API
143
+ * @param none
144
+ * @return JSON Encoded Array (Echoed) - The Response from the EDD API
145
+ *
146
+ */
147
+ public function register_plugin() {
148
+ // Check to ensure that license key was passed into the function
149
+ if ( !empty( $_POST['license_key'] ) ) :
150
+
151
+ // Grab the license key so we can use it below
152
+ $key = $_POST['name_key'];
153
+ $license = $_POST['license_key'];
154
+ $item_id = $_POST['item_id'];
155
+ $this->store_url = 'https://warfareplugins.com';
156
+
157
+ $api_params = array(
158
+ 'edd_action' => 'activate_license',
159
+ 'item_id' => $item_id,
160
+ 'license' => $license,
161
+ 'url' => $this->site_url
162
+ );
163
+
164
+ $response = wp_remote_retrieve_body( wp_remote_post( $this->store_url, array( 'body' => $api_params, 'timeout' => 10 ) ) );
165
+
166
+ if ( false != $response ) :
167
+
168
+ // Parse the response into an object
169
+ $license_data = json_decode( $response );
170
+
171
+ // If the license is valid store it in the database
172
+ if( isset($license_data->license) && 'valid' == $license_data->license ) :
173
+
174
+ $current_time = time();
175
+ $options = get_option( 'social_warfare_settings' );
176
+ $options[$key.'_license_key'] = $license;
177
+ $options[$key.'_license_key_timestamp'] = $current_time;
178
+ update_option( 'social_warfare_settings' , $options );
179
+
180
+ echo json_encode($license_data);
181
+ wp_die();
182
+
183
+ // If the license is not valid
184
+ elseif( isset($license_data->license) && 'invalid' == $license_data->license ) :
185
+ echo json_encode($license_data);
186
+ wp_die();
187
+
188
+ // If some other status was returned
189
+ else :
190
+ $license_data['success'] = false;
191
+ $license_data['data'] = 'Invaid response from the registration server.';
192
+ echo json_encode($license_data);
193
+ wp_die();
194
+ endif;
195
+
196
+ // If we didn't get a response from the registration server
197
+ else :
198
+ $license_data['success'] = false;
199
+ $license_data['data'] = 'Failed to connect to registration server.';
200
+ echo json_encode($license_data);
201
+ wp_die();
202
+ endif;
203
+ endif;
204
+
205
+ $license_data['success'] = false;
206
+ $license_data['data'] = 'Admin Ajax did not receive valid POST data.';
207
+ echo json_encode($license_data);
208
+ wp_die();
209
+
210
+ }
211
+
212
+
213
+ /**
214
+ * Request to EDD to deactivate the licence.
215
+ *
216
+ * @since 2.1.0
217
+ * @since 2.3.0 Hooked into the EDD Software Licensing API
218
+ * @param none
219
+ * @return JSON Encoded Array (Echoed) - The Response from the EDD API
220
+ *
221
+ */
222
+ public function unregister_plugin() {
223
+ // Setup the variables needed for processing
224
+ $options = get_option( 'social_warfare_settings' );
225
+ $key = $_POST['name_key'];
226
+ $item_id = $_POST['item_id'];
227
+ $response = array();
228
+
229
+ // Check to see if the license key is even in the options
230
+ if ( !SWP_Utility::get_option( $key . '_license_key' ) ) :
231
+
232
+ $response['success'] = true;
233
+ echo json_encode($response);
234
+ wp_die();
235
+
236
+ endif;
237
+
238
+ // Grab the license key so we can use it below
239
+ $license = $options[$key.'_license_key'];
240
+
241
+ // Setup the API request parameters
242
+ $api_params = array(
243
+ 'edd_action' => 'deactivate_license',
244
+ 'item_id' => $item_id,
245
+ 'license' => $license,
246
+ 'url' => $this->site_url,
247
+ );
248
+
249
+ //* wp_remote_retrieve_body encodes to JSON for us.
250
+ $response = wp_remote_retrieve_body( wp_remote_post( $this->store_url, array( 'body' => $api_params, 'timeout' => 10 ) ) );
251
+
252
+ $options = get_option( 'social_warfare_settings' );
253
+ $options[$key.'_license_key'] = '';
254
+ update_option( 'social_warfare_settings' , $options );
255
+
256
+ echo $response;
257
+
258
+ wp_die();
259
+ }
260
+
261
+ public function ajax_passthrough() {
262
+ if ( ! check_ajax_referer( 'swp_plugin_registration', 'security', false ) ) {
263
+ wp_send_json_error( esc_html__( 'Security failed.', 'social-warfare' ) );
264
+ die;
265
+ }
266
+
267
+ $data = wp_unslash( $_POST ); // Input var okay.
268
+
269
+ if ( ! isset( $data['activity'], $data['email'] ) ) {
270
+ wp_send_json_error( esc_html__( 'Required fields missing.', 'social-warfare' ) );
271
+ die;
272
+ }
273
+
274
+ if ( 'register' === $data['activity'] ) {
275
+ $response = swp_register_plugin( $data['email'], SWP_Utility::get_site_url() );
276
+
277
+ if ( ! $response ) {
278
+ wp_send_json_error( esc_html__( 'Plugin could not be registered.', 'social-warfare' ) );
279
+ die;
280
+ }
281
+
282
+ $response['message'] = esc_html__( 'Plugin successfully registered!', 'social-warfare' );
283
+ }
284
+
285
+ if ( 'unregister' === $data['activity'] && isset( $data['key'] ) ) {
286
+ $response = swp_unregister_plugin( $data['email'], $data['key'] );
287
+
288
+ if ( ! $response ) {
289
+ wp_send_json_error( esc_html__( 'Plugin could not be unregistered.', 'social-warfare' ) );
290
+ die;
291
+ }
292
+
293
+ $response['message'] = esc_html__( 'Plugin successfully unregistered!', 'social-warfare' );
294
+ }
295
+
296
+ wp_send_json_success( $response );
297
+
298
+ die;
299
+ }
300
+ }
{functions → lib}/admin/SWP_Click_To_Tweet.php RENAMED
File without changes
{functions → lib}/admin/SWP_Column.php RENAMED
@@ -22,7 +22,7 @@ class SWP_Column {
22
  * will queue up all the other methods by adding them to the necessary
23
  * WordPress action and filter hooks.
24
  *
25
- * NOTE: These "duplicate" hooks/functions are to cover both posts and pages.
26
  *
27
  * @since 3.0.0 | 01 MAR 2018 | Created
28
  * @param void
22
  * will queue up all the other methods by adding them to the necessary
23
  * WordPress action and filter hooks.
24
  *
25
+ * NOTE: These "duplicate" hooks/lib are to cover both posts and pages.
26
  *
27
  * @since 3.0.0 | 01 MAR 2018 | Created
28
  * @param void
{functions → lib}/admin/SWP_Settings_Link.php RENAMED
File without changes
{functions → lib}/admin/SWP_Shortcode_Generator.php RENAMED
@@ -106,7 +106,7 @@ class SWP_Shortcode_Generator {
106
  *
107
  */
108
  public function tinymce_register_plugin( $plugin_array ) {
109
- $plugin_array['swp_shortcode_generator'] = SWP_PLUGIN_URL . '/js/sw-shortcode-generator.js';
110
  return $plugin_array;
111
  }
112
 
106
  *
107
  */
108
  public function tinymce_register_plugin( $plugin_array ) {
109
+ $plugin_array['swp_shortcode_generator'] = SWP_PLUGIN_URL . '/assets/js/sw-shortcode-generator.js';
110
  return $plugin_array;
111
  }
112
 
lib/admin/SWP_Sidebar_Loader.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * SWP_Sidebar_Loader
5
+ *
6
+ * This pulls in the sidebar component JSON from our server and displays it as HTML.
7
+ *
8
+ * We can cachce the HTML so as not to make an excessive number of ajax calls.
9
+ *
10
+ * @package SocialWarfare\Functions\Social-Networks
11
+ * @copyright Copyright (c) 2018, Warfare Plugins, LLC
12
+ * @license GPL-3.0+
13
+ * @since 3.3.0 | 03 AUG 2018 | Created.
14
+ *
15
+ */
16
+ class SWP_Sidebar_Loader {
17
+
18
+
19
+ /**
20
+ * Instantiate the class.
21
+ *
22
+ * @since 3.3.0 | 03 AUG 2018 | Created.
23
+ * @param void
24
+ * @return void
25
+ *
26
+ */
27
+ public function __construct() {
28
+ $this->load_components();
29
+ }
30
+
31
+
32
+ /**
33
+ * Activate notices created via our remote JSON file.
34
+ *
35
+ * @since 3.1.0 | 27 JUN 2018 | Created
36
+ * @param void
37
+ * @return void
38
+ *
39
+ */
40
+ private function load_components() {
41
+ $cache_data = get_option('swp_json_cache');
42
+
43
+ if( false === $cache_data ):
44
+ return;
45
+ endif;
46
+
47
+ if( !is_array( $cache_data ) || empty($cache_data['sidebar']) ):
48
+ return;
49
+ endif;
50
+
51
+ add_filter( 'swp_admin_sidebar', function( $components ) {
52
+ return array_merge( $components, $cache_data['sidebar'] );
53
+ });
54
+ }
55
+
56
+
57
+ /**
58
+ * A function for debugging this class.
59
+ *
60
+ * All notices are stored in the $this->notices as an array of notice
61
+ * objects. Since this is the last method called, all notices should be
62
+ * present in the $this object for review.
63
+ *
64
+ * @since 3.1.0 | 28 JUN 2018 | Created
65
+ * @param void
66
+ * @return void
67
+ *
68
+ */
69
+ private function debug() {
70
+ if( true === SWP_Utility::debug( 'notices' ) ):
71
+ var_dump($this);
72
+ endif;
73
+ }
74
+
75
+ }
{functions → lib}/admin/SWP_User_Profile.php RENAMED
File without changes
{functions → lib}/admin/assets/css/admin.css RENAMED
File without changes
{functions → lib}/admin/assets/css/style1.css RENAMED
File without changes
{functions → lib}/admin/assets/css/style2.css RENAMED
File without changes
{functions → lib}/admin/assets/css/style3.css RENAMED
File without changes
{functions → lib}/admin/assets/css/style4.css RENAMED
File without changes
{functions → lib}/admin/assets/css/styles.css RENAMED
File without changes
{functions → lib}/admin/assets/img/twitter-little-bird-button.png RENAMED
File without changes
{functions → lib}/admin/assets/img/twitter-little-bird-white.png RENAMED
File without changes
{functions → lib}/admin/assets/img/twitter-little-bird.png RENAMED
File without changes
{functions → lib}/admin/assets/js/clickToTweet.js RENAMED
File without changes
{functions → lib}/admin/assets/js/clickToTweet.min.js RENAMED
File without changes
{functions → lib}/admin/assets/js/tmclicktotweet_plugin.js RENAMED
File without changes
{functions → lib}/admin/swp_system_checker.php RENAMED
File without changes
{functions → lib}/frontend-output/SWP_Buttons_Panel.php RENAMED
@@ -136,9 +136,8 @@ class SWP_Buttons_Panel {
136
  *
137
  */
138
  private function localize_options() {
139
- global $swp_user_options;
140
- $this->options = array_merge( $swp_user_options, $this->args );
141
- $this->post_data['options'] = $swp_user_options;
142
  }
143
 
144
 
@@ -154,7 +153,15 @@ class SWP_Buttons_Panel {
154
  * @access public
155
  *
156
  */
157
- public function set_option( $option , $value ) {
 
 
 
 
 
 
 
 
158
  $this->options[$this->options] = $value;
159
  return $this;
160
  }
@@ -171,7 +178,12 @@ class SWP_Buttons_Panel {
171
  * @access public
172
  *
173
  */
174
- public function set_options( $options ) {
 
 
 
 
 
175
  array_merge( $this->options , $options );
176
  return $this;
177
  }
@@ -189,30 +201,32 @@ class SWP_Buttons_Panel {
189
  * @access public
190
  *
191
  */
192
- public function establish_post_id() {
193
- // Legacy support.
194
- if ( isset( $this->args['postID'] ) ) :
195
- $this->post_id = $this->args['postID'];
196
- return;
197
- endif;
198
 
199
- // Current argument.
200
- if ( isset( $this->args['post_id'] ) ) :
201
- $this->post_id = $this->args['post_id'];
202
- return;
203
- endif;
204
 
205
- if ( isset ( $this->args['id'] ) ) :
206
- $this->post_id = $this->args['id'];
207
- return;
 
 
 
 
 
 
 
208
  endif;
209
 
210
- global $post;
211
-
212
  if ( is_object( $post ) ) :
213
  $this->post_id = $post->ID;
214
  endif;
215
- }
216
 
217
 
218
  /**
@@ -256,7 +270,7 @@ class SWP_Buttons_Panel {
256
  public function establish_share_data() {
257
  global $SWP_Post_Caches;
258
  $this->shares = $SWP_Post_Caches->get_post_cache( $this->post_id )->get_shares();
259
- // echo "The post cache", var_dump($SWP_Post_Caches->get_post_cache( $this->post_id ));
260
  return $this;
261
  }
262
 
@@ -338,19 +352,25 @@ class SWP_Buttons_Panel {
338
  *
339
  */
340
  // If we are on the home page
341
- if( is_front_page() ):
342
  $home = $this->options['location_home'];
343
  $this->location = isset( $home ) ? $home : 'none';
 
 
344
  endif;
345
 
 
346
  // If we are on a singular page
347
- if ( is_singular() && !is_front_page() ) :
348
  $location = $this->options[ 'location_' . $this->post_data['post_type'] ];
 
349
  if ( isset( $location ) ) :
350
  $this->location = $location;
351
  endif;
 
352
  endif;
353
 
 
354
  if ( is_archive() || is_home() ) :
355
  $this->location = $this->options['location_archive_categories'];
356
  endif;
@@ -373,43 +393,19 @@ class SWP_Buttons_Panel {
373
  }
374
 
375
 
 
 
 
 
 
 
 
 
376
  protected function establish_permalink() {
377
  $this->permalink = get_permalink( $this->post_id );
378
  }
379
 
380
 
381
- /**
382
- * When we have known incompatability with other themes/plugins,
383
- * we can put those checks in here.
384
- *
385
- * Checks for known conflicts with other plugins and themes.
386
- *
387
- * If there is a fatal conflict, returns true and exits printing.
388
- * If there are other conflicts, they are silently handled and can still
389
- * print.
390
- *
391
- * @since 3.0.0 | 01 MAR 2018 | Created
392
- * @param void
393
- * @return bool $conflict True iff the conflict is fatal.
394
- *
395
- */
396
- protected function has_plugin_conflict() {
397
-
398
- // Disable subtitles plugin to prevent it from injecting subtitles
399
- // into our share titles.
400
- if ( is_plugin_active( 'subtitles/subtitles.php' ) && class_exists( 'Subtitles' ) ) :
401
- remove_filter( 'the_title', array( Subtitles::getinstance(), 'the_subtitle' ), 10, 2 );
402
- endif;
403
-
404
- //* Disable on BuddyPress pages.
405
- if ( function_exists( 'is_buddypress' ) && is_buddypress() ) :
406
- return true;
407
- endif;
408
-
409
- return false;
410
- }
411
-
412
-
413
  /**
414
  * Tells you true/false if the buttons should print on this page.
415
  *
@@ -437,7 +433,7 @@ class SWP_Buttons_Panel {
437
 
438
  $user_settings = $this->location !== 'none';
439
 
440
- $desired_conditions = is_main_query() && in_the_loop() && get_post_status( $this->post_id ) === 'publish';
441
 
442
  $undesired_conditions = is_admin() || is_feed() || is_search() || is_attachment();
443
 
@@ -452,61 +448,55 @@ class SWP_Buttons_Panel {
452
  * @since 3.0.3 | 09 MAY 2018 | Switched the button locations to use the
453
  * location methods instead of the raw options value.
454
  * @since 3.0.6 | 15 MAY 2018 | Uses $this->option() method to prevent undefined index error.
 
455
  * @param boolean $echo Echo's the content or returns it if false.
456
  * @return string The string of HTML.
457
  *
458
  */
459
  public function render_HTML( $echo = false ) {
460
- if ( !isset( $this->post_id ) ) :
461
  return;
462
  endif;
463
 
464
  $style = "";
 
465
 
466
- if ( !$this->should_print() ) :
467
- //* Top and bottom floating buttons require a button panel present on the page.
468
- $float_location = $this->get_float_location();
 
469
 
470
- if ( true === $this->option( 'floating_panel' ) && 'top' == $float_location || 'bottom' == $float_location ) :
471
- //* Using display: none interfere's with the element's position,
472
- //* Which we need to be calculated correctly.
473
- $style = 'opacity: 0;';
474
- else :
475
- return $this->content;
476
- endif;
477
- endif;
478
 
479
  // Create the HTML Buttons panel wrapper
480
- $container = '<div class="swp_social_panel swp_' . $this->option('button_shape') .
481
- ' swp_default_' . $this->option('default_colors') .
482
- ' swp_individual_' . $this->option('single_colors') .
483
- ' swp_other_' . $this->option('hover_colors') .
484
- ' scale-' . $this->option('button_size') * 100 .
485
- ' scale-' . $this->option('button_alignment') .
486
- '" style="' . $style .
487
- '" data-min-width="' . $this->option('float_screen_width') .
488
- '" data-panel-position="' . $this->option('location_post') .
489
- '" data-float="' . $this->get_float_location() .
490
- '" data-float-mobile="' . $this->get_mobile_float_location() .
491
- '" data-count="' . $this->total_shares .
492
- '" data-float-color="' . $this->option('float_background_color') . '
493
- ">';
494
- //* This should be inserted via addon, not here.
495
- //'" data-emphasize="'.$this->option('emphasize_icons').'
496
-
497
- $total_shares_html = $this->render_total_shares_html();
498
- $buttons = $this->render_buttons_html();
499
-
500
- if ($this->option('totals_alignment') === 'totals_left') :
501
- $buttons = $total_shares_html . $buttons;
502
- else:
503
- $buttons .= $total_shares_html;
504
- endif;
505
 
506
  $html = $container . $buttons . '</div>';
507
  $this->html = $html;
508
  if ( $echo ) :
509
- if( true == _swp_is_debug('buttons_output')):
510
  echo 'Echoing, not returning. In SWP_Buttons_Panel on line '.__LINE__;
511
  endif;
512
  echo $html;
@@ -516,6 +506,170 @@ class SWP_Buttons_Panel {
516
  }
517
 
518
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
519
  /**
520
  * A function to avoid getting undefined index notices.
521
  *
@@ -525,17 +679,11 @@ class SWP_Buttons_Panel {
525
  *
526
  */
527
  private function option($key) {
528
-
529
- $defaults = array();
530
- $defaults = apply_filters('swp_options_page_defaults' , $defaults );
531
-
532
- if( isset( $this->options[$key] ) ):
533
  return $this->options[$key];
534
- elseif( isset( $defaults[$key] ) ):
535
- return $defaults[$key];
536
- else:
537
- return false;
538
- endif;
539
  }
540
 
541
 
@@ -556,28 +704,28 @@ class SWP_Buttons_Panel {
556
  public function get_float_location() {
557
  $post_on = false;
558
 
559
- if( is_home() && !is_front_page() || !isset( $this->post_id ) ):
560
  return 'none';
561
- endif;
562
 
563
  $post_setting = get_post_meta( $this->post_id, 'swp_float_location', true );
564
 
565
- if( is_array( $post_setting ) ) :
566
  $post_setting = $post_setting[0];
567
- endif;
568
 
569
  // If the location is set in the post options, use that.
570
  if ( !empty( $post_setting ) && 'default' != $post_setting ) {
571
- if( 'off' === $post_setting) :
572
  return 'none';
573
- endif;
574
 
575
  $post_on = true;
576
  };
577
 
578
- if ( $post_on || is_singular() && true === $this->option('floating_panel') && 'on' === $this->option('float_location_' . $this->post_data['post_type'] ) ) :
579
  return $this->option('float_location');
580
- endif;
581
 
582
  return 'none';
583
  }
@@ -598,13 +746,11 @@ class SWP_Buttons_Panel {
598
  *
599
  */
600
  public function get_mobile_float_location() {
601
- if( is_home() || is_front_page() ):
602
- return 'none';
603
- elseif( is_single() && true == $this->option('floating_panel') && 'on' == $this->option('float_location_' . $this->post_data['post_type'] ) ):
604
  return $this->option('float_mobile');
605
- else:
606
- return 'none';
607
- endif;
608
  }
609
 
610
 
@@ -620,11 +766,11 @@ class SWP_Buttons_Panel {
620
  public function render_floating_HTML( $echo = true ) {
621
  $blacklist = ['none', 'top', 'bottom'];
622
 
623
- if ( in_array( $this->option('float_location'), $blacklist ) ) :
624
  return '';
625
- endif;
626
 
627
- if( is_singular() && 'none' !== $this->get_float_location() ):
628
 
629
  //* BEGIN Old boilerplate that needs to be refactored.
630
  $class = "";
@@ -632,51 +778,35 @@ class SWP_Buttons_Panel {
632
  $side = $this->option('float_location');
633
  $max_buttons = $this->option( 'float_button_count' );
634
 
635
- if( false == $max_buttons || 0 == $max_buttons ):
636
  $max_buttons = 5;
637
- endif;
638
 
639
- // Acquire the social stats from the networks
640
- if ( isset( $array['url'] ) ) :
641
- $buttonsArray['url'] = $array['url'];
642
- else :
643
- $buttonsArray['url'] = get_permalink( $this->post_id );
644
- endif;
645
 
646
- if ( 'none' != $this->get_float_location() ) :
647
  $float_location = $this->option('float_location');
648
  $class = "swp_float_" . $this->option('float_location');
649
- else :
650
- // $float_location = 'ignore';
651
- endif;
652
-
653
- if ( $this->options['float_style_source'] == true ) :
654
- $this->options['float_default_colors'] = $this->option('default_colors');
655
- $this->options['float_single_colors'] = $this->option('single_colors');
656
- $this->options['float_hover_colors'] = $this->option('hover_colors');
657
- endif;
658
 
659
  // *Get the vertical position
660
- if ($this->option('float_alignment') ) :
661
  $class .= " swp_side_" . $this->option('float_alignment');
662
- endif;
663
 
664
  // *Set button size
665
- if ( isset($this->options['float_size']) ) :
666
  $position = $this->option('float_alignment');
667
  $class .= " scale-${size} float-position-${position}-${side}";
668
- endif;
669
 
670
  //* END old boilerplate.
671
 
672
  $share_counts = $this->render_total_shares_HTML();
673
  $buttons = $this->render_buttons_HTML( (int) $max_buttons );
674
 
675
- $container = '<div class="swp_social_panelSide swp_social_panel swp_'. $this->option('float_button_shape') .
676
- ' swp_default_' . $this->option('float_default_colors') .
677
- ' swp_individual_' . $this->option('float_single_colors') .
678
- ' swp_other_' . $this->option('float_hover_colors') . '
679
- ' . $this->option('transition') . '
680
  ' . $class . '
681
  ' . '" data-panel-position="' . $this->option('location_post') .
682
  ' scale-' . $this->option('float_size') * 100 .
@@ -687,21 +817,21 @@ class SWP_Buttons_Panel {
687
  '" data-transition="' . $this->option('transition') .
688
  '" data-float-mobile="' . $this->get_mobile_float_location() .'">';
689
 
690
- if ($this->option('totals_alignment') === 'totals_left') :
691
  $buttons = $share_counts . $buttons;
692
- else:
693
  $buttons .= $share_counts;
694
- endif;
695
 
696
  $html = $container . $buttons . '</div>';
697
  $this->html = $html;
698
 
699
- if ( $echo ) :
700
  echo $html;
701
- endif;
702
 
703
  return $html;
704
- endif;
705
 
706
  }
707
 
@@ -742,17 +872,16 @@ class SWP_Buttons_Panel {
742
 
743
  //* Use global button settings.
744
  else :
745
-
746
  // Order manually using the user's specified order.
747
- if ( $this->options['order_of_icons_method'] === 'manual' ) :
748
- $order = $this->options['order_of_icons'];
749
 
750
  // Order them dynamically according to share counts.
751
  else :
752
  $order = $this->get_dynamic_buttons_order();
753
  endif;
754
 
755
- $network_objects = $this->order_network_objects($order);
756
  endif;
757
 
758
  $this->networks = $network_objects;
@@ -790,15 +919,21 @@ class SWP_Buttons_Panel {
790
 
791
 
792
  /**
793
- * A method to shuffle the array of network objects.
794
  *
795
  * @since 3.0.0 | 04 MAY 2018 | Created
 
796
  * @param array $order An ordered array of network keys.
797
  * @return array An ordered array of network objects.
798
  *
799
  */
800
- public function order_network_objects( $order ) {
801
  $network_objects = array();
 
 
 
 
 
802
  foreach( $order as $network_key ) {
803
  foreach( $this->networks as $key => $network ) :
804
  if ( $key === $network_key ) :
@@ -806,6 +941,7 @@ class SWP_Buttons_Panel {
806
  endif;
807
  endforeach;
808
  }
 
809
  return $network_objects;
810
  }
811
 
@@ -836,9 +972,9 @@ class SWP_Buttons_Panel {
836
  * If share counts are active, renders the Total Share Counts HTML.
837
  *
838
  * @since 3.0.0 | 18 APR 2018 | Created
839
- * @param none
 
840
  * @return string $html The fully qualified HTML to display share counts.
841
- * @todo Simplify that conditional. Maybe break it into another method.
842
  *
843
  */
844
  public function render_total_shares_html() {
@@ -852,14 +988,15 @@ class SWP_Buttons_Panel {
852
  return '';
853
  }
854
 
855
- $totals_argument = in_array( 'total', $buttons ) || in_array( 'totals', $buttons );
 
856
 
857
  if ( $this->is_shortcode && !$totals_argument ) {
858
  return '';
859
  }
860
 
861
  $html = '<div class="nc_tweetContainer total_shares total_sharesalt" >';
862
- $html .= '<span class="swp_count ">' . swp_kilomega( $this->shares['total_shares'] ) . ' <span class="swp_label">' . __( 'Shares','social-warfare' ) . '</span></span>';
863
  $html .= '</div>';
864
 
865
  return $html;
@@ -875,17 +1012,26 @@ class SWP_Buttons_Panel {
875
  *
876
  */
877
  public function do_print() {
878
-
879
  $this->render_HTML();
880
 
881
  //* Add the Panel markup based on the location.
882
- if ( $this->location === 'both' ) :
883
- $content = $this->html . $this->content . $this->html;
884
- elseif ( $this->location === 'above' ) :
885
- $content = $this->html . $this->content;
886
- else :
887
- $content = $this->content . $this->html;
888
- endif;
 
 
 
 
 
 
 
 
 
 
889
 
890
  $this->content = $content;
891
 
@@ -919,9 +1065,7 @@ class SWP_Buttons_Panel {
919
  $this->args['content'] = $content;
920
  endif;
921
 
922
- if ( $this->has_plugin_conflict() ) {
923
- return;
924
- }
925
 
926
  return $this->do_print();
927
  }
@@ -936,7 +1080,7 @@ class SWP_Buttons_Panel {
936
  *
937
  */
938
  public function debug() {
939
- if ( true === _swp_is_debug( 'buttons_panel' ) ) :
940
  echo "<pre>";
941
  var_dump($this);
942
  echo "</pre>";
136
  *
137
  */
138
  private function localize_options() {
139
+ global $swp_user_options;
140
+ $this->options = array_merge( $swp_user_options, $this->args);
 
141
  }
142
 
143
 
153
  * @access public
154
  *
155
  */
156
+ public function set_option( $option = '', $value = null ) {
157
+ if ( empty( $option ) ) :
158
+ $message = "Hey developer, " . __CLASS__ . __METHOD__ . " a first paramter $option (string) and \$value (mixed). You provided " . gettype($value) . ".";
159
+ throw new Exception($message);
160
+ elseif ( null == $value ) :
161
+ $message = "Hey developer, " . __CLASS__ . __METHOD__ . " a second paramter: \$value (mixed type). You provided " . gettype($value) . ".";
162
+ throw new Exception($message);
163
+ endif;
164
+
165
  $this->options[$this->options] = $value;
166
  return $this;
167
  }
178
  * @access public
179
  *
180
  */
181
+ public function set_options( $options = array() ) {
182
+ if ( !is_array( $options) ) :
183
+ $message = "Hey developer, " . __CLASS__ . __METHOD__ . " requires an arry of options. You provided " . gettype($options) . ".";
184
+ throw new Exception($message);
185
+ endif;
186
+
187
  array_merge( $this->options , $options );
188
  return $this;
189
  }
201
  * @access public
202
  *
203
  */
204
+ public function establish_post_id() {
205
+ global $post;
 
 
 
 
206
 
207
+ if ( isset( $this->args['url'] ) ) :
208
+ if ( $id = url_to_postid( $this->args['url'] ) ) :
209
+ return $this->post_id = $id;
210
+ endif;
211
+ endif;
212
 
213
+ // Legacy support.
214
+ if ( isset( $this->args['postid'] ) ) :
215
+ return $this->post_id = $this->args['postid'];
216
+ endif;
217
+ // Current argument.
218
+ if ( isset( $this->args['post_id'] ) && is_numeric( $this->args['post_id'] ) ) :
219
+ return $this->post_id = $this->args['post_id'];
220
+ endif;
221
+ if ( isset( $this->args['id'] ) && is_numeric( $this->args['id'] ) ) :
222
+ return $this->post_id = $this->args['id'];
223
  endif;
224
 
225
+ //* We weren't provided any context for an ID, so default to the post.
 
226
  if ( is_object( $post ) ) :
227
  $this->post_id = $post->ID;
228
  endif;
229
+ }
230
 
231
 
232
  /**
270
  public function establish_share_data() {
271
  global $SWP_Post_Caches;
272
  $this->shares = $SWP_Post_Caches->get_post_cache( $this->post_id )->get_shares();
273
+
274
  return $this;
275
  }
276
 
352
  *
353
  */
354
  // If we are on the home page
355
+ if( is_front_page() ) :
356
  $home = $this->options['location_home'];
357
  $this->location = isset( $home ) ? $home : 'none';
358
+
359
+ return;
360
  endif;
361
 
362
+
363
  // If we are on a singular page
364
+ if ( is_singular() ) :
365
  $location = $this->options[ 'location_' . $this->post_data['post_type'] ];
366
+
367
  if ( isset( $location ) ) :
368
  $this->location = $location;
369
  endif;
370
+
371
  endif;
372
 
373
+
374
  if ( is_archive() || is_home() ) :
375
  $this->location = $this->options['location_archive_categories'];
376
  endif;
393
  }
394
 
395
 
396
+ /**
397
+ * A method for fetching the permalink.
398
+ *
399
+ * @since 3.0.0 | 01 MAR 2018 | Created
400
+ * @param void
401
+ * @return void Values are stored in $this->permalink.
402
+ *
403
+ */
404
  protected function establish_permalink() {
405
  $this->permalink = get_permalink( $this->post_id );
406
  }
407
 
408
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
409
  /**
410
  * Tells you true/false if the buttons should print on this page.
411
  *
433
 
434
  $user_settings = $this->location !== 'none';
435
 
436
+ $desired_conditions = is_main_query() && get_post_status( $this->post_id ) === 'publish';
437
 
438
  $undesired_conditions = is_admin() || is_feed() || is_search() || is_attachment();
439
 
448
  * @since 3.0.3 | 09 MAY 2018 | Switched the button locations to use the
449
  * location methods instead of the raw options value.
450
  * @since 3.0.6 | 15 MAY 2018 | Uses $this->option() method to prevent undefined index error.
451
+ * @since 3.3.1 | 13 SEP 2018 | Added get_alignment()
452
  * @param boolean $echo Echo's the content or returns it if false.
453
  * @return string The string of HTML.
454
  *
455
  */
456
  public function render_HTML( $echo = false ) {
457
+ if ( !isset( $this->post_id ) || is_preview() ) :
458
  return;
459
  endif;
460
 
461
  $style = "";
462
+ $float_mobile = SWP_Utility::get_option( 'float_mobile');
463
 
464
+ if ( !$this->should_print() && ( 'top' == $float_mobile || 'bottom' == $float_mobile ) ) :
465
+ if ( true !== $this->option( 'floating_panel' ) ) :
466
+ return $this->content;
467
+ endif;
468
 
469
+ $style = ' opacity: 0; ';
470
+ endif;
 
 
 
 
 
 
471
 
472
  // Create the HTML Buttons panel wrapper
473
+ $container = '<div class="swp_social_panel swp_horizontal_panel ' .
474
+ $this->get_shape() .
475
+ $this->get_colors() .
476
+ $this->get_scale() .
477
+ $this->get_alignment() .
478
+ '" ' . // end CSS classes
479
+ $this->get_min_width() .
480
+ $this->get_float_background() .
481
+ //* These below two data-attribute methods are inconsistent. But they
482
+ //* already existed and are used elsewhere, so I'm not touching them.
483
+ '" data-float="' . $this->get_float_location() . '"' .
484
+ ' data-float-mobile="' . $this->get_mobile_float_location() . '"' .
485
+ ' style="' . $style . '" >';
486
+
487
+ $total_shares_html = $this->render_total_shares_html();
488
+ $buttons = $this->render_buttons_html();
489
+
490
+ if ($this->option('totals_alignment') === 'totals_left') :
491
+ $buttons = $total_shares_html . $buttons;
492
+ else:
493
+ $buttons .= $total_shares_html;
494
+ endif;
 
 
 
495
 
496
  $html = $container . $buttons . '</div>';
497
  $this->html = $html;
498
  if ( $echo ) :
499
+ if( true == SWP_Utility::debug('buttons_output')):
500
  echo 'Echoing, not returning. In SWP_Buttons_Panel on line '.__LINE__;
501
  endif;
502
  echo $html;
506
  }
507
 
508
 
509
+ protected function get_alignment() {
510
+ return ' scale-' . $this->option('button_alignment');
511
+ }
512
+
513
+
514
+ /**
515
+ * A function to get the color states for this buttons panel.
516
+ *
517
+ * All of the buttons contain 3 states: default, hover, and single. The
518
+ * default state is what the buttons look like when not being interacted
519
+ * with. The hover is what all the buttons in the panel look like when
520
+ * the panel is being hovered. The single is what the individual button
521
+ * being hovered will look like.
522
+ *
523
+ * This method handles generating the classes that the CSS can target to
524
+ * ensure that all three of those states work.
525
+ *
526
+ * @since 3.0.0 | 01 MAR 2018 | Created
527
+ * @since 3.3.2 | 13 SEP 2018 | Modified to control float selectors better
528
+ * @param boolean $float Whether this is a floating panel or not.
529
+ * @return string The string of CSS classes to be used on the panel.
530
+ *
531
+ */
532
+ protected function get_colors( $float = false ) {
533
+
534
+
535
+ /**
536
+ * If pro was installed, but no longer is installed or activated,
537
+ * then this option won't exist and will return false. If so, then
538
+ * we output the default core color/style classes.
539
+ *
540
+ */
541
+ if ( false === $this->option( 'default_colors' ) ) {
542
+ return " swp_default_full_color swp_individual_full_color swp_other_full_color ";
543
+ }
544
+
545
+
546
+ /**
547
+ * If the buttons are the static horizontal buttons (not the float),
548
+ * or if it is the float but we are inheriting the styles from the
549
+ * horizontal buttons, then just output the CSS classes that are used
550
+ * for the horizontal buttons.
551
+ *
552
+ * "float_style_source" on the options page is actually answering
553
+ * the question "Do the floating buttons inherit their colors from
554
+ * the horizontal buttons?" It will be true if they do, and false if
555
+ * they don't.
556
+ *
557
+ */
558
+ $prefix = '';
559
+
560
+
561
+ /**
562
+ * If this is a set of floating buttons and we are not inheriting
563
+ * the color styles from the static floating buttons, then we need
564
+ * to return the style classes that are specific to the floating
565
+ * buttons being rendered.
566
+ *
567
+ */
568
+ if( true === $float && false === $this->options['float_style_source'] ) {
569
+ $prefix = 'float_';
570
+ }
571
+
572
+
573
+ /**
574
+ *
575
+ * If it's a static, horizontal panel, there is no prefix. If it's
576
+ * a floating panel, there is a prefix. However, the prefix needs
577
+ * to be removed for the CSS class name that is actualy output.
578
+ *
579
+ * So here we fetch the appropriate color options, strip out the
580
+ * "float_" prefix since we don't use that on the actual CSS
581
+ * selector, and then return the CSS classes that will be added to
582
+ * this buttons panel that is being rendered.
583
+ *
584
+ */
585
+ $default = str_replace( $prefix, '', $this->option( $prefix . 'default_colors' ) );
586
+ $hover = str_replace( $prefix, '', $this->option( $prefix . 'hover_colors' ) );
587
+ $single = str_replace( $prefix, '', $this->option( $prefix . 'single_colors' ) );
588
+ return " swp_default_{$default} swp_other_{$hover} swp_individual_{$single} ";
589
+
590
+ }
591
+
592
+
593
+ /**
594
+ * A method to fetch/determine the shape of the current buttons.
595
+ *
596
+ * @since 3.0.0 | 01 MAR 2018 | Created
597
+ * @param void
598
+ * @return string The string of the CSS class to be used.
599
+ *
600
+ */
601
+ protected function get_shape() {
602
+ $button_shape = $this->option( 'button_shape' );
603
+
604
+ //* They have gone from an Addon to Core.
605
+ if ( false === $button_shape ) {
606
+ return " swp_flat_fresh ";
607
+ }
608
+
609
+ return " swp_{$button_shape} ";
610
+ }
611
+
612
+
613
+ /**
614
+ * A method to fetch/determine the size/scale of the panel.
615
+ *
616
+ * @since 3.0.0 | 01 MAR 2018 | Created
617
+ * @param void
618
+ * @return string The CSS class to be added to the panel.
619
+ *
620
+ */
621
+ protected function get_scale() {
622
+ $button_size = $this->option( 'button_size' );
623
+
624
+ //* They have gone from an Addon to Core.
625
+ if ( false === $button_size ) {
626
+ return " scale-100 ";
627
+ }
628
+
629
+ return ' scale-' . $button_size * 100;
630
+ }
631
+
632
+
633
+ /**
634
+ * A method for getting the minimum width of the buttons panel.
635
+ *
636
+ * @since 3.0.0 | 01 MAR 2018 | Created
637
+ * @param void
638
+ * @return string The HTML attribute to be added to the buttons panel.
639
+ *
640
+ */
641
+ protected function get_min_width() {
642
+ $min_width = $this->option( 'float_screen_width' );
643
+
644
+ //* They have gone from an Addon to Core.
645
+ if ( false === $min_width ) {
646
+ return 'data-min-width="1100" ';
647
+ }
648
+
649
+ return " data-min-width='{$min_width}' ";
650
+ }
651
+
652
+
653
+ /**
654
+ * A method to determin the background color of the floating buttons.
655
+ *
656
+ * @since 3.0.0 | 01 MAR 2018 | Created
657
+ * @param void
658
+ * @return string The HTML attribute to be added to the buttons panel.
659
+ *
660
+ */
661
+ protected function get_float_background() {
662
+ $float_background_color = $this->option( 'float_background_color' );
663
+
664
+ //* They have gone from an Addon to Core.
665
+ if ( false === $float_background_color ) {
666
+ return " ";
667
+ }
668
+
669
+ return '" data-float-color="' . $float_background_color;
670
+ }
671
+
672
+
673
  /**
674
  * A function to avoid getting undefined index notices.
675
  *
679
  *
680
  */
681
  private function option($key) {
682
+ if( isset( $this->options[$key] ) ) {
 
 
 
 
683
  return $this->options[$key];
684
+ } else {
685
+ return SWP_Utility::get_option( $key );
686
+ }
 
 
687
  }
688
 
689
 
704
  public function get_float_location() {
705
  $post_on = false;
706
 
707
+ if( is_home() && !is_front_page() || !isset( $this->post_id ) ) {
708
  return 'none';
709
+ }
710
 
711
  $post_setting = get_post_meta( $this->post_id, 'swp_float_location', true );
712
 
713
+ if( is_array( $post_setting ) ) {
714
  $post_setting = $post_setting[0];
715
+ }
716
 
717
  // If the location is set in the post options, use that.
718
  if ( !empty( $post_setting ) && 'default' != $post_setting ) {
719
+ if( 'off' === $post_setting) {
720
  return 'none';
721
+ }
722
 
723
  $post_on = true;
724
  };
725
 
726
+ if ( $post_on || is_singular() && true === $this->option('floating_panel') && 'on' === $this->option('float_location_' . $this->post_data['post_type'] ) ) {
727
  return $this->option('float_location');
728
+ }
729
 
730
  return 'none';
731
  }
746
  *
747
  */
748
  public function get_mobile_float_location() {
749
+ if( is_single() && true == $this->option('floating_panel') && 'on' == $this->option('float_location_' . $this->post_data['post_type'] ) ) {
 
 
750
  return $this->option('float_mobile');
751
+ }
752
+
753
+ return 'none';
754
  }
755
 
756
 
766
  public function render_floating_HTML( $echo = true ) {
767
  $blacklist = ['none', 'top', 'bottom'];
768
 
769
+ if ( in_array( $this->option('float_location'), $blacklist ) || is_preview() ) {
770
  return '';
771
+ }
772
 
773
+ if( is_singular() && 'none' !== $this->get_float_location() ) {
774
 
775
  //* BEGIN Old boilerplate that needs to be refactored.
776
  $class = "";
778
  $side = $this->option('float_location');
779
  $max_buttons = $this->option( 'float_button_count' );
780
 
781
+ if( false == $max_buttons || 0 == $max_buttons ) {
782
  $max_buttons = 5;
783
+ }
784
 
 
 
 
 
 
 
785
 
786
+ if ( 'none' != $this->get_float_location() ) {
787
  $float_location = $this->option('float_location');
788
  $class = "swp_float_" . $this->option('float_location');
789
+ }
 
 
 
 
 
 
 
 
790
 
791
  // *Get the vertical position
792
+ if ($this->option('float_alignment') ) {
793
  $class .= " swp_side_" . $this->option('float_alignment');
794
+ }
795
 
796
  // *Set button size
797
+ if ( isset($this->options['float_size']) ) {
798
  $position = $this->option('float_alignment');
799
  $class .= " scale-${size} float-position-${position}-${side}";
800
+ }
801
 
802
  //* END old boilerplate.
803
 
804
  $share_counts = $this->render_total_shares_HTML();
805
  $buttons = $this->render_buttons_HTML( (int) $max_buttons );
806
 
807
+ $container = '<div class="swp_social_panelSide swp_floating_panel swp_social_panel swp_' . $this->option('float_button_shape') .
808
+ $this->get_colors(true) .
809
+ $this->option('transition') . '
 
 
810
  ' . $class . '
811
  ' . '" data-panel-position="' . $this->option('location_post') .
812
  ' scale-' . $this->option('float_size') * 100 .
817
  '" data-transition="' . $this->option('transition') .
818
  '" data-float-mobile="' . $this->get_mobile_float_location() .'">';
819
 
820
+ if ($this->option('totals_alignment') === 'totals_left') {
821
  $buttons = $share_counts . $buttons;
822
+ } else {
823
  $buttons .= $share_counts;
824
+ }
825
 
826
  $html = $container . $buttons . '</div>';
827
  $this->html = $html;
828
 
829
+ if ( $echo ) {
830
  echo $html;
831
+ }
832
 
833
  return $html;
834
+ }
835
 
836
  }
837
 
872
 
873
  //* Use global button settings.
874
  else :
 
875
  // Order manually using the user's specified order.
876
+ if ( !isset( $this->options['order_of_icons_method'] ) || $this->options['order_of_icons_method'] === 'manual' ) :
877
+ $order = SWP_Utility::get_option( 'order_of_icons' );
878
 
879
  // Order them dynamically according to share counts.
880
  else :
881
  $order = $this->get_dynamic_buttons_order();
882
  endif;
883
 
884
+ $network_objects = $this->get_ordered_network_objects( $order );
885
  endif;
886
 
887
  $this->networks = $network_objects;
919
 
920
 
921
  /**
922
+ * A method to arrange the array of network objects in proper order.
923
  *
924
  * @since 3.0.0 | 04 MAY 2018 | Created
925
+ * @since 3.3.0 | 30 AUG 2018 | Renamed from 'order_network_objects' to 'get_ordered_network_objects'
926
  * @param array $order An ordered array of network keys.
927
  * @return array An ordered array of network objects.
928
  *
929
  */
930
+ public function get_ordered_network_objects( $order ) {
931
  $network_objects = array();
932
+
933
+ if ( empty( $order ) ) :
934
+ $order = SWP_Utility::get_option( 'order_of_icons' );
935
+ endif;
936
+
937
  foreach( $order as $network_key ) {
938
  foreach( $this->networks as $key => $network ) :
939
  if ( $key === $network_key ) :
941
  endif;
942
  endforeach;
943
  }
944
+
945
  return $network_objects;
946
  }
947
 
972
  * If share counts are active, renders the Total Share Counts HTML.
973
  *
974
  * @since 3.0.0 | 18 APR 2018 | Created
975
+ * @since 3.3.2 | 12 SEP 2018 | Moved strtolower to $totals_argument
976
+ * @param void
977
  * @return string $html The fully qualified HTML to display share counts.
 
978
  *
979
  */
980
  public function render_total_shares_html() {
988
  return '';
989
  }
990
 
991
+ $totals_argument = in_array('total', array_map('strtolower', $buttons))
992
+ || in_array('totals', array_map('strtolower', $buttons));
993
 
994
  if ( $this->is_shortcode && !$totals_argument ) {
995
  return '';
996
  }
997
 
998
  $html = '<div class="nc_tweetContainer total_shares total_sharesalt" >';
999
+ $html .= '<span class="swp_count ">' . SWP_Utility::kilomega( $this->shares['total_shares'] ) . ' <span class="swp_label">' . __( 'Shares','social-warfare' ) . '</span></span>';
1000
  $html .= '</div>';
1001
 
1002
  return $html;
1012
  *
1013
  */
1014
  public function do_print() {
 
1015
  $this->render_HTML();
1016
 
1017
  //* Add the Panel markup based on the location.
1018
+ switch ($this->location) {
1019
+ case 'both' :
1020
+ $content = $this->html . $this->content . $this->html;
1021
+ break;
1022
+ case 'above' :
1023
+ $content = $this->html . $this->content;
1024
+ break;
1025
+ case 'below' :
1026
+ $content = $this->content . $this->html;
1027
+ break;
1028
+
1029
+ case 'none' :
1030
+ $content = $this->content;
1031
+ default :
1032
+ $content = $this->content;
1033
+ break;
1034
+ }
1035
 
1036
  $this->content = $content;
1037
 
1065
  $this->args['content'] = $content;
1066
  endif;
1067
 
1068
+
 
 
1069
 
1070
  return $this->do_print();
1071
  }
1080
  *
1081
  */
1082
  public function debug() {
1083
+ if ( true === SWP_Utility::debug( 'buttons_panel' ) ) :
1084
  echo "<pre>";
1085
  var_dump($this);
1086
  echo "</pre>";
{functions → lib}/frontend-output/SWP_Display.php RENAMED
@@ -45,8 +45,6 @@ class SWP_Display {
45
  *
46
  */
47
  public function __construct() {
48
-
49
-
50
  // The global array of posts that have already been processed.
51
  global $swp_already_print;
52
 
@@ -78,18 +76,19 @@ class SWP_Display {
78
  *
79
  */
80
  public function activate_buttons() {
81
- // Fetch the user's settings
82
- global $swp_user_options;
 
83
 
84
  // Only hook into the_content filter if is_singular() is true or
85
  // they don't use excerpts on the archive pages.
86
- if( true === is_singular() || true === $swp_user_options['full_content'] ):
87
  add_filter( 'the_content', array( $this, 'social_warfare_wrapper' ) , 20 );
88
  add_filter( 'the_content', array( $this, 'add_content_locator' ), 20);
89
  endif;
90
 
91
  // If we're not on is_singlular, we'll hook into the excerpt.
92
- if (false === is_singular() && false === $swp_user_options['full_content']) {
93
  // Add the buttons to the excerpts
94
  add_filter( 'the_excerpt', array( $this, 'social_warfare_wrapper' ) );
95
  }
@@ -119,7 +118,6 @@ class SWP_Display {
119
  *
120
  */
121
  public function social_warfare_wrapper( $content ) {
122
-
123
  // The global WordPress post object.
124
  global $post;
125
 
@@ -130,6 +128,7 @@ class SWP_Display {
130
 
131
  // Pass the content to the buttons constructor to place them inside.
132
  $buttons_panel = new SWP_Buttons_Panel( array( 'content' => $content ) );
 
133
  return $buttons_panel->the_buttons( $content );
134
  }
135
 
@@ -143,6 +142,9 @@ class SWP_Display {
143
  *
144
  */
145
  function floating_buttons() {
 
 
 
146
 
147
  // Instantiate a new Buttons Panel.
148
  $side_panel = new SWP_Buttons_Panel( array( 'content' => "" ) );
45
  *
46
  */
47
  public function __construct() {
 
 
48
  // The global array of posts that have already been processed.
49
  global $swp_already_print;
50
 
76
  *
77
  */
78
  public function activate_buttons() {
79
+ if ( Social_Warfare::has_plugin_conflict() ) :
80
+ return;
81
+ endif;
82
 
83
  // Only hook into the_content filter if is_singular() is true or
84
  // they don't use excerpts on the archive pages.
85
+ if( true === is_singular() || true === SWP_Utility::get_option( 'full_content' ) ):
86
  add_filter( 'the_content', array( $this, 'social_warfare_wrapper' ) , 20 );
87
  add_filter( 'the_content', array( $this, 'add_content_locator' ), 20);
88
  endif;
89
 
90
  // If we're not on is_singlular, we'll hook into the excerpt.
91
+ if (false === is_singular() && false === SWP_Utility::get_option( 'full_content' ) ) {
92
  // Add the buttons to the excerpts
93
  add_filter( 'the_excerpt', array( $this, 'social_warfare_wrapper' ) );
94
  }
118
  *
119
  */
120
  public function social_warfare_wrapper( $content ) {
 
121
  // The global WordPress post object.
122
  global $post;
123
 
128
 
129
  // Pass the content to the buttons constructor to place them inside.
130
  $buttons_panel = new SWP_Buttons_Panel( array( 'content' => $content ) );
131
+
132
  return $buttons_panel->the_buttons( $content );
133
  }
134
 
142
  *
143
  */
144
  function floating_buttons() {
145
+ if ( Social_Warfare::has_plugin_conflict() ) :
146
+ return;
147
+ endif;
148
 
149
  // Instantiate a new Buttons Panel.
150
  $side_panel = new SWP_Buttons_Panel( array( 'content' => "" ) );
{functions → lib}/frontend-output/SWP_Header_Output.php RENAMED
@@ -134,8 +134,8 @@ class SWP_Header_Output {
134
  return $info;
135
  endif;
136
 
137
- $style = '<style>@font-face {font-family: "sw-icon-font";src:url("' . SWP_PLUGIN_URL . '/fonts/sw-icon-font.eot?ver=' . SWP_VERSION . '");src:url("' . SWP_PLUGIN_URL . '/fonts/sw-icon-font.eot?ver=' . SWP_VERSION . '#iefix") format("embedded-opentype"),url("' . SWP_PLUGIN_URL . '/fonts/sw-icon-font.woff?ver=' . SWP_VERSION . '") format("woff"),
138
- url("' . SWP_PLUGIN_URL . '/fonts/sw-icon-font.ttf?ver=' . SWP_VERSION . '") format("truetype"),url("' . SWP_PLUGIN_URL . '/fonts/sw-icon-font.svg?ver=' . SWP_VERSION . '#1445203416") format("svg");font-weight: normal;font-style: normal;}</style>';
139
 
140
  if ( true === is_admin() ) {
141
  echo $style;
134
  return $info;
135
  endif;
136
 
137
+ $style = '<style>@font-face {font-family: "sw-icon-font";src:url("' . SWP_PLUGIN_URL . '/assets/fonts/sw-icon-font.eot?ver=' . SWP_VERSION . '");src:url("' . SWP_PLUGIN_URL . '/assets/fonts/sw-icon-font.eot?ver=' . SWP_VERSION . '#iefix") format("embedded-opentype"),url("' . SWP_PLUGIN_URL . '/assets/fonts/sw-icon-font.woff?ver=' . SWP_VERSION . '") format("woff"),
138
+ url("' . SWP_PLUGIN_URL . '/assets/fonts/sw-icon-font.ttf?ver=' . SWP_VERSION . '") format("truetype"),url("' . SWP_PLUGIN_URL . '/assets/fonts/sw-icon-font.svg?ver=' . SWP_VERSION . '#1445203416") format("svg");font-weight: normal;font-style: normal;}</style>';
139
 
140
  if ( true === is_admin() ) {
141
  echo $style;
{functions → lib}/frontend-output/SWP_Option_Page_Registration.php RENAMED
File without changes
{functions → lib}/frontend-output/SWP_Script.php RENAMED
@@ -67,7 +67,7 @@ class SWP_Script {
67
  public static function get_suffix() {
68
  $debug = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG;
69
 
70
- if ( _swp_is_debug( 'script' ) ) {
71
  $debug = true;
72
  }
73
 
@@ -86,20 +86,18 @@ class SWP_Script {
86
  * @return void
87
  */
88
  public function enqueue_scripts() {
89
- $options = get_option( 'social_warfare_settings ', array() );
90
-
91
  $suffix = SWP_Script::get_suffix();
92
 
93
  wp_enqueue_style(
94
  'social_warfare',
95
- SWP_PLUGIN_URL . "/css/style{$suffix}.css",
96
  array(),
97
  SWP_VERSION
98
  );
99
 
100
  wp_enqueue_script(
101
  'social_warfare_script',
102
- SWP_PLUGIN_URL . "/js/script{$suffix}.js",
103
  array( 'jquery' ),
104
  SWP_VERSION,
105
  true
@@ -124,14 +122,14 @@ class SWP_Script {
124
 
125
  wp_enqueue_style(
126
  'social_warfare_admin',
127
- SWP_PLUGIN_URL . "/css/admin{$suffix}.css",
128
  array(),
129
  SWP_VERSION
130
  );
131
 
132
  wp_enqueue_script(
133
  'social_warfare_admin_script',
134
- SWP_PLUGIN_URL . "/js/admin{$suffix}.js",
135
  array( 'jquery' ),
136
  SWP_VERSION
137
  );
@@ -153,8 +151,6 @@ class SWP_Script {
153
  *
154
  */
155
  public function footer_functions() {
156
- $options = get_option( 'social_warfare_settings ', array() );
157
-
158
  // Fetch a few variables.
159
  $info['postID'] = get_the_ID();
160
  $info['footer_output'] = '';
@@ -181,7 +177,8 @@ class SWP_Script {
181
  *
182
  */
183
  public function click_tracking( $info ) {
184
- $options = get_option( 'social_warfare_settings', array() );
 
185
 
186
  // Output the JS variable for click tracking if it is turned on.
187
  if ( isset( $options['click_tracking'] ) && true === $options['click_tracking'] ) {
@@ -204,7 +201,8 @@ class SWP_Script {
204
  *
205
  */
206
  public function frame_buster( $info ) {
207
- $options = get_option( 'social_warfare_settings ', array() );
 
208
 
209
  if ( true === $options['frame_buster'] ) :
210
  $info['footer_output'] .= PHP_EOL . 'function parentIsEvil() { var html = null; try { var doc = top.location.pathname; } catch(err){ }; if(typeof doc === "undefined") { return true } else { return false }; }; if (parentIsEvil()) { top.location = self.location.href; };var url = "' . get_permalink() . '";if(url.indexOf("stfi.re") != -1) { var canonical = ""; var links = document.getElementsByTagName("link"); for (var i = 0; i < links.length; i ++) { if (links[i].getAttribute("rel") === "canonical") { canonical = links[i].getAttribute("href")}}; canonical = canonical.replace("?sfr=1", "");top.location = canonical; console.log(canonical);};';
@@ -265,7 +263,9 @@ class SWP_Script {
265
  *
266
  */
267
  public function float_before_content( $vars ) {
268
- $options = get_option( 'social_warfare_settings ', array() );
 
 
269
  $float_before_content = $options['float_before_content'];
270
 
271
  $vars['footer_output'] = "var swpFloatBeforeContent = " . json_encode($float_before_content) . ";";
67
  public static function get_suffix() {
68
  $debug = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG;
69
 
70
+ if ( SWP_Utility::debug( 'script' ) ) {
71
  $debug = true;
72
  }
73
 
86
  * @return void
87
  */
88
  public function enqueue_scripts() {
 
 
89
  $suffix = SWP_Script::get_suffix();
90
 
91
  wp_enqueue_style(
92
  'social_warfare',
93
+ SWP_PLUGIN_URL . "/assets/css/style{$suffix}.css",
94
  array(),
95
  SWP_VERSION
96
  );
97
 
98
  wp_enqueue_script(
99
  'social_warfare_script',
100
+ SWP_PLUGIN_URL . "/assets/js/script{$suffix}.js",
101
  array( 'jquery' ),
102
  SWP_VERSION,
103
  true
122
 
123
  wp_enqueue_style(
124
  'social_warfare_admin',
125
+ SWP_PLUGIN_URL . "/assets/css/admin{$suffix}.css",
126
  array(),
127
  SWP_VERSION
128
  );
129
 
130
  wp_enqueue_script(
131
  'social_warfare_admin_script',
132
+ SWP_PLUGIN_URL . "/assets/js/admin{$suffix}.js",
133
  array( 'jquery' ),
134
  SWP_VERSION
135
  );
151
  *
152
  */
153
  public function footer_functions() {
 
 
154
  // Fetch a few variables.
155
  $info['postID'] = get_the_ID();
156
  $info['footer_output'] = '';
177
  *
178
  */
179
  public function click_tracking( $info ) {
180
+ global $swp_user_options;
181
+ $options = $swp_user_options;
182
 
183
  // Output the JS variable for click tracking if it is turned on.
184
  if ( isset( $options['click_tracking'] ) && true === $options['click_tracking'] ) {
201
  *
202
  */
203
  public function frame_buster( $info ) {
204
+ global $swp_user_options;
205
+ $options = $swp_user_options;
206
 
207
  if ( true === $options['frame_buster'] ) :
208
  $info['footer_output'] .= PHP_EOL . 'function parentIsEvil() { var html = null; try { var doc = top.location.pathname; } catch(err){ }; if(typeof doc === "undefined") { return true } else { return false }; }; if (parentIsEvil()) { top.location = self.location.href; };var url = "' . get_permalink() . '";if(url.indexOf("stfi.re") != -1) { var canonical = ""; var links = document.getElementsByTagName("link"); for (var i = 0; i < links.length; i ++) { if (links[i].getAttribute("rel") === "canonical") { canonical = links[i].getAttribute("href")}}; canonical = canonical.replace("?sfr=1", "");top.location = canonical; console.log(canonical);};';
263
  *
264
  */
265
  public function float_before_content( $vars ) {
266
+ global $swp_user_options;
267
+ $options = $swp_user_options;
268
+
269
  $float_before_content = $options['float_before_content'];
270
 
271
  $vars['footer_output'] = "var swpFloatBeforeContent = " . json_encode($float_before_content) . ";";
{functions → lib}/frontend-output/SWP_Shortcode.php RENAMED
@@ -38,8 +38,7 @@ class SWP_Shortcode {
38
  *
39
  */
40
  add_shortcode( 'clickToTweet', array($this, 'click_to_tweet' ) );
41
- add_shortcode( 'socialWarfare', array($this, 'buttons_shortcode_legacy' ) );
42
-
43
  }
44
 
45
 
@@ -78,25 +77,6 @@ class SWP_Shortcode {
78
  }
79
 
80
 
81
- /**
82
- * This is the legacy version of the social warfare button
83
- * shortcodes. It is used for nothing more than to call the
84
- * new version of the function. See above: $this->buttons_shortcode().
85
- *
86
- * This function will accept an array of arguments which WordPress
87
- * will create from the shortcode attributes.
88
- *
89
- * @since 3.0.0
90
- * @param $atts Array An array converted from shortcode attributes.
91
- * @return string The HTML of the Social Warfare buttons.
92
- *
93
- */
94
- public function buttons_shortcode_legacy( $settings ) {
95
-
96
- return $this->buttons_shortcode( array() );
97
- }
98
-
99
-
100
  /**
101
  * This is used to process the total shares across all tracked
102
  * social networks for any given WordPress post.
@@ -113,7 +93,7 @@ class SWP_Shortcode {
113
  */
114
  public function post_total_shares( $settings ) {
115
  $total_shares = get_post_meta( get_the_ID() , '_total_shares', true );
116
- $total_shares = swp_kilomega( $total_shares );
117
  return $total_shares;
118
  }
119
 
@@ -135,7 +115,7 @@ class SWP_Shortcode {
135
  public function sitewide_total_shares( $settings ) {
136
  global $wpdb;
137
  $sum = $wpdb->get_results( "SELECT SUM(meta_value) AS total FROM $wpdb->postmeta WHERE meta_key = '_total_shares'" );
138
- return swp_kilomega( $sum[0]->total );
139
  }
140
 
141
  /**
@@ -145,33 +125,41 @@ class SWP_Shortcode {
145
  * @return string The html of a click to tweet
146
  */
147
  function click_to_tweet( $atts ) {
148
- global $swp_user_options;
149
- $this->options = $swp_user_options;
150
-
151
- $url = SWP_URL_Management::process_url( get_permalink() , 'twitter' , get_the_ID() );
152
- (strpos( $atts['tweet'],'http' ) !== false ? $urlParam = '&url=/' : $urlParam = '&url=' . $url );
153
- $atts['tweet'] = rtrim( $atts['tweet'] );
 
 
 
 
 
 
 
 
154
 
155
  $user_twitter_handle = get_post_meta( get_the_ID() , 'swp_twitter_username' , true );
156
 
157
  if ( ! $user_twitter_handle ) :
158
- $user_twitter_handle = $this->options['twitter_id'];
159
  endif;
160
 
161
  if ( isset( $atts['theme'] ) && $atts['theme'] != 'default' ) :
162
  $theme = $atts['theme'];
163
  else :
164
- $theme = $this->options['ctt_theme'];
165
  endif;
166
 
167
- $text = urlencode( html_entity_decode( $atts['tweet'], ENT_COMPAT, 'UTF-8' ) ) . $urlParam ;
168
- $via = ($user_twitter_handle ? '&via=' . str_replace( '@','',$user_twitter_handle ) : '');
169
 
 
170
 
171
  $html = '<div class="sw-tweet-clear"></div>';
172
  $html .= '<a class="swp_CTT ' . $theme;
173
- $html .= '" href="https://twitter.com/share?text=' . $text . $via;
174
- $html .= '" data-link="https://twitter.com/share?text=' . $text . $via;
175
  $html .= '" rel="nofollow noreferrer noopener" target="_blank">';
176
  $html .= '<span class="sw-click-to-tweet">';
177
  $html .= '<span class="sw-ctt-text">';
@@ -186,4 +174,31 @@ class SWP_Shortcode {
186
 
187
  return $html;
188
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  }
38
  *
39
  */
40
  add_shortcode( 'clickToTweet', array($this, 'click_to_tweet' ) );
41
+ add_shortcode( 'socialWarfare', array($this, 'buttons_shortcode' ) );
 
42
  }
43
 
44
 
77
  }
78
 
79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  /**
81
  * This is used to process the total shares across all tracked
82
  * social networks for any given WordPress post.
93
  */
94
  public function post_total_shares( $settings ) {
95
  $total_shares = get_post_meta( get_the_ID() , '_total_shares', true );
96
+ $total_shares = SWP_Utility::kilomega( $total_shares );
97
  return $total_shares;
98
  }
99
 
115
  public function sitewide_total_shares( $settings ) {
116
  global $wpdb;
117
  $sum = $wpdb->get_results( "SELECT SUM(meta_value) AS total FROM $wpdb->postmeta WHERE meta_key = '_total_shares'" );
118
+ return SWP_Utility::kilomega( $sum[0]->total );
119
  }
120
 
121
  /**
125
  * @return string The html of a click to tweet
126
  */
127
  function click_to_tweet( $atts ) {
128
+ global $post;
129
+
130
+ if ( strpos( $atts['tweet'], 'http' ) > -1 ) :
131
+ /**
132
+ * They included a link in the tweet text. Do not pass a &url paramter.
133
+ *
134
+ * Twitter will diregard value if it is: empty, a whitespace, or %20.
135
+ * Instead, give it an invalid URL! It achieves the targeted effect.
136
+ *
137
+ */
138
+ $url = '&url=x';
139
+ else :
140
+ $url = '&url=' . SWP_URL_Management::process_url( get_permalink() , 'twitter' , get_the_ID() );
141
+ endif;
142
 
143
  $user_twitter_handle = get_post_meta( get_the_ID() , 'swp_twitter_username' , true );
144
 
145
  if ( ! $user_twitter_handle ) :
146
+ $user_twitter_handle = SWP_Utility::get_option( 'twitter_id' );
147
  endif;
148
 
149
  if ( isset( $atts['theme'] ) && $atts['theme'] != 'default' ) :
150
  $theme = $atts['theme'];
151
  else :
152
+ $theme = SWP_Utility::get_option( 'ctt_theme' );
153
  endif;
154
 
155
+ $tweet = $this->get_tweet( $atts );
 
156
 
157
+ $via = ($user_twitter_handle ? '&via=' . str_replace( '@','',$user_twitter_handle ) : '');
158
 
159
  $html = '<div class="sw-tweet-clear"></div>';
160
  $html .= '<a class="swp_CTT ' . $theme;
161
+ $html .= '" href="https://twitter.com/share?text=' . $tweet . $via . $url;
162
+ $html .= '" data-link="https://twitter.com/share?text=' . $tweet . $via . $url;
163
  $html .= '" rel="nofollow noreferrer noopener" target="_blank">';
164
  $html .= '<span class="sw-click-to-tweet">';
165
  $html .= '<span class="sw-ctt-text">';
174
 
175
  return $html;
176
  }
177
+
178
+ /**
179
+ *
180
+ * Retrieves tweet from database and converts to UTF-8 for Twitter.
181
+ *
182
+ * @since 3.3.0 | 16 AUG 2018 | Created. Ported code from $this->generate_share_link.
183
+ * @param array $atts Shortcode attributes.
184
+ *
185
+ * @return string $tweet The encoded tweet text.
186
+ *
187
+ */
188
+ protected function get_tweet( $atts ) {
189
+ $max_tweet_length = 240;
190
+
191
+ // Check for a custom tweet from the shortcode attributes. .
192
+ $tweet = $atts['tweet'];
193
+
194
+ if ( function_exists( 'mb_convert_encoding' ) ) :
195
+ $tweet = mb_convert_encoding( $tweet, 'UTF-8', get_bloginfo( "charset" ) );
196
+ endif;
197
+
198
+ $html_safe_tweet = htmlentities( $tweet, ENT_COMPAT, 'UTF-8' );
199
+ $tweet = utf8_uri_encode( $tweet, $max_tweet_length );
200
+ $tweet = urlencode( $tweet );
201
+
202
+ return $tweet;
203
+ }
204
  }
{functions → lib}/options/SWP_Option.php RENAMED
@@ -93,6 +93,20 @@ class SWP_Option extends SWP_Abstract {
93
  $this->parent_size = ' sw-col-940 ';
94
  }
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
  /**
98
  * Fetches the css class to match a given size given as a string.
@@ -132,8 +146,8 @@ class SWP_Option extends SWP_Abstract {
132
  return $this->value;
133
  }
134
 
135
- if ( isset( $this->user_options[$this->key] ) ) {
136
- return $this->user_options[$this->key];
137
  }
138
 
139
  return $this->default;
@@ -169,7 +183,8 @@ class SWP_Option extends SWP_Abstract {
169
  $this->default = $value;
170
 
171
  // Add this to our global list of defaults
172
- add_filter('swp_options_page_defaults' , array( $this , 'register_default' ) );
 
173
 
174
  return $this;
175
  }
@@ -306,4 +321,5 @@ class SWP_Option extends SWP_Abstract {
306
  return ' placeholder="' . $this->placeholder . '"';
307
 
308
  }
 
309
  }
93
  $this->parent_size = ' sw-col-940 ';
94
  }
95
 
96
+ /**
97
+ * Child classes will add a call to apply_filters( 'swp_options_page_values')
98
+ * to add their own values as valid options.
99
+ *
100
+ */
101
+ public function register_available_values( $values ) {
102
+ $values[$this->key] = array(
103
+ 'type' => 'none',
104
+ 'values' => array()
105
+ );
106
+
107
+ return $values;
108
+ }
109
+
110
 
111
  /**
112
  * Fetches the css class to match a given size given as a string.
146
  return $this->value;
147
  }
148
 
149
+ if ( false != SWP_Utility::get_option( $this->key ) ) {
150
+ return SWP_Utility::get_option( $this->key );
151
  }
152
 
153
  return $this->default;
183
  $this->default = $value;
184
 
185
  // Add this to our global list of defaults
186
+ add_filter( 'swp_options_page_defaults', array( $this , 'register_default' ) );
187
+ add_filter( 'swp_options_page_values', array( $this, 'register_available_values' ) );
188
 
189
  return $this;
190
  }
321
  return ' placeholder="' . $this->placeholder . '"';
322
 
323
  }
324
+
325
  }
{functions → lib}/options/SWP_Option_Icons.php RENAMED
@@ -43,10 +43,49 @@ class SWP_Option_Icons extends SWP_Option {
43
  global $swp_user_options;
44
 
45
  parent::__construct( $name, $key );
 
 
 
46
  $this->user_options = $swp_user_options;
47
  }
48
 
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  /**
51
  * A method to output the currently active icons.
52
  *
@@ -84,11 +123,10 @@ class SWP_Option_Icons extends SWP_Option {
84
  *
85
  */
86
  public function render_active_icons() {
87
- $all_icons = $this->get_all_icons();
88
- $user_icons = $this->get_user_icons();
89
- if ( empty($user_icons) ) :
90
- $user_icons = array();
91
- endif;
92
 
93
  $html = '<div class="sw-grid sw-col-300">';
94
  $html .= '<h3 class="sw-buttons-toggle">' . __( 'Active' , 'social-warfare' ) . '</h3>';
@@ -110,8 +148,8 @@ class SWP_Option_Icons extends SWP_Option {
110
  return;
111
  endif;
112
 
113
- if ( array_key_exists( $network_key, $all_icons ) && isset( $all_icons[$network_key]) ) :
114
- $network = $all_icons[$network_key];
115
 
116
  $html .= $this->render_icon_HTML( $network );
117
  endif;
@@ -137,27 +175,21 @@ class SWP_Option_Icons extends SWP_Option {
137
  *
138
  */
139
  public function render_inactive_icons() {
140
- $all_icons = $this->get_all_icons();
141
- $user_icons = $this->get_user_icons();
142
 
143
- if ( empty( $user_icons ) ) :
144
- return $this;
145
- endif;
146
 
147
- $first = reset( $all_icons );
148
 
149
- if ( gettype( $first ) === 'object' ) :
150
 
151
  //* Get the keys first, then diff the array.
152
- $keys = array();
153
-
154
- foreach( $all_icons as $object) {
155
- $keys[] = $object->key;
156
- }
157
 
158
- $first = reset( $user_icons );
159
 
160
- if ( gettype( $first ) === 'object' ) :
161
  $temp = array();
162
 
163
  foreach( $user_icons as $object ) {
@@ -170,10 +202,10 @@ class SWP_Option_Icons extends SWP_Option {
170
 
171
  $inactive_icons = array_diff( $keys, $user_icons );
172
 
173
- elseif ( array_key_exists( 0, $all_icons) ) :
174
 
175
- //* If $all_icons is numerically indexed, just diff the array.
176
- $inactive_icons = array_diff( $all_icons, $user_icons );
177
 
178
  endif;
179
 
@@ -185,7 +217,7 @@ class SWP_Option_Icons extends SWP_Option {
185
  $html .= '<div class="sw-inactive sw-buttons-sort">';
186
  if ( count( $inactive_icons) > 0 ) :
187
  foreach( $inactive_icons as $network_key) {
188
- $network = $all_icons[$network_key];
189
 
190
  $html .= $this->render_icon_HTML( $network );
191
  }
43
  global $swp_user_options;
44
 
45
  parent::__construct( $name, $key );
46
+ add_filter( 'swp_options_page_defaults', array( $this , 'register_default' ) );
47
+ add_filter( 'swp_options_page_values', array( $this, 'register_available_values' ) );
48
+
49
  $this->user_options = $swp_user_options;
50
  }
51
 
52
 
53
+ public function register_default( $defaults = array() ) {
54
+ if ( !array_key_exists( 'order_of_icons', $defaults ) ) :
55
+ $defaults['order_of_icons'] = array(
56
+ 'google_plus' => 'google_plus',
57
+ 'twitter' => 'twitter',
58
+ 'facebook' => 'facebook',
59
+ 'linkedin' => 'linkedin',
60
+ 'pinterest' => 'pinterest'
61
+ );
62
+ endif;
63
+
64
+ return $defaults;
65
+ }
66
+
67
+
68
+ public function register_available_values( $values ) {
69
+ global $swp_social_networks;
70
+ $networks = array();
71
+
72
+ /* order_of_icons is an array of $network_key => $network_key
73
+ * So we need to create an array in that form.
74
+ * Yes, it is redundant, but that's how it is.
75
+ */
76
+ foreach( $swp_social_networks as $key => $object ) {
77
+ $networks[$key] = $key;
78
+ }
79
+
80
+ $values['order_of_icons'] = array(
81
+ 'type' => 'none',
82
+ 'values' => $networks
83
+ );
84
+
85
+ return $values;
86
+ }
87
+
88
+
89
  /**
90
  * A method to output the currently active icons.
91
  *
123
  *
124
  */
125
  public function render_active_icons() {
126
+ global $swp_user_options;
127
+
128
+ $all_networks = $this->get_all_networks();
129
+ $user_icons = $swp_user_options['order_of_icons'];
 
130
 
131
  $html = '<div class="sw-grid sw-col-300">';
132
  $html .= '<h3 class="sw-buttons-toggle">' . __( 'Active' , 'social-warfare' ) . '</h3>';
148
  return;
149
  endif;
150
 
151
+ if ( array_key_exists( $network_key, $all_networks ) && isset( $all_networks[$network_key]) ) :
152
+ $network = $all_networks[$network_key];
153
 
154
  $html .= $this->render_icon_HTML( $network );
155
  endif;
175
  *
176
  */
177
  public function render_inactive_icons() {
178
+ global $swp_user_options;
 
179
 
180
+ $all_networks = $this->get_all_networks();
181
+ $user_icons = $swp_user_options['order_of_icons'];
 
182
 
183
+ $first_all = reset( $all_networks );
184
 
185
+ if ( gettype( $first_all ) === 'object' ) :
186
 
187
  //* Get the keys first, then diff the array.
188
+ $keys = array_keys( $all_networks );
 
 
 
 
189
 
190
+ $first_user = reset( $user_icons );
191
 
192
+ if ( gettype( $first_user ) === 'object' ) :
193
  $temp = array();
194
 
195
  foreach( $user_icons as $object ) {
202
 
203
  $inactive_icons = array_diff( $keys, $user_icons );
204
 
205
+ elseif ( array_key_exists( 0, $all_networks) ) :
206
 
207
+ //* If $all_networks is numerically indexed, just diff the array.
208
+ $inactive_icons = array_diff( $all_networks, $user_icons );
209
 
210
  endif;
211
 
217
  $html .= '<div class="sw-inactive sw-buttons-sort">';
218
  if ( count( $inactive_icons) > 0 ) :
219
  foreach( $inactive_icons as $network_key) {
220
+ $network = $all_networks[$network_key];
221
 
222
  $html .= $this->render_icon_HTML( $network );
223
  }
{functions → lib}/options/SWP_Option_Select.php RENAMED
@@ -35,10 +35,21 @@ class SWP_Option_Select extends SWP_Option {
35
  public function __construct( $name, $key ) {
36
  parent::__construct( $name, $key );
37
 
 
38
  $this->choices = array();
39
  }
40
 
41
 
 
 
 
 
 
 
 
 
 
 
42
  /**
43
  * Add an option to the select.
44
  *
@@ -190,4 +201,5 @@ class SWP_Option_Select extends SWP_Option {
190
 
191
  return parent::set_default( $value );
192
  }
 
193
  }
35
  public function __construct( $name, $key ) {
36
  parent::__construct( $name, $key );
37
 
38
+
39
  $this->choices = array();
40
  }
41
 
42
 
43
+ public function register_available_values( $values ) {
44
+ $values[$this->key] = array(
45
+ 'type' => 'select',
46
+ 'values' => $this->choices
47
+ );
48
+
49
+ return $values;
50
+ }
51
+
52
+
53
  /**
54
  * Add an option to the select.
55
  *
201
 
202
  return parent::set_default( $value );
203
  }
204
+
205
  }
{functions → lib}/options/SWP_Option_Text.php RENAMED
@@ -36,6 +36,15 @@ class SWP_Option_Text extends SWP_Option {
36
  }
37
 
38
 
 
 
 
 
 
 
 
 
 
39
  /**
40
  * Renders the HTML to create the <input type="text" /> element.
41
  *
36
  }
37
 
38
 
39
+ public function register_available_values( $values ) {
40
+ $values[$this->key] = array(
41
+ 'type' => 'text'
42
+ );
43
+
44
+ return $values;
45
+ }
46
+
47
+
48
  /**
49
  * Renders the HTML to create the <input type="text" /> element.
50
  *
{functions → lib}/options/SWP_Option_Textarea.php RENAMED
File without changes
{functions → lib}/options/SWP_Option_Toggle.php RENAMED
@@ -26,6 +26,16 @@ class SWP_Option_Toggle extends SWP_Option {
26
  }
27
 
28
 
 
 
 
 
 
 
 
 
 
 
29
  /**
30
  * Creates the fully qulaified HTML for the checkbox/toggle module.
31
  *
26
  }
27
 
28
 
29
+ public function register_available_values( $values ) {
30
+ $values[$this->key] = array(
31
+ 'type' => 'boolean',
32
+ 'values' => array( true, false )
33
+ );
34
+
35
+ return $values;
36
+ }
37
+
38
+
39
  /**
40
  * Creates the fully qulaified HTML for the checkbox/toggle module.
41
  *
{functions → lib}/options/SWP_Options_Page.php RENAMED
@@ -67,10 +67,6 @@ class SWP_Options_Page extends SWP_Abstract {
67
  *
68
  */
69
  public function __construct() {
70
-
71
- // Fetch the initial user-set options.
72
- $swp_user_options = swp_get_user_options( true );
73
-
74
  // Create a 'tabs' object to which we can begin adding tabs.
75
  $this->tabs = new stdClass();
76
 
@@ -141,7 +137,7 @@ class SWP_Options_Page extends SWP_Abstract {
141
  'manage_options',
142
  'social-warfare',
143
  array( $this, 'render_HTML'),
144
- SWP_PLUGIN_URL . '/images/admin-options-page/socialwarfare-20x20.png'
145
  );
146
 
147
  // Hook into the CSS and Javascript Enqueue process for this specific page
@@ -188,7 +184,7 @@ class SWP_Options_Page extends SWP_Abstract {
188
 
189
  wp_enqueue_style(
190
  'swp_admin_options_css',
191
- SWP_PLUGIN_URL . "/css/admin-options-page{$suffix}.css",
192
  array(),
193
  SWP_VERSION
194
  );
@@ -216,7 +212,7 @@ class SWP_Options_Page extends SWP_Abstract {
216
  wp_enqueue_media();
217
  wp_enqueue_script(
218
  'swp_admin_options_js',
219
- SWP_PLUGIN_URL . "/js/admin-options-page{$suffix}.js",
220
  array( 'jquery' ),
221
  SWP_VERSION
222
  );
@@ -261,34 +257,35 @@ class SWP_Options_Page extends SWP_Abstract {
261
  *
262
  */
263
  public function render_HTML() {
264
- $swp_user_options = swp_get_user_options( true );
265
-
266
  //* Fetch all the addons the user has installed,
267
  //* whether or not they are actively registered.
268
- $addons = apply_filters( 'swp_registrations', [] );
269
- $registrations = array();
270
- $registered = 0;
271
  $active_addons = '';
272
  $registered_addons = '';
273
 
274
- foreach( $addons as $addon ) {
275
- if ( gettype($addon) !== 'object' ) :
276
- continue;
277
- endif;
278
- $registrations[] = new SWP_Addon_Registration( $addon );
279
- $active_addons .= " $addon->key ";
280
 
281
- if ( true === $addon->registered ) :
282
- $registered_addons .= " $addon->key ";
283
- $registered = 1;
284
- endif;
285
- }
286
 
287
- $this->registered = $registered;
288
 
289
- $this->init_registration_tab( $registrations );
 
 
 
 
 
 
 
 
 
290
 
291
- $menu = $this->create_menu( $registrations );
 
292
  $tabs = $this->create_tabs( $active_addons, $registered_addons );
293
 
294
  $html = $menu . $tabs;
@@ -708,12 +705,12 @@ class SWP_Options_Page extends SWP_Abstract {
708
  private function create_menu( $addons ) {
709
  //* Open the admin top menu wrapper.
710
  $html = '<div class="sw-header-wrapper">';
711
- $html .= '<div class="sw-grid sw-col-940 sw-top-menu" sw-registered="' . $this->registered . '">';
712
 
713
  //* Menu wrapper and tabs.
714
  $html .= '<div class="sw-grid sw-col-700">';
715
- $html .= '<img class="sw-header-logo" src="' . SWP_PLUGIN_URL . '/images/admin-options-page/social-warfare-light.png" />';
716
- $html .= '<img class="sw-header-logo-pro" src="' . SWP_PLUGIN_URL . '/images/admin-options-page/social-warfare-pro-light.png" />';
717
  $html .= '<ul class="sw-header-menu">';
718
 
719
  $tab_map = $this->sort_by_priority( $this->tabs );
@@ -780,7 +777,7 @@ class SWP_Options_Page extends SWP_Abstract {
780
  $registered = false;
781
  $notices = apply_filters( 'swp_admin_notices', '' );
782
 
783
- $container = '<div class="sw-admin-wrapper" sw-registered="'. $this->registered .'" swp-addons="' . $active_addons . '" swp-registrations="' . $registered_addons . '">';
784
  $container .= '<div class="swp-notice-wrapper">';
785
  $container .= $notices;
786
  $container .= '</div>';
67
  *
68
  */
69
  public function __construct() {
 
 
 
 
70
  // Create a 'tabs' object to which we can begin adding tabs.
71
  $this->tabs = new stdClass();
72
 
137
  'manage_options',
138
  'social-warfare',
139
  array( $this, 'render_HTML'),
140
+ SWP_PLUGIN_URL . '/assets/images/admin-options-page/socialwarfare-20x20.png'
141
  );
142
 
143
  // Hook into the CSS and Javascript Enqueue process for this specific page
184
 
185
  wp_enqueue_style(
186
  'swp_admin_options_css',
187
+ SWP_PLUGIN_URL . "/assets/css/admin-options-page{$suffix}.css",
188
  array(),
189
  SWP_VERSION
190
  );
212
  wp_enqueue_media();
213
  wp_enqueue_script(
214
  'swp_admin_options_js',
215
+ SWP_PLUGIN_URL . "/assets/js/admin-options-page{$suffix}.js",
216
  array( 'jquery' ),
217
  SWP_VERSION
218
  );
257
  *
258
  */
259
  public function render_HTML() {
 
 
260
  //* Fetch all the addons the user has installed,
261
  //* whether or not they are actively registered.
262
+ $addons = apply_filters( 'swp_registrations', array() );
263
+ $this->is_registered = 0;
264
+ $addon_templates = array();
265
  $active_addons = '';
266
  $registered_addons = '';
267
 
268
+ if ( !empty( $addons ) ) :
 
 
 
 
 
269
 
270
+ foreach( $addons as $addon ) {
271
+ if ( gettype($addon) !== 'object' ) :
272
+ continue;
273
+ endif;
 
274
 
 
275
 
276
+ $addon_templates[] = new SWP_Registration_Tab_Template( $addon );
277
+ $active_addons .= " $addon->key ";
278
+
279
+ if ( true === $addon->is_registered ) :
280
+ $registered_addons .= " $addon->key ";
281
+ $this->is_registered = 1;
282
+ endif;
283
+ }
284
+
285
+ endif;
286
 
287
+ $this->init_registration_tab( $addon_templates );
288
+ $menu = $this->create_menu( $addon_templates );
289
  $tabs = $this->create_tabs( $active_addons, $registered_addons );
290
 
291
  $html = $menu . $tabs;
705
  private function create_menu( $addons ) {
706
  //* Open the admin top menu wrapper.
707
  $html = '<div class="sw-header-wrapper">';
708
+ $html .= '<div class="sw-grid sw-col-940 sw-top-menu" sw-registered="' . $this->is_registered . '">';
709
 
710
  //* Menu wrapper and tabs.
711
  $html .= '<div class="sw-grid sw-col-700">';
712
+ $html .= '<img class="sw-header-logo" src="' . SWP_PLUGIN_URL . '/assets/images/admin-options-page/social-warfare-light.png" />';
713
+ $html .= '<img class="sw-header-logo-pro" src="' . SWP_PLUGIN_URL . '/assets/images/admin-options-page/social-warfare-pro-light.png" />';
714
  $html .= '<ul class="sw-header-menu">';
715
 
716
  $tab_map = $this->sort_by_priority( $this->tabs );
777
  $registered = false;
778
  $notices = apply_filters( 'swp_admin_notices', '' );
779
 
780
+ $container = '<div class="sw-admin-wrapper" sw-registered="'. $this->is_registered .'" swp-addons="' . $active_addons . '" swp-registrations="' . $registered_addons . '">';
781
  $container .= '<div class="swp-notice-wrapper">';
782
  $container .= $notices;
783
  $container .= '</div>';
{functions → lib}/options/SWP_Options_Page_Section.php RENAMED
@@ -119,7 +119,7 @@ class SWP_Options_Page_Section extends SWP_Abstract {
119
  *
120
  */
121
  public function add_option( $option ) {
122
- $types = ['SWP_Addon_Registration', 'SWP_Option_Toggle', 'SWP_Option_Select', 'SWP_Option_Text', 'SWP_Option_Textarea'];
123
 
124
  $type = get_class( $option );
125
 
119
  *
120
  */
121
  public function add_option( $option ) {
122
+ $types = ['SWP_Registration_Tab_Templates', 'SWP_Option_Toggle', 'SWP_Option_Select', 'SWP_Option_Text', 'SWP_Option_Textarea'];
123
 
124
  $type = get_class( $option );
125
 
{functions → lib}/options/SWP_Options_Page_Tab.php RENAMED
File without changes
functions/options/SWP_Addon_Registration.php → lib/options/SWP_Registration_Tab_Template.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class SWP_Addon_Registration extends SWP_Option {
4
  public $key = '';
5
  public $license_key = '';
6
  public $product_id = 0;
@@ -15,6 +15,7 @@ class SWP_Addon_Registration extends SWP_Option {
15
  $this->version = $addon->version;
16
  }
17
 
 
18
  public function render_HTML() {
19
  if ( !empty( $this->license_key ) ) :
20
  $this->registered = 1;
@@ -44,6 +45,54 @@ class SWP_Addon_Registration extends SWP_Option {
44
  return '';
45
  }
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  protected function not_registered_HTML() {
48
  $html = '<div class="sw-grid sw-col-940 swp_is_not_registered">';
49
 
1
  <?php
2
 
3
+ class SWP_Registration_Tab_Template extends SWP_Option {
4
  public $key = '';
5
  public $license_key = '';
6
  public $product_id = 0;
15
  $this->version = $addon->version;
16
  }
17
 
18
+
19
  public function render_HTML() {
20
  if ( !empty( $this->license_key ) ) :
21
  $this->registered = 1;
45
  return '';
46
  }
47
 
48
+
49
+ /**
50
+ * Pass ajax responses to a remote HTTP request.
51
+ *
52
+ * @since 2.0.0
53
+ * @return void
54
+ */
55
+ function ajax_passthrough() {
56
+ if ( ! check_ajax_referer( 'swp_plugin_registration', 'security', false ) ) {
57
+ wp_send_json_error( esc_html__( 'Security failed.', 'social-warfare' ) );
58
+ die;
59
+ }
60
+
61
+ $data = wp_unslash( $_POST ); // Input var okay.
62
+
63
+ if ( ! isset( $data['activity'], $data['email'] ) ) {
64
+ wp_send_json_error( esc_html__( 'Required fields missing.', 'social-warfare' ) );
65
+ die;
66
+ }
67
+
68
+ if ( 'register' === $data['activity'] ) {
69
+ $response = $this->register_plugin( $data['email'], SWP_Utility::get_site_url() );
70
+
71
+ if ( ! $response ) {
72
+ wp_send_json_error( esc_html__( 'Plugin could not be registered.', 'social-warfare' ) );
73
+ die;
74
+ }
75
+
76
+ $response['message'] = esc_html__( 'Plugin successfully registered!', 'social-warfare' );
77
+ }
78
+
79
+ if ( 'unregister' === $data['activity'] && isset( $data['key'] ) ) {
80
+ $response = $this->unregister_plugin( $data['email'], $data['key'] );
81
+
82
+ if ( ! $response ) {
83
+ wp_send_json_error( esc_html__( 'Plugin could not be unregistered.', 'social-warfare' ) );
84
+ die;
85
+ }
86
+
87
+ $response['message'] = esc_html__( 'Plugin successfully unregistered!', 'social-warfare' );
88
+ }
89
+
90
+ wp_send_json_success( $response );
91
+
92
+ die;
93
+ }
94
+
95
+
96
  protected function not_registered_HTML() {
97
  $html = '<div class="sw-grid sw-col-940 swp_is_not_registered">';
98
 
{functions → lib}/options/SWP_Section_HTML.php RENAMED
@@ -47,6 +47,10 @@ class SWP_Section_HTML extends SWP_Option {
47
 
48
  parent::__construct( $name, $key );
49
 
 
 
 
 
50
  $this->html = '';
51
  }
52
 
@@ -80,34 +84,25 @@ class SWP_Section_HTML extends SWP_Option {
80
  */
81
  public function do_admin_sidebar() {
82
  $status_title = __( 'Press Ctrl+C to Copy this information.' , 'social-warfare' );
83
- $support_link = __( 'Need help? Check out our <a href="https://warfareplugins.com/support/" target="_blank">Knowledgebase.' , 'social-warfare' );
84
- $support_status = __( 'Opening a support ticket? Copy your System Status by clicking the button below.' , 'social-warfare' );
85
- $get_status = __( 'Get System Status' , 'social-warfare' );
86
- ob_start();
87
- ?>
88
-
89
- <div class="sw-admin-sidebar sw-grid sw-col-220 sw-fit">
90
- <a href="https://warfareplugins.com/affiliates/" target="_blank"><img src="<?= SWP_PLUGIN_URL ?>/images/admin-options-page/affiliate-300x150.jpg"></a>
91
- <a href="https://warfareplugins.com/support-categories/getting-started/" target="_blank"><img src="<?= SWP_PLUGIN_URL ?>/images/admin-options-page/starter-guide-300x150.jpg"></a>
92
- <a href="https://warfareplugins.com/how-to-measure-social-media-roi-using-google-analytics/" target="_blank"><img src="<?= SWP_PLUGIN_URL ?>/images/admin-options-page/measure-roi-300x150.jpg"></a>
93
- <p class="sw-support-notice sw-italic"><?= $support_link ?></a></p>
94
- <p class="sw-support-notice sw-italic"><?= $support_status ?></p>
95
- <a href="#" class="button sw-blue-button sw-system-status"><?= $get_status ?></a>
96
-
97
- <!-- Sytem Status Container -->
98
- <div class="sw-clearfix"></div>
99
- <div class="system-status-wrapper">
100
- <h4><?= $status_title ?></h4>
101
- <div class="system-status-container"><?= $this->system_status() ?></div>
102
- </div>
103
- </div>
104
 
105
- <?php
 
 
 
106
 
107
- $this->html = ob_get_contents();
108
- ob_end_clean();
 
 
 
 
109
 
110
- return $this->html;
 
 
 
 
 
111
  }
112
 
113
 
@@ -123,8 +118,6 @@ class SWP_Section_HTML extends SWP_Option {
123
  /**
124
  * System Status Generator
125
  */
126
- global $swp_user_options;
127
-
128
  if ( ! function_exists( 'get_plugins' ) ) {
129
  require_once ABSPATH . 'wp-admin/includes/plugin.php';
130
  }
@@ -166,7 +159,6 @@ class SWP_Section_HTML extends SWP_Option {
166
  <tr><td><h2>Plugin Statuses</h2></td><td></td></tr>
167
  <tr><td><b>Theme Name</b></td><td>' . $theme['Name'] . '</td></tr>
168
  <tr><td><b>Theme Version</b></td><td>' . $theme['Version'] . '</td></tr>
169
- <tr><td><b>Caching Method</b></td><td>' . ucfirst($swp_user_options['cache_method']) . '</td></tr>
170
  <tr><td><b>Active Plugins</b></td><td></td></tr>
171
  <tr><td><b>Number of Active Plugins</b></td><td>' . count( $plugins ) . '</td></tr>
172
  ' . $pluginList . '
@@ -186,21 +178,18 @@ class SWP_Section_HTML extends SWP_Option {
186
  *
187
  */
188
  public function do_tweet_count_registration() {
189
- global $swp_user_options;
190
-
191
  // Check for a default value
192
- if ( isset( $swp_user_options['twitter_shares'] ) && $swp_user_options['twitter_shares'] == true ) :
193
  $status = 'on';
194
  $selected = 'checked';
195
- elseif ( isset( $swp_user_options['twitter_shares'] ) && $swp_user_options['twitter_shares'] == false ) :
196
- $status = 'off';
197
- $selected = '';
198
- else :
199
  $status = 'off';
200
  $selected = '';
201
  endif;
202
 
203
-
 
 
204
  $html = '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $this->key . '_wrapper" ' . $this->render_dependency() . '>';
205
 
206
  // Begin Registration Wrapper
@@ -245,7 +234,7 @@ class SWP_Section_HTML extends SWP_Option {
245
  public function do_bitly_authentication_button() {
246
  $link = "https://bitly.com/oauth/authorize?client_id=96c9b292c5503211b68cf4ab53f6e2f4b6d0defb&state=" . admin_url( 'admin-ajax.php' ) . "&redirect_uri=https://warfareplugins.com/bitly_oauth.php";
247
 
248
- if ( swp_get_option('bitly_access_token') ):
249
  $text = __( 'Connected', 'social-warfare' );
250
  $color = 'sw-green-button';
251
  else:
@@ -369,10 +358,7 @@ class SWP_Section_HTML extends SWP_Option {
369
  *
370
  */
371
  public function do_button_position_table() {
372
- $default_types = ['page', 'post', 'home', 'archive_categories'];
373
- $other_types = get_post_types( ['public' => true, '_builtin' => false ], 'names' );
374
-
375
- $post_types = array_merge( $default_types, $other_types );
376
 
377
  $panel_locations = [
378
  'above' => __( 'Above the Content', 'social-warfare' ),
@@ -401,10 +387,11 @@ class SWP_Section_HTML extends SWP_Option {
401
  $html .= '<p class="sw-select-label sw-short sw-no-padding">' . __( 'Floating Buttons (If Activated)' ,'social-warfare' ) . '</p>';
402
  $html .= '</div>';
403
 
404
- $i = 0;
 
405
  foreach( $post_types as $index => $post ) {
406
-
407
- $priority = ($i + 1) * 10; $i++;
408
 
409
  $html .= '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $post . '_wrapper">';
410
 
@@ -543,6 +530,83 @@ class SWP_Section_HTML extends SWP_Option {
543
  }
544
 
545
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
546
  /**
547
  * The rendering method common to all classes.
548
  *
47
 
48
  parent::__construct( $name, $key );
49
 
50
+ if (empty( $this->default ) ) :
51
+ $this->set_default( ' ');
52
+ endif;
53
+
54
  $this->html = '';
55
  }
56
 
84
  */
85
  public function do_admin_sidebar() {
86
  $status_title = __( 'Press Ctrl+C to Copy this information.' , 'social-warfare' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
 
88
+ //* This is an array of fully qualified HTML strings, ready to print.
89
+ $cache = get_option( 'swp_json_cache' );
90
+ $html = '<div class="sw-admin-sidebar sw-grid sw-col-220 sw-fit">';
91
+ $html .= '<div id="swp-admin-sidebar">';
92
 
93
+ if ( $components = $cache['sidebar'] ) :
94
+ foreach( $components as $component ) {
95
+ $component = html_entity_decode ( $component );
96
+ $html .= html_entity_decode( $component);
97
+ }
98
+ endif;
99
 
100
+ $html .= '<div class="system-status-wrapper">';
101
+ $html .= '<h4><?= $status_title ?></h4>';
102
+ $html .= '<div class="system-status-container"> '. $this->system_status() . '</div>';
103
+ $html .= '</div></div>';
104
+
105
+ return $this->html = $html;
106
  }
107
 
108
 
118
  /**
119
  * System Status Generator
120
  */
 
 
121
  if ( ! function_exists( 'get_plugins' ) ) {
122
  require_once ABSPATH . 'wp-admin/includes/plugin.php';
123
  }
159
  <tr><td><h2>Plugin Statuses</h2></td><td></td></tr>
160
  <tr><td><b>Theme Name</b></td><td>' . $theme['Name'] . '</td></tr>
161
  <tr><td><b>Theme Version</b></td><td>' . $theme['Version'] . '</td></tr>
 
162
  <tr><td><b>Active Plugins</b></td><td></td></tr>
163
  <tr><td><b>Number of Active Plugins</b></td><td>' . count( $plugins ) . '</td></tr>
164
  ' . $pluginList . '
178
  *
179
  */
180
  public function do_tweet_count_registration() {
 
 
181
  // Check for a default value
182
+ if ( true == SWP_Utility::get_option( 'twitter_shares' ) ) :
183
  $status = 'on';
184
  $selected = 'checked';
185
+ else:
 
 
 
186
  $status = 'off';
187
  $selected = '';
188
  endif;
189
 
190
+ $this->default = false;
191
+ $this->key = 'twitter_shares';
192
+
193
  $html = '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $this->key . '_wrapper" ' . $this->render_dependency() . '>';
194
 
195
  // Begin Registration Wrapper
234
  public function do_bitly_authentication_button() {
235
  $link = "https://bitly.com/oauth/authorize?client_id=96c9b292c5503211b68cf4ab53f6e2f4b6d0defb&state=" . admin_url( 'admin-ajax.php' ) . "&redirect_uri=https://warfareplugins.com/bitly_oauth.php";
236
 
237
+ if ( SWP_Utility::get_option('bitly_access_token') ):
238
  $text = __( 'Connected', 'social-warfare' );
239
  $color = 'sw-green-button';
240
  else:
358
  *
359
  */
360
  public function do_button_position_table() {
361
+ $post_types = SWP_Utility::get_post_types();
 
 
 
362
 
363
  $panel_locations = [
364
  'above' => __( 'Above the Content', 'social-warfare' ),
387
  $html .= '<p class="sw-select-label sw-short sw-no-padding">' . __( 'Floating Buttons (If Activated)' ,'social-warfare' ) . '</p>';
388
  $html .= '</div>';
389
 
390
+ //* Some indices are numeric, others are strings.
391
+ $i = 0;
392
  foreach( $post_types as $index => $post ) {
393
+ $i++;
394
+ $priority = $i * 10;
395
 
396
  $html .= '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $post . '_wrapper">';
397
 
530
  }
531
 
532
 
533
+ public function do_bitly_start_date() {
534
+ $post_types = SWP_Utility::get_post_types();
535
+
536
+ $booleans = [
537
+ 'on' => __( 'On','social_warfare'),
538
+ 'off' => __( 'Off', 'social_warfare')
539
+ ];
540
+
541
+ $html = '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $this->key . '_wrapper" ';
542
+ $html .= $this->render_dependency();
543
+ $html .= $this->render_premium();
544
+ $html .= '>';
545
+
546
+ $start_date = SWP_Utility::get_option( 'bitly_start_date' );
547
+
548
+ if ( !$start_date ) {
549
+ // die(var_dump($start_date));
550
+ $start_date = '';
551
+ }
552
+
553
+
554
+ $html .= '<p class="sw-subtitle sw-col-620" style="margin: 5px 0 15px">I would like to generate bitly links for content created <b>on or after</b>&nbsp;';
555
+ $html .= '<input
556
+ style="float: right;"
557
+ type="text"
558
+ id="' . $this->key . '"
559
+ name="' . $this->key . '"
560
+ value="' . $start_date . '"
561
+ />
562
+ </p>';
563
+ $html .= '<p class="sw-subtitle sw-col-620">Please enter start the date in the following format: <code style="float: right;">YYYY-MM-DD</code></p>';
564
+
565
+ $html .= '<div class="sw-grid sw-col-300">';
566
+ $html .= '<p class="sw-select-label sw-short sw-no-padding">' . __( 'Post Type' ,'social-warfare' ) . '</p>';
567
+ $html .= '</div>';
568
+
569
+ $html .= '<div class="sw-grid sw-col-300 sw-fit">';
570
+ $html .= '<p class="sw-select-label sw-short sw-no-padding">' . __( 'Create Bitly Links?' ,'social-warfare' ) . '</p>';
571
+ $html .= '</div>';
572
+
573
+ //* Some indices are numeric, others are strings.
574
+ $i = 0;
575
+ foreach( $post_types as $index => $post ) {
576
+ $i++;
577
+ $priority = $i * 10;
578
+
579
+ $html .= '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $post . '_wrapper">';
580
+
581
+ $html .= '<div class="sw-grid sw-col-300">';
582
+ $html .= '<p class="sw-input-label">' . str_replace('_', ' & ', ucfirst($post)) . '</p>';
583
+ $html .= '</div>';
584
+
585
+ $html .= '<div class="sw-grid sw-col-300 sw-fit">';
586
+
587
+ $float = new SWP_Option_Select( ucfirst( $post ), 'bitly_links_' . $post );
588
+ $float->set_priority( $priority )
589
+ ->set_size( 'sw-col-300' )
590
+ ->set_choices( $booleans )
591
+ ->set_default( 'on' );
592
+
593
+ $html .= $float->render_HTML_element();
594
+
595
+ $html .= '</div>';
596
+
597
+ $html .= '</div>';
598
+
599
+ }
600
+
601
+ $html .= '</div>';
602
+
603
+ $this->html = $html;
604
+
605
+ return $this;
606
+
607
+ }
608
+
609
+
610
  /**
611
  * The rendering method common to all classes.
612
  *
lib/options/SWP_User_Options.php ADDED
@@ -0,0 +1,226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * A Class to create and filter the global $swp_user_options;
5
+ *
6
+ * This class ensures that if options have been added via updates or by installing
7
+ * new addons that they are added to the user options array. Conversely, if
8
+ * available options have disappeared from deactivating an addon, those options
9
+ * will be removed from the global user options array.
10
+ *
11
+ * @package SocialWarfare\Functions\Options
12
+ * @copyright Copyright (c) 2018, Warfare Plugins, LLC
13
+ * @license GPL-3.0+
14
+ * @since 3.3.0 | Created | 06 AUG 2018
15
+ * @access public
16
+ *
17
+ */
18
+ class SWP_User_options {
19
+
20
+
21
+ public function __construct() {
22
+ $this->unfiltered_options = get_option( 'social_warfare_settings', false );
23
+ // Fetch the current options and the available options data.
24
+ $this->registered_options = get_option( 'swp_registered_options', false );
25
+ $this->user_options = $this->unfiltered_options;
26
+
27
+ // Filter the options.
28
+ $this->filter_options();
29
+
30
+ // Assign the options to the global.
31
+ global $swp_user_options;
32
+ $swp_user_options = $this->user_options;
33
+
34
+ // Defered to End of Cycle: Add all relevant option info to the database.
35
+ add_action( 'wp_loaded', array( $this , 'store_registered_options_data' ), 10000 );
36
+
37
+ // Debug
38
+ add_action( 'admin_footer', array( $this, 'debug' ) );
39
+ }
40
+
41
+
42
+ /**
43
+ * Compares what the admin wants to what is available to the admin.
44
+ *
45
+ * @return void
46
+ *
47
+ */
48
+ public function filter_options() {
49
+ if( false !== $this->registered_options ) :
50
+ $this->remove_unavailable_options();
51
+ $this->correct_invalid_values();
52
+ $this->add_option_defaults();
53
+ endif;
54
+ }
55
+
56
+
57
+ /**
58
+ * A function for debugging this class.
59
+ *
60
+ * @since 3.3.0 | 07 AUG 2018 | Created
61
+ * @param void
62
+ * @return void
63
+ *
64
+ */
65
+ public function debug() {
66
+ if( true === SWP_Utility::debug( 'swp_user_options' ) ) {
67
+ echo "<pre>", var_export($this), "</pre>";
68
+ }
69
+ }
70
+
71
+
72
+ /**
73
+ * Store the options data in the database.
74
+ *
75
+ * This will be an array of all available options, all of their available
76
+ * values, and all of their defaults.
77
+ *
78
+ * This is loaded super late to ensure that all available options will have
79
+ * already been added to the filter so that we can access them here.
80
+ *
81
+ * By loading late, it will not be available on this same page load for use
82
+ * by the filters. It will be available on the next available page load.
83
+ * However, this should only have to run on the page load when an addon is
84
+ * activated or deactivated as they won't change any other time so this won't
85
+ * be an issue.
86
+ *
87
+ * @since 3.3.0 | 06 AUG 2018 | Created
88
+ * @param void
89
+ * @return void
90
+ *
91
+ */
92
+ public function store_registered_options_data() {
93
+ $whitelist = $this->generate_whitelist();
94
+
95
+ $new_registered_options = array(
96
+ 'defaults' => apply_filters( 'swp_options_page_defaults', array() ),
97
+ 'values' => apply_filters( 'swp_options_page_values', array() )
98
+ );
99
+ $registrations = apply_filters('swp_registrations', []);
100
+
101
+ foreach($whitelist as $key) {
102
+ if (isset( $this->unfiltered_options[$key] ) ) :
103
+ $new_registered_options["defaults"][$key] = $this->unfiltered_options[$key];
104
+ $new_registered_options["values"][$key]["type"] = "none";
105
+ $new_registered_options["values"][$key]["values"] = $this->unfiltered_options[$key];
106
+ endif;
107
+ }
108
+
109
+ if( $new_registered_options != $this->registered_options ) {
110
+ update_option( 'swp_registered_options', $new_registered_options );
111
+ }
112
+ }
113
+
114
+
115
+ public function generate_whitelist() {
116
+ $addons = apply_filters( 'swp_registrations', array() );
117
+ $whitelist = array('last_migrated');
118
+
119
+ if ( empty( $addons) ) {
120
+ return $whitelist;
121
+ }
122
+
123
+ foreach( $addons as $addon ) {
124
+ $whitelist[] = $addon->key . '_license_key';
125
+ $whitelist[] = $addon->key . '_license_key_timestamp';
126
+ }
127
+
128
+ return $whitelist;
129
+ }
130
+
131
+
132
+ /**
133
+ * Filter out non-existent options.
134
+ *
135
+ * This checks if an option is still registered and removes it from the user
136
+ * options if it does not exist.
137
+ *
138
+ * @since 3.3.0 | 06 AUG 2018 | Created
139
+ * @param void
140
+ * @return void
141
+ *
142
+ */
143
+ private function remove_unavailable_options() {
144
+ $defaults = array_keys( $this->registered_options['defaults'] );
145
+ $options = array_keys ( $this->user_options );
146
+
147
+
148
+
149
+ $available_options = array_intersect( $defaults, $options );
150
+
151
+ foreach( $this->user_options as $key => $value ) {
152
+
153
+ //* Manually filter the order of icons.
154
+ if ( $key == 'order_of_icons' ) :
155
+ $value = $this->filter_order_of_icons( $value );
156
+ $this->user_icons[$key] = $value;
157
+ continue;
158
+ endif;
159
+
160
+ if ( !in_array( $key, $available_options ) ) :
161
+ unset( $this->user_options[$key] );
162
+ endif;
163
+ }
164
+ }
165
+
166
+
167
+ private function filter_order_of_icons( $user_icons = array() ) {
168
+ $networks = $this->registered_options['values']['order_of_icons']['values'];
169
+ $user_icons = $this->user_options['order_of_icons'];
170
+
171
+ foreach( $user_icons as $network_key ) {
172
+ if ( !array_key_exists( $network_key, $networks ) ) :
173
+ unset( $user_icons[$network_key] );
174
+ endif;
175
+ }
176
+
177
+ //* They did not have any Core icons set. Return to default icons.
178
+ if ( empty ( $user_icons ) ) :
179
+ $user_icons = $this->registered_options['defaults']['order_of_icons'];
180
+ endif;
181
+
182
+ return $user_icons;
183
+ }
184
+
185
+
186
+ /**
187
+ * Correct any values that may be invalid.
188
+ *
189
+ * @since 3.3.0 | 06 AUG 2018 | Created
190
+ * @param void
191
+ * @return void
192
+ *
193
+ */
194
+ private function correct_invalid_values() {
195
+ $defaults = $this->registered_options['defaults'];
196
+ $values = $this->registered_options['values'];
197
+
198
+ foreach( $this->user_options as $key => $value ) {
199
+ if( $values[$key]['type'] == 'select' && !array_key_exists( $value, $values[$key]['values']) ) {
200
+ $this->user_options[$key] = $defaults[$key];
201
+ }
202
+ }
203
+ }
204
+
205
+
206
+ /**
207
+ * Creates the default value for any new keys.
208
+ *
209
+ * @since 3.0.8 | 16 MAY 2018 | Created the method.
210
+ * @since 3.0.8 | 24 MAY 2018 | Added check for order_of_icons
211
+ * @since 3.1.0 | 13 JUN 2018 | Replaced array bracket notation.
212
+ * @since 3.3.0 | 06 AUG 2018 | Moved from database migration class.
213
+ * @param void
214
+ * @return void
215
+ *
216
+ */
217
+ private function add_option_defaults() {
218
+ $defaults = $this->registered_options['defaults'];
219
+
220
+ foreach ( $defaults as $key => $value ) {
221
+ if ( !array_key_exists( $key, $this->user_options ) ) :
222
+ $this->user_options[$key] = $value;
223
+ endif;
224
+ }
225
+ }
226
+ }
{functions → lib}/social-networks/SWP_Facebook.php RENAMED
@@ -141,9 +141,8 @@ class SWP_Facebook extends SWP_Social_Network {
141
  *
142
  */
143
  public function print_facebook_script() {
144
- global $swp_user_options;
145
 
146
- if ( $swp_user_options['recover_shares'] == true ) {
147
  $alternateURL = SWP_Permalink::get_alt_permalink( $this->post_id );
148
  } else {
149
  $alternateURL = false;
@@ -184,7 +183,7 @@ class SWP_Facebook extends SWP_Social_Network {
184
 
185
  $previous_activity = get_post_meta( $post_id, '_facebook_shares', true );
186
 
187
- if ( $activity > $previous_activity || true === _swp_is_debug('force_new_shares') ) :
188
  delete_post_meta( $post_id, '_facebook_shares' );
189
  update_post_meta( $post_id, '_facebook_shares', $activity );
190
  endif;
141
  *
142
  */
143
  public function print_facebook_script() {
 
144
 
145
+ if ( true === SWP_Utility::get_option( 'recover_shares' ) ) {
146
  $alternateURL = SWP_Permalink::get_alt_permalink( $this->post_id );
147
  } else {
148
  $alternateURL = false;
183
 
184
  $previous_activity = get_post_meta( $post_id, '_facebook_shares', true );
185
 
186
+ if ( $activity > $previous_activity || true === SWP_Utility::debug('force_new_shares') ) :
187
  delete_post_meta( $post_id, '_facebook_shares' );
188
  update_post_meta( $post_id, '_facebook_shares', $activity );
189
  endif;
{functions → lib}/social-networks/SWP_Google_Plus.php RENAMED
File without changes
{functions → lib}/social-networks/SWP_Linkedin.php RENAMED
File without changes
lib/social-networks/SWP_Mix.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Mix
5
+ *
6
+ * Class to add a StumbleUpon share button to the available buttons
7
+ *
8
+ * @package SocialWarfare\Functions\Social-Networks
9
+ * @copyright Copyright (c) 2018, Warfare Plugins, LLC
10
+ * @license GPL-3.0+
11
+ * @since 1.0.0 | Unknown | CREATED
12
+ * @since 2.2.4 | 02 MAY 2017 | Refactored functions & updated docblocking
13
+ * @since 3.0.0 | 05 APR 2018 | Rebuilt into a class-based system.
14
+ *
15
+ */
16
+ class SWP_Mix extends SWP_Social_Network {
17
+
18
+
19
+ /**
20
+ * The Magic __construct Method
21
+ *
22
+ * This method is used to instantiate the social network object. It does three things.
23
+ * First it sets the object properties for each network. Then it adds this object to
24
+ * the globally accessible swp_social_networks array. Finally, it fetches the active
25
+ * state (does the user have this button turned on?) so that it can be accessed directly
26
+ * within the object.
27
+ *
28
+ * @since 3.0.0 | 06 APR 2018 | Created
29
+ * @param none
30
+ * @return none
31
+ * @access public
32
+ *
33
+ */
34
+ public function __construct() {
35
+
36
+ // Update the class properties for this network
37
+ $this->name = __( 'Mix','social-warfare' );
38
+ $this->cta = __( 'Share','social-warfare' );
39
+ $this->key = 'mix';
40
+ $this->default = 'false';
41
+ $this->base_share_url = 'https://mix.com/mixit?url=';
42
+
43
+ $today = date("Y-m-d H:i:s");
44
+
45
+ $this->check_stumble_upon_shares();
46
+ $this->init_social_network();
47
+ }
48
+
49
+
50
+ public function check_stumble_upon_shares() {
51
+ global $post;
52
+
53
+ if ( !is_object( $post ) || empty( $post->ID ) ) :
54
+ return;
55
+ endif;
56
+
57
+ $stumble_shares = get_post_meta( $post->ID, '_stumbleupon_shares', true );
58
+
59
+ if ( !is_numeric( $stumble_shares ) ) :
60
+ return;
61
+ endif;
62
+
63
+ if ( update_post_meta( $post->ID, '_mix_shares', (int) $stumble_shares ) ) :
64
+ delete_post_meta( $post->ID, '_stumbleupon_shares' );
65
+ endif;
66
+ }
67
+
68
+ }
{functions → lib}/social-networks/SWP_Pinterest.php RENAMED
@@ -156,7 +156,7 @@ class SWP_Pinterest extends SWP_Social_Network {
156
  $icon .= '</span>';
157
 
158
  if ( true === $this->are_shares_shown( $share_counts , $options ) ) :
159
- $icon .= '<span class="swp_count">' . swp_kilomega( $share_counts[$this->key] ) . '</span>';
160
  else :
161
  $icon = '<span class="swp_count swp_hide">' . $icon . '</span>';
162
  endif;
156
  $icon .= '</span>';
157
 
158
  if ( true === $this->are_shares_shown( $share_counts , $options ) ) :
159
+ $icon .= '<span class="swp_count">' . SWP_Utility::kilomega( $share_counts[$this->key] ) . '</span>';
160
  else :
161
  $icon = '<span class="swp_count swp_hide">' . $icon . '</span>';
162
  endif;
{functions → lib}/social-networks/SWP_Social_Network.php RENAMED
@@ -352,7 +352,7 @@ class SWP_Social_Network {
352
 
353
  $post_data = $panel_context['post_data'];
354
  $share_counts = $panel_context['shares'];
355
- $options = $panel_context['options'];
356
 
357
  $share_link = $this->generate_share_link( $post_data );
358
 
@@ -364,8 +364,8 @@ class SWP_Social_Network {
364
  $icon .= '</span>';
365
  $icon .= '</span>';
366
 
367
- if ( true === $this->are_shares_shown( $share_counts , $options ) ) :
368
- $icon .= '<span class="swp_count">' . swp_kilomega( $share_counts[$this->key] ) . '</span>';
369
  else :
370
  $icon = '<span class="swp_count swp_hide">' . $icon . '</span>';
371
  endif;
@@ -391,25 +391,26 @@ class SWP_Social_Network {
391
 
392
 
393
  /**
394
- * Are Shares Shown?
395
  *
396
- * This function returns a boolean letting the render_html method know
397
- * if we are supposed to be showing the share count or not.
398
  *
399
  * @since 3.0.0 | 18 APR 2018 | Created
 
 
400
  * @param array $share_counts The array of share counts
401
- * @param array $options The array of options from the button panel object.
402
- * @return bool Do we show the share counts?
 
403
  *
404
  */
405
- public function are_shares_shown( $share_counts , $options ) {
406
 
407
  // False if the share count is empty
408
  if ( empty( $share_counts[$this->key] ) ) :
409
  return false;
410
 
411
  // False if the total share count is below the minimum
412
- elseif( $share_counts['total_shares'] < $options['minimum_shares'] ):
413
  return false;
414
 
415
  // False if the share count is zero.
@@ -417,7 +418,7 @@ class SWP_Social_Network {
417
  return false;
418
 
419
  // False if network shares are turned off in the options.
420
- elseif( false == $options['network_shares'] ):
421
  return false;
422
 
423
  else :
352
 
353
  $post_data = $panel_context['post_data'];
354
  $share_counts = $panel_context['shares'];
355
+ $post_data['options'] = $panel_context['options'];
356
 
357
  $share_link = $this->generate_share_link( $post_data );
358
 
364
  $icon .= '</span>';
365
  $icon .= '</span>';
366
 
367
+ if ( true === $this->are_shares_shown( $share_counts , $panel_context['options'] ) ) :
368
+ $icon .= '<span class="swp_count">' . SWP_Utility::kilomega( $share_counts[$this->key] ) . '</span>';
369
  else :
370
  $icon = '<span class="swp_count swp_hide">' . $icon . '</span>';
371
  endif;
391
 
392
 
393
  /**
 
394
  *
395
+ * Returns a boolean indicateding whether or not to display share counts.
 
396
  *
397
  * @since 3.0.0 | 18 APR 2018 | Created
398
+ * @since 3.3.0 | 24 AUG 2018 | Removed use of $options, calls SWP::Utility instead.
399
+ *
400
  * @param array $share_counts The array of share counts
401
+ * @param array $options DEPRECATED The array of options from the button panel object.
402
+ *
403
+ * @return bool True if share counts should be displayed, else false.
404
  *
405
  */
406
+ public function are_shares_shown( $share_counts , $options = array()) {
407
 
408
  // False if the share count is empty
409
  if ( empty( $share_counts[$this->key] ) ) :
410
  return false;
411
 
412
  // False if the total share count is below the minimum
413
+ elseif( $share_counts['total_shares'] < SWP_Utility::get_option( 'minimum_shares' ) ):
414
  return false;
415
 
416
  // False if the share count is zero.
418
  return false;
419
 
420
  // False if network shares are turned off in the options.
421
+ elseif( false == SWP_Utility::get_option( 'network_shares' ) ):
422
  return false;
423
 
424
  else :
{functions → lib}/social-networks/SWP_Social_Networks_Loader.php RENAMED
File without changes
{functions → lib}/social-networks/SWP_Stumble_Upon.php RENAMED
File without changes
{functions → lib}/social-networks/SWP_Twitter.php RENAMED
@@ -71,7 +71,7 @@ class SWP_Twitter extends SWP_Social_Network {
71
  }
72
 
73
  // Debugging
74
- if ( _swp_is_debug( 'twitter' ) ) {
75
  echo '<b>Request URL:</b> ' . $request_url . '<br />';
76
  }
77
 
@@ -96,10 +96,10 @@ class SWP_Twitter extends SWP_Social_Network {
96
  global $swp_user_options;
97
 
98
  // If the user has enabled Twitter shares....
99
- if ( swp_get_option('twitter_shares') ) :
100
 
101
  // Debugging
102
- if ( _swp_is_debug( 'twitter' ) ) :
103
  echo '<b>Response:</b> ' . $response . '<br />';
104
  endif;
105
 
@@ -131,21 +131,7 @@ class SWP_Twitter extends SWP_Social_Network {
131
  *
132
  */
133
  public function generate_share_link( $post_data ) {
134
-
135
- // Generate a title for the share.
136
- $title = str_replace( '|', '', strip_tags( $post_data['post_title'] ) );
137
-
138
- // Check for a custom tweet from the post options.
139
- $custom_tweet = get_post_meta( $post_data['ID'] , 'swp_custom_tweet' , true );
140
-
141
- $tweet = empty( $custom_tweet ) ? $title : $custom_tweet;
142
- $tweet = is_array( $tweet ) ? $tweet[0] : $tweet;
143
-
144
- if ( function_exists( 'normalizer_normalize' ) ) :
145
- $tweet = urlencode( normalizer_normalize( html_entity_decode( $tweet, ENT_COMPAT, 'UTF-8' ) ) );
146
- else :
147
- $tweet = urlencode( html_entity_decode( $tweet, ENT_COMPAT, 'UTF-8' ) );
148
- endif;
149
 
150
  $twitter_link = $this->get_shareable_permalink( $post_data );
151
 
@@ -162,7 +148,9 @@ class SWP_Twitter extends SWP_Social_Network {
162
  $tweet .= ' @'.str_replace('@','',$twitter_mention);
163
  endif;
164
 
165
- $user_twitter_handle = get_the_author_meta( 'swp_twitter' , SWP_User_Profile::get_author( $post_data['ID'] ) );
 
 
166
 
167
  if ( $user_twitter_handle ) :
168
  $via_parameter = '&via=' . str_replace( '@','',$user_twitter_handle );
@@ -177,7 +165,6 @@ class SWP_Twitter extends SWP_Social_Network {
177
  $intent_link = "https://twitter.com/intent/tweet?text=$parameters";
178
 
179
  return $intent_link;
180
-
181
  }
182
 
183
 
@@ -191,7 +178,8 @@ class SWP_Twitter extends SWP_Social_Network {
191
  *
192
  */
193
  public function reset_share_count_source() {
194
- $options = get_option( 'social_warfare_settings' );
 
195
 
196
  if( !empty( $options['tweet_count_source']) && 'newsharecounts' == $options['tweet_count_source'] ) {
197
 
@@ -203,10 +191,11 @@ class SWP_Twitter extends SWP_Social_Network {
203
  }
204
  }
205
 
 
206
  /**
207
  * Displays the admin notice about New Share Counts.
208
  *
209
- * @since 3.2.0 | Created
210
  * @param array $notices All admin notices passed in the 'swp_admin_notices' hook.
211
  * @return array $notices The updated notice array.
212
  */
@@ -225,4 +214,35 @@ class SWP_Twitter extends SWP_Social_Network {
225
  return $notices;
226
  }
227
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
  }
71
  }
72
 
73
  // Debugging
74
+ if ( SWP_Utility::debug( 'twitter' ) ) {
75
  echo '<b>Request URL:</b> ' . $request_url . '<br />';
76
  }
77
 
96
  global $swp_user_options;
97
 
98
  // If the user has enabled Twitter shares....
99
+ if ( SWP_Utility::get_option('twitter_shares') ) :
100
 
101
  // Debugging
102
+ if ( SWP_Utility::debug( 'twitter' ) ) :
103
  echo '<b>Response:</b> ' . $response . '<br />';
104
  endif;
105
 
131
  *
132
  */
133
  public function generate_share_link( $post_data ) {
134
+ $tweet = $this->get_tweet( $post_data );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
 
136
  $twitter_link = $this->get_shareable_permalink( $post_data );
137
 
148
  $tweet .= ' @'.str_replace('@','',$twitter_mention);
149
  endif;
150
 
151
+ $author = SWP_User_Profile::get_author( $post_data['ID'] );
152
+
153
+ $user_twitter_handle = get_the_author_meta( 'swp_twitter' , $author );
154
 
155
  if ( $user_twitter_handle ) :
156
  $via_parameter = '&via=' . str_replace( '@','',$user_twitter_handle );
165
  $intent_link = "https://twitter.com/intent/tweet?text=$parameters";
166
 
167
  return $intent_link;
 
168
  }
169
 
170
 
178
  *
179
  */
180
  public function reset_share_count_source() {
181
+ global $swp_user_options;
182
+ $options = $swp_user_options;
183
 
184
  if( !empty( $options['tweet_count_source']) && 'newsharecounts' == $options['tweet_count_source'] ) {
185
 
191
  }
192
  }
193
 
194
+
195
  /**
196
  * Displays the admin notice about New Share Counts.
197
  *
198
+ * @since 3.2.0 | Created
199
  * @param array $notices All admin notices passed in the 'swp_admin_notices' hook.
200
  * @return array $notices The updated notice array.
201
  */
214
  return $notices;
215
  }
216
 
217
+
218
+ /**
219
+ *
220
+ * Retrieves tweet from database and converts to UTF-8 for Twitter.
221
+ *
222
+ * @since 3.3.0 | 16 AUG 2018 | Created. Ported code from $this->generate_share_link.
223
+ * @param array $post_data WordPress post data, such as 'ID' and 'post_content'.
224
+ *
225
+ * @return string $tweet The encoded tweet text.
226
+ *
227
+ */
228
+ protected function get_tweet( $post_data ) {
229
+ $max_tweet_length = 240;
230
+
231
+ // Check for a custom tweet from the post options.
232
+ $tweet = get_post_meta( $post_data['ID'] , 'swp_custom_tweet' , true );
233
+
234
+ if ( empty( $tweet ) ) :
235
+ //* Use the post title.
236
+ $tweet = str_replace( '|', '', strip_tags( $post_data['post_title'] ) );
237
+ elseif ( is_array( $tweet ) ) :
238
+ $tweet = $tweet[0];
239
+ endif;
240
+
241
+ $converted_tweet = mb_convert_encoding( $tweet, 'UTF-8', get_bloginfo( "charset" ) );
242
+ $html_safe_tweet = html_entity_decode( $converted_tweet, ENT_COMPAT, 'UTF-8' );
243
+ $tweet = utf8_uri_encode( $html_safe_tweet, $max_tweet_length );
244
+ $tweet = urlencode( $tweet );
245
+
246
+ return $tweet;
247
+ }
248
  }
{functions/plugin-update-checker → lib/update-checker}/.editorconfig RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4/Factory.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Autoloader.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/DebugBar/Extension.php RENAMED
@@ -39,7 +39,7 @@ if ( !class_exists('Puc_v4p4_DebugBar_Extension', false) ):
39
  public function enqueuePanelDependencies() {
40
  wp_enqueue_style(
41
  'puc-debug-bar-style-v4',
42
- $this->getLibraryUrl("/css/puc-debug-bar.css"),
43
  array('debug-bar'),
44
  '20171124'
45
  );
39
  public function enqueuePanelDependencies() {
40
  wp_enqueue_style(
41
  'puc-debug-bar-style-v4',
42
+ $this->getLibraryUrl("/assets/css/puc-debug-bar.css"),
43
  array('debug-bar'),
44
  '20171124'
45
  );
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/DebugBar/Panel.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/DebugBar/PluginExtension.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/DebugBar/PluginPanel.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/DebugBar/ThemePanel.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Factory.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/InstalledPackage.php RENAMED
@@ -53,7 +53,7 @@ if ( !class_exists('Puc_v4p4_InstalledPackage', false) ):
53
  /**
54
  * Parse plugin or theme metadata from the header comment.
55
  *
56
- * This is basically a simplified version of the get_file_data() function from /wp-includes/functions.php.
57
  * It's intended as a utility for subclasses that detect updates by parsing files in a VCS.
58
  *
59
  * @param string|null $content File contents.
53
  /**
54
  * Parse plugin or theme metadata from the header comment.
55
  *
56
+ * This is basically a simplified version of the get_file_data() function from /wp-includes/lib.php.
57
  * It's intended as a utility for subclasses that detect updates by parsing files in a VCS.
58
  *
59
  * @param string|null $content File contents.
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Metadata.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/OAuthSignature.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Plugin/Info.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Plugin/Package.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Plugin/Ui.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Plugin/Update.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Plugin/UpdateChecker.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Scheduler.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/StateStore.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Theme/Package.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Theme/Update.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Theme/UpdateChecker.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Update.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/UpdateChecker.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/UpgraderStatus.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Utils.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Vcs/Api.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Vcs/BaseChecker.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Vcs/BitBucketApi.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Vcs/GitHubApi.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Vcs/GitLabApi.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Vcs/PluginUpdateChecker.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Vcs/Reference.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/Puc/v4p4/Vcs/ThemeUpdateChecker.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/README.md RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/composer.json RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/css/puc-debug-bar.css RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/examples/plugin.json RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/examples/theme.json RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/js/debug-bar.js RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-cs_CZ.mo RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-cs_CZ.po RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-da_DK.mo RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-da_DK.po RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-de_DE.mo RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-de_DE.po RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-fa_IR.mo RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-fa_IR.po RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-fr_CA.mo RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-fr_CA.po RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-fr_FR.mo RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-fr_FR.po RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-hu_HU.mo RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-hu_HU.po RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-it_IT.mo RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-it_IT.po RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-ja.mo RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-ja.po RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-nl_BE.mo RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-nl_BE.po RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-nl_NL.mo RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-nl_NL.po RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-pt_BR.mo RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-pt_BR.po RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-sv_SE.mo RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker-sv_SE.po RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/languages/plugin-update-checker.pot RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/license.txt RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/plugin-update-checker.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/vendor/Parsedown.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/vendor/ParsedownLegacy.php RENAMED
File without changes
{functions/plugin-update-checker → lib/update-checker}/vendor/readme-parser.php RENAMED
File without changes
{functions → lib}/utilities/SWP_Abstract.php RENAMED
@@ -114,7 +114,6 @@ class SWP_Abstract {
114
  $this->user_options = get_option( 'social_warfare_settings' );
115
 
116
  add_action('plugins_loaded', array( $this , 'load_social_networks' ) , 1000 );
117
-
118
  }
119
 
120
 
@@ -131,6 +130,7 @@ class SWP_Abstract {
131
  $this->networks = $swp_social_networks;
132
  }
133
 
 
134
  public function get_property( $property ) {
135
  if ( property_exists( __CLASS__, $property ) ) {
136
  return $this->$property;
@@ -140,13 +140,16 @@ class SWP_Abstract {
140
  }
141
 
142
 
143
- public function get_all_icons() {
144
  return $this->networks;
145
  }
146
 
 
147
  public function get_user_icons() {
148
- if ( isset( $this->user_options['order_of_icons'] ) ) :
149
- $user_icons = $this->user_options['order_of_icons'];
 
 
150
  else:
151
  $user_icons = [
152
  'google_plus' => 'google_plus',
@@ -157,18 +160,6 @@ class SWP_Abstract {
157
  ];
158
  endif;
159
 
160
- if ( empty( $user_icons ) ):
161
- $all_icons = $this->get_all_icons();
162
- $defaults = array();
163
-
164
- foreach( $all_icons as $network_key => $network_obj ) {
165
- $defaults[$network_key] = $network_obj;
166
- }
167
-
168
- return $defaults;
169
-
170
- endif;
171
-
172
  if ( is_array( $user_icons ) && array_key_exists( 'active', $user_icons) ) :
173
  return $user_icons['active'];
174
  endif;
@@ -195,6 +186,7 @@ class SWP_Abstract {
195
  return $this;
196
  }
197
 
 
198
  public function set_priority( $priority ) {
199
  if ( ! intval( $priority ) || $priority < 1) {
200
  $this->_throw("Requires an integer greater than 0.");
@@ -205,6 +197,7 @@ class SWP_Abstract {
205
  return $this;
206
  }
207
 
 
208
  /**
209
  * Creates a Javscript selector keyname based on the object's name.
210
  *
@@ -226,6 +219,7 @@ class SWP_Abstract {
226
  return strtolower( $key );
227
  }
228
 
 
229
  /**
230
  * Set the premium status of the object.
231
  *
@@ -258,11 +252,13 @@ class SWP_Abstract {
258
  return $this;
259
  }
260
 
 
261
  public function get_priority_map( $object) {
262
 
263
  return array_values( $this->object_to_array( $object ) );
264
  }
265
 
 
266
  public function object_to_array ( $object ) {
267
  if(!is_object($object) && !is_array($object)):
268
  return $object;
@@ -271,6 +267,7 @@ class SWP_Abstract {
271
  return array_map( [$this, 'object_to_array'], (array) $object);
272
  }
273
 
 
274
  /**
275
  * Sorts all core, premium, and third-party items by their designated priority.
276
  *
@@ -334,7 +331,6 @@ class SWP_Abstract {
334
  }
335
 
336
 
337
-
338
  /**
339
  * Adds the SWP dependency attributes, if this object has a dependency set.
340
  *
114
  $this->user_options = get_option( 'social_warfare_settings' );
115
 
116
  add_action('plugins_loaded', array( $this , 'load_social_networks' ) , 1000 );
 
117
  }
118
 
119
 
130
  $this->networks = $swp_social_networks;
131
  }
132
 
133
+
134
  public function get_property( $property ) {
135
  if ( property_exists( __CLASS__, $property ) ) {
136
  return $this->$property;
140
  }
141
 
142
 
143
+ public function get_all_networks() {
144
  return $this->networks;
145
  }
146
 
147
+
148
  public function get_user_icons() {
149
+ $options = get_option( 'social_warfare_settings' );
150
+
151
+ if ( isset( $options['order_of_icons'] ) ) :
152
+ $user_icons = $options['order_of_icons'];
153
  else:
154
  $user_icons = [
155
  'google_plus' => 'google_plus',
160
  ];
161
  endif;
162
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  if ( is_array( $user_icons ) && array_key_exists( 'active', $user_icons) ) :
164
  return $user_icons['active'];
165
  endif;
186
  return $this;
187
  }
188
 
189
+
190
  public function set_priority( $priority ) {
191
  if ( ! intval( $priority ) || $priority < 1) {
192
  $this->_throw("Requires an integer greater than 0.");
197
  return $this;
198
  }
199
 
200
+
201
  /**
202
  * Creates a Javscript selector keyname based on the object's name.
203
  *
219
  return strtolower( $key );
220
  }
221
 
222
+
223
  /**
224
  * Set the premium status of the object.
225
  *
252
  return $this;
253
  }
254
 
255
+
256
  public function get_priority_map( $object) {
257
 
258
  return array_values( $this->object_to_array( $object ) );
259
  }
260
 
261
+
262
  public function object_to_array ( $object ) {
263
  if(!is_object($object) && !is_array($object)):
264
  return $object;
267
  return array_map( [$this, 'object_to_array'], (array) $object);
268
  }
269
 
270
+
271
  /**
272
  * Sorts all core, premium, and third-party items by their designated priority.
273
  *
331
  }
332
 
333
 
 
334
  /**
335
  * Adds the SWP dependency attributes, if this object has a dependency set.
336
  *
{functions → lib}/utilities/SWP_CURL.php RENAMED
@@ -14,7 +14,7 @@ class SWP_CURL {
14
 
15
  public static function fetch_shares_via_curl_multi( $links ) {
16
 
17
- if ( _swp_is_debug( 'is_cache_fresh' ) ) :
18
  $started = time();
19
  echo "Starting multi curl request at : " . $started;
20
  endif;
14
 
15
  public static function fetch_shares_via_curl_multi( $links ) {
16
 
17
+ if ( SWP_Utility::debug( 'is_cache_fresh' ) ) :
18
  $started = time();
19
  echo "Starting multi curl request at : " . $started;
20
  endif;
{functions → lib}/utilities/SWP_Compatibility.php RENAMED
@@ -63,7 +63,7 @@ class SWP_Compatibility {
63
  delete_post_meta( $id , '_pinterest_shares' );
64
  delete_post_meta( $id , '_pocket_shares' );
65
  delete_post_meta( $id , '_reddit_shares' );
66
- delete_post_meta( $id , '_stumbleupon_shares' );
67
  delete_post_meta( $id , '_tumblr_shares' );
68
  delete_post_meta( $id , '_twitter_shares' );
69
  delete_post_meta( $id , '_whatsapp_shares' );
@@ -80,7 +80,7 @@ class SWP_Compatibility {
80
  delete_post_meta( $id , 'bitly_link_pinterest' );
81
  delete_post_meta( $id , 'bitly_link_pocket' );
82
  delete_post_meta( $id , 'bitly_link_reddit' );
83
- delete_post_meta( $id , 'bitly_link_stumbleupon' );
84
  delete_post_meta( $id , 'bitly_link_tumblr' );
85
  delete_post_meta( $id , 'bitly_link_twitter' );
86
  delete_post_meta( $id , 'bitly_link_whatsapp' );
63
  delete_post_meta( $id , '_pinterest_shares' );
64
  delete_post_meta( $id , '_pocket_shares' );
65
  delete_post_meta( $id , '_reddit_shares' );
66
+ delete_post_meta( $id , '_mix_shares' );
67
  delete_post_meta( $id , '_tumblr_shares' );
68
  delete_post_meta( $id , '_twitter_shares' );
69
  delete_post_meta( $id , '_whatsapp_shares' );
80
  delete_post_meta( $id , 'bitly_link_pinterest' );
81
  delete_post_meta( $id , 'bitly_link_pocket' );
82
  delete_post_meta( $id , 'bitly_link_reddit' );
83
+ delete_post_meta( $id , 'bitly_link_mix' );
84
  delete_post_meta( $id , 'bitly_link_tumblr' );
85
  delete_post_meta( $id , 'bitly_link_twitter' );
86
  delete_post_meta( $id , 'bitly_link_whatsapp' );
{functions → lib}/utilities/SWP_Database_Migration.php RENAMED
@@ -34,12 +34,8 @@ class SWP_Database_Migration {
34
  *
35
  */
36
  public function __construct() {
37
-
38
- // Set up the defaults before directing into the template functions.
39
- add_action( 'template_redirect' , array( $this , 'scan_for_new_defaults' ) );
40
-
41
  // Queue up the migrate features to run after plugins are loaded.
42
- add_action( 'plugins_loaded', array( $this, 'init' ) );
43
  }
44
 
45
 
@@ -71,8 +67,6 @@ class SWP_Database_Migration {
71
  }
72
 
73
  $this->debug_parameters();
74
-
75
-
76
  }
77
 
78
 
@@ -92,38 +86,68 @@ class SWP_Database_Migration {
92
  * @return void
93
  */
94
  public function debug_parameters() {
 
95
 
96
  // Output an array of user options if called via a debugging parameter.
97
- if ( true === _swp_is_debug('get_user_options') ) :
98
  echo "<pre>";
99
  var_export( get_option( 'social_warfare_settings', array() ) );
100
  echo "</pre>";
101
  wp_die();
102
  endif;
103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  // Migrate settings page if explicitly being called via a debugging parameter.
105
- if ( true === _swp_is_debug('migrate_db') ) {
106
  $this->migrate();
107
  }
108
 
109
  // Initialize database if explicitly being called via a debugging parameter.
110
- if ( true === _swp_is_debug('initialize_db') ) {
111
  $this->initialize_db();
112
  }
113
 
114
  // Update post meta if explicitly being called via a debugging parameter.
115
- if ( true === _swp_is_debug('migrate_post_meta') ) {
116
  $this->update_post_meta();
117
  $this->update_hidden_post_meta();
118
  }
119
 
120
  // Output the last_migrated status if called via a debugging parameter.
121
- if ( true === _swp_is_Debug('get_last_migrated') ) {
122
  $this->get_last_migrated( true );
123
  }
124
 
125
  // Update the last migrated status if called via a debugging parameter.
126
- if ( true === _swp_is_Debug('update_last_migrated') ) {
127
  $this->update_last_migrated();
128
  }
129
  }
@@ -181,43 +205,7 @@ class SWP_Database_Migration {
181
  return count( $old_metadata ) === 0;
182
  }
183
 
184
- /**
185
- * Creates the default value for any new keys.
186
- *
187
- * @since 3.0.8 | 16 MAY 2018 | Created the method.
188
- * @since 3.0.8 | 24 MAY 2018 | Added check for order_of_icons
189
- * @since 3.1.0 | 13 JUN 2018 | Replaced array bracket notation.
190
- * @param void
191
- * @return void
192
- *
193
- */
194
- public function scan_for_new_defaults() {
195
- global $swp_user_options;
196
-
197
- $updated = false;
198
- $defaults = apply_filters( 'swp_options_page_defaults', array() );
199
-
200
- // Manually set the order_of_icons default.
201
- $defaults['order_of_icons'] = array(
202
- 'google_plus' => 'google_plus',
203
- 'twitter' => 'twitter',
204
- 'facebook' => 'facebook',
205
- 'linkedin' => 'linkedin',
206
- 'pinterest' => 'pinterest'
207
- );
208
-
209
- foreach ($defaults as $key => $value ) {
210
- if ( !array_key_exists( $key, $swp_user_options) ) :
211
- $swp_user_options[$key] = $value;
212
- $updated = true;
213
- endif;
214
- }
215
-
216
- if ( $updated ) {
217
- update_option( 'social_warfare_settings', $swp_user_options );
218
- }
219
 
220
- }
221
 
222
 
223
  /**
34
  *
35
  */
36
  public function __construct() {
 
 
 
 
37
  // Queue up the migrate features to run after plugins are loaded.
38
+ add_action( 'plugins_loaded', array( $this, 'init' ), 100 );
39
  }
40
 
41
 
67
  }
68
 
69
  $this->debug_parameters();
 
 
70
  }
71
 
72
 
86
  * @return void
87
  */
88
  public function debug_parameters() {
89
+ global $post, $swp_user_options;
90
 
91
  // Output an array of user options if called via a debugging parameter.
92
+ if ( true === SWP_Utility::debug('get_user_options') ) :
93
  echo "<pre>";
94
  var_export( get_option( 'social_warfare_settings', array() ) );
95
  echo "</pre>";
96
  wp_die();
97
  endif;
98
 
99
+ if ( true === SWP_Utility::debug('get_filtered_options') ) :
100
+ global $swp_user_options;
101
+ echo "<pre>";
102
+ var_export( $swp_user_options );
103
+ echo "</pre>";
104
+ wp_die();
105
+ endif;
106
+
107
+ if ( true == SWP_Utility::debug('get_post_meta') ) :
108
+ if ( !is_object( $post ) ) :
109
+ wp_die( "There is no post object for this url." );
110
+ endif;
111
+
112
+ $meta = get_post_meta( $post->ID );
113
+
114
+ if ($meta) :
115
+
116
+ echo "<pre>";
117
+ var_export( $meta );
118
+ echo "</pre>";
119
+ wp_die();
120
+
121
+ else :
122
+ wp_die( "No post meta for " . $post->post_title );
123
+ endif;
124
+
125
+ endif;
126
+
127
+
128
  // Migrate settings page if explicitly being called via a debugging parameter.
129
+ if ( true === SWP_Utility::debug('migrate_db') ) {
130
  $this->migrate();
131
  }
132
 
133
  // Initialize database if explicitly being called via a debugging parameter.
134
+ if ( true === SWP_Utility::debug('initialize_db') ) {
135
  $this->initialize_db();
136
  }
137
 
138
  // Update post meta if explicitly being called via a debugging parameter.
139
+ if ( true === SWP_Utility::debug('migrate_post_meta') ) {
140
  $this->update_post_meta();
141
  $this->update_hidden_post_meta();
142
  }
143
 
144
  // Output the last_migrated status if called via a debugging parameter.
145
+ if ( true === SWP_Utility::debug('get_last_migrated') ) {
146
  $this->get_last_migrated( true );
147
  }
148
 
149
  // Update the last migrated status if called via a debugging parameter.
150
+ if ( true === SWP_Utility::debug('update_last_migrated') ) {
151
  $this->update_last_migrated();
152
  }
153
  }
205
  return count( $old_metadata ) === 0;
206
  }
207
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
 
 
209
 
210
 
211
  /**
{functions → lib}/utilities/SWP_JSON_Cache_Handler.php RENAMED
@@ -104,7 +104,7 @@ class SWP_JSON_Cache_Handler {
104
  private function is_cache_fresh() {
105
 
106
  // If we're debugging, the cache is expired and needs to fetch.
107
- if( true == _swp_is_debug( 'json_fetch' ) ):
108
  return false;
109
  endif;
110
 
@@ -139,7 +139,7 @@ class SWP_JSON_Cache_Handler {
139
  *
140
  */
141
  private function debug() {
142
- if( true === _swp_is_debug( 'json_fetch') ):
143
  var_dump($this);
144
  endif;
145
  }
104
  private function is_cache_fresh() {
105
 
106
  // If we're debugging, the cache is expired and needs to fetch.
107
+ if( true == SWP_Utility::debug( 'json_fetch' ) ):
108
  return false;
109
  endif;
110
 
139
  *
140
  */
141
  private function debug() {
142
+ if( true === SWP_Utility::debug( 'json_fetch') ):
143
  var_dump($this);
144
  endif;
145
  }
{functions → lib}/utilities/SWP_Localization.php RENAMED
File without changes
{functions → lib}/utilities/SWP_Notice.php RENAMED
@@ -298,7 +298,11 @@ class SWP_Notice {
298
  $html .= '<div class="swp-actions">';
299
 
300
  foreach( $this->actions as $cta) {
301
- $html .= '<a class="swp-notice-cta ' . $cta['class'] . '" href="' . $cta['href'] . '" target="' . $cta['target'] . '" data-timeframe="' . $cta['timeframe'].'">';
 
 
 
 
302
  $html .= $cta['action'];
303
  $html .= "</a>";
304
  }
@@ -330,11 +334,7 @@ class SWP_Notice {
330
  return $notices;
331
  endif;
332
 
333
- if ( empty( $this->html ) ) :
334
- $this->render_HTML();
335
- endif;
336
-
337
- return $notices .= $this->html;
338
  }
339
 
340
 
298
  $html .= '<div class="swp-actions">';
299
 
300
  foreach( $this->actions as $cta) {
301
+ $class = isset( $cta['class'] ) ? $cta['class'] : '';
302
+ $href = isset( $cta['href'] ) ? $cta['href'] : '';
303
+ $target = isset( $cta['target'] ) ? $cta['target'] : '';
304
+ $timeframe = isset( $cta['timeframe'] ) ? $cta['timeframe'] : 0;
305
+ $html .= '<a class="swp-notice-cta ' . $class . '" href="' . $href . '" target="' . $target . '" data-timeframe="' . $timeframe .'">';
306
  $html .= $cta['action'];
307
  $html .= "</a>";
308
  }
334
  return $notices;
335
  endif;
336
 
337
+ return $this->html;
 
 
 
 
338
  }
339
 
340
 
{functions → lib}/utilities/SWP_Notice_Loader.php RENAMED
@@ -96,7 +96,7 @@ class SWP_Notice_Loader {
96
  *
97
  */
98
  private function debug() {
99
- if( true === _swp_is_debug( 'notices' ) ):
100
  var_dump($this);
101
  endif;
102
  }
96
  *
97
  */
98
  private function debug() {
99
+ if( true === SWP_Utility::debug( 'notices' ) ):
100
  var_dump($this);
101
  endif;
102
  }
{functions → lib}/utilities/SWP_Permalink.php RENAMED
File without changes
{functions → lib}/utilities/SWP_Plugin_Updater.php RENAMED
@@ -510,7 +510,7 @@ class SWP_Plugin_Updater {
510
  }
511
 
512
  private function debug() {
513
- if ( true === _swp_is_debug( 'remove_plugin_transient' ) ) :
514
  add_filter('site_transient_update_plugins', function($transient_data) {
515
  unset($transient_data->response['social-warfare-pro/social-warfare-pro.php']);
516
  unset($transient_data->response['social-warfare-affiliatewp/social-warfare-affiliatewp.php']);
510
  }
511
 
512
  private function debug() {
513
+ if ( true === SWP_Utility::debug( 'remove_plugin_transient' ) ) :
514
  add_filter('site_transient_update_plugins', function($transient_data) {
515
  unset($transient_data->response['social-warfare-pro/social-warfare-pro.php']);
516
  unset($transient_data->response['social-warfare-affiliatewp/social-warfare-affiliatewp.php']);
{functions → lib}/utilities/SWP_Post_Cache.php RENAMED
@@ -98,7 +98,7 @@ class SWP_Post_Cache {
98
  *
99
  */
100
  private function debug() {
101
- if( true === _swp_is_debug('swp_share_cache') ):
102
  echo "<pre>", var_dump( $this ), "</pre>";
103
  endif;
104
  }
@@ -297,6 +297,7 @@ class SWP_Post_Cache {
297
  public function rebuild_cached_data() {
298
 
299
  if( true === $this->should_shares_be_fetched() ):
 
300
  $this->rebuild_share_counts();
301
  endif;
302
 
@@ -322,9 +323,11 @@ class SWP_Post_Cache {
322
  *
323
  */
324
  private function should_shares_be_fetched() {
 
 
325
 
326
  // Don't fetch if all share counts are disabled.
327
- if( false == swp_get_option( 'network_shares' ) && false == swp_get_option( 'total_shares' ) ) {
328
  $this->debug_message( 'No Shares Fetched. Share counts are disabled in the settings.' );
329
  return false;
330
  }
@@ -478,14 +481,9 @@ class SWP_Post_Cache {
478
  *
479
  */
480
  protected function rebuild_share_counts() {
481
- global $swp_social_networks, $swp_user_options;
482
 
483
  $this->establish_permalinks();
484
- $this->establish_api_request_urls();
485
- $this->fetch_api_responses();
486
- $this->parse_api_responses();
487
- $this->calculate_network_shares();
488
- $this->cache_share_counts();
489
  }
490
 
491
 
@@ -525,6 +523,9 @@ class SWP_Post_Cache {
525
  $this->permalinks = apply_filters( 'swp_recovery_filter', $this->permalinks );
526
  endforeach;
527
 
 
 
 
528
  }
529
 
530
 
@@ -549,6 +550,9 @@ class SWP_Post_Cache {
549
  ++$current_request;
550
  }
551
  }
 
 
 
552
  }
553
 
554
 
@@ -571,6 +575,9 @@ class SWP_Post_Cache {
571
  $this->raw_api_responses[$current_request] = SWP_CURL::fetch_shares_via_curl_multi( $networks );
572
  $current_request++;
573
  }
 
 
 
574
  }
575
 
576
 
@@ -604,6 +611,9 @@ class SWP_Post_Cache {
604
  $current_request++;
605
  }
606
  }
 
 
 
607
  }
608
 
609
 
@@ -626,7 +636,6 @@ class SWP_Post_Cache {
626
  global $swp_social_networks, $swp_user_options;
627
 
628
  $share_counts = array();
629
-
630
  $checked_networks = array();
631
 
632
  foreach ( $this->parsed_api_responses as $request => $networks ) {
@@ -656,6 +665,8 @@ class SWP_Post_Cache {
656
  endif;
657
 
658
  $this->share_counts = $share_counts;
 
 
659
  }
660
 
661
 
@@ -693,7 +704,7 @@ class SWP_Post_Cache {
693
 
694
  // We only update to newly fetched numbers if they're bigger than
695
  // the old ones unless the url parameter is forcing it to take.
696
- if ( $count <= $previous_count && false === _swp_is_debug( 'force_new_shares' ) ) {
697
  $this->share_counts[$key] = $previous_count;
698
  $this->share_counts['total_shares'] += $previous_count;
699
  } else {
98
  *
99
  */
100
  private function debug() {
101
+ if( true === SWP_Utility::debug('swp_share_cache') ):
102
  echo "<pre>", var_dump( $this ), "</pre>";
103
  endif;
104
  }
297
  public function rebuild_cached_data() {
298
 
299
  if( true === $this->should_shares_be_fetched() ):
300
+
301
  $this->rebuild_share_counts();
302
  endif;
303
 
323
  *
324
  */
325
  private function should_shares_be_fetched() {
326
+ global $swp_user_options;
327
+ // Don't fetch if all share counts are disabled.
328
 
329
  // Don't fetch if all share counts are disabled.
330
+ if( false == SWP_Utility::get_option( 'network_shares' ) && false == SWP_Utility::get_option( 'total_shares' ) ) {
331
  $this->debug_message( 'No Shares Fetched. Share counts are disabled in the settings.' );
332
  return false;
333
  }
481
  *
482
  */
483
  protected function rebuild_share_counts() {
 
484
 
485
  $this->establish_permalinks();
486
+
 
 
 
 
487
  }
488
 
489
 
523
  $this->permalinks = apply_filters( 'swp_recovery_filter', $this->permalinks );
524
  endforeach;
525
 
526
+ $this->establish_api_request_urls();
527
+
528
+
529
  }
530
 
531
 
550
  ++$current_request;
551
  }
552
  }
553
+
554
+ $this->fetch_api_responses();
555
+
556
  }
557
 
558
 
575
  $this->raw_api_responses[$current_request] = SWP_CURL::fetch_shares_via_curl_multi( $networks );
576
  $current_request++;
577
  }
578
+
579
+ $this->parse_api_responses();
580
+
581
  }
582
 
583
 
611
  $current_request++;
612
  }
613
  }
614
+
615
+ $this->calculate_network_shares();
616
+
617
  }
618
 
619
 
636
  global $swp_social_networks, $swp_user_options;
637
 
638
  $share_counts = array();
 
639
  $checked_networks = array();
640
 
641
  foreach ( $this->parsed_api_responses as $request => $networks ) {
665
  endif;
666
 
667
  $this->share_counts = $share_counts;
668
+
669
+ $this->cache_share_counts();
670
  }
671
 
672
 
704
 
705
  // We only update to newly fetched numbers if they're bigger than
706
  // the old ones unless the url parameter is forcing it to take.
707
+ if ( $count <= $previous_count && false === SWP_Utility::debug( 'force_new_shares' ) ) {
708
  $this->share_counts[$key] = $previous_count;
709
  $this->share_counts['total_shares'] += $previous_count;
710
  } else {
{functions → lib}/utilities/SWP_Post_Cache_Loader.php RENAMED
File without changes
lib/utilities/SWP_URL_Management.php ADDED
@@ -0,0 +1,315 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * SWP_URL_Management
5
+ *
6
+ * A class engineered to manage the links that are shared out to the various social
7
+ * networks. This class will shorten them via Bitly or add Google Analytics tracking
8
+ * parameters if the user has either of these options enabled and configured.
9
+ *
10
+ * @since 3.0.0 | 14 FEB 2018 | Added check for is_attachment() to swp_google_analytics
11
+ * @since 3.0.0 | 04 APR 2018 | Converted to class-based, object-oriented system.
12
+ *
13
+ */
14
+ class SWP_URL_Management {
15
+
16
+
17
+ /**
18
+ * The magic __construct method.
19
+ *
20
+ * This method instantiates the SWP_URL_Management object. It's primary function
21
+ * is to add the various methods to their approprate hooks for use later on in
22
+ * modifying the links.
23
+ *
24
+ * @since 3.0.0 | 04 APR 2018 | Created
25
+ * @param none
26
+ * @return none
27
+ * @access public
28
+ *
29
+ */
30
+ public function __construct() {
31
+
32
+ add_filter( 'swp_link_shortening' , array( $this , 'link_shortener' ) );
33
+ add_filter( 'swp_analytics' , array( $this , 'google_analytics' ) );
34
+ add_action( 'wp_ajax_nopriv_swp_bitly_oauth', array( $this , 'bitly_oauth_callback' ) );
35
+
36
+ }
37
+
38
+
39
+ /**
40
+ * Google Analytics UTM Tracking Parameters
41
+ *
42
+ * This is the method used to add Google analytics UTM parameters to the links
43
+ * that are being shared on social media.
44
+ *
45
+ * @since 3.0.0 | 04 APR 2018 | Created
46
+ * @param array $array An array of arguments and data used in processing the URL.
47
+ * @return array $array The modified array.
48
+ * @access public
49
+ *
50
+ */
51
+ public function google_analytics( $array ) {
52
+ global $swp_user_options;
53
+
54
+ // Fetch the user options
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() ) :
62
+ return $array;
63
+ endif;
64
+
65
+ // Check if Analytics have been enabled or not
66
+ if ( true == SWP_Utility::get_option('google_analytics') ) :
67
+ $url_string = 'utm_source=' . $network . '&utm_medium=' . $options['analytics_medium'] . '&utm_campaign=' . $options['analytics_campaign'] . '';
68
+
69
+ if ( strpos( $url,'?' ) !== false ) :
70
+ $array['url'] = $url . urlencode( '&' . $url_string );
71
+ else :
72
+ $array['url'] = $url . urlencode( '?' . $url_string );
73
+ endif;
74
+ endif;
75
+
76
+ return $array;
77
+ endif;
78
+
79
+ return $array;
80
+ }
81
+
82
+
83
+ /**
84
+ * Fetch the bitly link that is cached in the local database.
85
+ *
86
+ * When the cache is fresh, we just pull the existing bitly link from the
87
+ * database rather than making an API call on every single page load.
88
+ *
89
+ * @since 3.3.2 | 12 SEP 2018 | Created
90
+ * @param int $post_id The post ID
91
+ * @param string $network The key for the current social network
92
+ * @return mixed string: The short url; false on failure.
93
+ *
94
+ */
95
+ public function fetch_local_bitly_link( $post_id, $network ) {
96
+
97
+ // If analytics are on, get a different link for each network.
98
+ if ( true == SWP_Utility::get_option('google_analytics') ) {
99
+ $short_url = get_post_meta( $post_id, 'bitly_link_' . $network, true);
100
+
101
+ if ( is_string( $short_url ) && strlen( $short_url ) ) {
102
+ return $short_url;
103
+ }
104
+ }
105
+
106
+ // If analytics are off, just pull the general short link.
107
+ $short_url = get_post_meta( $post_id, 'bitly_link', true );
108
+ if ( is_string( $short_url ) && strlen( $short_url ) ) {
109
+ return $short_url;
110
+ }
111
+
112
+ return false;
113
+ }
114
+
115
+
116
+ /**
117
+ * The Bitly Link Shortener Method
118
+ *
119
+ * This is the function used to manage shortened links via the Bitly link
120
+ * shortening service.
121
+ *
122
+ * @since 3.0.0 | 04 APR 2018 | Created
123
+ * @param array $array An array of arguments and information.
124
+ * @return array $array The modified array.
125
+ * @access public
126
+ *
127
+ */
128
+ public function link_shortener( $array ) {
129
+ global $post;
130
+
131
+ $post_id = $array['postID'];
132
+ $google_analytics = SWP_Utility::get_option('google_analytics');
133
+ $access_token = SWP_Utility::get_option( 'bitly_access_token' );
134
+ $cached_bitly_link = $this->fetch_local_bitly_link( $post_id, $array['network'] );
135
+
136
+ // Recently done.
137
+ if ( true == $array['fresh_cache'] ) {
138
+
139
+ if( false !== $cached_bitly_link ) {
140
+ $array['url'] = $cached_bitly_link;
141
+ }
142
+
143
+ return $array;
144
+ }
145
+
146
+ // We need this information to make a bitly request.
147
+ if ( false == $access_token || true !== SWP_Utility::get_option( 'bitly_authentication' ) ) {
148
+ return $array;
149
+ }
150
+
151
+ // These can not have bitly urls created.
152
+ if ( $array['network'] == 'total_shares' || $array['network'] == 'pinterest' ) {
153
+ return $array;
154
+ }
155
+
156
+ $links_enabled = SWP_Utility::get_option( "bitly_links_{$post->post_type}" );
157
+
158
+ //* They have disabled bitly links on this post type.
159
+ if ( false == $links_enabled || 'off' == $links_enabled ) :
160
+ return $array;
161
+ endif;
162
+
163
+ //* They have decided to only allow posts after a certain date.
164
+ if ( $start_date ) {
165
+ if ( !is_object( $post ) || empty( $post->post_date ) ) :
166
+ return $array;
167
+ endif;
168
+
169
+ $start_date = DateTime::createFromFormat( 'Y-m-d', $start_date );
170
+ $post_date = new DateTime( $post->post_date );
171
+
172
+ //* The post is too new for $start_date.
173
+ if ( $start_date > $post_date ) :
174
+ return $array;
175
+ endif;
176
+ }
177
+
178
+ $network = $array['network'];
179
+ $url = urldecode( $array['url'] );
180
+ $new_bitly_url = $this->make_bitly_url( $url , $network , $access_token );
181
+
182
+ if ( $new_bitly_url ) {
183
+ delete_post_meta( $post_id, 'bitly_link_' . $network );
184
+ update_post_meta( $post_id, 'bitly_link_' . $network, $new_bitly_url );
185
+ $array['url'] = $bitly_url;
186
+ }
187
+
188
+ // Delete the meta fields and then update to keep the database clean and up to date.
189
+ if ( false == $google_analytics ) {
190
+ delete_post_meta( $post_id, 'bitly_link_' . $network );
191
+ }
192
+
193
+ return $array;
194
+ }
195
+
196
+
197
+ /**
198
+ * Create a new Bitly short URL
199
+ *
200
+ * This is the method used to interface with the Bitly API with regard to creating
201
+ * new shortened URL's via their service.
202
+ *
203
+ * @since 3.0.0 | 04 APR 2018 | Created
204
+ * @param string $url The URL to be shortened
205
+ * @param string $network The social network on which this URL is being shared.
206
+ * @param string $access_token The user's Bitly access token.
207
+ * @return string The shortened URL.
208
+ * @access public
209
+ *
210
+ */
211
+ public function make_bitly_url( $url, $network, $access_token ) {
212
+ global $swp_user_options;
213
+
214
+ // Fetch the user's options
215
+ $options = $swp_user_options;
216
+
217
+ if ( isset( $bitly_lookup_response['data']['link_lookup'][0]['link'] ) ) :
218
+
219
+ // Store the short url to return to the plugin
220
+ $short_url = $bitly_lookup_response['data']['link_lookup'][0]['link'];
221
+
222
+ // If the lookup did not return a valid short link....
223
+ else :
224
+
225
+ // Set the format to json
226
+ $format = 'json';
227
+
228
+ // Create a link to reach the Bitly API
229
+ $bitly_api = 'https://api-ssl.bitly.com/v3/shorten?access_token=' . $access_token . '&longUrl=' . urlencode( $url ) . '&format=' . $format;
230
+
231
+ // Fetch a response from the Bitly Shortening API
232
+ $data = SWP_CURL::file_get_contents_curl( $bitly_api );
233
+
234
+ // Parse the JSON formated response into an array
235
+ $data = json_decode( $data , true );
236
+
237
+ // If the shortening succeeded....
238
+ if ( isset( $data['data']['url'] ) ) :
239
+
240
+ // Store the short URL to return to the plugin
241
+ $short_url = $data['data']['url'];
242
+
243
+ // If the shortening failed....
244
+ else :
245
+
246
+ // Return a status of false
247
+ $short_url = false;
248
+
249
+ endif;
250
+
251
+ endif;
252
+
253
+ return $short_url;
254
+
255
+ }
256
+
257
+
258
+ /**
259
+ * The function that processes a URL
260
+ *
261
+ * This method is used throughout the plugin to fetch URL's that have been processed
262
+ * with the link shorteners and UTM parameters. It processes an array of information
263
+ * through the swp_analytics filter and the swp_link_shortening filter.
264
+ *
265
+ * @since 3.0.0 | 04 APR 2018 | Created
266
+ * @param string $url The URL to be modified.
267
+ * @param string $network The network on which the URL is being shared.
268
+ * @param int $postID The post ID.
269
+ * @return string The modified URL.
270
+ * @access public static
271
+ */
272
+ public static function process_url( $url, $network, $postID, $is_cache_fresh = true ) {
273
+ global $swp_user_options;
274
+
275
+ // Fetch the parameters into an array for use by the filters
276
+ $array['url'] = $url;
277
+ $array['network'] = $network;
278
+ $array['postID'] = $postID;
279
+ $array['fresh_cache'] = $is_cache_fresh;
280
+
281
+ if( !is_attachment() ):
282
+
283
+ // Run the anaylitcs hook filters
284
+
285
+ $array = apply_filters( 'swp_analytics' , $array );
286
+
287
+ // Run the link shortening hook filters, but not on Pinterest
288
+ $array = apply_filters( 'swp_link_shortening' , $array );
289
+ endif;
290
+
291
+ return $array['url'];
292
+ }
293
+
294
+
295
+ /**
296
+ * The Bitly OAuth Callback Function
297
+ *
298
+ * When authenticating Bitly to the plugin, Bitly uses a back-and-forth handshake
299
+ * system. This function will intercept the ping from Bitly's server, process the
300
+ * information and provide a response to Bitly.
301
+ *
302
+ * @since 3.0.0 | 04 APR 2018 | Created
303
+ * @param none
304
+ * @return none A response is echoed to the screen for Bitly to read.
305
+ * @access public
306
+ *
307
+ */
308
+ public function bitly_oauth_callback() {
309
+ $access_token = isset( $_GET['access_token'] ) ? $_GET['access_token'] : '';
310
+
311
+ SWP_Utility::update_option( 'bitly_access_token', $access_token );
312
+
313
+ echo admin_url( 'admin.php?page=social-warfare' );
314
+ }
315
+ }
lib/utilities/SWP_Utility.php ADDED
@@ -0,0 +1,312 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * SWP_Utility
5
+ *
6
+ * A collection of utility functions.
7
+ *
8
+ * All of the methods should be static. The class serves as tidy container
9
+ * for various utility functions.
10
+ *
11
+ * The constructor serves only to set up hooks and filters.
12
+ *
13
+ * @package SocialWarfare\Utilities
14
+ * @copyright Copyright (c) 2018, Warfare Plugins, LLC
15
+ * @license GPL-3.0+
16
+ * @since 3.3.0 | 14 AUG 2018 | Created.
17
+ * @access public
18
+ *
19
+ */
20
+ class SWP_Utility {
21
+
22
+
23
+ /**
24
+ * Insantiates filterss and hooks, for admin and ajax.
25
+ *
26
+ * @since 3.3.0 \ 14 AUG 2018 | Created.
27
+ *
28
+ */
29
+ public function __construct() {
30
+ add_action( 'wp_ajax_swp_store_settings', array( 'SWP_Utility', 'store_settings' ) );
31
+ add_filter( 'screen_options_show_screen', array( 'SWP_Utility', 'remove_screen_options' ), 10, 2 );
32
+ }
33
+
34
+
35
+ /**
36
+ *
37
+ * Fetches a key from our filtered $swp_user_options.
38
+ *
39
+ * @since 3.0.0 | 24 APR 2018 | Created.
40
+ * @since 3.0.8 | 16 MAY 2018 | Added $options parameter.
41
+ * @since 3.3.0 | 14 AUG 2018 | Added $key validation, refactored method body.
42
+ * @param string $key The key associated with the option we want.
43
+ *
44
+ * @return mixed $value The value of the option if set, or false.
45
+ *
46
+ */
47
+ public static function get_option( $key = '' ) {
48
+ if ( !isset( $key ) || !is_string( $key ) ) :
49
+ return false;
50
+ endif;
51
+
52
+ global $swp_user_options;
53
+
54
+ if ( !is_array( $swp_user_options ) ) :
55
+ return false;
56
+ endif;
57
+
58
+ if ( array_key_exists( $key, $swp_user_options ) ) :
59
+ return $swp_user_options[$key];
60
+ endif;
61
+
62
+ return false;
63
+ }
64
+
65
+
66
+ /**
67
+ * Handle the options save request inside of admin-ajax.php
68
+ *
69
+ * @since 2.x.x | Unknown | Created.
70
+ * @since 3.0.9 | 31 MAY 2018 | Added call to wp_cache_delete to make sure settings save
71
+ * @since 3.3.0 | 14 AUG 2018 | Removed deprecated code.
72
+ *
73
+ * @return bool Whether or not the options were updated in the database.
74
+ */
75
+ public static function store_settings() {
76
+ if ( !check_ajax_referer( 'swp_plugin_options_save', 'security', false ) ) {
77
+ wp_send_json_error( esc_html__( 'Security failed.', 'social-warfare' ) );
78
+ die;
79
+ }
80
+
81
+ $data = wp_unslash( $_POST );
82
+
83
+ if ( empty( $data['settings'] ) ) {
84
+ wp_send_json_error( esc_html__( 'No settings to save.', 'social-warfare' ) );
85
+ die;
86
+ }
87
+
88
+ $settings = $data['settings'];
89
+
90
+ // Loop and check for checkbox values, convert them to boolean.
91
+ foreach ( $data['settings'] as $key => $value ) {
92
+ if ( 'true' == $value ) {
93
+ $settings[$key] = true;
94
+ } elseif ( 'false' == $value ) {
95
+ $settings[$key] = false;
96
+ } else {
97
+ $settings[$key] = $value;
98
+ }
99
+ }
100
+
101
+ echo json_encode( update_option( 'social_warfare_settings', $settings ) );
102
+
103
+ wp_die();
104
+ }
105
+
106
+
107
+ /**
108
+ * Rounds a number to the appropriate thousands.
109
+ *
110
+ * @since 2.x.x | Unknown | Created.
111
+ * @access public
112
+ * @param float $number The float to be rounded.
113
+ *
114
+ * @return float A rounded number.
115
+ *
116
+ */
117
+ public static function kilomega( $number = 0) {
118
+ if ( empty( $number ) ) :
119
+ return 0;
120
+ endif;
121
+
122
+
123
+ if ( $number < 1000 ) :
124
+ return $number;
125
+ endif;
126
+
127
+ if ( $number < 1000000 ) {
128
+ $suffix = 'K';
129
+ $value = $number / 1000;
130
+ } else {
131
+ $suffix = 'M';
132
+ $value = $number / 1000000;
133
+ }
134
+
135
+ if ( 'period' == SWP_Utility::get_option( 'decimal_separator' ) ) :
136
+ $decimal_point = '.';
137
+ $thousands_separator = ',';
138
+ else :
139
+ $decimal_point = ',';
140
+ $thousands_separator = '.';
141
+ endif;
142
+
143
+ $decimals = SWP_Utility::get_option( 'decimals' );
144
+ $display_number = number_format( $value, $decimals, $decimal_point, $thousands_separator ) . $suffix;
145
+
146
+ return $display_number;
147
+ }
148
+
149
+
150
+ /**
151
+ * Process the excerpts for descriptions.
152
+ *
153
+ * While similar to WordPress's own get_the_excerpt, ours prevents
154
+ * infinite recursion from Social Warfare code.
155
+ *
156
+ * @since 1.0.0 | Created | Unknown.
157
+ * @since 2.2.4 | Updated | 6 March 2017 | Added the filter to remove the script and style tags.
158
+ * @access public
159
+ * @param int $post_id The post ID to use when getting an exceprt.
160
+ *
161
+ * @return string The excerpt.
162
+ *
163
+ */
164
+ public static function get_the_excerpt( $post_id ) {
165
+ // Check if the post has an excerpt
166
+ if ( has_excerpt() ) :
167
+ $the_post = get_post( $post_id ); // Gets post ID
168
+ $the_excerpt = $the_post->post_excerpt;
169
+
170
+ // If not, let's create an excerpt
171
+ else :
172
+ $the_post = get_post( $post_id ); // Gets post ID
173
+ $the_excerpt = $the_post->post_content; // Gets post_content to be used as a basis for the excerpt
174
+ endif;
175
+
176
+ $excerpt_length = 100; // Sets excerpt length by word count
177
+
178
+ // Filter out any inline script or style tags as well as their content
179
+ if( !empty( $the_excerpt ) ):
180
+ $the_excerpt = preg_replace('/(<script[^>]*>.+?<\/script>|<style[^>]*>.+?<\/style>)/s', '', $the_excerpt);
181
+ endif;
182
+
183
+ $the_excerpt = strip_tags( strip_shortcodes( $the_excerpt ) ); // Strips tags and images
184
+ $the_excerpt = preg_replace( '/\[[^\]]+\]/', '', $the_excerpt );
185
+ $the_excerpt = str_replace( ']]>', ']]&gt;', $the_excerpt );
186
+ $the_excerpt = strip_tags( $the_excerpt );
187
+ $excerpt_length = apply_filters( 'excerpt_length', 100 );
188
+ $excerpt_more = apply_filters( 'excerpt_more', ' ' . '[...]' );
189
+ $words = preg_split( "/[\n\r\t ]+/", $the_excerpt, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY );
190
+
191
+ if ( count( $words ) > $excerpt_length ) :
192
+ array_pop( $words );
193
+ // array_push($words, '…');
194
+ $the_excerpt = implode( ' ', $words );
195
+ endif;
196
+
197
+ $the_excerpt = preg_replace( "/\r|\n/", '', $the_excerpt );
198
+
199
+ return $the_excerpt;
200
+ }
201
+
202
+
203
+ /**
204
+ * Checks to see if a debugging query paramter has been set.
205
+ *
206
+ * @since 2.1.0
207
+ * @since 3.3.0 | 14 AUG 2018 | Refactored to a one-liner.
208
+ * @access public
209
+ * @param string $type The query paramter to check for.
210
+ *
211
+ * @return bool True if the specified key is set for debugging, else false.
212
+ *
213
+ */
214
+ public static function debug( $key = '' ) {
215
+ return !empty( $_GET['swp_debug'] ) && ( strtolower( $_GET['swp_debug'] ) == strtolower( $key ) );
216
+ }
217
+
218
+ /**
219
+ * Converts curly quotes to straight quotes.
220
+ *
221
+ * @since 1.4.0
222
+ * @param string $content The text to be filtered.
223
+ *
224
+ * @return string $content The filtered text.
225
+ *
226
+ */
227
+ public static function convert_smart_quotes( $content ) {
228
+ $content = str_replace( '"', "'", $content );
229
+ $content = str_replace( '&#8220;', "'", $content );
230
+ $content = str_replace( '&#8221;', "'", $content );
231
+ $content = str_replace( '&#8216;', "'", $content );
232
+ $content = str_replace( '&#8217;', "'", $content );
233
+ return $content;
234
+ }
235
+
236
+
237
+ /**
238
+ * Returns post types supported by Social Warfare. Includes Custom Post Types.
239
+ *
240
+ * @since 2.x.x | Unknown | Created.
241
+ * @return array The names of registered post types.
242
+ *
243
+ */
244
+ public static function get_post_types() {
245
+ $types = get_post_types( array( 'public' => true, '_builtin' => false ), 'names' );
246
+
247
+ $types = array_merge( array( 'home', 'archive_categories', 'post', 'page' ), $types );
248
+
249
+ return apply_filters( 'swp_post_types', $types );
250
+ }
251
+
252
+
253
+ /**
254
+ * A function to remove the screen options tab from our admin page
255
+ *
256
+ * @since 2.2.1 | Unknown | Created.
257
+ * @param bool Whether to show Screen Options tab. Default true.
258
+ * @param WP_Screen $wp_screen Current WP_Screen instance.
259
+ *
260
+ * @return boolean $display or false.
261
+ *
262
+ */
263
+ public static function remove_screen_options( $show_screen, $wp_screen ){
264
+ $blacklist = array('admin.php?page=social-warfare');
265
+
266
+ if ( in_array( $GLOBALS['pagenow'], $blacklist ) ) {
267
+ $wp_screen->render_screen_layout();
268
+ $wp_screen->render_per_page_options();
269
+ return false;
270
+ }
271
+
272
+ return $show_screen;
273
+ }
274
+
275
+
276
+ /**
277
+ * Returns the URL of current website or network.
278
+ *
279
+ * @since 2.3.3 | 25 SEP 2017 | Created.
280
+ *
281
+ * @return string The URL of the site.
282
+ *
283
+ */
284
+ public static function get_site_url() {
285
+ if( true == is_multisite() ) {
286
+ return network_site_url();
287
+ } else {
288
+ return get_site_url();
289
+ }
290
+ }
291
+
292
+ /**
293
+ * Updates an option in the Social Warfare settings.
294
+ *
295
+ * @since 3.3.2 | 12 SEP 2018 | Created.
296
+ *
297
+ * @param string $key The key under which the option needs to be stored.
298
+ * @param mixed $value The value at the key.
299
+ * @return bool True if the option was updated, else false.
300
+ *
301
+ */
302
+ public static function update_option( $key, $value ) {
303
+ if ( empty( $key ) ) {
304
+ return false;
305
+ }
306
+
307
+ $options = get_option( 'social_warfare_settings', array() );
308
+ $options[$key] = $value;
309
+
310
+ return update_option( 'social_warfare_settings', $options );
311
+ }
312
+ }
{functions → lib}/utilities/SWP_Utility_Trait.php RENAMED
File without changes
lib/utilities/functions.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file serves to hold global functions made available to developers
5
+ * by Social Warfare.
6
+ *
7
+ * Any actual plugin functionality needs to exist as a class method somewhere else.
8
+ *
9
+ * @since 3.3.0 | 14 AUG 2018 | Created file.
10
+ *
11
+ */
12
+
13
+ function socialWarfare( $content = false, $where = 'default', $echo = true ) {
14
+ social_warfare( array( 'content' => $content, 'where' => $where, 'echo' => $echo ) );
15
+ }
16
+
17
+ function social_warfare( $args = array() ) {
18
+ $buttons_panel = new SWP_Buttons_Panel( $args );
19
+ return $buttons_panel->render_HTML();
20
+ }
21
+
22
+ function swp_kilomega( $number ) {
23
+ return SWP_Utiltiy::kilomega( $number );
24
+ }
{functions → lib}/widgets/SWP_Popular_Posts_Widget.php RENAMED
@@ -178,7 +178,7 @@ class SWP_Popular_Posts_Widget extends WP_Widget {
178
  $form .= '</p>';
179
 
180
  // Get the public post Types
181
- $post_types = swp_get_post_types();
182
 
183
  if( !empty( $post_types ) ):
184
 
@@ -536,7 +536,7 @@ class SWP_Popular_Posts_Widget extends WP_Widget {
536
  if ( $showCount == 'true' ) :
537
  $postID = get_the_ID();
538
  $shares = get_post_meta( $postID,'_' . $network,true );
539
- $share_html = '<span class="swp_pop_count">' . swp_kilomega( $shares ) . ' ' . $countLabel . '</span>';
540
 
541
  // If we are not supposed to show count numbers
542
  else :
178
  $form .= '</p>';
179
 
180
  // Get the public post Types
181
+ $post_types = SWP_Utility::get_post_types();
182
 
183
  if( !empty( $post_types ) ):
184
 
536
  if ( $showCount == 'true' ) :
537
  $postID = get_the_ID();
538
  $shares = get_post_meta( $postID,'_' . $network,true );
539
+ $share_html = '<span class="swp_pop_count">' . SWP_Utility::kilomega( $shares ) . ' ' . $countLabel . '</span>';
540
 
541
  // If we are not supposed to show count numbers
542
  else :
{functions → lib}/widgets/SWP_Widget.php RENAMED
File without changes
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, mix button, tweet button, twitter share, click to tweet, social sharing buttons, social share, social sharing, social media sharing, wordpress social sharing plugin, social sharing plugin, share buttons, share counts
4
  Requires at least: 3.5.1
5
  Tested up to: 4.9
6
- Stable tag: 3.2.2
7
  License: GNU General Public License v2.0 or later
8
 
9
  The most beautiful, responsive, lightning fast social share buttons built to boost shares and drive more traffic without slowing down your site.
@@ -193,9 +193,24 @@ We have a growing archive of <a href="https://warfareplugins.com/support/" rel="
193
 
194
  == Changelog ==
195
 
196
- = 3.2.2 (21 AUG 2018) =
197
- * Rebuilt and fully rectified the automatic updates processes.
198
- * Fixed javascript error that broke images when pinning from Pin On Hover button.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
 
200
  = 3.2.1 (16 AUG 2018) =
201
  * Fixed a minor DOMDocument warning that was appearing when data-pin-description was ON
3
  Tags: sharing buttons, social media share, floating share buttons, facebook share, google plus share, linkedin share, pin it, pinterest save, mix button, tweet button, twitter share, click to tweet, social sharing buttons, social share, social sharing, social media sharing, wordpress social sharing plugin, social sharing plugin, share buttons, share counts
4
  Requires at least: 3.5.1
5
  Tested up to: 4.9
6
+ Stable tag: 3.3.2
7
  License: GNU General Public License v2.0 or later
8
 
9
  The most beautiful, responsive, lightning fast social share buttons built to boost shares and drive more traffic without slowing down your site.
193
 
194
  == Changelog ==
195
 
196
+ = 3.3.2 (14 SEP 2018) =
197
+ * Fixed a line of code that caused the 'social_warfare()' function to disappear.
198
+
199
+ = 3.3.1 (11 SEP 2018) =
200
+ * Fixed the URL for post editor placeholder images.
201
+ * Fixed the Twitter Count toggle.
202
+ * Added backward compatability for swp_kilomega().
203
+ * Added compatability for mb_convert_encoding().
204
+
205
+ = 3.3.0 (11 SEP 2018) =
206
+ * Added CSS to hide buttons on print views.
207
+ * Added Mix to the Social Networks.
208
+ * Added "url" paramter to the shortcode.
209
+ * Fixed plugin compatability issue with BuddyPress.
210
+ * Fixed the decimal separator for share counts.
211
+ * Updated the option-getting mechanism (`global $swp_user_options` is now deprecated).
212
+ * Updated the sidebar in the Social Warfare settings page.
213
+ * Updated the plugin file structure and organization.
214
 
215
  = 3.2.1 (16 AUG 2018) =
216
  * Fixed a minor DOMDocument warning that was appearing when data-pin-description was ON
social-warfare.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Social Warfare
4
  * Plugin URI: https://warfareplugins.com
5
  * Description: A plugin to maximize social shares and drive more traffic using the fastest and most intelligent share buttons on the market, calls to action via in-post click-to-tweets, popular posts widgets based on share popularity, link-shortening, Google Analytics and much, much more!
6
- * Version: 3.2.2
7
  * Author: Warfare Plugins
8
  * Author URI: https://warfareplugins.com
9
  * Text Domain: social-warfare
@@ -16,7 +16,7 @@ defined( 'WPINC' ) || die;
16
  * Define plugin constants for use throughout the plugin (Version and Directories)
17
  *
18
  */
19
- define( 'SWP_VERSION' , '3.2.2' );
20
  define( 'SWP_PLUGIN_FILE', __FILE__ );
21
  define( 'SWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
22
  define( 'SWP_PLUGIN_DIR', dirname( __FILE__ ) );
@@ -29,11 +29,11 @@ define( 'SWP_STORE_URL', 'https://warfareplugins.com' );
29
  * @TODO THis should be removed after 31 DEC 2018.
30
  *
31
  */
32
- if ( file_exists( SWP_PLUGIN_DIR . '/functions/legacy/update-checker.php') ) :
33
- require_once SWP_PLUGIN_DIR . '/functions/legacy/update-checker.php';
34
  endif;
35
  add_filter('the_excerpt', 'do_shortcode', 1);
36
 
37
  // Load the main Social_Warfare class and fire up the plugin.
38
- require_once SWP_PLUGIN_DIR . '/functions/Social_Warfare.php';
39
  new Social_Warfare();
3
  * Plugin Name: Social Warfare
4
  * Plugin URI: https://warfareplugins.com
5
  * Description: A plugin to maximize social shares and drive more traffic using the fastest and most intelligent share buttons on the market, calls to action via in-post click-to-tweets, popular posts widgets based on share popularity, link-shortening, Google Analytics and much, much more!
6
+ * Version: 3.3.2
7
  * Author: Warfare Plugins
8
  * Author URI: https://warfareplugins.com
9
  * Text Domain: social-warfare
16
  * Define plugin constants for use throughout the plugin (Version and Directories)
17
  *
18
  */
19
+ define( 'SWP_VERSION' , '3.3.2' );
20
  define( 'SWP_PLUGIN_FILE', __FILE__ );
21
  define( 'SWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
22
  define( 'SWP_PLUGIN_DIR', dirname( __FILE__ ) );
29
  * @TODO THis should be removed after 31 DEC 2018.
30
  *
31
  */
32
+ if ( file_exists( SWP_PLUGIN_DIR . '/lib/legacy/update-checker.php') ) :
33
+ require_once SWP_PLUGIN_DIR . '/lib/legacy/update-checker.php';
34
  endif;
35
  add_filter('the_excerpt', 'do_shortcode', 1);
36
 
37
  // Load the main Social_Warfare class and fire up the plugin.
38
+ require_once SWP_PLUGIN_DIR . '/lib/Social_Warfare.php';
39
  new Social_Warfare();