WordPress Social Sharing Plugin – Social Warfare - Version 2.2.3

Version Description

(22 FEB 2017) =

Maintenance:

  • Fixed a misnamed function that was causing a "Call to undefined function" error when using the shortcode that specifically names which network buttons to show. For example, this was fine: [social_warfare], while this would throw the error: [social_warfare buttons="Twitter,Facebook,Google Plus,Pinterest,Total"]. This update fixes it so that it no longer throws any errors.
Download this release

Release Info

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

Code changes from version 2.0.4 to 2.2.3

Files changed (149) hide show
  1. admin.js +0 -200
  2. css/admin-options-page.css +773 -0
  3. css/admin-options-page.min.css +1 -0
  4. css/admin.css +167 -94
  5. css/admin.min.css +1 -0
  6. css/style.css +1740 -229
  7. css/style.min.css +1 -0
  8. fonts/sw-icon-font.svg +42 -42
  9. functions/admin-options-page/admin-options-array.php +0 -1067
  10. functions/admin-options-page/admin-options-fetch.php +0 -161
  11. functions/admin-options-page/admin-options-page.css +0 -571
  12. functions/admin-options-page/admin-options-page.js +0 -1714
  13. functions/admin-options-page/admin-options-page.php +0 -1004
  14. functions/admin/columns.php +52 -0
  15. functions/admin/misc.php +27 -0
  16. functions/admin/options-page.php +823 -0
  17. functions/bitly.php +0 -310
  18. functions/buttons-floating.php +52 -47
  19. functions/buttons-standard.php +189 -199
  20. functions/cache-rebuild.php +0 -58
  21. functions/click-to-tweet/assets/css/admin.css +1 -1
  22. functions/click-to-tweet/assets/css/style1.css +114 -114
  23. functions/click-to-tweet/assets/css/style2.css +92 -92
  24. functions/click-to-tweet/assets/css/style3.css +72 -72
  25. functions/click-to-tweet/assets/css/style4.css +75 -75
  26. functions/click-to-tweet/assets/css/styles.css +113 -113
  27. functions/click-to-tweet/assets/js/clickToTweet.js +62 -60
  28. functions/click-to-tweet/assets/js/tmclicktotweet_plugin.js +27 -26
  29. functions/click-to-tweet/clickToTweet.php +54 -37
  30. functions/compatibility.php +110 -0
  31. functions/curl_functions.php +90 -93
  32. functions/deprecated.php +156 -0
  33. functions/display.php +103 -0
  34. functions/excerpt.php +0 -41
  35. functions/header-meta-tags.php +85 -727
  36. functions/kilomega.php +0 -70
  37. functions/languages.php +44 -214
  38. functions/media-options.php +0 -29
  39. functions/mobile-detection.php +0 -12
  40. functions/options-array.php +396 -0
  41. functions/options-fetch.php +221 -0
  42. functions/permalinks.php +239 -240
  43. functions/post-options.php +0 -205
  44. functions/profile-fields.php +42 -41
  45. functions/registration.php +0 -153
  46. functions/scripts.php +196 -0
  47. functions/share-cache.php +387 -0
  48. functions/share-count-class.php +0 -102
  49. functions/share-count-function.php +104 -105
  50. functions/shortcodes.php +53 -0
  51. functions/social-networks/buffer.php +0 -208
  52. functions/social-networks/email.php +0 -89
  53. functions/social-networks/facebook.php +98 -64
  54. functions/social-networks/flipboard.php +0 -89
  55. functions/social-networks/googlePlus.php +74 -64
  56. functions/social-networks/hackernews.php +0 -94
  57. functions/social-networks/linkedIn.php +75 -65
  58. functions/social-networks/pinterest.php +104 -115
  59. functions/social-networks/pocket.php +0 -85
  60. functions/social-networks/reddit.php +0 -124
  61. functions/social-networks/stumbleupon.php +78 -68
  62. functions/social-networks/tumblr.php +0 -107
  63. functions/social-networks/twitter.php +121 -120
  64. functions/social-networks/whatsapp.php +0 -100
  65. functions/social-networks/yummly.php +0 -148
  66. functions/sw-shortcode-generator.js +0 -72
  67. functions/sw-shortcode-generator.php +18 -18
  68. functions/url_processing.php +322 -0
  69. functions/utility.php +351 -0
  70. functions/widgets.php +314 -320
  71. {functions/admin-options-page/images → images/admin-options-page}/affiliate-300x150.jpg +0 -0
  72. {functions/admin-options-page/images → images/admin-options-page}/measure-roi-300x150.jpg +0 -0
  73. {functions/admin-options-page/images → images/admin-options-page}/new_share_counts.png +0 -0
  74. {functions/admin-options-page/images → images/admin-options-page}/social-warfare-light.png +0 -0
  75. {functions/admin-options-page/images → images/admin-options-page}/socialwarfare-20x20.png +0 -0
  76. {functions/admin-options-page/images → images/admin-options-page}/starter-guide-300x150.jpg +0 -0
  77. js/admin-options-page.js +726 -0
  78. js/admin-options-page.min.js +1 -0
  79. js/admin.js +208 -0
  80. js/admin.min.js +1 -0
  81. js/script.js +625 -0
  82. js/script.min.js +1 -0
  83. js/sw-shortcode-generator.js +73 -0
  84. js/sw-shortcode-generator.min.js +1 -0
  85. languages/social-warfare-el.mo +0 -0
  86. languages/social-warfare.pot +433 -0
  87. meta-box/css/autocomplete.css +0 -14
  88. meta-box/css/checkbox.css +0 -4
  89. meta-box/css/color.css +0 -7
  90. meta-box/css/datepicker.css +0 -231
  91. meta-box/css/divider.css +0 -7
  92. meta-box/css/file.css +0 -58
  93. meta-box/css/heading.css +0 -12
  94. meta-box/css/image-advanced.css +0 -43
  95. meta-box/css/image-select.css +0 -21
  96. meta-box/css/image.css +0 -67
  97. meta-box/css/input-list.css +0 -20
  98. meta-box/css/jqueryui/jquery-ui-timepicker-addon.min.css +0 -5
  99. meta-box/css/jqueryui/jquery.ui.core.css +0 -38
  100. meta-box/css/jqueryui/jquery.ui.datepicker.css +0 -68
  101. meta-box/css/jqueryui/jquery.ui.slider.css +0 -24
  102. meta-box/css/jqueryui/jquery.ui.theme.css +0 -249
  103. meta-box/css/map.css +0 -4
  104. meta-box/css/media.css +0 -81
  105. meta-box/css/oembed.css +0 -11
  106. meta-box/css/plupload-image.css +0 -25
  107. meta-box/css/range.css +0 -13
  108. meta-box/css/select-advanced.css +0 -8
  109. meta-box/css/select-tree.css +0 -7
  110. meta-box/css/select.css +0 -10
  111. meta-box/css/select2/select2.css +0 -483
  112. meta-box/css/slider.css +0 -13
  113. meta-box/css/style-rtl.css +0 -7
  114. meta-box/css/style.css +0 -114
  115. meta-box/css/upload.css +0 -31
  116. meta-box/css/wysiwyg.css +0 -6
  117. meta-box/img/drag_icon.gif +0 -0
  118. meta-box/img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  119. meta-box/img/jqueryui/ui-bg_flat_75_ffffff_40x100.png +0 -0
  120. meta-box/img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  121. meta-box/img/jqueryui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  122. meta-box/img/jqueryui/ui-bg_glass_75_dadada_1x400.png +0 -0
  123. meta-box/img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  124. meta-box/img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  125. meta-box/img/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  126. meta-box/img/jqueryui/ui-icons_222222_256x240.png +0 -0
  127. meta-box/img/jqueryui/ui-icons_2e83ff_256x240.png +0 -0
  128. meta-box/img/jqueryui/ui-icons_454545_256x240.png +0 -0
  129. meta-box/img/jqueryui/ui-icons_888888_256x240.png +0 -0
  130. meta-box/img/jqueryui/ui-icons_cd0a0a_256x240.png +0 -0
  131. meta-box/img/loader.gif +0 -0
  132. meta-box/inc/core.php +0 -142
  133. meta-box/inc/field.php +0 -495
  134. meta-box/inc/fields/autocomplete.php +0 -120
  135. meta-box/inc/fields/button.php +0 -47
  136. meta-box/inc/fields/checkbox-list.php +0 -19
  137. meta-box/inc/fields/checkbox.php +0 -87
  138. meta-box/inc/fields/choice.php +0 -160
  139. meta-box/inc/fields/color.php +0 -85
  140. meta-box/inc/fields/custom-html.php +0 -24
  141. meta-box/inc/fields/date.php +0 -31
  142. meta-box/inc/fields/datetime.php +0 -264
  143. meta-box/inc/fields/divider.php +0 -43
  144. meta-box/inc/fields/email.php +0 -50
  145. meta-box/inc/fields/fieldset-text.php +0 -84
  146. meta-box/inc/fields/file-advanced.php +0 -43
  147. meta-box/inc/fields/file-input.php +0 -64
  148. meta-box/inc/fields/file-upload.php +0 -39
  149. meta-box/inc/fields/file.php +0 -84
admin.js DELETED
@@ -1,200 +0,0 @@
1
- // Function for SM Title Counting
2
- function smTitleRemaining() {
3
- var smTitle = jQuery('#socialWarfare textarea#nc_ogTitle').val();
4
- var remaining = 60 - smTitle.length;
5
- if(smTitle.length > 0 && remaining >= 0) {
6
- jQuery('#socialWarfare .nc_ogTitleWrapper .swp_CountDown').removeClass('swp_red').addClass('swp_blue');
7
- } else if (smTitle.length > 0 && remaining < 0 ) {
8
- jQuery('#socialWarfare .nc_ogTitleWrapper .swp_CountDown').removeClass('swp_blue').addClass('swp_red');
9
- } else {
10
- jQuery('#socialWarfare .nc_ogTitleWrapper .swp_CountDown').removeClass('swp_blue').removeClass('swp_red');
11
- }
12
- jQuery('#socialWarfare .nc_ogTitleWrapper .counterNumber').html(remaining);
13
- }
14
-
15
- // Function for SM Description Counting
16
- function smDescriptionRemaining() {
17
- var smDescription = jQuery('#socialWarfare textarea#nc_ogDescription').val();
18
- var remaining = 160 - smDescription.length;
19
- if(smDescription.length > 0 && remaining >= 0) {
20
- jQuery('#socialWarfare .nc_ogDescriptionWrapper .swp_CountDown').removeClass('swp_red').addClass('swp_blue');
21
- } else if (smDescription.length > 0 && remaining < 0 ) {
22
- jQuery('#socialWarfare .nc_ogDescriptionWrapper .swp_CountDown').removeClass('swp_blue').addClass('swp_red');
23
- } else {
24
- jQuery('#socialWarfare .nc_ogDescriptionWrapper .swp_CountDown').removeClass('swp_blue').removeClass('swp_red');
25
- }
26
- jQuery('#socialWarfare .nc_ogDescriptionWrapper .counterNumber').html(remaining);
27
- }
28
-
29
- // Function for Twitter Box Counting
30
- function twitterRemaining() {
31
- var smTwitter = jQuery('#socialWarfare textarea#nc_customTweet').val();
32
- var handle = jQuery('#socialWarfare .twitterIDWrapper label').html();
33
- if(smTwitter.indexOf('http') > -1 || smTwitter.indexOf('https') > -1) {
34
- linkSpace = 0;
35
- jQuery('.tweetLinkSection').css({'text-decoration':'line-through'});
36
- } else {
37
- linkSpace = 23;
38
- jQuery('.tweetLinkSection').css({'text-decoration':'none'});
39
- };
40
- if(typeof handle === 'undefined') {
41
- var remaining = 140 - link_length(smTwitter) - linkSpace;
42
- } else {
43
- var remaining = 140 - link_length(smTwitter) - handle.length - linkSpace - 6;
44
- }
45
- if(smTwitter.length > 0 && remaining >= 0) { jQuery('#socialWarfare .nc_customTweetWrapper .swp_CountDown').removeClass('swp_red').addClass('swp_blue');
46
- } else if (smTwitter.length > 0 && remaining < 0 ) { jQuery('#socialWarfare .nc_customTweetWrapper .swp_CountDown').removeClass('swp_blue').addClass('swp_red');
47
- } else { jQuery('#socialWarfare .nc_customTweetWrapper .swp_CountDown').removeClass('swp_blue').removeClass('swp_red'); }
48
- jQuery('#socialWarfare .nc_customTweetWrapper .counterNumber').html(remaining);
49
- }
50
-
51
- function link_length(input) {
52
- var tmp = "";
53
- for(var i = 0; i < 23; i++){tmp+="o"}
54
- return input.replace(/(http:\/\/[\S]*)/g, tmp).length;
55
- };
56
-
57
- jQuery(document).ready( function() {
58
- if(jQuery('#socialWarfare.postbox').length) {
59
-
60
- // Add the CountDown Box for the Social Media Title
61
- jQuery('#socialWarfare #nc_ogTitle').parent().prepend('<div class="swp_CountDown"><span class="counterNumber">60</span> '+swp_localize_admin.swp_characters_remaining+'</div>');
62
-
63
- // Add the CountDown Box for the Social Media Description
64
- jQuery('#socialWarfare #nc_ogDescription').parent().prepend('<div class="swp_CountDown"><span class="counterNumber">150</span> '+swp_localize_admin.swp_characters_remaining+'</div>');
65
-
66
- // Add the CountDown Box for the Twitter Box
67
- jQuery('#socialWarfare #nc_customTweet').parent().prepend('<div class="swp_CountDown"><span class="counterNumber">118</span> '+swp_localize_admin.swp_characters_remaining+'</div>');
68
-
69
- smTitleRemaining();
70
- jQuery('#socialWarfare textarea#nc_ogTitle').on('input', function() { smTitleRemaining(); });
71
-
72
- smDescriptionRemaining();
73
- jQuery('#socialWarfare textarea#nc_ogDescription').on('input', function() { smDescriptionRemaining(); });
74
-
75
- twitterRemaining();
76
- jQuery('#socialWarfare textarea#nc_customTweet').on('input', function() { twitterRemaining(); });
77
-
78
- // Setup an initilazation loop
79
- var swp_post_initialization = setInterval( function() {
80
-
81
- var swp_og_image = jQuery('.nc_ogImageWrapper ul.rwmb-media-list');
82
- var swp_pin_image = jQuery('.nc_pinterestImageWrapper ul.rwmb-media-list');
83
-
84
- // Check if the media list has been created yet
85
- if(swp_og_image.length && swp_og_image.is(':empty')) {
86
-
87
- // Setup the Open Graph Image Placeholder
88
- var smWidth = swp_og_image.width();
89
- var smHeight = smWidth * (9/16);
90
- swp_og_image.css({height:smHeight+'px'});
91
-
92
- } else {
93
-
94
- var smHeight = swp_og_image.find('img').height();
95
- swp_og_image.css({height:smHeight+'px'});
96
-
97
- }
98
-
99
- if(swp_pin_image.length && swp_pin_image.is(':empty')) {
100
-
101
- // Setup the Open Graph Image Placeholder
102
- var pinWidth = swp_pin_image.width();
103
- var pinHeight = pinWidth * (3/2);
104
- swp_pin_image.css({height:pinHeight+'px'});
105
-
106
- } else {
107
-
108
- var pinHeight = swp_pin_image.find('img').height();
109
- swp_pin_image.css({height:pinHeight+'px'});
110
-
111
- }
112
-
113
-
114
- } , 1000 );
115
-
116
- };
117
-
118
- // Show and Hide the Count Label based on if we're showing counts
119
- jQuery('.swp_popular_post_options .showCount select').on('change', function() {
120
- var value = jQuery(this).val()
121
- if(value = true) {
122
- jQuery('.swp_popular_post_options .countLabel').slideDown('slow');
123
- } else {
124
- jQuery('.swp_popular_post_options .countLabel').slideUp('slow');
125
- }
126
- });
127
-
128
- // Show and Hide the Thumbnail size based on if we're showing thmbnails
129
- jQuery('.swp_popular_post_options .thumbnails select').on('change', function() {
130
- var value = jQuery(this).val()
131
- if(value = true) {
132
- jQuery('.swp_popular_post_options .thumb_size').slideDown('slow');
133
- } else {
134
- jQuery('.swp_popular_post_options .thumb_size').slideUp('slow');
135
- }
136
- });
137
-
138
- // Show and Hide the Custom fields based on if we're using a custom color scheme
139
- jQuery('.swp_popular_post_options .style select').on('change', function() {
140
- var value = jQuery(this).val()
141
- if(value = 'custom') {
142
- jQuery('.swp_popular_post_options .custom_bg, .swp_popular_post_options .custom_link').slideDown('slow');
143
- } else {
144
- jQuery('.swp_popular_post_options .custom_bg, .swp_popular_post_options .custom_link').slideUp('slow');
145
- }
146
- });
147
-
148
- if(jQuery('.postbox#socialWarfare').length){
149
- var registration_status = jQuery('#socialWarfare .registrationWrapper input').attr('id');
150
- if( registration_status == 'false' ) {
151
- jQuery('.postbox#socialWarfare')
152
- .css({position:'relative',opacity:'0.3'})
153
- .append('<div class="sw-premium-blocker"></div>');
154
-
155
- jQuery('#socialWarfare .sw-premium-blocker').tooltip({
156
- items: '#socialWarfare .sw-premium-blocker',
157
- content: '<i></i>Unlock these features by registering your license.',
158
- position: {
159
- my: 'center top',
160
- at: 'center top'
161
- },
162
- tooltipClass: "sw-admin-hover-notice",
163
- open: function(event, ui)
164
- {
165
- if (typeof(event.originalEvent) === 'undefined')
166
- {
167
- return false;
168
- }
169
-
170
- var $id = jQuery(ui.tooltip).attr('id');
171
-
172
- // close any lingering tooltips
173
- jQuery('div.ui-tooltip').not('#' + $id).remove();
174
-
175
- // ajax function to pull in data and add it to the tooltip goes here
176
- },
177
- close: function(event, ui)
178
- {
179
- ui.tooltip.hover(function()
180
- {
181
- jQuery(this).stop(true).fadeTo(400, 1);
182
- },
183
- function()
184
- {
185
- jQuery(this).fadeOut('400', function()
186
- {
187
- jQuery(this).remove();
188
- });
189
- });
190
- }
191
- });
192
-
193
- }
194
- };
195
-
196
-
197
-
198
- });
199
-
200
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/admin-options-page.css ADDED
@@ -0,0 +1,773 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*********************************************************
2
+
3
+ A Responsive Grid System
4
+
5
+ *********************************************************/
6
+
7
+ .sw-grid {
8
+ float: left;
9
+ margin-bottom: 2.127659574468%;
10
+ padding-top: 0;
11
+ }
12
+
13
+ .sw-grid-right {
14
+ float: right;
15
+ margin-bottom: 2.127659574468%;
16
+ padding-top: 0;
17
+ }
18
+
19
+ .sw-col-60,
20
+ .sw-col-140,
21
+ .sw-col-220,
22
+ .sw-col-300,
23
+ .sw-col-380,
24
+ .sw-col-460,
25
+ .sw-col-540,
26
+ .sw-col-620,
27
+ .sw-col-700,
28
+ .sw-col-780,
29
+ .sw-col-860 {
30
+ margin-right: 2.127659574468%;
31
+ }
32
+
33
+ .sw-col-60 {
34
+ width: 6.382978723404%;
35
+ }
36
+
37
+ .sw-col-140 {
38
+ width: 14.893617021277%;
39
+ }
40
+
41
+ .sw-col-220 {
42
+ width: 23.404255319149%;
43
+ }
44
+
45
+ .sw-col-300 {
46
+ width: 31.914893617021%;
47
+ }
48
+
49
+ .sw-col-380 {
50
+ width: 40.425531914894%;
51
+ }
52
+
53
+ .sw-col-460 {
54
+ width: 48.936170212766%;
55
+ }
56
+
57
+ .sw-col-540 {
58
+ width: 57.446808510638%;
59
+ }
60
+
61
+ .sw-col-620 {
62
+ width: 65.957446808511%;
63
+ }
64
+
65
+ .sw-col-700 {
66
+ width: 74.468085106383%;
67
+ }
68
+
69
+ .sw-col-780 {
70
+ width: 82.978723404255%;
71
+ }
72
+
73
+ .sw-col-860 {
74
+ width: 91.489361702128%;
75
+ }
76
+
77
+ .sw-col-940 {
78
+ width: 100%;
79
+ }
80
+
81
+ .sw-fit {
82
+ margin-left: 0 !important;
83
+ margin-right: 0 !important;
84
+ }
85
+
86
+ .sw-clearfix:after, .sw-clearfix:before {
87
+ content: ' ';
88
+ display: table;
89
+ }
90
+
91
+ .sw-clearfix:after {
92
+ clear: both;
93
+ }
94
+
95
+ .sw-clearfix {
96
+ clear: both;
97
+ width: 100%;
98
+ }
99
+
100
+ img {
101
+ -ms-interpolation-mode: bicubic;
102
+ border: 0;
103
+ height: auto;
104
+ max-width: 100%;
105
+ vertical-align: middle;
106
+ }
107
+
108
+ .sw-admin-divider {
109
+ width: 100%;
110
+ height: 1px;
111
+ border-bottom: 1px solid #CED3DC;
112
+ margin: 20px 0 40px 0;
113
+ }
114
+
115
+ .sw-hidden {
116
+ display: none!important;
117
+ }
118
+
119
+
120
+ /*********************************************************
121
+
122
+ The Header Menu
123
+
124
+ *********************************************************/
125
+
126
+ #wpwrap,
127
+ #wpcontent {
128
+ background: #fff;
129
+ padding-left: 0;
130
+ }
131
+
132
+ .sw-top-menu {
133
+ border-bottom: 1px solid #CED3DC;
134
+ float: none;
135
+ background: #fff;
136
+ z-index: 5;
137
+ margin: 0;
138
+ }
139
+
140
+ .sw-header-logo {
141
+ height: 75px;
142
+ float: left;
143
+ }
144
+
145
+ .sw-header-menu {
146
+ height: 75px;
147
+ margin: 0;
148
+ }
149
+
150
+ .sw-header-menu li {
151
+ float: left;
152
+ margin: 0 15px;
153
+ font-size: 16px;
154
+ display: table;
155
+ height: 75px;
156
+ }
157
+
158
+ .sw-header-menu li:focus, .sw-header-menu li a:focus {
159
+ outline: none;
160
+ -webkit-box-shadow: none;
161
+ box-shadow: none;
162
+ }
163
+
164
+ .sw-header-menu li span {
165
+ padding: 0 5px 5px 5px;
166
+ }
167
+
168
+ .sw-header-menu li.sw-active-tab span, .sw-header-menu li:hover span {
169
+ border-bottom: 4px solid #30394f;
170
+ }
171
+
172
+ .sw-header-menu li a {
173
+ color: #30394f;
174
+ text-decoration: none;
175
+ display: table-cell;
176
+ vertical-align: middle;
177
+ }
178
+
179
+ .sw-top-menu .sw-grid {
180
+ margin-bottom: 0;
181
+ }
182
+
183
+
184
+ /*********************************************************
185
+
186
+ The Header Menu
187
+
188
+ *********************************************************/
189
+
190
+ .sw-admin-wrapper, .sw-header-wrapper {
191
+ clear: both;
192
+ margin: 20px auto 20px auto;
193
+ padding: 0 40px 20px 40px;
194
+ position: relative;
195
+ }
196
+
197
+ .sw-header-wrapper {
198
+ margin: 0;
199
+ }
200
+
201
+ .sw-tabs-container .sw-admin-tab {
202
+ display: none;
203
+ }
204
+
205
+ .sw-tabs-container .sw-admin-tab:nth-child(1) {
206
+ display: block;
207
+ }
208
+
209
+ .sw-admin-tab h2 {
210
+ font-size: 26px;
211
+ line-height: 1.2;
212
+ margin: 0;
213
+ }
214
+
215
+ .sw-admin-tab h2.sw-h-label {
216
+ line-height: 56px;
217
+ }
218
+
219
+ p.sw-subtitle {
220
+ font-size: 16px;
221
+ line-height: 1.2;
222
+ margin: 10px 0 30px 0;
223
+ }
224
+
225
+ p.sw-checkbox-label,
226
+ p.sw-input-label,
227
+ p.sw-select-label,
228
+ p.sw-authenticate-label {
229
+ font-size: 16px;
230
+ font-weight: bold;
231
+ padding-left: 10%;
232
+ }
233
+
234
+ .sw-select-label.sw-no-padding {
235
+ padding-left: 0;
236
+ }
237
+
238
+ p.sw-short {
239
+ margin: 1em 0 0 0;
240
+ }
241
+
242
+ p.sw-subtext-label {
243
+ margin-top: -10px;
244
+ }
245
+
246
+ .sw-admin-sidebar img {
247
+ margin: 5px 0 10px 0;
248
+ }
249
+
250
+ .system-status-wrapper {
251
+ display: none;
252
+ }
253
+
254
+ .system-status-container {
255
+ width: 90%;
256
+ height: 250px;
257
+ overflow: hidden;
258
+ border: 1px solid #CED3DC;
259
+ padding: 5%;
260
+ }
261
+
262
+ h3.sw-buttons-toggle {
263
+ width: 100px;
264
+ float: left;
265
+ clear: left;
266
+ margin: 15px 0 30px 0;
267
+ padding-left: 10%;
268
+ }
269
+
270
+
271
+ /*********************************************************
272
+
273
+ Checkboxes
274
+
275
+ *********************************************************/
276
+
277
+ .sw-checkbox-toggle {
278
+ width: 150px;
279
+ height: 46px;
280
+ background-color: #30394f;
281
+ float: right;
282
+ margin: 5px 0;
283
+ cursor: pointer;
284
+ -webkit-border-radius: 4px;
285
+ border-radius: 4px;
286
+ overflow: hidden;
287
+ position: relative;
288
+ }
289
+
290
+ .sw-checkbox-on, .sw-checkbox-off {
291
+ color: white;
292
+ font-size: 15px;
293
+ text-align: center;
294
+ line-height: 46px;
295
+ position: absolute;
296
+ top: 0;
297
+ width: 50%;
298
+ height: 100%;
299
+ }
300
+
301
+ .sw-checkbox-toggle[status="on"] .sw-checkbox-on {
302
+ left: 0;
303
+ background-color: #71C069;
304
+ }
305
+
306
+ .sw-checkbox-toggle[status="on"] .sw-checkbox-off,
307
+ .sw-checkbox-toggle[status="off"] .sw-checkbox-on {
308
+ display: none;
309
+ }
310
+
311
+ .sw-admin-wrapper[sw-registered="0"] .sw-option-container[premium="1"] .sw-checkbox-toggle[status="on"] .sw-checkbox-on {
312
+ display: none;
313
+ }
314
+ .sw-admin-wrapper[sw-registered="0"] .sw-option-container[premium="1"] .sw-checkbox-toggle[status="on"] .sw-checkbox-off {
315
+ right: 0;
316
+ background-color: #ee464f;
317
+ display: block;
318
+ }
319
+
320
+ .sw-checkbox-toggle[status="off"] .sw-checkbox-off {
321
+ right: 0;
322
+ background-color: #ee464f;
323
+ }
324
+
325
+ input.sw-admin-input {
326
+ padding: 15px;
327
+ border: 1px solid #ced3cd;
328
+ -webkit-border-radius: 4px;
329
+ border-radius: 4px;
330
+ float: right;
331
+ -webkit-box-shadow: none;
332
+ box-shadow: none;
333
+ margin: 2px 0 1px 0;
334
+ width: 100%;
335
+ }
336
+
337
+ .sw-grid select {
338
+ width: 100%;
339
+ -webkit-box-shadow: none;
340
+ box-shadow: none;
341
+ border: 1px solid #ced3cd;
342
+ height: 51px;
343
+ padding: 15px;
344
+ margin: 2px 1px 3px 0;
345
+ -webkit-border-radius: 4px;
346
+ border-radius: 4px;
347
+ }
348
+
349
+ a.button.sw-navy-button, a.button.sw-blue-button, a.button.sw-green-button, a.button.sw-red-button {
350
+ padding: 15px 30px;
351
+ height: auto;
352
+ line-height: 1;
353
+ -webkit-border-radius: 4px;
354
+ border-radius: 4px;
355
+ -webkit-box-shadow: none;
356
+ box-shadow: none;
357
+ float: right;
358
+ margin: 15px 0;
359
+ }
360
+
361
+ a.button.sw-navy-button, a.button.sw-navy-button:focus {
362
+ background: #30394f;
363
+ color: #fff;
364
+ border-color: #2a2d34;
365
+ -webkit-box-shadow: none;
366
+ box-shadow: none;
367
+ }
368
+
369
+ a.button.sw-navy-button:hover, a.button.sw-blue-button:hover {
370
+ background: #2a2d34;
371
+ border-color: #2a2d34;
372
+ color: #fff;
373
+ -webkit-box-shadow: none;
374
+ box-shadow: none;
375
+ }
376
+
377
+ a.button.sw-blue-button, a.button.sw-blue-button:focus {
378
+ background: #6bcce9;
379
+ border-color: #6bcce9;
380
+ color: #fff;
381
+ -webkit-box-shadow: none;
382
+ box-shadow: none;
383
+ }
384
+
385
+ a.button.sw-green-button, a.button.sw-green-button:focus {
386
+ background: #71C069;
387
+ color: #fff;
388
+ border-color: #71C069;
389
+ -webkit-box-shadow: none;
390
+ box-shadow: none;
391
+ }
392
+
393
+ a.button.sw-red-button, a.button.sw-red-button:focus, a.button.sw-red-button:hover {
394
+ background: #ee464f;
395
+ color: #fff;
396
+ border-color: #ee464f;
397
+ -webkit-box-shadow: none;
398
+ box-shadow: none;
399
+ }
400
+
401
+ .sw-admin-tab a.button {
402
+ margin: 5px 0 15px 0;
403
+ }
404
+
405
+ .sw-save-settings {
406
+ width: 100%;
407
+ text-align: center;
408
+ }
409
+
410
+ .sw-red-notice, .sw-green-notice {
411
+ color: #fff;
412
+ padding: 15px;
413
+ -webkit-border-radius: 2px;
414
+ border-radius: 2px;
415
+ margin: 15px 0;
416
+ }
417
+
418
+ .sw-red-notice, .sw-loading-message {
419
+ background: #ee464f
420
+ }
421
+
422
+ .sw-green-notice, .sw-loading-complete {
423
+ background: #71C069
424
+ }
425
+
426
+ .sw-loading-bg {
427
+ width: 100%;
428
+ position: fixed;
429
+ top: 0;
430
+ left: 0;
431
+ height: 100%;
432
+ background: rgba(0, 0, 0, 0.8);
433
+ z-index: 999999999999;
434
+ }
435
+
436
+ .sw-loading-message:before, .sw-green-notice:before, .sw-loading-complete:before {
437
+ font-family: 'Dashicons';
438
+ font-size: 26px;
439
+ margin: 0 15px 0 0;
440
+ vertical-align: middle;
441
+ }
442
+
443
+ .sw-red-notice:before, .sw-red-notice:before {
444
+ font-family: 'sw-icon-font';
445
+ font-size: 26px;
446
+ margin: 0 15px 0 0;
447
+ vertical-align: middle;
448
+ content: 'E';
449
+ }
450
+
451
+ .sw-red-notice a {
452
+ color: #fff;
453
+ font-weight: bold;
454
+ text-decoration: none;
455
+ border-bottom: 2px solid #fff;
456
+ }
457
+
458
+ .sw-red-notice a:hover {
459
+ color: #30394f;
460
+ border-bottom: 2px solid #30394f;
461
+ }
462
+
463
+ .sw-loading-message:before {
464
+ content: "\f158"
465
+ }
466
+
467
+ .sw-green-notice:before, .sw-loading-complete:before {
468
+ content: "\f147"
469
+ }
470
+
471
+ .sw-admin-tab .two-thirds-advanced h2.sw-h-label {
472
+ line-height: 1.2;
473
+ margin-bottom: 15px;
474
+ }
475
+
476
+ .sw-italic {
477
+ font-style: italic;
478
+ }
479
+
480
+ p.sw-subtitle.sw-registration-text {
481
+ padding: 20px 0 0 0;
482
+ font-size: 120%;
483
+ line-height: 175%;
484
+ }
485
+
486
+ .registration-wrapper[registration="1"] .swp_is_not_registered {
487
+ display: none;
488
+ }
489
+
490
+ .registration-wrapper[registration="0"] .swp_is_registered {
491
+ display: none;
492
+ }
493
+
494
+ .tweet-count-wrapper[registration="true"] .swp_tweets_not_activated {
495
+ display: none;
496
+ }
497
+
498
+ .sw-tweet-count-demo {
499
+ margin: 20px 0;
500
+ }
501
+
502
+ .sw-loading-message, .sw-loading-complete {
503
+ position: fixed;
504
+ top: 50%;
505
+ left: 50%;
506
+ -webkit-border-radius: 3px;
507
+ border-radius: 3px;
508
+ padding: 25px;
509
+ text-align: center;
510
+ font-size: 20px;
511
+ color: white;
512
+ width: 240px;
513
+ margin-top: -46px;
514
+ margin-left: -120px;
515
+ }
516
+
517
+
518
+ /*********************************************************
519
+
520
+ Buttons Drag & Drop
521
+
522
+ *********************************************************/
523
+
524
+ .sw-active, .sw-inactive {
525
+ margin: 0 0 5px 0;
526
+ min-width: 50px;
527
+ min-height: 40px;
528
+ border: 1px dashed #ced3dc;
529
+ padding: 0;
530
+ -webkit-border-radius: 4px;
531
+ border-radius: 4px;
532
+ width: auto;
533
+ height: auto;
534
+ display: inline-block;
535
+ }
536
+
537
+ .sw-s {
538
+ font-family: 'sw-icon-font';
539
+ color: #fff;
540
+ padding: 5px 30px 4px;
541
+ margin: 7px 5px 7px;
542
+ -webkit-border-radius: 2px;
543
+ border-radius: 2px;
544
+ display: inline-block;
545
+ font-style: normal;
546
+ font-size: 15px;
547
+ line-height: 15px;
548
+ cursor: pointer;
549
+ }
550
+
551
+ .sw-twitter-icon:before {
552
+ content: 's';
553
+ }
554
+
555
+ .sw-s.sw-twitter-icon {
556
+ background-color: #429cd6;
557
+ border-color: #3c87b2;
558
+ }
559
+
560
+ .sw-googlePlus-icon:before {
561
+ content: 'h';
562
+ }
563
+
564
+ .sw-s.sw-googlePlus-icon {
565
+ background-color: #df4b37;
566
+ border-color: #c44133;
567
+ }
568
+
569
+ .sw-facebook-icon:before {
570
+ content: 'j';
571
+ }
572
+
573
+ .sw-s.sw-facebook-icon {
574
+ background-color: #3a589e;
575
+ border-color: #2e4675;
576
+ }
577
+
578
+ .sw-pinterest-icon:before {
579
+ content: 'b';
580
+ }
581
+
582
+ .sw-s.sw-pinterest-icon {
583
+ background-color: #cd2029;
584
+ border-color: #aa1b29;
585
+ }
586
+
587
+ .sw-linkedIn-icon:before {
588
+ content: 'f';
589
+ }
590
+
591
+ .sw-s.sw-linkedIn-icon {
592
+ background-color: #0d77b7;
593
+ border-color: #0c6591;
594
+ }
595
+
596
+ .sw-tumblr-icon:before {
597
+ content: 'r';
598
+ }
599
+
600
+ .sw-s.sw-tumblr-icon {
601
+ background-color: #39475d;
602
+ border-color: #27313f;
603
+ }
604
+
605
+ .sw-stumbleupon-icon:before {
606
+ content: 'q';
607
+ }
608
+
609
+ .sw-s.sw-stumbleupon-icon {
610
+ background-color: #ef5025;
611
+ border-color: #d34427;
612
+ }
613
+
614
+ .sw-reddit-icon:before {
615
+ content: 'a';
616
+ }
617
+
618
+ .sw-s.sw-reddit-icon {
619
+ background-color: #f04b23;
620
+ border-color: #d33f27;
621
+ }
622
+
623
+ .sw-yummly-icon:before {
624
+ content: 'x';
625
+ }
626
+
627
+ .sw-s.sw-yummly-icon {
628
+ background-color: #e26426;
629
+ border-color: #b65027;
630
+ }
631
+
632
+ .sw-whatsapp-icon:before {
633
+ content: 'y';
634
+ }
635
+
636
+ .sw-s.sw-whatsapp-icon {
637
+ background-color: #71c169;
638
+ border-color: #28b04b;
639
+ }
640
+
641
+ .sw-pocket-icon:before {
642
+ content: 'B';
643
+ }
644
+
645
+ .sw-s.sw-pocket-icon {
646
+ background-color: #ef4056;
647
+ border-color: #ce3d55;
648
+ }
649
+
650
+ .sw-buffer-icon:before {
651
+ content: 'z';
652
+ }
653
+
654
+ .sw-s.sw-buffer-icon {
655
+ background-color: #323b43;
656
+ border-color: #59626a;
657
+ }
658
+
659
+ .sw-email-icon:before {
660
+ content: 'k';
661
+ }
662
+
663
+ .sw-s.sw-email-icon {
664
+ background-color: #6bcce9;
665
+ border-color: #6bcce9;
666
+ }
667
+
668
+ .sw-hacker_news-icon:before {
669
+ content: 'D';
670
+ }
671
+
672
+ .sw-s.sw-hacker_news-icon {
673
+ background-color: #f16522;
674
+ border-color: #d85623;
675
+ }
676
+
677
+ .sw-flipboard-icon:before {
678
+ content: 'C';
679
+ }
680
+
681
+ .sw-s.sw-flipboard-icon {
682
+ background-color: #e02828;
683
+ border-color: #bf2626;
684
+ }
685
+
686
+ @media screen and (max-width: 1350px) {
687
+ .sw-header-menu li {
688
+ font-size: 12px;
689
+ margin: 0 10px;
690
+ }
691
+ }
692
+
693
+ @media screen and (max-width: 1080px) {
694
+ .sw-header-logo {
695
+ display: none;
696
+ }
697
+ }
698
+
699
+
700
+ /*********************************************************
701
+
702
+ Premium
703
+
704
+ *********************************************************/
705
+
706
+ .sw-admin-wrapper[sw-registered="0"] div[premium="1"] {
707
+ display:none!important;
708
+ }
709
+
710
+ .sw-admin-wrapper[sw-registered="0"] .sw-option-container {
711
+ position: relative;
712
+ }
713
+
714
+ .sw-admin-wrapper[sw-registered="0"] div[premium="1"] .sw-premium-blocker {
715
+ display:none;
716
+ }
717
+
718
+ .sw-admin-wrapper[sw-registered="0"] div[premium="1"] .sw-premium-blocker:not(.no-icon):before {
719
+ font-family: 'sw-icon-font';
720
+ content: 'E';
721
+ font-size: 24px;
722
+ float: right;
723
+ margin: 20px 20px 0 0;
724
+ }
725
+
726
+ .sw-admin-wrapper[sw-registered="0"] i[premium-button="1"] {
727
+ display: none;
728
+ }
729
+
730
+ .sw-admin-wrapper[sw-registered="1"] .sw-premium-buttons {
731
+ display: none;
732
+ }
733
+
734
+ .sw-admin-wrapper[sw-registered="1"] .sw-premium-blocker {
735
+ display: none;
736
+ }
737
+
738
+ .ui-tooltip.sw-admin-hover-notice {
739
+ background: #ee464f;
740
+ color: #fff;
741
+ padding: 15px;
742
+ -webkit-border-radius: 2px;
743
+ border-radius: 2px;
744
+ margin: 15px 0;
745
+ border: 0;
746
+ -webkit-box-shadow: none;
747
+ box-shadow: none;
748
+ max-width: none;
749
+ padding: 20px;
750
+ }
751
+
752
+ .sw-admin-hover-notice i:before {
753
+ font-family: 'sw-icon-font';
754
+ font-size: 26px;
755
+ margin: 0 15px 0 0;
756
+ vertical-align: middle;
757
+ content: 'E';
758
+ float: left;
759
+ font-style: normal;
760
+ }
761
+
762
+ .swp_upload_image_field {
763
+ display: none;
764
+ }
765
+
766
+ .sw-admin-image-preview {
767
+ max-height: 50px;
768
+ float: right;
769
+ }
770
+
771
+ .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 {
772
+ display: none;
773
+ }
css/admin-options-page.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .sw-grid,.sw-grid-right{margin-bottom:2.127659574468%;padding-top:0}.sw-grid{float:left}.sw-grid-right{float:right}.sw-col-140,.sw-col-220,.sw-col-300,.sw-col-380,.sw-col-460,.sw-col-540,.sw-col-60,.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-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,.sw-top-menu{border-bottom:1px solid #CED3DC}.sw-admin-divider{width:100%;height:1px;margin:20px 0 40px}.sw-header-logo,.sw-header-menu li{height:75px;float:left}.sw-hidden{display:none!important}#wpcontent,#wpwrap{background:#fff;padding-left:0}.sw-top-menu{float:none;background:#fff;z-index:5;margin:0}.sw-header-menu{height:75px;margin:0}.sw-header-menu li{margin:0 15px;font-size:16px;display:table}.sw-header-menu li a:focus,.sw-header-menu li:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}.sw-header-menu li span{padding:0 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;padding:0 40px 20px;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-wrapper[sw-registered="0"] .sw-option-container[premium="1"] .sw-checkbox-toggle[status=on] .sw-checkbox-on,.sw-checkbox-toggle[status=on] .sw-checkbox-off,.sw-checkbox-toggle[status=off] .sw-checkbox-on,.system-status-wrapper{display:none}.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}p.sw-authenticate-label,p.sw-checkbox-label,p.sw-input-label,p.sw-select-label{font-size:16px;font-weight:700;padding-left:10%}.sw-select-label.sw-no-padding{padding-left:0}p.sw-short{margin:1em 0 0}p.sw-subtext-label{margin-top:-10px}.sw-admin-sidebar img{margin:5px 0 10px}.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;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-off,.sw-checkbox-on{color:#fff;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-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;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-blue-button,a.button.sw-green-button,a.button.sw-navy-button,a.button.sw-red-button{padding:15px 30px;height:auto;line-height:1;-webkit-border-radius:4px;border-radius:4px;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-blue-button:hover,a.button.sw-navy-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}.sw-save-settings{width:100%;text-align:center}.sw-green-notice,.sw-red-notice{color:#fff;padding:15px;-webkit-border-radius:2px;border-radius:2px;margin:15px 0}.sw-loading-message,.sw-red-notice{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,.8);z-index:999999999999}.sw-green-notice:before,.sw-loading-complete:before,.sw-loading-message:before{font-family:Dashicons;font-size:26px;margin:0 15px 0 0;vertical-align:middle}.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:700;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}.sw-admin-hover-notice i:before,.sw-s{font-family:sw-icon-font;font-style:normal}p.sw-subtitle.sw-registration-text{padding:20px 0 0;font-size:120%;line-height:175%}.registration-wrapper[registration="0"] .swp_is_registered,.registration-wrapper[registration="1"] .swp_is_not_registered,.tweet-count-wrapper[registration=true] .swp_tweets_not_activated{display:none}.sw-tweet-count-demo{margin:20px 0}.sw-loading-complete,.sw-loading-message{position:fixed;top:50%;left:50%;-webkit-border-radius:3px;border-radius:3px;padding:25px;text-align:center;font-size:20px;color:#fff;width:240px;margin-top:-46px;margin-left:-120px}.sw-active,.sw-inactive{margin:0 0 5px;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}.sw-s{color:#fff;padding:5px 30px 4px;margin:7px 5px;-webkit-border-radius:2px;border-radius:2px;display:inline-block;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-googlePlus-icon:before{content:'h'}.sw-s.sw-googlePlus-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"] div[premium="1"]{display:none!important}.sw-admin-wrapper[sw-registered="0"] div[premium="1"] .sw-premium-blocker,.sw-admin-wrapper[sw-registered="0"] i[premium-button="1"],.sw-admin-wrapper[sw-registered="1"] .sw-premium-blocker,.sw-admin-wrapper[sw-registered="1"] .sw-premium-buttons,.swp_upload_image_field,.toplevel_page_social-warfare .is-dismissible,.toplevel_page_social-warfare .notice-error,.toplevel_page_social-warfare .notice-info,.toplevel_page_social-warfare .notice-success,.toplevel_page_social-warfare .notice-warning,.toplevel_page_social-warfare .update-nag{display:none}.sw-admin-wrapper[sw-registered="0"] .sw-option-container{position:relative}.sw-admin-wrapper[sw-registered="0"] div[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}.ui-tooltip.sw-admin-hover-notice{background:#ee464f;color:#fff;-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-size:26px;margin:0 15px 0 0;vertical-align:middle;content:'E';float:left}.sw-admin-image-preview{max-height:50px;float:right}
css/admin.css CHANGED
@@ -46,7 +46,7 @@
46
  }
47
 
48
  .ui-tabs-panel h3 {
49
- font: italic normal normal 24px/29px Georgia,"Times New Roman","Bitstream Charter",Times,serif;
50
  margin: 0;
51
  padding: 0 0 5px;
52
  line-height: 35px;
@@ -58,126 +58,199 @@
58
  font-weight: bold;
59
  margin: 1em 0;
60
  }
 
61
  .notAvailable {
62
- opacity:0.3;
63
  }
 
64
  .swp_CountDown {
65
  background-color: #CCC;
66
  display: inline-block;
67
  float: right;
68
  padding: 5px 15px;
69
- border-radius: 3px 3px 0 0;
 
70
  color: #FFF;
71
  font-weight: bold;
72
- margin-top:-27px;
73
  }
 
74
  .swp_CountDown.swp_blue {
75
- background-color:#30394F;
76
  }
 
77
  .swp_CountDown.swp_red {
78
- background-color:#EE464F;
79
  }
 
80
  #socialWarfare textarea.large-text {
81
- width:100%;
82
  }
83
 
84
- #socialWarfare ul.rwmb-media-list.ui-sortable {
85
- display: block;
86
- width: 100%;
87
- background-size: contain;
88
- background-position-x: center;
89
- background-repeat: no-repeat;
90
- background-color: #ccc;
91
- border-radius:4px;
92
- padding:0;
 
 
93
  }
94
- #socialWarfare .nc_ogImageWrapper ul.rwmb-media-list {
 
95
  background-image: url('../images/img-placeholder-og.jpg');
96
  }
97
- #socialWarfare .nc_pinterestImageWrapper ul.rwmb-media-list {
 
98
  background-image: url('../images/img-placeholder-pin.jpg');
99
  }
100
 
101
- .rwmb-field.rwmb-textarea-wrapper.nc_ogTitleWrapper, .rwmb-field.rwmb-textarea-wrapper.nc_ogDescriptionWrapper, .rwmb-field.rwmb-textarea-wrapper.nc_pinterestDescriptionWrapper, .rwmb-field.rwmb-textarea-wrapper.nc_customTweetWrapper, .rwmb-field.rwmb-select-wrapper.nc_postLocationWrapper, .rwmb-field.rwmb-select-wrapper.nc_floatLocationWrapper {
102
- width: 63%;
103
- float: left;
104
- }
105
-
106
- .rwmb-field.rwmb-image_advanced-wrapper.nc_ogImageWrapper, .rwmb-field.rwmb-image_advanced-wrapper.nc_pinterestImageWrapper {
107
- width: 30%;
108
- float: left;
109
- margin-right: 3%;
110
- }
111
- #socialWarfare .rwmb-label, #socialWarfare .rwmb-input {width:100%;}
112
- #socialWarfare .rwmb-field {margin-top:10px;}
113
- #socialWarfare .rwmb-image-item, #socialWarfare .rwmb-media-preview, #socialWarfare .rwmb-media-content .centered, #socialWarfare .rwmb-media-content img {width:100%;height:auto;max-height:none;}
114
- .wp-core-ui #socialWarfare a.rwmb-add-media.button {
115
- display: block;
116
- background: #30394f;
117
- color: #fff;
118
- font-size: 12px;
119
- line-height: 1;
120
- text-align: center;
121
- vertical-align: middle;
122
- padding: 15px 25px;
123
- margin: 0;
124
- box-shadow: none;
125
- border: none;
126
- height: auto;
127
- }
128
- .wp-core-ui #socialWarfare a.rwmb-add-media.button:hover {
129
- background: #EE464F;
130
- }
131
-
132
- #socialWarfare .rwmb-media-content img {
133
- -webkit-transform: translate(0%, 0%);
134
- -ms-transform: translate(0%, 0%);
135
- transform: translate(0%, 0%);
136
- }
137
- #socialWarfare .rwmb-media-content {overflow:visible;}
138
- #socialWarfare .rwmb-media-preview:before {padding-top:0px;}
139
- #socialWarfare .rwmb-media-content {position:inherit;}
140
- #socialWarfare .rwmb-divider-wrapper hr {border:none!important}
141
- #socialWarfare .rwmb-label label {
142
- font-weight: bold;
143
- color: #30394f;
144
- font-size: 18px;
145
- }
146
- #socialWarfare .rwmb-divider-wrapper {max-height:1px;clear:both;}
147
- #socialWarfare .rwmb-label { margin-bottom:10px; }
148
- #socialWarfare h2.hndle span:before {content:'p';margin-right:10px;font-family:"sw-icon-font";vertical-align:middle;}
149
- #socialWarfare .dashicons, #socialWarfare .sw {vertical-align:middle;margin-right:10px;font-size:18px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  #socialWarfare .sw-premium-blocker {
151
- position:absolute;
152
- width:100%;
153
- height:100%;
154
- top:0;
155
- left:0;
156
  }
 
157
  #socialWarfare .sw-premium-blocker:not(.no-icon):before {
158
- font-family: 'sw-icon-font';
159
- content: 'E';
160
- font-size: 24px;
161
- float:right;
162
- margin:10px 40px 0 0;
163
  }
 
164
  .ui-tooltip.sw-admin-hover-notice {
165
- background: #ee464f;
166
- color: #fff;
167
- padding: 15px;
168
- border-radius: 2px;
169
- margin: 15px 0;
170
- border:0;
171
- box-shadow:none;
172
- max-width:none;
173
- padding:20px;
 
 
174
  }
 
175
  .sw-admin-hover-notice i:before {
176
- font-family: 'sw-icon-font';
177
- font-size: 26px;
178
- margin: 0 15px 0 0;
179
- vertical-align: middle;
180
- content: 'E';
181
- float:left;
182
- font-style:normal;
183
- }
46
  }
47
 
48
  .ui-tabs-panel h3 {
49
+ font: italic normal normal 24px/29px Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
50
  margin: 0;
51
  padding: 0 0 5px;
52
  line-height: 35px;
58
  font-weight: bold;
59
  margin: 1em 0;
60
  }
61
+
62
  .notAvailable {
63
+ opacity: 0.3;
64
  }
65
+
66
  .swp_CountDown {
67
  background-color: #CCC;
68
  display: inline-block;
69
  float: right;
70
  padding: 5px 15px;
71
+ -webkit-border-radius: 3px 3px 0 0;
72
+ border-radius: 3px 3px 0 0;
73
  color: #FFF;
74
  font-weight: bold;
75
+ margin-top: -27px;
76
  }
77
+
78
  .swp_CountDown.swp_blue {
79
+ background-color: #30394F;
80
  }
81
+
82
  .swp_CountDown.swp_red {
83
+ background-color: #EE464F;
84
  }
85
+
86
  #socialWarfare textarea.large-text {
87
+ width: 100%;
88
  }
89
 
90
+ #socialWarfare ul.swpmb-media-list.ui-sortable {
91
+ display: block;
92
+ width: 100%;
93
+ -webkit-background-size: cover;
94
+ background-size: cover;
95
+ background-position-x: center;
96
+ background-repeat: no-repeat;
97
+ background-color: #ccc;
98
+ -webkit-border-radius: 4px;
99
+ border-radius: 4px;
100
+ padding: 0;
101
  }
102
+
103
+ #socialWarfare .nc_ogImageWrapper ul.swpmb-media-list {
104
  background-image: url('../images/img-placeholder-og.jpg');
105
  }
106
+
107
+ #socialWarfare .nc_pinterestImageWrapper ul.swpmb-media-list {
108
  background-image: url('../images/img-placeholder-pin.jpg');
109
  }
110
 
111
+ .swpmb-field.swpmb-textarea-wrapper.nc_ogTitleWrapper,
112
+ .swpmb-field.swpmb-textarea-wrapper.nc_ogDescriptionWrapper,
113
+ .swpmb-field.swpmb-textarea-wrapper.nc_pinterestDescriptionWrapper,
114
+ .swpmb-field.swpmb-textarea-wrapper.nc_customTweetWrapper,
115
+ .swpmb-field.swpmb-select-wrapper.nc_postLocationWrapper,
116
+ .swpmb-field.swpmb-select-wrapper.nc_floatLocationWrapper {
117
+ width: 63%;
118
+ float: left;
119
+ }
120
+
121
+ .swpmb-field.swpmb-image_advanced-wrapper.nc_ogImageWrapper,
122
+ .swpmb-field.swpmb-image_advanced-wrapper.nc_pinterestImageWrapper {
123
+ width: 30%;
124
+ float: left;
125
+ margin-right: 3%;
126
+ }
127
+
128
+ #socialWarfare .swpmb-label, #socialWarfare .swpmb-input {
129
+ width: 100%;
130
+ }
131
+
132
+ #socialWarfare .swpmb-field {
133
+ margin-top: 10px;
134
+ }
135
+
136
+ #socialWarfare .swpmb-image-item,
137
+ #socialWarfare .swpmb-media-preview,
138
+ #socialWarfare .swpmb-media-content .centered,
139
+ #socialWarfare .swpmb-media-content img {
140
+ width: 100%;
141
+ height: auto;
142
+ max-height: none;
143
+ -webkit-transform: none;
144
+ -ms-transform: none;
145
+ transform: none;
146
+ }
147
+
148
+ .wp-core-ui #socialWarfare a.swpmb-add-media.button {
149
+ display: block;
150
+ background: #30394f;
151
+ color: #fff;
152
+ font-size: 12px;
153
+ line-height: 1;
154
+ text-align: center;
155
+ vertical-align: middle;
156
+ padding: 15px 25px;
157
+ margin: 0;
158
+ -webkit-box-shadow: none;
159
+ box-shadow: none;
160
+ border: none;
161
+ height: auto;
162
+ }
163
+
164
+ .wp-core-ui #socialWarfare a.swpmb-add-media.button:hover {
165
+ background: #EE464F;
166
+ }
167
+
168
+ #socialWarfare .swpmb-media-content img {
169
+ -webkit-transform: translate(0%, 0%);
170
+ -ms-transform: translate(0%, 0%);
171
+ transform: translate(0%, 0%);
172
+ }
173
+
174
+ #socialWarfare .swpmb-media-content {
175
+ overflow: visible;
176
+ }
177
+
178
+ #socialWarfare .swpmb-media-preview:before {
179
+ padding-top: 0px;
180
+ }
181
+
182
+ #socialWarfare .swpmb-media-content {
183
+ position: inherit;
184
+ }
185
+
186
+ #socialWarfare .swpmb-divider-wrapper hr {
187
+ border: none!important
188
+ }
189
+
190
+ #socialWarfare .swpmb-label label {
191
+ font-weight: bold;
192
+ color: #30394f;
193
+ font-size: 18px;
194
+ }
195
+
196
+ #socialWarfare .swpmb-divider-wrapper {
197
+ max-height: 1px;
198
+ clear: both;
199
+ }
200
+
201
+ #socialWarfare .swpmb-label {
202
+ margin-bottom: 10px;
203
+ }
204
+
205
+ #socialWarfare h2.hndle span:before {
206
+ content: 'p';
207
+ margin-right: 10px;
208
+ font-family: "sw-icon-font";
209
+ vertical-align: middle;
210
+ }
211
+
212
+ #socialWarfare .dashicons, #socialWarfare .sw {
213
+ vertical-align: middle;
214
+ margin-right: 10px;
215
+ font-size: 18px;
216
+ }
217
+
218
  #socialWarfare .sw-premium-blocker {
219
+ position: absolute;
220
+ width: 100%;
221
+ height: 100%;
222
+ top: 0;
223
+ left: 0;
224
  }
225
+
226
  #socialWarfare .sw-premium-blocker:not(.no-icon):before {
227
+ font-family: 'sw-icon-font';
228
+ content: 'E';
229
+ font-size: 24px;
230
+ float: right;
231
+ margin: 10px 40px 0 0;
232
  }
233
+
234
  .ui-tooltip.sw-admin-hover-notice {
235
+ background: #ee464f;
236
+ color: #fff;
237
+ padding: 15px;
238
+ -webkit-border-radius: 2px;
239
+ border-radius: 2px;
240
+ margin: 15px 0;
241
+ border: 0;
242
+ -webkit-box-shadow: none;
243
+ box-shadow: none;
244
+ max-width: none;
245
+ padding: 20px;
246
  }
247
+
248
  .sw-admin-hover-notice i:before {
249
+ font-family: 'sw-icon-font';
250
+ font-size: 26px;
251
+ margin: 0 15px 0 0;
252
+ vertical-align: middle;
253
+ content: 'E';
254
+ float: left;
255
+ font-style: normal;
256
+ }
css/admin.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .ui-tabs-nav{border-bottom:1px solid #ccc;height:27px;margin:20px 0;padding:0}.ui-tabs-nav li{display:block;float:left;margin:0}.ui-tabs-nav li a{font-weight:700;border-style:solid;border-color:#CCC #CCC #F9F9F9;border-width:1px 1px 0;color:#C1C1C1;text-shadow:rgba(255,255,255,1) 0 1px 0;display:inline-block;padding:4px 14px 6px;text-decoration:none;margin:0 6px -1px 0;-moz-border-radius:5px 5px 0 0;-webkit-border-top-left-radius:5px;-webkit-border-top-right-radius:5px;-khtml-border-top-left-radius:5px;-khtml-border-top-right-radius:5px;border-top-left-radius:5px;border-top-right-radius:5px}.ui-tabs-nav li.ui-state-active a,.ui-tabs-nav li.ui-tabs-selected a{border-width:1px;color:#464646}.ui-tabs-panel{clear:both}.ui-tabs-panel h3{font:italic normal normal 24px/29px Georgia,"Times New Roman","Bitstream Charter",Times,serif;margin:0;padding:0 0 5px;line-height:35px;text-shadow:0 1px 0 #fff}.ui-tabs-panel h4{font-size:15px;font-weight:700;margin:1em 0}.notAvailable{opacity:.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:700;margin-top:-27px}.swp_CountDown.swp_blue{background-color:#30394F}.swp_CountDown.swp_red{background-color:#EE464F}#socialWarfare textarea.large-text{width:100%}#socialWarfare 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}#socialWarfare .nc_ogImageWrapper ul.swpmb-media-list{background-image:url(../images/img-placeholder-og.jpg)}#socialWarfare .nc_pinterestImageWrapper ul.swpmb-media-list{background-image:url(../images/img-placeholder-pin.jpg)}.swpmb-field.swpmb-select-wrapper.nc_floatLocationWrapper,.swpmb-field.swpmb-select-wrapper.nc_postLocationWrapper,.swpmb-field.swpmb-textarea-wrapper.nc_customTweetWrapper,.swpmb-field.swpmb-textarea-wrapper.nc_ogDescriptionWrapper,.swpmb-field.swpmb-textarea-wrapper.nc_ogTitleWrapper,.swpmb-field.swpmb-textarea-wrapper.nc_pinterestDescriptionWrapper{width:63%;float:left}.swpmb-field.swpmb-image_advanced-wrapper.nc_ogImageWrapper,.swpmb-field.swpmb-image_advanced-wrapper.nc_pinterestImageWrapper{width:30%;float:left;margin-right:3%}#socialWarfare .swpmb-input,#socialWarfare .swpmb-label{width:100%}#socialWarfare .swpmb-field{margin-top:10px}#socialWarfare .swpmb-image-item,#socialWarfare .swpmb-media-content .centered,#socialWarfare .swpmb-media-content img,#socialWarfare .swpmb-media-preview{width:100%;height:auto;max-height:none;-webkit-transform:none;-ms-transform:none;transform:none}.wp-core-ui #socialWarfare 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 #socialWarfare a.swpmb-add-media.button:hover{background:#EE464F}#socialWarfare .swpmb-media-content img{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}#socialWarfare .swpmb-media-content{overflow:visible;position:inherit}#socialWarfare .swpmb-media-preview:before{padding-top:0}#socialWarfare .swpmb-divider-wrapper hr{border:none!important}#socialWarfare .swpmb-label label{font-weight:700;color:#30394f;font-size:18px}#socialWarfare .swpmb-divider-wrapper{max-height:1px;clear:both}#socialWarfare .swpmb-label{margin-bottom:10px}#socialWarfare h2.hndle span:before{content:'p';margin-right:10px;font-family:sw-icon-font;vertical-align:middle}#socialWarfare .dashicons,#socialWarfare .sw{vertical-align:middle;margin-right:10px;font-size:18px}#socialWarfare .sw-premium-blocker{position:absolute;width:100%;height:100%;top:0;left:0}#socialWarfare .sw-premium-blocker:not(.no-icon):before{font-family:sw-icon-font;content:'E';font-size:24px;float:right;margin:10px 40px 0 0}.ui-tooltip.sw-admin-hover-notice{background:#ee464f;color:#fff;-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}
css/style.css CHANGED
@@ -1,229 +1,1740 @@
1
- .nc_socialPanel{clear:both;width:100%!important;margin-top:20px!important;margin-bottom:20px!important;height:30px;line-height:1;padding:0;}
2
- .nc_wrapper .nc_socialPanel{margin-top:10px!important;margin-bottom:10px!important;}
3
- div.nc_socialPanel .nc_tweetContainer{float:left;cursor:pointer;height:32px;font-family:Lato;border-radius:2px;transition:all .1s linear;border-size:1px;margin:0 5px;}
4
- .nc_socialPanel .nc_tweetContainer a.nc_tweet,.nc_socialPanel .totes .swp_count{display:block;font-size:18px!important;font-family:Lato, sans-serif;font-weight:bold;text-decoration:none;height:30px;text-transform:none;}
5
- .nc_socialPanel a .swp_count{line-height:32px;display:inline-block;padding:0;}
6
- .nc_socialPanel span:before{content:initial!important;}
7
- .nc_socialPanel .totes .swp_count{line-height:30px;}
8
- .nc_socialPanel .spaceManWilly{display:block;max-width:none!important;}
9
- .nc_socialPanel span.swp_count{font-size:14px;}
10
- .nc_socialPanel span.iconFiller{font-size:18px;}
11
- .nc_socialPanel.notMobile .nc_tweetContainer:nth-child(1){margin-left:0;}
12
- .nc_socialPanel:not(.nc_socialPanelSide){opacity:0;transition:opacity .2s ease-in-out;}
13
- .nc_socialPanel:not(.nc_socialPanelSide) div.totes.totesalt:nth-child(1){margin-left:0;padding-left:0;margin-right:15px;}
14
- .nc_socialPanel:not(.nc_socialPanelSide) div.totes.totesalt:nth-last-child(1){margin-right:0;padding-right:0;}
15
- a.swp_CTT{cursor:pointer;}
16
- span.swp_share{font-weight:normal;font-size:14px;display:block;height:30px;vertical-align:middle;line-height:30px;float:right;max-width:none!important;}
17
- .nc_socialPanel .sw{height:30px;line-height:32px;text-shadow:none!important;width:20px;margin:0 7px;}
18
- .iconFiller{display:block;float:left;transition:width .1s linear;overflow:hidden;height:30px;}
19
- .nc_socialPanel .iconFiller{width:30px;}
20
- .nc_socialPanel .totes{color:white;display:block;font-size:19px;cursor:default;background:#c4c4c4;border:1px solid #e08a0f;border-radius:2px;padding:0 10px;}
21
- .nc_socialPanel div.totes.totesalt,.nc_socialPanel:hover div.totes.totesalt:not(:nth-child(1)){background:transparent!important;color:#474B4D;border:none;margin-left:0!important;}
22
- div.nc_socialPanel:hover div.totes.totesalt:not(:nth-child(1)){background:transparent;color:#474B4D;margin-left:10px;}
23
- .nc_socialPanel .totes.totesalt .swp_label{font-size:10px;color:#474B4D;vertical-align:middle;}
24
- .nc_socialPanel .totes .swp_label{font-size:10px;vertical-align:middle;}
25
- .nc_socialPanel .totes.totesalt .swp_count{color:#474B4D;font-size:24px;}
26
- .nc_socialPanel:hover .totes,.nc_socialPanel.swp_fullColor .totes,.nc_socialPanel.swp_fade .totes,.nc_socialPanel.swp_customFull:hover div.totes{background:#e08a0f;}
27
- .nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer.totes.totesalt:before{content:"o";font-family:sw-icon-font;display:inline-block;vertical-align:top;margin-top:7px;}
28
- .nc_socialPanel:not(.nc_socialPanelSide) .totes.totesalt .swp_count{line-height:0;margin-top:12px;display:inline-block;vertical-align:middle;margin-left:10px;min-width:35px;}
29
- span.swp_label{display:block;position:absolute;margin-top:13px;text-transform:uppercase;font-size:9px!important;text-align:center!important;}
30
- .nc_socialPanelSide span.swp_label{margin-top:0;}
31
- .nc_socialPanel.swp_leaf .nc_tweetContainer{border-radius:15px 0;border-width:1px;}
32
- .nc_socialPanel.swp_pill .nc_tweetContainer{border-radius:50px;border-width:1px;}
33
- .nc_socialPanel.swp_shift .nc_tweetContainer:not(.totes){-webkit-transform:skew(-25deg);-moz-transform:skew(-25deg);-o-transform:skew(-25deg);border-width:1px;}
34
- .nc_socialPanel.swp_shift .nc_tweetContainer a{-webkit-transform:skew(25deg);-moz-transform:skew(25deg);-o-transform:skew(25deg);}
35
- .swp_connected .nc_tweetContainer,.swp_connected:hover .nc_tweetContainer,.swp_connected .nc_tweetContainer:hover{border-radius:0!important;border-width:1px;margin:0!important;}
36
- .nc_socialPanel.swp_flatFresh.swp_d_fullColor .googlePlus,html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .googlePlus:hover,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .googlePlus{border:1px solid #df4b37;}
37
- .nc_socialPanel.swp_flatFresh.swp_d_fullColor .twitter,html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .twitter:hover,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .twitter{border:1px solid #429cd6;}
38
- .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_fb,html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_fb:hover,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_fb{border:1px solid #3a589e;}
39
- .nc_socialPanel.swp_flatFresh.swp_d_fullColor .nc_pinterest,html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .nc_pinterest:hover,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .nc_pinterest{border:1px solid #cd2029;}
40
- .nc_socialPanel.swp_flatFresh.swp_d_fullColor .linkedIn,html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .linkedIn:hover,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .linkedIn{border:1px solid #0d77b7;}
41
- .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_tumblr,html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_tumblr:hover,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_tumblr{border:1px solid #39475d;}
42
- .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_stumbleupon,html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_stumbleupon:hover,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_stumbleupon{border:1px solid #ef5025;}
43
- .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_yummly,html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_yummly:hover,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_yummly{border:1px solid #e26426;}
44
- .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_reddit,html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_reddit:hover,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_reddit{border:1px solid #f04b23;}
45
- .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_email,html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_email:hover,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_email{border:1px solid #6bcce9;}
46
- .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_whatsapp,html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_whatsapp:hover,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_whatsapp{border:1px solid #71c169;}
47
- .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_pocket,html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_pocket:hover,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_pocket{border:1px solid #ef4056;}
48
- .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_buffer,html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_buffer:hover,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_buffer{border:1px solid #323b43;}
49
- .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_hacker_news,html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_hacker_news:hover,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_hacker_news{border:1px solid #d85623;}
50
- .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_flipboard,html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_flipboard:hover,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_flipboard{border:1px solid #bf2626;}
51
- .nc_socialPanel.swp_d_fullColor .googlePlus,html body .nc_socialPanel.swp_i_fullColor .googlePlus:hover,body .nc_socialPanel.swp_o_fullColor:hover .googlePlus{background:#df4b37;border:1px solid #c44133;}
52
- .nc_socialPanel.swp_d_fullColor .twitter,html body .nc_socialPanel.swp_i_fullColor .twitter:hover,body .nc_socialPanel.swp_o_fullColor:hover .twitter{background:#429cd6;border:1px solid #3c87b2;}
53
- .nc_socialPanel.swp_d_fullColor .swp_fb,html body .nc_socialPanel.swp_i_fullColor .swp_fb:hover,body .nc_socialPanel.swp_o_fullColor:hover .swp_fb{background:#3a589e;border:1px solid #2e4675;}
54
- .nc_socialPanel.swp_d_fullColor .nc_pinterest,html body .nc_socialPanel.swp_i_fullColor .nc_pinterest:hover,body .nc_socialPanel.swp_o_fullColor:hover .nc_pinterest{background:#cd2029;border:1px solid #aa1b29;}
55
- .nc_socialPanel.swp_d_fullColor .linkedIn,html body .nc_socialPanel.swp_i_fullColor .linkedIn:hover,body .nc_socialPanel.swp_o_fullColor:hover .linkedIn{background:#0d77b7;border:1px solid #0c6591;}
56
- .nc_socialPanel.swp_d_fullColor .swp_tumblr,html body .nc_socialPanel.swp_i_fullColor .swp_tumblr:hover,body .nc_socialPanel.swp_o_fullColor:hover .swp_tumblr{background:#39475d;border:1px solid #27313f;}
57
- .nc_socialPanel.swp_d_fullColor .swp_stumbleupon,html body .nc_socialPanel.swp_i_fullColor .swp_stumbleupon:hover,body .nc_socialPanel.swp_o_fullColor:hover .swp_stumbleupon{background:#ef5025;border:1px solid #d34427;}
58
- .nc_socialPanel.swp_d_fullColor .swp_yummly,html body .nc_socialPanel.swp_i_fullColor .swp_yummly:hover,body .nc_socialPanel.swp_o_fullColor:hover .swp_yummly{background:#e26426;border:1px solid #b65027;}
59
- .nc_socialPanel.swp_d_fullColor .swp_reddit,html body .nc_socialPanel.swp_i_fullColor .swp_reddit:hover,body .nc_socialPanel.swp_o_fullColor:hover .swp_reddit{background:#f04b23;border:1px solid #d33f27;}
60
- .nc_socialPanel.swp_d_fullColor .swp_email,html body .nc_socialPanel.swp_i_fullColor .swp_email:hover,body .nc_socialPanel.swp_o_fullColor:hover .swp_email{background:#6bcce9;border:1px solid #61bace;}
61
- .nc_socialPanel.swp_d_fullColor .swp_whatsapp,html body .nc_socialPanel.swp_i_fullColor .swp_whatsapp:hover,body .nc_socialPanel.swp_o_fullColor:hover .swp_whatsapp{background:#71c169;border:1px solid #28b04b;}
62
- .nc_socialPanel.swp_d_fullColor .swp_pocket,html body .nc_socialPanel.swp_i_fullColor .swp_pocket:hover,body .nc_socialPanel.swp_o_fullColor:hover .swp_pocket{background:#ef4056;border:1px solid #ce3d55;}
63
- .nc_socialPanel.swp_d_fullColor .swp_buffer,html body .nc_socialPanel.swp_i_fullColor .swp_buffer:hover,body .nc_socialPanel.swp_o_fullColor:hover .swp_buffer{background:#323b43;border:1px solid #59626a;}
64
- .nc_socialPanel.swp_d_fullColor .swp_hacker_news,html body .nc_socialPanel.swp_i_fullColor .swp_hacker_news:hover,body .nc_socialPanel.swp_o_fullColor:hover .swp_hacker_news{background:#f16522;border:1px solid #d85623;}
65
- .nc_socialPanel.swp_d_fullColor .swp_flipboard,html body .nc_socialPanel.swp_i_fullColor .swp_flipboard:hover,body .nc_socialPanel.swp_o_fullColor:hover .swp_flipboard{background:#e02828;border:1px solid #bf2626;}
66
- .nc_socialPanel.swp_threeDee.swp_d_fullColor .googlePlus,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .googlePlus:hover,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .googlePlus{border-bottom:3px solid #c44133;}
67
- .nc_socialPanel.swp_threeDee.swp_d_fullColor .twitter,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .twitter:hover,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .twitter{border-bottom:3px solid #5595bc;}
68
- .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_fb,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_fb:hover,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_fb{border-bottom:3px solid #2e4675;}
69
- .nc_socialPanel.swp_threeDee.swp_d_fullColor .nc_pinterest,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .nc_pinterest:hover,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .nc_pinterest{border-bottom:3px solid #aa1b29;}
70
- .nc_socialPanel.swp_threeDee.swp_d_fullColor .linkedIn,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .linkedIn:hover,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .linkedIn{border-bottom:3px solid #0c6591;}
71
- .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_tumblr,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_tumblr:hover,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_tumblr{border-bottom:3px solid #27313f;}
72
- .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_stumbleupon,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_stumbleupon:hover,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_stumbleupon{border-bottom:3px solid #d34427;}
73
- .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_yummly,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_yummly:hover,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_yummly{border-bottom:3px solid #b65027;}
74
-
75
- .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_reddit,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_reddit:hover,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_reddit{border-bottom:3px solid #d33f27;}
76
- .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_email,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_email:hover,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_email{border-bottom:3px solid #61bace;}
77
- .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_whatsapp,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_whatsapp:hover,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_whatsapp{border-bottom:3px solid #28b04b;}
78
- .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_pocket,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_pocket:hover,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_pocket{border-bottom:3px solid #ce3d55;}
79
- .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_buffer,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_buffer:hover,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_buffer{border-bottom:3px solid #59626a;}
80
- .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_hacker_news,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_hacker_news:hover,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_hacker_news{border-bottom:3px solid #d85623;}
81
- .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_flipboard,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_flipboard:hover,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_flipboard{border-bottom:3px solid #bf2626;}
82
- .nc_socialPanel.swp_d_lightGray .nc_tweetContainer,html body .nc_socialPanel.swp_i_lightGray .nc_tweetContainer:hover,body .nc_socialPanel.swp_o_lightGray:hover .nc_tweetContainer{background-color:#ccc;border:1px solid #ccc;}
83
- .nc_socialPanel.swp_threeDee.swp_d_lightGray .nc_tweetContainer:not(.totesalt),html body .nc_socialPanel.swp_threeDee.swp_i_lightGray .nc_tweetContainer:not(.totesalt):hover,body .nc_socialPanel.swp_threeDee.swp_o_lightGray:hover .nc_tweetContainer:not(.totesalt){border-bottom:3px solid #999;}
84
- .nc_socialPanel.swp_d_mediumGray .nc_tweetContainer,html body .nc_socialPanel.swp_i_mediumGray .nc_tweetContainer:hover,body .nc_socialPanel.swp_o_mediumGray:hover .nc_tweetContainer{background-color:#999;border:1px solid #999;}
85
- .nc_socialPanel.swp_threeDee.swp_d_mediumGray .nc_tweetContainer:not(.totesalt),html body .nc_socialPanel.swp_threeDee.swp_i_mediumGray .nc_tweetContainer:not(.totesalt):hover,body .nc_socialPanel.swp_threeDee.swp_o_mediumGray:hover .nc_tweetContainer:not(.totesalt){border-bottom:3px solid #444;}
86
- .nc_socialPanel.swp_d_darkGray .nc_tweetContainer,html body .nc_socialPanel.swp_i_darkGray .nc_tweetContainer:hover,body .nc_socialPanel.swp_o_darkGray:hover .nc_tweetContainer{background-color:#444;border:1px solid #444;}
87
- .nc_socialPanel.swp_threeDee.swp_d_darkGray .nc_tweetContainer:not(.totesalt),html body .nc_socialPanel.swp_threeDee.swp_i_darkGray .nc_tweetContainer:not(.totesalt):hover,body .nc_socialPanel.swp_threeDee.swp_o_darkGray:hover .nc_tweetContainer:not(.totesalt){border-bottom:3px solid #222;}
88
- .nc_socialPanel.swp_d_lgOutlines a,html body .nc_socialPanel.swp_i_lgOutlines a:hover,body .nc_socialPanel.swp_o_lgOutlines:hover a{color:#ccc;}
89
- .nc_socialPanel.swp_d_lgOutlines .nc_tweetContainer,html body .nc_socialPanel.swp_i_lgOutlines .nc_tweetContainer:hover,body .nc_socialPanel.swp_o_lgOutlines:hover .nc_tweetContainer{background:transparent;border:1px solid #ccc;}
90
- .nc_socialPanel.swp_d_mdOutlines a,html body .nc_socialPanel.swp_i_mdOutlines a:hover,body .nc_socialPanel.swp_o_mdOutlines:hover a{color:#999;}
91
- .nc_socialPanel.swp_d_mdOutlines .nc_tweetContainer,html body .nc_socialPanel.swp_i_mdOutlines .nc_tweetContainer:hover,body .nc_socialPanel.swp_o_mdOutlines:hover .nc_tweetContainer{background:transparent;border:1px solid #999;}
92
- .nc_socialPanel.swp_d_dgOutlines a,html body .nc_socialPanel.swp_i_dgOutlines a:hover,body .nc_socialPanel.swp_o_dgOutlines:hover a{color:#444;}
93
- .nc_socialPanel.swp_d_dgOutlines .nc_tweetContainer,html body .nc_socialPanel.swp_i_dgOutlines .nc_tweetContainer:hover,body .nc_socialPanel.swp_o_dgOutlines:hover .nc_tweetContainer{background:transparent;border:1px solid #444;}
94
- .nc_socialPanel.swp_d_colorOutlines .googlePlus a,html body .nc_socialPanel.swp_i_colorOutlines .googlePlus a:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .googlePlus a{color:#df4b37;}
95
- .nc_socialPanel.swp_d_colorOutlines .swp_fb a,html body .nc_socialPanel.swp_i_colorOutlines .swp_fb a:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_fb a{color:#3a589e;}
96
- .nc_socialPanel.swp_d_colorOutlines .nc_pinterest a,html body .nc_socialPanel.swp_i_colorOutlines .nc_pinterest a:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .nc_pinterest a{color:#cd2029;}
97
- .nc_socialPanel.swp_d_colorOutlines .linkedIn a,html body .nc_socialPanel.swp_i_colorOutlines .linkedIn a:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .linkedIn a{color:#0d77b7;}
98
- .nc_socialPanel.swp_d_colorOutlines .swp_tumblr a,html body .nc_socialPanel.swp_i_colorOutlines .swp_tumblr a:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_tumblr a{color:#39475d;}
99
- .nc_socialPanel.swp_d_colorOutlines .swp_stumbleupon a,html body .nc_socialPanel.swp_i_colorOutlines .swp_stumbleupon a:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_stumbleupon a{color:#ef5025;}
100
- .nc_socialPanel.swp_d_colorOutlines .swp_yummly a,html body .nc_socialPanel.swp_i_colorOutlines .swp_yummly a:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_yummly a{color:#e26426;}
101
- .nc_socialPanel.swp_d_colorOutlines .swp_whatsapp a,html body .nc_socialPanel.swp_i_colorOutlines .swp_whatsapp a:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_whatsapp a{color:#71c169;}
102
- .nc_socialPanel.swp_d_colorOutlines .swp_pocket a,html body .nc_socialPanel.swp_i_colorOutlines .swp_pocket a:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_pocket a{color:#ef4056;}
103
- .nc_socialPanel.swp_d_colorOutlines .swp_reddit a,html body .nc_socialPanel.swp_i_colorOutlines .swp_reddit a:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_reddit a{color:#f04b23;}
104
- .nc_socialPanel.swp_d_colorOutlines .swp_email a,html body .nc_socialPanel.swp_i_colorOutlines .swp_email a:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_email a{color:#6bcce9;}
105
- .nc_socialPanel.swp_d_colorOutlines .swp_buffer a,html body .nc_socialPanel.swp_i_colorOutlines .swp_buffer a:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_buffer a{color:#323b43;}
106
- .nc_socialPanel.swp_d_colorOutlines .swp_hacker_news a,html body .nc_socialPanel.swp_i_colorOutlines .swp_hacker_news a:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_hacker_news a{color:#f16522;}
107
- .nc_socialPanel.swp_d_colorOutlines .swp_flipboard a,html body .nc_socialPanel.swp_i_colorOutlines .swp_flipboard a:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_flipboard a{color:#e02828;}
108
- .nc_socialPanel.swp_d_colorOutlines .googlePlus,html body .nc_socialPanel.swp_i_colorOutlines .googlePlus:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .googlePlus{background:transparent;border:1px solid #df4b37;}
109
- .nc_socialPanel.swp_d_colorOutlines .twitter,html body .nc_socialPanel.swp_i_colorOutlines .twitter:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .twitter{background:transparent;border:1px solid #429cd6;}
110
- .nc_socialPanel.swp_d_colorOutlines .swp_fb,html body .nc_socialPanel.swp_i_colorOutlines .swp_fb:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_fb{background:transparent;border:1px solid #3a589e;}
111
- .nc_socialPanel.swp_d_colorOutlines .nc_pinterest,html body .nc_socialPanel.swp_i_colorOutlines .nc_pinterest:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .nc_pinterest{background:transparent;border:1px solid #cd2029;}
112
- .nc_socialPanel.swp_d_colorOutlines .linkedIn,html body .nc_socialPanel.swp_i_colorOutlines .linkedIn:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .linkedIn{background:transparent;border:1px solid #0d77b7;}
113
- .nc_socialPanel.swp_d_colorOutlines .swp_tumblr,html body .nc_socialPanel.swp_i_colorOutlines .swp_tumblr:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_tumblr{background:transparent;border:1px solid #39475d;}
114
- .nc_socialPanel.swp_d_colorOutlines .swp_stumbleupon,html body .nc_socialPanel.swp_i_colorOutlines .swp_stumbleupon:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_stumbleupon{background:transparent;border:1px solid #ef5025;}
115
- .nc_socialPanel.swp_d_colorOutlines .swp_yummly,html body .nc_socialPanel.swp_i_colorOutlines .swp_yummly:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_yummly{background:transparent;border:1px solid #e26426;}
116
- .nc_socialPanel.swp_d_colorOutlines .swp_whatsapp,html body .nc_socialPanel.swp_i_colorOutlines .swp_whatsapp:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_whatsapp{background:transparent;border:1px solid #71c169;}
117
- .nc_socialPanel.swp_d_colorOutlines .swp_reddit,html body .nc_socialPanel.swp_i_colorOutlines .swp_reddit:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_reddit{background:transparent;border:1px solid #f04b23;}
118
- .nc_socialPanel.swp_d_colorOutlines .swp_email,html body .nc_socialPanel.swp_i_colorOutlines .swp_email:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_email{background:transparent;border:1px solid #6bcce9;}
119
- .nc_socialPanel.swp_d_colorOutlines .swp_pocket,html body .nc_socialPanel.swp_i_colorOutlines .swp_pocket:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_pocket{background:transparent;border:1px solid #ef4056;}
120
- .nc_socialPanel.swp_d_colorOutlines .swp_buffer,html body .nc_socialPanel.swp_i_colorOutlines .swp_buffer:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_buffer{background:transparent;border:1px solid #323b43;}
121
- .nc_socialPanel.swp_d_colorOutlines .swp_hacker_news,html body .nc_socialPanel.swp_i_colorOutlines .swp_hacker_news:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_hacker_news{background:transparent;border:1px solid #f16522;}
122
- .nc_socialPanel.swp_d_colorOutlines .swp_flipboard,html body .nc_socialPanel.swp_i_colorOutlines .swp_flipboard:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_flipboard{background:transparent;border:1px solid #bf2626;}
123
- .nc_socialPanelSide{z-index:9999999;top:200px;transition:all .2s linear;height:auto;width:100px!important;overflow:visible;}
124
- .nc_socialPanelSide.slide{position:fixed;left:-100px;transition:all .2s linear;}
125
- .nc_socialPanelSide.fade{position:fixed;left:5px;display:none;transition:all .2s linear;}
126
- .nc_socialPanelSide .nc_tweetContainer{height:32px;background:#DD4B38;display:block;font-family:Lato,sans-serif;clear:both;vertical-align:top;width:90px;transition:all .1s linear;overflow:hidden;border-radius:3px;margin:3px 0!important;padding:0;}
127
- .nc_socialPanelSide .nc_tweetContainer .iconFiller{display:inline-block;width:21px;height:40px;vertical-align:middle;transition:all .1s linear;margin:0 6px;padding:0;}
128
- .nc_socialPanelSide .nc_tweetContainer .swp_count{display:inline-block;width:0;overflow:hidden;line-height:35px;text-align:right;font-size:14px;height:32px;vertical-align:top;transition:all .1s linear;margin:0;padding:0;}
129
- .nc_socialPanelSide .nc_tweetContainer a{display:block;text-decoration:none;vertical-align:top;height:36px;cursor:pointer;transition:all .1s linear;font-weight:500;margin:0;padding:0;}
130
- .nc_socialPanelSide .nc_tweetContainer .sw,.nc_socialPanelSide .nc_tweetContainer .swp_share{line-height:34px;float:left;}
131
- .nc_socialPanelSide .nc_tweetContainer .swp_share{font-size:13px;}
132
- .nc_socialPanelSide .nc_tweetContainer:hover,.nc_socialPanelSide .nc_tweetContainer:hover .iconFiller,.nc_socialPanelSide .nc_tweetContainer:hover .swp_count{transition:all .1s linear;}
133
- .nc_socialPanelSide.swp_boxed{transform:scale(0.9);}
134
- .nc_socialPanelSide.swp_boxed .nc_tweetContainer{margin-bottom:5px;}
135
- .nc_socialPanelSide.swp_boxed .nc_tweetContainer,.nc_socialPanelSide.swp_boxed .nc_tweetContainer a{height:75px;width:75px;position:relative;}
136
- .nc_socialPanelSide.swp_boxed .nc_tweetContainer i.sw{width:60px;text-align:center;padding-top:10px;font-size:27px;height:40px;}
137
- .nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes) span.swp_share{position:absolute;bottom:0;left:0;width:75px;text-align:center;height:35px;opacity:0;}
138
- .nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes) span.swp_count{transition:padding .1s linear;position:absolute;bottom:0;left:0;width:75px;text-align:center;height:35px;padding:0;}
139
- .nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes) span.swp_count.swp_hide,.nc_socialPanelSide.swp_boxed .nc_tweetContainer span.swp_hide .iconFiller,.nc_socialPanelSide.swp_boxed .nc_tweetContainer span.swp_hide .spaceManWilly{height:75px;opacity:1;}
140
- .nc_socialPanelSide.swp_boxed .nc_tweetContainer span.iconFiller{width:75px;height:40px;}
141
- .nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes):hover span.swp_count:not(.swp_hide){opacity:0;}
142
- .nc_socialPanelSide.swp_boxed .totes{width:75px!important;padding:0;}
143
- .nc_socialPanelSide .nc_tweetContainer:not(.totes){line-height:34px;}
144
- .nc_socialPanelSide .nc_tweetContainer:not(.totes) .iconFiller{width:30px;margin-left:2px;}
145
- .nc_socialPanelSide .nc_tweetContainer:not(.totes) .swp_count{width:48px;padding:0 8px;}
146
- .nc_socialPanelSide:not(.swp_boxed) .nc_tweetContainer:not(.totes):hover{width:130px;}
147
- .nc_socialPanelSide .nc_tweetContainer:not(.totes):hover .iconFiller,.nc_socialPanelSide .nc_tweetContainer:not(.totes) .spaceManWilly{width:72px;}
148
- .nc_socialPanelSide .nc_tweetContainer.totes{background:rgba(0,0,0,0);height:45px;font-weight:500;text-align:center;width:90px;border:0!important;margin:0;padding:0;}
149
- .nc_socialPanelSide .nc_tweetContainer.totes .swp_count{font-family:Lato, sans-serif;color:#444;font-weight:500;display:block;width:100%;text-align:center;height:28px;}
150
- .nc_socialPanelSide .nc_tweetContainer.totes .swp_label{font-family:Lato, sans-serif;display:block;width:100%;text-align:center;font-size:50%;color:#444;font-weight:500;}
151
- .nc_wrapper{position:fixed;background:white;width:100%;transition:top .5s bottom .5s;z-index:99999;}
152
- .nc_wrapper.floatBottom{bottom:0;left:0;}
153
- .nc_wrapper.floatTop{top:0;left:0;}
154
- .nc_floater{width:740px;left:304px;position:relative;margin:10px 0;}
155
- .nc_socialPanelSide.hideCounts a{text-align:center;}
156
- .nc_socialPanelSide.hideCounts .iconFiller{float:none;text-align:left;}
157
- .sw{display:inline-block;font-family:sw-icon-font!important;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0,0);font-style:normal;font-weight:normal;}
158
- .sw:before{display:block!important;}
159
- .wp-editor-container .sw:before{font-size:18px;line-height:22px;}
160
- .wp-editor-container .sw-social-warfare:before{color:#ee464f;}
161
- .mce-container .sw-social-warfare{font-size:20px;vertical-align:middle;margin-right:15px;color:#ee464f;}
162
- .sw-google-plus:before{content:"h";}
163
- .sw-pinterest:before{content:"b";}
164
- .sw-twitter:before{content:"s";}
165
- .sw-facebook:before{content:"j";}
166
- .sw-linkedin:before{content:"f";}
167
- .sw-tumblr:before{content:"r";}
168
- .sw-stumbleupon:before{content:"q";}
169
- .sw-reddit:before{content:"a";}
170
- .sw-email:before{content:"k";}
171
- .sw-yummly:before{content:"x";}
172
- .sw-whatsapp:before{content:"y";}
173
- .sw-pocket:before{content:"B";}
174
- .sw-buffer:before{content:"z";}
175
- .sw-hacker_news:before{content:"D";}
176
- .sw-flipboard:before{content:"C";}
177
- .sw-social-warfare:before{content:"p";}
178
- .swp_CTT{text-decoration:none!important;}
179
- .sw-tweet-clear{zoom:1;}
180
- .sw-tweet-clear:after{display:block;visibility:hidden;height:0;clear:both;content:".";}
181
- .sw-click-to-tweet{display:block;position:relative;margin:15px 0;padding:15px 30px;}
182
- .sw-click-to-tweet:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0;}
183
- .sw-click-to-tweet .sw-ctt-text{position:relative;word-wrap:break-word;margin:0 0 10px;padding:0;}
184
- a .sw-click-to-tweet .sw-ctt-text{position:relative;font-size:24px;line-height:140%;font-weight:500;text-decoration:none;text-transform:none;display:block;margin:0;padding:0;}
185
- .sw-click-to-tweet .sw-ctt-btn{position:relative;display:block;text-transform:uppercase;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;font-size:12px;font-weight:bold;line-height:100%;float:right;text-decoration:none;margin:10px 0 0;padding:3px 5px 3px 3px;}
186
- .sw-click-to-tweet i.sw-twitter{float:right;font-size:21px;margin-left:15px;text-transform:none;margin-top:2px;}
187
- a.swp_CTT.style1 .sw-click-to-tweet{background-color:#fff;border:1px solid #dddddd;border-radius:4px;}
188
- a.swp_CTT.style2 .sw-click-to-tweet{background-color:#fff;border:4px double #dddddd;border-radius:0;}
189
- a.style2 .sw-click-to-tweet .sw-ctt-text{text-decoration:none;color:#666666;font-style:italic;}
190
- a.swp_CTT.style3:hover .sw-click-to-tweet{border-left:10px solid #3c87b2;padding-right:20px;transition:all .25s linear;}
191
- a.swp_CTT.style3 .sw-click-to-tweet{border:none;border-left:10px solid #429cd6;background-color:#429cd6;border-radius:0;padding-right:20px;transition:all .25s linear;}
192
- a.style3 .sw-click-to-tweet .sw-ctt-text{text-decoration:none;color:#FFFFFF;font-style:italic;}
193
- a.swp_CTT.style4:hover .sw-click-to-tweet{border-left:10px solid #3c87b2;transition:all .25s linear;}
194
- a.swp_CTT.style4 .sw-click-to-tweet{background-color:#333;border-left:10px solid #C33;border-radius:0;transition:all .25s linear;}
195
- a.swp_CTT.style5:hover .sw-click-to-tweet{border-left:10px solid #30394F;transition:all .25s linear;background-color:#D34250;}
196
- a.swp_CTT.style5 .sw-click-to-tweet{background-color:#30394F;border-left:10px solid #D34250;border-radius:0;transition:all .25s linear;}
197
- a.swp_CTT.style6:hover .sw-click-to-tweet{border-left:10px solid #D34250;transition:all .25s linear;background-color:#CED3DC;}
198
- a.swp_CTT.style6 .sw-click-to-tweet{background-color:#EEEEEE;border-left:10px solid #D34250;border-radius:0;transition:all .25s linear;}
199
- a.style6 .sw-click-to-tweet i.sw-twitter{color:#30394F;}
200
- .swp_pop_thumb{float:left;width:100px;height:100px;border-radius:3px;margin:5px 25px 5px 0;}
201
- .swp_popular_post{clear:both;}
202
- .swp_clearfix:after{content:" ";visibility:hidden;display:block;height:0;clear:both;}
203
- .swp_popular_post a.swp_popularity{display:block;border:none;line-height:1.5;margin:20px 0;}
204
- span.swp_pop_count{font-size:70%;display:block;}
205
- .swp_widget_box{border-radius:3px;}
206
- .sw-pinit{position:relative;display:inline-block;padding:0;}
207
- .sw-pinit:hover img {opacity:0.5;transition:all 0.5s;}
208
- .sw-pinit .sw-pinit-overlay{position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;background:#000000;display:none;padding:0;}
209
- a.sw-pinit-button{background:#cd2029;color:#fff;border:1px solid #aa1b29;font-size:20px;border-radius:4px;position:absolute;padding:0px 30px;z-index:200;line-height:45px;height:50px;}
210
- a.sw-pinit-button:before{color:#fff;font-family:sw-icon-font;content:'b';margin-right:10px;margin-left:-5px;font-size:24px;float:left;line-height:50px}
211
- a.sw-pinit-button:hover:before{content:'F';}
212
- a.sw-pinit-button:hover{background:#aa1b29;color:#fff;}
213
- .sw-pinit-left{left:30px;}
214
- .sw-pinit-center{left:50%;margin-left:-60px;}
215
- .sw-pinit-right{right:30px;}
216
- .sw-pinit-top{top:30px;}
217
- .sw-pinit-middle{top:50%;margin-top:-25px;}
218
- .sw-pinit-bottom{bottom:30px;}
219
- .nc_socialPanel.notMobile .nc_tweetContainer:nth-last-child(1),.mobile .nc_tweetContainer:nth-last-child(2),.nc_tweetContainer.totes:nth-last-child(1){margin-right:0;}
220
- .nc_socialPanel.swp_d_fullColor a,html body .nc_socialPanel.swp_i_fullColor .nc_tweetContainer:hover a,body .nc_socialPanel.swp_o_fullColor:hover a,.nc_socialPanel.swp_d_lightGray a,html body .nc_socialPanel.swp_i_lightGray .nc_tweetContainer:hover a,body .nc_socialPanel.swp_o_lightGray:hover a,.nc_socialPanel.swp_d_mediumGray a,html body .nc_socialPanel.swp_i_mediumGray a:hover,body .nc_socialPanel.swp_o_mediumGray:hover a,.nc_socialPanel.swp_d_darkGray a,html body .nc_socialPanel.swp_i_darkGray a:hover,body .nc_socialPanel.swp_o_darkGray:hover a{color:white;}
221
- .nc_socialPanel.swp_d_colorOutlines .twitter a,html body .nc_socialPanel.swp_i_colorOutlines .twitter a:hover,body .nc_socialPanel.swp_o_colorOutlines:hover .twitter a,.wp-editor-container .sw-twitter:before,a.style1 .sw-click-to-tweet i.sw-twitter,a.style2 .sw-click-to-tweet i.sw-twitter{color:#429cd6;}
222
- .nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes) .swp_hide span.swp_share,.nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes):hover span.swp_share:not(.swp_hide){opacity:1;}
223
- .nc_socialPanel.mobile .iconFiller ~ .swp_count,.sw-content-locator{display:none;}
224
- a.style1 .sw-click-to-tweet .sw-ctt-text,a.style1 .sw-click-to-tweet .sw-ctt-btn{text-decoration:none;color:#999999;}
225
- 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{text-decoration:none;color:#666666;}
226
- 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.sw-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{text-decoration:none;color:#FFFFFF;}
227
- a.style4 .sw-click-to-tweet i.sw-twitter,a.style5 .sw-click-to-tweet i.sw-twitter{color:#FFFFFF;}
228
- a.style6 .sw-click-to-tweet .sw-ctt-text,a.style6 .sw-click-to-tweet .sw-ctt-btn{text-decoration:none;color:#30394F;}
229
- 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.sw-twitter{text-decoration:none;color:#2A2D34;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .nc_socialPanel {
2
+ clear: both;
3
+ display: -webkit-box;
4
+ display: -webkit-flex;
5
+ display: -moz-box;
6
+ display: -ms-flexbox;
7
+ display: flex;
8
+ height: 30px;
9
+ line-height: 1;
10
+ margin-bottom: 20px!important;
11
+ margin-top: 20px!important;
12
+ padding: 0;
13
+
14
+ -webkit-align-content: center;
15
+ align-content: center;
16
+ -webkit-align-items: stretch;
17
+ align-items: stretch;
18
+ -webkit-box-align: stretch;
19
+ -moz-box-align: stretch;
20
+ -webkit-box-pack: justify;
21
+ -moz-box-pack: justify;
22
+ -ms-flex-align: stretch;
23
+ -ms-flex-line-pack: center;
24
+ -ms-flex-pack: justify;
25
+ -webkit-justify-content: space-between;
26
+ justify-content: space-between;
27
+ }
28
+
29
+ .nc_socialPanel:not(.nc_floater):not(.nc_socialPanelSide) {
30
+ width: 100%!important;
31
+ }
32
+
33
+ .nc_wrapper .nc_socialPanel {
34
+ margin-bottom: 10px!important;
35
+ margin-top: 10px!important;
36
+ }
37
+
38
+ div.nc_socialPanel .nc_tweetContainer {
39
+ -webkit-border-radius: 2px;
40
+ border-radius: 2px;
41
+ cursor: pointer;
42
+ float: left;
43
+ font-family: Lato;
44
+ height: 32px;
45
+ margin: 0 5px;
46
+ overflow: hidden;
47
+ text-align: center;
48
+ -webkit-transition: all 0.1s linear;
49
+ transition: all 0.1s linear;
50
+
51
+ border-size: 1px;
52
+ }
53
+
54
+ div.nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer {
55
+ -webkit-box-flex: 1;
56
+ -moz-box-flex: 1;
57
+ -webkit-flex: 1;
58
+ -ms-flex: 1;
59
+ flex: 1;
60
+ }
61
+
62
+ .nc_socialPanel .nc_tweetContainer a.nc_tweet,
63
+ .nc_socialPanel .totes .swp_count {
64
+ display: block;
65
+ display: -webkit-box;
66
+ display: -webkit-flex;
67
+ display: -moz-box;
68
+ display: -ms-flexbox;
69
+ display: flex;
70
+ font-family: Lato, sans-serif;
71
+ font-size: 18px!important;
72
+ font-weight: bold;
73
+ height: 30px;
74
+ text-decoration: none;
75
+ text-decoration: none!important;
76
+ text-transform: none;
77
+
78
+ -webkit-box-direction: normal;
79
+ -moz-box-direction: normal;
80
+ -webkit-box-orient: horizontal;
81
+ -moz-box-orient: horizontal;
82
+ -webkit-flex-flow: row wrap;
83
+ -ms-flex-flow: row wrap;
84
+ flex-flow: row wrap;
85
+ }
86
+
87
+ .nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer:nth-child(1) {
88
+ margin-left: 0;
89
+ }
90
+
91
+ .nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer:nth-last-child(1) {
92
+ margin-right: 0;
93
+ }
94
+
95
+ .nc_socialPanel a .swp_count:not(.swp_hide) {
96
+ display: inline-block;
97
+ line-height: 32px;
98
+ margin: 0;
99
+ padding: 0 5px;
100
+
101
+ -webkit-box-flex: 1;
102
+ -moz-box-flex: 1;
103
+ -webkit-flex: 1;
104
+ -ms-flex: 1;
105
+ flex: 1;
106
+ }
107
+
108
+ .nc_socialPanel a .swp_count.swp_hide {
109
+ margin: 0 auto;
110
+ }
111
+
112
+ .nc_socialPanel span:before {
113
+ content: initial!important;
114
+ }
115
+
116
+ .nc_socialPanel .totes .swp_count {
117
+ line-height: 30px;
118
+ }
119
+
120
+ .nc_socialPanel span.swp_count {
121
+ font-size: 14px;
122
+ }
123
+
124
+ .nc_socialPanel span.iconFiller {
125
+ font-size: 18px;
126
+ margin: 0 auto;
127
+ }
128
+
129
+ .nc_socialPanel.notMobile .nc_tweetContainer:nth-child(1) {
130
+ margin-left: 0;
131
+ }
132
+
133
+ .nc_socialPanel:not(.nc_socialPanelSide) {
134
+ -webkit-transition: opacity 0.2s ease-in-out;
135
+ transition: opacity 0.2s ease-in-out;
136
+ }
137
+
138
+ .nc_socialPanel:not(.nc_socialPanelSide) div.totes.totesalt:nth-child(1) {
139
+ margin-left: 0;
140
+ margin-right: 15px;
141
+ padding-left: 0;
142
+ }
143
+
144
+ .nc_socialPanel:not(.nc_socialPanelSide) div.totes.totesalt:nth-last-child(1) {
145
+ margin-right: 0;
146
+ padding-right: 0;
147
+ }
148
+
149
+ a.swp_CTT {
150
+ cursor: pointer;
151
+ }
152
+
153
+ span.swp_share {
154
+ display: block;
155
+ float: right;
156
+ float: left;
157
+ font-size: 14px;
158
+ font-weight: normal;
159
+ height: 30px;
160
+ line-height: 30px;
161
+ margin: 0 0 0 6px;
162
+ max-width: none!important;
163
+ vertical-align: middle;
164
+ }
165
+
166
+ .nc_socialPanelSide span.swp_share {
167
+ margin: 0;
168
+ }
169
+
170
+ .nc_socialPanel .sw {
171
+ float: left;
172
+ height: 30px;
173
+ line-height: 32px;
174
+ margin: 0 5px;
175
+ text-shadow: none!important;
176
+ width: 20px;
177
+ }
178
+
179
+ .iconFiller {
180
+ display: block;
181
+ float: left;
182
+ height: 30px;
183
+ overflow: hidden;
184
+ -webkit-transition: width 0.1s linear;
185
+ transition: width 0.1s linear;
186
+ }
187
+
188
+ .nc_socialPanel .iconFiller {
189
+ width: 30px;
190
+ }
191
+
192
+ span.spaceManWilly {
193
+ display: block;
194
+ width: 120px;
195
+ }
196
+
197
+ .nc_socialPanel .totes {
198
+ background: #c4c4c4;
199
+ border: 1px solid #e08a0f;
200
+ -webkit-border-radius: 2px;
201
+ border-radius: 2px;
202
+ color: white;
203
+ cursor: default;
204
+ display: block;
205
+ font-size: 19px;
206
+ padding: 0 10px;
207
+
208
+ -webkit-box-flex: 0!important;
209
+ -moz-box-flex: 0!important;
210
+ -webkit-flex: none!important;
211
+ -ms-flex: none!important;
212
+ flex: none!important;
213
+ }
214
+
215
+ .nc_socialPanel div.totes.totesalt,
216
+ .nc_socialPanel:hover div.totes.totesalt:not(:nth-child(1)) {
217
+ background: transparent!important;
218
+ border: none;
219
+ color: #474b4d;
220
+ margin-left: 0!important;
221
+ }
222
+
223
+ div.nc_socialPanel:hover div.totes.totesalt:not(:nth-child(1)) {
224
+ background: transparent;
225
+ color: #474b4d;
226
+ margin-left: 10px;
227
+ }
228
+
229
+ .nc_socialPanel .totes.totesalt .swp_label {
230
+ color: #474b4d;
231
+ font-size: 10px;
232
+ vertical-align: middle;
233
+ }
234
+
235
+ .nc_socialPanel .totes .swp_label {
236
+ font-size: 10px;
237
+ vertical-align: middle;
238
+ }
239
+
240
+ .nc_socialPanel .totes.totesalt .swp_count {
241
+ color: #474b4d;
242
+ font-size: 24px;
243
+ }
244
+
245
+ .nc_socialPanel:hover .totes,
246
+ .nc_socialPanel.swp_fullColor .totes,
247
+ .nc_socialPanel.swp_fade .totes,
248
+ .nc_socialPanel.swp_customFull:hover div.totes {
249
+ background: #e08a0f;
250
+ }
251
+
252
+ .nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer.totes.totesalt:before {
253
+ content: "o";
254
+ display: inline-block;
255
+ font-family: sw-icon-font;
256
+ margin-top: 7px;
257
+ vertical-align: top;
258
+ }
259
+
260
+ .nc_socialPanel:not(.nc_socialPanelSide) .totes.totesalt .swp_count {
261
+ display: inline-block;
262
+ line-height: 0;
263
+ margin-left: 10px;
264
+ margin-top: 12px;
265
+ min-width: 35px;
266
+ vertical-align: middle;
267
+ }
268
+
269
+ span.swp_label {
270
+ display: block;
271
+ font-size: 9px!important;
272
+ margin-top: 13px;
273
+ position: absolute;
274
+ text-align: center!important;
275
+ text-transform: uppercase;
276
+ }
277
+
278
+ .nc_socialPanelSide span.swp_label {
279
+ margin-top: 0;
280
+ }
281
+
282
+ .nc_socialPanel.swp_leaf .nc_tweetContainer {
283
+ -webkit-border-radius: 15px 0;
284
+ border-radius: 15px 0;
285
+ border-width: 1px;
286
+ }
287
+
288
+ .nc_socialPanel.swp_pill .nc_tweetContainer {
289
+ -webkit-border-radius: 50px;
290
+ border-radius: 50px;
291
+ border-width: 1px;
292
+ }
293
+
294
+ .nc_socialPanel.swp_shift .nc_tweetContainer:not(.totes) {
295
+ border-width: 1px;
296
+ -moz-transform: skew(-25deg);
297
+ -o-transform: skew(-25deg);
298
+ -webkit-transform: skew(-25deg);
299
+ }
300
+
301
+ .nc_socialPanel.swp_shift .nc_tweetContainer a {
302
+ -moz-transform: skew(25deg);
303
+ -o-transform: skew(25deg);
304
+ -webkit-transform: skew(25deg);
305
+ }
306
+
307
+ .swp_connected .nc_tweetContainer,
308
+ .swp_connected:hover .nc_tweetContainer,
309
+ .swp_connected .nc_tweetContainer:hover {
310
+ -webkit-border-radius: 0!important;
311
+ border-radius: 0!important;
312
+ border-width: 1px;
313
+ margin: 0!important;
314
+ }
315
+
316
+ .nc_socialPanel.swp_flatFresh.swp_d_fullColor .googlePlus,
317
+ html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .googlePlus:hover,
318
+ body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .googlePlus:not(:hover) {
319
+ border: 1px solid #df4b37;
320
+ }
321
+
322
+ .nc_socialPanel.swp_flatFresh.swp_d_fullColor .twitter,
323
+ html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .twitter:hover,
324
+ body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .twitter:not(:hover) {
325
+ border: 1px solid #429cd6;
326
+ }
327
+
328
+ .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_fb,
329
+ html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_fb:hover,
330
+ body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_fb:not(:hover) {
331
+ border: 1px solid #3a589e;
332
+ }
333
+
334
+ .nc_socialPanel.swp_flatFresh.swp_d_fullColor .nc_pinterest,
335
+ html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .nc_pinterest:hover,
336
+ body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .nc_pinterest:not(:hover) {
337
+ border: 1px solid #cd2029;
338
+ }
339
+
340
+ .nc_socialPanel.swp_flatFresh.swp_d_fullColor .linkedIn,
341
+ html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .linkedIn:hover,
342
+ body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .linkedIn:not(:hover) {
343
+ border: 1px solid #0d77b7;
344
+ }
345
+
346
+ .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_tumblr,
347
+ html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_tumblr:hover,
348
+ body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_tumblr:not(:hover) {
349
+ border: 1px solid #39475d;
350
+ }
351
+
352
+ .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_stumbleupon,
353
+ html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_stumbleupon:hover,
354
+ body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_stumbleupon:not(:hover) {
355
+ border: 1px solid #ef5025;
356
+ }
357
+
358
+ .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_yummly,
359
+ html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_yummly:hover,
360
+ body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_yummly:not(:hover) {
361
+ border: 1px solid #e26426;
362
+ }
363
+
364
+ .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_reddit,
365
+ html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_reddit:hover,
366
+ body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_reddit:not(:hover) {
367
+ border: 1px solid #f04b23;
368
+ }
369
+
370
+ .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_email,
371
+ html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_email:hover,
372
+ body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_email:not(:hover) {
373
+ border: 1px solid #6bcce9;
374
+ }
375
+
376
+ .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_whatsapp,
377
+ html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_whatsapp:hover,
378
+ body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_whatsapp:not(:hover) {
379
+ border: 1px solid #71c169;
380
+ }
381
+
382
+ .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_pocket,
383
+ html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_pocket:hover,
384
+ body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_pocket:not(:hover) {
385
+ border: 1px solid #ef4056;
386
+ }
387
+
388
+ .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_buffer,
389
+ html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_buffer:hover,
390
+ body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_buffer:not(:hover) {
391
+ border: 1px solid #323b43;
392
+ }
393
+
394
+ .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_hacker_news,
395
+ html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_hacker_news:hover,
396
+ body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_hacker_news:not(:hover) {
397
+ border: 1px solid #d85623;
398
+ }
399
+
400
+ .nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_flipboard,
401
+ html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_flipboard:hover,
402
+ body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_flipboard:not(:hover) {
403
+ border: 1px solid #bf2626;
404
+ }
405
+
406
+ .nc_socialPanel.swp_d_fullColor .googlePlus,
407
+ html body .nc_socialPanel.swp_i_fullColor .googlePlus:hover,
408
+ body .nc_socialPanel.swp_o_fullColor:hover .googlePlus {
409
+ background: #df4b37;
410
+ border: 1px solid #c44133;
411
+ }
412
+
413
+ .nc_socialPanel.swp_d_fullColor .twitter,
414
+ html body .nc_socialPanel.swp_i_fullColor .twitter:hover,
415
+ body .nc_socialPanel.swp_o_fullColor:hover .twitter {
416
+ background: #429cd6;
417
+ border: 1px solid #3c87b2;
418
+ }
419
+
420
+ .nc_socialPanel.swp_d_fullColor .swp_fb,
421
+ html body .nc_socialPanel.swp_i_fullColor .swp_fb:hover,
422
+ body .nc_socialPanel.swp_o_fullColor:hover .swp_fb {
423
+ background: #3a589e;
424
+ border: 1px solid #2e4675;
425
+ }
426
+
427
+ .nc_socialPanel.swp_d_fullColor .nc_pinterest,
428
+ html body .nc_socialPanel.swp_i_fullColor .nc_pinterest:hover,
429
+ body .nc_socialPanel.swp_o_fullColor:hover .nc_pinterest {
430
+ background: #cd2029;
431
+ border: 1px solid #aa1b29;
432
+ }
433
+
434
+ .nc_socialPanel.swp_d_fullColor .linkedIn,
435
+ html body .nc_socialPanel.swp_i_fullColor .linkedIn:hover,
436
+ body .nc_socialPanel.swp_o_fullColor:hover .linkedIn {
437
+ background: #0d77b7;
438
+ border: 1px solid #0c6591;
439
+ }
440
+
441
+ .nc_socialPanel.swp_d_fullColor .swp_tumblr,
442
+ html body .nc_socialPanel.swp_i_fullColor .swp_tumblr:hover,
443
+ body .nc_socialPanel.swp_o_fullColor:hover .swp_tumblr {
444
+ background: #39475d;
445
+ border: 1px solid #27313f;
446
+ }
447
+
448
+ .nc_socialPanel.swp_d_fullColor .swp_stumbleupon,
449
+ html body .nc_socialPanel.swp_i_fullColor .swp_stumbleupon:hover,
450
+ body .nc_socialPanel.swp_o_fullColor:hover .swp_stumbleupon {
451
+ background: #ef5025;
452
+ border: 1px solid #d34427;
453
+ }
454
+
455
+ .nc_socialPanel.swp_d_fullColor .swp_yummly,
456
+ html body .nc_socialPanel.swp_i_fullColor .swp_yummly:hover,
457
+ body .nc_socialPanel.swp_o_fullColor:hover .swp_yummly {
458
+ background: #e26426;
459
+ border: 1px solid #b65027;
460
+ }
461
+
462
+ .nc_socialPanel.swp_d_fullColor .swp_reddit,
463
+ html body .nc_socialPanel.swp_i_fullColor .swp_reddit:hover,
464
+ body .nc_socialPanel.swp_o_fullColor:hover .swp_reddit {
465
+ background: #f04b23;
466
+ border: 1px solid #d33f27;
467
+ }
468
+
469
+ .nc_socialPanel.swp_d_fullColor .swp_email,
470
+ html body .nc_socialPanel.swp_i_fullColor .swp_email:hover,
471
+ body .nc_socialPanel.swp_o_fullColor:hover .swp_email {
472
+ background: #6bcce9;
473
+ border: 1px solid #61bace;
474
+ }
475
+
476
+ .nc_socialPanel.swp_d_fullColor .swp_whatsapp,
477
+ html body .nc_socialPanel.swp_i_fullColor .swp_whatsapp:hover,
478
+ body .nc_socialPanel.swp_o_fullColor:hover .swp_whatsapp {
479
+ background: #71c169;
480
+ border: 1px solid #28b04b;
481
+ }
482
+
483
+ .nc_socialPanel.swp_d_fullColor .swp_pocket,
484
+ html body .nc_socialPanel.swp_i_fullColor .swp_pocket:hover,
485
+ body .nc_socialPanel.swp_o_fullColor:hover .swp_pocket {
486
+ background: #ef4056;
487
+ border: 1px solid #ce3d55;
488
+ }
489
+
490
+ .nc_socialPanel.swp_d_fullColor .swp_buffer,
491
+ html body .nc_socialPanel.swp_i_fullColor .swp_buffer:hover,
492
+ body .nc_socialPanel.swp_o_fullColor:hover .swp_buffer {
493
+ background: #323b43;
494
+ border: 1px solid #000;
495
+ }
496
+
497
+ .nc_socialPanel.swp_d_fullColor .swp_hacker_news,
498
+ html body .nc_socialPanel.swp_i_fullColor .swp_hacker_news:hover,
499
+ body .nc_socialPanel.swp_o_fullColor:hover .swp_hacker_news {
500
+ background: #f16522;
501
+ border: 1px solid #d85623;
502
+ }
503
+
504
+ .nc_socialPanel.swp_d_fullColor .swp_flipboard,
505
+ html body .nc_socialPanel.swp_i_fullColor .swp_flipboard:hover,
506
+ body .nc_socialPanel.swp_o_fullColor:hover .swp_flipboard {
507
+ background: #e02828;
508
+ border: 1px solid #bf2626;
509
+ }
510
+
511
+ .nc_socialPanel.swp_threeDee.swp_d_fullColor .googlePlus,
512
+ html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .googlePlus:hover,
513
+ body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .googlePlus {
514
+ border-bottom: 3px solid #c44133;
515
+ }
516
+
517
+ .nc_socialPanel.swp_threeDee.swp_d_fullColor .twitter,
518
+ html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .twitter:hover,
519
+ body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .twitter {
520
+ border-bottom: 3px solid #5595bc;
521
+ }
522
+
523
+ .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_fb,
524
+ html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_fb:hover,
525
+ body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_fb {
526
+ border-bottom: 3px solid #2e4675;
527
+ }
528
+
529
+ .nc_socialPanel.swp_threeDee.swp_d_fullColor .nc_pinterest,
530
+ html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .nc_pinterest:hover,
531
+ body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .nc_pinterest {
532
+ border-bottom: 3px solid #aa1b29;
533
+ }
534
+
535
+ .nc_socialPanel.swp_threeDee.swp_d_fullColor .linkedIn,
536
+ html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .linkedIn:hover,
537
+ body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .linkedIn {
538
+ border-bottom: 3px solid #0c6591;
539
+ }
540
+
541
+ .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_tumblr,
542
+ html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_tumblr:hover,
543
+ body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_tumblr {
544
+ border-bottom: 3px solid #27313f;
545
+ }
546
+
547
+ .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_stumbleupon,
548
+ html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_stumbleupon:hover,
549
+ body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_stumbleupon {
550
+ border-bottom: 3px solid #d34427;
551
+ }
552
+
553
+ .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_yummly,
554
+ html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_yummly:hover,
555
+ body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_yummly {
556
+ border-bottom: 3px solid #b65027;
557
+ }
558
+
559
+ .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_reddit,
560
+ html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_reddit:hover,
561
+ body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_reddit {
562
+ border-bottom: 3px solid #d33f27;
563
+ }
564
+
565
+ .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_email,
566
+ html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_email:hover,
567
+ body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_email {
568
+ border-bottom: 3px solid #61bace;
569
+ }
570
+
571
+ .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_whatsapp,
572
+ html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_whatsapp:hover,
573
+ body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_whatsapp {
574
+ border-bottom: 3px solid #28b04b;
575
+ }
576
+
577
+ .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_pocket,
578
+ html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_pocket:hover,
579
+ body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_pocket {
580
+ border-bottom: 3px solid #ce3d55;
581
+ }
582
+
583
+ .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_buffer,
584
+ html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_buffer:hover,
585
+ body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_buffer {
586
+ border-bottom: 3px solid #000;
587
+ }
588
+
589
+ .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_hacker_news,
590
+ html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_hacker_news:hover,
591
+ body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_hacker_news {
592
+ border-bottom: 3px solid #d85623;
593
+ }
594
+
595
+ .nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_flipboard,
596
+ html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_flipboard:hover,
597
+ body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_flipboard {
598
+ border-bottom: 3px solid #bf2626;
599
+ }
600
+
601
+ .nc_socialPanel.swp_d_lightGray .nc_tweetContainer,
602
+ html body .nc_socialPanel.swp_i_lightGray .nc_tweetContainer:hover,
603
+ body .nc_socialPanel.swp_o_lightGray:hover .nc_tweetContainer {
604
+ background-color: #ccc;
605
+ border: 1px solid #ccc;
606
+ }
607
+
608
+ .nc_socialPanel.swp_threeDee.swp_d_lightGray .nc_tweetContainer:not(.totesalt),
609
+ html body .nc_socialPanel.swp_threeDee.swp_i_lightGray .nc_tweetContainer:not(.totesalt):hover,
610
+ body .nc_socialPanel.swp_threeDee.swp_o_lightGray:hover .nc_tweetContainer:not(.totesalt) {
611
+ border-bottom: 3px solid #999;
612
+ }
613
+
614
+ .nc_socialPanel.swp_d_mediumGray .nc_tweetContainer,
615
+ html body .nc_socialPanel.swp_i_mediumGray .nc_tweetContainer:hover,
616
+ body .nc_socialPanel.swp_o_mediumGray:hover .nc_tweetContainer {
617
+ background-color: #999;
618
+ border: 1px solid #999;
619
+ }
620
+
621
+ .nc_socialPanel.swp_threeDee.swp_d_mediumGray .nc_tweetContainer:not(.totesalt),
622
+ html body .nc_socialPanel.swp_threeDee.swp_i_mediumGray .nc_tweetContainer:not(.totesalt):hover,
623
+ body .nc_socialPanel.swp_threeDee.swp_o_mediumGray:hover .nc_tweetContainer:not(.totesalt) {
624
+ border-bottom: 3px solid #444;
625
+ }
626
+
627
+ .nc_socialPanel.swp_d_darkGray .nc_tweetContainer,
628
+ html body .nc_socialPanel.swp_i_darkGray .nc_tweetContainer:hover,
629
+ body .nc_socialPanel.swp_o_darkGray:hover .nc_tweetContainer {
630
+ background-color: #444;
631
+ border: 1px solid #444;
632
+ }
633
+
634
+ .nc_socialPanel.swp_threeDee.swp_d_darkGray .nc_tweetContainer:not(.totesalt),
635
+ html body .nc_socialPanel.swp_threeDee.swp_i_darkGray .nc_tweetContainer:not(.totesalt):hover,
636
+ body .nc_socialPanel.swp_threeDee.swp_o_darkGray:hover .nc_tweetContainer:not(.totesalt) {
637
+ border-bottom: 3px solid #222;
638
+ }
639
+
640
+ .nc_socialPanel.swp_d_lgOutlines a,
641
+ html body .nc_socialPanel.swp_i_lgOutlines a:hover,
642
+ body .nc_socialPanel.swp_o_lgOutlines:hover a {
643
+ color: #ccc;
644
+ }
645
+
646
+ .nc_socialPanel.swp_d_lgOutlines .nc_tweetContainer,
647
+ html body .nc_socialPanel.swp_i_lgOutlines .nc_tweetContainer:hover,
648
+ body .nc_socialPanel.swp_o_lgOutlines:hover .nc_tweetContainer {
649
+ background: transparent;
650
+ border: 1px solid #ccc;
651
+ }
652
+
653
+ .nc_socialPanel.swp_d_mdOutlines a,
654
+ html body .nc_socialPanel.swp_i_mdOutlines a:hover,
655
+ body .nc_socialPanel.swp_o_mdOutlines:hover a {
656
+ color: #999;
657
+ }
658
+
659
+ .nc_socialPanel.swp_d_mdOutlines .nc_tweetContainer,
660
+ html body .nc_socialPanel.swp_i_mdOutlines .nc_tweetContainer:hover,
661
+ body .nc_socialPanel.swp_o_mdOutlines:hover .nc_tweetContainer {
662
+ background: transparent;
663
+ border: 1px solid #999;
664
+ }
665
+
666
+ .nc_socialPanel.swp_d_dgOutlines a,
667
+ html body .nc_socialPanel.swp_i_dgOutlines a:hover,
668
+ body .nc_socialPanel.swp_o_dgOutlines:hover a {
669
+ color: #444;
670
+ }
671
+
672
+ .nc_socialPanel.swp_d_dgOutlines .nc_tweetContainer,
673
+ html body .nc_socialPanel.swp_i_dgOutlines .nc_tweetContainer:hover,
674
+ body .nc_socialPanel.swp_o_dgOutlines:hover .nc_tweetContainer {
675
+ background: transparent;
676
+ border: 1px solid #444;
677
+ }
678
+
679
+ .nc_socialPanel.swp_d_colorOutlines .googlePlus a,
680
+ html body .nc_socialPanel.swp_i_colorOutlines .googlePlus a:hover,
681
+ body .nc_socialPanel.swp_o_colorOutlines:hover .googlePlus a {
682
+ color: #df4b37;
683
+ }
684
+
685
+ .nc_socialPanel.swp_d_colorOutlines .swp_fb a,
686
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_fb a:hover,
687
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_fb a {
688
+ color: #3a589e;
689
+ }
690
+
691
+ .nc_socialPanel.swp_d_colorOutlines .nc_pinterest a,
692
+ html body .nc_socialPanel.swp_i_colorOutlines .nc_pinterest a:hover,
693
+ body .nc_socialPanel.swp_o_colorOutlines:hover .nc_pinterest a {
694
+ color: #cd2029;
695
+ }
696
+
697
+ .nc_socialPanel.swp_d_colorOutlines .linkedIn a,
698
+ html body .nc_socialPanel.swp_i_colorOutlines .linkedIn a:hover,
699
+ body .nc_socialPanel.swp_o_colorOutlines:hover .linkedIn a {
700
+ color: #0d77b7;
701
+ }
702
+
703
+ .nc_socialPanel.swp_d_colorOutlines .swp_tumblr a,
704
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_tumblr a:hover,
705
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_tumblr a {
706
+ color: #39475d;
707
+ }
708
+
709
+ .nc_socialPanel.swp_d_colorOutlines .swp_stumbleupon a,
710
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_stumbleupon a:hover,
711
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_stumbleupon a {
712
+ color: #ef5025;
713
+ }
714
+
715
+ .nc_socialPanel.swp_d_colorOutlines .swp_yummly a,
716
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_yummly a:hover,
717
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_yummly a {
718
+ color: #e26426;
719
+ }
720
+
721
+ .nc_socialPanel.swp_d_colorOutlines .swp_whatsapp a,
722
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_whatsapp a:hover,
723
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_whatsapp a {
724
+ color: #71c169;
725
+ }
726
+
727
+ .nc_socialPanel.swp_d_colorOutlines .swp_pocket a,
728
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_pocket a:hover,
729
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_pocket a {
730
+ color: #ef4056;
731
+ }
732
+
733
+ .nc_socialPanel.swp_d_colorOutlines .swp_reddit a,
734
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_reddit a:hover,
735
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_reddit a {
736
+ color: #f04b23;
737
+ }
738
+
739
+ .nc_socialPanel.swp_d_colorOutlines .swp_email a,
740
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_email a:hover,
741
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_email a {
742
+ color: #6bcce9;
743
+ }
744
+
745
+ .nc_socialPanel.swp_d_colorOutlines .swp_buffer a,
746
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_buffer a:hover,
747
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_buffer a {
748
+ color: #323b43;
749
+ }
750
+
751
+ .nc_socialPanel.swp_d_colorOutlines .swp_hacker_news a,
752
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_hacker_news a:hover,
753
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_hacker_news a {
754
+ color: #f16522;
755
+ }
756
+
757
+ .nc_socialPanel.swp_d_colorOutlines .swp_flipboard a,
758
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_flipboard a:hover,
759
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_flipboard a {
760
+ color: #e02828;
761
+ }
762
+
763
+ .nc_socialPanel.swp_d_colorOutlines .googlePlus,
764
+ html body .nc_socialPanel.swp_i_colorOutlines .googlePlus:hover,
765
+ body .nc_socialPanel.swp_o_colorOutlines:hover .googlePlus {
766
+ background: transparent;
767
+ border: 1px solid #df4b37;
768
+ }
769
+
770
+ .nc_socialPanel.swp_d_colorOutlines .twitter,
771
+ html body .nc_socialPanel.swp_i_colorOutlines .twitter:hover,
772
+ body .nc_socialPanel.swp_o_colorOutlines:hover .twitter {
773
+ background: transparent;
774
+ border: 1px solid #429cd6;
775
+ }
776
+
777
+ .nc_socialPanel.swp_d_colorOutlines .swp_fb,
778
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_fb:hover,
779
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_fb {
780
+ background: transparent;
781
+ border: 1px solid #3a589e;
782
+ }
783
+
784
+ .nc_socialPanel.swp_d_colorOutlines .nc_pinterest,
785
+ html body .nc_socialPanel.swp_i_colorOutlines .nc_pinterest:hover,
786
+ body .nc_socialPanel.swp_o_colorOutlines:hover .nc_pinterest {
787
+ background: transparent;
788
+ border: 1px solid #cd2029;
789
+ }
790
+
791
+ .nc_socialPanel.swp_d_colorOutlines .linkedIn,
792
+ html body .nc_socialPanel.swp_i_colorOutlines .linkedIn:hover,
793
+ body .nc_socialPanel.swp_o_colorOutlines:hover .linkedIn {
794
+ background: transparent;
795
+ border: 1px solid #0d77b7;
796
+ }
797
+
798
+ .nc_socialPanel.swp_d_colorOutlines .swp_tumblr,
799
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_tumblr:hover,
800
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_tumblr {
801
+ background: transparent;
802
+ border: 1px solid #39475d;
803
+ }
804
+
805
+ .nc_socialPanel.swp_d_colorOutlines .swp_stumbleupon,
806
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_stumbleupon:hover,
807
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_stumbleupon {
808
+ background: transparent;
809
+ border: 1px solid #ef5025;
810
+ }
811
+
812
+ .nc_socialPanel.swp_d_colorOutlines .swp_yummly,
813
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_yummly:hover,
814
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_yummly {
815
+ background: transparent;
816
+ border: 1px solid #e26426;
817
+ }
818
+
819
+ .nc_socialPanel.swp_d_colorOutlines .swp_whatsapp,
820
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_whatsapp:hover,
821
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_whatsapp {
822
+ background: transparent;
823
+ border: 1px solid #71c169;
824
+ }
825
+
826
+ .nc_socialPanel.swp_d_colorOutlines .swp_reddit,
827
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_reddit:hover,
828
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_reddit {
829
+ background: transparent;
830
+ border: 1px solid #f04b23;
831
+ }
832
+
833
+ .nc_socialPanel.swp_d_colorOutlines .swp_email,
834
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_email:hover,
835
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_email {
836
+ background: transparent;
837
+ border: 1px solid #6bcce9;
838
+ }
839
+
840
+ .nc_socialPanel.swp_d_colorOutlines .swp_pocket,
841
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_pocket:hover,
842
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_pocket {
843
+ background: transparent;
844
+ border: 1px solid #ef4056;
845
+ }
846
+
847
+ .nc_socialPanel.swp_d_colorOutlines .swp_buffer,
848
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_buffer:hover,
849
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_buffer {
850
+ background: transparent;
851
+ border: 1px solid #323b43;
852
+ }
853
+
854
+ .nc_socialPanel.swp_d_colorOutlines .swp_hacker_news,
855
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_hacker_news:hover,
856
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_hacker_news {
857
+ background: transparent;
858
+ border: 1px solid #f16522;
859
+ }
860
+
861
+ .nc_socialPanel.swp_d_colorOutlines .swp_flipboard,
862
+ html body .nc_socialPanel.swp_i_colorOutlines .swp_flipboard:hover,
863
+ body .nc_socialPanel.swp_o_colorOutlines:hover .swp_flipboard {
864
+ background: transparent;
865
+ border: 1px solid #bf2626;
866
+ }
867
+
868
+ .nc_socialPanelSide {
869
+ flex-direction: column;
870
+ height: auto;
871
+ overflow: visible;
872
+ top: 200px;
873
+ -webkit-transition: all 0.2s linear;
874
+ transition: all 0.2s linear;
875
+ width: 100px!important;
876
+ z-index: 9999999;
877
+
878
+ -webkit-box-direction: normal;
879
+ -moz-box-direction: normal;
880
+ -webkit-box-orient: vertical;
881
+ -moz-box-orient: vertical;
882
+ -webkit-flex-direction: column;
883
+ -ms-flex-direction: column;
884
+ }
885
+
886
+ .nc_socialPanelSide.slide {
887
+ position: fixed;
888
+ left: -100px;
889
+ -webkit-transition: all 0.2s linear;
890
+ transition: all 0.2s linear;
891
+ }
892
+
893
+ .nc_socialPanelSide.fade {
894
+ display: none;
895
+ position: fixed;
896
+ left: 5px;
897
+ -webkit-transition: all 0.2s linear;
898
+ transition: all 0.2s linear;
899
+ }
900
+
901
+ .nc_socialPanelSide .nc_tweetContainer {
902
+ background: #dd4b38;
903
+ -webkit-border-radius: 3px;
904
+ border-radius: 3px;
905
+ clear: both;
906
+ display: block;
907
+ font-family: Lato, sans-serif;
908
+ height: 32px;
909
+ margin: 3px 0!important;
910
+ overflow: hidden;
911
+ padding: 0;
912
+ -webkit-transition: all 0.1s linear;
913
+ transition: all 0.1s linear;
914
+ vertical-align: top;
915
+ width: 90px;
916
+ }
917
+
918
+ .nc_socialPanelSide .nc_tweetContainer .iconFiller {
919
+ display: inline-block;
920
+ height: 40px;
921
+ margin: 0 6px;
922
+ padding: 0;
923
+ -webkit-transition: all 0.1s linear;
924
+ transition: all 0.1s linear;
925
+ vertical-align: middle;
926
+ width: 21px;
927
+ }
928
+
929
+ .nc_socialPanelSide .nc_tweetContainer .swp_count {
930
+ display: inline-block;
931
+ font-size: 14px;
932
+ height: 32px;
933
+ line-height: 35px;
934
+ margin: 0;
935
+ overflow: hidden;
936
+ padding: 0;
937
+ text-align: right;
938
+ -webkit-transition: all 0.1s linear;
939
+ transition: all 0.1s linear;
940
+ vertical-align: top;
941
+ width: 0;
942
+ }
943
+
944
+ .nc_socialPanelSide .nc_tweetContainer a {
945
+ cursor: pointer;
946
+ display: block;
947
+ font-weight: 500;
948
+ height: 36px;
949
+ margin: 0;
950
+ padding: 0;
951
+ text-decoration: none;
952
+ -webkit-transition: all 0.1s linear;
953
+ transition: all 0.1s linear;
954
+ vertical-align: top;
955
+ }
956
+
957
+ .nc_socialPanelSide .nc_tweetContainer .sw,
958
+ .nc_socialPanelSide .nc_tweetContainer .swp_share {
959
+ float: left;
960
+ line-height: 34px;
961
+ }
962
+
963
+ .nc_socialPanelSide.swp_default .nc_tweetContainer .sw {
964
+ line-height: 32px;
965
+ }
966
+
967
+ .nc_socialPanelSide.swp_default .nc_tweetContainer .swp_share {
968
+ line-height: 30px;
969
+ }
970
+
971
+ .nc_socialPanelSide .nc_tweetContainer .swp_share {
972
+ font-size: 13px;
973
+ }
974
+
975
+ .nc_socialPanelSide .nc_tweetContainer:hover,
976
+ .nc_socialPanelSide .nc_tweetContainer:hover .iconFiller,
977
+ .nc_socialPanelSide .nc_tweetContainer:hover .swp_count {
978
+ -webkit-transition: all 0.1s linear;
979
+ transition: all 0.1s linear;
980
+ }
981
+
982
+ .nc_socialPanelSide.swp_boxed {
983
+ -ms-transform: scale(0.9);
984
+ -webkit-transform: scale(0.9);
985
+ transform: scale(0.9);
986
+ }
987
+
988
+ .nc_socialPanelSide.swp_boxed .nc_tweetContainer {
989
+ margin-bottom: 5px;
990
+ }
991
+
992
+ .nc_socialPanelSide.swp_boxed .nc_tweetContainer,
993
+ .nc_socialPanelSide.swp_boxed .nc_tweetContainer a {
994
+ height: 75px;
995
+ position: relative;
996
+ width: 75px;
997
+ }
998
+
999
+ .nc_socialPanelSide.swp_boxed .nc_tweetContainer i.sw {
1000
+ font-size: 27px;
1001
+ height: 40px;
1002
+ margin: 0;
1003
+ padding-top: 10px;
1004
+ text-align: center;
1005
+ width: 100%;
1006
+ }
1007
+
1008
+ .nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes) span.swp_share {
1009
+ height: 35px;
1010
+ opacity: 0;
1011
+ position: absolute;
1012
+ bottom: 0;
1013
+ left: 0;
1014
+ text-align: center;
1015
+ width: 75px;
1016
+ }
1017
+
1018
+ .nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes) span.swp_count {
1019
+ height: 35px;
1020
+ margin: 0;
1021
+ padding: 0;
1022
+ position: absolute;
1023
+ bottom: 0;
1024
+ left: 0;
1025
+ text-align: center;
1026
+ -webkit-transition: padding 0.1s linear;
1027
+ transition: padding 0.1s linear;
1028
+ width: 100%;
1029
+ }
1030
+
1031
+ .nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes) span.swp_count.swp_hide,
1032
+ .nc_socialPanelSide.swp_boxed .nc_tweetContainer span.swp_hide .iconFiller,
1033
+ .nc_socialPanelSide.swp_boxed .nc_tweetContainer span.swp_hide .spaceManWilly {
1034
+ height: 75px;
1035
+ opacity: 1;
1036
+ }
1037
+
1038
+ .nc_socialPanelSide.swp_boxed .nc_tweetContainer span.iconFiller {
1039
+ height: 40px;
1040
+ width: 75px;
1041
+ }
1042
+
1043
+ .nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes):hover span.swp_count:not(.swp_hide) {
1044
+ opacity: 0;
1045
+ }
1046
+
1047
+ .nc_socialPanelSide.swp_boxed .totes {
1048
+ padding: 0;
1049
+ width: 75px!important;
1050
+ }
1051
+
1052
+ .nc_socialPanelSide .nc_tweetContainer:not(.totes) {
1053
+ line-height: 34px;
1054
+ }
1055
+
1056
+ .nc_socialPanelSide:not(.swp_boxed) .nc_tweetContainer:not(.totes) .iconFiller {
1057
+ margin-left: 2px;
1058
+ width: 30px;
1059
+ }
1060
+
1061
+ .nc_socialPanelSide .nc_tweetContainer:not(.totes) .swp_count {
1062
+ padding: 0 8px;
1063
+ width: 48px;
1064
+ }
1065
+
1066
+ .nc_socialPanelSide .nc_tweetContainer:not(.totes) .swp_count.swp_hide {
1067
+ padding: 0;
1068
+ width: 100%;
1069
+ }
1070
+
1071
+ .nc_socialPanelSide .nc_tweetContainer:not(.totes) .swp_hide .iconFiller {
1072
+ display: block;
1073
+ float: none;
1074
+ margin: 0 auto;
1075
+ }
1076
+
1077
+ .nc_socialPanelSide:not(.swp_boxed) .nc_tweetContainer:not(.totes):hover {
1078
+ width: 150px;
1079
+ }
1080
+
1081
+ .nc_socialPanelSide .nc_tweetContainer:not(.totes):hover .iconFiller,
1082
+ .nc_socialPanelSide .nc_tweetContainer:not(.totes) .spaceManWilly {
1083
+ width: 90px;
1084
+ }
1085
+
1086
+ .nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes):hover .iconFiller,
1087
+ .nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes) .spaceManWilly {
1088
+ width: 100%;
1089
+ }
1090
+
1091
+ .nc_socialPanelSide .nc_tweetContainer.totes {
1092
+ background: rgba(0, 0, 0, 0);
1093
+ border: 0!important;
1094
+ font-weight: 800;
1095
+ height: 45px;
1096
+ margin: 0;
1097
+ padding: 0;
1098
+ text-align: center;
1099
+ width: 90px;
1100
+ }
1101
+
1102
+ .nc_socialPanelSide .nc_tweetContainer.totes .swp_count {
1103
+ color: #444;
1104
+ display: block;
1105
+ font-family: Lato, sans-serif;
1106
+ height: 28px;
1107
+ text-align: center;
1108
+ width: 100%;
1109
+ }
1110
+
1111
+ .nc_socialPanelSide .nc_tweetContainer.totes .swp_label {
1112
+ color: #444;
1113
+ display: block;
1114
+ font-family: Lato, sans-serif;
1115
+ font-size: 50%;
1116
+ position: relative;
1117
+ text-align: center;
1118
+ width: 100%;
1119
+ }
1120
+
1121
+ .nc_wrapper {
1122
+ background: white;
1123
+ position: fixed;
1124
+ -webkit-transition: top 0.5s bottom 0.5s;
1125
+ transition: top 0.5s bottom 0.5s;
1126
+ width: 100%;
1127
+ z-index: 99999;
1128
+ }
1129
+
1130
+ .nc_wrapper.floatBottom {
1131
+ bottom: 0;
1132
+ left: 0;
1133
+ }
1134
+
1135
+ .nc_wrapper.floatTop {
1136
+ top: 0;
1137
+ left: 0;
1138
+ }
1139
+
1140
+ .nc_floater {
1141
+ margin: 10px 0;
1142
+ position: relative;
1143
+ left: 304px;
1144
+ width: 740px;
1145
+ }
1146
+
1147
+ .nc_socialPanelSide.hideCounts a {
1148
+ text-align: center;
1149
+ }
1150
+
1151
+ .nc_socialPanelSide.hideCounts .iconFiller {
1152
+ float: none;
1153
+ text-align: left;
1154
+ }
1155
+
1156
+ .sw {
1157
+ display: inline-block;
1158
+ font-family: sw-icon-font!important;
1159
+ font-size: inherit;
1160
+ -moz-osx-font-smoothing: grayscale;
1161
+ -webkit-font-smoothing: antialiased;
1162
+ font-style: normal;
1163
+ font-weight: normal;
1164
+ text-rendering: auto;
1165
+ -ms-transform: translate(0, 0);
1166
+ -webkit-transform: translate(0, 0);
1167
+ transform: translate(0, 0);
1168
+ }
1169
+
1170
+ .sw:before {
1171
+ display: block!important;
1172
+ }
1173
+
1174
+ .wp-editor-container .sw:before {
1175
+ font-size: 18px;
1176
+ line-height: 22px;
1177
+ }
1178
+
1179
+ .wp-editor-container .sw-social-warfare:before {
1180
+ color: #ee464f;
1181
+ }
1182
+
1183
+ .mce-container .sw-social-warfare {
1184
+ color: #ee464f;
1185
+ font-size: 20px;
1186
+ margin-right: 15px;
1187
+ vertical-align: middle;
1188
+ }
1189
+
1190
+ .sw-google-plus:before {
1191
+ content: "h";
1192
+ }
1193
+
1194
+ .sw-pinterest:before {
1195
+ content: "b";
1196
+ }
1197
+
1198
+ .sw-twitter:before {
1199
+ content: "s";
1200
+ }
1201
+
1202
+ .sw-facebook:before {
1203
+ content: "j";
1204
+ }
1205
+
1206
+ .sw-linkedin:before {
1207
+ content: "f";
1208
+ }
1209
+
1210
+ .sw-tumblr:before {
1211
+ content: "r";
1212
+ }
1213
+
1214
+ .sw-stumbleupon:before {
1215
+ content: "q";
1216
+ }
1217
+
1218
+ .sw-reddit:before {
1219
+ content: "a";
1220
+ }
1221
+
1222
+ .sw-email:before {
1223
+ content: "k";
1224
+ }
1225
+
1226
+ .sw-yummly:before {
1227
+ content: "x";
1228
+ }
1229
+
1230
+ .sw-whatsapp:before {
1231
+ content: "y";
1232
+ }
1233
+
1234
+ .sw-pocket:before {
1235
+ content: "B";
1236
+ }
1237
+
1238
+ .sw-buffer:before {
1239
+ content: "z";
1240
+ }
1241
+
1242
+ .sw-hacker_news:before {
1243
+ content: "D";
1244
+ }
1245
+
1246
+ .sw-flipboard:before {
1247
+ content: "C";
1248
+ }
1249
+
1250
+ .sw-social-warfare:before {
1251
+ content: "p";
1252
+ }
1253
+
1254
+ .swp_CTT {
1255
+ text-decoration: none!important;
1256
+ }
1257
+
1258
+ .sw-tweet-clear {
1259
+ zoom: 1;
1260
+ }
1261
+
1262
+ .sw-tweet-clear:after {
1263
+ clear: both;
1264
+ content: ".";
1265
+ display: block;
1266
+ height: 0;
1267
+ visibility: hidden;
1268
+ }
1269
+
1270
+ .sw-click-to-tweet {
1271
+ display: block;
1272
+ margin: 15px 0;
1273
+ padding: 15px 30px;
1274
+ position: relative;
1275
+ }
1276
+
1277
+ .sw-click-to-tweet:after {
1278
+ clear: both;
1279
+ content: ".";
1280
+ display: block;
1281
+ height: 0;
1282
+ line-height: 0;
1283
+ visibility: hidden;
1284
+ }
1285
+
1286
+ .sw-click-to-tweet .sw-ctt-text {
1287
+ margin: 0 0 10px;
1288
+ padding: 0;
1289
+ position: relative;
1290
+ word-wrap: break-word;
1291
+ }
1292
+
1293
+ a .sw-click-to-tweet .sw-ctt-text {
1294
+ display: block;
1295
+ font-size: 24px;
1296
+ font-weight: 500;
1297
+ line-height: 140%;
1298
+ margin: 0;
1299
+ padding: 0;
1300
+ position: relative;
1301
+ text-decoration: none;
1302
+ text-transform: none;
1303
+ }
1304
+
1305
+ .sw-click-to-tweet .sw-ctt-btn {
1306
+ display: block;
1307
+ float: right;
1308
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
1309
+ font-size: 12px;
1310
+ font-weight: bold;
1311
+ line-height: 100%;
1312
+ margin: 10px 0 0;
1313
+ padding: 3px 5px 3px 3px;
1314
+ position: relative;
1315
+ text-decoration: none;
1316
+ text-transform: uppercase;
1317
+ }
1318
+
1319
+ .sw-click-to-tweet i.sw-twitter {
1320
+ float: right;
1321
+ font-size: 21px;
1322
+ margin-left: 15px;
1323
+ margin-top: 2px;
1324
+ text-transform: none;
1325
+ }
1326
+
1327
+ a.swp_CTT.style1 .sw-click-to-tweet {
1328
+ background-color: #fff;
1329
+ border: 1px solid #ddd;
1330
+ -webkit-border-radius: 4px;
1331
+ border-radius: 4px;
1332
+ }
1333
+
1334
+ a.swp_CTT.style2 .sw-click-to-tweet {
1335
+ background-color: #fff;
1336
+ border: 4px double #ddd;
1337
+ -webkit-border-radius: 0;
1338
+ border-radius: 0;
1339
+ }
1340
+
1341
+ a.style2 .sw-click-to-tweet .sw-ctt-text {
1342
+ color: #666;
1343
+ font-style: italic;
1344
+ text-decoration: none;
1345
+ }
1346
+
1347
+ a.swp_CTT.style3:hover .sw-click-to-tweet {
1348
+ border-left: 10px solid #3c87b2;
1349
+ padding-right: 20px;
1350
+ -webkit-transition: all 0.25s linear;
1351
+ transition: all 0.25s linear;
1352
+ }
1353
+
1354
+ a.swp_CTT.style3 .sw-click-to-tweet {
1355
+ background-color: #429cd6;
1356
+ border: none;
1357
+ border-left: 10px solid #429cd6;
1358
+ -webkit-border-radius: 0;
1359
+ border-radius: 0;
1360
+ padding-right: 20px;
1361
+ -webkit-transition: all 0.25s linear;
1362
+ transition: all 0.25s linear;
1363
+ }
1364
+
1365
+ a.style3 .sw-click-to-tweet .sw-ctt-text {
1366
+ color: #fff;
1367
+ font-style: italic;
1368
+ text-decoration: none;
1369
+ }
1370
+
1371
+ a.swp_CTT.style4:hover .sw-click-to-tweet {
1372
+ border-left: 10px solid #3c87b2;
1373
+ -webkit-transition: all 0.25s linear;
1374
+ transition: all 0.25s linear;
1375
+ }
1376
+
1377
+ a.swp_CTT.style4 .sw-click-to-tweet {
1378
+ background-color: #333;
1379
+ border-left: 10px solid #c33;
1380
+ -webkit-border-radius: 0;
1381
+ border-radius: 0;
1382
+ -webkit-transition: all 0.25s linear;
1383
+ transition: all 0.25s linear;
1384
+ }
1385
+
1386
+ a.swp_CTT.style5:hover .sw-click-to-tweet {
1387
+ background-color: #d34250;
1388
+ border-left: 10px solid #30394f;
1389
+ -webkit-transition: all 0.25s linear;
1390
+ transition: all 0.25s linear;
1391
+ }
1392
+
1393
+ a.swp_CTT.style5 .sw-click-to-tweet {
1394
+ background-color: #30394f;
1395
+ border-left: 10px solid #d34250;
1396
+ -webkit-border-radius: 0;
1397
+ border-radius: 0;
1398
+ -webkit-transition: all 0.25s linear;
1399
+ transition: all 0.25s linear;
1400
+ }
1401
+
1402
+ a.swp_CTT.style6:hover .sw-click-to-tweet {
1403
+ background-color: #ced3dc;
1404
+ border-left: 10px solid #d34250;
1405
+ -webkit-transition: all 0.25s linear;
1406
+ transition: all 0.25s linear;
1407
+ }
1408
+
1409
+ a.swp_CTT.style6 .sw-click-to-tweet {
1410
+ background-color: #eee;
1411
+ border-left: 10px solid #d34250;
1412
+ -webkit-border-radius: 0;
1413
+ border-radius: 0;
1414
+ -webkit-transition: all 0.25s linear;
1415
+ transition: all 0.25s linear;
1416
+ }
1417
+
1418
+ a.style6 .sw-click-to-tweet i.sw-twitter {
1419
+ color: #30394f;
1420
+ }
1421
+
1422
+ .swp_pop_thumb {
1423
+ -webkit-border-radius: 3px;
1424
+ border-radius: 3px;
1425
+ float: left;
1426
+ height: 100px;
1427
+ margin: 5px 25px 5px 0;
1428
+ width: 100px;
1429
+ }
1430
+
1431
+ .swp_popular_post {
1432
+ clear: both;
1433
+ }
1434
+
1435
+ .swp_clearfix:after {
1436
+ clear: both;
1437
+ content: " ";
1438
+ display: block;
1439
+ height: 0;
1440
+ visibility: hidden;
1441
+ }
1442
+
1443
+ .swp_popular_post a.swp_popularity {
1444
+ border: none;
1445
+ display: block;
1446
+ line-height: 1.5;
1447
+ margin: 20px 0;
1448
+ }
1449
+
1450
+ span.swp_pop_count {
1451
+ display: block;
1452
+ font-size: 70%;
1453
+ }
1454
+
1455
+ .swp_widget_box {
1456
+ -webkit-border-radius: 3px;
1457
+ border-radius: 3px;
1458
+ }
1459
+
1460
+ div.sw-pinit {
1461
+ display: table !important;
1462
+ line-height: 0;
1463
+ position: relative !important;
1464
+ }
1465
+
1466
+ div.sw-pinit a.sw-pinit-button,
1467
+ div.sw-pinit a.sw-pinit-button:visited {
1468
+ background: #cd2029;
1469
+ border: 1px solid #aa1b29;
1470
+ -webkit-border-radius: 4px;
1471
+ border-radius: 4px;
1472
+ color: #fff;
1473
+ font-size: 20px;
1474
+ height: 50px;
1475
+ line-height: 45px;
1476
+ opacity: 0;
1477
+ padding: 0 30px;
1478
+ position: absolute;
1479
+ text-decoration: none;
1480
+ -webkit-transition: opacity 0.5s;
1481
+ transition: opacity 0.5s;
1482
+ z-index: 200;
1483
+ }
1484
+
1485
+ div.sw-pinit:hover a.sw-pinit-button,
1486
+ div.sw-pinit:focus a.sw-pinit-button {
1487
+ opacity: 1;
1488
+ }
1489
+
1490
+ div.sw-pinit a.sw-pinit-button::before {
1491
+ color: #fff;
1492
+ content: "b";
1493
+ float: left;
1494
+ font-family: sw-icon-font;
1495
+ font-size: 24px;
1496
+ font-weight: normal;
1497
+ line-height: 50px;
1498
+ margin-left: -5px;
1499
+ margin-right: 10px;
1500
+ }
1501
+
1502
+ div.sw-pinit a.sw-pinit-button:hover::before {
1503
+ content: "F";
1504
+ }
1505
+
1506
+ div.sw-pinit a.sw-pinit-button::hover,
1507
+ div.sw-pinit a.sw-pinit-button::focus {
1508
+ background: #aa1b29;
1509
+ color: #fff;
1510
+ text-decoration: none;
1511
+ }
1512
+
1513
+ div.sw-pinit .sw-pinit-left {
1514
+ left: 30px;
1515
+ }
1516
+
1517
+ div.sw-pinit .sw-pinit-center {
1518
+ margin-left: -60px;
1519
+ left: 50%;
1520
+ }
1521
+
1522
+ div.sw-pinit .sw-pinit-right {
1523
+ right: 30px;
1524
+ }
1525
+
1526
+ div.sw-pinit .sw-pinit-top {
1527
+ top: 30px;
1528
+ }
1529
+
1530
+ div.sw-pinit .sw-pinit-middle {
1531
+ margin-top: -25px;
1532
+ top: 50%;
1533
+ }
1534
+
1535
+ div.sw-pinit .sw-pinit-bottom {
1536
+ bottom: 30px;
1537
+ }
1538
+
1539
+ .nc_socialPanel.notMobile .nc_tweetContainer:nth-last-child(1),
1540
+ .mobile .nc_tweetContainer:nth-last-child(2),
1541
+ .nc_tweetContainer.totes:nth-last-child(1) {
1542
+ margin-right: 0;
1543
+ }
1544
+
1545
+ .nc_socialPanel.swp_d_fullColor a,
1546
+ html body .nc_socialPanel.swp_i_fullColor .nc_tweetContainer:hover a,
1547
+ body .nc_socialPanel.swp_o_fullColor:hover a,
1548
+ .nc_socialPanel.swp_d_lightGray a,
1549
+ html body .nc_socialPanel.swp_i_lightGray .nc_tweetContainer:hover a,
1550
+ body .nc_socialPanel.swp_o_lightGray:hover a,
1551
+ .nc_socialPanel.swp_d_mediumGray a,
1552
+ html body .nc_socialPanel.swp_i_mediumGray a:hover,
1553
+ body .nc_socialPanel.swp_o_mediumGray:hover a,
1554
+ .nc_socialPanel.swp_d_darkGray a,
1555
+ html body .nc_socialPanel.swp_i_darkGray a:hover,
1556
+ body .nc_socialPanel.swp_o_darkGray:hover a {
1557
+ color: white;
1558
+ }
1559
+
1560
+ .nc_socialPanel.swp_d_colorOutlines .twitter a,
1561
+ html body .nc_socialPanel.swp_i_colorOutlines .twitter a:hover,
1562
+ body .nc_socialPanel.swp_o_colorOutlines:hover .twitter a,
1563
+ .wp-editor-container .sw-twitter:before,
1564
+ a.style1 .sw-click-to-tweet i.sw-twitter,
1565
+ a.style2 .sw-click-to-tweet i.sw-twitter {
1566
+ color: #429cd6;
1567
+ }
1568
+
1569
+ .nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes) .swp_hide span.swp_share,
1570
+ .nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes):hover span.swp_share:not(.swp_hide) {
1571
+ opacity: 1;
1572
+ }
1573
+
1574
+ .nc_socialPanel.mobile .iconFiller ~ .swp_count,
1575
+ .sw-content-locator {
1576
+ display: none;
1577
+ }
1578
+
1579
+ a.style1 .sw-click-to-tweet .sw-ctt-text,
1580
+ a.style1 .sw-click-to-tweet .sw-ctt-btn {
1581
+ color: #999;
1582
+ text-decoration: none;
1583
+ }
1584
+
1585
+ a.style1:hover .sw-click-to-tweet .sw-ctt-text,
1586
+ a.style1:hover .sw-click-to-tweet .sw-ctt-btn,
1587
+ a.style2:hover .sw-click-to-tweet .sw-ctt-text,
1588
+ a.style2 .sw-click-to-tweet .sw-ctt-btn,
1589
+ a.style2:hover .sw-click-to-tweet .sw-ctt-btn {
1590
+ color: #666;
1591
+ text-decoration: none;
1592
+ }
1593
+
1594
+ a.style3:hover .sw-click-to-tweet .sw-ctt-text,
1595
+ a.style3 .sw-click-to-tweet .sw-ctt-btn,
1596
+ a.style3:hover .sw-click-to-tweet .sw-ctt-btn,
1597
+ a.style3 .sw-click-to-tweet i.sw-twitter,
1598
+ a.style4 .sw-click-to-tweet .sw-ctt-text,
1599
+ a.style4:hover .sw-click-to-tweet .sw-ctt-text,
1600
+ a.style4 .sw-click-to-tweet .sw-ctt-btn,
1601
+ a.style4:hover .sw-click-to-tweet .sw-ctt-btn,
1602
+ a.style5 .sw-click-to-tweet .sw-ctt-text,
1603
+ a.style5:hover .sw-click-to-tweet .sw-ctt-text,
1604
+ a.style5 .sw-click-to-tweet .sw-ctt-btn,
1605
+ a.style5:hover .sw-click-to-tweet .sw-ctt-btn {
1606
+ color: #fff;
1607
+ text-decoration: none;
1608
+ }
1609
+
1610
+ a.style4 .sw-click-to-tweet i.sw-twitter,
1611
+ a.style5 .sw-click-to-tweet i.sw-twitter {
1612
+ color: #fff;
1613
+ }
1614
+
1615
+ a.style6 .sw-click-to-tweet .sw-ctt-text,
1616
+ a.style6 .sw-click-to-tweet .sw-ctt-btn {
1617
+ color: #30394f;
1618
+ text-decoration: none;
1619
+ }
1620
+
1621
+ a.style6:hover .sw-click-to-tweet .sw-ctt-text,
1622
+ a.style6:hover .sw-click-to-tweet .sw-ctt-btn,
1623
+ a.style6:hover .sw-click-to-tweet i.sw-twitter {
1624
+ color: #2a2d34;
1625
+ text-decoration: none;
1626
+ }
1627
+
1628
+ .scale-70 {
1629
+ -ms-transform: scale(0.7);
1630
+ -webkit-transform: scale(0.7);
1631
+ transform: scale(0.7);
1632
+ }
1633
+
1634
+ .nc_socialPanel:not(.nc_floater).scale-70.scale-fullWidth {
1635
+ width: 142.8571428571429%!important;
1636
+ }
1637
+
1638
+ .scale-80 {
1639
+ -ms-transform: scale(0.8);
1640
+ -webkit-transform: scale(0.8);
1641
+ transform: scale(0.8);
1642
+ }
1643
+
1644
+ .nc_socialPanel:not(.nc_floater).scale-80.scale-fullWidth {
1645
+ width: 125%!important;
1646
+ }
1647
+
1648
+ .scale-90 {
1649
+ -ms-transform: scale(0.9);
1650
+ -webkit-transform: scale(0.9);
1651
+ transform: scale(0.9);
1652
+ }
1653
+
1654
+ .nc_socialPanel:not(.nc_floater).scale-90.scale-fullWidth {
1655
+ width: 111.111111111111%!important;
1656
+ }
1657
+
1658
+ .scale-110 {
1659
+ -ms-transform: scale(1.1);
1660
+ -webkit-transform: scale(1.1);
1661
+ transform: scale(1.1);
1662
+ }
1663
+
1664
+ .nc_socialPanel:not(.nc_floater).scale-110.scale-fullWidth {
1665
+ width: 90.90909090909091%!important;
1666
+ }
1667
+
1668
+ .scale-120 {
1669
+ -ms-transform: scale(1.2);
1670
+ -webkit-transform: scale(1.2);
1671
+ transform: scale(1.2);
1672
+ }
1673
+
1674
+ .nc_socialPanel:not(.nc_floater).scale-120.scale-fullWidth {
1675
+ width: 83.33333333333333%!important;
1676
+ }
1677
+
1678
+ .scale-130 {
1679
+ -ms-transform: scale(1.3);
1680
+ -webkit-transform: scale(1.3);
1681
+ transform: scale(1.3);
1682
+ }
1683
+
1684
+ .nc_socialPanel:not(.nc_floater).scale-130.scale-fullWidth {
1685
+ width: 76.92307692307692%!important;
1686
+ }
1687
+
1688
+ .scale-140 {
1689
+ -ms-transform: scale(1.4);
1690
+ -webkit-transform: scale(1.4);
1691
+ transform: scale(1.4);
1692
+ }
1693
+
1694
+ .nc_socialPanel:not(.nc_floater).scale-140.scale-fullWidth {
1695
+ width: 71.42857142857143%!important;
1696
+ }
1697
+
1698
+ .scale-fullWidth,
1699
+ .scale-left,
1700
+ .nc_floater.scale-center,
1701
+ .nc_floater.scale-right {
1702
+ -ms-transform-origin: left;
1703
+ -webkit-transform-origin: left;
1704
+ transform-origin: left;
1705
+ }
1706
+
1707
+ .scale-right {
1708
+ -ms-transform-origin: right;
1709
+ -webkit-transform-origin: right;
1710
+ transform-origin: right;
1711
+ }
1712
+
1713
+ .scale-center {
1714
+ -ms-transform-origin: center;
1715
+ -webkit-transform-origin: center;
1716
+ transform-origin: center;
1717
+ }
1718
+
1719
+ div.nc_socialPanel .nc_tweetContainer.swp_emphasize {
1720
+ -webkit-box-flex: 2;
1721
+ -moz-box-flex: 2;
1722
+ -webkit-flex: 2;
1723
+ -ms-flex: 2;
1724
+ flex: 2;
1725
+ }
1726
+
1727
+ div.nc_socialPanel .nc_tweetContainer.swp_whatsapp:not(.mobile) {
1728
+ display: none;
1729
+ }
1730
+
1731
+ .sw-pinit.aligncenter {
1732
+ margin: 0 auto;
1733
+ }
1734
+
1735
+ @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
1736
+ div.sw-pinit {
1737
+ display: inline-block!important;
1738
+ max-width: 100%;
1739
+ }
1740
+ }
css/style.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .nc_socialPanel{clear:both;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;height:30px;line-height:1;margin-bottom:20px!important;margin-top:20px!important;padding:0;-webkit-align-content:center;align-content:center;-webkit-align-items:stretch;align-items:stretch;-webkit-box-align:stretch;-moz-box-align:stretch;-webkit-box-pack:justify;-moz-box-pack:justify;-ms-flex-align:stretch;-ms-flex-line-pack:center;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.nc_socialPanel:not(.nc_floater):not(.nc_socialPanelSide){width:100%!important}.nc_wrapper .nc_socialPanel{margin-bottom:10px!important;margin-top:10px!important}div.nc_socialPanel .nc_tweetContainer{-webkit-border-radius:2px;border-radius:2px;cursor:pointer;float:left;font-family:Lato;height:32px;margin:0 5px;overflow:hidden;text-align:center;-webkit-transition:all .1s linear;transition:all .1s linear;border-size:1px}div.nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.nc_socialPanel .nc_tweetContainer a.nc_tweet,.nc_socialPanel .totes .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}.nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer:nth-child(1){margin-left:0}.nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer:nth-last-child(1){margin-right:0}.nc_socialPanel 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}.nc_socialPanel .totes .swp_count,span.swp_share{line-height:30px}.nc_socialPanel a .swp_count.swp_hide{margin:0 auto}.nc_socialPanel span:before{content:initial!important}.nc_socialPanel span.swp_count{font-size:14px}.nc_socialPanel span.iconFiller{font-size:18px;margin:0 auto}.nc_socialPanel.notMobile .nc_tweetContainer:nth-child(1){margin-left:0}.nc_socialPanel:not(.nc_socialPanelSide){-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.nc_socialPanel:not(.nc_socialPanelSide) div.totes.totesalt:nth-child(1){margin-left:0;margin-right:15px;padding-left:0}.nc_socialPanel:not(.nc_socialPanelSide) div.totes.totesalt: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}.nc_socialPanelSide span.swp_share{margin:0}.nc_socialPanel .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}.nc_socialPanel .iconFiller{width:30px}span.spaceManWilly{display:block;width:120px}.nc_socialPanel .totes{background:#c4c4c4;border:1px solid #e08a0f;-webkit-border-radius:2px;border-radius:2px;color:#fff;cursor:default;display:block;font-size:19px;padding:0 10px;-webkit-box-flex:0!important;-moz-box-flex:0!important;-webkit-flex:none!important;-ms-flex:none!important;flex:none!important}.nc_socialPanel div.totes.totesalt,.nc_socialPanel:hover div.totes.totesalt:not(:nth-child(1)){background:0 0!important;border:none;color:#474b4d;margin-left:0!important}div.nc_socialPanel:hover div.totes.totesalt:not(:nth-child(1)){background:0 0;color:#474b4d;margin-left:10px}.nc_socialPanel .totes.totesalt .swp_label{color:#474b4d;font-size:10px;vertical-align:middle}.nc_socialPanel .totes .swp_label{font-size:10px;vertical-align:middle}.nc_socialPanel .totes.totesalt .swp_count{color:#474b4d;font-size:24px}.nc_socialPanel.swp_customFull:hover div.totes,.nc_socialPanel.swp_fade .totes,.nc_socialPanel.swp_fullColor .totes,.nc_socialPanel:hover .totes{background:#e08a0f}.nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer.totes.totesalt:before{content:"o";display:inline-block;font-family:sw-icon-font;margin-top:7px;vertical-align:top}.nc_socialPanel:not(.nc_socialPanelSide) .totes.totesalt .swp_count{display:inline-block;line-height:0;margin-left:10px;margin-top:12px;min-width:35px;vertical-align:middle}span.swp_label{display:block;font-size:9px!important;margin-top:13px;position:absolute;text-align:center!important;text-transform:uppercase}.nc_socialPanelSide span.swp_label{margin-top:0}.nc_socialPanel.swp_leaf .nc_tweetContainer{-webkit-border-radius:15px 0;border-radius:15px 0;border-width:1px}.nc_socialPanel.swp_pill .nc_tweetContainer{-webkit-border-radius:50px;border-radius:50px;border-width:1px}.nc_socialPanel.swp_shift .nc_tweetContainer:not(.totes){border-width:1px;-moz-transform:skew(-25deg);-o-transform:skew(-25deg);-webkit-transform:skew(-25deg)}.nc_socialPanel.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}.nc_socialPanel.swp_flatFresh.swp_d_fullColor .googlePlus,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .googlePlus:not(:hover),html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .googlePlus:hover{border:1px solid #df4b37}.nc_socialPanel.swp_flatFresh.swp_d_fullColor .twitter,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .twitter:not(:hover),html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .twitter:hover{border:1px solid #429cd6}.nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_fb,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_fb:not(:hover),html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_fb:hover{border:1px solid #3a589e}.nc_socialPanel.swp_flatFresh.swp_d_fullColor .nc_pinterest,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .nc_pinterest:not(:hover),html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .nc_pinterest:hover{border:1px solid #cd2029}.nc_socialPanel.swp_flatFresh.swp_d_fullColor .linkedIn,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .linkedIn:not(:hover),html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .linkedIn:hover{border:1px solid #0d77b7}.nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_tumblr,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_tumblr:not(:hover),html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_tumblr:hover{border:1px solid #39475d}.nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_stumbleupon,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_stumbleupon:not(:hover),html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_stumbleupon:hover{border:1px solid #ef5025}.nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_yummly,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_yummly:not(:hover),html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_yummly:hover{border:1px solid #e26426}.nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_reddit,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_reddit:not(:hover),html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_reddit:hover{border:1px solid #f04b23}.nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_email,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_email:not(:hover),html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_email:hover{border:1px solid #6bcce9}.nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_whatsapp,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_whatsapp:not(:hover),html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_whatsapp:hover{border:1px solid #71c169}.nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_pocket,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_pocket:not(:hover),html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_pocket:hover{border:1px solid #ef4056}.nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_buffer,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_buffer:not(:hover),html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_buffer:hover{border:1px solid #323b43}.nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_hacker_news,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_hacker_news:not(:hover),html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_hacker_news:hover{border:1px solid #d85623}.nc_socialPanel.swp_flatFresh.swp_d_fullColor .swp_flipboard,body .nc_socialPanel.swp_flatFresh.swp_o_fullColor:hover .swp_flipboard:not(:hover),html body .nc_socialPanel.swp_flatFresh.swp_i_fullColor .swp_flipboard:hover{border:1px solid #bf2626}.nc_socialPanel.swp_d_fullColor .googlePlus,body .nc_socialPanel.swp_o_fullColor:hover .googlePlus,html body .nc_socialPanel.swp_i_fullColor .googlePlus:hover{background:#df4b37;border:1px solid #c44133}.nc_socialPanel.swp_d_fullColor .twitter,body .nc_socialPanel.swp_o_fullColor:hover .twitter,html body .nc_socialPanel.swp_i_fullColor .twitter:hover{background:#429cd6;border:1px solid #3c87b2}.nc_socialPanel.swp_d_fullColor .swp_fb,body .nc_socialPanel.swp_o_fullColor:hover .swp_fb,html body .nc_socialPanel.swp_i_fullColor .swp_fb:hover{background:#3a589e;border:1px solid #2e4675}.nc_socialPanel.swp_d_fullColor .nc_pinterest,body .nc_socialPanel.swp_o_fullColor:hover .nc_pinterest,html body .nc_socialPanel.swp_i_fullColor .nc_pinterest:hover{background:#cd2029;border:1px solid #aa1b29}.nc_socialPanel.swp_d_fullColor .linkedIn,body .nc_socialPanel.swp_o_fullColor:hover .linkedIn,html body .nc_socialPanel.swp_i_fullColor .linkedIn:hover{background:#0d77b7;border:1px solid #0c6591}.nc_socialPanel.swp_d_fullColor .swp_tumblr,body .nc_socialPanel.swp_o_fullColor:hover .swp_tumblr,html body .nc_socialPanel.swp_i_fullColor .swp_tumblr:hover{background:#39475d;border:1px solid #27313f}.nc_socialPanel.swp_d_fullColor .swp_stumbleupon,body .nc_socialPanel.swp_o_fullColor:hover .swp_stumbleupon,html body .nc_socialPanel.swp_i_fullColor .swp_stumbleupon:hover{background:#ef5025;border:1px solid #d34427}.nc_socialPanel.swp_d_fullColor .swp_yummly,body .nc_socialPanel.swp_o_fullColor:hover .swp_yummly,html body .nc_socialPanel.swp_i_fullColor .swp_yummly:hover{background:#e26426;border:1px solid #b65027}.nc_socialPanel.swp_d_fullColor .swp_reddit,body .nc_socialPanel.swp_o_fullColor:hover .swp_reddit,html body .nc_socialPanel.swp_i_fullColor .swp_reddit:hover{background:#f04b23;border:1px solid #d33f27}.nc_socialPanel.swp_d_fullColor .swp_email,body .nc_socialPanel.swp_o_fullColor:hover .swp_email,html body .nc_socialPanel.swp_i_fullColor .swp_email:hover{background:#6bcce9;border:1px solid #61bace}.nc_socialPanel.swp_d_fullColor .swp_whatsapp,body .nc_socialPanel.swp_o_fullColor:hover .swp_whatsapp,html body .nc_socialPanel.swp_i_fullColor .swp_whatsapp:hover{background:#71c169;border:1px solid #28b04b}.nc_socialPanel.swp_d_fullColor .swp_pocket,body .nc_socialPanel.swp_o_fullColor:hover .swp_pocket,html body .nc_socialPanel.swp_i_fullColor .swp_pocket:hover{background:#ef4056;border:1px solid #ce3d55}.nc_socialPanel.swp_d_fullColor .swp_buffer,body .nc_socialPanel.swp_o_fullColor:hover .swp_buffer,html body .nc_socialPanel.swp_i_fullColor .swp_buffer:hover{background:#323b43;border:1px solid #000}.nc_socialPanel.swp_d_fullColor .swp_hacker_news,body .nc_socialPanel.swp_o_fullColor:hover .swp_hacker_news,html body .nc_socialPanel.swp_i_fullColor .swp_hacker_news:hover{background:#f16522;border:1px solid #d85623}.nc_socialPanel.swp_d_fullColor .swp_flipboard,body .nc_socialPanel.swp_o_fullColor:hover .swp_flipboard,html body .nc_socialPanel.swp_i_fullColor .swp_flipboard:hover{background:#e02828;border:1px solid #bf2626}.nc_socialPanel.swp_threeDee.swp_d_fullColor .googlePlus,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .googlePlus,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .googlePlus:hover{border-bottom:3px solid #c44133}.nc_socialPanel.swp_threeDee.swp_d_fullColor .twitter,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .twitter,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .twitter:hover{border-bottom:3px solid #5595bc}.nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_fb,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_fb,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_fb:hover{border-bottom:3px solid #2e4675}.nc_socialPanel.swp_threeDee.swp_d_fullColor .nc_pinterest,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .nc_pinterest,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .nc_pinterest:hover{border-bottom:3px solid #aa1b29}.nc_socialPanel.swp_threeDee.swp_d_fullColor .linkedIn,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .linkedIn,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .linkedIn:hover{border-bottom:3px solid #0c6591}.nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_tumblr,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_tumblr,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_tumblr:hover{border-bottom:3px solid #27313f}.nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_stumbleupon,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_stumbleupon,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_stumbleupon:hover{border-bottom:3px solid #d34427}.nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_yummly,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_yummly,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_yummly:hover{border-bottom:3px solid #b65027}.nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_reddit,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_reddit,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_reddit:hover{border-bottom:3px solid #d33f27}.nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_email,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_email,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_email:hover{border-bottom:3px solid #61bace}.nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_whatsapp,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_whatsapp,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_whatsapp:hover{border-bottom:3px solid #28b04b}.nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_pocket,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_pocket,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_pocket:hover{border-bottom:3px solid #ce3d55}.nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_buffer,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_buffer,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_buffer:hover{border-bottom:3px solid #000}.nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_hacker_news,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_hacker_news,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_hacker_news:hover{border-bottom:3px solid #d85623}.nc_socialPanel.swp_threeDee.swp_d_fullColor .swp_flipboard,body .nc_socialPanel.swp_threeDee.swp_o_fullColor:hover .swp_flipboard,html body .nc_socialPanel.swp_threeDee.swp_i_fullColor .swp_flipboard:hover{border-bottom:3px solid #bf2626}.nc_socialPanel.swp_d_lightGray .nc_tweetContainer,body .nc_socialPanel.swp_o_lightGray:hover .nc_tweetContainer,html body .nc_socialPanel.swp_i_lightGray .nc_tweetContainer:hover{background-color:#ccc;border:1px solid #ccc}.nc_socialPanel.swp_threeDee.swp_d_lightGray .nc_tweetContainer:not(.totesalt),body .nc_socialPanel.swp_threeDee.swp_o_lightGray:hover .nc_tweetContainer:not(.totesalt),html body .nc_socialPanel.swp_threeDee.swp_i_lightGray .nc_tweetContainer:not(.totesalt):hover{border-bottom:3px solid #999}.nc_socialPanel.swp_d_mediumGray .nc_tweetContainer,body .nc_socialPanel.swp_o_mediumGray:hover .nc_tweetContainer,html body .nc_socialPanel.swp_i_mediumGray .nc_tweetContainer:hover{background-color:#999;border:1px solid #999}.nc_socialPanel.swp_threeDee.swp_d_mediumGray .nc_tweetContainer:not(.totesalt),body .nc_socialPanel.swp_threeDee.swp_o_mediumGray:hover .nc_tweetContainer:not(.totesalt),html body .nc_socialPanel.swp_threeDee.swp_i_mediumGray .nc_tweetContainer:not(.totesalt):hover{border-bottom:3px solid #444}.nc_socialPanel.swp_d_darkGray .nc_tweetContainer,body .nc_socialPanel.swp_o_darkGray:hover .nc_tweetContainer,html body .nc_socialPanel.swp_i_darkGray .nc_tweetContainer:hover{background-color:#444;border:1px solid #444}.nc_socialPanel.swp_threeDee.swp_d_darkGray .nc_tweetContainer:not(.totesalt),body .nc_socialPanel.swp_threeDee.swp_o_darkGray:hover .nc_tweetContainer:not(.totesalt),html body .nc_socialPanel.swp_threeDee.swp_i_darkGray .nc_tweetContainer:not(.totesalt):hover{border-bottom:3px solid #222}.nc_socialPanel.swp_d_lgOutlines a,body .nc_socialPanel.swp_o_lgOutlines:hover a,html body .nc_socialPanel.swp_i_lgOutlines a:hover{color:#ccc}.nc_socialPanel.swp_d_lgOutlines .nc_tweetContainer,body .nc_socialPanel.swp_o_lgOutlines:hover .nc_tweetContainer,html body .nc_socialPanel.swp_i_lgOutlines .nc_tweetContainer:hover{background:0 0;border:1px solid #ccc}.nc_socialPanel.swp_d_mdOutlines a,body .nc_socialPanel.swp_o_mdOutlines:hover a,html body .nc_socialPanel.swp_i_mdOutlines a:hover{color:#999}.nc_socialPanel.swp_d_mdOutlines .nc_tweetContainer,body .nc_socialPanel.swp_o_mdOutlines:hover .nc_tweetContainer,html body .nc_socialPanel.swp_i_mdOutlines .nc_tweetContainer:hover{background:0 0;border:1px solid #999}.nc_socialPanel.swp_d_dgOutlines a,body .nc_socialPanel.swp_o_dgOutlines:hover a,html body .nc_socialPanel.swp_i_dgOutlines a:hover{color:#444}.nc_socialPanel.swp_d_dgOutlines .nc_tweetContainer,body .nc_socialPanel.swp_o_dgOutlines:hover .nc_tweetContainer,html body .nc_socialPanel.swp_i_dgOutlines .nc_tweetContainer:hover{background:0 0;border:1px solid #444}.nc_socialPanel.swp_d_colorOutlines .googlePlus a,body .nc_socialPanel.swp_o_colorOutlines:hover .googlePlus a,html body .nc_socialPanel.swp_i_colorOutlines .googlePlus a:hover{color:#df4b37}.nc_socialPanel.swp_d_colorOutlines .swp_fb a,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_fb a,html body .nc_socialPanel.swp_i_colorOutlines .swp_fb a:hover{color:#3a589e}.nc_socialPanel.swp_d_colorOutlines .nc_pinterest a,body .nc_socialPanel.swp_o_colorOutlines:hover .nc_pinterest a,html body .nc_socialPanel.swp_i_colorOutlines .nc_pinterest a:hover{color:#cd2029}.nc_socialPanel.swp_d_colorOutlines .linkedIn a,body .nc_socialPanel.swp_o_colorOutlines:hover .linkedIn a,html body .nc_socialPanel.swp_i_colorOutlines .linkedIn a:hover{color:#0d77b7}.nc_socialPanel.swp_d_colorOutlines .swp_tumblr a,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_tumblr a,html body .nc_socialPanel.swp_i_colorOutlines .swp_tumblr a:hover{color:#39475d}.nc_socialPanel.swp_d_colorOutlines .swp_stumbleupon a,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_stumbleupon a,html body .nc_socialPanel.swp_i_colorOutlines .swp_stumbleupon a:hover{color:#ef5025}.nc_socialPanel.swp_d_colorOutlines .swp_yummly a,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_yummly a,html body .nc_socialPanel.swp_i_colorOutlines .swp_yummly a:hover{color:#e26426}.nc_socialPanel.swp_d_colorOutlines .swp_whatsapp a,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_whatsapp a,html body .nc_socialPanel.swp_i_colorOutlines .swp_whatsapp a:hover{color:#71c169}.nc_socialPanel.swp_d_colorOutlines .swp_pocket a,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_pocket a,html body .nc_socialPanel.swp_i_colorOutlines .swp_pocket a:hover{color:#ef4056}.nc_socialPanel.swp_d_colorOutlines .swp_reddit a,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_reddit a,html body .nc_socialPanel.swp_i_colorOutlines .swp_reddit a:hover{color:#f04b23}.nc_socialPanel.swp_d_colorOutlines .swp_email a,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_email a,html body .nc_socialPanel.swp_i_colorOutlines .swp_email a:hover{color:#6bcce9}.nc_socialPanel.swp_d_colorOutlines .swp_buffer a,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_buffer a,html body .nc_socialPanel.swp_i_colorOutlines .swp_buffer a:hover{color:#323b43}.nc_socialPanel.swp_d_colorOutlines .swp_hacker_news a,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_hacker_news a,html body .nc_socialPanel.swp_i_colorOutlines .swp_hacker_news a:hover{color:#f16522}.nc_socialPanel.swp_d_colorOutlines .swp_flipboard a,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_flipboard a,html body .nc_socialPanel.swp_i_colorOutlines .swp_flipboard a:hover{color:#e02828}.nc_socialPanel.swp_d_colorOutlines .googlePlus,body .nc_socialPanel.swp_o_colorOutlines:hover .googlePlus,html body .nc_socialPanel.swp_i_colorOutlines .googlePlus:hover{background:0 0;border:1px solid #df4b37}.nc_socialPanel.swp_d_colorOutlines .twitter,body .nc_socialPanel.swp_o_colorOutlines:hover .twitter,html body .nc_socialPanel.swp_i_colorOutlines .twitter:hover{background:0 0;border:1px solid #429cd6}.nc_socialPanel.swp_d_colorOutlines .swp_fb,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_fb,html body .nc_socialPanel.swp_i_colorOutlines .swp_fb:hover{background:0 0;border:1px solid #3a589e}.nc_socialPanel.swp_d_colorOutlines .nc_pinterest,body .nc_socialPanel.swp_o_colorOutlines:hover .nc_pinterest,html body .nc_socialPanel.swp_i_colorOutlines .nc_pinterest:hover{background:0 0;border:1px solid #cd2029}.nc_socialPanel.swp_d_colorOutlines .linkedIn,body .nc_socialPanel.swp_o_colorOutlines:hover .linkedIn,html body .nc_socialPanel.swp_i_colorOutlines .linkedIn:hover{background:0 0;border:1px solid #0d77b7}.nc_socialPanel.swp_d_colorOutlines .swp_tumblr,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_tumblr,html body .nc_socialPanel.swp_i_colorOutlines .swp_tumblr:hover{background:0 0;border:1px solid #39475d}.nc_socialPanel.swp_d_colorOutlines .swp_stumbleupon,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_stumbleupon,html body .nc_socialPanel.swp_i_colorOutlines .swp_stumbleupon:hover{background:0 0;border:1px solid #ef5025}.nc_socialPanel.swp_d_colorOutlines .swp_yummly,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_yummly,html body .nc_socialPanel.swp_i_colorOutlines .swp_yummly:hover{background:0 0;border:1px solid #e26426}.nc_socialPanel.swp_d_colorOutlines .swp_whatsapp,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_whatsapp,html body .nc_socialPanel.swp_i_colorOutlines .swp_whatsapp:hover{background:0 0;border:1px solid #71c169}.nc_socialPanel.swp_d_colorOutlines .swp_reddit,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_reddit,html body .nc_socialPanel.swp_i_colorOutlines .swp_reddit:hover{background:0 0;border:1px solid #f04b23}.nc_socialPanel.swp_d_colorOutlines .swp_email,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_email,html body .nc_socialPanel.swp_i_colorOutlines .swp_email:hover{background:0 0;border:1px solid #6bcce9}.nc_socialPanel.swp_d_colorOutlines .swp_pocket,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_pocket,html body .nc_socialPanel.swp_i_colorOutlines .swp_pocket:hover{background:0 0;border:1px solid #ef4056}.nc_socialPanel.swp_d_colorOutlines .swp_buffer,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_buffer,html body .nc_socialPanel.swp_i_colorOutlines .swp_buffer:hover{background:0 0;border:1px solid #323b43}.nc_socialPanel.swp_d_colorOutlines .swp_hacker_news,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_hacker_news,html body .nc_socialPanel.swp_i_colorOutlines .swp_hacker_news:hover{background:0 0;border:1px solid #f16522}.nc_socialPanel.swp_d_colorOutlines .swp_flipboard,body .nc_socialPanel.swp_o_colorOutlines:hover .swp_flipboard,html body .nc_socialPanel.swp_i_colorOutlines .swp_flipboard:hover{background:0 0;border:1px solid #bf2626}.nc_socialPanelSide{flex-direction:column;height:auto;overflow:visible;top:200px;-webkit-transition:all .2s linear;transition:all .2s linear;width:100px!important;z-index:9999999;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column}.nc_socialPanelSide.slide{position:fixed;left:-100px;-webkit-transition:all .2s linear;transition:all .2s linear}.nc_socialPanelSide.fade{display:none;position:fixed;left:5px;-webkit-transition:all .2s linear;transition:all .2s linear}.nc_socialPanelSide .nc_tweetContainer{background:#dd4b38;-webkit-border-radius:3px;border-radius:3px;clear:both;display:block;font-family:Lato,sans-serif;height:32px;margin:3px 0!important;overflow:hidden;padding:0;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:top;width:90px}.nc_socialPanelSide .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}.nc_socialPanelSide .nc_tweetContainer .swp_count{display:inline-block;font-size:14px;height:32px;line-height:35px;margin:0;overflow:hidden;padding:0;text-align:right;-webkit-transition:all .1s linear;transition:all .1s linear;vertical-align:top;width:0}.nc_socialPanelSide .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}.nc_socialPanelSide .nc_tweetContainer .sw,.nc_socialPanelSide .nc_tweetContainer .swp_share{float:left;line-height:34px}.nc_socialPanelSide.swp_default .nc_tweetContainer .sw{line-height:32px}.nc_socialPanelSide.swp_default .nc_tweetContainer .swp_share{line-height:30px}.nc_socialPanelSide .nc_tweetContainer .swp_share{font-size:13px}.nc_socialPanelSide .nc_tweetContainer:hover,.nc_socialPanelSide .nc_tweetContainer:hover .iconFiller,.nc_socialPanelSide .nc_tweetContainer:hover .swp_count{-webkit-transition:all .1s linear;transition:all .1s linear}.nc_socialPanelSide.swp_boxed{-ms-transform:scale(.9);-webkit-transform:scale(.9);transform:scale(.9)}.nc_socialPanelSide.swp_boxed .nc_tweetContainer{margin-bottom:5px}.nc_socialPanelSide.swp_boxed .nc_tweetContainer,.nc_socialPanelSide.swp_boxed .nc_tweetContainer a{height:75px;position:relative;width:75px}.nc_socialPanelSide.swp_boxed .nc_tweetContainer i.sw{font-size:27px;height:40px;margin:0;padding-top:10px;text-align:center;width:100%}.nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes) span.swp_share{height:35px;opacity:0;position:absolute;bottom:0;left:0;text-align:center;width:75px}.nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes) 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%}.nc_socialPanelSide.swp_boxed .nc_tweetContainer span.swp_hide .iconFiller,.nc_socialPanelSide.swp_boxed .nc_tweetContainer span.swp_hide .spaceManWilly,.nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes) span.swp_count.swp_hide{height:75px;opacity:1}.nc_socialPanelSide.swp_boxed .nc_tweetContainer span.iconFiller{height:40px;width:75px}.nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes):hover span.swp_count:not(.swp_hide){opacity:0}.nc_socialPanelSide.swp_boxed .totes{padding:0;width:75px!important}.nc_socialPanelSide .nc_tweetContainer:not(.totes){line-height:34px}.nc_socialPanelSide:not(.swp_boxed) .nc_tweetContainer:not(.totes) .iconFiller{margin-left:2px;width:30px}.nc_socialPanelSide .nc_tweetContainer:not(.totes) .swp_count{padding:0 8px;width:48px}.nc_socialPanelSide .nc_tweetContainer:not(.totes) .swp_count.swp_hide{padding:0;width:100%}.nc_socialPanelSide .nc_tweetContainer:not(.totes) .swp_hide .iconFiller{display:block;float:none;margin:0 auto}.nc_socialPanelSide:not(.swp_boxed) .nc_tweetContainer:not(.totes):hover{width:150px}.nc_socialPanelSide .nc_tweetContainer:not(.totes) .spaceManWilly,.nc_socialPanelSide .nc_tweetContainer:not(.totes):hover .iconFiller{width:90px}.nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes) .spaceManWilly,.nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes):hover .iconFiller{width:100%}.nc_socialPanelSide .nc_tweetContainer.totes{background:rgba(0,0,0,0);border:0!important;font-weight:800;height:45px;margin:0;padding:0;text-align:center;width:90px}.nc_socialPanelSide .nc_tweetContainer.totes .swp_count{color:#444;display:block;font-family:Lato,sans-serif;height:28px;text-align:center;width:100%}.nc_socialPanelSide .nc_tweetContainer.totes .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.floatBottom{bottom:0;left:0}.nc_wrapper.floatTop{top:0;left:0}.nc_floater{margin:10px 0;position:relative;left:304px;width:740px}.nc_socialPanelSide.hideCounts a{text-align:center}.nc_socialPanelSide.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;-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}.sw-google-plus:before{content:"h"}.sw-pinterest:before{content:"b"}.sw-twitter:before{content:"s"}.sw-facebook:before{content:"j"}.sw-linkedin:before{content:"f"}.sw-tumblr:before{content:"r"}.sw-stumbleupon:before{content:"q"}.sw-reddit:before{content:"a"}.sw-email:before{content:"k"}.sw-yummly:before{content:"x"}.sw-whatsapp:before{content:"y"}.sw-pocket:before{content:"B"}.sw-buffer:before{content:"z"}.sw-hacker_news:before{content:"D"}.sw-flipboard: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.sw-twitter{float:right;font-size:21px;margin-left:15px;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.sw-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}.nc_socialPanel.mobile .iconFiller~.swp_count,.sw-content-locator,div.nc_socialPanel .nc_tweetContainer.swp_whatsapp:not(.mobile){display:none}div.sw-pinit a.sw-pinit-button,div.sw-pinit a.sw-pinit-button:visited{background:#cd2029;border:1px solid #aa1b29;-webkit-border-radius:4px;border-radius:4px;color:#fff;font-size:20px;height:50px;line-height:45px;opacity:0;padding:0 30px;position:absolute;text-decoration:none;-webkit-transition:opacity .5s;transition:opacity .5s;z-index:200}.nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes) .swp_hide span.swp_share,.nc_socialPanelSide.swp_boxed .nc_tweetContainer:not(.totes):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:24px;font-weight:400;line-height:50px;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_socialPanel.notMobile .nc_tweetContainer:nth-last-child(1),.nc_tweetContainer.totes:nth-last-child(1){margin-right:0}.nc_socialPanel.swp_d_darkGray a,.nc_socialPanel.swp_d_fullColor a,.nc_socialPanel.swp_d_lightGray a,.nc_socialPanel.swp_d_mediumGray a,body .nc_socialPanel.swp_o_darkGray:hover a,body .nc_socialPanel.swp_o_fullColor:hover a,body .nc_socialPanel.swp_o_lightGray:hover a,body .nc_socialPanel.swp_o_mediumGray:hover a,html body .nc_socialPanel.swp_i_darkGray a:hover,html body .nc_socialPanel.swp_i_fullColor .nc_tweetContainer:hover a,html body .nc_socialPanel.swp_i_lightGray .nc_tweetContainer:hover a,html body .nc_socialPanel.swp_i_mediumGray a:hover{color:#fff}.nc_socialPanel.swp_d_colorOutlines .twitter a,.wp-editor-container .sw-twitter:before,a.style1 .sw-click-to-tweet i.sw-twitter,a.style2 .sw-click-to-tweet i.sw-twitter,body .nc_socialPanel.swp_o_colorOutlines:hover .twitter a,html body .nc_socialPanel.swp_i_colorOutlines .twitter a:hover{color:#429cd6}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.sw-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.sw-twitter,a.style5 .sw-click-to-tweet i.sw-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.sw-twitter{color:#2a2d34;text-decoration:none}.scale-70{-ms-transform:scale(.7);-webkit-transform:scale(.7);transform:scale(.7)}.nc_socialPanel:not(.nc_floater).scale-70.scale-fullWidth{width:142.8571428571429%!important}.scale-80{-ms-transform:scale(.8);-webkit-transform:scale(.8);transform:scale(.8)}.nc_socialPanel:not(.nc_floater).scale-80.scale-fullWidth{width:125%!important}.scale-90{-ms-transform:scale(.9);-webkit-transform:scale(.9);transform:scale(.9)}.nc_socialPanel:not(.nc_floater).scale-90.scale-fullWidth{width:111.111111111111%!important}.scale-110{-ms-transform:scale(1.1);-webkit-transform:scale(1.1);transform:scale(1.1)}.nc_socialPanel:not(.nc_floater).scale-110.scale-fullWidth{width:90.90909090909091%!important}.scale-120{-ms-transform:scale(1.2);-webkit-transform:scale(1.2);transform:scale(1.2)}.nc_socialPanel:not(.nc_floater).scale-120.scale-fullWidth{width:83.33333333333333%!important}.scale-130{-ms-transform:scale(1.3);-webkit-transform:scale(1.3);transform:scale(1.3)}.nc_socialPanel:not(.nc_floater).scale-130.scale-fullWidth{width:76.92307692307692%!important}.scale-140{-ms-transform:scale(1.4);-webkit-transform:scale(1.4);transform:scale(1.4)}.nc_socialPanel:not(.nc_floater).scale-140.scale-fullWidth{width:71.42857142857143%!important}.nc_floater.scale-center,.nc_floater.scale-right,.scale-fullWidth,.scale-left{-ms-transform-origin:left;-webkit-transform-origin:left;transform-origin:left}.scale-right{-ms-transform-origin:right;-webkit-transform-origin:right;transform-origin:right}.scale-center{-ms-transform-origin:center;-webkit-transform-origin:center;transform-origin:center}div.nc_socialPanel .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%}}
fonts/sw-icon-font.svg CHANGED
@@ -1,42 +1,42 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
- <svg xmlns="http://www.w3.org/2000/svg">
4
- <metadata>Generated by Fontastic.me</metadata>
5
- <defs>
6
- <font id="social-warfare-icons" horiz-adv-x="512">
7
- <font-face font-family="social-warfare-icons" units-per-em="512" ascent="480" descent="-32"/>
8
- <missing-glyph horiz-adv-x="512" />
9
-
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"/>
19
- <glyph glyph-name="email" unicode="&#107;" d="M166 277l-152 120 0-275z m330 147l-480 0 240-184z m-173-162l-67-51-67 51-175-174 482 0z m21 13l154-153 0 273z"/>
20
- <glyph glyph-name="ello" unicode="&#108;" d="M256 454c-109 0-198-89-198-198 0-109 89-198 198-198 109 0 198 89 198 198 0 109-89 198-198 198z m-3-321c-82 0-114 67-119 102-1 8 5 16 13 18 8 1 16-5 18-13 0-3 13-75 88-75 75 0 91 73 93 77 1 8 9 14 17 12 8-1 15-9 13-17-6-39-42-104-123-104z"/>
21
- <glyph glyph-name="blogger" unicode="&#109;" d="M442 288l-4 6-4 5c-7 5-42 0-52 8-6 7-8 18-9 32-5 29-7 31-11 40-16 35-61 61-92 64l-83 0c-65 0-118-53-118-118l0-138c0-65 53-118 118-118l136 0c66 0 119 53 119 118z m-253 59l65 0c13 0 23-9 23-22 0-13-10-23-23-23l-65 0c-13 0-23 10-23 23 0 11 10 22 23 22z m134-181l-133 0c-12 0-22 10-22 23 0 13 10 22 22 22l133 0c13 0 23-9 23-22 0-13-12-23-23-23z"/>
22
- <glyph glyph-name="rss" unicode="&#110;" d="M166 114c0-29-24-53-52-53-29 0-53 24-53 53 0 28 24 52 53 52 30 0 52-22 52-52z m-104 204l0-78c98-2 178-80 178-178l78 0c-1 141-115 255-256 256z m0 55c84 0 160-32 220-91 59-60 91-136 91-220l78 0c0 215-174 388-387 389l0-78z"/>
23
- <glyph glyph-name="share" unicode="&#111;" d="M382 170c-16 0-30-7-41-16l-149 86c2 5 2 10 2 14 0 5 0 10-2 15l147 86c11-11 26-17 43-17 36 0 63 28 63 62 0 34-29 64-63 64-33 0-62-29-62-62 0-5 0-10 2-15l-148-86c-11 11-25 17-43 17-35 0-62-28-62-62 0-34 27-64 61-64 16 0 32 6 43 18l149-87c-2-5-2-9-2-14 0-34 27-61 61-61 33 0 61 27 61 61 0 33-26 61-60 61z"/>
24
- <glyph glyph-name="social-warfare" unicode="&#112;" d="M138 354c3 12 28 67 88 100-96-14-170-97-170-196 0-26 5-52 14-74 4 3 8 5 13 5l74 14c13 3 17-3 14-16-8-29 8-46 37-46 29 0 58 17 59 33 7 53-179 42-129 180z m297-8c-5-5-9-10-17-12l-76-14c-12-3-17 3-14 14 5 24-10 40-38 40-24 0-44-14-45-27-8-46 182-46 134-184-5-13-37-73-109-105 104 6 188 92 188 198-2 32-10 62-23 90z"/>
25
- <glyph glyph-name="stumble-upon" unicode="&#113;" d="M282 302l33-16 50 15 0 35c-2 59-50 106-109 106-59 0-107-47-109-106l0-158c0-15-11-26-25-26-15 0-26 11-26 26l0 67-85 0c0 0 0-67 0-69 0-61 50-110 111-110 60 0 108 48 108 108l0 157c0 15 12 26 26 26 14 0 26-11 26-26z m136-56l0-70c0-14-12-26-26-26-14 0-26 12-26 26l0 69-49-15-34 16 0-68c0-61 50-109 111-109 60 0 110 49 110 110 0 0 0 69 0 69l-86 0z"/>
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>
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by Fontastic.me</metadata>
5
+ <defs>
6
+ <font id="social-warfare-icons" horiz-adv-x="512">
7
+ <font-face font-family="social-warfare-icons" units-per-em="512" ascent="480" descent="-32"/>
8
+ <missing-glyph horiz-adv-x="512" />
9
+
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"/>
19
+ <glyph glyph-name="email" unicode="&#107;" d="M166 277l-152 120 0-275z m330 147l-480 0 240-184z m-173-162l-67-51-67 51-175-174 482 0z m21 13l154-153 0 273z"/>
20
+ <glyph glyph-name="ello" unicode="&#108;" d="M256 454c-109 0-198-89-198-198 0-109 89-198 198-198 109 0 198 89 198 198 0 109-89 198-198 198z m-3-321c-82 0-114 67-119 102-1 8 5 16 13 18 8 1 16-5 18-13 0-3 13-75 88-75 75 0 91 73 93 77 1 8 9 14 17 12 8-1 15-9 13-17-6-39-42-104-123-104z"/>
21
+ <glyph glyph-name="blogger" unicode="&#109;" d="M442 288l-4 6-4 5c-7 5-42 0-52 8-6 7-8 18-9 32-5 29-7 31-11 40-16 35-61 61-92 64l-83 0c-65 0-118-53-118-118l0-138c0-65 53-118 118-118l136 0c66 0 119 53 119 118z m-253 59l65 0c13 0 23-9 23-22 0-13-10-23-23-23l-65 0c-13 0-23 10-23 23 0 11 10 22 23 22z m134-181l-133 0c-12 0-22 10-22 23 0 13 10 22 22 22l133 0c13 0 23-9 23-22 0-13-12-23-23-23z"/>
22
+ <glyph glyph-name="rss" unicode="&#110;" d="M166 114c0-29-24-53-52-53-29 0-53 24-53 53 0 28 24 52 53 52 30 0 52-22 52-52z m-104 204l0-78c98-2 178-80 178-178l78 0c-1 141-115 255-256 256z m0 55c84 0 160-32 220-91 59-60 91-136 91-220l78 0c0 215-174 388-387 389l0-78z"/>
23
+ <glyph glyph-name="share" unicode="&#111;" d="M382 170c-16 0-30-7-41-16l-149 86c2 5 2 10 2 14 0 5 0 10-2 15l147 86c11-11 26-17 43-17 36 0 63 28 63 62 0 34-29 64-63 64-33 0-62-29-62-62 0-5 0-10 2-15l-148-86c-11 11-25 17-43 17-35 0-62-28-62-62 0-34 27-64 61-64 16 0 32 6 43 18l149-87c-2-5-2-9-2-14 0-34 27-61 61-61 33 0 61 27 61 61 0 33-26 61-60 61z"/>
24
+ <glyph glyph-name="social-warfare" unicode="&#112;" d="M138 354c3 12 28 67 88 100-96-14-170-97-170-196 0-26 5-52 14-74 4 3 8 5 13 5l74 14c13 3 17-3 14-16-8-29 8-46 37-46 29 0 58 17 59 33 7 53-179 42-129 180z m297-8c-5-5-9-10-17-12l-76-14c-12-3-17 3-14 14 5 24-10 40-38 40-24 0-44-14-45-27-8-46 182-46 134-184-5-13-37-73-109-105 104 6 188 92 188 198-2 32-10 62-23 90z"/>
25
+ <glyph glyph-name="stumble-upon" unicode="&#113;" d="M282 302l33-16 50 15 0 35c-2 59-50 106-109 106-59 0-107-47-109-106l0-158c0-15-11-26-25-26-15 0-26 11-26 26l0 67-85 0c0 0 0-67 0-69 0-61 50-110 111-110 60 0 108 48 108 108l0 157c0 15 12 26 26 26 14 0 26-11 26-26z m136-56l0-70c0-14-12-26-26-26-14 0-26 12-26 26l0 69-49-15-34 16 0-68c0-61 50-109 111-109 60 0 110 49 110 110 0 0 0 69 0 69l-86 0z"/>
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>
functions/admin-options-page/admin-options-array.php DELETED
@@ -1,1067 +0,0 @@
1
- <?php
2
-
3
- /****************************************************************************************
4
- * *
5
- * The Social Warfare Display Settings *
6
- * *
7
- *****************************************************************************************/
8
- function swp_options_display($swp_options) {
9
-
10
- $icons_array = array(
11
- 'type' => 'buttons'
12
- );
13
- $icons_array = apply_filters( 'swp_button_options' , $icons_array );
14
-
15
- // Declare the Options Tab and Tab Name
16
- $swp_options['tabs']['links']['swp_display'] = 'Display';
17
-
18
- // Declare the content that goes on this options page
19
- $swp_options['options']['swp_display'] = array(
20
- 'social_networks_title' => array(
21
- 'type' => 'title',
22
- 'content' => 'Social Networks'
23
- ),
24
- 'social_networks_subtitle' => array(
25
- 'type' => 'paragraph',
26
- 'content' => 'Drag & Drop to activate and order your share buttons.'
27
- ),
28
- 'buttons' => $icons_array,
29
- 'orderOfIconsSelect' => array(
30
- 'type' => 'select',
31
- 'size' => 'two-thirds',
32
- 'content' => array(
33
- 'manual' => 'Sort Manually Using Drag & Drop Above',
34
- 'dynamic' => 'Sort Dyanamically By Order Of Most Shares'
35
- ),
36
- 'default' => 'manual',
37
- 'name' => 'Button Ordering',
38
- 'divider' => true,
39
- 'premium' => true
40
- ),
41
- 'share_counts_title' => array(
42
- 'type' => 'title',
43
- 'content' => 'Share Counts'
44
- ),
45
- 'share_counts_subtitle' => array(
46
- 'type' => 'paragraph',
47
- 'content' => 'Use the toggles below to determine how to display your social proof.'
48
- ),
49
- 'totesEach' => array(
50
- 'type' => 'checkbox',
51
- 'size' => 'two-thirds',
52
- 'content' => 'Button Counts',
53
- 'default' => true,
54
- 'premium' => false
55
- ),
56
- 'totes' => array(
57
- 'type' => 'checkbox',
58
- 'size' => 'two-thirds',
59
- 'content' => 'Total Counts',
60
- 'default' => true,
61
- 'premium' => false
62
- ),
63
- 'minTotes' => array(
64
- 'type' => 'input',
65
- 'size' => 'two-thirds',
66
- 'name' => 'Minimum Shares',
67
- 'default' => 0,
68
- 'divider' => true,
69
- 'premium' => true
70
- ),
71
- 'swp_twitter_card' => array(
72
- 'type' => 'checkbox',
73
- 'size' => 'two-thirds',
74
- 'content' => 'Twitter Cards',
75
- 'header' => true,
76
- 'divider' => true,
77
- 'default' => true,
78
- 'premium' => true
79
- ),
80
- 'position_title' => array(
81
- 'type' => 'title',
82
- 'content' => 'Position Share Buttons'
83
- ),
84
- 'position_subtitle' => array(
85
- 'type' => 'paragraph',
86
- 'content' => 'The options below will allow you to customize the positioning of share buttons for each post type.'
87
- ),
88
- 'location_column_labels' => array(
89
- 'type' => 'column_labels',
90
- 'columns' => 3,
91
- 'column_1' => 'Post Type',
92
- 'column_2' => 'Static Buttons',
93
- 'column_3' => 'Side Floating Buttons (If Activated)'
94
- )
95
- );
96
-
97
- // Create the content locations
98
- $contentLocations = array(
99
- 'above'=>'Above the Content',
100
- 'below' => 'Below the Content',
101
- 'both' => 'Both Above and Below the Content',
102
- 'none' => 'None/Manual Placement'
103
- );
104
-
105
- // Get the post Types
106
- $postTypes = get_post_types();
107
-
108
- // Unset the post types that don't matter
109
- // if(isset($postTypes['post'])) unset($postTypes['post']);
110
- // if(isset($postTypes['page'])) unset($postTypes['page']);
111
- if(isset($postTypes['attachment'])) unset($postTypes['attachment']);
112
- if(isset($postTypes['revision'])) unset($postTypes['revision']);
113
- if(isset($postTypes['nav_menu_item'])) unset($postTypes['nav_menu_item']);
114
- if(isset($postTypes['nf_sub'])) unset($postTypes['nf_sub']);
115
- if(isset($postTypes['shop_order'])) unset($postTypes['shop_order']);
116
- if(isset($postTypes['shop_order_refund'])) unset($postTypes['shop_order_refund']);
117
- if(isset($postTypes['shop_coupon'])) unset($postTypes['shop_coupon']);
118
- if(isset($postTypes['shop_webhook'])) unset($postTypes['shop_webhook']);
119
-
120
- if(!empty($postTypes)):
121
-
122
- // Loop through the Custom Post Type Options
123
- foreach($postTypes as $postType):
124
- $swp_options['options']['swp_display']['location_'.$postType] = array(
125
- 'type' => 'select',
126
- 'name' => ucfirst($postType),
127
- 'primary' => 'location_'.$postType,
128
- 'secondary' => 'float_location_'.$postType,
129
- 'content' => $contentLocations,
130
- 'content_2' => array(
131
- 'on' => 'On',
132
- 'off' => 'Off',
133
- ),
134
- 'default' => 'both',
135
- 'default_2' => 'on'
136
- );
137
- endforeach;
138
- endif;
139
-
140
- $swp_options['options']['swp_display']['locationSite'] = array(
141
- 'type' => 'select',
142
- 'name' => 'Archive & Categories',
143
- 'content' => $contentLocations,
144
- 'default' => 'below',
145
- 'size' => 'two-thirds'
146
- );
147
-
148
- $swp_options['options']['swp_display']['pinit_divider'] = array(
149
- 'type' => 'divider'
150
- );
151
-
152
- $swp_options['options']['swp_display']['pinit_title'] = array(
153
- 'type' => 'title',
154
- 'content' => 'Image Hover Pin Button',
155
- 'premium' => true
156
- );
157
-
158
- $swp_options['options']['swp_display']['pinit_description'] = array(
159
- 'type' => 'paragraph',
160
- 'content' => 'If you would like a "Pin" button to appear on images when users hover over them, activate this.',
161
- 'premium' => true
162
- );
163
-
164
- $swp_options['options']['swp_display']['pinit_toggle'] = array(
165
- 'type' => 'checkbox',
166
- 'size' => 'two-thirds',
167
- 'content' => 'Pinit Button',
168
- 'default' => true,
169
- 'premium' => true
170
- );
171
-
172
- $swp_options['options']['swp_display']['pinit_location_horizontal'] = array(
173
- 'type' => 'select',
174
- 'name' => 'Horizontal Location',
175
- 'content' => array(
176
- 'left' => 'Left',
177
- 'center' => 'Center',
178
- 'right' => 'Right'
179
- ),
180
- 'default' => 'center',
181
- 'size' => 'two-fourths',
182
- 'premium' => true,
183
- 'dep' => 'pinit_toggle',
184
- 'dep_val' => array(true)
185
- );
186
-
187
- $swp_options['options']['swp_display']['pinit_min_width'] = array(
188
- 'type' => 'input',
189
- 'name' => 'Min Width',
190
- 'default' => '200',
191
- 'size' => 'two-fourths',
192
- 'premium' => true,
193
- 'dep' => 'pinit_toggle',
194
- 'dep_val' => array(true)
195
- );
196
-
197
- $swp_options['options']['swp_display']['pinit_location_vertical'] = array(
198
- 'type' => 'select',
199
- 'name' => 'Vertical Location',
200
- 'content' => array(
201
- 'top' => 'Top',
202
- 'middle' => 'Middle',
203
- 'bottom' => 'Bottom'
204
- ),
205
- 'default' => 'top',
206
- 'size' => 'two-fourths',
207
- 'premium' => true,
208
- 'dep' => 'pinit_toggle',
209
- 'dep_val' => array(true)
210
- );
211
-
212
- $swp_options['options']['swp_display']['pinit_min_height'] = array(
213
- 'type' => 'input',
214
- 'name' => 'Min Height',
215
- 'default' => '200',
216
- 'size' => 'two-fourths',
217
- 'premium' => true,
218
- 'dep' => 'pinit_toggle',
219
- 'dep_val' => array(true)
220
- );
221
-
222
- //$swp_options['options']['swp_display']['pinit_custom_image'] = array(
223
- // 'type' => 'image_upload',
224
- // 'name' => 'Custom Image',
225
- // 'default' => 'top_left',
226
- // 'premium' => true,
227
- // 'dep' => 'pinit_toggle',
228
- // 'dep_val' => array(true)
229
- //);
230
-
231
- $swp_options['options']['swp_display']['yummly_divider'] = array(
232
- 'type' => 'divider'
233
- );
234
-
235
- $swp_options['options']['swp_display']['yummly_cat_title'] = array(
236
- 'type' => 'title',
237
- 'content' => 'Yummly Display Control',
238
- 'premium' => true
239
- );
240
-
241
- $swp_options['options']['swp_display']['yummly_cat_description'] = array(
242
- 'type' => 'paragraph',
243
- 'content' => 'If you would like the Yummly button to only display on posts of a specific category or tag, enter the category or tag name below (e.g "Recipe"). Leave blank to display the button on all posts.',
244
- 'premium' => true
245
- );
246
-
247
- $swp_options['options']['swp_display']['yummly_column_labels'] = array(
248
- 'type' => 'column_labels',
249
- 'columns' => 3,
250
- 'column_1' => '',
251
- 'column_2' => 'Choose Category',
252
- 'column_3' => 'Choose Tag',
253
- 'premium' => true
254
- );
255
-
256
- $swp_options['options']['swp_display']['yummly_terms'] = array(
257
- 'type' => 'input',
258
- 'name' => 'Yummly Terms',
259
- 'primary' => 'yummly_categories',
260
- 'secondary' => 'yummly_tags',
261
- 'premium' => true
262
- );
263
-
264
- return $swp_options;
265
- }
266
-
267
- /****************************************************************************************
268
- * *
269
- * The Styles Tab *
270
- * *
271
- *****************************************************************************************/
272
-
273
- function swp_options_styles($swp_options) {
274
-
275
- // Declare the Display Settings tab and tab name
276
- $swp_options['tabs']['links']['swp_styles'] = 'Styles';
277
-
278
- $swp_options['options']['swp_styles'] = array(
279
- 'visual_options_title' => array(
280
- 'type' => 'title',
281
- 'content' => 'Visual Options',
282
- 'premium' => true
283
- ),
284
- 'visual_options_description' => array(
285
- 'type' => 'paragraph',
286
- 'content' => 'Use the settings below to customize the look of your share buttons.',
287
- 'premium' => true
288
- ),
289
- 'visualTheme' => array(
290
- 'type' => 'select',
291
- 'size' => 'two-fourths',
292
- 'name' => 'Button Shape',
293
- 'content' => array(
294
- 'flatFresh' => 'Flat & Fresh',
295
- 'leaf' => 'A Leaf on the Wind',
296
- 'shift' => 'Shift',
297
- 'pill' => 'Pills',
298
- 'threeDee' => 'Three-Dee',
299
- 'connected' => 'Connected'
300
- ),
301
- 'default' => 'flatFresh',
302
- 'premium' => true
303
- ),
304
- 'buttonSize' => array(
305
- 'type' => 'select',
306
- 'size' => 'two-fourths',
307
- 'name' => 'Button Size',
308
- 'content' => array(
309
- '1.4' => '140%',
310
- '1.3' => '130%',
311
- '1.2' => '120%',
312
- '1.1' => '110%',
313
- '1' => '100%',
314
- '0.9' => '90%',
315
- '0.8' => '80%',
316
- '0.7' => '70%'
317
- ),
318
- 'default' => '1',
319
- 'premium' => true
320
- ),
321
- 'dColorSet' => array(
322
- 'type' => 'select',
323
- 'size' => 'two-fourths',
324
- 'name' => 'Default Color Set',
325
- 'content' => array(
326
- 'fullColor' => 'Full Color',
327
- 'lightGray' => 'Light Gray',
328
- 'mediumGray' => 'Medium Gray',
329
- 'darkGray' => 'Dark Gray',
330
- 'lgOutlines' => 'Light Gray Outlines',
331
- 'mdOutlines' => 'Medium Gray Outlines',
332
- 'dgOutlines' => 'Dark Gray Outlines',
333
- 'colorOutlines' => 'Color Outlines',
334
- 'customColor' => 'Custom Color',
335
- 'ccOutlines' => 'Custom Color Outlines'
336
- ),
337
- 'default' => 'fullColor',
338
- 'premium' => true
339
- ),
340
- 'oColorSet' => array(
341
- 'type' => 'select',
342
- 'size' => 'two-fourths',
343
- 'name' => 'Hover Color Set',
344
- 'content' => array(
345
- 'fullColor' => 'Full Color',
346
- 'lightGray' => 'Light Gray',
347
- 'mediumGray' => 'Medium Gray',
348
- 'darkGray' => 'Dark Gray',
349
- 'lgOutlines' => 'Light Gray Outlines',
350
- 'mdOutlines' => 'Medium Gray Outlines',
351
- 'dgOutlines' => 'Dark Gray Outlines',
352
- 'colorOutlines' => 'Color Outlines',
353
- 'customColor' => 'Custom Color',
354
- 'ccOutlines' => 'Custom Color Outlines'
355
- ),
356
- 'default' => 'fullColor',
357
- 'premium' => true
358
- ),
359
- 'iColorSet' => array(
360
- 'type' => 'select',
361
- 'size' => 'two-fourths',
362
- 'name' => 'Single Button Hover',
363
- 'content' => array(
364
- 'fullColor' => 'Full Color',
365
- 'lightGray' => 'Light Gray',
366
- 'mediumGray' => 'Medium Gray',
367
- 'darkGray' => 'Dark Gray',
368
- 'lgOutlines' => 'Light Gray Outlines',
369
- 'mdOutlines' => 'Medium Gray Outlines',
370
- 'dgOutlines' => 'Dark Gray Outlines',
371
- 'colorOutlines' => 'Color Outlines',
372
- 'customColor' => 'Custom Color',
373
- 'ccOutlines' => 'Custom Color Outlines'
374
- ),
375
- 'default' => 'fullColor',
376
- 'premium' => true
377
- ),
378
- //'maximum_width' => array(
379
- // 'type' => 'input',
380
- // 'size' => 'two-fourths',
381
- // 'name' => 'Maximum Width',
382
- // 'premium' => true
383
- //),
384
- 'customColor' => array(
385
- 'type' => 'input',
386
- 'size' => 'two-fourths',
387
- 'name' => 'Custom Color',
388
- 'default' => '#FFFFFF',
389
- 'premium' => true
390
- ),
391
- 'buttonFloat' => array(
392
- 'type' => 'select',
393
- 'size' => 'two-fourths',
394
- 'name' => 'Button Alignment',
395
- 'content' => array(
396
- 'fullWidth' => 'Full Width',
397
- 'left' => 'Left',
398
- 'right' => 'Right',
399
- 'center' => 'Center'
400
- ),
401
- 'default' => 'fullWidth',
402
- 'dep' => 'buttonSize',
403
- 'dep_val' => array('0.9','0.8','0.7'),
404
- 'premium' => true
405
- ),
406
- 'buttons_preview' => array(
407
- 'type' => 'html',
408
- 'divider' => true,
409
- 'content' => '<div class="nc_socialPanel swp_flatFresh swp_d_fullColor swp_i_fullColor swp_o_fullColor" data-position="both" data-float="floatNone" data-count="6" data-floatColor="#ffffff" data-scale="1" data-align="fullWidth"><div class="nc_tweetContainer googlePlus" data-id="2"><a target="_blank" href="https://plus.google.com/share?url=http%3A%2F%2Fwfa.re%2F1W28voz" data-link="https://plus.google.com/share?url=http%3A%2F%2Fwfa.re%2F1W28voz" class="nc_tweet"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-google-plus"></i><span class="swp_share"> +1</span></span></span><span class="swp_count">1.2K</span></a></div><div class="nc_tweetContainer twitter" data-id="3"><a href="https://twitter.com/share?original_referer=/&text=Ultimate+Social+Share+%23WordPress+plugin%21+Beautiful%2C+super+fast+%26+more+http%3A%2F%2Fwarfareplugins.com+pic.twitter.com%2FA2zcCJwZtO&url=/&via=WarfarePlugins" data-link="https://twitter.com/share?original_referer=/&text=Ultimate+Social+Share+%23WordPress+plugin%21+Beautiful%2C+super+fast+%26+more+http%3A%2F%2Fwarfareplugins.com+pic.twitter.com%2FA2zcCJwZtO&url=/&via=WarfarePlugins" class="nc_tweet"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-twitter"></i><span class="swp_share"> Tweet</span></span></span><span class="swp_count">280</span></a></div><div class="nc_tweetContainer nc_pinterest" data-id="6"><a data-link="https://pinterest.com/pin/create/button/?url=https://warfareplugins.com/&media=https%3A%2F%2Fwarfareplugins.com%2Fwp-content%2Fuploads%2Fget-content-shared-735x1102.jpg&description=Customize+your+Pinterest+sharing+options%2C+create+easy+%22click+to+tweet%22+buttons+within+your+blog+posts%2C+beautiful+sharing+buttons+and+more.+Social+Warfare+is+the+ultimate+social+sharing+arsenal+for+WordPress%21" class="nc_tweet" data-count="0"><span class="iconFiller"><span class="spaceManWilly" style="width:55px;"><i class="sw sw-pinterest"></i><span class="swp_share"> Pin</span></span></span><span class="swp_count">104</span></a></div><div class="nc_tweetContainer swp_fb" data-id="4"><a target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwfa.re%2F1W28vov" data-link="http://www.facebook.com/share.php?u=http%3A%2F%2Fwfa.re%2F1W28vov" class="nc_tweet"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-facebook"></i><span class="swp_share"> Share</span></span></span><span class="swp_count">157</span></a></div><div class="nc_tweetContainer linkedIn" data-id="5"><a target="_blank" href="https://www.linkedin.com/cws/share?url=http%3A%2F%2Fwfa.re%2F1W28twH" data-link="https://www.linkedin.com/cws/share?url=http%3A%2F%2Fwfa.re%2F1W28twH" class="nc_tweet"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-linkedin"></i><span class="swp_share"> Share</span></span></span><span class="swp_count">51</span></a></div><div class="nc_tweetContainer totes totesalt" data-id="6" ><span class="swp_count"><span class="swp_label">Shares</span> 1.8K</span></div></div>'
410
- ),
411
- 'total_counts_title' => array(
412
- 'type' => 'title',
413
- 'content' => 'Total Counts'
414
- ),
415
- 'total_counts_description' => array(
416
- 'type' => 'paragraph',
417
- 'content' => 'Customize how the "Total Shares" section of your share buttons look.'
418
- ),
419
- 'swDecimals' => array(
420
- 'type' => 'select',
421
- 'name' => 'Decimal Places',
422
- 'size' => 'two-fourths',
423
- 'content' => array(
424
- '0' => 'Zero',
425
- '1' => 'One',
426
- '2' => 'Two'
427
- ),
428
- 'default' => '0'
429
- ),
430
- 'swp_decimal_separator' => array(
431
- 'type' => 'select',
432
- 'size' => 'two-fourths',
433
- 'name' => 'Decimal Separator',
434
- 'content' => array(
435
- 'period' => 'Period',
436
- 'comma' => 'Comma'
437
- ),
438
- 'default' => 'period'
439
- ),
440
- 'swTotesFormat' => array(
441
- 'type' => 'select',
442
- 'size' => 'two-fourths',
443
- 'name' => 'Alignment',
444
- 'content' => array(
445
- 'totesAlt' => 'Right',
446
- 'totesAltLeft' => 'Left'
447
- ),
448
- 'default' => 'totesAlt'
449
- ),
450
- 'total_counts_divider' => array(
451
- 'type' => 'divider'
452
- ),
453
- 'float' => array(
454
- 'type' => 'checkbox',
455
- 'title' => 'Floating Share Buttons',
456
- 'description' => 'If you would like to activate floating share buttons, turn this on.',
457
- 'size' => 'four-fourths'
458
- ),
459
- 'total_floating_description' => array(
460
- 'type' => 'paragraph',
461
- 'content' => 'If you would like to activate floating share buttons, turn this on.'
462
- ),
463
- 'floatOption' => array(
464
- 'type' => 'select',
465
- 'size' => 'two-fourths',
466
- 'name' => 'Float Position',
467
- 'content' => array(
468
- 'top' => 'Top of the Page',
469
- 'bottom' => 'Bottom of the Page',
470
- 'left' => 'On the left side of the page'
471
- ),
472
- 'default' => 'bottom',
473
- 'dep' => 'float',
474
- 'dep_val' => array(true)
475
- ),
476
- 'swp_float_scr_sz' => array(
477
- 'type' => 'input',
478
- 'size' => 'two-fourths',
479
- 'name' => 'Minimum Screen Width',
480
- 'default' => '1100',
481
- 'dep' => 'floatOption',
482
- 'dep_val' => array('left')
483
- ),
484
- 'sideReveal' => array(
485
- 'type' => 'select',
486
- 'size' => 'two-fourths',
487
- 'name' => 'Transition',
488
- 'content' => array(
489
- 'slide' => 'Slide In / Slide Out',
490
- 'fade' => 'Fade In / Fade Out'
491
- ),
492
- 'default' => 'slide',
493
- 'dep' => 'floatOption',
494
- 'dep_val' => array('left')
495
- ),
496
- 'floatStyle' => array(
497
- 'type' => 'select',
498
- 'name' => 'Button Shape',
499
- 'size' => 'two-fourths',
500
- 'content' => array(
501
- 'default' => 'Buttons',
502
- 'boxed' => 'Boxes'
503
- ),
504
- 'default' => 'boxed',
505
- 'dep' => 'floatOption',
506
- 'dep_val' => array('left'),
507
- 'premium' => true
508
- ),
509
- 'floatStyleSource' => array(
510
- 'type' => 'checkbox',
511
- 'size' => 'two-fourths',
512
- 'content' => 'Inherit Visual Options',
513
- 'default' => '1',
514
- 'dep' => 'floatOption',
515
- 'dep_val' => array('left'),
516
- 'premium' => true
517
- ),
518
- 'sideDColorSet' => array(
519
- 'type' => 'select',
520
- 'size' => 'two-fourths',
521
- 'name' => 'Default Color Set',
522
- 'content' => array(
523
- 'fullColor' => 'Full Color',
524
- 'lightGray' => 'Light Gray',
525
- 'mediumGray' => 'Medium Gray',
526
- 'darkGray' => 'Dark Gray',
527
- 'lgOutlines' => 'Light Gray Outlines',
528
- 'mdOutlines' => 'Medium Gray Outlines',
529
- 'dgOutlines' => 'Dark Gray Outlines',
530
- 'colorOutlines' => 'Color Outlines',
531
- 'customColor' => 'Custom Color',
532
- 'ccOutlines' => 'Custom Color Outlines'
533
- ),
534
- 'default' => 'fullColor',
535
- 'dep' => 'floatStyleSource',
536
- 'dep_val' => array(false)
537
- ),
538
- 'sideOColorSet' => array(
539
- 'type' => 'select',
540
- 'size' => 'two-fourths',
541
- 'name' => 'Hover Color Set',
542
- 'content' => array(
543
- 'fullColor' => 'Full Color',
544
- 'lightGray' => 'Light Gray',
545
- 'mediumGray' => 'Medium Gray',
546
- 'darkGray' => 'Dark Gray',
547
- 'lgOutlines' => 'Light Gray Outlines',
548
- 'mdOutlines' => 'Medium Gray Outlines',
549
- 'dgOutlines' => 'Dark Gray Outlines',
550
- 'colorOutlines' => 'Color Outlines',
551
- 'customColor' => 'Custom Color',
552
- 'ccOutlines' => 'Custom Color Outlines'
553
- ),
554
- 'default' => 'fullColor',
555
- 'dep' => 'floatStyleSource',
556
- 'dep_val' => array(false)
557
- ),
558
- 'sideIColorSet' => array(
559
- 'type' => 'select',
560
- 'size' => 'two-fourths',
561
- 'name' => 'Single Button Hover',
562
- 'content' => array(
563
- 'fullColor' => 'Full Color',
564
- 'lightGray' => 'Light Gray',
565
- 'mediumGray' => 'Medium Gray',
566
- 'darkGray' => 'Dark Gray',
567
- 'lgOutlines' => 'Light Gray Outlines',
568
- 'mdOutlines' => 'Medium Gray Outlines',
569
- 'dgOutlines' => 'Dark Gray Outlines',
570
- 'colorOutlines' => 'Color Outlines',
571
- 'customColor' => 'Custom Color',
572
- 'ccOutlines' => 'Custom Color Outlines'
573
- ),
574
- 'default' => 'fullColor',
575
- 'dep' => 'floatStyleSource',
576
- 'dep_val' => array(false)
577
- ),
578
- 'floatBgColor' => array(
579
- 'type' => 'input',
580
- 'size' => 'two-fourths',
581
- 'name' => 'Background Color',
582
- 'default' => '#ffffff',
583
- 'dep' => 'floatOption',
584
- 'dep_val' => array('top','bottom')
585
- ),
586
- 'click_to_tweet_divider' => array(
587
- 'type' => 'divider'
588
- ),
589
- 'click_to_tweet_title' => array(
590
- 'type' => 'title',
591
- 'content' => 'Click-to-Tweet Style',
592
- 'premium' => true
593
- ),
594
- 'click_to_tweet_description' => array(
595
- 'type' => 'paragraph',
596
- 'content' => 'Select the default visual style for Click-to-Tweets on your site.',
597
- 'premium' => true
598
- ),
599
- 'cttTheme' => array(
600
- 'type' => 'select',
601
- 'size' => 'two-thirds',
602
- 'name' => 'Visual Theme',
603
- 'content' => array(
604
- 'style1' => 'Send Her My Love',
605
- 'style2' => 'Roll With The Changes',
606
- 'style3' => 'Free Bird',
607
- 'style4' => 'Don\'t Stop Believin\'',
608
- 'style5' => 'Thunderstruck',
609
- 'style6' => 'Livin\' On A Prayer',
610
- 'none' => 'None - Create Your Own CSS In Your Theme'),
611
- 'default' => 'style1',
612
- 'premium' => true
613
- ),
614
- 'cttPreview' => array(
615
- 'type' => 'html',
616
- 'content' => '<a class="swp_CTT style1" data-style="style1" href="https://twitter.com/share?text=We+couldn%27t+find+one+social+sharing+plugin+that+met+all+of+our+needs%2C+so+we+built+it+ourselves.&amp;url=http://warfareplugins.com&amp;via=warfareplugins" data-link="https://twitter.com/share?text=We+couldn%27t+find+one+social+sharing+plugin+that+met+all+of+our+needs%2C+so+we+built+it+ourselves.&amp;url=http://wfa.re/1PtqdNM&amp;via=WarfarePlugins" target="_blank"><span class="sw-click-to-tweet"><span class="sw-ctt-text">We couldn\'t find one social sharing plugin that met all of our needs, so we built it ourselves.</span><span class="sw-ctt-btn">Click To Tweet<i class="sw sw-twitter"></i></span></span></a>',
617
- 'premium' => true
618
- )
619
- );
620
-
621
- // Return the options value
622
- return $swp_options;
623
-
624
- }
625
-
626
-
627
- /****************************************************************************************
628
- * *
629
- * Queue up the Options Filters *
630
- * *
631
- *****************************************************************************************/
632
-
633
- function swp_options_social_identity($swp_options) {
634
-
635
- // Declare the Display Settings tab and tab name
636
- $swp_options['tabs']['links']['swp_social_identity'] = 'Social Identity';
637
-
638
- $swp_options['options']['swp_social_identity'] = array(
639
- 'social_identity_title' => array(
640
- 'type' => 'title',
641
- 'content' => 'Sitewide Identity'
642
- ),
643
- 'social_identity_description' => array(
644
- 'type' => 'paragraph',
645
- 'content' => 'If you would like to set sitewide defaults for your social identity, add them below.'
646
- ),
647
- 'twitterID' => array(
648
- 'type' => 'input',
649
- 'size' => 'two-thirds',
650
- 'name' => 'Twitter Username'
651
- ),
652
- 'pinterestID' => array(
653
- 'type' => 'input',
654
- 'size' => 'two-thirds',
655
- 'name' => 'Pinterest Username'
656
- ),
657
- 'facebookPublisherUrl' => array(
658
- 'type' => 'input',
659
- 'size' => 'two-thirds',
660
- 'name' => 'Facebook Page URL'
661
- ),
662
- 'facebookAppID' => array(
663
- 'type' => 'input',
664
- 'size' => 'two-thirds',
665
- 'name' => 'Facebook App ID'
666
- ),
667
- 'social_identity_divider' => array(
668
- 'type' => 'divider'
669
- ),
670
- /*
671
- 'social_authentication_title' => array(
672
- 'type' => 'title',
673
- 'content' => 'Social Authentication'
674
- ),
675
- 'social_authentication_description' => array(
676
- 'type' => 'paragraph',
677
- 'content' => 'In order to have some of the advanced functions like uploading images to Twitter for the custom tweet or fetching your follower counts for the follow widget, we need you to login with your social accounts.'
678
- ),
679
- 'twitter_authentication' => array(
680
- 'type' => 'authentication',
681
- 'link' => '#',
682
- 'name' => 'Connect Your Twitter Account'
683
- ),
684
- 'facebook_authentication' => array(
685
- 'type' => 'authentication',
686
- 'link' => '#',
687
- 'name' => 'Connect Your Facebook Account'
688
- ),
689
- 'google_authentication' => array(
690
- 'type' => 'authentication',
691
- 'link' => '#',
692
- 'name' => 'Connect Your Google Account'
693
- ) */
694
-
695
- );
696
-
697
- return $swp_options;
698
-
699
- }
700
-
701
- /****************************************************************************************
702
- * *
703
- * The Advanced Tab *
704
- * *
705
- *****************************************************************************************/
706
-
707
- function swp_options_advanced($swp_options) {
708
-
709
- // Declare the Display Settings tab and tab name
710
- $swp_options['tabs']['links']['swp_advanced'] = 'Advanced';
711
-
712
- $swp_options['options']['swp_advanced'] = array(
713
- 'sniplyBuster' => array(
714
- 'type' => 'checkbox',
715
- 'title' => 'Frame Buster',
716
- 'description' => 'If you want to stop content pirates from framing your content, turn this on.',
717
- 'size' => 'two-thirds-advanced',
718
- 'default' => true,
719
- 'divider' => true
720
- ),
721
- 'linkShortening' => array(
722
- 'type' => 'checkbox',
723
- 'title' => 'Bitly Link Shortening',
724
- 'description' => 'If you like to have all of your links automatically shortened, turn this on.',
725
- 'size' => 'two-thirds-advanced',
726
- 'default' => false,
727
- 'premium' => true
728
- ),
729
- 'bitly_authentication' => array(
730
- 'type' => 'authentication',
731
- 'link' => 'https://bitly.com/oauth/authorize?client_id=96c9b292c5503211b68cf4ab53f6e2f4b6d0defb&state='.admin_url( 'admin-ajax.php' ).'&redirect_uri=https://warfareplugins.com/bitly_oauth.php',
732
- 'name' => 'Connect Your Bitly Account',
733
- 'divider' => true,
734
- 'dependant' => 'bitly_access_token',
735
- 'premium' => true
736
- ),
737
- 'analytics_title' => array(
738
- 'type' => 'title',
739
- 'content' => 'Analytics Tracking',
740
- 'premium' => true
741
- ),
742
- 'analtycis_description' => array(
743
- 'type' => 'paragraph',
744
- 'content' => 'If you want to activate UTM tracking for shared URL, turn this on.',
745
- 'premium' => true
746
- ),
747
- 'swp_click_tracking' => array(
748
- 'type' => 'checkbox',
749
- 'content' => 'Button Click Tracking',
750
- 'size' => 'two-thirds',
751
- 'default' => false,
752
- 'premium' => true
753
- ),
754
- 'googleAnalytics' => array(
755
- 'type' => 'checkbox',
756
- 'content' => 'UTM Link Tracking',
757
- 'size' => 'two-thirds',
758
- 'default' => false,
759
- 'premium' => true
760
- ),
761
- 'analyticsMedium' => array(
762
- 'type' => 'input',
763
- 'size' => 'two-thirds',
764
- 'name' => 'UTM Medium',
765
- 'default' => 'Social',
766
- 'dep' => 'googleAnalytics',
767
- 'dep_val' => array(true),
768
- 'premium' => true
769
- ),
770
- 'analyticsCampaign' => array(
771
- 'type' => 'input',
772
- 'size' => 'two-thirds',
773
- 'name' => 'UTM Campaign',
774
- 'divider' => true,
775
- 'default' => 'SocialWarfare',
776
- 'dep' => 'googleAnalytics',
777
- 'dep_val' => array(true),
778
- 'premium' => true
779
- ),
780
- 'share_recovery_title' => array(
781
- 'type' => 'title',
782
- 'content' => 'Share Recovery',
783
- 'premium' => true
784
- ),
785
- 'share_recovery_description' => array(
786
- 'type' => 'paragraph',
787
- 'content' => 'If at any point you have changed permalink structures or have gone from http to https (SSL) then you will have undoubtedly lost all of your share counts. This tool allows you to recover them.',
788
- 'premium' => true
789
- ),
790
- 'recover_shares' => array(
791
- 'type' => 'checkbox',
792
- 'size' => 'two-thirds',
793
- 'content' => 'Activate Share Recovery',
794
- 'default' => false,
795
- 'premium' => true
796
- ),
797
- 'recovery_format' => array(
798
- 'type' => 'select',
799
- 'name' => 'Previous URL Format',
800
- 'size' => 'two-thirds',
801
- 'content' => array(
802
- 'unchanged' => 'Unchanged',
803
- 'default' => 'Plain',
804
- 'day_and_name' => 'Day and Name',
805
- 'month_and_name' => 'Month and Name',
806
- 'numeric' => 'Numeric',
807
- 'post_name' => 'Post Name',
808
- 'custom' => 'Custom'
809
- ),
810
- 'default' => 'unchanged',
811
- 'dep' => 'recover_shares',
812
- 'dep_val' => array(true),
813
- 'premium' => true
814
- ),
815
- 'recovery_custom_format' => array(
816
- 'type' => 'input',
817
- 'size' => 'two-thirds',
818
- 'name' => 'Custom Permalink Format',
819
- 'dep' => 'recover_shares',
820
- 'dep_val' => array(true),
821
- 'premium' => true
822
- ),
823
- 'recovery_protocol' => array(
824
- 'type' => 'select',
825
- 'size' => 'two-thirds',
826
- 'name' => 'Previous Connection Protocol',
827
- 'content' => array(
828
- 'unchanged' => 'Unchanged',
829
- 'http' => 'http',
830
- 'https' => 'https'
831
- ),
832
- 'default' => 'unchanged',
833
- 'dep' => 'recover_shares',
834
- 'dep_val' => array(true),
835
- 'premium' => true
836
- ),
837
- 'recovery_prefix' => array(
838
- 'type' => 'select',
839
- 'size' => 'two-thirds',
840
- 'name' => 'Previous Domain Prefix',
841
- 'content' => array(
842
- 'unchanged' => 'Unchanged',
843
- 'www' => 'www',
844
- 'nonwww' => 'non-www'
845
- ),
846
- 'default' => 'unchanged',
847
- 'dep' => 'recover_shares',
848
- 'dep_val' => array(true),
849
- 'premium' => true
850
- ),
851
- 'recovery_subdomain' => array(
852
- 'type' => 'input',
853
- 'size' => 'two-thirds',
854
- 'name' => 'Subdomain',
855
- 'default' => '',
856
- 'divider' => true,
857
- 'dep' => 'recover_shares',
858
- 'dep_val' => array(true),
859
- 'premium' => true
860
- ),
861
- 'caching_method_title' => array(
862
- 'type' => 'title',
863
- 'content' => 'Caching Method'
864
- ),
865
- 'caching_method_description' => array(
866
- 'type' => 'paragraph',
867
- 'content' => 'If you have advanced knowledge of caching configurations, you may want to choose your own below.'
868
- ),
869
- 'cacheMethod' => array(
870
- 'type' => 'select',
871
- 'size' => 'two-thirds',
872
- 'name' => 'Cache Rebuild Method',
873
- 'content' => array(
874
- 'advanced' => 'Advanced Cache Triggering',
875
- 'legacy' => 'Legacy Cache Rebuilding during Page Loads'
876
- ),
877
- 'default' => 'advanced'
878
- )
879
- );
880
-
881
- return $swp_options;
882
- };
883
-
884
- /****************************************************************************************
885
- * *
886
- * The Advanced Tab *
887
- * *
888
- *****************************************************************************************/
889
-
890
- function swp_options_registration($swp_options) {
891
-
892
- // Declare the Display Settings tab and tab name
893
- $swp_options['tabs']['links']['swp_registration'] = 'Registration';
894
-
895
- $swp_options['options']['swp_registration'] = array(
896
- 'plugin_registration' => array(
897
- 'type' => 'plugin_registration',
898
- 'divider' => true,
899
- 'premium' => true
900
- ),
901
- 'activate_tweet_counts' => array(
902
- 'type' => 'tweet_counts',
903
- 'premium' => true
904
- )
905
- );
906
-
907
- return $swp_options;
908
-
909
- }
910
-
911
- /****************************************************************************************
912
- * *
913
- * Queue up the Options Filters *
914
- * *
915
- *****************************************************************************************/
916
-
917
- add_filter('swp_options', 'swp_options_display' , 1 );
918
- add_filter('swp_options', 'swp_options_styles' , 2 );
919
- add_filter('swp_options', 'swp_options_social_identity' , 3 );
920
- add_filter('swp_options', 'swp_options_advanced' , 4 );
921
- add_filter('swp_options', 'swp_options_registration' , 5 );
922
-
923
- /****************************************************************************************
924
- * *
925
- * The Social Warfare Options Function - Process the Options Array! *
926
- * *
927
- *****************************************************************************************
928
-
929
- // Queue up the Social Warfare options hook
930
- // add_action('init' , 'swp_optionsClass' , 20);
931
-
932
- // The Options Function which relies on the Options Array above
933
- function swp_optionsClass() {
934
-
935
- // Fetch the Options Array - This is the swp_options filter hook
936
- global $swp_options;
937
- $swp_options = apply_filters('swp_options',$swp_options);
938
-
939
- // Initiate the Options Class with the config settings in the array
940
- $options_panel = new BF_Admin_Page_Class($swp_options['config']);
941
-
942
- // Open the Options Tabs Container
943
- $options_panel->OpenTabs_container('');
944
-
945
- // Execute the list of options tabs
946
- $options_panel->TabsListing($swp_options['tabs']);
947
-
948
- // Loop through the options tabs and build the options page
949
- foreach($swp_options['options'] as $tabName => $tabOptions):
950
- $options_panel->OpenTab($tabName);
951
-
952
- // Loop through and output the options for this tab
953
- foreach($tabOptions as $key => $option):
954
-
955
- // TITLE - Add a Title
956
- if($option['type'] == 'title'):
957
- $options_panel->Title($option['content']);
958
- endif;
959
-
960
- // PARAGRAPH - Add a Paragraph of Information
961
- if($option['type'] == 'paragraph'):
962
- $options_panel->addParagraph($option['content']);
963
- endif;
964
-
965
- // TEXTBOX - Add a Textbox option
966
- if($option['type'] == 'textbox'):
967
- if(isset($option['default'])):
968
- $options_panel->addText($key,array('name' => $option['content'], 'std' => $option['default']));
969
- else:
970
- $options_panel->addText($key,array('name' => $option['content']));
971
- endif;
972
- endif;
973
-
974
- // CHECKBOX - Add a checkbox option
975
- if($option['type'] == 'checkbox'):
976
- $options_panel->addCheckbox($key,array('name' => $option['content'], $key => $key, 'std' => $option['default']));
977
- endif;
978
-
979
- // SORTABLE - Add a sortable option
980
- if($option['type'] == 'sortable'):
981
- $options_panel->addSortable(
982
- $key,
983
- $option['content'],
984
- array('name' => $option['name'])
985
- );
986
- endif;
987
-
988
- // SELECT - Add a select option
989
- if($option['type'] == 'select'):
990
- $options_panel->addSelect(
991
- $key,
992
- $option['content'],
993
- array(
994
- 'name' => $option['name'],
995
- 'std' => $option['default']
996
- )
997
- );
998
- endif;
999
-
1000
- // COLOROPTION - Add a color picker
1001
- if($option['type'] == 'colorselect'):
1002
- $options_panel->addColor(
1003
- $key,
1004
- array(
1005
- 'name'=> $option['name'],
1006
- 'std' => $option['default']
1007
- )
1008
- );
1009
- endif;
1010
-
1011
- endforeach;
1012
-
1013
- // Close the tab and move on to the next one
1014
- $options_panel->CloseTab();
1015
- endforeach;
1016
- };
1017
-
1018
- /****************************************************************************************
1019
- * *
1020
- * The Social Warfare Add Option(s) After Hook Function *
1021
- * *
1022
- *****************************************************************************************
1023
-
1024
- function swp_add_option_after($swp_options,$tabName,$optionName,$newOptionArray) {
1025
-
1026
- // Locate the index of the option you want to insert next to
1027
- $keyIndex = array_search(
1028
- $optionName,
1029
- array_keys( $swp_options['options'][$tabName] )
1030
- );
1031
-
1032
- // Split the array at the location of the option above
1033
- $first_array = array_splice (
1034
- $swp_options['options'][$tabName],
1035
- 0,
1036
- $keyIndex+1
1037
- );
1038
-
1039
- // Merge the two parts of the split array with your option added in the middle
1040
- $swp_options['options'][$tabName] = array_merge (
1041
- $first_array,
1042
- $newOptionArray,
1043
- $swp_options['options'][$tabName]
1044
- );
1045
-
1046
- // Return the option array or the world will explode
1047
- return $swp_options;
1048
-
1049
- }
1050
-
1051
- function swp_add_language_option($swp_options,$langName,$langCode) {
1052
-
1053
- // Add our new language to the options page
1054
- $swp_options['options']['displaySettings']['language']['content'][$langCode] = $langName;
1055
-
1056
- // Return the option array or the world will explode
1057
- return $swp_options;
1058
-
1059
- }
1060
- */
1061
- function swp_add_network_option($swp_options,$newOptionArray) {
1062
-
1063
- $swp_options['options']['swp_display']['newOrderOfIcons']['content'][$key] = $newOptionArray[$key]['content'];
1064
-
1065
- // Return the option array or the world will explode
1066
- return $swp_options;
1067
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/admin-options-page/admin-options-fetch.php DELETED
@@ -1,161 +0,0 @@
1
- <?php
2
- $swp_user_options = get_option('socialWarfareOptions');
3
- function swp_get_user_options( $admin = false ) {
4
-
5
- // Fetch the global options array
6
- global $swp_user_options;
7
-
8
- // Reset the Order of Icons Options
9
- if (isset($swp_user_options['orderOfIcons'])):
10
- unset($swp_user_options['orderOfIcons']);
11
- update_option('socialWarfareOptions',$swp_user_options);
12
- endif;
13
-
14
- // Force the plugin off on certain post types
15
- $swp_user_options['locationattachment'] = 'none';
16
- $swp_user_options['locationrevision'] = 'none';
17
- $swp_user_options['nav_menu_item'] = 'none';
18
- $swp_user_options['shop_order'] = 'none';
19
- $swp_user_options['shop_order_refund'] = 'none';
20
- $swp_user_options['shop_coupon'] = 'none';
21
- $swp_user_options['shop_webhook'] = 'none';
22
-
23
- // If this is the admin page or if the plugin is registered
24
- if( $admin == true || is_swp_registered() == true):
25
- if(!isset($swp_user_options['locationSite'])) { $swp_user_options['locationSite'] = 'both'; };
26
- if(!isset($swp_user_options['totes'])) { $swp_user_options['totes'] = true; };
27
- if(!isset($swp_user_options['totesEach'])) { $swp_user_options['totesEach'] = true; };
28
- if(!isset($swp_user_options['twitterID'])) { $swp_user_options['twitterID'] = false; };
29
- if(!isset($swp_user_options['swp_twitter_card'])) { $swp_user_options['swp_twitter_card'] = true; };
30
- if(!isset($swp_user_options['visualTheme'])) { $swp_user_options['visualTheme'] = 'flatFresh'; };
31
- if(!isset($swp_user_options['dColorSet'])) { $swp_user_options['dColorSet'] = 'fullColor';};
32
- if(!isset($swp_user_options['iColorSet'])) { $swp_user_options['iColorSet'] = 'fullColor';};
33
- if(!isset($swp_user_options['oColorSet'])) { $swp_user_options['oColorSet'] = 'fullColor';};
34
- if(!isset($swp_user_options['sideDColorSet'])) { $swp_user_options['sideDColorSet'] = 'fullColor';};
35
- if(!isset($swp_user_options['sideIColorSet'])) { $swp_user_options['sideIColorSet'] = 'fullColor';};
36
- if(!isset($swp_user_options['sideOColorSet'])) { $swp_user_options['sideOColorSet'] = 'fullColor';};
37
- if(!isset($swp_user_options['floatStyleSource'])) { $swp_user_options['floatStyleSource'] = true;};
38
- if(!isset($swp_user_options['buttonSize'])) { $swp_user_options['buttonSize'] = 1;};
39
- if(!isset($swp_user_options['buttonFloat'])) { $swp_user_options['buttonFloat'] = 'fullWidth';};
40
- if(!isset($swp_user_options['sideReveal'])) { $swp_user_options['sideReveal'] = 'slide';};
41
- if(!isset($swp_user_options['swp_float_scr_sz'])) { $swp_user_options['swp_float_scr_sz'] = 1100;};
42
- if(!isset($swp_user_options['cttTheme'])) { $swp_user_options['cttTheme'] = 'style1'; };
43
- if(!isset($swp_user_options['twitter_shares'])) { $swp_user_options['twitter_shares'] = false; };
44
- if(!isset($swp_user_options['float'])) { $swp_user_options['float'] = true; };
45
- if(!isset($swp_user_options['floatOption'])) { $swp_user_options['floatOption'] = 'bottom'; };
46
- if(!isset($swp_user_options['floatBgColor'])) { $swp_user_options['floatBgColor'] = '#ffffff';};
47
- if(!isset($swp_user_options['floatStyle'])) { $swp_user_options['floatStyle'] = 'default';};
48
- if(!isset($swp_user_options['customColor'])) { $swp_user_options['customColor'] = '#000000';};
49
- if(!isset($swp_user_options['recover_shares'])) { $swp_user_options['recover_shares'] = false; };
50
- if(!isset($swp_user_options['recovery_format'])) { $swp_user_options['recovery_format'] = 'unchanged'; };
51
- if(!isset($swp_user_options['recovery_protocol'])) { $swp_user_options['recovery_protocol'] = 'unchanged'; };
52
- if(!isset($swp_user_options['recovery_prefix'])) { $swp_user_options['recovery_prefix'] = 'unchanged'; };
53
- if(!isset($swp_user_options['swDecimals'])) { $swp_user_options['swDecimals'] = 0; };
54
- if(!isset($swp_user_options['swp_decimal_separator'])) { $swp_user_options['swp_decimal_separator'] = 'period';};
55
- if(!isset($swp_user_options['swTotesFormat'])) { $swp_user_options['swTotesFormat'] = 'totesalt'; };
56
- if($swp_user_options['swTotesFormat'] == 'totes') { $swp_user_options['swTotesFormat'] = 'totesalt'; };
57
- if(!isset($swp_user_options['googleAnalytics'])) { $swp_user_options['googleAnalytics'] = false; };
58
- if(!isset($swp_user_options['dashboardShares'])) { $swp_user_options['dashboardShares'] = true; };
59
- if(!isset($swp_user_options['linkShortening'])) { $swp_user_options['linkShortening'] = false; };
60
- if(!isset($swp_user_options['minTotes'])) { $swp_user_options['minTotes'] = 0; };
61
- if(!isset($swp_user_options['cacheMethod'])) { $swp_user_options['cacheMethod'] = 'advanced'; };
62
- if(!isset($swp_user_options['rawNumbers'])) { $swp_user_options['rawNumbers'] = false; };
63
- if(!isset($swp_user_options['notShowing'])) { $swp_user_options['notShowing'] = false; };
64
- if(!isset($swp_user_options['visualEditorBug'])) { $swp_user_options['visualEditorBug'] = false; };
65
- if(!isset($swp_user_options['loopFix'])) { $swp_user_options['loopFix'] = false; };
66
- if(!isset($swp_user_options['sniplyBuster'])) { $swp_user_options['sniplyBuster'] = false; };
67
- if(!isset($swp_user_options['analyticsMedium'])) { $swp_user_options['analyticsMedium'] = 'social'; };
68
- if(!isset($swp_user_options['analyticsCampaign'])) { $swp_user_options['analyticsCampaign'] = 'SocialWarfare'; };
69
- if(!isset($swp_user_options['swp_click_tracking'])) { $swp_user_options['swp_click_tracking'] = false; };
70
- if(!isset($swp_user_options['orderOfIconsSelect'])) { $swp_user_options['orderOfIconsSelect'] = 'manual'; };
71
- if(!isset($swp_user_options['pinit_toggle'])) { $swp_user_options['pinit_toggle'] = false; };
72
- if(!isset($swp_user_options['pinit_location_horizontal'])) { $swp_user_options['pinit_location_horizontal'] = 'center'; };
73
- if(!isset($swp_user_options['pinit_location_vertical'])) { $swp_user_options['pinit_location_vertical'] = 'top'; };
74
- if(!isset($swp_user_options['pinit_min_width'])) { $swp_user_options['pinit_min_width'] = '200'; };
75
- if(!isset($swp_user_options['pinit_min_height'])) { $swp_user_options['pinit_min_height'] = '200'; };
76
-
77
- // If it's not registered
78
- else:
79
- if(!isset($swp_user_options['locationSite'])) { $swp_user_options['locationSite'] = 'both'; };
80
- if(!isset($swp_user_options['totes'])) { $swp_user_options['totes'] = true; };
81
- if(!isset($swp_user_options['totesEach'])) { $swp_user_options['totesEach'] = true; };
82
- if(!isset($swp_user_options['twitterID'])) { $swp_user_options['twitterID'] = false; };
83
- $swp_user_options['swp_twitter_card'] = false;
84
- $swp_user_options['visualTheme'] = 'flatFresh';
85
- $swp_user_options['dColorSet'] = 'fullColor';
86
- $swp_user_options['iColorSet'] = 'fullColor';
87
- $swp_user_options['oColorSet'] = 'fullColor';
88
- $swp_user_options['sideDColorSet'] = 'fullColor';
89
- $swp_user_options['sideIColorSet'] = 'fullColor';
90
- $swp_user_options['sideOColorSet'] = 'fullColor';
91
- $swp_user_options['floatStyleSource'] = true;
92
- $swp_user_options['buttonSize'] = 1;
93
- $swp_user_options['buttonFloat'] = 'fullWidth';
94
- if(!isset($swp_user_options['sideReveal'])) { $swp_user_options['sideReveal'] = 'slide';};
95
- if(!isset($swp_user_options['swp_float_scr_sz'])) { $swp_user_options['swp_float_scr_sz'] = 1100;};
96
- $swp_user_options['cttTheme'] = 'style1';
97
- $swp_user_options['twitter_shares'] = false;
98
- if(!isset($swp_user_options['float'])) { $swp_user_options['float'] = true; };
99
- if(!isset($swp_user_options['floatOption'])) { $swp_user_options['floatOption'] = 'bottom'; };
100
- if(!isset($swp_user_options['floatBgColor'])) { $swp_user_options['floatBgColor'] = '#ffffff';};
101
- if(!isset($swp_user_options['floatStyle'])) { $swp_user_options['floatStyle'] = 'default';};
102
- if(!isset($swp_user_options['customColor'])) { $swp_user_options['customColor'] = '#000000';};
103
- $swp_user_options['recover_shares'] = false;
104
- if(!isset($swp_user_options['recovery_format'])) { $swp_user_options['recovery_format'] = 'unchanged'; };
105
- if(!isset($swp_user_options['recovery_protocol'])) { $swp_user_options['recovery_protocol'] = 'unchanged'; };
106
- if(!isset($swp_user_options['recovery_prefix'])) { $swp_user_options['recovery_prefix'] = 'unchanged'; };
107
- if(!isset($swp_user_options['swDecimals'])) { $swp_user_options['swDecimals'] = 0; };
108
- if(!isset($swp_user_options['swp_decimal_separator'])) { $swp_user_options['swp_decimal_separator'] = 'period';};
109
- if(!isset($swp_user_options['swTotesFormat'])) { $swp_user_options['swTotesFormat'] = 'totesalt'; };
110
- if($swp_user_options['swTotesFormat'] == 'totes') { $swp_user_options['swTotesFormat'] = 'totesalt'; };
111
- $swp_user_options['googleAnalytics'] = false;
112
- if(!isset($swp_user_options['dashboardShares'])) { $swp_user_options['dashboardShares'] = true; };
113
- $swp_user_options['linkShortening'] = false;
114
- $swp_user_options['minTotes'] = 0;
115
- if(!isset($swp_user_options['cacheMethod'])) { $swp_user_options['cacheMethod'] = 'advanced'; };
116
- if(!isset($swp_user_options['rawNumbers'])) { $swp_user_options['rawNumbers'] = false; };
117
- if(!isset($swp_user_options['notShowing'])) { $swp_user_options['notShowing'] = false; };
118
- if(!isset($swp_user_options['visualEditorBug'])) { $swp_user_options['visualEditorBug'] = false; };
119
- if(!isset($swp_user_options['loopFix'])) { $swp_user_options['loopFix'] = false; };
120
- if(!isset($swp_user_options['sniplyBuster'])) { $swp_user_options['sniplyBuster'] = false; };
121
- if(!isset($swp_user_options['analyticsMedium'])) { $swp_user_options['analyticsMedium'] = 'social'; };
122
- if(!isset($swp_user_options['analyticsCampaign'])) { $swp_user_options['analyticsCampaign'] = 'SocialWarfare'; };
123
- $swp_user_options['swp_click_tracking'] = false;
124
- $swp_user_options['orderOfIconsSelect'] = 'manual';
125
- $swp_user_options['pinit_toggle'] = false;
126
- $swp_user_options['pinit_location_horizontal'] = 'center';
127
- $swp_user_options['pinit_location_vertical'] = 'top';
128
-
129
- endif;
130
-
131
- if(!isset($swp_user_options['newOrderOfIcons'])):
132
- $swp_user_options['newOrderOfIcons']['active'] = array(
133
- "twitter" => "Twitter",
134
- "linkedIn" => "LinkedIn",
135
- "pinterest" => "Pinterest",
136
- "facebook" => "Facebook",
137
- "googlePlus" => "Google Plus"
138
- );
139
- elseif(isset($swp_user_options['newOrderOfIcons']) && is_swp_registered() == false):
140
- $swp_options_page = array(
141
- 'tabs' => array(
142
- 'links' => array(
143
- )
144
- ),
145
- 'options' => array()
146
- );
147
- $swp_options_page = apply_filters( 'swp_options' , $swp_options_page );
148
- foreach($swp_options_page['options']['swp_display']['buttons']['content'] as $key => $value):
149
- if(isset($swp_user_options['newOrderOfIcons'][$key]) && $value['premium'] == true):
150
- unset($swp_user_options['newOrderOfIcons'][$key]);
151
- endif;
152
- endforeach;
153
- endif;
154
-
155
- return $swp_user_options;
156
- }
157
-
158
- function swp_get_single_option($key) {
159
- $option = swp_get_user_options();
160
- return $option[$key];
161
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/admin-options-page/admin-options-page.css DELETED
@@ -1,571 +0,0 @@
1
- /*********************************************************
2
-
3
- A Responsive Grid System
4
-
5
- *********************************************************/
6
-
7
- .sw-grid {
8
- float: left;
9
- margin-bottom: 2.127659574468%;
10
- padding-top: 0;
11
- }
12
-
13
- .sw-grid-right {
14
- float: right;
15
- margin-bottom: 2.127659574468%;
16
- padding-top: 0;
17
- }
18
-
19
- .sw-col-60,
20
- .sw-col-140,
21
- .sw-col-220,
22
- .sw-col-300,
23
- .sw-col-380,
24
- .sw-col-460,
25
- .sw-col-540,
26
- .sw-col-620,
27
- .sw-col-700,
28
- .sw-col-780,
29
- .sw-col-860 {
30
- margin-right: 2.127659574468%;
31
- }
32
-
33
- .sw-col-60 {
34
- width: 6.382978723404%;
35
- }
36
-
37
- .sw-col-140 {
38
- width: 14.893617021277%;
39
- }
40
-
41
- .sw-col-220 {
42
- width: 23.404255319149%;
43
- }
44
-
45
- .sw-col-300 {
46
- width: 31.914893617021%;
47
- }
48
-
49
- .sw-col-380 {
50
- width: 40.425531914894%;
51
- }
52
-
53
- .sw-col-460 {
54
- width: 48.936170212766%;
55
- }
56
-
57
- .sw-col-540 {
58
- width: 57.446808510638%;
59
- }
60
-
61
- .sw-col-620 {
62
- width: 65.957446808511%;
63
- }
64
-
65
- .sw-col-700 {
66
- width: 74.468085106383%;
67
- }
68
-
69
- .sw-col-780 {
70
- width: 82.978723404255%;
71
- }
72
-
73
- .sw-col-860 {
74
- width: 91.489361702128%;
75
- }
76
-
77
- .sw-col-940 {
78
- width: 100%;
79
- }
80
-
81
- .sw-fit {
82
- margin-left: 0 !important;
83
- margin-right: 0 !important;
84
- }
85
-
86
- .sw-clearfix:after,
87
- .sw-clearfix:before
88
- {
89
- content: ' ';
90
- display: table;
91
- }
92
-
93
- .sw-clearfix:after {
94
- clear: both;
95
- }
96
- .sw-clearfix {clear:both;width:100%;}
97
-
98
- img {
99
- -ms-interpolation-mode: bicubic;
100
- border: 0;
101
- height: auto;
102
- max-width: 100%;
103
- vertical-align: middle;
104
- }
105
- .sw-admin-divider {
106
- width:100%;
107
- height:1px;
108
- border-bottom:1px solid #CED3DC;
109
- margin:20px 0 40px 0;
110
- }
111
- .sw-hidden {display:none!important;}
112
- /*********************************************************
113
-
114
- The Header Menu
115
-
116
- *********************************************************/
117
-
118
- #wpwrap, #wpcontent {background:#fff;padding-left:0;}
119
- .sw-top-menu {border-bottom: 1px solid #CED3DC;float:none;background:#fff;z-index:5;margin:0;}
120
- .sw-header-logo {height:75px;float:left;}
121
- .sw-header-menu {height:75px;margin:0;}
122
- .sw-header-menu li {
123
- float: left;
124
- margin: 0 15px;
125
- font-size: 16px;
126
- display:table;
127
- height:75px;
128
- }
129
- .sw-header-menu li:focus, .sw-header-menu li a:focus {outline:none;box-shadow:none;}
130
- .sw-header-menu li span {padding:0 5px 5px 5px;}
131
- .sw-header-menu li.sw-active-tab span, .sw-header-menu li:hover span {
132
- border-bottom:4px solid #30394f;
133
- }
134
- .sw-header-menu li a {
135
- color: #30394f;
136
- text-decoration:none;
137
- display:table-cell;
138
- vertical-align:middle;
139
- }
140
- .sw-top-menu .sw-grid {
141
- margin-bottom:0;
142
- }
143
- /*********************************************************
144
-
145
- The Header Menu
146
-
147
- *********************************************************/
148
- .sw-admin-wrapper, .sw-header-wrapper {
149
- clear: both;
150
- margin: 20px auto 20px auto;
151
- padding: 0 40px 20px 40px;
152
- position: relative;
153
- }
154
- .sw-header-wrapper {margin:0;}
155
- .sw-tabs-container .sw-admin-tab {display:none;}
156
- .sw-tabs-container .sw-admin-tab:nth-child(1) {display:block;}
157
- .sw-admin-tab h2 {
158
- font-size: 26px;
159
- line-height: 1.2;
160
- margin: 0;
161
- }
162
- .sw-admin-tab h2.sw-h-label {
163
- line-height:56px;
164
- }
165
- p.sw-subtitle {
166
- font-size: 16px;
167
- line-height: 1.2;
168
- margin: 10px 0 30px 0;
169
- }
170
- p.sw-checkbox-label, p.sw-input-label, p.sw-select-label, p.sw-authenticate-label {
171
- font-size: 16px;
172
- font-weight: bold;
173
- padding-left:10%;
174
- }
175
- .sw-select-label.sw-no-padding {
176
- padding-left:0;
177
- }
178
- p.sw-short {
179
- margin:1em 0 0 0;
180
- }
181
- p.sw-subtext-label {
182
- margin-top: -10px;
183
- }
184
- .sw-admin-sidebar img {
185
- margin: 5px 0 10px 0;
186
- }
187
- .system-status-wrapper {
188
- display:none;
189
- }
190
- .system-status-container {
191
- width: 90%;
192
- height: 250px;
193
- overflow: hidden;
194
- border: 1px solid #CED3DC;
195
- padding: 5%;
196
- }
197
- h3.sw-buttons-toggle {
198
- width: 100px;
199
- float: left;
200
- clear: left;
201
- margin: 15px 0 30px 0;
202
- padding-left:10%;
203
- }
204
- /*********************************************************
205
-
206
- Checkboxes
207
-
208
- *********************************************************/
209
- .sw-checkbox-toggle {
210
- width:150px;
211
- height:46px;
212
- background-color:#30394f;
213
- float:right;
214
- margin:5px 0;
215
- cursor:pointer;
216
- border-radius:4px;
217
- overflow:hidden;
218
- position:relative;
219
- }
220
- .sw-checkbox-on, .sw-checkbox-off {
221
- color: white;
222
- font-size: 15px;
223
- text-align: center;
224
- line-height: 46px;
225
- position:absolute;
226
- top:0;
227
- width:50%;
228
- height:100%;
229
- }
230
- .sw-checkbox-toggle[status="on"] .sw-checkbox-on {
231
- left: 0;
232
- background-color:#71C069;
233
- }
234
- .sw-checkbox-toggle[status="on"] .sw-checkbox-off, .sw-checkbox-toggle[status="off"] .sw-checkbox-on {
235
- display:none;
236
- }
237
- .sw-checkbox-toggle[status="off"] .sw-checkbox-off {
238
- right: 0;
239
- background-color:#ee464f;
240
- }
241
- input.sw-admin-input {
242
- padding: 15px;
243
- border: 1px solid #ced3cd;
244
- border-radius: 4px;
245
- float: right;
246
- box-shadow: none;
247
- margin:2px 0 1px 0;
248
- width:100%;
249
- }
250
- .sw-grid select {
251
- width: 100%;
252
- box-shadow: none;
253
- border: 1px solid #ced3cd;
254
- height: 51px;
255
- padding: 15px;
256
- margin: 2px 1px 3px 0;
257
- border-radius:4px;
258
- }
259
- a.button.sw-navy-button,a.button.sw-blue-button,a.button.sw-green-button,a.button.sw-red-button {
260
- padding: 15px 30px;
261
- height: auto;
262
- line-height: 1;
263
- border-radius: 4px;
264
- box-shadow: none;
265
- float: right;
266
- margin: 15px 0;
267
- }
268
- a.button.sw-navy-button, a.button.sw-navy-button:focus {
269
- background: #30394f;
270
- color: #fff;
271
- border-color: #2a2d34;
272
- box-shadow:none;
273
- }
274
- a.button.sw-navy-button:hover, a.button.sw-blue-button:hover {
275
- background: #2a2d34;
276
- border-color: #2a2d34;
277
- color: #fff;
278
- box-shadow:none;
279
- }
280
- a.button.sw-blue-button, a.button.sw-blue-button:focus {
281
- background: #6bcce9;
282
- border-color: #6bcce9;
283
- color: #fff;
284
- box-shadow:none;
285
- }
286
- a.button.sw-green-button, a.button.sw-green-button:focus {
287
- background: #71C069;
288
- color: #fff;
289
- border-color: #71C069;
290
- box-shadow:none;
291
- }
292
- a.button.sw-red-button, a.button.sw-red-button:focus, a.button.sw-red-button:hover {
293
- background: #ee464f;
294
- color: #fff;
295
- border-color: #ee464f;
296
- box-shadow:none;
297
- }
298
- .sw-admin-tab a.button {
299
- margin:5px 0 15px 0;
300
- }
301
- .sw-save-settings {
302
- width:100%;
303
- text-align:center;
304
- }
305
- .sw-red-notice,
306
- .sw-green-notice {
307
- color: #fff;
308
- padding: 15px;
309
- border-radius: 2px;
310
- margin:15px 0;
311
- }
312
-
313
- .sw-red-notice, .sw-loading-message { background: #ee464f }
314
- .sw-green-notice, .sw-loading-complete { background: #71C069 }
315
- .sw-loading-bg {
316
- width:100%;
317
- position:fixed;
318
- top:0;
319
- left:0;
320
- height:100%;
321
- background:rgba(0,0,0,0.8);
322
- z-index:999999999999;
323
- }
324
-
325
- .sw-loading-message:before,
326
- .sw-green-notice:before, .sw-loading-complete:before {
327
- font-family: 'Dashicons';
328
- font-size: 26px;
329
- margin: 0 15px 0 0;
330
- vertical-align: middle;
331
- }
332
-
333
- .sw-red-notice:before, .sw-red-notice:before {
334
- font-family:'sw-icon-font';
335
- font-size: 26px;
336
- margin: 0 15px 0 0;
337
- vertical-align: middle;
338
- content:'E';
339
- }
340
- .sw-red-notice a {
341
- color: #fff;
342
- font-weight: bold;
343
- text-decoration: none;
344
- border-bottom: 2px solid #fff;
345
- }
346
- .sw-red-notice a:hover {
347
- color: #30394f;
348
- border-bottom: 2px solid #30394f;
349
- }
350
-
351
- .sw-loading-message:before { content: "\f158" }
352
- .sw-green-notice:before, .sw-loading-complete:before { content: "\f147" }
353
- .sw-admin-tab .two-thirds-advanced h2.sw-h-label {
354
- line-height: 1.2;
355
- margin-bottom: 15px;
356
- }
357
- .sw-italic {
358
- font-style:italic;
359
- }
360
- p.sw-subtitle.sw-registration-text {
361
- padding: 20px 0 0 0;
362
- font-size: 120%;
363
- line-height: 175%;
364
- }
365
- .registration-wrapper[registration="1"] .swp_is_not_registered {display:none;}
366
- .registration-wrapper[registration="0"] .swp_is_registered {display:none;}
367
- .tweet-count-wrapper[registration="true"] .swp_tweets_not_activated {display:none;}
368
- .sw-tweet-count-demo {margin:20px 0;}
369
- .sw-loading-message, .sw-loading-complete {
370
- position: fixed;
371
- top: 50%;
372
- left: 50%;
373
- border-radius: 3px;
374
- padding: 25px;
375
- text-align: center;
376
- font-size: 20px;
377
- color: white;
378
- width:240px;
379
- margin-top: -46px;
380
- margin-left: -120px;
381
- }
382
- /*********************************************************
383
-
384
- Buttons Drag & Drop
385
-
386
- *********************************************************/
387
-
388
- .sw-active,
389
- .sw-inactive {
390
- margin: 0 0 5px 0;
391
- min-width: 50px;
392
- min-height:40px;
393
- border: 1px dashed #ced3dc;
394
- padding: 0;
395
- border-radius: 4px;
396
- width: auto;
397
- height: auto;
398
- display: inline-block;
399
- }
400
- .sw-s {
401
- font-family:'sw-icon-font';
402
- color: #fff;
403
- padding: 5px 30px 4px;
404
- margin: 7px 5px 7px;
405
- border-radius: 2px;
406
- display:inline-block;
407
- font-style:normal;
408
- font-size:15px;
409
- line-height:15px;
410
- cursor:pointer;
411
- }
412
-
413
- .sw-twitter-icon:before { content: 's'; }
414
- .sw-s.sw-twitter-icon {
415
- background-color: #429cd6;
416
- border-color: #3c87b2;
417
- }
418
-
419
- .sw-googlePlus-icon:before { content: 'h'; }
420
- .sw-s.sw-googlePlus-icon {
421
- background-color: #df4b37;
422
- border-color: #c44133;
423
- }
424
-
425
- .sw-facebook-icon:before { content: 'j'; }
426
- .sw-s.sw-facebook-icon {
427
- background-color: #3a589e;
428
- border-color: #2e4675;
429
- }
430
-
431
- .sw-pinterest-icon:before { content: 'b'; }
432
- .sw-s.sw-pinterest-icon {
433
- background-color: #cd2029;
434
- border-color: #aa1b29;
435
- }
436
-
437
- .sw-linkedIn-icon:before { content: 'f'; }
438
- .sw-s.sw-linkedIn-icon {
439
- background-color: #0d77b7;
440
- border-color: #0c6591;
441
- }
442
-
443
- .sw-tumblr-icon:before { content: 'r'; }
444
- .sw-s.sw-tumblr-icon {
445
- background-color: #39475d;
446
- border-color: #27313f;
447
- }
448
-
449
- .sw-stumbleupon-icon:before { content: 'q'; }
450
- .sw-s.sw-stumbleupon-icon {
451
- background-color: #ef5025;
452
- border-color: #d34427;
453
- }
454
-
455
- .sw-reddit-icon:before { content: 'a'; }
456
- .sw-s.sw-reddit-icon {
457
- background-color: #f04b23;
458
- border-color: #d33f27;
459
- }
460
-
461
- .sw-yummly-icon:before { content: 'x'; }
462
- .sw-s.sw-yummly-icon {
463
- background-color: #e26426;
464
- border-color: #b65027;
465
- }
466
-
467
- .sw-whatsapp-icon:before { content: 'y'; }
468
- .sw-s.sw-whatsapp-icon {
469
- background-color: #71c169;
470
- border-color: #28b04b;
471
- }
472
-
473
- .sw-pocket-icon:before { content: 'B'; }
474
- .sw-s.sw-pocket-icon {
475
- background-color: #ef4056;
476
- border-color: #ce3d55;
477
- }
478
-
479
- .sw-buffer-icon:before { content: 'z'; }
480
- .sw-s.sw-buffer-icon {
481
- background-color: #323b43;
482
- border-color: #59626a;
483
- }
484
-
485
- .sw-email-icon:before { content: 'k'; }
486
- .sw-s.sw-email-icon {
487
- background-color: #6bcce9;
488
- border-color: #6bcce9;
489
- }
490
- .sw-hacker_news-icon:before { content: 'D'; }
491
- .sw-s.sw-hacker_news-icon {
492
- background-color: #f16522;
493
- border-color: #d85623;
494
- }
495
- .sw-flipboard-icon:before { content: 'C'; }
496
- .sw-s.sw-flipboard-icon {
497
- background-color: #e02828;
498
- border-color: #bf2626;
499
- }
500
- @media screen and (max-width: 1350px) {
501
- .sw-header-menu li {
502
- font-size:12px;
503
- margin:0 10px;
504
- }
505
- }
506
- @media screen and (max-width: 1080px) {
507
- .sw-header-logo {
508
- display:none;
509
- }
510
- }
511
- /*********************************************************
512
-
513
- Premium
514
-
515
- *********************************************************/
516
- .sw-admin-wrapper[sw-registered="0"] div[premium="1"] {
517
- opacity:0.3;
518
- }
519
- .sw-admin-wrapper[sw-registered="0"] .sw-option-container {
520
- position:relative;
521
- }
522
- .sw-admin-wrapper[sw-registered="0"] div[premium="1"] .sw-premium-blocker {
523
- position:absolute;
524
- width:100%;
525
- height:100%;
526
- top:0;
527
- left:0;
528
- }
529
- .sw-admin-wrapper[sw-registered="0"] div[premium="1"] .sw-premium-blocker:not(.no-icon):before {
530
- font-family: 'sw-icon-font';
531
- content: 'E';
532
- font-size: 24px;
533
- float:right;
534
- margin:20px 20px 0 0;
535
- }
536
- .sw-admin-wrapper[sw-registered="0"] i[premium-button="1"] {
537
- display:none;
538
- }
539
- .sw-admin-wrapper[sw-registered="1"] .sw-premium-buttons {
540
- display:none;
541
- }
542
- .sw-admin-wrapper[sw-registered="1"] .sw-premium-blocker {
543
- display:none;
544
- }
545
- .ui-tooltip.sw-admin-hover-notice {
546
- background: #ee464f;
547
- color: #fff;
548
- padding: 15px;
549
- border-radius: 2px;
550
- margin: 15px 0;
551
- border:0;
552
- box-shadow:none;
553
- max-width:none;
554
- padding:20px;
555
- }
556
- .sw-admin-hover-notice i:before {
557
- font-family: 'sw-icon-font';
558
- font-size: 26px;
559
- margin: 0 15px 0 0;
560
- vertical-align: middle;
561
- content: 'E';
562
- float:left;
563
- font-style:normal;
564
- }
565
- .swp_upload_image_field {
566
- display:none;
567
- }
568
- .sw-admin-image-preview {
569
- max-height:50px;
570
- float:right;
571
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/admin-options-page/admin-options-page.js DELETED
@@ -1,1714 +0,0 @@
1
- /*********************************************************
2
-
3
-
4
-
5
- The Admin Options Page
6
-
7
-
8
-
9
- *********************************************************/
10
-
11
-
12
-
13
- // Document Ready Trigger
14
-
15
- jQuery(document).ready(function() {
16
-
17
- jQuery('.nc_socialPanel').animate({opacity:0},0);
18
-
19
- /*********************************************************
20
-
21
-
22
-
23
- Header Menu
24
-
25
-
26
-
27
- *********************************************************/
28
-
29
-
30
-
31
- jQuery(document).ready(function() {
32
-
33
- offset = jQuery('.sw-top-menu').offset();
34
-
35
- width = jQuery('.sw-top-menu').width();
36
-
37
- jQuery('.sw-top-menu').css({
38
-
39
- 'position':'fixed',
40
-
41
- 'left':offset.left,
42
-
43
- 'top':offset.top,
44
-
45
- 'width':width
46
-
47
- });
48
-
49
- jQuery('.sw-admin-wrapper').css('padding-top', '75px');
50
-
51
-
52
-
53
- });
54
-
55
-
56
-
57
- /*********************************************************
58
-
59
-
60
-
61
- Tab Navigation
62
-
63
-
64
-
65
- *********************************************************/
66
-
67
- jQuery(document).on('click','.sw-tab-selector',function(event) {
68
-
69
- event.preventDefault ? event.preventDefault() : (event.returnValue = false);
70
-
71
- jQuery("html, body").animate({ scrollTop: 0 }, 0);
72
-
73
- var tab = jQuery(this).attr('data-link');
74
-
75
- jQuery('.sw-admin-tab').hide();
76
-
77
- jQuery('.nc_socialPanel').animate({opacity:0},0);
78
-
79
- jQuery('#'+tab).show();
80
-
81
- jQuery('.sw-header-menu li').removeClass('sw-active-tab');
82
-
83
- jQuery(this).parents('li').addClass('sw-active-tab');
84
-
85
- if(tab == 'swp_styles') {
86
-
87
- swSetWidths(true);
88
-
89
- activateHoverStates();
90
-
91
- } else {
92
-
93
- jQuery('.nc_socialPanel').animate({opacity:0},0);
94
-
95
- }
96
-
97
- swp_conditional_fields();
98
-
99
- });
100
-
101
-
102
-
103
- /*********************************************************
104
-
105
-
106
-
107
- Checkboxes
108
-
109
-
110
-
111
- *********************************************************/
112
-
113
- jQuery(document).on('click','.sw-checkbox-toggle',function(event) {
114
-
115
- var status = jQuery(this).attr('status');
116
-
117
- var elem = jQuery(this).attr('field');
118
-
119
- if( status == 'on' ) {
120
-
121
- jQuery(this).attr('status','off');
122
-
123
- jQuery(elem).prop('checked', false);
124
-
125
- } else {
126
-
127
- jQuery(this).attr('status','on');
128
-
129
- jQuery(elem).prop('checked', true);
130
-
131
- };
132
-
133
- swp_fetch_all_options();
134
-
135
- save_color_toggle();
136
-
137
- swp_conditional_fields();
138
-
139
- });
140
-
141
-
142
-
143
- jQuery('form.sw-admin-settings-form input, form.sw-admin-settings-form select').on('change' , function() {
144
-
145
- swp_conditional_fields();
146
-
147
- var new_options = swp_fetch_all_options();
148
-
149
- save_color_toggle()
150
-
151
- });
152
-
153
-
154
-
155
- default_options = swp_fetch_all_options();
156
-
157
-
158
-
159
- // End the Document Ready Trigger
160
-
161
- });
162
-
163
-
164
-
165
- /*********************************************************
166
-
167
-
168
-
169
- A Function to change the color of the save button
170
-
171
-
172
-
173
- *********************************************************/
174
-
175
- function save_color_toggle() {
176
-
177
- var new_options = swp_fetch_all_options();
178
-
179
- if(JSON.stringify(new_options) != JSON.stringify(default_options)) {
180
-
181
- jQuery('.sw-save-settings').removeClass('sw-navy-button').addClass('sw-red-button');
182
-
183
- } else {
184
-
185
- jQuery('.sw-save-settings').removeClass('sw-red-button').addClass('sw-navy-button');
186
-
187
- }
188
-
189
- }
190
-
191
-
192
-
193
- /*********************************************************
194
-
195
-
196
-
197
- A Function to gather all the settings
198
-
199
-
200
-
201
- *********************************************************/
202
-
203
-
204
-
205
- function swp_fetch_all_options() {
206
-
207
-
208
-
209
- // Create an object
210
-
211
- values = {};
212
-
213
-
214
-
215
- // Loop through all the inputs
216
-
217
- jQuery('form.sw-admin-settings-form input, form.sw-admin-settings-form select').each( function() {
218
-
219
-
220
-
221
- var name = jQuery(this).attr('name');
222
-
223
- if(jQuery(this).attr('type') == 'checkbox') {
224
-
225
- var value = jQuery(this).prop('checked');
226
-
227
- } else {
228
-
229
- var value = jQuery(this).val();
230
-
231
- }
232
-
233
- values[name] = value;
234
-
235
- });
236
-
237
-
238
-
239
- // Create the objects
240
-
241
- values.newOrderOfIcons = {};
242
-
243
-
244
-
245
- // Loop through each active network
246
-
247
- jQuery('.sw-active i').each( function() {
248
-
249
- var network = jQuery(this).attr('value');
250
-
251
- values.newOrderOfIcons[network] = network;
252
-
253
- });
254
-
255
- console.log(values);
256
-
257
- return values;
258
-
259
-
260
-
261
- }
262
-
263
-
264
-
265
- /*********************************************************
266
-
267
-
268
-
269
- A Function send the array of setting to ajax.php
270
-
271
-
272
-
273
- *********************************************************/
274
-
275
-
276
-
277
- jQuery(document).ready(function() {
278
-
279
-
280
-
281
- jQuery('.sw-save-settings').on('click',function(event) {
282
-
283
-
284
-
285
- // Block the default action
286
-
287
- event.preventDefault ? event.preventDefault() : (event.returnValue = false);
288
-
289
-
290
-
291
- // The loading screen
292
-
293
- swp_loading_screen();
294
-
295
-
296
-
297
- // Fetch all the settings
298
-
299
- settings = swp_fetch_all_options();
300
-
301
-
302
-
303
- // Prepare date
304
-
305
- var data = {
306
-
307
- action: 'swp_store_settings',
308
-
309
- settings: settings
310
-
311
- };
312
-
313
-
314
-
315
- // Send the POST request
316
-
317
- jQuery.post(ajaxurl, data, function(response) {
318
-
319
-
320
-
321
- // Clear the loading screen
322
-
323
- swp_clear_loading_screen();
324
-
325
-
326
-
327
- // Reset the default options variable
328
-
329
- default_options = swp_fetch_all_options();
330
-
331
- save_color_toggle();
332
-
333
-
334
-
335
- });
336
-
337
-
338
-
339
- });
340
-
341
- });
342
-
343
-
344
-
345
- function swp_loading_screen() {
346
-
347
- jQuery('body').append('<div class="sw-loading-bg"><div class="sw-loading-message">Saving Changes</div></div>');
348
-
349
- }
350
-
351
-
352
-
353
- function swp_clear_loading_screen() {
354
-
355
- jQuery('.sw-loading-message').html('Success!').removeClass('sw-loading-message').addClass('sw-loading-complete');
356
-
357
- jQuery('.sw-loading-bg').delay(1000).fadeOut(1000);
358
-
359
- setTimeout( function() {
360
-
361
- jQuery('.sw-loading-bg').remove();
362
-
363
- } , 2000);
364
-
365
- }
366
-
367
-
368
-
369
- /*********************************************************
370
-
371
-
372
-
373
- A Function to update the preview buttons
374
-
375
-
376
-
377
- *********************************************************/
378
-
379
-
380
-
381
- jQuery(document).ready( function() {
382
-
383
-
384
-
385
- availableOptions = {
386
-
387
- flatFresh: {
388
-
389
- fullColor : 'Full Color',
390
-
391
- lightGray : 'Light Gray',
392
-
393
- mediumGray : 'Medium Gray',
394
-
395
- darkGray : 'Dark Gray',
396
-
397
- lgOutlines : 'Light Gray Outlines',
398
-
399
- mdOutlines : 'Medium Gray Outlines',
400
-
401
- dgOutlines : 'Dark Gray Outlines',
402
-
403
- colorOutlines : 'Color Outlines',
404
-
405
- customColor : 'Custom Color',
406
-
407
- ccOutlines : 'Custom Color Outlines'
408
-
409
- },
410
-
411
- leaf: {
412
-
413
- fullColor : 'Full Color',
414
-
415
- lightGray : 'Light Gray',
416
-
417
- mediumGray : 'Medium Gray',
418
-
419
- darkGray : 'Dark Gray',
420
-
421
- lgOutlines : 'Light Gray Outlines',
422
-
423
- mdOutlines : 'Medium Gray Outlines',
424
-
425
- dgOutlines : 'Dark Gray Outlines',
426
-
427
- colorOutlines : 'Color Outlines',
428
-
429
- customColor : 'Custom Color',
430
-
431
- ccOutlines : 'Custom Color Outlines'
432
-
433
- },
434
-
435
- pill: {
436
-
437
- fullColor : 'Full Color',
438
-
439
- lightGray : 'Light Gray',
440
-
441
- mediumGray : 'Medium Gray',
442
-
443
- darkGray : 'Dark Gray',
444
-
445
- lgOutlines : 'Light Gray Outlines',
446
-
447
- mdOutlines : 'Medium Gray Outlines',
448
-
449
- dgOutlines : 'Dark Gray Outlines',
450
-
451
- colorOutlines : 'Color Outlines',
452
-
453
- customColor : 'Custom Color',
454
-
455
- ccOutlines : 'Custom Color Outlines'
456
-
457
- },
458
-
459
- threeDee: {
460
-
461
- fullColor : 'Full Color',
462
-
463
- lightGray : 'Light Gray',
464
-
465
- mediumGray : 'Medium Gray',
466
-
467
- darkGray : 'Dark Gray'
468
-
469
- },
470
-
471
- connected: {
472
-
473
- fullColor : 'Full Color',
474
-
475
- lightGray : 'Light Gray',
476
-
477
- mediumGray : 'Medium Gray',
478
-
479
- darkGray : 'Dark Gray',
480
-
481
- lgOutlines : 'Light Gray Outlines',
482
-
483
- mdOutlines : 'Medium Gray Outlines',
484
-
485
- dgOutlines : 'Dark Gray Outlines',
486
-
487
- colorOutlines : 'Color Outlines',
488
-
489
- customColor : 'Custom Color',
490
-
491
- ccOutlines : 'Custom Color Outlines'
492
-
493
- },
494
-
495
- shift: {
496
-
497
- fullColor : 'Full Color',
498
-
499
- lightGray : 'Light Gray',
500
-
501
- mediumGray : 'Medium Gray',
502
-
503
- darkGray : 'Dark Gray',
504
-
505
- lgOutlines : 'Light Gray Outlines',
506
-
507
- mdOutlines : 'Medium Gray Outlines',
508
-
509
- dgOutlines : 'Dark Gray Outlines',
510
-
511
- colorOutlines : 'Color Outlines',
512
-
513
- customColor : 'Custom Color',
514
-
515
- ccOutlines : 'Custom Color Outlines'
516
-
517
- }
518
-
519
- };
520
-
521
-
522
-
523
- // Check if we are on the admin page
524
-
525
- if(jQuery('select[name="visualTheme"]').length) {
526
-
527
-
528
-
529
- // Update the items and previews on the initial page load
530
-
531
- var visualTheme = jQuery('select[name="visualTheme"]').val();
532
-
533
- var dColorSet = jQuery('select[name="dColorSet"]').val();
534
-
535
- var iColorSet = jQuery('select[name="iColorSet"]').val();
536
-
537
- var oColorSet = jQuery('select[name="oColorSet"]').val();
538
-
539
- jQuery('select[name="dColorSet"] option, select[name="iColorSet"] option, select[name="oColorSet"] option').remove();
540
-
541
- jQuery.each(availableOptions[visualTheme], function(index, value) {
542
-
543
- if(index == dColorSet) {
544
-
545
- jQuery('select[name="dColorSet"]').append('<option value="'+index+'" selected>'+value+'</option>');
546
-
547
- } else {
548
-
549
- jQuery('select[name="dColorSet"]').append('<option value="'+index+'">'+value+'</option>');
550
-
551
- };
552
-
553
- if(index == iColorSet) {
554
-
555
- jQuery('select[name="iColorSet"]').append('<option value="'+index+'" selected>'+value+'</option>');
556
-
557
- } else {
558
-
559
- jQuery('select[name="iColorSet"]').append('<option value="'+index+'">'+value+'</option>');
560
-
561
- };
562
-
563
- if(index == oColorSet) {
564
-
565
- jQuery('select[name="oColorSet"]').append('<option value="'+index+'" selected>'+value+'</option>');
566
-
567
- } else {
568
-
569
- jQuery('select[name="oColorSet"]').append('<option value="'+index+'">'+value+'</option>');
570
-
571
- };
572
-
573
-
574
-
575
-
576
-
577
- if( dColorSet == 'customColor'
578
-
579
- || dColorSet == 'ccOutlines'
580
-
581
- || iColorSet == 'customColor'
582
-
583
- || iColorSet == 'ccOutlines'
584
-
585
- || oColorSet == 'customColor'
586
-
587
- || oColorSet == 'ccOutlines' )
588
-
589
- {
590
-
591
-
592
-
593
- jQuery('.customColor_wrapper').slideDown();
594
-
595
- updateCustomColor();
596
-
597
-
598
-
599
- } else {
600
-
601
- jQuery('.customColor_wrapper').slideUp();
602
-
603
- };
604
-
605
- });
606
-
607
-
608
-
609
- // A function for updating the preview
610
-
611
- function updateTheme() {
612
-
613
- var visualTheme = jQuery('select[name="visualTheme"]').val();
614
-
615
- var dColorSet = jQuery('select[name="dColorSet"]').val();
616
-
617
- var iColorSet = jQuery('select[name="iColorSet"]').val();
618
-
619
- var oColorSet = jQuery('select[name="oColorSet"]').val();
620
-
621
- var buttonsClass = 'swp_'+visualTheme+' swp_d_'+dColorSet+' swp_i_'+iColorSet+' swp_o_'+oColorSet;
622
-
623
- if(typeof lastClass === 'undefined'){
624
-
625
- jQuery('.nc_socialPanel').removeClass('swp_flatFresh swp_d_fullColor swp_i_fullColor swp_o_fullColor').addClass(buttonsClass);
626
-
627
- } else {
628
-
629
- jQuery('.nc_socialPanel').removeClass(lastClass).addClass(buttonsClass);
630
-
631
- };
632
-
633
- lastClass = buttonsClass;
634
-
635
- if(dColorSet == 'customColor' || dColorSet == 'ccOutlines' || iColorSet == 'customColor' || iColorSet == 'ccOutlines' || oColorSet == 'customColor' || oColorSet == 'ccOutlines' ) {
636
-
637
- jQuery('.customColor_wrapper').slideDown();
638
-
639
-
640
-
641
- updateCustomColor();
642
-
643
-
644
-
645
-
646
-
647
- } else {
648
-
649
- jQuery('.customColor_wrapper').slideUp();
650
-
651
- };
652
-
653
- };
654
-
655
- setTimeout( updateTheme , 2000 );
656
-
657
-
658
-
659
- // If the color set changes, update the preview with the function
660
-
661
- jQuery('select[name="dColorSet"], select[name="iColorSet"], select[name="oColorSet"]').on('change', updateTheme);
662
-
663
-
664
-
665
- // If the visual theme is updated, update the preview manually
666
-
667
- jQuery('select[name="visualTheme"]').on('change', function() {
668
-
669
-
670
-
671
- var visualTheme = jQuery('select[name="visualTheme"]').val();
672
-
673
- var dColorSet = jQuery('select[name="dColorSet"]').val();
674
-
675
- var iColorSet = jQuery('select[name="iColorSet"]').val();
676
-
677
- var oColorSet = jQuery('select[name="oColorSet"]').val();
678
-
679
-
680
-
681
- var i = 0;
682
-
683
- var array = availableOptions[visualTheme];
684
-
685
-
686
-
687
- var dColor = array.hasOwnProperty(dColorSet);
688
-
689
- var iColor = array.hasOwnProperty(iColorSet);
690
-
691
- var oColor = array.hasOwnProperty(oColorSet);
692
-
693
-
694
-
695
- jQuery('select[name="dColorSet"] option, select[name="iColorSet"] option, select[name="oColorSet"] option').remove();
696
-
697
- jQuery.each(availableOptions[visualTheme], function(index, value) {
698
-
699
- if(index == dColorSet || (dColor == false && i == 0)) {
700
-
701
- jQuery('select[name="dColorSet"]').append('<option value="'+index+'" selected>'+value+'</option>');
702
-
703
- } else {
704
-
705
- jQuery('select[name="dColorSet"]').append('<option value="'+index+'">'+value+'</option>');
706
-
707
- };
708
-
709
- if(index == iColorSet || (iColor == false && i == 0)) {
710
-
711
- jQuery('select[name="iColorSet"]').append('<option value="'+index+'" selected>'+value+'</option>');
712
-
713
- } else {
714
-
715
- jQuery('select[name="iColorSet"]').append('<option value="'+index+'">'+value+'</option>');
716
-
717
- };
718
-
719
- if(index == oColorSet || (oColor == false && i == 0)) {
720
-
721
- jQuery('select[name="oColorSet"]').append('<option value="'+index+'" selected>'+value+'</option>');
722
-
723
- } else {
724
-
725
- jQuery('select[name="oColorSet"]').append('<option value="'+index+'">'+value+'</option>');
726
-
727
- };
728
-
729
- ++i;
730
-
731
- });
732
-
733
-
734
-
735
- var buttonsClass = 'swp_'+visualTheme+' swp_d_'+dColorSet+' swp_i_'+iColorSet+' swp_o_'+oColorSet;
736
-
737
- if(typeof lastClass === 'undefined'){
738
-
739
- jQuery('.nc_socialPanel').removeClass('swp_flatFresh swp_d_fullColor swp_i_fullColor swp_o_fullColor').addClass(buttonsClass);
740
-
741
- } else {
742
-
743
- jQuery('.nc_socialPanel').removeClass(lastClass).addClass(buttonsClass);
744
-
745
- };
746
-
747
- lastClass = buttonsClass;
748
-
749
- });
750
-
751
- }
752
-
753
-
754
-
755
- });
756
-
757
-
758
-
759
- function updateCustomColor() {
760
-
761
-
762
-
763
- var visualTheme = jQuery('select[name="visualTheme"]').val();
764
-
765
- var dColorSet = jQuery('select[name="dColorSet"]').val();
766
-
767
- var iColorSet = jQuery('select[name="iColorSet"]').val();
768
-
769
- var oColorSet = jQuery('select[name="oColorSet"]').val();
770
-
771
-
772
-
773
- jQuery('style.swp_customColorStuff').remove();
774
-
775
- var colorCode = jQuery('input[name="customColor"]').val();
776
-
777
- customCSS = '';
778
-
779
- if(dColorSet == 'customColor' || iColorSet == 'customColor' || oColorSet == 'customColor') {
780
-
781
- var customCSS = '.nc_socialPanel.swp_d_customColor a, html body .nc_socialPanel.swp_i_customColor .nc_tweetContainer:hover a, body .nc_socialPanel.swp_o_customColor:hover a {color:white} .nc_socialPanel.swp_d_customColor .nc_tweetContainer, html body .nc_socialPanel.swp_i_customColor .nc_tweetContainer:hover, body .nc_socialPanel.swp_o_customColor:hover .nc_tweetContainer {background-color:'+colorCode+';border:1px solid '+colorCode+';}';
782
-
783
- }
784
-
785
- if(dColorSet == 'ccOutlines' || iColorSet == 'ccOutlines' || oColorSet == 'ccOutlines' ) {
786
-
787
- var customCSS = customCSS+' .nc_socialPanel.swp_d_ccOutlines a, html body .nc_socialPanel.swp_i_ccOutlines .nc_tweetContainer:hover a, body .nc_socialPanel.swp_o_ccOutlines:hover a { color:'+colorCode+'; } .nc_socialPanel.swp_d_ccOutlines .nc_tweetContainer, html body .nc_socialPanel.swp_i_ccOutlines .nc_tweetContainer:hover, body .nc_socialPanel.swp_o_ccOutlines:hover .nc_tweetContainer { background:transparent; border:1px solid '+colorCode+'; }';
788
-
789
- }
790
-
791
-
792
-
793
- jQuery('head').append('<style type="text/css" class="swp_customColorStuff">'+customCSS+'</style>');
794
-
795
- };
796
-
797
-
798
-
799
- /*********************************************************
800
-
801
-
802
-
803
- A Function to update the button sizing options
804
-
805
-
806
-
807
- *********************************************************/
808
-
809
-
810
-
811
- function swUpdateScale() {
812
-
813
- jQuery('.nc_socialPanel').css({width:'100%'});
814
-
815
- var width = jQuery('.nc_socialPanel').width();
816
-
817
- scale = jQuery('select[name="buttonSize"]').val();
818
-
819
- align = jQuery('select[name="buttonFloat"]').val();
820
-
821
- if((align == 'fullWidth' && scale != 1) || scale >= 1) {
822
-
823
- newWidth = width / scale;
824
-
825
- jQuery('.nc_socialPanel').css('cssText', 'width:'+newWidth+'px!important;');
826
-
827
- jQuery('.nc_socialPanel').css({
828
-
829
- 'transform':'scale('+scale+')',
830
-
831
- 'transform-origin':'left'
832
-
833
- });
834
-
835
- } else if(align != 'fullWidth' && scale < 1) {
836
-
837
- newWidth = width / scale;
838
-
839
- jQuery('.nc_socialPanel').css({
840
-
841
- 'transform':'scale('+scale+')',
842
-
843
- 'transform-origin':align
844
-
845
- });
846
-
847
- }
848
-
849
- swSetWidths(true);
850
-
851
- activateHoverStates();
852
-
853
- }
854
-
855
-
856
-
857
- jQuery(document).ready( function() {
858
-
859
-
860
-
861
- scale = jQuery('select[name="buttonSize"]').val();
862
-
863
- jQuery('select[name="buttonSize"],select[name="buttonFloat"]').on('change',function() {
864
-
865
- swUpdateScale();
866
-
867
- });
868
-
869
-
870
-
871
- });
872
-
873
-
874
-
875
- /*********************************************************
876
-
877
-
878
-
879
- Update the Click To Tweet Demo
880
-
881
-
882
-
883
- *********************************************************/
884
-
885
- function update_ctt_demo() {
886
-
887
- var current_style = jQuery('.swp_CTT').attr('data-style');
888
-
889
- var new_style = jQuery('select[name="cttTheme"]').val();
890
-
891
- jQuery('.swp_CTT').removeClass(current_style).addClass(new_style).attr('data-style',new_style);
892
-
893
- }
894
-
895
-
896
-
897
- jQuery(document).ready(function($) {
898
-
899
-
900
-
901
- update_ctt_demo();
902
-
903
- jQuery('select[name="cttTheme"]').on('change', function() {
904
-
905
- update_ctt_demo();
906
-
907
- });
908
-
909
-
910
-
911
- });
912
-
913
-
914
-
915
- /*********************************************************
916
-
917
-
918
-
919
- A function to show/hide conditionals
920
-
921
-
922
-
923
- *********************************************************/
924
-
925
-
926
-
927
- jQuery(document).ready(function() {
928
-
929
- swp_conditional_fields();
930
-
931
- jQuery('[name="float"]')
932
-
933
-
934
-
935
- });
936
-
937
-
938
-
939
- function swp_conditional_fields() {
940
-
941
-
942
-
943
- // Loop through all the fields that have dependancies
944
-
945
- jQuery('div[dep]').each( function() {
946
-
947
-
948
-
949
- // Fetch the conditional values
950
-
951
- var con_dep = jQuery(this).attr('dep');
952
-
953
- var con_dep_val = jQuery.parseJSON(jQuery(this).attr('dep_val'));
954
-
955
-
956
-
957
- // Fetch the value of checkboxes or other input types
958
-
959
- if(jQuery('[name="'+con_dep+'"]').attr('type') == 'checkbox') {
960
-
961
- var value = jQuery('[name="'+con_dep+'"]').prop('checked');
962
-
963
- } else {
964
-
965
- var value = jQuery('[name="'+con_dep+'"]').val();
966
-
967
- }
968
-
969
-
970
-
971
- // Show or hide based on the conditional values (and the dependancy must be visible in case it is dependant)
972
-
973
- if(jQuery.inArray(value,con_dep_val) !== -1 && jQuery('[name="'+con_dep+'"]').parent('.sw-grid').is(':visible')) {
974
-
975
- jQuery(this).show();
976
-
977
- } else {
978
-
979
- jQuery(this).hide();
980
-
981
- }
982
-
983
- });
984
-
985
- }
986
-
987
-
988
-
989
- /*******************************************************
990
-
991
-
992
-
993
- Register the Plugin
994
-
995
-
996
-
997
- *******************************************************/
998
-
999
-
1000
-
1001
- // Wait for the DOM to load
1002
-
1003
- jQuery(document).ready(function() {
1004
-
1005
-
1006
-
1007
- // Register the plugin
1008
-
1009
- jQuery('#register-plugin').on('click',function(event) {
1010
-
1011
- // Block the default action
1012
- event.preventDefault ? event.preventDefault() : (event.returnValue = false);
1013
-
1014
- // The loading screen
1015
- swp_loading_screen();
1016
-
1017
-
1018
-
1019
- // Fetch all the registration values
1020
- var regCode = jQuery('input[name="regCode"]').val();
1021
- var email = jQuery('input[name="emailAddress"]').val();
1022
- var domain = jQuery('input[name="domain"]').val();
1023
-
1024
- // Create the ajax URL
1025
- url = 'https://warfareplugins.com/registration-api/?activity=register&emailAddress='+email+'&domain='+domain+'&registrationCode='+regCode;
1026
-
1027
- ajax_data = {
1028
- 'action':'swp_ajax_passthrough',
1029
- 'url':url
1030
- }
1031
-
1032
- // Ping the home server to create a registration log
1033
- jQuery.post( ajaxurl, ajax_data, function( data ) {
1034
-
1035
- // Parse the JSON response
1036
- var object = jQuery.parseJSON(data);
1037
-
1038
- // If the cURL request failed, let's attempt CORS
1039
- if(object == 0) {
1040
-
1041
- console.log('cURL request failed. Attempting CORS request.');
1042
- jQuery.get( url , function( data ) {
1043
-
1044
- var object = jQuery.parseJSON(data);
1045
- console.log('CORS request status: '+object['status']);
1046
- jQuery('input[name="premiumCode"]').val(object['premiumCode']);
1047
-
1048
- // Prepare data
1049
- var data = {
1050
- action: 'swp_store_registration',
1051
- premiumCode: object['premiumCode']
1052
- };
1053
-
1054
- // Send the response to admin-ajax.php
1055
- jQuery.post(ajaxurl, data, function(response) {
1056
-
1057
- // Clear the loading screen
1058
- swp_clear_loading_screen();
1059
-
1060
- // Toggle the registration display
1061
- jQuery('.registration-wrapper').attr('registration','1');
1062
- jQuery('.sw-admin-wrapper').attr('sw-registered','1');
1063
-
1064
- });
1065
- });
1066
-
1067
- // If the response was a failure...
1068
- } else if(object['status'] == 'failure') {
1069
-
1070
- // Alert the failure status
1071
- alert('Failure: '+object['message']);
1072
-
1073
- // Clear the loading screen
1074
-
1075
- swp_clear_loading_screen();
1076
-
1077
-
1078
-
1079
- // If the response was a success
1080
-
1081
- } else {
1082
-
1083
- jQuery('input[name="premiumCode"]').val(object['premiumCode']);
1084
-
1085
-
1086
-
1087
- // Prepare data
1088
-
1089
- var data = {
1090
-
1091
- action: 'swp_store_registration',
1092
-
1093
- premiumCode: object['premiumCode']
1094
-
1095
- };
1096
-
1097
-
1098
-
1099
- // Send the response to admin-ajax.php
1100
-
1101
- jQuery.post(ajaxurl, data, function(response) {
1102
-
1103
-
1104
-
1105
- // Clear the loading screen
1106
-
1107
- swp_clear_loading_screen();
1108
-
1109
-
1110
-
1111
- // Toggle the registration display
1112
-
1113
- jQuery('.registration-wrapper').attr('registration','1');
1114
-
1115
- jQuery('.sw-admin-wrapper').attr('sw-registered','1');
1116
-
1117
-
1118
-
1119
- });
1120
-
1121
- }
1122
-
1123
- });
1124
-
1125
- });
1126
-
1127
-
1128
-
1129
- /*******************************************************
1130
-
1131
-
1132
-
1133
- Unregister the Plugin
1134
-
1135
-
1136
-
1137
- *******************************************************/
1138
-
1139
- jQuery('#unregister-plugin').on('click',function(event) {
1140
-
1141
-
1142
-
1143
- // Block the default action
1144
- event.preventDefault ? event.preventDefault() : (event.returnValue = false);
1145
-
1146
-
1147
-
1148
- // The loading screen
1149
-
1150
- swp_loading_screen();
1151
-
1152
-
1153
-
1154
- // Fetch the registration values
1155
-
1156
- var regCode = jQuery('input[name="regCode"]').val();
1157
-
1158
- var email = jQuery('input[name="emailAddress"]').val();
1159
-
1160
- var domain = jQuery('input[name="domain"]').val();
1161
-
1162
-
1163
-
1164
- // Assemble the link for the Ajax request
1165
-
1166
- url = 'https://warfareplugins.com/registration-api/?activity=unregister&emailAddress='+email+'&domain='+domain+'&registrationCode='+regCode;
1167
-
1168
-
1169
-
1170
- // Create the ajax object
1171
-
1172
- ajax_data = {
1173
-
1174
- 'action':'swp_ajax_passthrough',
1175
-
1176
- 'url':url
1177
-
1178
- }
1179
-
1180
-
1181
-
1182
- // Ping the home server for the registration log
1183
-
1184
- jQuery.post( ajaxurl, ajax_data, function( data ) {
1185
-
1186
-
1187
-
1188
- // Parse the JSON response
1189
-
1190
- var object = jQuery.parseJSON(data);
1191
-
1192
-
1193
-
1194
- // Clear out the premium code and the email address field
1195
-
1196
- jQuery('input[name="premiumCode"]').val('');
1197
-
1198
- jQuery('input[name="emailAddress"]').val('');
1199
-
1200
-
1201
-
1202
- // Prepare data
1203
-
1204
- var data = {
1205
-
1206
- action: 'swp_delete_registration',
1207
-
1208
- premiumCode: '',
1209
-
1210
- emailAddress: ''
1211
-
1212
- };
1213
-
1214
-
1215
-
1216
- // Send the response to admin-ajax.php
1217
-
1218
- jQuery.post(ajaxurl, data, function(response) {
1219
-
1220
-
1221
-
1222
- // Clear the loading screen
1223
-
1224
- swp_clear_loading_screen();
1225
-
1226
-
1227
-
1228
- // Toggle the registration display
1229
-
1230
- jQuery('.registration-wrapper').attr('registration','0');
1231
-
1232
- jQuery('.sw-admin-wrapper').attr('sw-registered','0');
1233
-
1234
-
1235
-
1236
- });
1237
-
1238
-
1239
-
1240
- });
1241
-
1242
- });
1243
-
1244
-
1245
-
1246
-
1247
-
1248
- });
1249
-
1250
-
1251
-
1252
- /*********************************************************
1253
-
1254
-
1255
-
1256
- Rearm the Registration if the domain has changed
1257
-
1258
-
1259
-
1260
- *********************************************************/
1261
-
1262
-
1263
-
1264
- // Wait for the DOM to load
1265
-
1266
- jQuery(document).ready(function() {
1267
-
1268
-
1269
-
1270
- jQuery('input[name="premiumCode"]').attr('readonly','readonly');
1271
-
1272
- jQuery('input[name="regCode"]').parent('.swp_field').hide();
1273
-
1274
- var premcode = jQuery('input#domain').attr('data-premcode');
1275
-
1276
-
1277
-
1278
- if (jQuery('input[name="premiumCode"]').val() != '' && jQuery('input[name="premiumCode"]').val() != premcode) {
1279
-
1280
-
1281
-
1282
- // Fetch our variables
1283
-
1284
- var regCode = jQuery('input[name="regCode"]').val();
1285
-
1286
- var email = jQuery('input[name="emailAddress"]').val();
1287
-
1288
- var domain = jQuery('input[name="domain"]').val();
1289
-
1290
-
1291
-
1292
- // Create the unregister url
1293
-
1294
- url = 'https://warfareplugins.com/registration-api/?activity=unregister&emailAddress='+email+'&premiumCode='+jQuery('input[name="premiumCode"]').val();
1295
-
1296
-
1297
-
1298
- // Create the ajax object
1299
-
1300
- ajax_data = {
1301
-
1302
- 'action':'swp_ajax_passthrough',
1303
-
1304
- 'url':url
1305
-
1306
- }
1307
-
1308
-
1309
-
1310
- // Pass the URL to the admin-ajax.php passthrough function
1311
-
1312
- jQuery.get( ajaxurl, ajax_data , function(data) {
1313
-
1314
-
1315
-
1316
- // Create the register URL
1317
-
1318
- url = 'https//warfareplugins.com/registration-api/?activity=register&emailAddress='+email+'&domain='+domain+'&registrationCode='+regCode;
1319
-
1320
-
1321
-
1322
- // Create the ajax object
1323
-
1324
- ajax_data = {
1325
-
1326
- 'action':'swp_ajax_passthrough',
1327
-
1328
- 'url':url
1329
-
1330
- }
1331
-
1332
-
1333
-
1334
- // Pass the URL to the admin-ajax.php passthrough function
1335
-
1336
- jQuery.post( ajaxurl, ajax_data , function(subdata) {
1337
-
1338
-
1339
-
1340
- // Parse the response
1341
-
1342
- var info = jQuery.parseJSON(subdata);
1343
-
1344
-
1345
-
1346
- // If the rearm was successful
1347
-
1348
- if(info['status'] == 'success') {
1349
-
1350
-
1351
-
1352
- // Prepare data
1353
-
1354
- var data = {
1355
-
1356
- action: 'swp_store_registration',
1357
-
1358
- premiumCode: info['premiumCode']
1359
-
1360
- };
1361
-
1362
-
1363
-
1364
- // Send the response to admin-ajax.php
1365
-
1366
- jQuery.post(ajaxurl, data, function(response) {
1367
-
1368
-
1369
-
1370
- // Toggle the registration display
1371
-
1372
- jQuery('.registration-wrapper').attr('registration','1');
1373
-
1374
- jQuery('.sw-admin-wrapper').attr('sw-registered','1');
1375
-
1376
-
1377
-
1378
- });
1379
-
1380
-
1381
-
1382
- jQuery('input[name="premiumCode"]').val(info['premiumCode']);
1383
-
1384
-
1385
-
1386
- } else {
1387
-
1388
-
1389
-
1390
- // Prepare data
1391
-
1392
- var data = {
1393
-
1394
- action: 'swp_delete_registration',
1395
-
1396
- premiumCode: '',
1397
-
1398
- emailAddress: ''
1399
-
1400
- };
1401
-
1402
-
1403
-
1404
- // Send the response to admin-ajax.php
1405
-
1406
- jQuery.post(ajaxurl, data, function(response) {
1407
-
1408
-
1409
-
1410
- // Toggle the registration display
1411
-
1412
- jQuery('.registration-wrapper').attr('registration','0');
1413
-
1414
- jQuery('.sw-admin-wrapper').attr('sw-registered','0');
1415
-
1416
-
1417
-
1418
- });
1419
-
1420
-
1421
-
1422
- }
1423
-
1424
- });
1425
-
1426
-
1427
-
1428
-
1429
-
1430
- } );
1431
-
1432
- };
1433
-
1434
-
1435
-
1436
- });
1437
-
1438
-
1439
-
1440
- /*******************************************************
1441
-
1442
-
1443
-
1444
- Make the buttons sortable
1445
-
1446
-
1447
-
1448
- *******************************************************/
1449
-
1450
-
1451
-
1452
- jQuery(document).ready( function() {
1453
-
1454
- jQuery( '.sw-buttons-sort.sw-active' ).sortable({
1455
-
1456
- connectWith: ".sw-buttons-sort.sw-inactive",
1457
-
1458
- update: function( event, ui ) { save_color_toggle(); }
1459
-
1460
- });
1461
-
1462
- jQuery( '.sw-buttons-sort.sw-inactive' ).sortable({
1463
-
1464
- connectWith: ".sw-buttons-sort.sw-active",
1465
-
1466
- update: function( event, ui ) { save_color_toggle(); }
1467
-
1468
- });
1469
-
1470
- });
1471
-
1472
-
1473
-
1474
- /*********************************************************
1475
-
1476
-
1477
-
1478
- A Function send the array of setting to ajax.php
1479
-
1480
-
1481
-
1482
- *********************************************************/
1483
-
1484
- jQuery.fn.selectText = function(){
1485
-
1486
- var doc = document
1487
-
1488
- , element = this[0]
1489
-
1490
- , range, selection
1491
-
1492
- ;
1493
-
1494
- if (doc.body.createTextRange) {
1495
-
1496
- range = document.body.createTextRange();
1497
-
1498
- range.moveToElementText(element);
1499
-
1500
- range.select();
1501
-
1502
- } else if (window.getSelection) {
1503
-
1504
- selection = window.getSelection();
1505
-
1506
- range = document.createRange();
1507
-
1508
- range.selectNodeContents(element);
1509
-
1510
- selection.removeAllRanges();
1511
-
1512
- selection.addRange(range);
1513
-
1514
- }
1515
-
1516
- };
1517
-
1518
-
1519
-
1520
- jQuery(document).ready( function() {
1521
-
1522
- jQuery('.sw-system-status').on('click', function() {
1523
-
1524
-
1525
-
1526
- // Block the default action
1527
-
1528
- event.preventDefault ? event.preventDefault() : (event.returnValue = false);
1529
-
1530
-
1531
-
1532
- jQuery('.system-status-wrapper').slideToggle();
1533
-
1534
- jQuery('.system-status-container').selectText();
1535
-
1536
-
1537
-
1538
- });
1539
-
1540
- });
1541
-
1542
-
1543
-
1544
- jQuery(document).ready( function() {
1545
-
1546
- jQuery('.sw-premium-blocker').tooltip({
1547
-
1548
- items: '.sw-premium-blocker',
1549
-
1550
- content: '<i></i>Unlock this feature by registering your license.',
1551
-
1552
- position: {
1553
-
1554
- my: 'center top',
1555
-
1556
- at: 'center top'
1557
-
1558
- },
1559
-
1560
- tooltipClass: "sw-admin-hover-notice",
1561
-
1562
- open: function(event, ui)
1563
-
1564
- {
1565
-
1566
- if (typeof(event.originalEvent) === 'undefined')
1567
-
1568
- {
1569
-
1570
- return false;
1571
-
1572
- }
1573
-
1574
-
1575
-
1576
- var $id = jQuery(ui.tooltip).attr('id');
1577
-
1578
-
1579
-
1580
- // close any lingering tooltips
1581
-
1582
- jQuery('div.ui-tooltip').not('#' + $id).remove();
1583
-
1584
-
1585
-
1586
- // ajax function to pull in data and add it to the tooltip goes here
1587
-
1588
- },
1589
-
1590
- close: function(event, ui)
1591
-
1592
- {
1593
-
1594
- ui.tooltip.hover(function()
1595
-
1596
- {
1597
-
1598
- jQuery(this).stop(true).fadeTo(400, 1);
1599
-
1600
- },
1601
-
1602
- function()
1603
-
1604
- {
1605
-
1606
- jQuery(this).fadeOut('400', function()
1607
-
1608
- {
1609
-
1610
- jQuery(this).remove();
1611
-
1612
- });
1613
-
1614
- });
1615
-
1616
- }
1617
-
1618
- });
1619
-
1620
- });
1621
-
1622
-
1623
-
1624
- /*********************************************************
1625
-
1626
-
1627
-
1628
- A Function for image upload buttons
1629
-
1630
-
1631
-
1632
- *********************************************************/
1633
-
1634
-
1635
-
1636
- jQuery(document).ready(function($){
1637
-
1638
-
1639
-
1640
-
1641
-
1642
- var custom_uploader;
1643
-
1644
-
1645
-
1646
-
1647
-
1648
- jQuery('.swp_upload_image_button').click(function(e) {
1649
-
1650
-
1651
-
1652
- e.preventDefault();
1653
-
1654
-
1655
-
1656
- input_field = jQuery(this).attr('for');
1657
-
1658
-
1659
-
1660
- //If the uploader object has already been created, reopen the dialog
1661
-
1662
- if (custom_uploader) {
1663
-
1664
- custom_uploader.open();
1665
-
1666
- return;
1667
-
1668
- }
1669
-
1670
-
1671
-
1672
- //Extend the wp.media object
1673
-
1674
- custom_uploader = wp.media.frames.file_frame = wp.media({
1675
-
1676
- title: 'Choose Image',
1677
-
1678
- button: {
1679
-
1680
- text: 'Choose Image'
1681
-
1682
- },
1683
-
1684
- multiple: false
1685
-
1686
- });
1687
-
1688
-
1689
-
1690
- //When a file is selected, grab the URL and set it as the text field's value
1691
-
1692
- custom_uploader.on('select', function() {
1693
-
1694
- attachment = custom_uploader.state().get('selection').first().toJSON();
1695
-
1696
- jQuery('input[name="'+input_field+'"').val(attachment.url);
1697
-
1698
- });
1699
-
1700
-
1701
-
1702
- //Open the uploader dialog
1703
-
1704
- custom_uploader.open();
1705
-
1706
-
1707
-
1708
- });
1709
-
1710
-
1711
-
1712
-
1713
-
1714
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/admin-options-page/admin-options-page.php DELETED
@@ -1,1004 +0,0 @@
1
- <?php
2
-
3
- /***************************************************************
4
-
5
- Enqueue the Menu Item
6
-
7
- ***************************************************************/
8
-
9
- // Add the link to the WordPress menu
10
- add_action( 'admin_menu', 'swp_admin_options_page' );
11
- function swp_admin_options_page() {
12
-
13
- // Declare the menu link
14
- $swp_menu = add_menu_page(
15
- 'Social Warfare',
16
- 'Social Warfare',
17
- 'manage_options',
18
- 'social-warfare',
19
- 'swp_plugin_options',
20
- swp_PLUGIN_DIR.'/functions/admin-options-page/images/socialwarfare-20x20.png'
21
- );
22
-
23
- // Hook into the CSS and Javascript Enqueue process for this specific page
24
- add_action( 'admin_print_styles-' . $swp_menu, 'swp_admin_options_css' );
25
- add_action( 'admin_print_scripts-'. $swp_menu, 'swp_admin_options_js');
26
- }
27
-
28
- /***************************************************************
29
-
30
- Enqueue the Settings Page CSS & Javascript
31
-
32
- ***************************************************************/
33
-
34
- // Enqueue the Admin Options CSS
35
- function swp_admin_options_css() {
36
- wp_enqueue_style( 'swp_admin_options_css', swp_PLUGIN_DIR.'/functions/admin-options-page/admin-options-page.css' , array() , swp_VERSION );
37
- }
38
-
39
- // Enqueue the Admin Options JS
40
- function swp_admin_options_js() {
41
- wp_enqueue_script('jquery');
42
- wp_enqueue_script( 'jquery-effects-core' );
43
- wp_enqueue_script( 'jquery-ui-core' );
44
- wp_enqueue_script( 'jquery-ui-sortable' );
45
- wp_enqueue_script( 'jquery-ui-tooltip' );
46
- wp_enqueue_media();
47
- wp_enqueue_script( 'swp_admin_options_js', swp_PLUGIN_DIR.'/functions/admin-options-page/admin-options-page.js' , array('jquery') , swp_VERSION );
48
- }
49
-
50
- /***************************************************************
51
-
52
- Build the Settings Page Form
53
-
54
- ***************************************************************/
55
-
56
- // We'll build the form here
57
- function swp_plugin_options() {
58
-
59
- // Make sure the person accessing this link has proper permissions to access it
60
- if ( !current_user_can( 'manage_options' ) ) {
61
- wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
62
- }
63
-
64
- swp_build_options_page();
65
-
66
- }
67
-
68
- /***************************************************************
69
-
70
- A Function to Parse the Array & Builg the Options Page
71
-
72
- ***************************************************************/
73
- function swp_build_options_page() {
74
-
75
- $swp_user_options = get_option('socialWarfareOptions');
76
-
77
- // Create all of the options in one giant array
78
- $swp_options_page = array(
79
-
80
- // A List of Options Page Tabs and Their Titles
81
- 'tabs' => array(
82
- 'links' => array(
83
- )
84
- ),
85
-
86
- // A list of options in each of the options tabs
87
- 'options' => array()
88
- );
89
-
90
-
91
- // Fetch the global options array
92
- // global $swp_options_page;
93
- $swp_options_page = apply_filters( 'swp_options' , $swp_options_page );
94
-
95
- /***************************************************************
96
-
97
- Build the header menu
98
-
99
- ***************************************************************/
100
-
101
- // Wrapper for the entire content area
102
- echo '<div class="sw-header-wrapper">';
103
-
104
- echo '<div class="sw-grid sw-col-940 sw-top-menu">';
105
- echo '<div class="sw-grid sw-col-700">';
106
- echo '<img class="sw-header-logo" src="'.swp_PLUGIN_DIR.'/functions/admin-options-page/images/social-warfare-light.png" />';
107
- echo '<ul class="sw-header-menu">';
108
- $i=0; foreach ( $swp_options_page['tabs']['links'] as $key => $value): ++$i;
109
- echo '<li'.($i == 1 ? ' class="sw-active-tab"' : '').'><a class="sw-tab-selector" href="#" data-link="'.$key.'"><span>'.$value.'</span></a></li>';
110
- endforeach;
111
- echo '</ul>';
112
- echo '</div>';
113
- echo '<div class="sw-grid sw-col-220 sw-fit">';
114
- echo '<a href="#" class="button sw-navy-button sw-save-settings">Save Changes</a>';
115
- echo '</div>';
116
- echo '<div class="sw-clearfix"></div>';
117
- echo '</div>';
118
- echo '</div>';
119
-
120
- /***************************************************************
121
-
122
- Build the Tab Container
123
-
124
- ***************************************************************/
125
-
126
- echo '<div class="sw-admin-wrapper" sw-registered="'.is_swp_registered().'">';
127
-
128
- echo '<form class="sw-admin-settings-form">';
129
-
130
- // Wrapper for the left 3/4 non-sidebar content
131
- echo '<div class="sw-tabs-container sw-grid sw-col-700">';
132
-
133
- // Loop through the options tabs and build the options page
134
- foreach($swp_options_page['options'] as $tab_name => $tab_options):
135
-
136
- // Individual Tab Container - Full Width
137
- echo '<div id="'.$tab_name.'" class="sw-admin-tab sw-grid sw-col-940">';
138
-
139
- // Loop through and output each option module for this tab
140
- foreach($tab_options as $key => $option):
141
-
142
- /***************************************************************
143
-
144
- Title Module
145
-
146
- ***************************************************************/
147
-
148
- if($option['type'] == 'title'):
149
- echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container '.$key.'_wrapper" '.(isset($option['dep']) ? 'dep="'.$option['dep'].'" dep_val=\''.json_encode($option['dep_val']).'\'' : '').' '.(isset($option['premium']) ? 'premium="'.$option['premium'].'"' : '').'>';
150
- echo '<h2>'.$option['content'].'</h2>';
151
- echo '<div class="sw-premium-blocker" title="test"></div>';
152
- echo '</div>';
153
- endif;
154
-
155
- /***************************************************************
156
-
157
- Description Module
158
-
159
- ***************************************************************/
160
-
161
- if($option['type'] == 'paragraph'):
162
- echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container '.$key.'_wrapper" '.(isset($option['dep']) ? 'dep="'.$option['dep'].'" dep_val=\''.json_encode($option['dep_val']).'\'' : '').' '.(isset($option['premium']) ? 'premium="'.$option['premium'].'"' : '').'>';
163
- echo '<p class="sw-subtitle">'.$option['content'].'</p>';
164
- echo '<div class="sw-premium-blocker no-icon"></div>';
165
- echo '</div>';
166
- endif;
167
-
168
- /***************************************************************
169
-
170
- Image Module
171
-
172
- ***************************************************************/
173
-
174
- if($option['type'] == 'image'):
175
- echo '<img src="'.$option['content'].'">';
176
- endif;
177
-
178
- /***************************************************************
179
-
180
- Image Upload Module
181
-
182
- ***************************************************************/
183
-
184
- if($option['type'] == 'image_upload'):
185
-
186
- // Fetch the value
187
- if(isset($swp_user_options[$key])):
188
- $value = $swp_user_options[$key];
189
- else:
190
- $value = $option['default'];
191
- endif;
192
-
193
- // Create a whole parent container
194
- echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container '.$key.'_wrapper" '.(isset($option['dep']) ? 'dep="'.$option['dep'].'" dep_val=\''.json_encode($option['dep_val']).'\'' : '').' '.(isset($option['premium']) ? 'premium="'.$option['premium'].'"' : '').'>';
195
-
196
- // Title goes on the left
197
- echo '<div class="sw-grid sw-col-300">';
198
- echo '<p class="sw-checkbox-label">Custom Button Image</p>';
199
- echo '</div>';
200
-
201
- // Button goes in the middle
202
- echo '<div class="sw-grid sw-col-300">';
203
- echo '<label for="upload_image">
204
- <input class="swp_upload_image_field" type="text" size="36" name="'.$key.'" value="'.$value.'" />
205
- <a class="swp_upload_image_button button sw-navy-button" for="'.$key.'" type="button" value="Upload Image" />Upload Image</a>
206
- </label>';
207
- echo '</div>';
208
-
209
- // Preview goes on the right
210
- echo '<div class="sw-grid sw-col-300 sw-fit">';
211
- echo '<div class="sw-preview-container">';
212
- if($value):
213
- echo '<img class="sw-admin-image-preview" src="'.$value.'" />';
214
- echo '<div class="sw-delete-image"></div>';
215
- endif;
216
- echo '</div>';
217
- echo '</div>';
218
-
219
- echo '</div>';
220
-
221
- endif;
222
-
223
-
224
- /***************************************************************
225
-
226
- Buttons Module
227
-
228
- ***************************************************************/
229
-
230
- if($option['type'] == 'buttons'):
231
-
232
- // The Active Buttons
233
- echo '<div class="sw-grid sw-col-300">';
234
- echo '<h3 class="sw-buttons-toggle">Active</h3>';
235
- echo '</div>';
236
-
237
- echo '<div class="sw-grid sw-col-620 sw-fit">';
238
- echo '<div class="sw-active sw-buttons-sort">';
239
-
240
- // Check if we have saved settings to use
241
- if( isset($swp_user_options['newOrderOfIcons'] ) ):
242
-
243
- // Loop through each active button
244
- foreach($swp_user_options['newOrderOfIcons'] as $key => $value):
245
- echo '<i class="sw-s sw-'.$key.'-icon" value="'.$key.'" premium-button="'.$option['content'][$key]['premium'].'"></i>';
246
- endforeach;
247
-
248
- // Use defaults if nothing is saved
249
- else:
250
-
251
- // Loop through the available buttons
252
- foreach($option['content'] as $key => $value):
253
- if($value['default'] == true):
254
- echo '<i class="sw-s sw-'.$key.'-icon" value="'.$key.'" premium-button="'.$option['content'][$key]['premium'].'"></i>';
255
- endif;
256
- endforeach;
257
-
258
- endif;
259
-
260
- echo '</div>';
261
- echo '</div>';
262
-
263
- echo '<div class="sw-clearfix"></div>';
264
-
265
- // The Inactive Buttons
266
- echo '<div class="sw-grid sw-col-300">';
267
- echo '<h3 class="sw-buttons-toggle">Inactive</h3>';
268
- echo '</div>';
269
-
270
- echo '<div class="sw-grid sw-col-620 sw-fit">';
271
- echo '<div class="sw-inactive sw-buttons-sort">';
272
-
273
- // Check if we have saved settings to use
274
- if( isset($swp_user_options['newOrderOfIcons'] ) ):
275
-
276
- // Loop through each active button
277
- foreach($option['content'] as $key => $value):
278
- if(!isset($swp_user_options['newOrderOfIcons'][$key])):
279
- echo '<i class="sw-s sw-'.$key.'-icon" value="'.$key.'" premium-button="'.$option['content'][$key]['premium'].'"></i>';
280
- endif;
281
- endforeach;
282
-
283
- // Use defaults if nothing is saved
284
- else:
285
-
286
- // Loop through the available buttons
287
- foreach($option['content'] as $key => $value):
288
- if($value['default'] == false):
289
- echo '<i class="sw-s sw-'.$key.'-icon" value="'.$key.'" premium-button="'.$option['content'][$key]['premium'].'"></i>';
290
- endif;
291
- endforeach;
292
-
293
- endif;
294
-
295
- echo '</div>';
296
- echo '</div>';
297
-
298
- // The Inactive Buttons
299
- echo '<div class="sw-grid sw-col-940 sw-premium-buttons sw-option-container" premium="1">';
300
- echo '<div class="sw-grid sw-col-300">';
301
- echo '<h3 class="sw-buttons-toggle">Premium</h3>';
302
- echo '</div>';
303
-
304
- echo '<div class="sw-grid sw-col-620 sw-fit">';
305
- echo '<div class="sw-inactive sw-buttons-sort">';
306
-
307
- // Loop through the available buttons
308
- foreach($option['content'] as $key => $value):
309
- if($option['content'][$key]['premium'] == true):
310
- echo '<i class="sw-s sw-'.$key.'-icon" value="'.$key.'"></i>';
311
- endif;
312
- endforeach;
313
-
314
- echo '</div>';
315
- echo '</div>';
316
- echo '<div class="sw-premium-blocker"></div>';
317
- echo '</div>';
318
-
319
- endif;
320
-
321
- /***************************************************************
322
-
323
- Checkbox Module
324
-
325
- ***************************************************************/
326
-
327
- if($option['type'] == 'checkbox'):
328
-
329
- // Check for a default value
330
- if(isset($swp_user_options[$key]) && $swp_user_options[$key] == true):
331
- $status = 'on';
332
- $selected = 'checked';
333
- elseif(isset($swp_user_options[$key]) && $swp_user_options[$key] == false):
334
- $status = 'off';
335
- $selected = '';
336
- elseif($option['default'] == true):
337
- $status = 'on';
338
- $selected = 'checked';
339
- else:
340
- $status = 'off';
341
- $selected = '';
342
- endif;
343
-
344
- // Check for four-fourths size
345
- if($option['size'] == 'four-fourths'):
346
-
347
- echo '<div class="sw-grid sw-col-620"><h2 class="sw-h-label">'.$option['title'].'</h2><p class="sw-subtext-label">'.$option['description'].'</p></div>';
348
- echo '<div class="sw-grid sw-col-300 sw-fit">';
349
- echo '<div class="sw-checkbox-toggle" status="'.$status.'" field="#'.$key.'"><div class="sw-checkbox-on">ON</div><div class="sw-checkbox-off">OFF</div></div>';
350
- echo '<input type="checkbox" class="sw-hidden" name="'.$key.'" id="'.$key.'" '.$selected.'>';
351
- echo '</div>';
352
-
353
- // Check for three-fourths-advanced size
354
- elseif($option['size'] == 'two-thirds-advanced'):
355
-
356
- echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container '.$key.'_wrapper" '.(isset($option['dep']) ? 'dep="'.$option['dep'].'" dep_val=\''.json_encode($option['dep_val']).'\'' : '').' '.(isset($option['premium']) ? 'premium="'.$option['premium'].'"' : '').'>';
357
-
358
- echo '<div class="two-thirds-advanced">';
359
- echo '<div class="sw-grid sw-col-300"><h2 class="sw-h-label">'.$option['title'].'</h2><p class="sw-subtext-label">'.$option['description'].'</p></div>';
360
- echo '<div class="sw-grid sw-col-300">';
361
- echo '<div class="sw-checkbox-toggle" status="'.$status.'" field="#'.$key.'"><div class="sw-checkbox-on">ON</div><div class="sw-checkbox-off">OFF</div></div>';
362
- echo '<input type="checkbox" class="sw-hidden" name="'.$key.'" id="'.$key.'" '.$selected.'>';
363
- echo '</div>';
364
- echo '<div class="sw-grid sw-col-300 sw-fit"></div>';
365
- echo '</div>';
366
- echo '<div class="sw-clearfix"></div>';
367
- echo '<div class="sw-premium-blocker"></div>';
368
- echo '</div>';
369
-
370
- // Check for two-fourths size
371
- elseif( $option['size'] == 'two-fourths'):
372
-
373
- if($last_size == 'two-fourths'):
374
- $last_size = '';
375
- $fit = 'sw-fit';
376
- else:
377
- $last_size = 'two-fourths';
378
- $fit = '';
379
- endif;
380
-
381
- echo '<div class="sw-grid sw-col-460 sw-option-container sw-fit '.$key.'_wrapper" '.($option['dep'] ? 'dep="'.$option['dep'].'" dep_val=\''.json_encode($option['dep_val']).'\'' : '').' premium='.$option['premium'].'>';
382
- echo '<div class="sw-grid sw-col-460"><p class="sw-checkbox-label">'.$option['content'].'</p></div>';
383
- echo '<div class="sw-grid sw-col-460 sw-fit">';
384
- echo '<div class="sw-checkbox-toggle" status="'.$status.'" field="#'.$key.'"><div class="sw-checkbox-on">ON</div><div class="sw-checkbox-off">OFF</div></div>';
385
- echo '<input type="checkbox" class="sw-hidden" name="'.$key.'" id="'.$key.'" '.$selected.'>';
386
- echo '</div>';
387
- echo '<div class="sw-premium-blocker"></div>';
388
- echo '</div>';
389
-
390
- // All others
391
- else:
392
-
393
- echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container '.$key.'_wrapper" '.(isset($option['dep']) ? 'dep="'.$option['dep'].'" dep_val=\''.json_encode($option['dep_val']).'\'' : '').' premium='.$option['premium'].'>';
394
-
395
- if(isset($option['header']) && $option['header'] == true):
396
- echo '<div class="sw-grid sw-col-300"><h2 class="sw-h-label">'.$option['content'].'</h2></div>';
397
- else:
398
- echo '<div class="sw-grid sw-col-300"><p class="sw-checkbox-label">'.$option['content'].'</p></div>';
399
- endif;
400
-
401
- echo '<div class="sw-grid sw-col-300">';
402
- echo '<div class="sw-checkbox-toggle" status="'.$status.'" field="#'.$key.'"><div class="sw-checkbox-on">ON</div><div class="sw-checkbox-off">OFF</div></div>';
403
- echo '<input type="checkbox" class="sw-hidden" name="'.$key.'" id="'.$key.'" '.$selected.'>';
404
- echo '</div>';
405
- echo '<div class="sw-grid sw-col-300 sw-fit"></div>';
406
-
407
- echo '<div class="sw-premium-blocker"></div>';
408
- echo '</div>';
409
-
410
- endif;
411
- endif;
412
-
413
- /***************************************************************
414
-
415
- Input Module
416
-
417
- ***************************************************************/
418
- if($option['type'] == 'input' && $option['size'] == 'two-thirds'):
419
-
420
- if(isset($swp_user_options[$key])):
421
- $value = $swp_user_options[$key];
422
- else:
423
- $value = $option['default'];
424
- endif;
425
-
426
- echo '<div class="sw-grid sw-col-940 sw-option-container '.$key.'_wrapper" '.(isset($option['dep']) ? 'dep="'.$option['dep'].'" dep_val=\''.json_encode($option['dep_val']).'\'' : '').' '.(isset($option['premium']) ? 'premium="'.$option['premium'].'"' : '').'>';
427
- echo '<div class="sw-grid sw-col-300"><p class="sw-input-label">'.$option['name'].'</p></div>';
428
- echo '<div class="sw-grid sw-col-300"><input name="'.$key.'" type="text" class="sw-admin-input" '.(isset($option['default']) ? 'placeholder="'.$option['default'].'"' : '').' value="'.$value.'" /></div>';
429
- echo '<div class="sw-grid sw-col-300 sw-fit"></div>';
430
- echo '<div class="sw-premium-blocker"></div>';
431
- echo '<div class="sw-clearfix"></div>';
432
- echo '</div>';
433
-
434
- elseif($option['type'] == 'input' && $option['size'] == 'two-fourths'):
435
-
436
- if(isset($swp_user_options[$key])):
437
- $value = $swp_user_options[$key];
438
- else:
439
- $value = $option['default'];
440
- endif;
441
-
442
- if($last_size == 'two-fourths'):
443
- $last_size = '';
444
- $fit = 'sw-fit';
445
- else:
446
- $last_size = 'two-fourths';
447
- $fit = '';
448
- endif;
449
-
450
- echo '<div class="sw-grid sw-col-460 sw-fit sw-option-container '.$key.'_wrapper" '.(isset($option['dep']) ? 'dep="'.$option['dep'].'" dep_val=\''.json_encode($option['dep_val']).'\'' : '').' '.(isset($option['premium']) ? 'premium="'.$option['premium'].'"' : '').'>';
451
- echo '<div class="sw-grid sw-col-460"><p class="sw-input-label">'.$option['name'].'</p></div>';
452
- echo '<div class="sw-grid sw-col-460 sw-fit"><input name="'.$key.'" type="text" class="sw-admin-input" placeholder="0" value="'.$value.'" /></div>';
453
- echo '<div class="sw-premium-blocker"></div>';
454
- echo '</div>';
455
-
456
- elseif($option['type'] == 'input' && isset($option['secondary'])):
457
-
458
- if(isset($swp_user_options[$option['primary']])):
459
- $value = $swp_user_options[$option['primary']];
460
- elseif(isset($option['default'])):
461
- $value = $option['default'];
462
- endif;
463
-
464
- if(isset($swp_user_options[$option['secondary']])):
465
- $value2 = $swp_user_options[$option['secondary']];
466
- elseif(isset($option['default_2'])):
467
- $value2 = $option['default_2'];
468
- endif;
469
-
470
- echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container '.$key.'_wrapper" '.(isset($option['dep']) ? 'dep="'.$option['dep'].'" dep_val=\''.json_encode($option['dep_val']).'\'' : '').' '.(isset($option['premium']) ? 'premium="'.$option['premium'].'"' : '').'>';
471
-
472
- echo '<div class="sw-grid sw-col-300"><p class="sw-input-label">'.$option['name'].'</p></div>';
473
- echo '<div class="sw-grid sw-col-300"><input name="'.$option['primary'].'" type="text" class="sw-admin-input" '.(isset($option['default']) ? 'placeholder="'.$option['default'].'"' : '').' value="'.$value.'" /></div>';
474
- echo '<div class="sw-grid sw-col-300 sw-fit"><input name="'.$option['secondary'].'" type="text" class="sw-admin-input" '.(isset($option['default_2']) ? 'placeholder="'.$option['default_2'].'"' : '').' value="'.$value2.'" /></div>';
475
-
476
- echo '<div class="sw-premium-blocker"></div>';
477
- echo '</div>';
478
-
479
- endif;
480
-
481
- /***************************************************************
482
-
483
- Select Module
484
-
485
- ***************************************************************/
486
-
487
- if($option['type'] == 'select' && isset($option['secondary'])):
488
-
489
- if(isset($swp_user_options[$option['primary']])):
490
- $value = $swp_user_options[$option['primary']];
491
- else:
492
- $value = $option['default'];
493
- endif;
494
-
495
- if(isset($swp_user_options[$option['secondary']])):
496
- $value2 = $swp_user_options[$option['secondary']];
497
- else:
498
- $value2 = $option['default_2'];
499
- endif;
500
-
501
- echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container '.$key.'_wrapper" '.(isset($option['dep']) ? 'dep="'.$option['dep'].'" dep_val=\''.json_encode($option['dep_val']).'\'' : '').' '.(isset($option['premium']) ? 'premium="'.$option['premium'].'"' : '').'>';
502
-
503
- echo '<div class="sw-grid sw-col-300"><p class="sw-input-label">'.$option['name'].'</p></div>';
504
- echo '<div class="sw-grid sw-col-300">';
505
- echo '<select name="'.$option['primary'].'">';
506
- if(!isset($option['default'])):
507
- echo '<option value="">Select...</option>';
508
- endif;
509
- foreach( $option['content'] as $select_key => $select_value ) :
510
- echo '<option value="'.$select_key.'" '.($value == $select_key ? 'selected' :'').'>'.$select_value.'</option>';
511
- endforeach;
512
- echo '</select>';
513
- echo '</div>';
514
- echo '<div class="sw-grid sw-col-300 sw-fit">';
515
- echo '<select name="'.$option['secondary'].'">';
516
- if(!isset($option['default_2'])):
517
- echo '<option value="">Select...</option>';
518
- endif;
519
- foreach( $option['content_2'] as $select_key => $select_value ) :
520
- echo '<option value="'.$select_key.'" '.($value2 == $select_key ? 'selected' :'').'>'.$select_value.'</option>';
521
- endforeach;
522
- echo '</select>';
523
- echo '</div>';
524
-
525
- echo '<div class="sw-premium-blocker"></div>';
526
- echo '</div>';
527
-
528
- elseif( $option['type'] == 'select' && $option['size'] == 'two-fourths' ):
529
-
530
- if(isset($swp_user_options[$key])):
531
- $value = $swp_user_options[$key];
532
- else:
533
- $value = $option['default'];
534
- endif;
535
-
536
- if($last_size == 'two-fourths'):
537
- $last_size = '';
538
- $fit = 'sw-fit';
539
- else:
540
- $last_size = 'two-fourths';
541
- $fit = '';
542
- endif;
543
-
544
- echo '<div class="sw-grid sw-col-460 sw-fit sw-option-container '.$key.'_wrapper" '.(isset($option['dep']) ? 'dep="'.$option['dep'].'" dep_val=\''.json_encode($option['dep_val']).'\'' : '').' '.(isset($option['premium']) ? 'premium="'.$option['premium'].'"' : '').'>';
545
- echo '<div class="sw-grid sw-col-460"><p class="sw-checkbox-label">'.$option['name'].'</p></div>';
546
- echo '<div class="sw-grid sw-col-460 sw-fit"><select name="'.$key.'">';
547
- if(!isset($option['default'])):
548
- echo '<option value="">Select...</option>';
549
- endif;
550
- foreach( $option['content'] as $select_key => $select_value ) :
551
- echo '<option value="'.$select_key.'" '.($value == $select_key ? 'selected' :'').'>'.$select_value.'</option>';
552
- endforeach;
553
- echo '</select></div>';
554
- echo '<div class="sw-premium-blocker"></div>';
555
- echo '</div>';
556
-
557
- elseif( $option['type'] == 'select' && $option['size'] == 'two-thirds' ):
558
-
559
- if(isset($swp_user_options[$key])):
560
- $value = $swp_user_options[$key];
561
- else:
562
- $value = $option['default'];
563
- endif;
564
-
565
- echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container '.$key.'_wrapper" '.(isset($option['dep']) ? 'dep="'.$option['dep'].'" dep_val=\''.json_encode($option['dep_val']).'\'' : '').' '.(isset($option['premium']) ? 'premium="'.$option['premium'].'"' : '').'>';
566
-
567
-
568
- echo '<div class="sw-grid sw-col-300"><p class="sw-checkbox-label">'.$option['name'].'</p></div>';
569
- echo '<div class="sw-grid sw-col-300"><select name="'.$key.'">';
570
- if(!isset($option['default'])):
571
- echo '<option value="">Select...</option>';
572
- endif;
573
- foreach( $option['content'] as $select_key => $select_value ) :
574
- echo '<option value="'.$select_key.'" '.($value == $select_key ? 'selected' :'').'>'.$select_value.'</option>';
575
- endforeach;
576
- echo '</select></div>';
577
- echo '<div class="sw-grid sw-col-300 sw-fit"></div>';
578
-
579
- echo '<div class="sw-premium-blocker"></div>';
580
- echo '</div>';
581
-
582
- endif;
583
-
584
- /***************************************************************
585
-
586
- Three-Wide Column Labels Module
587
-
588
- ***************************************************************/
589
-
590
- if($option['type'] == 'column_labels'):
591
- if($option['columns'] == 3):echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container '.$key.'_wrapper" '.(isset($option['dep']) ? 'dep="'.$option['dep'].'" dep_val=\''.json_encode($option['dep_val']).'\'' : '').' '.(isset($option['premium']) ? 'premium="'.$option['premium'].'"' : '').'>';
592
- echo '<div class="sw-grid sw-col-300"><p class="sw-select-label sw-short sw-no-padding">'.$option['column_1'].'</p></div>';
593
- echo '<div class="sw-grid sw-col-300"><p class="sw-select-label sw-short sw-no-padding">'.$option['column_2'].'</p></div>';
594
- echo '<div class="sw-grid sw-col-300 sw-fit"><p class="sw-select-label sw-short sw-no-padding">'.$option['column_3'].'</p></div>';
595
- echo '<div class="sw-premium-blocker"></div>';
596
- echo '</div>';
597
- endif;
598
- endif;
599
-
600
- /***************************************************************
601
-
602
- Divider Module
603
-
604
- ***************************************************************/
605
-
606
- if($option['type'] == 'divider'):
607
- echo '<div class="sw-clearfix"></div><div class="sw-admin-divider sw-clearfix"></div>';
608
- endif;
609
-
610
- /***************************************************************
611
-
612
- HTML Module
613
-
614
- ***************************************************************/
615
-
616
- if($option['type'] == 'html'):
617
-
618
- echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container '.$key.'_wrapper" '.(isset($option['dep']) ? 'dep="'.$option['dep'].'" dep_val=\''.json_encode($option['dep_val']).'\'' : '').' '.(isset($option['premium']) ? 'premium="'.$option['premium'].'"' : '').'>';
619
- echo $option['content'];
620
- echo '<div class="sw-premium-blocker"></div>';
621
- echo '<div class="sw-clearfix"></div></div>';
622
- endif;
623
-
624
- /***************************************************************
625
-
626
- Authentication / Button Module
627
-
628
- ***************************************************************/
629
-
630
- if($option['type'] == 'authentication'):
631
- echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container '.$key.'_wrapper" '.(isset($option['dep']) ? 'dep="'.$option['dep'].'" dep_val=\''.json_encode($option['dep_val']).'\'' : '').' '.(isset($option['premium']) ? 'premium="'.$option['premium'].'"' : '').'>';
632
- echo '<div class="sw-grid sw-col-300"><p class="sw-authenticate-label">'.$option['name'].'</p></div>';
633
- echo '<div class="sw-grid sw-col-300">';
634
- if(isset($swp_user_options[$option['dependant']]) && $swp_user_options[$option['dependant']] != ''):
635
- echo '<a class="button sw-green-button" href="'.$option['link'].'">Connected</a>';
636
- else:
637
- echo '<a class="button sw-navy-button" href="'.$option['link'].'">Authenticate</a>';
638
- endif;
639
- echo '</div>';
640
- echo '<div class="sw-grid sw-col-300 sw-fit"></div>';
641
- echo '<div class="sw-premium-blocker"></div>';
642
- echo '</div>';
643
- endif;
644
-
645
- /***************************************************************
646
-
647
- Plugin Registration Module
648
-
649
- ***************************************************************/
650
-
651
- if($option['type'] == 'plugin_registration'):
652
-
653
- // Begin Registration Wrapper
654
- echo '<div class="registration-wrapper" registration="'.(is_swp_registered() ? '1' : '0').'">';
655
-
656
- // Registration Title
657
- echo '<h2>Premium Registration</h2>';
658
-
659
- // Open the IS NOT REGISTERED container
660
- echo '<div class="sw-grid sw-col-940 swp_is_not_registered">';
661
-
662
- // The Warning Notice & Instructions
663
- echo '<div class="sw-red-notice">This copy of Social Warfare is NOT registered. <a target="_blank" href="https://warfareplugins.com">Click here</a> to purchase a license or add your account info below.</div>';
664
- echo '<p class="sw-subtitle sw-registration-text">Follow these simple steps to register your Premium License and access all features.</p>';
665
- echo '<p class="sw-subtitle sw-registration-text sw-italic">Step 1: Enter your email.<br />Step 2: Click the "Register Plugin" button.<br />Step 3: Watch the magic.</p>';
666
-
667
- if ( function_exists('icl_get_home_url') ) :
668
- $homeURL = icl_get_home_url();
669
- else:
670
- $homeURL = get_home_url();
671
- endif;
672
- $regCode = md5($homeURL);
673
- if(isset($swp_user_options['emailAddress'])):
674
- $email = $swp_user_options['emailAddress'];
675
- else:
676
- $email = '';
677
- endif;
678
-
679
- if(isset($swp_user_options['premiumCode'])):
680
- $premiumCode = $swp_user_options['premiumCode'];
681
- else:
682
- $premiumCode = '';
683
- endif;
684
-
685
-
686
- // Email Input Module
687
- echo '<div class="sw-grid sw-col-300"><p class="sw-input-label">Email Address</p></div>';
688
- echo '<div class="sw-grid sw-col-300"><input name="emailAddress" type="text" class="sw-admin-input" placeholder="email@domain.com" value="'.$email.'" /></div>';
689
- echo '<input name="premiumCode" type="text" class="sw-admin-input sw-hidden" value="'.$premiumCode.'" />';
690
- echo '<input name="regCode" type="text" class="sw-admin-input sw-hidden" value="'.$regCode.'" />';
691
- echo '<input type="hidden" class="at-text" name="domain" id="domain" value="'.$homeURL.'" size="30" readonly data-premcode="'.md5(md5($homeURL)).'">';
692
- echo '<div class="sw-grid sw-col-300 sw-fit"></div>';
693
- echo '<div class="sw-clearfix"></div>';
694
-
695
- // Activate Plugin Module
696
- echo '<div class="sw-grid sw-col-300"><p class="sw-authenticate-label">Activate Registration</p></div>';
697
- echo '<div class="sw-grid sw-col-300">';
698
- echo '<a href="#" id="register-plugin" class="button sw-navy-button">Register Plugin</a>';
699
- echo '</div>';
700
- echo '<div class="sw-grid sw-col-300 sw-fit"></div>';
701
-
702
- // Close the IS NOT REGISTERED container
703
- echo '</div>';
704
-
705
-
706
- // Open the IS NOT REGISTERED container
707
- echo '<div class="sw-grid sw-col-940 swp_is_registered">';
708
-
709
- // The Warning Notice & Instructions
710
- echo '<div class="sw-green-notice">This copy of Social Warfare is registered. Wah-hoo!</div>';
711
- echo '<p class="sw-subtitle sw-registration-text">To unregister your license click the button below to free it up for use on another domain.</p>';
712
-
713
- // Deactivate Plugin Module
714
- echo '<div class="sw-grid sw-col-300"><p class="sw-authenticate-label">Deactivate Registration</p></div>';
715
- echo '<div class="sw-grid sw-col-300">';
716
- echo '<a href="#" id="unregister-plugin" class="button sw-navy-button">Unregister Plugin</a>';
717
- echo '</div>';
718
- echo '<div class="sw-grid sw-col-300 sw-fit"></div>';
719
-
720
- // Close the IS NOT REGISTERED container
721
- echo '</div>';
722
-
723
-
724
-
725
-
726
- // Close the Registration Wrapper
727
- echo '</div>';
728
-
729
- endif;
730
-
731
- /***************************************************************
732
-
733
- Twitter Registration Module
734
-
735
- ***************************************************************/
736
-
737
- if($option['type'] == 'tweet_counts'):
738
-
739
- echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container '.$key.'_wrapper" '.(isset($option['dep']) ? 'dep="'.$option['dep'].'" dep_val=\''.json_encode($option['dep_val']).'\'' : '').' '.(isset($option['premium']) ? 'premium="'.$option['premium'].'"' : '').'>';
740
-
741
- // Check for a default value
742
- if(isset($swp_user_options['twitter_shares']) && $swp_user_options['twitter_shares'] == true):
743
- $status = 'on';
744
- $selected = 'checked';
745
- elseif(isset($swp_user_options['twitter_shares']) && $swp_user_options['twitter_shares'] == false):
746
- $status = 'off';
747
- $selected = '';
748
- else:
749
- $status = 'off';
750
- $selected = '';
751
- endif;
752
-
753
- // Begin Registration Wrapper
754
- echo '<div class="tweet-count-wrapper" registration="false">';
755
-
756
- // Registration Title
757
- echo '<h2>Tweet Count Registration</h2>';
758
-
759
- // Open the IS NOT Activated container
760
- echo '<div class="sw-grid sw-col-940 swp_tweets_not_activated" dep="twitter_shares" dep_val="[false]">';
761
-
762
- // The Warning Notice & Instructions
763
- echo '<p class="sw-subtitle sw-registration-text">In order to allow Social Warfare to track tweet counts, we\'ve partnered with NewShareCounts.com. Follow the steps below to register with NewShareCounts and allow us to track your Twitter shares.</p>';
764
- echo '<p class="sw-subtitle sw-registration-text sw-italic">Step 1: <a style="float:none;" class="button sw-navy-button" href="http://newsharecounts.com" target="_blank">Click here to visit NewShareCounts.com</a><br />Step 2: At NewShareCounts.com, Enter your domain and click the "Sign In With Twitter" button.<img class="sw-tweet-count-demo" src="'.swp_PLUGIN_DIR.'/functions/admin-options-page/images/new_share_counts.png" /><br />Step 3: Flip the switch below to "ON" and then save changes.</p>';
765
-
766
-
767
- // Close the IS NOT ACTIVATED container
768
- echo '</div>';
769
-
770
- // Checkbox Module
771
- echo '<div class="sw-grid sw-col-300"><p class="sw-checkbox-label">Tweet Counts</p></div>';
772
- echo '<div class="sw-grid sw-col-300">';
773
- echo '<div class="sw-checkbox-toggle" status="'.$status.'" field="#twitter_shares"><div class="sw-checkbox-on">ON</div><div class="sw-checkbox-off">OFF</div></div>';
774
- echo '<input type="checkbox" class="sw-hidden" name="twitter_shares" id="twitter_shares" '.$selected.' />';
775
- echo '</div>';
776
- echo '<div class="sw-grid sw-col-300 sw-fit"></div>';
777
-
778
- // Close the Registration Wrapper
779
- echo '</div>';
780
-
781
- echo '<div class="sw-premium-blocker"></div>';
782
- echo '</div>';
783
-
784
- endif;
785
-
786
-
787
- /***************************************************************
788
-
789
- Close the Tab Container
790
-
791
- ***************************************************************/
792
-
793
- // Add a divider element if necessary
794
- if(isset($option['divider']) && $option['divider'] == true):
795
- echo '<div class="sw-clearfix"></div><div class="sw-admin-divider sw-clearfix"></div>';
796
- endif;
797
-
798
- if(isset($option['size']) && $option['size'] != 'two-fourths'):
799
- $last_size = '';
800
- endif;
801
-
802
- // Close the loop
803
- endforeach;
804
-
805
- // Close the tab container
806
- echo '</div>';
807
-
808
- endforeach;
809
-
810
- echo '</form>';
811
- echo '</div>';
812
-
813
- /***************************************************************
814
-
815
- System Status Generator
816
-
817
- ***************************************************************/
818
-
819
- if ( ! function_exists( 'get_plugins' ) ) {
820
- require_once ABSPATH . 'wp-admin/includes/plugin.php';
821
- }
822
- $plugins = get_plugins();
823
- $pluginList = '';
824
- foreach ($plugins as $plugin):
825
- $pluginList .= '<tr><td><b>'.$plugin['Name'].'</b></td><td>'.$plugin['Version'].'</td></tr>';
826
- endforeach;
827
-
828
- if ( function_exists('fsockopen') ) :
829
- $fsockopen = '<span style="color:green;">Enabled</span>';
830
- else :
831
- $fsockopen = '<span style="color:red;">Disabled</span>';
832
- endif;
833
-
834
- if ( function_exists('curl_version') ) :
835
- $curl_version = curl_version();
836
- $curl_status = '<span style="color:green;">Enabled: v'.$curl_version['version'].'</span>';
837
- else :
838
- $curl_status = '<span style="color:red;">Disabled</span>';
839
- endif;
840
-
841
- $theme = wp_get_theme();
842
-
843
- $system_status = '
844
- <table style="width:100%;">
845
- <tr><td><h2>Environment Statuses</h2></td><td></td></tr>
846
- <tr><td><b>Home URL</b></td><td>'.get_home_url().'</td></tr>
847
- <tr><td><b>Site URL</b></td><td>'.get_site_url().'</td></tr>
848
- <tr><td><b>WordPress Version</b></td><td>'.get_bloginfo('version').'</td></tr>
849
- <tr><td><b>PHP Version</b></td><td>'.phpversion().'</td></tr>
850
- <tr><td><b>WP Memory Limit</b></td><td>'.WP_MEMORY_LIMIT.'</td></tr>
851
- <tr><td><b>Social Warfare Version</b></td><td>'.swp_VERSION.'</td></tr>
852
- <tr><td><h2>Connection Statuses</h2></td><td></td></tr>
853
- <tr><td><b>fsockopen</b></td><td>'.$fsockopen.'</td></tr>
854
- <tr><td><b>cURL</b></td><td>'.$curl_status.'</td></tr>
855
- <tr><td><h2>Plugin Statuses</h2></td><td></td></tr>
856
- <tr><td><b>Theme Name</b></td><td>'.$theme['Name'].'</td></tr>
857
- <tr><td><b>Theme Version</b></td><td>'.$theme['Version'].'</td></tr>
858
- <tr><td><b>Active Plugins</b></td><td></td></tr>
859
- <tr><td><b>Number of Active Plugins</b></td><td>'.count($plugins).'</td></tr>
860
- '.$pluginList.'
861
-
862
- </table>
863
- ';
864
-
865
- /***************************************************************
866
-
867
- The Right Sidebar
868
-
869
- ***************************************************************/
870
-
871
- echo '<div class="sw-admin-sidebar sw-grid sw-col-220 sw-fit">';
872
- echo '<a href="https://warfareplugins.com/affiliates/" target="_blank"><img src="'.swp_PLUGIN_DIR.'/functions/admin-options-page/images/affiliate-300x150.jpg"></a>';
873
- echo '<a href="https://warfareplugins.com/walkthrough/" target="_blank"><img src="'.swp_PLUGIN_DIR.'/functions/admin-options-page/images/starter-guide-300x150.jpg"></a>';
874
- echo '<a href="https://warfareplugins.com/how-to-measure-social-media-roi-using-google-analytics/" target="_blank"><img src="'.swp_PLUGIN_DIR.'/functions/admin-options-page/images/measure-roi-300x150.jpg"></a>';
875
- echo '<p class="sw-support-notice sw-italic">Need help? Check out our <a href="https://warfareplugins.com/support/" target="_blank">Knowledgebase.</a></p>';
876
- echo '<p class="sw-support-notice sw-italic">Opening a support ticket? Copy your System Status by clicking the button below.</p>';
877
- echo '<a href="#" class="button sw-blue-button sw-system-status">Get System Status</a>';
878
-
879
- // Sytem Status Container
880
- echo '<div class="sw-clearfix"></div>';
881
- echo '<div class="system-status-wrapper">';
882
- echo '<h4>Press Ctrl+C to Copy this information.</h4>';
883
- echo '<div class="system-status-container">'.$system_status.'</div>';
884
-
885
- echo '</div>';
886
-
887
- echo '</div>';
888
-
889
- echo '</div>';
890
-
891
- }
892
-
893
- /*********************************************************
894
-
895
- A Function to handle the request inside of admin-ajax.php
896
-
897
- *********************************************************/
898
-
899
- add_action( 'wp_ajax_swp_store_settings', 'swp_store_the_settings' );
900
- function swp_store_the_settings() {
901
-
902
- // Access the database
903
- global $wpdb;
904
-
905
- // Fetch the settings from the POST submission
906
- $settings = $_POST['settings'];
907
-
908
- // Fetch the existing options set
909
- $options = get_option('socialWarfareOptions');
910
-
911
- unset($options['newOrderOfIcons']['active']);
912
- unset($options['newOrderOfIcons']['inactive']);
913
-
914
- // Loop and check for checkbox values, convert them to boolean
915
- foreach($settings as $key => $value):
916
- if($value == 'true'):
917
- $options[$key] = true;
918
- elseif($value == 'false'):
919
- $options[$key] = false;
920
- else:
921
- $options[$key] = $value;
922
- endif;
923
- endforeach;
924
-
925
- // Store the values back in the database
926
- return update_option('socialWarfareOptions',$options);
927
-
928
- // Kill WordPress
929
- wp_die();
930
- }
931
-
932
-
933
- /*********************************************************
934
-
935
- A Function to store the registration code
936
-
937
- *********************************************************/
938
-
939
- add_action( 'wp_ajax_swp_store_registration', 'swp_store_the_registration' );
940
- function swp_store_the_registration() {
941
-
942
- // Access the database
943
- global $wpdb;
944
-
945
- // Fetch the settings from the POST submission
946
- $premiumCode = $_POST['premiumCode'];
947
-
948
- // Fetch the existing options set
949
- $options = get_option('socialWarfareOptions');
950
-
951
- // Loop and check for checkbox values, convert them to boolean
952
- $options['premiumCode'] = $premiumCode;
953
-
954
- // Store the values back in the database
955
- return update_option('socialWarfareOptions',$options);
956
-
957
- // Kill WordPress
958
- wp_die();
959
- }
960
-
961
- /*********************************************************
962
-
963
- A Function to delete the registration code
964
-
965
- *********************************************************/
966
-
967
- add_action( 'wp_ajax_swp_delete_registration', 'swp_delete_the_registration' );
968
- function swp_delete_the_registration() {
969
-
970
- // Access the database
971
- global $wpdb;
972
-
973
- // Fetch the existing options set
974
- $options = get_option('socialWarfareOptions');
975
-
976
- $options['premiumCode'] = '';
977
- $options['emailAddress'] = '';
978
-
979
- // Store the values back in the database
980
- return update_option('socialWarfareOptions',$options);
981
-
982
- // Kill WordPress
983
- wp_die();
984
-
985
- }
986
-
987
- add_action( 'wp_ajax_swp_ajax_passthrough', 'swp_ajax_passthrough' );
988
- function swp_ajax_passthrough() {
989
-
990
- // Pass the URL request via cURL
991
- $response = swp_file_get_contents_curl(urldecode($_POST['url']));
992
- // Echo the response to the screen
993
- echo $response;
994
-
995
- // Kill WordPress
996
- wp_die();
997
-
998
- }
999
-
1000
-
1001
-
1002
-
1003
-
1004
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/admin/columns.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Functions for modifying the default admin columns behavior.
4
+ *
5
+ * @package SocialWarfare\Admin\Functions
6
+ * @copyright Copyright (c) 2016, Warfare Plugins, LLC
7
+ * @license GPL-3.0+
8
+ * @since 1.0.0
9
+ */
10
+
11
+ /**
12
+ * Add a share counts column to the post listing admin pages; make it Sortable.
13
+ *
14
+ * @since 1.4.0
15
+ */
16
+ add_filter( 'manage_post_posts_columns', 'createSocialSharesColumn' );
17
+ add_filter( 'manage_page_posts_columns', 'createSocialSharesColumn' );
18
+ function createSocialSharesColumn( $defaults ) {
19
+ $defaults['swSocialShares'] = 'Social Shares';
20
+ return $defaults;
21
+ }
22
+
23
+ // Populate the new column
24
+ add_action( 'manage_posts_custom_column', 'populateSocialSharesColumn', 10, 2 );
25
+ add_action( 'manage_page_posts_custom_column', 'populateSocialSharesColumn', 10, 2 );
26
+ function populateSocialSharesColumn( $column_name, $post_ID ) {
27
+ if ( $column_name == 'swSocialShares' ) {
28
+ $answer = get_post_meta( $post_ID,'_totes',true );
29
+ echo intval( $answer );
30
+ }
31
+ }
32
+
33
+ // Make the column Sortable
34
+ add_filter( 'manage_edit-post_sortable_columns', 'makeSocialSharesSortable' );
35
+ add_filter( 'manage_edit-page_sortable_columns', 'makeSocialSharesSortable' );
36
+ function makeSocialSharesSortable( $columns ) {
37
+ $columns['swSocialShares'] = 'Social Shares';
38
+ return $columns;
39
+ }
40
+
41
+ add_action( 'pre_get_posts', 'swp_social_shares_orderby' );
42
+ function swp_social_shares_orderby( $query ) {
43
+ if ( ! is_admin() ) {
44
+ return;
45
+ }
46
+ $orderby = $query->get( 'orderby' );
47
+
48
+ if ( 'Social Shares' === $orderby ) {
49
+ $query->set( 'meta_key','_totes' );
50
+ $query->set( 'orderby','meta_value_num' );
51
+ }
52
+ }
functions/admin/misc.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Miscellaneous admin functions.
4
+ *
5
+ * @package SocialWarfare\Admin\Functions
6
+ * @copyright Copyright (c) 2016, Warfare Plugins, LLC
7
+ * @license GPL-3.0+
8
+ * @since 1.0.0
9
+ */
10
+
11
+ add_filter( 'plugin_action_links_' . plugin_basename( SWP_PLUGIN_FILE ), 'swp_settings_link' );
12
+ /**
13
+ * Add a "Settings" link to the listing on the plugins page
14
+ *
15
+ * @since 1.0.0
16
+ * @param array $links Array of links passed in from WordPress core.
17
+ * @return array $links Array of links modified by the function passed back to WordPress
18
+ */
19
+ function swp_settings_link( $links ) {
20
+ $settings_link = sprintf( '<a href="admin.php?page=social-warfare">%s</a>',
21
+ esc_html__( 'Settings', 'social-warfare' )
22
+ );
23
+
24
+ array_unshift( $links, $settings_link );
25
+
26
+ return $links;
27
+ }
functions/admin/options-page.php ADDED
@@ -0,0 +1,823 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Functions for loading the admin options page.
4
+ *
5
+ * @package SocialWarfare\Admin\Functions
6
+ * @copyright Copyright (c) 2016, Warfare Plugins, LLC
7
+ * @license GPL-3.0+
8
+ * @since 1.0.0
9
+ */
10
+
11
+ /**
12
+ * Enqueue the admin menu page
13
+ * @since 1.0.0
14
+ * @param none
15
+ * @return none
16
+ */
17
+ add_action( 'admin_menu', 'swp_admin_options_page' );
18
+ function swp_admin_options_page() {
19
+
20
+ // Declare the menu link
21
+ $swp_menu = add_menu_page(
22
+ 'Social Warfare',
23
+ 'Social Warfare',
24
+ 'manage_options',
25
+ 'social-warfare',
26
+ 'swp_plugin_options',
27
+ SWP_PLUGIN_URL . '/images/admin-options-page/socialwarfare-20x20.png'
28
+ );
29
+
30
+ // Hook into the CSS and Javascript Enqueue process for this specific page
31
+ add_action( 'admin_print_styles-' . $swp_menu, 'swp_admin_options_css' );
32
+ add_action( 'admin_print_scripts-' . $swp_menu, 'swp_admin_options_js' );
33
+ }
34
+
35
+ /**
36
+ * Enqueue the Settings Page CSS & Javascript
37
+ */
38
+ function swp_admin_options_css() {
39
+ $suffix = swp_get_suffix();
40
+
41
+ wp_enqueue_style(
42
+ 'swp_admin_options_css',
43
+ SWP_PLUGIN_URL . "/css/admin-options-page{$suffix}.css",
44
+ array(),
45
+ SWP_VERSION
46
+ );
47
+ }
48
+
49
+ /**
50
+ * Enqueue the admin javascript
51
+ *
52
+ * @since 2.0.0
53
+ * @return void
54
+ */
55
+ function swp_admin_options_js() {
56
+ $suffix = swp_get_suffix();
57
+
58
+ wp_enqueue_script( 'jquery' );
59
+ wp_enqueue_script( 'jquery-effects-core' );
60
+ wp_enqueue_script( 'jquery-ui-core' );
61
+ wp_enqueue_script( 'jquery-ui-sortable' );
62
+ wp_enqueue_script( 'jquery-ui-tooltip' );
63
+ wp_enqueue_media();
64
+ wp_enqueue_script(
65
+ 'swp_admin_options_js',
66
+ SWP_PLUGIN_URL . "/js/admin-options-page{$suffix}.js",
67
+ array( 'jquery' ),
68
+ SWP_VERSION
69
+ );
70
+
71
+ wp_localize_script( 'swp_admin_options_js', 'swpAdminOptionsData', array(
72
+ 'registerNonce' => wp_create_nonce( 'swp_plugin_registration' ),
73
+ 'optionsNonce' => wp_create_nonce( 'swp_plugin_options_save' ),
74
+ ));
75
+ }
76
+
77
+ /**
78
+ * Build the Settings Page Form
79
+ */
80
+ function swp_plugin_options() {
81
+ if ( current_user_can( 'manage_options' ) ) {
82
+ swp_build_options_page();
83
+ }
84
+ }
85
+
86
+ /**
87
+ * A Function to Parse the Array & Build the Options Page
88
+ */
89
+ function swp_build_options_page() {
90
+ global $swp_user_options;
91
+
92
+ // Create all of the options in one giant array.
93
+ $swp_options_page = array(
94
+ // A List of Options Page Tabs and Their Titles.
95
+ 'tabs' => array(
96
+ 'links' => array(),
97
+ ),
98
+ // A list of options in each of the options tabs.
99
+ 'options' => array(),
100
+ );
101
+
102
+ // Fetch the global options array
103
+ // global $swp_options_page;
104
+ $swp_options_page = apply_filters( 'swp_options' , $swp_options_page );
105
+
106
+ // Unset the 'active' index if it's set
107
+ if( isset( $swp_user_options['newOrderOfIcons']['active'] )):
108
+ unset( $swp_user_options['newOrderOfIcons']['active'] );
109
+ endif;
110
+
111
+ /**
112
+ * Build the header menu
113
+ */
114
+
115
+ // Wrapper for the entire content area
116
+ echo '<div class="sw-header-wrapper">';
117
+
118
+ echo '<div class="sw-grid sw-col-940 sw-top-menu">';
119
+ echo '<div class="sw-grid sw-col-700">';
120
+ echo '<img class="sw-header-logo" src="' . SWP_PLUGIN_URL . '/images/admin-options-page/social-warfare-light.png" />';
121
+ echo '<ul class="sw-header-menu">';
122
+ $i = 0;
123
+ foreach ( $swp_options_page['tabs']['links'] as $key => $value ) : ++$i;
124
+ echo '<li' . ($i == 1 ? ' class="sw-active-tab"' : '') . '><a class="sw-tab-selector" href="#" data-link="' . $key . '"><span>' . $value . '</span></a></li>';
125
+ endforeach;
126
+ echo '</ul>';
127
+ echo '</div>';
128
+ echo '<div class="sw-grid sw-col-220 sw-fit">';
129
+ echo '<a href="#" class="button sw-navy-button sw-save-settings">Save Changes</a>';
130
+ echo '</div>';
131
+ echo '<div class="sw-clearfix"></div>';
132
+ echo '</div>';
133
+ echo '</div>';
134
+
135
+ /**
136
+ * Build the Tab Container
137
+ */
138
+
139
+ if( function_exists('is_swp_registered') ):
140
+ $swp_registration = is_swp_registered();
141
+ else:
142
+ $swp_registration = false;
143
+ endif;
144
+
145
+ echo '<div class="sw-admin-wrapper" sw-registered="' . absint( $swp_registration ) . '">';
146
+
147
+ echo '<form class="sw-admin-settings-form">';
148
+
149
+ // Wrapper for the left 3/4 non-sidebar content
150
+ echo '<div class="sw-tabs-container sw-grid sw-col-700">';
151
+
152
+ // Loop through the options tabs and build the options page
153
+ foreach ( $swp_options_page['options'] as $tab_name => $tab_options ) :
154
+
155
+ // Individual Tab Container - Full Width
156
+ echo '<div id="' . $tab_name . '" class="sw-admin-tab sw-grid sw-col-940">';
157
+
158
+ // Loop through and output each option module for this tab
159
+ foreach ( $tab_options as $key => $option ) :
160
+
161
+ /**
162
+ * Title Module
163
+ */
164
+
165
+ if ( $option['type'] == 'title' ) :
166
+ echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $key . '_wrapper" ' . (isset( $option['dep'] ) ? 'dep="' . $option['dep'] . '" dep_val=\'' . json_encode( $option['dep_val'] ) . '\'' : '') . ' ' . (isset( $option['premium'] ) ? 'premium="' . $option['premium'] . '"' : '') . '>';
167
+ echo '<h2>' . $option['content'] . '</h2>';
168
+ echo '<div class="sw-premium-blocker" title="test"></div>';
169
+ echo '</div>';
170
+ endif;
171
+
172
+ /**
173
+ * Description Module
174
+ */
175
+
176
+ if ( $option['type'] == 'paragraph' ) :
177
+ echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $key . '_wrapper" ' . (isset( $option['dep'] ) ? 'dep="' . $option['dep'] . '" dep_val=\'' . json_encode( $option['dep_val'] ) . '\'' : '') . ' ' . (isset( $option['premium'] ) ? 'premium="' . $option['premium'] . '"' : '') . '>';
178
+ echo '<p class="sw-subtitle">' . $option['content'] . '</p>';
179
+ echo '<div class="sw-premium-blocker no-icon"></div>';
180
+ echo '</div>';
181
+ endif;
182
+
183
+ /**
184
+ * Image Module
185
+ */
186
+
187
+ if ( $option['type'] == 'image' ) :
188
+ echo '<img src="' . $option['content'] . '">';
189
+ endif;
190
+
191
+ /**
192
+ * Image Upload Module
193
+ */
194
+
195
+ if ( $option['type'] == 'image_upload' ) :
196
+
197
+ // Fetch the value
198
+ if ( isset( $swp_user_options[ $key ] ) ) :
199
+ $value = $swp_user_options[ $key ];
200
+ else :
201
+ $value = $option['default'];
202
+ endif;
203
+
204
+ // Create a whole parent container
205
+ echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $key . '_wrapper" ' . (isset( $option['dep'] ) ? 'dep="' . $option['dep'] . '" dep_val=\'' . json_encode( $option['dep_val'] ) . '\'' : '') . ' ' . (isset( $option['premium'] ) ? 'premium="' . $option['premium'] . '"' : '') . '>';
206
+
207
+ // Title goes on the left
208
+ echo '<div class="sw-grid sw-col-300">';
209
+ echo '<p class="sw-checkbox-label">Custom Button Image</p>';
210
+ echo '</div>';
211
+
212
+ // Button goes in the middle
213
+ echo '<div class="sw-grid sw-col-300">';
214
+ echo '<label for="upload_image">
215
+ <input class="swp_upload_image_field" type="text" size="36" name="' . $key . '" value="' . $value . '" />
216
+ <a class="swp_upload_image_button button sw-navy-button" for="' . $key . '" type="button" value="Upload Image" />Upload Image</a>
217
+ </label>';
218
+ echo '</div>';
219
+
220
+ // Preview goes on the right
221
+ echo '<div class="sw-grid sw-col-300 sw-fit">';
222
+ echo '<div class="sw-preview-container">';
223
+ if ( $value ) :
224
+ echo '<img class="sw-admin-image-preview" src="' . $value . '" />';
225
+ echo '<div class="sw-delete-image"></div>';
226
+ endif;
227
+ echo '</div>';
228
+ echo '</div>';
229
+
230
+ echo '</div>';
231
+
232
+ endif;
233
+
234
+ /**
235
+ * Buttons Module
236
+ */
237
+
238
+ if ( $option['type'] == 'buttons' ) :
239
+
240
+ // The Active Buttons
241
+ echo '<div class="sw-grid sw-col-300">';
242
+ echo '<h3 class="sw-buttons-toggle">' . __( 'Active' , 'social-warfare' ) . '</h3>';
243
+ echo '</div>';
244
+
245
+ echo '<div class="sw-grid sw-col-620 sw-fit">';
246
+ echo '<div class="sw-active sw-buttons-sort">';
247
+
248
+ // Check if we have saved settings to use
249
+ if ( isset( $swp_user_options['newOrderOfIcons'] ) ) :
250
+
251
+ // Loop through each active button
252
+ foreach ( $swp_user_options['newOrderOfIcons'] as $key => $value ) :
253
+ echo '<i class="sw-s sw-' . $key . '-icon" data-network="' . $key . '" premium-button="' . $option['content'][ $key ]['premium'] . '"></i>';
254
+ endforeach;
255
+
256
+ // Use defaults if nothing is saved
257
+ else :
258
+
259
+ // Loop through the available buttons
260
+ foreach ( $option['content'] as $key => $value ) :
261
+ if ( $value['default'] == true ) :
262
+ echo '<i class="sw-s sw-' . $key . '-icon" data-network="' . $key . '" premium-button="' . $option['content'][ $key ]['premium'] . '"></i>';
263
+ endif;
264
+ endforeach;
265
+
266
+ endif;
267
+
268
+ echo '</div>';
269
+ echo '</div>';
270
+
271
+ echo '<div class="sw-clearfix"></div>';
272
+
273
+ // The Inactive Buttons
274
+ echo '<div class="sw-grid sw-col-300">';
275
+ echo '<h3 class="sw-buttons-toggle">' . __( 'Inactive' , 'social-warfare' ) . '</h3>';
276
+ echo '</div>';
277
+
278
+ echo '<div class="sw-grid sw-col-620 sw-fit">';
279
+ echo '<div class="sw-inactive sw-buttons-sort">';
280
+
281
+ // Check if we have saved settings to use
282
+ if ( isset( $swp_user_options['newOrderOfIcons'] ) ) :
283
+
284
+ // Loop through each active button
285
+ foreach ( $option['content'] as $key => $value ) :
286
+ if ( ! isset( $swp_user_options['newOrderOfIcons'][ $key ] ) ) :
287
+ echo '<i class="sw-s sw-' . $key . '-icon" data-network="' . $key . '" premium-button="' . $option['content'][ $key ]['premium'] . '"></i>';
288
+ endif;
289
+ endforeach;
290
+
291
+ // Use defaults if nothing is saved
292
+ else :
293
+
294
+ // Loop through the available buttons
295
+ foreach ( $option['content'] as $key => $value ) :
296
+ if ( $value['default'] == false ) :
297
+ echo '<i class="sw-s sw-' . $key . '-icon" data-network="' . $key . '" premium-button="' . $option['content'][ $key ]['premium'] . '"></i>';
298
+ endif;
299
+ endforeach;
300
+
301
+ endif;
302
+
303
+ echo '</div>';
304
+ echo '</div>';
305
+
306
+ endif;
307
+
308
+ /**
309
+ * Checkbox Module
310
+ */
311
+
312
+ if ( $option['type'] == 'checkbox' ) :
313
+
314
+ // Check for a default value
315
+ if ( isset( $swp_user_options[ $key ] ) && $swp_user_options[ $key ] == true ) :
316
+ $status = 'on';
317
+ $selected = 'checked';
318
+ elseif ( isset( $swp_user_options[ $key ] ) && $swp_user_options[ $key ] == false ) :
319
+ $status = 'off';
320
+ $selected = '';
321
+ elseif ( $option['default'] == true ) :
322
+ $status = 'on';
323
+ $selected = 'checked';
324
+ else :
325
+ $status = 'off';
326
+ $selected = '';
327
+ endif;
328
+
329
+ // Check for four-fourths size
330
+ if ( $option['size'] == 'four-fourths' ) :
331
+
332
+ echo '<div class="sw-grid sw-col-620"><h2 class="sw-h-label">' . $option['title'] . '</h2><p class="sw-subtext-label">' . $option['description'] . '</p></div>';
333
+ echo '<div class="sw-grid sw-col-300 sw-fit">';
334
+ echo '<div class="sw-checkbox-toggle" status="' . $status . '" field="#' . $key . '"><div class="sw-checkbox-on">' . __( 'ON' , 'social-warfare' ) . '</div><div class="sw-checkbox-off">' . __( 'OFF' , 'social-warfare' ) . '</div></div>';
335
+ echo '<input type="checkbox" class="sw-hidden" name="' . $key . '" id="' . $key . '" ' . $selected . '>';
336
+ echo '</div>';
337
+
338
+ // Check for three-fourths-advanced size
339
+ elseif ( $option['size'] == 'two-thirds-advanced' ) :
340
+
341
+ echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $key . '_wrapper" ' . (isset( $option['dep'] ) ? 'dep="' . $option['dep'] . '" dep_val=\'' . json_encode( $option['dep_val'] ) . '\'' : '') . ' ' . (isset( $option['premium'] ) ? 'premium="' . $option['premium'] . '"' : '') . '>';
342
+
343
+ echo '<div class="two-thirds-advanced">';
344
+ echo '<div class="sw-grid sw-col-300"><h2 class="sw-h-label">' . $option['title'] . '</h2><p class="sw-subtext-label">' . $option['description'] . '</p></div>';
345
+ echo '<div class="sw-grid sw-col-300">';
346
+ echo '<div class="sw-checkbox-toggle" status="' . $status . '" field="#' . $key . '"><div class="sw-checkbox-on">' . __( 'ON' , 'social-warfare' ) . '</div><div class="sw-checkbox-off">' . __( 'OFF' , 'social-warfare' ) . '</div></div>';
347
+ echo '<input type="checkbox" class="sw-hidden" name="' . $key . '" id="' . $key . '" ' . $selected . '>';
348
+ echo '</div>';
349
+ echo '<div class="sw-grid sw-col-300 sw-fit"></div>';
350
+ echo '</div>';
351
+ echo '<div class="sw-clearfix"></div>';
352
+ echo '<div class="sw-premium-blocker"></div>';
353
+ echo '</div>';
354
+
355
+ // Check for two-fourths size
356
+ elseif ( $option['size'] == 'two-fourths' ) :
357
+
358
+ if ( $last_size == 'two-fourths' ) :
359
+ $last_size = '';
360
+ $fit = 'sw-fit';
361
+ else :
362
+ $last_size = 'two-fourths';
363
+ $fit = '';
364
+ endif;
365
+
366
+ echo '<div class="sw-grid sw-col-460 sw-option-container sw-fit ' . $key . '_wrapper" ' . ($option['dep'] ? 'dep="' . $option['dep'] . '" dep_val=\'' . json_encode( $option['dep_val'] ) . '\'' : '') . ' premium=' . $option['premium'] . '>';
367
+ echo '<div class="sw-grid sw-col-460"><p class="sw-checkbox-label">' . $option['content'] . '</p></div>';
368
+ echo '<div class="sw-grid sw-col-460 sw-fit">';
369
+ echo '<div class="sw-checkbox-toggle" status="' . $status . '" field="#' . $key . '"><div class="sw-checkbox-on">' . __( 'ON' , 'social-warfare' ) . '</div><div class="sw-checkbox-off">' . __( 'OFF' , 'social-warfare' ) . '</div></div>';
370
+ echo '<input type="checkbox" class="sw-hidden" name="' . $key . '" id="' . $key . '" ' . $selected . '>';
371
+ echo '</div>';
372
+ echo '<div class="sw-premium-blocker"></div>';
373
+ echo '</div>';
374
+
375
+ // All others
376
+ else :
377
+
378
+ echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $key . '_wrapper" ' . (isset( $option['dep'] ) ? 'dep="' . $option['dep'] . '" dep_val=\'' . json_encode( $option['dep_val'] ) . '\'' : '') . ' premium=' . $option['premium'] . '>';
379
+
380
+ if ( isset( $option['header'] ) && $option['header'] == true ) :
381
+ echo '<div class="sw-grid sw-col-300"><h2 class="sw-h-label">' . $option['content'] . '</h2></div>';
382
+ else :
383
+ echo '<div class="sw-grid sw-col-300"><p class="sw-checkbox-label">' . $option['content'] . '</p></div>';
384
+ endif;
385
+
386
+ echo '<div class="sw-grid sw-col-300">';
387
+ echo '<div class="sw-checkbox-toggle" status="' . $status . '" field="#' . $key . '"><div class="sw-checkbox-on">' . __( 'ON' , 'social-warfare' ) . '</div><div class="sw-checkbox-off">' . __( 'OFF' , 'social-warfare' ) . '</div></div>';
388
+ echo '<input type="checkbox" class="sw-hidden" name="' . $key . '" id="' . $key . '" ' . $selected . '>';
389
+ echo '</div>';
390
+ echo '<div class="sw-grid sw-col-300 sw-fit"></div>';
391
+
392
+ echo '<div class="sw-premium-blocker"></div>';
393
+ echo '</div>';
394
+
395
+ endif;
396
+ endif;
397
+
398
+ /**
399
+ * Input Module
400
+ */
401
+ if ( $option['type'] == 'input' && isset( $option['size'] ) && $option['size'] == 'two-thirds' ) :
402
+
403
+ if ( isset( $swp_user_options[ $key ] ) ) :
404
+ $value = $swp_user_options[ $key ];
405
+ else :
406
+ $value = $option['default'];
407
+ endif;
408
+
409
+ echo '<div class="sw-grid sw-col-940 sw-option-container ' . $key . '_wrapper" ' . (isset( $option['dep'] ) ? 'dep="' . $option['dep'] . '" dep_val=\'' . json_encode( $option['dep_val'] ) . '\'' : '') . ' ' . (isset( $option['premium'] ) ? 'premium="' . $option['premium'] . '"' : '') . '>';
410
+ echo '<div class="sw-grid sw-col-300"><p class="sw-input-label">' . $option['name'] . '</p></div>';
411
+ echo '<div class="sw-grid sw-col-300"><input name="' . $key . '" type="text" class="sw-admin-input" ' . (isset( $option['default'] ) ? 'placeholder="' . $option['default'] . '"' : '') . ' value="' . $value . '" /></div>';
412
+ echo '<div class="sw-grid sw-col-300 sw-fit"></div>';
413
+ echo '<div class="sw-premium-blocker"></div>';
414
+ echo '<div class="sw-clearfix"></div>';
415
+ echo '</div>';
416
+
417
+ elseif ( $option['type'] == 'input' && isset( $option['size'] ) && $option['size'] == 'two-fourths' ) :
418
+
419
+ if ( isset( $swp_user_options[ $key ] ) ) :
420
+ $value = $swp_user_options[ $key ];
421
+ else :
422
+ $value = $option['default'];
423
+ endif;
424
+
425
+ if ( $last_size == 'two-fourths' ) :
426
+ $last_size = '';
427
+ $fit = 'sw-fit';
428
+ else :
429
+ $last_size = 'two-fourths';
430
+ $fit = '';
431
+ endif;
432
+
433
+ echo '<div class="sw-grid sw-col-460 sw-fit sw-option-container ' . $key . '_wrapper" ' . (isset( $option['dep'] ) ? 'dep="' . $option['dep'] . '" dep_val=\'' . json_encode( $option['dep_val'] ) . '\'' : '') . ' ' . (isset( $option['premium'] ) ? 'premium="' . $option['premium'] . '"' : '') . '>';
434
+ echo '<div class="sw-grid sw-col-460"><p class="sw-input-label">' . $option['name'] . '</p></div>';
435
+ echo '<div class="sw-grid sw-col-460 sw-fit"><input name="' . $key . '" type="text" class="sw-admin-input" placeholder="0" value="' . $value . '" /></div>';
436
+ echo '<div class="sw-premium-blocker"></div>';
437
+ echo '</div>';
438
+
439
+ elseif ( $option['type'] == 'input' && isset( $option['secondary'] ) ) :
440
+
441
+ if ( isset( $swp_user_options[ $option['primary'] ] ) ) :
442
+ $value = $swp_user_options[ $option['primary'] ];
443
+ elseif ( isset( $option['default'] ) ) :
444
+ $value = $option['default'];
445
+ endif;
446
+
447
+ if ( isset( $swp_user_options[ $option['secondary'] ] ) ) :
448
+ $value2 = $swp_user_options[ $option['secondary'] ];
449
+ elseif ( isset( $option['default_2'] ) ) :
450
+ $value2 = $option['default_2'];
451
+ endif;
452
+
453
+ echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $key . '_wrapper" ' . (isset( $option['dep'] ) ? 'dep="' . $option['dep'] . '" dep_val=\'' . json_encode( $option['dep_val'] ) . '\'' : '') . ' ' . (isset( $option['premium'] ) ? 'premium="' . $option['premium'] . '"' : '') . '>';
454
+
455
+ echo '<div class="sw-grid sw-col-300"><p class="sw-input-label">' . $option['name'] . '</p></div>';
456
+ echo '<div class="sw-grid sw-col-300"><input name="' . $option['primary'] . '" type="text" class="sw-admin-input" ' . (isset( $option['default'] ) ? 'placeholder="' . $option['default'] . '"' : '') . ' value="' . $value . '" /></div>';
457
+ echo '<div class="sw-grid sw-col-300 sw-fit"><input name="' . $option['secondary'] . '" type="text" class="sw-admin-input" ' . (isset( $option['default_2'] ) ? 'placeholder="' . $option['default_2'] . '"' : '') . ' value="' . $value2 . '" /></div>';
458
+
459
+ echo '<div class="sw-premium-blocker"></div>';
460
+ echo '</div>';
461
+
462
+ endif;
463
+
464
+ /**
465
+ * Select Module
466
+ */
467
+
468
+ if ( $option['type'] == 'select' && isset( $option['secondary'] ) ) :
469
+
470
+ if ( isset( $swp_user_options[ $option['primary'] ] ) ) :
471
+ $value = $swp_user_options[ $option['primary'] ];
472
+ else :
473
+ $value = $option['default'];
474
+ endif;
475
+
476
+ if ( isset( $swp_user_options[ $option['secondary'] ] ) ) :
477
+ $value2 = $swp_user_options[ $option['secondary'] ];
478
+ else :
479
+ $value2 = $option['default_2'];
480
+ endif;
481
+
482
+ echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $key . '_wrapper" ' . (isset( $option['dep'] ) ? 'dep="' . $option['dep'] . '" dep_val=\'' . json_encode( $option['dep_val'] ) . '\'' : '') . ' ' . (isset( $option['premium'] ) ? 'premium="' . $option['premium'] . '"' : '') . '>';
483
+
484
+ echo '<div class="sw-grid sw-col-300"><p class="sw-input-label">' . $option['name'] . '</p></div>';
485
+ echo '<div class="sw-grid sw-col-300">';
486
+ echo '<select name="' . $option['primary'] . '">';
487
+ if ( ! isset( $option['default'] ) ) :
488
+ echo '<option value="">Select...</option>';
489
+ endif;
490
+ foreach ( $option['content'] as $select_key => $select_value ) :
491
+ echo '<option value="' . $select_key . '" ' . ($value == $select_key ? 'selected' :'') . '>' . $select_value . '</option>';
492
+ endforeach;
493
+ echo '</select>';
494
+ echo '</div>';
495
+ echo '<div class="sw-grid sw-col-300 sw-fit">';
496
+ echo '<select name="' . $option['secondary'] . '">';
497
+ if ( ! isset( $option['default_2'] ) ) :
498
+ echo '<option value="">Select...</option>';
499
+ endif;
500
+ foreach ( $option['content_2'] as $select_key => $select_value ) :
501
+ echo '<option value="' . $select_key . '" ' . ($value2 == $select_key ? 'selected' :'') . '>' . $select_value . '</option>';
502
+ endforeach;
503
+ echo '</select>';
504
+ echo '</div>';
505
+
506
+ echo '<div class="sw-premium-blocker"></div>';
507
+ echo '</div>';
508
+
509
+ elseif ( $option['type'] == 'select' && $option['size'] == 'two-fourths' ) :
510
+
511
+ if ( isset( $swp_user_options[ $key ] ) ) :
512
+ $value = $swp_user_options[ $key ];
513
+ else :
514
+ $value = $option['default'];
515
+ endif;
516
+
517
+ if ( $last_size == 'two-fourths' ) :
518
+ $last_size = '';
519
+ $fit = 'sw-fit';
520
+ else :
521
+ $last_size = 'two-fourths';
522
+ $fit = '';
523
+ endif;
524
+
525
+ echo '<div class="sw-grid sw-col-460 sw-fit sw-option-container ' . $key . '_wrapper" ' . (isset( $option['dep'] ) ? 'dep="' . $option['dep'] . '" dep_val=\'' . json_encode( $option['dep_val'] ) . '\'' : '') . ' ' . (isset( $option['premium'] ) ? 'premium="' . $option['premium'] . '"' : '') . '>';
526
+ echo '<div class="sw-grid sw-col-460"><p class="sw-checkbox-label">' . $option['name'] . '</p></div>';
527
+ echo '<div class="sw-grid sw-col-460 sw-fit"><select name="' . $key . '">';
528
+ if ( ! isset( $option['default'] ) ) :
529
+ echo '<option value="">Select...</option>';
530
+ endif;
531
+ foreach ( $option['content'] as $select_key => $select_value ) :
532
+ echo '<option value="' . $select_key . '" ' . ($value == $select_key ? 'selected' :'') . '>' . $select_value . '</option>';
533
+ endforeach;
534
+ echo '</select></div>';
535
+ echo '<div class="sw-premium-blocker"></div>';
536
+ echo '</div>';
537
+
538
+ elseif ( $option['type'] == 'select' && $option['size'] == 'two-thirds' ) :
539
+
540
+ if ( isset( $swp_user_options[ $key ] ) ) :
541
+ $value = $swp_user_options[ $key ];
542
+ else :
543
+ $value = $option['default'];
544
+ endif;
545
+
546
+ echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $key . '_wrapper" ' . (isset( $option['dep'] ) ? 'dep="' . $option['dep'] . '" dep_val=\'' . json_encode( $option['dep_val'] ) . '\'' : '') . ' ' . (isset( $option['premium'] ) ? 'premium="' . $option['premium'] . '"' : '') . '>';
547
+
548
+ echo '<div class="sw-grid sw-col-300"><p class="sw-checkbox-label">' . $option['name'] . '</p></div>';
549
+ echo '<div class="sw-grid sw-col-300"><select name="' . $key . '">';
550
+ if ( ! isset( $option['default'] ) ) :
551
+ echo '<option value="">Select...</option>';
552
+ endif;
553
+ foreach ( $option['content'] as $select_key => $select_value ) :
554
+ echo '<option value="' . $select_key . '" ' . ($value == $select_key ? 'selected' :'') . '>' . $select_value . '</option>';
555
+ endforeach;
556
+ echo '</select></div>';
557
+ echo '<div class="sw-grid sw-col-300 sw-fit"></div>';
558
+
559
+ echo '<div class="sw-premium-blocker"></div>';
560
+ echo '</div>';
561
+
562
+ endif;
563
+
564
+ /**
565
+ * Three-Wide Column Labels Module
566
+ */
567
+
568
+ if ( $option['type'] == 'column_labels' ) :
569
+ if ( $option['columns'] == 3 ) :echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $key . '_wrapper" ' . (isset( $option['dep'] ) ? 'dep="' . $option['dep'] . '" dep_val=\'' . json_encode( $option['dep_val'] ) . '\'' : '') . ' ' . (isset( $option['premium'] ) ? 'premium="' . $option['premium'] . '"' : '') . '>';
570
+ echo '<div class="sw-grid sw-col-300"><p class="sw-select-label sw-short sw-no-padding">' . $option['column_1'] . '</p></div>';
571
+ echo '<div class="sw-grid sw-col-300"><p class="sw-select-label sw-short sw-no-padding">' . $option['column_2'] . '</p></div>';
572
+ echo '<div class="sw-grid sw-col-300 sw-fit"><p class="sw-select-label sw-short sw-no-padding">' . $option['column_3'] . '</p></div>';
573
+ echo '<div class="sw-premium-blocker"></div>';
574
+ echo '</div>';
575
+ endif;
576
+ endif;
577
+
578
+ /**
579
+ * Divider Module
580
+ */
581
+
582
+ if ( $option['type'] == 'divider' ) :
583
+ if( !empty($option['premium']) && true === $option['premium'] ):
584
+ echo '<div class="sw-clearfix" premium="1"></div><div class="sw-admin-divider sw-clearfix" premium="1"></div>';
585
+ else:
586
+ echo '<div class="sw-clearfix"></div><div class="sw-admin-divider sw-clearfix"></div>';
587
+ endif;
588
+ endif;
589
+
590
+ /**
591
+ * HTML Module
592
+ */
593
+
594
+ if ( $option['type'] == 'html' ) :
595
+
596
+ echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $key . '_wrapper" ' . (isset( $option['dep'] ) ? 'dep="' . $option['dep'] . '" dep_val=\'' . json_encode( $option['dep_val'] ) . '\'' : '') . ' ' . (isset( $option['premium'] ) ? 'premium="' . $option['premium'] . '"' : '') . '>';
597
+ echo $option['content'];
598
+ echo '<div class="sw-premium-blocker"></div>';
599
+ echo '<div class="sw-clearfix"></div></div>';
600
+ endif;
601
+
602
+ /**
603
+ * Authentication / Button Module
604
+ */
605
+
606
+ if ( $option['type'] == 'authentication' ) :
607
+ echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $key . '_wrapper" ' . (isset( $option['dep'] ) ? 'dep="' . $option['dep'] . '" dep_val=\'' . json_encode( $option['dep_val'] ) . '\'' : '') . ' ' . (isset( $option['premium'] ) ? 'premium="' . $option['premium'] . '"' : '') . '>';
608
+ echo '<div class="sw-grid sw-col-300"><p class="sw-authenticate-label">' . $option['name'] . '</p></div>';
609
+ echo '<div class="sw-grid sw-col-300">';
610
+ if ( isset( $swp_user_options[ $option['dependant'] ] ) && $swp_user_options[ $option['dependant'] ] != '' ) :
611
+ echo '<a class="button sw-green-button" href="' . $option['link'] . '">' . __( 'Connected' , 'social-warfare' ) . '</a>';
612
+ else :
613
+ echo '<a class="button sw-navy-button" href="' . $option['link'] . '">' . __( 'Authenticated' , 'social-warfare' ) . '</a>';
614
+ endif;
615
+ echo '</div>';
616
+ echo '<div class="sw-grid sw-col-300 sw-fit"></div>';
617
+ echo '<div class="sw-premium-blocker"></div>';
618
+ echo '</div>';
619
+ endif;
620
+
621
+ /**
622
+ * Plugin Registration Module
623
+ */
624
+ if ( defined('SWPP_PLUGIN_DIR') && 'plugin_registration' === $option['type'] ) :
625
+ require_once SWPP_PLUGIN_DIR . '/functions/admin/views/options-registration.php';
626
+ endif;
627
+
628
+ /**
629
+ * Twitter Registration Module
630
+ */
631
+
632
+ if ( $option['type'] == 'tweet_counts' ) :
633
+
634
+ echo '<div class="sw-grid sw-col-940 sw-fit sw-option-container ' . $key . '_wrapper" ' . (isset( $option['dep'] ) ? 'dep="' . $option['dep'] . '" dep_val=\'' . json_encode( $option['dep_val'] ) . '\'' : '') . ' ' . (isset( $option['premium'] ) ? 'premium="' . $option['premium'] . '"' : '') . '>';
635
+
636
+ // Check for a default value
637
+ if ( isset( $swp_user_options['twitter_shares'] ) && $swp_user_options['twitter_shares'] == true ) :
638
+ $status = 'on';
639
+ $selected = 'checked';
640
+ elseif ( isset( $swp_user_options['twitter_shares'] ) && $swp_user_options['twitter_shares'] == false ) :
641
+ $status = 'off';
642
+ $selected = '';
643
+ else :
644
+ $status = 'off';
645
+ $selected = '';
646
+ endif;
647
+
648
+ // Begin Registration Wrapper
649
+ echo '<div class="tweet-count-wrapper" registration="false">';
650
+
651
+ // Registration Title
652
+ echo '<h2>' . __( 'Tweet Count Registration' , 'social-warfare' ) . '</h2>';
653
+
654
+ // Open the IS NOT Activated container
655
+ echo '<div class="sw-grid sw-col-940 swp_tweets_not_activated" dep="twitter_shares" dep_val="[false]">';
656
+
657
+ // The Warning Notice & Instructions
658
+ echo '<p class="sw-subtitle sw-registration-text">' . __( 'In order to allow Social Warfare to track tweet counts, we\'ve partnered with NewShareCounts.com. Follow the steps below to register with NewShareCounts and allow us to track your Twitter shares.' , 'social-warfare' ) . '</p>';
659
+ echo '<p class="sw-subtitle sw-registration-text sw-italic">Step 1: <a style="float:none;" class="button sw-navy-button" href="http://newsharecounts.com" target="_blank">' . __( 'Click here to visit NewShareCounts.com' , 'social-warfare' ) . '</a><br />' . __( 'Step 2: At NewShareCounts.com, Enter your domain and click the "Sign In With Twitter" button.' , 'social-warfare' ) . '<img class="sw-tweet-count-demo" src="' . SWP_PLUGIN_URL . '/images/admin-options-page/new_share_counts.png" /><br />' . __( 'Step 3: Flip the switch below to "ON" and then save changes.' , 'social-warfare' ) . '</p>';
660
+
661
+ // Close the IS NOT ACTIVATED container
662
+ echo '</div>';
663
+
664
+ // Checkbox Module
665
+ echo '<div class="sw-grid sw-col-300"><p class="sw-checkbox-label">Tweet Counts</p></div>';
666
+ echo '<div class="sw-grid sw-col-300">';
667
+ echo '<div class="sw-checkbox-toggle" status="' . $status . '" field="#twitter_shares"><div class="sw-checkbox-on">' . __( 'ON' , 'social-warfare' ) . '</div><div class="sw-checkbox-off">' . __( 'OFF' , 'social-warfare' ) . '</div></div>';
668
+ echo '<input type="checkbox" class="sw-hidden" name="twitter_shares" id="twitter_shares" ' . $selected . ' />';
669
+ echo '</div>';
670
+ echo '<div class="sw-grid sw-col-300 sw-fit"></div>';
671
+
672
+ // Close the Registration Wrapper
673
+ echo '</div>';
674
+
675
+ echo '<div class="sw-premium-blocker"></div>';
676
+ echo '</div>';
677
+
678
+ endif;
679
+
680
+ /**
681
+ * Close the Tab Container
682
+ */
683
+
684
+ // Add a divider element if necessary
685
+ if ( isset( $option['divider'] ) && $option['divider'] == true ) :
686
+ echo '<div class="sw-clearfix"></div><div class="sw-admin-divider sw-clearfix"></div>';
687
+ endif;
688
+
689
+ if ( isset( $option['size'] ) && $option['size'] != 'two-fourths' ) :
690
+ $last_size = '';
691
+ endif;
692
+
693
+ // Close the loop
694
+ endforeach;
695
+
696
+ // Close the tab container
697
+ echo '</div>';
698
+
699
+ endforeach;
700
+
701
+ echo '</form>';
702
+ echo '</div>';
703
+
704
+ /**
705
+ * System Status Generator
706
+ */
707
+
708
+ if ( ! function_exists( 'get_plugins' ) ) {
709
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
710
+ }
711
+ $plugins = get_plugins();
712
+ $pluginList = '';
713
+ foreach ( $plugins as $plugin ) :
714
+ $pluginList .= '<tr><td><b>' . $plugin['Name'] . '</b></td><td>' . $plugin['Version'] . '</td></tr>';
715
+ endforeach;
716
+
717
+ if ( function_exists( 'fsockopen' ) ) :
718
+ $fsockopen = '<span style="color:green;">Enabled</span>';
719
+ else :
720
+ $fsockopen = '<span style="color:red;">Disabled</span>';
721
+ endif;
722
+
723
+ if ( function_exists( 'curl_version' ) ) :
724
+ $curl_version = curl_version();
725
+ $curl_status = '<span style="color:green;">Enabled: v' . $curl_version['version'] . '</span>';
726
+ else :
727
+ $curl_status = '<span style="color:red;">Disabled</span>';
728
+ endif;
729
+
730
+ $theme = wp_get_theme();
731
+
732
+ $system_status = '
733
+ <table style="width:100%;">
734
+ <tr><td><h2>Environment Statuses</h2></td><td></td></tr>
735
+ <tr><td><b>Home URL</b></td><td>' . get_home_url() . '</td></tr>
736
+ <tr><td><b>Site URL</b></td><td>' . get_site_url() . '</td></tr>
737
+ <tr><td><b>WordPress Version</b></td><td>' . get_bloginfo( 'version' ) . '</td></tr>
738
+ <tr><td><b>PHP Version</b></td><td>' . phpversion() . '</td></tr>
739
+ <tr><td><b>WP Memory Limit</b></td><td>' . WP_MEMORY_LIMIT . '</td></tr>
740
+ <tr><td><b>Social Warfare Version</b></td><td>' . SWP_VERSION . '</td></tr>
741
+ <tr><td><h2>Connection Statuses</h2></td><td></td></tr>
742
+ <tr><td><b>fsockopen</b></td><td>' . $fsockopen . '</td></tr>
743
+ <tr><td><b>cURL</b></td><td>' . $curl_status . '</td></tr>
744
+ <tr><td><h2>Plugin Statuses</h2></td><td></td></tr>
745
+ <tr><td><b>Theme Name</b></td><td>' . $theme['Name'] . '</td></tr>
746
+ <tr><td><b>Theme Version</b></td><td>' . $theme['Version'] . '</td></tr>
747
+ <tr><td><b>Active Plugins</b></td><td></td></tr>
748
+ <tr><td><b>Number of Active Plugins</b></td><td>' . count( $plugins ) . '</td></tr>
749
+ ' . $pluginList . '
750
+ </table>
751
+ ';
752
+
753
+ /**
754
+ * The Right Sidebar
755
+ */
756
+
757
+ echo '<div class="sw-admin-sidebar sw-grid sw-col-220 sw-fit">';
758
+ echo '<a href="https://warfareplugins.com/affiliates/" target="_blank"><img src="' . SWP_PLUGIN_URL . '/images/admin-options-page/affiliate-300x150.jpg"></a>';
759
+ echo '<a href="https://warfareplugins.com/walkthrough/" target="_blank"><img src="' . SWP_PLUGIN_URL . '/images/admin-options-page/starter-guide-300x150.jpg"></a>';
760
+ echo '<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>';
761
+ echo '<p class="sw-support-notice sw-italic">' . __( 'Need help? Check out our <a href="https://warfareplugins.com/support/" target="_blank">Knowledgebase.' , 'social-warfare' ) . '</a></p>';
762
+ echo '<p class="sw-support-notice sw-italic">' . __( 'Opening a support ticket? Copy your System Status by clicking the button below.' , 'social-warfare' ) . '</p>';
763
+ echo '<a href="#" class="button sw-blue-button sw-system-status">' . __( 'Get System Status' , 'social-warfare' ) . '</a>';
764
+
765
+ // Sytem Status Container
766
+ echo '<div class="sw-clearfix"></div>';
767
+ echo '<div class="system-status-wrapper">';
768
+ echo '<h4>' . __( 'Press Ctrl+C to Copy this information.' , 'social-warfare' ) .'</h4>';
769
+ echo '<div class="system-status-container">' . $system_status . '</div>';
770
+
771
+ echo '</div>';
772
+
773
+ echo '</div>';
774
+
775
+ echo '</div>';
776
+
777
+ }
778
+
779
+ add_action( 'wp_ajax_swp_store_settings', 'swp_store_the_settings' );
780
+ /**
781
+ * Handle the options save request inside of admin-ajax.php
782
+ *
783
+ * @since unknown
784
+ * @return void
785
+ */
786
+ function swp_store_the_settings() {
787
+ global $swp_user_options;
788
+
789
+ if ( ! check_ajax_referer( 'swp_plugin_options_save', 'security', false ) ) {
790
+ wp_send_json_error( esc_html__( 'Security failed.', 'social-warfare' ) );
791
+ die;
792
+ }
793
+
794
+ $data = wp_unslash( $_POST );
795
+
796
+ if ( empty( $data['settings'] ) ) {
797
+ wp_send_json_error( esc_html__( 'No settings to save.', 'social-warfare' ) );
798
+ die;
799
+ }
800
+
801
+ $settings = $data['settings'];
802
+
803
+ $options = $swp_user_options;
804
+
805
+ unset( $options['newOrderOfIcons']['active'] );
806
+ unset( $options['newOrderOfIcons']['inactive'] );
807
+
808
+ // Loop and check for checkbox values, convert them to boolean.
809
+ foreach ( $settings as $key => $value ) {
810
+ if ( 'true' == $value ) {
811
+ $options[ $key ] = true;
812
+ } elseif ( 'false' == $value ) {
813
+ $options[ $key ] = false;
814
+ } else {
815
+ $options[ $key ] = $value;
816
+ }
817
+ }
818
+
819
+ swp_update_options( $options );
820
+ echo json_encode($options);
821
+
822
+ die;
823
+ }
functions/bitly.php DELETED
@@ -1,310 +0,0 @@
1
- <?php
2
-
3
- /*****************************************************************
4
- * *
5
- * Link Shortening & Analytics Functions *
6
- * *
7
- ******************************************************************/
8
-
9
- // Enqueue the Bitly Shortener Hook
10
- add_filter('swp_link_shortening' , 'swp_bitly_shortener' );
11
- add_filter('swp_analytics' , 'swp_google_analytics' );
12
-
13
-
14
- /*****************************************************************
15
- * *
16
- * The Google Analytics Filter Function *
17
- * *
18
- ******************************************************************/
19
-
20
- function swp_google_analytics( $array ) {
21
-
22
- // Fetch the user options
23
- $options = swp_get_user_options();
24
- $url = $array['url'];
25
- $network = $array['network'];
26
-
27
- // Check if Analytics have been enabled or not
28
- if($options['googleAnalytics'] == true):
29
- if (strpos($url,'?') !== false) :
30
- $url = $url.urlencode('&utm_source='.$network.'&utm_medium='.$options['analyticsMedium'].'&utm_campaign='.$options['analyticsCampaign'].'');
31
- else:
32
- $url = $url.urlencode('?utm_source='.$network.'&utm_medium='.$options['analyticsMedium'].'&utm_campaign='.$options['analyticsCampaign'].'');
33
- endif;
34
- return $url;
35
- else:
36
- return $url;
37
- endif;
38
- }
39
-
40
- /*****************************************************************
41
- * *
42
- * The Bitly Link Shortener Function *
43
- * *
44
- ******************************************************************/
45
-
46
- // The Bitly Shortener Function called by the filter hook
47
- function swp_bitly_shortener( $array ) {
48
-
49
- $url = $array['url'];
50
- $network = $array['network'];
51
- $postID = $array['postID'];
52
-
53
- // Fetch the User's Options
54
- $options = swp_get_user_options();
55
-
56
- // If Link shortening is activated....
57
- if($options['linkShortening'] == true) :
58
-
59
- // If Bitly is activated and we have all the appropriate credentials....
60
- if(isset($options['bitly_access_token'])):
61
-
62
- // Collect our bitly login information
63
- $access_token = $options['bitly_access_token'];
64
-
65
- // If Google Analytics is Activated....
66
- if($options['googleAnalytics'] == true):
67
-
68
- // If the Cache is still fresh or a previous API request failed....
69
- if(swp_is_cache_fresh($postID) == true || (isset($_GLOBALS['bitly_status']) && $_GLOBALS['bitly_status'] == 'failure') ):
70
-
71
- // If the link has already been shortened....
72
- $existingURL = get_post_meta($postID,'bitly_link_'.$network,true);
73
- if($existingURL && swp_is_cache_fresh($postID) == true):
74
- return $existingURL;
75
-
76
- // If the link has NOT already been shortened
77
- else:
78
-
79
- // ....Return the normal URL
80
- return $url;
81
-
82
- endif;
83
-
84
- // If the Cache is NOT fresh....
85
- else:
86
-
87
- // If the API provides a shortened URL...
88
- $shortURL = swp_make_bitly_url( urldecode($url) , $network , $access_token );
89
- if($shortURL):
90
-
91
- // Store the link in the cache and return it to the buttons
92
- delete_post_meta($postID,'bitly_link_'.$network);
93
- update_post_meta($postID,'bitly_link_'.$network,$shortURL);
94
- return $shortURL;
95
-
96
- // If the API does not provide a shortened URL....
97
- else:
98
-
99
- // Set a variable we'll check to avoid multiple calls to bitly upon the first failure
100
- $_GLOBALS['sw']['bitly_status'] = 'failure';
101
-
102
- // Return the normal URL
103
- return $url;
104
-
105
- // End the check for a shortneing link from the API
106
- endif;
107
-
108
- // End the check for the cache being fresh
109
- endif;
110
-
111
- // If Google Analytics is NOT activated....
112
- else:
113
- // If the cache is fresh or if the API has failed already....
114
- if(swp_is_cache_fresh($postID) == true || (isset($_GLOBALS['bitly_status']) && $_GLOBALS['bitly_status'] == 'failure')):
115
-
116
-
117
- // If we have a shortened URL in the cache....
118
- $existingURL = get_post_meta($postID,'bitly_link',true);
119
- if($existingURL):
120
-
121
- // Save the link in a constant for use in other parts of the loops
122
- $_GLOBALS['sw']['links'][$postID] = $existingURL;
123
-
124
- // Return the shortened URL
125
- return $existingURL;
126
-
127
- // If we don't have a shortlink in the cache....
128
- else:
129
-
130
- // Return the normal URL
131
- return $url;
132
-
133
- endif;
134
-
135
- // If the cache is expired and needs to be rebuilt....
136
- else:
137
-
138
- // If we've already generated this link....
139
- if(isset($_GLOBALS['sw']['links'][$postID])):
140
-
141
- return $_GLOBALS['sw']['links'][$postID];
142
-
143
- // If we've don't already have a generated link....
144
- else:
145
-
146
- // Use the bitly function to construct a shortened link
147
- $shortURL = swp_make_bitly_url( urldecode($url) , $network , $access_token );
148
-
149
- // If we got a shortened URL from their API....
150
- if($shortURL):
151
-
152
- // Save the link in a global so we can skip this part next time
153
- $_GLOBALS['sw']['links'][$postID] = $shortURL;
154
-
155
- // Delete the meta fields and then update to keep the database clean and up to date.
156
- delete_post_meta($postID,'bitly_link_'.$network);
157
- delete_post_meta($postID,'bitly_link');
158
- update_post_meta($postID,'bitly_link',$shortURL);
159
-
160
- // Return the short URL
161
- return $shortURL;
162
-
163
- // If didn't get a shortened URL from their API....
164
- else:
165
-
166
- // Set a variable we'll check to avoid multiple calls to bitly upon the first failure
167
- $_GLOBALS['sw']['bitly_status'] = 'failure';
168
-
169
- // Return the normal URL
170
- return $url;
171
-
172
- // End check for shorte URL from the API
173
- endif;
174
-
175
- // End check for link in the Global Variable
176
- endif;
177
-
178
- // End check for the cache freshness
179
- endif;
180
-
181
- // End check for Analytics
182
- endif;
183
-
184
- // If Bitly is not activated or we don't have the credentials provided....
185
- else:
186
-
187
- // Return the normal URL
188
- return $url;
189
-
190
- // End the check for bitly activation and credentials
191
- endif;
192
-
193
- // If link shortening is not activated....
194
- else:
195
-
196
- // Return the normal URL
197
- return $url;
198
-
199
- // End the check for link shortening being activated
200
- endif;
201
- }
202
-
203
- function swp_make_bitly_url( $url , $network , $access_token) {
204
-
205
- // Fetch the user's options
206
- $options = swp_get_user_options();
207
-
208
- /* Create a link to check if the permalink has already been shortened.
209
- $bitly_lookup_url = 'https://api-ssl.bitly.com/v3/user/link_lookup?url='.urlencode($url).'&access_token='.$access_token;
210
-
211
- // Fetch a response from the Bitly Lookup API
212
- $bitly_lookup_response = swp_file_get_contents_curl( $bitly_lookup_url );
213
-
214
- // Parse the JSON formatted response from the Bitly Lookup API
215
- $bitly_lookup_response = json_decode( $bitly_lookup_response , true );
216
-
217
- // If the lookup returned a valid, previously generated short link....
218
- if( isset( $bitly_lookup_response['data']['link_lookup'][0]['link'] ) && true == false ):
219
-
220
- // Store the short url to return to the plugin
221
- $short_url = $bitly_lookup_response['data']['link_lookup'][0]['link'];
222
-
223
- // If the lookup did not return a valid short link....
224
- else:*/
225
-
226
- // Set the format to json
227
- $format='json';
228
-
229
- // Create a link to reach the Bitly API
230
- $bitly_api = 'https://api-ssl.bitly.com/v3/shorten?access_token='.$access_token.'&uri='.urlencode($url).'&format='.$format;
231
-
232
- // Fetch a response from the Bitly Shortening API
233
- $data = swp_file_get_contents_curl($bitly_api);
234
-
235
- // Parse the JSON formated response into an array
236
- $data = json_decode( $data , true);
237
-
238
- // If the shortening succeeded....
239
- if( isset ( $data['data']['url'] ) ) :
240
-
241
- // Store the short URL to return to the plugin
242
- $short_url = $data['data']['url'];
243
-
244
- // If the shortening failed....
245
- else:
246
-
247
- // Return a status of false
248
- $short_url = false;
249
-
250
- endif;
251
-
252
- // endif;
253
-
254
- return $short_url;
255
-
256
- }
257
-
258
- /*****************************************************************
259
- * *
260
- * Apply the Link Shortening and Analytics Filters to the URL *
261
- * *
262
- ******************************************************************/
263
-
264
- function swp_process_url( $url , $network , $postID) {
265
-
266
- // $bitly_api = 'https://api-ssl.bitly.com/v3/link/lookup?url='.urlencode($url).'&login='.$login.'&apiKey='.$appkey;
267
- // $data = swp_file_get_contents_curl($bitly_api);
268
- // $data = json_decode($data);
269
- // var_dump($data);
270
-
271
- // Check to see if we've already shortened this link in another section of the loop.
272
- // This will only be set if analytics are turned off and bitly is turned on.
273
- // Since all links will be the same, this will be generated on the first request and
274
- // then stored for immediate use on subsequent requests.
275
- if(isset($_GLOBALS['sw']['links'][$postID])):
276
- return $_GLOBALS['sw']['links'][$postID];
277
- else:
278
-
279
- // $options = swp_get_user_options();
280
- $array['url'] = $url;
281
- $array['network'] = $network;
282
- $array['postID'] = $postID;
283
- $array['url'] = apply_filters('swp_analytics' , $array);
284
- $url = apply_filters('swp_link_shortening' , $array);
285
- return $url;
286
-
287
- endif;
288
-
289
- }
290
-
291
- /*****************************************************************
292
- * *
293
- * BITLY OAUTH TRIGGER RESPONSE *
294
- * *
295
- ******************************************************************/
296
- add_action( 'wp_ajax_nopriv_swp_bitly_oauth', 'swp_bitly_oauth_callback' );
297
- function swp_bitly_oauth_callback() {
298
-
299
- // Fetch the User's Options Array
300
- $swp_user_options = swp_get_user_options();
301
-
302
- // Set the premium code to null
303
- $swp_user_options['bitly_access_token'] = $_GET['access_token'];
304
-
305
- // Update the options array with the premium code nulled
306
- update_option('socialWarfareOptions',$swp_user_options);
307
-
308
- echo admin_url( 'admin.php?page=social-warfare' );
309
-
310
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/buttons-floating.php CHANGED
@@ -1,94 +1,99 @@
1
  <?php
2
 
3
- /*****************************************************************
4
- * *
5
- * Side Fixed Floater Function *
6
- * *
7
- ******************************************************************/
8
-
9
- function socialWarfareSideFloat() {
10
-
11
- $postID = get_the_ID();
12
- $options = swp_get_user_options();
13
- $postType = get_post_type($postID);
14
-
15
- if( is_singular() ):
16
- $postType = get_post_type($postID);
17
- if(isset($options['float_location_'.$postType])):
18
- $visibility = $options['float_location_'.$postType];
19
- else:
 
 
 
 
 
 
20
  $visibility = 'on';
21
  endif;
22
- else:
23
  $visibility = 'on';
24
  endif;
25
 
26
- if( is_singular() && get_post_status($postID) == 'publish' && get_post_meta( $postID , 'nc_floatLocation' , true ) != 'off' && $visibility == 'on' && !is_home()):
27
-
28
- // Get the options...or create them if they don't exist
29
- wp_reset_query();
30
 
31
  // Acquire the social stats from the networks
32
  // Acquire the social stats from the networks
33
- if(isset($array['url'])):
34
  $buttonsArray['url'] = $array['url'];
35
- else:
36
  $buttonsArray['url'] = get_permalink( $postID );
37
  endif;
38
 
39
- if($options['float'] && is_singular()):
40
- $floatOption = 'float'.ucfirst($options['floatOption']);
41
- else:
42
  $floatOption = 'floatNone';
43
  endif;
44
 
45
- if($options['floatStyleSource'] == true):
46
  $options['sideDColorSet'] = $options['dColorSet'];
47
  $options['sideIColorSet'] = $options['iColorSet'];
48
  $options['sideOColorSet'] = $options['oColorSet'];
49
  endif;
50
 
51
  // Setup the buttons array to pass into the 'swp_network_buttons' hook
52
- $buttonsArray['shares'] = get_social_warfare_shares($postID);
53
  $buttonsArray['count'] = 0;
54
  $buttonsArray['totes'] = 0;
55
  $buttonsArray['options'] = $options;
56
- if( $buttonsArray['options']['totes'] && $buttonsArray['shares']['totes'] >= $buttonsArray['options']['minTotes'] ) ++$buttonsArray['count'];
 
57
  $buttonsArray['resource'] = array();
58
  $buttonsArray['postID'] = $postID;
 
59
  $buttonsArray = apply_filters( 'swp_network_buttons' , $buttonsArray );
60
 
61
  // Create the social panel
62
- $assets = '<div class="nc_socialPanelSide nc_socialPanel swp_'.$options['floatStyle'].' swp_d_'.$options['sideDColorSet'].' swp_i_'.$options['sideIColorSet'].' swp_o_'.$options['sideOColorSet'].' '.$options['sideReveal'].'" data-position="'.$options['locationPost'].'" data-float="'.$floatOption.'" data-count="'.$buttonsArray['count'].'" data-floatColor="'.$options['floatBgColor'].'" data-screen-width="'.$options['swp_float_scr_sz'].'" data-transition="'.$options['sideReveal'].'">';
63
 
64
  // Display Total Shares if the Threshold has been met
65
- if($options['totes'] && $buttonsArray['totes'] >= $options['minTotes']):
66
  $assets .= '<div class="nc_tweetContainer totes totesalt" data-id="6" >';
67
- $assets .= '<span class="swp_count">'.swp_kilomega($buttonsArray['totes']).'</span><span class="swp_label"> '.__('Shares','social-warfare').'</span>';
68
  $assets .= '</div>';
69
  endif;
70
 
71
  $i = 0;
72
  // Sort the buttons according to the user's preferences
73
- if(isset($buttonsArray) && isset($buttonsArray['buttons'])):
74
- foreach($buttonsArray['buttons'] as $key=>$value):
75
- if(isset($buttonsArray['resource'][$key]) && $i < 5):
76
- $assets .= $buttonsArray['resource'][$key];
77
  endif;
78
  ++$i;
79
  endforeach;
80
- elseif($options['orderOfIconsSelect'] == 'manual'):
81
- foreach($options['newOrderOfIcons'] as $key => $value):
82
- if(isset($buttonsArray['resource'][$key]) && $i < 5):
83
- $assets .= $buttonsArray['resource'][$key];
84
  endif;
85
  ++$i;
86
  endforeach;
87
- elseif($options['orderOfIconsSelect'] == 'dynamic'):
88
- arsort($buttonsArray['shares']);
89
- foreach($buttonsArray['shares'] as $thisIcon => $status):
90
- if(isset($buttonsArray['resource'][$thisIcon]) && $i < 5):
91
- $assets .= $buttonsArray['resource'][$thisIcon];
92
  endif;
93
  ++$i;
94
  endforeach;
@@ -100,4 +105,4 @@
100
  echo $assets;
101
 
102
  endif;
103
- }
1
  <?php
2
 
3
+ /**
4
+
5
+ * **************************************************************
6
+ * *
7
+ * Side Fixed Floater Function *
8
+ * *
9
+ ******************************************************************/
10
+
11
+ function socialWarfareSideFloat() {
12
+ global $swp_user_options;
13
+
14
+ // Get the options...or create them if they don't exist
15
+ wp_reset_query();
16
+
17
+ $postID = get_the_ID();
18
+ $options = $swp_user_options;
19
+ $postType = get_post_type( $postID );
20
+
21
+ if ( is_singular() ) :
22
+ $postType = get_post_type( $postID );
23
+ if ( isset( $options[ 'float_location_' . $postType ] ) ) :
24
+ $visibility = $options[ 'float_location_' . $postType ];
25
+ else :
26
  $visibility = 'on';
27
  endif;
28
+ else :
29
  $visibility = 'on';
30
  endif;
31
 
32
+ if ( is_singular() && get_post_status( $postID ) == 'publish' && get_post_meta( $postID , 'nc_floatLocation' , true ) != 'off' && $visibility == 'on' && ! is_home() ) :
 
 
 
33
 
34
  // Acquire the social stats from the networks
35
  // Acquire the social stats from the networks
36
+ if ( isset( $array['url'] ) ) :
37
  $buttonsArray['url'] = $array['url'];
38
+ else :
39
  $buttonsArray['url'] = get_permalink( $postID );
40
  endif;
41
 
42
+ if ( $options['float'] && is_singular() ) :
43
+ $floatOption = 'float' . ucfirst( $options['floatOption'] );
44
+ else :
45
  $floatOption = 'floatNone';
46
  endif;
47
 
48
+ if ( $options['floatStyleSource'] == true ) :
49
  $options['sideDColorSet'] = $options['dColorSet'];
50
  $options['sideIColorSet'] = $options['iColorSet'];
51
  $options['sideOColorSet'] = $options['oColorSet'];
52
  endif;
53
 
54
  // Setup the buttons array to pass into the 'swp_network_buttons' hook
55
+ $buttonsArray['shares'] = get_social_warfare_shares( $postID );
56
  $buttonsArray['count'] = 0;
57
  $buttonsArray['totes'] = 0;
58
  $buttonsArray['options'] = $options;
59
+ if ( $buttonsArray['options']['totes'] && $buttonsArray['shares']['totes'] >= $buttonsArray['options']['minTotes'] ) { ++$buttonsArray['count'];
60
+ }
61
  $buttonsArray['resource'] = array();
62
  $buttonsArray['postID'] = $postID;
63
+
64
  $buttonsArray = apply_filters( 'swp_network_buttons' , $buttonsArray );
65
 
66
  // Create the social panel
67
+ $assets = '<div class="nc_socialPanelSide nc_socialPanel swp_' . $options['floatStyle'] . ' swp_d_' . $options['sideDColorSet'] . ' swp_i_' . $options['sideIColorSet'] . ' swp_o_' . $options['sideOColorSet'] . ' ' . $options['sideReveal'] . '" data-position="' . $options['location_post'] . '" data-float="' . $floatOption . '" data-count="' . $buttonsArray['count'] . '" data-floatColor="' . $options['floatBgColor'] . '" data-screen-width="' . $options['swp_float_scr_sz'] . '" data-transition="' . $options['sideReveal'] . '" data-mobileFloat="'.$options['floatLeftMobile'].'">';
68
 
69
  // Display Total Shares if the Threshold has been met
70
+ if ( $options['totes'] && $buttonsArray['totes'] >= $options['minTotes'] ) :
71
  $assets .= '<div class="nc_tweetContainer totes totesalt" data-id="6" >';
72
+ $assets .= '<span class="swp_count">' . swp_kilomega( $buttonsArray['totes'] ) . '</span><span class="swp_label"> ' . __( 'Shares','social-warfare' ) . '</span>';
73
  $assets .= '</div>';
74
  endif;
75
 
76
  $i = 0;
77
  // Sort the buttons according to the user's preferences
78
+ if ( isset( $buttonsArray ) && isset( $buttonsArray['buttons'] ) ) :
79
+ foreach ( $buttonsArray['buttons'] as $key => $value ) :
80
+ if ( isset( $buttonsArray['resource'][ $key ] ) && $i <= 5 ) :
81
+ $assets .= $buttonsArray['resource'][ $key ];
82
  endif;
83
  ++$i;
84
  endforeach;
85
+ elseif ( $options['orderOfIconsSelect'] == 'manual' ) :
86
+ foreach ( $options['newOrderOfIcons'] as $key => $value ) :
87
+ if ( isset( $buttonsArray['resource'][ $key ] ) && $i <= 5 ) :
88
+ $assets .= $buttonsArray['resource'][ $key ];
89
  endif;
90
  ++$i;
91
  endforeach;
92
+ elseif ( $options['orderOfIconsSelect'] == 'dynamic' ) :
93
+ arsort( $buttonsArray['shares'] );
94
+ foreach ( $buttonsArray['shares'] as $thisIcon => $status ) :
95
+ if ( isset( $buttonsArray['resource'][ $thisIcon ] ) && $i <= 5 ) :
96
+ $assets .= $buttonsArray['resource'][ $thisIcon ];
97
  endif;
98
  ++$i;
99
  endforeach;
105
  echo $assets;
106
 
107
  endif;
108
+ }
functions/buttons-standard.php CHANGED
@@ -1,11 +1,30 @@
1
  <?php
2
 
3
- /*****************************************************************
4
- * *
5
- * THE SOCIAL WARFARE WRAPPER FUNCTION *
6
- * *
7
- ******************************************************************/
8
- function socialWarfare( $content = false , $where = 'default' , $echo = true ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
  // Collect the deprecated fields and place them into an array
11
  $array['content'] = $content;
@@ -14,269 +33,236 @@ function socialWarfare( $content = false , $where = 'default' , $echo = true ) {
14
  $array['devs'] = true;
15
 
16
  // Pass the array into the new function
17
- return social_warfare($array);
18
  }
19
- /*****************************************************************
20
- * *
21
- * A RECURSIVE ARRAY SEARCH FUNCTION *
22
- * *
23
- ******************************************************************/
24
- function recursive_array_search($needle,$haystack) {
25
- foreach($haystack as $key=>$value) {
26
- $current_key=$key;
27
- if($needle===$value OR (is_array($value) && recursive_array_search($needle,$value) !== false)) {
28
- return $current_key;
29
- }
30
- }
31
- return false;
32
- }
33
- /*****************************************************************
34
- * *
35
- * CACHe CHECKING FUNCTION *
36
- * *
37
- ******************************************************************/
38
- function swp_is_cache_fresh( $postID , $output=false , $ajax=false ) {
39
-
40
- // Fetch the Options
41
- $options = swp_get_user_options();
42
-
43
- // Check if output is being forced or if legacy caching is enabled
44
- if($output == false && $options['cacheMethod'] != 'legacy'):
45
- if(isset($_GET['swp_cache']) && $_GET['swp_cache'] == 'rebuild'):
46
- $freshCache = false;
47
- else:
48
- $freshCache = true;
49
- endif;
50
-
51
- else:
52
- $postAge = floor(date('U') - get_post_time( 'U' , false , $postID));
53
- if($postAge < (21 * 86400)){ $hours = 1; }
54
- elseif($postAge < (60 * 86400)) { $hours = 4; }
55
- else { $hours = 12; }
56
-
57
- $time = floor(((date('U')/60)/60));
58
- $lastChecked = get_post_meta($postID,'swp_cache_timestamp',true);
59
-
60
- // Check if it's a crawl bot. If so, ONLY SERVE CACHED RESULTS FOR MAXIMUM SPEED
61
- if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/bot|crawl|slurp|spider/i', $_SERVER['HTTP_USER_AGENT'])):
62
- $freshCache = true;
63
-
64
- // Next, check if the cache is fresh or needs rebuilt
65
- // Always be TRUE if we're not on a single.php otherwise we could end up
66
- // Rebuilding multiple page caches which will cost a lot of time.
67
- elseif(($lastChecked > ($time - $hours) && $lastChecked > 390000) || (!is_singular() && $ajax == false) ) :
68
- $freshCache = true;
69
- else:
70
- $freshCache = false;
71
- endif;
72
- endif;
73
- return $freshCache;
74
- }
75
-
76
-
77
- function swp_disable_subs() { return false; };
78
- /*****************************************************************
79
-
80
- THE SHARE BUTTONS FUNCTION:
81
-
82
- This function accepts an array of parameters resulting in the
83
- outputting of the Social Warfare Buttons.
84
-
85
-
86
- ACCEPTED PARAMETERS :
87
-
88
- content : The post content to which we append the buttons
89
- : (string)
90
-
91
- where : Used to overwrite the default location in relation to the content
92
- : ( above | below | both | none )
93
-
94
- echo : Used to print or store the variables.
95
- : ( true | false )
96
-
97
-
98
 
99
- ******************************************************************/
100
- function social_warfare_buttons($array = array()) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
 
102
  // Setup the default Array parameters
103
- if(!isset($array['where'])) { $array['where'] = 'default'; }
104
- if(!isset($array['echo'])) { $array['echo'] = true; }
105
- if(!isset($array['content'])) { $array['content'] = false; }
106
 
107
  // Get the options...or create them if they don't exist
108
- if(isset($array['post_id'])):
109
  $postID = $array['post_id'];
110
- else:
111
  $postID = get_the_ID();
112
  endif;
113
 
114
- $options = swp_get_user_options();
115
 
116
  // Check to see if display location was specifically defined for this post
117
- $specWhere = get_post_meta($postID,'nc_postLocation',true);
118
- if( !$specWhere ) { $specWhere = 'default'; };
119
-
120
- if($array['where'] == 'default'):
121
- if($specWhere == 'default' || $specWhere == ''):
122
- if( is_singular() ):
123
- $postType = get_post_type($postID);
124
- if(isset($options['location_'.$postType])):
125
- $array['where'] = $options['location_'.$postType];
126
- else:
 
 
 
 
 
 
 
127
  $array['where'] = 'none';
128
  endif;
129
- else:
130
- //$postType = get_post_type($postID);
131
- //if(isset($options['location_'.$postType])):
132
- // $array['where'] = $options['location_'.$postType];
133
- //elseif($postType == 'post' || $postType == 'page'):
134
- $array['where'] = $options['locationSite'];
135
- //else:
136
- // $array['where'] = 'none';
137
- //endif;
138
  endif;
139
- else:
140
- $array['where'] = $specWhere;
 
 
141
  endif;
142
  endif;
143
-
144
  // Disable the buttons on Buddy Press pages
145
- if(function_exists('is_buddypress') && is_buddypress()):
146
  return $array['content'];
147
 
148
- // Disable the buttons if the location is set to "None / Manual"
149
- elseif($array['where'] == 'none' && !isset($array['devs'])):
150
  return $array['content'];
151
 
152
- // Disable the button if we're not in the loop, unless there is no content which means the function was called by a developer.
153
- elseif( (!is_main_query() || !in_the_loop()) && !isset($array['devs']) ):
154
  return $array['content'];
155
 
156
- // Don't do anything if we're in the admin section
157
- elseif( is_admin() ):
158
  return $array['content'];
159
 
160
- // If all the checks pass, let's make us some buttons!
161
- else:
162
 
163
  // Set the options for the horizontal floating bar
164
- if($options['float'] && is_singular()):
165
- $floatOption = 'float'.ucfirst($options['floatOption']);
166
- else:
 
 
 
 
 
 
167
  $floatOption = 'floatNone';
168
  endif;
169
 
170
  // Disable the plugin on feeds, search results, and non-published content
171
- if (!is_feed() && !is_search() && get_post_status($postID) == 'publish' ):
172
 
173
  // Acquire the social stats from the networks
174
- if(isset($array['url'])):
175
  $buttonsArray['url'] = $array['url'];
176
- else:
177
  $buttonsArray['url'] = get_permalink( $postID );
178
  endif;
179
 
 
 
 
 
 
 
180
  // Fetch the share counts
181
- $buttonsArray['shares'] = get_social_warfare_shares($postID);
182
 
183
  // Pass the swp_options into the array so we can pass it into the filter
184
  $buttonsArray['options'] = $options;
185
 
186
  // Customize which buttosn we're going to display
187
- if( isset ( $array['buttons'] ) ):
188
-
189
  // Fetch the global names and keys
190
  $swp_options = array();
191
- $swp_available_options = apply_filters('swp_options',$swp_options);
192
  $available_buttons = $swp_available_options['options']['swp_display']['buttons']['content'];
193
 
194
  // Split the comma separated list into an array
195
- $button_set_array = explode(',', $array['buttons']);
196
-
197
  // Match the names in the list to their appropriate system-wide keys
198
- foreach($button_set_array as $button):
199
- if( recursive_array_search( $button , $available_buttons ) ) :
200
- $key = recursive_array_search( $button , $available_buttons );
201
-
 
 
 
 
 
 
202
  // Store the result in the array that gets passed to the HTML generator
203
- $buttonsArray['buttons'][$key] = $button;
204
 
205
  // Declare a default share count of zero. This will be overriden later
206
- if(!isset($buttonsArray['shares'][$key])):
207
- $buttonsArray['shares'][$key] = 0;
208
  endif;
209
-
210
  endif;
 
 
 
211
  endforeach;
212
-
213
  // Manually turn the total shares on or off
214
- if(array_search('Total',$button_set_array)) $buttonsArray['buttons']['totes'] = 'Total';
 
215
  endif;
216
-
217
  // Setup the buttons array to pass into the 'swp_network_buttons' hook
218
  $buttonsArray['count'] = 0;
219
  $buttonsArray['totes'] = 0;
220
- if( ( $buttonsArray['options']['totes'] && $buttonsArray['shares']['totes'] >= $buttonsArray['options']['minTotes'] && !isset($array['buttons']) )
221
- || ( isset($buttonsArray['buttons']) && isset($buttonsArray['buttons']['totes']) && $buttonsArray['totes'] >= $options['minTotes'] ) ) :
222
  ++$buttonsArray['count'];
223
  endif;
224
  $buttonsArray['resource'] = array();
225
  $buttonsArray['postID'] = $postID;
226
 
227
  // Disable the subtitles plugin to avoid letting them inject their subtitle into our share titles
228
- if ( is_plugin_active( 'subtitles/subtitles.php' ) && class_exists ( 'Subtitles' ) ) :
229
- remove_filter( 'the_title', array( Subtitles::getinstance() , 'the_subtitle' ), 10, 2 );
230
  endif;
231
 
232
  // This array will contain the HTML for all of the individual buttons
233
  $buttonsArray = apply_filters( 'swp_network_buttons' , $buttonsArray );
234
-
235
  // Create the social panel
236
- $assets = '<div class="nc_socialPanel swp_'.$options['visualTheme'].' swp_d_'.$options['dColorSet'].' swp_i_'.$options['iColorSet'].' swp_o_'.$options['oColorSet'].'" data-position="'.$options['locationPost'].'" data-float="'.$floatOption.'" data-count="'.$buttonsArray['count'].'" data-floatColor="'.$options['floatBgColor'].'" data-scale="'.$options['buttonSize'].'" data-align="'.$options['buttonFloat'].'">';
237
 
238
  // Setup the total shares count if it's on the left
239
- if( ( $options['totes'] && $options['swTotesFormat'] == 'totesAltLeft' && $buttonsArray['totes'] >= $options['minTotes'] && !isset($array['buttons'] ) )
240
- || ($options['swTotesFormat'] == 'totesAltLeft' && isset($array['buttons']) && isset($array['buttons']['totes']) && $buttonsArray['totes'] >= $options['minTotes'] ) ):
241
  ++$buttonsArray['count'];
242
- $assets .= '<div class="nc_tweetContainer totes totesalt" data-id="'.$buttonsArray['count'].'" >';
243
- $assets .= '<span class="swp_count">'.swp_kilomega($buttonsArray['totes']).' <span class="swp_label">'.__('Shares','social-warfare').'</span></span>';
244
  $assets .= '</div>';
245
  endif;
246
 
247
  // Sort the buttons according to the user's preferences
248
- if(isset($buttonsArray) && isset($buttonsArray['buttons'])):
249
- foreach($buttonsArray['buttons'] as $key=>$value):
250
- if(isset($buttonsArray['resource'][$key])):
251
- $assets .= $buttonsArray['resource'][$key];
252
  endif;
253
  endforeach;
254
- elseif($options['orderOfIconsSelect'] == 'manual'):
255
- foreach($options['newOrderOfIcons'] as $key => $value):
256
- if(isset($buttonsArray['resource'][$key])):
257
- $assets .= $buttonsArray['resource'][$key];
258
  endif;
259
  endforeach;
260
- elseif($options['orderOfIconsSelect'] == 'dynamic'):
261
- arsort($buttonsArray['shares']);
262
- foreach($buttonsArray['shares'] as $thisIcon => $status):
263
- if(isset($buttonsArray['resource'][$thisIcon])):
264
- $assets .= $buttonsArray['resource'][$thisIcon];
265
  endif;
266
  endforeach;
267
  endif;
268
 
269
  // Create the Total Shares Box if it's on the right
270
- if( ( $options['totes'] && $options['swTotesFormat'] != 'totesAltLeft' && $buttonsArray['totes'] >= $options['minTotes'] && !isset($buttonsArray['buttons'] ) )
271
- || ( $options['swTotesFormat'] != 'totesAltLeft' && isset($buttonsArray['buttons']) && isset($buttonsArray['buttons']['totes']) && $buttonsArray['totes'] >= $options['minTotes'] ) ):
272
  ++$buttonsArray['count'];
273
- if($options['swTotesFormat'] == 'totes'):
274
- $assets .= '<div class="nc_tweetContainer totes" data-id="'.$buttonsArray['count'].'" >';
275
- $assets .= '<span class="swp_count">'.swp_kilomega($buttonsArray['totes']).' <span class="swp_label">'.__('Shares','social-warfare').'</span></span>';
276
  $assets .= '</div>';
277
- else:
278
- $assets .= '<div class="nc_tweetContainer totes totesalt" data-id="'.$buttonsArray['count'].'" >';
279
- $assets .= '<span class="swp_count"><span class="swp_label">'.__('Shares','social-warfare').'</span> '.swp_kilomega($buttonsArray['totes']).'</span>';
280
  $assets .= '</div>';
281
  endif;
282
  endif;
@@ -285,40 +271,44 @@ function social_warfare_buttons($array = array()) {
285
  $assets .= '</div>';
286
 
287
  // Reset the cache timestamp if needed
288
- if(swp_is_cache_fresh($postID) == false):
289
- delete_post_meta($postID,'swp_cache_timestamp');
290
- update_post_meta($postID,'swp_cache_timestamp',floor(((date('U')/60)/60)));
291
  endif;
292
-
293
- if(isset($array['genesis'])):
294
- if($array['where'] == 'below' && $array['genesis'] == 'below'):
 
 
 
 
295
  return $assets;
296
- elseif($array['where'] == 'above' && $array['genesis'] == 'above'):
297
  return $assets;
298
- elseif($array['where'] == 'both'):
299
  return $assets;
300
- elseif($array['where'] == 'none'):
301
  return false;
302
  endif;
303
- else:
304
- if($array['echo'] == false && $array['where'] != 'none'):
305
  return $assets;
306
- elseif($array['content'] === false):
307
  echo $assets;
308
- elseif($array['where'] == 'below'):
309
- $content = $array['content'].''.$assets;
310
  return $content;
311
- elseif($array['where'] == 'above'):
312
- $content = $assets.''.$array['content'];
313
  return $content;
314
- elseif($array['where'] == 'both'):
315
- $content = $assets.''.$array['content'].''.$assets;
316
  return $content;
317
- elseif($array['where'] == 'none'):
318
  return $array['content'];
319
  endif;
320
  endif;
321
- else:
322
  return $array['content'];
323
  endif;
324
 
1
  <?php
2
 
3
+ /**
4
+ * Register and output header meta tags
5
+ *
6
+ * @package SocialWarfare\Functions
7
+ * @copyright Copyright (c) 2016, Warfare Plugins, LLC
8
+ * @license GPL-3.0+
9
+ * @since 1.0.0
10
+ */
11
+
12
+ defined( 'WPINC' ) || die;
13
+
14
+ /**
15
+ * A wrapper for the legacy version of the function
16
+ *
17
+ * This version accepted 3 parameters, but was scrapped for a
18
+ * new version that now accepts an array of unlimited parameters
19
+ *
20
+ * @since 1.4.0
21
+ * @access public
22
+ * @param boolean $content The content to which the buttons will be added
23
+ * @param string $where Where the buttons should appear (above, below, both, none)
24
+ * @param boolean $echo Echo the content or return it
25
+ * @return string Returns the modified content
26
+ */
27
+ function socialWarfare( $content = false, $where = 'default', $echo = true ) {
28
 
29
  // Collect the deprecated fields and place them into an array
30
  $array['content'] = $content;
33
  $array['devs'] = true;
34
 
35
  // Pass the array into the new function
36
+ return social_warfare( $array );
37
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
+ /**
40
+ * THE SHARE BUTTONS FUNCTION:
41
+ *
42
+ * This function accepts an array of parameters resulting in the outputting of
43
+ * the Social Warfare Buttons.
44
+ *
45
+ *
46
+ * ACCEPTED PARAMETERS :
47
+ *
48
+ * content : The post content to which we append the buttons
49
+ * : (string)
50
+ *
51
+ * where : Used to overwrite the default location in relation to the content
52
+ * : ( above | below | both | none )
53
+ *
54
+ * echo : Used to print or store the variables.
55
+ * : ( true | false )
56
+ *
57
+ * @since 1.0.0
58
+ * @access public
59
+ * @return string $content The modified content
60
+ */
61
+ function social_warfare_buttons( $array = array() ) {
62
+ global $swp_user_options;
63
 
64
  // Setup the default Array parameters
65
+ if ( ! isset( $array['where'] ) ) { $array['where'] = 'default'; }
66
+ if ( ! isset( $array['echo'] ) ) { $array['echo'] = true; }
67
+ if ( ! isset( $array['content'] ) ) { $array['content'] = false; }
68
 
69
  // Get the options...or create them if they don't exist
70
+ if ( isset( $array['post_id'] ) ) :
71
  $postID = $array['post_id'];
72
+ else :
73
  $postID = get_the_ID();
74
  endif;
75
 
76
+ $options = $swp_user_options;
77
 
78
  // Check to see if display location was specifically defined for this post
79
+ $specWhere = get_post_meta( $postID,'nc_postLocation',true );
80
+ if ( ! $specWhere ) { $specWhere = 'default';
81
+ };
82
+
83
+ if ( $array['where'] == 'default' ) :
84
+
85
+ // If we are on the home page
86
+ if( is_front_page() ):
87
+ $array['where'] = $options['locationHome'];
88
+
89
+ // If we are on a singular page
90
+ elseif ( is_singular() && ! is_home() && ! is_archive() && ! is_front_page() ) :
91
+ if ( $specWhere == 'default' || $specWhere == '' ) :
92
+ $postType = get_post_type( $postID );
93
+ if ( isset( $options[ 'location_' . $postType ] ) ) :
94
+ $array['where'] = $options[ 'location_' . $postType ];
95
+ else :
96
  $array['where'] = 'none';
97
  endif;
98
+ else :
99
+ $array['where'] = $specWhere;
 
 
 
 
 
 
 
100
  endif;
101
+
102
+ // If we are anywhere else besides the home page or a singular
103
+ else :
104
+ $array['where'] = $options['locationSite'];
105
  endif;
106
  endif;
107
+
108
  // Disable the buttons on Buddy Press pages
109
+ if ( function_exists( 'is_buddypress' ) && is_buddypress() ) :
110
  return $array['content'];
111
 
112
+ // Disable the buttons if the location is set to "None / Manual"
113
+ elseif ( $array['where'] == 'none' && ! isset( $array['devs'] ) ) :
114
  return $array['content'];
115
 
116
+ // Disable the button if we're not in the loop, unless there is no content which means the function was called by a developer.
117
+ elseif ( ( ! is_main_query() || ! in_the_loop()) && ! isset( $array['devs'] ) ) :
118
  return $array['content'];
119
 
120
+ // Don't do anything if we're in the admin section
121
+ elseif ( is_admin() ) :
122
  return $array['content'];
123
 
124
+ // If all the checks pass, let's make us some buttons!
125
+ else :
126
 
127
  // Set the options for the horizontal floating bar
128
+ $postType = get_post_type( $postID );
129
+ $spec_float_where = get_post_meta( $postID , 'nc_floatLocation' , true );
130
+ if ( isset( $array['float'] ) && $array['float'] == 'ignore' ) :
131
+ $floatOption = 'float_ignore';
132
+ elseif ( $spec_float_where == 'off' && $options['buttonFloat'] != 'float_ignore' ) :
133
+ $floatOption = 'floatNone';
134
+ elseif ( $options['float'] && is_singular() && $options[ 'float_location_' . $postType ] == 'on' ) :
135
+ $floatOption = 'float' . ucfirst( $options['floatOption'] );
136
+ else :
137
  $floatOption = 'floatNone';
138
  endif;
139
 
140
  // Disable the plugin on feeds, search results, and non-published content
141
+ if ( ! is_feed() && ! is_search() && get_post_status( $postID ) == 'publish' ) :
142
 
143
  // Acquire the social stats from the networks
144
+ if ( isset( $array['url'] ) ) :
145
  $buttonsArray['url'] = $array['url'];
146
+ else :
147
  $buttonsArray['url'] = get_permalink( $postID );
148
  endif;
149
 
150
+ if ( isset( $array['scale'] ) ) :
151
+ $scale = $array['scale'];
152
+ else :
153
+ $scale = $options['buttonSize'];
154
+ endif;
155
+
156
  // Fetch the share counts
157
+ $buttonsArray['shares'] = get_social_warfare_shares( $postID );
158
 
159
  // Pass the swp_options into the array so we can pass it into the filter
160
  $buttonsArray['options'] = $options;
161
 
162
  // Customize which buttosn we're going to display
163
+ if ( isset( $array['buttons'] ) ) :
164
+
165
  // Fetch the global names and keys
166
  $swp_options = array();
167
+ $swp_available_options = apply_filters( 'swp_options',$swp_options );
168
  $available_buttons = $swp_available_options['options']['swp_display']['buttons']['content'];
169
 
170
  // Split the comma separated list into an array
171
+ $button_set_array = explode( ',', $array['buttons'] );
172
+
173
  // Match the names in the list to their appropriate system-wide keys
174
+ $i = 0;
175
+ foreach ( $button_set_array as $button ) :
176
+
177
+ // Trim the network name in case of white space
178
+ $button = trim( $button );
179
+
180
+ // Convert the names to their systme-wide keys
181
+ if ( swp_recursive_array_search( $button , $available_buttons ) ) :
182
+ $key = swp_recursive_array_search( $button , $available_buttons );
183
+
184
  // Store the result in the array that gets passed to the HTML generator
185
+ $buttonsArray['buttons'][ $key ] = $button;
186
 
187
  // Declare a default share count of zero. This will be overriden later
188
+ if ( ! isset( $buttonsArray['shares'][ $key ] ) ) :
189
+ $buttonsArray['shares'][ $key ] = 0;
190
  endif;
191
+
192
  endif;
193
+
194
+ $button_set_array[ $i ] = $button;
195
+ ++$i;
196
  endforeach;
197
+
198
  // Manually turn the total shares on or off
199
+ if ( array_search( 'Total',$button_set_array ) ) { $buttonsArray['buttons']['totes'] = 'Total' ;}
200
+
201
  endif;
202
+
203
  // Setup the buttons array to pass into the 'swp_network_buttons' hook
204
  $buttonsArray['count'] = 0;
205
  $buttonsArray['totes'] = 0;
206
+ if ( ( $buttonsArray['options']['totes'] && $buttonsArray['shares']['totes'] >= $buttonsArray['options']['minTotes'] && ! isset( $array['buttons'] ) )
207
+ || ( isset( $buttonsArray['buttons'] ) && isset( $buttonsArray['buttons']['totes'] ) && $buttonsArray['totes'] >= $options['minTotes'] ) ) :
208
  ++$buttonsArray['count'];
209
  endif;
210
  $buttonsArray['resource'] = array();
211
  $buttonsArray['postID'] = $postID;
212
 
213
  // Disable the subtitles plugin to avoid letting them inject their subtitle into our share titles
214
+ if ( is_plugin_active( 'subtitles/subtitles.php' ) && class_exists( 'Subtitles' ) ) :
215
+ remove_filter( 'the_title', array( Subtitles::getinstance(), 'the_subtitle' ), 10, 2 );
216
  endif;
217
 
218
  // This array will contain the HTML for all of the individual buttons
219
  $buttonsArray = apply_filters( 'swp_network_buttons' , $buttonsArray );
220
+
221
  // Create the social panel
222
+ $assets = '<div class="nc_socialPanel swp_' . $options['visualTheme'] . ' swp_d_' . $options['dColorSet'] . ' swp_i_' . $options['iColorSet'] . ' swp_o_' . $options['oColorSet'] . ' scale-' . $scale*100 .' scale-' . $options['buttonFloat'] . '" data-position="' . $options['location_post'] . '" data-float="' . $floatOption . '" data-count="' . $buttonsArray['count'] . '" data-floatColor="' . $options['floatBgColor'] . '" data-emphasize="'.$options['emphasize_icons'].'">';
223
 
224
  // Setup the total shares count if it's on the left
225
+ if ( ( $options['totes'] && $options['swTotesFormat'] == 'totesAltLeft' && $buttonsArray['totes'] >= $options['minTotes'] && ! isset( $array['buttons'] ) || ( $options['swTotesFormat'] == 'totesAltLeft' && isset( $buttonsArray['buttons'] ) && isset( $buttonsArray['buttons']['totes'] ) && $buttonsArray['totes'] >= $options['minTotes'] ))
226
+ || ($options['swTotesFormat'] == 'totesAltLeft' && isset( $array['buttons'] ) && isset( $array['buttons']['totes'] ) && $buttonsArray['totes'] >= $options['minTotes'] ) ) :
227
  ++$buttonsArray['count'];
228
+ $assets .= '<div class="nc_tweetContainer totes totesalt" data-id="' . $buttonsArray['count'] . '" >';
229
+ $assets .= '<span class="swp_count">' . swp_kilomega( $buttonsArray['totes'] ) . ' <span class="swp_label">' . __( 'Shares','social-warfare' ) . '</span></span>';
230
  $assets .= '</div>';
231
  endif;
232
 
233
  // Sort the buttons according to the user's preferences
234
+ if ( isset( $buttonsArray ) && isset( $buttonsArray['buttons'] ) ) :
235
+ foreach ( $buttonsArray['buttons'] as $key => $value ) :
236
+ if ( isset( $buttonsArray['resource'][ $key ] ) ) :
237
+ $assets .= $buttonsArray['resource'][ $key ];
238
  endif;
239
  endforeach;
240
+ elseif ( $options['orderOfIconsSelect'] == 'manual' ) :
241
+ foreach ( $options['newOrderOfIcons'] as $key => $value ) :
242
+ if ( isset( $buttonsArray['resource'][ $key ] ) ) :
243
+ $assets .= $buttonsArray['resource'][ $key ];
244
  endif;
245
  endforeach;
246
+ elseif ( $options['orderOfIconsSelect'] == 'dynamic' ) :
247
+ arsort( $buttonsArray['shares'] );
248
+ foreach ( $buttonsArray['shares'] as $thisIcon => $status ) :
249
+ if ( isset( $buttonsArray['resource'][ $thisIcon ] ) ) :
250
+ $assets .= $buttonsArray['resource'][ $thisIcon ];
251
  endif;
252
  endforeach;
253
  endif;
254
 
255
  // Create the Total Shares Box if it's on the right
256
+ if ( ( $options['totes'] && $options['swTotesFormat'] != 'totesAltLeft' && $buttonsArray['totes'] >= $options['minTotes'] && ! isset( $buttonsArray['buttons'] ) )
257
+ || ( $options['swTotesFormat'] != 'totesAltLeft' && isset( $buttonsArray['buttons'] ) && isset( $buttonsArray['buttons']['totes'] ) && $buttonsArray['totes'] >= $options['minTotes'] ) ) :
258
  ++$buttonsArray['count'];
259
+ if ( $options['swTotesFormat'] == 'totes' ) :
260
+ $assets .= '<div class="nc_tweetContainer totes" data-id="' . $buttonsArray['count'] . '" >';
261
+ $assets .= '<span class="swp_count">' . swp_kilomega( $buttonsArray['totes'] ) . ' <span class="swp_label">' . __( 'Shares','social-warfare' ) . '</span></span>';
262
  $assets .= '</div>';
263
+ else :
264
+ $assets .= '<div class="nc_tweetContainer totes totesalt" data-id="' . $buttonsArray['count'] . '" >';
265
+ $assets .= '<span class="swp_count"><span class="swp_label">' . __( 'Shares','social-warfare' ) . '</span> ' . swp_kilomega( $buttonsArray['totes'] ) . '</span>';
266
  $assets .= '</div>';
267
  endif;
268
  endif;
271
  $assets .= '</div>';
272
 
273
  // Reset the cache timestamp if needed
274
+ if ( swp_is_cache_fresh( $postID ) == false ) :
275
+ delete_post_meta( $postID,'swp_cache_timestamp' );
276
+ update_post_meta( $postID,'swp_cache_timestamp',floor( ((date( 'U' ) / 60) / 60) ) );
277
  endif;
278
+
279
+ // Add this post ID to the array so we don't process it again.
280
+ // global $post, $swp_already_print;
281
+ // array_push( $swp_already_print, $postID);
282
+
283
+ if ( isset( $array['genesis'] ) ) :
284
+ if ( $array['where'] == 'below' && $array['genesis'] == 'below' ) :
285
  return $assets;
286
+ elseif ( $array['where'] == 'above' && $array['genesis'] == 'above' ) :
287
  return $assets;
288
+ elseif ( $array['where'] == 'both' ) :
289
  return $assets;
290
+ elseif ( $array['where'] == 'none' ) :
291
  return false;
292
  endif;
293
+ else :
294
+ if ( $array['echo'] == false && $array['where'] != 'none' ) :
295
  return $assets;
296
+ elseif ( $array['content'] === false ) :
297
  echo $assets;
298
+ elseif ( $array['where'] == 'below' ) :
299
+ $content = $array['content'] . '' . $assets;
300
  return $content;
301
+ elseif ( $array['where'] == 'above' ) :
302
+ $content = $assets . '' . $array['content'];
303
  return $content;
304
+ elseif ( $array['where'] == 'both' ) :
305
+ $content = $assets . '' . $array['content'] . '' . $assets;
306
  return $content;
307
+ elseif ( $array['where'] == 'none' ) :
308
  return $array['content'];
309
  endif;
310
  endif;
311
+ else :
312
  return $array['content'];
313
  endif;
314
 
functions/cache-rebuild.php DELETED
@@ -1,58 +0,0 @@
1
- <?php
2
-
3
- // Hook into the admin-ajax request
4
- add_action( 'wp_ajax_swp_cache_trigger', 'swp_cache_rebuild' );
5
- add_action( 'wp_ajax_nopriv_swp_cache_trigger', 'swp_cache_rebuild' );
6
-
7
- // A function to rebuild the cache
8
- function swp_cache_rebuild() {
9
-
10
- // Gain access to the database
11
- global $wpdb;
12
-
13
- // Fetch the Post ID
14
- $post_id = $_POST['post_id'];
15
-
16
- // Ensure that the cache for this post is actually expired
17
- if( swp_is_cache_fresh( $post_id , true , true ) == false ):
18
-
19
- // Force the cache trigger on
20
- $_GET['swp_cache'] = 'rebuild';
21
-
22
- // Fetch new shares
23
- $shares = get_social_warfare_shares( $post_id );
24
-
25
- // Update Bitly links
26
- foreach ( $shares as $key => $value):
27
- swp_process_url( get_permalink($post_id) , $key , $post_id );
28
- endforeach;
29
-
30
- // Update the Pinterest image
31
- $array['imageID'] = get_post_meta( $post_id , 'nc_pinterestImage' , true );
32
- if($array['imageID']):
33
- $array['imageURL'] = wp_get_attachment_url( $array['imageID'] );
34
- delete_post_meta($post_id,'swp_pinterest_image_url');
35
- update_post_meta($post_id,'swp_pinterest_image_url',$array['imageURL']);
36
- endif;
37
-
38
- // Update the Twitter username
39
- $user_twitter_handle = get_the_author_meta( 'swp_twitter' , swp_get_author($post_id));
40
- if($user_twitter_handle):
41
- delete_post_meta($post_id,'swp_twitter_username');
42
- update_post_meta($post_id,'swp_twitter_username',$user_twitter_handle);
43
- else:
44
- delete_post_meta($post_id,'swp_twitter_username');
45
- endif;
46
-
47
- // Update the cache timestamp
48
- delete_post_meta( $post_id , 'swp_cache_timestamp' );
49
- update_post_meta( $post_id , 'swp_cache_timestamp' , floor( ( ( date( 'U' ) / 60 ) / 60 ) ) );
50
-
51
- // Return the share count
52
- wp_send_json( $shares );
53
-
54
- endif;
55
-
56
- // Kill off all the WordPress functions
57
- wp_die();
58
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/click-to-tweet/assets/css/admin.css CHANGED
@@ -10,4 +10,4 @@ i.mce-i-icon {
10
  }
11
  i.mce-i-icon:before {
12
  color:#60a8dc;
13
- }
10
  }
11
  i.mce-i-icon:before {
12
  color:#60a8dc;
13
+ }
functions/click-to-tweet/assets/css/style1.css CHANGED
@@ -1,174 +1,174 @@
1
  .sw-CTT {
2
- display:block;
3
  }
4
  .sw-tweet-clear {
5
- zoom: 1;
6
  }
7
  .sw-tweet-clear:after {
8
- display: block;
9
- visibility: hidden;
10
- height: 0;
11
- clear: both;
12
- content: ".";
13
  }
14
  .sw-click-to-tweet {
15
- display: block;
16
- background-color: #fff;
17
- margin: 0;
18
- padding: 0;
19
- position: relative;
20
- border: 1px solid #dddddd;
21
- -moz-border-radius: 4px;
22
- border-radius: 4px;
23
- padding: 15px 30px;
24
- margin: 15px 0px;
25
- zoom: 1;
26
  }
27
  .sw-click-to-tweet .clearfix {
28
- zoom: 1;
29
  }
30
  .sw-click-to-tweet .clearfix:after {
31
- display: block;
32
- visibility: hidden;
33
- height: 0;
34
- clear: both;
35
- content: ".";
36
  }
37
  .sw-click-to-tweet .clear {
38
- clear: both;
39
  }
40
  .sw-click-to-tweet .f-left {
41
- float: left;
42
- display: inline-block;
43
- position: relative;
44
  }
45
  .sw-click-to-tweet .f-right {
46
- float: right;
47
- display: inline-block;
48
- position: relative;
49
  }
50
  .sw-click-to-tweet .list-reset {
51
- list-style: none;
52
- margin: 0;
53
- padding: 0;
54
  }
55
  .sw-click-to-tweet .list-reset li {
56
- list-style: none;
57
- margin: 0;
58
- padding: 0;
59
  }
60
  .sw-click-to-tweet .list-float {
61
- zoom: 1;
62
  }
63
  .sw-click-to-tweet .list-float:after {
64
- display: block;
65
- visibility: hidden;
66
- height: 0;
67
- clear: both;
68
- content: ".";
69
  }
70
  .sw-click-to-tweet .list-float li {
71
- float: left;
72
- display: inline-block;
73
  }
74
  .sw-click-to-tweet .kill-box-shadow {
75
- box-shadow: none;
76
- -webkit-box-shadow: none;
77
- -moz-box-shadow: none;
78
  }
79
  .sw-click-to-tweet .alignright {
80
- float: right;
81
- margin-bottom: 10px;
82
- margin-left: 10px;
83
- text-align: right;
84
  }
85
  .sw-click-to-tweet .alignleft {
86
- float: left;
87
- margin-bottom: 10px;
88
- margin-right: 10px;
89
- text-align: right;
90
  }
91
  .sw-click-to-tweet:after {
92
- content: ".";
93
- display: block;
94
- clear: both;
95
- visibility: hidden;
96
- line-height: 0;
97
- height: 0;
98
  }
99
  .sw-click-to-tweet .sw-ctt-reset {
100
- margin: 0;
101
- padding: 0;
102
- position: relative;
103
  }
104
  .sw-click-to-tweet:after {
105
- display: block;
106
- visibility: hidden;
107
- height: 0;
108
- clear: both;
109
- content: ".";
110
  }
111
  .sw-click-to-tweet a {
112
- text-decoration: none;
113
- text-transform: none;
114
  }
115
  .sw-click-to-tweet a:hover {
116
- text-decoration: none;
117
  }
118
  .sw-click-to-tweet .sw-ctt-text {
119
- margin: 0;
120
- padding: 0;
121
- position: relative;
122
- margin-bottom: 10px;
123
- word-wrap: break-word;
124
  }
125
  a .sw-click-to-tweet .sw-ctt-text {
126
- margin: 0;
127
- padding: 0;
128
- position: relative;
129
- color: #999999;
130
- font-size: 24px;
131
- line-height: 140%;
132
- text-transform: none;
133
- font-weight: 500;
134
- text-decoration: none;
135
- text-transform: none;
136
  display:block;
137
  }
138
  a:hover .sw-click-to-tweet .sw-ctt-text {
139
- text-decoration: none;
140
- color: #666666;
141
  }
142
  .sw-click-to-tweet .sw-ctt-btn {
143
- margin: 0;
144
- padding: 3px;
145
- position: relative;
146
- display: block;
147
- text-transform: uppercase;
148
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
149
- font-size: 12px;
150
- font-weight: bold;
151
- line-height: 100%;
152
- color: #999999;
153
- float: right;
154
- padding-right: 24px;
155
- text-decoration: none;
156
- background: transparent url("//4.bp.blogspot.com/-Ku-iYrKVffw/VHjB2LFSO1I/AAAAAAAAEyI/NDiWlshts4M/s1600/twitter-little-bird.png") no-repeat right top;
157
  }
158
  a:hover .sw-click-to-tweet .sw-ctt-btn {
159
- text-decoration: none;
160
- color: #666666;
161
- text-transform: uppercase;
162
  }
163
  .sw-click-to-tweet .sw-powered-by {
164
- font-size: 10px;
165
- color: #999999;
166
  }
167
  .sw-click-to-tweet .sw-powered-by a {
168
- font-size: 10px;
169
- color: #999999 !important;
170
  }
171
  .sw-click-to-tweet .sw-powered-by a:hover {
172
- color: #999999 !important;
173
- text-decoration: underline !important;
174
- }
1
  .sw-CTT {
2
+ display:block;
3
  }
4
  .sw-tweet-clear {
5
+ zoom: 1;
6
  }
7
  .sw-tweet-clear:after {
8
+ display: block;
9
+ visibility: hidden;
10
+ height: 0;
11
+ clear: both;
12
+ content: ".";
13
  }
14
  .sw-click-to-tweet {
15
+ display: block;
16
+ background-color: #fff;
17
+ margin: 0;
18
+ padding: 0;
19
+ position: relative;
20
+ border: 1px solid #dddddd;
21
+ -moz-border-radius: 4px;
22
+ border-radius: 4px;
23
+ padding: 15px 30px;
24
+ margin: 15px 0px;
25
+ zoom: 1;
26
  }
27
  .sw-click-to-tweet .clearfix {
28
+ zoom: 1;
29
  }
30
  .sw-click-to-tweet .clearfix:after {
31
+ display: block;
32
+ visibility: hidden;
33
+ height: 0;
34
+ clear: both;
35
+ content: ".";
36
  }
37
  .sw-click-to-tweet .clear {
38
+ clear: both;
39
  }
40
  .sw-click-to-tweet .f-left {
41
+ float: left;
42
+ display: inline-block;
43
+ position: relative;
44
  }
45
  .sw-click-to-tweet .f-right {
46
+ float: right;
47
+ display: inline-block;
48
+ position: relative;
49
  }
50
  .sw-click-to-tweet .list-reset {
51
+ list-style: none;
52
+ margin: 0;
53
+ padding: 0;
54
  }
55
  .sw-click-to-tweet .list-reset li {
56
+ list-style: none;
57
+ margin: 0;
58
+ padding: 0;
59
  }
60
  .sw-click-to-tweet .list-float {
61
+ zoom: 1;
62
  }
63
  .sw-click-to-tweet .list-float:after {
64
+ display: block;
65
+ visibility: hidden;
66
+ height: 0;
67
+ clear: both;
68
+ content: ".";
69
  }
70
  .sw-click-to-tweet .list-float li {
71
+ float: left;
72
+ display: inline-block;
73
  }
74
  .sw-click-to-tweet .kill-box-shadow {
75
+ box-shadow: none;
76
+ -webkit-box-shadow: none;
77
+ -moz-box-shadow: none;
78
  }
79
  .sw-click-to-tweet .alignright {
80
+ float: right;
81
+ margin-bottom: 10px;
82
+ margin-left: 10px;
83
+ text-align: right;
84
  }
85
  .sw-click-to-tweet .alignleft {
86
+ float: left;
87
+ margin-bottom: 10px;
88
+ margin-right: 10px;
89
+ text-align: right;
90
  }
91
  .sw-click-to-tweet:after {
92
+ content: ".";
93
+ display: block;
94
+ clear: both;
95
+ visibility: hidden;
96
+ line-height: 0;
97
+ height: 0;
98
  }
99
  .sw-click-to-tweet .sw-ctt-reset {
100
+ margin: 0;
101
+ padding: 0;
102
+ position: relative;
103
  }
104
  .sw-click-to-tweet:after {
105
+ display: block;
106
+ visibility: hidden;
107
+ height: 0;
108
+ clear: both;
109
+ content: ".";
110
  }
111
  .sw-click-to-tweet a {
112
+ text-decoration: none;
113
+ text-transform: none;
114
  }
115
  .sw-click-to-tweet a:hover {
116
+ text-decoration: none;
117
  }
118
  .sw-click-to-tweet .sw-ctt-text {
119
+ margin: 0;
120
+ padding: 0;
121
+ position: relative;
122
+ margin-bottom: 10px;
123
+ word-wrap: break-word;
124
  }
125
  a .sw-click-to-tweet .sw-ctt-text {
126
+ margin: 0;
127
+ padding: 0;
128
+ position: relative;
129
+ color: #999999;
130
+ font-size: 24px;
131
+ line-height: 140%;
132
+ text-transform: none;
133
+ font-weight: 500;
134
+ text-decoration: none;
135
+ text-transform: none;
136
  display:block;
137
  }
138
  a:hover .sw-click-to-tweet .sw-ctt-text {
139
+ text-decoration: none;
140
+ color: #666666;
141
  }
142
  .sw-click-to-tweet .sw-ctt-btn {
143
+ margin: 0;
144
+ padding: 3px;
145
+ position: relative;
146
+ display: block;
147
+ text-transform: uppercase;
148
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
149
+ font-size: 12px;
150
+ font-weight: bold;
151
+ line-height: 100%;
152
+ color: #999999;
153
+ float: right;
154
+ padding-right: 24px;
155
+ text-decoration: none;
156
+ background: transparent url("//4.bp.blogspot.com/-Ku-iYrKVffw/VHjB2LFSO1I/AAAAAAAAEyI/NDiWlshts4M/s1600/twitter-little-bird.png") no-repeat right top;
157
  }
158
  a:hover .sw-click-to-tweet .sw-ctt-btn {
159
+ text-decoration: none;
160
+ color: #666666;
161
+ text-transform: uppercase;
162
  }
163
  .sw-click-to-tweet .sw-powered-by {
164
+ font-size: 10px;
165
+ color: #999999;
166
  }
167
  .sw-click-to-tweet .sw-powered-by a {
168
+ font-size: 10px;
169
+ color: #999999 !important;
170
  }
171
  .sw-click-to-tweet .sw-powered-by a:hover {
172
+ color: #999999 !important;
173
+ text-decoration: underline !important;
174
+ }
functions/click-to-tweet/assets/css/style2.css CHANGED
@@ -1,12 +1,12 @@
1
  .sw-tweet-clear {
2
- zoom: 1;
3
  }
4
  .sw-tweet-clear:after {
5
- display: block;
6
- visibility: hidden;
7
- height: 0;
8
- clear: both;
9
- content: ".";
10
  }
11
  .sw-click-to-tweet {
12
  display: block;
@@ -22,102 +22,102 @@
22
  zoom: 1;
23
  }
24
  .sw-click-to-tweet .clearfix {
25
- zoom: 1;
26
  }
27
  .sw-click-to-tweet .clearfix:after {
28
- display: block;
29
- visibility: hidden;
30
- height: 0;
31
- clear: both;
32
- content: ".";
33
  }
34
  .sw-click-to-tweet .clear {
35
- clear: both;
36
  }
37
  .sw-click-to-tweet .f-left {
38
- float: left;
39
- display: inline-block;
40
- position: relative;
41
  }
42
  .sw-click-to-tweet .f-right {
43
- float: right;
44
- display: inline-block;
45
- position: relative;
46
  }
47
  .sw-click-to-tweet .list-reset {
48
- list-style: none;
49
- margin: 0;
50
- padding: 0;
51
  }
52
  .sw-click-to-tweet .list-reset li {
53
- list-style: none;
54
- margin: 0;
55
- padding: 0;
56
  }
57
  .sw-click-to-tweet .list-float {
58
- zoom: 1;
59
  }
60
  .sw-click-to-tweet .list-float:after {
61
- display: block;
62
- visibility: hidden;
63
- height: 0;
64
- clear: both;
65
- content: ".";
66
  }
67
  .sw-click-to-tweet .list-float li {
68
- float: left;
69
- display: inline-block;
70
  }
71
  .sw-click-to-tweet .kill-box-shadow {
72
- box-shadow: none;
73
- -webkit-box-shadow: none;
74
- -moz-box-shadow: none;
75
  }
76
  .sw-click-to-tweet .alignright {
77
- float: right;
78
- margin-bottom: 10px;
79
- margin-left: 10px;
80
- text-align: right;
81
  }
82
  .sw-click-to-tweet .alignleft {
83
- float: left;
84
- margin-bottom: 10px;
85
- margin-right: 10px;
86
- text-align: right;
87
  }
88
  .sw-click-to-tweet:after {
89
- content: ".";
90
- display: block;
91
- clear: both;
92
- visibility: hidden;
93
- line-height: 0;
94
- height: 0;
95
  }
96
  .sw-click-to-tweet .sw-ctt-reset {
97
- margin: 0;
98
- padding: 0;
99
- position: relative;
100
  }
101
  .sw-click-to-tweet:after {
102
- display: block;
103
- visibility: hidden;
104
- height: 0;
105
- clear: both;
106
- content: ".";
107
  }
108
  .sw-click-to-tweet a {
109
- text-decoration: none;
110
- text-transform: none;
111
  }
112
  .sw-click-to-tweet a:hover {
113
- text-decoration: none;
114
  }
115
  .sw-click-to-tweet .sw-ctt-text {
116
- margin: 0;
117
- padding: 0;
118
- position: relative;
119
- margin-bottom: 10px;
120
- word-wrap: break-word;
121
  }
122
  a .sw-click-to-tweet .sw-ctt-text {
123
  margin: 0;
@@ -134,39 +134,39 @@ a .sw-click-to-tweet .sw-ctt-text {
134
  display:block;
135
  }
136
  a:hover .sw-click-to-tweet .sw-ctt-text {
137
- text-decoration: none;
138
- color: #666666;
139
  }
140
  .sw-click-to-tweet .sw-ctt-btn {
141
- margin: 0;
142
- padding: 3px;
143
- position: relative;
144
- display: block;
145
- text-transform: uppercase;
146
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
147
- font-size: 12px;
148
- font-weight: bold;
149
- line-height: 100%;
150
- color: #999999;
151
- float: right;
152
- padding-right: 24px;
153
- text-decoration: none;
154
- background: transparent url("//4.bp.blogspot.com/-Ku-iYrKVffw/VHjB2LFSO1I/AAAAAAAAEyI/NDiWlshts4M/s1600/twitter-little-bird.png") no-repeat right top;
155
  }
156
  a:hover .sw-click-to-tweet .sw-ctt-btn{
157
- text-decoration: none;
158
- color: #666666;
159
- text-transform: uppercase;
160
  }
161
  .sw-click-to-tweet .sw-powered-by {
162
- font-size: 10px;
163
- color: #999999;
164
  }
165
  .sw-click-to-tweet .sw-powered-by a {
166
- font-size: 10px;
167
- color: #999999 !important;
168
  }
169
  .sw-click-to-tweet .sw-powered-by a:hover {
170
- color: #999999 !important;
171
- text-decoration: underline !important;
172
- }
1
  .sw-tweet-clear {
2
+ zoom: 1;
3
  }
4
  .sw-tweet-clear:after {
5
+ display: block;
6
+ visibility: hidden;
7
+ height: 0;
8
+ clear: both;
9
+ content: ".";
10
  }
11
  .sw-click-to-tweet {
12
  display: block;
22
  zoom: 1;
23
  }
24
  .sw-click-to-tweet .clearfix {
25
+ zoom: 1;
26
  }
27
  .sw-click-to-tweet .clearfix:after {
28
+ display: block;
29
+ visibility: hidden;
30
+ height: 0;
31
+ clear: both;
32
+ content: ".";
33
  }
34
  .sw-click-to-tweet .clear {
35
+ clear: both;
36
  }
37
  .sw-click-to-tweet .f-left {
38
+ float: left;
39
+ display: inline-block;
40
+ position: relative;
41
  }
42
  .sw-click-to-tweet .f-right {
43
+ float: right;
44
+ display: inline-block;
45
+ position: relative;
46
  }
47
  .sw-click-to-tweet .list-reset {
48
+ list-style: none;
49
+ margin: 0;
50
+ padding: 0;
51
  }
52
  .sw-click-to-tweet .list-reset li {
53
+ list-style: none;
54
+ margin: 0;
55
+ padding: 0;
56
  }
57
  .sw-click-to-tweet .list-float {
58
+ zoom: 1;
59
  }
60
  .sw-click-to-tweet .list-float:after {
61
+ display: block;
62
+ visibility: hidden;
63
+ height: 0;
64
+ clear: both;
65
+ content: ".";
66
  }
67
  .sw-click-to-tweet .list-float li {
68
+ float: left;
69
+ display: inline-block;
70
  }
71
  .sw-click-to-tweet .kill-box-shadow {
72
+ box-shadow: none;
73
+ -webkit-box-shadow: none;
74
+ -moz-box-shadow: none;
75
  }
76
  .sw-click-to-tweet .alignright {
77
+ float: right;
78
+ margin-bottom: 10px;
79
+ margin-left: 10px;
80
+ text-align: right;
81
  }
82
  .sw-click-to-tweet .alignleft {
83
+ float: left;
84
+ margin-bottom: 10px;
85
+ margin-right: 10px;
86
+ text-align: right;
87
  }
88
  .sw-click-to-tweet:after {
89
+ content: ".";
90
+ display: block;
91
+ clear: both;
92
+ visibility: hidden;
93
+ line-height: 0;
94
+ height: 0;
95
  }
96
  .sw-click-to-tweet .sw-ctt-reset {
97
+ margin: 0;
98
+ padding: 0;
99
+ position: relative;
100
  }
101
  .sw-click-to-tweet:after {
102
+ display: block;
103
+ visibility: hidden;
104
+ height: 0;
105
+ clear: both;
106
+ content: ".";
107
  }
108
  .sw-click-to-tweet a {
109
+ text-decoration: none;
110
+ text-transform: none;
111
  }
112
  .sw-click-to-tweet a:hover {
113
+ text-decoration: none;
114
  }
115
  .sw-click-to-tweet .sw-ctt-text {
116
+ margin: 0;
117
+ padding: 0;
118
+ position: relative;
119
+ margin-bottom: 10px;
120
+ word-wrap: break-word;
121
  }
122
  a .sw-click-to-tweet .sw-ctt-text {
123
  margin: 0;
134
  display:block;
135
  }
136
  a:hover .sw-click-to-tweet .sw-ctt-text {
137
+ text-decoration: none;
138
+ color: #666666;
139
  }
140
  .sw-click-to-tweet .sw-ctt-btn {
141
+ margin: 0;
142
+ padding: 3px;
143
+ position: relative;
144
+ display: block;
145
+ text-transform: uppercase;
146
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
147
+ font-size: 12px;
148
+ font-weight: bold;
149
+ line-height: 100%;
150
+ color: #999999;
151
+ float: right;
152
+ padding-right: 24px;
153
+ text-decoration: none;
154
+ background: transparent url("//4.bp.blogspot.com/-Ku-iYrKVffw/VHjB2LFSO1I/AAAAAAAAEyI/NDiWlshts4M/s1600/twitter-little-bird.png") no-repeat right top;
155
  }
156
  a:hover .sw-click-to-tweet .sw-ctt-btn{
157
+ text-decoration: none;
158
+ color: #666666;
159
+ text-transform: uppercase;
160
  }
161
  .sw-click-to-tweet .sw-powered-by {
162
+ font-size: 10px;
163
+ color: #999999;
164
  }
165
  .sw-click-to-tweet .sw-powered-by a {
166
+ font-size: 10px;
167
+ color: #999999 !important;
168
  }
169
  .sw-click-to-tweet .sw-powered-by a:hover {
170
+ color: #999999 !important;
171
+ text-decoration: underline !important;
172
+ }
functions/click-to-tweet/assets/css/style3.css CHANGED
@@ -1,12 +1,12 @@
1
  .sw-tweet-clear {
2
- zoom: 1;
3
  }
4
  .sw-tweet-clear:after {
5
- display: block;
6
- visibility: hidden;
7
- height: 0;
8
- clear: both;
9
- content: ".";
10
  }
11
  .sw-click-to-tweet {
12
  display: block;
@@ -26,102 +26,102 @@
26
  transition: all 0.3s ease-in-out;
27
  }
28
  .sw-click-to-tweet .clearfix {
29
- zoom: 1;
30
  }
31
  .sw-click-to-tweet .clearfix:after {
32
- display: block;
33
- visibility: hidden;
34
- height: 0;
35
- clear: both;
36
- content: ".";
37
  }
38
  .sw-click-to-tweet .clear {
39
- clear: both;
40
  }
41
  .sw-click-to-tweet .f-left {
42
- float: left;
43
- display: inline-block;
44
- position: relative;
45
  }
46
  .sw-click-to-tweet .f-right {
47
- float: right;
48
- display: inline-block;
49
- position: relative;
50
  }
51
  .sw-click-to-tweet .list-reset {
52
- list-style: none;
53
- margin: 0;
54
- padding: 0;
55
  }
56
  .sw-click-to-tweet .list-reset li {
57
- list-style: none;
58
- margin: 0;
59
- padding: 0;
60
  }
61
  .sw-click-to-tweet .list-float {
62
- zoom: 1;
63
  }
64
  .sw-click-to-tweet .list-float:after {
65
- display: block;
66
- visibility: hidden;
67
- height: 0;
68
- clear: both;
69
- content: ".";
70
  }
71
  .sw-click-to-tweet .list-float li {
72
- float: left;
73
- display: inline-block;
74
  }
75
  .sw-click-to-tweet .kill-box-shadow {
76
- box-shadow: none;
77
- -webkit-box-shadow: none;
78
- -moz-box-shadow: none;
79
  }
80
  .sw-click-to-tweet .alignright {
81
- float: right;
82
- margin-bottom: 10px;
83
- margin-left: 10px;
84
- text-align: right;
85
  }
86
  .sw-click-to-tweet .alignleft {
87
- float: left;
88
- margin-bottom: 10px;
89
- margin-right: 10px;
90
- text-align: right;
91
  }
92
  .sw-click-to-tweet:after {
93
- content: ".";
94
- display: block;
95
- clear: both;
96
- visibility: hidden;
97
- line-height: 0;
98
- height: 0;
99
  }
100
  .sw-click-to-tweet .sw-ctt-reset {
101
- margin: 0;
102
- padding: 0;
103
- position: relative;
104
  }
105
  .sw-click-to-tweet:after {
106
- display: block;
107
- visibility: hidden;
108
- height: 0;
109
- clear: both;
110
- content: ".";
111
  }
112
  .sw-click-to-tweet a {
113
- text-decoration: none;
114
- text-transform: none;
115
  }
116
  .sw-click-to-tweet a:hover {
117
- text-decoration: none;
118
  }
119
  .sw-click-to-tweet .sw-ctt-text {
120
- margin: 0;
121
- padding: 0;
122
- position: relative;
123
- margin-bottom: 10px;
124
- word-wrap: break-word;
125
  }
126
  a .sw-click-to-tweet .sw-ctt-text {
127
  margin: 0;
@@ -138,8 +138,8 @@ a .sw-click-to-tweet .sw-ctt-text {
138
  display:block;
139
  }
140
  a:hover .sw-click-to-tweet .sw-ctt-text {
141
- text-decoration: none;
142
- color: #FFF;
143
  }
144
  .sw-click-to-tweet .sw-ctt-btn {
145
  margin: 0;
@@ -158,7 +158,7 @@ a:hover .sw-click-to-tweet .sw-ctt-text {
158
  background: rgba(0, 0, 0, 0) url("//4.bp.blogspot.com/-JsBK9mPEjWo/VHjB2OUI-uI/AAAAAAAAEyA/NteFI3uXm9U/s1600/twitter-little-bird-white.png") no-repeat right top;
159
  }
160
  a:hover .sw-click-to-tweet .sw-ctt-btn {
161
- text-decoration: none;
162
- color: #FFF;
163
- text-transform: uppercase;
164
- }
1
  .sw-tweet-clear {
2
+ zoom: 1;
3
  }
4
  .sw-tweet-clear:after {
5
+ display: block;
6
+ visibility: hidden;
7
+ height: 0;
8
+ clear: both;
9
+ content: ".";
10
  }
11
  .sw-click-to-tweet {
12
  display: block;
26
  transition: all 0.3s ease-in-out;
27
  }
28
  .sw-click-to-tweet .clearfix {
29
+ zoom: 1;
30
  }
31
  .sw-click-to-tweet .clearfix:after {
32
+ display: block;
33
+ visibility: hidden;
34
+ height: 0;
35
+ clear: both;
36
+ content: ".";
37
  }
38
  .sw-click-to-tweet .clear {
39
+ clear: both;
40
  }
41
  .sw-click-to-tweet .f-left {
42
+ float: left;
43
+ display: inline-block;
44
+ position: relative;
45
  }
46
  .sw-click-to-tweet .f-right {
47
+ float: right;
48
+ display: inline-block;
49
+ position: relative;
50
  }
51
  .sw-click-to-tweet .list-reset {
52
+ list-style: none;
53
+ margin: 0;
54
+ padding: 0;
55
  }
56
  .sw-click-to-tweet .list-reset li {
57
+ list-style: none;
58
+ margin: 0;
59
+ padding: 0;
60
  }
61
  .sw-click-to-tweet .list-float {
62
+ zoom: 1;
63
  }
64
  .sw-click-to-tweet .list-float:after {
65
+ display: block;
66
+ visibility: hidden;
67
+ height: 0;
68
+ clear: both;
69
+ content: ".";
70
  }
71
  .sw-click-to-tweet .list-float li {
72
+ float: left;
73
+ display: inline-block;
74
  }
75
  .sw-click-to-tweet .kill-box-shadow {
76
+ box-shadow: none;
77
+ -webkit-box-shadow: none;
78
+ -moz-box-shadow: none;
79
  }
80
  .sw-click-to-tweet .alignright {
81
+ float: right;
82
+ margin-bottom: 10px;
83
+ margin-left: 10px;
84
+ text-align: right;
85
  }
86
  .sw-click-to-tweet .alignleft {
87
+ float: left;
88
+ margin-bottom: 10px;
89
+ margin-right: 10px;
90
+ text-align: right;
91
  }
92
  .sw-click-to-tweet:after {
93
+ content: ".";
94
+ display: block;
95
+ clear: both;
96
+ visibility: hidden;
97
+ line-height: 0;
98
+ height: 0;
99
  }
100
  .sw-click-to-tweet .sw-ctt-reset {
101
+ margin: 0;
102
+ padding: 0;
103
+ position: relative;
104
  }
105
  .sw-click-to-tweet:after {
106
+ display: block;
107
+ visibility: hidden;
108
+ height: 0;
109
+ clear: both;
110
+ content: ".";
111
  }
112
  .sw-click-to-tweet a {
113
+ text-decoration: none;
114
+ text-transform: none;
115
  }
116
  .sw-click-to-tweet a:hover {
117
+ text-decoration: none;
118
  }
119
  .sw-click-to-tweet .sw-ctt-text {
120
+ margin: 0;
121
+ padding: 0;
122
+ position: relative;
123
+ margin-bottom: 10px;
124
+ word-wrap: break-word;
125
  }
126
  a .sw-click-to-tweet .sw-ctt-text {
127
  margin: 0;
138
  display:block;
139
  }
140
  a:hover .sw-click-to-tweet .sw-ctt-text {
141
+ text-decoration: none;
142
+ color: #FFF;
143
  }
144
  .sw-click-to-tweet .sw-ctt-btn {
145
  margin: 0;
158
  background: rgba(0, 0, 0, 0) url("//4.bp.blogspot.com/-JsBK9mPEjWo/VHjB2OUI-uI/AAAAAAAAEyA/NteFI3uXm9U/s1600/twitter-little-bird-white.png") no-repeat right top;
159
  }
160
  a:hover .sw-click-to-tweet .sw-ctt-btn {
161
+ text-decoration: none;
162
+ color: #FFF;
163
+ text-transform: uppercase;
164
+ }
functions/click-to-tweet/assets/css/style4.css CHANGED
@@ -1,15 +1,15 @@
1
  .sw-CTT {
2
- display:block;
3
  }
4
  .sw-tweet-clear {
5
- zoom: 1;
6
  }
7
  .sw-tweet-clear:after {
8
- display: block;
9
- visibility: hidden;
10
- height: 0;
11
- clear: both;
12
- content: ".";
13
  }
14
  .sw-click-to-tweet {
15
  display: block;
@@ -29,104 +29,104 @@
29
  transition: all 0.3s ease-in-out;
30
  }
31
  .sw-click-to-tweet .clearfix {
32
- zoom: 1;
33
  }
34
  .sw-click-to-tweet .clearfix:after {
35
- display: block;
36
- visibility: hidden;
37
- height: 0;
38
- clear: both;
39
- content: ".";
40
  }
41
  .sw-click-to-tweet .clear {
42
- clear: both;
43
  }
44
  .sw-click-to-tweet .f-left {
45
- float: left;
46
- display: inline-block;
47
- position: relative;
48
  }
49
  .sw-click-to-tweet .f-right {
50
- float: right;
51
- display: inline-block;
52
- position: relative;
53
  }
54
  .sw-click-to-tweet .list-reset {
55
- list-style: none;
56
- margin: 0;
57
- padding: 0;
58
  }
59
  .sw-click-to-tweet .list-reset li {
60
- list-style: none;
61
- margin: 0;
62
- padding: 0;
63
  }
64
  .sw-click-to-tweet .list-float {
65
- zoom: 1;
66
  }
67
  .sw-click-to-tweet .list-float:after {
68
- display: block;
69
- visibility: hidden;
70
- height: 0;
71
- clear: both;
72
- content: ".";
73
  }
74
  .sw-click-to-tweet .list-float li {
75
- float: left;
76
- display: inline-block;
77
  }
78
  .sw-click-to-tweet .kill-box-shadow {
79
- box-shadow: none;
80
- -webkit-box-shadow: none;
81
- -moz-box-shadow: none;
82
  }
83
  .sw-click-to-tweet .alignright {
84
- float: right;
85
- margin-bottom: 10px;
86
- margin-left: 10px;
87
- text-align: right;
88
  }
89
  .sw-click-to-tweet .alignleft {
90
- float: left;
91
- margin-bottom: 10px;
92
- margin-right: 10px;
93
- text-align: right;
94
  }
95
  .sw-click-to-tweet:after {
96
- content: ".";
97
- display: block;
98
- clear: both;
99
- visibility: hidden;
100
- line-height: 0;
101
- height: 0;
102
  }
103
  .sw-click-to-tweet .sw-ctt-reset {
104
- margin: 0;
105
- padding: 0;
106
- position: relative;
107
  }
108
  .sw-click-to-tweet:after {
109
- display: block;
110
- visibility: hidden;
111
- height: 0;
112
- clear: both;
113
- content: ".";
114
  }
115
  a.swp_CTT {
116
- text-decoration: none;
117
- text-transform: none;
118
  }
119
  a.swp_CTT:hover {
120
- text-decoration: none;
121
  }
122
  .sw-click-to-tweet .sw-ctt-text {
123
- margin: 0;
124
- padding: 0;
125
- position: relative;
126
- margin-bottom: 10px;
127
- word-wrap: break-word;
128
  }
129
- a .sw-click-to-tweet .sw-ctt-text {
130
  margin: 0;
131
  padding: 0;
132
  position: relative;
@@ -140,9 +140,9 @@ a.swp_CTT:hover {
140
  font-style: normal;
141
  display:block;
142
  }
143
- a:hover .sw-click-to-tweet .sw-ctt-text {
144
- text-decoration: none;
145
- color: #FFF;
146
  }
147
  .sw-click-to-tweet .sw-ctt-btn {
148
  margin: 0;
@@ -161,7 +161,7 @@ a.swp_CTT:hover {
161
  background: rgba(0, 0, 0, 0) url("//4.bp.blogspot.com/-JsBK9mPEjWo/VHjB2OUI-uI/AAAAAAAAEyA/NteFI3uXm9U/s1600/twitter-little-bird-white.png") no-repeat right top;
162
  }
163
  .sw-click-to-tweet .sw-ctt-btn:hover {
164
- text-decoration: none;
165
- color: #FFF;
166
- text-transform: uppercase;
167
- }
1
  .sw-CTT {
2
+ display:block;
3
  }
4
  .sw-tweet-clear {
5
+ zoom: 1;
6
  }
7
  .sw-tweet-clear:after {
8
+ display: block;
9
+ visibility: hidden;
10
+ height: 0;
11
+ clear: both;
12
+ content: ".";
13
  }
14
  .sw-click-to-tweet {
15
  display: block;
29
  transition: all 0.3s ease-in-out;
30
  }
31
  .sw-click-to-tweet .clearfix {
32
+ zoom: 1;
33
  }
34
  .sw-click-to-tweet .clearfix:after {
35
+ display: block;
36
+ visibility: hidden;
37
+ height: 0;
38
+ clear: both;
39
+ content: ".";
40
  }
41
  .sw-click-to-tweet .clear {
42
+ clear: both;
43
  }
44
  .sw-click-to-tweet .f-left {
45
+ float: left;
46
+ display: inline-block;
47
+ position: relative;
48
  }
49
  .sw-click-to-tweet .f-right {
50
+ float: right;
51
+ display: inline-block;
52
+ position: relative;
53
  }
54
  .sw-click-to-tweet .list-reset {
55
+ list-style: none;
56
+ margin: 0;
57
+ padding: 0;
58
  }
59
  .sw-click-to-tweet .list-reset li {
60
+ list-style: none;
61
+ margin: 0;
62
+ padding: 0;
63
  }
64
  .sw-click-to-tweet .list-float {
65
+ zoom: 1;
66
  }
67
  .sw-click-to-tweet .list-float:after {
68
+ display: block;
69
+ visibility: hidden;
70
+ height: 0;
71
+ clear: both;
72
+ content: ".";
73
  }
74
  .sw-click-to-tweet .list-float li {
75
+ float: left;
76
+ display: inline-block;
77
  }
78
  .sw-click-to-tweet .kill-box-shadow {
79
+ box-shadow: none;
80
+ -webkit-box-shadow: none;
81
+ -moz-box-shadow: none;
82
  }
83
  .sw-click-to-tweet .alignright {
84
+ float: right;
85
+ margin-bottom: 10px;
86
+ margin-left: 10px;
87
+ text-align: right;
88
  }
89
  .sw-click-to-tweet .alignleft {
90
+ float: left;
91
+ margin-bottom: 10px;
92
+ margin-right: 10px;
93
+ text-align: right;
94
  }
95
  .sw-click-to-tweet:after {
96
+ content: ".";
97
+ display: block;
98
+ clear: both;
99
+ visibility: hidden;
100
+ line-height: 0;
101
+ height: 0;
102
  }
103
  .sw-click-to-tweet .sw-ctt-reset {
104
+ margin: 0;
105
+ padding: 0;
106
+ position: relative;
107
  }
108
  .sw-click-to-tweet:after {
109
+ display: block;
110
+ visibility: hidden;
111
+ height: 0;
112
+ clear: both;
113
+ content: ".";
114
  }
115
  a.swp_CTT {
116
+ text-decoration: none;
117
+ text-transform: none;
118
  }
119
  a.swp_CTT:hover {
120
+ text-decoration: none;
121
  }
122
  .sw-click-to-tweet .sw-ctt-text {
123
+ margin: 0;
124
+ padding: 0;
125
+ position: relative;
126
+ margin-bottom: 10px;
127
+ word-wrap: break-word;
128
  }
129
+ a .sw-click-to-tweet .sw-ctt-text {
130
  margin: 0;
131
  padding: 0;
132
  position: relative;
140
  font-style: normal;
141
  display:block;
142
  }
143
+ a:hover .sw-click-to-tweet .sw-ctt-text {
144
+ text-decoration: none;
145
+ color: #FFF;
146
  }
147
  .sw-click-to-tweet .sw-ctt-btn {
148
  margin: 0;
161
  background: rgba(0, 0, 0, 0) url("//4.bp.blogspot.com/-JsBK9mPEjWo/VHjB2OUI-uI/AAAAAAAAEyA/NteFI3uXm9U/s1600/twitter-little-bird-white.png") no-repeat right top;
162
  }
163
  .sw-click-to-tweet .sw-ctt-btn:hover {
164
+ text-decoration: none;
165
+ color: #FFF;
166
+ text-transform: uppercase;
167
+ }
functions/click-to-tweet/assets/css/styles.css CHANGED
@@ -1,170 +1,170 @@
1
  .tm-tweet-clear {
2
- zoom: 1;
3
  }
4
  .tm-tweet-clear:after {
5
- display: block;
6
- visibility: hidden;
7
- height: 0;
8
- clear: both;
9
- content: ".";
10
  }
11
  .tm-click-to-tweet {
12
- display: block;
13
- background-color: #fff;
14
- margin: 0;
15
- padding: 0;
16
- position: relative;
17
- border: 1px solid #dddddd;
18
- -moz-border-radius: 4px;
19
- border-radius: 4px;
20
- padding: 15px 30px;
21
- margin: 15px 0px;
22
- zoom: 1;
23
  }
24
  .tm-click-to-tweet .clearfix {
25
- zoom: 1;
26
  }
27
  .tm-click-to-tweet .clearfix:after {
28
- display: block;
29
- visibility: hidden;
30
- height: 0;
31
- clear: both;
32
- content: ".";
33
  }
34
  .tm-click-to-tweet .clear {
35
- clear: both;
36
  }
37
  .tm-click-to-tweet .f-left {
38
- float: left;
39
- display: inline-block;
40
- position: relative;
41
  }
42
  .tm-click-to-tweet .f-right {
43
- float: right;
44
- display: inline-block;
45
- position: relative;
46
  }
47
  .tm-click-to-tweet .list-reset {
48
- list-style: none;
49
- margin: 0;
50
- padding: 0;
51
  }
52
  .tm-click-to-tweet .list-reset li {
53
- list-style: none;
54
- margin: 0;
55
- padding: 0;
56
  }
57
  .tm-click-to-tweet .list-float {
58
- zoom: 1;
59
  }
60
  .tm-click-to-tweet .list-float:after {
61
- display: block;
62
- visibility: hidden;
63
- height: 0;
64
- clear: both;
65
- content: ".";
66
  }
67
  .tm-click-to-tweet .list-float li {
68
- float: left;
69
- display: inline-block;
70
  }
71
  .tm-click-to-tweet .kill-box-shadow {
72
- box-shadow: none;
73
- -webkit-box-shadow: none;
74
- -moz-box-shadow: none;
75
  }
76
  .tm-click-to-tweet .alignright {
77
- float: right;
78
- margin-bottom: 10px;
79
- margin-left: 10px;
80
- text-align: right;
81
  }
82
  .tm-click-to-tweet .alignleft {
83
- float: left;
84
- margin-bottom: 10px;
85
- margin-right: 10px;
86
- text-align: right;
87
  }
88
  .tm-click-to-tweet:after {
89
- content: ".";
90
- display: block;
91
- clear: both;
92
- visibility: hidden;
93
- line-height: 0;
94
- height: 0;
95
  }
96
  .tm-click-to-tweet .tm-ctt-reset {
97
- margin: 0;
98
- padding: 0;
99
- position: relative;
100
  }
101
  .tm-click-to-tweet:after {
102
- display: block;
103
- visibility: hidden;
104
- height: 0;
105
- clear: both;
106
- content: ".";
107
  }
108
  .tm-click-to-tweet a {
109
- text-decoration: none;
110
- text-transform: none;
111
  }
112
  .tm-click-to-tweet a:hover {
113
- text-decoration: none;
114
  }
115
  .tm-click-to-tweet .tm-ctt-text {
116
- margin: 0;
117
- padding: 0;
118
- position: relative;
119
- margin-bottom: 10px;
120
- word-wrap: break-word;
121
  }
122
  .tm-click-to-tweet .tm-ctt-text a {
123
- margin: 0;
124
- padding: 0;
125
- position: relative;
126
- color: #999999;
127
- font-size: 24px;
128
- line-height: 140%;
129
- text-transform: none;
130
- font-weight: 500;
131
- text-decoration: none;
132
- text-transform: none;
133
  }
134
  .tm-click-to-tweet .tm-ctt-text a:hover {
135
- text-decoration: none;
136
- color: #666666;
137
  }
138
  .tm-click-to-tweet a.tm-ctt-btn {
139
- margin: 0;
140
- padding: 0;
141
- position: relative;
142
- display: block;
143
- text-transform: uppercase;
144
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
145
- font-size: 12px;
146
- font-weight: bold;
147
- line-height: 100%;
148
- color: #999999;
149
- float: right;
150
- padding-right: 24px;
151
- text-decoration: none;
152
- background: transparent url(../img/twitter-little-bird.png) no-repeat right top;
153
  }
154
  .tm-click-to-tweet a.tm-ctt-btn:hover {
155
- text-decoration: none;
156
- color: #666666;
157
- text-transform: uppercase;
158
  }
159
  .tm-click-to-tweet .tm-powered-by {
160
- font-size: 10px;
161
- color: #999999;
162
  }
163
  .tm-click-to-tweet .tm-powered-by a {
164
- font-size: 10px;
165
- color: #999999 !important;
166
  }
167
  .tm-click-to-tweet .tm-powered-by a:hover {
168
- color: #999999 !important;
169
- text-decoration: underline !important;
170
- }
1
  .tm-tweet-clear {
2
+ zoom: 1;
3
  }
4
  .tm-tweet-clear:after {
5
+ display: block;
6
+ visibility: hidden;
7
+ height: 0;
8
+ clear: both;
9
+ content: ".";
10
  }
11
  .tm-click-to-tweet {
12
+ display: block;
13
+ background-color: #fff;
14
+ margin: 0;
15
+ padding: 0;
16
+ position: relative;
17
+ border: 1px solid #dddddd;
18
+ -moz-border-radius: 4px;
19
+ border-radius: 4px;
20
+ padding: 15px 30px;
21
+ margin: 15px 0px;
22
+ zoom: 1;
23
  }
24
  .tm-click-to-tweet .clearfix {
25
+ zoom: 1;
26
  }
27
  .tm-click-to-tweet .clearfix:after {
28
+ display: block;
29
+ visibility: hidden;
30
+ height: 0;
31
+ clear: both;
32
+ content: ".";
33
  }
34
  .tm-click-to-tweet .clear {
35
+ clear: both;
36
  }
37
  .tm-click-to-tweet .f-left {
38
+ float: left;
39
+ display: inline-block;
40
+ position: relative;
41
  }
42
  .tm-click-to-tweet .f-right {
43
+ float: right;
44
+ display: inline-block;
45
+ position: relative;
46
  }
47
  .tm-click-to-tweet .list-reset {
48
+ list-style: none;
49
+ margin: 0;
50
+ padding: 0;
51
  }
52
  .tm-click-to-tweet .list-reset li {
53
+ list-style: none;
54
+ margin: 0;
55
+ padding: 0;
56
  }
57
  .tm-click-to-tweet .list-float {
58
+ zoom: 1;
59
  }
60
  .tm-click-to-tweet .list-float:after {
61
+ display: block;
62
+ visibility: hidden;
63
+ height: 0;
64
+ clear: both;
65
+ content: ".";
66
  }
67
  .tm-click-to-tweet .list-float li {
68
+ float: left;
69
+ display: inline-block;
70
  }
71
  .tm-click-to-tweet .kill-box-shadow {
72
+ box-shadow: none;
73
+ -webkit-box-shadow: none;
74
+ -moz-box-shadow: none;
75
  }
76
  .tm-click-to-tweet .alignright {
77
+ float: right;
78
+ margin-bottom: 10px;
79
+ margin-left: 10px;
80
+ text-align: right;
81
  }
82
  .tm-click-to-tweet .alignleft {
83
+ float: left;
84
+ margin-bottom: 10px;
85
+ margin-right: 10px;
86
+ text-align: right;
87
  }
88
  .tm-click-to-tweet:after {
89
+ content: ".";
90
+ display: block;
91
+ clear: both;
92
+ visibility: hidden;
93
+ line-height: 0;
94
+ height: 0;
95
  }
96
  .tm-click-to-tweet .tm-ctt-reset {
97
+ margin: 0;
98
+ padding: 0;
99
+ position: relative;
100
  }
101
  .tm-click-to-tweet:after {
102
+ display: block;
103
+ visibility: hidden;
104
+ height: 0;
105
+ clear: both;
106
+ content: ".";
107
  }
108
  .tm-click-to-tweet a {
109
+ text-decoration: none;
110
+ text-transform: none;
111
  }
112
  .tm-click-to-tweet a:hover {
113
+ text-decoration: none;
114
  }
115
  .tm-click-to-tweet .tm-ctt-text {
116
+ margin: 0;
117
+ padding: 0;
118
+ position: relative;
119
+ margin-bottom: 10px;
120
+ word-wrap: break-word;
121
  }
122
  .tm-click-to-tweet .tm-ctt-text a {
123
+ margin: 0;
124
+ padding: 0;
125
+ position: relative;
126
+ color: #999999;
127
+ font-size: 24px;
128
+ line-height: 140%;
129
+ text-transform: none;
130
+ font-weight: 500;
131
+ text-decoration: none;
132
+ text-transform: none;
133
  }
134
  .tm-click-to-tweet .tm-ctt-text a:hover {
135
+ text-decoration: none;
136
+ color: #666666;
137
  }
138
  .tm-click-to-tweet a.tm-ctt-btn {
139
+ margin: 0;
140
+ padding: 0;
141
+ position: relative;
142
+ display: block;
143
+ text-transform: uppercase;
144
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
145
+ font-size: 12px;
146
+ font-weight: bold;
147
+ line-height: 100%;
148
+ color: #999999;
149
+ float: right;
150
+ padding-right: 24px;
151
+ text-decoration: none;
152
+ background: transparent url(../img/twitter-little-bird.png) no-repeat right top;
153
  }
154
  .tm-click-to-tweet a.tm-ctt-btn:hover {
155
+ text-decoration: none;
156
+ color: #666666;
157
+ text-transform: uppercase;
158
  }
159
  .tm-click-to-tweet .tm-powered-by {
160
+ font-size: 10px;
161
+ color: #999999;
162
  }
163
  .tm-click-to-tweet .tm-powered-by a {
164
+ font-size: 10px;
165
+ color: #999999 !important;
166
  }
167
  .tm-click-to-tweet .tm-powered-by a:hover {
168
+ color: #999999 !important;
169
+ text-decoration: underline !important;
170
+ }
functions/click-to-tweet/assets/js/clickToTweet.js CHANGED
@@ -1,9 +1,11 @@
 
 
1
  (function() {
2
- tinymce.PluginManager.add('clickToTweet', function( editor, url ) {
3
- editor.addButton( 'clickToTweet', {
4
- title: 'Click to Tweet by Social Warfare',
5
- icon: 'sw sw sw-twitter',
6
- onclick: function() {
7
  editor.windowManager.open( {
8
  title: 'Build Your "Click to Tweet"',
9
  class: 'swp_ctt',
@@ -15,53 +17,53 @@
15
  name: 'tweet',
16
  label: 'The Tweet that will be sent out on Twitter.',
17
  onkeyup: function() {
18
- var value = jQuery('.mce-first textarea').val();
19
  var strLength = value.length;
20
- var handle = jQuery('#socialWarfare .twitterIDWrapper label').html();
21
 
22
- if(value.indexOf('http') > -1 || value.indexOf('https') > -1) {
23
  linkSpace = 0;
24
- } else {
25
  linkSpace = 23;
26
  };
27
-
28
- if(typeof handle === 'undefined') {
29
- var remaining = 140 - link_length(value) - linkSpace;
30
  } else {
31
- var remaining = 140 - link_length(value) - linkSpace - handle.length - 6;
32
  }
33
- if(remaining > 1 || remaining == 0) {
34
- jQuery('.tweetCounter').css({'color':'green'}).text(remaining + ' characters');
35
  } else if (remaining == 1) {
36
- jQuery('.tweetCounter').css({'color':'green'}).text(remaining + ' character');
37
  } else if (remaining < 0) {
38
- jQuery('.tweetCounter').css({'color':'red'}).text(remaining + ' characters');
39
  }
40
  },
41
  class: 'tweetCounting'
42
- },
43
  {
44
  type: 'label',
45
  name: 'someHelpText',
46
  onPostRender : function() {
47
- var value = jQuery('.mce-first textarea').val();
48
  var strLength = value.length;
49
- var handle = jQuery('#socialWarfare .twitterIDWrapper label').html();
50
-
51
- if(value.indexOf('http') > -1 || value.indexOf('https') > -1) {
52
  linkSpace = 0;
53
- } else {
54
  linkSpace = 23;
55
  };
56
-
57
- if(typeof handle === 'undefined') {
58
- var remaining = 140 - link_length(value) - linkSpace;
59
  } else {
60
- var remaining = 140 - link_length(value) - linkSpace - handle.length - 6;
61
- }
62
-
63
  this.getEl().innerHTML =
64
- '<span style="float:right;">You have <span class="tweetCounter" style="color:green">'+remaining+' characters</span> remaining.</span>';},
65
  text: ''},
66
  {
67
  type: 'textbox',
@@ -69,47 +71,47 @@
69
  style: 'height:50px',
70
  name: 'quote',
71
  label: 'The quote as it will appear in your article.'
72
- },{
73
- type: 'label',
74
- name: 'someHelpText2',
75
- onPostRender : function() {
76
- this.getEl().innerHTML =
77
- '<div style="width:650px;">&nbsp;</div>';},
78
  text: ''},
79
 
80
- {type: 'listbox',
81
- name: 'theme',
82
- label: 'Visual Theme',
83
- 'values': [
84
- {text: 'Default', value: 'default'},
85
- {text: 'Send Her My Love', value: 'style1'},
86
- {text: 'Roll With The Changes', value: 'style2'},
87
- {text: 'Free Bird', value: 'style3'},
88
- {text: 'Don\'t Stop Believin\'', value: 'style4'},
89
- {text: 'Thunderstruck', value: 'style5'},
90
- {text: 'Livin\' On A Prayer', value: 'style6'},
91
- ],
92
- },
93
  ],
94
  onsubmit: function( e ) {
95
- var value = jQuery('.mce-first textarea').val();
96
  var strLength = value.length;
97
  var remaining = 117 - strLength;
98
- if(e.data.tweet === '' || e.data.quote === '') {
99
- editor.windowManager.alert('Please, fill in both fields.');
100
  return false;
101
- } else if(remaining < 0) {
102
- editor.windowManager.alert('You have too many characters in your tweet.');
103
  return false;
104
  }
105
- if(e.data.theme == 'default') {
106
- editor.insertContent( '[clickToTweet tweet="' + e.data.tweet.replace(/"/g,'\'') + '" quote="' + e.data.quote.replace(/"/g,'\'') + '"]');
107
  } else {
108
- editor.insertContent( '[clickToTweet tweet="' + e.data.tweet.replace(/"/g,'\'') + '" quote="' + e.data.quote.replace(/"/g,'\'') + '" theme="'+ e.data.theme +'"]');
109
  }
110
  }
111
  });
112
  }
113
- });
114
- });
115
- })();
1
+ /* globals socialWarfareAdmin */
2
+
3
  (function() {
4
+ tinymce.PluginManager.add('clickToTweet', function( editor, url ) {
5
+ editor.addButton( 'clickToTweet', {
6
+ title: 'Click to Tweet by Social Warfare',
7
+ icon: 'sw sw sw-twitter',
8
+ onclick: function() {
9
  editor.windowManager.open( {
10
  title: 'Build Your "Click to Tweet"',
11
  class: 'swp_ctt',
17
  name: 'tweet',
18
  label: 'The Tweet that will be sent out on Twitter.',
19
  onkeyup: function() {
20
+ var value = jQuery( '.mce-first textarea' ).val();
21
  var strLength = value.length;
22
+ var handle = jQuery( '#socialWarfare .twitterIDWrapper label' ).html();
23
 
24
+ if (value.indexOf( 'http' ) > -1 || value.indexOf( 'https' ) > -1) {
25
  linkSpace = 0;
26
+ } else {
27
  linkSpace = 23;
28
  };
29
+
30
+ if (typeof handle === 'undefined') {
31
+ var remaining = 140 - socialWarfareAdmin.linkLength( value ) - linkSpace;
32
  } else {
33
+ var remaining = 140 - socialWarfareAdmin.linkLength( value ) - linkSpace - handle.length - 6;
34
  }
35
+ if (remaining > 1 || remaining == 0) {
36
+ jQuery( '.tweetCounter' ).css( {'color':'green'} ).text( remaining + ' characters' );
37
  } else if (remaining == 1) {
38
+ jQuery( '.tweetCounter' ).css( {'color':'green'} ).text( remaining + ' character' );
39
  } else if (remaining < 0) {
40
+ jQuery( '.tweetCounter' ).css( {'color':'red'} ).text( remaining + ' characters' );
41
  }
42
  },
43
  class: 'tweetCounting'
44
+ },
45
  {
46
  type: 'label',
47
  name: 'someHelpText',
48
  onPostRender : function() {
49
+ var value = jQuery( '.mce-first textarea' ).val();
50
  var strLength = value.length;
51
+ var handle = jQuery( '#socialWarfare .twitterIDWrapper label' ).html();
52
+
53
+ if (value.indexOf( 'http' ) > -1 || value.indexOf( 'https' ) > -1) {
54
  linkSpace = 0;
55
+ } else {
56
  linkSpace = 23;
57
  };
58
+
59
+ if (typeof handle === 'undefined') {
60
+ var remaining = 140 - socialWarfareAdmin.linkLength( value ) - linkSpace;
61
  } else {
62
+ var remaining = 140 - socialWarfareAdmin.linkLength( value ) - linkSpace - handle.length - 6;
63
+ }
64
+
65
  this.getEl().innerHTML =
66
+ '<span style="float:right;">You have <span class="tweetCounter" style="color:green">' + remaining + ' characters</span> remaining.</span>';},
67
  text: ''},
68
  {
69
  type: 'textbox',
71
  style: 'height:50px',
72
  name: 'quote',
73
  label: 'The quote as it will appear in your article.'
74
+ },{
75
+ type: 'label',
76
+ name: 'someHelpText2',
77
+ onPostRender : function() {
78
+ this.getEl().innerHTML =
79
+ '<div style="width:650px;">&nbsp;</div>';},
80
  text: ''},
81
 
82
+ {type: 'listbox',
83
+ name: 'theme',
84
+ label: 'Visual Theme',
85
+ 'values': [
86
+ {text: 'Default', value: 'default'},
87
+ {text: 'Send Her My Love', value: 'style1'},
88
+ {text: 'Roll With The Changes', value: 'style2'},
89
+ {text: 'Free Bird', value: 'style3'},
90
+ {text: 'Don\'t Stop Believin\'', value: 'style4'},
91
+ {text: 'Thunderstruck', value: 'style5'},
92
+ {text: 'Livin\' On A Prayer', value: 'style6'},
93
+ ],
94
+ },
95
  ],
96
  onsubmit: function( e ) {
97
+ var value = jQuery( '.mce-first textarea' ).val();
98
  var strLength = value.length;
99
  var remaining = 117 - strLength;
100
+ if (e.data.tweet === '' || e.data.quote === '') {
101
+ editor.windowManager.alert( 'Please, fill in both fields.' );
102
  return false;
103
+ } else if (remaining < 0) {
104
+ editor.windowManager.alert( 'You have too many characters in your tweet.' );
105
  return false;
106
  }
107
+ if (e.data.theme == 'default') {
108
+ editor.insertContent( '[clickToTweet tweet="' + e.data.tweet.replace( /"/g,'\'' ) + '" quote="' + e.data.quote.replace( /"/g,'\'' ) + '"]' );
109
  } else {
110
+ editor.insertContent( '[clickToTweet tweet="' + e.data.tweet.replace( /"/g,'\'' ) + '" quote="' + e.data.quote.replace( /"/g,'\'' ) + '" theme="' + e.data.theme + '"]' );
111
  }
112
  }
113
  });
114
  }
115
+ });
116
+ });
117
+ })();
functions/click-to-tweet/assets/js/tmclicktotweet_plugin.js CHANGED
@@ -1,27 +1,28 @@
1
  (function() {
2
- tinymce.create('tinymce.plugins.TMClickToTweet', {
3
- init: function(ed, url) {
4
- ed.addButton('tmclicktotweet', {
5
- title: 'tmclicktotweet.quickaddd',
6
- image: url.replace("/js", "") + '/img/twitter-little-bird-button.png',
7
- onclick: function() {
8
- var m = prompt("Click To Tweet", "Enter your tweets");
9
- if (m != null && m != 'undefined' && m != 'Enter your tweets' && m != '') ed.execCommand('mceInsertContent', false, '[Tweet "' + m + '"]');
10
- }
11
- });
12
- },
13
- createControl: function(n, cm) {
14
- return null;
15
- },
16
- getInfo: function() {
17
- return {
18
- longname: "Click To Tweet by Todaymade",
19
- author: 'Todaymade',
20
- authorurl: 'http://coschedule.com/',
21
- infourl: 'http://coschedule.com/click-to-tweet',
22
- version: "1.0"
23
- };
24
- }
25
- });
26
- tinymce.PluginManager.add('tmclicktotweet', tinymce.plugins.TMClickToTweet);
27
- })();
 
1
  (function() {
2
+ tinymce.create('tinymce.plugins.TMClickToTweet', {
3
+ init: function(ed, url) {
4
+ ed.addButton('tmclicktotweet', {
5
+ title: 'tmclicktotweet.quickaddd',
6
+ image: url.replace( "/js", "" ) + '/img/twitter-little-bird-button.png',
7
+ onclick: function() {
8
+ var m = prompt( "Click To Tweet", "Enter your tweets" );
9
+ if (m != null && m != 'undefined' && m != 'Enter your tweets' && m != '') { ed.execCommand( 'mceInsertContent', false, '[Tweet "' + m + '"]' );
10
+ }
11
+ }
12
+ });
13
+ },
14
+ createControl: function(n, cm) {
15
+ return null;
16
+ },
17
+ getInfo: function() {
18
+ return {
19
+ longname: "Click To Tweet by Todaymade",
20
+ author: 'Todaymade',
21
+ authorurl: 'http://coschedule.com/',
22
+ infourl: 'http://coschedule.com/click-to-tweet',
23
+ version: "1.0"
24
+ };
25
+ }
26
+ });
27
+ tinymce.PluginManager.add( 'tmclicktotweet', tinymce.plugins.TMClickToTweet );
28
+ })();
functions/click-to-tweet/clickToTweet.php CHANGED
@@ -1,8 +1,21 @@
1
  <?php
2
-
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  if ( ! class_exists( 'clickToTweet' ) ) {
4
 
5
- class clickToTweet {
6
 
7
  public function __construct() {
8
  $this->clickToTweet();
@@ -12,14 +25,14 @@ if ( ! class_exists( 'clickToTweet' ) ) {
12
  register_activation_hook( __FILE__, array( __CLASS__, 'activation' ) );
13
  register_deactivation_hook( __FILE__, array( __CLASS__, 'deactivation' ) );
14
 
15
- if(is_admin()) {
16
  $this->register_admin_hooks();
17
  }
18
  }
19
 
20
- public function debug($array) {
21
  echo '<pre>';
22
- print_r($array);
23
  echo '</pre>';
24
  }
25
 
@@ -32,40 +45,40 @@ if ( ! class_exists( 'clickToTweet' ) ) {
32
  }
33
 
34
  public function register_admin_hooks() {
35
- add_filter('tiny_mce_version', array($this, 'refresh_mce'));
36
- add_action('init', array($this, 'tinymce_button'));
37
  }
38
 
39
  public function tinymce_button() {
40
- if (!current_user_can('edit_posts') && !current_user_can('edit_pages')) {
41
  return;
42
  }
43
 
44
- if (get_user_option('rich_editing') == 'true') {
45
- add_filter('mce_external_plugins', array($this, 'tinymce_register_plugin'));
46
- add_filter('mce_buttons', array($this, 'tinymce_register_button'));
47
  }
48
  }
49
 
50
- public function tinymce_register_button($buttons) {
51
- array_push($buttons, "|", "clickToTweet");
52
- return $buttons;
53
  }
54
 
55
- public function tinymce_register_plugin($plugin_array) {
56
- $plugin_array['clickToTweet'] = plugins_url( '/assets/js/clickToTweet.js', __FILE__);
57
- return $plugin_array;
58
  }
59
 
60
  public function register_settings() {
61
- register_setting('tmclicktotweet-options', 'twitter-handle', array($this, 'validate_settings'));
62
  }
63
 
64
- public function validate_settings($input) {
65
- return str_replace('@', '', strip_tags(stripslashes($input)));
66
  }
67
 
68
- public function refresh_mce($ver) {
69
  $ver += 3;
70
  return $ver;
71
  }
@@ -73,31 +86,35 @@ if ( ! class_exists( 'clickToTweet' ) ) {
73
 
74
  new clickToTweet();
75
 
76
- }
77
-
78
- function clickToTweetShortcode( $atts ){
79
-
 
 
 
 
 
 
80
  $url = swp_process_url( get_permalink() , 'twitter' , get_the_ID() );
81
- (strpos($atts['tweet'],'http') !== false ? $urlParam = '&url=/' : $urlParam = '&url='.$url );
82
- $atts['tweet'] = rtrim($atts['tweet']);
83
-
84
- $options = swp_get_user_options();
85
  $user_twitter_handle = get_post_meta( get_the_ID() , 'swp_twitter_username' , true );
86
- if(!$user_twitter_handle):
87
  $user_twitter_handle = $options['twitterID'];
88
  endif;
89
-
90
- if(isset($atts['theme']) && $atts['theme'] != 'default'):
91
  $theme = $atts['theme'];
92
- else:
93
  $theme = $options['cttTheme'];
94
  endif;
95
-
96
  return '
97
  <div class="sw-tweet-clear"></div>
98
- <a class="swp_CTT '.$theme.'" href="https://twitter.com/share?text='.urlencode(html_entity_decode($atts['tweet'], ENT_COMPAT, 'UTF-8')) . $urlParam . ''.($user_twitter_handle ? '&via='.str_replace('@','',$user_twitter_handle) : '').'" data-link="https://twitter.com/share?text='.urlencode(html_entity_decode($atts['tweet'], ENT_COMPAT, 'UTF-8')).$urlParam.''.($user_twitter_handle ? '&via='.str_replace('@','',$user_twitter_handle) : '').'" target="_blank"><span class="sw-click-to-tweet"><span class="sw-ctt-text">'.$atts['quote'].'</span><span class="sw-ctt-btn">'.__('Click To Tweet','social-warfare').'<i class="sw sw-twitter"></i></span></span></a>';
99
  }
100
 
101
  add_shortcode( 'clickToTweet', 'clickToTweetShortcode' );
102
-
103
- ?>
1
  <?php
2
+ /**
3
+ * Functions for creating click to tweets
4
+ *
5
+ * @package SocialWarfare\Functions
6
+ * @copyright Copyright (c) 2016, Warfare Plugins, LLC
7
+ * @license GPL-3.0+
8
+ * @since 1.0.0
9
+ */
10
+
11
+ defined( 'WPINC' ) || die;
12
+
13
+ /**
14
+ * clickToTweet class
15
+ */
16
  if ( ! class_exists( 'clickToTweet' ) ) {
17
 
18
+ class clickToTweet {
19
 
20
  public function __construct() {
21
  $this->clickToTweet();
25
  register_activation_hook( __FILE__, array( __CLASS__, 'activation' ) );
26
  register_deactivation_hook( __FILE__, array( __CLASS__, 'deactivation' ) );
27
 
28
+ if ( is_admin() ) {
29
  $this->register_admin_hooks();
30
  }
31
  }
32
 
33
+ public function debug( $array ) {
34
  echo '<pre>';
35
+ print_r( $array );
36
  echo '</pre>';
37
  }
38
 
45
  }
46
 
47
  public function register_admin_hooks() {
48
+ add_filter( 'tiny_mce_version', array( $this, 'refresh_mce' ) );
49
+ add_action( 'init', array( $this, 'tinymce_button' ) );
50
  }
51
 
52
  public function tinymce_button() {
53
+ if ( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'edit_pages' ) ) {
54
  return;
55
  }
56
 
57
+ if ( get_user_option( 'rich_editing' ) == 'true' ) {
58
+ add_filter( 'mce_external_plugins', array( $this, 'tinymce_register_plugin' ) );
59
+ add_filter( 'mce_buttons', array( $this, 'tinymce_register_button' ) );
60
  }
61
  }
62
 
63
+ public function tinymce_register_button( $buttons ) {
64
+ array_push( $buttons, '|', 'clickToTweet' );
65
+ return $buttons;
66
  }
67
 
68
+ public function tinymce_register_plugin( $plugin_array ) {
69
+ $plugin_array['clickToTweet'] = plugins_url( '/assets/js/clickToTweet.js', __FILE__ );
70
+ return $plugin_array;
71
  }
72
 
73
  public function register_settings() {
74
+ register_setting( 'tmclicktotweet-options', 'twitter-handle', array( $this, 'validate_settings' ) );
75
  }
76
 
77
+ public function validate_settings( $input ) {
78
+ return str_replace( '@', '', strip_tags( stripslashes( $input ) ) );
79
  }
80
 
81
+ public function refresh_mce( $ver ) {
82
  $ver += 3;
83
  return $ver;
84
  }
86
 
87
  new clickToTweet();
88
 
89
+ }// End if().
90
+
91
+ /**
92
+ * The function to build the click to tweets
93
+ * @param array $atts An array of attributes
94
+ * @return string The html of a click to tweet
95
+ */
96
+ function clickToTweetShortcode( $atts ) {
97
+ global $swp_user_options;
98
+
99
  $url = swp_process_url( get_permalink() , 'twitter' , get_the_ID() );
100
+ (strpos( $atts['tweet'],'http' ) !== false ? $urlParam = '&url=/' : $urlParam = '&url=' . $url );
101
+ $atts['tweet'] = rtrim( $atts['tweet'] );
102
+
103
+ $options = $swp_user_options;
104
  $user_twitter_handle = get_post_meta( get_the_ID() , 'swp_twitter_username' , true );
105
+ if ( ! $user_twitter_handle ) :
106
  $user_twitter_handle = $options['twitterID'];
107
  endif;
108
+
109
+ if ( isset( $atts['theme'] ) && $atts['theme'] != 'default' ) :
110
  $theme = $atts['theme'];
111
+ else :
112
  $theme = $options['cttTheme'];
113
  endif;
114
+
115
  return '
116
  <div class="sw-tweet-clear"></div>
117
+ <a class="swp_CTT ' . $theme . '" href="https://twitter.com/share?text=' . urlencode( html_entity_decode( $atts['tweet'], ENT_COMPAT, 'UTF-8' ) ) . $urlParam . '' . ($user_twitter_handle ? '&via=' . str_replace( '@','',$user_twitter_handle ) : '') . '" data-link="https://twitter.com/share?text=' . urlencode( html_entity_decode( $atts['tweet'], ENT_COMPAT, 'UTF-8' ) ) . $urlParam . '' . ($user_twitter_handle ? '&via=' . str_replace( '@','',$user_twitter_handle ) : '') . '" rel="nofollow" target="_blank"><span class="sw-click-to-tweet"><span class="sw-ctt-text">' . $atts['quote'] . '</span><span class="sw-ctt-btn">' . __( 'Click To Tweet','social-warfare' ) . '<i class="sw sw-twitter"></i></span></span></a>';
118
  }
119
 
120
  add_shortcode( 'clickToTweet', 'clickToTweetShortcode' );
 
 
functions/compatibility.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Functions to enhance compatibility with other plugins
4
+ *
5
+ * @package SocialWarfare\Functions
6
+ * @copyright Copyright (c) 2016, Warfare Plugins, LLC
7
+ * @license GPL-3.0+
8
+ * @since 1.0.0
9
+ */
10
+
11
+ defined( 'WPINC' ) || die;
12
+
13
+ /**
14
+ * Disabe Open Graph tags on Simple Podcast Press Pages
15
+ *
16
+ * @since 1.4.0
17
+ * @access public
18
+ */
19
+ if ( is_plugin_active( 'simple-podcast-press/simple-podcast-press.php' ) ) {
20
+ global $ob_wp_simplepodcastpress;
21
+ remove_action( 'wp_head' , array( $ob_wp_simplepodcastpress, 'spp_open_graph' ) , 1 );
22
+ }
23
+
24
+ /**
25
+ * A function to remove all Social Warfare fields when a post
26
+ * is duplicated using the duplicate post plugin.
27
+ *
28
+ * @since 2.1.4
29
+ * @access public
30
+ * @param integer $id The post ID
31
+ * @return none
32
+ */
33
+ function swp_remove_fields($id) {
34
+
35
+ // Delete any share count fields
36
+ delete_post_meta( $id , '_buffer_shares' );
37
+ delete_post_meta( $id , '_facebook_shares' );
38
+ delete_post_meta( $id , '_flipboard_shares' );
39
+ delete_post_meta( $id , '_googlePlus_shares' );
40
+ delete_post_meta( $id , '_hacker_news_shares' );
41
+ delete_post_meta( $id , '_linkedIn_shares' );
42
+ delete_post_meta( $id , '_pinterest_shares' );
43
+ delete_post_meta( $id , '_pocket_shares' );
44
+ delete_post_meta( $id , '_reddit_shares' );
45
+ delete_post_meta( $id , '_stumbleupon_shares' );
46
+ delete_post_meta( $id , '_tumblr_shares' );
47
+ delete_post_meta( $id , '_twitter_shares' );
48
+ delete_post_meta( $id , '_whatsapp_shares' );
49
+ delete_post_meta( $id , '_yummly_shares' );
50
+ delete_post_meta( $id , '_totes' );
51
+
52
+ // Delete any bitly links
53
+ delete_post_meta( $id , 'bitly_link_buffer' );
54
+ delete_post_meta( $id , 'bitly_link_facebook' );
55
+ delete_post_meta( $id , 'bitly_link_flipboard' );
56
+ delete_post_meta( $id , 'bitly_link_googlePlus' );
57
+ delete_post_meta( $id , 'bitly_link_hacker_news' );
58
+ delete_post_meta( $id , 'bitly_link_linkedIn' );
59
+ delete_post_meta( $id , 'bitly_link_pinterest' );
60
+ delete_post_meta( $id , 'bitly_link_pocket' );
61
+ delete_post_meta( $id , 'bitly_link_reddit' );
62
+ delete_post_meta( $id , 'bitly_link_stumbleupon' );
63
+ delete_post_meta( $id , 'bitly_link_tumblr' );
64
+ delete_post_meta( $id , 'bitly_link_twitter' );
65
+ delete_post_meta( $id , 'bitly_link_whatsapp' );
66
+ delete_post_meta( $id , 'bitly_link_yummly' );
67
+ delete_post_meta( $id , 'bitly_link' );
68
+
69
+ // Delete any custom options fields
70
+ delete_post_meta( $id , 'nc_customTweet' );
71
+ delete_post_meta( $id , 'nc_floatLocation' );
72
+ delete_post_meta( $id , 'nc_ogDescription' );
73
+ delete_post_meta( $id , 'nc_ogImage' );
74
+ delete_post_meta( $id , 'nc_ogTitle' );
75
+ delete_post_meta( $id , 'nc_pinterestDescription' );
76
+ delete_post_meta( $id , 'nc_pinterestImage' );
77
+ delete_post_meta( $id , 'nc_postLocation' );
78
+ delete_post_meta( $id , 'sw_fb_author' );
79
+ delete_post_meta( $id , 'sw_open_graph_image_data' );
80
+ delete_post_meta( $id , 'sw_open_graph_image_url' );
81
+ delete_post_meta( $id , 'sw_open_thumbnail_url' );
82
+ delete_post_meta( $id , 'sw_pinterest_image_url' );
83
+ delete_post_meta( $id , 'sw_twitter_username' );
84
+ delete_post_meta( $id , 'swp_cache_timestamp' );
85
+ delete_post_meta( $id , 'swp_open_graph_image_data' );
86
+ delete_post_meta( $id , 'swp_open_graph_image_url' );
87
+ delete_post_meta( $id , 'swp_open_thumbnail_url' );
88
+ delete_post_meta( $id , 'swp_pinterest_image_url' );
89
+ delete_post_meta( $id , 'swp_recovery_url' );
90
+
91
+ }
92
+ add_action( "dp_duplicate_post", "swp_remove_fields" );
93
+
94
+ /**
95
+ * A function to fix the share recovery conflict with Really Simple SSL plugin
96
+ * @param string $html A string of html to be filtered
97
+ * @return string $html The filtered string of html
98
+ * @access public
99
+ * @since 2.2.2
100
+ *
101
+ */
102
+ function swp_rsssl_fix_compatibility($html) {
103
+ //replace the https back to http
104
+ $html = str_replace(
105
+ "swp_post_recovery_url = 'https://",
106
+ "swp_post_recovery_url = 'http://",
107
+ $html);
108
+ return $html;
109
+ }
110
+ add_filter("rsssl_fixer_output","swp_rsssl_fix_compatibility");
functions/curl_functions.php CHANGED
@@ -1,106 +1,103 @@
1
  <?php
2
- /*****************************************************************
3
- * *
4
- * cURL - A Function to Process cURL requests *
5
- * *
6
- ******************************************************************/
7
-
8
- function swp_fetch_shares_via_curl_multi($data, $options = array()) {
9
-
10
- // array of curl handles
11
- $curly = array();
12
- // data to be returned
13
- $result = array();
14
-
15
- // multi handle
16
- $mh = curl_multi_init();
17
-
18
- // loop through $data and create curl handles
19
- // then add them to the multi-handle
20
-
21
- foreach ($data as $id => $d) {
22
-
23
- if($d !== 0 || $id == 'googlePlus'):
24
-
25
- $curly[$id] = curl_init();
26
-
27
- if($id == 'googlePlus'):
28
-
29
- curl_setopt($curly[$id], CURLOPT_URL, "https://clients6.google.com/rpc");
30
- curl_setopt($curly[$id], CURLOPT_POST, true);
31
- curl_setopt($curly[$id], CURLOPT_SSL_VERIFYPEER, false);
32
- curl_setopt($curly[$id], CURLOPT_POSTFIELDS, '[{"method":"pos.plusones.get","id":"p","params":{"nolog":true,"id":"'.rawurldecode($d).'","source":"widget","userId":"@viewer","groupId":"@self"},"jsonrpc":"2.0","key":"p","apiVersion":"v1"}]');
33
- curl_setopt($curly[$id], CURLOPT_RETURNTRANSFER, true);
34
- curl_setopt($curly[$id], CURLOPT_HTTPHEADER, array('Content-type: application/json'));
35
-
36
- else:
37
-
38
- $url = (is_array($d) && !empty($d['url'])) ? $d['url'] : $d;
39
- curl_setopt($curly[$id], CURLOPT_URL, $url);
40
- curl_setopt($curly[$id], CURLOPT_HEADER, 0);
41
- curl_setopt($curly[$id], CURLOPT_RETURNTRANSFER, 1);
42
- curl_setopt($curly[$id], CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
43
- curl_setopt($curly[$id], CURLOPT_FAILONERROR, 0);
44
- curl_setopt($curly[$id], CURLOPT_FOLLOWLOCATION, 0);
45
- curl_setopt($curly[$id], CURLOPT_RETURNTRANSFER,1);
46
- curl_setopt($curly[$id], CURLOPT_SSL_VERIFYPEER, false);
47
- curl_setopt($curly[$id], CURLOPT_SSL_VERIFYHOST, false);
48
- curl_setopt($curly[$id], CURLOPT_TIMEOUT, 5);
49
- curl_setopt($curly[$id], CURLOPT_CONNECTTIMEOUT, 5);
50
- curl_setopt($curly[$id], CURLOPT_NOSIGNAL, 1);
51
- curl_setopt($curly[$id], CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
52
  // curl_setopt($curly[$id], CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv3);
53
-
54
  endif;
55
-
56
  // extra options?
57
- if (!empty($options)) {
58
- curl_setopt_array($curly[$id], $options);
59
  }
60
-
61
- curl_multi_add_handle($mh, $curly[$id]);
62
 
63
  endif;
64
- }
65
-
66
  // execute the handles
67
- $running = NULL;
68
- do {
69
- curl_multi_exec($mh, $running);
70
- } while($running > 0);
71
-
72
-
73
  // get content and remove handles
74
- foreach($curly as $id => $c) {
75
- $result[$id] = curl_multi_getcontent($c);
76
- curl_multi_remove_handle($mh, $c);
77
- }
78
-
79
  // all done
80
- curl_multi_close($mh);
81
-
82
  return $result;
83
- }
84
 
85
- function swp_file_get_contents_curl($url){
86
- $ch=curl_init();
87
- curl_setopt($ch, CURLOPT_URL, $url);
88
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
89
- curl_setopt($ch, CURLOPT_FAILONERROR, 0);
90
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
91
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
92
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
93
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
94
- curl_setopt($ch, CURLOPT_TIMEOUT, 5);
95
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
96
- curl_setopt($ch, CURLOPT_NOSIGNAL, 1);
97
- curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
98
- $cont = @curl_exec($ch);
99
- $curl_errno = curl_errno($ch);
100
- curl_close($ch);
101
- if ($curl_errno > 0) {
102
- return 0;
103
- }
104
- return $cont;
105
  }
106
-
 
1
  <?php
2
+ /**
3
+ * **************************************************************
4
+ * *
5
+ * cURL - A Function to Process cURL requests *
6
+ * *
7
+ ******************************************************************/
8
+
9
+ function swp_fetch_shares_via_curl_multi( $data, $options = array() ) {
10
+
11
+ // array of curl handles
12
+ $curly = array();
13
+ // data to be returned
14
+ $result = array();
15
+
16
+ // multi handle
17
+ $mh = curl_multi_init();
18
+
19
+ // loop through $data and create curl handles
20
+ // then add them to the multi-handle
21
+ foreach ( $data as $id => $d ) {
22
+
23
+ if ( $d !== 0 || $id == 'googlePlus' ) :
24
+
25
+ $curly[ $id ] = curl_init();
26
+
27
+ if ( $id == 'googlePlus' ) :
28
+
29
+ curl_setopt( $curly[ $id ], CURLOPT_URL, 'https://clients6.google.com/rpc' );
30
+ curl_setopt( $curly[ $id ], CURLOPT_POST, true );
31
+ curl_setopt( $curly[ $id ], CURLOPT_SSL_VERIFYPEER, false );
32
+ curl_setopt( $curly[ $id ], CURLOPT_POSTFIELDS, '[{"method":"pos.plusones.get","id":"p","params":{"nolog":true,"id":"' . rawurldecode( $d ) . '","source":"widget","userId":"@viewer","groupId":"@self"},"jsonrpc":"2.0","key":"p","apiVersion":"v1"}]' );
33
+ curl_setopt( $curly[ $id ], CURLOPT_RETURNTRANSFER, true );
34
+ curl_setopt( $curly[ $id ], CURLOPT_HTTPHEADER, array( 'Content-type: application/json' ) );
35
+
36
+ else :
37
+
38
+ $url = (is_array( $d ) && ! empty( $d['url'] )) ? $d['url'] : $d;
39
+ curl_setopt( $curly[ $id ], CURLOPT_URL, $url );
40
+ curl_setopt( $curly[ $id ], CURLOPT_HEADER, 0 );
41
+ curl_setopt( $curly[ $id ], CURLOPT_RETURNTRANSFER, 1 );
42
+ curl_setopt( $curly[ $id ], CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT'] );
43
+ curl_setopt( $curly[ $id ], CURLOPT_FAILONERROR, 0 );
44
+ curl_setopt( $curly[ $id ], CURLOPT_FOLLOWLOCATION, 0 );
45
+ curl_setopt( $curly[ $id ], CURLOPT_RETURNTRANSFER,1 );
46
+ curl_setopt( $curly[ $id ], CURLOPT_SSL_VERIFYPEER, false );
47
+ curl_setopt( $curly[ $id ], CURLOPT_SSL_VERIFYHOST, false );
48
+ curl_setopt( $curly[ $id ], CURLOPT_TIMEOUT, 5 );
49
+ curl_setopt( $curly[ $id ], CURLOPT_CONNECTTIMEOUT, 5 );
50
+ curl_setopt( $curly[ $id ], CURLOPT_NOSIGNAL, 1 );
51
+ curl_setopt( $curly[ $id ], CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
52
  // curl_setopt($curly[$id], CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv3);
 
53
  endif;
54
+
55
  // extra options?
56
+ if ( ! empty( $options ) ) {
57
+ curl_setopt_array( $curly[ $id ], $options );
58
  }
59
+
60
+ curl_multi_add_handle( $mh, $curly[ $id ] );
61
 
62
  endif;
63
+ }// End foreach().
64
+
65
  // execute the handles
66
+ $running = null;
67
+ do {
68
+ curl_multi_exec( $mh, $running );
69
+ } while ($running > 0);
70
+
 
71
  // get content and remove handles
72
+ foreach ( $curly as $id => $c ) {
73
+ $result[ $id ] = curl_multi_getcontent( $c );
74
+ curl_multi_remove_handle( $mh, $c );
75
+ }
76
+
77
  // all done
78
+ curl_multi_close( $mh );
79
+
80
  return $result;
81
+ }
82
 
83
+ function swp_file_get_contents_curl( $url ) {
84
+ $ch = curl_init();
85
+ curl_setopt( $ch, CURLOPT_URL, $url );
86
+ curl_setopt( $ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT'] );
87
+ curl_setopt( $ch, CURLOPT_FAILONERROR, 0 );
88
+ curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 0 );
89
+ curl_setopt( $ch, CURLOPT_RETURNTRANSFER,1 );
90
+ curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
91
+ curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, false );
92
+ curl_setopt( $ch, CURLOPT_TIMEOUT, 5 );
93
+ curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 5 );
94
+ curl_setopt( $ch, CURLOPT_NOSIGNAL, 1 );
95
+ curl_setopt( $ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
96
+ $cont = @curl_exec( $ch );
97
+ $curl_errno = curl_errno( $ch );
98
+ curl_close( $ch );
99
+ if ( $curl_errno > 0 ) {
100
+ return 0;
 
 
101
  }
102
+ return $cont;
103
+ }
functions/deprecated.php ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Depreacted functions which should no longer be used and will be removed in
4
+ * a later release.
5
+ *
6
+ * @package SocialWarfare\Functions
7
+ * @copyright Copyright (c) 2016, Warfare Plugins, LLC
8
+ * @license GPL-3.0+
9
+ * @since 2.1.0
10
+ */
11
+
12
+ /**
13
+ * Deprecated function. Was originally used to pass variables to the Pinterest
14
+ * button script.
15
+ *
16
+ * @since unknown
17
+ * @access public
18
+ * @param array $info An array of footer script information.
19
+ * @return array $info A modified array of footer script information.
20
+ */
21
+ function swp_pinit( $info ) {
22
+ _deprecated_function( 'swp_pinit', '2.1.0' );
23
+
24
+ return $info;
25
+ }
26
+
27
+ /**
28
+ * A Function to store the registration code
29
+ *
30
+ * @return void
31
+ */
32
+ function swp_store_the_registration() {
33
+ _deprecated_function( 'swp_store_the_registration', '2.1.0' );
34
+ }
35
+
36
+ /**
37
+ * A Function to delete the registration code
38
+ *
39
+ * @return void
40
+ */
41
+ function swp_delete_the_registration() {
42
+ _deprecated_function( 'swp_delete_the_registration', '2.1.0' );
43
+ }
44
+
45
+ /**
46
+ * Unused admin notice.
47
+ *
48
+ * @return void
49
+ */
50
+ function swp_admin_notice() {
51
+ _deprecated_function( 'swp_admin_notice', '2.1.0' );
52
+
53
+ if ( ! is_swp_registered() ) {
54
+ echo '<div class="notice is-dismissable swp_register_admin_notice"><p>Your copy of Social Warfare is not registered. Navigate to the <a href="/wp-admin/admin.php?page=social-warfare"><b>Social Warfare Settings Page</b></a> and select the "Register" tab to register now! You can view and manage your purchased licences on the <a target="_blank" href="https://warfareplugins.com/my-account/">My Account</a> page of the Warfare Plugins website. If you have any issues, please contact us and we\'ll be happy to help.</p></div>';
55
+ }
56
+ }
57
+
58
+ /**
59
+ * English
60
+ *
61
+ * @param array $language Deprecated language settings.
62
+ * @return array $language
63
+ */
64
+ function swp_en_language( $language ) {
65
+ _deprecated_function( 'swp_en_language', '2.1.0' );
66
+ return $language;
67
+ }
68
+
69
+
70
+ /**
71
+ * German
72
+ *
73
+ * @param array $language Deprecated language settings.
74
+ * @return array $language
75
+ */
76
+ function swp_de_language( $language ) {
77
+ _deprecated_function( 'swp_de_language', '2.1.0' );
78
+ return $language;
79
+ }
80
+
81
+ /**
82
+ * Russian
83
+ *
84
+ * @param array $language Deprecated language settings.
85
+ * @return array $language
86
+ */
87
+ function swp_ru_language( $language ) {
88
+ _deprecated_function( 'swp_ru_language', '2.1.0' );
89
+ return $language;
90
+ }
91
+
92
+ /**
93
+ * Ukrainian
94
+ *
95
+ * @param array $language Deprecated language settings.
96
+ * @return array $language
97
+ */
98
+ function swp_uk_language( $language ) {
99
+ _deprecated_function( 'swp_uk_language', '2.1.0' );
100
+ return $language;
101
+ }
102
+
103
+ /**
104
+ * Dutch
105
+ *
106
+ * @param array $language Deprecated language settings.
107
+ * @return array $language
108
+ */
109
+ function swp_nl_language( $language ) {
110
+ _deprecated_function( 'swp_nl_language', '2.1.0' );
111
+ return $language;
112
+ }
113
+
114
+ /**
115
+ * French
116
+ *
117
+ * @param array $language Deprecated language settings.
118
+ * @return array $language
119
+ */
120
+ function swp_fr_language( $language ) {
121
+ _deprecated_function( 'swp_fr_language', '2.1.0' );
122
+ return $language;
123
+ }
124
+
125
+ /**
126
+ * Portuguese
127
+ *
128
+ * @param array $language Deprecated language settings.
129
+ * @return array $language
130
+ */
131
+ function swp_pt_language( $language ) {
132
+ _deprecated_function( 'swp_pt_language', '2.1.0' );
133
+ return $language;
134
+ }
135
+
136
+ /**
137
+ * Danish
138
+ *
139
+ * @param array $language Deprecated language settings.
140
+ * @return array $language
141
+ */
142
+ function swp_da_language( $language ) {
143
+ _deprecated_function( 'swp_da_language', '2.1.0' );
144
+ return $language;
145
+ }
146
+
147
+ /**
148
+ * Italian
149
+ *
150
+ * @param array $language Deprecated language settings.
151
+ * @return array $language
152
+ */
153
+ function swp_it_language( $language ) {
154
+ _deprecated_function( 'swp_it_language', '2.1.0' );
155
+ return $language;
156
+ }
functions/display.php ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Functions to load the front end display for the plugin.
4
+ *
5
+ * @package SocialWarfare\Functions
6
+ * @copyright Copyright (c) 2016, Warfare Plugins, LLC
7
+ * @license GPL-3.0+
8
+ * @since 1.0.0
9
+ */
10
+
11
+ /**
12
+ * A global for storing post ID's to prevent duplicate processing on the same posts
13
+ * @since 2.1.4
14
+ * @var array $swp_already_print Array of post ID's that have been processed during this pageload.
15
+ */
16
+ global $swp_already_print;
17
+ $swp_already_print = array();
18
+
19
+ /**
20
+ * A function to add the buttons
21
+ *
22
+ * @since 2.1.4
23
+ * @param none
24
+ * @return none
25
+ */
26
+ function swp_activate_buttons() {
27
+
28
+ // Fetch the user's settings
29
+ global $swp_user_options;
30
+
31
+ // Only hook into the_content filter if we're is_singular() is true or they don't use excerpts
32
+ if( true === is_singular() || true === $swp_user_options['full_content'] ):
33
+ add_filter( 'the_content','social_warfare_wrapper', 10 );
34
+ endif;
35
+
36
+ // Add the buttons to the excerpts
37
+ add_filter( 'the_excerpt','social_warfare_wrapper' );
38
+
39
+ }
40
+
41
+ // Hook into the template_redirect so that is_singular() conditionals will be ready
42
+ add_action('template_redirect', 'swp_activate_buttons');
43
+
44
+
45
+ /**
46
+ * A wrapper function for adding the buttons the content or excerpt.
47
+ *
48
+ * @since 1.0.0
49
+ * @param string $content The content.
50
+ * @return String $content The modified content
51
+ */
52
+ function social_warfare_wrapper( $content ) {
53
+
54
+ // Fetch our global variables to ensure we haven't already processed this post
55
+ global $post, $swp_already_print;
56
+ $post_id = $post->ID;
57
+
58
+ // Check if it's already been processed
59
+ if( in_array( $post_id, $swp_already_print) ){
60
+ return $content;
61
+ }
62
+
63
+ // Ensure it's not an embedded post
64
+ if(true === is_singular() && $post_id != get_queried_object_id()) {
65
+ return $content;
66
+ }
67
+
68
+ // Pass the content (in an array) into the buttons function to add the buttons
69
+ $array['content'] = $content;
70
+ $content = social_warfare_buttons( $array );
71
+
72
+ // Add an invisible div to the content so the image hover pin button finds the content container area
73
+ if( false === is_admin() ):
74
+ $content .= '<div class="swp-content-locator"></div>';
75
+ endif;
76
+
77
+ return $content;
78
+ }
79
+
80
+ /**
81
+ * The main social_warfare function used to create the buttons.
82
+ *
83
+ * @since 1.4.0
84
+ * @param array $array An array of options and information to pass into the buttons function.
85
+ * @return string $content The modified content
86
+ */
87
+ function social_warfare( $array = array() ) {
88
+ $array['devs'] = true;
89
+ $content = social_warfare_buttons( $array );
90
+ if( false === is_admin() ):
91
+ $content .= '<div class="swp-content-locator"></div>';
92
+ endif;
93
+ return $content;
94
+ }
95
+
96
+ /**
97
+ * Add the side floating buttons to the footer if they are activated
98
+ *
99
+ * @since 1.4.0
100
+ */
101
+ if ( in_array( $swp_user_options['floatOption'], array( 'left', 'right' ), true ) ) {
102
+ add_action( 'wp_footer', 'socialWarfareSideFloat' );
103
+ }
functions/excerpt.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
-
3
- /*****************************************************************
4
- * *
5
- * AN EXCERPT FUNCTION *
6
- * *
7
- ******************************************************************/
8
-
9
- // A function to process the excerpts for descriptions
10
- function swp_get_excerpt_by_id($post_id){
11
-
12
- // Check if the post has an excerpt
13
- if(has_excerpt()):
14
- $the_post = get_post($post_id); //Gets post ID
15
- $the_excerpt = $the_post->post_excerpt;
16
-
17
- // If not, let's create an excerpt
18
- else:
19
- $the_post = get_post($post_id); //Gets post ID
20
- $the_excerpt = $the_post->post_content; //Gets post_content to be used as a basis for the excerpt
21
- endif;
22
-
23
- $excerpt_length = 100; //Sets excerpt length by word count
24
- $the_excerpt = strip_tags(strip_shortcodes($the_excerpt)); //Strips tags and images
25
-
26
- $the_excerpt = str_replace(']]>', ']]&gt;', $the_excerpt);
27
- $the_excerpt = strip_tags($the_excerpt);
28
- $excerpt_length = apply_filters('excerpt_length', 100);
29
- $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');
30
- $words = preg_split("/[\n\r\t ]+/", $the_excerpt, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);
31
-
32
- if(count($words) > $excerpt_length) :
33
- array_pop($words);
34
- // array_push($words, '…');
35
- $the_excerpt = implode(' ', $words);
36
- endif;
37
-
38
- $the_excerpt = preg_replace( "/\r|\n/", "", $the_excerpt );
39
-
40
- return $the_excerpt;
41
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/header-meta-tags.php CHANGED
@@ -1,738 +1,96 @@
1
  <?php
2
-
3
- // Queue up our hook function
4
- add_action( 'wp_head' , 'swp_add_header_meta' , 1 );
5
-
6
- /*****************************************************************
7
- * *
8
- * Curly Quote Converter *
9
- * *
10
- ******************************************************************/
11
- function convert_smart_quotes($content) {
12
- $content = str_replace('"', '\'', $content);
13
- $content = str_replace('&#8220;', '\'', $content);
14
- $content = str_replace('&#8221;', '\'', $content);
15
- $content = str_replace('&#8216;', '\'', $content);
16
- $content = str_replace('&#8217;', '\'', $content);
17
- return $content;
18
- }
19
- /*****************************************************************
20
- * *
21
- * Easy Hook Remover *
22
- * *
23
- ******************************************************************/
24
- function swp_remove_filter($hook_name = '', $method_name = '', $priority = 0 ) {
25
- global $wp_filter;
26
-
27
- // Take only filters on right hook name and priority
28
- if ( !isset($wp_filter[$hook_name][$priority]) || !is_array($wp_filter[$hook_name][$priority]) )
29
- return false;
30
-
31
- // Loop on filters registered
32
- foreach( (array) $wp_filter[$hook_name][$priority] as $unique_id => $filter_array ) {
33
- // Test if filter is an array ! (always for class/method)
34
- if ( isset($filter_array['function']) && is_array($filter_array['function']) ) {
35
- // Test if object is a class and method is equal to param !
36
- if ( is_object($filter_array['function'][0]) && get_class($filter_array['function'][0]) && $filter_array['function'][1] == $method_name ) {
37
- unset($wp_filter[$hook_name][$priority][$unique_id]);
38
- }
39
- }
40
-
41
- }
42
-
43
- return false;
44
- }
45
-
46
- /*****************************************************************
47
- * *
48
- * HEADER META DATA *
49
- * *
50
- ******************************************************************/
51
-
52
- // This is the hook function we're adding the header
53
- function swp_add_header_meta() {
54
-
55
- $info['postID'] = get_the_ID();
56
-
57
- // Cache some resource for fewer queries on subsequent page loads
58
- if(swp_is_cache_fresh($info['postID'] , true) == false):
59
-
60
- // Check if an image ID has been provided
61
- $info['imageID'] = get_post_meta( $info['postID'] , 'nc_ogImage' , true );
62
- if($info['imageID']):
63
-
64
- // Cache the image URL
65
- $info['imageURL'] = wp_get_attachment_url( $info['imageID'] );
66
- delete_post_meta($info['postID'],'swp_open_graph_image_url');
67
- update_post_meta($info['postID'],'swp_open_graph_image_url',$info['imageURL']);
68
-
69
- // Cache the height and width
70
- $info['image_data'] = wp_get_attachment_image_src( $info['imageID'] , 'full' );
71
- delete_post_meta($info['postID'],'swp_open_graph_image_data');
72
- update_post_meta($info['postID'],'swp_open_graph_image_data',json_encode($info['image_data']));
73
-
74
- else:
75
- $info['imageURL'] = wp_get_attachment_url( get_post_thumbnail_id( $info['postID'] ) );
76
- delete_post_meta($info['postID'],'swp_open_thumbnail_url');
77
- update_post_meta($info['postID'],'swp_open_thumbnail_url' , $info['imageURL']);
78
- delete_post_meta($info['postID'],'swp_open_graph_image_url');
79
-
80
- // Cache the height and width
81
- $info['image_data'] = wp_get_attachment_image_src( get_post_thumbnail_id( $info['postID'] ) , 'full' );
82
- delete_post_meta($info['postID'],'swp_open_graph_image_data');
83
- update_post_meta($info['postID'],'swp_open_graph_image_data',json_encode($info['image_data']));
84
- endif;
85
-
86
- // Cache the Twitter Handle
87
- $user_twitter_handle = get_the_author_meta( 'swp_twitter' , swp_get_author($info['postID']));
88
- if($user_twitter_handle):
89
- delete_post_meta($info['postID'],'swp_twitter_username');
90
- update_post_meta($info['postID'],'swp_twitter_username',$user_twitter_handle);
91
- else:
92
- delete_post_meta($info['postID'],'swp_twitter_username');
93
- endif;
94
-
95
- else:
96
-
97
- // Check if we have a cached Open Graph Image URL
98
- $info['imageURL'] = get_post_meta( $info['postID'] , 'swp_open_graph_image_url' , true );
99
-
100
- // If not, let's check to see if we have an ID to generate one
101
- if(!$info['imageURL']):
102
-
103
- // Check for an Open Graph Image ID
104
- $info['imageID'] = get_post_meta( $info['postID'] , 'nc_ogImage' , true );
105
- if($info['imageID']):
106
-
107
- // If we find one, let's convert it to a link and cache it for next time
108
- $info['imageURL'] = wp_get_attachment_url( $info['imageID'] );
109
- delete_post_meta($info['postID'],'swp_open_graph_image_url');
110
- update_post_meta($info['postID'],'swp_open_graph_image_url',$info['imageURL']);
111
-
112
- else:
113
-
114
- // If we don't find one, let's save the URL of the thumbnail in case we need it
115
- $thumbnail_image = get_post_meta($info['postID'],'swp_open_thumbnail_url' , true);
116
- endif;
117
- endif;
118
-
119
-
120
- $user_twitter_handle = get_post_meta( $info['postID'] , 'swp_twitter_username' , true );
121
-
122
- endif;
123
-
124
- // Create the image Open Graph Meta Tag
125
- $info['postID'] = get_the_ID();
126
- $info['title'] = htmlspecialchars( get_post_meta( $info['postID'] , 'nc_ogTitle' , true ) );
127
- $info['description'] = htmlspecialchars( get_post_meta( $info['postID'] , 'nc_ogDescription' , true ) );
128
- $info['swp_fb_author'] = htmlspecialchars( get_post_meta( $info['postID'] , 'swp_fb_author' , true ) );
129
- $info['swp_user_options'] = swp_get_user_options();
130
- $info['user_twitter_handle'] = $user_twitter_handle;
131
- $info['header_output'] = '';
132
-
133
- $info = apply_filters( 'swp_meta_tags' , $info );
134
-
135
- if($info['header_output']):
136
- echo PHP_EOL .'<!-- Open Graph Meta Tags & Twitter Card generated by Social Warfare v'.swp_VERSION.' http://warfareplugins.com -->';
137
- echo $info['header_output'];
138
- echo PHP_EOL .'<!-- Open Graph Meta Tags & Twitter Card generated by Social Warfare v'.swp_VERSION.' http://warfareplugins.com -->'. PHP_EOL . PHP_EOL;
139
- endif;
140
- }
141
-
142
- /*****************************************************************
143
- * *
144
- * Queue Up our Open Graph Hooks *
145
- * *
146
- ******************************************************************/
147
-
148
- // Queue up our header hook function
149
- if( is_swp_registered() ):
150
- add_filter( 'swp_meta_tags' , 'swp_open_graph_tags' , 1 );
151
- add_filter( 'swp_meta_tags' , 'swp_add_twitter_card' , 2 );
152
- endif;
153
- add_filter( 'swp_meta_tags' , 'swp_frame_buster' , 3 );
154
- add_filter( 'swp_meta_tags' , 'swp_output_custom_color' , 4 );
155
- add_filter( 'swp_meta_tags' , 'swp_output_font_css' , 5 );
156
- // add_filter( 'swp_meta_tags' , 'swp_output_cache_trigger' , 6 );
157
- add_filter( 'swp_meta_tags' , 'swp_cache_rebuild_rel_canonical' , 7 );
158
- add_action( 'admin_head' , 'swp_output_font_css' , 10);
159
-
160
- // Disable Simple Podcast Press Open Graph tags
161
- if ( is_plugin_active( 'simple-podcast-press/simple-podcast-press.php' ) ) {
162
- global $ob_wp_simplepodcastpress;
163
- remove_action( 'wp_head' , array( $ob_wp_simplepodcastpress , 'spp_open_graph') , 1);
164
- }
165
-
166
- /*****************************************************************
167
- * *
168
- * Open Graph Tags *
169
- * *
170
- * Dev Notes: If the user specifies an Open Graph tag, *
171
- * we're going to develop a complete set of tags. Order *
172
- * of preference for each tag is as follows: *
173
- * 1. Did they fill out our open graph field? *
174
- * 2. Did they fill out Yoast's social field? *
175
- * 3. Did they fill out Yoast's SEO field? *
176
- * 4. We'll just auto-generate the field from the post. *
177
- ******************************************************************/
178
-
179
- function swp_open_graph_tags($info) {
180
-
181
- // We only modify the Open Graph tags on single blog post pages
182
- if(is_singular()):
183
-
184
- // If Yoast Open Graph is activated, we only output Open Graph tags if the user has filled out at least one field
185
- // Then we'll work along with Yoast to make sure all fields get filled properly
186
- if(defined('WPSEO_VERSION')):
187
- global $wpseo_og;
188
- $yoast_og_setting = has_action( 'wpseo_head', array( $wpseo_og, 'opengraph' ));
189
- else:
190
- $yoast_og_setting = false;
191
- endif;
192
-
193
- if(
194
- (isset($info['title']) && $info['title']) ||
195
- (isset($info['description']) && $info['description']) ||
196
- (isset($info['imageURL']) && $info['imageURL']) ||
197
- !$yoast_og_setting
198
- ):
199
-
200
- /*****************************************************************
201
- * *
202
- * YOAST SEO: It rocks, so let's coordinate with it *
203
- * *
204
- ******************************************************************/
205
-
206
- // Check if Yoast Exists so we can coordinate output with their plugin accordingly
207
- if (defined('WPSEO_VERSION')):
208
-
209
- // Collect their Social Descriptions as backups if they're not defined in ours
210
- $yoast_og_title = get_post_meta( $info['postID'] , '_yoast_wpseo_opengraph-title' , true );
211
- $yoast_og_description = get_post_meta( $info['postID'] , '_yoast_wpseo_opengraph-description' , true );
212
- $yoast_og_image = get_post_meta( $info['postID'] , '_yoast_wpseo_opengraph-image' , true );
213
-
214
- // Collect their SEO fields as 3rd string backups in case we need them
215
- $yoast_seo_title = get_post_meta( $info['postID'] , '_yoast_wpseo_title' , true );
216
- $yoast_seo_description = get_post_meta( $info['postID'] , '_yoast_wpseo_metadesc' , true );
217
-
218
- // Cancel their output if ours have been defined so we don't have two sets of tags
219
- global $wpseo_og;
220
- remove_action( 'wpseo_head', array( $wpseo_og, 'opengraph' ), 30 );
221
-
222
- // Fetch the WPSEO_SOCIAL Values
223
- $wpseo_social = get_option( 'wpseo_social' );
224
-
225
- endif;
226
-
227
- // Add all our Open Graph Tags to the Return Header Output
228
- $info['header_output'] .= PHP_EOL .'<meta property="og:type" content="article" /> ';
229
-
230
- /*****************************************************************
231
- * *
232
- * JETPACK: If ours are enabled, disable theirs *
233
- * *
234
- ******************************************************************/
235
-
236
- if ( class_exists( 'JetPack' ) ) :
237
- add_filter( 'jetpack_enable_opengraph', '__return_false', 99 );
238
- add_filter( 'jetpack_enable_open_graph', '__return_false', 99 );
239
- endif;
240
-
241
- /*****************************************************************
242
- * *
243
- * OPEN GRAPH TITLE *
244
- * *
245
- ******************************************************************/
246
-
247
- // Open Graph Title: Create an open graph title meta tag
248
- if($info['title']):
249
-
250
- // If the user defined an social media title, let's use it.
251
- $info['header_output'] .= PHP_EOL .'<meta property="og:title" content="'.$info['title'].'" />';
252
-
253
- elseif(isset($yoast_og_title) && $yoast_og_title):
254
-
255
- // If the user defined an title over in Yoast, let's use it.
256
- $info['header_output'] .= PHP_EOL .'<meta property="og:title" content="'.trim($yoast_og_title).'" />';
257
-
258
- elseif(isset($yoast_seo_title) && $yoast_seo_title):
259
-
260
- // If the user defined an title over in Yoast, let's use it.
261
- $info['header_output'] .= PHP_EOL .'<meta property="og:title" content="'.trim($yoast_seo_title).'" />';
262
-
263
- else:
264
-
265
- // If nothing else is defined, let's use the post title
266
- $info['header_output'] .= PHP_EOL .'<meta property="og:title" content="'.trim(convert_smart_quotes(htmlspecialchars_decode(get_the_title()))).'" />';
267
-
268
- endif;
269
-
270
- /*****************************************************************
271
- * *
272
- * OPEN GRAPH DESCRIPTION *
273
- * *
274
- ******************************************************************/
275
-
276
- // Open Graph Description: Create an open graph description meta tag
277
- if($info['description']):
278
-
279
- // If the user defined an social media description, let's use it.
280
- $info['header_output'] .= PHP_EOL .'<meta property="og:description" content="'.$info['description'].'" />';
281
-
282
- elseif(isset($yoast_og_description) && $yoast_og_description):
283
-
284
- // If the user defined an description over in Yoast, let's use it.
285
- $info['header_output'] .= PHP_EOL .'<meta property="og:description" content="'.$yoast_og_description.'" />';
286
-
287
- elseif(isset($yoast_seo_description) && $yoast_seo_description):
288
-
289
- // If the user defined an description over in Yoast, let's use it.
290
- $info['header_output'] .= PHP_EOL .'<meta property="og:description" content="'.$yoast_seo_description.'" />';
291
-
292
- else:
293
-
294
- // If nothing else is defined, let's use the post excerpt
295
- $info['header_output'] .= PHP_EOL .'<meta property="og:description" content="'.convert_smart_quotes(htmlspecialchars_decode(swp_get_excerpt_by_id($info['postID']))).'" />';
296
-
297
- endif;
298
-
299
- /*****************************************************************
300
- * *
301
- * OPEN GRAPH IMAGE *
302
- * *
303
- ******************************************************************/
304
-
305
- // Open Graph Image: Create an open graph image meta tag
306
- if($info['imageURL']):
307
-
308
- // If the user defined an image, let's use it.
309
- $info['header_output'] .= PHP_EOL .'<meta property="og:image" content="'.$info['imageURL'].'" />';
310
-
311
- elseif(isset($yoast_og_image) && $yoast_og_image):
312
-
313
- // If the user defined an image over in Yoast, let's use it.
314
- $info['header_output'] .= PHP_EOL .'<meta property="og:image" content="'.$yoast_og_image.'" />';
315
-
316
- else:
317
-
318
- // If nothing else is defined, let's use the post Thumbnail as long as we have the URL cached
319
- $og_image = get_post_meta( $info['postID'] , 'swp_open_thumbnail_url' , true );
320
- if($og_image):
321
- $info['header_output'] .= PHP_EOL .'<meta property="og:image" content="'.$og_image.'" />';
322
- endif;
323
-
324
- endif;
325
- /*****************************************************************
326
- * *
327
- * OPEN GRAPH IMAGE DIMENSIONS *
328
- * *
329
- ******************************************************************/
330
- if($info['image_data']):
331
-
332
- $info['header_output'] .= PHP_EOL .'<meta property="og:image:width" content="'.$info['image_data'][1].'" />';
333
- $info['header_output'] .= PHP_EOL .'<meta property="og:image:height" content="'.$info['image_data'][2].'" />';
334
-
335
- elseif(get_post_meta( $info['postID'] , 'swp_open_graph_image_data' , true )):
336
-
337
- $info['image_data'] = json_decode(get_post_meta( $info['postID'] , 'swp_open_graph_image_data' , true ));
338
- $info['header_output'] .= PHP_EOL .'<meta property="og:image:width" content="'.$info['image_data'][1].'" />';
339
- $info['header_output'] .= PHP_EOL .'<meta property="og:image:height" content="'.$info['image_data'][2].'" />';
340
-
341
- endif;
342
- /*****************************************************************
343
- * *
344
- * OPEN GRAPH URL & Site Name *
345
- * *
346
- ******************************************************************/
347
-
348
- $info['header_output'] .= PHP_EOL .'<meta property="og:url" content="'.get_permalink().'" />';
349
- $info['header_output'] .= PHP_EOL .'<meta property="og:site_name" content="'.get_bloginfo('name').'" />';
350
-
351
- /*****************************************************************
352
- * *
353
- * OPEN GRAPH AUTHOR *
354
- * *
355
- ******************************************************************/
356
-
357
- // Add the Facebook Author URL
358
- if( get_the_author_meta ( 'swp_fb_author' , swp_get_author($info['postID'])) ):
359
-
360
- // Output the Facebook Author URL
361
- $facebook_author = get_the_author_meta ( 'swp_fb_author' , swp_get_author($info['postID']));
362
- $info['header_output'] .= PHP_EOL .'<meta property="article:author" content="'.$facebook_author.'" />';
363
-
364
- elseif( get_the_author_meta ( 'facebook' , swp_get_author($info['postID'])) && defined('WPSEO_VERSION')):
365
-
366
- // Output the Facebook Author URL
367
- $facebook_author = get_the_author_meta ( 'facebook' , swp_get_author($info['postID']));
368
- $info['header_output'] .= PHP_EOL .'<meta property="article:author" content="'.$facebook_author.'" />';
369
-
370
- endif;
371
-
372
- /*****************************************************************
373
- * *
374
- * OPEN GRAPH PUBLISHER *
375
- * *
376
- ******************************************************************/
377
-
378
- // If they have a Facebook Publisher URL in our settings...
379
- if(isset($info['swp_user_options']['facebookPublisherUrl']) && $info['swp_user_options']['facebookPublisherUrl'] != ''):
380
-
381
- // Output the Publisher URL
382
- $info['header_output'] .= PHP_EOL .'<meta property="article:publisher" content="'.$info['swp_user_options']['facebookPublisherUrl'].'" />';
383
-
384
- // If they have a Facebook Publisher URL in Yoast's settings...
385
- elseif(isset($wpseo_social) && isset($wpseo_social['facebook_site']) && $wpseo_social['facebook_site'] != ''):
386
-
387
- // Output the Publisher URL
388
- $info['header_output'] .= PHP_EOL .'<meta property="article:publisher" content="'.$wpseo_social['facebook_site'].'" />';
389
- endif;
390
-
391
- $info['header_output'] .= PHP_EOL .'<meta property="article:published_time" content="'.get_post_time('c').'" />';
392
- $info['header_output'] .= PHP_EOL .'<meta property="article:modified_time" content="'.get_post_modified_time('c').'" />';
393
- $info['header_output'] .= PHP_EOL .'<meta property="og:updated_time" content="'.get_post_modified_time('c').'" />';
394
-
395
- /*****************************************************************
396
- * *
397
- * OPEN GRAPH APP ID *
398
- * *
399
- ******************************************************************/
400
-
401
- // If the Facebook APP ID is in our settings...
402
- if(isset($info['swp_user_options']['facebookAppID']) && $info['swp_user_options']['facebookAppID'] != ''):
403
-
404
- // Output the Facebook APP ID
405
- $info['header_output'] .= PHP_EOL .'<meta property="fb:app_id" content="'.$info['swp_user_options']['facebookAppID'].'" />';
406
-
407
- // If the Facebook APP ID is set in Yoast's settings...
408
- elseif(isset($wpseo_social) && isset($wpseo_social['fbadminapp']) && $wpseo_social['fbadminapp'] != ''):
409
-
410
- // Output the Facebook APP ID
411
- $info['header_output'] .= PHP_EOL .'<meta property="fb:app_id" content="'.$wpseo_social['fbadminapp'].'" />';
412
-
413
- else:
414
-
415
- // Output the Facebook APP ID
416
- $info['header_output'] .= PHP_EOL .'<meta property="fb:app_id" content="529576650555031" />';
417
-
418
- endif;
419
-
420
- endif;
421
- endif;
422
-
423
- // Return the variable containing our information for the meta tags
424
- return $info;
425
-
426
- }
427
-
428
- /*****************************************************************
429
- * *
430
- * TWITTER CARDS *
431
- * *
432
- * Dev Notes: If the user has Twitter cards turned on, we *
433
- * need to generate them, but we also like Yoast so we'll *
434
- * pay attention to their settings as well. Here's the order *
435
- * of preference for each field: *
436
- * 1. Did the user fill out the Social Media field? *
437
- * 2. Did the user fill out the Yoast Twitter Field? *
438
- * 3. Did the user fill out the Yoast SEO field? *
439
- * 4. We'll auto generate something logical from the post. *
440
- * *
441
- ******************************************************************/
442
-
443
- function swp_add_twitter_card($info) {
444
- if(is_singular()):
445
- // Check if Twitter Cards are Activated
446
- if($info['swp_user_options']['swp_twitter_card']):
447
-
448
- /*****************************************************************
449
- * *
450
- * YOAST SEO: It rocks, so let's coordinate with it *
451
- * *
452
- ******************************************************************/
453
-
454
- // Check if Yoast Exists so we can coordinate output with their plugin accordingly
455
- if (defined('WPSEO_VERSION')):
456
-
457
- // Collect their Social Descriptions as backups if they're not defined in ours
458
- $yoast_twitter_title = get_post_meta( $info['postID'] , '_yoast_wpseo_twitter-title' , true );
459
- $yoast_twitter_description = get_post_meta( $info['postID'] , '_yoast_wpseo_twitter-description' , true );
460
- $yoast_twitter_image = get_post_meta( $info['postID'] , '_yoast_wpseo_twitter-image' , true );
461
-
462
- // Collect their SEO fields as 3rd string backups in case we need them
463
- $yoast_seo_title = get_post_meta( $info['postID'] , '_yoast_wpseo_title' , true );
464
- $yoast_seo_description = get_post_meta( $info['postID'] , '_yoast_wpseo_metadesc' , true );
465
-
466
- // Cancel their output if ours have been defined so we don't have two sets of tags
467
- remove_action( 'wpseo_head' , array( 'WPSEO_Twitter' , 'get_instance' ) , 40 );
468
-
469
- endif;
470
-
471
- /*****************************************************************
472
- * *
473
- * JET PACK: If ours are activated, disable theirs *
474
- * *
475
- ******************************************************************/
476
-
477
- if ( class_exists( 'JetPack' ) ) :
478
-
479
- add_filter( 'jetpack_disable_twitter_cards', '__return_true', 99 );
480
-
481
- endif;
482
-
483
- /*****************************************************************
484
- * *
485
- * TWITTER TITLE *
486
- * *
487
- ******************************************************************/
488
-
489
- // If the user defined a Social Media title, use it, otherwise check for Yoast's
490
- if(!$info['title'] && isset($yoast_twitter_title) && $yoast_twitter_title):
491
-
492
- $info['title'] = $yoast_twitter_title;
493
-
494
- // If not title has been defined, let's check the SEO description as a 3rd string option
495
- elseif(!$info['title'] && isset($yoast_seo_title) && $yoast_seo_title):
496
-
497
- $info['title'] = $yoast_seo_title;
498
-
499
- // If not title has been defined, let's use the post title
500
- elseif(!$info['title']):
501
-
502
- $info['title'] = convert_smart_quotes(htmlspecialchars_decode( get_the_title() ));
503
-
504
- endif;
505
-
506
- /*****************************************************************
507
- * *
508
- * TWITTER DESCRIPTION *
509
- * *
510
- ******************************************************************/
511
-
512
- // Open Graph Description
513
- if(!$info['description'] && isset($yoast_twitter_description) && $yoast_twitter_description):
514
-
515
- $info['description'] = $yoast_twitter_description;
516
-
517
- // If not title has been defined, let's check the SEO description as a 3rd string option
518
- elseif(!$info['description'] && isset($yoast_seo_description) && $yoast_seo_description):
519
-
520
- $info['description'] = $yoast_seo_description;
521
-
522
- // If not, then let's use the excerpt
523
- elseif(!$info['description']):
524
-
525
- $info['description'] = convert_smart_quotes(htmlspecialchars_decode( swp_get_excerpt_by_id( $info['postID'] )) );
526
-
527
- endif;
528
-
529
- /*****************************************************************
530
- * *
531
- * TWITTER IMAGE *
532
- * *
533
- ******************************************************************/
534
-
535
- // Open Graph Description
536
- if(!$info['imageURL'] && isset($yoast_twitter_image) && $yoast_twitter_image):
537
-
538
- $info['imageURL'] = $yoast_twitter_image;
539
-
540
- else:
541
-
542
- // If nothing else is defined, let's use the post Thumbnail as long as we have the URL cached
543
- $twitter_image = get_post_meta( $info['postID'] , 'swp_open_thumbnail_url' , true );
544
- if($twitter_image):
545
- $info['imageURL'] = $twitter_image;
546
- endif;
547
-
548
- endif;
549
-
550
- /*****************************************************************
551
- * *
552
- * PUT IT ALL TOGETHER *
553
- * *
554
- ******************************************************************/
555
-
556
- // Check if we have everything we need for a large image summary card
557
- if($info['imageURL']):
558
- $info['header_output'] .= PHP_EOL .'<meta name="twitter:card" content="summary_large_image">';
559
- $info['header_output'] .= PHP_EOL .'<meta name="twitter:title" content="'.trim($info['title']).'">';
560
- $info['header_output'] .= PHP_EOL .'<meta name="twitter:description" content="'.$info['description'].'">';
561
- $info['header_output'] .= PHP_EOL .'<meta name="twitter:image" content="'.$info['imageURL'].'">';
562
- if($info['swp_user_options']['twitterID']):
563
- $info['header_output'] .= PHP_EOL .'<meta name="twitter:site" content="@'.str_replace('@','',$info['swp_user_options']['twitterID']).'">';
564
- endif;
565
- if($info['user_twitter_handle']):
566
- $info['header_output'] .= PHP_EOL .'<meta name="twitter:creator" content="@'.str_replace('@','',$info['user_twitter_handle']).'">';
567
- endif;
568
-
569
- // Otherwise create a small summary card
570
- else:
571
- $info['header_output'] .= PHP_EOL .'<meta name="twitter:card" content="summary">';
572
- $info['header_output'] .= PHP_EOL .'<meta name="twitter:title" content="'.str_replace('"','\'',$info['title']).'">';
573
- $info['header_output'] .= PHP_EOL .'<meta name="twitter:description" content="'.str_replace('"','\'',$info['description']).'">';
574
- if($info['swp_user_options']['twitterID']):
575
- $info['header_output'] .= PHP_EOL .'<meta name="twitter:site" content="@'.str_replace('@','',$info['swp_user_options']['twitterID']).'">';
576
- endif;
577
- if($info['user_twitter_handle']):
578
- $info['header_output'] .= PHP_EOL .'<meta name="twitter:creator" content="@'.str_replace('@','',$info['user_twitter_handle']).'">';
579
- endif;
580
- endif;
581
-
582
- endif;
583
- endif;
584
- return $info;
585
- }
586
-
587
- /*****************************************************************
588
- * *
589
- * Frame Buster *
590
- * *
591
- ******************************************************************/
592
-
593
- function swp_frame_buster($info) {
594
- if($info['swp_user_options']['sniplyBuster'] == true):
595
- $info['header_output'] .= PHP_EOL.'<script type="text/javascript">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);};</script>';
596
- endif;
597
- return $info;
598
- }
599
-
600
- /*****************************************************************
601
- * *
602
- * CUSTOM COLORS *
603
- * *
604
- ******************************************************************/
605
-
606
- function swp_output_custom_color($info) {
607
- if($info['swp_user_options']['dColorSet'] == 'customColor' || $info['swp_user_options']['iColorSet'] == 'customColor' || $info['swp_user_options']['oColorSet'] == 'customColor'):
608
- $info['header_output'] .= PHP_EOL.'<style type="text/css">.nc_socialPanel.swp_d_customColor a, html body .nc_socialPanel.swp_i_customColor .nc_tweetContainer:hover a, body .nc_socialPanel.swp_o_customColor:hover a {color:white} .nc_socialPanel.swp_d_customColor .nc_tweetContainer, html body .nc_socialPanel.swp_i_customColor .nc_tweetContainer:hover, body .nc_socialPanel.swp_o_customColor:hover .nc_tweetContainer {background-color:'.$info['swp_user_options']['customColor'].';border:1px solid '.$info['swp_user_options']['customColor'].';} </style>';
609
- endif;
610
-
611
- if($info['swp_user_options']['dColorSet'] == 'ccOutlines' || $info['swp_user_options']['iColorSet'] == 'ccOutlines' || $info['swp_user_options']['oColorSet'] == 'ccOutlines'):
612
- $info['header_output'] .= PHP_EOL.'<style type="text/css">.nc_socialPanel.swp_d_ccOutlines a, html body .nc_socialPanel.swp_i_ccOutlines .nc_tweetContainer:hover a, body .nc_socialPanel.swp_o_ccOutlines:hover a { color:'.$info['swp_user_options']['customColor'].'; }
613
- .nc_socialPanel.swp_d_ccOutlines .nc_tweetContainer, html body .nc_socialPanel.swp_i_ccOutlines .nc_tweetContainer:hover, body .nc_socialPanel.swp_o_ccOutlines:hover .nc_tweetContainer { background:transparent; border:1px solid '.$info['swp_user_options']['customColor'].'; } </style>';
614
-
615
- endif;
616
- return $info;
617
- }
618
-
619
- /*****************************************************************
620
- * *
621
- * CACHE REBUILD REL CANONICAL *
622
- * *
623
- ******************************************************************/
624
- function swp_cache_rebuild_rel_canonical($info) {
625
-
626
- // Fetch the Permalink
627
- $url = get_permalink();
628
-
629
- // Check to see if the cache is currently being rebuilt
630
- if(isset($_GET['swp_cache']) && $_GET['swp_cache'] == 'rebuild'):
631
-
632
- // Use a rel canonical so everyone knows this is not a real page
633
- $info['header_output'] .= '<link rel="canonical" href="'.$url.'">';
634
  endif;
635
-
636
- // Return the array so the world doesn't explode
637
- return $info;
638
  }
639
- /*****************************************************************
640
- * *
641
- * ICON FONT CSS *
642
- * *
643
- ******************************************************************/
644
- function swp_output_font_css($info=array()) {
645
- if(is_admin()):
 
 
 
 
 
 
 
 
646
 
647
  // Echo it if we're using the Admin Head Hook
648
- echo '<style>@font-face {font-family: "sw-icon-font";src:url("'.swp_PLUGIN_DIR.'/fonts/sw-icon-font.eot?ver='.swp_VERSION.'");src:url("'.swp_PLUGIN_DIR.'/fonts/sw-icon-font.eot?ver='.swp_VERSION.'#iefix") format("embedded-opentype"),url("'.swp_PLUGIN_DIR.'/fonts/sw-icon-font.woff?ver='.swp_VERSION.'") format("woff"),
649
- url("'.swp_PLUGIN_DIR.'/fonts/sw-icon-font.ttf?ver='.swp_VERSION.'") format("truetype"),url("'.swp_PLUGIN_DIR.'/fonts/sw-icon-font.svg?ver='.swp_VERSION.'#1445203416") format("svg");font-weight: normal;font-style: normal;}</style>';
650
- else:
651
 
652
  // Add it to our array if we're using the frontend Head Hook
653
- $info['header_output'] .= PHP_EOL.'<style>@font-face {font-family: "sw-icon-font";src:url("'.swp_PLUGIN_DIR.'/fonts/sw-icon-font.eot?ver='.swp_VERSION.'");src:url("'.swp_PLUGIN_DIR.'/fonts/sw-icon-font.eot?ver='.swp_VERSION.'#iefix") format("embedded-opentype"),url("'.swp_PLUGIN_DIR.'/fonts/sw-icon-font.woff?ver='.swp_VERSION.'") format("woff"), url("'.swp_PLUGIN_DIR.'/fonts/sw-icon-font.ttf?ver='.swp_VERSION.'") format("truetype"),url("'.swp_PLUGIN_DIR.'/fonts/sw-icon-font.svg?ver='.swp_VERSION.'#1445203416") format("svg");font-weight: normal;font-style: normal;}</style>';
654
 
655
  return $info;
656
  endif;
657
  }
658
- /*****************************************************************
659
- * *
660
- * FOOTER HOOKS & SCRIPTS *
661
- * *
662
- ******************************************************************/
663
- // Queue up our hook function
664
- add_action( 'wp_footer' , 'swp_footer_functions' , 1 );
665
-
666
- // Queue up our footer hook function
667
- add_filter( 'swp_footer_scripts' , 'swp_output_cache_trigger' );
668
- add_filter( 'swp_footer_scripts' , 'swp_click_tracking' );
669
- add_filter( 'swp_footer_scripts' , 'swp_pinit' );
670
-
671
- function swp_footer_functions() {
672
-
673
- // Fetch a few variables
674
- $info['postID'] = get_the_ID();
675
- $info['swp_user_options'] = swp_get_user_options();
676
- $info['footer_output'] = '';
677
-
678
- // Pass the array through our custom filters
679
- $info = apply_filters( 'swp_footer_scripts' , $info );
680
-
681
- // If we have output, output it
682
- if($info['footer_output']):
683
- echo '<script type="text/javascript">';
684
- echo $info['footer_output'];
685
- echo '</script>';
686
- endif;
687
-
688
- }
689
-
690
- /*****************************************************************
691
- * *
692
- * PIN IMAGES VARIABLES *
693
- * *
694
- ******************************************************************/
695
- function swp_pinit($info) {
696
- if($info['swp_user_options']['pinit_toggle'] == true && is_swp_registered()):
697
- $info['footer_output'] .= 'swp_pinit=true; swp_pinit_h_location="'.$info['swp_user_options']['pinit_location_horizontal'].'"; swp_pinit_v_location="'.$info['swp_user_options']['pinit_location_vertical'].'"; sw_pinit_min_width='.str_replace('px','',$info['swp_user_options']['pinit_min_width']).'; sw_pinit_min_height='.str_replace('px','',$info['swp_user_options']['pinit_min_height']).';';
698
- else:
699
- $info['footer_output'] .= 'swp_pinit=false;';
700
- endif;
701
- return $info;
702
- }
703
-
704
- /*****************************************************************
705
- * *
706
- * CACHE REBUILD TRIGGER *
707
- * *
708
- ******************************************************************/
709
- function swp_output_cache_trigger($info) {
710
- // Check if we're on a single post page, the cache is expired, and they're using the updated cache rebuild method
711
- if(is_singular() && swp_is_cache_fresh( get_the_ID() , true ) == false && $info['swp_user_options']['cacheMethod'] != 'legacy'):
712
-
713
- // Make sure we're not on a WooCommerce Account Page
714
- if(is_plugin_active( 'woocommerce/woocommerce.php' ) && is_account_page()):
715
- return $info;
716
-
717
- // Trigger the cache rebuild
718
- else:
719
- $url = get_permalink();
720
- $admin_ajax = admin_url( 'admin-ajax.php' );
721
- $info['footer_output'] .= PHP_EOL.'var swp_buttons_exist = !!document.getElementsByClassName("nc_socialPanel");if(swp_buttons_exist) {jQuery(document).on( "ready" , function() { var swp_admin_ajax = "'.$admin_ajax.'";var swp_cache_data = {"action":"swp_cache_trigger","post_id":'.$info['postID'].'};jQuery.post(swp_admin_ajax, swp_cache_data, function(response) {console.log(response);});});}';
722
- endif;
723
- endif;
724
- // Return the array so the world doesn't explode
725
- return $info;
726
- }
727
- /*****************************************************************
728
- * *
729
- * Click Tracking *
730
- * *
731
- ******************************************************************/
732
- function swp_click_tracking($info) {
733
- $swp_options = swp_get_user_options();
734
- if( $swp_options['swp_click_tracking'] == 1 ):
735
- $info['footer_output'] .= 'if (typeof ga == "function") { jQuery(document).on("click",".nc_tweet",function(event) {var network = jQuery(this).parents(".nc_tweetContainer").attr("data-network");ga("send", "event", "social_media", "swp_" + network + "_share" );});}';
736
- endif;
737
- return $info;
738
- }
1
  <?php
2
+ /**
3
+ * Register and output open graph tags, Twitter cards, custom color CSS, and the icon fonts.
4
+ *
5
+ * @package SocialWarfare\Functions
6
+ * @copyright Copyright (c) 2016, Warfare Plugins, LLC
7
+ * @license GPL-3.0+
8
+ * @since 1.0.0
9
+ */
10
+
11
+ defined( 'WPINC' ) || die;
12
+
13
+ /**
14
+ * Queue up our hook function which will in turn call all of Social Warfare's custom hooks
15
+ */
16
+ add_action( 'wp_head' , 'swp_add_header_meta' , 1 );
17
+ add_filter( 'swp_header_html' , 'swp_output_font_css' , 20 );
18
+ add_action( 'admin_head' , 'swp_output_font_css' , 20 );
19
+
20
+ /**
21
+ * The function that we're hooking into the header
22
+ *
23
+ * All other items being added to the header will be hooked into
24
+ * swp_meta_tags which we will call and print via this function.
25
+ *
26
+ * @since 1.4.0
27
+ * @access public
28
+ * @param none
29
+ * @return none
30
+ */
31
+ function swp_add_header_meta() {
32
+
33
+ // Get the global options and the post ID
34
+ global $swp_user_options;
35
+ $info['postID'] = get_the_ID();
36
+ $info['html_output'] = '';
37
+
38
+ /**
39
+ * Create and return the values to be used in the header meta tags
40
+ *
41
+ * @since 2.1.4
42
+ * @access public
43
+ * @var array $info An array of information
44
+ * @return array $info The modified array with the 'meta_tag_values' index populated
45
+ */
46
+ $info = apply_filters( 'swp_header_values' , $info );
47
+
48
+ /**
49
+ * A filter to take the values from above and compile them into their html format
50
+ *
51
+ * This filter will take the values from $info['meta_tag_values'] and compile
52
+ * them into html stored in the $info['html_output'] index. This index will be
53
+ * a string that gets added to by each hook (.=), not an array.
54
+ *
55
+ * Note: Each meta tag should begin with PHP_EOL for clean structured HTML output
56
+ *
57
+ * @since 2.1.4
58
+ * @access public
59
+ * @var array $info An array of information
60
+ * @return array $info The modified array with the 'html_output' index populated.
61
+ */
62
+ $info = apply_filters( 'swp_header_html' , $info );
63
+
64
+ if ( $info['html_output'] ) :
65
+ echo PHP_EOL . '<!-- Social Warfare v' . SWP_VERSION . ' http://warfareplugins.com -->';
66
+ echo $info['html_output'];
67
+ echo PHP_EOL . '<!-- Social Warfare v' . SWP_VERSION . ' http://warfareplugins.com -->' . PHP_EOL . PHP_EOL;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  endif;
 
 
 
69
  }
70
+
71
+ /**
72
+ * Output the CSS to include the icon font.
73
+ *
74
+ * Note: This is done in the header rather than in a CSS file to
75
+ * avoid having the fonts called from a CDN, 95% of which do not
76
+ * support the necessary mime & cross-origin access types to deliver them.
77
+ *
78
+ * @since 1.0.0
79
+ * @access public
80
+ * @param array $info An array of information about the post
81
+ * @return array $info The modified array
82
+ */
83
+ function swp_output_font_css( $info = array() ) {
84
+ if ( is_admin() ) :
85
 
86
  // Echo it if we're using the Admin Head Hook
87
+ echo '<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"),
88
+ 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>';
89
+ else :
90
 
91
  // Add it to our array if we're using the frontend Head Hook
92
+ $info['html_output'] .= PHP_EOL . '<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"), 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>';
93
 
94
  return $info;
95
  endif;
96
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/kilomega.php DELETED
@@ -1,70 +0,0 @@
1
- <?php
2
-
3
- /*****************************************************************
4
- * *
5
- * ROUND TO THE APPROPRATE THOUSANDS *
6
- * *
7
- ******************************************************************/
8
- function swp_kilomega( $val ) {
9
-
10
- // Fetch the user assigned options
11
- $options = swp_get_user_options();
12
-
13
- // Check if we even have a value to format
14
- if($val):
15
-
16
- // Check if the value is less than 1,000....
17
- if( $val < 1000 ):
18
-
19
- // If less than 1,000 just format and kick it back
20
- return number_format($val);
21
-
22
- // Check if the value is greater than 1,000 and less than 1,000,000....
23
- elseif( $val < 1000000):
24
-
25
- // Start by deviding the value by 1,000
26
- $val = intval($val) / 1000;
27
-
28
- // If the decimal separator is a period
29
- if($options['swp_decimal_separator'] == 'period'):
30
-
31
- // Then format the number to the appropriate number of decimals
32
- return number_format($val,$options['swDecimals'],'.',',').'K';
33
-
34
- // If the decimal separator is a comma
35
- else:
36
-
37
- // Then format the number to the appropriate number of decimals
38
- return number_format($val,$options['swDecimals'],',','.').'K';
39
-
40
- endif;
41
-
42
- // Check if the value is greater than 1,000,000....
43
- else:
44
-
45
- // Start by deviding the value by 1,000,000
46
- $val = intval($val) / 1000000;
47
-
48
- // If the decimal separator is a period
49
- if($options['swp_decimal_separator'] == 'period'):
50
-
51
- // Then format the number to the appropriate number of decimals
52
- return number_format($val,$options['swDecimals'],'.',',').'M';
53
-
54
- // If the decimal separator is a comma
55
- else:
56
-
57
- // Then format the number to the appropriate number of decimals
58
- return number_format($val,$options['swDecimals'],',','.').'M';
59
-
60
- endif;
61
-
62
- endif;
63
-
64
- // If there is no value, return a zero
65
- else:
66
-
67
- return 0;
68
-
69
- endif;
70
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/languages.php CHANGED
@@ -1,216 +1,46 @@
1
  <?php
2
-
3
-
4
- /****************************************************************************************
5
- * *
6
- * Enqueue the Filters for the Available Languages *
7
- * *
8
- *****************************************************************************************/
9
-
10
- add_filter('swp_languages','swp_en_language',0);
11
-
12
- /****************************************************************************************
13
- * *
14
- * English *
15
- * *
16
- *****************************************************************************************/
17
-
18
- function swp_en_language($language) {
19
-
20
- $language['googlePlus'] = '+1';
21
- $language['twitter'] = 'Tweet';
22
- $language['facebook'] = 'Share';
23
- $language['pinterest'] = 'Pin';
24
- $language['linkedIn'] = 'Share';
25
- $language['tumblr'] = 'Share';
26
- $language['stumbleupon'] = 'Stumble';
27
- $language['reddit'] = 'Reddit';
28
- $language['email'] = 'Email';
29
- $language['yummly'] = 'Yum';
30
- $language['whatsapp'] = 'WhatsApp';
31
- $language['pocket'] = 'Pocket';
32
- $language['buffer'] = 'Buffer';
33
- $language['total'] = 'Shares';
34
-
35
- // Return the Languages Array or the world will explode
36
- return $language;
37
- }
38
-
39
-
40
- /****************************************************************************************
41
- * *
42
- * German *
43
- * *
44
- *****************************************************************************************/
45
-
46
- // Add the terms to the buttons
47
- add_filter('swp_languages','swp_de_language');
48
- function swp_de_language($language) {
49
- if(swp_get_single_option('language') == 'de'):
50
- $language['googlePlus'] = '+1';
51
- $language['twitter'] = 'Twittern';
52
- $language['facebook'] = 'Teilen';
53
- $language['pinterest'] = 'Pin';
54
- $language['linkedIn'] = 'Teilen';
55
- $language['total'] = 'Alle Shares';
56
- endif;
57
- return $language;
58
  }
59
-
60
- /****************************************************************************************
61
- * *
62
- * Russian *
63
- * *
64
- *****************************************************************************************/
65
-
66
- // Add the terms to the buttons
67
- add_filter('swp_languages','swp_ru_language');
68
- function swp_ru_language($language) {
69
- if(swp_get_single_option('language') == 'ru'):
70
- $language['googlePlus'] = '+1';
71
- $language['twitter'] = 'Tвитнуть';
72
- $language['facebook'] = 'Поделиться';
73
- $language['pinterest'] = 'Pin';
74
- $language['linkedIn'] = 'Поделиться';
75
- $language['total'] = 'Поделились';
76
- endif;
77
- return $language;
78
- }
79
-
80
- /****************************************************************************************
81
- * *
82
- * Ukrainian *
83
- * *
84
- *****************************************************************************************/
85
-
86
- // Add the terms to the buttons
87
- add_filter('swp_languages','swp_uk_language');
88
- function swp_uk_language($language) {
89
- if(swp_get_single_option('language') == 'uk'):
90
- $language['googlePlus'] = '+1';
91
- $language['twitter'] = 'Tвітнути';
92
- $language['facebook'] = 'Поділитися';
93
- $language['pinterest'] = 'Pin';
94
- $language['linkedIn'] = 'Поділитися';
95
- $language['total'] = 'Поділилися';
96
- endif;
97
- return $language;
98
- }
99
-
100
- /****************************************************************************************
101
- * *
102
- * Dutch *
103
- * *
104
- *****************************************************************************************/
105
-
106
- // Add the terms to the buttons
107
- add_filter('swp_languages','swp_nl_language');
108
- function swp_nl_language($language) {
109
- if(swp_get_single_option('language') == 'nl'):
110
- $language['googlePlus'] = '+1';
111
- $language['twitter'] = 'Twitteren';
112
- $language['facebook'] = 'Delen';
113
- $language['pinterest'] = 'Pin';
114
- $language['linkedIn'] = 'Delen';
115
- $language['total'] = 'Alle Shares';
116
- endif;
117
- return $language;
118
- }
119
-
120
- /****************************************************************************************
121
- * *
122
- * French *
123
- * *
124
- *****************************************************************************************/
125
-
126
- // Add the terms to the buttons
127
- add_filter('swp_languages','swp_fr_language');
128
- function swp_fr_language($language) {
129
- if(swp_get_single_option('language') == 'fr'):
130
- $language['googlePlus'] = '+1';
131
- $language['twitter'] = 'Tweetez';
132
- $language['facebook'] = 'Partagez';
133
- $language['pinterest'] = 'Pin';
134
- $language['linkedIn'] = 'Partagez';
135
- $language['total'] = 'Partages';
136
- endif;
137
- return $language;
138
- }
139
-
140
- /****************************************************************************************
141
- * *
142
- * Portuguese *
143
- * *
144
- *****************************************************************************************/
145
-
146
- // Add the terms to the buttons
147
- add_filter('swp_languages','swp_pt_language');
148
- function swp_pt_language($language) {
149
- if(swp_get_single_option('language') == 'pt'):
150
- $language['googlePlus'] = '+1';
151
- $language['twitter'] = 'Tweetar';
152
- $language['facebook'] = 'Partilhar';
153
- $language['pinterest'] = 'Pin';
154
- $language['linkedIn'] = 'Partilhar';
155
- $language['tumblr'] = 'Partilhar';
156
- $language['stumbleupon'] = 'Stumble';
157
- $language['reddit'] = 'Reddit';
158
- $language['email'] = 'Enviar e-mail';
159
- $language['yummly'] = 'Yum';
160
- $language['whatsapp'] = 'WhatsApp';
161
- $language['total'] = 'Total de partilhas';
162
- endif;
163
- return $language;
164
- }
165
-
166
- /****************************************************************************************
167
- * *
168
- * Danish *
169
- * *
170
- *****************************************************************************************/
171
- // Add the terms to the buttons
172
- add_filter('swp_languages','swp_da_language');
173
- function swp_da_language($language) {
174
- if(swp_get_single_option('language') == 'da'):
175
- $language['googlePlus'] = '+1';
176
- $language['twitter'] = 'Tweet';
177
- $language['facebook'] = 'Del';
178
- $language['pinterest'] = 'Pin';
179
- $language['linkedIn'] = 'Del';
180
- $language['tumblr'] = 'Del';
181
- $language['stumbleupon'] = 'Stumble';
182
- $language['reddit'] = 'Reddit';
183
- $language['email'] = 'E-mail';
184
- $language['yummly'] = 'Yum';
185
- $language['whatsapp'] = 'WhatsApp';
186
- $language['total'] = 'Delinger i alt';
187
- endif;
188
- return $language;
189
- }
190
-
191
- /****************************************************************************************
192
- * *
193
- * Italian *
194
- * *
195
- *****************************************************************************************/
196
- // Add the terms to the buttons
197
- add_filter('swp_languages','swp_it_language');
198
- function swp_it_language($language) {
199
- if(swp_get_single_option('language') == 'it'):
200
- $language['googlePlus'] = '+1';
201
- $language['twitter'] = 'Twitta';
202
- $language['facebook'] = 'Condividi';
203
- $language['pinterest'] = 'Pin';
204
- $language['linkedIn'] = 'Condividi';
205
- $language['tumblr'] = 'Condividi';
206
- $language['stumbleupon'] = 'Stumble';
207
- $language['reddit'] = 'Reddit';
208
- $language['email'] = 'Email';
209
- $language['yummly'] = 'Yum';
210
- $language['whatsapp'] = 'WhatsApp';
211
- $language['pocket'] = 'Pocket';
212
- $language['buffer'] = 'Buffer';
213
- $language['total'] = 'Condivisioni';
214
- endif;
215
- return $language;
216
- }
1
  <?php
2
+ /**
3
+ * Functions to load translations for the plugin.
4
+ *
5
+ * @package SocialWarfare\Functions
6
+ * @copyright Copyright (c) 2016, Warfare Plugins, LLC
7
+ * @license GPL-3.0+
8
+ * @since 1.0.0
9
+ */
10
+
11
+ add_action( 'plugins_loaded', 'swp_localization_init' );
12
+ /**
13
+ * Load up the text domain for translations
14
+ *
15
+ * @since 1.0.0
16
+ * @return void
17
+ */
18
+ function swp_localization_init() {
19
+ load_plugin_textdomain(
20
+ 'social-warfare',
21
+ false,
22
+ dirname( plugin_basename( SWP_PLUGIN_FILE ) ) . '/languages'
23
+ );
24
+ }
25
+
26
+ /**
27
+ * Remove translations from memory.
28
+ *
29
+ * @since 1.0.0
30
+ * @access public
31
+ * @return bool true if the text domain was loaded, false if it was not.
32
+ */
33
+ function swp_unload_textdomain() {
34
+ return unload_textdomain( 'social-warfare' );
35
+ }
36
+
37
+ /**
38
+ * Whether or not the language has been loaded already.
39
+ *
40
+ * @since 1.0.0
41
+ * @access public
42
+ * @return bool
43
+ */
44
+ function swp_is_textdomain_loaded() {
45
+ return is_textdomain_loaded( 'social-warfare' );
 
 
 
 
 
 
 
 
 
 
 
 
46
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/media-options.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
-
3
- /*****************************************************************
4
-
5
- Mechanism for Opting an Image Out of Having a Pin Button
6
-
7
- ******************************************************************/
8
- add_filter( 'attachment_fields_to_edit', 'swp_add_media_options' , null, 2);
9
-
10
- function swp_add_media_options($form_fields, $post){
11
- $checked = get_post_meta( $post->ID, 'swp_pin_button_opt_out', false ) ? 'checked="checked"' : '';
12
- $form_fields['swp_pin_button_opt_out'] = array(
13
- 'label' => 'Pin Opt Out',
14
- 'input' => 'html',
15
- 'html' => "<input type=\"checkbox\"
16
- name=\"attachments[{$post->ID}][swp_pin_button_opt_out]\"
17
- id=\"attachments[{$post->ID}][swp_pin_button_opt_out]\"
18
- value=\"1\" {$checked}/><br />");
19
- return $form_fields;
20
- }
21
-
22
- add_filter("attachment_fields_to_save", function($post, $attachment){
23
- if(isset($attachment['swp_pin_button_opt_out']))
24
- {
25
- update_post_meta($post['ID'], 'swp_pin_button_opt_out', 1);
26
- } else {
27
- update_post_meta($post['ID'], 'swp_pin_button_opt_out', 0);
28
- }
29
- }, null , 2);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/mobile-detection.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
-
3
- /*******************************************************
4
- * *
5
- * Mobile device detection *
6
- * *
7
- ********************************************************/
8
- if( !function_exists('swp_mobile_detection') ){
9
- function swp_mobile_detection(){
10
- 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"]);
11
- }
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
functions/options-array.php ADDED
@@ -0,0 +1,396 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * An Array of options to pass over to the option page
5
+ *
6
+ * @package SocialWarfare\Functions
7
+ * @copyright Copyright (c) 2016, Warfare Plugins, LLC
8
+ * @license GPL-3.0+
9
+ * @since 1.0.0
10
+ */
11
+
12
+ defined( 'WPINC' ) || die;
13
+
14
+ /**
15
+ * swp_options_display An array of options for the display tab of the options page
16
+ * @since 2.0.0
17
+ * @param array $swp_options The array of options
18
+ * @return array $swp_options The modified array of options
19
+ */
20
+ function swp_options_display($swp_options) {
21
+
22
+ $icons_array = array(
23
+ 'type' => 'buttons'
24
+ );
25
+ $icons_array = apply_filters( 'swp_button_options' , $icons_array );
26
+
27
+ // Declare the Options Tab and Tab Name
28
+ $swp_options['tabs']['links']['swp_display'] = __( 'Display' ,'social-warfare' );
29
+
30
+ // Declare the content that goes on this options page
31
+ $swp_options['options']['swp_display'] = array(
32
+ 'social_networks_title' => array(
33
+ 'type' => 'title',
34
+ 'content' => __( 'Social Networks' ,'social-warfare' )
35
+ ),
36
+ 'social_networks_subtitle' => array(
37
+ 'type' => 'paragraph',
38
+ 'content' => __( 'Drag & Drop to activate and order your share buttons.' ,'social-warfare' )
39
+ ),
40
+ 'buttons' => $icons_array,
41
+ 'buttons_divider' => array(
42
+ 'type' => 'divider'
43
+ ),
44
+ /*
45
+ 'emphasize_icons' => array(
46
+ 'type' => 'select',
47
+ 'size' => 'two-thirds',
48
+ 'content' => array(
49
+ '0' => __( 'Don\'t Emphasize Any Buttons' ,'social-warfare' ),
50
+ '1' => __( 'Emphasize the First Button' ,'social-warfare' ),
51
+ '2' => __( 'Emphasize the First Two Buttons' ,'social-warfare' )
52
+ ),
53
+ 'default' => '0',
54
+ 'name' => __( 'Emphasize Buttons' ,'social-warfare' ),
55
+ 'divider' => true,
56
+ 'premium' => true
57
+ ),
58
+ */
59
+ 'share_counts_title' => array(
60
+ 'type' => 'title',
61
+ 'content' => __( 'Share Counts' ,'social-warfare' )
62
+ ),
63
+ 'share_counts_subtitle' => array(
64
+ 'type' => 'paragraph',
65
+ 'content' => __( 'Use the toggles below to determine how to display your social proof.' ,'social-warfare' )
66
+ ),
67
+ 'totesEach' => array(
68
+ 'type' => 'checkbox',
69
+ 'size' => 'two-thirds',
70
+ 'content' => __( 'Button Counts' ,'social-warfare' ),
71
+ 'default' => true,
72
+ 'premium' => false
73
+ ),
74
+ 'totes' => array(
75
+ 'type' => 'checkbox',
76
+ 'size' => 'two-thirds',
77
+ 'content' => __( 'Total Counts' ,'social-warfare' ),
78
+ 'default' => true,
79
+ 'premium' => false
80
+ ),
81
+ 'totes_divider' => array(
82
+ 'type' => 'divider'
83
+ ),
84
+ 'position_title' => array(
85
+ 'type' => 'title',
86
+ 'content' => __( 'Position Share Buttons' ,'social-warfare' )
87
+ ),
88
+ 'position_subtitle' => array(
89
+ 'type' => 'paragraph',
90
+ 'content' => __( 'The options below will allow you to customize the positioning of share buttons for each post type.' ,'social-warfare' )
91
+ ),
92
+ 'location_column_labels' => array(
93
+ 'type' => 'column_labels',
94
+ 'columns' => 3,
95
+ 'column_1' => __( 'Post Type' ,'social-warfare' ),
96
+ 'column_2' => __( 'Static Buttons' ,'social-warfare' ),
97
+ 'column_3' => __( 'Floating Buttons (If Activated)' ,'social-warfare' )
98
+ )
99
+ );
100
+
101
+ // Create the content locations
102
+ $contentLocations = array(
103
+ 'above'=> __( 'Above the Content' ,'social-warfare' ),
104
+ 'below' => __( 'Below the Content' ,'social-warfare' ),
105
+ 'both' => __( 'Both Above and Below the Content' ,'social-warfare' ),
106
+ 'none' => __( 'None/Manual Placement' ,'social-warfare' )
107
+ );
108
+
109
+ // Get the public post Types
110
+ $postTypes = swp_get_post_types();
111
+
112
+ if(!empty($postTypes)):
113
+
114
+ // Loop through the Custom Post Type Options
115
+ foreach($postTypes as $postType):
116
+ $swp_options['options']['swp_display']['location_'.$postType] = array(
117
+ 'type' => 'select',
118
+ 'name' => ucfirst($postType),
119
+ 'primary' => 'location_'.$postType,
120
+ 'secondary' => 'float_location_'.$postType,
121
+ 'content' => $contentLocations,
122
+ 'content_2' => array(
123
+ 'on' => __( 'On' ,'social-warfare' ),
124
+ 'off' => __( 'Off' ,'social-warfare' ),
125
+ ),
126
+ 'default' => 'both',
127
+ 'default_2' => 'on'
128
+ );
129
+ endforeach;
130
+ endif;
131
+
132
+ $swp_options['options']['swp_display']['locationHome'] = array(
133
+ 'type' => 'select',
134
+ 'name' => __( 'Home Page' ,'social-warfare' ),
135
+ 'content' => $contentLocations,
136
+ 'default' => 'none',
137
+ 'size' => 'two-thirds'
138
+ );
139
+
140
+ $swp_options['options']['swp_display']['locationSite'] = array(
141
+ 'type' => 'select',
142
+ 'name' => __( 'Archive & Categories' ,'social-warfare' ),
143
+ 'content' => $contentLocations,
144
+ 'default' => 'below',
145
+ 'size' => 'two-thirds'
146
+ );
147
+
148
+ return $swp_options;
149
+ }
150
+
151
+ /**
152
+ * swp_options_styles An array of options for the styles tab of the options page
153
+ * @since 2.0.0
154
+ * @param array $swp_options The array of options
155
+ * @return array $swp_options The modified array of options
156
+ */
157
+ function swp_options_styles($swp_options) {
158
+
159
+ // Declare the Display Settings tab and tab name
160
+ $swp_options['tabs']['links']['swp_styles'] = __( 'Styles' ,'social-warfare' );
161
+
162
+ $swp_options['options']['swp_styles'] = array(
163
+
164
+ 'total_counts_title' => array(
165
+ 'type' => 'title',
166
+ 'content' => __( 'Total Counts' ,'social-warfare' )
167
+ ),
168
+ 'total_counts_description' => array(
169
+ 'type' => 'paragraph',
170
+ 'content' => __( 'Customize how the "Total Shares" section of your share buttons look.' ,'social-warfare' )
171
+ ),
172
+ 'swDecimals' => array(
173
+ 'type' => 'select',
174
+ 'name' => __( 'Decimal Places' ,'social-warfare' ),
175
+ 'size' => 'two-fourths',
176
+ 'content' => array(
177
+ '0' => __( 'Zero' ,'social-warfare' ),
178
+ '1' => __( 'One' ,'social-warfare' ),
179
+ '2' => __( 'Two' ,'social-warfare' )
180
+ ),
181
+ 'default' => '0'
182
+ ),
183
+ 'swp_decimal_separator' => array(
184
+ 'type' => 'select',
185
+ 'size' => 'two-fourths',
186
+ 'name' => __( 'Decimal Separator' ,'social-warfare' ),
187
+ 'content' => array(
188
+ 'period' => __( 'Period' ,'social-warfare' ),
189
+ 'comma' => __( 'Comma' ,'social-warfare' )
190
+ ),
191
+ 'default' => 'period'
192
+ ),
193
+ 'swTotesFormat' => array(
194
+ 'type' => 'select',
195
+ 'size' => 'two-fourths',
196
+ 'name' => __( 'Alignment' ,'social-warfare' ),
197
+ 'content' => array(
198
+ 'totesAlt' => __( 'Right' ,'social-warfare' ),
199
+ 'totesAltLeft' => __( 'Left' ,'social-warfare' )
200
+ ),
201
+ 'default' => 'totesAlt'
202
+ ),
203
+ 'total_counts_divider' => array(
204
+ 'type' => 'divider'
205
+ ),
206
+ 'float' => array(
207
+ 'type' => 'checkbox',
208
+ 'title' => __( 'Floating Share Buttons' ,'social-warfare' ),
209
+ 'description' => __( 'If you would like to activate floating share buttons, turn this on.' ,'social-warfare' ),
210
+ 'size' => 'four-fourths'
211
+ ),
212
+ 'floatOption' => array(
213
+ 'type' => 'select',
214
+ 'size' => 'two-fourths',
215
+ 'name' => __( 'Float Position' ,'social-warfare' ),
216
+ 'content' => array(
217
+ 'top' => __( 'Top of the Page' ,'social-warfare' ),
218
+ 'bottom' => __( 'Bottom of the Page' ,'social-warfare' ),
219
+ 'left' => __( 'On the left side of the page' ,'social-warfare' )
220
+ ),
221
+ 'default' => 'bottom',
222
+ 'dep' => 'float',
223
+ 'dep_val' => array(true)
224
+ ),
225
+ 'swp_float_scr_sz' => array(
226
+ 'type' => 'input',
227
+ 'size' => 'two-fourths',
228
+ 'name' => __( 'Minimum Screen Width' ,'social-warfare' ),
229
+ 'default' => '1100',
230
+ 'dep' => 'floatOption',
231
+ 'dep_val' => array('left')
232
+ ),
233
+ 'sideReveal' => array(
234
+ 'type' => 'select',
235
+ 'size' => 'two-fourths',
236
+ 'name' => __( 'Transition', 'social-warfare' ),
237
+ 'content' => array(
238
+ 'slide' => __( 'Slide In / Slide Out' ,'social-warfare' ),
239
+ 'fade' => __( 'Fade In / Fade Out' ,'social-warfare' )
240
+ ),
241
+ 'default' => 'slide',
242
+ 'dep' => 'floatOption',
243
+ 'dep_val' => array('left')
244
+ ),
245
+ 'floatBgColor' => array(
246
+ 'type' => 'input',
247
+ 'size' => 'two-fourths',
248
+ 'name' => __( 'Background Color' ,'social-warfare' ),
249
+ 'default' => '#ffffff',
250
+ 'dep' => 'floatOption',
251
+ 'dep_val' => array('top','bottom')
252
+ )
253
+ );
254
+
255
+ // Return the options value
256
+ return $swp_options;
257
+
258
+ }
259
+
260
+
261
+ /**
262
+ * swp_options_social_identity An array of options for the social identity tab of the options page
263
+ * @since 2.0.0
264
+ * @param array $swp_options The array of options
265
+ * @return array $swp_options The modified array of options
266
+ */
267
+
268
+ function swp_options_social_identity($swp_options) {
269
+
270
+ // Declare the Display Settings tab and tab name
271
+ $swp_options['tabs']['links']['swp_social_identity'] = __( 'Social Identity' , 'social-warfare' );
272
+
273
+ $swp_options['options']['swp_social_identity'] = array(
274
+ 'social_identity_title' => array(
275
+ 'type' => 'title',
276
+ 'content' => __( 'Sitewide Identity' , 'social-warfare' )
277
+ ),
278
+ 'social_identity_description' => array(
279
+ 'type' => 'paragraph',
280
+ 'content' => __( 'If you would like to set sitewide defaults for your social identity, add them below.' , 'social-warfare' )
281
+ ),
282
+ 'twitterID' => array(
283
+ 'type' => 'input',
284
+ 'size' => 'two-thirds',
285
+ 'name' => __( 'Twitter Username' , 'social-warfare' )
286
+ ),
287
+ 'pinterestID' => array(
288
+ 'type' => 'input',
289
+ 'size' => 'two-thirds',
290
+ 'name' => __( 'Pinterest Username' , 'social-warfare' )
291
+ ),
292
+ 'facebookPublisherUrl' => array(
293
+ 'type' => 'input',
294
+ 'size' => 'two-thirds',
295
+ 'name' => __( 'Facebook Page URL' , 'social-warfare' )
296
+ ),
297
+ 'facebookAppID' => array(
298
+ 'type' => 'input',
299
+ 'size' => 'two-thirds',
300
+ 'name' => __( 'Facebook App ID' , 'social-warfare' )
301
+ ),
302
+ 'social_identity_divider' => array(
303
+ 'type' => 'divider'
304
+ )
305
+
306
+ );
307
+
308
+ return $swp_options;
309
+
310
+ }
311
+
312
+ /**
313
+ * swp_options_advanced An array of options for the advanced tab of the options page
314
+ * @since 2.0.0
315
+ * @param array $swp_options The array of options
316
+ * @return array $swp_options The modified array of options
317
+ */
318
+
319
+ function swp_options_advanced($swp_options) {
320
+
321
+ // Declare the Display Settings tab and tab name
322
+ $swp_options['tabs']['links']['swp_advanced'] = __( 'Advanced' , 'social-warfare' );
323
+
324
+ $swp_options['options']['swp_advanced'] = array(
325
+ 'sniplyBuster' => array(
326
+ 'type' => 'checkbox',
327
+ 'title' => __( 'Frame Buster' , 'social-warfare' ),
328
+ 'description' => __( 'If you want to stop content pirates from framing your content, turn this on.' , 'social-warfare' ),
329
+ 'size' => 'two-thirds-advanced',
330
+ 'default' => true,
331
+ 'divider' => true
332
+ ),
333
+ 'caching_method_title' => array(
334
+ 'type' => 'title',
335
+ 'content' => __( 'Caching Method' , 'social-warfare' )
336
+ ),
337
+ 'caching_method_description' => array(
338
+ 'type' => 'paragraph',
339
+ 'content' => __( 'If you have advanced knowledge of caching configurations, you may want to choose your own below.' , 'social-warfare' )
340
+ ),
341
+ 'cacheMethod' => array(
342
+ 'type' => 'select',
343
+ 'size' => 'two-thirds',
344
+ 'name' => __( 'Cache Rebuild Method' , 'social-warfare' ),
345
+ 'content' => array(
346
+ 'advanced' => __( 'Advanced Cache Triggering' , 'social-warfare' ),
347
+ 'legacy' => __( 'Legacy Cache Rebuilding during Page Loads' , 'social-warfare' )
348
+ ),
349
+ 'default' => 'advanced',
350
+ 'divider' => true,
351
+ 'premium' => false
352
+ ),
353
+ 'full_content_title' => array(
354
+ 'type' => 'title',
355
+ 'content' => __( 'Full Content vs. Excerpts' , 'social-warfare' )
356
+ ),
357
+ 'full_content_description' => array(
358
+ 'type' => 'paragraph',
359
+ 'content' => __( 'If your theme does not use excerpts, but instead displays the full post content on archive, category, and home pages, activate this toggle to allow the buttons to appear in those areas.' , 'social-warfare' )
360
+ ),
361
+ 'full_content' => array(
362
+ 'type' => 'checkbox',
363
+ 'size' => 'two-thirds',
364
+ 'content' => __( 'Full Content?' , 'social-warfare' ),
365
+ 'default' => false,
366
+ 'premium' => false
367
+ )
368
+ );
369
+
370
+ return $swp_options;
371
+ };
372
+
373
+ /**
374
+ * Queue up the options filter functions
375
+ * @since 2.0.0
376
+ */
377
+
378
+ add_filter('swp_options', 'swp_options_display' , 1 );
379
+ add_filter('swp_options', 'swp_options_styles' , 2 );
380
+ add_filter('swp_options', 'swp_options_social_identity' , 3 );
381
+ add_filter('swp_options', 'swp_options_advanced' , 4 );
382
+
383
+ /**
384
+ * swp_add_network_option A function for easily adding networks to the avialable options
385
+ * @since 2.0.0
386
+ * @param array $swp_options The array of available options
387
+ * @param array $newOptionArray An array containing information about the new option we're adding
388
+ * @return array $swp_options The modified array of available options
389
+ */
390
+ function swp_add_network_option($swp_options,$newOptionArray) {
391
+
392
+ $swp_options['options']['swp_display']['newOrderOfIcons']['content'][$key] = $newOptionArray[$key]['content'];
393
+
394
+ // Return the option array or the world will explode
395
+ return $swp_options;
396
+ }
functions/options-fetch.php ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Functions for getting and setting the plugin's options.
4
+ *
5
+ * @package SocialWarfare\Functions
6
+ * @copyright Copyright (c) 2016, 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( 'socialWarfareOptions', array() );
30
+
31
+ $defaults = array(
32
+ 'locationSite' => 'below',
33
+ 'locationHome' => 'none',
34
+ 'location_post' => 'below',
35
+ 'location_page' => 'below',
36
+ 'totes' => true,
37
+ 'totesEach' => true,
38
+ 'twitterID' => false,
39
+ 'swp_twitter_card' => true,
40
+ 'visualTheme' => 'flatFresh',
41
+ 'dColorSet' => 'fullColor',
42
+ 'iColorSet' => 'fullColor',
43
+ 'oColorSet' => 'fullColor',
44
+ 'sideDColorSet' => 'fullColor',
45
+ 'sideIColorSet' => 'fullColor',
46
+ 'sideOColorSet' => 'fullColor',
47
+ 'floatStyleSource' => true,
48
+ 'buttonSize' => 1,
49
+ 'buttonFloat' => 'fullWidth',
50
+ 'sideReveal' => 'slide',
51
+ 'swp_float_scr_sz' => 1100,
52
+ 'cttTheme' => 'style1',
53
+ 'twitter_shares' => false,
54
+ 'float' => true,
55
+ 'floatOption' => 'bottom',
56
+ 'floatBgColor' => '#ffffff',
57
+ 'floatStyle' => 'default',
58
+ 'customColor' => '#000000',
59
+ 'recover_shares' => false,
60
+ 'recovery_format' => 'unchanged',
61
+ 'recovery_protocol' => 'unchanged',
62
+ 'recovery_prefix' => 'unchanged',
63
+ 'swDecimals' => 0,
64
+ 'swp_decimal_separator' => 'period',
65
+ 'swTotesFormat' => 'totesalt',
66
+ 'googleAnalytics' => false,
67
+ 'dashboardShares' => true,
68
+ 'linkShortening' => false,
69
+ 'minTotes' => 0,
70
+ 'cacheMethod' => 'advanced',
71
+ 'full_content' => false,
72
+ 'rawNumbers' => false,
73
+ 'notShowing' => false,
74
+ 'visualEditorBug' => false,
75
+ 'loopFix' => false,
76
+ 'sniplyBuster' => false,
77
+ 'analyticsMedium' => 'social',
78
+ 'analyticsCampaign' => 'SocialWarfare',
79
+ 'swp_click_tracking' => false,
80
+ 'orderOfIconsSelect' => 'manual',
81
+ 'pinit_toggle' => false,
82
+ 'pinit_location_horizontal' => 'center',
83
+ 'pinit_location_vertical' => 'top',
84
+ 'pinit_min_width' => '200',
85
+ 'pinit_min_height' => '200',
86
+ 'emphasize_icons' => 0,
87
+ 'floatLeftMobile' => 'bottom',
88
+ 'newOrderOfIcons' => array(
89
+ 'active' => array(
90
+ 'twitter' => 'Twitter',
91
+ 'linkedIn' => 'LinkedIn',
92
+ 'pinterest' => 'Pinterest',
93
+ 'facebook' => 'Facebook',
94
+ 'googlePlus' => 'Google Plus',
95
+ ),
96
+ ),
97
+ );
98
+
99
+ $options = array_merge( $defaults, $options );
100
+
101
+ // Make the side custom absorbe the main custom color if they haven't set one yet.
102
+ if(empty($options['sideCustomColor']) ):
103
+ $options['sideCustomColor'] = $options['customColor'];
104
+ endif;
105
+
106
+ // Force the plugin off on certain post types.
107
+ $options['locationattachment'] = 'none';
108
+ $options['locationrevision'] = 'none';
109
+ $options['nav_menu_item'] = 'none';
110
+ $options['shop_order'] = 'none';
111
+ $options['shop_order_refund'] = 'none';
112
+ $options['shop_coupon'] = 'none';
113
+ $options['shop_webhook'] = 'none';
114
+
115
+ if( function_exists('is_swp_registered') ):
116
+ $swp_registration = is_swp_registered();
117
+ else:
118
+ $swp_registration = false;
119
+ endif;
120
+
121
+ if ( $admin || true === $swp_registration ) {
122
+ if ( 'totes' === $options['swTotesFormat'] ) {
123
+ $options['swTotesFormat'] = 'totesalt';
124
+ }
125
+ } else {
126
+ $options['swp_twitter_card'] = false;
127
+ $options['visualTheme'] = 'flatFresh';
128
+ $options['dColorSet'] = 'fullColor';
129
+ $options['iColorSet'] = 'fullColor';
130
+ $options['oColorSet'] = 'fullColor';
131
+ $options['sideDColorSet'] = 'fullColor';
132
+ $options['sideIColorSet'] = 'fullColor';
133
+ $options['sideOColorSet'] = 'fullColor';
134
+ $options['floatStyleSource'] = true;
135
+ $options['buttonSize'] = 1;
136
+ $options['buttonFloat'] = 'fullWidth';
137
+ $options['cttTheme'] = 'style1';
138
+ $options['twitter_shares'] = false;
139
+ $options['recover_shares'] = false;
140
+ $options['googleAnalytics'] = false;
141
+ $options['linkShortening'] = false;
142
+ $options['minTotes'] = 0;
143
+ $options['swp_click_tracking'] = false;
144
+ $options['orderOfIconsSelect'] = 'manual';
145
+ $options['pinit_toggle'] = false;
146
+ $options['pinit_location_horizontal'] = 'center';
147
+ $options['pinit_location_vertical'] = 'top';
148
+ $options['emphasize_icons'] = 0;
149
+ $options['floatLeftMobile'] = 'off';
150
+ }
151
+
152
+ if(isset($options['newOrderOfIcons']['active'])) {
153
+ unset($options['newOrderOfIcons']['active']);
154
+ }
155
+
156
+ /**
157
+ * Unset any buttons that may have been put into the options but are no longer actually available
158
+ *
159
+ */
160
+ $icons_array = array(
161
+ 'type' => 'buttons'
162
+ );
163
+ $icons_array = apply_filters( 'swp_button_options' , $icons_array );
164
+ foreach($options['newOrderOfIcons'] as $icon):
165
+ if(!isset($icons_array['content'][$icon])):
166
+ unset($options['newOrderOfIcons'][$icon]);
167
+ endif;
168
+ endforeach;
169
+
170
+ return $options;
171
+ }
172
+
173
+ /**
174
+ * Fetch a single option
175
+ *
176
+ * @since unknown
177
+ * @param string $key The key to pull from the array of options.
178
+ * @return mixed $options The value of the desired option
179
+ */
180
+ function swp_get_single_option( $key ) {
181
+ global $swp_user_options;
182
+
183
+ if ( isset( $swp_user_options[ $key ] ) ) {
184
+ return $swp_user_options[ $key ];
185
+ }
186
+
187
+ return false;
188
+ }
189
+
190
+ /**
191
+ * Update the main plugin options.
192
+ *
193
+ * @since 2.1.0
194
+ * @param array $options The option values to be set.
195
+ * @return bool True if the option has been updated.
196
+ */
197
+ function swp_update_options( $options ) {
198
+ if ( ! is_array( $options ) ) {
199
+ return false;
200
+ }
201
+
202
+ unset( $options['orderOfIcons'] );
203
+
204
+ return update_option( 'socialWarfareOptions', $options );
205
+ }
206
+
207
+ /**
208
+ * Update a single option.
209
+ *
210
+ * @since 2.1.0
211
+ * @param string $key The key to set in the array of options.
212
+ * @param mixed $value The option value to be set.
213
+ * @return bool True if the option has been updated.
214
+ */
215
+ function swp_update_option( $key, $value ) {
216
+ $options = get_option( 'socialWarfareOptions', array() );
217
+
218
+ $options[ $key ] = $value;
219
+
220
+ return swp_update_options( $options );
221
+ }
functions/permalinks.php CHANGED
@@ -1,173 +1,157 @@
1
  <?php
2
 
3
- /*****************************************************************
4
-
5
- CHECK FOR ALTERNATE VERSION OF THE PERMALINK
6
-
7
- ******************************************************************/
8
- function get_alternate_permalink($format) {
9
-
10
- // Setup the Default Permalink Structure
11
- if($format == 'Default'):
12
- $domain = get_site_url();
13
- $id = get_the_ID();
14
- $url = $domain.'/?p='.$id;
15
 
16
- // Setup the "Day and name" Permalink Structure
17
- elseif($format == 'Day and name'):
18
- $domain = get_site_url();
19
- $date = get_the_date('Y/m/d');
20
- $slug = basename(get_permalink());
21
- $url = $domain.'/'.$date.'/'.$slug.'/';
22
 
23
- // Setup the "Month and name" Permalink Structure
24
- elseif($format == 'Month and name'):
25
- $domain = get_site_url();
26
- $date = get_the_date('Y/m');
27
- $slug = basename(get_permalink());
28
- $url = $domain.'/'.$date.'/'.$slug.'/';
29
 
30
- // Setup the "Numeric" Permalink Structure
31
- elseif($format == 'Numeric'):
32
- $domain = get_site_url();
33
- $id = get_the_ID();
34
- $url = $domain.'/archives/'.$id.'/';
 
35
 
36
- // Setup the "Post name" Permalink Structure
37
- elseif($format == 'Post Name'):
38
- $domain = get_site_url();
39
- $slug = basename(get_permalink());
40
- $url = $domain.'/'.$slug.'/';
41
 
42
- endif;
 
 
 
 
43
 
44
- return $url;
45
 
46
- }
47
-
48
- /*****************************************************************
49
-
50
- GENERATE THE ALTERNATE PERMALINK
51
-
52
- ******************************************************************/
53
- function swp_get_alternate_permalink($format,$protocol,$id,$prefix) {
54
-
55
- // Setup the Default Permalink Structure
56
- if($format == 'default'):
57
- $domain = get_site_url();
58
- $url = $domain.'/?p='.$id;
59
 
60
  // Setup the "Day and name" Permalink Structure
61
- elseif($format == 'day_and_name'):
62
  $domain = get_site_url();
63
- $date = get_the_date('Y/m/d',$id);
64
- $slug = basename(get_permalink($id));
65
- $url = $domain.'/'.$date.'/'.$slug.'/';
66
 
67
- // Setup the "Month and name" Permalink Structure
68
- elseif($format == 'month_and_name'):
69
  $domain = get_site_url();
70
- $date = get_the_date('Y/m',$id);
71
- $slug = basename(get_permalink($id));
72
- $url = $domain.'/'.$date.'/'.$slug.'/';
73
 
74
- // Setup the "Numeric" Permalink Structure
75
- elseif($format == 'numeric'):
76
  $domain = get_site_url();
77
- $url = $domain.'/archives/'.$id.'/';
78
 
79
- // Setup the "Post name" Permalink Structure
80
- elseif($format == 'post_name'):
81
  $domain = get_site_url();
82
- $post_data = get_post($id, ARRAY_A);
83
- $slug = $post_data['post_name'];
84
- $url = $domain.'/'.$slug.'/';
85
- elseif($format == 'unchanged'):
86
- $url = get_permalink($id);
87
  endif;
88
 
89
  // Check and Adjust the Protocol setting
90
- if($protocol == 'unchanged'):
91
- elseif($protocol == 'https' && strpos($url,'https') === false):
92
- $url = str_replace('http','https',$url);
93
- elseif($protocol == 'http' && strpos($url,'https') !== false):
94
- $url = str_replace('https','http',$url);
95
  endif;
96
 
97
  // Check and Adjust the Prefix setting
98
- if($prefix == 'unchanged'):
99
- elseif($prefix == 'www' && strpos($url,'www') === false):
100
- $url = str_replace('http://','http://www.',$url);
101
- $url = str_replace('https://','https://www.',$url);
102
- elseif($prefix == 'nonwww' && strpos($url,'www') !== false):
103
- $url = str_replace('http://www.','http://',$url);
104
- $url = str_replace('https://www.','https://',$url);
105
  endif;
106
-
107
  return $url;
108
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  }
110
-
111
- function swp_get_alt_permalink( $post = 0, $leavename = false ) {
112
-
113
- // Fetch the Social Warfare user's options
114
- $swp_user_options = swp_get_user_options();
115
-
116
- $rewritecode = array(
117
- '%year%',
118
- '%monthnum%',
119
- '%day%',
120
- '%hour%',
121
- '%minute%',
122
- '%second%',
123
- $leavename? '' : '%postname%',
124
- '%post_id%',
125
- '%category%',
126
- '%author%',
127
- $leavename? '' : '%pagename%',
128
- );
129
-
130
- if ( is_object( $post ) && isset( $post->filter ) && 'sample' == $post->filter ) {
131
- $sample = true;
132
- } else {
133
- $post = get_post( $post );
134
- $sample = false;
135
- }
136
-
137
- if ( empty($post->ID) )
138
- return false;
139
-
140
- if ( $post->post_type == 'page' )
141
- return get_page_link($post, $leavename, $sample);
142
- elseif ( $post->post_type == 'attachment' )
143
- return get_attachment_link( $post, $leavename );
144
- elseif ( in_array($post->post_type, get_post_types( array('_builtin' => false) ) ) )
145
- return get_post_permalink($post, $leavename, $sample);
146
-
147
- // Build the structure
148
- $structure = $swp_user_options['recovery_format'];
149
-
150
- if($structure == 'custom'):
151
- $permalink = $swp_user_options['recovery_custom_format'];
152
- elseif($structure == 'unchanged'):
153
- $permalink = get_option('permalink_structure');
154
- elseif($structure == 'default'):
155
- $permalink ='';
156
- elseif($structure == 'day_and_name'):
157
- $permalink ='/%year%/%monthnum%/%day%/%postname%/';
158
- elseif($structure == 'month_and_name'):
159
- $permalink ='/%year%/%monthnum%/%postname%/';
160
- elseif($structure == 'numeric'):
161
- $permalink ='/archives/%post_id%';
162
- elseif($structure == 'post_name'):
163
- $permalink ='/%postname%/';
164
- else:
165
- $permalink = get_option('permalink_structure');
166
  endif;
167
-
168
-
169
-
170
-
171
  /**
172
  * Filter the permalink structure for a post before token replacement occurs.
173
  *
@@ -180,106 +164,121 @@
180
  * @param bool $leavename Whether to keep the post name.
181
  */
182
  $permalink = apply_filters( 'pre_post_link', $permalink, $post, $leavename );
183
-
184
- if ( '' != $permalink && !in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft', 'future' ) ) ) {
185
- $unixtime = strtotime($post->post_date);
186
-
187
- $category = '';
188
- if ( strpos($permalink, '%category%') !== false ) {
189
- $cats = get_the_category($post->ID);
190
- if ( $cats ) {
191
- usort($cats, '_usort_terms_by_ID'); // order by ID
192
-
193
- /**
194
- * Filter the category that gets used in the %category% permalink token.
195
- *
196
- * @since 3.5.0
197
- *
198
- * @param stdClass $cat The category to use in the permalink.
199
- * @param array $cats Array of all categories associated with the post.
200
- * @param WP_Post $post The post in question.
201
- */
202
- $category_object = apply_filters( 'post_link_category', $cats[0], $cats, $post );
203
-
204
- $category_object = get_term( $category_object, 'category' );
205
- $category = $category_object->slug;
206
- if ( $parent = $category_object->parent )
207
- $category = get_category_parents($parent, false, '/', true) . $category;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
  }
209
- // show default category in permalinks, without
210
- // having to assign it explicitly
211
- if ( empty($category) ) {
212
- $default_category = get_term( get_option( 'default_category' ), 'category' );
213
- $category = is_wp_error( $default_category ) ? '' : $default_category->slug;
214
  }
215
- }
216
-
217
- $author = '';
218
- if ( strpos($permalink, '%author%') !== false ) {
219
- $authordata = get_userdata($post->post_author);
220
- $author = $authordata->user_nicename;
221
- }
222
-
223
- $date = explode(" ",date('Y m d H i s', $unixtime));
224
- $rewritereplace =
225
- array(
226
- $date[0],
227
- $date[1],
228
- $date[2],
229
- $date[3],
230
- $date[4],
231
- $date[5],
232
- $post->post_name,
233
- $post->ID,
234
- $category,
235
- $author,
236
- $post->post_name,
237
- );
238
- $permalink = home_url( str_replace($rewritecode, $rewritereplace, $permalink) );
239
-
240
- if($structure != 'custom'):
241
- $permalink = user_trailingslashit($permalink, 'single');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
242
  endif;
243
-
244
- } else { // if they're not using the fancy permalink option
245
- $permalink = home_url('?p=' . $post->ID);
246
- }
247
-
248
- /**
249
- * Filter the permalink for a post.
250
- *
251
- * Only applies to posts with post_type of 'post'.
252
- *
253
- * @since 1.5.0
254
- *
255
- * @param string $permalink The post's permalink.
256
- * @param WP_Post $post The post in question.
257
- * @param bool $leavename Whether to keep the post name.
258
- */
259
- $url = apply_filters( 'post_link', $permalink, $post, $leavename );
260
-
261
- // Filter the Protocol
262
- if($swp_user_options['recovery_protocol'] == 'https' && strpos($url,'https') === false):
263
- $url = str_replace('http','https',$url);
264
- elseif($swp_user_options['recovery_protocol'] == 'http' && strpos($url,'https') !== false):
265
- $url = str_replace('https','http',$url);
266
- endif;
267
-
268
- // Filter the prefix
269
- if($swp_user_options['recovery_prefix'] == 'unchanged'):
270
- elseif($swp_user_options['recovery_prefix'] == 'www' && strpos($url,'www') === false):
271
- $url = str_replace('http://','http://www.',$url);
272
- $url = str_replace('https://','https://www.',$url);
273
- elseif($swp_user_options['recovery_prefix'] == 'nonwww' && strpos($url,'www') !== false):
274
- $url = str_replace('http://www.','http://',$url);
275
- $url = str_replace('https://www.','https://',$url);
276
- endif;
277
-
278
- // Filter out the subdomain
279
- if(isset($swp_user_options['recovery_subdomain']) && $swp_user_options['recovery_subdomain'] != ''):
280
- $url = str_replace($swp_user_options['recovery_subdomain'] . '.' , '' , $url);
281
  endif;
282
-
283
- return $url;
284
-
285
- }
1
  <?php
2
 
3
+ /**
4
+ * CHECK FOR ALTERNATE VERSION OF THE PERMALINK
5
+ */
6
+ function get_alternate_permalink( $format ) {
 
 
 
 
 
 
 
 
7
 
8
+ // Setup the Default Permalink Structure
9
+ if ( $format == 'Default' ) :
10
+ $domain = get_site_url();
11
+ $id = get_the_ID();
12
+ $url = $domain . '/?p=' . $id;
 
13
 
14
+ // Setup the "Day and name" Permalink Structure
15
+ elseif ( $format == 'Day and name' ) :
16
+ $domain = get_site_url();
17
+ $date = get_the_date( 'Y/m/d' );
18
+ $slug = basename( get_permalink() );
19
+ $url = $domain . '/' . $date . '/' . $slug . '/';
20
 
21
+ // Setup the "Month and name" Permalink Structure
22
+ elseif ( $format == 'Month and name' ) :
23
+ $domain = get_site_url();
24
+ $date = get_the_date( 'Y/m' );
25
+ $slug = basename( get_permalink() );
26
+ $url = $domain . '/' . $date . '/' . $slug . '/';
27
 
28
+ // Setup the "Numeric" Permalink Structure
29
+ elseif ( $format == 'Numeric' ) :
30
+ $domain = get_site_url();
31
+ $id = get_the_ID();
32
+ $url = $domain . '/archives/' . $id . '/';
33
 
34
+ // Setup the "Post name" Permalink Structure
35
+ elseif ( $format == 'Post Name' ) :
36
+ $domain = get_site_url();
37
+ $slug = basename( get_permalink() );
38
+ $url = $domain . '/' . $slug . '/';
39
 
40
+ endif;
41
 
42
+ return $url;
43
+ }
44
+
45
+ /**
46
+ * GENERATE THE ALTERNATE PERMALINK
47
+ */
48
+ function swp_get_alternate_permalink( $format, $protocol, $id, $prefix ) {
49
+
50
+ // Setup the Default Permalink Structure
51
+ if ( $format == 'default' ) :
52
+ $domain = get_site_url();
53
+ $url = $domain . '/?p=' . $id;
 
54
 
55
  // Setup the "Day and name" Permalink Structure
56
+ elseif ( $format == 'day_and_name' ) :
57
  $domain = get_site_url();
58
+ $date = get_the_date( 'Y/m/d',$id );
59
+ $slug = basename( get_permalink( $id ) );
60
+ $url = $domain . '/' . $date . '/' . $slug . '/';
61
 
62
+ // Setup the "Month and name" Permalink Structure
63
+ elseif ( $format == 'month_and_name' ) :
64
  $domain = get_site_url();
65
+ $date = get_the_date( 'Y/m',$id );
66
+ $slug = basename( get_permalink( $id ) );
67
+ $url = $domain . '/' . $date . '/' . $slug . '/';
68
 
69
+ // Setup the "Numeric" Permalink Structure
70
+ elseif ( $format == 'numeric' ) :
71
  $domain = get_site_url();
72
+ $url = $domain . '/archives/' . $id . '/';
73
 
74
+ // Setup the "Post name" Permalink Structure
75
+ elseif ( $format == 'post_name' ) :
76
  $domain = get_site_url();
77
+ $post_data = get_post( $id, ARRAY_A );
78
+ $slug = $post_data['post_name'];
79
+ $url = $domain . '/' . $slug . '/';
80
+ elseif ( $format == 'unchanged' ) :
81
+ $url = get_permalink( $id );
82
  endif;
83
 
84
  // Check and Adjust the Protocol setting
85
+ if ( $protocol == 'unchanged' ) :
86
+ elseif ( $protocol == 'https' && strpos( $url,'https' ) === false ) :
87
+ $url = str_replace( 'http','https',$url );
88
+ elseif ( $protocol == 'http' && strpos( $url,'https' ) !== false ) :
89
+ $url = str_replace( 'https','http',$url );
90
  endif;
91
 
92
  // Check and Adjust the Prefix setting
93
+ if ( $prefix == 'unchanged' ) :
94
+ elseif ( $prefix == 'www' && strpos( $url,'www' ) === false ) :
95
+ $url = str_replace( 'http://','http://www.',$url );
96
+ $url = str_replace( 'https://','https://www.',$url );
97
+ elseif ( $prefix == 'nonwww' && strpos( $url,'www' ) !== false ) :
98
+ $url = str_replace( 'http://www.','http://',$url );
99
+ $url = str_replace( 'https://www.','https://',$url );
100
  endif;
101
+
102
  return $url;
103
 
104
+ }
105
+
106
+ function swp_get_alt_permalink( $post = 0, $leavename = false ) {
107
+ global $swp_user_options;
108
+
109
+ $rewritecode = array(
110
+ '%year%',
111
+ '%monthnum%',
112
+ '%day%',
113
+ '%hour%',
114
+ '%minute%',
115
+ '%second%',
116
+ $leavename? '' : '%postname%',
117
+ '%post_id%',
118
+ '%category%',
119
+ '%author%',
120
+ $leavename? '' : '%pagename%',
121
+ );
122
+
123
+ if ( is_object( $post ) && isset( $post->filter ) && 'sample' == $post->filter ) {
124
+ $sample = true;
125
+ } else {
126
+ $post = get_post( $post );
127
+ $sample = false;
128
  }
129
+
130
+ if ( empty( $post->ID ) ) {
131
+ return false;
132
+ }
133
+
134
+ // Build the structure
135
+ $structure = $swp_user_options['recovery_format'];
136
+
137
+ if ( $structure == 'custom' ) :
138
+ $permalink = $swp_user_options['recovery_custom_format'];
139
+ elseif ( $structure == 'unchanged' ) :
140
+ $permalink = get_option( 'permalink_structure' );
141
+ elseif ( $structure == 'default' ) :
142
+ $permalink = '';
143
+ elseif ( $structure == 'day_and_name' ) :
144
+ $permalink = '/%year%/%monthnum%/%day%/%postname%/';
145
+ elseif ( $structure == 'month_and_name' ) :
146
+ $permalink = '/%year%/%monthnum%/%postname%/';
147
+ elseif ( $structure == 'numeric' ) :
148
+ $permalink = '/archives/%post_id%';
149
+ elseif ( $structure == 'post_name' ) :
150
+ $permalink = '/%postname%/';
151
+ else :
152
+ $permalink = get_option( 'permalink_structure' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  endif;
154
+
 
 
 
155
  /**
156
  * Filter the permalink structure for a post before token replacement occurs.
157
  *
164
  * @param bool $leavename Whether to keep the post name.
165
  */
166
  $permalink = apply_filters( 'pre_post_link', $permalink, $post, $leavename );
167
+
168
+ // Check if the user has defined a specific custom URL
169
+ $custom_url = get_post_meta( get_the_ID() , 'swp_recovery_url' , true );
170
+ if ( $custom_url ) :
171
+ return $custom_url;
172
+ else :
173
+
174
+ if ( '' != $permalink && ! in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft', 'future' ) ) ) {
175
+ $unixtime = strtotime( $post->post_date );
176
+
177
+ $category = '';
178
+ if ( strpos( $permalink, '%category%' ) !== false ) {
179
+ $cats = get_the_category( $post->ID );
180
+ if ( $cats ) {
181
+ usort( $cats, '_usort_terms_by_ID' ); // order by ID
182
+
183
+ /**
184
+ * Filter the category that gets used in the %category% permalink token.
185
+ *
186
+ * @since 3.5.0
187
+ *
188
+ * @param stdClass $cat The category to use in the permalink.
189
+ * @param array $cats Array of all categories associated with the post.
190
+ * @param WP_Post $post The post in question.
191
+ */
192
+ $category_object = apply_filters( 'post_link_category', $cats[0], $cats, $post );
193
+
194
+ $category_object = get_term( $category_object, 'category' );
195
+ $category = $category_object->slug;
196
+ if ( $parent = $category_object->parent ) {
197
+ $category = get_category_parents( $parent, false, '/', true ) . $category;
198
+ }
199
+ }
200
+ // show default category in permalinks, without
201
+ // having to assign it explicitly
202
+ if ( empty( $category ) ) {
203
+ $default_category = get_term( get_option( 'default_category' ), 'category' );
204
+ $category = is_wp_error( $default_category ) ? '' : $default_category->slug;
205
+ }
206
  }
207
+
208
+ $author = '';
209
+ if ( strpos( $permalink, '%author%' ) !== false ) {
210
+ $authordata = get_userdata( $post->post_author );
211
+ $author = $authordata->user_nicename;
212
  }
213
+
214
+ $date = explode( ' ',date( 'Y m d H i s', $unixtime ) );
215
+ $rewritereplace =
216
+ array(
217
+ $date[0],
218
+ $date[1],
219
+ $date[2],
220
+ $date[3],
221
+ $date[4],
222
+ $date[5],
223
+ $post->post_name,
224
+ $post->ID,
225
+ $category,
226
+ $author,
227
+ $post->post_name,
228
+ );
229
+ $permalink = home_url( str_replace( $rewritecode, $rewritereplace, $permalink ) );
230
+
231
+ if ( $structure != 'custom' ) :
232
+ $permalink = user_trailingslashit( $permalink, 'single' );
233
+ endif;
234
+
235
+ } else { // if they're not using the fancy permalink option
236
+ $permalink = home_url( '?p=' . $post->ID );
237
+ }// End if().
238
+
239
+ /**
240
+ * Filter the permalink for a post.
241
+ *
242
+ * Only applies to posts with post_type of 'post'.
243
+ *
244
+ * @since 1.5.0
245
+ *
246
+ * @param string $permalink The post's permalink.
247
+ * @param WP_Post $post The post in question.
248
+ * @param bool $leavename Whether to keep the post name.
249
+ */
250
+ $url = apply_filters( 'post_link', $permalink, $post, $leavename );
251
+
252
+ // Check if they're using cross domain recovery
253
+ if ( isset( $swp_user_options['current_domain'] ) && $swp_user_options['current_domain']
254
+ && isset( $swp_user_options['former_domain'] ) && $swp_user_options['former_domain'] ) :
255
+ $url = str_replace( $swp_user_options['current_domain'],$swp_user_options['former_domain'],$url );
256
  endif;
257
+
258
+ // Filter the Protocol
259
+ if ( $swp_user_options['recovery_protocol'] == 'https' && strpos( $url,'https' ) === false ) :
260
+ $url = str_replace( 'http','https',$url );
261
+ elseif ( $swp_user_options['recovery_protocol'] == 'http' && strpos( $url,'https' ) !== false ) :
262
+ $url = str_replace( 'https','http',$url );
263
+ endif;
264
+
265
+ // Filter the prefix
266
+ if ( $swp_user_options['recovery_prefix'] == 'unchanged' ) :
267
+ elseif ( $swp_user_options['recovery_prefix'] == 'www' && strpos( $url,'www' ) === false ) :
268
+ $url = str_replace( 'http://','http://www.',$url );
269
+ $url = str_replace( 'https://','https://www.',$url );
270
+ elseif ( $swp_user_options['recovery_prefix'] == 'nonwww' && strpos( $url,'www' ) !== false ) :
271
+ $url = str_replace( 'http://www.','http://',$url );
272
+ $url = str_replace( 'https://www.','https://',$url );
273
+ endif;
274
+
275
+ // Filter out the subdomain
276
+ if ( isset( $swp_user_options['recovery_subdomain'] ) && $swp_user_options['recovery_subdomain'] != '' ) :
277
+ $url = str_replace( $swp_user_options['recovery_subdomain'] . '.' , '' , $url );
278
+ endif;
279
+
280
+ return $url;
281
+
 
 
 
 
 
 
 
 
 
 
 
 
 
282
  endif;
283
+
284
+ }
 
 
functions/post-options.php DELETED
@@ -1,205 +0,0 @@
1
- <?php
2
-
3
- /*****************************************************************
4
-
5
- SETUP THE POST EDITOR OPTIONS
6
-
7
- ******************************************************************/
8
-
9
- function swp_get_post_types() {
10
-
11
- // Get the post Types
12
- $postTypes = get_post_types();
13
-
14
- // Unset the post types that don't matter
15
- if(isset($postTypes['post'])) unset($postTypes['post']);
16
- if(isset($postTypes['page'])) unset($postTypes['page']);
17
- if(isset($postTypes['attachment'])) unset($postTypes['attachment']);
18
- if(isset($postTypes['revision'])) unset($postTypes['revision']);
19
- if(isset($postTypes['nav_menu_item'])) unset($postTypes['nav_menu_item']);
20
- if(isset($postTypes['nf_sub'])) unset($postTypes['nf_sub']);
21
- if(isset($postTypes['shop_order'])) unset($postTypes['shop_order']);
22
- if(isset($postTypes['shop_order_refund'])) unset($postTypes['shop_order_refund']);
23
- if(isset($postTypes['shop_coupon'])) unset($postTypes['shop_coupon']);
24
- if(isset($postTypes['shop_webhook'])) unset($postTypes['shop_webhook']);
25
-
26
- return $postTypes;
27
-
28
- };
29
-
30
- add_filter( 'rwmb_meta_boxes', 'swp_register_meta_boxes' );
31
- function swp_register_meta_boxes( $meta_boxes )
32
- {
33
-
34
- // Setup the prefix to avoid conflicts
35
- $prefix = 'nc_';
36
- $options = swp_get_user_options();
37
- $postTypes = swp_get_post_types();
38
- foreach($postTypes as $key => $value):
39
- $postType[] = $key;
40
- endforeach;
41
- $postType[] = 'page';
42
- $postType[] = 'post';
43
-
44
- /*****************************************************************
45
-
46
- FETCH THE TWITTER HANDLE FOR TWEET COUNTS
47
-
48
- ******************************************************************/
49
-
50
- // Fetch the Twitter handle for the Post Author if it exists
51
- if(isset($_GET['post'])):
52
- $post_id = $_GET['post'];
53
- $author_id = swp_get_author($post_id);
54
- $twitter_handle = get_the_author_meta( 'swp_twitter' , $author_id);
55
-
56
- // Fetch the Twitter handle for the logged in user if the above fails
57
- else:
58
- $logged_in_user = get_current_user_id();
59
- $twitter_handle = get_the_author_meta( 'swp_twitter' , $logged_in_user);
60
- endif;
61
-
62
- // Fetch the site-wide Twitter Handle if both of the above fail
63
- if(!$twitter_handle):
64
- $twitter_handle = $options['twitterID'];
65
- endif;
66
-
67
- /*****************************************************************
68
-
69
- BUILD THE OPTIONS FIELDS
70
-
71
- ******************************************************************/
72
-
73
- // Setup our meta box using an array
74
- $meta_boxes[0] = array(
75
- 'id' => 'socialWarfare',
76
- 'title' => __('Social Warfare Custom Options','social-warfare'),
77
- 'pages' => $postType,
78
- 'context' => 'normal',
79
- 'priority' => 'high',
80
- 'fields' => array(
81
-
82
- // Setup the social media image
83
- array(
84
- 'name' => '<span class="dashicons dashicons-share"></span> '.__('Social Media Image','social-warfare'),
85
- 'desc' => __('Add an image that is optimized for maximum exposure on Facebook, Google+ and LinkedIn. We recommend 1,200px by 628px.','social-warfare'),
86
- 'id' => $prefix . 'ogImage',
87
- 'type' => 'image_advanced',
88
- 'clone' => false,
89
- 'class' => $prefix . 'ogImageWrapper',
90
- 'max_file_uploads' => 1
91
- ),
92
-
93
- // Setup the social media title
94
- array(
95
- 'name' => '<span class="dashicons dashicons-share"></span> '. __('Social Media Title','social-warfare'),
96
- 'desc' => __('Add a title that will populate the open graph meta tag which will be used when users share your content onto Facebook, LinkedIn, and Google+. If nothing is provided here, we will use the post title as a backup.','social-warfare'),
97
- 'id' => $prefix . 'ogTitle',
98
- 'type' => 'textarea',
99
- 'class' => $prefix . 'ogTitleWrapper',
100
- 'clone' => false,
101
- ),
102
-
103
- // Setup the social media description
104
- array(
105
- 'name' => '<span class="dashicons dashicons-share"></span> '.__('Social Media Description','social-warfare'),
106
- 'desc' => __('Add a description that will populate the open graph meta tag which will be used when users share your content onto Facebook, LinkedIn, and Google Plus.','social-warfare'),
107
- 'id' => $prefix . 'ogDescription',
108
- 'class' => $prefix . 'ogDescriptionWrapper',
109
- 'type' => 'textarea',
110
- 'clone' => false,
111
- ),
112
-
113
- // Divider
114
- array(
115
- 'name' => 'divider',
116
- 'id' => 'divider',
117
- 'type' => 'divider'
118
- ),
119
-
120
- // Setup the pinterest optimized image
121
- array(
122
- 'name' => '<i class="sw sw-pinterest"></i> '.__('Pinterest Image','social-warfare'),
123
- 'desc' => __('Add an image that is optimized for maximum exposure on Pinterest. We recommend using an image that is formatted in a 2:3 aspect ratio like 735x1102.','social-warfare'),
124
- 'id' => $prefix . 'pinterestImage',
125
- 'class' => $prefix . 'pinterestImageWrapper',
126
- 'type' => 'image_advanced',
127
- 'clone' => false,
128
- 'max_file_uploads' => 1
129
- ),
130
-
131
- // Setup the pinterest description
132
- array(
133
- 'name' => '<i class="sw sw-pinterest"></i>'. __('Pinterest Description','social-warfare'),
134
- 'desc' => __('Craft a customized description that will be used when this post is shared on Pinterest. Leave this blank to use the title of the post.','social-warfare'),
135
- 'id' => $prefix . 'pinterestDescription',
136
- 'class' => $prefix . 'pinterestDescriptionWrapper',
137
- 'type' => 'textarea',
138
- 'clone' => false,
139
- ),
140
-
141
- // Setup the Custom Tweet box
142
- array(
143
- 'name' => '<i class="sw sw-twitter"></i> '.__('Custom Tweet','social-warfare'),
144
- 'desc' => ($options['twitterID'] ? sprintf(__('If this is left blank your post title will be used. Based on your username (@%1$s), <span class="tweetLinkSection">a link being added,</span> and the current content above, your tweet has %2$s characters remaining.','social-warfare'),str_replace('@','',$twitter_handle),'<span class="counterNumber">140</span>') : sprintf(__('If this is left blank your post title will be used. <span ="tweetLinkSection">Based on a link being added, and</span> the current content above, your tweet has %s characters remaining.','social-warfare'),'<span class="counterNumber">140</span>')),
145
- 'id' => $prefix . 'customTweet',
146
- 'class' => $prefix . 'customTweetWrapper',
147
- 'type' => 'textarea',
148
- 'clone' => false,
149
- ),
150
-
151
- // Set up the location on post options
152
- array(
153
- 'name' => '<span class="dashicons dashicons-randomize"></span> '.__('Horizontal Buttons Location','social-warfare'),
154
- 'id' => $prefix . 'postLocation',
155
- 'class' => $prefix . 'postLocationWrapper',
156
- 'type' => 'select',
157
- 'options' => array(
158
- 'default' => __('Default','social-warfare'),
159
- 'above' => __('Above the Content','social-warfare'),
160
- 'below' => __('Below the Content','social-warfare'),
161
- 'both' => __('Both Above and Below the Content','social-warfare'),
162
- 'none' => __('None/Manual Placement','social-warfare')
163
- ),
164
- 'clone' => false,
165
- 'std' => 'default'
166
- ),
167
- array(
168
- 'name' => '<span class="dashicons dashicons-randomize"></span> '.__('Side Floating Buttons Location','social-warfare'),
169
- 'id' => $prefix . 'floatLocation',
170
- 'class' => $prefix . 'floatLocationWrapper',
171
- 'type' => 'select',
172
- 'options' => array(
173
- 'default' => __('Default','social-warfare'),
174
- 'on' => __('On','social-warfare'),
175
- 'off' => __('Off','social-warfare')
176
- ),
177
- 'clone' => false,
178
- 'std' => 'default',
179
-
180
- ),
181
- array(
182
- 'name' => 'divider2',
183
- 'id' => 'divider2',
184
- 'type' => 'divider'
185
- ),
186
- array(
187
- 'name' => $twitter_handle,
188
- 'id' => 'twitterID',
189
- 'class' => 'twitterIDWrapper',
190
- 'type' => 'hidden',
191
- 'std' => $twitter_handle
192
- ),
193
- array(
194
- 'name' => (is_swp_registered() ? 'true' : 'false'),
195
- 'id' => (is_swp_registered() ? 'true' : 'false'),
196
- 'class' => 'registrationWrapper',
197
- 'type' => 'hidden',
198
- 'std' => (is_swp_registered() ? 'true' : 'false')
199
- )
200
- )
201
- );
202
-
203
- // Return the meta boxes
204
- return $meta_boxes;
205
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/profile-fields.php CHANGED
@@ -1,45 +1,46 @@
1
- <?php
2
 
3
- // Queue up our profile field functions
4
- add_action( 'show_user_profile', 'swp_show_user_profile_fields' );
5
- add_action( 'edit_user_profile', 'swp_show_user_profile_fields' );
6
- add_action( 'personal_options_update', 'swp_save_user_profile_fields' );
7
- add_action( 'edit_user_profile_update', 'swp_save_user_profile_fields' );
8
 
9
- // Display the new option on the user profile edit page
10
- function swp_show_user_profile_fields( $user ) {
11
- echo '<h3>Social Warfare Fields</h3>';
12
- echo '<table class="form-table">';
13
- echo '<tr>';
14
- echo '<th><label for="twitter">Twitter Username</label></th>';
15
- echo '<td>';
16
- echo '<input type="text" name="swp_twitter" id="swp_twitter" value="'.esc_attr( get_the_author_meta( 'swp_twitter' , $user->ID ) ).'" class="regular-text" />';
17
- echo '<br /><span class="description">Please enter your Twitter username.</span>';
18
- echo '</td>';
19
- echo '</tr>';
20
- echo '<tr>';
21
- echo '<th><label for="facebook_author">Facebook Author URL</label></th>';
22
- echo '<td>';
23
- echo '<input type="text" name="swp_fb_author" id="swp_fb_author" value="'.esc_attr( get_the_author_meta( 'swp_fb_author' , $user->ID ) ).'" class="regular-text" />';
24
- echo '<br /><span class="description">Please enter the URL of your Facebok profile.</span>';
25
- echo '</td>';
26
- echo '</tr>';
27
 
28
- echo '</table>';
29
- }
30
-
31
- // Save our fields when the page is udpated
32
- function swp_save_user_profile_fields( $user_id ) {
33
-
34
- if ( !current_user_can( 'edit_user', $user_id ) )
35
- return false;
36
-
37
- /* Copy and paste this line for additional fields. Make sure to change 'twitter' to the field ID. */
38
- update_usermeta( $user_id, 'swp_twitter', $_POST['swp_twitter'] );
39
- update_usermeta( $user_id, 'swp_fb_author', $_POST['swp_fb_author'] );
40
  }
41
-
42
- function swp_get_author( $post_id = 0 ){
43
- $post = get_post( $post_id );
44
- return $post->post_author;
45
- }
 
 
 
 
 
1
+ <?php
2
 
3
+ // Queue up our profile field functions
4
+ add_action( 'show_user_profile', 'swp_show_user_profile_fields' );
5
+ add_action( 'edit_user_profile', 'swp_show_user_profile_fields' );
6
+ add_action( 'personal_options_update', 'swp_save_user_profile_fields' );
7
+ add_action( 'edit_user_profile_update', 'swp_save_user_profile_fields' );
8
 
9
+ // Display the new option on the user profile edit page
10
+ function swp_show_user_profile_fields( $user ) {
11
+ echo '<h3>Social Warfare Fields</h3>';
12
+ echo '<table class="form-table">';
13
+ echo '<tr>';
14
+ echo '<th><label for="twitter">Twitter Username</label></th>';
15
+ echo '<td>';
16
+ echo '<input type="text" name="swp_twitter" id="swp_twitter" value="' . esc_attr( get_the_author_meta( 'swp_twitter' , $user->ID ) ) . '" class="regular-text" />';
17
+ echo '<br /><span class="description">Please enter your Twitter username.</span>';
18
+ echo '</td>';
19
+ echo '</tr>';
20
+ echo '<tr>';
21
+ echo '<th><label for="facebook_author">Facebook Author URL</label></th>';
22
+ echo '<td>';
23
+ echo '<input type="text" name="swp_fb_author" id="swp_fb_author" value="' . esc_attr( get_the_author_meta( 'swp_fb_author' , $user->ID ) ) . '" class="regular-text" />';
24
+ echo '<br /><span class="description">Please enter the URL of your Facebok profile.</span>';
25
+ echo '</td>';
26
+ echo '</tr>';
27
 
28
+ echo '</table>';
29
+ }
30
+
31
+ // Save our fields when the page is udpated
32
+ function swp_save_user_profile_fields( $user_id ) {
33
+
34
+ if ( ! current_user_can( 'edit_user', $user_id ) ) {
35
+ return false;
 
 
 
 
36
  }
37
+
38
+ /* Copy and paste this line for additional fields. Make sure to change 'twitter' to the field ID. */
39
+ update_usermeta( $user_id, 'swp_twitter', $_POST['swp_twitter'] );
40
+ update_usermeta( $user_id, 'swp_fb_author', $_POST['swp_fb_author'] );
41
+ }
42
+
43
+ function swp_get_author( $post_id = 0 ) {
44
+ $post = get_post( $post_id );
45
+ return $post->post_author;
46
+ }
functions/registration.php DELETED
@@ -1,153 +0,0 @@
1
- <?php
2
-
3
- /*****************************************************************
4
-
5
- CHECK FOR PREMIUM ACTIVATION
6
-
7
- ******************************************************************/
8
- function is_swp_registered() {
9
-
10
- // Fetch the User's Options Array
11
- $swp_user_options = get_option('socialWarfareOptions');
12
-
13
- // Create a Registration Code from the Domain Name
14
- if ( function_exists('icl_get_home_url') ) :
15
- $domain = icl_get_home_url();
16
- else:
17
- $domain = get_home_url();
18
- endif;
19
-
20
- $regCode = md5($domain);
21
-
22
- // If the Premium Code is currently set....
23
- if(isset($swp_user_options['premiumCode']) && md5($regCode) == $swp_user_options['premiumCode']):
24
-
25
- // It's registered
26
- return true;
27
-
28
- // IF the premium code doesn't match....
29
- else:
30
-
31
- // It's not registered
32
- return 0;
33
-
34
- endif;
35
- }
36
-
37
- /*****************************************************************
38
-
39
- ADMIN NOTICE
40
-
41
- ******************************************************************/
42
- function swp_admin_notice() {
43
- if(!is_swp_registered()):
44
- echo '<div class="notice is-dismissable swp_register_admin_notice"><p>Your copy of Social Warfare is not registered. Navigate to the <a href="/wp-admin/admin.php?page=social-warfare"><b>Social Warfare Settings Page</b></a> and select the "Register" tab to register now! You can view and manage your purchased licences on the <a target="_blank" href="https://warfareplugins.com/my-account/">My Account</a> page of the Warfare Plugins website. If you have any issues, please contact us and we\'ll be happy to help.</p></div>';
45
- endif;
46
- }
47
- // add_action( 'admin_notices', 'swp_admin_notice' );
48
-
49
- /*****************************************************************
50
-
51
- CHECK WARFARE PLUGINS SERVER
52
-
53
- ******************************************************************/
54
-
55
- // A function to check if the site is registered at our server
56
- function swp_check_registration_status() {
57
-
58
-
59
- // Fetch the User's Options Array
60
- $swp_user_options = swp_get_user_options();
61
-
62
- // Fetch URL of the home page
63
- $homeURL = get_home_url();
64
-
65
- // Create a Registration Code from the Domain Name
66
- $regCode = md5($homeURL);
67
-
68
- // IF the plugin thinks that it is already registered....
69
- if(is_swp_registered()):
70
-
71
- // Construct the request URL
72
- $url = 'https://warfareplugins.com/registration-api/?activity=check_registration&emailAddress='.$swp_user_options['emailAddress'].'&domain='.$homeURL.'&registrationCode='.md5($homeURL);
73
-
74
- // Send the link and load the response
75
- $response = swp_file_get_contents_curl($url);
76
-
77
- // If the response is negative, unregister the plugin....
78
- if($response == 'false'):
79
-
80
- // Set the premium code to null
81
- $swp_user_options['premiumCode'] = '';
82
-
83
- // Update the options array with the premium code nulled
84
- update_option('socialWarfareOptions',$swp_user_options);
85
-
86
- endif;
87
-
88
- // If the codes didn't match, but a premium code does exist
89
- elseif(isset($swp_user_options['premiumCode'])):
90
-
91
- // Attemp to unregister this from the Warfare Plugins Server
92
- $url = 'https://warfareplugins.com/registration-api/?activity=unregister&emailAddress='.$swp_user_options['emailAddress'].'&premiumCode='.$swp_user_options['premiumCode'];
93
-
94
- // Parse the response
95
- $response = swp_file_get_contents_curl($url);
96
- $response = json_decode($response,true);
97
-
98
- // If it unregistered, let's try to auto-reregister it....
99
- if($response['status'] == 'Success'):
100
-
101
- // Attempt to reregister it
102
- $url = 'https://warfareplugins.com/registration-api/?activity=register&emailAddress='.$swp_user_options['emailAddress'].'&domain='.get_home_url().'&registrationCode='.$regCode;
103
-
104
- // Parse the response
105
- $response = swp_file_get_contents_curl($url);
106
- $response = json_decode($response,true);
107
-
108
- // IF the registration attempt was successful....
109
- if($response['status'] == 'Success'):
110
-
111
- // Save our updated options
112
- $swp_user_options['premiumCode'] == $response['premiumCode'];
113
-
114
- // Update the options storing in our new updated Premium Code
115
- update_option('socialWarfareOptions',$swp_user_options);
116
-
117
- return true;
118
-
119
- // IF the registration attempt was NOT successful
120
- else:
121
-
122
- // Set the premium code to null
123
- $swp_user_options['premiumCode'] = '';
124
-
125
- // Update the options array with the premium code nulled
126
- update_option('socialWarfareOptions',$swp_user_options);
127
-
128
- return false;
129
-
130
- endif;
131
-
132
- // IF it wasn't able to unregister
133
- else:
134
-
135
- // Set the premium code to null
136
- $swp_user_options['premiumCode'] = '';
137
-
138
- // Update the options array with the premium code nulled
139
- update_option('socialWarfareOptions',$swp_user_options);
140
-
141
- return false;
142
-
143
- endif;
144
-
145
- endif;
146
- }
147
-
148
-
149
-
150
-
151
-
152
-
153
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/scripts.php ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Register and enqueue plugin scripts and styles.
4
+ *
5
+ * @package SocialWarfare\Functions
6
+ * @copyright Copyright (c) 2016, Warfare Plugins, LLC
7
+ * @license GPL-3.0+
8
+ * @since 1.0.0
9
+ */
10
+
11
+ defined( 'WPINC' ) || die;
12
+
13
+ /**
14
+ * Helper function for getting the script/style `.min` suffix for minified files.
15
+ *
16
+ * @since 1.0.0
17
+ * @access public
18
+ * @return string
19
+ */
20
+ function swp_get_suffix() {
21
+ $debug = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG;
22
+
23
+ if ( _swp_is_debug( 'script' ) ) {
24
+ $debug = true;
25
+ }
26
+
27
+ $enabled = (bool) apply_filters( 'swp_enable_suffix', ! $debug );
28
+
29
+ return $enabled ? '.min' : '';
30
+ }
31
+
32
+ add_action( 'wp_enqueue_scripts', 'enqueueSocialWarfareScripts' );
33
+
34
+ /**
35
+ * Load front end scripts and styles.
36
+ *
37
+ * @since 1.0.0
38
+ * @access public
39
+ * @global $swp_user_options
40
+ * @return void
41
+ */
42
+ function enqueueSocialWarfareScripts() {
43
+ global $swp_user_options;
44
+
45
+ $suffix = swp_get_suffix();
46
+
47
+ wp_enqueue_style(
48
+ 'social_warfare',
49
+ SWP_PLUGIN_URL . "/css/style{$suffix}.css",
50
+ array(),
51
+ SWP_VERSION
52
+ );
53
+
54
+ wp_enqueue_script(
55
+ 'social_warfare_script',
56
+ SWP_PLUGIN_URL . "/js/script{$suffix}.js",
57
+ array( 'jquery' ),
58
+ SWP_VERSION,
59
+ true
60
+ );
61
+
62
+ }
63
+
64
+ add_action( 'admin_enqueue_scripts', 'enqueueSocialWarfareAdminScripts' );
65
+
66
+ /**
67
+ * Load admin scripts and styles.
68
+ *
69
+ * @since 1.0.0
70
+ * @access public
71
+ * @param string $screen The ID of the current admin screen.
72
+ * @return void
73
+ */
74
+ function enqueueSocialWarfareAdminScripts( $screen ) {
75
+ $screens = array(
76
+ 'toplevel_page_social-warfare',
77
+ 'post.php',
78
+ 'post-new.php',
79
+ );
80
+
81
+ if ( ! in_array( $screen, $screens, true ) ) {
82
+ return;
83
+ }
84
+
85
+ enqueueSocialWarfareScripts();
86
+
87
+ $suffix = swp_get_suffix();
88
+
89
+ wp_enqueue_style(
90
+ 'social_warfare_admin',
91
+ SWP_PLUGIN_URL . "/css/admin{$suffix}.css",
92
+ array(),
93
+ SWP_VERSION
94
+ );
95
+
96
+ wp_enqueue_script(
97
+ 'social_warfare_admin_script',
98
+ SWP_PLUGIN_URL . "/js/admin{$suffix}.js",
99
+ array( 'jquery' ),
100
+ SWP_VERSION
101
+ );
102
+
103
+ wp_localize_script( 'social_warfare_admin_script', 'swp_localize_admin',
104
+ array(
105
+ 'swp_characters_remaining' => __( 'Characters Remaining', 'social-warfare' ),
106
+ )
107
+ );
108
+ }
109
+
110
+ /**
111
+ * Queue up our javscript for options and whatnot
112
+ * @since 1.4.0
113
+ * @param Void
114
+ * @return Void. Echo results directly to the screen.
115
+ */
116
+ function swp_footer_functions() {
117
+ global $swp_user_options;
118
+
119
+ // Fetch a few variables.
120
+ $info['postID'] = get_the_ID();
121
+ $info['swp_user_options'] = $swp_user_options;
122
+ $info['footer_output'] = '';
123
+
124
+ // Pass the array through our custom filters.
125
+ $info = apply_filters( 'swp_footer_scripts' , $info );
126
+
127
+ // If we have output, output it.
128
+ if ( $info['footer_output'] ) {
129
+ echo '<script type="text/javascript">';
130
+ echo $info['footer_output'];
131
+ echo '</script>';
132
+ }
133
+ }
134
+
135
+ // Queue up our hook function
136
+ add_action( 'wp_footer' , 'swp_footer_functions' , 99 );
137
+
138
+ /**
139
+ * Enable click tracking in Google Analytics.
140
+ *
141
+ * @since 1.4
142
+ * @access public
143
+ * @param array $info An array of footer script information.
144
+ * @return array $info A modified array of footer script information.
145
+ */
146
+ function swp_click_tracking( $info ) {
147
+ if ( $info['swp_user_options']['swp_click_tracking'] ) {
148
+ $info['footer_output'] .= 'var swpClickTracking = true;';
149
+ } else {
150
+ $info['footer_output'] .= 'var swpClickTracking = false;';
151
+ }
152
+
153
+ return $info;
154
+ }
155
+
156
+ // Queue up our footer hook function
157
+ add_filter( 'swp_footer_scripts' , 'swp_click_tracking' );
158
+
159
+ /**
160
+ * Create a nonce for added security
161
+ *
162
+ * @since 2.1.4
163
+ * @access public
164
+ * @param array $info An array of footer script information.
165
+ * @return array $info A modified array of footer script information.
166
+ */
167
+ function swp_nonce( $info ) {
168
+
169
+ // Create a nonce
170
+ $info['footer_output'] .= ' var swp_nonce = "'.wp_create_nonce().'";';
171
+ return $info;
172
+ }
173
+
174
+ // Queue up our footer hook function
175
+ add_filter( 'swp_footer_scripts' , 'swp_nonce' );
176
+
177
+ /**
178
+ * The Frame Buster Option
179
+ *
180
+ * @since 1.4.0
181
+ * @access public
182
+ * @param array $info An array of footer script information.
183
+ * @return array $info A modified array of footer script information.
184
+ */
185
+ function swp_frame_buster( $info ) {
186
+
187
+ global $swp_user_options;
188
+
189
+ if ( true === $swp_user_options['sniplyBuster'] ) :
190
+ $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);};';
191
+ endif;
192
+
193
+ return $info;
194
+ }
195
+
196
+ add_filter( 'swp_footer_scripts' , 'swp_frame_buster' );
functions/share-cache.php ADDED
@@ -0,0 +1,387 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Register and output header meta tags
5
+ *
6
+ * @package SocialWarfare\Functions
7
+ * @copyright Copyright (c) 2016, Warfare Plugins, LLC
8
+ * @license GPL-3.0+
9
+ * @since 1.0.0
10
+ */
11
+
12
+ defined( 'WPINC' ) || die;
13
+
14
+ add_filter( 'query_vars', 'swp_add_query_vars' );
15
+ /**
16
+ * Register custom query vars.
17
+ *
18
+ * @since 2.1.0
19
+ * @access public
20
+ * @param array $vars The current query vars.
21
+ * @return array $vars The modified query vars.
22
+ */
23
+ function swp_add_query_vars( $vars ) {
24
+ $vars[] = 'swp_cache';
25
+ return $vars;
26
+ }
27
+
28
+ add_filter( 'swp_meta_tags', 'swp_cache_rebuild_rel_canonical', 7 );
29
+ /**
30
+ * Use a rel canonical so search engines know this is not a real page.
31
+ *
32
+ * @since 1.4.0
33
+ * @param array $info Meta tag info.
34
+ * @return array $info Meta tag info.
35
+ */
36
+ function swp_cache_rebuild_rel_canonical( $info ) {
37
+ if ( 'rebuild' === get_query_var( 'swp_cache' ) ) {
38
+ $info['header_output'] .= '<link rel="canonical" href="' . get_permalink() . '">';
39
+ }
40
+
41
+ return $info;
42
+ }
43
+
44
+ /**
45
+ * Cache checking function
46
+ *
47
+ * @since 1.0.0
48
+ * @access public
49
+ * @param integer $post_id The post ID
50
+ * @param boolean $output Does the caller require a response output
51
+ * @param boolean $ajax Is this being called from Ajax
52
+ * @return boolean true/false The status of wether the cache is fresh or not
53
+ */
54
+ function swp_is_cache_fresh( $post_id, $output = false, $ajax = false ) {
55
+ global $swp_user_options;
56
+
57
+ // Bail early if it's a crawl bot. If so, ONLY SERVE CACHED RESULTS FOR MAXIMUM SPEED.
58
+ if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && preg_match( '/bot|crawl|slurp|spider/i', wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) ) {
59
+ return true;
60
+ }
61
+
62
+ $options = $swp_user_options;
63
+
64
+ $fresh_cache = false;
65
+
66
+ // Bail if output isn't being forced and legacy caching isn't enabled.
67
+ if ( ! $output && 'legacy' !== $options['cacheMethod'] ) {
68
+ if ( 'rebuild' !== get_query_var( 'swp_cache' ) ) {
69
+ $fresh_cache = true;
70
+ }
71
+
72
+ return $fresh_cache;
73
+ }
74
+
75
+ // Always be TRUE if we're not on a single.php otherwise we could end up
76
+ // Rebuilding multiple page caches which will cost a lot of time.
77
+ if ( ! is_singular() && ! $ajax ) {
78
+ return true;
79
+ }
80
+
81
+ $post_age = floor( date( 'U' ) - get_post_time( 'U' , false , $post_id ) );
82
+
83
+ if ( $post_age < ( 21 * 86400 ) ) {
84
+ $hours = 1;
85
+ } elseif ( $post_age < ( 60 * 86400 ) ) {
86
+ $hours = 4;
87
+ } else {
88
+ $hours = 12;
89
+ }
90
+
91
+ $time = floor( ( ( date( 'U' ) / 60 ) / 60 ) );
92
+ $last_checked = get_post_meta( $post_id, 'swp_cache_timestamp', true );
93
+
94
+ if ( $last_checked > ( $time - $hours ) && $last_checked > 390000 ) {
95
+ $fresh_cache = true;
96
+ } else {
97
+ $fresh_cache = false;
98
+ }
99
+
100
+ return $fresh_cache;
101
+ }
102
+
103
+ add_action( 'wp_ajax_swp_cache_trigger', 'swp_cache_rebuild' );
104
+ add_action( 'wp_ajax_nopriv_swp_cache_trigger', 'swp_cache_rebuild' );
105
+
106
+ /**
107
+ * Rebuild the share cache.
108
+ *
109
+ * @since 1.0.0
110
+ * @global $wpdb
111
+ * @return void
112
+ */
113
+ function swp_cache_rebuild() {
114
+ global $wpdb;
115
+
116
+ $post_id = absint( $_POST['post_id'] );
117
+
118
+ /**
119
+ * Bail if we already have fresh cache and this request is invalid.
120
+ *
121
+ */
122
+ if ( swp_is_cache_fresh( $post_id , true , true ) ) {
123
+ wp_send_json_error();
124
+ die();
125
+ }
126
+
127
+ /**
128
+ * Force the cache trigger on.
129
+ *
130
+ */
131
+ set_query_var( 'swp_cache', 'rebuild' );
132
+
133
+ /**
134
+ * Fetch new share counts via the various API's
135
+ *
136
+ * @var integer $post_id The ID of the post
137
+ */
138
+ $shares = get_social_warfare_shares( $post_id );
139
+
140
+ /**
141
+ * Update Bitly links in case anything has changed with the permalink
142
+ *
143
+ */
144
+ foreach ( $shares as $key => $value ) :
145
+ swp_process_url( get_permalink( $post_id ) , $key , $post_id );
146
+ endforeach;
147
+
148
+ /**
149
+ * Recheck the image URL's and then store the values
150
+ * in the meta fields so that they are autoloaded with the postID
151
+ * to prevent the extra queries during page loads.
152
+ */
153
+ swp_cache_rebuild_pin_image($post_id);
154
+ swp_cache_rebuild_og_image($post_id);
155
+
156
+ // Remove any meta fields that we used to use, but no longer use.
157
+ swp_cache_remove_unused_fields($post_id);
158
+
159
+ // Reset the timestamp
160
+ swp_cache_reset_timestamp($post_id);
161
+
162
+ // Return the share count
163
+ wp_send_json( $shares );
164
+
165
+ // Kill off all the WordPress functions
166
+ wp_die();
167
+ }
168
+
169
+ /**
170
+ * A function to reset the cache timestamp with the current time
171
+ *
172
+ * @since 2.1.4
173
+ * @access public
174
+ * @param integer $post_id The Post's ID
175
+ * @return void
176
+ */
177
+ function swp_cache_reset_timestamp($post_id) {
178
+ delete_post_meta( $post_id , 'swp_cache_timestamp' );
179
+ update_post_meta( $post_id , 'swp_cache_timestamp' , floor( ( ( date( 'U' ) / 60 ) / 60 ) ) );
180
+ }
181
+
182
+ /**
183
+ * A function to delete the current timestamp
184
+ *
185
+ * @since 2.1.4
186
+ * @return void
187
+ */
188
+ function swp_cache_delete_timestamp() {
189
+ delete_post_meta( get_the_ID() , 'swp_cache_timestamp' );
190
+ }
191
+ add_action( 'save_post', 'swp_cache_delete_timestamp' );
192
+ add_action( 'save_post', 'swp_cache_store_autoloads' );
193
+
194
+ /**
195
+ * A function to store all the fields for autoloading
196
+ *
197
+ * @since 2.1.4
198
+ * @return void
199
+ */
200
+ function swp_cache_store_autoloads() {
201
+ $post_id = get_the_ID();
202
+ if( 'publish' === get_post_status( $post_id ) ):
203
+ swp_cache_rebuild_pin_image($post_id);
204
+ swp_cache_rebuild_og_image($post_id);
205
+ endif;
206
+ }
207
+ /**
208
+ * Open Graph Image
209
+ *
210
+ * Convert the open graph image ID to a URL and store it in a meta field
211
+ * because then the URL will be autoloaded with the post preventing the
212
+ * need for an additional database query during page loads.
213
+ *
214
+ * @since 2.1.4
215
+ * @access public
216
+ * @param integer $post_id The ID of the post
217
+ * @return void
218
+ */
219
+ function swp_cache_rebuild_og_image($post_id) {
220
+
221
+ // Check if an OG image has been declared
222
+ $image_id = get_post_meta( $post_id , 'nc_ogImage' , true );
223
+ if ( $image_id ):
224
+
225
+ $cur_image_url = get_post_meta( $post_id , 'swp_open_graph_image_url' , true );
226
+ $new_image_url = wp_get_attachment_url( $image_id );
227
+
228
+ // No need to update the DB if the url hasn't changed
229
+ if( $cur_image_url !== $new_image_url ):
230
+
231
+ $image_data = wp_get_attachment_image_src( $image_id , 'full' );
232
+ delete_post_meta( $post_id , 'swp_open_graph_image_data' );
233
+ update_post_meta( $post_id , 'swp_open_graph_image_data' , json_encode( $image_data ) );
234
+
235
+ delete_post_meta( $post_id,'swp_open_graph_image_url' );
236
+ update_post_meta( $post_id,'swp_open_graph_image_url' , $new_image_url );
237
+
238
+ endif;
239
+ else:
240
+ delete_post_meta( $post_id,'swp_open_graph_image_url' );
241
+ endif;
242
+ }
243
+ /**
244
+ * Pinterest Image
245
+ *
246
+ * Convert the pinterest image ID to a URL and store it in a meta field
247
+ * because then the URL will be autoloaded with the post preventing the
248
+ * need for an additional database query during page loads.
249
+ *
250
+ * @since 2.1.4
251
+ * @access public
252
+ * @param integer $post_id The ID of the post
253
+ * @return void
254
+ */
255
+ function swp_cache_rebuild_pin_image($post_id) {
256
+
257
+ // Check if a custom pinterest image has been declared
258
+ $pin_image_id = get_post_meta( $post_id , 'nc_pinterestImage' , true );
259
+ if ( $pin_image_id ) :
260
+ $pin_image_url = wp_get_attachment_url( $pin_image_id );
261
+ $cur_image_url = get_post_meta( $post_id , 'swp_pinterest_image_url' , true );
262
+
263
+ // No need to update the database if the image URL has not changed
264
+ if($pin_image_url !== $cur_image_url):
265
+ delete_post_meta( $post_id,'swp_pinterest_image_url' );
266
+ update_post_meta( $post_id,'swp_pinterest_image_url' , $pin_image_url );
267
+ endif;
268
+ endif;
269
+ }
270
+
271
+ /**
272
+ * Update Facebook share counts.
273
+ *
274
+ * @since 2.1.0
275
+ * @return void
276
+ */
277
+
278
+ add_action( 'wp_ajax_swp_facebook_shares_update', 'swp_facebook_shares_update' );
279
+ add_action( 'wp_ajax_nopriv_swp_facebook_shares_update', 'swp_facebook_shares_update' );
280
+ function swp_facebook_shares_update() {
281
+ $post_id = $_POST['post_id'];
282
+ $activity = $_POST['activity'];
283
+
284
+ $previous_activity = get_post_meta( $post_id, '_facebook_shares', true );
285
+
286
+ if ( $activity > $previous_activity ) :
287
+ delete_post_meta( $post_id, '_facebook_shares' );
288
+ update_post_meta( $post_id, '_facebook_shares', $activity );
289
+ endif;
290
+
291
+ echo true;
292
+
293
+ wp_die();
294
+ }
295
+
296
+ add_filter( 'swp_footer_scripts' , 'swp_output_cache_trigger' );
297
+
298
+ /**
299
+ * Trigger cache rebuild.
300
+ *
301
+ * @since 1.4.7
302
+ * @access public
303
+ * @param array $info An array of footer script information.
304
+ * @return array $info A modified array of footer script information.
305
+ */
306
+ function swp_output_cache_trigger( $info ) {
307
+
308
+ if( $info['swp_user_options']['recover_shares'] == true ) {
309
+ $alternateURL = swp_get_alt_permalink( $info['postID'] );
310
+ $alternateURL = apply_filters( 'swp_recovery_filter',$alternateURL );
311
+ } else {
312
+ $alternateURL = false;
313
+ }
314
+
315
+ // Bail if we're not using the newer cache method.
316
+ if ( 'legacy' === $info['swp_user_options']['cacheMethod'] && is_singular() ) {
317
+ ob_start(); ?>
318
+
319
+ var swp_buttons_exist = !!document.getElementsByClassName( 'nc_socialPanel' );
320
+ if ( swp_buttons_exist ) {
321
+ swp_admin_ajax = '<?php echo admin_url( 'admin-ajax.php' ); ?>';
322
+ swp_post_id='<?php echo $info['postID']; ?>';
323
+ swp_post_url='<?php echo get_permalink(); ?>';
324
+ swp_post_recovery_url = '<?php echo $alternateURL; ?>';
325
+ socialWarfarePlugin.fetchShares();
326
+ }
327
+
328
+ <?php
329
+ $info['footer_output'] .= ob_get_clean();
330
+ return $info;
331
+ }
332
+
333
+ // Bail early if we're not on a single page or we have fresh cache.
334
+ if ( (! is_singular() || swp_is_cache_fresh( get_the_ID(), true )) && 'rebuild' !== get_query_var( 'swp_cache' ) ) {
335
+ return $info;
336
+ }
337
+
338
+ // Bail if we're on a WooCommerce account page.
339
+ if ( function_exists( 'is_account_page' ) && is_account_page() ) {
340
+ return $info;
341
+ }
342
+
343
+ // Trigger the cache rebuild.
344
+ if ( 'rebuild' === get_query_var( 'swp_cache' ) || false === swp_is_cache_fresh( get_the_ID(), true ) ) {
345
+ ob_start();
346
+
347
+ ?>
348
+ swp_admin_ajax = '<?php echo admin_url( 'admin-ajax.php' ); ?>';
349
+ var swp_buttons_exist = !!document.getElementsByClassName( 'nc_socialPanel' );
350
+ if ( swp_buttons_exist ) {
351
+ jQuery( document ).ready( function() {
352
+ var swp_cache_data = {
353
+ 'action': 'swp_cache_trigger',
354
+ 'post_id': <?php echo $info['postID']; ?>
355
+ };
356
+ jQuery.post( swp_admin_ajax, swp_cache_data, function( response ) {
357
+ console.log(response);
358
+ });
359
+ });
360
+ swp_post_id='<?php echo $info['postID']; ?>';
361
+ swp_post_url='<?php echo get_permalink(); ?>';
362
+ swp_post_recovery_url = '<?php echo $alternateURL; ?>';
363
+ socialWarfarePlugin.fetchShares();
364
+ }
365
+ <?php
366
+ $info['footer_output'] .= ob_get_clean();
367
+ }
368
+
369
+ return $info;
370
+ }
371
+
372
+ /**
373
+ * A function to remove fields that we no longer use
374
+ *
375
+ * @since 2.1.4
376
+ * @param integer $post_id The post ID
377
+ * @return void
378
+ */
379
+ function swp_cache_remove_unused_fields($post_id){
380
+ delete_post_meta( $post_id, 'sw_fb_author' );
381
+ delete_post_meta( $post_id, 'sw_open_graph_image_url' );
382
+ delete_post_meta( $post_id, 'sw_open_graph_image_data' );
383
+ delete_post_meta( $post_id, 'sw_open_thumbnail_url' );
384
+ delete_post_meta( $post_id, 'swp_open_thumbnail_url' );
385
+ delete_post_meta( $post_id, 'sw_pinterest_image_url' );
386
+ delete_post_meta( $post_id, 'swp_twitter_username' );
387
+ }
functions/share-count-class.php DELETED
@@ -1,102 +0,0 @@
1
- <?php
2
-
3
- /*****************************************************************
4
- * *
5
- * cURL - A Function to Process cURL requests *
6
- * *
7
- ******************************************************************/
8
-
9
- function swp_file_get_contents_curl($url){
10
- $ch=curl_init();
11
- curl_setopt($ch, CURLOPT_URL, $url);
12
- curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
13
- curl_setopt($ch, CURLOPT_FAILONERROR, 0);
14
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
15
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
16
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
17
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
18
- curl_setopt($ch, CURLOPT_TIMEOUT, 5);
19
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
20
- curl_setopt($ch, CURLOPT_NOSIGNAL, 1);
21
- curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
22
- $cont = @curl_exec($ch);
23
- $curl_errno = curl_errno($ch);
24
- if ($curl_errno > 0) {
25
- return 0;
26
- }
27
- return $cont;
28
- }
29
-
30
- /*****************************************************************
31
- * *
32
- * Twitter - A Function to Fetch Twitter Shares *
33
- * *
34
- ******************************************************************/
35
-
36
- function swp_fetch_twitter_shares($url) {
37
- $url = rawurlencode($url);
38
- $json_string = swp_file_get_contents_curl('https://urls.api.twitter.com/1/urls/count.json?url=' . $url);
39
- $json = json_decode($json_string, true);
40
- return isset($json['count'])?intval($json['count']):0;
41
- }
42
-
43
- /*****************************************************************
44
- * *
45
- * Facebook - A Function to Fetch Facebook Shares *
46
- * *
47
- ******************************************************************/
48
-
49
- function swp_fetch_facebook_shares($url) {
50
- $url = rawurlencode($url);
51
- $json_string = swp_file_get_contents_curl('https://api.facebook.com/restserver.php?method=links.getStats&format=json&urls='.$url);
52
- $json = json_decode($json_string, true);
53
- return isset($json[0]['total_count'])?intval($json[0]['total_count']):0;
54
- }
55
-
56
- /*****************************************************************
57
- * *
58
- * GooglePlus - A Function to Fetch GooglePlus Shares *
59
- * *
60
- ******************************************************************/
61
-
62
- function swp_fetch_googlePlus_shares($url) {
63
- $url = rawurlencode($url);
64
- $curl = curl_init();
65
- curl_setopt($curl, CURLOPT_URL, "https://clients6.google.com/rpc");
66
- curl_setopt($curl, CURLOPT_POST, true);
67
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
68
- curl_setopt($curl, CURLOPT_POSTFIELDS, '[{"method":"pos.plusones.get","id":"p","params":{"nolog":true,"id":"'.rawurldecode($url).'","source":"widget","userId":"@viewer","groupId":"@self"},"jsonrpc":"2.0","key":"p","apiVersion":"v1"}]');
69
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
70
- curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
71
- $curl_results = curl_exec ($curl);
72
- curl_close ($curl);
73
- $json = json_decode($curl_results, true);
74
- return isset($json[0]['result']['metadata']['globalCounts']['count'])?intval( $json[0]['result']['metadata']['globalCounts']['count'] ):0;
75
- }
76
-
77
- /*****************************************************************
78
- * *
79
- * Pinterest - A Function to Fetch Pinterest Shares *
80
- * *
81
- ******************************************************************/
82
-
83
- function swp_fetch_pinterest_shares($url) {
84
- $url = rawurlencode($url);
85
- $return_data = swp_file_get_contents_curl('https://api.pinterest.com/v1/urls/count.json?url='.$url);
86
- $json_string = preg_replace('/^receiveCount\((.*)\)$/', "\\1", $return_data);
87
- $json = json_decode($json_string, true);
88
- return isset($json['count'])?intval($json['count']):0;
89
- }
90
-
91
- /*****************************************************************
92
- * *
93
- * LinkedIn - A Function to Fetch LinkedIn Shares *
94
- * *
95
- ******************************************************************/
96
-
97
- function swp_fetch_linkedIn_shares($url) {
98
- $url = rawurlencode($url);
99
- $json_string = swp_file_get_contents_curl('https://www.linkedin.com/countserv/count/share?url='.$url.'&format=json');
100
- $json = json_decode($json_string, true);
101
- return isset($json['count'])?intval($json['count']):0;
102
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/share-count-function.php CHANGED
@@ -1,135 +1,134 @@
1
  <?php
2
 
3
- /*****************************************************************
4
- * *
5
- * FUNCTION TO FETCH ALL THE NETWORK SHARES *
6
- * *
7
- ******************************************************************/
8
- function get_social_warfare_shares($postID) {
9
-
10
- // Set the initial options
11
- $options = swp_get_user_options();
12
- $url = get_permalink( $postID );
13
- // $url = 'https://youtu.be/jjK1aUU2Dx4';
14
-
15
- /*****************************************************************
16
- * *
17
- * Check the Cache *
18
- * *
19
- ******************************************************************/
20
-
21
- $freshCache = swp_is_cache_fresh($postID);
22
- // $freshCache = false;
23
-
24
- /*****************************************************************
25
- * *
26
- * Setup the Networks Array that we'll loop through *
27
- * *
28
- ******************************************************************/
29
-
30
- // Initiate the ShareCount class
31
- $shares['totes'] = 0;
32
-
33
- // Queue up the networks that are available
34
- $availableNetworks = $options['newOrderOfIcons'];
35
- $networks = array();
36
- foreach($availableNetworks as $key => $value):
37
- if($options['newOrderOfIcons'][$key]) $networks[] = $key;
38
- endforeach;
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
- /*****************************************************************
41
- * *
42
- * Loop through the Networks *
43
- * *
44
- ******************************************************************/
45
-
46
- // Loop through the networks and fetch their share counts
47
- foreach($networks as $network):
48
-
49
- // Check if we can used the cached share numbers
50
- if($freshCache == true):
51
- $shares[$network] = get_post_meta($postID,'_'.$network.'_shares',true);
52
-
53
  // If cache is expired, fetch new and update the cache
54
- else:
55
- $old_shares[$network] = get_post_meta($postID,'_'.$network.'_shares',true);
56
- $share_links[$network] = call_user_func('swp_'.$network.'_request_link',$url);
57
  endif;
58
 
59
  endforeach;
60
-
61
  // Recover Shares From Previously Used URL Patterns
62
- if($options['recover_shares'] == true && $freshCache == false):
63
-
64
- $alternateURL = swp_get_alt_permalink($postID);
65
- $alternateURL = apply_filters('swp_recovery_filter',$alternateURL);
66
-
67
- // Debug the Alternate URL being checked
68
- if(isset($_GET['swp_recovery_debug']) && $_GET['swp_recovery_debug'] == true):
69
- echo $alternateURL;
70
- endif;
71
-
72
- foreach($networks as $network):
73
-
74
- $old_share_links[$network] = call_user_func('swp_'.$network.'_request_link',$alternateURL);
75
-
76
  endforeach;
77
  endif;
78
-
79
- if($freshCache == true):
80
- if(get_post_meta($postID,'_totes',true)) :
81
- $shares['totes'] = get_post_meta($postID,'_totes',true);
82
- else:
83
  $shares['totes'] = 0;
84
  endif;
85
- else:
86
-
87
  // Fetch all the share counts asyncrounously
88
- $raw_shares_array = swp_fetch_shares_via_curl_multi($share_links);
89
- if($options['recover_shares'] == true):
90
- $old_raw_shares_array = swp_fetch_shares_via_curl_multi($old_share_links);
91
  endif;
92
 
93
- foreach($networks as $network):
94
-
95
- if(!isset($raw_shares_array[$network])) $raw_shares_array[$network] = 0;
96
- if(!isset($old_raw_shares_array[$network])) $old_raw_shares_array[$network] = 0;
97
-
98
- $shares[$network] = call_user_func('swp_format_'.$network.'_response',$raw_shares_array[$network]);
99
- if($options['recover_shares'] == true):
100
- $recovered_shares[$network] = call_user_func('swp_format_'.$network.'_response',$old_raw_shares_array[$network]);
101
- if($shares[$network] != $recovered_shares[$network]):
102
- $shares[$network] = $shares[$network] + $recovered_shares[$network];
 
 
103
  endif;
104
  endif;
105
- if($shares[$network] <= $old_shares[$network]):
106
- $shares[$network] = $old_shares[$network];
107
- else:
108
- delete_post_meta($postID,'_'.$network.'_shares');
109
- update_post_meta($postID,'_'.$network.'_shares',$shares[$network]);
110
  endif;
111
- $shares['totes'] += $shares[$network];
112
-
113
  endforeach;
114
  endif;
115
 
116
- /*****************************************************************
117
- * *
118
- * Update the Cache and Return the Share Counts *
119
- * *
120
- ******************************************************************/
121
 
122
- if($freshCache != true):
123
-
124
  // Clean out the previously used custom meta fields
125
- delete_post_meta($postID,'_totes');
126
-
127
  // Add the new data to the custom meta fields
128
- update_post_meta($postID,'_totes',$shares['totes']);
129
 
130
  endif;
131
 
132
  // Return the share counts
133
  return $shares;
134
 
135
- }
1
  <?php
2
 
3
+ /**
4
+ * A function to fetch all the social shares
5
+ *
6
+ * @since 1.0.0
7
+ * @param integer $postID The post ID
8
+ * @return array $shares An array of share data
9
+ */
10
+ function get_social_warfare_shares( $postID ) {
11
+ global $swp_user_options;
12
+
13
+ // Set the initial options
14
+ $options = $swp_user_options;
15
+ $url = get_permalink( $postID );
16
+
17
+ /**
18
+ * Check if the cache is fresh or expired
19
+ * @var boolean
20
+ */
21
+ $freshCache = swp_is_cache_fresh( $postID );
22
+
23
+ /**
24
+ * Setup the networks array that we'll loop through
25
+ */
26
+
27
+ // Initiate the ShareCount variable
28
+ $shares['totes'] = 0;
29
+
30
+ // Queue up the networks that are available
31
+ $availableNetworks = $options['newOrderOfIcons'];
32
+ $networks = array();
33
+ foreach ( $availableNetworks as $key => $value ) :
34
+ if ( $options['newOrderOfIcons'][ $key ] ) {
35
+ $networks[] = $key;
36
+ }
37
+ endforeach;
38
+
39
+ $icons_array = array(
40
+ 'type' => 'buttons'
41
+ );
42
+
43
+ /**
44
+ * Loop through the Networks and fetch their share counts
45
+ */
46
+ if(isset($networks['active'])) { unset($networks['active']); }
47
+ foreach ( $networks as $network ) :
48
+
49
+ // Check if we can used the cached share numbers
50
+ if ( $freshCache == true ) :
51
+ $shares[ $network ] = get_post_meta( $postID,'_' . $network . '_shares',true );
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  // If cache is expired, fetch new and update the cache
54
+ else :
55
+ $old_shares[ $network ] = get_post_meta( $postID,'_' . $network . '_shares',true );
56
+ $share_links[ $network ] = call_user_func( 'swp_' . $network . '_request_link',$url );
57
  endif;
58
 
59
  endforeach;
60
+
61
  // Recover Shares From Previously Used URL Patterns
62
+ if ( $options['recover_shares'] == true && $freshCache == false ) :
63
+
64
+ $alternateURL = swp_get_alt_permalink( $postID );
65
+ $alternateURL = apply_filters( 'swp_recovery_filter',$alternateURL );
66
+
67
+ // Debug the Alternate URL being checked
68
+ if ( _swp_is_debug( 'recovery' ) ) {
69
+ echo $alternateURL;
70
+ }
71
+
72
+ foreach ( $networks as $network ) :
73
+
74
+ $old_share_links[ $network ] = call_user_func( 'swp_' . $network . '_request_link',$alternateURL );
75
+
76
  endforeach;
77
  endif;
78
+
79
+ if ( $freshCache == true ) :
80
+ if ( get_post_meta( $postID,'_totes',true ) ) :
81
+ $shares['totes'] = get_post_meta( $postID,'_totes',true );
82
+ else :
83
  $shares['totes'] = 0;
84
  endif;
85
+ else :
86
+
87
  // Fetch all the share counts asyncrounously
88
+ $raw_shares_array = swp_fetch_shares_via_curl_multi( $share_links );
89
+ if ( $options['recover_shares'] == true ) :
90
+ $old_raw_shares_array = swp_fetch_shares_via_curl_multi( $old_share_links );
91
  endif;
92
 
93
+ foreach ( $networks as $network ) :
94
+
95
+ if ( ! isset( $raw_shares_array[ $network ] ) ) { $raw_shares_array[ $network ] = 0;
96
+ }
97
+ if ( ! isset( $old_raw_shares_array[ $network ] ) ) { $old_raw_shares_array[ $network ] = 0;
98
+ }
99
+
100
+ $shares[ $network ] = call_user_func( 'swp_format_' . $network . '_response',$raw_shares_array[ $network ] );
101
+ if ( $options['recover_shares'] == true ) :
102
+ $recovered_shares[ $network ] = call_user_func( 'swp_format_' . $network . '_response',$old_raw_shares_array[ $network ] );
103
+ if ( $shares[ $network ] != $recovered_shares[ $network ] ) :
104
+ $shares[ $network ] = $shares[ $network ] + $recovered_shares[ $network ];
105
  endif;
106
  endif;
107
+ if ( $shares[ $network ] <= $old_shares[ $network ] ) :
108
+ $shares[ $network ] = $old_shares[ $network ];
109
+ else :
110
+ delete_post_meta( $postID,'_' . $network . '_shares' );
111
+ update_post_meta( $postID,'_' . $network . '_shares',$shares[ $network ] );
112
  endif;
113
+ $shares['totes'] += $shares[ $network ];
114
+
115
  endforeach;
116
  endif;
117
 
118
+ /**
119
+ * Update the Cache and Return the Share Counts
120
+ */
121
+ if ( $freshCache != true ) :
 
122
 
 
 
123
  // Clean out the previously used custom meta fields
124
+ delete_post_meta( $postID,'_totes' );
125
+
126
  // Add the new data to the custom meta fields
127
+ update_post_meta( $postID,'_totes',$shares['totes'] );
128
 
129
  endif;
130
 
131
  // Return the share counts
132
  return $shares;
133
 
134
+ }
functions/shortcodes.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * **************************************************************
4
+ * *
5
+ * #1: The Social Warfare Buttons Shortcode [social_warfare] *
6
+ * *
7
+ ******************************************************************/
8
+
9
+ function socialWarfareShortcode( $atts ) {
10
+ return socialWarfare( false,'after',false );
11
+ }
12
+ function social_warfareShortcode( $array ) {
13
+ if ( ! isset( $array['where'] ) ) { $array['where'] = 'after'; }
14
+ if ( ! isset( $array['echo'] ) ) { $array['echo'] = false; }
15
+ if ( ! isset( $array['content'] ) ) { $array['content'] = false; }
16
+ $array['shortcode'] = true;
17
+ $array['devs'] = true;
18
+ return social_warfare( $array );
19
+ }
20
+
21
+ add_shortcode( 'socialWarfare', 'socialWarfareShortcode' );
22
+ add_shortcode( 'social_warfare', 'social_warfareShortcode' );
23
+
24
+ /**
25
+
26
+ * **************************************************************
27
+ * *
28
+ * #2: The Post Total Shares Shortcode [total_shares] *
29
+ * *
30
+ ******************************************************************/
31
+
32
+ function swp_post_totes_function( $atts ) {
33
+ $totes = get_post_meta( get_the_ID() , '_totes', true );
34
+ $totes = swp_kilomega( $totes );
35
+ return $totes;
36
+ }
37
+
38
+ add_shortcode( 'total_shares', 'swp_post_totes_function' );
39
+
40
+ /**
41
+
42
+ * **************************************************************
43
+ * *
44
+ * #3: The Sitewide Total Shares Shortcode [sitewide_shares] *
45
+ * *
46
+ ******************************************************************/
47
+ // * Social Warfare Sitewide shares
48
+ function swp_sitewide_shares_function( $atts ) {
49
+ global $wpdb;
50
+ $sum = $wpdb->get_results( "SELECT SUM(meta_value) AS total FROM $wpdb->postmeta WHERE meta_key = '_totes'" );
51
+ return swp_kilomega( $sum[0]->total );
52
+ }
53
+ add_shortcode( 'sitewide_shares', 'swp_sitewide_shares_function' );
functions/social-networks/buffer.php DELETED
@@ -1,208 +0,0 @@
1
- <?php
2
-
3
-
4
-
5
- /*****************************************************************
6
-
7
- * *
8
-
9
- * #1: Add the On / Off Switch and Sortable Option *
10
-
11
- * *
12
-
13
- ******************************************************************/
14
-
15
- add_filter('swp_button_options', 'swp_buffer_options_function',20);
16
-
17
- function swp_buffer_options_function($options) {
18
-
19
-
20
-
21
- // Create the new option in a variable to be inserted
22
-
23
- $options['content']['buffer'] = array(
24
-
25
- 'type' => 'checkbox',
26
-
27
- 'content' => 'Buffer',
28
-
29
- 'default' => false,
30
-
31
- 'premium' => true
32
-
33
- );
34
-
35
-
36
-
37
- return $options;
38
-
39
-
40
-
41
- };
42
-
43
- /*****************************************************************
44
-
45
- * *
46
-
47
- * #2: Add it to global network array *
48
-
49
- * *
50
-
51
- ******************************************************************/
52
-
53
- // Queue up your filter to be ran on the swp_options hook.
54
-
55
- add_filter('swp_add_networks', 'swp_buffer_network');
56
-
57
-
58
-
59
- // Create the function that will filter the options
60
-
61
- function swp_buffer_network($networks) {
62
-
63
-
64
-
65
- // Add your network to the existing network array
66
-
67
- $networks[] = 'buffer';
68
-
69
-
70
-
71
- // Be sure to return the modified options array or the world will explode
72
-
73
- return $networks;
74
-
75
- };
76
-
77
- /*****************************************************************
78
-
79
- * *
80
-
81
- * #3: Generate the API Share Count Request URL *
82
-
83
- * *
84
-
85
- ******************************************************************/
86
-
87
- function swp_buffer_request_link($url) {
88
-
89
- $request_url = 'https://api.bufferapp.com/1/links/shares.json?url='.$url;
90
-
91
- return $request_url;
92
-
93
- }
94
-
95
- /*****************************************************************
96
-
97
- * *
98
-
99
- * #4: Parse the Response to get the share count *
100
-
101
- * *
102
-
103
- ******************************************************************/
104
-
105
- function swp_format_buffer_response($response) {
106
-
107
- $response = json_decode($response, true);
108
-
109
- return isset($response['shares'])?intval($response['shares']):0;
110
-
111
- }
112
-
113
- /*****************************************************************
114
-
115
- * *
116
-
117
- * #5: Create the Button HTML *
118
-
119
- * *
120
-
121
- ******************************************************************/
122
-
123
- add_filter('swp_network_buttons', 'swp_buffer_button_html',10);
124
-
125
- function swp_buffer_button_html($array) {
126
-
127
-
128
-
129
- // If we've already generated this button, just use our existing html
130
-
131
- if(isset($_GLOBALS['sw']['buttons'][$array['postID']]['buffer'])):
132
-
133
- $array['resource']['buffer'] = $_GLOBALS['sw']['buttons'][$array['postID']]['buffer'];
134
-
135
-
136
-
137
- // If not, let's check if Buffer is activated and create the button HTML
138
-
139
- elseif( (isset($array['options']['newOrderOfIcons']['buffer']) && !isset($array['buttons'])) || (isset($array['buttons']) && isset($array['buttons']['buffer'])) ):
140
-
141
-
142
-
143
- // Collect the Title
144
-
145
- $title = get_post_meta( $array['postID'] , 'nc_ogTitle' , true );
146
-
147
- if(!$title):
148
-
149
- $title = get_the_title();
150
-
151
- endif;
152
-
153
-
154
-
155
- $array['totes'] += $array['shares']['buffer'];
156
-
157
- ++$array['count'];
158
-
159
-
160
-
161
- $array['resource']['buffer'] = '<div class="nc_tweetContainer swp_buffer" data-id="'.$array['count'].'" data-network="buffer">';
162
-
163
- $link = urlencode(urldecode(swp_process_url( $array['url'] , 'buffer' , $array['postID'] )));
164
-
165
- $array['resource']['buffer'] .= '<a target="_blank" href="http://bufferapp.com/add?url='.$link.'&text='.urlencode(html_entity_decode($title, ENT_COMPAT, 'UTF-8')).'" data-link="http://bufferapp.com/add?url='.$link.'&text='.urlencode(html_entity_decode($title, ENT_COMPAT, 'UTF-8')).'" class="nc_tweet buffer_link">';
166
-
167
- if($array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && $array['shares']['buffer'] > 0):
168
-
169
- $array['resource']['buffer'] .= '<span class="iconFiller">';
170
-
171
- $array['resource']['buffer'] .= '<span class="spaceManWilly">';
172
-
173
- $array['resource']['buffer'] .= '<i class="sw sw-buffer"></i>';
174
-
175
- $array['resource']['buffer'] .= '<span class="swp_share"> '.__('Buffer','social-warfare').'</span>';
176
-
177
- $array['resource']['buffer'] .= '</span></span>';
178
-
179
- $array['resource']['buffer'] .= '<span class="swp_count">'.swp_kilomega($array['shares']['buffer']).'</span>';
180
-
181
- else:
182
-
183
- $array['resource']['buffer'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-buffer"></i><span class="swp_share"> '.__('Buffer','social-warfare').'</span></span></span></span>';
184
-
185
- endif;
186
-
187
- $array['resource']['buffer'] .= '</a>';
188
-
189
- $array['resource']['buffer'] .= '</div>';
190
-
191
-
192
-
193
- // Store these buttons so that we don't have to generate them for each set
194
-
195
- $_GLOBALS['sw']['buttons'][$array['postID']]['buffer'] = $array['resource']['buffer'];
196
-
197
-
198
-
199
- endif;
200
-
201
-
202
-
203
- return $array;
204
-
205
-
206
-
207
- };
208
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/social-networks/email.php DELETED
@@ -1,89 +0,0 @@
1
- <?php
2
-
3
- /*****************************************************************
4
- * *
5
- * #1: Add the On / Off Switch and Sortable Option *
6
- * *
7
- ******************************************************************/
8
- add_filter('swp_button_options', 'swp_email_options_function',20);
9
- function swp_email_options_function($options) {
10
-
11
- // Create the new option in a variable to be inserted
12
- $options['content']['email'] = array(
13
- 'type' => 'checkbox',
14
- 'content' => 'Email',
15
- 'default' => false,
16
- 'premium' => true
17
- );
18
-
19
- return $options;
20
-
21
- };
22
- /*****************************************************************
23
- * *
24
- * #2: Add it to global network array *
25
- * *
26
- ******************************************************************/
27
- // Queue up your filter to be ran on the swp_options hook.
28
- add_filter('swp_add_networks', 'swp_email_network');
29
-
30
- // Create the function that will filter the options
31
- function swp_email_network($networks) {
32
-
33
- // Add your network to the existing network array
34
- $networks[] = 'email';
35
-
36
- // Be sure to return the modified options array or the world will explode
37
- return $networks;
38
- };
39
- /*****************************************************************
40
- * *
41
- * #3: Generate the API Share Count Request URL *
42
- * *
43
- ******************************************************************/
44
- function swp_email_request_link($url) {
45
- return 0;
46
- }
47
- /*****************************************************************
48
- * *
49
- * #4: Parse the Response to get the share count *
50
- * *
51
- ******************************************************************/
52
- function swp_format_email_response($response) {
53
- return 0;
54
- }
55
- /*****************************************************************
56
- * *
57
- * #5: Create the Button HTML *
58
- * *
59
- ******************************************************************/
60
- add_filter('swp_network_buttons', 'swp_email_button_html',10);
61
- function swp_email_button_html($array) {
62
-
63
- if( (isset($array['options']['newOrderOfIcons']['email']) && !isset($array['buttons'])) || (isset($array['buttons']) && isset($array['buttons']['email'])) ):
64
-
65
- // Collect the Title
66
- $title = get_post_meta( $array['postID'] , 'nc_ogTitle' , true );
67
- if(!$title):
68
- $title = get_the_title();
69
- endif;
70
-
71
- // Collect the Description
72
- $description = get_post_meta( $array['postID'] , 'nc_ogDescription' , true );
73
- if(!$description):
74
- $description = swp_get_excerpt_by_id($array['postID']);
75
- endif;
76
- ++$array['count'];
77
-
78
- $array['resource']['email'] = '<div class="nc_tweetContainer swp_email" data-id="'.$array['count'].'" data-network="email">';
79
- $link = urlencode(urldecode(swp_process_url( $array['url'] , 'email' , $array['postID'] )));
80
- $array['resource']['email'] .= '<a href="mailto:?subject='.str_replace('&amp;','%26',rawurlencode(html_entity_decode($title, ENT_COMPAT, 'UTF-8'))).'&body='.str_replace('&amp;','%26',rawurlencode(html_entity_decode($description, ENT_COMPAT, 'UTF-8'))).rawurlencode(' Read here: ') .$link.'" class="nc_tweet noPop">';
81
- $array['resource']['email'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-email"></i><span class="swp_share"> '.__('Email','social-warfare').'</span></span></span></span>';
82
- $array['resource']['email'] .= '</a>';
83
- $array['resource']['email'] .= '</div>';
84
-
85
- endif;
86
-
87
- return $array;
88
-
89
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/social-networks/facebook.php CHANGED
@@ -1,98 +1,132 @@
1
  <?php
2
 
3
- /*****************************************************************
4
- * *
5
- * #1: Add the On / Off Switch and Sortable Option *
6
- * *
7
- ******************************************************************/
8
- add_filter('swp_button_options', 'swp_facebook_options_function',20);
9
- function swp_facebook_options_function($options) {
10
-
11
- // Create the new option in a variable to be inserted
12
- $options['content']['facebook'] = array(
13
- 'type' => 'checkbox',
14
- 'content' => 'Facebook',
15
- 'default' => true,
16
- 'premium' => false
17
- );
18
-
19
- return $options;
20
-
21
- };
22
- /*****************************************************************
 
 
 
 
23
  * *
24
  * #2: Add it to global network array *
25
  * *
26
- ******************************************************************/
27
  // Queue up your filter to be ran on the swp_options hook.
28
- add_filter('swp_add_networks', 'swp_facebook_network');
29
 
30
  // Create the function that will filter the options
31
- function swp_facebook_network($networks) {
32
 
33
- // Add your network to the existing network array
34
- $networks[] = 'facebook';
35
 
36
- // Be sure to return the modified options array or the world will explode
37
- return $networks;
38
- };
39
- /*****************************************************************
40
- * *
41
- * #3: Generate the API Share Count Request URL *
42
- * *
43
- ******************************************************************/
44
- function swp_facebook_request_link($url) {
45
- $request_url = 'https://api.facebook.com/restserver.php?method=links.getStats&format=json&urls='.$url;
46
- return $request_url;
47
- }
48
- /*****************************************************************
49
- * *
50
- * #4: Parse the Response to get the share count *
51
- * *
52
- ******************************************************************/
53
- function swp_format_facebook_response($response) {
54
- $response = json_decode($response, true);
55
- return isset($response[0]['total_count'])?intval($response[0]['total_count']):0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  }
57
- /*****************************************************************
 
 
 
 
 
58
  * *
59
  * #5: Create the Button HTML *
60
  * *
61
- ******************************************************************/
62
- add_filter('swp_network_buttons', 'swp_facebook_button_html',10);
63
- function swp_facebook_button_html($array) {
64
 
65
- // If we've already generated this button, just use our existing html
66
- if(isset($_GLOBALS['sw']['buttons'][$array['postID']]['facebook'])):
67
- $array['resource']['facebook'] = $_GLOBALS['sw']['buttons'][$array['postID']]['facebook'];
68
 
69
  // If not, let's check if Facebook is activated and create the button HTML
70
- elseif( (isset($array['options']['newOrderOfIcons']['facebook']) && !isset($array['buttons'])) || (isset($array['buttons']) && isset($array['buttons']['facebook'])) ):
71
 
72
- $array['totes'] += $array['shares']['facebook'];
73
  ++$array['count'];
74
 
75
- $array['resource']['facebook'] = '<div class="nc_tweetContainer swp_fb" data-id="'.$array['count'].'" data-network="facebook">';
76
- $link = urlencode(urldecode(swp_process_url( $array['url'] , 'facebook' , $array['postID'] )));
77
- $array['resource']['facebook'] .= '<a target="_blank" href="http://www.facebook.com/share.php?u='.$link.'" data-link="http://www.facebook.com/share.php?u='.$link.'" class="nc_tweet">';
78
- if($array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && $array['shares']['facebook'] > 0):
79
  $array['resource']['facebook'] .= '<span class="iconFiller">';
80
  $array['resource']['facebook'] .= '<span class="spaceManWilly">';
81
  $array['resource']['facebook'] .= '<i class="sw sw-facebook"></i>';
82
- $array['resource']['facebook'] .= '<span class="swp_share"> '.__('Share','social-warfare').'</span>';
83
  $array['resource']['facebook'] .= '</span></span>';
84
- $array['resource']['facebook'] .= '<span class="swp_count">'.swp_kilomega($array['shares']['facebook']).'</span>';
85
- else:
86
- $array['resource']['facebook'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-facebook"></i><span class="swp_share"> '.__('Share','social-warfare').'</span></span></span></span>';
87
  endif;
88
  $array['resource']['facebook'] .= '</a>';
89
  $array['resource']['facebook'] .= '</div>';
90
 
91
  // Store these buttons so that we don't have to generate them for each set
92
- $_GLOBALS['sw']['buttons'][$array['postID']]['facebook'] = $array['resource']['facebook'];
93
 
94
  endif;
95
 
96
  return $array;
97
 
98
- };
1
  <?php
2
 
3
+ /**
4
+
5
+ * **************************************************************
6
+ * *
7
+ * #1: Add the On / Off Switch and Sortable Option *
8
+ * *
9
+ ******************************************************************/
10
+ add_filter( 'swp_button_options', 'swp_facebook_options_function',20 );
11
+ function swp_facebook_options_function( $options ) {
12
+
13
+ // Create the new option in a variable to be inserted
14
+ $options['content']['facebook'] = array(
15
+ 'type' => 'checkbox',
16
+ 'content' => 'Facebook',
17
+ 'default' => true,
18
+ 'premium' => false,
19
+ );
20
+
21
+ return $options;
22
+
23
+ };
24
+ /**
25
+
26
+ ***************************************************************
27
  * *
28
  * #2: Add it to global network array *
29
  * *
30
+ */
31
  // Queue up your filter to be ran on the swp_options hook.
32
+ add_filter( 'swp_add_networks', 'swp_facebook_network' );
33
 
34
  // Create the function that will filter the options
35
+ function swp_facebook_network( $networks ) {
36
 
37
+ // Add your network to the existing network array
38
+ $networks[] = 'facebook';
39
 
40
+ // Be sure to return the modified options array or the world will explode
41
+ return $networks;
42
+ };
43
+ /**
44
+
45
+ * **************************************************************
46
+ * *
47
+ * #3: Generate the API Share Count Request URL *
48
+ * *
49
+ ******************************************************************/
50
+ function swp_facebook_request_link( $url ) {
51
+ $request_url = 'https://graph.facebook.com/?id=' . $url;
52
+ return $request_url;
53
+ }
54
+ /**
55
+
56
+ * **************************************************************
57
+ * *
58
+ * #4: Parse the Response to get the share count *
59
+ * *
60
+ ******************************************************************/
61
+ function swp_format_facebook_response( $response ) {
62
+
63
+ $url = get_permalink( get_the_ID() );
64
+
65
+ // Parse the original request for shares
66
+ $response = json_decode( $response, true );
67
+
68
+ // Create a second request for likes and comments
69
+ $request_url = 'https://graph.facebook.com/?id=' . $url . '&fields=og_object{likes.summary(true),comments.summary(true)}';
70
+ $next_response = swp_file_get_contents_curl( $request_url );
71
+ $next_response = json_decode( $next_response, true );
72
+
73
+ // Fetch our counts for all three
74
+ $shares = isset( $response['share']['share_count'] )?intval( $response['share']['share_count'] ):0;
75
+ $likes = isset( $next_response['og_object']['likes']['summary']['total_count'] )?intval( $next_response['og_object']['likes']['summary']['total_count'] ):0;
76
+ $comments = isset( $next_response['og_object']['comments']['summary']['total_count'] )?intval( $next_response['og_object']['comments']['summary']['total_count'] ):0;
77
+ $total_activity = $shares + $likes + $comments;
78
+
79
+ if ( _swp_is_debug( 'facebook' ) ) {
80
+ var_dump( $facebook_id );
81
+ var_dump( $response );
82
+ var_dump( $next_response );
83
+ var_dump( $shares );
84
+ var_dump( $total_activity );
85
  }
86
+
87
+ return $total_activity;
88
+ }
89
+ /**
90
+
91
+ ***************************************************************
92
  * *
93
  * #5: Create the Button HTML *
94
  * *
95
+ */
96
+ add_filter( 'swp_network_buttons', 'swp_facebook_button_html',10 );
97
+ function swp_facebook_button_html( $array ) {
98
 
99
+ // If we've already generated this button, just use our existing html
100
+ if ( isset( $_GLOBALS['sw']['buttons'][ $array['postID'] ]['facebook'] ) ) :
101
+ $array['resource']['facebook'] = $_GLOBALS['sw']['buttons'][ $array['postID'] ]['facebook'];
102
 
103
  // If not, let's check if Facebook is activated and create the button HTML
104
+ elseif ( (isset( $array['options']['newOrderOfIcons']['facebook'] ) && ! isset( $array['buttons'] )) || (isset( $array['buttons'] ) && isset( $array['buttons']['facebook'] )) ) :
105
 
106
+ $array['totes'] += intval( $array['shares']['facebook'] );
107
  ++$array['count'];
108
 
109
+ $array['resource']['facebook'] = '<div class="nc_tweetContainer swp_fb" data-id="' . $array['count'] . '" data-network="facebook">';
110
+ $link = urlencode( urldecode( swp_process_url( $array['url'] , 'facebook' , $array['postID'] ) ) );
111
+ $array['resource']['facebook'] .= '<a rel="nofollow" target="_blank" href="http://www.facebook.com/share.php?u=' . $link . '" data-link="http://www.facebook.com/share.php?u=' . $link . '" class="nc_tweet">';
112
+ if ( $array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && $array['shares']['facebook'] > 0 ) :
113
  $array['resource']['facebook'] .= '<span class="iconFiller">';
114
  $array['resource']['facebook'] .= '<span class="spaceManWilly">';
115
  $array['resource']['facebook'] .= '<i class="sw sw-facebook"></i>';
116
+ $array['resource']['facebook'] .= '<span class="swp_share"> ' . __( 'Share','social-warfare' ) . '</span>';
117
  $array['resource']['facebook'] .= '</span></span>';
118
+ $array['resource']['facebook'] .= '<span class="swp_count">' . swp_kilomega( $array['shares']['facebook'] ) . '</span>';
119
+ else :
120
+ $array['resource']['facebook'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-facebook"></i><span class="swp_share"> ' . __( 'Share','social-warfare' ) . '</span></span></span></span>';
121
  endif;
122
  $array['resource']['facebook'] .= '</a>';
123
  $array['resource']['facebook'] .= '</div>';
124
 
125
  // Store these buttons so that we don't have to generate them for each set
126
+ $_GLOBALS['sw']['buttons'][ $array['postID'] ]['facebook'] = $array['resource']['facebook'];
127
 
128
  endif;
129
 
130
  return $array;
131
 
132
+ };
functions/social-networks/flipboard.php DELETED
@@ -1,89 +0,0 @@
1
- <?php
2
-
3
- /*****************************************************************
4
- * *
5
- * #1: Add the On / Off Switch and Sortable Option *
6
- * *
7
- ******************************************************************/
8
- add_filter('swp_button_options', 'swp_flipboard_options_function',20);
9
- function swp_flipboard_options_function($options) {
10
-
11
- // Create the new option in a variable to be inserted
12
- $options['content']['flipboard'] = array(
13
- 'type' => 'checkbox',
14
- 'content' => 'Flipboard',
15
- 'default' => false,
16
- 'premium' => true
17
- );
18
-
19
- return $options;
20
-
21
- };
22
- /*****************************************************************
23
- * *
24
- * #2: Add it to global network array *
25
- * *
26
- ******************************************************************/
27
- // Queue up your filter to be ran on the swp_options hook.
28
- add_filter('swp_add_networks', 'swp_flipboard_network');
29
-
30
- // Create the function that will filter the options
31
- function swp_flipboard_network($networks) {
32
-
33
- // Add your network to the existing network array
34
- $networks[] = 'flipboard';
35
-
36
- // Be sure to return the modified options array or the world will explode
37
- return $networks;
38
- };
39
- /*****************************************************************
40
- * *
41
- * #3: Generate the API Share Count Request URL *
42
- * *
43
- ******************************************************************/
44
- function swp_flipboard_request_link($url) {
45
- return 0;
46
- }
47
- /*****************************************************************
48
- * *
49
- * #4: Parse the Response to get the share count *
50
- * *
51
- ******************************************************************/
52
- function swp_format_flipboard_response($response) {
53
- return 0;
54
- }
55
- /*****************************************************************
56
- * *
57
- * #5: Create the Button HTML *
58
- * *
59
- ******************************************************************/
60
- add_filter('swp_network_buttons', 'swp_flipboard_button_html',10);
61
- function swp_flipboard_button_html($array) {
62
-
63
- if( (isset($array['options']['newOrderOfIcons']['flipboard']) && !isset($array['buttons'])) || (isset($array['buttons']) && isset($array['buttons']['flipboard'])) ):
64
-
65
- // Collect the Title
66
- $title = get_post_meta( $array['postID'] , 'nc_ogTitle' , true );
67
- if(!$title):
68
- $title = get_the_title();
69
- endif;
70
-
71
- // Collect the Description
72
- $description = get_post_meta( $array['postID'] , 'nc_ogDescription' , true );
73
- if(!$description):
74
- $description = swp_get_excerpt_by_id($array['postID']);
75
- endif;
76
- ++$array['count'];
77
-
78
- $array['resource']['flipboard'] = '<div class="nc_tweetContainer swp_flipboard" data-id="'.$array['count'].'" data-network="flipboard">';
79
- $link = urlencode(urldecode(swp_process_url( $array['url'] , 'flipboard' , $array['postID'] )));
80
- $array['resource']['flipboard'] .= '<a href="https://share.flipboard.com/bookmarklet/popout?v=2&title=Tools%20-%20Flipboard&url='.$link.'" data-link="https://share.flipboard.com/bookmarklet/popout?v=2&title=Tools%20-%20Flipboard&url='.$link.'" class="nc_tweet flipboard">';
81
- $array['resource']['flipboard'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-flipboard"></i><span class="swp_share"> '.__('Flip','social-warfare').'</span></span></span></span>';
82
- $array['resource']['flipboard'] .= '</a>';
83
- $array['resource']['flipboard'] .= '</div>';
84
-
85
- endif;
86
-
87
- return $array;
88
-
89
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/social-networks/googlePlus.php CHANGED
@@ -1,97 +1,107 @@
1
  <?php
2
 
3
- /*****************************************************************
4
- * *
5
- * #1: Add the On / Off Switch and Sortable Option *
6
- * *
7
- ******************************************************************/
8
- add_filter('swp_button_options', 'swp_googlePlus_options_function',20);
9
- function swp_googlePlus_options_function($options) {
10
-
11
- // Create the new option in a variable to be inserted
12
- $options['content']['googlePlus'] = array(
13
- 'type' => 'checkbox',
14
- 'content' => 'Google Plus',
15
- 'default' => true,
16
- 'premium' => false
17
- );
18
-
19
- return $options;
20
-
21
- };
22
- /*****************************************************************
 
 
 
 
23
  * *
24
  * #2: Add it to global network array *
25
  * *
26
- ******************************************************************/
27
  // Queue up your filter to be ran on the swp_options hook.
28
- add_filter('swp_add_networks', 'swp_googlePlus_network');
29
 
30
  // Create the function that will filter the options
31
- function swp_googlePlus_network($networks) {
32
 
33
- // Add your network to the existing network array
34
- $networks[] = 'googlePlus';
35
 
36
- // Be sure to return the modified options array or the world will explode
37
- return $networks;
38
- };
39
- /*****************************************************************
40
- * *
41
- * #3: Generate the API Share Count Request URL *
42
- * *
43
- ******************************************************************/
44
- function swp_googlePlus_request_link($url) {
45
- return $url;
46
- }
47
- /*****************************************************************
48
- * *
49
- * #4: Parse the Response to get the share count *
50
- * *
51
- ******************************************************************/
52
- function swp_format_googlePlus_response($response) {
53
- $response = json_decode($response, true);
54
- return isset($response[0]['result']['metadata']['globalCounts']['count'])?intval( $response[0]['result']['metadata']['globalCounts']['count'] ):0;
55
- }
56
- /*****************************************************************
 
 
 
 
 
 
57
  * *
58
  * #5: Create the Button HTML *
59
  * *
60
- ******************************************************************/
61
- add_filter('swp_network_buttons', 'swp_googlePlus_button_html',10);
62
- function swp_googlePlus_button_html($array) {
63
 
64
- // If we've already generated this button, just use our existing html
65
- if(isset($_GLOBALS['sw']['buttons'][$array['postID']]['googlePlus'])):
66
- $array['resource']['googlePlus'] = $_GLOBALS['sw']['buttons'][$array['postID']]['googlePlus'];
67
 
68
  // If not, let's check if Facebook is activated and create the button HTML
69
- elseif( (isset($array['options']['newOrderOfIcons']['googlePlus']) && !isset($array['buttons'])) || (isset($array['buttons']) && isset($array['buttons']['googlePlus'])) ):
70
 
71
- $array['totes'] += $array['shares']['googlePlus'];
72
  ++$array['count'];
73
 
74
- $array['resource']['googlePlus'] = '<div class="nc_tweetContainer googlePlus" data-id="'.$array['count'].'" data-network="google_plus">';
75
- $link = urlencode(urldecode(swp_process_url( $array['url'] , 'googlePlus' , $array['postID'] )));
76
- $array['resource']['googlePlus'] .= '<a target="_blank" href="https://plus.google.com/share?url='.$link.'" data-link="https://plus.google.com/share?url='.$link.'" class="nc_tweet">';
77
- if($array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && $array['shares']['googlePlus'] > 0):
78
  $array['resource']['googlePlus'] .= '<span class="iconFiller">';
79
  $array['resource']['googlePlus'] .= '<span class="spaceManWilly">';
80
  $array['resource']['googlePlus'] .= '<i class="sw sw-google-plus"></i>';
81
- $array['resource']['googlePlus'] .= '<span class="swp_share"> '.__('+1','social-warfare').'</span>';
82
  $array['resource']['googlePlus'] .= '</span></span>';
83
- $array['resource']['googlePlus'] .= '<span class="swp_count">'.swp_kilomega($array['shares']['googlePlus']).'</span>';
84
- else:
85
- $array['resource']['googlePlus'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-google-plus"></i><span class="swp_share"> '.__('+1','social-warfare').'</span></span></span></span>';
86
  endif;
87
  $array['resource']['googlePlus'] .= '</a>';
88
  $array['resource']['googlePlus'] .= '</div>';
89
 
90
  // Store these buttons so that we don't have to generate them for each set
91
- $_GLOBALS['sw']['buttons'][$array['postID']]['googlePlus'] = $array['resource']['googlePlus'];
92
 
93
  endif;
94
 
95
  return $array;
96
 
97
- };
1
  <?php
2
 
3
+ /**
4
+
5
+ * **************************************************************
6
+ * *
7
+ * #1: Add the On / Off Switch and Sortable Option *
8
+ * *
9
+ ******************************************************************/
10
+ add_filter( 'swp_button_options', 'swp_googlePlus_options_function',20 );
11
+ function swp_googlePlus_options_function( $options ) {
12
+
13
+ // Create the new option in a variable to be inserted
14
+ $options['content']['googlePlus'] = array(
15
+ 'type' => 'checkbox',
16
+ 'content' => 'Google Plus',
17
+ 'default' => true,
18
+ 'premium' => false,
19
+ );
20
+
21
+ return $options;
22
+
23
+ };
24
+ /**
25
+
26
+ ***************************************************************
27
  * *
28
  * #2: Add it to global network array *
29
  * *
30
+ */
31
  // Queue up your filter to be ran on the swp_options hook.
32
+ add_filter( 'swp_add_networks', 'swp_googlePlus_network' );
33
 
34
  // Create the function that will filter the options
35
+ function swp_googlePlus_network( $networks ) {
36
 
37
+ // Add your network to the existing network array
38
+ $networks[] = 'googlePlus';
39
 
40
+ // Be sure to return the modified options array or the world will explode
41
+ return $networks;
42
+ };
43
+ /**
44
+
45
+ * **************************************************************
46
+ * *
47
+ * #3: Generate the API Share Count Request URL *
48
+ * *
49
+ ******************************************************************/
50
+ function swp_googlePlus_request_link( $url ) {
51
+ return $url;
52
+ }
53
+ /**
54
+
55
+ * **************************************************************
56
+ * *
57
+ * #4: Parse the Response to get the share count *
58
+ * *
59
+ ******************************************************************/
60
+ function swp_format_googlePlus_response( $response ) {
61
+ $response = json_decode( $response, true );
62
+ return isset( $response[0]['result']['metadata']['globalCounts']['count'] )?intval( $response[0]['result']['metadata']['globalCounts']['count'] ):0;
63
+ }
64
+ /**
65
+
66
+ ***************************************************************
67
  * *
68
  * #5: Create the Button HTML *
69
  * *
70
+ */
71
+ add_filter( 'swp_network_buttons', 'swp_googlePlus_button_html',10 );
72
+ function swp_googlePlus_button_html( $array ) {
73
 
74
+ // If we've already generated this button, just use our existing html
75
+ if ( isset( $_GLOBALS['sw']['buttons'][ $array['postID'] ]['googlePlus'] ) ) :
76
+ $array['resource']['googlePlus'] = $_GLOBALS['sw']['buttons'][ $array['postID'] ]['googlePlus'];
77
 
78
  // If not, let's check if Facebook is activated and create the button HTML
79
+ elseif ( (isset( $array['options']['newOrderOfIcons']['googlePlus'] ) && ! isset( $array['buttons'] )) || (isset( $array['buttons'] ) && isset( $array['buttons']['googlePlus'] )) ) :
80
 
81
+ $array['totes'] += intval( $array['shares']['googlePlus'] );
82
  ++$array['count'];
83
 
84
+ $array['resource']['googlePlus'] = '<div class="nc_tweetContainer googlePlus" data-id="' . $array['count'] . '" data-network="google_plus">';
85
+ $link = urlencode( urldecode( swp_process_url( $array['url'] , 'googlePlus' , $array['postID'] ) ) );
86
+ $array['resource']['googlePlus'] .= '<a rel="nofollow" target="_blank" href="https://plus.google.com/share?url=' . $link . '" data-link="https://plus.google.com/share?url=' . $link . '" class="nc_tweet">';
87
+ if ( $array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && $array['shares']['googlePlus'] > 0 ) :
88
  $array['resource']['googlePlus'] .= '<span class="iconFiller">';
89
  $array['resource']['googlePlus'] .= '<span class="spaceManWilly">';
90
  $array['resource']['googlePlus'] .= '<i class="sw sw-google-plus"></i>';
91
+ $array['resource']['googlePlus'] .= '<span class="swp_share"> ' . __( '+1','social-warfare' ) . '</span>';
92
  $array['resource']['googlePlus'] .= '</span></span>';
93
+ $array['resource']['googlePlus'] .= '<span class="swp_count">' . swp_kilomega( $array['shares']['googlePlus'] ) . '</span>';
94
+ else :
95
+ $array['resource']['googlePlus'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-google-plus"></i><span class="swp_share"> ' . __( '+1','social-warfare' ) . '</span></span></span></span>';
96
  endif;
97
  $array['resource']['googlePlus'] .= '</a>';
98
  $array['resource']['googlePlus'] .= '</div>';
99
 
100
  // Store these buttons so that we don't have to generate them for each set
101
+ $_GLOBALS['sw']['buttons'][ $array['postID'] ]['googlePlus'] = $array['resource']['googlePlus'];
102
 
103
  endif;
104
 
105
  return $array;
106
 
107
+ };
functions/social-networks/hackernews.php DELETED
@@ -1,94 +0,0 @@
1
- <?php
2
-
3
- /*****************************************************************
4
- * *
5
- * #1: Add the On / Off Switch and Sortable Option *
6
- * *
7
- ******************************************************************/
8
- add_filter('swp_button_options', 'swp_hacker_news_options_function',20);
9
- function swp_hacker_news_options_function($options) {
10
-
11
- // Create the new option in a variable to be inserted
12
- $options['content']['hacker_news'] = array(
13
- 'type' => 'checkbox',
14
- 'content' => 'Hacker News',
15
- 'default' => false,
16
- 'premium' => true
17
- );
18
-
19
- return $options;
20
-
21
- };
22
- /*****************************************************************
23
- * *
24
- * #2: Add it to global network array *
25
- * *
26
- ******************************************************************/
27
- // Queue up your filter to be ran on the swp_options hook.
28
- add_filter('swp_add_networks', 'swp_hacker_news_network');
29
-
30
- // Create the function that will filter the options
31
- function swp_hacker_news_network($networks) {
32
-
33
- // Add your network to the existing network array
34
- $networks[] = 'hacker_news';
35
-
36
- // Be sure to return the modified options array or the world will explode
37
- return $networks;
38
- };
39
- /*****************************************************************
40
- * *
41
- * #3: Generate the API Share Count Request URL *
42
- * *
43
- ******************************************************************/
44
- function swp_hacker_news_request_link($url) {
45
- $request_url = 'https://hn.algolia.com/api/v1/search?tags=story&restrictSearchableAttributes=url&query='.$url;
46
- return $request_url;
47
- }
48
- /*****************************************************************
49
- * *
50
- * #4: Parse the Response to get the share count *
51
- * *
52
- ******************************************************************/
53
- function swp_format_hacker_news_response($response) {
54
- $response = json_decode($response, true);
55
- return $response['nbHits'];
56
- }
57
- /*****************************************************************
58
- * *
59
- * #5: Create the Button HTML *
60
- * *
61
- ******************************************************************/
62
- add_filter('swp_network_buttons', 'swp_hacker_news_button_html',10);
63
- function swp_hacker_news_button_html($array) {
64
-
65
- if( (isset($array['options']['newOrderOfIcons']['hacker_news']) && !isset($array['buttons'])) || (isset($array['buttons']) && isset($array['buttons']['hacker_news'])) ):
66
-
67
- // Collect the Title
68
- $title = get_post_meta( $array['postID'] , 'nc_ogTitle' , true );
69
- if(!$title):
70
- $title = get_the_title();
71
- endif;
72
- ++$array['count'];
73
-
74
- $array['resource']['hacker_news'] = '<div class="nc_tweetContainer swp_hacker_news" data-id="'.$array['count'].'" data-network="hacker_news">';
75
- $link = urlencode(urldecode(swp_process_url( $array['url'] , 'email' , $array['postID'] )));
76
- $array['resource']['hacker_news'] .= '<a target="_blank" href="http://news.ycombinator.com/submitlink?u='.$link.'&t='.urlencode($title).'" data-link="http://news.ycombinator.com/submitlink?u='.$link.'&t='.urlencode($title).'" class="nc_tweet">';
77
- if($array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && $array['shares']['hacker_news'] > 0):
78
- $array['resource']['hacker_news'] .= '<span class="iconFiller">';
79
- $array['resource']['hacker_news'] .= '<span class="spaceManWilly">';
80
- $array['resource']['hacker_news'] .= '<i class="sw sw-hacker_news"></i>';
81
- $array['resource']['hacker_news'] .= '<span class="swp_share"> '.__('Vote','social-warfare').'</span>';
82
- $array['resource']['hacker_news'] .= '</span></span>';
83
- $array['resource']['hacker_news'] .= '<span class="swp_count">'.swp_kilomega($array['shares']['hacker_news']).'</span>';
84
- else:
85
- $array['resource']['hacker_news'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-hacker_news"></i><span class="swp_share"> '.__('Vote','social-warfare').'</span></span></span></span>';
86
- endif;
87
- $array['resource']['hacker_news'] .= '</a>';
88
- $array['resource']['hacker_news'] .= '</div>';
89
-
90
- endif;
91
-
92
- return $array;
93
-
94
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/social-networks/linkedIn.php CHANGED
@@ -1,98 +1,108 @@
1
  <?php
2
 
3
- /*****************************************************************
4
- * *
5
- * #1: Add the On / Off Switch and Sortable Option *
6
- * *
7
- ******************************************************************/
8
- add_filter('swp_button_options', 'swp_linkedIn_options_function',20);
9
- function swp_linkedIn_options_function($options) {
10
-
11
- // Create the new option in a variable to be inserted
12
- $options['content']['linkedIn'] = array(
13
- 'type' => 'checkbox',
14
- 'content' => 'LinkedIn',
15
- 'default' => true,
16
- 'premium' => false
17
- );
18
-
19
- return $options;
20
-
21
- };
22
- /*****************************************************************
 
 
 
 
23
  * *
24
  * #2: Add it to global network array *
25
  * *
26
- ******************************************************************/
27
  // Queue up your filter to be ran on the swp_options hook.
28
- add_filter('swp_add_networks', 'swp_linkedIn_network');
29
 
30
  // Create the function that will filter the options
31
- function swp_linkedIn_network($networks) {
32
 
33
- // Add your network to the existing network array
34
- $networks[] = 'linkedIn';
35
 
36
- // Be sure to return the modified options array or the world will explode
37
- return $networks;
38
- };
39
- /*****************************************************************
40
- * *
41
- * #3: Generate the API Share Count Request URL *
42
- * *
43
- ******************************************************************/
44
- function swp_linkedIn_request_link($url) {
45
- $request_url = 'https://www.linkedin.com/countserv/count/share?url='.$url.'&format=json';
46
- return $request_url;
47
- }
48
- /*****************************************************************
49
- * *
50
- * #4: Parse the Response to get the share count *
51
- * *
52
- ******************************************************************/
53
- function swp_format_linkedIn_response($response) {
54
- $response = json_decode($response, true);
55
- return isset($response['count'])?intval($response['count']):0;
56
- }
57
- /*****************************************************************
 
 
 
 
 
 
58
  * *
59
  * #5: Create the Button HTML *
60
  * *
61
- ******************************************************************/
62
- add_filter('swp_network_buttons', 'swp_linkedIn_button_html',10);
63
- function swp_linkedIn_button_html($array) {
64
 
65
- // If we've already generated this button, just use our existing html
66
- if(isset($_GLOBALS['sw']['buttons'][$array['postID']]['linkedIn'])):
67
- $array['resource']['linkedIn'] = $_GLOBALS['sw']['buttons'][$array['postID']]['linkedIn'];
68
 
69
  // If not, let's check if Facebook is activated and create the button HTML
70
- elseif( (isset($array['options']['newOrderOfIcons']['linkedIn']) && !isset($array['buttons'])) || (isset($array['buttons']) && isset($array['buttons']['linkedIn'])) ):
71
 
72
- $array['totes'] += $array['shares']['linkedIn'];
73
  ++$array['count'];
74
 
75
- $array['resource']['linkedIn'] = '<div class="nc_tweetContainer linkedIn" data-id="'.$array['count'].'" data-network="linked_in">';
76
- $link = urlencode(urldecode(swp_process_url( $array['url'] , 'linkedIn' , $array['postID'] )));
77
- $array['resource']['linkedIn'] .= '<a target="_blank" href="https://www.linkedin.com/cws/share?url='.$link.'" data-link="https://www.linkedin.com/cws/share?url='.$link.'" class="nc_tweet">';
78
- if($array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && $array['shares']['linkedIn'] > 0):
79
  $array['resource']['linkedIn'] .= '<span class="iconFiller">';
80
  $array['resource']['linkedIn'] .= '<span class="spaceManWilly">';
81
  $array['resource']['linkedIn'] .= '<i class="sw sw-linkedin"></i>';
82
- $array['resource']['linkedIn'] .= '<span class="swp_share"> '.__('Share','social-warfare').'</span>';
83
  $array['resource']['linkedIn'] .= '</span></span>';
84
- $array['resource']['linkedIn'] .= '<span class="swp_count">'.swp_kilomega($array['shares']['linkedIn']).'</span>';
85
- else:
86
- $array['resource']['linkedIn'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-linkedin"></i><span class="swp_share"> '.__('Share','social-warfare').'</span></span></span></span>';
87
  endif;
88
  $array['resource']['linkedIn'] .= '</a>';
89
  $array['resource']['linkedIn'] .= '</div>';
90
 
91
  // Store these buttons so that we don't have to generate them for each set
92
- $_GLOBALS['sw']['buttons'][$array['postID']]['linkedIn'] = $array['resource']['linkedIn'];
93
 
94
  endif;
95
 
96
  return $array;
97
 
98
- };
1
  <?php
2
 
3
+ /**
4
+
5
+ * **************************************************************
6
+ * *
7
+ * #1: Add the On / Off Switch and Sortable Option *
8
+ * *
9
+ ******************************************************************/
10
+ add_filter( 'swp_button_options', 'swp_linkedIn_options_function',20 );
11
+ function swp_linkedIn_options_function( $options ) {
12
+
13
+ // Create the new option in a variable to be inserted
14
+ $options['content']['linkedIn'] = array(
15
+ 'type' => 'checkbox',
16
+ 'content' => 'LinkedIn',
17
+ 'default' => true,
18
+ 'premium' => false,
19
+ );
20
+
21
+ return $options;
22
+
23
+ };
24
+ /**
25
+
26
+ ***************************************************************
27
  * *
28
  * #2: Add it to global network array *
29
  * *
30
+ */
31
  // Queue up your filter to be ran on the swp_options hook.
32
+ add_filter( 'swp_add_networks', 'swp_linkedIn_network' );
33
 
34
  // Create the function that will filter the options
35
+ function swp_linkedIn_network( $networks ) {
36
 
37
+ // Add your network to the existing network array
38
+ $networks[] = 'linkedIn';
39
 
40
+ // Be sure to return the modified options array or the world will explode
41
+ return $networks;
42
+ };
43
+ /**
44
+
45
+ * **************************************************************
46
+ * *
47
+ * #3: Generate the API Share Count Request URL *
48
+ * *
49
+ ******************************************************************/
50
+ function swp_linkedIn_request_link( $url ) {
51
+ $request_url = 'https://www.linkedin.com/countserv/count/share?url=' . $url . '&format=json';
52
+ return $request_url;
53
+ }
54
+ /**
55
+
56
+ * **************************************************************
57
+ * *
58
+ * #4: Parse the Response to get the share count *
59
+ * *
60
+ ******************************************************************/
61
+ function swp_format_linkedIn_response( $response ) {
62
+ $response = json_decode( $response, true );
63
+ return isset( $response['count'] )?intval( $response['count'] ):0;
64
+ }
65
+ /**
66
+
67
+ ***************************************************************
68
  * *
69
  * #5: Create the Button HTML *
70
  * *
71
+ */
72
+ add_filter( 'swp_network_buttons', 'swp_linkedIn_button_html',10 );
73
+ function swp_linkedIn_button_html( $array ) {
74
 
75
+ // If we've already generated this button, just use our existing html
76
+ if ( isset( $_GLOBALS['sw']['buttons'][ $array['postID'] ]['linkedIn'] ) ) :
77
+ $array['resource']['linkedIn'] = $_GLOBALS['sw']['buttons'][ $array['postID'] ]['linkedIn'];
78
 
79
  // If not, let's check if Facebook is activated and create the button HTML
80
+ elseif ( (isset( $array['options']['newOrderOfIcons']['linkedIn'] ) && ! isset( $array['buttons'] )) || (isset( $array['buttons'] ) && isset( $array['buttons']['linkedIn'] )) ) :
81
 
82
+ $array['totes'] += intval( $array['shares']['linkedIn'] );
83
  ++$array['count'];
84
 
85
+ $array['resource']['linkedIn'] = '<div class="nc_tweetContainer linkedIn" data-id="' . $array['count'] . '" data-network="linked_in">';
86
+ $link = urlencode( urldecode( swp_process_url( $array['url'] , 'linkedIn' , $array['postID'] ) ) );
87
+ $array['resource']['linkedIn'] .= '<a rel="nofollow" target="_blank" href="https://www.linkedin.com/cws/share?url=' . $link . '" data-link="https://www.linkedin.com/cws/share?url=' . $link . '" class="nc_tweet">';
88
+ if ( $array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && $array['shares']['linkedIn'] > 0 ) :
89
  $array['resource']['linkedIn'] .= '<span class="iconFiller">';
90
  $array['resource']['linkedIn'] .= '<span class="spaceManWilly">';
91
  $array['resource']['linkedIn'] .= '<i class="sw sw-linkedin"></i>';
92
+ $array['resource']['linkedIn'] .= '<span class="swp_share"> ' . __( 'Share','social-warfare' ) . '</span>';
93
  $array['resource']['linkedIn'] .= '</span></span>';
94
+ $array['resource']['linkedIn'] .= '<span class="swp_count">' . swp_kilomega( $array['shares']['linkedIn'] ) . '</span>';
95
+ else :
96
+ $array['resource']['linkedIn'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-linkedin"></i><span class="swp_share"> ' . __( 'Share','social-warfare' ) . '</span></span></span></span>';
97
  endif;
98
  $array['resource']['linkedIn'] .= '</a>';
99
  $array['resource']['linkedIn'] .= '</div>';
100
 
101
  // Store these buttons so that we don't have to generate them for each set
102
+ $_GLOBALS['sw']['buttons'][ $array['postID'] ]['linkedIn'] = $array['resource']['linkedIn'];
103
 
104
  endif;
105
 
106
  return $array;
107
 
108
+ };
functions/social-networks/pinterest.php CHANGED
@@ -1,162 +1,151 @@
1
  <?php
2
 
3
- /*****************************************************************
4
- * *
5
- * #1: Add the On / Off Switch and Sortable Option *
6
- * *
7
- ******************************************************************/
8
- add_filter('swp_button_options', 'swp_pinterest_options_function',20);
9
- function swp_pinterest_options_function($options) {
10
-
11
- // Create the new option in a variable to be inserted
12
- $options['content']['pinterest'] = array(
13
- 'type' => 'checkbox',
14
- 'content' => 'Pinterest',
15
- 'default' => true,
16
- 'premium' => false
17
- );
18
-
19
- return $options;
20
-
21
- };
22
- /*****************************************************************
 
 
 
 
23
  * *
24
  * #2: Add it to global network array *
25
  * *
26
- ******************************************************************/
27
  // Queue up your filter to be ran on the swp_options hook.
28
- add_filter('swp_add_networks', 'swp_pinterest_network');
29
 
30
  // Create the function that will filter the options
31
- function swp_pinterest_network($networks) {
32
-
33
- // Add your network to the existing network array
34
- $networks[] = 'pinterest';
35
-
36
- // Be sure to return the modified options array or the world will explode
37
- return $networks;
38
- };
39
- /*****************************************************************
40
- * *
41
- * #3: Generate the API Share Count Request URL *
42
- * *
43
- ******************************************************************/
44
- function swp_pinterest_request_link($url) {
45
- $url = rawurlencode($url);
46
- $request_url = 'https://api.pinterest.com/v1/urls/count.json?url='.$url;
47
- return $request_url;
48
- }
49
- /*****************************************************************
50
- * *
51
- * #4: Parse the Response to get the share count *
52
- * *
53
- ******************************************************************/
54
- function swp_format_pinterest_response($response) {
55
- $response = preg_replace('/^receiveCount\((.*)\)$/', "\\1", $response);
56
- $response = json_decode($response,true);
57
- return isset($response['count'])?intval($response['count']):0;
58
- }
59
- /*****************************************************************
 
 
 
 
 
 
60
  * *
61
  * #5: Create the Button HTML *
62
  * *
63
- ******************************************************************/
64
- add_filter('swp_network_buttons', 'swp_pinterest_button_html',10);
65
- function swp_pinterest_button_html($array) {
66
 
67
- // If we've already generated this button, just use our existing html
68
- if(isset($_GLOBALS['sw']['buttons'][$array['postID']]['pinterest'])):
69
- $array['resource']['pinterest'] = $_GLOBALS['sw']['buttons'][$array['postID']]['pinterest'];
70
 
71
  // If not, let's check if Facebook is activated and create the button HTML
72
- elseif( (isset($array['options']['newOrderOfIcons']['pinterest']) && !isset($array['buttons'])) || (isset($array['buttons']) && isset($array['buttons']['pinterest'])) ):
73
 
74
- $array['totes'] += $array['shares']['pinterest'];
75
  ++$array['count'];
76
 
77
- $pi = get_post_meta( $array['postID'] , 'nc_pinterestImage' , true);
78
-
79
  // Pinterest Username
80
- $pinterest_username = $array['options']['pinterestID'];
81
- if(isset($pinterest_username) && $pinterest_username != ''):
82
- $pu = ' via @'.str_replace('@','',$pinterest_username);
83
- else:
84
  $pu = '';
85
  endif;
86
 
87
- if(swp_is_cache_fresh($array['postID']) == false):
88
-
89
- // Check if an image ID has been provided
90
- $array['imageID'] = get_post_meta( $array['postID'] , 'nc_pinterestImage' , true );
91
- if($array['imageID']):
92
- $array['imageURL'] = wp_get_attachment_url( $array['imageID'] );
93
- delete_post_meta($array['postID'],'swp_pinterest_image_url');
94
- update_post_meta($array['postID'],'swp_pinterest_image_url',$array['imageURL']);
95
- // else:
96
- // $array['imageURL'] = wp_get_attachment_url( get_post_thumbnail_id( $array['postID'] ) );
97
- // delete_post_meta($array['postID'],'swp_pinterest_image_url');
98
- endif;
99
-
100
  else:
101
-
102
- // Check if we have a cached Open Graph Image URL
103
- $array['imageURL'] = get_post_meta( $array['postID'] , 'swp_pinterest_image_url' , true );
104
-
105
- // If not, let's check to see if we have an ID to generate one
106
- if(!$array['imageURL']):
107
-
108
- // Check for an Open Graph Image ID
109
- $array['imageID'] = get_post_meta( $array['postID'] , 'nc_pinterestImage' , true );
110
- if($array['imageID']):
111
-
112
- // If we find one, let's convert it to a link and cache it for next time
113
- $array['imageURL'] = wp_get_attachment_url( $array['imageID'] );
114
- delete_post_meta($array['postID'],'swp_pinterest_image_url');
115
- update_post_meta($array['postID'],'swp_pinterest_image_url',$array['imageURL']);
116
- else:
117
-
118
- // If we don't find one, let's see if we can use a post thumbnail
119
- $array['imageURL'] = wp_get_attachment_url( get_post_thumbnail_id( $array['postID'] ) );
120
- endif;
121
  endif;
122
  endif;
123
 
124
  $pd = get_post_meta( $array['postID'] , 'nc_pinterestDescription' , true );
125
- if($array['imageURL']):
126
- $pi = '&media='.urlencode(html_entity_decode($array['imageURL'],ENT_COMPAT, 'UTF-8'));
127
- else:
128
  $pi = '';
129
  endif;
130
 
131
  $pinterestLink = $array['url'];
132
- $title = strip_tags(get_the_title($array['postID']));
133
- $title = str_replace('|','',$title);
134
 
135
- if($pi != '' && is_swp_registered()):
136
- $a = '<a data-link="https://pinterest.com/pin/create/button/?url='.$pinterestLink.''.$pi.'&description='.($pd != '' ? urlencode(html_entity_decode($pd.$pu, ENT_COMPAT, 'UTF-8')) : urlencode(html_entity_decode($title.$pu, ENT_COMPAT, 'UTF-8'))).'" class="nc_tweet" data-count="0">';
137
  else:
138
- $a = '<a onClick="var e=document.createElement(\'script\');e.setAttribute(\'type\',\'text/javascript\');e.setAttribute(\'charset\',\'UTF-8\');e.setAttribute(\'src\',\'//assets.pinterest.com/js/pinmarklet.js?r=\'+Math.random()*99999999);document.body.appendChild(e);" class="nc_tweet noPop">';
139
  endif;
140
- $array['resource']['pinterest'] = '<div class="nc_tweetContainer nc_pinterest" data-id="'.$array['count'].'" data-network="pinterest">';
 
 
 
 
 
 
141
  $array['resource']['pinterest'] .= $a;
142
- if($array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && $array['shares']['pinterest'] > 0):
143
  $array['resource']['pinterest'] .= '<span class="iconFiller">';
144
- $array['resource']['pinterest'] .= '<span class="spaceManWilly" style="width:55px;">';
145
  $array['resource']['pinterest'] .= '<i class="sw sw-pinterest"></i>';
146
- $array['resource']['pinterest'] .= '<span class="swp_share"> '.__('Pin','social-warfare').'</span>';
147
  $array['resource']['pinterest'] .= '</span></span>';
148
- $array['resource']['pinterest'] .= '<span class="swp_count">'.swp_kilomega($array['shares']['pinterest']).'</span>';
149
- else:
150
- $array['resource']['pinterest'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly" style="width:55px;"><i class="sw sw-pinterest"></i><span class="swp_share"> '.__('Pin','social-warfare').'</span></span></span></span>';
151
  endif;
152
  $array['resource']['pinterest'] .= '</a>';
153
  $array['resource']['pinterest'] .= '</div>';
154
 
155
  // Store these buttons so that we don't have to generate them for each set
156
- $_GLOBALS['sw']['buttons'][$array['postID']]['pinterest'] = $array['resource']['pinterest'];
157
 
158
  endif;
159
 
160
  return $array;
161
 
162
- };
1
  <?php
2
 
3
+ /**
4
+
5
+ * **************************************************************
6
+ * *
7
+ * #1: Add the On / Off Switch and Sortable Option *
8
+ * *
9
+ ******************************************************************/
10
+ add_filter( 'swp_button_options', 'swp_pinterest_options_function',20 );
11
+ function swp_pinterest_options_function( $options ) {
12
+
13
+ // Create the new option in a variable to be inserted
14
+ $options['content']['pinterest'] = array(
15
+ 'type' => 'checkbox',
16
+ 'content' => 'Pinterest',
17
+ 'default' => true,
18
+ 'premium' => false,
19
+ );
20
+
21
+ return $options;
22
+
23
+ };
24
+ /**
25
+
26
+ ***************************************************************
27
  * *
28
  * #2: Add it to global network array *
29
  * *
30
+ */
31
  // Queue up your filter to be ran on the swp_options hook.
32
+ add_filter( 'swp_add_networks', 'swp_pinterest_network' );
33
 
34
  // Create the function that will filter the options
35
+ function swp_pinterest_network( $networks ) {
36
+
37
+ // Add your network to the existing network array
38
+ $networks[] = 'pinterest';
39
+
40
+ // Be sure to return the modified options array or the world will explode
41
+ return $networks;
42
+ };
43
+ /**
44
+
45
+ * **************************************************************
46
+ * *
47
+ * #3: Generate the API Share Count Request URL *
48
+ * *
49
+ ******************************************************************/
50
+ function swp_pinterest_request_link( $url ) {
51
+ $url = rawurlencode( $url );
52
+ $request_url = 'https://api.pinterest.com/v1/urls/count.json?url=' . $url;
53
+ return $request_url;
54
+ }
55
+ /**
56
+
57
+ * **************************************************************
58
+ * *
59
+ * #4: Parse the Response to get the share count *
60
+ * *
61
+ ******************************************************************/
62
+ function swp_format_pinterest_response( $response ) {
63
+ $response = preg_replace( '/^receiveCount\((.*)\)$/', "\\1", $response );
64
+ $response = json_decode( $response,true );
65
+ return isset( $response['count'] )?intval( $response['count'] ):0;
66
+ }
67
+ /**
68
+
69
+ ***************************************************************
70
  * *
71
  * #5: Create the Button HTML *
72
  * *
73
+ */
74
+ add_filter( 'swp_network_buttons', 'swp_pinterest_button_html',10 );
75
+ function swp_pinterest_button_html( $array ) {
76
 
77
+ // If we've already generated this button, just use our existing html
78
+ if ( isset( $_GLOBALS['sw']['buttons'][ $array['postID'] ]['pinterest'] ) ) :
79
+ $array['resource']['pinterest'] = $_GLOBALS['sw']['buttons'][ $array['postID'] ]['pinterest'];
80
 
81
  // If not, let's check if Facebook is activated and create the button HTML
82
+ elseif ( (isset( $array['options']['newOrderOfIcons']['pinterest'] ) && ! isset( $array['buttons'] )) || (isset( $array['buttons'] ) && isset( $array['buttons']['pinterest'] )) ) :
83
 
84
+ $array['totes'] += intval( $array['shares']['pinterest'] );
85
  ++$array['count'];
86
 
87
+ $pi = get_post_meta( $array['postID'] , 'nc_pinterestImage' , true );
88
+
89
  // Pinterest Username
90
+ if ( !empty( $array['options']['pinterestID'] ) ) :
91
+ $pu = ' via @' . str_replace( '@' , '' , $array['options']['pinterestID'] );
92
+ else :
 
93
  $pu = '';
94
  endif;
95
 
96
+ $array['imageURL'] = false;
97
+ $image_url = get_post_meta( $array['postID'] , 'swp_pinterest_image_url' , true );
98
+ if( !empty( $image_url ) ):
99
+ $array['imageURL'] = $image_url;
 
 
 
 
 
 
 
 
 
100
  else:
101
+ $thumbnail_url = wp_get_attachment_url( get_post_thumbnail_id( $array['postID'] ) );
102
+ if( !empty( $thumbnail_url ) ):
103
+ $array['imageURL'] = $thumbnail_url;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  endif;
105
  endif;
106
 
107
  $pd = get_post_meta( $array['postID'] , 'nc_pinterestDescription' , true );
108
+ if ( $array['imageURL'] ) :
109
+ $pi = '&media=' . urlencode( html_entity_decode( $array['imageURL'],ENT_COMPAT, 'UTF-8' ) );
110
+ else :
111
  $pi = '';
112
  endif;
113
 
114
  $pinterestLink = $array['url'];
115
+ $title = strip_tags( get_the_title( $array['postID'] ) );
116
+ $title = str_replace( '|','',$title );
117
 
118
+ if( function_exists('is_swp_registered') ):
119
+ $swp_registration = is_swp_registered();
120
  else:
121
+ $swp_registration = false;
122
  endif;
123
+
124
+ if ( $pi != '' && true === $swp_registration ) :
125
+ $a = '<a rel="nofollow" data-link="https://pinterest.com/pin/create/button/?url=' . $pinterestLink . '' . $pi . '&description=' . ($pd != '' ? urlencode( html_entity_decode( $pd . $pu, ENT_COMPAT, 'UTF-8' ) ) : urlencode( html_entity_decode( $title . $pu, ENT_COMPAT, 'UTF-8' ) )) . '" class="nc_tweet" data-count="0">';
126
+ else :
127
+ $a = '<a rel="nofollow" onClick="var e=document.createElement(\'script\');e.setAttribute(\'type\',\'text/javascript\');e.setAttribute(\'charset\',\'UTF-8\');e.setAttribute(\'src\',\'//assets.pinterest.com/js/pinmarklet.js?r=\'+Math.random()*99999999);document.body.appendChild(e);" class="nc_tweet noPop">';
128
+ endif;
129
+ $array['resource']['pinterest'] = '<div class="nc_tweetContainer nc_pinterest" data-id="' . $array['count'] . '" data-network="pinterest">';
130
  $array['resource']['pinterest'] .= $a;
131
+ if ( $array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && $array['shares']['pinterest'] > 0 ) :
132
  $array['resource']['pinterest'] .= '<span class="iconFiller">';
133
+ $array['resource']['pinterest'] .= '<span class="spaceManWilly">';
134
  $array['resource']['pinterest'] .= '<i class="sw sw-pinterest"></i>';
135
+ $array['resource']['pinterest'] .= '<span class="swp_share"> ' . __( 'Pin','social-warfare' ) . '</span>';
136
  $array['resource']['pinterest'] .= '</span></span>';
137
+ $array['resource']['pinterest'] .= '<span class="swp_count">' . swp_kilomega( $array['shares']['pinterest'] ) . '</span>';
138
+ else :
139
+ $array['resource']['pinterest'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-pinterest"></i><span class="swp_share"> ' . __( 'Pin','social-warfare' ) . '</span></span></span></span>';
140
  endif;
141
  $array['resource']['pinterest'] .= '</a>';
142
  $array['resource']['pinterest'] .= '</div>';
143
 
144
  // Store these buttons so that we don't have to generate them for each set
145
+ $_GLOBALS['sw']['buttons'][ $array['postID'] ]['pinterest'] = $array['resource']['pinterest'];
146
 
147
  endif;
148
 
149
  return $array;
150
 
151
+ };
functions/social-networks/pocket.php DELETED
@@ -1,85 +0,0 @@
1
- <?php
2
-
3
- /*****************************************************************
4
- * *
5
- * #1: Add the On / Off Switch and Sortable Option *
6
- * *
7
- ******************************************************************/
8
- add_filter('swp_button_options', 'swp_pocket_options_function',20);
9
- function swp_pocket_options_function($options) {
10
-
11
- // Create the new option in a variable to be inserted
12
- $options['content']['pocket'] = array(
13
- 'type' => 'checkbox',
14
- 'content' => 'Pocket',
15
- 'default' => false,
16
- 'premium' => true
17
- );
18
-
19
- return $options;
20
-
21
- };
22
- /*****************************************************************
23
- * *
24
- * #2: Add it to global network array *
25
- * *
26
- ******************************************************************/
27
- // Queue up your filter to be ran on the swp_options hook.
28
- add_filter('swp_add_networks', 'swp_pocket_network');
29
-
30
- // Create the function that will filter the options
31
- function swp_pocket_network($networks) {
32
-
33
- // Add your network to the existing network array
34
- $networks[] = 'pocket';
35
-
36
- // Be sure to return the modified options array or the world will explode
37
- return $networks;
38
- };
39
- /*****************************************************************
40
- * *
41
- * #3: Generate the API Share Count Request URL *
42
- * *
43
- ******************************************************************/
44
- function swp_pocket_request_link($url) {
45
- return 0;
46
- }
47
- /*****************************************************************
48
- * *
49
- * #4: Parse the Response to get the share count *
50
- * *
51
- ******************************************************************/
52
- function swp_format_pocket_response($response) {
53
- return 0;
54
- }
55
- /*****************************************************************
56
- * *
57
- * #5: Create the Button HTML *
58
- * *
59
- ******************************************************************/
60
- add_filter('swp_network_buttons', 'swp_pocket_button_html',10);
61
- function swp_pocket_button_html($array) {
62
-
63
- if( (isset($array['options']['newOrderOfIcons']['pocket']) && !isset($array['buttons'])) || (isset($array['buttons']) && isset($array['buttons']['pocket'])) ):
64
-
65
-
66
- // Collect the Title
67
- $title = get_post_meta( $array['postID'] , 'nc_ogTitle' , true );
68
- if(!$title):
69
- $title = get_the_title();
70
- endif;
71
-
72
- ++$array['count'];
73
-
74
- $array['resource']['pocket'] = '<div class="nc_tweetContainer swp_pocket" data-id="'.$array['count'].'" data-network="pocket">';
75
- $link = urlencode(urldecode(swp_process_url( $array['url'] , 'pocket' , $array['postID'] )));
76
- $array['resource']['pocket'] .= '<a href="https://getpocket.com/save?url='.$link.'&title='.$title.'" data-link="https://getpocket.com/save?url='.$link.'&title='.$title.'" class="nc_tweet">';
77
- $array['resource']['pocket'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-pocket"></i><span class="swp_share"> '.__('Pocket','social-warfare').'</span></span></span></span>';
78
- $array['resource']['pocket'] .= '</a>';
79
- $array['resource']['pocket'] .= '</div>';
80
-
81
- endif;
82
-
83
- return $array;
84
-
85
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/social-networks/reddit.php DELETED
@@ -1,124 +0,0 @@
1
- <?php
2
-
3
- /*****************************************************************
4
- * *
5
- * #1: Add the On / Off Switch and Sortable Option *
6
- * *
7
- ******************************************************************/
8
- add_filter('swp_button_options', 'swp_reddit_options_function',20);
9
- function swp_reddit_options_function($options) {
10
-
11
- // Create the new option in a variable to be inserted
12
- $options['content']['reddit'] = array(
13
- 'type' => 'checkbox',
14
- 'content' => 'Reddit',
15
- 'default' => false,
16
- 'premium' => true
17
- );
18
-
19
- return $options;
20
-
21
- };
22
- /*****************************************************************
23
- * *
24
- * #2: Add it to global network array *
25
- * *
26
- ******************************************************************/
27
- // Queue up your filter to be ran on the swp_options hook.
28
- add_filter('swp_add_networks', 'swp_reddit_network');
29
-
30
- // Create the function that will filter the options
31
- function swp_reddit_network($networks) {
32
-
33
- // Add your network to the existing network array
34
- $networks[] = 'reddit';
35
-
36
- // Be sure to return the modified options array or the world will explode
37
- return $networks;
38
- };
39
- /*****************************************************************
40
- * *
41
- * #3: Generate the API Share Count Request URL *
42
- * *
43
- ******************************************************************/
44
- function swp_reddit_request_link($url) {
45
-
46
- // Create the API request link
47
- $request_url = 'https://www.reddit.com/api/info.json?url='.$url;
48
-
49
- // Return the constructed link to the Social Warfare Plugin
50
- return $request_url;
51
- }
52
- /*****************************************************************
53
- * *
54
- * #4: Parse the Response to get the share count *
55
- * *
56
- ******************************************************************/
57
- function swp_format_reddit_response($response) {
58
-
59
- // Parse the JSON response into an associative array
60
- $response = json_decode($response, true);
61
- $score = 0;
62
-
63
- // Check to ensure that there was a response
64
- if(isset($response) && isset($response['data']) && isset($response['data']['children'])):
65
-
66
- // Loop through each post on reddit adding the score to our total
67
- foreach($response['data']['children'] as $child):
68
- $score += (int) $child['data']['score'];
69
- endforeach;
70
- endif;
71
-
72
- // Return the score to Social Warfare for caching and presentation
73
- return $score;
74
- }
75
- /*****************************************************************
76
- * *
77
- * #5: Create the Button HTML *
78
- * *
79
- ******************************************************************/
80
- add_filter('swp_network_buttons', 'swp_reddit_button_html',10);
81
- function swp_reddit_button_html($array) {
82
-
83
- // If we've already generated this button, just use our existing html
84
- if(isset($_GLOBALS['sw']['buttons'][$array['postID']]['reddit'])):
85
- $array['resource']['reddit'] = $_GLOBALS['sw']['buttons'][$array['postID']]['reddit'];
86
-
87
- // If not, let's check if Facebook is activated and create the button HTML
88
- elseif( (isset($array['options']['newOrderOfIcons']['reddit']) && !isset($array['buttons'])) || (isset($array['buttons']) && isset($array['buttons']['reddit'])) ):
89
-
90
- if(isset($array['shares']['reddit'])):
91
- $array['totes'] += $array['shares']['reddit'];
92
- endif;
93
- ++$array['count'];
94
-
95
- // Collect the Title
96
- $title = get_post_meta( $array['postID'] , 'nc_ogTitle' , true );
97
- if(!$title):
98
- $title = get_the_title();
99
- endif;
100
-
101
- $array['resource']['reddit'] = '<div class="nc_tweetContainer swp_reddit" data-id="'.$array['count'].'" data-network="reddit">';
102
- $link = $array['url'];
103
- $array['resource']['reddit'] .= '<a target="_blank" href="https://www.reddit.com/submit?url='.$link.'&title='.urlencode($title).'" data-link="https://www.reddit.com/submit?url='.$link.'&title='.urlencode($title).'" class="nc_tweet">';
104
- if($array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && isset($array['shares']['reddit']) && $array['shares']['reddit'] > 0):
105
- $array['resource']['reddit'] .= '<span class="iconFiller">';
106
- $array['resource']['reddit'] .= '<span class="spaceManWilly">';
107
- $array['resource']['reddit'] .= '<i class="sw sw-reddit"></i>';
108
- $array['resource']['reddit'] .= '<span class="swp_share"> '.__('Reddit','social-warfare').'</span>';
109
- $array['resource']['reddit'] .= '</span></span>';
110
- $array['resource']['reddit'] .= '<span class="swp_count">'.swp_kilomega($array['shares']['reddit']).'</span>';
111
- else:
112
- $array['resource']['reddit'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-reddit"></i><span class="swp_share"> '.__('Reddit','social-warfare').'</span></span></span></span>';
113
- endif;
114
- $array['resource']['reddit'] .= '</a>';
115
- $array['resource']['reddit'] .= '</div>';
116
-
117
- // Store these buttons so that we don't have to generate them for each set
118
- $_GLOBALS['sw']['buttons'][$array['postID']]['reddit'] = $array['resource']['reddit'];
119
-
120
- endif;
121
-
122
- return $array;
123
-
124
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/social-networks/stumbleupon.php CHANGED
@@ -1,106 +1,116 @@
1
  <?php
2
 
3
- /*****************************************************************
4
- * *
5
- * #1: Add the On / Off Switch and Sortable Option *
6
- * *
7
- ******************************************************************/
8
- add_filter('swp_button_options', 'swp_stumbleupon_options_function',20);
9
- function swp_stumbleupon_options_function($options) {
10
-
11
- // Create the new option in a variable to be inserted
12
- $options['content']['stumbleupon'] = array(
13
- 'type' => 'checkbox',
14
- 'content' => 'StumbleUpon',
15
- 'default' => false,
16
- 'premium' => false
17
- );
18
-
19
- return $options;
20
-
21
- };
22
- /*****************************************************************
 
 
 
 
23
  * *
24
  * #2: Add it to global network array *
25
  * *
26
- ******************************************************************/
27
  // Queue up your filter to be ran on the swp_options hook.
28
- add_filter('swp_add_networks', 'swp_stumbleupon_network');
29
 
30
  // Create the function that will filter the options
31
- function swp_stumbleupon_network($networks) {
32
-
33
- // Add your network to the existing network array
34
- $networks[] = 'stumbleupon';
35
-
36
- // Be sure to return the modified options array or the world will explode
37
- return $networks;
38
- };
39
- /*****************************************************************
40
- * *
41
- * #3: Generate the API Share Count Request URL *
42
- * *
43
- ******************************************************************/
44
- function swp_stumbleupon_request_link($url) {
45
- $request_url = 'https://www.stumbleupon.com/services/1.01/badge.getinfo?url=' . $url;
46
- return $request_url;
47
- }
48
- /*****************************************************************
49
- * *
50
- * #4: Parse the Response to get the share count *
51
- * *
52
- ******************************************************************/
53
- function swp_format_stumbleupon_response($response) {
54
- $response = json_decode($response, true);
55
- return isset($response['result']['views'])?intval($response['result']['views']):0;
56
- }
57
- /*****************************************************************
 
 
 
 
 
 
58
  * *
59
  * #5: Create the Button HTML *
60
  * *
61
- ******************************************************************/
62
- add_filter('swp_network_buttons', 'swp_stumbleupon_button_html',10);
63
- function swp_stumbleupon_button_html($array) {
64
 
65
- // If we've already generated this button, just use our existing html
66
- if(isset($_GLOBALS['sw']['buttons'][$array['postID']]['stumbleupon'])):
67
- $array['resource']['stumbleupon'] = $_GLOBALS['sw']['buttons'][$array['postID']]['stumbleupon'];
68
 
69
  // If not, let's check if Facebook is activated and create the button HTML
70
- elseif( (isset($array['options']['newOrderOfIcons']['stumbleupon']) && !isset($array['buttons'])) || (isset($array['buttons']) && isset($array['buttons']['stumbleupon'])) ):
71
 
72
- if(isset($array['shares']['stumbleupon'])):
73
- $array['totes'] += $array['shares']['stumbleupon'];
74
  endif;
75
  ++$array['count'];
76
 
77
  // Collect the Title
78
  $title = get_post_meta( $array['postID'] , 'nc_ogTitle' , true );
79
- if(!$title):
80
  $title = get_the_title();
81
  endif;
82
 
83
- $array['resource']['stumbleupon'] = '<div class="nc_tweetContainer swp_stumbleupon" data-id="'.$array['count'].'" data-network="stumble_upon">';
84
  $link = $array['url'];
85
- $array['resource']['stumbleupon'] .= '<a target="_blank" href="http://www.stumbleupon.com/submit?url='.$link.'&title='.urlencode($title).'" data-link="http://www.stumbleupon.com/submit?url='.$link.'&title='.urlencode($title).'" class="nc_tweet">';
86
- if($array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && isset($array['shares']['stumbleupon']) && $array['shares']['stumbleupon'] > 0):
87
  $array['resource']['stumbleupon'] .= '<span class="iconFiller">';
88
  $array['resource']['stumbleupon'] .= '<span class="spaceManWilly">';
89
  $array['resource']['stumbleupon'] .= '<i class="sw sw-stumbleupon"></i>';
90
- $array['resource']['stumbleupon'] .= '<span class="swp_share"> '.__('Stumble','social-warfare').'</span>';
91
  $array['resource']['stumbleupon'] .= '</span></span>';
92
- $array['resource']['stumbleupon'] .= '<span class="swp_count">'.swp_kilomega($array['shares']['stumbleupon']).'</span>';
93
- else:
94
- $array['resource']['stumbleupon'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-stumbleupon"></i><span class="swp_share"> '.__('Stumble','social-warfare').'</span></span></span></span>';
95
  endif;
96
  $array['resource']['stumbleupon'] .= '</a>';
97
  $array['resource']['stumbleupon'] .= '</div>';
98
 
99
  // Store these buttons so that we don't have to generate them for each set
100
- $_GLOBALS['sw']['buttons'][$array['postID']]['stumbleupon'] = $array['resource']['stumbleupon'];
101
 
102
  endif;
103
 
104
  return $array;
105
 
106
- };
1
  <?php
2
 
3
+ /**
4
+
5
+ * **************************************************************
6
+ * *
7
+ * #1: Add the On / Off Switch and Sortable Option *
8
+ * *
9
+ ******************************************************************/
10
+ add_filter( 'swp_button_options', 'swp_stumbleupon_options_function',20 );
11
+ function swp_stumbleupon_options_function( $options ) {
12
+
13
+ // Create the new option in a variable to be inserted
14
+ $options['content']['stumbleupon'] = array(
15
+ 'type' => 'checkbox',
16
+ 'content' => 'StumbleUpon',
17
+ 'default' => false,
18
+ 'premium' => false,
19
+ );
20
+
21
+ return $options;
22
+
23
+ };
24
+ /**
25
+
26
+ ***************************************************************
27
  * *
28
  * #2: Add it to global network array *
29
  * *
30
+ */
31
  // Queue up your filter to be ran on the swp_options hook.
32
+ add_filter( 'swp_add_networks', 'swp_stumbleupon_network' );
33
 
34
  // Create the function that will filter the options
35
+ function swp_stumbleupon_network( $networks ) {
36
+
37
+ // Add your network to the existing network array
38
+ $networks[] = 'stumbleupon';
39
+
40
+ // Be sure to return the modified options array or the world will explode
41
+ return $networks;
42
+ };
43
+ /**
44
+
45
+ * **************************************************************
46
+ * *
47
+ * #3: Generate the API Share Count Request URL *
48
+ * *
49
+ ******************************************************************/
50
+ function swp_stumbleupon_request_link( $url ) {
51
+ $request_url = 'https://www.stumbleupon.com/services/1.01/badge.getinfo?url=' . $url;
52
+ return $request_url;
53
+ }
54
+ /**
55
+
56
+ * **************************************************************
57
+ * *
58
+ * #4: Parse the Response to get the share count *
59
+ * *
60
+ ******************************************************************/
61
+ function swp_format_stumbleupon_response( $response ) {
62
+ $response = json_decode( $response, true );
63
+ return isset( $response['result']['views'] )?intval( $response['result']['views'] ):0;
64
+ }
65
+ /**
66
+
67
+ ***************************************************************
68
  * *
69
  * #5: Create the Button HTML *
70
  * *
71
+ */
72
+ add_filter( 'swp_network_buttons', 'swp_stumbleupon_button_html',10 );
73
+ function swp_stumbleupon_button_html( $array ) {
74
 
75
+ // If we've already generated this button, just use our existing html
76
+ if ( isset( $_GLOBALS['sw']['buttons'][ $array['postID'] ]['stumbleupon'] ) ) :
77
+ $array['resource']['stumbleupon'] = $_GLOBALS['sw']['buttons'][ $array['postID'] ]['stumbleupon'];
78
 
79
  // If not, let's check if Facebook is activated and create the button HTML
80
+ elseif ( (isset( $array['options']['newOrderOfIcons']['stumbleupon'] ) && ! isset( $array['buttons'] )) || (isset( $array['buttons'] ) && isset( $array['buttons']['stumbleupon'] )) ) :
81
 
82
+ if ( isset( $array['shares']['stumbleupon'] ) ) :
83
+ $array['totes'] += intval( $array['shares']['stumbleupon'] );
84
  endif;
85
  ++$array['count'];
86
 
87
  // Collect the Title
88
  $title = get_post_meta( $array['postID'] , 'nc_ogTitle' , true );
89
+ if ( ! $title ) :
90
  $title = get_the_title();
91
  endif;
92
 
93
+ $array['resource']['stumbleupon'] = '<div class="nc_tweetContainer swp_stumbleupon" data-id="' . $array['count'] . '" data-network="stumble_upon">';
94
  $link = $array['url'];
95
+ $array['resource']['stumbleupon'] .= '<a rel="nofollow" target="_blank" href="http://www.stumbleupon.com/submit?url=' . $link . '&title=' . urlencode( $title ) . '" data-link="http://www.stumbleupon.com/submit?url=' . $link . '&title=' . urlencode( $title ) . '" class="nc_tweet">';
96
+ if ( $array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && isset( $array['shares']['stumbleupon'] ) && $array['shares']['stumbleupon'] > 0 ) :
97
  $array['resource']['stumbleupon'] .= '<span class="iconFiller">';
98
  $array['resource']['stumbleupon'] .= '<span class="spaceManWilly">';
99
  $array['resource']['stumbleupon'] .= '<i class="sw sw-stumbleupon"></i>';
100
+ $array['resource']['stumbleupon'] .= '<span class="swp_share"> ' . __( 'Stumble','social-warfare' ) . '</span>';
101
  $array['resource']['stumbleupon'] .= '</span></span>';
102
+ $array['resource']['stumbleupon'] .= '<span class="swp_count">' . swp_kilomega( $array['shares']['stumbleupon'] ) . '</span>';
103
+ else :
104
+ $array['resource']['stumbleupon'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-stumbleupon"></i><span class="swp_share"> ' . __( 'Stumble','social-warfare' ) . '</span></span></span></span>';
105
  endif;
106
  $array['resource']['stumbleupon'] .= '</a>';
107
  $array['resource']['stumbleupon'] .= '</div>';
108
 
109
  // Store these buttons so that we don't have to generate them for each set
110
+ $_GLOBALS['sw']['buttons'][ $array['postID'] ]['stumbleupon'] = $array['resource']['stumbleupon'];
111
 
112
  endif;
113
 
114
  return $array;
115
 
116
+ };
functions/social-networks/tumblr.php DELETED
@@ -1,107 +0,0 @@
1
- <?php
2
-
3
- /*****************************************************************
4
- * *
5
- * #1: Add the On / Off Switch and Sortable Option *
6
- * *
7
- ******************************************************************/
8
- add_filter('swp_button_options', 'swp_tumblr_options_function',20);
9
- function swp_tumblr_options_function($options) {
10
-
11
- // Create the new option in a variable to be inserted
12
- $options['content']['tumblr'] = array(
13
- 'type' => 'checkbox',
14
- 'content' => 'Tumblr',
15
- 'default' => false,
16
- 'premium' => true
17
- );
18
-
19
- return $options;
20
-
21
- };
22
- /*****************************************************************
23
- * *
24
- * #2: Add it to global network array *
25
- * *
26
- ******************************************************************/
27
- // Queue up your filter to be ran on the swp_options hook.
28
- add_filter('swp_add_networks', 'swp_tumblr_network');
29
-
30
- // Create the function that will filter the options
31
- function swp_tumblr_network($networks) {
32
-
33
- // Add your network to the existing network array
34
- $networks[] = 'tumblr';
35
-
36
- // Be sure to return the modified options array or the world will explode
37
- return $networks;
38
- };
39
- /*****************************************************************
40
- * *
41
- * #3: Generate the API Share Count Request URL *
42
- * *
43
- ******************************************************************/
44
- function swp_tumblr_request_link($url) {
45
- $request_url = 'https://api.tumblr.com/v2/share/stats?url=' . $url;
46
- return $request_url;
47
- }
48
- /*****************************************************************
49
- * *
50
- * #4: Parse the Response to get the share count *
51
- * *
52
- ******************************************************************/
53
- function swp_format_tumblr_response($response) {
54
- $response = json_decode($response, true);
55
- return isset($response['response']['note_count'])?intval($response['response']['note_count']):0;
56
- }
57
- /*****************************************************************
58
- * *
59
- * #5: Create the Button HTML *
60
- * *
61
- ******************************************************************/
62
- add_filter('swp_network_buttons', 'swp_tumblr_button_html',10);
63
- function swp_tumblr_button_html($array) {
64
-
65
- // If we've already generated this button, just use our existing html
66
- if(isset($_GLOBALS['sw']['buttons'][$array['postID']]['tumblr'])):
67
- $array['resource']['tumblr'] = $_GLOBALS['sw']['buttons'][$array['postID']]['tumblr'];
68
-
69
- // If not, let's check if Facebook is activated and create the button HTML
70
- elseif( (isset($array['options']['newOrderOfIcons']['tumblr']) && !isset($array['buttons'])) || (isset($array['buttons']) && isset($array['buttons']['tumblr'])) ):
71
-
72
- $array['totes'] += $array['shares']['tumblr'];
73
- ++$array['count'];
74
-
75
- // Collect the Title
76
- $title = get_post_meta( $array['postID'] , 'nc_ogTitle' , true );
77
- if(!$title):
78
- $title = get_the_title();
79
- endif;
80
-
81
- // Collect the Description
82
- $description = get_post_meta( $array['postID'] , 'nc_ogDescription' , true );
83
-
84
- $array['resource']['tumblr'] = '<div class="nc_tweetContainer swp_tumblr" data-id="'.$array['count'].'" data-network="tumblr">';
85
- $link = urlencode(urldecode(swp_process_url( $array['url'] , 'tumblr' , $array['postID'] )));
86
- $array['resource']['tumblr'] .= '<a target="_blank" href="http://www.tumblr.com/share/link?url='.$link.'&name='.urlencode($title).($description ? '&description=' : '').urlencode($description).'" data-link="http://www.tumblr.com/share/link?url='.$link.'&name='.urlencode($title).($description ? '&description=' : '').urlencode($description).'" class="nc_tweet">';
87
- if($array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && $array['shares']['tumblr'] > 0):
88
- $array['resource']['tumblr'] .= '<span class="iconFiller">';
89
- $array['resource']['tumblr'] .= '<span class="spaceManWilly">';
90
- $array['resource']['tumblr'] .= '<i class="sw sw-tumblr"></i>';
91
- $array['resource']['tumblr'] .= '<span class="swp_share"> '.__('Share','social-warfare').'</span>';
92
- $array['resource']['tumblr'] .= '</span></span>';
93
- $array['resource']['tumblr'] .= '<span class="swp_count">'.swp_kilomega($array['shares']['tumblr']).'</span>';
94
- else:
95
- $array['resource']['tumblr'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-tumblr"></i><span class="swp_share"> '.__('Share','social-warfare').'</span></span></span></span>';
96
- endif;
97
- $array['resource']['tumblr'] .= '</a>';
98
- $array['resource']['tumblr'] .= '</div>';
99
-
100
- // Store these buttons so that we don't have to generate them for each set
101
- $_GLOBALS['sw']['buttons'][$array['postID']]['tumblr'] = $array['resource']['tumblr'];
102
-
103
- endif;
104
-
105
- return $array;
106
-
107
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/social-networks/twitter.php CHANGED
@@ -1,170 +1,171 @@
1
  <?php
2
 
3
- /*****************************************************************
4
- * *
5
- * #1: Add the On / Off Switch and Sortable Option *
6
- * *
7
- ******************************************************************/
8
- add_filter('swp_button_options', 'swp_twitter_options_function',20);
9
- function swp_twitter_options_function($options) {
10
-
11
- // Create the new option in a variable to be inserted
12
- $options['content']['twitter'] = array(
13
- 'type' => 'checkbox',
14
- 'content' => 'Twitter',
15
- 'default' => true,
16
- 'premium' => false
17
- );
18
-
19
- return $options;
20
-
21
- };
22
- /*****************************************************************
 
 
 
 
23
  * *
24
  * #2: Add it to global network array *
25
  * *
26
- ******************************************************************/
27
  // Queue up your filter to be ran on the swp_options hook.
28
- add_filter('swp_add_networks', 'swp_twitter_network');
29
 
30
  // Create the function that will filter the options
31
- function swp_twitter_network($networks) {
32
 
33
- // Add your network to the existing network array
34
- $networks[] = 'twitter';
35
 
36
- // Be sure to return the modified options array or the world will explode
37
- return $networks;
38
- };
39
- /*****************************************************************
40
- * *
41
- * #3: Generate the API Share Count Request URL *
42
- * *
43
- ******************************************************************/
44
- function swp_twitter_request_link($url) {
45
 
46
- // Fetch the user's options
47
- $swp_user_options = swp_get_user_options();
 
 
 
 
48
 
49
- // If the user has enabled Twitter shares....
50
- if($swp_user_options['twitter_shares']):
51
 
52
- // Return the correct Twitter JSON endpoint URL
53
- $request_url = 'http://public.newsharecounts.com/count.json?url=' . $url;
54
 
55
- // Debugging
56
- if(isset($_GET['swp_twitter_debug']) && $_GET['swp_twitter_debug'] == true):
57
- echo '<b>Request URL:</b> '.$request_url.'<br />';
58
- endif;
59
 
60
- return $request_url;
 
 
 
 
 
61
 
62
  // If the user has not enabled Twitter shares....
63
- else:
64
 
65
  // Return nothing so we don't run an API call
66
  return 0;
67
 
68
  endif;
69
- }
70
- /*****************************************************************
71
- * *
72
- * #4: Parse the Response to get the share count *
73
- * *
74
- ******************************************************************/
75
- function swp_format_twitter_response($response) {
 
 
76
 
77
- // Fetch the user's options
78
- $swp_user_options = swp_get_user_options();
79
 
80
- // If the user has enabled Twitter shares....
81
- if($swp_user_options['twitter_shares']):
82
 
83
- // Debugging
84
- if(isset($_GET['swp_twitter_debug']) && $_GET['swp_twitter_debug'] == true):
85
- echo '<b>Response:</b> '.$response.'<br />';
86
- endif;
87
 
88
- // Parse the response to get the actual number
89
- $response = json_decode($response, true);
90
 
91
- return isset($response['count'])?intval($response['count']):0;
92
 
93
  // If the user has not enabled Twitter shares....
94
- else:
95
 
96
  // Return the number 0
97
  return 0;
98
 
99
  endif;
100
- }
101
- /*****************************************************************
 
 
102
  * *
103
  * #5: Create the Button HTML *
104
  * *
105
- ******************************************************************/
106
- add_filter('swp_network_buttons', 'swp_twitter_button_html',10);
107
- function swp_twitter_button_html($array) {
108
 
109
- // If we've already generated this button, just use our existing html
110
- if(isset($_GLOBALS['sw']['buttons'][$array['postID']]['twitter'])):
111
- $array['resource']['twitter'] = $_GLOBALS['sw']['buttons'][$array['postID']]['twitter'];
112
 
113
  // If not, let's check if Facebook is activated and create the button HTML
114
- elseif( (isset($array['options']['newOrderOfIcons']['twitter']) && !isset($array['buttons'])) || (isset($array['buttons']) && isset($array['buttons']['twitter'])) ):
115
 
116
- $array['totes'] += $array['shares']['twitter'];
117
  ++$array['count'];
118
 
119
- $title = strip_tags(get_the_title($array['postID']));
120
- $title = str_replace('|','',$title);
121
  $ct = get_post_meta( $array['postID'] , 'nc_customTweet' , true );
122
 
123
-
124
- $ct = ($ct != '' ? urlencode(html_entity_decode($ct, ENT_COMPAT, 'UTF-8')) : urlencode(html_entity_decode($title, ENT_COMPAT, 'UTF-8')));
125
  $twitterLink = swp_process_url( $array['url'] , 'twitter' , $array['postID'] );
126
- if (strpos($ct,'http') !== false) : $urlParam = '&url=/'; else: $urlParam = '&url='.$twitterLink; endif;
127
-
128
- if(swp_is_cache_fresh($array['postID']) == false):
129
- $user_twitter_handle = get_the_author_meta( 'swp_twitter' , swp_get_author($array['postID']));
130
- if($user_twitter_handle):
131
- delete_post_meta($array['postID'],'swp_twitter_username');
132
- update_post_meta($array['postID'],'swp_twitter_username',$user_twitter_handle);
133
- else:
134
- delete_post_meta($array['postID'],'swp_twitter_username');
135
- endif;
136
- else:
137
- $user_twitter_handle = get_post_meta( $array['postID'] , 'swp_twitter_username' , true );
138
- endif;
139
-
140
- if($user_twitter_handle):
141
- $viaText = '&via='.str_replace('@','',$user_twitter_handle);
142
- elseif($array['options']['twitterID']):
143
- $viaText = '&via='.str_replace('@','',$array['options']['twitterID']);
144
- else:
145
- $viaText = '';
146
- endif;
147
-
148
- $array['resource']['twitter'] = '<div class="nc_tweetContainer twitter" data-id="'.$array['count'].'" data-network="twitter">';
149
- $array['resource']['twitter'] .= '<a href="https://twitter.com/share?original_referer=/&text='.$ct.''.$urlParam.''.$viaText.'" data-link="https://twitter.com/share?original_referer=/&text='.$ct.''.$urlParam.''.$viaText.'" class="nc_tweet">';
150
- if($array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && $array['shares']['twitter'] > 0):
151
- $array['resource']['twitter'] .= '<span class="iconFiller">';
152
- $array['resource']['twitter'] .= '<span class="spaceManWilly">';
153
- $array['resource']['twitter'] .= '<i class="sw sw-twitter"></i>';
154
- $array['resource']['twitter'] .= '<span class="swp_share"> '.__('Tweet','social-warfare').'</span>';
155
- $array['resource']['twitter'] .= '</span></span>';
156
- $array['resource']['twitter'] .= '<span class="swp_count">'.swp_kilomega($array['shares']['twitter']).'</span>';
157
- else:
158
- $array['resource']['twitter'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-twitter"></i><span class="swp_share"> '.__('Tweet','social-warfare').'</span></span></span></span>';
159
- endif;
160
- $array['resource']['twitter'] .= '</a>';
161
- $array['resource']['twitter'] .= '</div>';
162
-
163
- // Store these buttons so that we don't have to generate them for each set
164
- $_GLOBALS['sw']['buttons'][$array['postID']]['twitter'] = $array['resource']['twitter'];
165
 
 
 
 
 
 
 
 
166
  endif;
167
 
168
- return $array;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
 
170
- };
1
  <?php
2
 
3
+ /**
4
+
5
+ * **************************************************************
6
+ * *
7
+ * #1: Add the On / Off Switch and Sortable Option *
8
+ * *
9
+ ******************************************************************/
10
+ add_filter( 'swp_button_options', 'swp_twitter_options_function',20 );
11
+ function swp_twitter_options_function( $options ) {
12
+
13
+ // Create the new option in a variable to be inserted
14
+ $options['content']['twitter'] = array(
15
+ 'type' => 'checkbox',
16
+ 'content' => 'Twitter',
17
+ 'default' => true,
18
+ 'premium' => false,
19
+ );
20
+
21
+ return $options;
22
+
23
+ };
24
+ /**
25
+
26
+ ***************************************************************
27
  * *
28
  * #2: Add it to global network array *
29
  * *
30
+ */
31
  // Queue up your filter to be ran on the swp_options hook.
32
+ add_filter( 'swp_add_networks', 'swp_twitter_network' );
33
 
34
  // Create the function that will filter the options
35
+ function swp_twitter_network( $networks ) {
36
 
37
+ // Add your network to the existing network array
38
+ $networks[] = 'twitter';
39
 
40
+ // Be sure to return the modified options array or the world will explode
41
+ return $networks;
42
+ };
43
+ /**
 
 
 
 
 
44
 
45
+ * **************************************************************
46
+ * *
47
+ * #3: Generate the API Share Count Request URL *
48
+ * *
49
+ ******************************************************************/
50
+ function swp_twitter_request_link( $url ) {
51
 
52
+ // Fetch the user's options
53
+ global $swp_user_options;
54
 
55
+ // If the user has enabled Twitter shares....
56
+ if ( $swp_user_options['twitter_shares'] ) :
57
 
58
+ // Return the correct Twitter JSON endpoint URL
59
+ $request_url = 'http://public.newsharecounts.com/count.json?url=' . $url;
 
 
60
 
61
+ // Debugging
62
+ if ( _swp_is_debug( 'twitter' ) ) {
63
+ echo '<b>Request URL:</b> ' . $request_url . '<br />';
64
+ }
65
+
66
+ return $request_url;
67
 
68
  // If the user has not enabled Twitter shares....
69
+ else :
70
 
71
  // Return nothing so we don't run an API call
72
  return 0;
73
 
74
  endif;
75
+ }
76
+ /**
77
+
78
+ * **************************************************************
79
+ * *
80
+ * #4: Parse the Response to get the share count *
81
+ * *
82
+ ******************************************************************/
83
+ function swp_format_twitter_response( $response ) {
84
 
85
+ // Fetch the user's options
86
+ global $swp_user_options;
87
 
88
+ // If the user has enabled Twitter shares....
89
+ if ( $swp_user_options['twitter_shares'] ) :
90
 
91
+ // Debugging
92
+ if ( _swp_is_debug( 'twitter' ) ) {
93
+ echo '<b>Response:</b> ' . $response . '<br />';
94
+ }
95
 
96
+ // Parse the response to get the actual number
97
+ $response = json_decode( $response, true );
98
 
99
+ return isset( $response['count'] )?intval( $response['count'] ):0;
100
 
101
  // If the user has not enabled Twitter shares....
102
+ else :
103
 
104
  // Return the number 0
105
  return 0;
106
 
107
  endif;
108
+ }
109
+ /**
110
+
111
+ ***************************************************************
112
  * *
113
  * #5: Create the Button HTML *
114
  * *
115
+ */
116
+ add_filter( 'swp_network_buttons', 'swp_twitter_button_html',10 );
117
+ function swp_twitter_button_html( $array ) {
118
 
119
+ // If we've already generated this button, just use our existing html
120
+ if ( isset( $_GLOBALS['sw']['buttons'][ $array['postID'] ]['twitter'] ) ) :
121
+ $array['resource']['twitter'] = $_GLOBALS['sw']['buttons'][ $array['postID'] ]['twitter'];
122
 
123
  // If not, let's check if Facebook is activated and create the button HTML
124
+ elseif ( (isset( $array['options']['newOrderOfIcons']['twitter'] ) && ! isset( $array['buttons'] )) || (isset( $array['buttons'] ) && isset( $array['buttons']['twitter'] )) ) :
125
 
126
+ $array['totes'] += intval( $array['shares']['twitter'] );
127
  ++$array['count'];
128
 
129
+ $title = strip_tags( get_the_title( $array['postID'] ) );
130
+ $title = str_replace( '|','',$title );
131
  $ct = get_post_meta( $array['postID'] , 'nc_customTweet' , true );
132
 
133
+ $ct = ($ct != '' ? urlencode( html_entity_decode( $ct, ENT_COMPAT, 'UTF-8' ) ) : urlencode( html_entity_decode( $title, ENT_COMPAT, 'UTF-8' ) ));
 
134
  $twitterLink = swp_process_url( $array['url'] , 'twitter' , $array['postID'] );
135
+ if ( strpos( $ct,'http' ) !== false ) : $urlParam = '&url=/';
136
+ else :
137
+ $urlParam = '&url=' . $twitterLink;
138
+ endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
 
140
+ $user_twitter_handle = get_the_author_meta( 'swp_twitter' , swp_get_author( $array['postID'] ) );
141
+ if ( $user_twitter_handle ) :
142
+ $viaText = '&via=' . str_replace( '@','',$user_twitter_handle );
143
+ elseif ( $array['options']['twitterID'] ) :
144
+ $viaText = '&via=' . str_replace( '@','',$array['options']['twitterID'] );
145
+ else :
146
+ $viaText = '';
147
  endif;
148
 
149
+ $array['resource']['twitter'] = '<div class="nc_tweetContainer twitter" data-id="' . $array['count'] . '" data-network="twitter">';
150
+ $array['resource']['twitter'] .= '<a rel="nofollow" target="_blank" href="https://twitter.com/share?original_referer=/&text=' . $ct . '' . $urlParam . '' . $viaText . '" data-link="https://twitter.com/share?original_referer=/&text=' . $ct . '' . $urlParam . '' . $viaText . '" class="nc_tweet">';
151
+ if ( $array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && $array['shares']['twitter'] > 0 ) :
152
+ $array['resource']['twitter'] .= '<span class="iconFiller">';
153
+ $array['resource']['twitter'] .= '<span class="spaceManWilly">';
154
+ $array['resource']['twitter'] .= '<i class="sw sw-twitter"></i>';
155
+ $array['resource']['twitter'] .= '<span class="swp_share"> ' . __( 'Tweet','social-warfare' ) . '</span>';
156
+ $array['resource']['twitter'] .= '</span></span>';
157
+ $array['resource']['twitter'] .= '<span class="swp_count">' . swp_kilomega( $array['shares']['twitter'] ) . '</span>';
158
+ else :
159
+ $array['resource']['twitter'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-twitter"></i><span class="swp_share"> ' . __( 'Tweet','social-warfare' ) . '</span></span></span></span>';
160
+ endif;
161
+ $array['resource']['twitter'] .= '</a>';
162
+ $array['resource']['twitter'] .= '</div>';
163
+
164
+ // Store these buttons so that we don't have to generate them for each set
165
+ $_GLOBALS['sw']['buttons'][ $array['postID'] ]['twitter'] = $array['resource']['twitter'];
166
+
167
+ endif;
168
+
169
+ return $array;
170
 
171
+ };
functions/social-networks/whatsapp.php DELETED
@@ -1,100 +0,0 @@
1
- <?php
2
-
3
- /*****************************************************************
4
- * *
5
- * #1: Add the On / Off Switch and Sortable Option *
6
- * *
7
- ******************************************************************/
8
- add_filter('swp_button_options', 'swp_whatsapp_options_function',20);
9
- function swp_whatsapp_options_function($options) {
10
-
11
- // Create the new option in a variable to be inserted
12
- $options['content']['whatsapp'] = array(
13
- 'type' => 'checkbox',
14
- 'content' => 'WhatsApp',
15
- 'default' => false,
16
- 'premium' => true
17
- );
18
-
19
- return $options;
20
-
21
- };
22
- /*****************************************************************
23
- * *
24
- * #2: Add it to global network array *
25
- * *
26
- ******************************************************************/
27
- // Queue up your filter to be ran on the swp_options hook.
28
- add_filter('swp_add_networks', 'swp_whatsapp_network');
29
-
30
- // Create the function that will filter the options
31
- function swp_whatsapp_network($networks) {
32
-
33
- // Add your network to the existing network array
34
- $networks[] = 'whatsapp';
35
-
36
- // Be sure to return the modified options array or the world will explode
37
- return $networks;
38
- };
39
- /*****************************************************************
40
- * *
41
- * #3: Generate the API Share Count Request URL *
42
- * *
43
- ******************************************************************/
44
- function swp_whatsapp_request_link($url) {
45
- $request_url = 'https://api.facebook.com/restserver.php?method=links.getStats&format=json&urls='.$url;
46
- return 0;
47
- }
48
- /*****************************************************************
49
- * *
50
- * #4: Parse the Response to get the share count *
51
- * *
52
- ******************************************************************/
53
- function swp_format_whatsapp_response($response) {
54
- // $response = json_decode($response, true);
55
- // return isset($response[0]['total_count'])?intval($response[0]['total_count']):0;
56
- return 0;
57
- }
58
- /*****************************************************************
59
- * *
60
- * #5: Create the Button HTML *
61
- * *
62
- ******************************************************************/
63
- add_filter('swp_network_buttons', 'swp_whatsapp_button_html',10);
64
- function swp_whatsapp_button_html($array) {
65
-
66
- // If we've already generated this button, just use our existing html
67
- if(isset($_GLOBALS['sw']['buttons'][$array['postID']]['whatsapp'])):
68
- $array['resource']['whatsapp'] = $_GLOBALS['sw']['buttons'][$array['postID']]['whatsapp'];
69
-
70
- // If not, let's check if WhatsApp is activated and create the button HTML
71
- elseif( (isset($array['options']['newOrderOfIcons']['whatsapp']) && swp_mobile_detection() && !isset($array['buttons']))
72
- || (isset($array['buttons']) && isset($array['buttons']['whatsapp'])) ):
73
-
74
- $array['totes'] += $array['shares']['whatsapp'];
75
- ++$array['count'];
76
-
77
- $array['resource']['whatsapp'] = '<div class="nc_tweetContainer swp_whatsapp" data-id="'.$array['count'].'" data-network="whatsapp">';
78
- $link = urlencode(urldecode(swp_process_url( $array['url'] , 'whatsapp' , $array['postID'] )));
79
- $array['resource']['whatsapp'] .= '<a target="_blank" href="whatsapp://send?text='.$link.'" class="nc_tweet" data-action="share/whatsapp/share">';
80
- if($array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && $array['shares']['whatsapp'] > 0):
81
- $array['resource']['whatsapp'] .= '<span class="iconFiller">';
82
- $array['resource']['whatsapp'] .= '<span class="spaceManWilly">';
83
- $array['resource']['whatsapp'] .= '<i class="sw sw-whatsapp"></i>';
84
- $array['resource']['whatsapp'] .= '<span class="swp_share"> '.__('WhatsApp','social-warfare').'</span>';
85
- $array['resource']['whatsapp'] .= '</span></span>';
86
- $array['resource']['whatsapp'] .= '<span class="swp_count">'.swp_kilomega($array['shares']['whatsapp']).'</span>';
87
- else:
88
- $array['resource']['whatsapp'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-whatsapp"></i><span class="swp_share"> '.__('WhatsApp','social-warfare').'</span></span></span></span>';
89
- endif;
90
- $array['resource']['whatsapp'] .= '</a>';
91
- $array['resource']['whatsapp'] .= '</div>';
92
-
93
- // Store these buttons so that we don't have to generate them for each set
94
- $_GLOBALS['sw']['buttons'][$array['postID']]['whatsapp'] = $array['resource']['whatsapp'];
95
-
96
- endif;
97
-
98
- return $array;
99
-
100
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/social-networks/yummly.php DELETED
@@ -1,148 +0,0 @@
1
- <?php
2
-
3
- /*****************************************************************
4
- * *
5
- * #1: Add the On / Off Switch and Sortable Option *
6
- * *
7
- ******************************************************************/
8
- add_filter('swp_button_options', 'swp_yummly_options_function',20);
9
- function swp_yummly_options_function($options) {
10
-
11
- // Create the new option in a variable to be inserted
12
- $options['content']['yummly'] = array(
13
- 'type' => 'checkbox',
14
- 'content' => 'Yummly',
15
- 'default' => false,
16
- 'premium' => true
17
- );
18
-
19
- return $options;
20
-
21
- };
22
- /*****************************************************************
23
- * *
24
- * #2: Add it to global network array *
25
- * *
26
- ******************************************************************/
27
- // Queue up your filter to be ran on the swp_options hook.
28
- add_filter('swp_add_networks', 'swp_yummly_network');
29
-
30
- // Create the function that will filter the options
31
- function swp_yummly_network($networks) {
32
-
33
- // Add your network to the existing network array
34
- $networks[] = 'yummly';
35
-
36
- // Be sure to return the modified options array or the world will explode
37
- return $networks;
38
- };
39
- /*****************************************************************
40
- * *
41
- * #3: Generate the API Share Count Request URL *
42
- * *
43
- ******************************************************************/
44
- function swp_yummly_request_link($url) {
45
- $request_url = 'http://www.yummly.com/services/yum-count?url=' . $url;
46
- return $request_url;
47
- }
48
- /*****************************************************************
49
- * *
50
- * #4: Parse the Response to get the share count *
51
- * *
52
- ******************************************************************/
53
- function swp_format_yummly_response($response) {
54
- $response = json_decode($response, true);
55
- return isset($response['count'])?intval($response['count']):0;
56
- }
57
- /*****************************************************************
58
- * *
59
- * #5: Create the Button HTML *
60
- * *
61
- ******************************************************************/
62
- add_filter('swp_network_buttons', 'swp_yummly_button_html',10);
63
- function swp_yummly_button_html($array) {
64
-
65
- // If we've already generated this button, just use our existing html
66
- if(isset($_GLOBALS['sw']['buttons'][$array['postID']]['yummly'])):
67
- $array['resource']['yummly'] = $_GLOBALS['sw']['buttons'][$array['postID']]['yummly'];
68
-
69
- // If not, let's check if Yummly is activated and create the button HTML
70
- elseif( (isset($array['options']['newOrderOfIcons']['yummly']) && !isset($array['buttons'])) || (isset($array['buttons']) && isset($array['buttons']['yummly'])) ):
71
-
72
- if(
73
-
74
- // If a category is set and this post is in that category
75
- (
76
- isset($array['options']['yummly_categories'])
77
- && $array['options']['yummly_categories'] != ''
78
- && in_category($array['options']['yummly_categories'] , $array['postID'])
79
- )
80
-
81
- ||
82
-
83
- // If a tag is set and this post is in that tag
84
- (
85
- isset($array['options']['yummly_tags'])
86
- && $array['options']['yummly_tags'] != ''
87
- && has_tag($array['options']['yummly_tags'] , $array['postID'])
88
- )
89
-
90
- ||
91
-
92
- // If no tags or categories have been set
93
- (
94
- !isset($array['options']['yummly_tags']) && !isset($array['options']['yummly_categories']) ||
95
- $array['options']['yummly_categories'] == '' && $array['options']['yummly_tags'] == ''
96
- )
97
-
98
- ):
99
-
100
- $array['totes'] += $array['shares']['yummly'];
101
- ++$array['count'];
102
-
103
- // Let's create a title
104
- if(get_post_meta( $array['postID'] , 'nc_ogTitle' , true )):
105
-
106
- // If the user defined an social media title, let's use it.
107
- $title = urlencode(urldecode(get_post_meta( $array['postID'] , 'nc_ogTitle' , true )));
108
-
109
- else:
110
-
111
- // Otherwise we'll use the default post title
112
- $title = urlencode(urldecode(get_the_title()));
113
-
114
- endif;
115
-
116
- if(get_post_meta($array['postID'],'swp_open_graph_image_url')):
117
- $image = urlencode(urldecode(get_post_meta($array['postID'],'swp_open_graph_image_url',true)));
118
- else:
119
- $image = urlencode(urldecode(get_post_meta($array['postID'],'swp_open_thumbnail_url',true)));
120
- endif;
121
-
122
- $array['resource']['yummly'] = '<div class="nc_tweetContainer swp_yummly" data-id="'.$array['count'].'" data-network="yummly">';
123
- // $link = urlencode(urldecode(swp_process_url( $array['url'] , 'yummly' , $array['postID'] )));
124
- $link = $array['url'];
125
- $array['resource']['yummly'] .= '<a target="_blank" href="http://www.yummly.com/urb/verify?url='.$link.'&title='.$title.'&image='.$image.'&yumtype=button" data-link="http://www.yummly.com/urb/verify?url='.$link.'&title='.$title.'&image='.$image.'&yumtype=button" class="nc_tweet">';
126
- if($array['options']['totesEach'] && $array['shares']['totes'] >= $array['options']['minTotes'] && $array['shares']['yummly'] > 0):
127
- $array['resource']['yummly'] .= '<span class="iconFiller">';
128
- $array['resource']['yummly'] .= '<span class="spaceManWilly">';
129
- $array['resource']['yummly'] .= '<i class="sw sw-yummly"></i>';
130
- $array['resource']['yummly'] .= '<span class="swp_share"> '.__('Yum','social-warfare').'</span>';
131
- $array['resource']['yummly'] .= '</span></span>';
132
- $array['resource']['yummly'] .= '<span class="swp_count">'.swp_kilomega($array['shares']['yummly']).'</span>';
133
- else:
134
- $array['resource']['yummly'] .= '<span class="swp_count swp_hide"><span class="iconFiller"><span class="spaceManWilly"><i class="sw sw-yummly"></i><span class="swp_share"> '.__('Yum','social-warfare').'</span></span></span></span>';
135
- endif;
136
- $array['resource']['yummly'] .= '</a>';
137
- $array['resource']['yummly'] .= '</div>';
138
-
139
- // Store these buttons so that we don't have to generate them for each set
140
- $_GLOBALS['sw']['buttons'][$array['postID']]['yummly'] = $array['resource']['yummly'];
141
-
142
- endif;
143
-
144
- endif;
145
-
146
- return $array;
147
-
148
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/sw-shortcode-generator.js DELETED
@@ -1,72 +0,0 @@
1
- (function() {
2
- tinymce.PluginManager.add('swp_shortcode_generator', function( editor, url ) {
3
- editor.addButton( 'swp_shortcode_generator', {
4
- title: 'Social Warfare Buttons',
5
- icon: 'sw sw sw-social-warfare',
6
- onclick: function() {
7
- editor.windowManager.open( {
8
- title: 'Insert Social Warfare Buttons',
9
- body: [
10
- {
11
- type: 'listbox',
12
- name: 'reflection',
13
- label: 'Should the buttons reflect this post or another one?',
14
- 'values': [
15
- {text: 'This Post', value: 'default'},
16
- {text: 'A Different Post', value: 'alt'}
17
- ],
18
- onselect: function( v ) {
19
- if(this.value() == 'alt') {
20
- jQuery('.mce-postid').parent().parent().slideDown();
21
- } else {
22
- jQuery('.mce-postid').parent().parent().slideUp();
23
- }
24
- }
25
- },
26
- {
27
- type: 'textbox',
28
- multiline: false,
29
- name: 'postID',
30
- classes: 'postid',
31
- label: 'The ID of the post or page to reflect:'
32
- },
33
- {
34
- type: 'textbox',
35
- multiline: false,
36
- name: 'buttons',
37
- classes: 'buttons',
38
- label: 'Buttons to Include:'
39
- },
40
- {
41
- type: 'label',
42
- name: 'someHelpText',
43
- onPostRender : function() {
44
- this.getEl().innerHTML =
45
- '<span style="float:right;">Comma separated list of social network (e.g. "Facebook,Twitter,Total"). Leave blank to use site-wide defaults.</span>';},
46
- text: ''},
47
- ],
48
- onPostRender : function() {
49
- jQuery('.mce-postid').parent().parent().slideUp();
50
- jQuery('.mce-title').prepend('<i class="sw sw-social-warfare"></i>');
51
- },
52
- onsubmit: function( e ) {
53
- // Check if this is supposed to refelct a different post_id
54
- if(e.data.reflection == 'alt' && e.data.postID != '') {
55
- var post_information = ' post_id="' + e.data.postID + '"';
56
- } else {
57
- var post_information = '';
58
- }
59
- // Check if this is a custom set of buttons
60
- if(e.data.buttons != '') {
61
- var button_set = ' buttons="'+e.data.buttons+'"';
62
- } else {
63
- var button_set = '';
64
- }
65
- editor.insertContent( '[social_warfare'+post_information+''+button_set+']');
66
-
67
- }
68
- });
69
- }
70
- });
71
- });
72
- })();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/sw-shortcode-generator.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  if ( ! class_exists( 'swp_shortcode_generator' ) ) {
4
 
5
- class swp_shortcode_generator {
6
 
7
  public function __construct() {
8
  $this->swp_shortcode_generator();
@@ -12,14 +12,14 @@ if ( ! class_exists( 'swp_shortcode_generator' ) ) {
12
  register_activation_hook( __FILE__, array( __CLASS__, 'activation' ) );
13
  register_deactivation_hook( __FILE__, array( __CLASS__, 'deactivation' ) );
14
 
15
- if(is_admin()) {
16
  $this->register_admin_hooks();
17
  }
18
  }
19
 
20
- public function debug($array) {
21
  echo '<pre>';
22
- print_r($array);
23
  echo '</pre>';
24
  }
25
 
@@ -32,32 +32,32 @@ if ( ! class_exists( 'swp_shortcode_generator' ) ) {
32
  }
33
 
34
  public function register_admin_hooks() {
35
- add_filter('tiny_mce_version', array($this, 'refresh_mce'));
36
- add_action('init', array($this, 'tinymce_button'));
37
  }
38
 
39
  public function tinymce_button() {
40
- if (!current_user_can('edit_posts') && !current_user_can('edit_pages')) {
41
  return;
42
  }
43
 
44
- if (get_user_option('rich_editing') == 'true') {
45
- add_filter('mce_external_plugins', array($this, 'tinymce_register_plugin'));
46
- add_filter('mce_buttons', array($this, 'tinymce_register_button'));
47
  }
48
  }
49
 
50
- public function tinymce_register_button($buttons) {
51
- array_push($buttons, "|", "swp_shortcode_generator");
52
- return $buttons;
53
  }
54
 
55
- public function tinymce_register_plugin($plugin_array) {
56
- $plugin_array['swp_shortcode_generator'] = plugins_url( '/sw-shortcode-generator.js', __FILE__);
57
- return $plugin_array;
58
  }
59
 
60
- public function refresh_mce($ver) {
61
  $ver += 3;
62
  return $ver;
63
  }
@@ -65,4 +65,4 @@ if ( ! class_exists( 'swp_shortcode_generator' ) ) {
65
 
66
  new swp_shortcode_generator();
67
 
68
- }
2
 
3
  if ( ! class_exists( 'swp_shortcode_generator' ) ) {
4
 
5
+ class swp_shortcode_generator {
6
 
7
  public function __construct() {
8
  $this->swp_shortcode_generator();
12
  register_activation_hook( __FILE__, array( __CLASS__, 'activation' ) );
13
  register_deactivation_hook( __FILE__, array( __CLASS__, 'deactivation' ) );
14
 
15
+ if ( is_admin() ) {
16
  $this->register_admin_hooks();
17
  }
18
  }
19
 
20
+ public function debug( $array ) {
21
  echo '<pre>';
22
+ print_r( $array );
23
  echo '</pre>';
24
  }
25
 
32
  }
33
 
34
  public function register_admin_hooks() {
35
+ add_filter( 'tiny_mce_version', array( $this, 'refresh_mce' ) );
36
+ add_action( 'init', array( $this, 'tinymce_button' ) );
37
  }
38
 
39
  public function tinymce_button() {
40
+ if ( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'edit_pages' ) ) {
41
  return;
42
  }
43
 
44
+ if ( get_user_option( 'rich_editing' ) == 'true' ) {
45
+ add_filter( 'mce_external_plugins', array( $this, 'tinymce_register_plugin' ) );
46
+ add_filter( 'mce_buttons', array( $this, 'tinymce_register_button' ) );
47
  }
48
  }
49
 
50
+ public function tinymce_register_button( $buttons ) {
51
+ array_push( $buttons, '|', 'swp_shortcode_generator' );
52
+ return $buttons;
53
  }
54
 
55
+ public function tinymce_register_plugin( $plugin_array ) {
56
+ $plugin_array['swp_shortcode_generator'] = SWP_PLUGIN_URL . '/js/sw-shortcode-generator.js';
57
+ return $plugin_array;
58
  }
59
 
60
+ public function refresh_mce( $ver ) {
61
  $ver += 3;
62
  return $ver;
63
  }
65
 
66
  new swp_shortcode_generator();
67
 
68
+ }// End if().
functions/url_processing.php ADDED
@@ -0,0 +1,322 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+
5
+ * **************************************************************
6
+ * *
7
+ * Link Shortening & Analytics Functions *
8
+ * *
9
+ ******************************************************************/
10
+
11
+ // Enqueue the Bitly Shortener Hook
12
+ add_filter( 'swp_link_shortening' , 'swp_bitly_shortener' );
13
+ add_filter( 'swp_analytics' , 'swp_google_analytics' );
14
+
15
+
16
+ /**
17
+
18
+ * **************************************************************
19
+ * *
20
+ * The Google Analytics Filter Function *
21
+ * *
22
+ ******************************************************************/
23
+
24
+ function swp_google_analytics( $array ) {
25
+ global $swp_user_options;
26
+
27
+ // Fetch the user options
28
+ $options = $swp_user_options;
29
+ $url = $array['url'];
30
+ $network = $array['network'];
31
+
32
+ // Check if Analytics have been enabled or not
33
+ if ( $options['googleAnalytics'] == true ) :
34
+ if ( strpos( $url,'?' ) !== false ) :
35
+ $array['url'] = $url . urlencode( '&utm_source=' . $network . '&utm_medium=' . $options['analyticsMedium'] . '&utm_campaign=' . $options['analyticsCampaign'] . '' );
36
+ else :
37
+ $array['url'] = $url . urlencode( '?utm_source=' . $network . '&utm_medium=' . $options['analyticsMedium'] . '&utm_campaign=' . $options['analyticsCampaign'] . '' );
38
+ endif;
39
+ endif;
40
+ return $array;
41
+ }
42
+
43
+ /**
44
+
45
+ * **************************************************************
46
+ * *
47
+ * The Bitly Link Shortener Function *
48
+ * *
49
+ ******************************************************************/
50
+
51
+ // The Bitly Shortener Function called by the filter hook
52
+ function swp_bitly_shortener( $array ) {
53
+ global $swp_user_options;
54
+
55
+ if ( $array['network'] == 'totes' ) :
56
+ return $array;
57
+ endif;
58
+
59
+ $url = $array['url'];
60
+ $network = $array['network'];
61
+ $postID = $array['postID'];
62
+
63
+ // Fetch the User's Options
64
+ $options = $swp_user_options;
65
+
66
+ // If Link shortening is activated....
67
+ if ( $options['linkShortening'] == true ) :
68
+
69
+ // If Bitly is activated and we have all the appropriate credentials....
70
+ if ( isset( $options['bitly_access_token'] ) ) :
71
+
72
+ // Collect our bitly login information
73
+ $access_token = $options['bitly_access_token'];
74
+
75
+ // If Google Analytics is Activated....
76
+ if ( $options['googleAnalytics'] == true ) :
77
+
78
+ // If the Cache is still fresh or a previous API request failed....
79
+ if ( swp_is_cache_fresh( $postID ) == true || (isset( $_GLOBALS['bitly_status'] ) && $_GLOBALS['bitly_status'] == 'failure') ) :
80
+
81
+ // If the link has already been shortened....
82
+ $existingURL = get_post_meta( $postID,'bitly_link_' . $network,true );
83
+ if ( $existingURL && swp_is_cache_fresh( $postID ) == true ) :
84
+ $array['url'] = $existingURL;
85
+ return $array;
86
+
87
+ // If the link has NOT already been shortened
88
+ else :
89
+
90
+ // ....Return the normal URL
91
+ return $array;
92
+
93
+ endif;
94
+
95
+ // If the Cache is NOT fresh....
96
+ else :
97
+
98
+ // If the API provides a shortened URL...
99
+ $shortURL = swp_make_bitly_url( urldecode( $url ) , $network , $access_token );
100
+ if ( $shortURL ) :
101
+
102
+ // Store the link in the cache and return it to the buttons
103
+ delete_post_meta( $postID,'bitly_link_' . $network );
104
+ update_post_meta( $postID,'bitly_link_' . $network,$shortURL );
105
+ $array['url'] = $shortURL;
106
+ return $array;
107
+
108
+ // If the API does not provide a shortened URL....
109
+ else :
110
+
111
+ // Set a variable we'll check to avoid multiple calls to bitly upon the first failure
112
+ $_GLOBALS['sw']['bitly_status'] = 'failure';
113
+
114
+ // Return the normal URL
115
+ return $array;
116
+
117
+ // End the check for a shortneing link from the API
118
+ endif;
119
+
120
+ // End the check for the cache being fresh
121
+ endif;
122
+
123
+ // If Google Analytics is NOT activated....
124
+ else :
125
+ // If the cache is fresh or if the API has failed already....
126
+ if ( swp_is_cache_fresh( $postID ) == true || (isset( $_GLOBALS['bitly_status'] ) && $_GLOBALS['bitly_status'] == 'failure') ) :
127
+
128
+ // If we have a shortened URL in the cache....
129
+ $existingURL = get_post_meta( $postID,'bitly_link',true );
130
+ if ( $existingURL ) :
131
+
132
+ // Save the link in a constant for use in other parts of the loops
133
+ $_GLOBALS['sw']['links'][ $postID ] = $existingURL;
134
+
135
+ // Return the shortened URL
136
+ $array['url'] = $existingURL;
137
+ return $array;
138
+
139
+ // If we don't have a shortlink in the cache....
140
+ else :
141
+
142
+ // Return the normal URL
143
+ return $array;
144
+
145
+ endif;
146
+
147
+ // If the cache is expired and needs to be rebuilt....
148
+ else :
149
+
150
+ // If we've already generated this link....
151
+ if ( isset( $_GLOBALS['sw']['links'][ $postID ] ) ) :
152
+
153
+ $array['url'] = $_GLOBALS['sw']['links'][ $postID ];
154
+ return $array;
155
+
156
+ // If we've don't already have a generated link....
157
+ else :
158
+
159
+ // Use the bitly function to construct a shortened link
160
+ $shortURL = swp_make_bitly_url( urldecode( $url ) , $network , $access_token );
161
+
162
+ // If we got a shortened URL from their API....
163
+ if ( $shortURL ) :
164
+
165
+ // Save the link in a global so we can skip this part next time
166
+ $_GLOBALS['sw']['links'][ $postID ] = $shortURL;
167
+
168
+ // Delete the meta fields and then update to keep the database clean and up to date.
169
+ delete_post_meta( $postID,'bitly_link_' . $network );
170
+ delete_post_meta( $postID,'bitly_link' );
171
+ update_post_meta( $postID,'bitly_link',$shortURL );
172
+
173
+ // Return the short URL
174
+ $array['url'] = $shortURL;
175
+ return $array;
176
+
177
+ // If didn't get a shortened URL from their API....
178
+ else :
179
+
180
+ // Set a variable we'll check to avoid multiple calls to bitly upon the first failure
181
+ $_GLOBALS['sw']['bitly_status'] = 'failure';
182
+
183
+ // Return the normal URL
184
+ return $array;
185
+
186
+ // End check for shorte URL from the API
187
+ endif;
188
+
189
+ // End check for link in the Global Variable
190
+ endif;
191
+
192
+ // End check for the cache freshness
193
+ endif;
194
+
195
+ // End check for Analytics
196
+ endif;
197
+
198
+ // If Bitly is not activated or we don't have the credentials provided....
199
+ else :
200
+
201
+ // Return the normal URL
202
+ return $array;
203
+
204
+ // End the check for bitly activation and credentials
205
+ endif;
206
+
207
+ // If link shortening is not activated....
208
+ else :
209
+
210
+ // Return the normal URL
211
+ return $array;
212
+
213
+ // End the check for link shortening being activated
214
+ endif;
215
+ }
216
+
217
+ function swp_make_bitly_url( $url, $network, $access_token ) {
218
+ global $swp_user_options;
219
+
220
+ // Fetch the user's options
221
+ $options = $swp_user_options;
222
+
223
+ // Create a link to check if the permalink has already been shortened.
224
+ // $bitly_lookup_url = 'https://api-ssl.bitly.com/v3/user/link_lookup?url='.urlencode($url).'&access_token='.$access_token;
225
+ // Fetch a response from the Bitly Lookup API
226
+ // $bitly_lookup_response = swp_file_get_contents_curl( $bitly_lookup_url );
227
+ // Parse the JSON formatted response from the Bitly Lookup API
228
+ // $bitly_lookup_response = json_decode( $bitly_lookup_response , true );
229
+ // If the lookup returned a valid, previously generated short link....
230
+ if ( isset( $bitly_lookup_response['data']['link_lookup'][0]['link'] ) && true == false ) :
231
+
232
+ // Store the short url to return to the plugin
233
+ $short_url = $bitly_lookup_response['data']['link_lookup'][0]['link'];
234
+
235
+ // If the lookup did not return a valid short link....
236
+ else :
237
+
238
+ // Set the format to json
239
+ $format = 'json';
240
+
241
+ // Create a link to reach the Bitly API
242
+ $bitly_api = 'https://api-ssl.bitly.com/v3/shorten?access_token=' . $access_token . '&longUrl=' . urlencode( $url ) . '&format=' . $format;
243
+
244
+ // Fetch a response from the Bitly Shortening API
245
+ $data = swp_file_get_contents_curl( $bitly_api );
246
+
247
+ // Parse the JSON formated response into an array
248
+ $data = json_decode( $data , true );
249
+
250
+ // If the shortening succeeded....
251
+ if ( isset( $data['data']['url'] ) ) :
252
+
253
+ // Store the short URL to return to the plugin
254
+ $short_url = $data['data']['url'];
255
+
256
+ // If the shortening failed....
257
+ else :
258
+
259
+ // Return a status of false
260
+ $short_url = false;
261
+
262
+ endif;
263
+
264
+ endif;
265
+
266
+ return $short_url;
267
+
268
+ }
269
+
270
+ /**
271
+
272
+ * **************************************************************
273
+ * *
274
+ * Apply the Link Shortening and Analytics Filters to the URL *
275
+ * *
276
+ ******************************************************************/
277
+
278
+ function swp_process_url( $url, $network, $postID ) {
279
+
280
+ // $bitly_api = 'https://api-ssl.bitly.com/v3/link/lookup?url='.urlencode($url).'&login='.$login.'&apiKey='.$appkey;
281
+ // $data = swp_file_get_contents_curl($bitly_api);
282
+ // $data = json_decode($data);
283
+ // var_dump($data);
284
+ // Check to see if we've already shortened this link in another section of the loop.
285
+ // This will only be set if analytics are turned off and bitly is turned on.
286
+ // Since all links will be the same, this will be generated on the first request and
287
+ // then stored for immediate use on subsequent requests.
288
+ if ( isset( $_GLOBALS['sw']['links'][ $postID ] ) ) :
289
+ return $_GLOBALS['sw']['links'][ $postID ];
290
+ else :
291
+
292
+ // $options = swp_get_user_options();
293
+ $array['url'] = $url;
294
+ $array['network'] = $network;
295
+ $array['postID'] = $postID;
296
+ $array = apply_filters( 'swp_analytics' , $array );
297
+ $array = apply_filters( 'swp_link_shortening' , $array );
298
+ return $array['url'];
299
+
300
+ endif;
301
+
302
+ }
303
+
304
+ /**
305
+
306
+ ***************************************************************
307
+ * *
308
+ * BITLY OAUTH TRIGGER RESPONSE *
309
+ * *
310
+ */
311
+ add_action( 'wp_ajax_nopriv_swp_bitly_oauth', 'swp_bitly_oauth_callback' );
312
+ function swp_bitly_oauth_callback() {
313
+ $options = swp_get_user_options();
314
+
315
+ // Set the premium code to null
316
+ $options['bitly_access_token'] = $_GET['access_token'];
317
+
318
+ // Update the options array with the premium code nulled
319
+ swp_update_options( $options );
320
+
321
+ echo admin_url( 'admin.php?page=social-warfare' );
322
+ };
functions/utility.php ADDED
@@ -0,0 +1,351 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * General utility helper functions.
4
+ *
5
+ * @package SocialWarfare\Functions
6
+ * @copyright Copyright (c) 2016, Warfare Plugins, LLC
7
+ * @license GPL-3.0+
8
+ * @since 2.1.0
9
+ */
10
+
11
+
12
+ /**
13
+ * Round a number to the appropriate thousands.
14
+ *
15
+ * @since unknown
16
+ * @access public
17
+ * @param float $val The float to be rounded.
18
+ * @return float A rounded number.
19
+ */
20
+ function swp_kilomega( $val ) {
21
+ global $swp_user_options;
22
+
23
+ // Fetch the user assigned options
24
+ $options = $swp_user_options;
25
+
26
+ // Check if we even have a value to format
27
+ if ( $val ) :
28
+
29
+ // Check if the value is less than 1,000....
30
+ if ( $val < 1000 ) :
31
+
32
+ // If less than 1,000 just format and kick it back
33
+ return number_format( $val );
34
+
35
+ // Check if the value is greater than 1,000 and less than 1,000,000....
36
+ elseif ( $val < 1000000 ) :
37
+
38
+ // Start by deviding the value by 1,000
39
+ $val = intval( $val ) / 1000;
40
+
41
+ // If the decimal separator is a period
42
+ if ( $options['swp_decimal_separator'] == 'period' ) :
43
+
44
+ // Then format the number to the appropriate number of decimals
45
+ return number_format( $val,$options['swDecimals'],'.',',' ) . 'K';
46
+
47
+ // If the decimal separator is a comma
48
+ else :
49
+
50
+ // Then format the number to the appropriate number of decimals
51
+ return number_format( $val,$options['swDecimals'],',','.' ) . 'K';
52
+
53
+ endif;
54
+
55
+ // Check if the value is greater than 1,000,000....
56
+ else :
57
+
58
+ // Start by deviding the value by 1,000,000
59
+ $val = intval( $val ) / 1000000;
60
+
61
+ // If the decimal separator is a period
62
+ if ( $options['swp_decimal_separator'] == 'period' ) :
63
+
64
+ // Then format the number to the appropriate number of decimals
65
+ return number_format( $val,$options['swDecimals'],'.',',' ) . 'M';
66
+
67
+ // If the decimal separator is a comma
68
+ else :
69
+
70
+ // Then format the number to the appropriate number of decimals
71
+ return number_format( $val,$options['swDecimals'],',','.' ) . 'M';
72
+
73
+ endif;
74
+
75
+ endif;
76
+
77
+ endif;
78
+
79
+ return 0;
80
+ }
81
+
82
+ /**
83
+ * Process the excerpts for descriptions
84
+ *
85
+ * @since unknown
86
+ * @access public
87
+ * @param int $post_id The post ID to use when getting an exceprt.
88
+ * @return string The excerpt.
89
+ */
90
+ function swp_get_excerpt_by_id( $post_id ) {
91
+
92
+ // Check if the post has an excerpt
93
+ if ( has_excerpt() ) :
94
+ $the_post = get_post( $post_id ); // Gets post ID
95
+ $the_excerpt = $the_post->post_excerpt;
96
+
97
+ // If not, let's create an excerpt
98
+ else :
99
+ $the_post = get_post( $post_id ); // Gets post ID
100
+ $the_excerpt = $the_post->post_content; // Gets post_content to be used as a basis for the excerpt
101
+ endif;
102
+
103
+ $excerpt_length = 100; // Sets excerpt length by word count
104
+ $the_excerpt = strip_tags( strip_shortcodes( $the_excerpt ) ); // Strips tags and images
105
+
106
+ $the_excerpt = str_replace( ']]>', ']]&gt;', $the_excerpt );
107
+ $the_excerpt = strip_tags( $the_excerpt );
108
+ $excerpt_length = apply_filters( 'excerpt_length', 100 );
109
+ $excerpt_more = apply_filters( 'excerpt_more', ' ' . '[...]' );
110
+ $words = preg_split( "/[\n\r\t ]+/", $the_excerpt, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY );
111
+
112
+ if ( count( $words ) > $excerpt_length ) :
113
+ array_pop( $words );
114
+ // array_push($words, '…');
115
+ $the_excerpt = implode( ' ', $words );
116
+ endif;
117
+
118
+ $the_excerpt = preg_replace( "/\r|\n/", '', $the_excerpt );
119
+
120
+ return $the_excerpt;
121
+ }
122
+
123
+ if ( ! function_exists( 'swp_mobile_detection' ) ) {
124
+ /**
125
+ * Check to see if the user is using a mobile device.
126
+ *
127
+ * @since unknown
128
+ * @access public
129
+ * @todo Replace this with a more reliable method, probably client-side.
130
+ * @return bool true if a mobile user agent.
131
+ */
132
+ function swp_mobile_detection() {
133
+ 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'] );
134
+ }
135
+ }
136
+
137
+ /**
138
+ * Check to see if debugging has been enabled.
139
+ *
140
+ * @since 2.1.0
141
+ * @access private
142
+ * @param string $type The type of debugging to check for.
143
+ * @return bool true if debugging is enabled.
144
+ */
145
+ function _swp_is_debug( $type = 'all' ) {
146
+ $debug = false;
147
+
148
+ if ( ! empty( $_GET['swp_debug'] ) ) {
149
+ $debug = sanitize_key( $_GET['swp_debug'] );
150
+ }
151
+
152
+ if ( ( $debug && 'all' === $type ) || $debug === $type ) {
153
+ $debug = true;
154
+ } else {
155
+ $debug = false;
156
+ }
157
+
158
+ return (bool) apply_filters( 'swp_is_debug', $debug );
159
+ }
160
+
161
+ /**
162
+ * A function to clean up the available buttons Array
163
+ *
164
+ * @since 2.1.4
165
+ * @param Array $options The options Array
166
+ * @return Array $options The modified options array
167
+ */
168
+ function swp_buttons_cleanup( $options ) {
169
+ if(isset($options['content']['active'])) {
170
+ unset($options['content']['active']);
171
+ }
172
+ return $options;
173
+ }
174
+ add_filter( 'swp_button_options', 'swp_buttons_cleanup', 999 );
175
+
176
+ /**
177
+ * A function to recursively search arrays
178
+ *
179
+ * @since 1.0.0
180
+ * @access public
181
+ * @param string $needle The needle
182
+ * @param string $haystack The haystack
183
+ * @return string/bool Return the key if found or false if nothing is found
184
+ */
185
+ function swp_recursive_array_search( $needle, $haystack ) {
186
+ foreach ( $haystack as $key => $value ) {
187
+ $current_key = $key;
188
+ if ( $needle === $value or (is_array( $value ) && swp_recursive_array_search( $needle,$value ) !== false) ) {
189
+ return $current_key;
190
+ }
191
+ }
192
+ return false;
193
+ }
194
+
195
+ /**
196
+ * A function to gethe current URL of a page
197
+ *
198
+ * @since 1.0.0
199
+ * @return string The URL of the current page
200
+ */
201
+ function swp_get_current_url() {
202
+ $page_url = 'http';
203
+ if ( $_SERVER['HTTPS'] == 'on' ) {$page_url .= 's';}
204
+ $page_url .= '://';
205
+ $page_url .= $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
206
+ $page_url = strtok( $page_url, '?' );
207
+
208
+ return $page_url;
209
+ }
210
+ /**
211
+ * A function to disable the buttons on subtitles
212
+ *
213
+ * @return bool false
214
+ */
215
+ function swp_disable_subs() {
216
+ return false;
217
+ }
218
+
219
+ /**
220
+ * Convert curly quotes to straight quotes
221
+ *
222
+ * @since 1.4.0
223
+ * @param string $content A string of text to be filtered
224
+ * @return string $content The modified string of text
225
+ */
226
+ function convert_smart_quotes( $content ) {
227
+ $content = str_replace( '"', '\'', $content );
228
+ $content = str_replace( '&#8220;', '\'', $content );
229
+ $content = str_replace( '&#8221;', '\'', $content );
230
+ $content = str_replace( '&#8216;', '\'', $content );
231
+ $content = str_replace( '&#8217;', '\'', $content );
232
+ return $content;
233
+ }
234
+
235
+ /**
236
+ * A function to make removing hooks easier
237
+ *
238
+ * @since 1.4.0
239
+ * @access public
240
+ * @param string $hook_name The name of the hook
241
+ * @param string $method_name The name of the method
242
+ * @param integer $priority The hook priority
243
+ * @return boolean false
244
+ */
245
+ function swp_remove_filter( $hook_name = '', $method_name = '', $priority = 0 ) {
246
+ global $wp_filter;
247
+
248
+ // Take only filters on right hook name and priority
249
+ if ( ! isset( $wp_filter[ $hook_name ][ $priority ] ) || ! is_array( $wp_filter[ $hook_name ][ $priority ] ) ) {
250
+ return false;
251
+ }
252
+
253
+ // Loop on filters registered
254
+ foreach ( (array) $wp_filter[ $hook_name ][ $priority ] as $unique_id => $filter_array ) {
255
+ // Test if filter is an array ! (always for class/method)
256
+ if ( isset( $filter_array['function'] ) && is_array( $filter_array['function'] ) ) {
257
+ // Test if object is a class and method is equal to param !
258
+ if ( is_object( $filter_array['function'][0] ) && get_class( $filter_array['function'][0] ) && $filter_array['function'][1] == $method_name ) {
259
+ unset( $wp_filter[ $hook_name ][ $priority ][ $unique_id ] );
260
+ }
261
+ }
262
+ }
263
+
264
+ return false;
265
+ }
266
+
267
+ /**
268
+ * Get the SWP supported post types.
269
+ *
270
+ * @return array $types A list of post type names.
271
+ */
272
+ function swp_get_post_types() {
273
+ $types = get_post_types(
274
+ array(
275
+ 'public' => true,
276
+ '_builtin' => false,
277
+ ),
278
+ 'names'
279
+ );
280
+
281
+ $types[] = 'page';
282
+ $types[] = 'post';
283
+
284
+ return (array) apply_filters( 'swp_post_types', $types );
285
+ }
286
+
287
+ /**
288
+ * A function to add options to the admin options page
289
+ *
290
+ * @since 2.1.4
291
+ * @access public
292
+ * @param array $sw_options The array of current options
293
+ * @param string $tabName The name of the tab being modified
294
+ * @param string $optionName The name of the option that the new option will be inserted next to.
295
+ * @param array $option The array of information about the new option being added
296
+ * @param string $position Add the new option 'before' or 'after' the needle. Default => 'after'
297
+ * @return array $sw_options The modified array of options
298
+ */
299
+ function swp_insert_option( $sw_options , $tabName , $optionName , $newOptionArray , $position = 'after' ) {
300
+
301
+ // Locate the index of the option you want to insert next to
302
+ $keyIndex = array_search( $optionName, array_keys( $sw_options['options'][$tabName] ) );
303
+
304
+ if('after' === $position) {
305
+ ++$keyIndex;
306
+ }
307
+
308
+ // Split the array at the location of the option above
309
+ $first_array = array_splice ( $sw_options['options'][$tabName] , 0 , $keyIndex );
310
+
311
+ // Merge the two parts of the split array with your option added in the middle
312
+ $sw_options['options'][$tabName] = array_merge (
313
+ $first_array,
314
+ $newOptionArray,
315
+ $sw_options['options'][$tabName]
316
+ );
317
+
318
+ // Return the option array or the world will explode
319
+ return $sw_options;
320
+
321
+ }
322
+
323
+ /**
324
+ * A function to notify premium users about installing the pro addon
325
+ *
326
+ * @since 2.2.0
327
+ * @return void
328
+ */
329
+ function swp_premium_update_notification() {
330
+ global $swp_user_options;
331
+
332
+ if(!empty($swp_user_options['premiumCode']) && !defined('SWPP_PLUGIN_DIR')):
333
+ echo '<div class="update-nag notice is-dismissable"><p>' . __( '<b>Important:</b> We’ve made <a href="https://warfareplugins.com/social-warfare-2-2/" target="_blank">some changes</a> to how your Social Warfare premium license is applied. In order to continue getting all the Pro features you love, please <a href="https://warfareplugins.com/updates/social-warfare-pro/social-warfare-pro.zip">download the Social Warfare - Pro</a> plugin. Once installed, all of your premium features will be immediately restored.', 'social-warfare' ) . '</p></div>';
334
+ endif;
335
+ }
336
+ add_action( 'admin_notices', 'swp_premium_update_notification' );
337
+
338
+ /**
339
+ * A function to remove the screen options tab from our admin page
340
+ * @since 2.2.1
341
+ */
342
+ function swp_remove_screen_options( $display_boolean, $wp_screen_object ){
343
+ $blacklist = array('admin.php?page=social-warfare');
344
+ if ( in_array( $GLOBALS['pagenow'], $blacklist ) ) {
345
+ $wp_screen_object->render_screen_layout();
346
+ $wp_screen_object->render_per_page_options();
347
+ return false;
348
+ }
349
+ return true;
350
+ }
351
+ add_filter( 'screen_options_show_screen', 'swp_remove_screen_options', 10, 2 );
functions/widgets.php CHANGED
@@ -1,408 +1,395 @@
1
- <?php
2
 
3
- /*************************************************************
4
-
5
- POPULAR POSTS WIDGET CLASS
6
-
7
- **************************************************************/
8
  class swp_popular_posts_widget extends WP_Widget {
9
 
10
  // Class Constructor
11
  function __construct() {
12
- parent::__construct(false, $name = 'Social Warfare: Popular Posts' );
13
  }
14
-
15
- /*************************************************************
16
-
17
- FUNCTION - CREATE THE WIDGET FORM
18
-
19
- **************************************************************/
20
-
21
- function form($instance) {
22
-
23
- // Default Title
24
- if( isset($instance['title'] )) { $title = esc_attr($instance['title']);
25
- } else { $title = 'Popular Posts'; }
26
-
27
- // Default Count
28
- if( isset($instance['count'] )) { $count = esc_attr($instance['count']);
29
- } else { $count = '10'; }
30
-
31
- // Default Timeframe
32
- if( isset($instance['timeframe'] )) { $timeframe = esc_attr($instance['timeframe']);
33
- } else { $timeframe = '0'; }
34
-
35
- // Default Title
36
- if( isset($instance['network'] )) { $network = esc_attr($instance['network']);
37
- } else { $network = 'totes'; }
38
-
39
- // Default showCount
40
- if( isset($instance['showCount'] )) { $showCount = esc_attr($instance['showCount']);
41
- } else { $showCount = 'true'; }
42
-
43
-
44
- // Default countLabel
45
- if( isset($instance['countLabel'] )) { $countLabel = esc_attr($instance['countLabel']);
46
- } else { $countLabel = 'Total Shares'; }
47
-
48
-
49
- // Default Style
50
- if( isset($instance['style'] )) { $style = esc_attr($instance['style']);
51
- } else { $style = 'style_01'; }
52
-
53
-
54
- // Default Thumbnails toggle
55
- if( isset($instance['thumbnails'] )) { $thumbnails = esc_attr($instance['thumbnails']);
56
- } else { $thumbnails = 'true'; }
57
-
58
- // Default Thumbnail size
59
- if( isset($instance['thumb_size'] )) { $thumb_size = esc_attr($instance['thumb_size']);
60
- } else { $thumb_size = '100'; }
61
-
62
- // Default Font Size
63
- if( isset($instance['font_size'] )) { $font_size = esc_attr($instance['font_size']);
64
- } else { $font_size = '100'; }
65
-
66
- // Default Custom Background
67
- if( isset($instance['custom_bg'] )) { $custom_bg = esc_attr($instance['custom_bg']);
68
- } else { $custom_bg = '#ffffff'; }
69
-
70
- // Default Custom Link
71
- if( isset($instance['custom_link'] )) { $custom_link = esc_attr($instance['custom_link']);
72
- } else { $custom_link = '#000000'; }
73
-
74
- // Fetch the Social Warfare Options
75
- $options = swp_get_user_options();
76
-
77
- // Fetch the networks that are active on this blog
78
- $availableNetworks = $options['newOrderOfIcons'];
79
-
80
- // Build the Widget Form
81
- $form = '<div class="swp_popular_post_options">';
82
-
83
- // The Widget Title Field
84
- $form .= '<p class="title">';
85
- $form .= '<label for="'.$this->get_field_id('title').'">Widget Title</label>';
86
- $form .= '<input class="widefat" id="'.$this->get_field_id('title').'" name="'.$this->get_field_name('title').'" type="text" value="'.$title.'" />';
87
- $form .= '</p>';
88
-
89
- // Number of Posts to Display Field
90
- $form .= '<p class="count">';
91
- $form .= '<label for="'.$this->get_field_id('count').'">How many posts would you like to display?</label>';
92
- $form .= '<input class="widefat" id="'.$this->get_field_id('count').'" name="'.$this->get_field_name('count').'" type="number" value="'.$count.'" min="0" />';
93
- $form .= '</p>';
94
-
95
- // Age of the pots to display field
96
- $form .= '<p class="timeframe">';
97
- $form .= '<label for="'.$this->get_field_id('timeframe').'">What is maximum age of a post (in days) that you would like to include (0 = Unlimited)?</label>';
98
- $form .= '<input class="widefat" id="'.$this->get_field_id('timeframe').'" name="'.$this->get_field_name('timeframe').'" value="'.$timeframe.'" type="number" min="0">';
99
- $form .= '</p>';
100
-
101
- // Which networks to use as the basis field
102
- $form .= '<p class="network">';
103
- $form .= '<label for="'.$this->get_field_id('network').'">Which network would you like to base your posts popularity on?</label>';
104
- $form .= '<select class="widefat" id="'.$this->get_field_id('network').'" name="'.$this->get_field_name('network').'">';
105
- $form .= '<option value="totes"'. ( $network == 'totes' ? 'selected' : '' ).'>All Networks</option>';
106
- foreach($availableNetworks as $key => $value):
107
- if($options[$key]) {
108
- if($network == $key.'_shares'):
109
- $form .= '<option value="'.$key.'_shares" selected>'.$value.'</option>';
110
- else:
111
- $form .= '<option value="'.$key.'_shares">'.$value.'</option>';
112
  endif;
113
  };
114
  endforeach;
115
- $form .= '</select>';
116
- $form .= '</p>';
117
-
118
- // Display the share count toggle field
119
- $form .= '<p class="showCount">';
120
- $form .= '<label for="'.$this->get_field_id('showCount').'">Would you like to show the count?</label>';
121
- $form .= '<select class="widefat" id="'.$this->get_field_id('showCount').'" name="'.$this->get_field_name('showCount').'">';
122
- $form .= '<option value="true" '.( $showCount == 'true' ? 'selected' : '').'>Yes</option>';
123
- $form .= '<option value="false" '.( $showCount == 'false' ? 'selected' : '').'>No</option>';
124
- $form .= '</select>';
125
- $form .= '</p>';
126
-
127
- // Count Label Field
128
- $form .= '<p '.( $showCount == 'false' ? 'style="display:none;"' : '' ).' class="countLabel">';
129
- $form .= '<label for="'.$this->get_field_id('countLabel').'">Count Number Label</label>';
130
- $form .= '<input class="widefat" id="'.$this->get_field_id('countLabel').'" name="'.$this->get_field_name('countLabel').'" type="text" value="'.$countLabel.'" />';
131
- $form .= '</p>';
132
-
133
- // Post thumbnails toggle field
134
- $form .= '<p class="thumbnails">';
135
- $form .= '<label for="'.$this->get_field_id('thumbnails').'">Would you like to display thumbnails?</label>';
136
- $form .= '<select class="widefat" id="'.$this->get_field_id('thumbnails').'" name="'.$this->get_field_name('thumbnails').'">';
137
- $form .= '<option value="true" '.( $thumbnails == 'true' ? 'selected' : '').'>Yes</option>';
138
- $form .= '<option value="false" '.( $thumbnails == 'false' ? 'selected' : '').'>No</option>';
139
- $form .= '</select>';
140
- $form .= '</p>';
141
-
142
- // Thumbnails size field
143
- $form .= '<p '.( $thumbnails == 'false' ? 'style="display:none;"' : '' ).' class="thumb_size">';
144
- $form .= '<label for="'.$this->get_field_id('thumb_size').'">What size would you like your thumbnails?</label>';
145
- $form .= '<select class="widefat" id="'.$this->get_field_id('thumb_size').'" name="'.$this->get_field_name('thumb_size').'">';
146
- $form .= '<option value="50" '.( $thumb_size == '50' ? 'selected' : '').'>50px</option>';
147
- $form .= '<option value="60" '.( $thumb_size == '60' ? 'selected' : '').'>60px</option>';
148
- $form .= '<option value="70" '.( $thumb_size == '70' ? 'selected' : '').'>70px</option>';
149
- $form .= '<option value="80" '.( $thumb_size == '80' ? 'selected' : '').'>80px</option>';
150
- $form .= '<option value="90" '.( $thumb_size == '90' ? 'selected' : '').'>90px</option>';
151
- $form .= '<option value="100" '.( $thumb_size == '100' ? 'selected' : '').'>100px</option>';
152
- $form .= '<option value="110" '.( $thumb_size == '110' ? 'selected' : '').'>110px</option>';
153
- $form .= '<option value="120" '.( $thumb_size == '120' ? 'selected' : '').'>120px</option>';
154
- $form .= '<option value="130" '.( $thumb_size == '130' ? 'selected' : '').'>130px</option>';
155
- $form .= '<option value="140" '.( $thumb_size == '140' ? 'selected' : '').'>140px</option>';
156
- $form .= '<option value="150" '.( $thumb_size == '150' ? 'selected' : '').'>150px</option>';
157
- $form .= '</select>';
158
- $form .= '</p>';
159
-
160
- // Font size field
161
- $form .= '<p class="font_size">';
162
- $form .= '<label for="'.$this->get_field_id('font_size').'">What size would you like the font?</label>';
163
- $form .= '<select class="widefat" id="'.$this->get_field_id('font_size').'" name="'.$this->get_field_name('font_size').'">';
164
- $form .= '<option value="50" '.( $font_size == '50' ? 'selected' : '').'>50%</option>';
165
- $form .= '<option value="60" '.( $font_size == '60' ? 'selected' : '').'>60%</option>';
166
- $form .= '<option value="70" '.( $font_size == '70' ? 'selected' : '').'>70%</option>';
167
- $form .= '<option value="80" '.( $font_size == '80' ? 'selected' : '').'>80%</option>';
168
- $form .= '<option value="90" '.( $font_size == '90' ? 'selected' : '').'>90%</option>';
169
- $form .= '<option value="100" '.( $font_size == '100' ? 'selected' : '').'>100%</option>';
170
- $form .= '<option value="110" '.( $font_size == '110' ? 'selected' : '').'>110%</option>';
171
- $form .= '<option value="120" '.( $font_size == '120' ? 'selected' : '').'>120%</option>';
172
- $form .= '<option value="130" '.( $font_size == '130' ? 'selected' : '').'>130%</option>';
173
- $form .= '<option value="140" '.( $font_size == '140' ? 'selected' : '').'>140%</option>';
174
- $form .= '<option value="150" '.( $font_size == '150' ? 'selected' : '').'>150%</option>';
175
- $form .= '</select>';
176
- $form .= '</p>';
177
-
178
- // Color Scheme Field
179
- $form .= '<p class="style">';
180
- $form .= '<label for="'.$this->get_field_id('style').'">Which color scheme would you like to use?</label>';
181
- $form .= '<select class="widefat" id="'.$this->get_field_id('style').'" name="'.$this->get_field_name('style').'">';
182
- $form .= '<option value="style_01" '.( $style == 'style_01' ? 'selected' : '' ) .'>Vanilla (No Styling)</option>';
183
- $form .= '<option value="style_02" '.( $style == 'style_02' ? 'selected' : '' ) .'>Inspired by Twitter</option>';
184
- $form .= '<option value="style_03" '.( $style == 'style_03' ? 'selected' : '' ) .'>Inspired by Facebook</option>';
185
- $form .= '<option value="style_04" '.( $style == 'style_04' ? 'selected' : '' ) .'>Inspired by Google Plus</option>';
186
- $form .= '<option value="style_05" '.( $style == 'style_05' ? 'selected' : '' ) .'>Inspired by LinkedIn</option>';
187
- $form .= '<option value="style_06" '.( $style == 'style_06' ? 'selected' : '' ) .'>Inspired by Pinterest</option>';
188
- $form .= '<option value="style_07" '.( $style == 'style_07' ? 'selected' : '' ) .'>Don\'t Stop Believin\'</option>';
189
- $form .= '<option value="style_08" '.( $style == 'style_08' ? 'selected' : '' ) .'>Thunderstruck</option>';
190
- $form .= '<option value="style_09" '.( $style == 'style_09' ? 'selected' : '' ) .'>Livin\' On A Prayer</option>';
191
- $form .= '<option value="custom" '.( $style == 'custom' ? 'selected' : '' ) .'>Custom</option>';
192
- $form .= '</select>';
193
- $form .= '</p>';
194
-
195
- // Custom Background Color Field
196
- $form .= '<p '.( $style != 'custom' ? 'style="display:none;"' : '' ).' class="custom_bg">';
197
- $form .= '<label for="'.$this->get_field_id('custom_bg').'">Custom Background Color</label>';
198
- $form .= '<input class="widefat" id="'.$this->get_field_id('custom_bg').'" name="'.$this->get_field_name('custom_bg').'" type="text" value="'.$custom_bg.'" />';
199
- $form .= '</p>';
200
-
201
- // Custom Link Color Field
202
- $form .= '<p '.( $style != 'custom' ? 'style="display:none;"' : '' ).' class="custom_link">';
203
- $form .= '<label for="'.$this->get_field_id('custom_link').'">Custom Link Color</label>';
204
- $form .= '<input class="widefat" id="'.$this->get_field_id('custom_link').'" name="'.$this->get_field_name('custom_link').'" type="text" value="'.$custom_link.'" />';
205
- $form .= '</p>';
206
-
207
- // Close the Div
208
- $form .= '</div>';
209
-
210
- // Output the form fields
211
- echo $form;
212
-
213
- }
214
 
215
- /*************************************************************
216
-
217
- FUNCTION - UPDATE VALUES FROM THE FORM
218
 
219
- **************************************************************/
220
-
221
- function update($new_instance, $old_instance) {
 
222
  $instance = $old_instance;
223
-
224
  // Fetch the values from the form
225
- $instance['title'] = strip_tags($new_instance['title']);
226
- $instance['count'] = strip_tags($new_instance['count']);
227
- $instance['timeframe'] = strip_tags($new_instance['timeframe']);
228
- $instance['network'] = strip_tags($new_instance['network']);
229
- $instance['showCount'] = strip_tags($new_instance['showCount']);
230
- $instance['countLabel'] = strip_tags($new_instance['countLabel']);
231
- $instance['style'] = strip_tags($new_instance['style']);
232
- $instance['thumbnails'] = strip_tags($new_instance['thumbnails']);
233
- $instance['thumb_size'] = strip_tags($new_instance['thumb_size']);
234
- $instance['font_size'] = strip_tags($new_instance['font_size']);
235
- $instance['custom_bg'] = strip_tags($new_instance['custom_bg']);
236
- $instance['custom_link'] = strip_tags($new_instance['custom_link']);
237
 
238
  return $instance;
239
  }
240
- /*************************************************************
241
-
242
- FUNCTION - OUTPUT THE WIDGET TO THE SITE
243
 
244
- **************************************************************/
245
-
246
- function widget($args, $instance) {
 
247
  extract( $args );
248
-
249
  // Fetch the field values from the form
250
- (isset($instance['title'] ) ? $title = $instance['title'] : $title = 'Popular Posts');
251
- (isset($instance['count'] ) ? $count = $instance['count'] : $count = '10');
252
- (isset($instance['timeframe'] ) ? $timeframe = $instance['timeframe'] : $timeframe = '0');
253
- (isset($instance['network'] ) ? $network = $instance['network'] : $network = 'totes');
254
- (isset($instance['showCount'] ) ? $showCount = $instance['showCount'] : $showCount = 'true');
255
- (isset($instance['countLabel'] ) ? $countLabel = $instance['countLabel'] : $countLabel = 'Total Shares');
256
- (isset($instance['style'] ) ? $style = $instance['style'] : $style = 'style_01');
257
- (isset($instance['thumbnails'] ) ? $thumbnails = $instance['thumbnails'] : $thumbnails = 'true');
258
- (isset($instance['thumb_size'] ) ? $thumb_size = $instance['thumb_size'] : $thumb_size = '100');
259
- (isset($instance['font_size'] ) ? $font_size = $instance['font_size'] : $font_size = '100');
260
- (isset($instance['custom_bg'] ) ? $custom_bg = $instance['custom_bg'] : $custom_bg = '#ffffff');
261
- (isset($instance['custom_link'] ) ? $custom_link = $instance['custom_link'] : $custom_link = '#000000');
262
-
263
  // Correct the previous style with the new version if it is present on the site
264
- if( $style == 'first_style' || $style == 'second_style' ):
265
  $style = 'style_01';
266
  endif;
267
-
268
- /*************************************************************
269
 
270
- STYLES - CREATE AN ARRAY OF BACKGROUNDS AND LINK COLORS
 
 
271
 
272
- **************************************************************/
273
-
274
  // Vanilla (No Styling)
275
  $styles['style_01']['wrapper'] = 'background:transparent;';
276
  $styles['style_01']['links'] = '';
277
-
278
  // Inspired by Twitter
279
  $styles['style_02']['wrapper'] = 'padding:15px;background:#429cd6;';
280
  $styles['style_02']['links'] = 'color:#ffffff;';
281
-
282
  // Inspired by Facebook
283
  $styles['style_03']['wrapper'] = 'padding:15px;background:#3a589e;';
284
  $styles['style_03']['links'] = 'color:#ffffff;';
285
-
286
  // Inspired by Google Plus
287
  $styles['style_04']['wrapper'] = 'padding:15px;background:#df4b37;';
288
  $styles['style_04']['links'] = 'color:#ffffff;';
289
-
290
  // Inspired by LinkedIn
291
  $styles['style_05']['wrapper'] = 'padding:15px;background:#0d77b7;';
292
  $styles['style_05']['links'] = 'color:#ffffff;';
293
-
294
  // Inspired by Pinterest
295
  $styles['style_06']['wrapper'] = 'padding:15px;background:#cd2029;';
296
  $styles['style_06']['links'] = 'color:#ffffff;';
297
-
298
  // Don't Stop Believin'
299
  $styles['style_07']['wrapper'] = 'padding:15px;background:#333333;';
300
  $styles['style_07']['links'] = 'color:#ffffff;';
301
-
302
  // Thunderstruck
303
  $styles['style_08']['wrapper'] = 'padding:15px;background:#30394F;';
304
  $styles['style_08']['links'] = 'color:#ffffff;';
305
-
306
  // Livin' On A Prayer
307
  $styles['style_09']['wrapper'] = 'padding:15px;background:#EEEEEE;';
308
  $styles['style_09']['links'] = 'color:#30394F;';
309
-
310
  // Custom
311
- $styles['custom']['wrapper'] = 'padding:15px;background:'.$custom_bg.';';
312
- $styles['custom']['links'] = 'color:'.$custom_link.';';
313
-
314
- /*************************************************************
315
 
316
- BUILD OUT THE WIDGET
 
 
317
 
318
- **************************************************************/
319
-
320
  // Begin output of the widget html
321
  echo $before_widget;
322
- echo '<div class="widget-text swp_widget_box" style="'.$styles[$style]['wrapper'].'">';
323
-
324
  // Check if title is set
325
  if ( $title ) {
326
- echo '<h3 class="widgettitle widget-title" style="'.$styles[$style]['links'].'">'.$title.'</h3>';
327
  }
328
-
329
  // If a custom timeframe is not being used....
330
- if( $timeframe == 0 ):
331
-
332
  // Create the arguments for a query without a timeframe
333
  $swp_args = array(
334
  'posts_per_page' => $count,
335
  'post_type' => 'post',
336
- 'meta_key' => '_'.$network,
337
  'orderby' => 'meta_value_num',
338
  'order' => 'DESC',
339
  );
340
-
341
- // If a custom timeframe is being used....
342
- else:
343
-
344
  // Create the arguments for a query with a timeframe
345
  $swp_args = array(
346
  'posts_per_page' => $count,
347
  'post_type' => 'post',
348
- 'meta_key' => '_'.$network,
349
  'orderby' => 'meta_value_num',
350
  'order' => 'DESC',
351
  'date_query' => array(
352
  'column' => 'post_date',
353
- 'after' => '- '.$timeframe.' days'
354
- )
355
  );
356
  endif;
357
-
358
  // Reset the main query
359
  wp_reset_postdata();
360
-
361
  // Query and fetch the posts
362
  $swq = new WP_Query( $swp_args );
363
-
364
  // Begin the loop
365
- if( $swq->have_posts() ) :
366
  $i = 1;
367
- while( $swq->have_posts() ):
368
-
369
- $swq->the_post();
370
-
371
- // If we are supposed to show count numbers....
372
- if($showCount == 'true'):
373
- $postID = get_the_ID();
374
- $shares = get_post_meta($postID,'_'.$network,true);
375
- $share_html = '<span class="swp_pop_count">'.swp_kilomega($shares).' '.$countLabel.'</span>';
376
-
377
- // If we are not supposed to show count numbers
378
- else:
379
- $share_html = '';
380
- endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
381
 
382
- // If we are supposed to show thumbnails
383
- if($thumbnails == 'true' && has_post_thumbnail()):
384
- $thumbnail_url = wp_get_attachment_image_src( get_post_thumbnail_id() , 'thumbnail' );
385
- $thumbnail_html = '';
386
- $thumbnail_html .= '<a href="'.get_the_permalink().'">';
387
- $thumbnail_html .= '<img style="width:'.$thumb_size.'px;height:'.$thumb_size.'px;" class="swp_pop_thumb" src="'.$thumbnail_url[0].'">';
388
- $thumbnail_html .= '</a>';
389
-
390
- // If we are not supposed to show thumbnails
391
- else:
392
- $thumbnail_html = '';
393
  endif;
394
 
395
- // Generate the HTML for a link
396
- $link_html = '<a style="font-size:'.$font_size.'%;'.$styles[$style]['links'].'" class="swp_popularity" href="'.get_the_permalink().'"><b>'.get_the_title().'</b>'.$share_html.'</a>';
397
-
398
- // Output the post to the site
399
- echo '<div class="swp_popular_post">'.$thumbnail_html.''.$link_html.'</div>';
400
- echo '<div class="swp_clearfix"></div>';
401
-
402
- // End the loop
403
  endwhile;
404
  endif;
405
-
406
  // Reset the main query
407
  wp_reset_postdata();
408
  echo '</div>';
@@ -410,6 +397,13 @@ class swp_popular_posts_widget extends WP_Widget {
410
  }
411
  }
412
 
413
- // Register the Widget
414
- add_action('widgets_init', create_function('', 'return register_widget("swp_popular_posts_widget");'));
415
-
 
 
 
 
 
 
 
1
+ <?php
2
 
3
+ /**
4
+ * POPULAR POSTS WIDGET CLASS
5
+ */
 
 
6
  class swp_popular_posts_widget extends WP_Widget {
7
 
8
  // Class Constructor
9
  function __construct() {
10
+ parent::__construct( false, $name = 'Social Warfare: Popular Posts' );
11
  }
12
+
13
+ /**
14
+ * FUNCTION - CREATE THE WIDGET FORM
15
+ */
16
+ function form( $instance ) {
17
+ global $swp_user_options;
18
+
19
+ // Default Title
20
+ if ( isset( $instance['title'] ) ) { $title = esc_attr( $instance['title'] );
21
+ } else { $title = 'Popular Posts'; }
22
+
23
+ // Default Count
24
+ if ( isset( $instance['count'] ) ) { $count = esc_attr( $instance['count'] );
25
+ } else { $count = '10'; }
26
+
27
+ // Default Timeframe
28
+ if ( isset( $instance['timeframe'] ) ) { $timeframe = esc_attr( $instance['timeframe'] );
29
+ } else { $timeframe = '0'; }
30
+
31
+ // Default Title
32
+ if ( isset( $instance['network'] ) ) { $network = esc_attr( $instance['network'] );
33
+ } else { $network = 'totes'; }
34
+
35
+ // Default showCount
36
+ if ( isset( $instance['showCount'] ) ) { $showCount = esc_attr( $instance['showCount'] );
37
+ } else { $showCount = 'true'; }
38
+
39
+ // Default countLabel
40
+ if ( isset( $instance['countLabel'] ) ) { $countLabel = esc_attr( $instance['countLabel'] );
41
+ } else { $countLabel = 'Total Shares'; }
42
+
43
+ // Default Style
44
+ if ( isset( $instance['style'] ) ) { $style = esc_attr( $instance['style'] );
45
+ } else { $style = 'style_01'; }
46
+
47
+ // Default Thumbnails toggle
48
+ if ( isset( $instance['thumbnails'] ) ) { $thumbnails = esc_attr( $instance['thumbnails'] );
49
+ } else { $thumbnails = 'true'; }
50
+
51
+ // Default Thumbnail size
52
+ if ( isset( $instance['thumb_size'] ) ) { $thumb_size = esc_attr( $instance['thumb_size'] );
53
+ } else { $thumb_size = '100'; }
54
+
55
+ // Default Font Size
56
+ if ( isset( $instance['font_size'] ) ) { $font_size = esc_attr( $instance['font_size'] );
57
+ } else { $font_size = '100'; }
58
+
59
+ // Default Custom Background
60
+ if ( isset( $instance['custom_bg'] ) ) { $custom_bg = esc_attr( $instance['custom_bg'] );
61
+ } else { $custom_bg = '#ffffff'; }
62
+
63
+ // Default Custom Link
64
+ if ( isset( $instance['custom_link'] ) ) { $custom_link = esc_attr( $instance['custom_link'] );
65
+ } else { $custom_link = '#000000'; }
66
+
67
+ // Fetch the Social Warfare Options
68
+ $options = $swp_user_options;
69
+
70
+ // Fetch the networks that are active on this blog
71
+ $availableNetworks = $options['newOrderOfIcons'];
72
+
73
+ // Build the Widget Form
74
+ $form = '<div class="swp_popular_post_options">';
75
+
76
+ // The Widget Title Field
77
+ $form .= '<p class="title">';
78
+ $form .= '<label for="' . $this->get_field_id( 'title' ) . '">Widget Title</label>';
79
+ $form .= '<input class="widefat" id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" type="text" value="' . $title . '" />';
80
+ $form .= '</p>';
81
+
82
+ // Number of Posts to Display Field
83
+ $form .= '<p class="count">';
84
+ $form .= '<label for="' . $this->get_field_id( 'count' ) . '">How many posts would you like to display?</label>';
85
+ $form .= '<input class="widefat" id="' . $this->get_field_id( 'count' ) . '" name="' . $this->get_field_name( 'count' ) . '" type="number" value="' . $count . '" min="0" />';
86
+ $form .= '</p>';
87
+
88
+ // Age of the pots to display field
89
+ $form .= '<p class="timeframe">';
90
+ $form .= '<label for="' . $this->get_field_id( 'timeframe' ) . '">What is maximum age of a post (in days) that you would like to include (0 = Unlimited)?</label>';
91
+ $form .= '<input class="widefat" id="' . $this->get_field_id( 'timeframe' ) . '" name="' . $this->get_field_name( 'timeframe' ) . '" value="' . $timeframe . '" type="number" min="0">';
92
+ $form .= '</p>';
93
+
94
+ // Which networks to use as the basis field
95
+ $form .= '<p class="network">';
96
+ $form .= '<label for="' . $this->get_field_id( 'network' ) . '">Which network would you like to base your posts popularity on?</label>';
97
+ $form .= '<select class="widefat" id="' . $this->get_field_id( 'network' ) . '" name="' . $this->get_field_name( 'network' ) . '">';
98
+ $form .= '<option value="totes"' . ( $network == 'totes' ? 'selected' : '' ) . '>All Networks</option>';
99
+ foreach ( $availableNetworks as $key => $value ) :
100
+ if ( $options[ $key ] ) {
101
+ if ( $network == $key . '_shares' ) :
102
+ $form .= '<option value="' . $key . '_shares" selected>' . $value . '</option>';
103
+ else :
104
+ $form .= '<option value="' . $key . '_shares">' . $value . '</option>';
 
 
 
 
 
105
  endif;
106
  };
107
  endforeach;
108
+ $form .= '</select>';
109
+ $form .= '</p>';
110
+
111
+ // Display the share count toggle field
112
+ $form .= '<p class="showCount">';
113
+ $form .= '<label for="' . $this->get_field_id( 'showCount' ) . '">Would you like to show the count?</label>';
114
+ $form .= '<select class="widefat" id="' . $this->get_field_id( 'showCount' ) . '" name="' . $this->get_field_name( 'showCount' ) . '">';
115
+ $form .= '<option value="true" ' . ( $showCount == 'true' ? 'selected' : '') . '>Yes</option>';
116
+ $form .= '<option value="false" ' . ( $showCount == 'false' ? 'selected' : '') . '>No</option>';
117
+ $form .= '</select>';
118
+ $form .= '</p>';
119
+
120
+ // Count Label Field
121
+ $form .= '<p ' . ( $showCount == 'false' ? 'style="display:none;"' : '' ) . ' class="countLabel">';
122
+ $form .= '<label for="' . $this->get_field_id( 'countLabel' ) . '">Count Number Label</label>';
123
+ $form .= '<input class="widefat" id="' . $this->get_field_id( 'countLabel' ) . '" name="' . $this->get_field_name( 'countLabel' ) . '" type="text" value="' . $countLabel . '" />';
124
+ $form .= '</p>';
125
+
126
+ // Post thumbnails toggle field
127
+ $form .= '<p class="thumbnails">';
128
+ $form .= '<label for="' . $this->get_field_id( 'thumbnails' ) . '">Would you like to display thumbnails?</label>';
129
+ $form .= '<select class="widefat" id="' . $this->get_field_id( 'thumbnails' ) . '" name="' . $this->get_field_name( 'thumbnails' ) . '">';
130
+ $form .= '<option value="true" ' . ( $thumbnails == 'true' ? 'selected' : '') . '>Yes</option>';
131
+ $form .= '<option value="false" ' . ( $thumbnails == 'false' ? 'selected' : '') . '>No</option>';
132
+ $form .= '</select>';
133
+ $form .= '</p>';
134
+
135
+ // Thumbnails size field
136
+ $form .= '<p ' . ( $thumbnails == 'false' ? 'style="display:none;"' : '' ) . ' class="thumb_size">';
137
+ $form .= '<label for="' . $this->get_field_id( 'thumb_size' ) . '">What size would you like your thumbnails?</label>';
138
+ $form .= '<select class="widefat" id="' . $this->get_field_id( 'thumb_size' ) . '" name="' . $this->get_field_name( 'thumb_size' ) . '">';
139
+ $form .= '<option value="50" ' . ( $thumb_size == '50' ? 'selected' : '') . '>50px</option>';
140
+ $form .= '<option value="60" ' . ( $thumb_size == '60' ? 'selected' : '') . '>60px</option>';
141
+ $form .= '<option value="70" ' . ( $thumb_size == '70' ? 'selected' : '') . '>70px</option>';
142
+ $form .= '<option value="80" ' . ( $thumb_size == '80' ? 'selected' : '') . '>80px</option>';
143
+ $form .= '<option value="90" ' . ( $thumb_size == '90' ? 'selected' : '') . '>90px</option>';
144
+ $form .= '<option value="100" ' . ( $thumb_size == '100' ? 'selected' : '') . '>100px</option>';
145
+ $form .= '<option value="110" ' . ( $thumb_size == '110' ? 'selected' : '') . '>110px</option>';
146
+ $form .= '<option value="120" ' . ( $thumb_size == '120' ? 'selected' : '') . '>120px</option>';
147
+ $form .= '<option value="130" ' . ( $thumb_size == '130' ? 'selected' : '') . '>130px</option>';
148
+ $form .= '<option value="140" ' . ( $thumb_size == '140' ? 'selected' : '') . '>140px</option>';
149
+ $form .= '<option value="150" ' . ( $thumb_size == '150' ? 'selected' : '') . '>150px</option>';
150
+ $form .= '</select>';
151
+ $form .= '</p>';
152
+
153
+ // Font size field
154
+ $form .= '<p class="font_size">';
155
+ $form .= '<label for="' . $this->get_field_id( 'font_size' ) . '">What size would you like the font?</label>';
156
+ $form .= '<select class="widefat" id="' . $this->get_field_id( 'font_size' ) . '" name="' . $this->get_field_name( 'font_size' ) . '">';
157
+ $form .= '<option value="50" ' . ( $font_size == '50' ? 'selected' : '') . '>50%</option>';
158
+ $form .= '<option value="60" ' . ( $font_size == '60' ? 'selected' : '') . '>60%</option>';
159
+ $form .= '<option value="70" ' . ( $font_size == '70' ? 'selected' : '') . '>70%</option>';
160
+ $form .= '<option value="80" ' . ( $font_size == '80' ? 'selected' : '') . '>80%</option>';
161
+ $form .= '<option value="90" ' . ( $font_size == '90' ? 'selected' : '') . '>90%</option>';
162
+ $form .= '<option value="100" ' . ( $font_size == '100' ? 'selected' : '') . '>100%</option>';
163
+ $form .= '<option value="110" ' . ( $font_size == '110' ? 'selected' : '') . '>110%</option>';
164
+ $form .= '<option value="120" ' . ( $font_size == '120' ? 'selected' : '') . '>120%</option>';
165
+ $form .= '<option value="130" ' . ( $font_size == '130' ? 'selected' : '') . '>130%</option>';
166
+ $form .= '<option value="140" ' . ( $font_size == '140' ? 'selected' : '') . '>140%</option>';
167
+ $form .= '<option value="150" ' . ( $font_size == '150' ? 'selected' : '') . '>150%</option>';
168
+ $form .= '</select>';
169
+ $form .= '</p>';
170
+
171
+ // Color Scheme Field
172
+ $form .= '<p class="style">';
173
+ $form .= '<label for="' . $this->get_field_id( 'style' ) . '">Which color scheme would you like to use?</label>';
174
+ $form .= '<select class="widefat" id="' . $this->get_field_id( 'style' ) . '" name="' . $this->get_field_name( 'style' ) . '">';
175
+ $form .= '<option value="style_01" ' . ( $style == 'style_01' ? 'selected' : '' ) . '>Vanilla (No Styling)</option>';
176
+ $form .= '<option value="style_02" ' . ( $style == 'style_02' ? 'selected' : '' ) . '>Inspired by Twitter</option>';
177
+ $form .= '<option value="style_03" ' . ( $style == 'style_03' ? 'selected' : '' ) . '>Inspired by Facebook</option>';
178
+ $form .= '<option value="style_04" ' . ( $style == 'style_04' ? 'selected' : '' ) . '>Inspired by Google Plus</option>';
179
+ $form .= '<option value="style_05" ' . ( $style == 'style_05' ? 'selected' : '' ) . '>Inspired by LinkedIn</option>';
180
+ $form .= '<option value="style_06" ' . ( $style == 'style_06' ? 'selected' : '' ) . '>Inspired by Pinterest</option>';
181
+ $form .= '<option value="style_07" ' . ( $style == 'style_07' ? 'selected' : '' ) . '>Don\'t Stop Believin\'</option>';
182
+ $form .= '<option value="style_08" ' . ( $style == 'style_08' ? 'selected' : '' ) . '>Thunderstruck</option>';
183
+ $form .= '<option value="style_09" ' . ( $style == 'style_09' ? 'selected' : '' ) . '>Livin\' On A Prayer</option>';
184
+ $form .= '<option value="custom" ' . ( $style == 'custom' ? 'selected' : '' ) . '>Custom</option>';
185
+ $form .= '</select>';
186
+ $form .= '</p>';
187
+
188
+ // Custom Background Color Field
189
+ $form .= '<p ' . ( $style != 'custom' ? 'style="display:none;"' : '' ) . ' class="custom_bg">';
190
+ $form .= '<label for="' . $this->get_field_id( 'custom_bg' ) . '">Custom Background Color</label>';
191
+ $form .= '<input class="widefat" id="' . $this->get_field_id( 'custom_bg' ) . '" name="' . $this->get_field_name( 'custom_bg' ) . '" type="text" value="' . $custom_bg . '" />';
192
+ $form .= '</p>';
193
+
194
+ // Custom Link Color Field
195
+ $form .= '<p ' . ( $style != 'custom' ? 'style="display:none;"' : '' ) . ' class="custom_link">';
196
+ $form .= '<label for="' . $this->get_field_id( 'custom_link' ) . '">Custom Link Color</label>';
197
+ $form .= '<input class="widefat" id="' . $this->get_field_id( 'custom_link' ) . '" name="' . $this->get_field_name( 'custom_link' ) . '" type="text" value="' . $custom_link . '" />';
198
+ $form .= '</p>';
199
+
200
+ // Close the Div
201
+ $form .= '</div>';
202
+
203
+ // Output the form fields
204
+ echo $form;
 
 
205
 
206
+ }
 
 
207
 
208
+ /**
209
+ * FUNCTION - UPDATE VALUES FROM THE FORM
210
+ */
211
+ function update( $new_instance, $old_instance ) {
212
  $instance = $old_instance;
213
+
214
  // Fetch the values from the form
215
+ $instance['title'] = strip_tags( $new_instance['title'] );
216
+ $instance['count'] = strip_tags( $new_instance['count'] );
217
+ $instance['timeframe'] = strip_tags( $new_instance['timeframe'] );
218
+ $instance['network'] = strip_tags( $new_instance['network'] );
219
+ $instance['showCount'] = strip_tags( $new_instance['showCount'] );
220
+ $instance['countLabel'] = strip_tags( $new_instance['countLabel'] );
221
+ $instance['style'] = strip_tags( $new_instance['style'] );
222
+ $instance['thumbnails'] = strip_tags( $new_instance['thumbnails'] );
223
+ $instance['thumb_size'] = strip_tags( $new_instance['thumb_size'] );
224
+ $instance['font_size'] = strip_tags( $new_instance['font_size'] );
225
+ $instance['custom_bg'] = strip_tags( $new_instance['custom_bg'] );
226
+ $instance['custom_link'] = strip_tags( $new_instance['custom_link'] );
227
 
228
  return $instance;
229
  }
 
 
 
230
 
231
+ /**
232
+ * FUNCTION - OUTPUT THE WIDGET TO THE SITE
233
+ */
234
+ function widget( $args, $instance ) {
235
  extract( $args );
236
+
237
  // Fetch the field values from the form
238
+ (isset( $instance['title'] ) ? $title = $instance['title'] : $title = 'Popular Posts');
239
+ (isset( $instance['count'] ) ? $count = $instance['count'] : $count = '10');
240
+ (isset( $instance['timeframe'] ) ? $timeframe = $instance['timeframe'] : $timeframe = '0');
241
+ (isset( $instance['network'] ) ? $network = $instance['network'] : $network = 'totes');
242
+ (isset( $instance['showCount'] ) ? $showCount = $instance['showCount'] : $showCount = 'true');
243
+ (isset( $instance['countLabel'] ) ? $countLabel = $instance['countLabel'] : $countLabel = 'Total Shares');
244
+ (isset( $instance['style'] ) ? $style = $instance['style'] : $style = 'style_01');
245
+ (isset( $instance['thumbnails'] ) ? $thumbnails = $instance['thumbnails'] : $thumbnails = 'true');
246
+ (isset( $instance['thumb_size'] ) ? $thumb_size = $instance['thumb_size'] : $thumb_size = '100');
247
+ (isset( $instance['font_size'] ) ? $font_size = $instance['font_size'] : $font_size = '100');
248
+ (isset( $instance['custom_bg'] ) ? $custom_bg = $instance['custom_bg'] : $custom_bg = '#ffffff');
249
+ (isset( $instance['custom_link'] ) ? $custom_link = $instance['custom_link'] : $custom_link = '#000000');
250
+
251
  // Correct the previous style with the new version if it is present on the site
252
+ if ( $style == 'first_style' || $style == 'second_style' ) :
253
  $style = 'style_01';
254
  endif;
 
 
255
 
256
+ /**
257
+ * STYLES - CREATE AN ARRAY OF BACKGROUNDS AND LINK COLORS
258
+ */
259
 
 
 
260
  // Vanilla (No Styling)
261
  $styles['style_01']['wrapper'] = 'background:transparent;';
262
  $styles['style_01']['links'] = '';
263
+
264
  // Inspired by Twitter
265
  $styles['style_02']['wrapper'] = 'padding:15px;background:#429cd6;';
266
  $styles['style_02']['links'] = 'color:#ffffff;';
267
+
268
  // Inspired by Facebook
269
  $styles['style_03']['wrapper'] = 'padding:15px;background:#3a589e;';
270
  $styles['style_03']['links'] = 'color:#ffffff;';
271
+
272
  // Inspired by Google Plus
273
  $styles['style_04']['wrapper'] = 'padding:15px;background:#df4b37;';
274
  $styles['style_04']['links'] = 'color:#ffffff;';
275
+
276
  // Inspired by LinkedIn
277
  $styles['style_05']['wrapper'] = 'padding:15px;background:#0d77b7;';
278
  $styles['style_05']['links'] = 'color:#ffffff;';
279
+
280
  // Inspired by Pinterest
281
  $styles['style_06']['wrapper'] = 'padding:15px;background:#cd2029;';
282
  $styles['style_06']['links'] = 'color:#ffffff;';
283
+
284
  // Don't Stop Believin'
285
  $styles['style_07']['wrapper'] = 'padding:15px;background:#333333;';
286
  $styles['style_07']['links'] = 'color:#ffffff;';
287
+
288
  // Thunderstruck
289
  $styles['style_08']['wrapper'] = 'padding:15px;background:#30394F;';
290
  $styles['style_08']['links'] = 'color:#ffffff;';
291
+
292
  // Livin' On A Prayer
293
  $styles['style_09']['wrapper'] = 'padding:15px;background:#EEEEEE;';
294
  $styles['style_09']['links'] = 'color:#30394F;';
295
+
296
  // Custom
297
+ $styles['custom']['wrapper'] = 'padding:15px;background:' . $custom_bg . ';';
298
+ $styles['custom']['links'] = 'color:' . $custom_link . ';';
 
 
299
 
300
+ /**
301
+ * BUILD OUT THE WIDGET
302
+ */
303
 
 
 
304
  // Begin output of the widget html
305
  echo $before_widget;
306
+ echo '<div class="widget-text swp_widget_box" style="' . $styles[ $style ]['wrapper'] . '">';
307
+
308
  // Check if title is set
309
  if ( $title ) {
310
+ echo '<h4 class="widgettitle widget-title" style="' . $styles[ $style ]['links'] . '">' . $title . '</h4>';
311
  }
312
+
313
  // If a custom timeframe is not being used....
314
+ if ( $timeframe == 0 ) :
315
+
316
  // Create the arguments for a query without a timeframe
317
  $swp_args = array(
318
  'posts_per_page' => $count,
319
  'post_type' => 'post',
320
+ 'meta_key' => '_' . $network,
321
  'orderby' => 'meta_value_num',
322
  'order' => 'DESC',
323
  );
324
+
325
+ // If a custom timeframe is being used....
326
+ else :
327
+
328
  // Create the arguments for a query with a timeframe
329
  $swp_args = array(
330
  'posts_per_page' => $count,
331
  'post_type' => 'post',
332
+ 'meta_key' => '_' . $network,
333
  'orderby' => 'meta_value_num',
334
  'order' => 'DESC',
335
  'date_query' => array(
336
  'column' => 'post_date',
337
+ 'after' => '- ' . $timeframe . ' days',
338
+ ),
339
  );
340
  endif;
341
+
342
  // Reset the main query
343
  wp_reset_postdata();
344
+
345
  // Query and fetch the posts
346
  $swq = new WP_Query( $swp_args );
347
+
348
  // Begin the loop
349
+ if ( $swq->have_posts() ) :
350
  $i = 1;
351
+ while ( $swq->have_posts() ) :
352
+
353
+ if ( $i <= $count ) :
354
+ $swq->the_post();
355
+
356
+ // If we are supposed to show count numbers....
357
+ if ( $showCount == 'true' ) :
358
+ $postID = get_the_ID();
359
+ $shares = get_post_meta( $postID,'_' . $network,true );
360
+ $share_html = '<span class="swp_pop_count">' . swp_kilomega( $shares ) . ' ' . $countLabel . '</span>';
361
+
362
+ // If we are not supposed to show count numbers
363
+ else :
364
+ $share_html = '';
365
+ endif;
366
+
367
+ // If we are supposed to show thumbnails
368
+ if ( $thumbnails == 'true' && has_post_thumbnail() ) :
369
+ $thumbnail_url = wp_get_attachment_image_src( get_post_thumbnail_id() , 'thumbnail' );
370
+ $thumbnail_html = '';
371
+ $thumbnail_html .= '<a href="' . get_the_permalink() . '">';
372
+ $thumbnail_html .= '<img style="width:' . $thumb_size . 'px;height:' . $thumb_size . 'px;" class="swp_pop_thumb" src="' . $thumbnail_url[0] . '" title="' . str_replace('"','\'',get_the_title()) . '" alt="' . str_replace('"','\'',get_the_title()) . '">';
373
+ $thumbnail_html .= '</a>';
374
+
375
+ // If we are not supposed to show thumbnails
376
+ else :
377
+ $thumbnail_html = '';
378
+ endif;
379
+
380
+ // Generate the HTML for a link
381
+ $link_html = '<a style="font-size:' . $font_size . '%;' . $styles[ $style ]['links'] . '" class="swp_popularity" href="' . get_the_permalink() . '"><b>' . get_the_title() . '</b>' . $share_html . '</a>';
382
+
383
+ // Output the post to the site
384
+ echo '<div class="swp_popular_post">' . $thumbnail_html . '' . $link_html . '</div>';
385
+ echo '<div class="swp_clearfix"></div>';
386
 
 
 
 
 
 
 
 
 
 
 
 
387
  endif;
388
 
389
+ // End the loop
 
 
 
 
 
 
 
390
  endwhile;
391
  endif;
392
+
393
  // Reset the main query
394
  wp_reset_postdata();
395
  echo '</div>';
397
  }
398
  }
399
 
400
+ add_action( 'widgets_init', 'swp_register_widgets' );
401
+ /**
402
+ * Register widgets.
403
+ *
404
+ * @since 1.0.0
405
+ * @return void
406
+ */
407
+ function swp_register_widgets() {
408
+ register_widget( 'swp_popular_posts_widget' );
409
+ }
{functions/admin-options-page/images → images/admin-options-page}/affiliate-300x150.jpg RENAMED
File without changes
{functions/admin-options-page/images → images/admin-options-page}/measure-roi-300x150.jpg RENAMED
File without changes
{functions/admin-options-page/images → images/admin-options-page}/new_share_counts.png RENAMED
File without changes
{functions/admin-options-page/images → images/admin-options-page}/social-warfare-light.png RENAMED
File without changes
{functions/admin-options-page/images → images/admin-options-page}/socialwarfare-20x20.png RENAMED
File without changes
{functions/admin-options-page/images → images/admin-options-page}/starter-guide-300x150.jpg RENAMED
File without changes
js/admin-options-page.js ADDED
@@ -0,0 +1,726 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* global ajaxurl, swpAdminOptionsData, socialWarfarePlugin, wp */
2
+ (function( window, $, undefined ) {
3
+ 'use strict';
4
+
5
+ /*********************************************************
6
+ A Function send the array of setting to ajax.php
7
+ *********************************************************/
8
+ function selectText( element ) {
9
+ var range, selection;
10
+
11
+ if ( document.body.createTextRange ) {
12
+ range = document.body.createTextRange();
13
+
14
+ range.moveToElementText( element );
15
+
16
+ range.select();
17
+ } else if ( window.getSelection ) {
18
+ selection = window.getSelection();
19
+
20
+ range = document.createRange();
21
+
22
+ range.selectNodeContents( element );
23
+
24
+ selection.removeAllRanges();
25
+
26
+ selection.addRange( range );
27
+ }
28
+ }
29
+
30
+ /*********************************************************
31
+ A Function to gather all the settings
32
+ *********************************************************/
33
+ function fetchAllOptions() {
34
+ // Create an object
35
+ var values = {};
36
+
37
+ // Loop through all the inputs
38
+ $( 'form.sw-admin-settings-form input, form.sw-admin-settings-form select' ).each( function() {
39
+ var $field = $( this );
40
+
41
+ var name = $field.attr( 'name' );
42
+ var value;
43
+
44
+ if ( 'checkbox' === $field.attr( 'type' ) ) {
45
+ value = $field.prop( 'checked' );
46
+ } else {
47
+ value = $field.val();
48
+ }
49
+
50
+ values[name] = value;
51
+ });
52
+
53
+ // Create the objects
54
+ values.newOrderOfIcons = {};
55
+
56
+ // Loop through each active network
57
+ $( '.sw-active i' ).each( function() {
58
+ var network = $( this ).data( 'network' );
59
+ values.newOrderOfIcons[network] = network;
60
+ });
61
+
62
+ return values;
63
+ }
64
+
65
+ /*********************************************************
66
+ A function to show/hide conditionals
67
+ *********************************************************/
68
+ function conditionalFields() {
69
+ // Loop through all the fields that have dependancies
70
+ $( 'div[dep]' ).each( function() {
71
+ // Fetch the conditional values
72
+ var conDep = $( this ).attr( 'dep' );
73
+
74
+ var conDepVal = $.parseJSON( $( this ).attr( 'dep_val' ) );
75
+ var value;
76
+
77
+ // Fetch the value of checkboxes or other input types
78
+ if ( $( '[name="' + conDep + '"]' ).attr( 'type' ) == 'checkbox' ) {
79
+ value = $( '[name="' + conDep + '"]' ).prop( 'checked' );
80
+ } else {
81
+ value = $( '[name="' + conDep + '"]' ).val();
82
+ }
83
+
84
+ // Show or hide based on the conditional values (and the dependancy must be visible in case it is dependant)
85
+ if ( $.inArray( value, conDepVal ) !== -1 && $( '[name="' + conDep + '"]' ).parent( '.sw-grid' ).is( ':visible' ) ) {
86
+ $( this ).show();
87
+ } else {
88
+ $( this ).hide();
89
+ }
90
+ });
91
+
92
+ if ( swp_check_val('floatStyleSource') == false && (swp_select_val('sideDColorSet') == 'customColor' || swp_select_val('sideDColorSet') == 'ccOutlines' || swp_select_val('sideIColorSet') == 'customColor' || swp_select_val('sideIColorSet') == 'ccOutlines' || swp_select_val('sideOColorSet') == 'customColor' || swp_select_val('sideOColorSet') == 'ccOutlines') ) {
93
+ $( '.sideCustomColor_wrapper' ).slideDown();
94
+ } else {
95
+ $( '.sideCustomColor_wrapper' ).slideUp();
96
+ }
97
+ }
98
+
99
+ function swp_select_val(name) {
100
+ return $('select[name="' + name + '"]').val();
101
+ }
102
+
103
+ function swp_check_val(name) {
104
+ return $( '[name="' + name + '"]' ).prop( 'checked' );
105
+ }
106
+
107
+ /*********************************************************
108
+ Header Menu
109
+ *********************************************************/
110
+ function headerMenuInit() {
111
+ var offset = $( '.sw-top-menu' ).offset();
112
+
113
+ var width = $( '.sw-top-menu' ).width();
114
+
115
+ $( '.sw-top-menu' ).css({
116
+ position: 'fixed',
117
+ left: offset.left,
118
+ top: offset.top,
119
+ width: width
120
+ });
121
+
122
+ $( '.sw-admin-wrapper' ).css( 'padding-top', '75px' );
123
+ }
124
+
125
+ /*********************************************************
126
+ Tab Navigation
127
+ *********************************************************/
128
+ function tabNavInit() {
129
+ $( '.sw-tab-selector' ).on( 'click', function( event ) {
130
+ event.preventDefault ? event.preventDefault() : ( event.returnValue = false );
131
+
132
+ $( 'html, body' ).animate( { scrollTop: 0 }, 0 );
133
+
134
+ var tab = $( this ).attr( 'data-link' );
135
+
136
+ $( '.sw-admin-tab' ).hide();
137
+
138
+ $( '#' + tab ).show();
139
+
140
+ $( '.sw-header-menu li' ).removeClass( 'sw-active-tab' );
141
+
142
+ $( this ).parents( 'li' ).addClass( 'sw-active-tab' );
143
+
144
+ if ( 'swp_styles' === tab ) {
145
+ socialWarfarePlugin.activateHoverStates();
146
+ }
147
+
148
+ conditionalFields();
149
+
150
+ });
151
+ }
152
+
153
+ /*********************************************************
154
+ Checkboxes
155
+ *********************************************************/
156
+ function checkboxesInit() {
157
+
158
+ $( '.sw-checkbox-toggle' ).on( 'click', function() {
159
+ var status = $( this ).attr( 'status' );
160
+
161
+ var elem = $( this ).attr( 'field' );
162
+
163
+ if ( 'on' === status ) {
164
+ $( this ).attr( 'status', 'off' );
165
+
166
+ $( elem ).prop( 'checked', false );
167
+ } else {
168
+ $( this ).attr( 'status', 'on' );
169
+
170
+ $( elem ).prop( 'checked', true );
171
+ }
172
+
173
+ saveColorToggle();
174
+
175
+ conditionalFields();
176
+ });
177
+ }
178
+
179
+ function populateOptions() {
180
+ $( 'form.sw-admin-settings-form input, form.sw-admin-settings-form select' ).on( 'change', function() {
181
+ conditionalFields();
182
+
183
+ socialWarfarePlugin.newOptions = fetchAllOptions();
184
+
185
+ saveColorToggle();
186
+ });
187
+
188
+ socialWarfarePlugin.defaultOptions = fetchAllOptions();
189
+ }
190
+
191
+ /*********************************************************
192
+ A Function to change the color of the save button
193
+ *********************************************************/
194
+ function saveColorToggle() {
195
+ socialWarfarePlugin.newOptions = fetchAllOptions();
196
+
197
+ if ( JSON.stringify( socialWarfarePlugin.newOptions ) !== JSON.stringify( socialWarfarePlugin.defaultOptions ) ) {
198
+ $( '.sw-save-settings' ).removeClass( 'sw-navy-button' ).addClass( 'sw-red-button' );
199
+ } else {
200
+ $( '.sw-save-settings' ).removeClass( 'sw-red-button' ).addClass( 'sw-navy-button' );
201
+ }
202
+ }
203
+
204
+ /*********************************************************
205
+ A Function send the array of setting to ajax.php
206
+ *********************************************************/
207
+ function handleSettingSave() {
208
+ $( '.sw-save-settings' ).on( 'click', function( event ) {
209
+ // Block the default action
210
+ event.preventDefault ? event.preventDefault() : ( event.returnValue = false );
211
+
212
+ // The loading screen
213
+ loadingScreen();
214
+
215
+ // Fetch all the settings
216
+ var settings = fetchAllOptions();
217
+ console.log(settings);
218
+
219
+ // Prepare date
220
+ var data = {
221
+ action: 'swp_store_settings',
222
+ security: swpAdminOptionsData.optionsNonce,
223
+ settings: settings
224
+ };
225
+
226
+ // Send the POST request
227
+ $.post( ajaxurl, data, function(response) {
228
+ // Clear the loading screen
229
+ clearLoadingScreen();
230
+ console.log($.parseJSON(response));
231
+
232
+ // Reset the default options variable
233
+ socialWarfarePlugin.defaultOptions = fetchAllOptions();
234
+
235
+ saveColorToggle();
236
+ });
237
+ });
238
+ }
239
+
240
+ function loadingScreen() {
241
+ $( 'body' ).append( '<div class="sw-loading-bg"><div class="sw-loading-message">Saving Changes</div></div>' );
242
+ }
243
+
244
+ function clearLoadingScreen() {
245
+ $( '.sw-loading-message' ).html( 'Success!' ).removeClass( 'sw-loading-message' ).addClass( 'sw-loading-complete' );
246
+
247
+ $( '.sw-loading-bg' ).delay( 1000 ).fadeOut( 1000 );
248
+
249
+ setTimeout( function() {
250
+ $( '.sw-loading-bg' ).remove();
251
+ }, 2000 );
252
+ }
253
+
254
+ function updateCustomColor() {
255
+ var visualTheme = $( 'select[name="visualTheme"]' ).val();
256
+ var dColorSet = $( 'select[name="dColorSet"]' ).val();
257
+ var iColorSet = $( 'select[name="iColorSet"]' ).val();
258
+ var oColorSet = $( 'select[name="oColorSet"]' ).val();
259
+
260
+ $( 'style.swp_customColorStuff' ).remove();
261
+
262
+ var colorCode = $( 'input[name="customColor"]' ).val();
263
+
264
+ var customCSS = '';
265
+
266
+ if ( dColorSet == 'customColor' || iColorSet == 'customColor' || oColorSet == 'customColor' ) {
267
+ customCSS = '.nc_socialPanel.swp_d_customColor a, html body .nc_socialPanel.swp_i_customColor .nc_tweetContainer:hover a, body .nc_socialPanel.swp_o_customColor:hover a {color:white} .nc_socialPanel.swp_d_customColor .nc_tweetContainer, html body .nc_socialPanel.swp_i_customColor .nc_tweetContainer:hover, body .nc_socialPanel.swp_o_customColor:hover .nc_tweetContainer {background-color:' + colorCode + ';border:1px solid ' + colorCode + ';}';
268
+ }
269
+
270
+ if ( dColorSet == 'ccOutlines' || iColorSet == 'ccOutlines' || oColorSet == 'ccOutlines' ) {
271
+ customCSS = customCSS + ' .nc_socialPanel.swp_d_ccOutlines a, html body .nc_socialPanel.swp_i_ccOutlines .nc_tweetContainer:hover a, body .nc_socialPanel.swp_o_ccOutlines:hover a { color:' + colorCode + '; } .nc_socialPanel.swp_d_ccOutlines .nc_tweetContainer, html body .nc_socialPanel.swp_i_ccOutlines .nc_tweetContainer:hover, body .nc_socialPanel.swp_o_ccOutlines:hover .nc_tweetContainer { background:transparent; border:1px solid ' + colorCode + '; }';
272
+ }
273
+
274
+ $( 'head' ).append( '<style type="text/css" class="swp_customColorStuff">' + customCSS + '</style>' );
275
+ }
276
+
277
+ // A function for updating the preview
278
+ function updateTheme() {
279
+ var visualTheme = $( 'select[name="visualTheme"]' ).val();
280
+ var dColorSet = $( 'select[name="dColorSet"]' ).val();
281
+ var iColorSet = $( 'select[name="iColorSet"]' ).val();
282
+ var oColorSet = $( 'select[name="oColorSet"]' ).val();
283
+ var buttonsClass = 'swp_' + visualTheme + ' swp_d_' + dColorSet + ' swp_i_' + iColorSet + ' swp_o_' + oColorSet;
284
+
285
+ // Declare a default lastClass based on the default HTML if we haven't declared one
286
+ if('undefined' === typeof socialWarfarePlugin.lastClass){
287
+ console.log('boom');
288
+ socialWarfarePlugin.lastClass = 'swp_flatFresh swp_d_fullColor swp_i_fullColor swp_o_fullColor';
289
+ }
290
+ // Put together the new classes, remove the old ones, add the new ones, store the new ones for removal next time.
291
+ var buttonsClass = 'swp_' + visualTheme + ' swp_d_' + dColorSet + ' swp_i_' + iColorSet + ' swp_o_' + oColorSet;
292
+ $( '.nc_socialPanel' ).removeClass( socialWarfarePlugin.lastClass ).addClass( buttonsClass );
293
+ socialWarfarePlugin.lastClass = buttonsClass;
294
+
295
+ var lastClass = buttonsClass;
296
+
297
+ if ( dColorSet == 'customColor' || dColorSet == 'ccOutlines' || iColorSet == 'customColor' || iColorSet == 'ccOutlines' || oColorSet == 'customColor' || oColorSet == 'ccOutlines' ) {
298
+ $( '.customColor_wrapper' ).slideDown();
299
+
300
+ updateCustomColor();
301
+ } else {
302
+ $( '.customColor_wrapper' ).slideUp();
303
+ }
304
+ }
305
+
306
+ /*********************************************************
307
+ A Function to update the preview buttons
308
+ *********************************************************/
309
+
310
+ function updateButtonPreviews() {
311
+
312
+ var availableOptions = {
313
+ flatFresh: {
314
+ fullColor: 'Full Color',
315
+ lightGray: 'Light Gray',
316
+ mediumGray: 'Medium Gray',
317
+ darkGray: 'Dark Gray',
318
+ lgOutlines: 'Light Gray Outlines',
319
+ mdOutlines: 'Medium Gray Outlines',
320
+ dgOutlines: 'Dark Gray Outlines',
321
+ colorOutlines: 'Color Outlines',
322
+ customColor: 'Custom Color',
323
+ ccOutlines: 'Custom Color Outlines'
324
+ },
325
+ leaf: {
326
+ fullColor: 'Full Color',
327
+ lightGray: 'Light Gray',
328
+ mediumGray: 'Medium Gray',
329
+ darkGray: 'Dark Gray',
330
+ lgOutlines: 'Light Gray Outlines',
331
+ mdOutlines: 'Medium Gray Outlines',
332
+ dgOutlines: 'Dark Gray Outlines',
333
+ colorOutlines: 'Color Outlines',
334
+ customColor: 'Custom Color',
335
+ ccOutlines: 'Custom Color Outlines'
336
+ },
337
+ pill: {
338
+ fullColor: 'Full Color',
339
+ lightGray: 'Light Gray',
340
+ mediumGray: 'Medium Gray',
341
+ darkGray: 'Dark Gray',
342
+ lgOutlines: 'Light Gray Outlines',
343
+ mdOutlines: 'Medium Gray Outlines',
344
+ dgOutlines: 'Dark Gray Outlines',
345
+ colorOutlines: 'Color Outlines',
346
+ customColor: 'Custom Color',
347
+ ccOutlines: 'Custom Color Outlines'
348
+ },
349
+ threeDee: {
350
+ fullColor: 'Full Color',
351
+ lightGray: 'Light Gray',
352
+ mediumGray: 'Medium Gray',
353
+ darkGray: 'Dark Gray'
354
+ },
355
+ connected: {
356
+ fullColor: 'Full Color',
357
+ lightGray: 'Light Gray',
358
+ mediumGray: 'Medium Gray',
359
+ darkGray: 'Dark Gray',
360
+ lgOutlines: 'Light Gray Outlines',
361
+ mdOutlines: 'Medium Gray Outlines',
362
+ dgOutlines: 'Dark Gray Outlines',
363
+ colorOutlines: 'Color Outlines',
364
+ customColor: 'Custom Color',
365
+ ccOutlines: 'Custom Color Outlines'
366
+ },
367
+ shift: {
368
+ fullColor: 'Full Color',
369
+ lightGray: 'Light Gray',
370
+ mediumGray: 'Medium Gray',
371
+ darkGray: 'Dark Gray',
372
+ lgOutlines: 'Light Gray Outlines',
373
+ mdOutlines: 'Medium Gray Outlines',
374
+ dgOutlines: 'Dark Gray Outlines',
375
+ colorOutlines: 'Color Outlines',
376
+ customColor: 'Custom Color',
377
+ ccOutlines: 'Custom Color Outlines'
378
+ }
379
+ };
380
+
381
+ // Check if we are on the admin page
382
+ if ( 0 === $( 'select[name="visualTheme"]' ).length ) {
383
+ return;
384
+ }
385
+
386
+ // Update the items and previews on the initial page load
387
+ var visualTheme = $( 'select[name="visualTheme"]' ).val();
388
+ var dColorSet = $( 'select[name="dColorSet"]' ).val();
389
+ var iColorSet = $( 'select[name="iColorSet"]' ).val();
390
+ var oColorSet = $( 'select[name="oColorSet"]' ).val();
391
+
392
+ $( 'select[name="dColorSet"] option, select[name="iColorSet"] option, select[name="oColorSet"] option' ).remove();
393
+
394
+ $.each( availableOptions[visualTheme], function( index, value ) {
395
+ if ( index === dColorSet ) {
396
+ $( 'select[name="dColorSet"]' ).append( '<option value="' + index + '" selected>' + value + '</option>' );
397
+ } else {
398
+ $( 'select[name="dColorSet"]' ).append( '<option value="' + index + '">' + value + '</option>' );
399
+ }
400
+
401
+ if ( index === iColorSet ) {
402
+ $( 'select[name="iColorSet"]' ).append( '<option value="' + index + '" selected>' + value + '</option>' );
403
+ } else {
404
+ $( 'select[name="iColorSet"]' ).append( '<option value="' + index + '">' + value + '</option>' );
405
+ }
406
+
407
+ if ( index === oColorSet ) {
408
+ $( 'select[name="oColorSet"]' ).append( '<option value="' + index + '" selected>' + value + '</option>' );
409
+ } else {
410
+ $( 'select[name="oColorSet"]' ).append( '<option value="' + index + '">' + value + '</option>' );
411
+ }
412
+
413
+ if ( dColorSet == 'customColor' || dColorSet == 'ccOutlines' || iColorSet == 'customColor' || iColorSet == 'ccOutlines' || oColorSet == 'customColor' || oColorSet == 'ccOutlines' ) {
414
+ $( '.customColor_wrapper' ).slideDown();
415
+
416
+ updateCustomColor();
417
+ } else {
418
+ $( '.customColor_wrapper' ).slideUp();
419
+ }
420
+ });
421
+
422
+ // If the color set changes, update the preview with the function
423
+ $( 'select[name="dColorSet"], select[name="iColorSet"], select[name="oColorSet"]' ).on( 'change', updateTheme );
424
+
425
+ // If the visual theme is updated, update the preview manually
426
+ $( 'select[name="visualTheme"]' ).on( 'change', function() {
427
+ var visualTheme = $( 'select[name="visualTheme"]' ).val();
428
+ var dColorSet = $( 'select[name="dColorSet"]' ).val();
429
+ var iColorSet = $( 'select[name="iColorSet"]' ).val();
430
+ var oColorSet = $( 'select[name="oColorSet"]' ).val();
431
+ var i = 0;
432
+ var array = availableOptions[visualTheme];
433
+ var dColor = array.hasOwnProperty( dColorSet );
434
+ var iColor = array.hasOwnProperty( iColorSet );
435
+ var oColor = array.hasOwnProperty( oColorSet );
436
+
437
+ $( 'select[name="dColorSet"] option, select[name="iColorSet"] option, select[name="oColorSet"] option' ).remove();
438
+
439
+ $.each( availableOptions[visualTheme], function( index, value ) {
440
+ if ( index === dColorSet || ( dColor == false && i == 0 ) ) {
441
+ $( 'select[name="dColorSet"]' ).append( '<option value="' + index + '" selected>' + value + '</option>' );
442
+ } else {
443
+ $( 'select[name="dColorSet"]' ).append( '<option value="' + index + '">' + value + '</option>' );
444
+ }
445
+
446
+ if ( index === iColorSet || ( iColor == false && i == 0 ) ) {
447
+ $( 'select[name="iColorSet"]' ).append( '<option value="' + index + '" selected>' + value + '</option>' );
448
+ } else {
449
+ $( 'select[name="iColorSet"]' ).append( '<option value="' + index + '">' + value + '</option>' );
450
+ }
451
+
452
+ if ( index === oColorSet || ( oColor == false && i == 0 ) ) {
453
+ $( 'select[name="oColorSet"]' ).append( '<option value="' + index + '" selected>' + value + '</option>' );
454
+ } else {
455
+ $( 'select[name="oColorSet"]' ).append( '<option value="' + index + '">' + value + '</option>' );
456
+ }
457
+
458
+ ++i;
459
+ });
460
+ // Declare a default lastClass based on the default HTML if we haven't declared one
461
+ if('undefined' === typeof socialWarfarePlugin.lastClass){
462
+ console.log('boom');
463
+ socialWarfarePlugin.lastClass = 'swp_flatFresh swp_d_fullColor swp_i_fullColor swp_o_fullColor';
464
+ }
465
+ // Put together the new classes, remove the old ones, add the new ones, store the new ones for removal next time.
466
+ var buttonsClass = 'swp_' + visualTheme + ' swp_d_' + dColorSet + ' swp_i_' + iColorSet + ' swp_o_' + oColorSet;
467
+ $( '.nc_socialPanel' ).removeClass( socialWarfarePlugin.lastClass ).addClass( buttonsClass );
468
+ socialWarfarePlugin.lastClass = buttonsClass;
469
+ });
470
+ }
471
+
472
+ /*********************************************************
473
+ A Function to update the button sizing options
474
+ *********************************************************/
475
+ function updateScale() {
476
+ $( 'select[name="buttonSize"],select[name="buttonFloat"]' ).on( 'change', function() {
477
+ $( '.nc_socialPanel' ).css( { width: '100%' } );
478
+
479
+ var width = $( '.nc_socialPanel' ).width();
480
+ var scale = $( 'select[name="buttonSize"]' ).val();
481
+ var align = $( 'select[name="buttonFloat"]' ).val();
482
+
483
+ var newWidth;
484
+
485
+ if ( ( align == 'fullWidth' && scale != 1 ) || scale >= 1 ) {
486
+ newWidth = width / scale;
487
+
488
+ $( '.nc_socialPanel' ).css( 'cssText', 'width:' + newWidth + 'px!important;' );
489
+
490
+ $( '.nc_socialPanel' ).css({
491
+ transform: 'scale(' + scale + ')',
492
+ 'transform-origin': 'left'
493
+ });
494
+ } else if ( align != 'fullWidth' && scale < 1 ) {
495
+ newWidth = width / scale;
496
+
497
+ $( '.nc_socialPanel' ).css({
498
+ transform: 'scale(' + scale + ')',
499
+ 'transform-origin': align
500
+ });
501
+ }
502
+
503
+ socialWarfarePlugin.activateHoverStates();
504
+ });
505
+ }
506
+
507
+ /*********************************************************
508
+ Update the Click To Tweet Demo
509
+ *********************************************************/
510
+ function updateCttDemo() {
511
+ var $cttOptions = $( 'select[name="cttTheme"]' );
512
+
513
+ $cttOptions.on( 'change', function() {
514
+ var newStyle = $( 'select[name="cttTheme"]' ).val();
515
+
516
+ $( '.swp_CTT' ).attr( 'class', 'swp_CTT' ).addClass( newStyle );
517
+ });
518
+
519
+ $cttOptions.trigger( 'change' );
520
+ }
521
+
522
+ function toggleRegistration( status ) {
523
+ $( '.registration-wrapper' ).attr( 'registration', status );
524
+ $( '.sw-admin-wrapper' ).attr( 'sw-registered', status );
525
+ }
526
+
527
+ /*******************************************************
528
+ Register the Plugin
529
+ *******************************************************/
530
+ function registerPlugin() {
531
+ var registered = false;
532
+ var data = {
533
+ action: 'swp_ajax_passthrough',
534
+ security: swpAdminOptionsData.registerNonce,
535
+ activity: 'register',
536
+ email: $( 'input[name="emailAddress"]' ).val()
537
+ };
538
+
539
+ loadingScreen();
540
+
541
+ $.post( ajaxurl, data, function( response ) {
542
+ // If the response was a failure...
543
+ if ( ! response.success ) {
544
+ alert( 'Failure: ' + response.data );
545
+ } else {
546
+ // If the response was a success
547
+ $( 'input[name="premiumCode"]' ).val( response.data.premiumCode );
548
+ toggleRegistration( '1' );
549
+ registered = true;
550
+ }
551
+ });
552
+
553
+ clearLoadingScreen();
554
+
555
+ return registered;
556
+ }
557
+
558
+ /*******************************************************
559
+ Unregister the Plugin
560
+ *******************************************************/
561
+ function unregisterPlugin() {
562
+ var unregistered = false;
563
+ var ajaxData = {
564
+ action: 'swp_ajax_passthrough',
565
+ security: swpAdminOptionsData.registerNonce,
566
+ activity: 'unregister',
567
+ email: $( 'input[name="emailAddress"]' ).val(),
568
+ key: $( 'input[name="premiumCode"]' ).val()
569
+ };
570
+
571
+ loadingScreen();
572
+
573
+ // Ping the home server to create a registration log
574
+ $.post( ajaxurl, ajaxData, function( response ) {
575
+ // If the response was a failure...
576
+ if ( ! response.success ) {
577
+ alert( 'Failure: ' + response.data );
578
+ } else {
579
+ // If the response was a success
580
+ $( 'input[name="premiumCode"]' ).val( '' );
581
+ $( 'input[name="emailAddress"]' ).val( '' );
582
+ toggleRegistration( '0' );
583
+ unregistered = true;
584
+ }
585
+ });
586
+
587
+ clearLoadingScreen();
588
+
589
+ return unregistered;
590
+ }
591
+
592
+ function handleRegistration() {
593
+ $( '#register-plugin' ).on( 'click', function() {
594
+ registerPlugin();
595
+ return false;
596
+ });
597
+
598
+ $( '#unregister-plugin' ).on( 'click', function() {
599
+ unregisterPlugin();
600
+ return false;
601
+ });
602
+ }
603
+
604
+ /*******************************************************
605
+ Make the buttons sortable
606
+ *******************************************************/
607
+ function sortableInit() {
608
+ $( '.sw-buttons-sort.sw-active' ).sortable({
609
+ connectWith: '.sw-buttons-sort.sw-inactive',
610
+ update: function() {
611
+ saveColorToggle();
612
+ }
613
+ });
614
+
615
+ $( '.sw-buttons-sort.sw-inactive' ).sortable({
616
+ connectWith: '.sw-buttons-sort.sw-active',
617
+ update: function() {
618
+ saveColorToggle();
619
+ }
620
+ });
621
+ }
622
+
623
+ function getSystemStatus() {
624
+ $( '.sw-system-status' ).on( 'click', function( event ) {
625
+ // Block the default action
626
+ event.preventDefault ? event.preventDefault() : ( event.returnValue = false );
627
+
628
+ $( '.system-status-wrapper' ).slideToggle();
629
+
630
+ selectText( $( '.system-status-container' ).get( 0 ) );
631
+ });
632
+ }
633
+
634
+ function blockPremiumFeatures() {
635
+ $( '.sw-premium-blocker' ).tooltip({
636
+ items: '.sw-premium-blocker',
637
+ content: '<i></i>Unlock this feature by registering your license.',
638
+ position: {
639
+ my: 'center top',
640
+ at: 'center top'
641
+ },
642
+
643
+ tooltipClass: 'sw-admin-hover-notice',
644
+
645
+ open: function( event, ui ) {
646
+ if ( typeof ( event.originalEvent ) === 'undefined' ) {
647
+ return false;
648
+ }
649
+
650
+ var $id = $( ui.tooltip ).attr( 'id' );
651
+
652
+ // close any lingering tooltips
653
+ $( 'div.ui-tooltip' ).not( '#' + $id ).remove();
654
+
655
+ // ajax function to pull in data and add it to the tooltip goes here
656
+ },
657
+
658
+ close: function( event, ui ) {
659
+ ui.tooltip.hover(function() {
660
+ $( this ).stop( true ).fadeTo( 400, 1 );
661
+ },
662
+ function() {
663
+ $( this ).fadeOut( '400', function() {
664
+ $( this ).remove();
665
+ });
666
+ });
667
+ }
668
+ });
669
+ }
670
+
671
+ /*********************************************************
672
+ A Function for image upload buttons
673
+ *********************************************************/
674
+ function customUploaderInit() {
675
+ var customUploader;
676
+
677
+ $( '.swp_upload_image_button' ).click(function( e ) {
678
+ e.preventDefault();
679
+
680
+ var inputField = $( this ).attr( 'for' );
681
+
682
+ // If the uploader object has already been created, reopen the dialog
683
+ if ( customUploader ) {
684
+ customUploader.open();
685
+
686
+ return;
687
+ }
688
+
689
+ // Extend the wp.media object
690
+ customUploader = wp.media.frames.file_frame = wp.media({
691
+ title: 'Choose Image',
692
+ button: {
693
+ text: 'Choose Image'
694
+ },
695
+ multiple: false
696
+ });
697
+
698
+ // When a file is selected, grab the URL and set it as the text field's value
699
+ customUploader.on( 'select', function() {
700
+ var attachment = customUploader.state().get( 'selection' ).first().toJSON();
701
+
702
+ $( 'input[name="' + inputField + '"' ).val( attachment.url );
703
+ });
704
+
705
+ // Open the uploader dialog
706
+ customUploader.open();
707
+ });
708
+ }
709
+
710
+ $( document ).ready(function() {
711
+ handleSettingSave();
712
+ populateOptions();
713
+ headerMenuInit();
714
+ tabNavInit();
715
+ checkboxesInit();
716
+ updateButtonPreviews();
717
+ conditionalFields();
718
+ updateCttDemo();
719
+ updateScale();
720
+ handleRegistration();
721
+ sortableInit();
722
+ getSystemStatus();
723
+ blockPremiumFeatures();
724
+ customUploaderInit();
725
+ });
726
+ })( this, jQuery );
js/admin-options-page.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a,b,c){"use strict";function d(b){var c,d;document.body.createTextRange?(c=document.body.createTextRange(),c.moveToElementText(b),c.select()):a.getSelection&&(d=a.getSelection(),c=document.createRange(),c.selectNodeContents(b),d.removeAllRanges(),d.addRange(c))}function e(){var a={};return b("form.sw-admin-settings-form input, form.sw-admin-settings-form select").each(function(){var c,d=b(this),e=d.attr("name");c="checkbox"===d.attr("type")?d.prop("checked"):d.val(),a[e]=c}),a.newOrderOfIcons={},b(".sw-active i").each(function(){var c=b(this).data("network");a.newOrderOfIcons[c]=c}),a}function f(){b("div[dep]").each(function(){var a,c=b(this).attr("dep"),d=b.parseJSON(b(this).attr("dep_val"));a="checkbox"==b('[name="'+c+'"]').attr("type")?b('[name="'+c+'"]').prop("checked"):b('[name="'+c+'"]').val(),b.inArray(a,d)!==-1&&b('[name="'+c+'"]').parent(".sw-grid").is(":visible")?b(this).show():b(this).hide()}),0!=h("floatStyleSource")||"customColor"!=g("sideDColorSet")&&"ccOutlines"!=g("sideDColorSet")&&"customColor"!=g("sideIColorSet")&&"ccOutlines"!=g("sideIColorSet")&&"customColor"!=g("sideOColorSet")&&"ccOutlines"!=g("sideOColorSet")?b(".sideCustomColor_wrapper").slideUp():b(".sideCustomColor_wrapper").slideDown()}function g(a){return b('select[name="'+a+'"]').val()}function h(a){return b('[name="'+a+'"]').prop("checked")}function i(){var a=b(".sw-top-menu").offset(),c=b(".sw-top-menu").width();b(".sw-top-menu").css({position:"fixed",left:a.left,top:a.top,width:c}),b(".sw-admin-wrapper").css("padding-top","75px")}function j(){b(".sw-tab-selector").on("click",function(a){a.preventDefault?a.preventDefault():a.returnValue=!1,b("html, body").animate({scrollTop:0},0);var c=b(this).attr("data-link");b(".sw-admin-tab").hide(),b("#"+c).show(),b(".sw-header-menu li").removeClass("sw-active-tab"),b(this).parents("li").addClass("sw-active-tab"),"swp_styles"===c&&socialWarfarePlugin.activateHoverStates(),f()})}function k(){b(".sw-checkbox-toggle").on("click",function(){var a=b(this).attr("status"),c=b(this).attr("field");"on"===a?(b(this).attr("status","off"),b(c).prop("checked",!1)):(b(this).attr("status","on"),b(c).prop("checked",!0)),m(),f()})}function l(){b("form.sw-admin-settings-form input, form.sw-admin-settings-form select").on("change",function(){f(),socialWarfarePlugin.newOptions=e(),m()}),socialWarfarePlugin.defaultOptions=e()}function m(){socialWarfarePlugin.newOptions=e(),JSON.stringify(socialWarfarePlugin.newOptions)!==JSON.stringify(socialWarfarePlugin.defaultOptions)?b(".sw-save-settings").removeClass("sw-navy-button").addClass("sw-red-button"):b(".sw-save-settings").removeClass("sw-red-button").addClass("sw-navy-button")}function n(){b(".sw-save-settings").on("click",function(a){a.preventDefault?a.preventDefault():a.returnValue=!1,o();var c=e();console.log(c);var d={action:"swp_store_settings",security:swpAdminOptionsData.optionsNonce,settings:c};b.post(ajaxurl,d,function(a){p(),console.log(b.parseJSON(a)),socialWarfarePlugin.defaultOptions=e(),m()})})}function o(){b("body").append('<div class="sw-loading-bg"><div class="sw-loading-message">Saving Changes</div></div>')}function p(){b(".sw-loading-message").html("Success!").removeClass("sw-loading-message").addClass("sw-loading-complete"),b(".sw-loading-bg").delay(1e3).fadeOut(1e3),setTimeout(function(){b(".sw-loading-bg").remove()},2e3)}function q(){var a=(b('select[name="visualTheme"]').val(),b('select[name="dColorSet"]').val()),c=b('select[name="iColorSet"]').val(),d=b('select[name="oColorSet"]').val();b("style.swp_customColorStuff").remove();var e=b('input[name="customColor"]').val(),f="";"customColor"!=a&&"customColor"!=c&&"customColor"!=d||(f=".nc_socialPanel.swp_d_customColor a, html body .nc_socialPanel.swp_i_customColor .nc_tweetContainer:hover a, body .nc_socialPanel.swp_o_customColor:hover a {color:white} .nc_socialPanel.swp_d_customColor .nc_tweetContainer, html body .nc_socialPanel.swp_i_customColor .nc_tweetContainer:hover, body .nc_socialPanel.swp_o_customColor:hover .nc_tweetContainer {background-color:"+e+";border:1px solid "+e+";}"),"ccOutlines"!=a&&"ccOutlines"!=c&&"ccOutlines"!=d||(f=f+" .nc_socialPanel.swp_d_ccOutlines a, html body .nc_socialPanel.swp_i_ccOutlines .nc_tweetContainer:hover a, body .nc_socialPanel.swp_o_ccOutlines:hover a { color:"+e+"; } .nc_socialPanel.swp_d_ccOutlines .nc_tweetContainer, html body .nc_socialPanel.swp_i_ccOutlines .nc_tweetContainer:hover, body .nc_socialPanel.swp_o_ccOutlines:hover .nc_tweetContainer { background:transparent; border:1px solid "+e+"; }"),b("head").append('<style type="text/css" class="swp_customColorStuff">'+f+"</style>")}function r(){var a=b('select[name="visualTheme"]').val(),c=b('select[name="dColorSet"]').val(),d=b('select[name="iColorSet"]').val(),e=b('select[name="oColorSet"]').val(),f="swp_"+a+" swp_d_"+c+" swp_i_"+d+" swp_o_"+e;"undefined"==typeof socialWarfarePlugin.lastClass&&(console.log("boom"),socialWarfarePlugin.lastClass="swp_flatFresh swp_d_fullColor swp_i_fullColor swp_o_fullColor");var f="swp_"+a+" swp_d_"+c+" swp_i_"+d+" swp_o_"+e;b(".nc_socialPanel").removeClass(socialWarfarePlugin.lastClass).addClass(f),socialWarfarePlugin.lastClass=f;"customColor"==c||"ccOutlines"==c||"customColor"==d||"ccOutlines"==d||"customColor"==e||"ccOutlines"==e?(b(".customColor_wrapper").slideDown(),q()):b(".customColor_wrapper").slideUp()}function s(){var a={flatFresh:{fullColor:"Full Color",lightGray:"Light Gray",mediumGray:"Medium Gray",darkGray:"Dark Gray",lgOutlines:"Light Gray Outlines",mdOutlines:"Medium Gray Outlines",dgOutlines:"Dark Gray Outlines",colorOutlines:"Color Outlines",customColor:"Custom Color",ccOutlines:"Custom Color Outlines"},leaf:{fullColor:"Full Color",lightGray:"Light Gray",mediumGray:"Medium Gray",darkGray:"Dark Gray",lgOutlines:"Light Gray Outlines",mdOutlines:"Medium Gray Outlines",dgOutlines:"Dark Gray Outlines",colorOutlines:"Color Outlines",customColor:"Custom Color",ccOutlines:"Custom Color Outlines"},pill:{fullColor:"Full Color",lightGray:"Light Gray",mediumGray:"Medium Gray",darkGray:"Dark Gray",lgOutlines:"Light Gray Outlines",mdOutlines:"Medium Gray Outlines",dgOutlines:"Dark Gray Outlines",colorOutlines:"Color Outlines",customColor:"Custom Color",ccOutlines:"Custom Color Outlines"},threeDee:{fullColor:"Full Color",lightGray:"Light Gray",mediumGray:"Medium Gray",darkGray:"Dark Gray"},connected:{fullColor:"Full Color",lightGray:"Light Gray",mediumGray:"Medium Gray",darkGray:"Dark Gray",lgOutlines:"Light Gray Outlines",mdOutlines:"Medium Gray Outlines",dgOutlines:"Dark Gray Outlines",colorOutlines:"Color Outlines",customColor:"Custom Color",ccOutlines:"Custom Color Outlines"},shift:{fullColor:"Full Color",lightGray:"Light Gray",mediumGray:"Medium Gray",darkGray:"Dark Gray",lgOutlines:"Light Gray Outlines",mdOutlines:"Medium Gray Outlines",dgOutlines:"Dark Gray Outlines",colorOutlines:"Color Outlines",customColor:"Custom Color",ccOutlines:"Custom Color Outlines"}};if(0!==b('select[name="visualTheme"]').length){var c=b('select[name="visualTheme"]').val(),d=b('select[name="dColorSet"]').val(),e=b('select[name="iColorSet"]').val(),f=b('select[name="oColorSet"]').val();b('select[name="dColorSet"] option, select[name="iColorSet"] option, select[name="oColorSet"] option').remove(),b.each(a[c],function(a,c){a===d?b('select[name="dColorSet"]').append('<option value="'+a+'" selected>'+c+"</option>"):b('select[name="dColorSet"]').append('<option value="'+a+'">'+c+"</option>"),a===e?b('select[name="iColorSet"]').append('<option value="'+a+'" selected>'+c+"</option>"):b('select[name="iColorSet"]').append('<option value="'+a+'">'+c+"</option>"),a===f?b('select[name="oColorSet"]').append('<option value="'+a+'" selected>'+c+"</option>"):b('select[name="oColorSet"]').append('<option value="'+a+'">'+c+"</option>"),"customColor"==d||"ccOutlines"==d||"customColor"==e||"ccOutlines"==e||"customColor"==f||"ccOutlines"==f?(b(".customColor_wrapper").slideDown(),q()):b(".customColor_wrapper").slideUp()}),b('select[name="dColorSet"], select[name="iColorSet"], select[name="oColorSet"]').on("change",r),b('select[name="visualTheme"]').on("change",function(){var c=b('select[name="visualTheme"]').val(),d=b('select[name="dColorSet"]').val(),e=b('select[name="iColorSet"]').val(),f=b('select[name="oColorSet"]').val(),g=0,h=a[c],i=h.hasOwnProperty(d),j=h.hasOwnProperty(e),k=h.hasOwnProperty(f);b('select[name="dColorSet"] option, select[name="iColorSet"] option, select[name="oColorSet"] option').remove(),b.each(a[c],function(a,c){a===d||0==i&&0==g?b('select[name="dColorSet"]').append('<option value="'+a+'" selected>'+c+"</option>"):b('select[name="dColorSet"]').append('<option value="'+a+'">'+c+"</option>"),a===e||0==j&&0==g?b('select[name="iColorSet"]').append('<option value="'+a+'" selected>'+c+"</option>"):b('select[name="iColorSet"]').append('<option value="'+a+'">'+c+"</option>"),a===f||0==k&&0==g?b('select[name="oColorSet"]').append('<option value="'+a+'" selected>'+c+"</option>"):b('select[name="oColorSet"]').append('<option value="'+a+'">'+c+"</option>"),++g}),"undefined"==typeof socialWarfarePlugin.lastClass&&(console.log("boom"),socialWarfarePlugin.lastClass="swp_flatFresh swp_d_fullColor swp_i_fullColor swp_o_fullColor");var l="swp_"+c+" swp_d_"+d+" swp_i_"+e+" swp_o_"+f;b(".nc_socialPanel").removeClass(socialWarfarePlugin.lastClass).addClass(l),socialWarfarePlugin.lastClass=l})}}function t(){b('select[name="buttonSize"],select[name="buttonFloat"]').on("change",function(){b(".nc_socialPanel").css({width:"100%"});var a,c=b(".nc_socialPanel").width(),d=b('select[name="buttonSize"]').val(),e=b('select[name="buttonFloat"]').val();"fullWidth"==e&&1!=d||d>=1?(a=c/d,b(".nc_socialPanel").css("cssText","width:"+a+"px!important;"),b(".nc_socialPanel").css({transform:"scale("+d+")","transform-origin":"left"})):"fullWidth"!=e&&d<1&&(a=c/d,b(".nc_socialPanel").css({transform:"scale("+d+")","transform-origin":e})),socialWarfarePlugin.activateHoverStates()})}function u(){var a=b('select[name="cttTheme"]');a.on("change",function(){var a=b('select[name="cttTheme"]').val();b(".swp_CTT").attr("class","swp_CTT").addClass(a)}),a.trigger("change")}function v(a){b(".registration-wrapper").attr("registration",a),b(".sw-admin-wrapper").attr("sw-registered",a)}function w(){var a=!1,c={action:"swp_ajax_passthrough",security:swpAdminOptionsData.registerNonce,activity:"register",email:b('input[name="emailAddress"]').val()};return o(),b.post(ajaxurl,c,function(c){c.success?(b('input[name="premiumCode"]').val(c.data.premiumCode),v("1"),a=!0):alert("Failure: "+c.data)}),p(),a}function x(){var a=!1,c={action:"swp_ajax_passthrough",security:swpAdminOptionsData.registerNonce,activity:"unregister",email:b('input[name="emailAddress"]').val(),key:b('input[name="premiumCode"]').val()};return o(),b.post(ajaxurl,c,function(c){c.success?(b('input[name="premiumCode"]').val(""),b('input[name="emailAddress"]').val(""),v("0"),a=!0):alert("Failure: "+c.data)}),p(),a}function y(){b("#register-plugin").on("click",function(){return w(),!1}),b("#unregister-plugin").on("click",function(){return x(),!1})}function z(){b(".sw-buttons-sort.sw-active").sortable({connectWith:".sw-buttons-sort.sw-inactive",update:function(){m()}}),b(".sw-buttons-sort.sw-inactive").sortable({connectWith:".sw-buttons-sort.sw-active",update:function(){m()}})}function A(){b(".sw-system-status").on("click",function(a){a.preventDefault?a.preventDefault():a.returnValue=!1,b(".system-status-wrapper").slideToggle(),d(b(".system-status-container").get(0))})}function B(){b(".sw-premium-blocker").tooltip({items:".sw-premium-blocker",content:"<i></i>Unlock this feature by registering your license.",position:{my:"center top",at:"center top"},tooltipClass:"sw-admin-hover-notice",open:function(a,c){if("undefined"==typeof a.originalEvent)return!1;var d=b(c.tooltip).attr("id");b("div.ui-tooltip").not("#"+d).remove()},close:function(a,c){c.tooltip.hover(function(){b(this).stop(!0).fadeTo(400,1)},function(){b(this).fadeOut("400",function(){b(this).remove()})})}})}function C(){var a;b(".swp_upload_image_button").click(function(c){c.preventDefault();var d=b(this).attr("for");return a?void a.open():(a=wp.media.frames.file_frame=wp.media({title:"Choose Image",button:{text:"Choose Image"},multiple:!1}),a.on("select",function(){var c=a.state().get("selection").first().toJSON();b('input[name="'+d+'"').val(c.url)}),void a.open())})}b(document).ready(function(){n(),l(),i(),j(),k(),s(),f(),u(),t(),y(),z(),A(),B(),C()})}(this,jQuery);
js/admin.js ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var socialWarfareAdmin = socialWarfareAdmin || {};
2
+
3
+ (function( window, $, undefined ) {
4
+ 'use strict';
5
+
6
+ socialWarfareAdmin.linkLength = function( input ) {
7
+ var tmp = '';
8
+
9
+ for ( var i = 0; i < 23; i++ ) {
10
+ tmp += 'o';
11
+ }
12
+
13
+ return input.replace( /(http:\/\/[\S]*)/g, tmp ).length;
14
+ };
15
+
16
+ // Function for SM Title Counting
17
+ function smTitleRemaining() {
18
+ var smTitle = $( '#socialWarfare textarea#nc_ogTitle' ).val();
19
+ var remaining = 60 - smTitle.length;
20
+ if ( smTitle.length > 0 && remaining >= 0 ) {
21
+ $( '#socialWarfare .nc_ogTitleWrapper .swp_CountDown' ).removeClass( 'swp_red' ).addClass( 'swp_blue' );
22
+ } else if ( smTitle.length > 0 && remaining < 0 ) {
23
+ $( '#socialWarfare .nc_ogTitleWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).addClass( 'swp_red' );
24
+ } else {
25
+ $( '#socialWarfare .nc_ogTitleWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).removeClass( 'swp_red' );
26
+ }
27
+ $( '#socialWarfare .nc_ogTitleWrapper .counterNumber' ).html( remaining );
28
+ }
29
+
30
+ // Function for SM Description Counting
31
+ function smDescriptionRemaining() {
32
+ var smDescription = $( '#socialWarfare textarea#nc_ogDescription' ).val();
33
+ var remaining = 160 - smDescription.length;
34
+ if ( smDescription.length > 0 && remaining >= 0 ) {
35
+ $( '#socialWarfare .nc_ogDescriptionWrapper .swp_CountDown' ).removeClass( 'swp_red' ).addClass( 'swp_blue' );
36
+ } else if ( smDescription.length > 0 && remaining < 0 ) {
37
+ $( '#socialWarfare .nc_ogDescriptionWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).addClass( 'swp_red' );
38
+ } else {
39
+ $( '#socialWarfare .nc_ogDescriptionWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).removeClass( 'swp_red' );
40
+ }
41
+ $( '#socialWarfare .nc_ogDescriptionWrapper .counterNumber' ).html( remaining );
42
+ }
43
+
44
+ // Function for Twitter Box Counting
45
+ function twitterRemaining() {
46
+ var smTwitter = $( '#socialWarfare textarea#nc_customTweet' ).val();
47
+ var handle = $( '#socialWarfare .twitterIDWrapper label' ).html();
48
+ var linkSpace;
49
+
50
+ if ( smTwitter.indexOf( 'http' ) > -1 || smTwitter.indexOf( 'https' ) > -1 ) {
51
+ linkSpace = 0;
52
+ $( '.tweetLinkSection' ).css({ 'text-decoration': 'line-through' });
53
+ } else {
54
+ linkSpace = 23;
55
+ $( '.tweetLinkSection' ).css({ 'text-decoration': 'none' });
56
+ }
57
+
58
+ var remaining;
59
+
60
+ if ( 'undefined' === typeof handle ) {
61
+ remaining = 140 - socialWarfareAdmin.linkLength( smTwitter ) - linkSpace;
62
+ } else {
63
+ remaining = 140 - socialWarfareAdmin.linkLength( smTwitter ) - handle.length - linkSpace - 6;
64
+ }
65
+
66
+ if ( smTwitter.length > 0 && remaining >= 0 ) {
67
+ $( '#socialWarfare .nc_customTweetWrapper .swp_CountDown' ).removeClass( 'swp_red' ).addClass( 'swp_blue' );
68
+ } else if ( smTwitter.length > 0 && remaining < 0 ) {
69
+ $( '#socialWarfare .nc_customTweetWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).addClass( 'swp_red' );
70
+ } else {
71
+ $( '#socialWarfare .nc_customTweetWrapper .swp_CountDown' ).removeClass( 'swp_blue' ).removeClass( 'swp_red' );
72
+ }
73
+
74
+ $( '#socialWarfare .nc_customTweetWrapper .counterNumber' ).html( remaining );
75
+ }
76
+
77
+ $( document ).ready( function() {
78
+ if ( $( '#socialWarfare.postbox' ).length ) {
79
+ // Add the CountDown Box for the Social Media Title
80
+ $( '#socialWarfare #nc_ogTitle' ).parent().prepend( '<div class="swp_CountDown"><span class="counterNumber">60</span> ' + swp_localize_admin.swp_characters_remaining + '</div>' );
81
+
82
+ // Add the CountDown Box for the Social Media Description
83
+ $( '#socialWarfare #nc_ogDescription' ).parent().prepend( '<div class="swp_CountDown"><span class="counterNumber">150</span> ' + swp_localize_admin.swp_characters_remaining + '</div>' );
84
+
85
+ // Add the CountDown Box for the Twitter Box
86
+ $( '#socialWarfare #nc_customTweet' ).parent().prepend( '<div class="swp_CountDown"><span class="counterNumber">118</span> ' + swp_localize_admin.swp_characters_remaining + '</div>' );
87
+
88
+ smTitleRemaining();
89
+ $( '#socialWarfare textarea#nc_ogTitle' ).on( 'input', function() {
90
+ smTitleRemaining();
91
+ });
92
+
93
+ smDescriptionRemaining();
94
+ $( '#socialWarfare textarea#nc_ogDescription' ).on( 'input', function() {
95
+ smDescriptionRemaining();
96
+ });
97
+
98
+ twitterRemaining();
99
+ $( '#socialWarfare textarea#nc_customTweet' ).on( 'input', function() {
100
+ twitterRemaining();
101
+ });
102
+
103
+ // Setup an initilazation loop
104
+ var swpPostInit = setInterval( function() {
105
+ var swpOgImage = $( '.nc_ogImageWrapper ul.swpmb-media-list' );
106
+ var swpPinImage = $( '.nc_pinterestImageWrapper ul.swpmb-media-list' );
107
+
108
+ var smWidth, smHeight;
109
+
110
+ // Check if the media list has been created yet
111
+ if ( swpOgImage.length && swpOgImage.is( ':empty' ) ) {
112
+ // Setup the Open Graph Image Placeholder
113
+ smWidth = swpOgImage.width();
114
+ smHeight = smWidth * ( 9 / 16 );
115
+ swpOgImage.css({ height: smHeight + 'px' });
116
+ } else {
117
+ smHeight = swpOgImage.find( 'img' ).height();
118
+ swpOgImage.css({ height: smHeight + 'px' });
119
+ }
120
+
121
+ var pinWidth, pinHeight;
122
+
123
+ if ( swpPinImage.length && swpPinImage.is( ':empty' ) ) {
124
+ // Setup the Open Graph Image Placeholder
125
+ pinWidth = swpPinImage.width();
126
+ pinHeight = pinWidth * ( 3 / 2 );
127
+ swpPinImage.css({ height: pinHeight + 'px' });
128
+ } else {
129
+ pinHeight = swpPinImage.find( 'img' ).height();
130
+ swpPinImage.css({
131
+ height: pinHeight + 'px'
132
+ });
133
+ }
134
+ }, 1000 );
135
+ }
136
+
137
+ // Show and Hide the Count Label based on if we're showing counts
138
+ $( '.swp_popular_post_options .showCount select' ).on( 'change', function() {
139
+ var value = $( this ).val();
140
+ if ( value = true ) {
141
+ $( '.swp_popular_post_options .countLabel' ).slideDown( 'slow' );
142
+ } else {
143
+ $( '.swp_popular_post_options .countLabel' ).slideUp( 'slow' );
144
+ }
145
+ });
146
+
147
+ // Show and Hide the Thumbnail size based on if we're showing thmbnails
148
+ $( '.swp_popular_post_options .thumbnails select' ).on( 'change', function() {
149
+ var value = $( this ).val();
150
+ if ( value = true ) {
151
+ $( '.swp_popular_post_options .thumb_size' ).slideDown( 'slow' );
152
+ } else {
153
+ $( '.swp_popular_post_options .thumb_size' ).slideUp( 'slow' );
154
+ }
155
+ });
156
+
157
+ // Show and Hide the Custom fields based on if we're using a custom color scheme
158
+ $( '.swp_popular_post_options .style select' ).on( 'change', function() {
159
+ var value = $( this ).val();
160
+ if ( value = 'custom' ) {
161
+ $( '.swp_popular_post_options .custom_bg, .swp_popular_post_options .custom_link' ).slideDown( 'slow' );
162
+ } else {
163
+ $( '.swp_popular_post_options .custom_bg, .swp_popular_post_options .custom_link' ).slideUp( 'slow' );
164
+ }
165
+ });
166
+
167
+ if ( $( '.postbox#socialWarfare' ).length ) {
168
+ var registrationStatus = $( '#socialWarfare .registrationWrapper input' ).attr( 'id' );
169
+ if ( registrationStatus == 'false' ) {
170
+ $( '.postbox#socialWarfare' )
171
+ .css({ position: 'relative',opacity: '0.3' })
172
+ .append( '<div class="sw-premium-blocker"></div>' );
173
+
174
+ $( '#socialWarfare .sw-premium-blocker' ).tooltip({
175
+ items: '#socialWarfare .sw-premium-blocker',
176
+ content: '<i></i>Unlock these features by registering your license.',
177
+ position: {
178
+ my: 'center top',
179
+ at: 'center top'
180
+ },
181
+ tooltipClass: 'sw-admin-hover-notice',
182
+ open: function( event, ui ) {
183
+ if ( 'undefined' === typeof ( event.originalEvent ) ) {
184
+ return false;
185
+ }
186
+
187
+ var $id = $( ui.tooltip ).attr( 'id' );
188
+
189
+ // close any lingering tooltips
190
+ $( 'div.ui-tooltip' ).not( '#' + $id ).remove();
191
+
192
+ // ajax function to pull in data and add it to the tooltip goes here
193
+ },
194
+ close: function( event, ui ) {
195
+ ui.tooltip.hover(function() {
196
+ $( this ).stop( true ).fadeTo( 400, 1 );
197
+ },
198
+ function() {
199
+ $( this ).fadeOut( '400', function() {
200
+ $( this ).remove();
201
+ });
202
+ });
203
+ }
204
+ });
205
+ }
206
+ }
207
+ });
208
+ })( this, jQuery );
js/admin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ var socialWarfareAdmin=socialWarfareAdmin||{};!function(a,b,c){"use strict";function d(){var a=b("#socialWarfare textarea#nc_ogTitle").val(),c=60-a.length;a.length>0&&c>=0?b("#socialWarfare .nc_ogTitleWrapper .swp_CountDown").removeClass("swp_red").addClass("swp_blue"):a.length>0&&c<0?b("#socialWarfare .nc_ogTitleWrapper .swp_CountDown").removeClass("swp_blue").addClass("swp_red"):b("#socialWarfare .nc_ogTitleWrapper .swp_CountDown").removeClass("swp_blue").removeClass("swp_red"),b("#socialWarfare .nc_ogTitleWrapper .counterNumber").html(c)}function e(){var a=b("#socialWarfare textarea#nc_ogDescription").val(),c=160-a.length;a.length>0&&c>=0?b("#socialWarfare .nc_ogDescriptionWrapper .swp_CountDown").removeClass("swp_red").addClass("swp_blue"):a.length>0&&c<0?b("#socialWarfare .nc_ogDescriptionWrapper .swp_CountDown").removeClass("swp_blue").addClass("swp_red"):b("#socialWarfare .nc_ogDescriptionWrapper .swp_CountDown").removeClass("swp_blue").removeClass("swp_red"),b("#socialWarfare .nc_ogDescriptionWrapper .counterNumber").html(c)}function f(){var a,c=b("#socialWarfare textarea#nc_customTweet").val(),d=b("#socialWarfare .twitterIDWrapper label").html();c.indexOf("http")>-1||c.indexOf("https")>-1?(a=0,b(".tweetLinkSection").css({"text-decoration":"line-through"})):(a=23,b(".tweetLinkSection").css({"text-decoration":"none"}));var e;e="undefined"==typeof d?140-socialWarfareAdmin.linkLength(c)-a:140-socialWarfareAdmin.linkLength(c)-d.length-a-6,c.length>0&&e>=0?b("#socialWarfare .nc_customTweetWrapper .swp_CountDown").removeClass("swp_red").addClass("swp_blue"):c.length>0&&e<0?b("#socialWarfare .nc_customTweetWrapper .swp_CountDown").removeClass("swp_blue").addClass("swp_red"):b("#socialWarfare .nc_customTweetWrapper .swp_CountDown").removeClass("swp_blue").removeClass("swp_red"),b("#socialWarfare .nc_customTweetWrapper .counterNumber").html(e)}socialWarfareAdmin.linkLength=function(a){for(var b="",c=0;c<23;c++)b+="o";return a.replace(/(http:\/\/[\S]*)/g,b).length},b(document).ready(function(){if(b("#socialWarfare.postbox").length){b("#socialWarfare #nc_ogTitle").parent().prepend('<div class="swp_CountDown"><span class="counterNumber">60</span> '+swp_localize_admin.swp_characters_remaining+"</div>"),b("#socialWarfare #nc_ogDescription").parent().prepend('<div class="swp_CountDown"><span class="counterNumber">150</span> '+swp_localize_admin.swp_characters_remaining+"</div>"),b("#socialWarfare #nc_customTweet").parent().prepend('<div class="swp_CountDown"><span class="counterNumber">118</span> '+swp_localize_admin.swp_characters_remaining+"</div>"),d(),b("#socialWarfare textarea#nc_ogTitle").on("input",function(){d()}),e(),b("#socialWarfare textarea#nc_ogDescription").on("input",function(){e()}),f(),b("#socialWarfare textarea#nc_customTweet").on("input",function(){f()});setInterval(function(){var a,c,d=b(".nc_ogImageWrapper ul.swpmb-media-list"),e=b(".nc_pinterestImageWrapper ul.swpmb-media-list");d.length&&d.is(":empty")?(a=d.width(),c=a*(9/16),d.css({height:c+"px"})):(c=d.find("img").height(),d.css({height:c+"px"}));var f,g;e.length&&e.is(":empty")?(f=e.width(),g=1.5*f,e.css({height:g+"px"})):(g=e.find("img").height(),e.css({height:g+"px"}))},1e3)}if(b(".swp_popular_post_options .showCount select").on("change",function(){var a=b(this).val();(a=!0)?b(".swp_popular_post_options .countLabel").slideDown("slow"):b(".swp_popular_post_options .countLabel").slideUp("slow")}),b(".swp_popular_post_options .thumbnails select").on("change",function(){var a=b(this).val();(a=!0)?b(".swp_popular_post_options .thumb_size").slideDown("slow"):b(".swp_popular_post_options .thumb_size").slideUp("slow")}),b(".swp_popular_post_options .style select").on("change",function(){var a=b(this).val();(a="custom")?b(".swp_popular_post_options .custom_bg, .swp_popular_post_options .custom_link").slideDown("slow"):b(".swp_popular_post_options .custom_bg, .swp_popular_post_options .custom_link").slideUp("slow")}),b(".postbox#socialWarfare").length){var a=b("#socialWarfare .registrationWrapper input").attr("id");"false"==a&&(b(".postbox#socialWarfare").css({position:"relative",opacity:"0.3"}).append('<div class="sw-premium-blocker"></div>'),b("#socialWarfare .sw-premium-blocker").tooltip({items:"#socialWarfare .sw-premium-blocker",content:"<i></i>Unlock these features by registering your license.",position:{my:"center top",at:"center top"},tooltipClass:"sw-admin-hover-notice",open:function(a,c){if("undefined"==typeof a.originalEvent)return!1;var d=b(c.tooltip).attr("id");b("div.ui-tooltip").not("#"+d).remove()},close:function(a,c){c.tooltip.hover(function(){b(this).stop(!0).fadeTo(400,1)},function(){b(this).fadeOut("400",function(){b(this).remove()})})}}))}})}(this,jQuery);
js/script.js ADDED
@@ -0,0 +1,625 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* global swpPinIt */
2
+
3
+ /*!
4
+ * jQuery throttle / debounce - v1.1 - 3/7/2010
5
+ * http://benalman.com/projects/jquery-throttle-debounce-plugin/
6
+ *
7
+ * Copyright (c) 2010 "Cowboy" Ben Alman
8
+ * Dual licensed under the MIT and GPL licenses.
9
+ * http://benalman.com/about/license/
10
+ */
11
+
12
+ var socialWarfarePlugin = socialWarfarePlugin || {};
13
+
14
+ (function( window, undefined ) {
15
+ // Internal method reference.
16
+ var jqThrottle;
17
+
18
+ var swp = window.socialWarfarePlugin;
19
+
20
+ swp.throttle = jqThrottle = function( delay, noTrailing, callback, debounceMode ) {
21
+ // After wrapper has stopped being called, this timeout ensures that
22
+ // `callback` is executed at the proper times in `throttle` and `end`
23
+ // debounce modes.
24
+ var timeoutID,
25
+
26
+ // Keep track of the last time `callback` was executed.
27
+ lastExec = 0;
28
+
29
+ // `noTrailing` defaults to falsy.
30
+ if ( typeof noTrailing !== 'boolean' ) {
31
+ debounceMode = callback;
32
+ callback = noTrailing;
33
+ noTrailing = undefined;
34
+ }
35
+
36
+ // The `wrapper` function encapsulates all of the throttling / debouncing
37
+ // functionality and when executed will limit the rate at which `callback`
38
+ // is executed.
39
+ function wrapper() {
40
+ var that = this,
41
+ elapsed = +new Date() - lastExec,
42
+ args = arguments;
43
+
44
+ // Execute `callback` and update the `lastExec` timestamp.
45
+ function exec() {
46
+ lastExec = +new Date();
47
+ callback.apply( that, args );
48
+ }
49
+
50
+ // If `debounceMode` is true (atBegin) this is used to clear the flag
51
+ // to allow future `callback` executions.
52
+ function clear() {
53
+ timeoutID = undefined;
54
+ }
55
+
56
+ if ( debounceMode && ! timeoutID ) {
57
+ // Since `wrapper` is being called for the first time and
58
+ // `debounceMode` is true (atBegin), execute `callback`.
59
+ exec();
60
+ }
61
+
62
+ // Clear any existing timeout.
63
+ timeoutID && clearTimeout( timeoutID );
64
+
65
+ if ( debounceMode === undefined && elapsed > delay ) {
66
+ // In throttle mode, if `delay` time has been exceeded, execute
67
+ // `callback`.
68
+ exec();
69
+ } else if ( noTrailing !== true ) {
70
+ // In trailing throttle mode, since `delay` time has not been
71
+ // exceeded, schedule `callback` to execute `delay` ms after most
72
+ // recent execution.
73
+ //
74
+ // If `debounceMode` is true (atBegin), schedule `clear` to execute
75
+ // after `delay` ms.
76
+ //
77
+ // If `debounceMode` is false (at end), schedule `callback` to
78
+ // execute after `delay` ms.
79
+ timeoutID = setTimeout( debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay );
80
+ }
81
+ }
82
+
83
+ // Set the guid of `wrapper` function to the same of original callback, so
84
+ // it can be removed in jQuery 1.4+ .unbind or .die by using the original
85
+ // callback as a reference.
86
+ if ( swp.guid ) {
87
+ wrapper.guid = callback.guid = callback.guid || swp.guid++;
88
+ }
89
+
90
+ // Return the wrapper function.
91
+ return wrapper;
92
+ };
93
+
94
+ swp.debounce = function( delay, atBegin, callback ) {
95
+ return callback === undefined ? jqThrottle( delay, atBegin, false ) : jqThrottle( delay, callback, atBegin !== false );
96
+ };
97
+ })( this );
98
+
99
+ (function( window, $, undefined ) {
100
+ 'use strict';
101
+
102
+ var swp = window.socialWarfarePlugin;
103
+
104
+ function absint( $int ) {
105
+ return parseInt( $int, 10 );
106
+ }
107
+
108
+ function swp_trigger_events(event) {
109
+ var evt = $.Event(event);
110
+ $(window).trigger(evt);
111
+ }
112
+
113
+ /****************************************************************************
114
+
115
+ Fetch and Store Facebook Counts
116
+
117
+ ****************************************************************************/
118
+ var swpPostData = {};
119
+ socialWarfarePlugin.fetchShares = function() {
120
+ /**
121
+ * Run all the API calls
122
+ */
123
+ $.when(
124
+ $.get('https://graph.facebook.com/?id=' + swp_post_url) ,
125
+ $.get('https://graph.facebook.com/?id=' + swp_post_url + '&fields=og_object{likes.summary(true),comments.summary(true)}') ,
126
+ ( swp_post_recovery_url ? $.get('https://graph.facebook.com/?id=' + swp_post_recovery_url) : ''),
127
+ ( swp_post_recovery_url ? $.get('https://graph.facebook.com/?id=' + swp_post_recovery_url + '&fields=og_object{likes.summary(true),comments.summary(true)}') : '')
128
+ )
129
+ .then( function(a, b, c, d) {
130
+ /**
131
+ * Parse the responses, add up the activity, send the results to admin_ajax
132
+ */
133
+ if( 'undefined' !== typeof a[0].share && 'undefined' !== typeof b[0].og_object ) {
134
+ var f1 = absint( a[0].share.share_count);
135
+ var f2 = absint( b[0].og_object.likes.summary.total_count );
136
+ var f3 = absint( b[0].og_object.comments.summary.total_count );
137
+ var fShares = f1 + f2 + f3;
138
+ if(swp_post_recovery_url) {
139
+ if (typeof c[0].share !== 'undefined') {
140
+ var f4 = absint( c[0].share.share_count);
141
+ } else {
142
+ var f4 = 0;
143
+ }
144
+ if (typeof d[0].og_object !== 'undefined') {
145
+ var f5 = absint( d[0].og_object.likes.summary.total_count );
146
+ var f6 = absint( d[0].og_object.comments.summary.total_count );
147
+ } else {
148
+ var f5 = 0, f6 = 0;
149
+ }
150
+ var fShares2 = f4 + f5 + f6;
151
+ if (fShares !== fShares2) {
152
+ fShares = fShares + fShares2;
153
+ }
154
+ }
155
+ swpPostData = {
156
+ action: 'swp_facebook_shares_update',
157
+ post_id: swp_post_id,
158
+ activity: fShares
159
+ };
160
+
161
+ $.post( swp_admin_ajax, swpPostData, function( response ) {
162
+ console.log( 'Facebook Shares Response: ' + response );
163
+ });
164
+ }
165
+ });
166
+ }
167
+
168
+ /**
169
+ * Activate Hover States: Trigger the resizes to the proper widths for the expansion on hover effect
170
+ * @since 2.1.0
171
+ * @param none
172
+ * @return none
173
+ */
174
+ swp.activateHoverStates = function() {
175
+ swp_trigger_events('pre_activate_buttons');
176
+ $('.nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer:not(.swp_nohover)').on('mouseenter',function(){
177
+ swpRestoreSizes();
178
+ var term_width = $(this).find('.swp_share').outerWidth();
179
+ var icon_width = $(this).find('i.sw').outerWidth();
180
+ var container_width = $(this).width();
181
+ var percentage_change = 1 + ((term_width + 35) / container_width);
182
+ $(this).find('.iconFiller').width(term_width + icon_width + 25 + 'px');
183
+ $(this).css({flex:percentage_change + ' 1 0%'});
184
+ });
185
+ $('.nc_socialPanel:not(.nc_socialPanelSide)').on('mouseleave',function() {
186
+ swpRestoreSizes();
187
+ });
188
+ }
189
+ function swpRestoreSizes() {
190
+ $('.nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer:not(.swp_nohover) .iconFiller').removeAttr('style');
191
+ $('.nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer:not(.swp_nohover)').removeAttr('style');
192
+ }
193
+ function createFloatBar() {
194
+ //if ( ! $( '.nc_socialPanelSide' ).length ) {
195
+ if( $( '.nc_wrapper' ).length ) {
196
+ $( '.nc_wrapper' ).remove();
197
+ }
198
+ var firstSocialPanel = $( '.nc_socialPanel' ).not( '[data-float="float_ignore"]' ).first();
199
+ var index = $( '.nc_socialPanel' ).index( firstSocialPanel );
200
+ var floatOption = firstSocialPanel.attr( 'data-float' );
201
+ var alignment = firstSocialPanel.attr( 'data-align' );
202
+ if ( floatOption ) {
203
+ var backgroundColor = $( '.nc_socialPanel' ).attr( 'data-floatColor' );
204
+ $( '<div class="nc_wrapper" style="background-color:' + backgroundColor + '"></div>' ).appendTo( 'body' );
205
+ var position = firstSocialPanel.attr( 'data-float' );
206
+ firstSocialPanel.clone().appendTo( '.nc_wrapper' );
207
+ $( '.nc_wrapper' ).hide().addClass( (position == 'floatLeft' ? 'floatBottom' : position) );
208
+ var width = firstSocialPanel.outerWidth( true );
209
+ var offset = firstSocialPanel.offset();
210
+ $( '.nc_socialPanel' ).last().addClass( 'nc_floater' ).css({
211
+ width: width,
212
+ left: ( alignment == 'center' ? 0 : offset.left )
213
+ });
214
+ $( '.nc_socialPanel .swp_count' ).css({ transition: 'padding .1s linear' });
215
+ $( '.nc_socialPanel' ).eq( 0 ).addClass( 'swp_one' );
216
+ $( '.nc_socialPanel' ).eq( 2 ).addClass( 'swp_two' );
217
+ $( '.nc_socialPanel' ).eq( 1 ).addClass( 'swp_three' );
218
+ }
219
+ //}
220
+ }
221
+
222
+ function floatingBarReveal() {
223
+ // Adjust the floating bar
224
+ var panels = $( '.nc_socialPanel' );
225
+ var floatOption = panels.not( '[data-float="float_ignore"]' ).eq( 0 ).attr( 'data-float' );
226
+ var windowElement = $( window );
227
+ var windowHeight = windowElement.height();
228
+ var ncWrapper = $( '.nc_wrapper' );
229
+ var ncSideFloater = $( '.nc_socialPanelSide' ).filter( ':not(.mobile)' );
230
+ var position = $( '.nc_socialPanel' ).attr( 'data-position' );
231
+ var minWidth = ncSideFloater.attr( 'data-screen-width' );
232
+ var offsetOne = panels.eq( 0 ).offset();
233
+ var scrollPos = windowElement.scrollTop();
234
+ var st = $( window ).scrollTop();
235
+ if ( typeof window.swpOffsets == 'undefined' ) {
236
+ window.swpOffsets = {};
237
+ }
238
+
239
+ var visible = false;
240
+ if ( floatOption == 'floatLeft' ) {
241
+ var floatLeftMobile = $( '.nc_socialPanelSide' ).attr( 'data-mobileFloat' );
242
+ if ( $( '.nc_socialPanel' ).not( '.nc_socialPanelSide' ).length ) {
243
+ $( '.nc_socialPanel' ).not( '.nc_socialPanelSide, .nc_floater' ).each(function() {
244
+ var thisOffset = $( this ).offset();
245
+ var thisHeight = $( this ).height();
246
+ if ( thisOffset.top + thisHeight > scrollPos && thisOffset.top < scrollPos + windowHeight ) {
247
+ visible = true;
248
+ }
249
+ });
250
+ if ( offsetOne.left < 100 || $( window ).width() < minWidth ) {
251
+ visible = true;
252
+ if ( floatLeftMobile == 'bottom' ) {
253
+ floatOption = 'floatBottom';
254
+ }
255
+ } else if (visible) {
256
+ visible == true;
257
+ } else {
258
+ visible = false;
259
+ }
260
+ } else {
261
+ if ( $( window ).width() > minWidth ) {
262
+ visible = false;
263
+ } else {
264
+ visible = true;
265
+ if(floatLeftMobile == 'bottom') {
266
+ floatOption = 'floatBottom';
267
+ }
268
+ }
269
+ }
270
+
271
+ var transition = ncSideFloater.attr( 'data-transition' );
272
+ if ( transition == 'slide' ) {
273
+ if ( visible == true ) {
274
+ ncSideFloater.css({ left: '-100px' }, 200 );
275
+ } else {
276
+ ncSideFloater.css({ left: '5px' });
277
+ }
278
+ } else if ( transition == 'fade' ) {
279
+ if ( visible == true ) {
280
+ ncSideFloater.fadeOut( 200 );
281
+ } else {
282
+ ncSideFloater.fadeIn( 200 );
283
+ }
284
+ }
285
+ }
286
+ if ( floatOption == 'floatBottom' || floatOption == 'floatTop' ) {
287
+ visible = false;
288
+ $( '.nc_socialPanel' ).not( '.nc_socialPanelSide, .nc_floater' ).each(function() {
289
+ var thisOffset = $( this ).offset();
290
+ var thisHeight = $( this ).height();
291
+ if ( thisOffset.top + thisHeight > scrollPos && thisOffset.top < scrollPos + windowHeight ) {
292
+ visible = true;
293
+ }
294
+ });
295
+ if ( visible ) {
296
+ // Hide the Floating bar
297
+ ncWrapper.hide();
298
+
299
+ // Add some padding to the page so it fits nicely at the top or bottom
300
+ if ( floatOption == 'floatBottom' ) {
301
+ $( 'body' ).animate({ 'padding-bottom': window.bodyPaddingBottom + 'px' }, 0 );
302
+ } else if ( floatOption == 'floatTop' ) {
303
+ $( 'body' ).animate({ 'padding-top': window.bodyPaddingTop + 'px' }, 0 );
304
+ }
305
+ } else {
306
+ var newPadding, firstOffset;
307
+ // Show the floating bar
308
+ ncWrapper.show();
309
+ swp_trigger_events('floating_bar_revealed');
310
+
311
+ // Add some padding to the page so it fits nicely at the top or bottom
312
+ if ( floatOption == 'floatBottom' ) {
313
+ newPadding = window.bodyPaddingBottom + 50;
314
+ $( 'body' ).animate({ 'padding-bottom': newPadding + 'px' }, 0 );
315
+ } else if ( floatOption == 'floatTop' ) {
316
+ firstOffset = $( '.nc_socialPanel' ).not( '.nc_socialPanelSide, .nc_wrapper .nc_socialPanel' ).first().offset();
317
+ if ( firstOffset.top > scrollPos + windowHeight ) {
318
+ newPadding = window.bodyPaddingTop + 50;
319
+ $( 'body' ).animate({ 'padding-top': newPadding + 'px' }, 0 );
320
+ }
321
+ }
322
+ }
323
+ }
324
+ }
325
+
326
+ function initShareButtons() {
327
+ if ( 0 !== $( '.nc_socialPanel' ).length ) {
328
+ createFloatBar();
329
+ swp.activateHoverStates();
330
+ handleWindowOpens();
331
+ $( window ).scrollTop();
332
+ $( window ).scroll( swp.throttle( 50, function() {
333
+ floatingBarReveal();
334
+ }));
335
+ $( window ).trigger( 'scroll' );
336
+ $( '.nc_socialPanel' ).css( {'opacity':1} );
337
+ }
338
+ }
339
+
340
+ /****************************************************************************
341
+
342
+ Pin It Hover Effect
343
+
344
+ ****************************************************************************/
345
+
346
+ function pinitButton() {
347
+ var defaults = {
348
+ wrap: '<div class="sw-pinit" />',
349
+ pageURL: document.URL
350
+ };
351
+
352
+ var options = $.extend( defaults, options );
353
+
354
+ // Iterate over the current set of matched elements.
355
+ $( '.swp-content-locator' ).parent().find( 'img' ).each( function() {
356
+ var $image = $( this );
357
+
358
+ if ( $image.outerHeight() < swpPinIt.minHeight || $image.outerWidth() < swpPinIt.minWidth ) {
359
+ return;
360
+ }
361
+
362
+ var pinMedia = false;
363
+
364
+ if ( $image.data( 'media' ) ) {
365
+ pinMedia = $image.data( 'media' );
366
+ } else if ( $(this).attr('data-lazy-src') ) {
367
+ pinMedia = $(this).attr('data-lazy-src');
368
+ } else if ( $image[0].src ) {
369
+ pinMedia = $image[0].src;
370
+ }
371
+
372
+ // Bail if we don't have any media to pin.
373
+ if ( false === pinMedia ) {
374
+ return;
375
+ } else if ( $(this).hasClass('no_pin')) {
376
+ return;
377
+ }
378
+
379
+ var pinDesc = '';
380
+
381
+ if ( $image.attr( 'title' ) ) {
382
+ pinDesc = $image.attr( 'title' );
383
+ } else if ( $image.attr( 'alt' ) ) {
384
+ pinDesc = $image.attr( 'alt' );
385
+ }
386
+
387
+ var bookmark = 'http://pinterest.com/pin/create/bookmarklet/?media=' + encodeURI( pinMedia ) + '&url=' + encodeURI( options.pageURL ) + '&is_video=false' + '&description=' + pinDesc;
388
+ var imageClasses = $image.attr( 'class' );
389
+ var imageStyle = $image.attr( 'style' );
390
+
391
+ $image.removeClass().attr( 'style', '' ).wrap( options.wrap );
392
+
393
+ $image.after( '<a href="' + bookmark + '" class="sw-pinit-button sw-pinit-' + swpPinIt.vLocation + ' sw-pinit-' + swpPinIt.hLocation + '">Save</a>' );
394
+
395
+ $image.parent( '.sw-pinit' ).addClass( imageClasses ).attr( 'style', imageStyle );
396
+
397
+ $( '.sw-pinit .sw-pinit-button' ).on( 'click', function() {
398
+ window.open( $( this ).attr( 'href' ), 'Pinterest', 'width=632,height=253,status=0,toolbar=0,menubar=0,location=1,scrollbars=1' );
399
+ return false;
400
+ });
401
+ });
402
+ }
403
+
404
+ function handleWindowOpens() {
405
+ $( '.nc_tweet, a.swp_CTT' ).off( 'click' );
406
+ $( '.nc_tweet, a.swp_CTT' ).on( 'click', function( event ) {
407
+ if ( $( this ).hasClass( 'noPop' ) ) {
408
+ return false;
409
+ }
410
+
411
+ console.log($(this));
412
+
413
+ if( $( this ).attr( 'data-link' ) ) {
414
+ event.preventDefault ? event.preventDefault() : ( event.returnValue = false );
415
+
416
+ var href = $( this ).attr( 'data-link' );
417
+ console.log(href);
418
+ var height, width, instance;
419
+
420
+ href = href.replace( '’', '\'' );
421
+
422
+ if ( $( this ).hasClass( 'pinterest' ) || $( this ).hasClass( 'buffer_link' ) || $( this ).hasClass( 'flipboard' ) ) {
423
+ height = 550;
424
+ width = 775;
425
+ } else {
426
+ height = 270;
427
+ width = 500;
428
+ }
429
+
430
+ instance = window.open( href, '_blank', 'height=' + height + ',width=' + width );
431
+
432
+ if (typeof ga == "function" && true === swpClickTracking) {
433
+ var network = $(this).parents(".nc_tweetContainer").attr("data-network");
434
+ console.log(network + " Button Clicked");
435
+ ga("send", "event", "social_media", "swp_" + network + "_share" );
436
+ }
437
+
438
+ return false;
439
+ }
440
+ });
441
+ }
442
+
443
+ $( window ).on('load' , function() {
444
+ if ( 'undefined' !== typeof swpPinIt && swpPinIt.enabled ) {
445
+ pinitButton();
446
+ }
447
+ });
448
+
449
+ $( document ).ready( function() {
450
+ handleWindowOpens();
451
+ initShareButtons();
452
+
453
+ // Fetch the padding amount to make space later for the floating bars
454
+ window.bodyPaddingTop = absint( $( 'body' ).css( 'padding-top' ).replace( 'px', '' ) );
455
+ window.bodyPaddingBottom = absint( $( 'body' ).css( 'padding-bottom' ).replace( 'px', '' ) );
456
+
457
+ var swp_hover = false;
458
+ $( '.nc_socialPanel' ).hover(
459
+ function () {
460
+ swp_hover = true;
461
+ },
462
+ function () {
463
+ swp_hover = false;
464
+ }
465
+ );
466
+ $( window ).resize( swp.debounce( 250, function() {
467
+ if ( $( '.nc_socialPanel' ).length && false !== swp_hover ) { } else {
468
+ window.swpAdjust = 1;
469
+ initShareButtons();
470
+ }
471
+ }));
472
+
473
+ // $( window ).trigger( 'resize' );
474
+
475
+ $( document.body ).on( 'post-load', function() {
476
+ initShareButtons();
477
+ });
478
+
479
+ if ( 0 !== $( '.nc_socialPanelSide' ).length ) {
480
+ var buttonsHeight = $( '.nc_socialPanelSide' ).height();
481
+ var windowHeight = $( window ).height();
482
+ var newPosition = absint( ( windowHeight / 2 ) - ( buttonsHeight / 2 ) );
483
+ setTimeout( function() {
484
+ $( '.nc_socialPanelSide' ).animate({ top: newPosition }, 0 );
485
+ }, 105 );
486
+ }
487
+
488
+ if( swp_isMobile.phone ) {
489
+ $('.swp_whatsapp').addClass('mobile');
490
+ }
491
+
492
+ // Hide empty containers
493
+ if( 1 === $('.swp-content-locator').parent().children().length ) {
494
+ $('.swp-content-locator').parent().hide();
495
+ }
496
+
497
+ });
498
+ })( this, jQuery );
499
+
500
+ (function (global) {
501
+
502
+ var apple_phone = /iPhone/i,
503
+ apple_ipod = /iPod/i,
504
+ apple_tablet = /iPad/i,
505
+ android_phone = /(?=.*\bAndroid\b)(?=.*\bMobile\b)/i, // Match 'Android' AND 'Mobile'
506
+ android_tablet = /Android/i,
507
+ amazon_phone = /(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,
508
+ amazon_tablet = /(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,
509
+ windows_phone = /Windows Phone/i,
510
+ windows_tablet = /(?=.*\bWindows\b)(?=.*\bARM\b)/i, // Match 'Windows' AND 'ARM'
511
+ other_blackberry = /BlackBerry/i,
512
+ other_blackberry_10 = /BB10/i,
513
+ other_opera = /Opera Mini/i,
514
+ other_chrome = /(CriOS|Chrome)(?=.*\bMobile\b)/i,
515
+ other_firefox = /(?=.*\bFirefox\b)(?=.*\bMobile\b)/i, // Match 'Firefox' AND 'Mobile'
516
+ seven_inch = new RegExp(
517
+ '(?:' + // Non-capturing group
518
+
519
+ 'Nexus 7' + // Nexus 7
520
+
521
+ '|' + // OR
522
+
523
+ 'BNTV250' + // B&N Nook Tablet 7 inch
524
+
525
+ '|' + // OR
526
+
527
+ 'Kindle Fire' + // Kindle Fire
528
+
529
+ '|' + // OR
530
+
531
+ 'Silk' + // Kindle Fire, Silk Accelerated
532
+
533
+ '|' + // OR
534
+
535
+ 'GT-P1000' + // Galaxy Tab 7 inch
536
+
537
+ ')', // End non-capturing group
538
+
539
+ 'i'); // Case-insensitive matching
540
+
541
+ var match = function(regex, userAgent) {
542
+ return regex.test(userAgent);
543
+ };
544
+
545
+ var IsMobileClass = function(userAgent) {
546
+ var ua = userAgent || navigator.userAgent;
547
+
548
+ // Facebook mobile app's integrated browser adds a bunch of strings that
549
+ // match everything. Strip it out if it exists.
550
+ var tmp = ua.split('[FBAN');
551
+ if (typeof tmp[1] !== 'undefined') {
552
+ ua = tmp[0];
553
+ }
554
+
555
+ // Twitter mobile app's integrated browser on iPad adds a "Twitter for
556
+ // iPhone" string. Same probable happens on other tablet platforms.
557
+ // This will confuse detection so strip it out if it exists.
558
+ tmp = ua.split('Twitter');
559
+ if (typeof tmp[1] !== 'undefined') {
560
+ ua = tmp[0];
561
+ }
562
+
563
+ this.apple = {
564
+ phone: match(apple_phone, ua),
565
+ ipod: match(apple_ipod, ua),
566
+ tablet: !match(apple_phone, ua) && match(apple_tablet, ua),
567
+ device: match(apple_phone, ua) || match(apple_ipod, ua) || match(apple_tablet, ua)
568
+ };
569
+ this.amazon = {
570
+ phone: match(amazon_phone, ua),
571
+ tablet: !match(amazon_phone, ua) && match(amazon_tablet, ua),
572
+ device: match(amazon_phone, ua) || match(amazon_tablet, ua)
573
+ };
574
+ this.android = {
575
+ phone: match(amazon_phone, ua) || match(android_phone, ua),
576
+ tablet: !match(amazon_phone, ua) && !match(android_phone, ua) && (match(amazon_tablet, ua) || match(android_tablet, ua)),
577
+ device: match(amazon_phone, ua) || match(amazon_tablet, ua) || match(android_phone, ua) || match(android_tablet, ua)
578
+ };
579
+ this.windows = {
580
+ phone: match(windows_phone, ua),
581
+ tablet: match(windows_tablet, ua),
582
+ device: match(windows_phone, ua) || match(windows_tablet, ua)
583
+ };
584
+ this.other = {
585
+ blackberry: match(other_blackberry, ua),
586
+ blackberry10: match(other_blackberry_10, ua),
587
+ opera: match(other_opera, ua),
588
+ firefox: match(other_firefox, ua),
589
+ chrome: match(other_chrome, ua),
590
+ device: match(other_blackberry, ua) || match(other_blackberry_10, ua) || match(other_opera, ua) || match(other_firefox, ua) || match(other_chrome, ua)
591
+ };
592
+ this.seven_inch = match(seven_inch, ua);
593
+ this.any = this.apple.device || this.android.device || this.windows.device || this.other.device || this.seven_inch;
594
+
595
+ // excludes 'other' devices and ipods, targeting touchscreen phones
596
+ this.phone = this.apple.phone || this.android.phone || this.windows.phone;
597
+
598
+ // excludes 7 inch devices, classifying as phone or tablet is left to the user
599
+ this.tablet = this.apple.tablet || this.android.tablet || this.windows.tablet;
600
+
601
+ if (typeof window === 'undefined') {
602
+ return this;
603
+ }
604
+ };
605
+
606
+ var instantiate = function() {
607
+ var IM = new IsMobileClass();
608
+ IM.Class = IsMobileClass;
609
+ return IM;
610
+ };
611
+
612
+ if (typeof module !== 'undefined' && module.exports && typeof window === 'undefined') {
613
+ //node
614
+ module.exports = IsMobileClass;
615
+ } else if (typeof module !== 'undefined' && module.exports && typeof window !== 'undefined') {
616
+ //browserify
617
+ module.exports = instantiate();
618
+ } else if (typeof define === 'function' && define.amd) {
619
+ //AMD
620
+ define('swp_isMobile', [], global.swp_isMobile = instantiate());
621
+ } else {
622
+ global.swp_isMobile = instantiate();
623
+ }
624
+
625
+ })(this);
js/script.min.js ADDED
@@ -0,0 +1 @@
 
1
+ var socialWarfarePlugin=socialWarfarePlugin||{};!function(a,b){var c,d=a.socialWarfarePlugin;d.throttle=c=function(a,c,e,f){function g(){function d(){i=+new Date,e.apply(j,l)}function g(){h=b}var j=this,k=+new Date-i,l=arguments;f&&!h&&d(),h&&clearTimeout(h),f===b&&k>a?d():c!==!0&&(h=setTimeout(f?g:d,f===b?a-k:a))}var h,i=0;return"boolean"!=typeof c&&(f=e,e=c,c=b),d.guid&&(g.guid=e.guid=e.guid||d.guid++),g},d.debounce=function(a,d,e){return e===b?c(a,d,!1):c(a,e,d!==!1)}}(this),function(a,b,c){"use strict";function d(a){return parseInt(a,10)}function e(c){var d=b.Event(c);b(a).trigger(d)}function f(){b(".nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer:not(.swp_nohover) .iconFiller").removeAttr("style"),b(".nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer:not(.swp_nohover)").removeAttr("style")}function g(){b(".nc_wrapper").length&&b(".nc_wrapper").remove();var a=b(".nc_socialPanel").not('[data-float="float_ignore"]').first(),c=(b(".nc_socialPanel").index(a),a.attr("data-float")),d=a.attr("data-align");if(c){var e=b(".nc_socialPanel").attr("data-floatColor");b('<div class="nc_wrapper" style="background-color:'+e+'"></div>').appendTo("body");var f=a.attr("data-float");a.clone().appendTo(".nc_wrapper"),b(".nc_wrapper").hide().addClass("floatLeft"==f?"floatBottom":f);var g=a.outerWidth(!0),h=a.offset();b(".nc_socialPanel").last().addClass("nc_floater").css({width:g,left:"center"==d?0:h.left}),b(".nc_socialPanel .swp_count").css({transition:"padding .1s linear"}),b(".nc_socialPanel").eq(0).addClass("swp_one"),b(".nc_socialPanel").eq(2).addClass("swp_two"),b(".nc_socialPanel").eq(1).addClass("swp_three")}}function h(){var c=b(".nc_socialPanel"),d=c.not('[data-float="float_ignore"]').eq(0).attr("data-float"),f=b(a),g=f.height(),h=b(".nc_wrapper"),i=b(".nc_socialPanelSide").filter(":not(.mobile)"),j=(b(".nc_socialPanel").attr("data-position"),i.attr("data-screen-width")),k=c.eq(0).offset(),l=f.scrollTop();b(a).scrollTop();"undefined"==typeof a.swpOffsets&&(a.swpOffsets={});var m=!1;if("floatLeft"==d){var n=b(".nc_socialPanelSide").attr("data-mobileFloat");b(".nc_socialPanel").not(".nc_socialPanelSide").length?(b(".nc_socialPanel").not(".nc_socialPanelSide, .nc_floater").each(function(){var a=b(this).offset(),c=b(this).height();a.top+c>l&&a.top<l+g&&(m=!0)}),k.left<100||b(a).width()<j?(m=!0,"bottom"==n&&(d="floatBottom")):m||(m=!1)):b(a).width()>j?m=!1:(m=!0,"bottom"==n&&(d="floatBottom"));var o=i.attr("data-transition");"slide"==o?1==m?i.css({left:"-100px"},200):i.css({left:"5px"}):"fade"==o&&(1==m?i.fadeOut(200):i.fadeIn(200))}if("floatBottom"==d||"floatTop"==d)if(m=!1,b(".nc_socialPanel").not(".nc_socialPanelSide, .nc_floater").each(function(){var a=b(this).offset(),c=b(this).height();a.top+c>l&&a.top<l+g&&(m=!0)}),m)h.hide(),"floatBottom"==d?b("body").animate({"padding-bottom":a.bodyPaddingBottom+"px"},0):"floatTop"==d&&b("body").animate({"padding-top":a.bodyPaddingTop+"px"},0);else{var p,q;h.show(),e("floating_bar_revealed"),"floatBottom"==d?(p=a.bodyPaddingBottom+50,b("body").animate({"padding-bottom":p+"px"},0)):"floatTop"==d&&(q=b(".nc_socialPanel").not(".nc_socialPanelSide, .nc_wrapper .nc_socialPanel").first().offset(),q.top>l+g&&(p=a.bodyPaddingTop+50,b("body").animate({"padding-top":p+"px"},0)))}}function i(){0!==b(".nc_socialPanel").length&&(g(),l.activateHoverStates(),k(),b(a).scrollTop(),b(a).scroll(l.throttle(50,function(){h()})),b(a).trigger("scroll"),b(".nc_socialPanel").css({opacity:1}))}function j(){var c={wrap:'<div class="sw-pinit" />',pageURL:document.URL},d=b.extend(c,d);b(".swp-content-locator").parent().find("img").each(function(){var c=b(this);if(!(c.outerHeight()<swpPinIt.minHeight||c.outerWidth()<swpPinIt.minWidth)){var e=!1;if(c.data("media")?e=c.data("media"):b(this).attr("data-lazy-src")?e=b(this).attr("data-lazy-src"):c[0].src&&(e=c[0].src),!1!==e&&!b(this).hasClass("no_pin")){var f="";c.attr("title")?f=c.attr("title"):c.attr("alt")&&(f=c.attr("alt"));var g="http://pinterest.com/pin/create/bookmarklet/?media="+encodeURI(e)+"&url="+encodeURI(d.pageURL)+"&is_video=false&description="+f,h=c.attr("class"),i=c.attr("style");c.removeClass().attr("style","").wrap(d.wrap),c.after('<a href="'+g+'" class="sw-pinit-button sw-pinit-'+swpPinIt.vLocation+" sw-pinit-"+swpPinIt.hLocation+'">Save</a>'),c.parent(".sw-pinit").addClass(h).attr("style",i),b(".sw-pinit .sw-pinit-button").on("click",function(){return a.open(b(this).attr("href"),"Pinterest","width=632,height=253,status=0,toolbar=0,menubar=0,location=1,scrollbars=1"),!1})}}})}function k(){b(".nc_tweet, a.swp_CTT").off("click"),b(".nc_tweet, a.swp_CTT").on("click",function(c){if(b(this).hasClass("noPop"))return!1;if(console.log(b(this)),b(this).attr("data-link")){c.preventDefault?c.preventDefault():c.returnValue=!1;var d=b(this).attr("data-link");console.log(d);var e,f,g;if(d=d.replace("’","'"),b(this).hasClass("pinterest")||b(this).hasClass("buffer_link")||b(this).hasClass("flipboard")?(e=550,f=775):(e=270,f=500),g=a.open(d,"_blank","height="+e+",width="+f),"function"==typeof ga&&!0===swpClickTracking){var h=b(this).parents(".nc_tweetContainer").attr("data-network");console.log(h+" Button Clicked"),ga("send","event","social_media","swp_"+h+"_share")}return!1}})}var l=a.socialWarfarePlugin,m={};socialWarfarePlugin.fetchShares=function(){b.when(b.get("https://graph.facebook.com/?id="+swp_post_url),b.get("https://graph.facebook.com/?id="+swp_post_url+"&fields=og_object{likes.summary(true),comments.summary(true)}"),swp_post_recovery_url?b.get("https://graph.facebook.com/?id="+swp_post_recovery_url):"",swp_post_recovery_url?b.get("https://graph.facebook.com/?id="+swp_post_recovery_url+"&fields=og_object{likes.summary(true),comments.summary(true)}"):"").then(function(a,c,e,f){if("undefined"!=typeof a[0].share&&"undefined"!=typeof c[0].og_object){var g=d(a[0].share.share_count),h=d(c[0].og_object.likes.summary.total_count),i=d(c[0].og_object.comments.summary.total_count),j=g+h+i;if(swp_post_recovery_url){if("undefined"!=typeof e[0].share)var k=d(e[0].share.share_count);else var k=0;if("undefined"!=typeof f[0].og_object)var l=d(f[0].og_object.likes.summary.total_count),n=d(f[0].og_object.comments.summary.total_count);else var l=0,n=0;var o=k+l+n;j!==o&&(j+=o)}m={action:"swp_facebook_shares_update",post_id:swp_post_id,activity:j},b.post(swp_admin_ajax,m,function(a){console.log("Facebook Shares Response: "+a)})}})},l.activateHoverStates=function(){e("pre_activate_buttons"),b(".nc_socialPanel:not(.nc_socialPanelSide) .nc_tweetContainer:not(.swp_nohover)").on("mouseenter",function(){f();var a=b(this).find(".swp_share").outerWidth(),c=b(this).find("i.sw").outerWidth(),d=b(this).width(),e=1+(a+35)/d;b(this).find(".iconFiller").width(a+c+25+"px"),b(this).css({flex:e+" 1 0%"})}),b(".nc_socialPanel:not(.nc_socialPanelSide)").on("mouseleave",function(){f()})},b(a).on("load",function(){"undefined"!=typeof swpPinIt&&swpPinIt.enabled&&j()}),b(document).ready(function(){k(),i(),a.bodyPaddingTop=d(b("body").css("padding-top").replace("px","")),a.bodyPaddingBottom=d(b("body").css("padding-bottom").replace("px",""));var c=!1;if(b(".nc_socialPanel").hover(function(){c=!0},function(){c=!1}),b(a).resize(l.debounce(250,function(){b(".nc_socialPanel").length&&!1!==c||(a.swpAdjust=1,i())})),b(document.body).on("post-load",function(){i()}),0!==b(".nc_socialPanelSide").length){var e=b(".nc_socialPanelSide").height(),f=b(a).height(),g=d(f/2-e/2);setTimeout(function(){b(".nc_socialPanelSide").animate({top:g},0)},105)}swp_isMobile.phone&&b(".swp_whatsapp").addClass("mobile"),1===b(".swp-content-locator").parent().children().length&&b(".swp-content-locator").parent().hide()})}(this,jQuery),function(a){var b=/iPhone/i,c=/iPod/i,d=/iPad/i,e=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,f=/Android/i,g=/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,h=/(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,i=/Windows Phone/i,j=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,k=/BlackBerry/i,l=/BB10/i,m=/Opera Mini/i,n=/(CriOS|Chrome)(?=.*\bMobile\b)/i,o=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,p=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),q=function(a,b){return a.test(b)},r=function(a){var r=a||navigator.userAgent,s=r.split("[FBAN");if("undefined"!=typeof s[1]&&(r=s[0]),s=r.split("Twitter"),"undefined"!=typeof s[1]&&(r=s[0]),this.apple={phone:q(b,r),ipod:q(c,r),tablet:!q(b,r)&&q(d,r),device:q(b,r)||q(c,r)||q(d,r)},this.amazon={phone:q(g,r),tablet:!q(g,r)&&q(h,r),device:q(g,r)||q(h,r)},this.android={phone:q(g,r)||q(e,r),tablet:!q(g,r)&&!q(e,r)&&(q(h,r)||q(f,r)),device:q(g,r)||q(h,r)||q(e,r)||q(f,r)},this.windows={phone:q(i,r),tablet:q(j,r),device:q(i,r)||q(j,r)},this.other={blackberry:q(k,r),blackberry10:q(l,r),opera:q(m,r),firefox:q(o,r),chrome:q(n,r),device:q(k,r)||q(l,r)||q(m,r)||q(o,r)||q(n,r)},this.seven_inch=q(p,r),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},s=function(){var a=new r;return a.Class=r,a};"undefined"!=typeof module&&module.exports&&"undefined"==typeof window?module.exports=r:"undefined"!=typeof module&&module.exports&&"undefined"!=typeof window?module.exports=s():"function"==typeof define&&define.amd?define("swp_isMobile",[],a.swp_isMobile=s()):a.swp_isMobile=s()}(this);
js/sw-shortcode-generator.js ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function() {
2
+ tinymce.PluginManager.add( 'swp_shortcode_generator', function( editor, url ) {
3
+ editor.addButton( 'swp_shortcode_generator', {
4
+ title: 'Social Warfare Buttons',
5
+ icon: 'sw sw sw-social-warfare',
6
+ onclick: function() {
7
+ editor.windowManager.open( {
8
+ title: 'Insert Social Warfare Buttons',
9
+ body: [
10
+ {
11
+ type: 'listbox',
12
+ name: 'reflection',
13
+ label: 'Should the buttons reflect this post or another one?',
14
+ values: [
15
+ { text: 'This Post', value: 'default' },
16
+ { text: 'A Different Post', value: 'alt' }
17
+ ],
18
+ onselect: function( v ) {
19
+ if ( this.value() == 'alt' ) {
20
+ jQuery( '.mce-postid' ).parent().parent().slideDown();
21
+ } else {
22
+ jQuery( '.mce-postid' ).parent().parent().slideUp();
23
+ }
24
+ }
25
+ },
26
+ {
27
+ type: 'textbox',
28
+ multiline: false,
29
+ name: 'postID',
30
+ classes: 'postid',
31
+ label: 'The ID of the post or page to reflect:'
32
+ },
33
+ {
34
+ type: 'textbox',
35
+ multiline: false,
36
+ name: 'buttons',
37
+ classes: 'buttons',
38
+ label: 'Buttons to Include:'
39
+ },
40
+ {
41
+ type: 'label',
42
+ name: 'someHelpText',
43
+ onPostRender: function() {
44
+ this.getEl().innerHTML =
45
+ '<span style="float:right;">Comma separated list of social network (e.g. "Facebook,Twitter,Total"). Leave blank to use site-wide defaults.</span>';
46
+ },
47
+ text: ''
48
+ }
49
+ ],
50
+ onPostRender: function() {
51
+ jQuery( '.mce-postid' ).parent().parent().slideUp();
52
+ jQuery( '.mce-title' ).prepend( '<i class="sw sw-social-warfare"></i>' );
53
+ },
54
+ onsubmit: function( e ) {
55
+ // Check if this is supposed to refelct a different post_id
56
+ if ( e.data.reflection == 'alt' && e.data.postID != '' ) {
57
+ var post_information = ' post_id="' + e.data.postID + '"';
58
+ } else {
59
+ var post_information = '';
60
+ }
61
+ // Check if this is a custom set of buttons
62
+ if ( e.data.buttons != '' ) {
63
+ var button_set = ' buttons="' + e.data.buttons + '"';
64
+ } else {
65
+ var button_set = '';
66
+ }
67
+ editor.insertContent( '[social_warfare' + post_information + '' + button_set + ']' );
68
+ }
69
+ });
70
+ }
71
+ });
72
+ });
73
+ })();
js/sw-shortcode-generator.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(){tinymce.PluginManager.add("swp_shortcode_generator",function(a,b){a.addButton("swp_shortcode_generator",{title:"Social Warfare Buttons",icon:"sw sw sw-social-warfare",onclick:function(){a.windowManager.open({title:"Insert Social Warfare Buttons",body:[{type:"listbox",name:"reflection",label:"Should the buttons reflect this post or another one?",values:[{text:"This Post",value:"default"},{text:"A Different Post",value:"alt"}],onselect:function(a){"alt"==this.value()?jQuery(".mce-postid").parent().parent().slideDown():jQuery(".mce-postid").parent().parent().slideUp()}},{type:"textbox",multiline:!1,name:"postID",classes:"postid",label:"The ID of the post or page to reflect:"},{type:"textbox",multiline:!1,name:"buttons",classes:"buttons",label:"Buttons to Include:"},{type:"label",name:"someHelpText",onPostRender:function(){this.getEl().innerHTML='<span style="float:right;">Comma separated list of social network (e.g. "Facebook,Twitter,Total"). Leave blank to use site-wide defaults.</span>'},text:""}],onPostRender:function(){jQuery(".mce-postid").parent().parent().slideUp(),jQuery(".mce-title").prepend('<i class="sw sw-social-warfare"></i>')},onsubmit:function(b){if("alt"==b.data.reflection&&""!=b.data.postID)var c=' post_id="'+b.data.postID+'"';else var c="";if(""!=b.data.buttons)var d=' buttons="'+b.data.buttons+'"';else var d="";a.insertContent("[social_warfare"+c+d+"]")}})}})})}();
languages/social-warfare-el.mo ADDED
Binary file
languages/social-warfare.pot ADDED
@@ -0,0 +1,433 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2017 Warfare Plugins
2
+ # This file is distributed under the same license as the Social Warfare package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Social Warfare 2.2.1\n"
6
+ "Report-Msgid-Bugs-To: https://warfareplugins.com/\n"
7
+ "POT-Creation-Date: 2017-02-21 19:11:21+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=utf-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: Warfare Plugins (https://warfareplugins.com)\n"
13
+ "Language-Team: Warfare Plugins (https://warfareplugins.com)\n"
14
+ "X-Generator: grunt-wp-i18n 0.5.4\n"
15
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
16
+ "X-Poedit-Basepath: .\n"
17
+ "X-Poedit-Language: English\n"
18
+ "X-Poedit-Country: UNITED STATES\n"
19
+ "X-Poedit-SourceCharset: utf-8\n"
20
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_ "
21
+ "noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1"
22
+ ",2;\n"
23
+ "X-Textdomain-Support: yes\n"
24
+
25
+ #: functions/admin/misc.php:21
26
+ msgid "Settings"
27
+ msgstr ""
28
+
29
+ #: functions/admin/options-page.php:242
30
+ msgid "Active"
31
+ msgstr ""
32
+
33
+ #: functions/admin/options-page.php:275
34
+ msgid "Inactive"
35
+ msgstr ""
36
+
37
+ #: functions/admin/options-page.php:334 functions/admin/options-page.php:346
38
+ #: functions/admin/options-page.php:369 functions/admin/options-page.php:387
39
+ #: functions/admin/options-page.php:667
40
+ msgid "ON"
41
+ msgstr ""
42
+
43
+ #: functions/admin/options-page.php:334 functions/admin/options-page.php:346
44
+ #: functions/admin/options-page.php:369 functions/admin/options-page.php:387
45
+ #: functions/admin/options-page.php:667
46
+ msgid "OFF"
47
+ msgstr ""
48
+
49
+ #: functions/admin/options-page.php:611
50
+ msgid "Connected"
51
+ msgstr ""
52
+
53
+ #: functions/admin/options-page.php:613
54
+ msgid "Authenticated"
55
+ msgstr ""
56
+
57
+ #: functions/admin/options-page.php:652
58
+ msgid "Tweet Count Registration"
59
+ msgstr ""
60
+
61
+ #: functions/admin/options-page.php:658
62
+ msgid ""
63
+ "In order to allow Social Warfare to track tweet counts, we've partnered "
64
+ "with NewShareCounts.com. Follow the steps below to register with "
65
+ "NewShareCounts and allow us to track your Twitter shares."
66
+ msgstr ""
67
+
68
+ #: functions/admin/options-page.php:659
69
+ msgid "Click here to visit NewShareCounts.com"
70
+ msgstr ""
71
+
72
+ #: functions/admin/options-page.php:659
73
+ msgid ""
74
+ "Step 2: At NewShareCounts.com, Enter your domain and click the \"Sign In "
75
+ "With Twitter\" button."
76
+ msgstr ""
77
+
78
+ #: functions/admin/options-page.php:659
79
+ msgid "Step 3: Flip the switch below to \"ON\" and then save changes."
80
+ msgstr ""
81
+
82
+ #: functions/admin/options-page.php:761
83
+ msgid ""
84
+ "Need help? Check out our <a href=\"https://warfareplugins.com/support/\" "
85
+ "target=\"_blank\">Knowledgebase."
86
+ msgstr ""
87
+
88
+ #: functions/admin/options-page.php:762
89
+ msgid ""
90
+ "Opening a support ticket? Copy your System Status by clicking the button "
91
+ "below."
92
+ msgstr ""
93
+
94
+ #: functions/admin/options-page.php:763
95
+ msgid "Get System Status"
96
+ msgstr ""
97
+
98
+ #: functions/admin/options-page.php:768
99
+ msgid "Press Ctrl+C to Copy this information."
100
+ msgstr ""
101
+
102
+ #: functions/admin/options-page.php:790
103
+ msgid "Security failed."
104
+ msgstr ""
105
+
106
+ #: functions/admin/options-page.php:797
107
+ msgid "No settings to save."
108
+ msgstr ""
109
+
110
+ #: functions/buttons-floating.php:72 functions/buttons-standard.php:229
111
+ #: functions/buttons-standard.php:261 functions/buttons-standard.php:265
112
+ msgid "Shares"
113
+ msgstr ""
114
+
115
+ #: functions/click-to-tweet/clickToTweet.php:117
116
+ msgid "Click To Tweet"
117
+ msgstr ""
118
+
119
+ #: functions/options-array.php:28
120
+ msgid "Display"
121
+ msgstr ""
122
+
123
+ #: functions/options-array.php:34
124
+ msgid "Social Networks"
125
+ msgstr ""
126
+
127
+ #: functions/options-array.php:38
128
+ msgid "Drag & Drop to activate and order your share buttons."
129
+ msgstr ""
130
+
131
+ #: functions/options-array.php:61
132
+ msgid "Share Counts"
133
+ msgstr ""
134
+
135
+ #: functions/options-array.php:65
136
+ msgid "Use the toggles below to determine how to display your social proof."
137
+ msgstr ""
138
+
139
+ #: functions/options-array.php:70
140
+ msgid "Button Counts"
141
+ msgstr ""
142
+
143
+ #: functions/options-array.php:77 functions/options-array.php:166
144
+ msgid "Total Counts"
145
+ msgstr ""
146
+
147
+ #: functions/options-array.php:86
148
+ msgid "Position Share Buttons"
149
+ msgstr ""
150
+
151
+ #: functions/options-array.php:90
152
+ msgid ""
153
+ "The options below will allow you to customize the positioning of share "
154
+ "buttons for each post type."
155
+ msgstr ""
156
+
157
+ #: functions/options-array.php:95
158
+ msgid "Post Type"
159
+ msgstr ""
160
+
161
+ #: functions/options-array.php:96
162
+ msgid "Static Buttons"
163
+ msgstr ""
164
+
165
+ #: functions/options-array.php:97
166
+ msgid "Floating Buttons (If Activated)"
167
+ msgstr ""
168
+
169
+ #: functions/options-array.php:103
170
+ msgid "Above the Content"
171
+ msgstr ""
172
+
173
+ #: functions/options-array.php:104
174
+ msgid "Below the Content"
175
+ msgstr ""
176
+
177
+ #: functions/options-array.php:105
178
+ msgid "Both Above and Below the Content"
179
+ msgstr ""
180
+
181
+ #: functions/options-array.php:106
182
+ msgid "None/Manual Placement"
183
+ msgstr ""
184
+
185
+ #: functions/options-array.php:123
186
+ msgid "On"
187
+ msgstr ""
188
+
189
+ #: functions/options-array.php:124
190
+ msgid "Off"
191
+ msgstr ""
192
+
193
+ #: functions/options-array.php:134
194
+ msgid "Home Page"
195
+ msgstr ""
196
+
197
+ #: functions/options-array.php:142
198
+ msgid "Archive & Categories"
199
+ msgstr ""
200
+
201
+ #: functions/options-array.php:160
202
+ msgid "Styles"
203
+ msgstr ""
204
+
205
+ #: functions/options-array.php:170
206
+ msgid "Customize how the \"Total Shares\" section of your share buttons look."
207
+ msgstr ""
208
+
209
+ #: functions/options-array.php:174
210
+ msgid "Decimal Places"
211
+ msgstr ""
212
+
213
+ #: functions/options-array.php:177
214
+ msgid "Zero"
215
+ msgstr ""
216
+
217
+ #: functions/options-array.php:178
218
+ msgid "One"
219
+ msgstr ""
220
+
221
+ #: functions/options-array.php:179
222
+ msgid "Two"
223
+ msgstr ""
224
+
225
+ #: functions/options-array.php:186
226
+ msgid "Decimal Separator"
227
+ msgstr ""
228
+
229
+ #: functions/options-array.php:188
230
+ msgid "Period"
231
+ msgstr ""
232
+
233
+ #: functions/options-array.php:189
234
+ msgid "Comma"
235
+ msgstr ""
236
+
237
+ #: functions/options-array.php:196
238
+ msgid "Alignment"
239
+ msgstr ""
240
+
241
+ #: functions/options-array.php:198
242
+ msgid "Right"
243
+ msgstr ""
244
+
245
+ #: functions/options-array.php:199
246
+ msgid "Left"
247
+ msgstr ""
248
+
249
+ #: functions/options-array.php:208
250
+ msgid "Floating Share Buttons"
251
+ msgstr ""
252
+
253
+ #: functions/options-array.php:209
254
+ msgid "If you would like to activate floating share buttons, turn this on."
255
+ msgstr ""
256
+
257
+ #: functions/options-array.php:215
258
+ msgid "Float Position"
259
+ msgstr ""
260
+
261
+ #: functions/options-array.php:217
262
+ msgid "Top of the Page"
263
+ msgstr ""
264
+
265
+ #: functions/options-array.php:218
266
+ msgid "Bottom of the Page"
267
+ msgstr ""
268
+
269
+ #: functions/options-array.php:219
270
+ msgid "On the left side of the page"
271
+ msgstr ""
272
+
273
+ #: functions/options-array.php:228
274
+ msgid "Minimum Screen Width"
275
+ msgstr ""
276
+
277
+ #: functions/options-array.php:236
278
+ msgid "Transition"
279
+ msgstr ""
280
+
281
+ #: functions/options-array.php:238
282
+ msgid "Slide In / Slide Out"
283
+ msgstr ""
284
+
285
+ #: functions/options-array.php:239
286
+ msgid "Fade In / Fade Out"
287
+ msgstr ""
288
+
289
+ #: functions/options-array.php:248
290
+ msgid "Background Color"
291
+ msgstr ""
292
+
293
+ #: functions/options-array.php:271
294
+ msgid "Social Identity"
295
+ msgstr ""
296
+
297
+ #: functions/options-array.php:276
298
+ msgid "Sitewide Identity"
299
+ msgstr ""
300
+
301
+ #: functions/options-array.php:280
302
+ msgid ""
303
+ "If you would like to set sitewide defaults for your social identity, add "
304
+ "them below."
305
+ msgstr ""
306
+
307
+ #: functions/options-array.php:285
308
+ msgid "Twitter Username"
309
+ msgstr ""
310
+
311
+ #: functions/options-array.php:290
312
+ msgid "Pinterest Username"
313
+ msgstr ""
314
+
315
+ #: functions/options-array.php:295
316
+ msgid "Facebook Page URL"
317
+ msgstr ""
318
+
319
+ #: functions/options-array.php:300
320
+ msgid "Facebook App ID"
321
+ msgstr ""
322
+
323
+ #: functions/options-array.php:322
324
+ msgid "Advanced"
325
+ msgstr ""
326
+
327
+ #: functions/options-array.php:327
328
+ msgid "Frame Buster"
329
+ msgstr ""
330
+
331
+ #: functions/options-array.php:328
332
+ msgid "If you want to stop content pirates from framing your content, turn this on."
333
+ msgstr ""
334
+
335
+ #: functions/options-array.php:335
336
+ msgid "Caching Method"
337
+ msgstr ""
338
+
339
+ #: functions/options-array.php:339
340
+ msgid ""
341
+ "If you have advanced knowledge of caching configurations, you may want to "
342
+ "choose your own below."
343
+ msgstr ""
344
+
345
+ #: functions/options-array.php:344
346
+ msgid "Cache Rebuild Method"
347
+ msgstr ""
348
+
349
+ #: functions/options-array.php:346
350
+ msgid "Advanced Cache Triggering"
351
+ msgstr ""
352
+
353
+ #: functions/options-array.php:347
354
+ msgid "Legacy Cache Rebuilding during Page Loads"
355
+ msgstr ""
356
+
357
+ #: functions/options-array.php:355
358
+ msgid "Full Content vs. Excerpts"
359
+ msgstr ""
360
+
361
+ #: functions/options-array.php:359
362
+ msgid ""
363
+ "If your theme does not use excerpts, but instead displays the full post "
364
+ "content on archive, category, and home pages, activate this toggle to allow "
365
+ "the buttons to appear in those areas."
366
+ msgstr ""
367
+
368
+ #: functions/options-array.php:364
369
+ msgid "Full Content?"
370
+ msgstr ""
371
+
372
+ #: functions/scripts.php:105
373
+ msgid "Characters Remaining"
374
+ msgstr ""
375
+
376
+ #: functions/social-networks/facebook.php:116
377
+ #: functions/social-networks/facebook.php:120
378
+ #: functions/social-networks/linkedIn.php:92
379
+ #: functions/social-networks/linkedIn.php:96
380
+ msgid "Share"
381
+ msgstr ""
382
+
383
+ #: functions/social-networks/googlePlus.php:91
384
+ #: functions/social-networks/googlePlus.php:95
385
+ msgid "+1"
386
+ msgstr ""
387
+
388
+ #: functions/social-networks/pinterest.php:135
389
+ #: functions/social-networks/pinterest.php:139
390
+ msgid "Pin"
391
+ msgstr ""
392
+
393
+ #: functions/social-networks/stumbleupon.php:100
394
+ #: functions/social-networks/stumbleupon.php:104
395
+ msgid "Stumble"
396
+ msgstr ""
397
+
398
+ #: functions/social-networks/twitter.php:155
399
+ #: functions/social-networks/twitter.php:159
400
+ msgid "Tweet"
401
+ msgstr ""
402
+
403
+ #: functions/utility.php:333
404
+ msgid ""
405
+ "<b>Important:</b> We’ve made <a "
406
+ "href=\"https://warfareplugins.com/social-warfare-2-2/\" "
407
+ "target=\"_blank\">some changes</a> to how your Social Warfare premium "
408
+ "license is applied. In order to continue getting all the Pro features you "
409
+ "love, please <a "
410
+ "href=\"https://warfareplugins.com/updates/social-warfare-pro/social-warfare-"
411
+ "pro.zip\">download the Social Warfare - Pro</a> plugin. Once installed, all "
412
+ "of your premium features will be immediately restored."
413
+ msgstr ""
414
+
415
+ #. Plugin Name of the plugin/theme
416
+ msgid "Social Warfare"
417
+ msgstr ""
418
+
419
+ #. Author URI of the plugin/theme
420
+ msgid "http://warfareplugins.com"
421
+ msgstr ""
422
+
423
+ #. Description of the plugin/theme
424
+ msgid ""
425
+ "A plugin to maximize social shares and drive more traffic using the fastest "
426
+ "and most intelligent share buttons on the market, calls to action via "
427
+ "in-post click-to-tweets, popular posts widgets based on share popularity, "
428
+ "link-shortening, Google Analytics and much, much more!"
429
+ msgstr ""
430
+
431
+ #. Author of the plugin/theme
432
+ msgid "Warfare Plugins"
433
+ msgstr ""
meta-box/css/autocomplete.css DELETED
@@ -1,14 +0,0 @@
1
- .rwmb-autocomplete-result {
2
- border-bottom: 1px solid #ccc;
3
- padding: 1em 0;
4
- overflow: hidden;
5
- }
6
- .rwmb-autocomplete-result .label {
7
- float: left;
8
- width: 90%;
9
- }
10
- .rwmb-autocomplete-result .actions {
11
- width: 10%;
12
- float: right;
13
- cursor: pointer;
14
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/checkbox.css DELETED
@@ -1,4 +0,0 @@
1
- .rwmb-checkbox-wrapper .description {
2
- display: inline;
3
- font-style: normal;
4
- }
 
 
 
 
meta-box/css/color.css DELETED
@@ -1,7 +0,0 @@
1
- .rwmb-color-wrapper .wp-picker-container {
2
- position: relative;
3
- }
4
- .rwmb-color-wrapper .wp-picker-holder {
5
- position: absolute;
6
- z-index: 9;
7
- }
 
 
 
 
 
 
 
meta-box/css/datepicker.css DELETED
@@ -1,231 +0,0 @@
1
- /* Fix empty block below admin footer (issue #24) */
2
- #ui-datepicker-div {
3
- display: none;
4
- z-index: 9 !important;
5
- }
6
-
7
- /* Style for multiple months */
8
- .ui-datepicker-multi .ui-datepicker-group {
9
- padding: 0 .5%;
10
- box-sizing: border-box;
11
- }
12
- .ui-datepicker-multi .ui-datepicker-group .ui-datepicker-calendar {
13
- width: 100%;
14
- }
15
-
16
- /* Date Picker Default Styles */
17
- .ui-datepicker {
18
- padding: 0;
19
- border: 1px solid #ddd;
20
- -webkit-border-radius: 0;
21
- -moz-border-radius: 0;
22
- border-radius: 0;
23
- }
24
- .ui-datepicker * {
25
- padding: 0;
26
- font-family: "Open Sans", sans-serif;
27
- -webkit-border-radius: 0;
28
- -moz-border-radius: 0;
29
- border-radius: 0;
30
- }
31
- .ui-datepicker table {
32
- font-size: 13px;
33
- margin: 0;
34
- }
35
- .ui-datepicker .ui-datepicker-header,
36
- .ui-timepicker-div .ui-widget-header{
37
- border: none;
38
- background: #23282d;
39
- color: #fff;
40
- font-weight: normal;
41
- }
42
- .ui-datepicker .ui-datepicker-header .ui-state-hover {
43
- background: #23282d;
44
- border-color: transparent;
45
- cursor: pointer;
46
- -webkit-border-radius: 0;
47
- -moz-border-radius: 0;
48
- border-radius: 0;
49
- }
50
- .ui-datepicker thead {
51
- background: #23282d;
52
- color: #fff;
53
- }
54
- .ui-datepicker .ui-datepicker-title {
55
- margin-top: .4em;
56
- margin-bottom: .3em;
57
- color: #fff;
58
- font-size: 14px;
59
- }
60
- .ui-datepicker .ui-datepicker-prev-hover,
61
- .ui-datepicker .ui-datepicker-next-hover,
62
- .ui-datepicker .ui-datepicker-next,
63
- .ui-datepicker .ui-datepicker-prev {
64
- height: 1em;
65
- top: .9em;
66
- border: none;
67
- }
68
- .ui-datepicker .ui-datepicker-prev-hover {
69
- left: 2px;
70
- }
71
- .ui-datepicker .ui-datepicker-next-hover {
72
- right: 2px;
73
- }
74
- .ui-datepicker .ui-datepicker-next span,
75
- .ui-datepicker .ui-datepicker-prev span {
76
- background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAADwCAQAAABFnnJAAAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAAAEgAAABIAEbJaz4AABe4SURBVHja7V1diCXHdf56vbZmVl6nxwKFO2yyq1mM4qAwM7oDsR6C7iYIKesH3V1QHgyBu5YYJwHjrB9NQCuByIthHbAga6TZxeBgHMJKISZ+SDIb1oQgRtoVgtjGyD8PmSGQMIpfJmCLk4f+q6o+daq6+965P1VfM3Pv7VN16ud8Vd1dp6o6IUSEjBPTzkDEdBEJEDgiAXT0QOhNOxPHiUgAFT3sA9gPiQLjJsD0208Pbe9rM/OvwkaBQvP0yzhG6ASQO0AqDwmu9mOPT3nqPWsYV9qFEduVIDP/QU4BSfMC9REqAcbRAa520FDELdphc3SJCyRIcADgAAkSQXOXMs4ckrIxFEUs2oENBNSqR0WmJ2kVv2hltvRdaVPHvPtqdpVxjlD1AHIH6AupDbovH1nqkgllLd3apnQJUjV362dmDEnjOya5FUltsEqqbdtxa5Dbppx3uQ+sNLv6mblCcwLIoKlXTQ/7rQkmX4IKzdMv4xgxbgLMO3rYXyTzuhEJEDjiSGDgiAQIHJEAgSMSIHBEAgSOSIDAEQkQOOJ8ADPutPN/zGgyH8BvRoDLGdMT5wPIKbjN02U+gNsdnuV9oUjSbD6AnwdMrkK7gVYt3311u8zv0r5vfNq1L8xsgPp8gAz20fAilORvs8tdsX3mA0i5k1N3x5dBue7icyGgzwfgvus48OoF+DDu9ukzH0Bqf355s9OHnLMNmqQ0F2jjDJIcrrM+H0Ail6v/KUoe3cECpl85XecDTDv/x4zoDg4ccSAocEQCBI5IgMARCRA4IgECRyRA4IgECBwnp52BmQNNcZS/+1hp4/yf7BZ9IpUwzRyQMwftXUHumFMouX4JIED09fvsD0AtJE3RNg1X/jPTJ6IWNznaxvYrgU+oBnFPaAFcxU88CmCPn3hUkE8RSHD2+OQvEWT6Z7M0Com7BuQSygQiR2zA1Yi1/KuXAN/i22bruCspGUMHT6In0nUV7ZIDKmMnrFRNnUulaF72PJAgl3VXpZObgZrLBGh6E0gerccVyoed7dq4n3ETD+2SgXz0tq0BqQn66HbXQU3e5DGw6uJ8QvEyuQt0M1jW4epi/bpoVwtype5zE9kWboq75VoOTHdw6E8B851+i8fIOB8gcMSRwMARCRA4IgECRyRA4IgECByRAIEjEiBw6ItDi81Spwf3fuCThE8N+HhE28VzrY32TaURKgIUC6N8tntvVwHjQztdrpz71YC01Wzljes1jp35KYvDXoZe6xogI5cA+MWh8hJOH492jzk3PgrYdPltDWHPv18N2NLoGctre41iVyVw9UDdlqbXFujqQ8E+26m7lmDbFoj6zaRx58Cmx72FuzvnfhvS8z63umkTQ+5aWF4Zh1ufSJpm2WFsc1gn9TBNCeBfAUmDuH45kKvQJ3332n57+q7YLgK460A2oJsAMoEsBGj2FFBVQBuPVaLo4LWT9iml3wZVvtveQ0ipr+bS4grO7yAgpV/E5O8BXJqrvRuk9c1mLhvOB5AqQL+BkYovZ04qoqRDLZp72hdnAjcBpRIcGBtIHDTW4AfJvAfla2/8commlwA/XzU5t4iQr4JdYvtVL18Ov2tw9yltkp72L7Vx3wOwiPMBVPScb0xaOEQCBI44FBw4IgECRyRA4IgECByRAIEjEmDcmLPHKnM+gAuSv8qn6L2O/u5Jo3vuEsdg94yVvT4fQILkMfcZJSw8dqseC0zt6Lq4Sl4enjiXv7oNbIsvaZ8SqoEgNVvu3X7rg43q0sh2b//2HWgGJI+dK3ZiDaeetXk7pcWj5CX1L+mxgL8HsE06kP1V1aWhzaSFrOW4p03Z9zAg+Pr6kgZnuXS59N0rm2cS5vsCqips+gZu8xKSNIhbSP2WQLsXb7ffQkIyo6uH8Ncs7RFwzKh6ANVR2CZrrjcJuJ2tXa+OidKD8D2E/smFGE8r5lLQe48ZMb9+CTgoM8V14FkHn0334nEgzgfw8fa7t4eQUc0F4KdUyFVfXYTsu4sUIZOGUjVE2wk1EwHvDSRrB+7jLLXdBI7D2eo3a7HtjabPTSQAB0Fnxrg+iO5gHTPTNR8XIgECRxwKDhyRAIEjEiBwRAIEjkiAwDF7BEhny1u26DAJ4OfLllw25CW1hUhxeCxP4tPeB2Fm0Gy7eJ/tpBOsdMjPIQqSpGK4tlvWV1igN4B3gU4AeZRaHu0uWnWKQ5YCVA6U8mv3sq5/pQxxaIlffGu3qbra+/i9an7BURFA3+69jsofbtsyPUGSm/8DNi25a8+6/g+wIqydLVLn09dnFJha/LaPCA7FULDf6nYJxVwbm/nNuThmL+L6LZ2tS8xw5vYR0lvOg4I6JSxB3Uwm7FMZ/CZE2CeVmQSyTcngc+jaPkEn+IK9Ar4LqhdGqFVm32DE/dYL39dK2OQZBah2H1E4gvld+fX8+Lw2IgIAtz+A38r1ul/evUONJM1uHuUQurbE61wB9w5CgcL/hRH6rNjq+7hhv4voBv/tI4LCrM0HmJT5IyyYNQJEHDNmzxcQcayIBAgckQCBIxIgcCwSAfqlJ6A/Ef0nsZQfzd63OtPICDDMK24Xw9aaXnZ4+l0g3NBmCzQ1Yh975fc9Nna/Ez1O4ld4FEc4wqP4FUuBvjP3a7l0zZKGXe6KCTxnHHIKxtwOoqs0oAENSUUVtjo/JFgOKj+3tbhqCF57doyor8lHmrRPJvqN5HoOudytGfHXDPkSrRPREi0R0TotCTXAp1GHVEP+EjXEtncZyxAFk+8BAO5YJnPcxpdxD0CK2+W5O7hgZeMXLCOKy+W3o5rsJr4htL89ZBtLZNgHYU9LYQ9bSg8AbBlyN95Xcpfl0Ix/H8t4EEAf942wej6BLUbim5suL5+XsYb3y++lpoIA9/NPdRqGmuV7AH6EI3G2z1L+ecMa4qNC7Ct4D9uC/JLmSr6kUDHD2woFtvC2ISWoizP5FYYfxS/K759g8/AgPoEEp4RcXhRkpkeSl/MvoE4YLc0IXpj/D/DP6unqWnboUPAjHNXC6FnICLAiaLO1G8DVAwBvlRQgXMJbTIiCAnXzZ0iNz3rufl3M6Qb+G38I4B+xwcZ/GygpxOdgK++p9N7qOFCY/4+wrFPA936WM3+9AgG5o8razk9ZmasHKCgAi/mRpw7rTd5549PEEn6efzvLSB/Eu9jAfQAbeBcP4f8MuTkLqe0yU3dH7wrxOfxN7Vxm/i/gQQD/AADFBdz/MbBufrOAp3AKp7CMU9ZO8gE8gAcAcC3spsP8QA9v4RIu4S3LdM4+DjDEEAct7/OX8Vv5sVzLXw9nQPgFNrCBEyCcEaeUblmMf075s2EJLrhCfIs5l5H+Bj6G7wAALuBOJmj/RFsv4rIzzg+FkK4eoIcDIG/7B0z19zU5R4HfMD7NKspayQayOyK9n3gY9wH8pPx9HxvCjKIuHfxRxxD8hNmf5OXL7s9K86N8DEwdj1HuR5iXNfnL1scV+2PMjQk+BhYPSdWnLRd95hGQe4hzPeg1fQwGjayl9wmhlpDXXzwEDtSzs+MO7gP4HeX3e5YbqcmCAJxXWvr4tWeYztSUNbyvtX7E+QDBY5F8AREtEAkQOCIBAkckQOCIBFgsvIJXmkXQCZCC4FqYbQeVjoyujxZ9cB71LeXxte5vGxqPvUNDvm3IuUEn1Vu+NgE5APylo34GGLSut9P4Cr6C045QI4wwKn8pdZISUZ/6RJTWBhF2aSkfRrhG6zRkh0Fu5AMR23TDkMuebPPos+G3FE82EdEWOxBSHPX47oGcLMw6rdP6hORFmGxQx5QMqBiQS83hmtw6RNuEvHQpo/suERHdFWu3GEwa0TkCQU+gn4+h1dUT9RqNg3FyENGf5X9XrRXUp2wCSt+iH5YUXAYmAv07ge4R6N+InzJBtJ5L1gU5RPlpWqLTFnlR/SMaNa7BAtusfLsWe5tNf0hEI0qrkUTVHVw4Kfew1WqjFnWuAO85fAL7+DF+gJ/jPYtPsI89XMIbVpduF/wTfhffwwa+hyfwL9ZQ2Vj6hijXxyx1/LLmJ6wwwk0AyP/X6+9Q+8WDn21x1uMMAHwJwEp+eUzxAcoe4IYxmt6nG417ALWDs/UAV4noL4joFbaF9InY1j+uHuBvCfRdAn2Llpj0H3X0AIUcotzeA4y03JmXgIGS6wyDRuX7qib7KlOD5+hcPXUziX5OhHr1j4MAn6HfpM/R+fyvifn1WXE2AqRElFKaXy9N+XeI6Nv539/V5EX5bNfwSv64Q87Hr6692XG+IQFMd10q1JDsatLOmwrUT122RENCyaEBE0ImQN1f18T8ZvFkAvDys/Rdeph26WH6e/q0IV+t5W5trPLK/LAeuolTUW6T3s1vBE35iIpr/25bAsBxUJ6N1DM8b+C+Vb5lVDD3FJCWRecJYidghsccuesih8P8Pi73ggIpI3uKPsxv/LbpQ3qKIcBVGtXj+ibvNqh+H8rfg0qTlmXzmxTYqkld07plORFRz2GcLvKR0/yux8CKAqkl9nPl9+dqsa09kK87eB3v+gWM6IgBoHvsx4QRAOCWeTrOBwgc0RcQOCIBAkckQOCIBAgc4REgcxsPGMmgfDZ61EOPbTfFOburVgmwXlbAemt9NLUqSEHYyb/vwDar4Vq+qHS3RoHfxy4u4zI+hU/hh/h0LWZWO1fzX9mepeq+55v4LAhP4AkQPovNWnx5+4ph7cF+6JC7QgxraRgjQObZdSLapSEN6ZAqpwc34CENZpAzRPtjlOdrnR1UybBDoB1rLorhkHPsUNep8vgYOxa6Q8M8B5meAZO+fRyv8FKklmEw+UwVO7XoycYa+7k3B0z51BjrxXc1QDZKvENEh1YjTpMAxVgWn0Zh9uqzruGaONZ5gj5CCSX0ETrBGmRIIKJB6dPncicTQPWHmCuXMm9Iv6zjOgGgzaKoEyDTul2OyXIEOEOr+cEQYJhX4w4748dFAHJWgdu4cvx1Rcb1UDuKnDN/KuonSspjjUn9eh5rlx9SpWz3kOLgCWBPn8oZV7wGKn2cQwKdYwkAhQB8n7JOm7RZ+isZAuzkVcdP+XIxXA7RTMoTyOVTk1p/NeMpw8CQf5uI1vKD6DqjYVC6bLn0iU53IsBD+dmHyv9m7KL/GhLROUsPYK+/PhGdoTO0Smdok4iuZefV9wV8gBQ38fn8FknecR9OubSbuFvKpbBe7mOSrdE38U38cfn9+/g9TZYqM56AK/UxcazjS8qvl/EzIfWslszyrwD4EADwS2aDGcKKNs/KfMHFI9p5ws8MuT5f6Ca+bMzayrbwzybL7jHb+RMeB/BfAID/VGpX62APaUhD2qXZvAksWh+fxjfL1p/hrhG3n7f71Kp/s2w759jUd+gqUd4Odxh59vmQ5UbPnGhjtt/H6DHjv9x/NL8HGFKfNmmTNolos34JUK+xNvPP/lPAXSrmxnLVM3CksEPbtM1Op0IeO6MQRwESfpln12ohhrUOfGjEPFc7mt0DEA3Lw0IA31Y4LQLIR6q0+rtkes2z1uFTOlv+s57lkFIqbieTWtzP02eoJ9QSEZT7DF22lD8FZP/NbejqBDEpMhSlaum0MkZ3sIqH8BKAF/E/rHSEFdzM32aQ4n/xa9qbDVz3SIC+meUk5j23QCRA4AjPFxChIRIgcEQCBA6TAEPrfuEXcau8obwlbokaMU/QHhRuExHRbeYB5ou1h5AvTuVhLx5jPtQfz5TGfcYIdlF7eixwkVG4R0R71uR+6jkgA48Qx3/sKfTfm3puJkCA21T4nMw+4DWWAK8xCuWBoNowhNX8HEncy6tcIVxyor1yuGiPlfvlf46O6uszmoH1PsCGpgQAgV24WTd/vZ9Q19byBnSFGBHR07RET1s1+JVuQQmQXf8Lr7PeB+gFl6phm2zLwlTz7zKSQfnJXyZcxkFu+DQnAid/Ov/2tKBhT0hjgQkwIBOqAfwJwHfeuqZ7jEeuiGczvy8BUrL3MVSOsNf99RXsBOgT0R7t0R75+BXm5DArwPzelACuozBS3fyZ2W3mn4UeYIFvAqv2nyp+58oMX2cJ8HVGoasHsB1qD8THn/49gJuCc3hwRasX8ilW+hSj0FU5dqnU+nUDj1qH6PoUkIWZutHGT4A91sBqFTxfkz5vNeNASFCiR9ve43iPBSOAvzv4SQzx5/n3r+EN/Ou0xzCnhLbvAppRxPkAgSN6AwNHJEDgiAQIHJEAgSMSIHBEApgYgFpL5xAqAYjZNkEHYVyvhJgWbgjvNgeAAXZbS+cTxigd0a4wGqd6A0xJES+1ahjQbu4IGtCuoAGEfHmTLt/WNLVx1w4cg80Dj9hFDdi1zNXBV5/NhBIB1Hj1ah6UcQb5CntZg50Atvg+BJCksqOnLl2QIWFbIflpHS4CZCasfutSEErjuTTYCGCP7yZAUxPbpfwGDHN58DeBd3AB32hxPbmDC7iAbJ3cBWXMPFHOXhB3wi002OCKfzxYJG9AjeWLfA/gOgK8B1CdQYQ7eElsX5Szv/icL6hPLrbcZ/f57aRziegNNDHArmBiWTqHiAQIHHEkMHBEAgSOSIDAEQkQOCIBAodJAFJeLB4RACoCpPlWqWdx1rLXfjZ0dM0ijZhLFARIcVhuDvMIDlkjb+ACvoYXcejxQglzeGHbGIHcPmZ5hA15je0Q0V8RiOhFyvbFtY0ep+JewtWovOt3/1jl8bAchVGJ7hEI9CINCHSPbG+n3qFzlDllU6tSfqfapXw79dP5n7nT7WmSNlwv5CTKl8q/pdYOocCOkwCA8wDeBAC8BAB4Exs4X9vKdAObuIkreASXcIgruN6oq/mk0ukkqI9Afzz/S8Avvzqd/30S/ObyHwewkstXFmu8fpLIfAEpDnFfedHRPWxgRdsJt0CKQ9zBBezgClvJlO9UX9+t/re13/9h7JU7aXmEDXlXsEvVoukR8Zu4ZL7w7H0VtpfK2ObL6O8Wr883mrQ8Hpaj8AZm78O4jzfxLDbAv5Gjmg1wAWDcomrrX7A1tIuLyh28jmv5g+AbuBZfFh8K4nyAwBF9AYEjEiBwRAIEjkiAwFERwPU+gK7yJ3G9lF/Hk8cun3T5pi1vi1yn630AXeWubeYmLZ90+aYtb31kHxeJQ/U+gK5y10aTk5ZPunzTlnc4skvA5bJDSJQRvMvMNxWm/IU8boIXDPmzin4wZ5/l1FvkSYv4l9n4XPlc5Vfz3zz+20iUELb4klzNBW+VhsgGgqrRoKT2S5dzGSnkCYDnAbyunRmffp/4bv1qiKbxE/ALzKjBb1K01OV/AgD4a2v9FWc38Q7GskhNJYD+Lup6Blxy4AW8DuB5vCZWsK2C3PoTVpuvAdz6ZQJ0r5+kPN9O/jjeUcw/FgKc7K5CwYfK/+YgZ48gQ12O3kZDony2iU8ecV1usj8VZI/jnmb+sWDcl4ARgFtofwno3sXb81fX0K4Ll/T79SCuHsqW/uO4p5l/DD1AdhP4Kit7lfkmyZ8HcBM382+q/HUlFjFnX1ekLjlEOVi5nn+qnX1Vk7jkbeunKB+1lr+jmZ9PtSmCeAyb9mPopOWdxwEWfyBm2gNRk5Z3JgDoSbpeKr9OT9aCdpVfpFul/BYziDFp+aTLN215yyNOCAkc0RsYOCIBAkckQOCIBAgckQCBIxIgcKjOoLrTUcesyyNaQPcGLpffjtjQXeURM4f6JaCb6Y6cGrq13KSzhggNJgFcBjzCkShfxpHSD9ThMqA6JYoDtfT1R1hgEmAZEA24jGVRfoRlkSAEecJE7qGwIq47HjPql4DlFlr02LKGbu3XRaCIhtDfF6BJamFnXR7RAtEbGDjiQFDgiAQIHJEAgSMSIHBEAgSOSIDAMb8E6MUBoXFAJ0D3cTZCH4T+xPPdwz5WJ55KANAJsJr/TRuu1p2Z/2Da2VwE6ATYz/+mC1frjuYfI3x7AEKv9tcMzKokFpl57TQszB/vAcYCfUbQPhLss26WhPlrhi2vUIX5V0X5QbwHGBd0Akg9wGppmuKvWSe8VztTJ1FP0c9RTDd/vAiMAbPUA0TzTwG+PUB3uN/f0cz8PUu4iEbw7QGOA1Lvwpk/3gOMAfqEkB4O0JvJzpXyTt/8jOiIOCMocMyvLyBiLPh/gj9Qphd3t8gAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTMtMDItMDFUMDU6MzM6MTAtMDg6MDApYMCSAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDEzLTAyLTAxVDA1OjMzOjEwLTA4OjAwWD14LgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAASUVORK5CYII=');
77
- background-position: -32px 0;
78
- margin-top: 0;
79
- top: 0;
80
- font-weight: normal;
81
- }
82
- .ui-datepicker .ui-datepicker-prev span {
83
- background-position: -96px 0;
84
- }
85
- .ui-datepicker th {
86
- padding: 0.75em 0;
87
- color: #fff;
88
- font-weight: normal;
89
- border: none;
90
- border-top: 1px solid #32373c;
91
- }
92
- .ui-datepicker td {
93
- background: #f1f1f1;
94
- border: none;
95
- padding: 0;
96
- }
97
- .ui-datepicker td .ui-state-default {
98
- background: transparent;
99
- border: none;
100
- text-align: center;
101
- padding: .5em;
102
- margin: 0;
103
- font-weight: normal;
104
- color: #32373c;
105
- }
106
- .ui-datepicker td .ui-state-active,
107
- .ui-datepicker td .ui-state-hover {
108
- background: #0073aa;
109
- color: #fff;
110
- }
111
- .ui-datepicker td.ui-state-disabled,
112
- .ui-datepicker td.ui-state-disabled .ui-state-default {
113
- opacity: 1;
114
- color: #999;
115
- }
116
- /* Other Datepicker Color Schemes */
117
- /* Blue */
118
- .admin-color-blue .ui-datepicker .ui-datepicker-header,
119
- .admin-color-blue .ui-timepicker-div .ui-widget-header,
120
- .admin-color-blue .ui-datepicker .ui-datepicker-header .ui-state-hover,
121
- .admin-color-blue .ui-datepicker thead {
122
- background: #4796b3;
123
- }
124
- .admin-color-blue .ui-datepicker th {
125
- border-color: #52accc;
126
- }
127
- .admin-color-blue .ui-datepicker td .ui-state-active,
128
- .admin-color-blue .ui-datepicker td .ui-state-hover {
129
- background: #096484;
130
- }
131
- /* Coffee */
132
- .admin-color-coffee .ui-datepicker .ui-datepicker-header,
133
- .admin-color-cofee .ui-timepicker-div .ui-widget-header,
134
- .admin-color-coffee .ui-datepicker .ui-datepicker-header .ui-state-hover,
135
- .admin-color-coffee .ui-datepicker thead {
136
- background: #46403c;
137
- }
138
- .admin-color-coffee .ui-datepicker th {
139
- border-color: #59524c;
140
- }
141
- .admin-color-coffee .ui-datepicker td .ui-state-active,
142
- .admin-color-coffee .ui-datepicker td .ui-state-hover {
143
- background: #c7a589;
144
- }
145
- /* Ectoplasm */
146
- .admin-color-ectoplasm .ui-datepicker .ui-datepicker-header,
147
- .admin-color-ectoplasm .ui-timepicker-div .ui-widget-header,
148
- .admin-color-ectoplasm .ui-datepicker .ui-datepicker-header .ui-state-hover,
149
- .admin-color-ectoplasm .ui-datepicker thead {
150
- background: #413256;
151
- }
152
- .admin-color-ectoplasm .ui-datepicker th {
153
- border-color: #523f6d;
154
- }
155
- .admin-color-ectoplasm .ui-datepicker td .ui-state-active,
156
- .admin-color-ectoplasm .ui-datepicker td .ui-state-hover {
157
- background: #a3b745;
158
- }
159
- /* Midnight */
160
- .admin-color-midnight .ui-datepicker .ui-datepicker-header,
161
- .admin-color-midnight .ui-timepicker-div .ui-widget-header,
162
- .admin-color-midnight .ui-datepicker .ui-datepicker-header .ui-state-hover,
163
- .admin-color-midnight .ui-datepicker thead {
164
- background: #26292c;
165
- }
166
- .admin-color-midnight .ui-datepicker th {
167
- border-color: #363b3f;
168
- }
169
- .admin-color-midnight .ui-datepicker td .ui-state-active,
170
- .admin-color-midnight .ui-datepicker td .ui-state-hover {
171
- background: #e14d43;
172
- }
173
- /* Ocean */
174
- .admin-color-ocean .ui-datepicker .ui-datepicker-header,
175
- .admin-color-ocean .ui-timepicker-div .ui-widget-header,
176
- .admin-color-ocean .ui-datepicker .ui-datepicker-header .ui-state-hover,
177
- .admin-color-ocean .ui-datepicker thead {
178
- background: #627c83;
179
- }
180
- .admin-color-ocean .ui-datepicker th {
181
- border-color: #738e96;
182
- }
183
- .admin-color-ocean .ui-datepicker td .ui-state-active,
184
- .admin-color-ocean .ui-datepicker td .ui-state-hover {
185
- background: #9ebaa0;
186
- }
187
- /* Sunrise */
188
- .admin-color-sunrise .ui-datepicker .ui-datepicker-header,
189
- .admin-color-sunrise .ui-timepicker-div .ui-widget-header,
190
- .admin-color-sunrise .ui-datepicker .ui-datepicker-header .ui-state-hover,
191
- .admin-color-sunrise .ui-datepicker thead {
192
- background: #be3631;
193
- }
194
- .admin-color-sunrise .ui-datepicker th {
195
- border-color: #cf4944;
196
- }
197
- .admin-color-sunrise .ui-datepicker td .ui-state-active,
198
- .admin-color-sunrise .ui-datepicker td .ui-state-hover {
199
- background: #dd823b;
200
- }
201
- /* Light */
202
- .admin-color-light .ui-datepicker .ui-datepicker-header,
203
- .admin-color-light .ui-timepicker-div .ui-widget-header,
204
- .admin-color-light .ui-datepicker .ui-datepicker-header .ui-state-hover,
205
- .admin-color-light .ui-datepicker thead {
206
- background: #e5e5e5;
207
- }
208
- .admin-color-light .ui-datepicker td {
209
- background: #fff;
210
- }
211
- .admin-color-light .ui-datepicker .ui-datepicker-next span,
212
- .admin-color-light .ui-datepicker .ui-datepicker-prev span {
213
- background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAADwCAYAAADvl7rLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMUIxRjI2RjhCODYxMUUzQTEyNERCMDU1QzdBQ0EyMCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMUIxRjI3MDhCODYxMUUzQTEyNERCMDU1QzdBQ0EyMCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjExQjFGMjZEOEI4NjExRTNBMTI0REIwNTVDN0FDQTIwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjExQjFGMjZFOEI4NjExRTNBMTI0REIwNTVDN0FDQTIwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+kKfR4AAAHcRJREFUeNrsXWuMXsdZnuMu4CUN2S0t0a6o4sQqAaooTncrKGrUNbe2qSC2uQqpqtexbCqI0xaQEBclKUL8qts6stqNkuwWiYqbajtqS9oAuyEISrubrLmUFnBSfmRXFa12KT+cKk2GM9mZ7ng858w7l3PmnO88jzQ633e+8565vs+8M9+8MwXnnAEAMEzsQREAAAgAAIABYkx9OHXqFEoDMDFVho0yTJdhE8UxOjhz5gwsAICk/Exep1AkGAK0DY6G93L+eUblnw4gATPNqMceEsBURMVxSwhFbO8TEj838j4V8B6eQHF1RWyzDnTl3zRIIDTNsCJ6RABdMf+mM6XBjNfsDXP1wm2hkEGN+ze1eyFpngYJ9IcAYs0/vQEVkenz7X1SwRZv2xNhqeJNVRcxac5Vj0AAAcSYf13pBVMMPfS8xyhhaFpy9pqhQ6CqNOe0ZgBPAgg1/7rcC8aQQJEx7lzkGzoEqkpz7noEPOcAmhhPxjTGzcA42zR/m0jDZkSPGZPvmCFQVZqh/B3EWMfTV6CKvm2F5LJAQhYCmWlGPYIAAJAPMMQhAAAAIAAAAEAAAACAAAAAAAEAAAACAAAABAAAAAhAA/zI8+wHoMcL772BEkBsA0i1J0CsM0yIAvGa0CZ55doPIIU7uF7uIJKeEUCKBpDS6yumEW4kTPt0S+mOVf7YtG84voekHXsB9IQAUlXeZgMk0JYC2dIe6swS2vBTK79P2mMdmTZayBPQEAGkrLyUJDDdkvLb0h7ryRZCAtOZlD/F8G264TwBDRJAURNYJhLwbcSpepqU+wFs9KDcqhR1OkHa4Q7cQbTlDRjjVRa6H0BuFInKbTqQ0IpE8YYqrl7n8CgcOAHkVKK+I+d+ACj/AQ4BAAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAAeg1sCw64IJYBFwPNt4li1Mp/DJUPBSAoQUwZ8AwKlCLOQdT5HmLlh1ZCikM6eUsyOXqUJvMRW/660hcRaUlBHDyjEqdsuzxTW+O+BJCi8lOdyRcSf5GoAaWqhJAelCcsvyKB8sQocmzeU7SBWAuorbabmjxqy3+spcrnERkPbUhFR8z3UAVIMQ7NVQbcEneRIO/UvBSW/PuWAw+U54naQJFgCFZVlgV1DiDH2LlI/K5UzNlmL55ScYtEaQ9VoFTpbbsNhHaCqdKdoh045fe0pPxFBiKJnXtIwcAx6SgSpD+VCR3bA8XmPdUkZB+sv9TzGLV135QFUHTgXTl7z5Tx5yzH0PynznvRkTJscx4lZvhHjnesw4XXFRTIP/I/qvFiJSAADBggAAAAAQAAAAIAAAAEAAAACAAAABAAAABDIwB1suvQT3WNXU3YZ6RqA6m8QtuML/Zk6N60P8rhoBs9bABdJZO2G05omadsA0Vg/DZvuKkW4lZyKY7GM9Ocwx14inm6A28Q7zVdCSGVzztKAr7pmkqYh5DyT9kGeIDy1x1QO9Vg3E1YQDmPRXceklt3OGjV91w9H6Ugiw5aAr6706Q42Ti2/FO1gZCdeTYqLBkfIoptBzEWUGia60z/UEvOVZaNTwKGNIC6sVdo5fNMSp9SAXwbQS4yrMt7G+vbiwTtILUV7Itp4r1G5gCaVP62HCtiG38KBs6xFx5FCbpo9VQ1dNv4e7qFdhBjAcWmWcA8Xj3FMe/WuYw9HWwAdZMvoZWfk4FTKUCKrb24R/2lMEFD0rtZU9Z9PCo+9nj1IlDeVZaNEkATPb5vQcb0eKkYOCQdmyy9uedbH6kIkEeUv82nfbPFNKQq981Ew+DQ4V/tMe9jDTJnFzazYJEkkGszkk2WvucqPOOf1sa9PgTYtf0D+riZSGvx4mAQoE0SAjoGLAUGABAAAAAgAAAAQAAAAIAAAAAAAQBAVnAUQfsEkMobLdSjKlWl6/GjIYUpX+6yCz0hCfUeSACpvNFCPapSnYmnxy/eN83SHFLat14s9njwgsUf8JpCgXlLaR88AVR5o/n6NKf2KQ+NX5GJz8KWlCfqhnok8kRxhypwEdgTV3kDxigwi6w7kECCOQDfjQ1iPKpsCt/WxgrcQn4pThj2aYS2k3lTmNJNPEvNrw+BxJ7KDEQQQJ0LYRs+0dNaXLEbK8QoSpHAjCwSKVauHoxnym/Kd6QYjgyKAKq80dpi4VhvuBSurLlNxqLCAuEtNvqu9cQ8sO5SHfM+qCGAbbzssyXSlFFpIRsihO4HkMqVNbbx8wQkEDoOjm30tmGQ7xCCB86rxMjWkQCD8l8NH2/AjcAKjPGlZwHviXFlTWmG6uWQwowtAuOPSXusK23oxjAxsk0ORwZNAG1MIqV6X1dcWYvM70mhwLn86aGwGYcAAAAlBAEAAAACAAAABAAAAAgAAAAQAAAAIIDRxwTD8lFgoASQ0g871LGGJ5T1fYdQ/i02On+HxZ50CwyIAGIP1kzpCDOZqXy2LEQyEamAOWR1bIAEAAoBxKyfjlnPbfbUqhee9FAUcxmpz9l6usk/aXnHlmf85r0YQk1lPW2g6QNVBMAjeyCbPzj3JBSlbLryb0dYH769vpLflnGHnCxr5t0n/3V7ErjSkmo7N2AAGCOY/TygF09hRTCL8ucYi2+zdA41VOWvKjdX+ZvbsBUV9TuNpg/YCMBstFWffUzQWK+0WMSOu32tj7q8u8qhqpenluFGTb4LTfk30fQBGwHUKV0R0fCLSDLIRSCFQQKcMBfBa4ZCrrzUlU8XdtcBBjAH4OqNQhXWd0+8mP34YuQnLbJbWh62CUpW1NwriKQTgqrt3KD4gDcBxI7fQ7elKioCi5APGfPrsqn+hiwSP2cidjs1AEOA6IZYJG7UOREzB5ALmww9PpCIAIYOKBIw2CEAAAAgAAAAQAAAAIAAAAAAAQDNYoZdvZZhpkfpF5PLe42ACeeOE8Aho8Ety3tt4/0szoc/FiKuBVa9l8BMC8q/arm/6hH3TEbyEIr+rTLcXIbLMtws740Fpj8kHzcZsjd55iNEPjZOgV9whJg8XKVLeoWcK8P7yvC0/D4h79lg+3vskOX5w2U475no32dXH8t1kvktB64jDNc75svwL2U4UfH7LWVY81ReHbMR8qsOef250KPNRKO5VPP7/jI84yCA15dhvQzj8p4ggQNl+LIkAuaZfp98VNX9JY82wCxlcIkgFyJj4s/l9aTsiFLWY1FHAExTfoEV5rcCjkog4r0HA5jRlwTGLfcuE+QWy/BgYO+3qhW0uSJPnXa8WpMHpeCrNeSxyppdn3Cpouz0MnTFr5T/Go3Y1h3vrStPlXcKmjiVqm+Hy1aROLextVlxOrY8C1kp/5dlQwldQrvX+L4Q8I7vCIzbZQG4cLiCqLj87ZxDfq2CBCg9P69ogL7nFIqy+4bl/vd4lMM18nkR33cHluUdEcO4GIIIdYcviGkpWlT+nyjD39SZa4yo9FQo5Xe9pyASwGRg2sYD0x9jAQh83kICSvk/T3yHSQIU5dcx4fhOKbvrI8pUmPtfK8Pb5fe/kveYR/6ZhYR8ymDWsKhmCcOzvsNU/l+UdVZJAqlnZqnK76O8oeaU3us826IFYJIA81R+G0n6TuLtd3ynWGD/bdy7waPnvygVfl0jBHHve8vwPLH3rduZqs0l2inM+dh3/EoZPu45b3FSG4J9Urt/xfC7ib8Btzwadp3yqjCuffbBd2nBpwdbjFR+gSmNBJTy+2zEKRReOPUckmGTtTuTL8rpB40wTig/kcfvl439G1LxD8h2xuVvoRuSznoq/r6Ka+xwNMc7/iSA+MWw+TvZ7qSiUv6VJi2AVJM04wni+VLgO2MtgCm2u+OO3utvEhv/TI08lQRe6/juakSXDHNenx+qsya+T3vO9k/BunxfyI5Eucz3y5nf4bMvxzNG/S3UKX8oAcxGmDkU5f8DqYBVv6UimSbmACjjzNkG5XVFrPvuakT63MWYTJPr7z+dJFzPuCbSeIK6/cuKK7UTWKy43+Y7QvCMhcStyv9yYXK+U9anTp1iwBXj7VsqfhfktDaQsuBar/9MT9OeqmPoG9SEoFX5z5w5k20I0HWsGdcho0Dae4tnKGUAXwAAGDBAAAAAAgAAAAQAAAAIAACATuAPZchCAOqU3NgjsUNg+i23vSeADcpHnbIYZ5bZ/bAp/+EfYtV7EXDm3qPhhEOeusCpypf8pp7IK/xRZPuZk6FtXFuG35Hh2sh3HdXCFRirUf4trcFST+gVm4gIBxB95dP9bMcD7kZ5pfhzi4U4a1qlndQUsKiRUygaUH61QMfljivK7AtGWlTaxP03svrFPue0PJtYIJShy3NygdEWOqmFJLoTzzqj+7jnllf4baNNCCVYIij9smzzy/LepNSDykU1hu6oOnxQku6C9h7KOROfNj7fHqH85oIkkf6vvFwoloVAuvLr3mirhMSLlwk/+Lrz50M3dPCRV0r3a2U4q13FfgWnPRvQjCQjteGJyzOv6mBPah4oPVVByP/nyvCjbMdF+7Yy/EMZfozRnWk423XiUTK3MvdKPpu8Qoi8+D/7BbbjonyTh7zZ+NUKvMWG26Ape9JCykWN9eYi8JOMvlJVtVmR9/NSr8XnpbqFQKbyq15vVv7WxgKLqn0EfLwM3ySJ6D/L8O9sx7tNrOJ71lP5Rd7Vzka+brm58Ndl+JEyPCaV6DFZHn8bOBzTFTJUXuCWAHmh/M8HyJk936Jn+9vybJuhFpmOGxI9o3CPluZDhpWybZsDWGDV69EVCSy00IC3ZdiSYZv5H8/1j2X4uTJ8VjaGT0r2PBeg/Oc0S6AP+Em2s/b9bdJ8FFfhTkrdYONmS2/lQ/ymvAqvCJAXPf9e5rfBy9EahXetxZ8zlN88X3KrwTmB3y3DB2p+/4B8xoV9Mqh0npblMS+HP9tVcwAnLeNZphHCWsXYtItQFsBXy/BP0pQU138LUP6Ynp+zMH/wSW3uxdcCEi6gP1+GP5VKL66/xGhuqcJj8UvamFu59CrzPUReKP6LEfL6HICv8psK/2QL1utWgHWr8Jtl+I2a30LIr5K8Xb4AIY1+SzOZ9xkm98EWFH+WoGwfb0n5Y0nAtIqo+C22sxmEmNi5Xl7Ffgq/V4YjNXJi/uY5456pdPs7LG9T/iXPcl4xlJhbFHjbUU9VJECZANT/cft7eX2zabo78q+P+VfqImvCGeh5trsT8Fci5wxC9hRci4xTWTuhyi9m+b9QMxZ+Y8PKr8qdSetHv/6MQ+45Y7z+r57x5pZf1Ig2RPkplhZlHsxGAtTZf9E+XirDu9nuZJ+YHPyI/O1xot6oMf9hXwKo2hBR78maxMmantJn+GGm1TftoT3/ag0JuP4CVD3cJa3xbHn0gLp83e8uiJ54M6IOc8nPJ1B+ZakuG0qs/w1IJW19GEclcTHp+ctl+Avt3oPyPS8Q33FaK4/aeFPvByDGiRcZAIwO5rShQR9wVPtcSYJN7QcA5QdGDSs9S6+X5QNfAAAYMEAAAAACAAAABAAAAAgAGCno7sVzRJk5drUb7s2J0uPzV2wX3MAHSQC3WhrArRnSxwfYCNQ+DI8Y9x9h/nsz3Meu9H1YJpDAj8vnjsjwOhnE8twfIsSpt533Vih/YQQdwnPxHVL+TTJwee82QvwzlrZLPVDFtReDaz8GinzsOw556g2v0yPbOgC15nulDB+W9xZlwzPdOykJ8WV9m3zMO3LgqCwzVV6qTCkLVPQ8i3cck8o/71kWKg0KYj+GZwnyIv5rLPe/VYZvMporrYj3UUk+qgz09NT51KdwBzdXkFK9WDmju5tT47Zhy/EOtZpR30BmVbtfEPJvi+Pb7thqHYDNAlDKLypJLOn9Wba7BnmdARQsamV5VCu3RQ9ZJpXeVH6qW+s+47uPG/TzUtkvy/BNSQBUPMp2l4NPsqv98ldaqIP9bNeblHlaA+buT75W6LbMp+7J6uPRyo20zBDJ0YQ4i3FaC/9DHQJ8WDM71RFH8y0pT5W50sZwgBODCwcqFJbiT3+MVXuzKYuAMoy4N7IcXtK+v8Toh2t+SPb8qpzuNZR/ifCO8Yrgg1XP+wp72ZW7P+3V4qce8inK/7Rm0jPmdzhpETF/UkjiEW3tNWzHGew1WrgCdSsBdeU/Rhx7VLFUm6Z8ivMJY3GRXX023LzH8OlYpPLbNnVhmvldhz+TCm/6DFySyu2CGPdfsMw5+KzPF77/L7A8uMby/Wvy86uJ73iP9lmQofIsvZFoBfAKsqJ0Pspa+LpG3nuk8j/Fdrboq50D4DKRE0ajU5XZxpZeLOIdvEFZah6qfOepcyh/XIZ3Wu4L99DbA5WfqoAi7fdU/PZ+tutp6Jt3KoHp4+gXtfsvyOEIdQ6gapztGsPfWPM8Z/UernrcVcO797UwB/AG+fmr2v3n9LZbNwdwQBvzPyp7fqX8B4jKYc7uVs34UuV93lE4QowsNQ/rFSb8eoDy61aE8At/0jG5pCv/QdkgC4/eVxDUAzLdeqAov8qjauhM63HUfAZ1DC3C/7GdM+5f4WF+zzK/reNMvFKGZ+X1WuNzDKjD6Ng5gBukbl+vBSaJgbuGABeloq+zK/9C8v0HYMhQ5r8qs6fZ7r8ALrzT6PFFr/k6trspxJuJY1/X7rV1eFqm/3Py+w8QlV8nsRU5Dl6RQ4ctLf/HPN71dc+0rzH75itiQ1HXCcfCVNePprd9PkwYgt3o+J3SCXKP+za8lmTKNnw8+FD/BoyBMuNNc/9Jqfx1vuVc6wXXEtWdb/nr/1psa+NefbvsPTUNWd2/qwxfZDubuW4GtCVlKt9kmcsoHJOAr2e7e2Ay7bPYTq5ug9JDjLbnpNoxK+QddbKUoewVQ4CmjwcvMsv3EdsV+b695fJ6tWa++/yjIHr3v5NEtaiRldog43/LcB1hMuzhyPRXbQ3nOpzleXb1rlLUcj2foA7Ot6k3YwwAqk3vXw+UXaohN+ZQ/lQktsaG2YF4Ab4AAAACAAAABAAAAAhAwyFGXwGocIccA5rLZ5cY/WQaAAAyE8A5I1Bwdxk+VYZ3WX57l/ztbhQ7AHSbAN5m9PyH5D1Xz3/GuGdbOXfGwxJYldbDakDenjUskLkE5TWHJuNVb2ZYRdH0gwDUARyTbHddtutQjiMe8VKfnTGuPthnfF9OoPzLRBI4ajT8owHxxb4jVl4p7IxFuV2Y9bwPdIgA9N5f92F2WQF3VTQiTnw2NZT1MZngXXMagbhIQCia6bO/6KmAse9Q8qK+xuV1MYAEZiy9+QzUZrQJQO/pJ9iVa5dPBiphKE4GxqunXy0/XQk08+cM68G1xn7R837ds/OSwOY936GU/zNsZ2XbZzQS8MUa1GQ4BDBnjP31HVWUFdDmOPg/jKsvVNqFI85hovLrPbyv8qfGeWmBnQ+QfcLxndVYbLGbrsxo5LGmkQish44TwDKhB19uMX0rMv5YpTvI3GvPbWZ+TuVXhDvB/P+KFXiL43udxRa7hHZBU3jdnXUBKtddApirMKEnCGaywFmPeKnPzrG4GXzVmCm7sKywK3fLCVX+ec/7dc8uSitm0fMd4rnHyvBWtuPd9lb5PWRbt5mEMrAAOkwAyxUmtG1zBduzF2pMSsqzrCaeUKvD15w1SSCk51+yKJrvcdWx71jSSOCypvxLnuUnTPdZwzKgzAmYlkQqywJokADWPBuGicfLcJwge1w+SzXdGaOfyZ5q2HEw0uxfMhr9UoZ3xMoXzL6vAP7KGyGMJa5Y4cP9X3LM+h7jN7ErjJjMesJTGWN6jSKCBNBbAYMigFR4Qob3ongBEGl/hgAAAIAAAAAAAQAAAAIAAAAEAAAACAAYIOZYuG9AjCyQkQBEpVF931nNO3jNd6B5LLC49fdzLHwVZows0AELQFVgLBH4koYZ30RAGlTaJyz3eEAaFE4Q5U/UpIl7lIXvseRmfCdkmOuI8nOGXZV6NwRomwjM+IQjz0FNeeYIJucy2/UADEl/yjznIFJmKKCPInOtDEOtvirZAlZBf+cAVEM+0eLYc1lrMIXWmHlNz20+G6N4ZhpClLBtxWc15ZMTGP71nABWZK/6YEtpU/EdNBrQQWZfXlpUPBvjx2+mwRex8Y8SsCS4pwSw0nJDNuOb0Ex61+YgKxoRqDmAkPSnzPNKBiIoKoKP7MGIeA/WWAEHoXYdYuWK48G5bKz3RzRa8zjn2KPCgXhz27fs5yzDqjZkgYbhOh48RYUVMAF7b26vaNZUm7JAB+cAgGFihWFfBRAAAAAgAAAAQAAAAIAAAAAAAQAAMJoEEHqyLQAAPSUAsXruHu37DTJMeLxX92C7z1MWAIBMBKBO0zXPortR3qcq8gG2swhEnAVwr5S9NUF6XQ4lJ5jdjVaFEyMuDwBeMFcCnpbXfzbur2i/HyO896ImJ5YTn2M7J/Qe0H5rAmLzi8JBIPpptaMmDwDBFoDo3eeloqohgDDf1Uk+6/J3ihWgeqxH5PPKEWY9cDjg40oqDsO8Vl71z+I6XoZVh/y1Mj79HSr4yvMI+b2WK0UeAIIsgP3yqh/ceb/2+YLswfcTeiDx3G1s51TbeTmEOCyHAuL7BxvM06sqCKQgEskrjWthvIMRFFi/vsqTxFS8k4b8JMOyWqBBC+CSvN5Z8eydxnOuIcCS1ogFEWzL6+mGen6F6yxhQl43mPsMRPHsD7Pdo9H1dzxHkL9OyutXJe8bv/4eavwAEGQBbEszfY7t/PW3pP12VPbqK/I5quIWsucXcwD7yvAoCzujnoqTZfii4/e1EZYHAC+Y+wHcKsfpasx/Qfb8BzTT/qInAajvaiOIZYIpq5vstisAABGo2g/golTy+9jOX4FK8c/Le9QZ/Lq9AAoP+aorAACJhwA6CRxG0QDA6AO+AAAAAgAAAAQAAAAIAACA4RLAHWxnDYDpiLIkf3Mht/xb2M5KQ1P+g/K3UZfve/0NXb5VmOsA7i7DGYeMePCBit9yy99Vhocc8sfL8PCIyve9/oYu3xrUOgCdAAQ7fYoo/44yfNrCfDnlf6oMnyXK/3QZHh8x+b7X39DlsxCAPgQ4YrMQmH3xzRHivSq45I+zqxcPHXfI31mRfkZ89k6P9PvIFy3Ff8Qjfmr9FQnkWab411j1sWi+8RcJ2n8RqCutDQF4TaI5oXJ9HXfq5AvNJGaaycs948+V/lTxp0h/1Tuajr8gposFps8n/iKg/Yjff1X7/tGA9mc+Kzxkn3KQY6sWAPVosMJTSaoyR5XnxliXMjZ2pYdHKHcIScRWcJE4/b7vSJl2lqD9hKSfW0jABx8xCMAHb5DKblP+zmCMdRcvVnxuAzyBhZBKgXIrcEgHkKL8U8Qb60D27kA5ofxPd1356wggtgJ4ogZ4VF6X2O5fKzENKpQEeCISaav8eKTyxhIgz0AaLgskxIL6aGD+n9JIoLPKL6BPAp71kDtLvBcqr8b+izLo96rkH/ZQpoeJ93gCeRYhzzzkz3oQCqX+eEL5ttuPWX88g/xTNcp/tosEcMFDAS4Q71XBJf+QpQE+5JD/hIcCfoJ4jyWQ5y3Ff8Ejfmr98QTyLEP83EFATcvrJMAidaU1AhD/Kx8nyBxnV/8H3QV58b/qKYL8KWb/D7bv8n2vv6HLZycAZVrOsZ39/E18SP72sMM0zSkvVliJRRYfs/z2MfnbAyMs3/f6G7p8+5MlxlJgAAAGANtKQAAABgYQAACAAAAAAAEAAAACAAAABAAAwIjD5QtgA2V9O+Tj5AEgKwEIjFvuXfZ4d255AAASDAFyKt3lBGnI2ePiSDOg1wQQq4CXtRCCcSk7nkkBq7aEokI/1BQAekcA4zXmOFWBxyPkL2skEKqAjMXtI8BZvg0pACD7EGA8Y/rGE6QhZ+/LO5AGAKjEWINj/9zyAAAEEkDKDS0hDwA9HgIAAAACAAAABAAAAAgAAAAQAAAAIAAAAEAAAAVTDAuDgB4QQBdWsYm4Z7TrKCj/Rhmm0fSArhPAtHFFzx1Hhrryb6I4ga4TwIZxHbryx/TcUH5gEBYA13rKumvTwwZXCFXejQTKjzkAoDMYc1gAhXaloCBem8RsQz1/iAVgU37MAQC9IIBQC2DaojTmtUkzeNWDqHyV34cM65QfwwAAFkCHLQAoPwALIMAC6ALWEryjSeWf8nwfAPTGAhgVhFouVOXHHAAACyBAEbsO08x3fQeAvD0d5/hHCgCGCvgCAMCA8f8CDABatG6NN+gY2wAAAABJRU5ErkJggg==');
214
- }
215
- .admin-color-light .ui-datepicker th {
216
- border-color: #fff;
217
- }
218
- .admin-color-light .ui-datepicker .ui-datepicker-title,
219
- .admin-color-light .ui-datepicker td .ui-state-default,
220
- .admin-color-light .ui-datepicker th {
221
- color: #555;
222
- }
223
- .admin-color-light .ui-datepicker td .ui-state-active,
224
- .admin-color-light .ui-datepicker td .ui-state-hover {
225
- color: #fff;
226
- background: #888;
227
- }
228
- .admin-color-light .ui-datepicker td.ui-state-disabled,
229
- .admin-color-light .ui-datepicker td.ui-state-disabled .ui-state-default {
230
- color: #ccc;
231
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/divider.css DELETED
@@ -1,7 +0,0 @@
1
- /* =Styles for 'divider' field
2
- -------------------------------------------------------------- */
3
-
4
- .rwmb-divider-wrapper hr {
5
- border: none;
6
- border-top: 1px solid #e6e6e6;
7
- }
 
 
 
 
 
 
 
meta-box/css/file.css DELETED
@@ -1,58 +0,0 @@
1
- .rwmb-file li {
2
- width: 250px;
3
- margin: 0 10px 10px 0;
4
- -webkit-transition: width .25s, opacity .25s, -webkit-opacity .25s;
5
- transition: width .25s, opacity .25s;
6
- }
7
- .rwmb-file .rwmb-icon {
8
- width: 60px;
9
- text-align: center;
10
- vertical-align: middle;
11
- overflow: hidden;
12
- }
13
- .rwmb-file .rwmb-icon img {
14
- max-height: 60px;
15
- max-width: 60px;
16
- }
17
- .rwmb-file .rwmb-info {
18
- width: 180px;
19
- vertical-align: top;
20
- overflow: hidden;
21
- }
22
- .rwmb-file .rwmb-info p {
23
- margin: .1em 0;
24
- }
25
- .rwmb-file .rwmb-info a {
26
- font-weight: bold;
27
- text-decoration: none;
28
- }
29
- .rwmb-file li,
30
- .rwmb-file .rwmb-icon,
31
- .rwmb-file .rwmb-info {
32
- display: inline-block;
33
- }
34
- .rwmb-file .rwmb-icon,
35
- .rwmb-file .rwmb-info {
36
- margin: 0 0 2px 2px;
37
- }
38
-
39
- .rwmb-file li.removed {
40
- width: 0;
41
- margin: 0;
42
- opacity: 0;
43
- -webkit-opacity: 0;
44
- -moz-opacity: 0;
45
- -o-opacity: 0;
46
- }
47
-
48
- .rwmb-file li.removed:after {
49
- content: ' ';
50
- position: absolute;
51
- top: 0;
52
- left: 0;
53
- right: 0;
54
- bottom: 0;
55
- z-index: 2;
56
- opacity: .4;
57
- background-color: #f00;
58
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/heading.css DELETED
@@ -1,12 +0,0 @@
1
- /* =Styles for 'heading' field
2
- -------------------------------------------------------------- */
3
-
4
- .rwmb-heading-wrapper h4 {
5
- display: block;
6
- font-size: .75rem;
7
- line-height: 1.4;
8
- border-bottom: 1px solid rgb(230, 230, 230);
9
- text-transform: uppercase;
10
- padding: .75rem 0 .375rem;
11
- margin: 0 0 6px;
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/image-advanced.css DELETED
@@ -1,43 +0,0 @@
1
- /* Image */
2
- .rwmb-image-item {
3
- position: relative;
4
- float: left;
5
- padding: 0;
6
- margin: 0 5px 5px 0;
7
- box-sizing: border-box;
8
- width: 150px;
9
- }
10
- .rwmb-image-item .rwmb-media-preview {
11
- width: 150px;
12
- }
13
- .rwmb-image-item .dashicons {
14
- font-size: 20px;
15
- width: 20px;
16
- height: 20px;
17
- }
18
- .rwmb-media-bar {
19
- position: absolute;
20
- z-index: 10;
21
- display: none;
22
- right: 5px;
23
- top: 5px;
24
- color: #fff;
25
- }
26
- .rwmb-media-bar a {
27
- text-decoration: none;
28
- color: inherit;
29
- }
30
- .rwmb-overlay {
31
- position: absolute;
32
- top: 0;
33
- bottom: 0;
34
- left: 0;
35
- right: 0;
36
- background: rgba(0, 0, 0, .6);
37
- display: none;
38
- }
39
- .rwmb-image-item:hover .rwmb-media-bar,
40
- .rwmb-image-item:hover .rwmb-overlay {
41
- display: block;
42
- cursor: move;
43
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/image-select.css DELETED
@@ -1,21 +0,0 @@
1
- .rwmb-image-select {
2
- display: inline-block;
3
- width: 80px;
4
- height: 80px;
5
- float: left;
6
- margin: 0 10px 10px 0;
7
- border: 3px solid #d8d8d8;
8
- border-radius: 3px;
9
- padding: 1px;
10
- }
11
- .rwmb-image-select img {
12
- width: 100%;
13
- height: 100%;
14
- }
15
- .rwmb-image-select:hover,
16
- .rwmb-image-select.rwmb-active {
17
- border-color: #0074a2;
18
- }
19
- .rwmb-image-select input {
20
- display: none;
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/image.css DELETED
@@ -1,67 +0,0 @@
1
- /* Uploaded image */
2
- .rwmb-images {
3
- overflow: hidden;
4
- }
5
- .rwmb-images li {
6
- margin: 0 10px 10px 0;
7
- float: left;
8
- width: 150px;
9
- height: 150px;
10
- text-align: center;
11
- cursor: move;
12
- position: relative;
13
- -webkit-transition: width .25s, opacity .25s, -webkit-opacity .25s;
14
- transition: width .25s, opacity .25s;
15
- }
16
- .rwmb-images img {
17
- width: 150px;
18
- height: 150px;
19
- }
20
- .rwmb-image-bar {
21
- color: #fff;
22
- font-weight: bold;
23
- background: #000;
24
- background: rgba(0, 0, 0, .5);
25
- position: absolute;
26
- top: 0;
27
- right: 0;
28
- padding: 5px;
29
- display: none;
30
- text-align: center;
31
- }
32
- li:hover .rwmb-image-bar {
33
- display: block;
34
- }
35
- .rwmb-image-bar a {
36
- color: #fff;
37
- font-weight: bold;
38
- text-decoration: none;
39
- vertical-align: middle;
40
- }
41
- .rwmb-image-bar a.rwmb-delete-file {
42
- font-size: 23px;
43
- width: 18px;
44
- font-weight: normal;
45
- }
46
- .rwmb-images li.removed {
47
- width: 0;
48
- margin: 0;
49
- opacity: 0;
50
- -webkit-opacity: 0;
51
- -moz-opacity: 0;
52
- -o-opacity: 0;
53
- }
54
- .rwmb-images li.removed:after {
55
- content: ' ';
56
- position: absolute;
57
- top: 0;
58
- left: 0;
59
- right: 0;
60
- bottom: 0;
61
- z-index: 2;
62
- opacity: .4;
63
- background-color: #f00;
64
- }
65
- .rwmb-images li.ui-state-highlight {
66
- background: #ddd;
67
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/input-list.css DELETED
@@ -1,20 +0,0 @@
1
- .rwmb-input-list li{
2
- line-height: 22px;
3
- }
4
-
5
- .rwmb-input-list.inline li{
6
- display:inline-block;
7
- margin-right: 0;
8
- line-height:1;
9
- }
10
- .rwmb-input-list.inline li label {
11
- margin-right: 10px;
12
- }
13
-
14
- .rwmb-input-list.inline {
15
- margin:0;
16
- }
17
-
18
- li .rwmb-input-list {
19
- margin-left: 15px;
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/jqueryui/jquery-ui-timepicker-addon.min.css DELETED
@@ -1,5 +0,0 @@
1
- /*! jQuery Timepicker Addon - v1.5.0 - 2014-09-01
2
- * http://trentrichardson.com/examples/timepicker
3
- * Copyright (c) 2014 Trent Richardson; Licensed MIT */
4
-
5
- .ui-timepicker-div .ui-widget-header{margin-bottom:8px}.ui-timepicker-div dl{text-align:left}.ui-timepicker-div dl dt{float:left;clear:left;padding:0 0 0 5px}.ui-timepicker-div dl dd{margin:0 10px 10px 40%}.ui-timepicker-div td{font-size:90%}.ui-tpicker-grid-label{background:0 0;border:0;margin:0;padding:0}.ui-timepicker-rtl{direction:rtl}.ui-timepicker-rtl dl{text-align:right;padding:0 5px 0 0}.ui-timepicker-rtl dl dt{float:right;clear:right}.ui-timepicker-rtl dl dd{margin:0 40% 10px 10px}
 
 
 
 
 
meta-box/css/jqueryui/jquery.ui.core.css DELETED
@@ -1,38 +0,0 @@
1
- /*
2
- * jQuery UI CSS Framework 1.8.17
3
- *
4
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
- * Dual licensed under the MIT or GPL Version 2 licenses.
6
- * http://jquery.org/license
7
- *
8
- * http://docs.jquery.com/UI/Theming/API
9
- */
10
-
11
- /* Layout helpers
12
- ----------------------------------*/
13
- .ui-helper-hidden { display: none; }
14
- .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
15
- .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
16
- .ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
17
- .ui-helper-clearfix:after { clear: both; }
18
- .ui-helper-clearfix { zoom: 1; }
19
- .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
20
-
21
-
22
- /* Interaction Cues
23
- ----------------------------------*/
24
- .ui-state-disabled { cursor: default !important; }
25
-
26
-
27
- /* Icons
28
- ----------------------------------*/
29
-
30
- /* states and images */
31
- .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
32
-
33
-
34
- /* Misc visuals
35
- ----------------------------------*/
36
-
37
- /* Overlays */
38
- .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/jqueryui/jquery.ui.datepicker.css DELETED
@@ -1,68 +0,0 @@
1
- /*
2
- * jQuery UI Datepicker 1.8.17
3
- *
4
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
- * Dual licensed under the MIT or GPL Version 2 licenses.
6
- * http://jquery.org/license
7
- *
8
- * http://docs.jquery.com/UI/Datepicker#theming
9
- */
10
- .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
11
- .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
12
- .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
13
- .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
14
- .ui-datepicker .ui-datepicker-prev { left:2px; }
15
- .ui-datepicker .ui-datepicker-next { right:2px; }
16
- .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
17
- .ui-datepicker .ui-datepicker-next-hover { right:1px; }
18
- .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
19
- .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
20
- .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
21
- .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
22
- .ui-datepicker select.ui-datepicker-month,
23
- .ui-datepicker select.ui-datepicker-year { width: 49%;}
24
- .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
25
- .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
26
- .ui-datepicker td { border: 0; padding: 1px; }
27
- .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
28
- .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
29
- .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
30
- .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
31
-
32
- /* with multiple calendars */
33
- .ui-datepicker.ui-datepicker-multi { width:auto; }
34
- .ui-datepicker-multi .ui-datepicker-group { float:left; }
35
- .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
36
- .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
37
- .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
38
- .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
39
- .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
40
- .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
41
- .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
42
- .ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
43
-
44
- /* RTL support */
45
- .ui-datepicker-rtl { direction: rtl; }
46
- .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
47
- .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
48
- .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
49
- .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
50
- .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
51
- .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
52
- .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
53
- .ui-datepicker-rtl .ui-datepicker-group { float:right; }
54
- .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
55
- .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
56
-
57
- /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
58
- .ui-datepicker-cover {
59
- display: none; /*sorry for IE5*/
60
- display/**/: block; /*sorry for IE5*/
61
- position: absolute; /*must have*/
62
- z-index: -1; /*must have*/
63
- filter: mask(); /*must have*/
64
- top: -4px; /*must have*/
65
- left: -4px; /*must have*/
66
- width: 200px; /*must have*/
67
- height: 200px; /*must have*/
68
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/jqueryui/jquery.ui.slider.css DELETED
@@ -1,24 +0,0 @@
1
- /*
2
- * jQuery UI Slider 1.8.17
3
- *
4
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
- * Dual licensed under the MIT or GPL Version 2 licenses.
6
- * http://jquery.org/license
7
- *
8
- * http://docs.jquery.com/UI/Slider#theming
9
- */
10
- .ui-slider { position: relative; text-align: left; }
11
- .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
12
- .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
13
-
14
- .ui-slider-horizontal { height: .8em; }
15
- .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
16
- .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
17
- .ui-slider-horizontal .ui-slider-range-min { left: 0; }
18
- .ui-slider-horizontal .ui-slider-range-max { right: 0; }
19
-
20
- .ui-slider-vertical { width: .8em; height: 100px; }
21
- .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
22
- .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
23
- .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
24
- .ui-slider-vertical .ui-slider-range-max { top: 0; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/jqueryui/jquery.ui.theme.css DELETED
@@ -1,249 +0,0 @@
1
-
2
-
3
- /*
4
- * jQuery UI CSS Framework 1.8.17
5
- *
6
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
- * Dual licensed under the MIT or GPL Version 2 licenses.
8
- * http://jquery.org/license
9
- *
10
- * http://docs.jquery.com/UI/Theming/API
11
- *
12
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
13
- */
14
-
15
-
16
- /* Component containers
17
- ----------------------------------*/
18
- .ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
19
- .ui-widget .ui-widget { font-size: 1em; }
20
- .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
21
- .ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(../../img/jqueryui/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
22
- .ui-widget-content a { color: #222222; }
23
- .ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(../../img/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
24
- .ui-widget-header a { color: #222222; }
25
-
26
- /* Interaction states
27
- ----------------------------------*/
28
- .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(../../img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
29
- .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
30
- .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(../../img/jqueryui/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
31
- .ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
32
- .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(../../img/jqueryui/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
33
- .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
34
- .ui-widget :active { outline: none; }
35
-
36
- /* Interaction Cues
37
- ----------------------------------*/
38
- .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(../../img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
39
- .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
40
- .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(../../img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
41
- .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
42
- .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
43
- .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
44
- .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
45
- .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
46
-
47
- /* Icons
48
- ----------------------------------*/
49
-
50
- /* states and images */
51
- .ui-icon { width: 16px; height: 16px; background-image: url(../../img/jqueryui/ui-icons_222222_256x240.png); }
52
- .ui-widget-content .ui-icon {background-image: url(../../img/jqueryui/ui-icons_222222_256x240.png); }
53
- .ui-widget-header .ui-icon {background-image: url(../../img/jqueryui/ui-icons_222222_256x240.png); }
54
- .ui-state-default .ui-icon { background-image: url(../../img/jqueryui/ui-icons_888888_256x240.png); }
55
- .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../../img/jqueryui/ui-icons_454545_256x240.png); }
56
- .ui-state-active .ui-icon {background-image: url(../../img/jqueryui/ui-icons_454545_256x240.png); }
57
- .ui-state-highlight .ui-icon {background-image: url(../../img/jqueryui/ui-icons_2e83ff_256x240.png); }
58
- .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(../../img/jqueryui/ui-icons_cd0a0a_256x240.png); }
59
-
60
- /* positioning */
61
- .ui-icon-carat-1-n { background-position: 0 0; }
62
- .ui-icon-carat-1-ne { background-position: -16px 0; }
63
- .ui-icon-carat-1-e { background-position: -32px 0; }
64
- .ui-icon-carat-1-se { background-position: -48px 0; }
65
- .ui-icon-carat-1-s { background-position: -64px 0; }
66
- .ui-icon-carat-1-sw { background-position: -80px 0; }
67
- .ui-icon-carat-1-w { background-position: -96px 0; }
68
- .ui-icon-carat-1-nw { background-position: -112px 0; }
69
- .ui-icon-carat-2-n-s { background-position: -128px 0; }
70
- .ui-icon-carat-2-e-w { background-position: -144px 0; }
71
- .ui-icon-triangle-1-n { background-position: 0 -16px; }
72
- .ui-icon-triangle-1-ne { background-position: -16px -16px; }
73
- .ui-icon-triangle-1-e { background-position: -32px -16px; }
74
- .ui-icon-triangle-1-se { background-position: -48px -16px; }
75
- .ui-icon-triangle-1-s { background-position: -64px -16px; }
76
- .ui-icon-triangle-1-sw { background-position: -80px -16px; }
77
- .ui-icon-triangle-1-w { background-position: -96px -16px; }
78
- .ui-icon-triangle-1-nw { background-position: -112px -16px; }
79
- .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
80
- .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
81
- .ui-icon-arrow-1-n { background-position: 0 -32px; }
82
- .ui-icon-arrow-1-ne { background-position: -16px -32px; }
83
- .ui-icon-arrow-1-e { background-position: -32px -32px; }
84
- .ui-icon-arrow-1-se { background-position: -48px -32px; }
85
- .ui-icon-arrow-1-s { background-position: -64px -32px; }
86
- .ui-icon-arrow-1-sw { background-position: -80px -32px; }
87
- .ui-icon-arrow-1-w { background-position: -96px -32px; }
88
- .ui-icon-arrow-1-nw { background-position: -112px -32px; }
89
- .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
90
- .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
91
- .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
92
- .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
93
- .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
94
- .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
95
- .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
96
- .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
97
- .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
98
- .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
99
- .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
100
- .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
101
- .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
102
- .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
103
- .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
104
- .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
105
- .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
106
- .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
107
- .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
108
- .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
109
- .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
110
- .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
111
- .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
112
- .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
113
- .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
114
- .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
115
- .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
116
- .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
117
- .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
118
- .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
119
- .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
120
- .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
121
- .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
122
- .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
123
- .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
124
- .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
125
- .ui-icon-arrow-4 { background-position: 0 -80px; }
126
- .ui-icon-arrow-4-diag { background-position: -16px -80px; }
127
- .ui-icon-extlink { background-position: -32px -80px; }
128
- .ui-icon-newwin { background-position: -48px -80px; }
129
- .ui-icon-refresh { background-position: -64px -80px; }
130
- .ui-icon-shuffle { background-position: -80px -80px; }
131
- .ui-icon-transfer-e-w { background-position: -96px -80px; }
132
- .ui-icon-transferthick-e-w { background-position: -112px -80px; }
133
- .ui-icon-folder-collapsed { background-position: 0 -96px; }
134
- .ui-icon-folder-open { background-position: -16px -96px; }
135
- .ui-icon-document { background-position: -32px -96px; }
136
- .ui-icon-document-b { background-position: -48px -96px; }
137
- .ui-icon-note { background-position: -64px -96px; }
138
- .ui-icon-mail-closed { background-position: -80px -96px; }
139
- .ui-icon-mail-open { background-position: -96px -96px; }
140
- .ui-icon-suitcase { background-position: -112px -96px; }
141
- .ui-icon-comment { background-position: -128px -96px; }
142
- .ui-icon-person { background-position: -144px -96px; }
143
- .ui-icon-print { background-position: -160px -96px; }
144
- .ui-icon-trash { background-position: -176px -96px; }
145
- .ui-icon-locked { background-position: -192px -96px; }
146
- .ui-icon-unlocked { background-position: -208px -96px; }
147
- .ui-icon-bookmark { background-position: -224px -96px; }
148
- .ui-icon-tag { background-position: -240px -96px; }
149
- .ui-icon-home { background-position: 0 -112px; }
150
- .ui-icon-flag { background-position: -16px -112px; }
151
- .ui-icon-calendar { background-position: -32px -112px; }
152
- .ui-icon-cart { background-position: -48px -112px; }
153
- .ui-icon-pencil { background-position: -64px -112px; }
154
- .ui-icon-clock { background-position: -80px -112px; }
155
- .ui-icon-disk { background-position: -96px -112px; }
156
- .ui-icon-calculator { background-position: -112px -112px; }
157
- .ui-icon-zoomin { background-position: -128px -112px; }
158
- .ui-icon-zoomout { background-position: -144px -112px; }
159
- .ui-icon-search { background-position: -160px -112px; }
160
- .ui-icon-wrench { background-position: -176px -112px; }
161
- .ui-icon-gear { background-position: -192px -112px; }
162
- .ui-icon-heart { background-position: -208px -112px; }
163
- .ui-icon-star { background-position: -224px -112px; }
164
- .ui-icon-link { background-position: -240px -112px; }
165
- .ui-icon-cancel { background-position: 0 -128px; }
166
- .ui-icon-plus { background-position: -16px -128px; }
167
- .ui-icon-plusthick { background-position: -32px -128px; }
168
- .ui-icon-minus { background-position: -48px -128px; }
169
- .ui-icon-minusthick { background-position: -64px -128px; }
170
- .ui-icon-close { background-position: -80px -128px; }
171
- .ui-icon-closethick { background-position: -96px -128px; }
172
- .ui-icon-key { background-position: -112px -128px; }
173
- .ui-icon-lightbulb { background-position: -128px -128px; }
174
- .ui-icon-scissors { background-position: -144px -128px; }
175
- .ui-icon-clipboard { background-position: -160px -128px; }
176
- .ui-icon-copy { background-position: -176px -128px; }
177
- .ui-icon-contact { background-position: -192px -128px; }
178
- .ui-icon-image { background-position: -208px -128px; }
179
- .ui-icon-video { background-position: -224px -128px; }
180
- .ui-icon-script { background-position: -240px -128px; }
181
- .ui-icon-alert { background-position: 0 -144px; }
182
- .ui-icon-info { background-position: -16px -144px; }
183
- .ui-icon-notice { background-position: -32px -144px; }
184
- .ui-icon-help { background-position: -48px -144px; }
185
- .ui-icon-check { background-position: -64px -144px; }
186
- .ui-icon-bullet { background-position: -80px -144px; }
187
- .ui-icon-radio-off { background-position: -96px -144px; }
188
- .ui-icon-radio-on { background-position: -112px -144px; }
189
- .ui-icon-pin-w { background-position: -128px -144px; }
190
- .ui-icon-pin-s { background-position: -144px -144px; }
191
- .ui-icon-play { background-position: 0 -160px; }
192
- .ui-icon-pause { background-position: -16px -160px; }
193
- .ui-icon-seek-next { background-position: -32px -160px; }
194
- .ui-icon-seek-prev { background-position: -48px -160px; }
195
- .ui-icon-seek-end { background-position: -64px -160px; }
196
- .ui-icon-seek-start { background-position: -80px -160px; }
197
- /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
198
- .ui-icon-seek-first { background-position: -80px -160px; }
199
- .ui-icon-stop { background-position: -96px -160px; }
200
- .ui-icon-eject { background-position: -112px -160px; }
201
- .ui-icon-volume-off { background-position: -128px -160px; }
202
- .ui-icon-volume-on { background-position: -144px -160px; }
203
- .ui-icon-power { background-position: 0 -176px; }
204
- .ui-icon-signal-diag { background-position: -16px -176px; }
205
- .ui-icon-signal { background-position: -32px -176px; }
206
- .ui-icon-battery-0 { background-position: -48px -176px; }
207
- .ui-icon-battery-1 { background-position: -64px -176px; }
208
- .ui-icon-battery-2 { background-position: -80px -176px; }
209
- .ui-icon-battery-3 { background-position: -96px -176px; }
210
- .ui-icon-circle-plus { background-position: 0 -192px; }
211
- .ui-icon-circle-minus { background-position: -16px -192px; }
212
- .ui-icon-circle-close { background-position: -32px -192px; }
213
- .ui-icon-circle-triangle-e { background-position: -48px -192px; }
214
- .ui-icon-circle-triangle-s { background-position: -64px -192px; }
215
- .ui-icon-circle-triangle-w { background-position: -80px -192px; }
216
- .ui-icon-circle-triangle-n { background-position: -96px -192px; }
217
- .ui-icon-circle-arrow-e { background-position: -112px -192px; }
218
- .ui-icon-circle-arrow-s { background-position: -128px -192px; }
219
- .ui-icon-circle-arrow-w { background-position: -144px -192px; }
220
- .ui-icon-circle-arrow-n { background-position: -160px -192px; }
221
- .ui-icon-circle-zoomin { background-position: -176px -192px; }
222
- .ui-icon-circle-zoomout { background-position: -192px -192px; }
223
- .ui-icon-circle-check { background-position: -208px -192px; }
224
- .ui-icon-circlesmall-plus { background-position: 0 -208px; }
225
- .ui-icon-circlesmall-minus { background-position: -16px -208px; }
226
- .ui-icon-circlesmall-close { background-position: -32px -208px; }
227
- .ui-icon-squaresmall-plus { background-position: -48px -208px; }
228
- .ui-icon-squaresmall-minus { background-position: -64px -208px; }
229
- .ui-icon-squaresmall-close { background-position: -80px -208px; }
230
- .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
231
- .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
232
- .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
233
- .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
234
- .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
235
- .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
236
-
237
-
238
- /* Misc visuals
239
- ----------------------------------*/
240
-
241
- /* Corner radius */
242
- .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
243
- .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
244
- .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
245
- .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
246
-
247
- /* Overlays */
248
- .ui-widget-overlay { background: #aaaaaa url(../../img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
249
- .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(../../img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/map.css DELETED
@@ -1,4 +0,0 @@
1
- .rwmb-map-canvas {
2
- width: 100%;
3
- height: 400px;
4
- }
 
 
 
 
meta-box/css/media.css DELETED
@@ -1,81 +0,0 @@
1
- .rwmb-media-list {
2
- margin: 0 0 5px;
3
- overflow: hidden;
4
- }
5
- .rwmb-media-item {
6
- overflow: hidden;
7
- margin-bottom: 10px;
8
- }
9
- .rwmb-media-preview {
10
- width: 60px;
11
- float: left;
12
- position: relative;
13
- }
14
- .rwmb-media-preview:before {
15
- content: '';
16
- display: block;
17
- padding-top: 100%;
18
- }
19
- .rwmb-media-content {
20
- position: absolute;
21
- overflow: hidden;
22
- top: 0;
23
- left: 0;
24
- bottom: 0;
25
- right: 0;
26
- }
27
- .rwmb-media-content .centered {
28
- position: absolute;
29
- top: 0;
30
- left: 0;
31
- width: 100%;
32
- height: 100%;
33
- -webkit-transform: translate(50%, 50%);
34
- -ms-transform: translate(50%, 50%);
35
- transform: translate(50%, 50%);
36
- }
37
- .rwmb-media-content img {
38
- -webkit-transform: translate(-50%, -50%);
39
- -ms-transform: translate(-50%, -50%);
40
- transform: translate(-50%, -50%);
41
- max-height: 100%;
42
- max-width: 100%;
43
- border-radius: 3px;
44
- }
45
- .rwmb-media-info {
46
- margin-left: 65px;
47
- }
48
- .rwmb-media-info a {
49
- text-decoration: none;
50
- }
51
- .rwmb-media-info p,
52
- .rwmb-media-info h4 {
53
- margin: 0 0 2px;
54
- }
55
- .rwmb-edit-media,
56
- .rwmb-remove-media {
57
- font-size: 11px;
58
- color: inherit;
59
- }
60
- .rwmb-edit-media .dashicons,
61
- .rwmb-remove-media .dashicons {
62
- font-size: 12px;
63
- width: 12px;
64
- height: 12px;
65
- vertical-align: middle;
66
- }
67
-
68
- /* Add more button */
69
- .rwmb-media-view .rwmb-add-media {
70
- padding-left: 5px;
71
- margin-right: 5px;
72
- }
73
-
74
- /* Status */
75
- .rwmb-media-status {
76
- display: inline-block;
77
- text-decoration: none;
78
- font-size: 13px;
79
- line-height: 26px;
80
- height: 28px;
81
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/oembed.css DELETED
@@ -1,11 +0,0 @@
1
- .rwmb-oembed-wrapper .spinner {
2
- float: none;
3
- vertical-align: top;
4
- display: inline-block;
5
- }
6
- .rwmb-oembed-wrapper .embed-code {
7
- margin-top: 1em;
8
- }
9
- .rwmb-oembed-wrapper .embed-code iframe {
10
- max-width: 100%;
11
- }
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/plupload-image.css DELETED
@@ -1,25 +0,0 @@
1
- div.rwmb-drag-drop {
2
- border: 4px dashed #ddd;
3
- height: 200px;
4
- }
5
-
6
- div.rwmb-image-uploading-bar {
7
- position: absolute;
8
- width: 100%;
9
- height: 0;
10
- bottom: 0;
11
- }
12
- div.rwmb-image-uploading-status {
13
- position: absolute;
14
- }
15
- li.rwmb-image-error {
16
- border: 3px solid #c00;
17
- background: #903838;
18
- }
19
- .rwmb-image-uploading-status .rwmb-loader {
20
- width: 64px;
21
- height: 64px;
22
- top: 43px;
23
- left: 43px;
24
- position: relative;
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/range.css DELETED
@@ -1,13 +0,0 @@
1
- input[type='range'] {
2
- vertical-align: middle;
3
- border-radius: 2px;
4
- border: 1px solid #dfdfdf;
5
- }
6
-
7
- .rwmb-output {
8
-
9
- display: inline-block;
10
- position: relative;
11
- padding: 5px 10px;
12
- line-height: 20px;
13
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/select-advanced.css DELETED
@@ -1,8 +0,0 @@
1
- .rwmb-field .select2-container {
2
- height: auto;
3
- min-width: 200px;
4
- }
5
-
6
- #post-body .rwmb-select-all {
7
- margin-top: 5px;
8
- }
 
 
 
 
 
 
 
 
meta-box/css/select-tree.css DELETED
@@ -1,7 +0,0 @@
1
- .rwmb-select-tree {
2
- display: inline-block;
3
- }
4
-
5
- .rwmb-select-tree.hidden {
6
- display: none;
7
- }
 
 
 
 
 
 
 
meta-box/css/select.css DELETED
@@ -1,10 +0,0 @@
1
- .rwmb-select {
2
- min-width: 160px;
3
- }
4
- .rwmb-select option {
5
- padding: .5rem 1rem;
6
- }
7
- .rwmb-select-all-none {
8
- display: block;
9
- margin-top: 5px;
10
- }
 
 
 
 
 
 
 
 
 
 
meta-box/css/select2/select2.css DELETED
@@ -1,483 +0,0 @@
1
- .select2-container {
2
- box-sizing: border-box;
3
- display: inline-block;
4
- margin: 0;
5
- position: relative;
6
- vertical-align: middle;
7
- }
8
- .select2-container .select2-selection--single {
9
- box-sizing: border-box;
10
- cursor: pointer;
11
- display: block;
12
- height: 28px;
13
- user-select: none;
14
- -webkit-user-select: none; }
15
- .select2-container .select2-selection--single .select2-selection__rendered {
16
- display: block;
17
- padding-left: 8px;
18
- padding-right: 20px;
19
- overflow: hidden;
20
- text-overflow: ellipsis;
21
- white-space: nowrap; }
22
- .select2-container .select2-selection--single .select2-selection__clear {
23
- position: relative; }
24
- .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
25
- padding-right: 8px;
26
- padding-left: 20px; }
27
- .select2-container .select2-selection--multiple {
28
- box-sizing: border-box;
29
- cursor: pointer;
30
- display: block;
31
- min-height: 32px;
32
- user-select: none;
33
- -webkit-user-select: none; }
34
- .select2-container .select2-selection--multiple .select2-selection__rendered {
35
- /*display: inline-block;*/
36
- overflow: hidden;
37
- padding-left: 8px;
38
- text-overflow: ellipsis;
39
- white-space: nowrap; }
40
- .select2-container .select2-search--inline {
41
- float: left; }
42
- .select2-container .select2-search--inline .select2-search__field {
43
- box-sizing: border-box;
44
- border: none;
45
- font-size: 100%;
46
- margin-top: 5px;
47
- padding: 0; }
48
- .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
49
- -webkit-appearance: none; }
50
-
51
- .select2-dropdown {
52
- background-color: white;
53
- border: 1px solid #aaa;
54
- border-radius: 4px;
55
- box-sizing: border-box;
56
- display: block;
57
- position: absolute;
58
- left: -100000px;
59
- width: 100%;
60
- z-index: 1051; }
61
-
62
- .select2-results {
63
- display: block; }
64
-
65
- .select2-results__options {
66
- list-style: none;
67
- margin: 0;
68
- padding: 0; }
69
-
70
- .select2-results__option {
71
- padding: 6px;
72
- user-select: none;
73
- -webkit-user-select: none; }
74
- .select2-results__option[aria-selected] {
75
- cursor: pointer; }
76
-
77
- .select2-container--open .select2-dropdown {
78
- left: 0; }
79
-
80
- .select2-container--open .select2-dropdown--above {
81
- border-bottom: none;
82
- border-bottom-left-radius: 0;
83
- border-bottom-right-radius: 0; }
84
-
85
- .select2-container--open .select2-dropdown--below {
86
- border-top: none;
87
- border-top-left-radius: 0;
88
- border-top-right-radius: 0; }
89
-
90
- .select2-search--dropdown {
91
- display: block;
92
- padding: 4px; }
93
- .select2-search--dropdown .select2-search__field {
94
- padding: 4px;
95
- width: 100%;
96
- box-sizing: border-box; }
97
- .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
98
- -webkit-appearance: none; }
99
- .select2-search--dropdown.select2-search--hide {
100
- display: none; }
101
-
102
- .select2-close-mask {
103
- border: 0;
104
- margin: 0;
105
- padding: 0;
106
- display: block;
107
- position: fixed;
108
- left: 0;
109
- top: 0;
110
- min-height: 100%;
111
- min-width: 100%;
112
- height: auto;
113
- width: auto;
114
- opacity: 0;
115
- z-index: 99;
116
- background-color: #fff;
117
- filter: alpha(opacity=0); }
118
-
119
- .select2-hidden-accessible {
120
- border: 0 !important;
121
- clip: rect(0 0 0 0) !important;
122
- height: 1px !important;
123
- margin: -1px !important;
124
- overflow: hidden !important;
125
- padding: 0 !important;
126
- position: absolute !important;
127
- width: 1px !important; }
128
-
129
- .select2-container--default .select2-selection--single {
130
- background-color: #fff;
131
- border: 1px solid #aaa;
132
- border-radius: 4px; }
133
- .select2-container--default .select2-selection--single .select2-selection__rendered {
134
- color: #444;
135
- line-height: 28px; }
136
- .select2-container--default .select2-selection--single .select2-selection__clear {
137
- cursor: pointer;
138
- float: right;
139
- font-weight: bold; }
140
- .select2-container--default .select2-selection--single .select2-selection__placeholder {
141
- color: #999; }
142
- .select2-container--default .select2-selection--single .select2-selection__arrow {
143
- height: 26px;
144
- position: absolute;
145
- top: 1px;
146
- right: 1px;
147
- width: 20px; }
148
- .select2-container--default .select2-selection--single .select2-selection__arrow b {
149
- border-color: #888 transparent transparent transparent;
150
- border-style: solid;
151
- border-width: 5px 4px 0 4px;
152
- height: 0;
153
- left: 50%;
154
- margin-left: -4px;
155
- margin-top: -2px;
156
- position: absolute;
157
- top: 50%;
158
- width: 0; }
159
-
160
- .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
161
- float: left; }
162
-
163
- .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
164
- left: 1px;
165
- right: auto; }
166
-
167
- .select2-container--default.select2-container--disabled .select2-selection--single {
168
- background-color: #eee;
169
- cursor: default; }
170
- .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
171
- display: none; }
172
-
173
- .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
174
- border-color: transparent transparent #888 transparent;
175
- border-width: 0 4px 5px 4px; }
176
-
177
- .select2-container--default .select2-selection--multiple {
178
- background-color: white;
179
- border: 1px solid #aaa;
180
- border-radius: 4px;
181
- cursor: text; }
182
- .select2-container--default .select2-selection--multiple .select2-selection__rendered {
183
- box-sizing: border-box;
184
- list-style: none;
185
- margin: 0;
186
- padding: 0 5px;
187
- width: 100%; }
188
- .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
189
- color: #999;
190
- margin-top: 5px;
191
- float: left; }
192
- .select2-container--default .select2-selection--multiple .select2-selection__clear {
193
- cursor: pointer;
194
- float: right;
195
- font-weight: bold;
196
- margin-top: 5px;
197
- margin-right: 10px; }
198
- .select2-container--default .select2-selection--multiple .select2-selection__choice {
199
- background-color: #e4e4e4;
200
- border: 1px solid #aaa;
201
- border-radius: 4px;
202
- cursor: default;
203
- float: left;
204
- margin-right: 5px;
205
- margin-top: 5px;
206
- padding: 0 5px; }
207
- .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
208
- color: #999;
209
- cursor: pointer;
210
- display: inline-block;
211
- font-weight: bold;
212
- margin-right: 2px; }
213
- .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
214
- color: #333; }
215
-
216
- .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
217
- float: right; }
218
-
219
- .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
220
- margin-left: 5px;
221
- margin-right: auto; }
222
-
223
- .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
224
- margin-left: 2px;
225
- margin-right: auto; }
226
-
227
- .select2-container--default.select2-container--focus .select2-selection--multiple {
228
- border: solid black 1px;
229
- outline: 0; }
230
-
231
- .select2-container--default.select2-container--disabled .select2-selection--multiple {
232
- background-color: #eee;
233
- cursor: default; }
234
-
235
- .select2-container--default.select2-container--disabled .select2-selection__choice__remove {
236
- display: none; }
237
-
238
- .select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
239
- border-top-left-radius: 0;
240
- border-top-right-radius: 0; }
241
-
242
- .select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
243
- border-bottom-left-radius: 0;
244
- border-bottom-right-radius: 0; }
245
-
246
- .select2-container--default .select2-search--dropdown .select2-search__field {
247
- border: 1px solid #aaa; }
248
-
249
- .select2-container--default .select2-search--inline .select2-search__field {
250
- background: transparent;
251
- border: none;
252
- outline: 0;
253
- box-shadow: none;
254
- -webkit-appearance: textfield; }
255
-
256
- .select2-container--default .select2-results > .select2-results__options {
257
- max-height: 200px;
258
- overflow-y: auto; }
259
-
260
- .select2-container--default .select2-results__option[role=group] {
261
- padding: 0; }
262
-
263
- .select2-container--default .select2-results__option[aria-disabled=true] {
264
- color: #999; }
265
-
266
- .select2-container--default .select2-results__option[aria-selected=true] {
267
- background-color: #ddd; }
268
-
269
- .select2-container--default .select2-results__option .select2-results__option {
270
- padding-left: 1em; }
271
- .select2-container--default .select2-results__option .select2-results__option .select2-results__group {
272
- padding-left: 0; }
273
- .select2-container--default .select2-results__option .select2-results__option .select2-results__option {
274
- margin-left: -1em;
275
- padding-left: 2em; }
276
- .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
277
- margin-left: -2em;
278
- padding-left: 3em; }
279
- .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
280
- margin-left: -3em;
281
- padding-left: 4em; }
282
- .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
283
- margin-left: -4em;
284
- padding-left: 5em; }
285
- .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
286
- margin-left: -5em;
287
- padding-left: 6em; }
288
-
289
- .select2-container--default .select2-results__option--highlighted[aria-selected] {
290
- background-color: #5897fb;
291
- color: white; }
292
-
293
- .select2-container--default .select2-results__group {
294
- cursor: default;
295
- display: block;
296
- padding: 6px; }
297
-
298
- .select2-container--classic .select2-selection--single {
299
- background-color: #f7f7f7;
300
- border: 1px solid #aaa;
301
- border-radius: 4px;
302
- outline: 0;
303
- background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
304
- background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
305
- background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
306
- background-repeat: repeat-x;
307
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
308
- .select2-container--classic .select2-selection--single:focus {
309
- border: 1px solid #5897fb; }
310
- .select2-container--classic .select2-selection--single .select2-selection__rendered {
311
- color: #444;
312
- line-height: 28px; }
313
- .select2-container--classic .select2-selection--single .select2-selection__clear {
314
- cursor: pointer;
315
- float: right;
316
- font-weight: bold;
317
- margin-right: 10px; }
318
- .select2-container--classic .select2-selection--single .select2-selection__placeholder {
319
- color: #999; }
320
- .select2-container--classic .select2-selection--single .select2-selection__arrow {
321
- background-color: #ddd;
322
- border: none;
323
- border-left: 1px solid #aaa;
324
- border-top-right-radius: 4px;
325
- border-bottom-right-radius: 4px;
326
- height: 26px;
327
- position: absolute;
328
- top: 1px;
329
- right: 1px;
330
- width: 20px;
331
- background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
332
- background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
333
- background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
334
- background-repeat: repeat-x;
335
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
336
- .select2-container--classic .select2-selection--single .select2-selection__arrow b {
337
- border-color: #888 transparent transparent transparent;
338
- border-style: solid;
339
- border-width: 5px 4px 0 4px;
340
- height: 0;
341
- left: 50%;
342
- margin-left: -4px;
343
- margin-top: -2px;
344
- position: absolute;
345
- top: 50%;
346
- width: 0; }
347
-
348
- .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
349
- float: left; }
350
-
351
- .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
352
- border: none;
353
- border-right: 1px solid #aaa;
354
- border-radius: 0;
355
- border-top-left-radius: 4px;
356
- border-bottom-left-radius: 4px;
357
- left: 1px;
358
- right: auto; }
359
-
360
- .select2-container--classic.select2-container--open .select2-selection--single {
361
- border: 1px solid #5897fb; }
362
- .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
363
- background: transparent;
364
- border: none; }
365
- .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
366
- border-color: transparent transparent #888 transparent;
367
- border-width: 0 4px 5px 4px; }
368
-
369
- .select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
370
- border-top: none;
371
- border-top-left-radius: 0;
372
- border-top-right-radius: 0;
373
- background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
374
- background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
375
- background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
376
- background-repeat: repeat-x;
377
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
378
-
379
- .select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
380
- border-bottom: none;
381
- border-bottom-left-radius: 0;
382
- border-bottom-right-radius: 0;
383
- background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
384
- background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
385
- background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
386
- background-repeat: repeat-x;
387
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
388
-
389
- .select2-container--classic .select2-selection--multiple {
390
- background-color: white;
391
- border: 1px solid #aaa;
392
- border-radius: 4px;
393
- cursor: text;
394
- outline: 0; }
395
- .select2-container--classic .select2-selection--multiple:focus {
396
- border: 1px solid #5897fb; }
397
- .select2-container--classic .select2-selection--multiple .select2-selection__rendered {
398
- list-style: none;
399
- margin: 0;
400
- padding: 0 5px; }
401
- .select2-container--classic .select2-selection--multiple .select2-selection__clear {
402
- display: none; }
403
- .select2-container--classic .select2-selection--multiple .select2-selection__choice {
404
- background-color: #e4e4e4;
405
- border: 1px solid #aaa;
406
- border-radius: 4px;
407
- cursor: default;
408
- float: left;
409
- margin-right: 5px;
410
- margin-top: 5px;
411
- padding: 0 5px; }
412
- .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
413
- color: #888;
414
- cursor: pointer;
415
- display: inline-block;
416
- font-weight: bold;
417
- margin-right: 2px; }
418
- .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
419
- color: #555; }
420
-
421
- .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
422
- float: right; }
423
-
424
- .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
425
- margin-left: 5px;
426
- margin-right: auto; }
427
-
428
- .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
429
- margin-left: 2px;
430
- margin-right: auto; }
431
-
432
- .select2-container--classic.select2-container--open .select2-selection--multiple {
433
- border: 1px solid #5897fb; }
434
-
435
- .select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
436
- border-top: none;
437
- border-top-left-radius: 0;
438
- border-top-right-radius: 0; }
439
-
440
- .select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
441
- border-bottom: none;
442
- border-bottom-left-radius: 0;
443
- border-bottom-right-radius: 0; }
444
-
445
- .select2-container--classic .select2-search--dropdown .select2-search__field {
446
- border: 1px solid #aaa;
447
- outline: 0; }
448
-
449
- .select2-container--classic .select2-search--inline .select2-search__field {
450
- outline: 0;
451
- box-shadow: none; }
452
-
453
- .select2-container--classic .select2-dropdown {
454
- background-color: white;
455
- border: 1px solid transparent; }
456
-
457
- .select2-container--classic .select2-dropdown--above {
458
- border-bottom: none; }
459
-
460
- .select2-container--classic .select2-dropdown--below {
461
- border-top: none; }
462
-
463
- .select2-container--classic .select2-results > .select2-results__options {
464
- max-height: 200px;
465
- overflow-y: auto; }
466
-
467
- .select2-container--classic .select2-results__option[role=group] {
468
- padding: 0; }
469
-
470
- .select2-container--classic .select2-results__option[aria-disabled=true] {
471
- color: grey; }
472
-
473
- .select2-container--classic .select2-results__option--highlighted[aria-selected] {
474
- background-color: #3875d7;
475
- color: white; }
476
-
477
- .select2-container--classic .select2-results__group {
478
- cursor: default;
479
- display: block;
480
- padding: 6px; }
481
-
482
- .select2-container--classic.select2-container--open .select2-dropdown {
483
- border-color: #5897fb; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/slider.css DELETED
@@ -1,13 +0,0 @@
1
- .rwmb-slider {
2
- display: inline-block;
3
- vertical-align: middle;
4
- width: 50%;
5
- }
6
- .rwmb-slider-value-label {
7
- margin-left: 10px;
8
- vertical-align: middle;
9
- }
10
- /* Fix slider handle being visible through jQuery panel */
11
- .ui-slider .ui-slider-handle {
12
- z-index: 1;
13
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/style-rtl.css DELETED
@@ -1,7 +0,0 @@
1
- .rwmb-label, .rwmb-input{
2
- float: right;
3
- }
4
- label.error{
5
- padding-left: auto;
6
- padding-right: 3px;
7
- }
 
 
 
 
 
 
 
meta-box/css/style.css DELETED
@@ -1,114 +0,0 @@
1
- /* =Styles for 'normal' meta boxes
2
- -------------------------------------------------------------- */
3
-
4
- /* Clearfix for field */
5
- .rwmb-field:before,
6
- .rwmb-field:after {
7
- content: " ";
8
- display: table;
9
- }
10
- .rwmb-field:after {
11
- clear: both;
12
- }
13
- .rwmb-field {
14
- *zoom: 1;
15
-
16
- margin: 0 0 10px;
17
- }
18
- .rwmb-label,
19
- .rwmb-input {
20
- vertical-align: top;
21
- float: left;
22
- }
23
- .rwmb-label {
24
- width: 25%;
25
- }
26
- .rwmb-label.required > span {
27
- color: #c00;
28
- font-weight: bold;
29
- margin-left: 3px;
30
- }
31
-
32
- /* 75% if field has label, 100% if no label */
33
- .rwmb-input {
34
- width: 100%;
35
- }
36
- .rwmb-label ~ .rwmb-input {
37
- width: 75%;
38
- }
39
- .rwmb-input h4 {
40
- margin: 0;
41
- }
42
- .rwmb-textarea {
43
- resize: vertical;
44
- }
45
-
46
- /* Clone */
47
- .rwmb-clone {
48
- min-height: 24px;
49
- margin-bottom: 10px;
50
- position: relative;
51
- clear: both;
52
- background: #fff;
53
- }
54
- .rwmb-clone > input[type='radio'],
55
- .rwmb-clone > input[type='checkbox'] {
56
- margin: 6px 0 0 4px;
57
- }
58
- .rwmb-button.remove-clone {
59
- text-decoration: none;
60
- color: #fff;
61
- background: #c00;
62
- border-radius: 50%;
63
- display: inline-block;
64
- position: absolute;
65
- top: 0;
66
- right: 0;
67
- }
68
- .remove-clone:focus {
69
- outline: 0;
70
- box-shadow: none;
71
- }
72
- .rwmb-button.add-clone {
73
- margin-top: 5px;
74
- }
75
- .rwmb-clone-icon {
76
- cursor: move;
77
- background: url(../img/drag_icon.gif) no-repeat;
78
- height: 23px;
79
- width: 15px;
80
- vertical-align: top;
81
- display: inline-block;
82
- position: absolute;
83
- left: 0;
84
- top: 0;
85
- }
86
- .rwmb-clone-placeholder {
87
- background: #fcf8e3;
88
- border: 1px solid #faebcc;
89
- display: block;
90
- }
91
- .rwmb-sort-clone {
92
- padding-left: 15px;
93
- }
94
-
95
- /* jQuery validation */
96
- label.error {
97
- padding-left: 3px;
98
- color: red;
99
- }
100
- input.error,
101
- textarea.error,
102
- select.error {
103
- border-color: #c00 !important;
104
- background: #ffebe8 !important;
105
- }
106
-
107
-
108
- /* =Styles for 'side' meta boxes
109
- -------------------------------------------------------------- */
110
-
111
- #side-sortables .rwmb-label,
112
- #side-sortables .rwmb-input {
113
- width: 100%;
114
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/upload.css DELETED
@@ -1,31 +0,0 @@
1
- .rwmb-upload-area {
2
- position: relative;
3
- padding-top: 0;
4
- margin-top: 0;
5
- height: 200px;
6
- border: 4px dashed #ddd;
7
- }
8
-
9
- .rwmb-upload-inside {
10
- text-align: center;
11
- position: absolute;
12
- left: 0;
13
- right:0;
14
- top: 50%;
15
- transform: translateY(-50%);
16
- -webkit-transform: translateY(-50%);
17
- -moz-transform: translateY(-50%);
18
- -ms-transform: translateY(-50%);
19
- margin-top: 10px;
20
- }
21
-
22
- .rwmb-upload-inside p, .rwmb-upload-inside h3 {
23
- text-align: center;
24
- }
25
-
26
- .rwmb-upload-inside h3 {
27
- font-size: 20px;
28
- line-height: 28px;
29
- font-weight: 400;
30
- margin: 0;
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/css/wysiwyg.css DELETED
@@ -1,6 +0,0 @@
1
- .rwmb-field .mceIframeContainer {
2
- background: #fff;
3
- }
4
- .rwmb-wysiwyg-clone {
5
- padding-top: 20px;
6
- }
 
 
 
 
 
 
meta-box/img/drag_icon.gif DELETED
Binary file
meta-box/img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png DELETED
Binary file
meta-box/img/jqueryui/ui-bg_flat_75_ffffff_40x100.png DELETED
Binary file
meta-box/img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png DELETED
Binary file
meta-box/img/jqueryui/ui-bg_glass_65_ffffff_1x400.png DELETED
Binary file
meta-box/img/jqueryui/ui-bg_glass_75_dadada_1x400.png DELETED
Binary file
meta-box/img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png DELETED
Binary file
meta-box/img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png DELETED
Binary file
meta-box/img/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png DELETED
Binary file
meta-box/img/jqueryui/ui-icons_222222_256x240.png DELETED
Binary file
meta-box/img/jqueryui/ui-icons_2e83ff_256x240.png DELETED
Binary file
meta-box/img/jqueryui/ui-icons_454545_256x240.png DELETED
Binary file
meta-box/img/jqueryui/ui-icons_888888_256x240.png DELETED
Binary file
meta-box/img/jqueryui/ui-icons_cd0a0a_256x240.png DELETED
Binary file
meta-box/img/loader.gif DELETED
Binary file
meta-box/inc/core.php DELETED
@@ -1,142 +0,0 @@
1
- <?php
2
- /**
3
- * The plugin core class which initialize plugin's code.
4
- * @package Meta Box
5
- */
6
-
7
- /**
8
- * The Meta Box core class.
9
- * @package Meta Box
10
- */
11
- class RWMB_Core
12
- {
13
- /**
14
- * Stores all registered meta boxes
15
- * @var array
16
- */
17
- private static $meta_boxes = null;
18
-
19
- /**
20
- * Register hooks.
21
- */
22
- public function __construct()
23
- {
24
- $plugin = 'meta-box/meta-box.php';
25
- add_filter( "plugin_action_links_$plugin", array( $this, 'plugin_links' ) );
26
- add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
27
- add_action( 'admin_init', array( $this, 'register_meta_boxes' ) );
28
- add_action( 'edit_page_form', array( $this, 'fix_page_template' ) );
29
- }
30
-
31
- /**
32
- * Add links to Documentation and Extensions in plugin's list of action links.
33
- *
34
- * @since 4.3.11
35
- * @param array $links Array of action links
36
- * @return array
37
- */
38
- public function plugin_links( $links )
39
- {
40
- $links[] = '<a href="https://metabox.io/docs/">' . __( 'Documentation', 'meta-box' ) . '</a>';
41
- $links[] = '<a href="https://metabox.io/plugins/">' . __( 'Extensions', 'meta-box' ) . '</a>';
42
- return $links;
43
- }
44
-
45
- /**
46
- * Load plugin translation.
47
- */
48
- public function load_textdomain()
49
- {
50
- load_plugin_textdomain( 'meta-box', false, plugin_basename( RWMB_DIR ) . '/lang/' );
51
- }
52
-
53
- /**
54
- * Register meta boxes.
55
- * Advantages:
56
- * - prevents incorrect hook.
57
- * - no need to check for class existences.
58
- */
59
- public function register_meta_boxes()
60
- {
61
- $meta_boxes = self::get_meta_boxes();
62
- foreach ( $meta_boxes as $meta_box )
63
- {
64
- new RW_Meta_Box( $meta_box );
65
- }
66
- }
67
-
68
- /**
69
- * Get registered meta boxes via a filter.
70
- * Advantages:
71
- * - prevents duplicated global variables.
72
- * - allows users to remove/hide registered meta boxes.
73
- */
74
- public static function get_meta_boxes()
75
- {
76
- if ( null === self::$meta_boxes )
77
- {
78
- self::$meta_boxes = apply_filters( 'rwmb_meta_boxes', array() );
79
- self::$meta_boxes = empty( self::$meta_boxes ) || ! is_array( self::$meta_boxes ) ? array() : self::$meta_boxes;
80
- }
81
- return self::$meta_boxes;
82
- }
83
-
84
- /**
85
- * WordPress will prevent post data saving if a page template has been selected that does not exist
86
- * This is especially a problem when switching to our theme, and old page templates are in the post data
87
- * Unset the page template if the page does not exist to allow the post to save
88
- *
89
- * @param WP_Post $post
90
- * @since 4.3.10
91
- */
92
- public function fix_page_template( WP_Post $post )
93
- {
94
- $template = get_post_meta( $post->ID, '_wp_page_template', true );
95
- $page_templates = wp_get_theme()->get_page_templates();
96
-
97
- // If the template doesn't exists, remove the data to allow WordPress to save
98
- if ( ! isset( $page_templates[$template] ) )
99
- {
100
- delete_post_meta( $post->ID, '_wp_page_template' );
101
- }
102
- }
103
-
104
- /**
105
- * Apply various filters based on field type, id.
106
- * Filters:
107
- * - rwmb_{$name}
108
- * - rwmb_{$field['type']}_{$name}
109
- * - rwmb_{$field['id']}_{$name}
110
- * @return mixed
111
- */
112
- public static function filter()
113
- {
114
- $args = func_get_args();
115
-
116
- // 3 first params must be: filter name, value, field. Other params will be used for filters.
117
- $name = array_shift( $args );
118
- $value = array_shift( $args );
119
- $field = array_shift( $args );
120
-
121
- // List of filters
122
- $filters = array(
123
- 'rwmb_' . $name,
124
- 'rwmb_' . $field['type'] . '_' . $name,
125
- );
126
- if ( isset( $field['id'] ) )
127
- {
128
- $filters[] = 'rwmb_' . $field['id'] . '_' . $name;
129
- }
130
-
131
- // Filter params: value, field, other params. Note: value is changed after each run.
132
- array_unshift( $args, $field );
133
- foreach ( $filters as $filter )
134
- {
135
- $filter_args = $args;
136
- array_unshift( $filter_args, $value );
137
- $value = apply_filters_ref_array( $filter, $filter_args );
138
- }
139
-
140
- return $value;
141
- }
142
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/inc/field.php DELETED
@@ -1,495 +0,0 @@
1
- <?php
2
- /**
3
- * Base field class which defines all necessary methods.
4
- * Fields must inherit this class and overwrite methods with its own.
5
- */
6
- abstract class RWMB_Field
7
- {
8
- /**
9
- * Add actions
10
- *
11
- * @return void
12
- */
13
- static function add_actions()
14
- {
15
- }
16
-
17
- /**
18
- * Enqueue scripts and styles
19
- *
20
- * @return void
21
- */
22
- static function admin_enqueue_scripts()
23
- {
24
- }
25
-
26
- /**
27
- * Show field HTML
28
- * Filters are put inside this method, not inside methods such as "meta", "html", "begin_html", etc.
29
- * That ensures the returned value are always been applied filters
30
- * This method is not meant to be overwritten in specific fields
31
- *
32
- * @param array $field
33
- * @param bool $saved
34
- *
35
- * @return string
36
- */
37
- static function show( $field, $saved )
38
- {
39
- $post = get_post();
40
- $post_id = isset( $post->ID ) ? $post->ID : 0;
41
-
42
- $field_class = RW_Meta_Box::get_class_name( $field );
43
- $meta = call_user_func( array( $field_class, 'meta' ), $post_id, $saved, $field );
44
- $meta = RWMB_Core::filter( 'field_meta', $meta, $field, $saved );
45
-
46
- $begin = call_user_func( array( $field_class, 'begin_html' ), $meta, $field );
47
- $begin = RWMB_Core::filter( 'begin_html', $begin, $field, $meta );
48
-
49
- // Separate code for cloneable and non-cloneable fields to make easy to maintain
50
-
51
- // Cloneable fields
52
- if ( $field['clone'] )
53
- {
54
- $field_html = '';
55
-
56
- /**
57
- * Note: $meta must contain value so that the foreach loop runs!
58
- * @see meta()
59
- */
60
- foreach ( $meta as $index => $sub_meta )
61
- {
62
- $sub_field = $field;
63
- $sub_field['field_name'] = $field['field_name'] . "[{$index}]";
64
- if ( $index > 0 )
65
- {
66
- if ( isset( $sub_field['address_field'] ) )
67
- $sub_field['address_field'] = $field['address_field'] . "_{$index}";
68
- $sub_field['id'] = $field['id'] . "_{$index}";
69
- }
70
- if ( $field['multiple'] )
71
- $sub_field['field_name'] .= '[]';
72
-
73
- // Wrap field HTML in a div with class="rwmb-clone" if needed
74
- $class = "rwmb-clone rwmb-{$field['type']}-clone";
75
- $sort_icon = '';
76
- if ( $field['sort_clone'] )
77
- {
78
- $class .= ' rwmb-sort-clone';
79
- $sort_icon = "<a href='javascript:;' class='rwmb-clone-icon'></a>";
80
- }
81
- $input_html = "<div class='$class'>" . $sort_icon;
82
-
83
- // Call separated methods for displaying each type of field
84
- $input_html .= call_user_func( array( $field_class, 'html' ), $sub_meta, $sub_field );
85
- $input_html = RWMB_Core::filter( 'html', $input_html, $sub_field, $sub_meta );
86
-
87
- // Remove clone button
88
- $input_html .= call_user_func( array( $field_class, 'remove_clone_button' ), $sub_field );
89
-
90
- $input_html .= '</div>';
91
-
92
- $field_html .= $input_html;
93
- }
94
- }
95
- // Non-cloneable fields
96
- else
97
- {
98
- // Call separated methods for displaying each type of field
99
- $field_html = call_user_func( array( $field_class, 'html' ), $meta, $field );
100
- $field_html = RWMB_Core::filter( 'html', $field_html, $field, $meta );
101
- }
102
-
103
- $end = call_user_func( array( $field_class, 'end_html' ), $meta, $field );
104
- $end = RWMB_Core::filter( 'end_html', $end, $field, $meta );
105
-
106
- $html = RWMB_Core::filter( 'wrapper_html', "$begin$field_html$end", $field, $meta );
107
-
108
- // Display label and input in DIV and allow user-defined classes to be appended
109
- $classes = "rwmb-field rwmb-{$field['type']}-wrapper " . $field['class'] ;
110
- if ( 'hidden' === $field['type'] )
111
- $classes .= ' hidden';
112
- if ( ! empty( $field['required'] ) )
113
- $classes .= ' required';
114
-
115
- $outer_html = sprintf(
116
- $field['before'] . '<div class="%s">%s</div>' . $field['after'],
117
- trim( $classes ),
118
- $html
119
- );
120
- $outer_html = RWMB_Core::filter( 'outer_html', $outer_html, $field, $meta );
121
-
122
- echo $outer_html;
123
- }
124
-
125
- /**
126
- * Get field HTML
127
- *
128
- * @param mixed $meta
129
- * @param array $field
130
- *
131
- * @return string
132
- */
133
- static function html( $meta, $field )
134
- {
135
- return '';
136
- }
137
-
138
- /**
139
- * Show begin HTML markup for fields
140
- *
141
- * @param mixed $meta
142
- * @param array $field
143
- *
144
- * @return string
145
- */
146
- static function begin_html( $meta, $field )
147
- {
148
- $field_label = '';
149
- if ( $field['name'] )
150
- {
151
- $field_label = sprintf(
152
- '<div class="rwmb-label"><label for="%s">%s</label></div>',
153
- $field['id'],
154
- $field['name']
155
- );
156
- }
157
-
158
- $data_max_clone = is_numeric( $field['max_clone'] ) && $field['max_clone'] > 1 ? ' data-max-clone=' . $field['max_clone'] : '';
159
-
160
- $input_open = sprintf(
161
- '<div class="rwmb-input"%s>',
162
- $data_max_clone
163
- );
164
-
165
- return $field_label . $input_open;
166
- }
167
-
168
- /**
169
- * Show end HTML markup for fields
170
- *
171
- * @param mixed $meta
172
- * @param array $field
173
- *
174
- * @return string
175
- */
176
- static function end_html( $meta, $field )
177
- {
178
- $button = $field['clone'] ? call_user_func( array( RW_Meta_Box::get_class_name( $field ), 'add_clone_button' ), $field ) : '';
179
- $desc = $field['desc'] ? "<p id='{$field['id']}_description' class='description'>{$field['desc']}</p>" : '';
180
-
181
- // Closes the container
182
- $html = "{$button}{$desc}</div>";
183
-
184
- return $html;
185
- }
186
-
187
- /**
188
- * Add clone button
189
- *
190
- * @param array $field Field parameter
191
- *
192
- * @return string $html
193
- */
194
- static function add_clone_button( $field )
195
- {
196
- $text = apply_filters( 'rwmb_add_clone_button_text', __( '+ Add more', 'meta-box' ), $field );
197
- return "<a href='#' class='rwmb-button button-primary add-clone'>$text</a>";
198
- }
199
-
200
- /**
201
- * Remove clone button
202
- *
203
- * @param array $field Field parameter
204
- *
205
- * @return string $html
206
- */
207
- static function remove_clone_button( $field )
208
- {
209
- $icon = '<i class="dashicons dashicons-minus"></i>';
210
- $text = apply_filters( 'rwmb_remove_clone_button_text', $icon, $field );
211
- return "<a href='#' class='rwmb-button remove-clone'>$text</a>";
212
- }
213
-
214
- /**
215
- * Get meta value
216
- *
217
- * @param int $post_id
218
- * @param bool $saved
219
- * @param array $field
220
- *
221
- * @return mixed
222
- */
223
- static function meta( $post_id, $saved, $field )
224
- {
225
- /**
226
- * For special fields like 'divider', 'heading' which don't have ID, just return empty string
227
- * to prevent notice error when displaying fields
228
- */
229
- if ( empty( $field['id'] ) )
230
- return '';
231
-
232
- $single = $field['clone'] || ! $field['multiple'];
233
- $meta = get_post_meta( $post_id, $field['id'], $single );
234
-
235
- // Use $field['std'] only when the meta box hasn't been saved (i.e. the first time we run)
236
- $meta = ( ! $saved && '' === $meta || array() === $meta ) ? $field['std'] : $meta;
237
-
238
- // Escape attributes
239
- $meta = call_user_func( array( RW_Meta_Box::get_class_name( $field ), 'esc_meta' ), $meta );
240
-
241
- // Make sure meta value is an array for clonable and multiple fields
242
- if ( $field['clone'] || $field['multiple'] )
243
- {
244
- if ( empty( $meta ) || ! is_array( $meta ) )
245
- {
246
- /**
247
- * Note: if field is clonable, $meta must be an array with values
248
- * so that the foreach loop in self::show() runs properly
249
- * @see self::show()
250
- */
251
- $meta = $field['clone'] ? array( '' ) : array();
252
- }
253
- }
254
-
255
- return $meta;
256
- }
257
-
258
- /**
259
- * Escape meta for field output
260
- *
261
- * @param mixed $meta
262
- *
263
- * @return mixed
264
- */
265
- static function esc_meta( $meta )
266
- {
267
- return is_array( $meta ) ? array_map( __METHOD__, $meta ) : esc_attr( $meta );
268
- }
269
-
270
- /**
271
- * Set value of meta before saving into database
272
- *
273
- * @param mixed $new
274
- * @param mixed $old
275
- * @param int $post_id
276
- * @param array $field
277
- *
278
- * @return int
279
- */
280
- static function value( $new, $old, $post_id, $field )
281
- {
282
- return $new;
283
- }
284
-
285
- /**
286
- * Save meta value
287
- *
288
- * @param $new
289
- * @param $old
290
- * @param $post_id
291
- * @param $field
292
- */
293
- static function save( $new, $old, $post_id, $field )
294
- {
295
- $name = $field['id'];
296
-
297
- // Remove post meta if it's empty
298
- if ( '' === $new || array() === $new )
299
- {
300
- delete_post_meta( $post_id, $name );
301
- return;
302
- }
303
-
304
- // If field is cloneable, value is saved as a single entry in the database
305
- if ( $field['clone'] )
306
- {
307
- // Reset indexes
308
- $new = array_values( (array) $new );
309
- foreach ( $new as $k => $v )
310
- {
311
- if ( '' === $v )
312
- unset( $new[$k] );
313
- }
314
- update_post_meta( $post_id, $name, $new );
315
- return;
316
- }
317
-
318
- // If field is multiple, value is saved as multiple entries in the database (WordPress behaviour)
319
- if ( $field['multiple'] )
320
- {
321
- $new_values = array_diff( $new, $old );
322
- foreach ( $new_values as $new_value )
323
- {
324
- add_post_meta( $post_id, $name, $new_value, false );
325
- }
326
- $old_values = array_diff( $old, $new );
327
- foreach ( $old_values as $old_value )
328
- {
329
- delete_post_meta( $post_id, $name, $old_value );
330
- }
331
- return;
332
- }
333
-
334
- // Default: just update post meta
335
- update_post_meta( $post_id, $name, $new );
336
- }
337
-
338
- /**
339
- * Normalize parameters for field
340
- *
341
- * @param array $field
342
- *
343
- * @return array
344
- */
345
- static function normalize( $field )
346
- {
347
- $field = wp_parse_args( $field, array(
348
- 'id' => '',
349
- 'name' => '',
350
- 'multiple' => false,
351
- 'std' => '',
352
- 'desc' => '',
353
- 'format' => '',
354
- 'before' => '',
355
- 'after' => '',
356
- 'field_name' => isset( $field['id'] ) ? $field['id'] : '',
357
- 'placeholder' => '',
358
-
359
- 'clone' => false,
360
- 'max_clone' => 0,
361
- 'sort_clone' => false,
362
-
363
- 'class' => '',
364
- 'disabled' => false,
365
- 'required' => false,
366
- 'attributes' => array(),
367
- ) );
368
-
369
- return $field;
370
- }
371
-
372
- /**
373
- * Get the attributes for a field
374
- *
375
- * @param array $field
376
- * @param mixed $value
377
- *
378
- * @return array
379
- */
380
- static function get_attributes( $field, $value = null )
381
- {
382
- $attributes = wp_parse_args( $field['attributes'], array(
383
- 'disabled' => $field['disabled'],
384
- 'required' => $field['required'],
385
- 'class' => "rwmb-{$field['type']}",
386
- 'id' => $field['id'],
387
- 'name' => $field['field_name'],
388
- ) );
389
-
390
- return $attributes;
391
- }
392
-
393
- /**
394
- * Renders an attribute array into an html attributes string
395
- *
396
- * @param array $attributes
397
- *
398
- * @return string
399
- */
400
- static function render_attributes( $attributes )
401
- {
402
- $output = '';
403
- foreach ( $attributes as $key => $value )
404
- {
405
- if ( false === $value || '' === $value )
406
- {
407
- continue;
408
- }
409
- $output .= sprintf( true === $value ? ' %s' : ' %s="%s"', $key, esc_attr( $value ) );
410
- }
411
- return $output;
412
- }
413
-
414
- /**
415
- * Get the field value
416
- * The difference between this function and 'meta' function is 'meta' function always returns the escaped value
417
- * of the field saved in the database, while this function returns more meaningful value of the field, for ex.:
418
- * for file/image: return array of file/image information instead of file/image IDs
419
- *
420
- * Each field can extend this function and add more data to the returned value.
421
- * See specific field classes for details.
422
- *
423
- * @param array $field Field parameters
424
- * @param array $args Additional arguments. Rarely used. See specific fields for details
425
- * @param int|null $post_id Post ID. null for current post. Optional.
426
- *
427
- * @return mixed Field value
428
- */
429
- static function get_value( $field, $args = array(), $post_id = null )
430
- {
431
- if ( ! $post_id )
432
- $post_id = get_the_ID();
433
-
434
- /**
435
- * Get raw meta value in the database, no escape
436
- * Very similar to self::meta() function
437
- */
438
-
439
- /**
440
- * For special fields like 'divider', 'heading' which don't have ID, just return empty string
441
- * to prevent notice error when display in fields
442
- */
443
- $value = '';
444
- if ( ! empty( $field['id'] ) )
445
- {
446
- $single = $field['clone'] || ! $field['multiple'];
447
- $value = get_post_meta( $post_id, $field['id'], $single );
448
-
449
- // Make sure meta value is an array for clonable and multiple fields
450
- if ( $field['clone'] || $field['multiple'] )
451
- {
452
- $value = is_array( $value ) && $value ? $value : array();
453
- }
454
- }
455
-
456
- /**
457
- * Return the meta value by default.
458
- * For specific fields, the returned value might be different. See each field class for details
459
- */
460
- return $value;
461
- }
462
-
463
- /**
464
- * Output the field value
465
- * Depends on field value and field types, each field can extend this method to output its value in its own way
466
- * See specific field classes for details.
467
- *
468
- * Note: we don't echo the field value directly. We return the output HTML of field, which will be used in
469
- * rwmb_the_field function later.
470
- *
471
- * @use self::get_value()
472
- * @see rwmb_the_value()
473
- *
474
- * @param array $field Field parameters
475
- * @param array $args Additional arguments. Rarely used. See specific fields for details
476
- * @param int|null $post_id Post ID. null for current post. Optional.
477
- *
478
- * @return string HTML output of the field
479
- */
480
- static function the_value( $field, $args = array(), $post_id = null )
481
- {
482
- $value = call_user_func( array( RW_Meta_Box::get_class_name( $field ), 'get_value' ), $field, $args, $post_id );
483
- $output = $value;
484
- if ( is_array( $value ) )
485
- {
486
- $output = '<ul>';
487
- foreach ( $value as $subvalue )
488
- {
489
- $output .= '<li>' . $subvalue . '</li>';
490
- }
491
- $output .= '</ul>';
492
- }
493
- return $output;
494
- }
495
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/inc/fields/autocomplete.php DELETED
@@ -1,120 +0,0 @@
1
- <?php
2
- /**
3
- * Autocomplete field class.
4
- */
5
- class RWMB_Autocomplete_Field extends RWMB_Multiple_Values_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles.
9
- */
10
- static function admin_enqueue_scripts()
11
- {
12
- wp_enqueue_style( 'rwmb-autocomplete', RWMB_CSS_URL . 'autocomplete.css', array( 'wp-admin' ), RWMB_VER );
13
- wp_enqueue_script( 'rwmb-autocomplete', RWMB_JS_URL . 'autocomplete.js', array( 'jquery-ui-autocomplete' ), RWMB_VER, true );
14
- wp_localize_script( 'rwmb-autocomplete', 'RWMB_Autocomplete', array( 'delete' => __( 'Delete', 'meta-box' ) ) );
15
- }
16
-
17
- /**
18
- * Get field HTML
19
- *
20
- * @param mixed $meta
21
- * @param array $field
22
- * @return string
23
- */
24
- static function html( $meta, $field )
25
- {
26
- if ( ! is_array( $meta ) )
27
- $meta = array( $meta );
28
-
29
- $field = apply_filters( 'rwmb_autocomplete_field', $field, $meta );
30
- $options = $field['options'];
31
-
32
- if ( ! is_string( $field['options'] ) )
33
- {
34
- $options = array();
35
- foreach ( (array) $field['options'] as $value => $label )
36
- {
37
- $options[] = array(
38
- 'value' => $value,
39
- 'label' => $label,
40
- );
41
- }
42
- $options = wp_json_encode( $options );
43
- }
44
-
45
- // Input field that triggers autocomplete.
46
- // This field doesn't store field values, so it doesn't have "name" attribute.
47
- // The value(s) of the field is store in hidden input(s). See below.
48
- $html = sprintf(
49
- '<input type="text" class="rwmb-autocomplete-search" size="%s">
50
- <input type="hidden" name="%s" class="rwmb-autocomplete" data-options="%s" disabled>',
51
- $field['size'],
52
- $field['field_name'],
53
- esc_attr( $options )
54
- );
55
-
56
- $html .= '<div class="rwmb-autocomplete-results">';
57
-
58
- // Each value is displayed with label and 'Delete' option
59
- // The hidden input has to have ".rwmb-*" class to make clone work
60
- $tpl = '
61
- <div class="rwmb-autocomplete-result">
62
- <div class="label">%s</div>
63
- <div class="actions">%s</div>
64
- <input type="hidden" class="rwmb-autocomplete-value" name="%s" value="%s">
65
- </div>
66
- ';
67
-
68
- if ( is_array( $field['options'] ) )
69
- {
70
- foreach ( $field['options'] as $value => $label )
71
- {
72
- if ( in_array( $value, $meta ) )
73
- {
74
- $html .= sprintf(
75
- $tpl,
76
- $label,
77
- __( 'Delete', 'meta-box' ),
78
- $field['field_name'],
79
- $value
80
- );
81
- }
82
- }
83
- }
84
- else
85
- {
86
- foreach ( $meta as $value )
87
- {
88
- if ( empty( $value ) )
89
- continue;
90
- $label = apply_filters( 'rwmb_autocomplete_result_label', $value, $field );
91
- $html .= sprintf(
92
- $tpl,
93
- $label,
94
- __( 'Delete', 'meta-box' ),
95
- $field['field_name'],
96
- $value
97
- );
98
- }
99
- }
100
-
101
- $html .= '</div>'; // .rwmb-autocomplete-results
102
-
103
- return $html;
104
- }
105
-
106
- /**
107
- * Normalize parameters for field
108
- *
109
- * @param array $field
110
- * @return array
111
- */
112
- static function normalize( $field )
113
- {
114
- $field = parent::normalize( $field );
115
- $field = wp_parse_args( $field, array(
116
- 'size' => 30,
117
- ) );
118
- return $field;
119
- }
120
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/inc/fields/button.php DELETED
@@ -1,47 +0,0 @@
1
- <?php
2
- /**
3
- * Button field class.
4
- */
5
- class RWMB_Button_Field extends RWMB_Field
6
- {
7
- /**
8
- * Get field HTML
9
- *
10
- * @param mixed $meta
11
- * @param array $field
12
- * @return string
13
- */
14
- static function html( $meta, $field )
15
- {
16
- $attributes = self::get_attributes( $field );
17
- return sprintf( '<a href="#" %s>%s</a>', self::render_attributes( $attributes ), $field['std'] );
18
- }
19
-
20
- /**
21
- * Normalize parameters for field
22
- *
23
- * @param array $field
24
- * @return array
25
- */
26
- static function normalize( $field )
27
- {
28
- $field = parent::normalize( $field );
29
- $field['std'] = $field['std'] ? $field['std'] : __( 'Click me', 'meta-box' );
30
- return $field;
31
- }
32
-
33
- /**
34
- * Get the attributes for a field
35
- *
36
- * @param array $field
37
- * @param mixed $value
38
- * @return array
39
- */
40
- static function get_attributes( $field, $value = null )
41
- {
42
- $attributes = parent::get_attributes( $field, $value );
43
- $attributes['class'] .= ' button hide-if-no-js';
44
-
45
- return $attributes;
46
- }
47
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/inc/fields/checkbox-list.php DELETED
@@ -1,19 +0,0 @@
1
- <?php
2
- /**
3
- * Checkbox list field class.
4
- */
5
- class RWMB_Checkbox_List_Field extends RWMB_Input_List_Field
6
- {
7
- /**
8
- * Normalize parameters for field
9
- * @param array $field
10
- * @return array
11
- */
12
- static function normalize( $field )
13
- {
14
- $field['multiple'] = true;
15
- $field = parent::normalize( $field );
16
-
17
- return $field;
18
- }
19
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/inc/fields/checkbox.php DELETED
@@ -1,87 +0,0 @@
1
- <?php
2
- /**
3
- * Checkbox field class.
4
- */
5
- class RWMB_Checkbox_Field extends RWMB_Input_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles.
9
- */
10
- static function admin_enqueue_scripts()
11
- {
12
- wp_enqueue_style( 'rwmb-checkbox', RWMB_CSS_URL . 'checkbox.css', array(), RWMB_VER );
13
- }
14
-
15
- /**
16
- * Get field HTML
17
- *
18
- * @param mixed $meta
19
- * @param array $field
20
- * @return string
21
- */
22
- static function html( $meta, $field )
23
- {
24
- $attributes = self::get_attributes( $field, 1 );
25
- return sprintf(
26
- '<input %s %s>',
27
- self::render_attributes( $attributes ),
28
- checked( ! empty( $meta ), 1, false )
29
- );
30
- }
31
-
32
- /**
33
- * Get the attributes for a field.
34
- *
35
- * @param array $field
36
- * @param mixed $value
37
- * @return array
38
- */
39
- static function get_attributes( $field, $value = null )
40
- {
41
- $attributes = parent::get_attributes( $field, $value );
42
- $attributes['type'] = 'checkbox';
43
- $attributes['list'] = false;
44
-
45
- return $attributes;
46
- }
47
-
48
- /**
49
- * Set the value of checkbox to 1 or 0 instead of 'checked' and empty string
50
- * This prevents using default value once the checkbox has been unchecked
51
- *
52
- * @link https://github.com/rilwis/meta-box/issues/6
53
- *
54
- * @param mixed $new
55
- * @param mixed $old
56
- * @param int $post_id
57
- * @param array $field
58
- *
59
- * @return int
60
- */
61
- static function value( $new, $old, $post_id, $field )
62
- {
63
- return empty( $new ) ? 0 : 1;
64
- }
65
-
66
- /**
67
- * Output the field value
68
- * Display 'Yes' or 'No' instead of '1' and '0'
69
- *
70
- * Note: we don't echo the field value directly. We return the output HTML of field, which will be used in
71
- * rwmb_the_field function later.
72
- *
73
- * @use self::get_value()
74
- * @see rwmb_the_value()
75
- *
76
- * @param array $field Field parameters
77
- * @param array $args Additional arguments. Rarely used. See specific fields for details
78
- * @param int|null $post_id Post ID. null for current post. Optional.
79
- *
80
- * @return string HTML output of the field
81
- */
82
- static function the_value( $field, $args = array(), $post_id = null )
83
- {
84
- $value = self::get_value( $field, $args, $post_id );
85
- return $value ? __( 'Yes', 'meta-box' ) : __( 'No', 'meta-box' );
86
- }
87
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/inc/fields/choice.php DELETED
@@ -1,160 +0,0 @@
1
- <?php
2
- /**
3
- * Abstract class for any kind of choice field.
4
- */
5
- abstract class RWMB_Choice_Field extends RWMB_Field
6
- {
7
- /**
8
- * Walk options
9
- *
10
- * @param mixed $meta
11
- * @param array $field
12
- * @param mixed $options
13
- * @param mixed $db_fields
14
- * @return string
15
- */
16
- public static function walk( $options, $db_fields, $meta, $field )
17
- {
18
- return '';
19
- }
20
-
21
- /**
22
- * Get field HTML
23
- *
24
- * @param mixed $meta
25
- * @param array $field
26
- * @return string
27
- */
28
- public static function html( $meta, $field )
29
- {
30
- $field_class = RW_Meta_Box::get_class_name( $field );
31
- $meta = (array) $meta;
32
- $options = call_user_func( array( $field_class, 'get_options' ), $field );
33
- $db_fields = call_user_func( array( $field_class, 'get_db_fields' ), $field );
34
-
35
- return call_user_func( array( $field_class, 'walk' ), $options, $db_fields, $meta, $field );
36
- }
37
-
38
- /**
39
- * Normalize parameters for field
40
- *
41
- * @param array $field
42
- * @return array
43
- */
44
- public static function normalize( $field )
45
- {
46
- $field = parent::normalize( $field );
47
- $field = wp_parse_args( $field, array(
48
- 'flatten' => true,
49
- 'options' => array(),
50
- ) );
51
-
52
- return $field;
53
- }
54
-
55
- /**
56
- * Get field names of object to be used by walker
57
- *
58
- * @return array
59
- */
60
- public static function get_db_fields()
61
- {
62
- return array(
63
- 'parent' => 'parent',
64
- 'id' => 'value',
65
- 'label' => 'label',
66
- );
67
- }
68
-
69
- /**
70
- * Get options for walker
71
- *
72
- * @param array $field
73
- *
74
- * @return array
75
- */
76
- public static function get_options( $field )
77
- {
78
- $options = array();
79
- foreach ( (array) $field['options'] as $value => $label )
80
- {
81
- $option = is_array( $label ) ? $label : array( 'label' => (string) $label, 'value' => (string) $value );
82
- if ( isset( $option['label'] ) && isset( $option['value'] ) )
83
- $options[$option['value']] = (object) $option;
84
- }
85
- return $options;
86
- }
87
-
88
- /**
89
- * Output the field value
90
- * Display unordered list of option labels, not option values
91
- *
92
- * @param array $field Field parameters
93
- * @param array $args Additional arguments. Not used for these fields.
94
- * @param int|null $post_id Post ID. null for current post. Optional.
95
- *
96
- * @return string Link(s) to post
97
- */
98
- public static function the_value( $field, $args = array(), $post_id = null )
99
- {
100
- $field_class = RW_Meta_Box::get_class_name( $field );
101
- $value = call_user_func( array( $field_class, 'get_value' ), $field, $args, $post_id );
102
-
103
- if ( ! $value )
104
- return '';
105
-
106
- if ( $field['clone'] && $field['multiple'] )
107
- {
108
- $output = '<ul>';
109
- foreach ( $value as $subvalue )
110
- {
111
- $output .= '<li>';
112
- $output .= call_user_func( array( $field_class, 'list_option_labels' ), $subvalue, $field );
113
- $output .= '</li>';
114
- }
115
- $output .= '</ul>';
116
- }
117
- elseif ( $field['clone'] || $field['multiple'] )
118
- {
119
- $output = call_user_func( array( $field_class, 'list_option_labels' ), $value, $field );
120
- }
121
- else
122
- {
123
- $output = call_user_func( array( $field_class, 'get_option_label' ), $value, $field );
124
- }
125
- return $output;
126
- }
127
-
128
- /**
129
- * List option labels
130
- *
131
- * @param array $meta
132
- * @param array $field Field parameter
133
- * @return string
134
- */
135
- public static function list_option_labels( $meta, $field )
136
- {
137
- $field_class = RW_Meta_Box::get_class_name( $field );
138
- $output = '<ul>';
139
- foreach ( $meta as $m )
140
- {
141
- $output .= sprintf( '<li>%s</li>', call_user_func( array( $field_class, 'get_option_label' ), $m, $field ) );
142
- }
143
-
144
- return $output . '</ul>';
145
- }
146
-
147
- /**
148
- * Get option label
149
- *
150
- * @param string $value Option value
151
- * @param array $field Field parameter
152
- *
153
- * @return string
154
- */
155
- public static function get_option_label( $value, $field )
156
- {
157
- $options = call_user_func( array( RW_Meta_Box::get_class_name( $field ), 'get_options' ), $field );
158
- return $options[$value]->label;
159
- }
160
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/inc/fields/color.php DELETED
@@ -1,85 +0,0 @@
1
- <?php
2
- /**
3
- * Color field class.
4
- */
5
- class RWMB_Color_Field extends RWMB_Text_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- */
10
- static function admin_enqueue_scripts()
11
- {
12
- wp_enqueue_style( 'rwmb-color', RWMB_CSS_URL . 'color.css', array( 'wp-color-picker' ), RWMB_VER );
13
- wp_enqueue_script( 'rwmb-color', RWMB_JS_URL . 'color.js', array( 'wp-color-picker' ), RWMB_VER, true );
14
- }
15
-
16
- /**
17
- * Normalize parameters for field.
18
- *
19
- * @param array $field
20
- * @return array
21
- */
22
- static function normalize( $field )
23
- {
24
- $field = wp_parse_args( $field, array(
25
- 'size' => 7,
26
- 'maxlength' => 7,
27
- 'pattern' => '^#+([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$',
28
- 'js_options' => array(),
29
- ) );
30
-
31
- $field['js_options'] = wp_parse_args( $field['js_options'], array(
32
- 'defaultColor' => false,
33
- 'hide' => true,
34
- 'palettes' => true,
35
- ) );
36
-
37
- $field = parent::normalize( $field );
38
-
39
- return $field;
40
- }
41
-
42
- /**
43
- * Get the attributes for a field
44
- *
45
- * @param array $field
46
- * @param mixed $value
47
- * @return array
48
- */
49
- static function get_attributes( $field, $value = null )
50
- {
51
- $attributes = parent::get_attributes( $field, $value );
52
- $attributes = wp_parse_args( $attributes, array(
53
- 'data-options' => wp_json_encode( $field['js_options'] ),
54
- ) );
55
-
56
- return $attributes;
57
- }
58
-
59
- /**
60
- * Output color field as a dot.
61
- * @param array $field
62
- * @param array $args
63
- * @param null $post_id
64
- * @return string
65
- */
66
- static function the_value( $field, $args = array(), $post_id = null )
67
- {
68
- $value = self::get_value( $field, $args, $post_id );
69
- $template = "<span style='display:inline-block;width:20px;height:20px;border-radius:50%%;background:%s;'></span>";
70
- if ( is_array( $value ) )
71
- {
72
- $output = '<ul>';
73
- foreach ( $value as $subvalue )
74
- {
75
- $output .= '<li>' . sprintf( $template, $subvalue ) . '</li>';
76
- }
77
- $output .= '</ul>';
78
- }
79
- else
80
- {
81
- $output = sprintf( $template, $value );
82
- }
83
- return $output;
84
- }
85
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/inc/fields/custom-html.php DELETED
@@ -1,24 +0,0 @@
1
- <?php
2
- /**
3
- * Custom HTML field class.
4
- */
5
- class RWMB_Custom_Html_Field extends RWMB_Field
6
- {
7
- /**
8
- * Get field HTML
9
- *
10
- * @param mixed $meta
11
- * @param array $field
12
- *
13
- * @return string
14
- */
15
- static function html( $meta, $field )
16
- {
17
- $html = ! empty( $field['std'] ) ? $field['std'] : '';
18
- if ( ! empty( $field['callback'] ) && is_callable( $field['callback'] ) )
19
- {
20
- $html = call_user_func_array( $field['callback'], array( $meta, $field ) );
21
- }
22
- return $html;
23
- }
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/inc/fields/date.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /**
3
- * Date field class.
4
- */
5
- class RWMB_Date_Field extends RWMB_Datetime_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- *
10
- * @return void
11
- */
12
- public static function admin_enqueue_scripts()
13
- {
14
- parent::admin_register_scripts();
15
- wp_enqueue_style( 'jquery-ui-datepicker' );
16
- wp_enqueue_script( 'rwmb-date' );
17
- }
18
-
19
- /**
20
- * Returns a date() compatible format string from the JavaScript format
21
- *
22
- * @link http://www.php.net/manual/en/function.date.php
23
- * @param array $field
24
- *
25
- * @return string
26
- */
27
- public static function translate_format( $field )
28
- {
29
- return strtr( $field['js_options']['dateFormat'], self::$date_formats );
30
- }
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/inc/fields/datetime.php DELETED
@@ -1,264 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Datetime field class.
5
- */
6
- class RWMB_Datetime_Field extends RWMB_Text_Field
7
- {
8
- /**
9
- * Translate date format from jQuery UI date picker to PHP date()
10
- * It's used to store timestamp value of the field
11
- * Missing: '!' => '', 'oo' => '', '@' => '', "''" => "'"
12
- * @var array
13
- */
14
- protected static $date_formats = array(
15
- 'd' => 'j', 'dd' => 'd', 'oo' => 'z', 'D' => 'D', 'DD' => 'l',
16
- 'm' => 'n', 'mm' => 'm', 'M' => 'M', 'MM' => 'F', 'y' => 'y', 'yy' => 'Y', 'o' => 'z',
17
- );
18
-
19
- /**
20
- * Translate time format from jQuery UI time picker to PHP date()
21
- * It's used to store timestamp value of the field
22
- * Missing: 't' => '', T' => '', 'm' => '', 's' => ''
23
- * @var array
24
- */
25
- protected static $time_formats = array(
26
- 'H' => 'G', 'HH' => 'H', 'h' => 'g', 'hh' => 'h',
27
- 'mm' => 'i', 'ss' => 's', 'l' => 'u', 'tt' => 'a', 'TT' => 'A',
28
- );
29
-
30
- /**
31
- * Register scripts and styles
32
- */
33
- public static function admin_register_scripts()
34
- {
35
- $url = RWMB_CSS_URL . 'jqueryui';
36
- wp_register_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
37
- wp_register_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
38
- wp_register_style( 'wp-datepicker', RWMB_CSS_URL . 'datepicker.css', array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
39
- wp_register_style( 'jquery-ui-datepicker', "{$url}/jquery.ui.datepicker.css", array( 'wp-datepicker' ), '1.8.17' );
40
- wp_register_style( 'jquery-ui-slider', "{$url}/jquery.ui.slider.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
41
- wp_register_style( 'jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.min.css", array( 'jquery-ui-datepicker', 'jquery-ui-slider', 'wp-datepicker' ), '1.5.0' );
42
-
43
- $url = RWMB_JS_URL . 'jqueryui';
44
- wp_register_script( 'jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.min.js", array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '1.5.0', true );
45
- wp_register_script( 'jquery-ui-timepicker-i18n', "{$url}/jquery-ui-timepicker-addon-i18n.min.js", array( 'jquery-ui-timepicker' ), '1.5.0', true );
46
-
47
- /**
48
- * Localization
49
- * Use 1 minified JS file for timepicker which contains all languages for simplicity (in version < 4.4.2 we use separated JS files).
50
- * The language is set in Javascript
51
- *
52
- * Note: we use full locale (de-DE) and fallback to short locale (de)
53
- */
54
- $locale = str_replace( '_', '-', get_locale() );
55
- $locale_short = substr( $locale, 0, 2 );
56
-
57
- $date_paths = array( 'jqueryui/datepicker-i18n/jquery.ui.datepicker-' . $locale . '.js' );
58
- if ( strlen( $locale ) > 2 )
59
- {
60
- // Also check alternate i18n filenames
61
- // (e.g. jquery.ui.datepicker-de.js instead of jquery.ui.datepicker-de-DE.js)
62
- $date_paths[] = 'jqueryui/datepicker-i18n/jquery.ui.datepicker-' . substr( $locale, 0, 2 ) . '.js';
63
- }
64
- $deps = array( 'jquery-ui-timepicker-i18n' );
65
- foreach ( $date_paths as $date_path )
66
- {
67
- if ( file_exists( RWMB_DIR . 'js/' . $date_path ) )
68
- {
69
- wp_register_script( 'jquery-ui-datepicker-i18n', RWMB_JS_URL . $date_path, array( 'jquery-ui-datepicker' ), '1.8.17', true );
70
- $deps[] = 'jquery-ui-datepicker-i18n';
71
- break;
72
- }
73
- }
74
-
75
- wp_register_script( 'rwmb-datetime', RWMB_JS_URL . 'datetime.js', $deps, RWMB_VER, true );
76
- wp_register_script( 'rwmb-date', RWMB_JS_URL . 'date.js', $deps, RWMB_VER, true );
77
- wp_register_script( 'rwmb-time', RWMB_JS_URL . 'time.js', array( 'jquery-ui-timepicker-i18n' ), RWMB_VER, true );
78
- wp_localize_script( 'rwmb-datetime', 'RWMB_Datetimepicker', array(
79
- 'locale' => $locale,
80
- 'localeShort' => $locale_short,
81
- ) );
82
- wp_localize_script( 'rwmb-time', 'RWMB_Timepicker', array(
83
- 'locale' => $locale,
84
- 'localeShort' => $locale_short,
85
- ) );
86
- }
87
-
88
- /**
89
- * Enqueue scripts and styles
90
- */
91
- public static function admin_enqueue_scripts()
92
- {
93
- self::admin_register_scripts();
94
- wp_enqueue_style( 'jquery-ui-timepicker' );
95
- wp_enqueue_script( 'rwmb-datetime' );
96
- }
97
-
98
- /**
99
- * Get field HTML
100
- *
101
- * @param mixed $meta
102
- * @param array $field
103
- *
104
- * @return string
105
- */
106
- public static function html( $meta, $field )
107
- {
108
- $output = '';
109
-
110
- if ( $field['timestamp'] )
111
- {
112
- $name = $field['field_name'];
113
- $field = wp_parse_args( array( 'field_name' => $name . '[formatted]' ), $field );
114
- $output .= sprintf(
115
- '<input type="hidden" name="%s" class="rwmb-datetime-timestamp" value="%s">',
116
- esc_attr( $name . '[timestamp]' ),
117
- isset( $meta['timestamp'] ) ? intval( $meta['timestamp'] ) : ''
118
- );
119
- $meta = isset( $meta['formatted'] ) ? $meta['formatted'] : '';
120
- }
121
-
122
- $output .= parent::html( $meta, $field );
123
-
124
- if ( $field['inline'] )
125
- {
126
- $output .= '<div class="rwmb-datetime-inline"></div>';
127
- }
128
-
129
- return $output;
130
- }
131
-
132
- /**
133
- * Calculates the timestamp from the datetime string and returns it
134
- * if $field['timestamp'] is set or the datetime string if not
135
- *
136
- * @param mixed $new
137
- * @param mixed $old
138
- * @param int $post_id
139
- * @param array $field
140
- *
141
- * @return string|int
142
- */
143
- public static function value( $new, $old, $post_id, $field )
144
- {
145
- if ( ! $field['timestamp'] )
146
- return $new;
147
-
148
- if ( $field['clone'] )
149
- {
150
- foreach ( $new as $key => $value )
151
- {
152
- $new[$key] = isset( $value['timestamp'] ) ? $value['timestamp'] : 0;
153
- }
154
- return $new;
155
- }
156
-
157
- return isset( $new['timestamp'] ) ? $new['timestamp'] : 0;
158
- }
159
-
160
- /**
161
- * Get meta value
162
- *
163
- * @param int $post_id
164
- * @param bool $saved
165
- * @param array $field
166
- *
167
- * @return mixed
168
- */
169
- public static function meta( $post_id, $saved, $field )
170
- {
171
- $meta = parent::meta( $post_id, $saved, $field );
172
- if ( ! $field['timestamp'] )
173
- {
174
- return $meta;
175
- }
176
- $method = array( RW_Meta_Box::get_class_name( $field ), 'translate_format' );
177
- if ( is_array( $meta ) )
178
- {
179
- foreach ( $meta as $key => $value )
180
- {
181
- $meta[$key] = array(
182
- 'timestamp' => $value,
183
- 'formatted' => date( call_user_func( $method, $field ), intval( $value ) ),
184
- );
185
- }
186
- }
187
- else
188
- {
189
- $meta = array(
190
- 'timestamp' => $meta,
191
- 'formatted' => date( call_user_func( $method, $field ), intval( $meta ) ),
192
- );
193
- }
194
- return $meta;
195
- }
196
-
197
- /**
198
- * Normalize parameters for field
199
- *
200
- * @param array $field
201
- * @return array
202
- */
203
- public static function normalize( $field )
204
- {
205
- $field = wp_parse_args( $field, array(
206
- 'timestamp' => false,
207
- 'inline' => false,
208
- 'js_options' => array(),
209
- ) );
210
-
211
- // Deprecate 'format', but keep it for backward compatible
212
- // Use 'js_options' instead
213
- $field['js_options'] = wp_parse_args( $field['js_options'], array(
214
- 'timeFormat' => 'HH:mm',
215
- 'separator' => ' ',
216
- 'dateFormat' => empty( $field['format'] ) ? 'yy-mm-dd' : $field['format'],
217
- 'showButtonPanel' => true,
218
- ) );
219
-
220
- if ( $field['inline'] )
221
- {
222
- $field['js_options'] = wp_parse_args( $field['js_options'], array(
223
- 'altFieldTimeOnly' => false,
224
- ) );
225
- }
226
-
227
- $field = RWMB_Text_Field::normalize( $field );
228
-
229
- return $field;
230
- }
231
-
232
- /**
233
- * Get the attributes for a field
234
- *
235
- * @param array $field
236
- * @param mixed $value
237
- *
238
- * @return array
239
- */
240
- public static function get_attributes( $field, $value = null )
241
- {
242
- $attributes = parent::get_attributes( $field, $value );
243
- $attributes = wp_parse_args( $attributes, array(
244
- 'data-options' => wp_json_encode( $field['js_options'] ),
245
- ) );
246
-
247
- return $attributes;
248
- }
249
-
250
- /**
251
- * Returns a date() compatible format string from the JavaScript format
252
- *
253
- * @link http://www.php.net/manual/en/function.date.php
254
- * @param array $field
255
- *
256
- * @return string
257
- */
258
- public static function translate_format( $field )
259
- {
260
- return strtr( $field['js_options']['dateFormat'], self::$date_formats )
261
- . $field['js_options']['separator']
262
- . strtr( $field['js_options']['timeFormat'], self::$time_formats );
263
- }
264
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/inc/fields/divider.php DELETED
@@ -1,43 +0,0 @@
1
- <?php
2
- /**
3
- * Divider field class.
4
- */
5
- class RWMB_Divider_Field extends RWMB_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- *
10
- * @return void
11
- */
12
- static function admin_enqueue_scripts()
13
- {
14
- wp_enqueue_style( 'rwmb-divider', RWMB_CSS_URL . 'divider.css', array(), RWMB_VER );
15
- }
16
-
17
- /**
18
- * Show begin HTML markup for fields
19
- *
20
- * @param mixed $meta
21
- * @param array $field
22
- *
23
- * @return string
24
- */
25
- static function begin_html( $meta, $field )
26
- {
27
- $attributes = empty( $field['id'] ) ? '' : " id='{$field['id']}'";
28
- return "<hr$attributes>";
29
- }
30
-
31
- /**
32
- * Show end HTML markup for fields
33
- *
34
- * @param mixed $meta
35
- * @param array $field
36
- *
37
- * @return string
38
- */
39
- static function end_html( $meta, $field )
40
- {
41
- return '';
42
- }
43
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/inc/fields/email.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
- /**
3
- * Email field class.
4
- */
5
- class RWMB_Email_Field extends RWMB_Text_Field
6
- {
7
- /**
8
- * Normalize parameters for field
9
- *
10
- * @param array $field
11
- *
12
- * @return array
13
- */
14
- static function normalize( $field )
15
- {
16
- $field = parent::normalize( $field );
17
-
18
- return $field;
19
- }
20
-
21
- /**
22
- * Get the attributes for a field
23
- *
24
- * @param array $field
25
- * @param mixed $value
26
- *
27
- * @return array
28
- */
29
- static function get_attributes( $field, $value = null )
30
- {
31
- $attributes = parent::get_attributes( $field, $value );
32
- $attributes['type'] = 'email';
33
- return $attributes;
34
- }
35
-
36
- /**
37
- * Sanitize email
38
- *
39
- * @param mixed $new
40
- * @param mixed $old
41
- * @param int $post_id
42
- * @param array $field
43
- *
44
- * @return string
45
- */
46
- static function value( $new, $old, $post_id, $field )
47
- {
48
- return $field['clone'] ? array_map( 'sanitize_email', (array) $new ) : sanitize_email( $new );
49
- }
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/inc/fields/fieldset-text.php DELETED
@@ -1,84 +0,0 @@
1
- <?php
2
- /**
3
- * Fieldset text class.
4
- */
5
- class RWMB_Fieldset_Text_Field extends RWMB_Text_Field
6
- {
7
- /**
8
- * Get field HTML
9
- *
10
- * @param mixed $meta
11
- * @param array $field
12
- *
13
- * @return string
14
- */
15
- static function html( $meta, $field )
16
- {
17
- $html = array();
18
- $tpl = '<label>%s %s</label>';
19
-
20
- foreach ( $field['options'] as $key => $label )
21
- {
22
- $value = isset( $meta[$key] ) ? $meta[$key] : '';
23
- $field['attributes']['name'] = $field['field_name'] . "[{$key}]";
24
- $html[] = sprintf( $tpl, $label, parent::html( $value, $field ) );
25
- }
26
-
27
- $out = '<fieldset><legend>' . $field['desc'] . '</legend>' . implode( ' ', $html ) . '</fieldset>';
28
-
29
- return $out;
30
- }
31
-
32
- /**
33
- * Normalize parameters for field
34
- *
35
- * @param array $field
36
- *
37
- * @return array
38
- */
39
- static function normalize( $field )
40
- {
41
- $field = parent::normalize( $field );
42
- $field['multiple'] = false;
43
- $field['attributes']['id'] = false;
44
- return $field;
45
- }
46
-
47
- /**
48
- * Output the field value
49
- * Display options in format Label: value in unordered list
50
- *
51
- * @param array $field Field parameters
52
- * @param array $args Additional arguments. Not used for these fields.
53
- * @param int|null $post_id Post ID. null for current post. Optional.
54
- *
55
- * @return mixed Field value
56
- */
57
- static function the_value( $field, $args = array(), $post_id = null )
58
- {
59
- $value = self::get_value( $field, $args, $post_id );
60
- if ( ! $value )
61
- return '';
62
-
63
- $output = '<table>';
64
- $output .= '<thead><tr>';
65
- foreach ( $field['options'] as $label )
66
- {
67
- $output .= "<th>$label</th>";
68
- }
69
- $output .= '</tr></thead><tbody>';
70
-
71
- foreach ( $value as $subvalue )
72
- {
73
- $output .= '<tr>';
74
- foreach ( $subvalue as $value )
75
- {
76
- $output .= "<td>$value</td>";
77
- }
78
- $output .= '</tr>';
79
- }
80
- $output .= '</tbody></table>';
81
-
82
- return $output;
83
- }
84
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/inc/fields/file-advanced.php DELETED
@@ -1,43 +0,0 @@
1
- <?php
2
- /**
3
- * File advanced field class which users WordPress media popup to upload and select files.
4
- */
5
- class RWMB_File_Advanced_Field extends RWMB_Media_Field
6
- {
7
- /**
8
- * Get the field value.
9
- * @param array $field
10
- * @param array $args
11
- * @param null $post_id
12
- * @return mixed
13
- */
14
- static function get_value( $field, $args = array(), $post_id = null )
15
- {
16
- return RWMB_File_Field::get_value( $field, $args, $post_id );
17
- }
18
-
19
- /**
20
- * Output the field value.
21
- * @param array $field
22
- * @param array $args
23
- * @param null $post_id
24
- * @return mixed
25
- */
26
- static function the_value( $field, $args = array(), $post_id = null )
27
- {
28
- return RWMB_File_Field::the_value( $field, $args, $post_id );
29
- }
30
-
31
- /**
32
- * Get uploaded file information.
33
- *
34
- * @param int $file_id Attachment image ID (post ID). Required.
35
- * @param array $args Array of arguments (for size).
36
- * @return array|bool False if file not found. Array of image info on success
37
- */
38
- static function file_info( $file_id, $args = array() )
39
- {
40
- return RWMB_File_Field::file_info( $file_id, $args );
41
- }
42
-
43
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/inc/fields/file-input.php DELETED
@@ -1,64 +0,0 @@
1
- <?php
2
- /**
3
- * File input field class which uses an input for file URL.
4
- */
5
- class RWMB_File_Input_Field extends RWMB_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- *
10
- * @return void
11
- */
12
- static function admin_enqueue_scripts()
13
- {
14
- // Make sure scripts for new media uploader in WordPress 3.5 is enqueued
15
- wp_enqueue_media();
16
- wp_enqueue_script( 'rwmb-file-input', RWMB_JS_URL . 'file-input.js', array( 'jquery' ), RWMB_VER, true );
17
- wp_localize_script( 'rwmb-file-input', 'rwmbFileInput', array(
18
- 'frameTitle' => __( 'Select File', 'meta-box' ),
19
- ) );
20
- }
21
-
22
- /**
23
- * Get field HTML
24
- *
25
- * @param mixed $meta
26
- * @param array $field
27
- *
28
- * @return string
29
- */
30
- static function html( $meta, $field )
31
- {
32
- return sprintf(
33
- '<input type="text" class="rwmb-file-input" name="%s" id="%s" value="%s" placeholder="%s" size="%s">
34
- <a href="#" class="rwmb-file-input-select button-primary">%s</a>
35
- <a href="#" class="rwmb-file-input-remove button %s">%s</a>',
36
- $field['field_name'],
37
- $field['id'],
38
- $meta,
39
- $field['placeholder'],
40
- $field['size'],
41
- __( 'Select', 'meta-box' ),
42
- $meta ? '' : 'hidden',
43
- __( 'Remove', 'meta-box' )
44
- );
45
- }
46
-
47
- /**
48
- * Normalize parameters for field
49
- *
50
- * @param array $field
51
- *
52
- * @return array
53
- */
54
- static function normalize( $field )
55
- {
56
- $field = parent::normalize( $field );
57
- $field = wp_parse_args( $field, array(
58
- 'size' => 30,
59
- 'placeholder' => '',
60
- ) );
61
-
62
- return $field;
63
- }
64
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/inc/fields/file-upload.php DELETED
@@ -1,39 +0,0 @@
1
- <?php
2
- /**
3
- * File advanced field class which users WordPress media popup to upload and select files.
4
- */
5
- class RWMB_File_Upload_Field extends RWMB_File_Advanced_Field
6
- {
7
- /**
8
- * Add actions
9
- *
10
- * @return void
11
- */
12
- static function add_actions()
13
- {
14
- parent::add_actions();
15
- // Print attachment templates
16
- add_action( 'print_media_templates', array( __CLASS__, 'print_templates' ) );
17
- }
18
-
19
- /**
20
- * Enqueue scripts and styles
21
- *
22
- * @return void
23
- */
24
- static function admin_enqueue_scripts()
25
- {
26
- parent::admin_enqueue_scripts();
27
- wp_enqueue_style( 'rwmb-upload', RWMB_CSS_URL . 'upload.css', array( 'rwmb-media' ), RWMB_VER );
28
- wp_enqueue_script( 'rwmb-file-upload', RWMB_JS_URL . 'file-upload.js', array( 'rwmb-media' ), RWMB_VER, true );
29
- }
30
-
31
- /**
32
- * Template for media item
33
- * @return void
34
- */
35
- static function print_templates()
36
- {
37
- require_once( RWMB_INC_DIR . 'templates/upload.php' );
38
- }
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
meta-box/inc/fields/file.php DELETED
@@ -1,369 +0,0 @@
1
- <?php
2
- /**
3
- * File field class which uses HTML <input type="file"> to upload file.
4
- */
5
- class RWMB_File_Field extends RWMB_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- */
10
- static function admin_enqueue_scripts()
11
- {
12
- wp_enqueue_style( 'rwmb-file', RWMB_CSS_URL . 'file.css', array(), RWMB_VER );
13
- wp_enqueue_script( 'rwmb-file', RWMB_JS_URL . 'file.js', array( 'jquery' ), RWMB_VER, true );
14
- wp_localize_script( 'rwmb-file', 'rwmbFile', array(
15
- 'maxFileUploadsSingle' => __( 'You may only upload maximum %d file', 'meta-box' ),
16
- 'maxFileUploadsPlural' => __( 'You may only upload maximum %d files', 'meta-box' ),
17
- ) );
18
- }
19
-
20
- /**
21
- * Add custom actions
22
- */
23
- static function add_actions()
24
- {
25
- // Add data encoding type for file uploading
26
- add_action( 'post_edit_form_tag', array( __CLASS__, 'post_edit_form_tag' ) );
27
-
28
- // Delete file via Ajax
29
- add_action( 'wp_ajax_rwmb_delete_file', array( __CLASS__, 'wp_ajax_delete_file' ) );
30
-
31
- // Allow reordering files
32
- add_action( 'wp_ajax_rwmb_reorder_files', array( __CLASS__, 'wp_ajax_reorder_files' ) );
33
- }
34
-
35
- /**
36
- * Ajax callback for reordering images
37
- */
38
- static function wp_ajax_reorder_files()
39
- {
40
- $post_id = (int) filter_input( INPUT_POST, 'post_id', FILTER_SANITIZE_NUMBER_INT );
41
- $field_id = (string) filter_input( INPUT_POST, 'field_id' );
42
- $order = (string) filter_input( INPUT_POST, 'order' );
43
-
44
- check_ajax_referer( "rwmb-reorder-files_{$field_id}" );
45
- parse_str( $order, $items );
46
- delete_post_meta( $post_id, $field_id );
47
- foreach ( $items['item'] as $item )
48
- {
49
- add_post_meta( $post_id, $field_id, $item, false );
50
- }
51
- wp_send_json_success();
52
- }
53
-
54
- /**
55
- * Add data encoding type for file uploading
56
- *
57
- * @return void
58
- */
59
- static function post_edit_form_tag()
60
- {
61
- echo ' enctype="multipart/form-data"';
62
- }
63
-
64
- /**
65
- * Ajax callback for deleting files.
66
- * Modified from a function used by "Verve Meta Boxes" plugin
67
- * @link http://goo.gl/LzYSq
68
- */
69
- static function wp_ajax_delete_file()
70
- {
71
- $post_id = (int) filter_input( INPUT_POST, 'post_id', FILTER_SANITIZE_NUMBER_INT );
72
- $field_id = (string) filter_input( INPUT_POST, 'field_id' );
73
- $attachment_id = (int) filter_input( INPUT_POST, 'attachment_id', FILTER_SANITIZE_NUMBER_INT );
74
- $force_delete = (int) filter_input( INPUT_POST, 'force_delete', FILTER_SANITIZE_NUMBER_INT );
75
-
76
- check_ajax_referer( "rwmb-delete-file_{$field_id}" );
77
- delete_post_meta( $post_id, $field_id, $attachment_id );
78
- $success = $force_delete ? wp_delete_attachment( $attachment_id ) : true;
79
-
80
- if ( $success )
81
- wp_send_json_success();
82
- else
83
- wp_send_json_error( __( 'Error: Cannot delete file', 'meta-box' ) );
84
- }