Social Share Buttons – Social Pug - Version 1.18.0

Version Description

Download this release

Release Info

Developer mediavine
Plugin Icon Social Share Buttons – Social Pug
Version 1.18.0
Comparing to
See all releases

Code changes from version 1.7.0 to 1.18.0

Files changed (180) hide show
  1. assets/dist/custom-social-media-image-pinterest.1.18.0.png +0 -0
  2. assets/dist/custom-social-media-image.1.18.0.png +0 -0
  3. assets/dist/dashboard-pro.1.18.0.js +3 -0
  4. assets/dist/dashboard-tinymce.1.18.0.js +3 -0
  5. assets/dist/dashboard.1.0.0.js +0 -1
  6. assets/dist/{dpsp-selectable-empty.1.0.0.png → dpsp-selectable-empty.1.18.0.png} +0 -0
  7. assets/dist/extension-bitly.1.18.0.png +0 -0
  8. assets/dist/extension-branch.1.18.0.png +0 -0
  9. assets/dist/extension-ctt.1.18.0.png +0 -0
  10. assets/dist/extension-ga-utm-tracking.1.18.0.png +0 -0
  11. assets/dist/extension-networks.1.18.0.png +0 -0
  12. assets/dist/front-end-free.1.18.0.js +55 -0
  13. assets/dist/front-end-jquery.1.0.0.js +0 -1
  14. assets/dist/front-end.1.0.0.js +0 -1
  15. assets/dist/grow-logo-sq-navy.1.18.0.png +0 -0
  16. assets/dist/index.php +2 -0
  17. assets/dist/intercom.1.18.0.js +3 -0
  18. assets/dist/jquery.ui.touch-punch.min.1.0.0.js +0 -1
  19. assets/dist/jquery.ui.touch-punch.min.1.18.0.js +3 -0
  20. assets/dist/social-pug-upgrade.1.18.0.png +0 -0
  21. assets/dist/socialpug.1.0.0.woff +0 -0
  22. assets/dist/{socialpug.1.0.0.eot → socialpug.1.18.0.eot} +0 -0
  23. assets/dist/{socialpug.1.0.0.svg → socialpug.1.18.0.svg} +5 -1
  24. assets/dist/{socialpug.1.0.0.ttf → socialpug.1.18.0.ttf} +0 -0
  25. assets/dist/socialpug.1.18.0.woff +0 -0
  26. assets/dist/style-dashboard-pro.1.18.0.css +1 -0
  27. assets/dist/style-dashboard.1.0.0.css +0 -1
  28. assets/dist/style-frontend-jquery.1.0.0.css +0 -1
  29. assets/dist/style-frontend-pro-jquery.1.18.0.css +1 -0
  30. assets/dist/style-frontend-pro.1.18.0.css +1 -0
  31. assets/dist/style-frontend.1.0.0.css +0 -1
  32. assets/dist/tool-content.1.18.0.png +0 -0
  33. assets/dist/tool-follow-widget.1.18.0.png +0 -0
  34. assets/dist/tool-image-hover-pinterest.1.18.0.png +0 -0
  35. assets/dist/tool-misc-import-export.1.18.0.png +0 -0
  36. assets/dist/tool-mobile.1.18.0.png +0 -0
  37. assets/dist/tool-pop-up.1.18.0.png +0 -0
  38. assets/dist/tool-sidebar.1.18.0.png +0 -0
  39. assets/index.php +2 -0
  40. assets/libs/index.php +2 -0
  41. assets/libs/select2/index.php +2 -0
  42. assets/libs/select2/select2.min.css +1 -0
  43. assets/libs/select2/select2.min.js +2 -0
  44. assets/src/css/base.scss +27 -0
  45. assets/src/css/index.php +2 -0
  46. assets/src/css/lib/admin/extensions.scss +10 -0
  47. assets/src/css/lib/admin/index.php +2 -0
  48. assets/src/css/lib/admin/settings-sidebar.scss +82 -0
  49. assets/src/css/lib/buttons/content.scss +7 -0
  50. assets/src/css/lib/buttons/general.scss +411 -0
  51. assets/src/css/lib/buttons/index.php +2 -0
  52. assets/src/css/lib/buttons/mixins.scss +45 -0
  53. assets/src/css/lib/buttons/pin-it.scss +45 -0
  54. assets/src/css/lib/buttons/pop-up.scss +7 -0
  55. assets/src/css/lib/buttons/shortcode.scss +4 -0
  56. assets/src/css/lib/buttons/sidebar.scss +205 -0
  57. assets/src/css/lib/buttons/sticky.scss +174 -0
  58. assets/src/css/lib/buttons/style-variations.scss +261 -0
  59. assets/src/css/lib/click-to-tweet.scss +159 -0
  60. assets/src/css/lib/follow-widget.scss +24 -0
  61. assets/src/css/lib/icons-general.scss +60 -0
  62. assets/src/css/lib/index.php +2 -0
  63. assets/src/css/lib/pop-up.scss +110 -0
  64. assets/src/css/lib/top-shared-post.scss +21 -0
  65. assets/src/css/lib/total-shares.scss +102 -0
  66. assets/src/css/{style-dashboard.css → style-dashboard-pro.css} +326 -288
  67. assets/src/css/style-frontend-jquery.css +0 -699
  68. assets/src/css/style-frontend-pro-jquery.css +1 -0
  69. assets/src/css/style-frontend-pro.css +1 -0
  70. assets/src/css/style-frontend.css +0 -685
  71. assets/src/dev-entry-jquery.js +3 -4
  72. assets/src/dev-entry.js +4 -4
  73. assets/src/entry.html +28 -8
  74. assets/src/fonts/index.php +2 -0
  75. assets/src/fonts/socialpug.eot +0 -0
  76. assets/src/fonts/socialpug.svg +5 -1
  77. assets/src/fonts/socialpug.ttf +0 -0
  78. assets/src/fonts/socialpug.woff +0 -0
  79. assets/src/fonts/socialpug.woff2 +0 -0
  80. assets/src/img/custom-social-media-image-pinterest.png +0 -0
  81. assets/src/img/custom-social-media-image.png +0 -0
  82. assets/src/img/index.php +2 -0
  83. assets/src/img/opt-in-hound-banner.png +0 -0
  84. assets/src/img/opt-in-hound-icon-256x256.png +0 -0
  85. assets/src/img/opt-in-hound-promo-pop-up.png +0 -0
  86. assets/src/img/opt-in-hound-promo-widget.png +0 -0
  87. assets/src/img/skyepress-banner-clouds.png +0 -0
  88. assets/src/img/skyepress-banner.png +0 -0
  89. assets/src/img/skyepress-promo-1.png +0 -0
  90. assets/src/img/skyepress-promo-2.png +0 -0
  91. assets/src/img/skyepress-promo-3.png +0 -0
  92. assets/src/img/skyepress-social-pug-promo.png +0 -0
  93. assets/src/img/social-shares-recovery-system.png +0 -0
  94. assets/src/img/tool-integrations-logo-edd.png +0 -0
  95. assets/src/img/tool-integrations-logo-pb.png +0 -0
  96. assets/src/img/tool-integrations-logo-pms.png +0 -0
  97. assets/src/img/tool-integrations-logo-woocommerce.png +0 -0
  98. assets/src/img/tool-misc-import-export.png +0 -0
  99. assets/src/img/tool-opt-in-icon-after-content.png +0 -0
  100. assets/src/img/tool-opt-in-icon-fly-in.png +0 -0
  101. assets/src/img/tool-opt-in-icon-pop-up.png +0 -0
  102. assets/src/img/tool-opt-in-icon-shortcode.png +0 -0
  103. assets/src/img/tool-opt-in-icon-widget.png +0 -0
  104. assets/src/index.php +2 -0
  105. assets/src/js/dashboard.js +0 -611
  106. assets/src/js/front-end-jquery.js +0 -105
  107. assets/src/js/front-end.js +0 -80
  108. assets/src/js/jquery.ui.touch-punch.min.js +0 -11
  109. inc/admin/admin-metaboxes.php +540 -78
  110. inc/admin/admin-widgets.php +17 -0
  111. inc/admin/feedback-form/assets/css/index.php +2 -0
  112. inc/admin/feedback-form/assets/img/index.php +2 -0
  113. inc/admin/feedback-form/assets/index.php +2 -0
  114. inc/admin/feedback-form/assets/js/index.php +2 -0
  115. inc/admin/feedback-form/functions-ajax.php +1 -5
  116. inc/admin/feedback-form/functions.php +4 -17
  117. inc/admin/feedback-form/index.php +2 -0
  118. inc/admin/feedback-form/views/index.php +2 -0
  119. inc/admin/index.php +2 -0
  120. inc/admin/submenu-page-debugger.php +28 -0
  121. inc/admin/submenu-page-extensions.php +19 -25
  122. inc/admin/submenu-page-settings.php +119 -59
  123. inc/admin/submenu-page-sidebar.php +42 -55
  124. inc/admin/submenu-page-toolkit.php +19 -22
  125. inc/admin/views/index.php +2 -0
  126. inc/admin/views/view-submenu-page-content.php +0 -118
  127. inc/admin/views/view-submenu-page-debugger.php +137 -0
  128. inc/admin/views/view-submenu-page-extensions.php +14 -14
  129. inc/admin/views/view-submenu-page-settings.php +4 -4
  130. inc/admin/views/view-submenu-page-toolkit.php +37 -5
  131. inc/autoloader-pro.php +2 -0
  132. inc/class-activation.php +185 -0
  133. inc/class-asset-loader.php +175 -0
  134. inc/class-buttons-outputter.php +487 -0
  135. inc/class-color-utilities.php +166 -0
  136. inc/class-custom-color.php +301 -0
  137. inc/class-data-sync.php +170 -0
  138. inc/class-frontend-data.php +91 -0
  139. inc/class-mobile-detect.php +895 -0
  140. inc/class-settings.php +79 -0
  141. inc/class-share-counts.php +56 -0
  142. inc/functions-admin.php +422 -347
  143. inc/functions-cron.php +86 -118
  144. inc/functions-frontend.php +528 -323
  145. inc/functions-mobile.php +63 -0
  146. inc/functions-post.php +600 -0
  147. inc/functions-share-counts.php +643 -390
  148. inc/functions-tools.php +203 -0
  149. inc/functions-version-update.php +436 -31
  150. inc/functions.php +959 -627
  151. inc/index.php +2 -0
  152. inc/integrations/class-container.php +97 -0
  153. inc/integrations/class-integration.php +39 -0
  154. inc/integrations/class-mv-create.php +62 -0
  155. inc/integrations/class-mv-trellis.php +199 -0
  156. inc/integrations/index.php +2 -0
  157. inc/tools/class-tool.php +90 -0
  158. inc/tools/class-toolkit.php +136 -0
  159. inc/tools/index.php +2 -0
  160. inc/tools/share-floating-sidebar/class-floating-sidebar.php +31 -0
  161. inc/tools/share-floating-sidebar/functions-frontend.php +82 -0
  162. inc/tools/share-floating-sidebar/index.php +2 -0
  163. inc/tools/share-floating-sidebar/share-floating-sidebar.php +33 -0
  164. inc/tools/share-floating-sidebar/submenu-page-sidebar.php +57 -0
  165. inc/tools/share-floating-sidebar/views/index.php +2 -0
  166. inc/tools/share-floating-sidebar/views/view-submenu-page-sidebar.php +252 -0
  167. inc/tools/share-inline-content/class-inline-content.php +31 -0
  168. inc/tools/share-inline-content/functions-frontend.php +185 -0
  169. inc/tools/share-inline-content/index.php +2 -0
  170. inc/tools/share-inline-content/share-inline-content.php +33 -0
  171. inc/{admin → tools/share-inline-content}/submenu-page-content.php +57 -55
  172. inc/tools/share-inline-content/views/index.php +2 -0
  173. inc/tools/share-inline-content/views/view-submenu-page-content.php +291 -0
  174. inc/tools/share-sticky-bar/class-sticky-bar.php +31 -0
  175. inc/tools/share-sticky-bar/functions-frontend.php +130 -0
  176. inc/tools/share-sticky-bar/index.php +2 -0
  177. inc/tools/share-sticky-bar/share-sticky-bar.php +37 -0
  178. inc/tools/share-sticky-bar/submenu-page-sticky-bar.php +75 -0
  179. inc/tools/share-sticky-bar/views/index.php +2 -0
  180. inc/tools/share-sticky-bar/views/view-submenu-page-sticky-bar.php +15 -0
assets/dist/custom-social-media-image-pinterest.1.18.0.png ADDED
Binary file
assets/dist/custom-social-media-image.1.18.0.png ADDED
Binary file
assets/dist/dashboard-pro.1.18.0.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"dNy0":[function(require,module,exports) {
2
+ jQuery(function(e){function t(e,t,s){var i=-1!==s.indexOf("?")?"&":"?";return s+i+e+"="+t}function s(t){e('.dpsp-social-platforms-sort-list li[data-network="'+t+'"]').remove(),e(".dpsp-social-platforms-sort-list li").removeClass("dpsp-last"),e(".dpsp-social-platforms-sort-list li").last().addClass("dpsp-last"),0==e(".dpsp-social-platforms-sort-list li").length&&(e(".dpsp-social-platforms-sort-list").fadeOut(1),e(".dpsp-social-platforms-sort-list").removeClass("dpsp-active"))}var i;function a(){$checkbox_total_shares.is(":checked")||$checkbox_shares.is(":checked")?($wrapper_checkbox_count_round.removeClass("disabled"),$checkbox_count_round.attr("disabled",!1)):($wrapper_checkbox_count_round.addClass("disabled"),$checkbox_count_round.attr("disabled",!0))}function n(){$checkbox_total_shares.is(":checked")||$checkbox_shares.is(":checked")?($wrapper_text_minimum_count.removeClass("disabled"),$text_minimum_count.attr("disabled",!1)):($wrapper_text_minimum_count.addClass("disabled"),$text_minimum_count.attr("disabled",!0))}function p(){$checkbox_total_shares.is(":checked")||$checkbox_shares.is(":checked")?($wrapper_text_minimum_individual_count.removeClass("disabled"),$text_minimum_individual_count.attr("disabled",!1)):($wrapper_text_minimum_individual_count.addClass("disabled"),$text_minimum_individual_count.attr("disabled",!0))}e(document).on("click",".dpsp-tool-wrapper .dpsp-switch label",function(t){var s=e(this).closest(".dpsp-tool-actions"),i=s.find(".dpsp-tool-settings");i.fadeOut(200),s.append('<div class="dpsp-tool-actions-overlay"><div class="spinner"></div></div>'),s.find(".dpsp-tool-actions-overlay").animate({opacity:1},200);var a=e(this).siblings("input").data("tool");e(this).siblings("input").data("tool-activation");"undefined"!=a&&(s.hasClass("dpsp-inactive")?function(t){var s={action:"dpsp_activate_tool",dpsptkn:e("#dpsptkn").val(),tool:t};return e.post(ajaxurl,s,function(){})}(a).done(function(t){1==t&&(s.find(".dpsp-tool-actions-overlay").animate({opacity:0},200,function(){e(this).remove()}),s.removeClass("dpsp-inactive").addClass("dpsp-active"),s.find("span").text("Active"),i.fadeIn(200))}):function(t){var s={action:"dpsp_deactivate_tool",dpsptkn:e("#dpsptkn").val(),tool:t};return e.post(ajaxurl,s,function(){})}(a).done(function(t){var i;1==t&&(s.find(".dpsp-tool-actions-overlay").animate({opacity:0},200,function(){e(this).remove()}),s.removeClass("dpsp-active").addClass("dpsp-inactive"),s.find("span").text("Inactive"),i=(i=a).replace("share_","").replace("follow_","").replace("misc_","").replace("_","-"),e("#toplevel_page_dpsp-social-pug .wp-submenu li a").each(function(){e(this).attr("href").indexOf(i),"images"!==i&&e(this).parent().hide()}))}))}),e.fn.wpColorPicker&&e(".dpsp-color-picker").wpColorPicker(),e.fn.select2&&e(".dpsp-setting-field-select select").select2({minimumResultsForSearch:1/0}).on("select2:open",function(){e(".select2-container").last().addClass("dpsp-select2")}),e(function(){e(".dpsp-social-platforms-sort-list").sortable({handle:".dpsp-sort-handle",placeholder:"dpsp-sort-placeholder",containment:"#wpwrap",stop:function(){e(".dpsp-social-platforms-sort-list li").removeClass("dpsp-last"),e(".dpsp-social-platforms-sort-list li").last().addClass("dpsp-last")}})}),e(document).on("click","#dpsp-networks-selector .dpsp-network-item",function(){$this=e(this),$checkbox=$this.children(".dpsp-network-item-checkbox"),$this.attr("data-checked")?$this.removeAttr("data-checked"):$this.attr("data-checked","true")}),e(document).on("click","#dpsp-select-networks",function(t){t.preventDefault(),e("#dpsp-networks-selector-wrapper").hasClass("dpsp-active")?(e("#dpsp-networks-selector-wrapper").removeClass("dpsp-active"),e("#dpsp-networks-selector-wrapper").stop().fadeOut(250,function(){0==e(".dpsp-social-platforms-sort-list").find("li").length?(e("#dpsp-sortable-networks-empty").stop().fadeIn(400),e("#dpsp-sortable-networks-empty").addClass("dpsp-active")):(e(".dpsp-social-platforms-sort-list").stop().fadeIn(400),e(".dpsp-social-platforms-sort-list").addClass("dpsp-active"))})):(e("#dpsp-select-networks").hide(),e("#dpsp-networks-selector-wrapper").addClass("dpsp-active"),0==e(".dpsp-social-platforms-sort-list").find("li").length?(e(".dpsp-social-platforms-sort-list").hide(),e("#dpsp-sortable-networks-empty").removeClass("dpsp-active"),e("#dpsp-sortable-networks-empty").stop().fadeOut(250,function(){e("#dpsp-networks-selector-wrapper").stop().fadeIn(250)})):(e(".dpsp-social-platforms-sort-list").removeClass("dpsp-active"),e(".dpsp-social-platforms-sort-list").stop().fadeOut(250,function(){e("#dpsp-networks-selector-wrapper").stop().fadeIn(250)})))}),e(document).on("click","#dpsp-networks-selector-footer a",function(t){t.preventDefault(),e("#dpsp-select-networks").show(),e("#dpsp-networks-selector .dpsp-network-item").each(function(){$this=e(this);var t=$this.attr("data-network"),i=$this.attr("data-network-name");if($this.attr("data-checked")){var a=!1;if(e(".dpsp-social-platforms-sort-list li").each(function(){e(this).attr("data-network")==t&&(a=!0)}),a)return a;!function(t,s){if("undefined"==t)return!1;if("undefined"==s)return!1;var i="",a=e('input[name="dpsp_buttons_location"]').val();i+='<li data-network="'+t+'">',i+='<div class="dpsp-sort-handle ui-sortable-handle">\x3c!-- --\x3e</div>',i+='<div class="dpsp-list-icon dpsp-list-icon-social dpsp-icon-'+t+" dpsp-background-color-network-"+t+'">\x3c!-- --\x3e</div>',i+='<div class="dpsp-list-input-wrapper"><input type="text" placeholder="This button has no label text." name="'+a+"[networks]["+t+'][label]" value="'+s+'"></div>',i+='<div class="dpsp-list-actions">',i+='<a class="dpsp-list-edit-label dpsp-transition" href="#"><span class="dashicons dashicons-edit"></span>Edit Label</a>',i+='<a class="dpsp-list-remove dpsp-transition" href="#"><span class="dashicons dashicons-no-alt"></span>Remove</a>',i+="</div>",i+="</li>",e(".dpsp-social-platforms-sort-list").append(i),e(".dpsp-social-platforms-sort-list li").removeClass("dpsp-last"),e(".dpsp-social-platforms-sort-list li").last().addClass("dpsp-last")}(t,i)}else s(t)}),e("#dpsp-networks-selector-wrapper").removeClass("dpsp-active").stop().fadeOut(250,function(){0==e(".dpsp-social-platforms-sort-list").find("li").length?(e("#dpsp-sortable-networks-empty").stop().fadeIn(250),e("#dpsp-sortable-networks-empty").addClass("dpsp-active")):(e(".dpsp-social-platforms-sort-list").stop().fadeIn(250),e(".dpsp-social-platforms-sort-list").addClass("dpsp-active"))})}),e(document).on("click",".dpsp-list-edit-label",function(t){t.preventDefault(),e(this).closest("li").find(".dpsp-list-input-wrapper input").focus().select()}),e(document).on("click",".dpsp-list-remove",function(t){t.preventDefault();var i=e(this).closest("li").attr("data-network");s(i),e('#dpsp-networks-selector .dpsp-network-item[data-network="'+i+'"]').removeAttr("data-checked"),0==e(".dpsp-social-platforms-sort-list").find("li").length&&(e("#dpsp-sortable-networks-empty").stop().fadeIn(250),e("#dpsp-sortable-networks-empty").addClass("dpsp-active"),e(".dpsp-social-platforms-sort-list").removeClass("dpsp-active"))}),e(document).ready(function(){e(".dpsp-network-btn").attr("href","#")}),e(document).on("click",".dpsp-network-btn",function(t){t.preventDefault(),e(this).closest("label").click()}),e(document).on("focus",".dpsp-page-mobile .dpsp-list-input-wrapper input",function(){e(this).blur()}),e(document).on("focus",".dpsp-page-sticky-bar .dpsp-list-input-wrapper input",function(){e(this).blur()}),e(document).on("focus",".dpsp-list-input-wrapper input",function(){e(this).attr("data-placeholder",e(this).attr("placeholder")),e(this).attr("placeholder"," ")}),e(document).on("blur",".dpsp-list-input-wrapper input",function(){e(this).attr("placeholder",e(this).attr("data-placeholder")),e(this).attr("data-placeholder"," ")}),e(document).on("change",".dpsp-setting-field-button-shape select",function(){e(this).closest(".dpsp-page-wrapper").find(".dpsp-networks-btns-wrapper").parent().removeClass("dpsp-shape-circle dpsp-shape-rounded dpsp-shape-rectangular").addClass("dpsp-shape-"+e(this).val())}),e(document).on("mouseenter",".dpsp-setting-field-tooltip-icon",function(){e(this).siblings("div").css("opacity",1).css("visibility","visible")}),e(document).on("mouseleave",".dpsp-setting-field-tooltip-icon",function(){e(this).siblings("div").css("opacity",0).css("visibility","hidden")}),e(document).on("mouseenter",".dpsp-setting-field-tooltip-wrapper.dpsp-has-link",function(){e(this).find("div").css("opacity",1).css("visibility","visible")}),e(document).on("mouseleave",".dpsp-setting-field-tooltip-wrapper.dpsp-has-link",function(){e(this).find("div").css("opacity",0).css("visibility","hidden")}),e(".dpsp-image-select").on("click",function(t){t.preventDefault(),$btn_select=e(this),$btn_remove=$btn_select.siblings(".dpsp-image-remove"),$image_id=$btn_select.siblings(".dpsp-image-id"),$image_src=$btn_select.siblings(".dpsp-image-src"),$image=$btn_select.siblings("div").find("img"),i?i.open():((i=wp.media({title:"Choose Image",button:{text:"Use Image"},multiple:!1})).on("select",function(){var e=i.state().get("selection").first().toJSON();$image_id.val(e.id),$image_src.val(e.url),$image.attr("src",""),$image.attr("src",e.url),$btn_select.addClass("dpsp-hidden"),$btn_remove.removeClass("dpsp-hidden");var t=new CustomEvent("dpsp_settings_field_image_select_image",{detail:{field:$btn_select.closest(".dpsp-setting-field-image"),attachment:e}});document.dispatchEvent(t)}),i.open())}),e(".dpsp-image-remove").on("click",function(t){t.preventDefault(),$btn_remove=e(this),$btn_select=$btn_remove.siblings(".dpsp-image-select"),$image_id=$btn_remove.siblings(".dpsp-image-id"),$image_src=$btn_remove.siblings(".dpsp-image-src"),$image=$btn_remove.siblings("div").find("img"),$btn_remove.addClass("dpsp-hidden"),$btn_select.removeClass("dpsp-hidden"),$image_id.val(""),$image_src.val(""),$image.attr("src",void 0!==$image.siblings(".dpsp-field-image-placeholder").data("src")?$image.siblings(".dpsp-field-image-placeholder").data("src"):"");var s=new CustomEvent("dpsp_settings_field_image_remove_image",{detail:{field:$btn_select.closest(".dpsp-setting-field-image")}});document.dispatchEvent(s)}),$checkbox_shares=e(".dpsp-setting-field-show-share-count input[type=checkbox]"),$checkbox_total_shares=e(".dpsp-setting-field-show-total-share-count input[type=checkbox]"),$checkbox_count_round=e(".dpsp-setting-field-share-count-round input[type=checkbox]"),$text_minimum_count=e(".dpsp-setting-field-minimum-global-share-count input[type=text]"),$text_minimum_individual_count=e(".dpsp-setting-field-minimum-individual-share-count input[type=text]"),$wrapper_checkbox_count_round=$checkbox_count_round.closest(".dpsp-setting-field-wrapper"),$wrapper_text_minimum_count=$text_minimum_count.closest(".dpsp-setting-field-wrapper"),$wrapper_text_minimum_individual_count=$text_minimum_individual_count.closest(".dpsp-setting-field-wrapper"),$checkbox_after_scrolling=e(".dpsp-setting-field-show-after-user-scrolls input[type=checkbox]"),$checkbox_scroll_distance_wrapper=$checkbox_after_scrolling.closest(".dpsp-setting-field-wrapper").next(".dpsp-setting-field-wrapper"),$checkbox_scroll_distance=$checkbox_scroll_distance_wrapper.find("input"),$checkbox_total_shares.is(":checked")||($checkbox_total_shares.closest(".dpsp-setting-field-wrapper").next().addClass("disabled"),$checkbox_total_shares.closest(".dpsp-setting-field-wrapper").next().find("select").attr("disabled",!0)),$checkbox_total_shares.change(function(){$checkbox_total_shares.is(":checked")?($checkbox_total_shares.closest(".dpsp-setting-field-wrapper").next().removeClass("disabled"),$checkbox_total_shares.closest(".dpsp-setting-field-wrapper").next().find("select").attr("disabled",!1)):($checkbox_total_shares.closest(".dpsp-setting-field-wrapper").next().addClass("disabled"),$checkbox_total_shares.closest(".dpsp-setting-field-wrapper").next().find("select").attr("disabled",!0))}),a(),n(),p(),$checkbox_shares.change(function(){a(),n(),p()}),$checkbox_total_shares.change(function(){a(),n(),p()}),$checkbox_after_scrolling.is(":checked")||($checkbox_scroll_distance_wrapper.addClass("disabled"),$checkbox_scroll_distance.attr("disabled",!0)),$checkbox_after_scrolling.change(function(){$checkbox_after_scrolling.is(":checked")?($checkbox_scroll_distance_wrapper.removeClass("disabled"),$checkbox_scroll_distance.attr("disabled",!1)):($checkbox_scroll_distance_wrapper.addClass("disabled"),$checkbox_scroll_distance.attr("disabled",!0))}),e(".dpsp-nav-tab").on("click",function(s){s.preventDefault(),"pinterest-image-hover"===e(this).attr("data-tab")&&(document.location.search="?page=dpsp-pinterest-images"),$_wp_http_referer=e("input[name=_wp_http_referer]");var i=$_wp_http_referer.val();i=function(e,t){var s=t.split("?")[0],i=[],a=-1!==t.indexOf("?")?t.split("?")[1]:"";if(""!==a){for(var n=(i=a.split("&")).length-1;n>=0;n-=1)i[n].split("=")[0]===e&&i.splice(n,1);s=s+"?"+i.join("&")}return""==s.split("?")[1]&&(s=s.split("?")[0]),s}("dpsp-tab",i),$_wp_http_referer.val(t("dpsp-tab",e(this).attr("data-tab"),i)),e(".dpsp-nav-tab").removeClass("dpsp-active"),e(this).addClass("dpsp-active"),e(".dpsp-tab").removeClass("dpsp-active");var a=e(this).attr("data-tab");e("#dpsp-tab-"+a).addClass("dpsp-active")}),e(document).on("click","#dpsp-refresh-share-counts",function(t){if(t.preventDefault(),e(this).hasClass("disabled"))return!1;const s=e(this),i=s.siblings(".spinner");s.addClass("disabled"),i.css("visibility","visible"),e(".dpsp-statistic-bar-wrapper-network").css("opacity",.6);var a={action:"dpsp_refresh_share_counts",nonce:s.siblings('[name="dpsp_refresh_share_counts"]').val(),post_id:parseInt(e("#post_ID").val())};e.post(ajaxurl,a,function(t){t&&e(".dpsp-statistic-bars-wrapper").replaceWith(t)})}),e(document).on("click","#dpsp-global-refresh-share-counts",function(t){if(t.preventDefault(),e(this).hasClass("disabled"))return!1;const s=e(this),i=s.siblings(".action-text");s.addClass("disabled"),i.fadeIn();var a={action:"dpsp_refresh_all_share_counts",nonce:e("#dpsp_refresh_all_share_counts").val()};e.post(ajaxurl,a)}),e(document).ready(function(){e('[name="dpsp_settings[shortening_service]"]').change(function(){e(".dpsp-subsection-link-shortening").hide(),e(".dpsp-subsection-link-shortening[data-link-shortening-service="+e(this).val()+"]").show(),e("#dpsp-purge-shortened-links span").text(e(this).find("option:selected").text())}),e('[name="dpsp_settings[shortening_service]"]').trigger("change")}),e(document).on("change",'[name="dpsp_location_sticky_bar[display][show_on_device]"]',function(){"all"==e(this).val()?(e(".dpsp-setting-field-desktop-position").show(),e(".dpsp-setting-field-mobile-position").show()):(e(".dpsp-setting-field-desktop-position").hide(),e(".dpsp-setting-field-mobile-position").hide()),"desktop"==e(this).val()&&e(".dpsp-setting-field-desktop-position").show(),"mobile"==e(this).val()&&e(".dpsp-setting-field-mobile-position").show()}),e('[name="dpsp_location_sticky_bar[display][show_on_device]"]').trigger("change"),e(document).on("change",'[name="dpsp_settings[facebook_share_counts_provider]"]',function(){e(".dpsp-setting-field-facebook-authorize-app").hide(),e(".dpsp-setting-field-facebook-app-id, .dpsp-setting-field-facebook-app-secret").hide(),"authorized_app"==e(this).val()&&e(".dpsp-setting-field-facebook-authorize-app").show(),"own_app"==e(this).val()&&e(".dpsp-setting-field-facebook-app-id, .dpsp-setting-field-facebook-app-secret").show()}),e('[name="dpsp_settings[facebook_share_counts_provider]"]').trigger("change"),e(document).on("click","#dpsp-purge-shortened-links",function(s){if(s.preventDefault(),!dpsp_confirm_shorten_link_purge)return!1;$button=e(this),$form=$button.closest("form");var i={action:"dpsp_purge_shortened_links",nonce:e("#_wpnonce").val(),shortening_service:e('[name="dpsp_settings[shortening_service]"]').val()};$form.find(":input").attr("disabled",!0),$button.closest(".dpsp-setting-field-button").addClass("dpsp-loading"),e.post(ajaxurl,i,function(e){if(void 0!==(e=JSON.parse(e)).success){var s=window.location,i="dpsp_purge_shortened_links_fail";1==e.success&&(i="dpsp_purge_shortened_links_success"),s=t("updated",i,window.location.href),window.location=s}})}),e(document).on("change",".dpsp-setting-field-enable-twitter-tweet-counts input[type=checkbox]",function(){e(this).is(":checked")?e(".dpsp-setting-field-tweet-counts-provider").show():e(".dpsp-setting-field-tweet-counts-provider").hide()}),e(".dpsp-setting-field-enable-twitter-tweet-counts input[type=checkbox]").trigger("change"),e(document).on("change",".dpsp-setting-field-show-button-label input[type=checkbox]",function(){e(this).is(":checked")?e(".dpsp-setting-field-button-text-label").show():e(".dpsp-setting-field-button-text-label").hide()}),e(".dpsp-setting-field-show-button-label input[type=checkbox]").trigger("change"),e(document).on("change","#dpsp_location_follow_widget\\[display\\]\\[column_count\\]",function(t){"auto"==e(this).val()?e(".dpsp-setting-field-button-alignment").show():e(".dpsp-setting-field-button-alignment").hide()}),e("#dpsp_location_follow_widget\\[display\\]\\[column_count\\]").trigger("change"),document.addEventListener("dpsp_settings_field_image_select_image",function(e){if(0==e.detail.field.parents("#dpsp_share_options_content").length)return!1;e.detail.field.find("img").height(parseInt(200*e.detail.attachment.height/e.detail.attachment.width)),e.detail.field.closest(".dpsp-section").css("min-height",e.detail.field.height())}),document.addEventListener("dpsp_settings_field_image_remove_image",function(e){if(0==e.detail.field.parents("#dpsp_share_options_content").length)return!1;e.detail.field.find('label[for="dpsp_share_options[custom_image]"]').length>0?e.detail.field.find("img").height(105):e.detail.field.find("img").height(300),e.detail.field.closest(".dpsp-section").css("min-height",e.detail.field.height())}),e(window).on("load",function(){e("#dpsp_share_options_content .dpsp-section").each(function(){e(this).css("min-height",e(this).find(".dpsp-setting-field-image").height())})}),e(".dpsp-setting-field-wrapper textarea").on("input",function(){var t=e(this),s=t.closest(".dpsp-setting-field-wrapper").find(".dpsp-textarea-characters-remaining"),i=parseInt(s.parent().data("maximum-count")),a=parseInt(i-t.val().length);s.text(a),a<0?s.parent().addClass("dpsp-excedeed"):s.parent().removeClass("dpsp-excedeed")}),e('.dpsp-setting-field-wrapper textarea[name="dpsp_share_options[custom_tweet]"]').on("input",function(){var t=e(this),s=t.closest(".dpsp-setting-field-wrapper").find(".dpsp-textarea-characters-remaining"),i=parseInt(s.parent().data("maximum-count"));urls=t.val().match(/(http(s?):\/\/[\S]*)/g),urls_char_counts=23*(urls?urls.length:0);var a=parseInt(i-t.val().replace(/(http(s?):\/\/[\S]*)/g,"").length-urls_char_counts);s.text(a),a<0?s.parent().addClass("dpsp-excedeed"):s.parent().removeClass("dpsp-excedeed")}),e(document).on("change",'select[name="dpsp_settings[ctt_style]"]',function(){e("#section-click-to-tweet-preview > a").removeClass("dpsp-click-to-tweet").attr("class",function(e,t){return t.replace(/(^|\s)dpsp-style-\S+/g,"")}),e("#section-click-to-tweet-preview > a").addClass("dpsp-click-to-tweet").addClass("dpsp-style-"+e(this).val())}),e(document).on("keyup",'input[name="dpsp_settings[ctt_link_text]"]',function(){e("#section-click-to-tweet-preview > a .dpsp-click-to-tweet-cta > span").html(e(this).val())}),e(document).on("change",'select[name="dpsp_settings[ctt_link_position]"]',function(){e("#section-click-to-tweet-preview > a").removeClass("dpsp-click-to-tweet-cta-left dpsp-click-to-tweet-cta-right").addClass("dpsp-click-to-tweet-cta-"+e(this).val())}),e(document).on("click",'input[name="dpsp_settings[ctt_link_icon_animation]"]',function(){e(this).is(":checked")?e("#section-click-to-tweet-preview > a").addClass("dpsp-click-to-tweet-cta-icon-animation"):e("#section-click-to-tweet-preview > a").removeClass("dpsp-click-to-tweet-cta-icon-animation")}),e('select[name="dpsp_settings[ctt_style]"]').trigger("change"),e('input[name="dpsp_settings[ctt_link_text]"]').trigger("keyup"),e('select[name="dpsp_settings[ctt_link_position]"]').trigger("change"),e('select[name="dpsp_settings[ctt_link_icon_animation]"]').trigger("click"),e("#section-click-to-tweet-preview").show(),e(document).on("change",".dpsp-setting-field-wrapper *",function(){e(".dpsp-card-inner").each(function(){e(this).find(".dpsp-setting-field-wrapper").removeClass("dpsp-last"),e(this).find(".dpsp-setting-field-wrapper:not(.disabled)").last().addClass("dpsp-last")})}),e(".dpsp-setting-field-wrapper *").first().trigger("change"),e(document).on("click","#dpsp-add-post-previous-url",function(t){t.preventDefault(),e("#dpsp-shares-recovery-post-previous-urls-empty").hide(),e(this).before(e(".dpsp-post-previous-url.dpsp-hidden").clone()),e(this).parent().find(".dpsp-post-previous-url.dpsp-hidden").hide().removeClass("dpsp-hidden").fadeIn(),e(this).parent().find(".dpsp-post-previous-url input").focus()}),e(document).on("click",".dpsp-post-previous-url a",function(t){t.preventDefault(),e(this).parent().remove(),0==e(".dpsp-post-previous-url:not(.dpsp-hidden)").length&&e("#dpsp-shares-recovery-post-previous-urls-empty").fadeIn()}),e(document).on("change",'[name="dpsp_settings[previous_permalink_structure]"]',function(){"custom"==e(this).val()&&setTimeout(function(){e('[name="dpsp_settings[previous_permalink_structure_custom]"]').focus()},100)}),e('[name="dpsp_settings[previous_base_domain]"]').attr("placeholder","eg. domain.com");var o,d=e("#tmpl-image-details");if(d.length>0&&void 0!==window.pagenow&&"widgets"!=window.pagenow&&"customize"!=window.pagenow){var l=d.html(),c='<label class="setting pin-title"><span>Pin Title</span><input type="text" data-setting="pin_title" value="{{ data.model.pin_title }}" /><p class="description" style="font-style: italic; margin-top: 5px;">Please note: Pinterest does not yet support pin titles. Pinterest is still in the process of releasing this feature. We\'ve added the field in advance, to make sure you\'re ready for when the feature rolls out.</p></label>',r='<label class="setting pin-description"><span>Pin Description</span><textarea data-setting="pin_description">{{ data.model.pin_description }}</textarea></label>',u='<label class="setting pin-repin-id"><span>Pin Repin ID</span><input type="text" data-setting="pin_repin_id" value="{{ data.model.pin_repin_id }}" /></label>',h='<label class="setting pin-nopin"><span>Disable Pinning</span><select data-setting="pin_nopin"><option value="">No</option><option value="1" <# if ( data.model.pin_nopin ) { #> selected="selected" <# } #>>Yes</option></select></label>';-1!=d.text().indexOf('<span class="setting alt-text')?d.text(l.replace(/(<span class="setting alt-text)/,c+r+u+h+"$1")):-1!=d.text().indexOf('<span class="setting caption')&&d.text(l.replace(/(<span class="setting caption)/,c+r+u+h+"$1")),-1!=d.text().indexOf('<label class="setting alt-text">')?d.text(l.replace(/(<label class="setting alt-text">)/,c+r+u+h+"$1")):-1!=d.text().indexOf('<label class="setting caption">')&&d.text(l.replace(/(<label class="setting caption">)/,c+r+u+h+"$1"))}"undefined"!=typeof wp&&void 0!==wp.media&&void 0!==wp.media.events&&(wp.media.events.on("editor:image-edit",function(e){e.metadata.pin_title=e.editor.$(e.image).attr("data-pin-title"),e.metadata.pin_description=e.editor.$(e.image).attr("data-pin-description"),e.metadata.pin_repin_id=e.editor.$(e.image).attr("data-pin-id"),e.metadata.pin_nopin=e.editor.$(e.image).attr("data-pin-nopin")?"1":""}),wp.media.events.on("editor:image-update",function(e){e.editor.$(e.image).attr("data-pin-title",e.metadata.pin_title),e.editor.$(e.image).attr("data-pin-description",e.metadata.pin_description),e.editor.$(e.image).attr("data-pin-id",e.metadata.pin_repin_id),e.metadata.pin_nopin?e.editor.$(e.image).attr("data-pin-nopin","true"):e.editor.$(e.image).removeAttr("data-pin-nopin")})),e(document).on("click","#dpsp-meta-box-section-multiple-pinterest-images .dpsp-hidden-image-wrapper .dpsp-button-secondary",function(t){t.preventDefault(),e(this).parent().remove()}),e(document).on("click","#dpsp-meta-box-section-multiple-pinterest-images .dpsp-hidden-image-add-new",function(t){t.preventDefault(),$btn_select=e(this),o?o.open():((o=wp.media({title:"Select Pinterest Hidden Images",button:{text:"Use Images"},library:{type:["image"]},multiple:!0})).on("select",function(){var t=o.state().get("selection").map(function(e){return e.toJSON()});for(var s in t)if("image"==t[s].type&&!(e('.dpsp-hidden-image-wrapper[data-image-id="'+t[s].id+'"]').length>0)){var i="",a=void 0!==t[s].sizes.thumbnail?t[s].sizes.thumbnail.url:t[s].sizes.full.url;i='<div class="dpsp-hidden-image-wrapper" data-image-id="'+t[s].id+'">',i+='<img src="'+a+'" data-pin-nopin="true" />',i+='<a href="#" class="dpsp-button-secondary" title="Remove image"><span class="dashicons dashicons-no-alt"></span></a>',i+='<input type="hidden" name="dpsp_pinterest_hidden_images[]" value="'+t[s].id+'" />',i+="</div>",$btn_select.before(i)}}),o.open())})});
3
+ },{}]},{},["dNy0"], null)
assets/dist/dashboard-tinymce.1.18.0.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"KE6J":[function(require,module,exports) {
2
+ jQuery(function(e){tinymce.PluginManager.add("dpsp_click_to_tweet",function(t,p){t.addButton("dpsp_click_to_tweet",{icon:"dpsp-icon-twitter",tooltip:'Grow "Click to Tweet"',onclick:function(){t.windowManager.open({id:"dpsp_click_to_tweet_dialog",title:"Add Click to Tweet Shortcode",minWidth:750,buttons:[{text:"Add Shortcode",classes:"primary abs-layout-item",minWidth:130,onclick:"submit"},{text:"Cancel",onclick:"close"}],body:[{type:"textbox",id:"dpsp_tweet",name:"dpsp_tweet",label:"The Tweet that will be shared on Twitter",multiline:!0,minWidth:400,minHeight:100},{type:"textbox",id:"dpsp_display_tweet",name:"dpsp_display_tweet",label:"The Tweet that will be displayed in your article",multiline:!0,minWidth:400,minHeight:100},{type:"checkbox",id:"dpsp_tweet_hide_url",name:"dpsp_tweet_hide_url",label:"Hide the URL",text:"The URL of the post will not be added to the tweet"},{type:"checkbox",id:"dpsp_tweet_hide_via",name:"dpsp_tweet_hide_via",label:'Hide "via"',text:"The Twitter username saved in the Settings page will not be added to the tweet."},{type:"listbox",id:"dpsp_tweet_style",name:"dpsp_tweet_style",label:"Tweet Box Style",values:[{text:"Default",value:"0"},{text:"Simple",value:"1"},{text:"Simple with a twist",value:"2"},{text:"Simple border",value:"3"},{text:"Double border",value:"4"},{text:"Full background",value:"5"}]}],onsubmit:function(e){var p="";e.data.dpsp_tweet&&(p="[socialpug_tweet",p+=' tweet="'+e.data.dpsp_tweet+'"',p+=' display_tweet="'+e.data.dpsp_display_tweet+'"',0!=e.data.dpsp_tweet_style&&(p+=' style="'+e.data.dpsp_tweet_style+'"'),e.data.dpsp_tweet_hide_url&&(p+=' remove_url="yes"'),e.data.dpsp_tweet_hide_via&&(p+=' remove_username="yes"'),p+="]"),p&&t.insertContent(p)}}),$dpsp_tweet=e("#dpsp_tweet"),$dpsp_tweet_wrapper=$dpsp_tweet.closest(".mce-formitem"),$dpsp_tweet_wrapper.height($dpsp_tweet_wrapper.height()+25),$sample_permalink=e("#sample-permalink");var p=280,i=20,d=$sample_permalink.text().length;function a(){return p-i-d-$dpsp_tweet.val().length}$dpsp_tweet.after('<p id="dpsp_tweet_length"><em>Characters remaining: <span>'+a()+"</span></em></p>"),$dpsp_tweet_wrapper.siblings(".mce-formitem").each(function(){e(this).css("top",parseInt(e(this).css("top"),10)+25)}),e("#dpsp_click_to_tweet_dialog-body").height(e("#dpsp_click_to_tweet_dialog-body").height()+25),$dpsp_tweet.keyup(function(){e("#dpsp_tweet_length span").html(a())}),e("#dpsp_tweet_hide_via").click(function(){i="true"==e(this).attr("aria-checked")?20:0,$dpsp_tweet.trigger("keyup")}),e("#dpsp_tweet_hide_url").click(function(){d="true"==e(this).attr("aria-checked")?$sample_permalink.text().length:0,$dpsp_tweet.trigger("keyup")})}})})});
3
+ },{}]},{},["KE6J"], null)
assets/dist/dashboard.1.0.0.js DELETED
@@ -1 +0,0 @@
1
- jQuery(function(s){function t(t){s('.dpsp-social-platforms-sort-list li[data-network="'+t+'"]').remove(),s(".dpsp-social-platforms-sort-list li").removeClass("dpsp-last"),s(".dpsp-social-platforms-sort-list li").last().addClass("dpsp-last"),0==s(".dpsp-social-platforms-sort-list li").length&&(s(".dpsp-social-platforms-sort-list").fadeOut(1),s(".dpsp-social-platforms-sort-list").removeClass("dpsp-active"))}s(document).on("click",".dpsp-tool-wrapper .dpsp-switch label",function(t){var e=s(this).closest(".dpsp-tool-actions"),p=e.find(".dpsp-tool-settings");p.fadeOut(200),e.append('<div class="dpsp-tool-actions-overlay"><div class="spinner"></div></div>'),e.find(".dpsp-tool-actions-overlay").animate({opacity:1},200);var a,i,o=s(this).siblings("input").data("tool"),d=s(this).siblings("input").data("tool-activation");"undefined"!=o&&(e.hasClass("dpsp-inactive")?(a=d,i={action:"dpsp_activate_tool",dpsptkn:s("#dpsptkn").val(),setting:a},s.post(ajaxurl,i,function(){})).done(function(t){1==t&&(e.find(".dpsp-tool-actions-overlay").animate({opacity:0},200,function(){s(this).remove()}),e.removeClass("dpsp-inactive").addClass("dpsp-active"),e.find("span").text("Active"),p.fadeIn(200))}):function(t){var e={action:"dpsp_deactivate_tool",dpsptkn:s("#dpsptkn").val(),setting:t};return s.post(ajaxurl,e,function(){})}(d).done(function(t){var p;1==t&&(e.find(".dpsp-tool-actions-overlay").animate({opacity:0},200,function(){s(this).remove()}),e.removeClass("dpsp-active").addClass("dpsp-inactive"),e.find("span").text("Inactive"),p=(p=o).replace("share_","").replace("follow_","").replace("_","-"),s("#toplevel_page_dpsp-social-pug .wp-submenu li a").each(function(){-1!=s(this).attr("href").indexOf(p)&&s(this).parent().hide()}))}))}),s.fn.select2&&s(".dpsp-setting-field-select select").select2({minimumResultsForSearch:1/0}).on("select2:open",function(){s(".select2-container").last().addClass("dpsp-select2")}),s(function(){s(".dpsp-social-platforms-sort-list").sortable({handle:".dpsp-sort-handle",placeholder:"dpsp-sort-placeholder",containment:"#wpwrap"})}),s(document).on("click","#dpsp-networks-selector .dpsp-network-item",function(){$this=s(this),$checkbox=$this.children(".dpsp-network-item-checkbox"),$this.attr("data-checked")?$this.removeAttr("data-checked"):$this.attr("data-checked","true")}),s(document).on("click","#dpsp-select-networks",function(t){t.preventDefault(),s("#dpsp-networks-selector-wrapper").hasClass("dpsp-active")?(s("#dpsp-networks-selector-wrapper").removeClass("dpsp-active"),s("#dpsp-networks-selector-wrapper").stop().fadeOut(250,function(){0==s(".dpsp-social-platforms-sort-list").find("li").length?(s("#dpsp-sortable-networks-empty").stop().fadeIn(400),s("#dpsp-sortable-networks-empty").addClass("dpsp-active")):(s(".dpsp-social-platforms-sort-list").stop().fadeIn(400),s(".dpsp-social-platforms-sort-list").addClass("dpsp-active"))})):(s("#dpsp-select-networks").hide(),s("#dpsp-networks-selector-wrapper").addClass("dpsp-active"),0==s(".dpsp-social-platforms-sort-list").find("li").length?(s(".dpsp-social-platforms-sort-list").hide(),s("#dpsp-sortable-networks-empty").removeClass("dpsp-active"),s("#dpsp-sortable-networks-empty").stop().fadeOut(250,function(){s("#dpsp-networks-selector-wrapper").stop().fadeIn(250)})):(s(".dpsp-social-platforms-sort-list").removeClass("dpsp-active"),s(".dpsp-social-platforms-sort-list").stop().fadeOut(250,function(){s("#dpsp-networks-selector-wrapper").stop().fadeIn(250)})))}),s(document).on("click","#dpsp-networks-selector-footer a",function(e){e.preventDefault(),s("#dpsp-select-networks").show(),s("#dpsp-networks-selector .dpsp-network-item").each(function(){$this=s(this);var e=$this.attr("data-network"),p=$this.attr("data-network-name");if($this.attr("data-checked")){var a=!1;if(s(".dpsp-social-platforms-sort-list li").each(function(){s(this).attr("data-network")==e&&(a=!0)}),a)return a;!function(t,e){if("undefined"==t)return!1;if("undefined"==e)return!1;var p="",a=s('input[name="dpsp_buttons_location"]').val();p+='<li data-network="'+t+'">',p+='<div class="dpsp-sort-handle ui-sortable-handle">\x3c!-- --\x3e</div>',p+='<div class="dpsp-list-icon dpsp-list-icon-social dpsp-icon-'+t+" dpsp-background-color-network-"+t+'">\x3c!-- --\x3e</div>',p+='<div class="dpsp-list-input-wrapper"><input type="text" placeholder="This button has no label text." name="'+a+"[networks]["+t+'][label]" value="'+e+'"></div>',p+='<div class="dpsp-list-actions">',p+='<a class="dpsp-list-edit-label dpsp-transition" href="#"><span class="dashicons dashicons-edit"></span>Edit Label</a>',p+='<a class="dpsp-list-remove dpsp-transition" href="#"><span class="dashicons dashicons-no-alt"></span>Remove</a>',p+="</div>",p+="</li>",s(".dpsp-social-platforms-sort-list").append(p),s(".dpsp-social-platforms-sort-list li").removeClass("dpsp-last"),s(".dpsp-social-platforms-sort-list li").last().addClass("dpsp-last")}(e,p)}else t(e)}),s("#dpsp-networks-selector-wrapper").removeClass("dpsp-active").stop().fadeOut(250,function(){0==s(".dpsp-social-platforms-sort-list").find("li").length?(s("#dpsp-sortable-networks-empty").stop().fadeIn(250),s("#dpsp-sortable-networks-empty").addClass("dpsp-active")):(s(".dpsp-social-platforms-sort-list").stop().fadeIn(250),s(".dpsp-social-platforms-sort-list").addClass("dpsp-active"))})}),s(document).on("click",".dpsp-list-edit-label",function(t){t.preventDefault(),s(this).closest("li").find(".dpsp-list-input-wrapper input").focus().select()}),s(document).on("click",".dpsp-list-remove",function(e){e.preventDefault();var p=s(this).closest("li").attr("data-network");t(p),s('#dpsp-networks-selector .dpsp-network-item[data-network="'+p+'"]').removeAttr("data-checked"),0==s(".dpsp-social-platforms-sort-list").find("li").length&&(s("#dpsp-sortable-networks-empty").stop().fadeIn(250),s("#dpsp-sortable-networks-empty").addClass("dpsp-active"),s(".dpsp-social-platforms-sort-list").removeClass("dpsp-active"))}),s(document).ready(function(){s(".dpsp-network-btn").attr("href","#")}),s(document).on("click",".dpsp-network-btn",function(t){t.preventDefault(),s(this).closest("label").click()}),s(document).on("focus",".dpsp-page-mobile .dpsp-list-input-wrapper input",function(){s(this).blur()}),s(document).on("click",".dpsp-setting-field-button-shape input",function(){s(this).closest(".dpsp-page-wrapper").find(".dpsp-networks-btns-wrapper").parent().removeClass("dpsp-shape-circle dpsp-shape-rounded dpsp-shape-rectangular").addClass("dpsp-shape-"+s(this).val())}),s(document).on("mouseenter",".dpsp-setting-field-tooltip-icon",function(){s(this).siblings("div").css("opacity",1).css("visibility","visible")}),s(document).on("mouseleave",".dpsp-setting-field-tooltip-icon",function(){s(this).siblings("div").css("opacity",0).css("visibility","hidden")}),s(document).on("mouseenter",".dpsp-setting-field-tooltip-wrapper.dpsp-has-link",function(){s(this).find("div").css("opacity",1).css("visibility","visible")}),s(document).on("mouseleave",".dpsp-setting-field-tooltip-wrapper.dpsp-has-link",function(){s(this).find("div").css("opacity",0).css("visibility","hidden")}),s(document).on("change",".dpsp-setting-field-wrapper *",function(){s(".dpsp-card-inner").each(function(){s(this).find(".dpsp-setting-field-wrapper").removeClass("dpsp-last"),s(this).find(".dpsp-setting-field-wrapper:not(.disabled)").last().addClass("dpsp-last")})}),s(".dpsp-setting-field-wrapper *").first().trigger("change"),s(function(){function t(){$checkbox_total_shares.is(":checked")||$checkbox_shares.is(":checked")?($wrapper_checkbox_count_round.removeClass("disabled"),$checkbox_count_round.attr("disabled",!1)):($wrapper_checkbox_count_round.addClass("disabled"),$checkbox_count_round.attr("disabled",!0))}$checkbox_shares=s(".dpsp-setting-field-show-share-count input[type=checkbox]"),$checkbox_total_shares=s(".dpsp-setting-field-show-total-share-count input[type=checkbox]"),$checkbox_count_round=s(".dpsp-setting-field-share-count-round input[type=checkbox]"),$wrapper_checkbox_count_round=$checkbox_count_round.closest(".dpsp-setting-field-wrapper"),$checkbox_total_shares.is(":checked")||($checkbox_total_shares.closest(".dpsp-setting-field-wrapper").next().addClass("disabled"),$checkbox_total_shares.closest(".dpsp-setting-field-wrapper").next().find("select").attr("disabled",!0)),$checkbox_total_shares.change(function(){$checkbox_total_shares.is(":checked")?($checkbox_total_shares.closest(".dpsp-setting-field-wrapper").next().removeClass("disabled"),$checkbox_total_shares.closest(".dpsp-setting-field-wrapper").next().find("select").attr("disabled",!1)):($checkbox_total_shares.closest(".dpsp-setting-field-wrapper").next().addClass("disabled"),$checkbox_total_shares.closest(".dpsp-setting-field-wrapper").next().find("select").attr("disabled",!0))}),t(),$checkbox_shares.change(function(){t()}),$checkbox_total_shares.change(function(){t()})}),s(document).on("click","#dpsp-refresh-share-counts",function(t){if(t.preventDefault(),s(this).hasClass("disabled"))return!1;$refresh_button=s(this),$spinner=$refresh_button.siblings(".spinner"),$refresh_button.addClass("disabled"),$spinner.css("visibility","visible"),s(".dpsp-statistic-bar-wrapper-network").css("opacity",.6);var e={action:"dpsp_refresh_share_counts",nonce:$refresh_button.siblings('[name="dpsp_refresh_share_counts"]').val(),post_id:parseInt(s("#post_ID").val())};s.post(ajaxurl,e,function(t){t&&s(".dpsp-statistic-bars-wrapper").replaceWith(t)})}),s(document).on("change",'[name="dpsp_settings[facebook_share_counts_provider]"]',function(){s(".dpsp-setting-field-facebook-authorize-app").hide(),s(".dpsp-setting-field-facebook-app-id, .dpsp-setting-field-facebook-app-secret").hide(),"authorized_app"==s(this).val()&&s(".dpsp-setting-field-facebook-authorize-app").show(),"own_app"==s(this).val()&&s(".dpsp-setting-field-facebook-app-id, .dpsp-setting-field-facebook-app-secret").show()}),s('[name="dpsp_settings[facebook_share_counts_provider]"]').trigger("change"),s(document).on("keyup","#dpsp-deactivate-modal [name=dpsp_disable_text]",function(){""!=s(this).val()?s("#dpsp-feedback-submit").attr("disabled",!1):s("#dpsp-feedback-submit").attr("disabled",!0)}),s(document).on("keyup","#dpsp-deactivate-modal [name=dpsp_disable_from]",function(){var t;t=s(this).val(),/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t).toLowerCase())?s("#dpsp-feedback-submit").attr("disabled",!1):s("#dpsp-feedback-submit").attr("disabled",!0)}),s("#dpsp-feedback-submit").click(function(t){t.preventDefault(),s("#dpsp-deactivate-modal").hide(),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"dpsp_send_deactivation_feedback",data:s("#dpsp-deactivate-modal form").serialize()},complete:function(t,e,p){s("#dpsp-deactivate-modal").remove(),window.location.href=s('.wp-admin.plugins-php tr[data-slug="social-pug"] .row-actions .deactivate a').attr("href")}})}),s("#dpsp-only-deactivate").click(function(t){t.preventDefault(),s("#dpsp-deactivate-modal").hide(),s("#dpsp-deactivate-modal").remove(),window.location.href=s('.wp-admin.plugins-php tr[data-slug="social-pug"] .row-actions .deactivate a').attr("href")}),s(".dpsp-deactivate-close").click(function(t){t.preventDefault(),s("#dpsp-deactivate-modal").hide()})});
 
assets/dist/{dpsp-selectable-empty.1.0.0.png → dpsp-selectable-empty.1.18.0.png} RENAMED
File without changes
assets/dist/extension-bitly.1.18.0.png ADDED
Binary file
assets/dist/extension-branch.1.18.0.png ADDED
Binary file
assets/dist/extension-ctt.1.18.0.png ADDED
Binary file
assets/dist/extension-ga-utm-tracking.1.18.0.png ADDED
Binary file
assets/dist/extension-networks.1.18.0.png ADDED
Binary file
assets/dist/front-end-free.1.18.0.js ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"Mzb7":[function(require,module,exports) {
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;const e=e=>{if(!e)return!1;const t=document.createElementNS("http://www.w3.org/2000/svg","svg"),a=document.createElementNS("http://www.w3.org/2000/svg","path"),r=[{name:"version",value:"1.1"},{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"width",value:e.width},{name:"height",value:e.height},{name:"viewBox",value:`0 0 ${e.width} ${e.height}`}],n=[{name:"d",value:e.path}];return r.forEach(({name:e,value:a})=>t.setAttribute(e,a)),n.forEach(({name:e,value:t})=>a.setAttribute(e,t)),t.appendChild(a),t};var t=e;exports.default=t;
3
+ },{}],"LvEJ":[function(require,module,exports) {
4
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./utils/create-svg-icon"));function t(e){return e&&e.__esModule?e:{default:e}}const s=()=>{[].slice.call(document.getElementsByClassName("dpsp-network-btn")).forEach(t=>{if(t.getElementsByTagName("svg").length>0)return!0;const s=t.classList[1].split("-")[1],n=window.mvGrowData.buttonSVG[s];t.getElementsByClassName("dpsp-network-icon-inner")[0].appendChild((0,e.default)(n))})};var n=s;exports.default=n;
5
+ },{"./utils/create-svg-icon":"Mzb7"}],"ZFee":[function(require,module,exports) {
6
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isDebug=exports.debugTimeLog=exports.debugTimeEnd=exports.debugTime=exports.debugTable=exports.debugGroupEnd=exports.debugGroupCollapsed=exports.debugGroup=exports.debugError=exports.debugWarn=exports.debugInfo=exports.debugLog=void 0;const e=e=>(...r)=>{o()&&console[e](...r)},o=()=>window.MV_GROW_DEBUG||new URLSearchParams(window.location.search).has("MV_GROW_DEBUG");exports.isDebug=o;const r=e("log");exports.debugLog=r;const s=e("info");exports.debugInfo=s;const t=e("warn");exports.debugWarn=t;const p=e("error");exports.debugError=p;const d=e("group");exports.debugGroup=d;const u=e("groupCollapsed");exports.debugGroupCollapsed=u;const g=e("groupEnd");exports.debugGroupEnd=g;const n=e("table");exports.debugTable=n;const b=e("time");exports.debugTime=b;const x=e("timeEnd");exports.debugTimeEnd=x;const c=e("timeLog");exports.debugTimeLog=c;
7
+ },{}],"qbcG":[function(require,module,exports) {
8
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("./utils/debug");const e={width:700,height:300,toolbar:!1,location:!1,status:!1,menubar:!1,scrollbars:!1,resizable:!0,top:200},r={width:800,height:575},s={width:720,height:520,scrollbars:!0},i=r=>{r.blur();const s=Object.assign({},e,a(r.classList));return(0,t.debugTable)(s),window.open(r.href||r.getAttribute("data-href"),"targetWindow",n(s))},n=t=>{let e=Object.keys(t).reduce(function(e,r){return`${e}${r}=${o(t[r])},`},"");return t.hasOwnProperty("left")||(e=`${e}left=${(window.innerWidth-t.width)/2}`),e},o=t=>"boolean"!=typeof t?t:t?"yes":"no",a=t=>t.contains("dpsp-buffer")?r:t.contains("dpsp-pinterest")||t.contains("dpsp-pin-it-button")?s:{};var d=i;exports.default=d;
9
+ },{"./utils/debug":"ZFee"}],"CR0T":[function(require,module,exports) {
10
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.initializeButtonHover=s,exports.initializeButtons=r;var t=e(require("./open-popup"));function e(t){return t&&t.__esModule?t:{default:t}}function s(){const t=document.querySelectorAll(".dpsp-networks-btns-wrapper li .dpsp-network-btn");Array.prototype.forEach.call(t,t=>{t.addEventListener("mouseenter",({target:t})=>{t.parentNode.classList.add("dpsp-hover")}),t.addEventListener("mouseleave",({target:t})=>{t.parentNode.classList.remove("dpsp-hover")})})}function r(){const e=document.querySelectorAll(".dpsp-networks-btns-share .dpsp-network-btn, .dpsp-click-to-tweet, .dpsp-pin-it-button");Array.prototype.forEach.call(e,e=>{e.addEventListener("click",s=>{e.classList.contains("dpsp-whatsapp")||e.classList.contains("dpsp-email")||(s.preventDefault(),/#$/.test(e.href)||/#$/.test(e.getAttribute("data-href"))?s.stopPropagation():(0,t.default)(e))})})}
11
+ },{"./open-popup":"qbcG"}],"jsG1":[function(require,module,exports) {
12
+ "use strict";function e(){const e=document.querySelectorAll(".dpsp-network-btn.dpsp-print");Array.prototype.forEach.call(e,e=>{e.addEventListener("click",()=>{window.print()})})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e;exports.default=t;
13
+ },{}],"fkUf":[function(require,module,exports) {
14
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=()=>window.mvGrowData&&window.mvGrowData.shouldRun;exports.default=e;
15
+ },{}],"VRvp":[function(require,module,exports) {
16
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./utils/should-run"));function t(e){return e&&e.__esModule?e:{default:e}}function d(){const t=document.getElementById("dpsp-floating-sidebar");if(!t||!(0,e.default)())return;const d=Number(t.getAttribute("data-trigger-scroll"));let r=0;d?window.addEventListener("scroll",()=>{(r=Number(window.scrollY/document.body.clientHeight*100))>d?t.classList.add("opened"):t.classList.remove("opened")}):t.classList.add("opened")}var r=d;exports.default=r;
17
+ },{"./utils/should-run":"fkUf"}],"X18c":[function(require,module,exports) {
18
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.manageNoPinSingle=void 0;const e=({})=>e=>!e.classList.contains("dpsp-post-pinterest-image-hidden-inner")&&(e.setAttribute("data-pin-nopin","true"),!0),t=({content:e})=>t=>!e.contains(t)&&(t.setAttribute("data-pin-nopin","true"),!0),n={post_custom_images:e,post_images:t,all_images:()=>()=>!0},s=({pinnableImages:e,content:t})=>s=>(Object.keys(n).includes(e)||(e="all_images"),n[e]({content:t})(s));exports.manageNoPinSingle=s;
19
+ },{}],"DKSj":[function(require,module,exports) {
20
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;const e=()=>{if(window.mvGrowData&&window.mvGrowData.general&&window.mvGrowData.general.contentSelector)return document.querySelector(window.mvGrowData.general.contentSelector);if(document.getElementsByTagName("body")[0].classList.contains("mediavine-trellis"))return document.getElementById("content").getElementsByClassName("article")[0];const e=document.getElementById("theme-content-section");if(e)return e;const t=document.getElementById("dpsp-post-content-markup");return t&&t.parentNode?t.parentNode:document.body};var t=e;exports.default=t;
21
+ },{}],"XSCr":[function(require,module,exports) {
22
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSettings=void 0;var e=t(require("../utils/get-content-wrapper"));function t(e){return e&&e.__esModule?e:{default:e}}const i={minimumImageHeight:200,minimumImageWidth:200,buttonPosition:"top_left",buttonShareBehavior:"post_image",hoverButtonShareBehavior:"hover_image",showImageOverlay:!0,showButtonLabel:!0,buttonLabelText:"Save",buttonShape:"rectangular",pinImageURL:"",pinnableImages:"all_images",pinDescriptionSource:"image_alt_tag",pinDescription:"",pinTitle:"",postTypeDisplay:["post"],postImageHidden:!1,postImageHiddenMultiple:!1,lazyLoadCompatibility:!1,disableIframes:!1,imagePinIt:!1,hasContent:!1,shareURL:"",ignoreSelectors:[],bypassClasses:[]},a=()=>Object.assign({},i,window.mvGrowData.pinterest,{content:(0,e.default)()});exports.getSettings=a;
23
+ },{"../utils/get-content-wrapper":"DKSj"}],"QgJj":[function(require,module,exports) {
24
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addButtonSingle=void 0;const t='<svg xmlns="http://www.w3.org/2000/svg" width="23" height="32" viewBox="0 0 23 32"><path d="M0 10.656q0-1.92 0.672-3.616t1.856-2.976 2.72-2.208 3.296-1.408 3.616-0.448q2.816 0 5.248 1.184t3.936 3.456 1.504 5.12q0 1.728-0.32 3.36t-1.088 3.168-1.792 2.656-2.56 1.856-3.392 0.672q-1.216 0-2.4-0.576t-1.728-1.568q-0.16 0.704-0.48 2.016t-0.448 1.696-0.352 1.28-0.48 1.248-0.544 1.12-0.832 1.408-1.12 1.536l-0.224 0.096-0.16-0.192q-0.288-2.816-0.288-3.36 0-1.632 0.384-3.68t1.184-5.152 0.928-3.616q-0.576-1.152-0.576-3.008 0-1.504 0.928-2.784t2.368-1.312q1.088 0 1.696 0.736t0.608 1.824q0 1.184-0.768 3.392t-0.8 3.36q0 1.12 0.8 1.856t1.952 0.736q0.992 0 1.824-0.448t1.408-1.216 0.992-1.696 0.672-1.952 0.352-1.984 0.128-1.792q0-3.072-1.952-4.8t-5.12-1.728q-3.552 0-5.952 2.304t-2.4 5.856q0 0.8 0.224 1.536t0.48 1.152 0.48 0.832 0.224 0.544q0 0.48-0.256 1.28t-0.672 0.8q-0.032 0-0.288-0.032-0.928-0.288-1.632-0.992t-1.088-1.696-0.576-1.92-0.192-1.92z"></path></svg>',e=e=>n=>{if(!i(e)(n))return!1;const{buttonPosition:s,hoverButtonShareBehavior:a,showImageOverlay:o,showButtonLabel:p,buttonLabelText:r,buttonShape:d,pinImageURL:l,pinDescription:c,shareURL:u}=e;let m=n.getAttribute("data-pin-media")||n.getAttribute("data-media")||n.getAttribute("data-lazy-src")||n.getAttribute("data-src")||n.getAttribute("src"),b=n.getAttribute("data-pin-description")||"";if("post_image"===a&&(m=l||m,b=c||b),!m)return!1;let g=n.getAttribute("class");const h=n.getAttribute("style");if(g){const t=["lazyloaded","lazyload","td-animation-stack"];g=g.split(" ").filter(e=>!t.includes(e)).join(" ")}const A=document.createElement("div");A.setAttribute("class",`dpsp-pin-it-wrapper ${g||""}`),h&&A.setAttribute("style",h),g&&g.split(" ").forEach(t=>{t.trim()&&n.classList.remove(t)}),n.setAttribute("style",""),n.parentNode.insertBefore(A,n),A.appendChild(n);const q=n.getAttribute("data-pin-id"),L=q?`https://pinterest.com/pin/${q}/repin/x`:`https://pinterest.com/pin/create/bookmarklet/?media=${encodeURIComponent(m)}&url=${encodeURIComponent(u)}&is_video=false&description=${encodeURIComponent(b)}`,v=document.createElement("a");if(v.classList.add("dpsp-pin-it-button"),v.classList.add(`dpsp-pin-it-button-${s}`),v.classList.add(`dpsp-pin-it-button-shape-${d}`),v.setAttribute("target","_blank"),v.rel="noopener",v.innerHTML='<span class="dpsp-network-icon">'+t+"</span>",p&&(v.classList.add("dpsp-pin-it-button-has-label"),v.title=r,v.setAttribute("aria-label",r)),v.href=L,o){const t=document.createElement("span");t.setAttribute("class","dpsp-pin-it-overlay"),A.appendChild(t)}return A.appendChild(v),!0};exports.addButtonSingle=e;const i=({imagePinIt:t,imageInContent:e,minimumImageWidth:i,minimumImageHeight:n})=>s=>"1"===t&&(!!e&&("IFRAME"!==s.nodeName&&(!s.parentNode.classList.contains("dpsp-pin-it-wrapper")&&(!(s.clientWidth<=0||s.clientHeight<=0)&&(!s.getAttribute("data-pin-nopin")&&(s.classList.contains("dpsp_no_pin")||s.classList.contains("nopin")||s.parentNode.classList.contains("nopin")?(s.setAttribute("data-pin-nopin","true"),!1):!(s.clientWidth<Number(i)||s.clientHeight<Number(n))&&!s.classList.contains("emoji")))))));
25
+ },{}],"a47m":[function(require,module,exports) {
26
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addDescriptionSingle=void 0;const t=({pinDescriptionSource:t,pinDescription:i,imageInContent:n})=>r=>{if(!e({imageInContent:n})(r))return!1;let o="";"image_alt_tag"===t&&r.getAttribute("alt")&&(o=r.getAttribute("alt")),"image_title"===t&&r.getAttribute("title")&&(o=r.getAttribute("title")),i&&"post_pinterest_description"===t&&(o=i),!o&&i&&(o=i);const p=document.querySelector('[property="og:title"]');return!o&&p&&(o=p.getAttribute("content")),o&&r.setAttribute("data-pin-description",o),!0};exports.addDescriptionSingle=t;const e=({imageInContent:t})=>e=>!!t&&!e.getAttribute("data-pin-description");
27
+ },{}],"QfZG":[function(require,module,exports) {
28
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addTitleSingle=void 0;const t=({pinTitle:t,imageInContent:n})=>i=>{if(!e({imageInContent:n})(i))return!1;let o="";!o&&t&&(o=t);const r=document.querySelector('[property="og:title"]');return!o&&r&&(o=r.getAttribute("content")),!!o&&(i.setAttribute("data-pin-title",o),!0)};exports.addTitleSingle=t;const e=({imageInContent:t})=>e=>!!t&&!e.getAttribute("data-pin-title");
29
+ },{}],"UfYi":[function(require,module,exports) {
30
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.removeBrowserExtensionButton=void 0;const e=({})=>e=>!e.parentNode.classList.contains("dpsp-pin-it-wrapper")&&(e.addEventListener("mouseenter",()=>{const e=Array.prototype.slice.call(document.querySelectorAll('[style*="z-index: 8675309"][style*="data:image/svg+xml"]')),t=Array.prototype.slice.call(document.querySelectorAll('span[class^="PIN_"][data-pin-log^="button_pinit_floating"]'));e.concat(t).forEach(e=>e.remove())}),!0);exports.removeBrowserExtensionButton=e;
31
+ },{}],"h63O":[function(require,module,exports) {
32
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addShareURL=void 0;const e=({shareURL:e})=>t=>!t.getAttribute("data-pin-url")&&(!!e&&(t.setAttribute("data-pin-url",e),!0));exports.addShareURL=e;
33
+ },{}],"kZhX":[function(require,module,exports) {
34
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;const e=({minimumImageHeight:e,minimumImageWidth:s,disableIframes:t,bypassClasses:i},a)=>!a.classList.contains("dpsp-post-pinterest-image-hidden-inner")&&("true"===a.dataset.pinNopin||(a.height<e||(a.width<s||("yes"===t&&"IFRAME"===a.nodeName||i.some(e=>a.classList.contains(e))))));var s=e;exports.default=s;
35
+ },{}],"xUEp":[function(require,module,exports) {
36
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("./add-button"),t=require("./add-descriptions"),r=require("./add-titles"),i=require("./remove-extension"),n=require("./add-share-url"),d=o(require("./filter-image"));function o(e){return e&&e.__esModule?e:{default:e}}const a=o=>a=>(0,d.default)(o,a)?(a.setAttribute("data-pin-nopin","true"),!1):(o.imageInContent=o.content.contains(a),[t.addDescriptionSingle,r.addTitleSingle,e.addButtonSingle,n.addShareURL,i.removeBrowserExtensionButton].forEach(e=>e(o)(a)),!0);var u=a;exports.default=u;
37
+ },{"./add-button":"QgJj","./add-descriptions":"a47m","./add-titles":"QfZG","./remove-extension":"UfYi","./add-share-url":"h63O","./filter-image":"kZhX"}],"f8H1":[function(require,module,exports) {
38
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;const e=()=>{[].slice.call(document.getElementsByClassName("dpsp-post-pinterest-image-hidden")).map(e=>{e.style.cssText="position:absolute;height:0;width:0;",e.getElementsByTagName("img")[0].removeAttribute("loading")})};var t=e;exports.default=t;
39
+ },{}],"axgK":[function(require,module,exports) {
40
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../utils/debug");const e=()=>{const e=document.createElement("script"),s=(0,t.isDebug)()?"https://cdn.mediavine.com/pinmarklet.js":"https://assets.pinterest.com/js/pinmarklet.js";e.setAttribute("type","text/javascript"),e.setAttribute("charset","UTF-8"),e.setAttribute("src",s),document.body.appendChild(e)};var s=e;exports.default=s;
41
+ },{"../utils/debug":"ZFee"}],"dCCy":[function(require,module,exports) {
42
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;const e=({target:e,callback:t})=>{const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0}),r};var t=e;exports.default=t;
43
+ },{}],"AalF":[function(require,module,exports) {
44
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=a(require("../utils/observe-mutation")),t=require("../pinterest/manage-nopin"),r=require("../pinterest");function a(e){return e&&e.__esModule?e:{default:e}}const l=()=>{[].slice.call(document.getElementsByClassName("tl-widget-container")).forEach(a=>{(0,e.default)({target:a,callback:()=>{Array.prototype.forEach.call(document.querySelectorAll("img"),(0,t.manageNoPinSingle)((0,r.getPinterestSettings)()))}})})};var n=l;exports.default=n;
45
+ },{"../utils/observe-mutation":"dCCy","../pinterest/manage-nopin":"X18c","../pinterest":"b4YO"}],"dRtE":[function(require,module,exports) {
46
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;const e=({ignoreSelectors:e=[]})=>{e.forEach(e=>{[...document.querySelectorAll(`${e}, ${e} img`)].forEach(e=>"IMG"===e.tagName&&e.classList.add("mv-grow-bypass"))})};var t=e;exports.default=t;
47
+ },{}],"b4YO":[function(require,module,exports) {
48
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.initializePinterest=d,exports.initializeProPinterest=c,Object.defineProperty(exports,"getPinterestSettings",{enumerable:!0,get:function(){return t.getSettings}});var e=require("./manage-nopin"),t=require("./get-settings"),r=l(require("./process-image")),i=l(require("./un-lazy-hidden-images")),n=l(require("./load-grid")),a=l(require("../observations/thrive-leads")),o=l(require("../utils/get-content-wrapper")),u=l(require("../utils/should-run")),s=l(require("./ignore-images"));function l(e){return e&&e.__esModule?e:{default:e}}function d(){if(!(0,u.default)())return!1;[...document.querySelectorAll(".dpsp-networks-btns-share .dpsp-network-btn.dpsp-pinterest")].forEach(e=>{e.addEventListener("click",t=>{/#$/.test(e.href)||/#$/.test(e.getAttribute("data-href"))?(t.preventDefault(),(0,i.default)(),(0,n.default)()):t.preventDefault()}),e.addEventListener("keydown",t=>{"Space"!==t.code&&"Enter"!==t.code||e.click()})})}function c(){if(document.body.classList.contains("tve_editor_page"))return!1;if(!window.mvGrowData||!window.mvGrowData.pinterest)return!1;const i=(0,t.getSettings)();return!(!(0,u.default)()||"1"!==i.hasContent)&&([...document.querySelectorAll("img, iframe")].forEach((0,e.manageNoPinSingle)(i)),(0,s.default)(i),(0,a.default)(),Array.prototype.forEach.call((0,o.default)().querySelectorAll("img, iframe"),(0,r.default)(i)),!0)}
49
+ },{"./manage-nopin":"X18c","./get-settings":"XSCr","./process-image":"xUEp","./un-lazy-hidden-images":"f8H1","./load-grid":"axgK","../observations/thrive-leads":"AalF","../utils/get-content-wrapper":"DKSj","../utils/should-run":"fkUf","./ignore-images":"dRtE"}],"tCTD":[function(require,module,exports) {
50
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;const t=()=>window.mvGrowData&&window.mvGrowData.init?window.mvGrowData:(document.getElementById("mv-grow-data")&&document.getElementById("mv-grow-data").dataset.settings&&(window.mvGrowData=JSON.parse(document.getElementById("mv-grow-data").dataset.settings),window.mvGrowData.init=!0),{init:!0});var e=t;exports.default=e;
51
+ },{}],"nDkI":[function(require,module,exports) {
52
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;const e=()=>{if(document.querySelector(".dpsp-top-shared-post")||document.querySelector(".dpsp-click-to-tweet")||document.querySelector(".dpsp-network-btn")){const e=document.querySelector(".mv-grow-style");e&&(e.rel="stylesheet",e.type="text/css")}};var t=e;exports.default=t;
53
+ },{}],"gSkV":[function(require,module,exports) {
54
+ "use strict";var e=d(require("./fn/add-missing-icons")),t=require("./fn/init-buttons"),i=d(require("./fn/init-print")),n=d(require("./fn/init-sidebar")),r=require("./fn/pinterest"),u=require("./fn/utils/debug"),o=d(require("./fn/utils/get-settings")),s=d(require("./fn/load-styles"));function d(e){return e&&e.__esModule?e:{default:e}}const a=()=>{(0,o.default)(),(0,u.debugLog)(window.mvGrowData),(0,s.default)();let d=0;window.addEventListener("scroll",()=>{d=Number(window.scrollY/document.body.clientHeight*100)}),(0,t.initializeButtonHover)(),(0,r.initializePinterest)(),(0,i.default)(),(0,t.initializeButtons)(),(0,n.default)(),(0,e.default)(),window.removeEventListener("mousemove",a),window.removeEventListener("touchstart",a)};window.addEventListener("mousemove",a),window.addEventListener("touchstart",a);
55
+ },{"./fn/add-missing-icons":"LvEJ","./fn/init-buttons":"CR0T","./fn/init-print":"jsG1","./fn/init-sidebar":"VRvp","./fn/pinterest":"b4YO","./fn/utils/debug":"ZFee","./fn/utils/get-settings":"tCTD","./fn/load-styles":"nDkI"}]},{},["gSkV"], null)
assets/dist/front-end-jquery.1.0.0.js DELETED
@@ -1 +0,0 @@
1
- jQuery(function(t){t(document).ready(function(){"undefined"!=typeof dpsp_ajax_url&&"undefined"!=typeof dpsp_ajax_pull_post_share_counts_data&&t.post(dpsp_ajax_url,dpsp_ajax_pull_post_share_counts_data,function(t){})}),t(document).ready(function(){t("#dpsp-floating-sidebar").css("top",(window.innerHeight-t("#dpsp-floating-sidebar").height())/2)}),t(window).on("resize",function(){t("#dpsp-floating-sidebar").css("top",(window.innerHeight-t("#dpsp-floating-sidebar").height())/2)}),t(document).on("mouseenter",".dpsp-networks-btns-wrapper li a",function(e){t(this).closest("li").addClass("dpsp-hover")}),t(document).on("mouseleave",".dpsp-networks-btns-wrapper li a",function(){t(this).closest("li").removeClass("dpsp-hover")}),t(document).ready(function(){t(".dpsp-network-btn.dpsp-pinterest").click(function(e){if("#"!=t(this).attr("href"))return!1;e.preventDefault();var n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("charset","UTF-8"),n.setAttribute("src","https://assets.pinterest.com/js/pinmarklet.js"),document.body.appendChild(n)})}),t(document).ready(function(){t(".dpsp-network-btn.dpsp-print").click(function(t){window.print()})}),t(document).on("click",".dpsp-network-btn",function(e){if(!(t(this).hasClass("dpsp-twitter")&&void 0!==window.twttr||t(this).hasClass("dpsp-email"))){if(e.preventDefault(),"#"==t(this).attr("href"))return!1;t(this).blur(),window.open(t(this).attr("href"),"targetWindow","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=700,height=300,top=200,left="+(t(window).innerWidth()-700)/2)}})});
 
assets/dist/front-end.1.0.0.js DELETED
@@ -1 +0,0 @@
1
- function t(){var t=document.querySelectorAll(".dpsp-networks-btns-wrapper li a"),e=!0,n=!1,r=void 0;try{for(var o,a=t[Symbol.iterator]();!(e=(o=a.next()).done);e=!0){var i=o.value;i.addEventListener("mouseenter",function(t){t.target.parentNode.classList.add("dpsp-hover")}),i.addEventListener("mouseleave",function(t){t.target.parentNode.classList.remove("dpsp-hover")})}}catch(s){n=!0,r=s}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}}function e(){var t=document.querySelectorAll(".dpsp-network-btn.dpsp-pinterest");Array.prototype.forEach.call(t,function(t){t.addEventListener("click",function(t){var e=t.target;if(!/#$/.test(e.href))return t.stopPropagation(),void t.preventDefault();t.preventDefault();var n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("charset","UTF-8"),n.setAttribute("src","https://assets.pinterest.com/js/pinmarklet.js"),document.body.appendChild(n)})})}function n(){var t=document.querySelectorAll(".dpsp-network-btn.dpsp-print");Array.prototype.forEach.call(t,function(t){t.addEventListener("click",function(){window.print()})})}function r(){var t=document.querySelectorAll(".dpsp-network-btn");Array.prototype.forEach.call(t,function(t){t.addEventListener("click",function(t){var e=t.target;e.classList.contains("dpsp-email")||(t.preventDefault(),/#$/.test(e.href)?t.stopPropagation():(e.blur(),window.open(e.href,"targetWindow","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=700,height=300,top=200,left=".concat((window.innerWidth-700)/2))))})})}var o=function o(){t(),e(),n(),r(),window.removeEventListener("mousemove",o)};window.addEventListener("mousemove",o);
 
assets/dist/grow-logo-sq-navy.1.18.0.png ADDED
Binary file
assets/dist/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
assets/dist/intercom.1.18.0.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"HVsC":[function(require,module,exports) {
2
+ const t="j6qtyr66",e=JSON.parse(localStorage.getItem("mvGrowIntercomCache"))||{};async function n(){if(o())return;const n=window.mvgrow_intercom.options.license,{current_user_email:r,current_firstname:c,current_lastname:s}=window.mvgrow_intercom.user;let m,u,w;if(!r)return;const l=e.email,_=e.expirationDate;if(l&&l===r&&new Date<=_)m=l,u=e.name,w=e.user_hash;else{const{hash:t,customer_name:e,customer_email:o}=await a(r,n);m=o||r,u=e||`${c} ${s}`,w=t||null,localStorage.setItem("mvGrowIntercomCache",JSON.stringify({user_hash:t,name:e,email:o,expirationDate:i()}))}return window.intercomSettings={...w?{user_hash:w}:{},app_id:t,name:u,email:m,is_using_mv_grow_pro:!0},function(){var e=window,n=e.Intercom;if("function"==typeof n)n("reattach_activator"),n("update",e.intercomSettings);else{var r=document,o=function(){o.c(arguments)};o.q=[],o.c=function(t){o.q.push(t)},e.Intercom=o;var a=function(){var e=r.createElement("script");e.type="text/javascript",e.async=!0,e.src="https://widget.intercom.io/widget/"+t;var n=r.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};"complete"===document.readyState?a():e.attachEvent?e.attachEvent("onload",a):e.addEventListener("load",a,!1)}}(),window.MV_HAS_GROW_INTERCOM_BOOTED=!0,window.Intercom("boot",{...w?{user_hash:w}:{},app_id:t,email:m})}function r(){if(window.Intercom)return window.MV_HAS_GROW_INTERCOM_BOOTED=!1,window.Intercom("shutdown")}function o(){return window.MV_HAS_GROW_INTERCOM_BOOTED}async function a(t,e){if(e)try{const r=await fetch("https://product-data-sync.herokuapp.com/validate_user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t,grow_license:e,plugin_slug:"mediavine-grow"})});return 401===r.status||403===r.status?{hash:null}:r.json()}catch(n){console.error(n)}}function i(){let t=new Date;return t.setDate(t.getDate()+7),t}e||localStorage.setItem("mvGrowIntercomCache",JSON.stringify({})),o()||n();
3
+ },{}]},{},["HVsC"], null)
assets/dist/jquery.ui.touch-punch.min.1.0.0.js DELETED
@@ -1 +0,0 @@
1
- !function(o){function t(o,t){if(!(o.originalEvent.touches.length>1)){o.preventDefault();var e=o.originalEvent.changedTouches[0],u=document.createEvent("MouseEvents");u.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(u)}}if(o.support.touch="ontouchend"in document,o.support.touch){var e,u=o.ui.mouse.prototype,n=u._mouseInit,c=u._mouseDestroy;u._touchStart=function(o){!e&&this._mouseCapture(o.originalEvent.changedTouches[0])&&(e=!0,this._touchMoved=!1,t(o,"mouseover"),t(o,"mousemove"),t(o,"mousedown"))},u._touchMove=function(o){e&&(this._touchMoved=!0,t(o,"mousemove"))},u._touchEnd=function(o){e&&(t(o,"mouseup"),t(o,"mouseout"),this._touchMoved||t(o,"click"),e=!1)},u._mouseInit=function(){var t=this;t.element.bind({touchstart:o.proxy(t,"_touchStart"),touchmove:o.proxy(t,"_touchMove"),touchend:o.proxy(t,"_touchEnd")}),n.call(t)},u._mouseDestroy=function(){var t=this;t.element.unbind({touchstart:o.proxy(t,"_touchStart"),touchmove:o.proxy(t,"_touchMove"),touchend:o.proxy(t,"_touchEnd")}),c.call(t)}}}(jQuery);
 
assets/dist/jquery.ui.touch-punch.min.1.18.0.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"rJ8A":[function(require,module,exports) {
2
+ !function(o){function t(o,t){if(!(o.originalEvent.touches.length>1)){o.preventDefault();var e=o.originalEvent.changedTouches[0],u=document.createEvent("MouseEvents");u.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(u)}}if(o.support.touch="ontouchend"in document,o.support.touch){var e,u=o.ui.mouse.prototype,n=u._mouseInit,c=u._mouseDestroy;u._touchStart=function(o){!e&&this._mouseCapture(o.originalEvent.changedTouches[0])&&(e=!0,this._touchMoved=!1,t(o,"mouseover"),t(o,"mousemove"),t(o,"mousedown"))},u._touchMove=function(o){e&&(this._touchMoved=!0,t(o,"mousemove"))},u._touchEnd=function(o){e&&(t(o,"mouseup"),t(o,"mouseout"),this._touchMoved||t(o,"click"),e=!1)},u._mouseInit=function(){var t=this;t.element.bind({touchstart:o.proxy(t,"_touchStart"),touchmove:o.proxy(t,"_touchMove"),touchend:o.proxy(t,"_touchEnd")}),n.call(t)},u._mouseDestroy=function(){var t=this;t.element.unbind({touchstart:o.proxy(t,"_touchStart"),touchmove:o.proxy(t,"_touchMove"),touchend:o.proxy(t,"_touchEnd")}),c.call(t)}}}(jQuery);
3
+ },{}]},{},["rJ8A"], null)
assets/dist/social-pug-upgrade.1.18.0.png ADDED
Binary file
assets/dist/socialpug.1.0.0.woff DELETED
Binary file
assets/dist/{socialpug.1.0.0.eot → socialpug.1.18.0.eot} RENAMED
Binary file
assets/dist/{socialpug.1.0.0.svg → socialpug.1.18.0.svg} RENAMED
@@ -1,7 +1,7 @@
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>Copyright (C) 2017 by original authors @ fontello.com</metadata>
5
  <defs>
6
  <font id="socialpug" horiz-adv-x="1000" >
7
  <font-face font-family="socialpug" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
@@ -58,6 +58,10 @@
58
 
59
  <glyph glyph-name="telegram" unicode="&#xe825;" d="M381-3c-28 0-23 11-33 38l-84 276 646 384m-529-698c22 0 32 10 44 22l118 114-147 89m0 0l355-263c41-22 70-11 80 38l145 681c15 59-23 86-61 69l-849-328c-58-23-58-55-11-70l218-68 504 318c24 15 46 7 28-9" horiz-adv-x="1000" />
60
 
 
 
 
 
61
  <glyph glyph-name="ok" unicode="&#xe880;" d="M933 534q0-22-16-38l-404-404-76-76q-16-15-38-15t-38 15l-76 76-202 202q-15 16-15 38t15 38l76 76q16 16 38 16t38-16l164-165 366 367q16 16 38 16t38-16l76-76q16-15 16-38z" horiz-adv-x="1000" />
62
 
63
  <glyph glyph-name="cancel" unicode="&#xe881;" d="M724 112q0-22-15-38l-76-76q-16-15-38-15t-38 15l-164 165-164-165q-16-15-38-15t-38 15l-76 76q-16 16-16 38t16 38l164 164-164 164q-16 16-16 38t16 38l76 76q16 16 38 16t38-16l164-164 164 164q16 16 38 16t38-16l76-76q15-15 15-38t-15-38l-164-164 164-164q15-15 15-38z" horiz-adv-x="785.7" />
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>Copyright (C) 2018 by original authors @ fontello.com</metadata>
5
  <defs>
6
  <font id="socialpug" horiz-adv-x="1000" >
7
  <font-face font-family="socialpug" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
58
 
59
  <glyph glyph-name="telegram" unicode="&#xe825;" d="M381-3c-28 0-23 11-33 38l-84 276 646 384m-529-698c22 0 32 10 44 22l118 114-147 89m0 0l355-263c41-22 70-11 80 38l145 681c15 59-23 86-61 69l-849-328c-58-23-58-55-11-70l218-68 504 318c24 15 46 7 28-9" horiz-adv-x="1000" />
60
 
61
+ <glyph glyph-name="medium" unicode="&#xe826;" d="M140 572c1 12-4 23-12 31l-88 106v16h274l211-464 186 464h262v-16l-76-72c-6-5-10-13-8-21v-531c-2-8 2-17 8-21l74-73v-16h-371v16l77 74c7 8 7 10 7 21v430l-212-539h-29l-247 539v-361c-2-16 3-31 14-42l99-120v-16h-281v16l99 120c11 11 15 27 13 42v417z" horiz-adv-x="1000" />
62
+
63
+ <glyph glyph-name="mix" unicode="&#xe827;" d="M0 725v-681c0-110 172-114 172 0v466c15 103 172 98 172-13v-342c0-114 187-114 187 0v226c11 107 172 103 172-8v-47c0-117 172-110 172 0v399h-875z" horiz-adv-x="875" />
64
+
65
  <glyph glyph-name="ok" unicode="&#xe880;" d="M933 534q0-22-16-38l-404-404-76-76q-16-15-38-15t-38 15l-76 76-202 202q-15 16-15 38t15 38l76 76q16 16 38 16t38-16l164-165 366 367q16 16 38 16t38-16l76-76q16-15 16-38z" horiz-adv-x="1000" />
66
 
67
  <glyph glyph-name="cancel" unicode="&#xe881;" d="M724 112q0-22-15-38l-76-76q-16-15-38-15t-38 15l-164 165-164-165q-16-15-38-15t-38 15l-76 76q-16 16-16 38t16 38l164 164-164 164q-16 16-16 38t16 38l76 76q16 16 38 16t38-16l164-164 164 164q16 16 38 16t38-16l76-76q15-15 15-38t-15-38l-164-164 164-164q15-15 15-38z" horiz-adv-x="785.7" />
assets/dist/{socialpug.1.0.0.ttf → socialpug.1.18.0.ttf} RENAMED
Binary file
assets/dist/socialpug.1.18.0.woff ADDED
Binary file
assets/dist/style-dashboard-pro.1.18.0.css ADDED
@@ -0,0 +1 @@
 
1
+ .dpsp-settings-sidebar{float:left;margin-top:63px;padding-left:20px;width:365px;-moz-box-sizing:border-box;box-sizing:border-box}.dpsp-settings-sidebar p{color:#767676}@media screen and (max-width:1225px){.dpsp-settings-sidebar{border-left:0;padding-left:0}}#dpsp-settings-sidebar-social-pug-pro img{max-width:100%;height:auto;padding:0 20px;box-sizing:border-box}#dpsp-settings-sidebar-social-pug-pro h3{text-align:center;line-height:1.7em;font-weight:700}#dpsp-settings-sidebar-social-pug-pro p{position:relative;padding-left:45px;color:#454545;margin-bottom:20px}#dpsp-settings-sidebar-social-pug-pro p .dpsp-dashicons{position:absolute;top:-5px;left:0;display:inline-block;width:30px;height:30px}#dpsp-settings-sidebar-social-pug-pro p .dpsp-dashicons:after{content:"";display:block;position:absolute;z-index:1;top:-1px;left:2px;width:30px;height:30px;border-radius:20px;background:#41a4a9}#dpsp-settings-sidebar-social-pug-pro p .dashicons{position:absolute;top:0;left:0;width:30px;height:30px;font-size:24px;line-height:30px;color:#fff;z-index:2}#dpsp-settings-sidebar-social-pug-pro .dpsp-button-primary{width:100%;text-align:center;padding:10px 0;box-sizing:border-box}.dpsp-page-wrapper.dpsp-page-extensions{max-width:1000px}.dpsp-page-extensions .dpsp-card{margin-top:0;margin-bottom:0}.dpsp-unavailable>a{display:block;line-height:0}.dpsp-unavailable h4{padding-bottom:0;border-bottom:0;border-top:1px solid #f1f1f1;text-align:left}.dpsp-unavailable p.dpsp-description{margin:0;padding:10px}.dpsp-unavailable .dpsp-tool-actions{padding:15px 10px;overflow:hidden;text-align:center;background:#f9f9f9;border-top:1px solid #f1f1f1}.dpsp-unavailable .dpsp-tool-actions .button{padding-left:25px;padding-right:25px}.dpsp-unavailable .dpsp-description{height:57px}@import url("https://fonts.googleapis.com/css?family=Raleway:400,700,800");@font-face{font-family:Social Pug;src:url(./socialpug.1.18.0.eot?gd6mr8);src:url(./socialpug.1.18.0.eot?#iefix) format("embedded-opentype"),url(./socialpug.1.18.0.woff) format("woff"),url(./socialpug.1.18.0.ttf) format("truetype"),url(./socialpug.1.18.0.svg#socialpug) format("svg");font-weight:400;font-style:normal}[class*=" dpsp-icon-"]:before,[class^=dpsp-icon-]:before{font-family:Social Pug,sans-serif;font-style:normal;font-weight:400;display:inline-block;text-decoration:inherit;text-align:center;font-variant:normal;text-transform:none;line-height:1em}.dpsp-icon-ok:before{content:"\e880"}.dpsp-icon-remove:before{content:"\e881"}.dpsp-icon-edit:before{content:"\e882"}.dpsp-icon-share:before{content:"\e883"}.dpsp-icon-facebook:before{content:"\e800"}.dpsp-icon-twitter:before{content:"\e801"}.dpsp-icon-google-plus:before{content:"\e802"}.dpsp-icon-pinterest:before{content:"\e803"}.dpsp-icon-linkedin:before{content:"\e804"}.dpsp-icon-reddit:before{content:"\e806"}.dpsp-icon-vkontakte:before{content:"\e807"}.dpsp-icon-whatsapp:before{content:"\e808"}.dpsp-icon-instagram:before{content:"\e809"}.dpsp-icon-youtube:before{content:"\e810"}.dpsp-icon-vimeo:before{content:"\e811"}.dpsp-icon-soundcloud:before{content:"\e812"}.dpsp-icon-twitch:before{content:"\e813"}.dpsp-icon-behance:before{content:"\e814"}.dpsp-icon-yummly:before{content:"\e815"}.dpsp-icon-email:before{content:"\e816"}.dpsp-icon-print:before{content:"\e817"}.dpsp-icon-pocket:before{content:"\e819"}.dpsp-icon-buffer:before{content:"\e820"}.dpsp-icon-tumblr:before{content:"\e821"}.dpsp-icon-github:before{content:"\e822"}.dpsp-icon-xing:before{content:"\e823"}.dpsp-icon-flipboard:before{content:"\e824"}.dpsp-icon-telegram:before{content:"\e825"}.dpsp-icon-medium:before{content:"\e826"}.dpsp-icon-mix:before{content:"\e827"}.dpsp-transition{-moz-transition:all .15s ease-in;-webkit-transition:all .15s ease-in;-o-transition:all .15s ease-in;transition:all .15s ease-in}[class*=dpsp-col-]{float:left;padding:5px;-moz-box-sizing:border-box;box-sizing:border-box}.dpsp-row{margin:0 -5px}.dpsp-row.dpsp-m-padding{margin:0 -8px}.dpsp-row.dpsp-m-padding [class*=dpsp-col-]{padding:8px}.dpsp-row.dpsp-big-padding{margin:0 -15px}.dpsp-row.dpsp-big-padding [class*=dpsp-col-]{padding:15px}.dpsp-col-1-1{width:100%}.dpsp-col-1-2{width:50%}.dpsp-col-1-3{width:33.3333%}.dpsp-col-2-3{width:66.6666%}.dpsp-col-1-4{width:25%}.dpsp-col-3-4{width:75%}.dpsp-col-1-5{width:20%}.dpsp-col-2-5{width:40%}.dpsp-col-3-5{width:60%}.dpsp-col-4-5{width:80%}.dpsp-col-3-8{width:37.5%}.dpsp-row:after{content:"";display:block;clear:both}.dpsp-page-wrapper{position:relative;max-width:675px;float:left;width:100%}h1.dpsp-page-title{padding-right:0;padding-bottom:15px}.dpsp-section{margin-bottom:50px}.dpsp-section:after{content:"";display:block;clear:both}.dpsp-section-title{margin:2.75em 0 1.3em;padding-bottom:15px;border-bottom:1px solid #e5e5e5}.dpsp-background-color-network-facebook{background:#3a579a}.dpsp-background-color-network-twitter{background:#00abf0}.dpsp-background-color-network-google-plus{background:#df4a32}.dpsp-background-color-network-pinterest{background:#c92228}.dpsp-background-color-network-linkedin{background:#0077b5}.dpsp-background-color-network-reddit{background:#ff5700}.dpsp-background-color-network-vkontakte{background:#4d75a3}.dpsp-background-color-network-whatsapp{background:#25d366}.dpsp-background-color-network-instagram{background:#bc2a8d}.dpsp-background-color-network-youtube{background:#b00}.dpsp-background-color-network-vimeo{background:#4bf}.dpsp-background-color-network-soundcloud{background:#f50}.dpsp-background-color-network-twitch{background:#6441a5}.dpsp-background-color-network-yummly{background:#e55a27}.dpsp-background-color-network-behance{background:#005cff}.dpsp-background-color-network-email{background:#27ae60}.dpsp-background-color-network-print{background:#bdc3c7}.dpsp-background-color-network-pocket{background:#ed4055}.dpsp-background-color-network-buffer{background:#29323b}.dpsp-background-color-network-tumblr{background:#35465c}.dpsp-background-color-network-xing{background:#00888d}.dpsp-background-color-network-github{background:#333}.dpsp-background-color-network-flipboard{background:#e12828}.dpsp-background-color-network-telegram{background:#08c}.dpsp-background-color-network-medium{background:#333}.dpsp-background-color-network-mix{background:#fd8235}body.dpsp-pagestyles{background:#f3f6f8}.dpsp-page-header{background:#41a4a9;margin-left:-20px;line-height:60px;color:#fff}.dpsp-page-header .dpsp-logo{padding:0 10px 0 20px}.dpsp-page-header .dpsp-logo-inner{font-family:Raleway,sans-serif;font-weight:700;font-size:22px}.dpsp-page-header .dpsp-logo-inner span{font-weight:300}.mv-grow-logo{max-width:50px;display:inline-block;vertical-align:top;padding-right:.5rem;padding-top:.25rem}.dpsp-page-header:after{content:"";display:block;clear:both}.dpsp-page-header nav{display:inline-block;margin-left:25px;line-height:62px}.dpsp-page-header nav a{display:inline-block;color:#fff;background:hsla(0,0%,100%,.2);text-decoration:none;font-size:.9em;line-height:1;padding:8px 12px;border-radius:3px;font-weight:700;margin:0 5px;box-shadow:0 0 2px 2px rgba(52,152,219,.15)}.dpsp-page-header nav a .dashicons{font-size:14px;height:auto;width:auto;margin-right:5px;margin-top:-2px}.dpsp-page-header nav a:hover{background:hsla(0,0%,100%,.3)}.dpsp-card{margin-bottom:2em;margin-top:1.5em;background:#fff;box-shadow:0 3px 10px -2px rgba(94,135,161,.3);max-width:675px;border-radius:3px;box-sizing:border-box}.dpsp-card-header{position:relative;padding:20px;border-bottom:1px solid rgba(200,215,225,.5);font-size:14px;font-weight:700}.dpsp-card-inner{padding:20px}.dpsp-card-inner:after{content:"";display:block;clear:both}.dpsp-card-footer{position:relative;padding:20px;border-top:1px solid rgba(200,215,225,.5);background:rgba(200,215,225,.15)}.dpsp-card-footer-actions{text-align:right}.dpsp-card-footer-actions:after{content:"";display:block;clear:both}.dpsp-card-footer-actions a{float:left;color:#777;line-height:34px;outline:0;box-shadow:none}.dpsp-card-footer-actions a:hover{color:#444}.dpsp-nav-tab-wrapper{margin:0}.dpsp-nav-tab-wrapper:after{content:"";display:block;clear:both}.dpsp-nav-tab{float:left;border-bottom:2px solid transparent;margin:0}.dpsp-nav-tab.dpsp-active{border-bottom-color:#2e4453}.dpsp-nav-tab.dpsp-active a{color:#2e4453}.dpsp-nav-tab a{display:block;width:auto;padding:16px 16px 14px;text-decoration:none;box-sizing:border-box;box-shadow:none}.dpsp-tab{display:none;margin-top:25px}.dpsp-tab.dpsp-active{display:block}.dpsp-button-primary{display:inline-block;border:none;background:#41a4a9;color:#fff!important;cursor:pointer;margin:0;outline:0;overflow:hidden;font-size:13px;font-weight:500;text-overflow:ellipsis;text-decoration:none;vertical-align:middle;box-sizing:border-box;line-height:21px;border-radius:3em;padding:.5em 2em;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:none!important}.dpsp-button-primary:hover{color:#fff;background-color:#243c4a}.dpsp-button-primary:focus{color:#fff}.dpsp-button-primary.dpsp-active,.dpsp-button-primary:active{border-width:2px 1px 1px}.dpsp-button-primary.dpsp-hidden{display:none}.dpsp-button-secondary{display:inline-block;background:#fff;border:solid #c8d7e1;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;margin:0;outline:0;overflow:hidden;font-size:13px;font-weight:500;text-overflow:ellipsis;text-decoration:none;vertical-align:middle;box-sizing:border-box;line-height:21px;border-radius:4px;padding:5px 11px;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:none!important}.dpsp-button-secondary:hover{color:#2e4453;border-color:#a8bece}.dpsp-button-secondary:focus{color:#2e4453}.dpsp-button-secondary.dpsp-active,.dpsp-button-secondary:active{border-width:2px 1px 1px}.dpsp-button-secondary.dpsp-hidden{display:none}.dpsp-button-secondary.disabled,.dpsp-button-secondary[disabled]{color:#e9eff3;background:#fff;border-color:#e9eff3;cursor:default}.dpsp-widget-section-title{display:block;margin-top:20px;margin-bottom:5px;font-weight:700}.dpsp-widget-label{display:inline-block;width:200px}.widget-content .dpsp-settings-field-checkbox{margin-right:12px}.dpsp-setting-field-button-alignment{display:none}.wrap div.dpsp-admin-notice{position:relative;margin-top:16px}.wrap div.dpsp-admin-notice h4{font-size:16px}.wrap div.dpsp-admin-notice p{font-size:14px}.wrap div.dpsp-admin-notice.dpsp-serial-missing{border-color:rgba(52,152,219,.75)}.wrap div.dpsp-admin-notice.dpsp-serial-missing .dpsp-get-license{margin-left:10px}.wrap div.dpsp-admin-notice.dpsp-admin-notice-twitter-counts{border-color:rgba(52,152,219,.75)}.wrap div.dpsp-admin-notice.dpsp-admin-notice-twitter-counts h4{font-size:1.05em}.wrap div.dpsp-admin-notice.dpsp-admin-notice-twitter-counts a{text-decoration:none}.wrap div.dpsp-admin-notice.dpsp-admin-notice-twitter-counts .dpsp-admin-notice-link{display:inline-block;padding:6px 8px;margin-bottom:18px;color:#3498db;font-weight:500;background:#e9e9e9;border-radius:2px;margin-right:10px}.wrap div.dpsp-admin-notice.dpsp-admin-notice-twitter-counts .dpsp-admin-notice-link span{display:inline-block;text-decoration:none;margin-right:10px}.wrap div.dpsp-admin-notice.dpsp-admin-notice-twitter-counts .dpsp-admin-notice-link:hover{color:#fff;background:rgba(52,152,219,.75)}.wrap div.dpsp-admin-notice-icon-animation .button-primary{display:inline-block;margin-bottom:1.33em}.wrap div.dpsp-admin-notice-icon-animation h4{margin-bottom:0}.wrap div.dpsp-admin-notice-icon-animation p{margin-bottom:.75em}.wrap div.dpsp-admin-notice.dpsp-admin-grow-notice{display:flex;flex-flow:row}@media screen and (max-width:500px){.wrap div.dpsp-admin-notice.dpsp-admin-grow-notice{flex-flow:column}}.wrap div.dpsp-admin-notice .notice-img-wrap{padding:1em;flex:0 0 150px}.wrap div.dpsp-admin-notice .notice-img-wrap img{float:left}.wrap div.dpsp-admin-notice .notice-text-wrap{flex:1 1 auto}.wrap div.dpsp-admin-notice .notice-subtext{font-style:italic;font-size:.9em}#dpsp-select-networks{position:absolute;top:50%;margin-top:-17px;right:10px}#dpsp-sortable-networks-empty{display:none;position:relative;text-align:center;color:#848484}#dpsp-sortable-networks-empty:after{content:"";display:block;width:130px;height:70px;position:absolute;top:-17px;right:80px;background:url(./dpsp-selectable-empty.1.18.0.png) no-repeat 50%;background-size:100%;opacity:0;transition:all .15s ease-in}#dpsp-sortable-networks-empty.dpsp-active{display:block}#dpsp-sortable-networks-empty.dpsp-active:after{opacity:1}.dpsp-social-platforms-sort-list{margin-top:0;margin-bottom:0}.dpsp-social-platforms-sort-list li{position:relative;margin:0;overflow:hidden;background:#fff;border-bottom:1px solid #f1f1f1;padding-top:5px;padding-bottom:5px;box-sizing:border-box}.dpsp-social-platforms-sort-list li.dpsp-last{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.dpsp-social-platforms-sort-list li.ui-sortable-helper{box-shadow:0 3px 12px 3px rgba(0,0,0,.1)}.dpsp-social-platforms-sort-list.empty li{background:none;border:2px dashed #c1c1c1;padding:20px}.dpsp-social-platforms-sort-list li:after{content:"";display:block;clear:both;height:0}.dpsp-social-platforms-sort-list li:last-of-type{margin-bottom:0}.dpsp-social-platforms-sort-list li.dpsp-sort-placeholder{background:#f9f9f9;height:55px;box-shadow:inset 0 3px 12px 3px rgba(0,0,0,.02);border-radius:0}.dpsp-social-platforms-sort-list li .dpsp-sort-handle{float:left;display:block;width:44px;height:44px;cursor:move}.dpsp-social-platforms-sort-list li .dpsp-sort-handle:before{content:"";position:absolute;left:12px;top:23px;width:20px;height:1px;background:#c1c1c1;box-shadow:0 .25em 0 0 #c1c1c1,0 .5em 0 0 #c1c1c1}.dpsp-social-platforms-sort-list li .dpsp-list-icon{float:left;display:block;width:44px;height:44px;line-height:44px;text-align:center;font-size:1.1em}.dpsp-social-platforms-sort-list li .dpsp-list-icon-social{color:#fff}.dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper{position:relative;float:left;padding:8px}.dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper input{border:0;line-height:28px;width:250px;border-radius:3px;margin:0;outline:0;padding:0 7px;font-weight:700;font-size:1em;color:#444;box-shadow:none;transition:background-color .1s ease-in-out}.dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper input:placeholder-shown{font-weight:400;font-style:italic}.dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper:hover input,.dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper input:focus{background:#f5f5f5}.dpsp-page-sticky-bar .dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper input{cursor:default;background-color:initial!important}.dpsp-social-platforms-sort-list li .dpsp-list-actions{float:right;margin-right:6px}.dpsp-social-platforms-sort-list li .dpsp-list-actions a{position:relative;display:inline-block;color:#747474;text-decoration:none;line-height:28px;vertical-align:middle;margin:8px 2px 8px 0;padding:0 6px 0 3px;border-radius:3px;box-shadow:none;transition:background-color .1s ease-in-out,color .1s ease-in-out}.dpsp-social-platforms-sort-list li .dpsp-list-actions a .dashicons{position:relative;top:-1px;vertical-align:text-top;line-height:18px;height:18px;width:18px;font-size:18px;margin-right:2px}.dpsp-social-platforms-sort-list li .dpsp-list-actions a:hover{background:#f4f4f4;color:#353535}#dpsp-networks-selector-wrapper,.dpsp-page-sticky-bar .dpsp-social-platforms-sort-list li .dpsp-list-actions .dpsp-list-edit-label{display:none}#dpsp-networks-selector{padding:20px;margin:0}#dpsp-networks-selector li{position:relative;float:left;width:33.3333%;margin-bottom:1em;padding:0 10px;box-sizing:border-box}#dpsp-networks-selector:after{content:"";display:block;clear:both;height:0}#dpsp-networks-selector .dpsp-network-item{position:relative;overflow:hidden;padding-left:35px;box-sizing:border-box;cursor:pointer}#dpsp-networks-selector .dpsp-network-item-checkbox{position:absolute;top:0;left:0;width:26px;height:26px;line-height:26px;font-size:16px;vertical-align:middle;text-align:center;color:#555;background:#fff;border:2px solid #c8d7e1;border-radius:15px;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1)}#dpsp-networks-selector .dpsp-network-item-checkbox:before{position:relative;opacity:0;transition:all .15s ease-in}#dpsp-networks-selector .dpsp-network-item:hover .dpsp-network-item-checkbox:before{opacity:.15}#dpsp-networks-selector .dpsp-network-item[data-checked=true] .dpsp-network-item-checkbox:before,#dpsp-networks-selector .dpsp-network-item[data-checked=true]:hover .dpsp-network-item-checkbox:before{opacity:1}#dpsp-networks-selector .dpsp-network-item-name-wrapper{height:30px;line-height:30px;color:#fff;vertical-align:middle;padding-left:10px;border-radius:3px;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1)}#dpsp-networks-selector .dpsp-network-item-name-wrapper .dpsp-list-icon{display:inline-block;margin-right:12px;margin-left:5px}#dpsp-networks-selector .dpsp-network-item-name-wrapper h4{display:inline-block;margin:0}.dpsp-setting-field-wrapper{position:relative;left:auto;margin-bottom:12px;min-height:39px;transition:opacity .4s ease-in-out}.dpsp-setting-field-wrapper.disabled{position:absolute;left:-9999px;visibility:hidden;opacity:0}.dpsp-setting-field-wrapper.dpsp-last{margin-bottom:0}.dpsp-setting-field-label{position:absolute;top:2px;left:0;display:inline-block;width:235px;vertical-align:top;padding-right:15px;box-sizing:border-box}.dpsp-setting-field-wrapper.dpsp-has-field-label{padding-left:243px}.dpsp-setting-field-wrapper.dpsp-has-field-label .dpsp-setting-field-inner{position:relative;top:-18px;margin-left:243px}.dpsp-setting-field-wrapper input[type=text]{margin:0;box-shadow:none;padding:10px 12px;border-radius:2px;border:1px solid #c8d7e1;width:100%}.dpsp-setting-field-wrapper input[type=text]:disabled{background:#edf2f5}.dpsp-setting-field-wrapper input[type=text]:focus{border-color:#0087be;box-shadow:0 0 1px 0 #78dcfa}.dpsp-setting-field-wrapper button{vertical-align:middle!important}.dpsp-setting-field-button .spinner{float:none;position:absolute;left:auto;right:auto}.dpsp-setting-field-button .action-text{margin-left:2rem;color:#333;display:none}.dpsp-setting-field-button.dpsp-loading .action-text,.dpsp-setting-field-button.dpsp-loading .spinner{visibility:visible}.dpsp-setting-field-wrapper select{min-width:200px}.dpsp-setting-field-select :focus{outline:0!important}.dpsp-setting-field-select .select2-container{width:100%!important}.dpsp-setting-field-select .select2-selection{height:39px;border-radius:2px;border:1px solid #c8d7e1}.dpsp-setting-field-select .select2-selection .select2-selection__rendered{line-height:37px!important;padding-left:10px}.dpsp-setting-field-select .select2-selection .select2-selection__arrow{height:37px;padding-right:10px}.dpsp-select2 .select2-dropdown{border-color:#c8d7e1;border-radius:0}.dpsp-select2 .select2-dropdown li{margin:0;line-height:36px;padding:0 10px}.dpsp-select2 .select2-results__option[aria-selected=true]{background:#e8eaeb}.dpsp-select2 .select2-results__option--highlighted{background:#00aadc!important}.dpsp-select2 .select2-dropdown--below{top:32px;box-shadow:0 4px 3px 2px rgba(0,0,0,.08)}.dpsp-select2 .select2-dropdown--above{box-shadow:0 -4px 3px 2px rgba(0,0,0,.08)}.dpsp-setting-field-select .select2-container--open{box-shadow:0 0 3px 2px rgba(0,0,0,.08)}.dpsp-setting-field-wrapper .wp-picker-container .wp-color-result.button{height:32px;border:solid #c8d7e1;border-width:1px 1px 2px;cursor:pointer;box-shadow:none;margin-bottom:0}.dpsp-setting-field-wrapper .wp-picker-container .wp-color-result.button span{line-height:19px;background:#fff;font-size:13px;font-weight:500;text-overflow:ellipsis;text-decoration:none;vertical-align:top;box-sizing:border-box;padding:5px 11px}.dpsp-setting-field-wrapper .wp-picker-container .wp-picker-input-wrap .button{height:32px;background:#fff;border:solid #c8d7e1;border-width:1px 1px 2px;cursor:pointer;box-shadow:none}.dpsp-setting-field-wrapper .wp-picker-container input[type=text].wp-color-picker{width:65px;font-size:12px;padding:7px;font-family:monospace;line-height:16px;margin:0;vertical-align:top}.dpsp-setting-field-wrapper textarea{min-height:100px;min-width:450px;padding:5px 8px;border-radius:3px}.dpsp-page-wrapper .dpsp-setting-field-wrapper textarea{border:0;box-shadow:none}.postbox .dpsp-setting-field-wrapper textarea{min-height:80px}.dpsp-setting-field-wrapper input[type=checkbox],.dpsp-setting-field-wrapper input[type=radio]{display:none}.dpsp-setting-field-checkbox.dpsp-single .dpsp-setting-field-label{padding-right:20px;width:260px;box-sizing:border-box}.dpsp-setting-field-checkbox.dpsp-multiple .dpsp-settings-field-checkbox,.dpsp-setting-field-radio.dpsp-multiple .dpsp-settings-field-radio{display:inline-block;margin-right:12px;position:relative;padding-left:23px}.dpsp-setting-field-checkbox input[type=checkbox]+label span,.dpsp-setting-field-radio input[type=radio]+label span{content:"";display:block;position:absolute;width:16px;height:16px;background:#fff;border:1px solid #e7e7e7;border-radius:3px;transition:background .1s ease-in-out,border-color .1s ease-in-out;box-sizing:initial!important}.dpsp-setting-field-radio input[type=radio]+label span{border-radius:50%}.dpsp-setting-field-checkbox.dpsp-single input[type=checkbox]+label span{top:0;right:0}.dpsp-setting-field-checkbox.dpsp-multiple input[type=checkbox]+label span,.dpsp-setting-field-radio.dpsp-multiple input[type=radio]+label span{top:0;left:0}.dpsp-setting-field-checkbox input[type=checkbox]+label span:before{display:inline-block;content:"\f147";font:400 20px/1 dashicons;width:16px;height:16px;line-height:16px;vertical-align:middle;margin:-5px 0 0 -3px;color:transparent;transition:color .1s ease-in-out}.dpsp-setting-field-radio input[type=radio]+label span:before{content:"";position:relative;top:5px;left:5px;display:block;width:6px;height:6px;border-radius:50%}.dpsp-setting-field-checkbox input[type=checkbox]:checked+label span{background:#41a4a9;border-color:transparent}.dpsp-setting-field-checkbox input[type=checkbox]:checked+label span:before{color:#fff}.dpsp-setting-field-radio input[type=radio]:checked+label span{background:#41a4a9;border-color:transparent}.dpsp-setting-field-radio input[type=radio]:checked+label span:before{background:#fff}.dpsp-setting-field-wrapper img{max-width:200px;height:auto;border-radius:2px}.dpsp-setting-field-tooltip-wrapper{position:absolute;top:2px;left:217px;display:inline-block;width:18px;height:18px;margin-left:5px}.dpsp-setting-field-tooltip-icon:before{content:"?";display:inline-block;width:14px;height:14px;line-height:14px;font-size:10px;font-weight:700;vertical-align:middle;text-align:center;color:#fff;background:#34495e;border-radius:9px;cursor:pointer;transition:all .15s ease-in}.dpsp-setting-field-tooltip-icon:hover:before{background:#34495e}.dpsp-setting-field-tooltip{z-index:10;opacity:0;visibility:hidden;position:absolute;top:28px;left:-25px;width:220px;background:rgba(52,73,94,.975);color:#fff;border-radius:4px;padding:8px 12px}.dpsp-setting-field-tooltip a{color:#3498db}.dpsp-setting-field-tooltip:before{content:"";display:block;position:absolute;top:-6px;left:27px;width:0;height:0;border-color:transparent transparent rgba(52,73,94,.975);border-style:solid;border-width:0 4.5px 6px}.dpsp-settings-button-style{cursor:pointer;width:12%;margin-right:1.5%;margin-bottom:10px;padding:12px;border-radius:5px;border:1px solid transparent;float:left;-moz-box-sizing:border-box;box-sizing:border-box}.dpsp-setting-field-wrapper .dpsp-switch{float:none;margin-left:0}.dpsp-setting-field-share-text input{width:350px}.dpsp-page-pop-up .dpsp-setting-field-title input{min-width:450px}.dpsp-setting-field-button-text-label,.dpsp-setting-field-desktop-position,.dpsp-setting-field-mobile-position,.dpsp-setting-field-tweet-counts-provider{display:none}.dpsp-setting-field-facebook-app-authorized{background:rgba(0,184,148,.3);padding:9px;border-radius:3px;color:#27ae60}.dpsp-setting-field-facebook-app-authorized-expired{background:rgba(192,57,43,.3);padding:9px;border-radius:3px;color:#c0392b;margin-bottom:10px}.dpsp-setting-field-facebook-app-id,.dpsp-setting-field-facebook-app-secret,.dpsp-setting-field-facebook-authorize-app{display:none}.dpsp-page-wrapper .dpsp-settings-button-style .dpsp-networks-btns-wrapper li{margin-bottom:6px}.dpsp-page-wrapper .dpsp-settings-button-style .dpsp-networks-btns-wrapper li:last-of-type{margin-bottom:0}.dpsp-page-sidebar .dpsp-settings-button-style .dpsp-networks-btns-wrapper .dpsp-network-btn{margin:0 auto}.dpsp-page-sidebar .dpsp-settings-button-style .dpsp-shape-rounded .dpsp-networks-btns-wrapper .dpsp-network-btn,.dpsp-page-sidebar .dpsp-settings-button-style .dpsp-shape-rounded .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon{border-radius:5px}.dpsp-page-content .dpsp-settings-button-style,.dpsp-page-pop-up .dpsp-settings-button-style{width:32.3333%;margin-right:1%}.dpsp-page-content .dpsp-section-button-style label:nth-of-type(4n),.dpsp-page-pop-up .dpsp-section-button-style label:nth-of-type(4n){margin-right:0}.dpsp-settings-button-style:hover{border-color:#e1e1e1}.dpsp-settings-button-style-input{display:none!important}.dpsp-settings-button-style-input:checked+label{border-color:rgba(52,152,219,.3);background:rgba(52,152,219,.075)}#section-click-to-tweet-preview,.dpsp-subsection-link-shortening{display:none}#section-click-to-tweet-preview>a{margin-top:0;margin-bottom:0}#dpsp-serial-key-status{display:none;position:relative;top:-1px;padding:4px 0;line-height:20px;border-bottom-left-radius:3px;border-bottom-right-radius:3px}#dpsp-serial-key-status span{vertical-align:middle}#dpsp-serial-key-status.dpsp-valid{background:rgba(0,184,148,.3);color:#27ae60}#dpsp-serial-key-status .dashicons{margin-left:5px;margin-right:5px}#dpsp-serial-key-status .dashicons-yes{color:#27ae60}#dpsp-serial-key-status .dashicons-warning{color:#c0392b}#dpsp-bitly-key-status{position:relative;top:-1px;padding:4px 0;line-height:20px;border-bottom-left-radius:3px;border-bottom-right-radius:3px;text-align:right;margin-bottom:12px;margin-top:-6px}#dpsp-bitly-key-status span{vertical-align:middle}#dpsp-bitly-key-status.dpsp-valid{background:rgba(0,184,148,.3);color:#27ae60}#dpsp-serial-key-status.dpsp-invalid{background:rgba(192,57,43,.3);color:#c0392b}#dpsp-bitly-key-status .dashicons{margin-left:5px;margin-right:5px}#dpsp-bitly-key-status .dashicons-yes{color:#27ae60}#dpsp-bitly-key-status .dashicons-warning{color:#c0392b}#dpsp-card-settings-social-shares-recovery .dpsp-card-inner{border-bottom:1px solid rgba(200,215,225,.5)}#dpsp-card-settings-social-shares-recovery .dpsp-card-inner.dpsp-last{border-bottom:0}#dpsp-toolkit-welcome{padding:5px 20px;background:#fff;margin-left:-20px}.dpsp-page-toolkit:not(.dpsp-page-free){max-width:1000px}.dpsp-page-toolkit .dpsp-row{margin-bottom:2.5em}.dpsp-page-toolkit .dpsp-card{margin-top:0;margin-bottom:0}.dpsp-tool-wrapper{background:#fff;border-radius:3px;overflow:hidden}.dpsp-tool-wrapper img{max-width:100%;height:auto}.dpsp-tool-wrapper a{color:#777;text-decoration:none}.dpsp-tool-wrapper a:hover{color:rgba(52,152,219,.75)}.dpsp-tool-wrapper h4{font-size:15px;margin-bottom:0;margin-top:0;padding:10px;text-align:center}.dpsp-tool-wrapper .dpsp-tool-actions{position:relative;padding:15px}.dpsp-tool-wrapper .dpsp-tool-actions:after{content:"";display:block;clear:both}.dpsp-tool-wrapper .dpsp-tool-actions-overlay{z-index:1;position:absolute;top:0;left:0;height:100%;width:100%;background:hsla(0,0%,100%,.6);opacity:0}.dpsp-tool-wrapper .dpsp-tool-actions-overlay .spinner{float:none;visibility:visible;opacity:1;margin:15px 0 0 15px}.dpsp-tool-wrapper .dpsp-tool-actions.dpsp-active span{opacity:0}.dpsp-tool-wrapper .dpsp-tool-actions.dpsp-inactive span{opacity:.4}.dpsp-tool-wrapper .dpsp-tool-actions .dpsp-tool-settings{line-height:1;vertical-align:middle}.dpsp-tool-wrapper .dpsp-tool-actions .dpsp-tool-settings:focus{box-shadow:none}.dpsp-tool-wrapper .dpsp-tool-actions.dpsp-inactive .dpsp-tool-settings{display:none}.dpsp-tool-wrapper .dpsp-tool-actions .dpsp-tool-settings i{margin-right:3px}.dpsp-tool-wrapper .dpsp-switch span{text-transform:uppercase;font-size:.85em;margin-right:5px}.dpsp-tool-wrapper .dpsp-switch label{display:inline-block!important}.dpsp-switch{position:relative;display:inline-block;margin-left:20px;float:right}.dpsp-page-wrapper .cmn-toggle{position:absolute;margin-left:-9999px;visibility:hidden}.dpsp-page-wrapper .cmn-toggle+label{display:block;position:relative;cursor:pointer;outline:none;user-select:none}.dpsp-page-wrapper input.cmn-toggle-round+label{padding:3px;width:36px;height:18px;background-color:#c9d6e0;border-radius:20px;transition:background .4s;box-sizing:initial}.dpsp-page-wrapper input.cmn-toggle-round+label:after,.dpsp-page-wrapper input.cmn-toggle-round+label:before{display:block;position:absolute;top:2px;left:2px;bottom:2px;content:""}.dpsp-page-wrapper input.cmn-toggle-round+label:before{right:2px;border-radius:18px;transition:background .4s}.dpsp-page-wrapper input.cmn-toggle-round+label:after{width:20px;background-color:#fff;border-radius:100%;box-shadow:0 2px 5px rgba(0,0,0,.1);transition:margin .4s}.dpsp-page-wrapper input.cmn-toggle-round:checked+label{background-color:#41a4a9}.dpsp-page-wrapper input.cmn-toggle-round:checked+label:after{margin-left:18px}.dpsp-switch.small input.cmn-toggle-round+label{width:30px;height:15px}.dpsp-switch.small input.cmn-toggle-round+label:after{width:17px}.dpsp-switch.small input.cmn-toggle-round:checked+label:after{margin-left:15px}.dpsp-statistic-bars-wrapper{padding-top:10px}.dpsp-statistic-bars-wrapper:after{content:"";display:block;width:0;clear:both}.dpsp-statistic-bar-header{opacity:.6;margin-bottom:10px;padding-bottom:5px;border-bottom:1px solid #f1f1f1}.dpsp-statistic-bar-wrapper.dpsp-statistic-bar-header:hover{background:none}.dpsp-statistic-bar-wrapper{position:relative;height:30px;padding-left:110px;padding-right:110px;transition:opacity .2s ease-in-out}.dpsp-statistic-bar-wrapper:hover{background:#f7f7f7}.dpsp-statistic-bar-wrapper label{position:absolute;left:10px;top:0;height:30px;width:109px;line-height:30px;font-weight:700;font-size:12px}.dpsp-statistic-bar-wrapper .dpsp-network-share-count{position:absolute;top:0;right:0;height:30px;width:110px;line-height:30px;font-weight:700;font-size:12px}.dpsp-statistic-bar-wrapper .dpsp-network-share-count .dpsp-count{display:inline-block;width:55px;text-align:center}.dpsp-statistic-bar-wrapper .dpsp-network-share-count .dpsp-percentage{display:inline-block;width:40px;text-align:center}.dpsp-statistic-bar-wrapper .dpsp-network-share-count .dpsp-divider{width:1px;margin:0 2px;opacity:.5}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar{position:relative;top:10px;height:10px;width:100%;background:#e7e7e7;border-radius:5px}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-inner{height:10px;width:0;border-radius:5px}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-facebook .dpsp-statistic-bar-inner{background:#3a579a}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-twitter .dpsp-statistic-bar-inner{background:#00abf0}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-google-plus .dpsp-statistic-bar-inner{background:#df4a32}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-pinterest .dpsp-statistic-bar-inner{background:#c92228}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-linkedin .dpsp-statistic-bar-inner{background:#0077b5}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-reddit .dpsp-statistic-bar-inner{background:#ff5700}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-vkontakte .dpsp-statistic-bar-inner{background:#4d75a3}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-buffer .dpsp-statistic-bar-inner{background:#29323b}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-tumblr .dpsp-statistic-bar-inner{background:#35465c}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-yummly .dpsp-statistic-bar-inner{background:#e55a27}.dpsp-statistic-bar-footer{opacity:.6;margin:10px 0;border-top:1px solid #f1f1f1;border-bottom:1px solid #f1f1f1}.dpsp-statistic-bar-wrapper.dpsp-statistic-bar-footer:hover{background:none}#dpsp-refresh-share-counts-wrapper:after{content:"";display:block;width:0;clear:both}#dpsp-refresh-share-counts{float:right}#dpsp_share_options span[class*=dpsp-icon-]{display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;margin-right:10px;color:#fff;border-radius:2px}#dpsp_share_options .dpsp-icon-share{background:#34495e}#dpsp_share_options .dpsp-icon-twitter{background:#00abf0}#dpsp_share_options .dpsp-icon-pinterest{background:#c92228}#dpsp_share_options_content .dpsp-section{position:relative;padding-left:220px;margin:15px 0 25px}#dpsp_share_options_content label{display:block;margin-bottom:10px;font-weight:700}#dpsp_share_options_content textarea{width:100%;min-height:70px}#dpsp_share_options_content .dpsp-setting-field-image{position:absolute;top:0;left:0;max-width:200px;width:100%}#dpsp_share_options_content .dpsp-setting-field-image .dpsp-button-primary,#dpsp_share_options_content .dpsp-setting-field-image .dpsp-button-secondary{width:100%;text-align:center}#dpsp_share_options .dpsp-setting-field-tooltip-wrapper{position:relative;top:-2px;left:auto}.dpsp-textarea-characters-remaining-wrapper{float:right;background:#f1f1f1;font-size:12px;padding:0 10px;height:24px;line-height:24px;border-radius:2px}.dpsp-textarea-characters-remaining-wrapper.dpsp-excedeed{background:rgba(192,57,43,.75);color:#fff}#dpsp-meta-box-section-multiple-pinterest-images{padding-left:0!important}#dpsp-meta-box-section-multiple-pinterest-images .dpsp-hidden-image-wrapper{float:left;position:relative;margin-right:5px;margin-bottom:5px;max-width:125px;line-height:0}#dpsp-meta-box-section-multiple-pinterest-images .dpsp-hidden-image-wrapper img{max-width:100%;max-height:auto;height:auto}#dpsp-meta-box-section-multiple-pinterest-images .dpsp-hidden-image-wrapper .dpsp-button-secondary{position:absolute;top:5px;right:5px;padding:1px 2px;opacity:0;visibility:hidden;transition:all .1s ease-in}#dpsp-meta-box-section-multiple-pinterest-images .dpsp-hidden-image-wrapper:hover .dpsp-button-secondary{opacity:1;visibility:visible}#dpsp-meta-box-section-multiple-pinterest-images .dpsp-hidden-image-add-new{float:left;width:125px;height:125px;border-radius:2px;text-align:center;box-sizing:border-box}#dpsp-meta-box-section-multiple-pinterest-images .dpsp-hidden-image-add-new .dashicons{display:inline-block;padding:5px;border-radius:50px;background:#ebf0f4;margin-top:28px;margin-bottom:5px;box-sizing:initial}#dpsp-meta-box-section-multiple-pinterest-images .dpsp-hidden-image-add-new .dashicons:before{position:relative;top:1px}#dpsp-meta-box-section-multiple-pinterest-images:after{content:"";display:block;clear:both}.mce-i-dpsp-icon-twitter{position:relative;top:-2px}.mce-i-dpsp-icon-twitter:before{content:"\e801";font-family:Social Pug,sans-serif;font-style:normal;font-weight:400;font-size:20px;color:#00abf0}#dpsp_click_to_tweet_dialog #dpsp_tweet_length{position:absolute;top:105px;right:0;padding-right:25px;color:#a1a1a1}#dpsp_click_to_tweet_dialog #dpsp_tweet_length em,#dpsp_click_to_tweet_dialog #dpsp_tweet_length span{font-weight:700;font-size:12px}#dpsp_click_to_tweet_dialog #dpsp_tweet_length span{position:absolute;top:0;right:0}#dpsp_click_to_tweet_dialog #dpsp_tweet_hide_url-al,#dpsp_click_to_tweet_dialog #dpsp_tweet_hide_via-al{position:relative;top:-3px}table.wp-list-table .column-dpsp_shares{width:5.5em}#screen-options-wrap .dpsp-list-table-shares i,table.wp-list-table .dpsp-list-table-shares span{display:none}.dpsp-list-table-post-share-count{display:inline-block;margin-top:5px;padding:0 8px;background:#b6b6b6;color:#fff;border-radius:5px;line-height:24px;vertical-align:middle;text-align:center}body.post-type-attachment.post-php table.compat-attachment-fields{width:100%;border-spacing:0}body.post-type-attachment.post-php table .compat-field-pin_description td,body.post-type-attachment.post-php table .compat-field-pin_description th,body.post-type-attachment.post-php table .compat-field-pin_nopin td,body.post-type-attachment.post-php table .compat-field-pin_nopin th,body.post-type-attachment.post-php table .compat-field-pin_repin_id td,body.post-type-attachment.post-php table .compat-field-pin_repin_id th,body.post-type-attachment.post-php table .compat-field-pin_title td,body.post-type-attachment.post-php table .compat-field-pin_title th{display:block;width:100%}body.post-type-attachment.post-php table .compat-field-pin_description textarea{width:100%;min-height:75px}body.post-type-attachment.post-php table .compat-field-pin_repin_id input,body.post-type-attachment.post-php table .compat-field-pin_title input{width:100%}@media screen and (max-width:785px){.dpsp-page-title-wrapper h2{position:relative;padding-right:50px}.dpsp-page-title-wrapper h2 .dpsp-switch{position:absolute;top:15px;right:0}.dpsp-social-platforms-sort-list{overflow:auto}}@media screen and (max-width:720px){.dpsp-col-1-4{width:50%}#dpsp-networks-selector li{width:100%;padding:0}#dpsp-networks-selector-footer{text-align:center}.dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper{width:auto}.dpsp-page-sidebar .dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper:hover input,.dpsp-page-sidebar .dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper input:focus,.dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper input{width:150px;padding-right:10px}.dpsp-settings-button-style{width:auto}.dpsp-page-content .dpsp-settings-button-style{width:49.5%}.dpsp-page-content .dpsp-section-button-style label:nth-of-type(4n){margin-right:1%}.dpsp-page-content .dpsp-section-button-style label:nth-of-type(2n){margin-right:0}.dpsp-setting-field-label{width:100%;margin-bottom:10px}.dpsp-setting-field-wrapper{margin-bottom:30px}}#dpsp-shares-recovery-post-previous-urls h4{border-bottom:1px solid #f1f1f1;padding:10px 0;margin:10px 0}#dpsp-shares-recovery-post-previous-urls h4 .dpsp-setting-field-tooltip-wrapper{position:relative;left:auto}#dpsp-shares-recovery-post-previous-urls-empty{background:#f1f1f1;padding:10px 15px}#dpsp-shares-recovery-post-previous-urls-empty>:first-child{margin-top:0}#dpsp-shares-recovery-post-previous-urls-empty>:last-child{margin-bottom:0}.dpsp-post-previous-url{display:flex;margin-top:5px}.dpsp-post-previous-url.dpsp-hidden{display:none}.dpsp-post-previous-url input{flex:1;margin-right:5px}.dpsp-post-previous-url a{padding:3px 10px}#dpsp-add-post-previous-url{margin-top:10px}
assets/dist/style-dashboard.1.0.0.css DELETED
@@ -1 +0,0 @@
1
- @import url(https://fonts.googleapis.com/css?family=Raleway:300,400,700,800);@font-face{font-family:Social Pug;src:url(./socialpug.1.0.0.eot?gd6mr8);src:url(./socialpug.1.0.0.eot?#iefix) format("embedded-opentype"),url(./socialpug.1.0.0.woff) format("woff"),url(./socialpug.1.0.0.ttf) format("truetype"),url(./socialpug.1.0.0.svg#socialpug) format("svg");font-weight:400;font-style:normal}[class*=" dpsp-icon-"]:before,[class^=dpsp-icon-]:before{font-family:Social Pug;font-style:normal;font-weight:400;display:inline-block;text-decoration:inherit;text-align:center;font-variant:normal;text-transform:none;line-height:1em}.dpsp-icon-ok:before{content:"\e880"}.dpsp-icon-remove:before{content:"\e881"}.dpsp-icon-edit:before{content:"\e882"}.dpsp-icon-facebook:before{content:"\e800"}.dpsp-icon-twitter:before{content:"\e801"}.dpsp-icon-google-plus:before{content:"\e802"}.dpsp-icon-pinterest:before{content:"\e803"}.dpsp-icon-linkedin:before{content:"\e804"}.dpsp-icon-email:before{content:"\e816"}.dpsp-icon-print:before{content:"\e817"}.dpsp-transition{-moz-transition:all .15s ease-in;-webkit-transition:all .15s ease-in;-o-transition:all .15s ease-in;transition:all .15s ease-in}[class*=dpsp-col-]{float:left;padding:5px;-moz-box-sizing:border-box;box-sizing:border-box}.dpsp-row{margin:0 -5px}.dpsp-row.dpsp-m-padding{margin:0 -8px}.dpsp-row.dpsp-m-padding [class*=dpsp-col-]{padding:8px}.dpsp-row.dpsp-big-padding{margin:0 -15px}.dpsp-row.dpsp-big-padding [class*=dpsp-col-]{padding:15px}.dpsp-col-1-1{width:100%}.dpsp-col-1-2{width:50%}.dpsp-col-1-3{width:33.3333%}.dpsp-col-2-3{width:66.6666%}.dpsp-col-1-4{width:25%}.dpsp-col-3-4{width:75%}.dpsp-col-1-5{width:20%}.dpsp-col-2-5{width:40%}.dpsp-col-3-5{width:60%}.dpsp-col-4-5{width:80%}.dpsp-col-3-8{width:37.5%}.dpsp-row:after{content:"";display:block;clear:both}.dpsp-page-wrapper{float:left;position:relative;width:100%;max-width:675px}.dpsp-page-wrapper hr{border:0;border-bottom:1px solid #e1e1e1}h1.dpsp-page-title{padding-right:0;padding-bottom:15px}.dpsp-section{margin-bottom:50px}.dpsp-section:after{content:"";display:block;clear:both}.dpsp-section-title{margin:2.75em 0 1.3em;padding-bottom:15px;border-bottom:1px solid #e5e5e5}.dpsp-section-title .add-new-h2,.dpsp-section-title .add-new-h2:focus{float:right;padding:3px 6px;top:-1px;margin-left:15px;box-shadow:none}.dpsp-social-platforms .add-new-h2{display:inline-block}.dpsp-social-platforms .add-new-h2,.dpsp-social-platforms .add-new-h2:active{padding:8px 16px;top:0;margin-left:0}.dpsp-background-color-network-facebook{background:#3a579a}.dpsp-background-color-network-twitter{background:#00abf0}.dpsp-background-color-network-google-plus{background:#df4a32}.dpsp-background-color-network-pinterest{background:#c92228}.dpsp-background-color-network-linkedin{background:#0077b5}.dpsp-background-color-network-email{background:#27ae60}.dpsp-background-color-network-print{background:#bdc3c7}.dpsp-page-header{background:#41a4a9;margin-left:-20px;line-height:60px;color:#fff}.dpsp-page-header .dpsp-logo{padding:0 10px 0 20px}.dpsp-page-header .dpsp-logo-inner{font-family:Raleway;font-weight:700;font-size:22px}.dpsp-page-header .dpsp-logo-inner span{font-weight:300}.mv-grow-logo{max-width:50px;display:inline-block;vertical-align:top;padding-right:.5rem;padding-top:.25rem}.dpsp-page-header:after{content:"";display:block;clear:both}.dpsp-page-header nav{display:inline-block;margin-left:25px;line-height:62px}.dpsp-page-header nav a{display:inline-block;color:#fff;background:hsla(0,0%,100%,.2);text-decoration:none;font-size:.9em;line-height:1;padding:8px 12px;border-radius:3px;font-weight:700;margin:0 5px;box-shadow:0 0 2px 2px rgba(52,152,219,.15)}.dpsp-page-header nav a .dashicons{font-size:14px;height:auto;width:auto;margin-right:5px;margin-top:-2px}.dpsp-page-header nav a:hover{background:hsla(0,0%,100%,.3)}#dpsp-to-premium{display:inline-block;line-height:18px;padding:14px 26px;color:#fff;background:#e74c3c;text-decoration:none;font-size:13px;border-radius:3px;font-weight:700}#dpsp-to-premium .dashicons{font-size:18px;height:auto;width:auto;margin-right:8px}#dpsp-to-premium:hover{background:#ea6153}.dpsp-card{margin-bottom:2em;margin-top:1.5em;background:#fff;box-shadow:0 3px 10px -2px rgba(94,135,161,.3);max-width:675px;border-radius:3px;box-sizing:border-box}.dpsp-card-header{position:relative;padding:20px;border-bottom:1px solid rgba(200,215,225,.5);font-size:14px;font-weight:700}.dpsp-card-inner{padding:20px}.dpsp-card-inner:after{content:"";display:block;clear:both}.dpsp-card-footer{position:relative;padding:20px;border-top:1px solid rgba(200,215,225,.5);background:rgba(200,215,225,.15)}.dpsp-card-footer-actions{text-align:right}.dpsp-card-footer-actions:after{content:"";display:block;clear:both}.dpsp-card-footer-actions a{float:left;color:#777;line-height:34px;outline:0;box-shadow:none}.dpsp-card-footer-actions a:hover{color:#444}.dpsp-button-primary{display:inline-block;border:none;background:#41a4a9;color:#fff!important;cursor:pointer;margin:0;outline:0;overflow:hidden;font-size:13px;font-weight:500;text-overflow:ellipsis;text-decoration:none;vertical-align:middle;box-sizing:border-box;line-height:21px;border-radius:3em;padding:.5em 2em;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:none!important}.dpsp-button-primary:hover{color:#fff;background-color:#243c4a}.dpsp-button-primary:focus{color:#fff}.dpsp-button-primary.dpsp-active,.dpsp-button-primary:active{border-width:2px 1px 1px}.dpsp-button-primary.dpsp-hidden{display:none}.dpsp-button-secondary{display:inline-block;background:#fff;border:solid #c8d7e1;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;margin:0;outline:0;overflow:hidden;font-size:13px;font-weight:500;text-overflow:ellipsis;text-decoration:none;vertical-align:middle;box-sizing:border-box;line-height:21px;border-radius:4px;padding:5px 11px;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:none!important}.dpsp-button-secondary:hover{color:#2e4453;border-color:#a8bece}.dpsp-button-secondary:focus{color:#2e4453}.dpsp-button-secondary.dpsp-active,.dpsp-button-secondary:active{border-width:2px 1px 1px}.dpsp-button-secondary.dpsp-hidden{display:none}.dpsp-button-secondary.disabled,.dpsp-button-secondary[disabled]{color:#e9eff3;background:#fff;border-color:#e9eff3;cursor:default}#dpsp-select-networks{position:absolute;top:50%;margin-top:-17px;right:10px}#dpsp-sortable-networks-empty{display:none;position:relative;text-align:center;color:#848484}#dpsp-sortable-networks-empty:after{content:"";display:block;width:130px;height:70px;position:absolute;top:-17px;right:80px;background:url(./dpsp-selectable-empty.1.0.0.png) no-repeat 50%;background-size:100%;opacity:0;transition:all .15s ease-in}#dpsp-sortable-networks-empty.dpsp-active{display:block}#dpsp-sortable-networks-empty.dpsp-active:after{opacity:1}.dpsp-social-platforms-sort-list{margin-top:0;margin-bottom:0}.dpsp-social-platforms-sort-list li{position:relative;margin:0;overflow:hidden;background:#fff;border-bottom:1px solid #f1f1f1;padding-top:5px;padding-bottom:5px;box-sizing:border-box}.dpsp-social-platforms-sort-list li.dpsp-last{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.dpsp-social-platforms-sort-list li.ui-sortable-helper{box-shadow:0 3px 12px 3px rgba(0,0,0,.1)}.dpsp-social-platforms-sort-list.empty li{background:none;border:2px dashed #c1c1c1;padding:20px}.dpsp-social-platforms-sort-list li:after{content:"";display:block;clear:both;height:0}.dpsp-social-platforms-sort-list li:last-of-type{margin-bottom:0}.dpsp-social-platforms-sort-list li.dpsp-sort-placeholder{background:#f9f9f9;height:55px;box-shadow:inset 0 3px 12px 3px rgba(0,0,0,.02);border-radius:0}.dpsp-social-platforms-sort-list li .dpsp-sort-handle{float:left;display:block;width:44px;height:44px;cursor:move}.dpsp-social-platforms-sort-list li .dpsp-sort-handle:before{content:"";position:absolute;left:12px;top:23px;width:20px;height:1px;background:#c1c1c1;box-shadow:0 .25em 0 0 #c1c1c1,0 .5em 0 0 #c1c1c1}.dpsp-social-platforms-sort-list li .dpsp-list-icon{float:left;display:block;width:44px;height:44px;line-height:44px;text-align:center;font-size:1.1em}.dpsp-social-platforms-sort-list li .dpsp-list-icon-social{color:#fff}.dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper{position:relative;float:left;padding:8px}.dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper input{border:0;line-height:28px;width:250px;border-radius:3px;margin:0;outline:0;padding:0 7px;font-weight:700;font-size:1em;color:#444;box-shadow:none;transition:background-color .1s ease-in-out}.dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper input:placeholder-shown{font-weight:400;font-style:italic}.dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper:hover input,.dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper input:focus{background:#f5f5f5}.dpsp-page-sticky-bar .dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper input{cursor:default;background-color:transparent!important}.dpsp-social-platforms-sort-list li .dpsp-list-actions{float:right;margin-right:6px}.dpsp-social-platforms-sort-list li .dpsp-list-actions a{position:relative;display:inline-block;color:#747474;text-decoration:none;line-height:28px;vertical-align:middle;margin:8px 2px 8px 0;padding:0 6px 0 3px;border-radius:3px;box-shadow:none;transition:background-color .1s ease-in-out,color .1s ease-in-out}.dpsp-social-platforms-sort-list li .dpsp-list-actions a .dashicons{position:relative;top:-1px;vertical-align:text-top;line-height:18px;height:18px;width:18px;font-size:18px;margin-right:2px}.dpsp-social-platforms-sort-list li .dpsp-list-actions a:hover{background:#f4f4f4;color:#353535}#dpsp-networks-selector-wrapper,.dpsp-page-sticky-bar .dpsp-social-platforms-sort-list li .dpsp-list-actions .dpsp-list-edit-label{display:none}#dpsp-networks-selector{padding:20px;margin:0}#dpsp-networks-selector li{position:relative;float:left;width:33.3333%;margin-bottom:1em;padding:0 10px;box-sizing:border-box}#dpsp-networks-selector:after{content:"";display:block;clear:both;height:0}#dpsp-networks-selector .dpsp-network-item{position:relative;overflow:hidden;padding-left:35px;box-sizing:border-box;cursor:pointer}#dpsp-networks-selector .dpsp-network-item-checkbox{position:absolute;top:0;left:0;width:26px;height:26px;line-height:26px;font-size:16px;vertical-align:middle;text-align:center;color:#555;background:#fff;border:2px solid #c8d7e1;border-radius:15px;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1)}#dpsp-networks-selector .dpsp-network-item-checkbox:before{position:relative;opacity:0;transition:all .15s ease-in}#dpsp-networks-selector .dpsp-network-item:hover .dpsp-network-item-checkbox:before{opacity:.15}#dpsp-networks-selector .dpsp-network-item[data-checked=true] .dpsp-network-item-checkbox:before,#dpsp-networks-selector .dpsp-network-item[data-checked=true]:hover .dpsp-network-item-checkbox:before{opacity:1}#dpsp-networks-selector .dpsp-network-item-name-wrapper{height:30px;line-height:30px;color:#fff;vertical-align:middle;padding-left:10px;border-radius:3px;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1)}#dpsp-networks-selector .dpsp-network-item-name-wrapper .dpsp-list-icon{display:inline-block;margin-right:12px;margin-left:5px}#dpsp-networks-selector .dpsp-network-item-name-wrapper h4{display:inline-block;margin:0}.dpsp-setting-field-wrapper{position:relative;left:auto;margin-bottom:12px;min-height:39px;transition:opacity .4s ease-in-out}.dpsp-setting-field-wrapper.disabled{position:absolute;left:-9999px;visibility:hidden;opacity:0}.dpsp-setting-field-wrapper.dpsp-last{margin-bottom:0}.dpsp-setting-field-label{position:absolute;top:2px;left:0;display:inline-block;width:235px;vertical-align:top;padding-right:15px;box-sizing:border-box}.dpsp-setting-field-wrapper.dpsp-has-field-label{padding-left:243px}.dpsp-setting-field-wrapper.dpsp-has-field-label .dpsp-setting-field-inner{position:relative;top:-18px;margin-left:243px}.dpsp-setting-field-wrapper input[type=text]{margin:0;box-shadow:none;padding:10px 12px;border-radius:2px;border:1px solid #c8d7e1;width:100%}.dpsp-setting-field-wrapper input[type=text]:focus{border-color:#0087be;box-shadow:0 0 1px 0 #78dcfa}.dpsp-setting-field-wrapper select{min-width:200px}.dpsp-setting-field-select :focus{outline:0!important}.dpsp-setting-field-select .select2-container{width:100%!important}.dpsp-setting-field-select .select2-selection{height:39px;border-radius:2px;border:1px solid #c8d7e1}.dpsp-setting-field-select .select2-selection .select2-selection__rendered{line-height:37px!important;padding-left:10px}.dpsp-setting-field-select .select2-selection .select2-selection__arrow{height:37px;padding-right:10px}.dpsp-select2 .select2-dropdown{border-color:#c8d7e1;border-radius:0}.dpsp-select2 .select2-dropdown li{margin:0;line-height:36px;padding:0 10px}.dpsp-select2 .select2-results__option[aria-selected=true]{background:#e8eaeb}.dpsp-select2 .select2-results__option--highlighted{background:#00aadc!important}.dpsp-select2 .select2-dropdown--below{top:32px;box-shadow:0 4px 3px 2px rgba(0,0,0,.08)}.dpsp-select2 .select2-dropdown--above{box-shadow:0 -4px 3px 2px rgba(0,0,0,.08)}.dpsp-setting-field-select .select2-container--open{box-shadow:0 0 3px 2px rgba(0,0,0,.08)}.dpsp-setting-field-wrapper textarea{min-height:100px;min-width:450px;border:0;box-shadow:none;padding:5px 8px;border-radius:3px}.dpsp-setting-field-wrapper input[type=checkbox],.dpsp-setting-field-wrapper input[type=radio]{display:none}.dpsp-setting-field-checkbox.dpsp-single .dpsp-setting-field-label{padding-right:18px}.dpsp-setting-field-checkbox.dpsp-multiple .dpsp-settings-field-checkbox,.dpsp-setting-field-radio.dpsp-multiple .dpsp-settings-field-radio{display:inline-block;margin-right:12px;position:relative;padding-left:23px}.dpsp-setting-field-checkbox input[type=checkbox]+label span,.dpsp-setting-field-radio input[type=radio]+label span{content:"";display:block;position:absolute;width:16px;height:16px;background:#fff;border:1px solid #e7e7e7;border-radius:3px;transition:background .1s ease-in-out,border-color .1s ease-in-out}.dpsp-setting-field-radio input[type=radio]+label span{border-radius:50%}.dpsp-setting-field-checkbox.dpsp-single input[type=checkbox]+label span{top:0;right:0}.dpsp-setting-field-checkbox.dpsp-multiple input[type=checkbox]+label span,.dpsp-setting-field-radio.dpsp-multiple input[type=radio]+label span{top:0;left:0}.dpsp-setting-field-checkbox input[type=checkbox]+label span:before{display:inline-block;content:"\f147";font:400 20px/1 dashicons;width:16px;height:16px;line-height:16px;vertical-align:middle;margin:-5px 0 0 -3px;color:transparent;transition:color .1s ease-in-out}.dpsp-setting-field-radio input[type=radio]+label span:before{content:"";position:relative;top:5px;left:5px;display:block;width:6px;height:6px;border-radius:50%}.dpsp-setting-field-checkbox input[type=checkbox]:checked+label span{background:#41a4a9;border-color:transparent}.dpsp-setting-field-checkbox input[type=checkbox]:checked+label span:before{color:#fff}.dpsp-setting-field-radio input[type=radio]:checked+label span{background:#41a4a9;border-color:transparent}.dpsp-setting-field-radio input[type=radio]:checked+label span:before{background:#fff}.dpsp-setting-field-tooltip-wrapper{position:absolute;top:2px;left:217px;display:inline-block;width:18px;height:18px;margin-left:5px}.dpsp-setting-field-tooltip-icon:before{content:"?";display:inline-block;width:14px;height:14px;line-height:14px;font-size:10px;font-weight:700;vertical-align:middle;text-align:center;color:#fff;background:#34495e;border-radius:9px;cursor:pointer;transition:all .15s ease-in}.dpsp-setting-field-tooltip-icon:hover:before{background:#34495e}.dpsp-setting-field-tooltip{z-index:10;opacity:0;visibility:hidden;position:absolute;top:28px;left:-25px;width:220px;background:rgba(52,73,94,.975);color:#fff;border-radius:4px;padding:8px 12px}.dpsp-setting-field-tooltip a{color:#3498db}.dpsp-setting-field-tooltip:before{content:"";display:block;position:absolute;top:-6px;left:27px;width:0;height:0;border-color:transparent transparent rgba(52,73,94,.975);border-style:solid;border-width:0 4.5px 6px}.dpsp-settings-button-style{cursor:pointer;width:10%;margin-right:1.5%;margin-bottom:10px;padding:12px;border-radius:5px;border:1px solid transparent;float:left;-moz-box-sizing:border-box;box-sizing:border-box}.dpsp-setting-field-share-text input{width:350px}.dpsp-setting-field-wrapper .dpsp-switch{float:none;margin-left:0}.dpsp-setting-field-facebook-app-authorized{background:rgba(0,184,148,.3);padding:9px;border-radius:3px;color:#27ae60}.dpsp-setting-field-facebook-app-authorized-expired{background:rgba(192,57,43,.3);padding:9px;border-radius:3px;color:#c0392b;margin-bottom:10px}.dpsp-setting-field-facebook-app-id,.dpsp-setting-field-facebook-app-secret,.dpsp-setting-field-facebook-authorize-app{display:none}.dpsp-page-wrapper .dpsp-settings-button-style .dpsp-networks-btns-wrapper li{margin-bottom:6px}.dpsp-page-wrapper .dpsp-settings-button-style .dpsp-networks-btns-wrapper li:last-of-type{margin-bottom:0}.dpsp-page-sidebar .dpsp-settings-button-style .dpsp-networks-btns-wrapper .dpsp-network-btn{margin:0 auto}.dpsp-page-sidebar .dpsp-settings-button-style .dpsp-shape-rounded .dpsp-networks-btns-wrapper .dpsp-network-btn,.dpsp-page-sidebar .dpsp-settings-button-style .dpsp-shape-rounded .dpsp-networks-btns-wrapper .dpsp-network-btn:before{border-radius:5px}.dpsp-page-content .dpsp-settings-button-style{width:24.25%;margin-right:1%}.dpsp-page-content .dpsp-section-button-style label:nth-of-type(4n){margin-right:0}.dpsp-settings-button-style:hover{border-color:#e1e1e1}.dpsp-settings-button-style-input{display:none!important}.dpsp-settings-button-style-input:checked+label{border-color:rgba(52,152,219,.3);background:rgba(52,152,219,.075)}#dpsp-toolkit-welcome{padding:35px 25px;background:#fff;margin-left:-20px;text-align:center;overflow:hidden}#dpsp-toolkit-welcome h2{font-size:1.8em;margin-top:0;margin-bottom:1.6em}#dpsp-toolkit-welcome p{font-size:14px}#dpsp-toolkit-welcome .button{margin-top:1.6em;box-shadow:none;outline:0}.dpsp-tool-wrapper{background:#fff;border-radius:3px;overflow:hidden}.dpsp-tool-wrapper img{max-width:100%;height:auto}.dpsp-tool-wrapper a{color:#777;text-decoration:none}.dpsp-tool-wrapper a:hover{color:rgba(52,152,219,.75)}.dpsp-tool-wrapper h4{font-size:15px;margin-bottom:0;margin-top:0;padding:10px;text-align:center}.dpsp-tool-wrapper .dpsp-tool-actions{position:relative;padding:15px}.dpsp-tool-wrapper .dpsp-tool-actions:after{content:"";display:block;clear:both}.dpsp-tool-wrapper .dpsp-tool-actions-overlay{z-index:1;position:absolute;top:0;left:0;height:100%;width:100%;background:hsla(0,0%,100%,.6);opacity:0}.dpsp-tool-wrapper .dpsp-tool-actions-overlay .spinner{float:none;visibility:visible;opacity:1;margin:15px 0 0 15px}.dpsp-tool-wrapper .dpsp-tool-actions.dpsp-active span{opacity:0}.dpsp-tool-wrapper .dpsp-tool-actions.dpsp-inactive span{opacity:.4}.dpsp-tool-wrapper .dpsp-tool-actions .dpsp-tool-settings{line-height:1;vertical-align:middle}.dpsp-tool-wrapper .dpsp-tool-actions .dpsp-tool-settings:focus{box-shadow:none}.dpsp-tool-wrapper .dpsp-tool-actions.dpsp-inactive .dpsp-tool-settings{display:none}.dpsp-tool-wrapper .dpsp-tool-actions .dpsp-tool-settings i{margin-right:3px}.dpsp-tool-wrapper .dpsp-switch span{text-transform:uppercase;font-size:.85em;margin-right:5px}.dpsp-tool-wrapper .dpsp-switch label{display:inline-block!important}.dpsp-page-toolkit .dpsp-col-3-8{padding-top:0!important}.dpsp-page-extensions{max-width:1000px}.dpsp-page-extensions .dpsp-card{margin-top:0;margin-bottom:0}.dpsp-unavailable>a{display:block;line-height:0}.dpsp-unavailable h4{padding-bottom:0;border-bottom:0;border-top:1px solid #f1f1f1;text-align:left}.dpsp-unavailable p.dpsp-description{margin:0;padding:10px}.dpsp-unavailable .dpsp-tool-actions{padding:15px 10px;overflow:hidden;text-align:center;background:#f9f9f9;border-top:1px solid #f1f1f1}.dpsp-unavailable .dpsp-tool-actions .button{padding-left:25px;padding-right:25px}.dpsp-unavailable .dpsp-description{height:57px}.dpsp-settings-sidebar{float:left;margin-top:63px;padding-left:20px;width:365px;-moz-box-sizing:border-box;box-sizing:border-box}.dpsp-settings-sidebar p{color:#767676}@media screen and (max-width:1225px){.dpsp-settings-sidebar{border-left:0;padding-left:0}}#dpsp-settings-sidebar-social-pug-pro img{max-width:100%;height:auto;padding:0 20px;box-sizing:border-box}#dpsp-settings-sidebar-social-pug-pro h3{text-align:center;line-height:1.7em;font-weight:700}#dpsp-settings-sidebar-social-pug-pro p{position:relative;padding-left:45px;color:#454545;margin-bottom:20px}#dpsp-settings-sidebar-social-pug-pro p .dpsp-dashicons{position:absolute;top:-5px;left:0;display:inline-block;width:30px;height:30px}#dpsp-settings-sidebar-social-pug-pro p .dpsp-dashicons:after{content:"";display:block;position:absolute;z-index:1;top:-1px;left:2px;width:30px;height:30px;border-radius:20px;background:#41a4a9}#dpsp-settings-sidebar-social-pug-pro p .dashicons{position:absolute;top:0;left:0;width:30px;height:30px;font-size:24px;line-height:30px;color:#fff;z-index:2}#dpsp-settings-sidebar-social-pug-pro .dpsp-button-primary{width:100%;text-align:center;padding:10px 0;box-sizing:border-box}#dpsp-settings-sidebar-opt-in-hound img{max-width:35px;height:auto;margin-right:10px;border-radius:50px;vertical-align:middle}#dpsp-mailchimp-subscribe-wrapper h3{margin-bottom:0}#dpsp-mailchimp-subscribe-wrapper p{margin-top:5px;margin-bottom:15px}#dpsp-mailchimp-subscribe-wrapper label{display:block;margin-bottom:5px}#dpsp-mailchimp-subscribe-wrapper input[type=email],#dpsp-mailchimp-subscribe-wrapper input[type=text]{margin-bottom:10px;width:100%}.dpsp-switch{position:relative;display:inline-block;margin-left:20px;float:right}.dpsp-page-wrapper .cmn-toggle{position:absolute;margin-left:-9999px;visibility:hidden}.dpsp-page-wrapper .cmn-toggle+label{display:block;position:relative;cursor:pointer;outline:none;user-select:none}.dpsp-page-wrapper input.cmn-toggle-round+label{padding:3px;width:36px;height:18px;background-color:#c9d6e0;border-radius:20px;transition:background .4s;box-sizing:content-box}.dpsp-page-wrapper input.cmn-toggle-round+label:after,.dpsp-page-wrapper input.cmn-toggle-round+label:before{display:block;position:absolute;top:2px;left:2px;bottom:2px;content:""}.dpsp-page-wrapper input.cmn-toggle-round+label:before{right:2px;border-radius:18px;transition:background .4s}.dpsp-page-wrapper input.cmn-toggle-round+label:after{width:20px;background-color:#fff;border-radius:100%;box-shadow:0 2px 5px rgba(0,0,0,.1);transition:margin .4s}.dpsp-page-wrapper input.cmn-toggle-round:checked+label{background-color:#41a4a9}.dpsp-page-wrapper input.cmn-toggle-round:checked+label:after{margin-left:18px}.dpsp-switch.small input.cmn-toggle-round+label{width:30px;height:15px}.dpsp-switch.small input.cmn-toggle-round+label:after{width:17px}.dpsp-switch.small input.cmn-toggle-round:checked+label:after{margin-left:15px}.wrap div.dpsp-admin-notice{position:relative;margin-top:16px}.wrap div.dpsp-admin-notice h4{font-size:16px}.wrap div.dpsp-admin-notice p{font-size:14px}.dpsp-admin-notice-activation{border-color:rgba(52,152,219,.75)}.dpsp-admin-notice-activation h4{font-size:1.05em}.dpsp-admin-notice-activation a{text-decoration:none}.dpsp-admin-notice-activation .dpsp-admin-notice-link{display:inline-block;padding:6px 8px;margin-bottom:10px;color:#3498db;font-weight:500;background:#e9e9e9;border-radius:2px;margin-right:10px}.dpsp-admin-notice-activation .dpsp-admin-notice-link span{display:inline-block;text-decoration:none;margin-right:10px}.dpsp-admin-notice-activation .dpsp-admin-notice-link:hover{color:#fff;background:rgba(52,152,219,.75)}.dpsp-admin-notice-wp-rating{border-color:rgba(52,152,219,.75)}.dpsp-admin-notice-wp-rating h4{font-size:1.05em}.dpsp-admin-notice-wp-rating p:last-of-type{margin-bottom:20px}.dpsp-admin-notice-wp-rating a{text-decoration:none}.dpsp-admin-notice-wp-rating .dpsp-admin-notice-link{display:inline-block;padding:6px 8px;margin-bottom:10px;color:#3498db;font-weight:500;background:#e9e9e9;border-radius:2px;margin-right:10px}.dpsp-admin-notice-wp-rating .dpsp-admin-notice-link span{display:inline-block;text-decoration:none;margin-right:10px}.dpsp-admin-notice-wp-rating .dpsp-admin-notice-link:hover{color:#fff;background:rgba(52,152,219,.75)}.dpsp-admin-notice-wp-rating .dashicons-star-filled{position:relative;top:1px;width:15px;height:15px;font-size:15px}.dpsp-admin-notice-opt-in-hound{position:relative;padding-left:140px;border-color:rgba(52,152,219,.75)}.dpsp-admin-notice-opt-in-hound h4{font-size:1.05em}.dpsp-admin-notice-opt-in-hound p:last-of-type{margin-bottom:20px}.dpsp-admin-notice-opt-in-hound a{text-decoration:none}.dpsp-admin-notice-opt-in-hound img{position:absolute;top:20px;left:20px;border-radius:50px;max-width:100px;height:auto}.wrap div.dpsp-admin-notice.dpsp-admin-grow-notice{display:flex;flex-flow:row}@media screen and (max-width:500px){.wrap div.dpsp-admin-notice.dpsp-admin-grow-notice{flex-flow:column}}.wrap div.dpsp-admin-notice .notice-img-wrap{padding:1em;flex:0 0 150px}.wrap div.dpsp-admin-notice .notice-img-wrap img{float:left}.wrap div.dpsp-admin-notice .notice-text-wrap{flex:1 1 auto}.wrap div.dpsp-admin-notice .notice-subtext{font-style:italic;font-size:.9em}#dpsp-feedback-form-overlay{display:none;z-index:9999;position:fixed;top:0;left:0;width:100%;height:100%;background:#000;opacity:.35}#dpsp-feedback-form{display:none;z-index:10000;position:fixed;top:10%;left:50%;background:#fff;border-radius:3px;max-width:700px;margin-left:-350px;width:100%}#dpsp-feedback-form .dpsp-header{position:relative;background:rgba(52,152,219,.75);padding:27px 35px}#dpsp-feedback-form>form{padding:30px 35px}#dpsp-feedback-form h2{color:#fff;margin-top:0;margin-bottom:0}#dpsp-feedback-form label{display:block;margin-bottom:5px;font-weight:700}#dpsp-feedback-form textarea{width:100%;margin-bottom:10px;min-height:80px}#dpsp-feedback-form input[type=email],#dpsp-feedback-form input[type=text]{width:50%;margin-bottom:10px}#dpsp-feedback-form input[type=submit]{margin-top:15px}#dpsp-feedback-form .spinner{float:none;visibility:visible;margin-top:19px}#dpsp-feedback-form .dpsp-error{display:none;margin-top:20px;margin-left:15px;color:#c0392b}#dpsp-feedback-done{display:none;position:relative;padding:35px 25px}#dpsp-feedback-done img{float:left}#dpsp-feedback-done:after{content:"";display:block;clear:both}#dpsp-feedback-done>div{position:relative;float:left;top:-10px;margin-left:40px;background:#f1f1f1;border-radius:10px;padding:10px 20px;max-width:400px}#dpsp-feedback-done>div p{font-size:1.1em}#dpsp-feedback-done>div p:first-of-type{font-weight:700}#dpsp-feedback-done>div:before{left:-30px;bottom:10px;width:25px;height:25px}#dpsp-feedback-done>div:after,#dpsp-feedback-done>div:before{content:"";display:block;position:absolute;border-radius:50%;background:#f1f1f1}#dpsp-feedback-done>div:after{left:-50px;bottom:20px;width:15px;height:15px}#dpsp-feedback-done>a{position:absolute;bottom:35px;right:35px}#dpsp-close-feedback{position:absolute;right:25px;top:50%;margin-top:-10px;color:#fff;text-decoration:none}.dpsp-statistic-bars-wrapper{padding-top:10px}.dpsp-statistic-bars-wrapper:after{content:"";display:block;width:0;clear:both}.dpsp-statistic-bar-header{opacity:.6;margin-bottom:10px;padding-bottom:5px;border-bottom:1px solid #f1f1f1}.dpsp-statistic-bar-wrapper.dpsp-statistic-bar-header:hover{background:none}.dpsp-statistic-bar-wrapper{position:relative;height:30px;padding-left:110px;padding-right:110px;transition:opacity .2s ease-in-out}.dpsp-statistic-bar-wrapper:hover{background:#f7f7f7}.dpsp-statistic-bar-wrapper label{position:absolute;left:10px;top:0;height:30px;width:109px;line-height:30px;font-weight:700;font-size:12px}.dpsp-statistic-bar-wrapper .dpsp-network-share-count{position:absolute;top:0;right:0;height:30px;width:110px;line-height:30px;font-weight:700;font-size:12px}.dpsp-statistic-bar-wrapper .dpsp-network-share-count .dpsp-count{display:inline-block;width:55px;text-align:center}.dpsp-statistic-bar-wrapper .dpsp-network-share-count .dpsp-percentage{display:inline-block;width:40px;text-align:center}.dpsp-statistic-bar-wrapper .dpsp-network-share-count .dpsp-divider{width:1px;margin:0 2px;opacity:.5}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar{position:relative;top:10px;height:10px;width:100%;background:#e7e7e7;border-radius:5px}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-inner{height:10px;width:0;border-radius:5px}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-facebook .dpsp-statistic-bar-inner{background:#3a579a}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-twitter .dpsp-statistic-bar-inner{background:#00abf0}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-google-plus .dpsp-statistic-bar-inner{background:#df4a32}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-pinterest .dpsp-statistic-bar-inner{background:#c92228}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-linkedin .dpsp-statistic-bar-inner{background:#0077b5}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-stumbleupon .dpsp-statistic-bar-inner{background:#ec4b24}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-reddit .dpsp-statistic-bar-inner{background:#ff5700}.dpsp-statistic-bar-wrapper .dpsp-statistic-bar-vkontakte .dpsp-statistic-bar-inner{background:#4d75a3}.dpsp-statistic-bar-footer{opacity:.6;margin:10px 0;border-top:1px solid #f1f1f1;border-bottom:1px solid #f1f1f1}.dpsp-statistic-bar-wrapper.dpsp-statistic-bar-footer:hover{background:none}#dpsp-refresh-share-counts-wrapper:after{content:"";display:block;width:0;clear:both}#dpsp-refresh-share-counts{float:right}#opt-in-hound-promo-box{background:#fff;max-width:800px;margin:35px auto;border-radius:4px;overflow:hidden;box-shadow:0 0 20px 4px #e9e9e9}#opt-in-hound-promo-box img{max-width:100%;height:auto}#opt-in-hound-promo-box hr{margin:50px 0}#opt-in-hound-promo-box-banner{position:relative}#opt-in-hound-promo-box-inner{padding:0 50px}#opt-in-hound-promo-box .opt-in-hound-promo-box-title{font-size:28px;font-weight:700;margin:15px 0}#opt-in-hound-promo-box .opt-in-hound-promo-box-title span{font-weight:300;font-size:22px}#opt-in-hound-promo-box .opt-in-hound-promo-box-sub-title{font-size:20px;font-weight:300;line-height:1.3}#opt-in-hound-promo-box .opt-in-hound-promo-box-sub-title,#opt-in-hound-promo-box .opt-in-hound-promo-box-title{text-align:center;color:#4d5b68}#opt-in-hound-promo-box .dpsp-row{margin-bottom:35px}#opt-in-hound-promo-box .dpsp-row .opt-in-hound-promo-box-sub-title{margin-top:0}#opt-in-hound-promo-box .dpsp-col-1-3{text-align:center}#opt-in-hound-promo-box .dpsp-col-1-4{border-right:1px solid #f1f1f1}#opt-in-hound-promo-box .dpsp-col-1-4.dpsp-last{border-right:0}#opt-in-hound-promo-box .dpsp-col-1-4 img{margin:-20px 0}#opt-in-hound-promo-box .opt-in-hound-promo-box-cta{text-align:center;margin:35px 0}#opt-in-hound-promo-box .opt-in-hound-promo-box-cta.dpsp-last{margin:35px 0 50px}#opt-in-hound-promo-box .opt-in-hound-promo-box-cta .button-primary{font-size:120%;font-weight:500;height:38px;line-height:34px;padding:0 25px}#opt-in-hound-promo-box-disclaimer{max-width:800px;margin:0 auto;font-size:12px;color:#a1a1a1}.dpsp-page-extensions.dpsp-sub-page-opt-in-hound div.notice{display:none}#dpsp-deactivate-modal{display:none;z-index:9999;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.35)}#dpsp-deactivate-wrapper{z-index:10000;position:fixed;top:10%;left:50%;background:#fff;border-radius:4px;max-width:700px;margin-left:-350px;width:100%;overflow:hidden}#dpsp-deactivate-wrapper p{margin-top:0;margin-bottom:10px}#dpsp-deactivate-wrapper hr{margin:25px 0;border:0;border-top:1px solid #e1e1e1}#dpsp-deactivate-wrapper textarea{min-height:65px;width:100%}#dpsp-deactivate-wrapper .dpsp-deactivate-close{line-height:26px;margin-left:10px}#dpsp-deactivate-contact-me{display:none}#dpsp-deactivate-contact-me label{display:block;margin-bottom:10px}#dpsp-deactivate-contact-me input[type=email]{display:block;min-width:250px;width:50%}#dpsp-deactivate-header{position:relative;padding:25px 20px 22px;background:#f5f5f5;border-bottom:1px solid #e1e1e1;overflow:hidden}#dpsp-deactivate-header img{position:absolute;right:15px;top:auto;bottom:-29px;max-width:80px}#dpsp-deactivate-header h3{margin:0}#dpsp-deactivate-inner{padding:20px 20px 25px}#dpsp-deactivate-footer{padding:20px;background:#f5f5f5;border-top:1px solid #e1e1e1}#dpsp-deactivate-footer a:last-of-type{float:right}.browser-window{border:1px solid rgba(52,152,219,.75);border-radius:5px;line-height:0;overflow:hidden}.browser-header{text-align:left;border-bottom:1px solid rgba(52,152,219,.75);height:20px}.browser-header:before{display:block;content:"○ ○ ○";position:relative;top:10px;left:7px;font-size:20px;color:rgba(52,152,219,.75)}@media screen and (max-width:785px){.dpsp-page-title-wrapper h2{position:relative;padding-right:50px}.dpsp-page-title-wrapper h2 .dpsp-switch{position:absolute;top:15px;right:0}.dpsp-social-platforms-sort-list{overflow:auto}}@media screen and (max-width:720px){.dpsp-col-1-4{width:50%}#dpsp-networks-selector li{width:100%;padding:0}#dpsp-networks-selector-footer{text-align:center}.dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper{width:auto}.dpsp-page-sidebar .dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper:hover input,.dpsp-page-sidebar .dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper input:focus,.dpsp-social-platforms-sort-list li .dpsp-list-input-wrapper input{width:150px;padding-right:10px}.dpsp-settings-button-style{width:auto}.dpsp-page-content .dpsp-settings-button-style{width:49.5%}.dpsp-page-content .dpsp-section-button-style label:nth-of-type(4n){margin-right:1%}.dpsp-page-content .dpsp-section-button-style label:nth-of-type(2n){margin-right:0}.dpsp-setting-field-label{width:100%;margin-bottom:10px}.dpsp-setting-field-wrapper{margin-bottom:30px}}
 
assets/dist/style-frontend-jquery.1.0.0.css DELETED
@@ -1 +0,0 @@
1
- @font-face{font-family:Social Pug;src:url(./socialpug.1.0.0.eot?gd6mr8);src:url(./socialpug.1.0.0.eot?#iefix) format("embedded-opentype"),url(./socialpug.1.0.0.woff) format("woff"),url(./socialpug.1.0.0.ttf) format("truetype"),url(./socialpug.1.0.0.svg#socialpug) format("svg");font-weight:400;font-style:normal}.dpsp-icon-total-share:before{line-height:20px;display:inline-block;line-height:1em}.dpsp-icon-total-share:before,.dpsp-network-btn .dpsp-network-icon:after,.dpsp-network-btn .dpsp-network-icon:before{position:absolute;top:50%;left:50%;margin-top:-10px;margin-left:-10px;width:20px;height:20px;vertical-align:middle;font-family:Social Pug;font-style:normal;font-weight:400;text-decoration:inherit;text-align:center;font-variant:normal;text-transform:none}.dpsp-network-btn .dpsp-network-icon:after,.dpsp-network-btn .dpsp-network-icon:before{display:block;line-height:20px}.dpsp-network-btn .dpsp-network-icon:after{margin-left:-20px;opacity:0}.dpsp-icon-total-share:before{content:"\e883"}.dpsp-facebook .dpsp-network-icon:after,.dpsp-facebook .dpsp-network-icon:before{content:"\e800"}.dpsp-twitter .dpsp-network-icon:after,.dpsp-twitter .dpsp-network-icon:before{content:"\e801"}.dpsp-pinterest .dpsp-network-icon:after,.dpsp-pinterest .dpsp-network-icon:before{content:"\e803"}.dpsp-linkedin .dpsp-network-icon:after,.dpsp-linkedin .dpsp-network-icon:before{content:"\e804"}.dpsp-email .dpsp-network-icon:after,.dpsp-email .dpsp-network-icon:before{content:"\e816"}.dpsp-print .dpsp-network-icon:after,.dpsp-print .dpsp-network-icon:before{content:"\e817"}.dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon:after,.dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon:before{transition:all .25s ease-in-out}.dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon:before{margin-left:5px;opacity:0}.dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon:after{margin-left:-10px;opacity:1}#dpsp-floating-sidebar{position:fixed;top:30%;z-index:9998}#dpsp-floating-sidebar.dpsp-position-left{left:0}#dpsp-floating-sidebar.dpsp-position-right{right:0}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar li{float:none;margin-left:0}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn{padding:0;width:40px}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{border-color:transparent!important;background:transparent!important}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-has-count .dpsp-network-icon{height:22px;line-height:22px}.dpsp-button-hover .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn:hover:before{color:#fff}.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn,.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{border-radius:0}.dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first,.dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first .dpsp-network-icon{-webkit-border-top-right-radius:5px;-moz-border-radius-topright:5px;border-top-right-radius:5px}.dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last,.dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last .dpsp-network-icon{-webkit-border-bottom-right-radius:5px;-moz-border-radius-bottomright:5px;border-bottom-right-radius:5px}.dpsp-position-left.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn,.dpsp-position-left.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{-webkit-border-top-right-radius:5px;-moz-border-radius-topright:5px;border-top-right-radius:5px;-webkit-border-bottom-right-radius:5px;-moz-border-radius-bottomright:5px;border-bottom-right-radius:5px}.dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first,.dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first .dpsp-network-icon{-webkit-border-top-left-radius:5px;-moz-border-radius-topleft:5px;border-top-left-radius:5px}.dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last,.dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last .dpsp-network-icon{-webkit-border-bottom-left-radius:5px;-moz-border-radius-bottomleft:5px;border-bottom-left-radius:5px}.dpsp-position-right.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn,.dpsp-position-right.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{-webkit-border-top-left-radius:5px;-moz-border-radius-topleft:5px;border-top-left-radius:5px;-webkit-border-bottom-left-radius:5px;-moz-border-radius-bottomleft:5px;border-bottom-left-radius:5px}.dpsp-shape-rounded.dpsp-has-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{border-radius:5px}#dpsp-floating-sidebar.dpsp-position-left.dpsp-shape-circle{left:12px}#dpsp-floating-sidebar.dpsp-position-right.dpsp-shape-circle{right:10px}.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn{margin-bottom:6px}.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn{-webkit-border-top-right-radius:5px;-moz-border-radius-topright:5px;border-top-right-radius:5px;-webkit-border-bottom-right-radius:5px;-moz-border-radius-bottomright:5px;border-bottom-right-radius:5px}#dpsp-floating-sidebar.dpsp-style-2 .dpsp-network-btn:before{background:none}#dpsp-floating-sidebar .dpsp-networks-btns-wrapper li{position:relative;overflow:visible}#dpsp-floating-sidebar .dpsp-networks-btns-wrapper .dpsp-button-label{position:absolute;z-index:1;display:inline-block;width:auto;white-space:nowrap;top:50%;margin-top:-15px;height:30px;padding:6px 12px;color:#fff;font-size:12px;font-weight:400;line-height:18px;background:#34495e;border-radius:3px;visibility:hidden;opacity:0;transition:all .2s ease-in-out;box-sizing:border-box}#dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper .dpsp-button-label{left:100%}#dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper .dpsp-button-label{right:100%}#dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper li.dpsp-hover .dpsp-button-label{transform:translateX(10px);visibility:visible;opacity:1}#dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper li.dpsp-hover .dpsp-button-label{transform:translateX(-10px);visibility:visible;opacity:1}#dpsp-floating-sidebar .dpsp-networks-btns-wrapper .dpsp-button-label:before{content:"";display:block;position:absolute;top:50%;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent}#dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper .dpsp-button-label:before{left:-5px;border-right:5px solid #34495e}#dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper .dpsp-button-label:before{right:-5px;border-left:5px solid #34495e}#dpsp-content-top{margin-bottom:1.2em}#dpsp-content-bottom{margin-top:1.2em}.dpsp-share-text{font-weight:700;margin-bottom:10px}.dpsp-networks-btns-wrapper{list-style:none!important;padding:0!important;margin:0!important}.dpsp-networks-btns-wrapper:after{content:"";display:block;height:0;clear:both}.dpsp-networks-btns-wrapper li{float:left;overflow:hidden;-moz-transition:all .15s ease-in;-webkit-transition:all .15s ease-in;-o-transition:all .15s ease-in;transition:all .15s ease-in;list-style-type:none!important}.dpsp-networks-btns-wrapper li:before{display:none!important}.dpsp-networks-btns-wrapper li:first-child{margin-left:0!important}.dpsp-networks-btns-wrapper .dpsp-network-btn{position:relative;display:block;text-decoration:none!important;text-transform:unset!important;height:40px;min-width:40px;font-family:Arial;font-weight:700;font-size:14px;line-height:36px;vertical-align:middle;padding:0 10px 0 48px;border:2px solid;max-height:40px;width:100%;-moz-box-sizing:border-box;box-sizing:border-box;-moz-transition:all .15s ease-in;-webkit-transition:all .15s ease-in;-o-transition:all .15s ease-in;transition:all .15s ease-in;box-shadow:none;cursor:pointer}.dpsp-networks-btns-wrapper .dpsp-network-btn:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn:hover{border:2px solid;box-shadow:none}.dpsp-networks-btns-wrapper .dpsp-network-btn:after{content:"";display:block;height:0;clear:both}.dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon{position:absolute;top:-2px;left:-2px;bottom:-2px;float:left;display:block;font-size:14px;line-height:36px;width:40px;text-align:center;vertical-align:middle;border:2px solid;-moz-box-sizing:border-box;box-sizing:border-box;-moz-transition:all .15s ease-in;-webkit-transition:all .15s ease-in;-o-transition:all .15s ease-in;transition:all .15s ease-in}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{padding:0 18px}.dpsp-button-style-1 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label .dpsp-network-icon{width:auto;right:-2px}.dpsp-has-buttons-count .dpsp-networks-btns-wrapper .dpsp-network-label{margin-right:10px}.dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-count{font-size:13px}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-count{position:absolute;bottom:0;left:0;width:100%;margin-left:0;font-size:11px;text-align:center;height:20px;line-height:20px}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label .dpsp-network-label-wrapper{display:none}.dpsp-column-1 .dpsp-networks-btns-wrapper li{width:100%}.dpsp-column-1.dpsp-has-spacing .dpsp-networks-btns-wrapper li{margin-right:0}.dpsp-column-2 .dpsp-networks-btns-wrapper li{width:50%}.dpsp-column-2.dpsp-has-spacing .dpsp-networks-btns-wrapper li{width:49%}.dpsp-column-2 .dpsp-networks-btns-wrapper li:nth-child(2n){margin-right:0}.dpsp-column-3 .dpsp-networks-btns-wrapper li{width:33.3333%}.dpsp-column-3.dpsp-has-spacing .dpsp-networks-btns-wrapper li{width:32%}.dpsp-column-3 .dpsp-networks-btns-wrapper li:nth-child(3n){margin-right:0}.dpsp-column-4 .dpsp-networks-btns-wrapper li{width:25%}.dpsp-column-4.dpsp-has-spacing .dpsp-networks-btns-wrapper li{width:23.5%}.dpsp-column-4 .dpsp-networks-btns-wrapper li:nth-child(4n){margin-right:0}.dpsp-column-5 .dpsp-networks-btns-wrapper li{width:20%}.dpsp-column-5.dpsp-has-spacing .dpsp-networks-btns-wrapper li{width:18.4%}.dpsp-column-5 .dpsp-networks-btns-wrapper li:nth-child(5n){margin-right:0}.dpsp-column-6 .dpsp-networks-btns-wrapper li{width:16.6666%}.dpsp-column-6.dpsp-has-spacing .dpsp-networks-btns-wrapper li{width:15%}.dpsp-column-6 .dpsp-networks-btns-wrapper li:nth-child(6n){margin-right:0}.dpsp-column-2 .dpsp-networks-btns-wrapper .dpsp-network-btn,.dpsp-column-3 .dpsp-networks-btns-wrapper .dpsp-network-btn,.dpsp-column-4 .dpsp-networks-btns-wrapper .dpsp-network-btn,.dpsp-column-5 .dpsp-networks-btns-wrapper .dpsp-network-btn,.dpsp-column-6 .dpsp-networks-btns-wrapper .dpsp-network-btn{padding-right:10px}.article .dpsp-networks-btns-wrapper{display:flex;flex-wrap:wrap;justify-content:center}.article ul.dpsp-networks-btns-wrapper li{flex:0 0 auto;float:none;margin:5px;width:auto}.dpsp-no-labels .dpsp-networks-btns-wrapper .dpsp-network-btn{padding:0;text-align:center}.dpsp-no-labels:not(.dpsp-column-auto) .dpsp-networks-btns-wrapper .dpsp-network-btn:before{position:relative;left:0;float:none;display:inline-block}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook .dpsp-network-icon{border-color:#3a579a;background:#3a579a;color:#3a579a}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:hover .dpsp-network-icon{border-color:#334d87;background:#334d87;color:#334d87}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter .dpsp-network-icon{border-color:#00abf0;background:#00abf0;color:#00abf0}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:hover .dpsp-network-icon{border-color:#0099d7;background:#0099d7;color:#0099d7}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest .dpsp-network-icon{border-color:#c92228;background:#c92228;color:#c92228}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:hover .dpsp-network-icon{border-color:#b31e24;background:#b31e24;color:#b31e24}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin .dpsp-network-icon{border-color:#0077b5;background:#0077b5;color:#0077b5}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:hover .dpsp-network-icon{border-color:#00669c;background:#00669c;color:#00669c}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email .dpsp-network-icon{border-color:#27ae60;background:#27ae60;color:#27ae60}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:hover .dpsp-network-icon{border-color:#239e57;background:#239e57;color:#239e57}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print .dpsp-network-icon{border-color:#bdc3c7;background:#bdc3c7;color:#bdc3c7}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:hover .dpsp-network-icon{border-color:#afb6bb;background:#afb6bb;color:#afb6bb}.dpsp-has-button-background .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn:before{color:#fff}.dpsp-shape-rounded .dpsp-network-btn,.dpsp-shape-rounded .dpsp-network-btn .dpsp-network-icon{-webkit-border-top-left-radius:5px;-webkit-border-bottom-left-radius:5px;-moz-border-radius-topleft:5px;-moz-border-radius-bottomleft:5px;border-top-left-radius:5px;border-bottom-left-radius:5px}.dpsp-shape-rounded .dpsp-network-btn,.dpsp-shape-rounded .dpsp-no-label.dpsp-network-btn .dpsp-network-icon{-webkit-border-top-right-radius:5px;-webkit-border-bottom-right-radius:5px;-moz-border-radius-topright:5px;-moz-border-radius-bottomright:5px;border-top-right-radius:5px;border-bottom-right-radius:5px}.dpsp-shape-circle .dpsp-network-btn{border-radius:30px}.dpsp-shape-circle .dpsp-network-btn .dpsp-network-icon{border-radius:30px;overflow:hidden}.dpsp-has-spacing .dpsp-networks-btns-wrapper li{margin-bottom:10px;margin-right:2%;margin-left:0!important}@media screen and (max-width:720px){.dpsp-hide-on-mobile{display:none}}.dpsp-button-style-1 .dpsp-network-btn{color:#fff!important;padding-left:38px}.dpsp-button-style-1 .dpsp-network-btn .dpsp-network-icon{color:#fff!important}.dpsp-show-total-share-count{position:relative}.dpsp-total-share-wrapper{position:relative;font-family:Arial;margin-top:10px;line-height:1.345;color:#5d6368}.dpsp-total-share-wrapper .dpsp-icon-total-share:before{font-size:16px;top:7px;left:-2px;margin-top:0;margin-left:0}#dpsp-floating-sidebar .dpsp-total-share-wrapper{margin-bottom:10px}#dpsp-floating-sidebar .dpsp-total-share-wrapper .dpsp-icon-total-share{display:none}.dpsp-total-share-wrapper span{display:block;font-size:9px;font-weight:700;text-transform:uppercase;text-align:center}.dpsp-total-share-wrapper .dpsp-total-share-count{font-size:15px;line-height:18px;white-space:nowrap}.dpsp-content-wrapper .dpsp-total-share-wrapper{position:absolute;width:60px;height:40px;margin-top:-21px;top:50%;padding-left:20px;box-sizing:border-box}.dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before{padding-left:70px}.dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after{padding-right:70px}.dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before .dpsp-total-share-wrapper{left:0}.dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after .dpsp-total-share-wrapper{right:0}@media print{#dpsp-floating-sidebar,.dpsp-content-wrapper,.dpsp-share-text{display:none}}
 
assets/dist/style-frontend-pro-jquery.1.18.0.css ADDED
@@ -0,0 +1 @@
 
1
+ .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon{align-self:start;display:block;font-size:14px;line-height:36px;width:40px;height:40px;position:relative;top:-2px;left:-2px;text-align:center;border:2px solid;flex:0 0 auto;-moz-box-sizing:border-box;box-sizing:border-box;-moz-transition:all .15s ease-in;-webkit-transition:all .15s ease-in;-o-transition:all .15s ease-in;transition:all .15s ease-in}.dpsp-icon-total-share svg,.dpsp-network-icon .dpsp-network-icon-inner svg{position:relative;top:.1em;max-height:14px;width:auto;overflow:visible;transition:fill .15s ease-in-out}.dpsp-size-large .dpsp-icon-total-share svg,.dpsp-size-large .dpsp-network-icon .dpsp-network-icon-inner svg{max-height:22px}.widget_dpsp_social_media_follow .dpsp-network-icon .dpsp-network-icon-inner svg{top:.05em}.dpsp-icon-total-share,.dpsp-network-icon-inner{display:flex;align-items:center;justify-content:center}.dpsp-network-icon-inner{transition:all .2s ease;height:36px}.dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon-inner{transition:all .2s cubic-bezier(.62,3.15,.4,-.64);transform:scale(1.5)}#dpsp-floating-sidebar{position:fixed;top:50%;transform:translateY(-50%);z-index:9998}#dpsp-floating-sidebar.dpsp-position-left{left:0}#dpsp-floating-sidebar.dpsp-position-right{right:0}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar li{float:none;margin-left:0}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn{padding:0;width:40px}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{border-color:transparent!important;background:transparent!important}.dpsp-size-medium .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon-inner{height:41px}.dpsp-size-large .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon-inner{height:46px}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-has-count .dpsp-network-icon{height:22px;line-height:22px}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-has-count .dpsp-network-icon-inner{height:18px}#dpsp-floating-sidebar.dpsp-no-animation{display:none}#dpsp-floating-sidebar.dpsp-no-animation.opened{display:block}#dpsp-floating-sidebar.dpsp-animation-1{opacity:0;transition:opacity .2s ease-in-out}#dpsp-floating-sidebar.dpsp-animation-1.opened{opacity:1}#dpsp-floating-sidebar.dpsp-position-left.dpsp-animation-2,#dpsp-floating-sidebar.dpsp-position-left.dpsp-shape-circle.dpsp-animation-2{left:-60px;transition:left .2s ease-in-out}#dpsp-floating-sidebar.dpsp-position-left.dpsp-animation-2.opened{left:0}#dpsp-floating-sidebar.dpsp-position-left.dpsp-shape-circle.dpsp-animation-2.opened{left:12px}#dpsp-floating-sidebar.dpsp-position-right.dpsp-animation-2,#dpsp-floating-sidebar.dpsp-position-right.dpsp-shape-circle.dpsp-animation-2{right:-60px;transition:right .2s ease-in-out}#dpsp-floating-sidebar.dpsp-position-right.dpsp-animation-2.opened{right:0}#dpsp-floating-sidebar.dpsp-position-right.dpsp-shape-circle.dpsp-animation-2.opened{right:10px}.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn,.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{border-radius:0}.dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first,.dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first .dpsp-network-icon{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px}.dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last,.dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last .dpsp-network-icon{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px}.dpsp-position-left.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn,.dpsp-position-left.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px}.dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first,.dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first .dpsp-network-icon{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px}.dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last,.dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last .dpsp-network-icon{-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.dpsp-position-right.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn,.dpsp-position-right.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.dpsp-shape-rounded.dpsp-has-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{border-radius:4px}#dpsp-floating-sidebar.dpsp-position-left.dpsp-shape-circle{left:12px}#dpsp-floating-sidebar.dpsp-position-right.dpsp-shape-circle{right:10px}.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn{margin-bottom:6px}.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px}#dpsp-floating-sidebar.dpsp-style-2 .dpsp-network-btn .dpsp-network-icon{background:none}#dpsp-floating-sidebar .dpsp-networks-btns-wrapper li{position:relative;overflow:visible}#dpsp-floating-sidebar .dpsp-networks-btns-wrapper .dpsp-network-label{position:absolute;z-index:1;display:inline-block;width:auto;white-space:nowrap;top:50%;margin-top:-15px;height:30px;padding:6px 12px;color:#fff;font-size:12px;font-weight:400;line-height:18px;background:#34495e;border-radius:3px;visibility:hidden;opacity:0;transition:all .2s ease-in-out;box-sizing:border-box}#dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper .dpsp-network-label{left:100%}#dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper .dpsp-network-label{right:100%}#dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper li.dpsp-hover .dpsp-network-label{transform:translateX(10px);visibility:visible;opacity:1}#dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper li.dpsp-hover .dpsp-network-label{transform:translateX(-10px);visibility:visible;opacity:1}#dpsp-floating-sidebar .dpsp-networks-btns-wrapper .dpsp-network-label:before{content:"";display:block;position:absolute;top:50%;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent}#dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper .dpsp-network-label:before{left:-5px;border-right:5px solid #34495e}#dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper .dpsp-network-label:before{right:-5px;border-left:5px solid #34495e}.dpsp-settings-button-style .dpsp-networks-btns-sidebar .dpsp-network-label{display:none}#dpsp-content-top{margin-bottom:1.2em}#dpsp-content-bottom{margin-top:1.2em}.dpsp-share-text{font-weight:700;margin-bottom:10px}.dpsp-shortcode-wrapper{margin-bottom:1.2em}#dpsp-sticky-bar-wrapper{position:fixed;z-index:1000;bottom:0;left:0;width:100%;background:#fff}#dpsp-sticky-bar-wrapper.dpsp-position-desktop-top{bottom:auto;top:0}#dpsp-sticky-bar-wrapper.dpsp-position-desktop-bottom{bottom:0;top:auto}#dpsp-sticky-bar-wrapper.dpsp-no-animation{visibility:hidden;opacity:0}#dpsp-sticky-bar-wrapper.dpsp-no-animation.opened{visibility:visible;opacity:1}#dpsp-sticky-bar{display:none;position:relative;margin:7px 0;box-sizing:border-box}#dpsp-sticky-bar .dpsp-networks-btns-wrapper{display:flex}#dpsp-sticky-bar .dpsp-networks-btns-wrapper li{float:none;flex:1;margin-bottom:0;margin-left:3px;margin-right:3px}#dpsp-sticky-bar .dpsp-networks-btns-wrapper li:last-of-type{margin-right:0}#dpsp-sticky-bar .dpsp-network-btn{padding-left:1em;padding-right:1em;text-align:center}#dpsp-sticky-bar .dpsp-network-btn .dpsp-network-icon{display:inline-block;position:relative;width:20px;overflow:visible}#dpsp-sticky-bar .dpsp-network-btn.dpsp-has-count .dpsp-network-icon{margin-right:5px}#dpsp-sticky-bar-wrapper.dpsp-is-mobile.dpsp-position-mobile-top{bottom:auto;top:0}#dpsp-sticky-bar-wrapper.dpsp-is-mobile.dpsp-position-mobile-bottom{bottom:0;top:auto}#dpsp-sticky-bar-wrapper.dpsp-is-mobile #dpsp-sticky-bar{position:static;margin:0;width:100%!important;padding:0}#dpsp-sticky-bar-wrapper.dpsp-is-mobile #dpsp-sticky-bar .dpsp-networks-btns-wrapper li{margin:0}#dpsp-sticky-bar-wrapper.dpsp-is-mobile #dpsp-sticky-bar .dpsp-network-btn{padding-left:0;padding-right:0;text-align:center;height:44px;max-height:44px;line-height:40px;border-radius:0}#dpsp-sticky-bar-wrapper.dpsp-is-mobile #dpsp-sticky-bar .dpsp-network-btn .dpsp-network-icon{position:relative;left:auto;display:inline-block;float:none;font-size:18px;line-height:40px}#dpsp-sticky-bar-wrapper.dpsp-is-mobile #dpsp-sticky-bar .dpsp-network-btn.dpsp-has-count .dpsp-network-icon{position:absolute;display:block;width:100%;height:26px;line-height:26px}#dpsp-sticky-bar-wrapper.dpsp-is-mobile #dpsp-sticky-bar .dpsp-network-btn .dpsp-network-count{position:absolute;bottom:0;left:0;width:100%;margin-left:0;font-size:11px;text-align:center;height:20px;line-height:20px}#dpsp-sticky-bar-wrapper.dpsp-animation-1{visibility:hidden;opacity:0;transition:opacity .2s ease-in-out}#dpsp-sticky-bar-wrapper.dpsp-animation-1.opened{visibility:visible;opacity:1}#dpsp-sticky-bar-wrapper.dpsp-is-mobile.dpsp-position-mobile-bottom.dpsp-animation-2,#dpsp-sticky-bar-wrapper:not(.dpsp-is-mobile).dpsp-position-desktop-bottom.dpsp-animation-2{visibility:hidden;bottom:-88px;transition:bottom .3s ease-in-out,visibility .3s ease-in-out}#dpsp-sticky-bar-wrapper.dpsp-is-mobile.dpsp-position-mobile-bottom.dpsp-animation-2.opened,#dpsp-sticky-bar-wrapper:not(.dpsp-is-mobile).dpsp-position-desktop-bottom.dpsp-animation-2.opened{visibility:visible;bottom:0}#dpsp-sticky-bar-wrapper.dpsp-is-mobile.dpsp-position-mobile-top.dpsp-animation-2,#dpsp-sticky-bar-wrapper:not(.dpsp-is-mobile).dpsp-position-desktop-top.dpsp-animation-2{visibility:hidden;top:-88px;bottom:auto;transition:top .3s ease-in-out,visibility .3s ease-in-out}#dpsp-sticky-bar-wrapper.dpsp-is-mobile.dpsp-position-mobile-top.dpsp-animation-2.opened,#dpsp-sticky-bar-wrapper:not(.dpsp-is-mobile).dpsp-position-desktop-top.dpsp-animation-2.opened{visibility:visible;top:0}@media screen and (min-width:782px){body.admin-bar #dpsp-sticky-bar-wrapper{margin-top:32px}}.dpsp-networks-btns-wrapper{list-style:none!important;padding:0!important;margin:0!important}.dpsp-networks-btns-wrapper:after{content:"";display:block;height:0;clear:both}.dpsp-networks-btns-wrapper li{float:left;-moz-transition:all .15s ease-in;-webkit-transition:all .15s ease-in;-o-transition:all .15s ease-in;transition:all .15s ease-in;margin:0;padding:0;border:0;list-style-type:none!important}.dpsp-networks-btns-wrapper li:before{display:none!important}.dpsp-networks-btns-wrapper li:first-child{margin-left:0!important}.dpsp-networks-btns-wrapper .dpsp-network-btn{position:relative;text-align:center;display:inline-flex;text-decoration:none!important;text-transform:unset!important;height:40px;min-width:40px;font-family:Arial,sans-serif;font-weight:700;font-size:14px;line-height:36px;vertical-align:middle;padding:0;border:2px solid;max-height:40px;width:100%;-moz-box-sizing:border-box;box-sizing:border-box;-moz-transition:all .15s ease-in;-webkit-transition:all .15s ease-in;-o-transition:all .15s ease-in;transition:all .15s ease-in;box-shadow:none;cursor:pointer;border-radius:0}.dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-label{padding-left:.5em;padding-right:.5em}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count .dpsp-network-label{padding-right:.25em}.dpsp-networks-btns-wrapper .dpsp-network-btn:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn:hover{border:2px solid;box-shadow:0 0 0 3px rgba(21,156,228,.4);box-shadow:0 0 0 3px var(--networkHover);outline:none}.dpsp-networks-btns-wrapper .dpsp-network-btn:after{content:"";display:block;height:0;clear:both}.dpsp-networks-btns-wrapper.dpsp-column-auto .dpsp-network-btn.dpsp-no-label{padding-left:0!important}.dpsp-size-small .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn.dpsp-no-label .dpsp-network-icon{width:28px}.dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-count{font-size:13px;font-weight:400;padding-left:.25em;padding-right:.5em;white-space:nowrap}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-count{position:absolute;bottom:0;left:0;width:100%;margin-left:0;font-size:11px;text-align:center;height:20px;line-height:20px}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label .dpsp-network-label-wrapper{display:none}.dpsp-button-style-6 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar):not(.dpsp-column-auto):not(.dpsp-column-6) .dpsp-network-btn.dpsp-has-count-only .dpsp-network-label-wrapper,.dpsp-button-style-7 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar):not(.dpsp-column-auto):not(.dpsp-column-6) .dpsp-network-btn.dpsp-has-count-only .dpsp-network-label-wrapper{display:inline-block;text-indent:2em}.dpsp-networks-btns-wrapper.dpsp-column-1 li{width:100%;margin-left:0}.dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-1 li{margin-right:0}.dpsp-networks-btns-wrapper.dpsp-column-2 li{width:50%}.dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-2 li{width:49%}.dpsp-networks-btns-wrapper.dpsp-column-2 li:nth-child(2n){margin-right:0}.dpsp-networks-btns-wrapper.dpsp-column-3 li{width:33.3333%}.dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-3 li{width:32%}.dpsp-networks-btns-wrapper.dpsp-column-3 li:nth-child(3n){margin-right:0}.dpsp-networks-btns-wrapper.dpsp-column-4 li{width:25%}.dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-4 li{width:23.5%}.dpsp-networks-btns-wrapper.dpsp-column-4 li:nth-child(4n){margin-right:0}.dpsp-networks-btns-wrapper.dpsp-column-5 li{width:20%}.dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-5 li{width:18.4%}.dpsp-networks-btns-wrapper.dpsp-column-5 li:nth-child(5n){margin-right:0}.dpsp-networks-btns-wrapper.dpsp-column-6 li{width:16.6666%}.dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-6 li{width:15%}.dpsp-networks-btns-wrapper.dpsp-column-6 li:nth-child(6n){margin-right:0}.dpsp-networks-btns-wrapper.dpsp-column-7 li{width:14.285%}.dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-7 li{width:13%}.dpsp-networks-btns-wrapper.dpsp-column-7 li:nth-child(6n){margin-right:0}.dpsp-shape-circle .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn:not(.dpsp-no-label){padding-right:10px}.dpsp-no-labels .dpsp-networks-btns-wrapper .dpsp-network-btn{padding:0!important;text-align:center}.dpsp-facebook{--networkColor:rgba(58,87,154,0.4);--networkHover:rgba(51,77,135,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook .dpsp-network-icon{border-color:#3a579a;background:#3a579a;color:#3a579a}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook .dpsp-network-icon svg{fill:#3a579a}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:hover .dpsp-network-icon{border-color:#334d87;background:#334d87;color:#334d87}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:hover .dpsp-network-icon svg{fill:#334d87}.dpsp-twitter{--networkColor:rgba(0,171,240,0.4);--networkHover:rgba(0,153,215,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter .dpsp-network-icon{border-color:#00abf0;background:#00abf0;color:#00abf0}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter .dpsp-network-icon svg{fill:#00abf0}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:hover .dpsp-network-icon{border-color:#0099d7;background:#0099d7;color:#0099d7}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:hover .dpsp-network-icon svg{fill:#0099d7}.dpsp-pinterest{--networkColor:rgba(201,34,40,0.4);--networkHover:rgba(179,30,36,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest .dpsp-network-icon{border-color:#c92228;background:#c92228;color:#c92228}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest .dpsp-network-icon svg{fill:#c92228}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:hover .dpsp-network-icon{border-color:#b31e24;background:#b31e24;color:#b31e24}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:hover .dpsp-network-icon svg{fill:#b31e24}.dpsp-linkedin{--networkColor:rgba(0,119,181,0.4);--networkHover:rgba(0,102,156,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin .dpsp-network-icon{border-color:#0077b5;background:#0077b5;color:#0077b5}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin .dpsp-network-icon svg{fill:#0077b5}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:hover .dpsp-network-icon{border-color:#00669c;background:#00669c;color:#00669c}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:hover .dpsp-network-icon svg{fill:#00669c}.dpsp-reddit{--networkColor:rgba(255,87,0,0.4);--networkHover:rgba(255,66,0,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit .dpsp-network-icon{border-color:#ff5700;background:#ff5700;color:#ff5700}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit .dpsp-network-icon svg{fill:#ff5700}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit:hover .dpsp-network-icon{border-color:#ff4200;background:#ff4200;color:#ff4200}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit:hover .dpsp-network-icon svg{fill:#ff4200}.dpsp-vkontakte{--networkColor:rgba(77,117,163,0.4);--networkHover:rgba(69,105,146,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte .dpsp-network-icon{border-color:#4d75a3;background:#4d75a3;color:#4d75a3}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte .dpsp-network-icon svg{fill:#4d75a3}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte:hover .dpsp-network-icon{border-color:#456992;background:#456992;color:#456992}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte:hover .dpsp-network-icon svg{fill:#456992}.dpsp-whatsapp{--networkColor:rgba(37,211,102,0.4);--networkHover:rgba(33,201,96,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp .dpsp-network-icon{border-color:#25d366;background:#25d366;color:#25d366}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp .dpsp-network-icon svg{fill:#25d366}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp:hover .dpsp-network-icon{border-color:#21c960;background:#21c960;color:#21c960}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp:hover .dpsp-network-icon svg{fill:#21c960}.dpsp-instagram{--networkColor:rgba(188,42,141,0.4);--networkHover:rgba(169,37,126,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram .dpsp-network-icon{border-color:#bc2a8d;background:#bc2a8d;color:#bc2a8d}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram .dpsp-network-icon svg{fill:#bc2a8d}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram:hover .dpsp-network-icon{border-color:#a9257e;background:#a9257e;color:#a9257e}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram:hover .dpsp-network-icon svg{fill:#a9257e}.dpsp-youtube{--networkColor:rgba(187,0,0,0.4);--networkHover:rgba(162,0,0,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube .dpsp-network-icon{border-color:#b00;background:#b00;color:#b00}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube .dpsp-network-icon svg{fill:#b00}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube:hover .dpsp-network-icon{border-color:#a20000;background:#a20000;color:#a20000}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube:hover .dpsp-network-icon svg{fill:#a20000}.dpsp-vimeo{--networkColor:rgba(68,187,255,0.4);--networkHover:rgba(43,178,255,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo .dpsp-network-icon{border-color:#4bf;background:#4bf;color:#4bf}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo .dpsp-network-icon svg{fill:#4bf}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo:hover .dpsp-network-icon{border-color:#2bb2ff;background:#2bb2ff;color:#2bb2ff}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo:hover .dpsp-network-icon svg{fill:#2bb2ff}.dpsp-soundcloud{--networkColor:rgba(255,85,0,0.4);--networkHover:rgba(230,76,0,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud .dpsp-network-icon{border-color:#f50;background:#f50;color:#f50}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud .dpsp-network-icon svg{fill:#f50}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud:hover .dpsp-network-icon{border-color:#e64c00;background:#e64c00;color:#e64c00}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud:hover .dpsp-network-icon svg{fill:#e64c00}.dpsp-twitch{--networkColor:rgba(100,65,165,0.4);--networkHover:rgba(89,58,147,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch .dpsp-network-icon{border-color:#6441a5;background:#6441a5;color:#6441a5}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch .dpsp-network-icon svg{fill:#6441a5}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch:hover .dpsp-network-icon{border-color:#593a93;background:#593a93;color:#593a93}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch:hover .dpsp-network-icon svg{fill:#593a93}.dpsp-yummly{--networkColor:rgba(229,90,39,0.4);--networkHover:rgba(216,77,26,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly .dpsp-network-icon{border-color:#e55a27;background:#e55a27;color:#e55a27}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly .dpsp-network-icon svg{fill:#e55a27}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly:hover .dpsp-network-icon{border-color:#d84d1a;background:#d84d1a;color:#d84d1a}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly:hover .dpsp-network-icon svg{fill:#d84d1a}.dpsp-behance{--networkColor:rgba(0,92,255,0.4);--networkHover:rgba(0,83,230,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance .dpsp-network-icon{border-color:#005cff;background:#005cff;color:#005cff}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance .dpsp-network-icon svg{fill:#005cff}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance:hover .dpsp-network-icon{border-color:#0053e6;background:#0053e6;color:#0053e6}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance:hover .dpsp-network-icon svg{fill:#0053e6}.dpsp-email{--networkColor:rgba(39,174,96,0.4);--networkHover:rgba(35,158,87,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email .dpsp-network-icon{border-color:#27ae60;background:#27ae60;color:#27ae60}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email .dpsp-network-icon svg{fill:#27ae60}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:hover .dpsp-network-icon{border-color:#239e57;background:#239e57;color:#239e57}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:hover .dpsp-network-icon svg{fill:#239e57}.dpsp-print{--networkColor:rgba(189,195,199,0.4);--networkHover:rgba(175,182,187,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print .dpsp-network-icon{border-color:#bdc3c7;background:#bdc3c7;color:#bdc3c7}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print .dpsp-network-icon svg{fill:#bdc3c7}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:hover .dpsp-network-icon{border-color:#afb6bb;background:#afb6bb;color:#afb6bb}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:hover .dpsp-network-icon svg{fill:#afb6bb}.dpsp-pocket{--networkColor:rgba(237,64,85,0.4);--networkHover:rgba(230,60,81,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket .dpsp-network-icon{border-color:#ed4055;background:#ed4055;color:#ed4055}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket .dpsp-network-icon svg{fill:#ed4055}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket:hover .dpsp-network-icon{border-color:#e63c51;background:#e63c51;color:#e63c51}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket:hover .dpsp-network-icon svg{fill:#e63c51}.dpsp-buffer{--networkColor:rgba(41,50,59,0.4);--networkHover:rgba(33,40,47,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer .dpsp-network-icon{border-color:#29323b;background:#29323b;color:#29323b}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer .dpsp-network-icon svg{fill:#29323b}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer:hover .dpsp-network-icon{border-color:#21282f;background:#21282f;color:#21282f}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer:hover .dpsp-network-icon svg{fill:#21282f}.dpsp-tumblr{--networkColor:rgba(53,70,92,0.4);--networkHover:rgba(46,61,80,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr .dpsp-network-icon{border-color:#35465c;background:#35465c;color:#35465c}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr .dpsp-network-icon svg{fill:#35465c}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr:hover .dpsp-network-icon{border-color:#2e3d50;background:#2e3d50;color:#2e3d50}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr:hover .dpsp-network-icon svg{fill:#2e3d50}.dpsp-xing{--networkColor:rgba(0,136,141,0.4);--networkHover:rgba(0,106,108,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing .dpsp-network-icon{border-color:#00888d;background:#00888d;color:#00888d}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing .dpsp-network-icon svg{fill:#00888d}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing:hover .dpsp-network-icon{border-color:#006a6c;background:#006a6c;color:#006a6c}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing:hover .dpsp-network-icon svg{fill:#006a6c}.dpsp-github{--networkColor:rgba(51,51,51,0.4);--networkHover:rgba(34,34,34,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github .dpsp-network-icon{border-color:#333;background:#333;color:#333}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github .dpsp-network-icon svg{fill:#333}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github:hover .dpsp-network-icon{border-color:#222;background:#222;color:#222}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github:hover .dpsp-network-icon svg{fill:#222}.dpsp-flipboard{--networkColor:rgba(225,40,40,0.4);--networkHover:rgba(210,29,29,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard .dpsp-network-icon{border-color:#e12828;background:#e12828;color:#e12828}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard .dpsp-network-icon svg{fill:#e12828}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard:hover .dpsp-network-icon{border-color:#d21d1d;background:#d21d1d;color:#d21d1d}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard:hover .dpsp-network-icon svg{fill:#d21d1d}.dpsp-telegram{--networkColor:rgba(0,136,204,0.4);--networkHover:rgba(0,119,179,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram .dpsp-network-icon{border-color:#08c;background:#08c;color:#08c}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram .dpsp-network-icon svg{fill:#08c}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram:hover .dpsp-network-icon{border-color:#0077b3;background:#0077b3;color:#0077b3}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram:hover .dpsp-network-icon svg{fill:#0077b3}.dpsp-medium{--networkColor:rgba(51,51,51,0.4);--networkHover:rgba(17,17,17,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium .dpsp-network-icon{border-color:#333;background:#333;color:#333}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium .dpsp-network-icon svg{fill:#333}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium:hover .dpsp-network-icon{border-color:#111;background:#111;color:#111}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium:hover .dpsp-network-icon svg{fill:#111}.dpsp-mix{--networkColor:rgba(253,130,53,0.4);--networkHover:rgba(253,114,28,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix .dpsp-network-icon{border-color:#fd8235;background:#fd8235;color:#fd8235}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix .dpsp-network-icon svg{fill:#fd8235}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix:hover .dpsp-network-icon{border-color:#fd721c;background:#fd721c;color:#fd721c}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix:hover .dpsp-network-icon svg{fill:#fd721c}.dpsp-shape-rounded .dpsp-network-btn,.dpsp-shape-rounded .dpsp-network-btn .dpsp-network-icon{-webkit-border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-bottomleft:4px;border-top-left-radius:4px;border-bottom-left-radius:4px}.dpsp-shape-rounded .dpsp-network-btn,.dpsp-shape-rounded .dpsp-no-label.dpsp-network-btn .dpsp-network-icon{-webkit-border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px;border-top-right-radius:4px;border-bottom-right-radius:4px}.dpsp-shape-circle .dpsp-network-btn{border-radius:30px}.dpsp-shape-circle .dpsp-network-btn .dpsp-network-icon{border-radius:30px;overflow:hidden}.dpsp-has-spacing .dpsp-networks-btns-wrapper li{margin-bottom:10px;margin-right:2%;margin-left:0!important}.dpsp-size-small .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar):not(.dpsp-networks-btns-sticky-bar) .dpsp-network-btn{height:32px;min-width:32px;line-height:28px;max-height:32px}.dpsp-size-small .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar):not(.dpsp-networks-btns-sticky-bar) .dpsp-network-btn.dpsp-no-label .dpsp-network-icon{width:32px}.dpsp-size-small .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar):not(.dpsp-networks-btns-sticky-bar) .dpsp-network-btn .dpsp-network-icon{line-height:28px;width:32px;height:32px}.dpsp-size-small .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar):not(.dpsp-networks-btns-sticky-bar) .dpsp-network-btn .dpsp-network-icon-inner{height:28px}.dpsp-size-large .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn{height:46px;min-width:46px;line-height:42px;max-height:46px}.dpsp-size-large .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn .dpsp-network-icon{line-height:42px;width:46px;height:46px}.dpsp-size-large .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn .dpsp-network-icon-inner{height:42px}.dpsp-size-medium .dpsp-networks-btns-sidebar .dpsp-network-btn{height:45px;min-width:45px;line-height:41px;max-height:45px;padding-left:0}.dpsp-size-medium .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{line-height:41px;width:45px}.dpsp-size-medium .dpsp-networks-btns-sidebar.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count .dpsp-network-icon{height:26px;line-height:26px}.dpsp-size-large .dpsp-networks-btns-sidebar .dpsp-network-btn{height:50px;min-width:50px;line-height:46px;max-height:50px;padding-left:0}.dpsp-size-large .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{line-height:46px;width:50px}.dpsp-size-large .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-has-count .dpsp-network-icon{height:30px;line-height:30px}@media screen and (max-width:720px){.dpsp-hide-on-mobile{display:none!important}}.dpsp-button-style-1 .dpsp-network-btn{color:#fff!important}.dpsp-button-style-1 .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-1 .dpsp-network-btn.dpsp-no-label{justify-content:center}.dpsp-button-style-1 .dpsp-network-btn .dpsp-network-icon svg{fill:#fff!important}.dpsp-button-style-2 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn{color:#fff!important}.dpsp-button-style-2 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn .dpsp-network-icon svg{fill:#fff!important}.dpsp-button-style-2 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn.dpsp-no-label{justify-content:center}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-facebook.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-facebook .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-facebook.dpsp-no-label{background:#334d87;border-color:#334d87}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-twitter.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-twitter .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-twitter.dpsp-no-label{background:#0099d7;border-color:#0099d7}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-pinterest.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-pinterest .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-pinterest.dpsp-no-label{background:#b31e24;border-color:#b31e24}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-linkedin.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-linkedin .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-linkedin.dpsp-no-label{background:#00669c;border-color:#00669c}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-reddit.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-reddit .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-reddit.dpsp-no-label{background:#ff4200;border-color:#ff4200}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-vkontakte.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-vkontakte .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-vkontakte.dpsp-no-label{background:#456992;border-color:#456992}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-whatsapp.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-whatsapp .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-whatsapp.dpsp-no-label{background:#21c960;border-color:#21c960}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-instagram.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-instagram .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-instagram.dpsp-no-label{background:#a9257e;border-color:#a9257e}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-youtube.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-youtube .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-youtube.dpsp-no-label{background:#a20000;border-color:#a20000}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-vimeo.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-vimeo .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-vimeo.dpsp-no-label{background:#2bb2ff;border-color:#2bb2ff}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-soundcloud.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-soundcloud .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-soundcloud.dpsp-no-label{background:#e64c00;border-color:#e64c00}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-twitch.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-twitch .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-twitch.dpsp-no-label{background:#593a93;border-color:#593a93}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-yummly.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-yummly .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-yummly.dpsp-no-label{background:#d84d1a;border-color:#d84d1a}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-behance.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-behance .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-behance.dpsp-no-label{background:#0053e6;border-color:#0053e6}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-email.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-email .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-email.dpsp-no-label{background:#239e57;border-color:#239e57}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-print.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-print .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-print.dpsp-no-label{background:#afb6bb;border-color:#afb6bb}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-pocket.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-pocket .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-pocket.dpsp-no-label{background:#e63c51;border-color:#e63c51}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-buffer.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-buffer .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-buffer.dpsp-no-label{background:#21282f;border-color:#21282f}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-tumblr.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-tumblr .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-tumblr.dpsp-no-label{background:#2e3d50;border-color:#2e3d50}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-xing.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-xing .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-xing.dpsp-no-label{background:#006a6c;border-color:#006a6c}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-github.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-github .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-github.dpsp-no-label{background:#222;border-color:#222}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-flipboard.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-flipboard .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-flipboard.dpsp-no-label{background:#d21d1d;border-color:#d21d1d}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-telegram.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-telegram .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-telegram.dpsp-no-label{background:#0077b3;border-color:#0077b3}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-medium.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-medium .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-medium.dpsp-no-label{background:#111;border-color:#111}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-mix.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-mix .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-mix.dpsp-no-label{background:#fd721c;border-color:#fd721c}.dpsp-button-style-2 .dpsp-networks-btns-sidebar .dpsp-network-btn,.dpsp-button-style-2 .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{background:transparent!important}.dpsp-button-style-3 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-3 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{justify-content:center}.dpsp-button-style-3 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn .dpsp-network-icon svg{fill:#fff!important}.dpsp-button-style-3 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count.dpsp-has-label:not(:hover):not(:focus),.dpsp-button-style-3 .dpsp-networks-btns-wrapper .dpsp-network-btn:not(.dpsp-no-label):not(:hover):not(:focus):not(.dpsp-has-count){background:transparent}.dpsp-button-style-3 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-3 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn:focus,.dpsp-button-style-3 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn:hover{color:#fff}.dpsp-networks-btns-sidebar .dpsp-network-btn,.dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{background:transparent;border-color:transparent}.dpsp-networks-btns-sidebar .dpsp-network-btn:focus,.dpsp-networks-btns-sidebar .dpsp-network-btn:hover{border-color:transparent}.dpsp-networks-btns-sidebar .dpsp-network-btn:focus .dpsp-network-icon,.dpsp-networks-btns-sidebar .dpsp-network-btn:hover .dpsp-network-icon{background:transparent;border-color:transparent}.dpsp-button-style-4.dpsp-shape-rounded .dpsp-network-btn .dpsp-network-icon{border-radius:4px}.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-label{color:#fff}.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{justify-content:center}.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label):not(:hover):not(:focus),.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label:not(:hover):not(:focus){background-color:initial}.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label) .dpsp-network-icon,.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label .dpsp-network-icon{border-color:transparent;background-color:initial}.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon{background:#fff}.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus,.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover{color:#fff}.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus .dpsp-network-icon,.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover .dpsp-network-icon{background:transparent}.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus .dpsp-network-icon svg,.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover .dpsp-network-icon svg{fill:#fff}.dpsp-button-style-5 .dpsp-network-btn .dpsp-network-icon{border-color:transparent!important}.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn,.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon{background:transparent}.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus,.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover{color:#fff!important;border-color:transparent!important}.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus .dpsp-network-icon,.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover .dpsp-network-icon{background:transparent}.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus .dpsp-network-icon svg,.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover .dpsp-network-icon svg{fill:#fff!important}.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{justify-content:center}.dpsp-button-style-6.dpsp-shape-rounded .dpsp-network-btn .dpsp-network-icon{border-radius:4px}.dpsp-button-style-6 .dpsp-networks-btns-wrapper .dpsp-network-btn{background:transparent!important;border-color:transparent!important}.dpsp-button-style-6 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-6 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{max-width:40px}.dpsp-button-style-6 .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon svg{fill:#fff!important}.dpsp-button-style-6 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus,.dpsp-button-style-6 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover{border-color:transparent!important}.dpsp-button-style-6.dpsp-size-small .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-6.dpsp-size-small .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{max-width:32px}.dpsp-button-style-7.dpsp-shape-rounded .dpsp-network-btn .dpsp-network-icon{border-radius:4px}.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn{background:transparent}.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{border-color:transparent}.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon{background:transparent}.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{max-width:40px}.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus,.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover{background:transparent!important}.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus .dpsp-network-icon svg,.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover .dpsp-network-icon svg{fill:#fff!important}.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-size-small .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-size-small .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{max-width:32px}.dpsp-button-style-8 .dpsp-networks-btns-wrapper .dpsp-network-btn{border-color:transparent;background:transparent}.dpsp-button-style-8 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-8 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{max-width:40px}.dpsp-button-style-8 .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon,.dpsp-button-style-8 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus,.dpsp-button-style-8 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus .dpsp-network-icon,.dpsp-button-style-8 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover,.dpsp-button-style-8 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover .dpsp-network-icon{border-color:transparent;background:transparent}.dpsp-button-style-8 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn .dpsp-network-icon{margin-right:-10px}.dpsp-button-style-8.dpsp-size-small .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-8.dpsp-size-small .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{max-width:32px}.dpsp-pin-it-wrapper{position:relative!important;display:inline-table!important;line-height:0}.dpsp-pin-it-wrapper.aligncenter,.dpsp-pin-it-wrapper.alignleft,.dpsp-pin-it-wrapper.alignright{display:table!important}.dpsp-pin-it-wrapper:hover .dpsp-pin-it-button{visibility:visible;background-color:#c92228!important;color:#fff!important}.dpsp-pin-it-wrapper.aligncenter{margin-left:auto;margin-right:auto}.wp-block-gallery.is-cropped .blocks-gallery-item .dpsp-pin-it-wrapper{height:100%;flex:1;object-fit:cover}.dpsp-pin-it-button{display:inline-block;position:absolute;background:transparent;color:transparent!important;text-decoration:none!important;border:0!important;height:40px!important;width:auto!important;font-family:Arial;font-weight:700;font-size:14px;line-height:40px;vertical-align:middle;transition:all .25s ease-in-out;visibility:hidden;box-shadow:none!important;background-image:none!important}.dpsp-pin-it-button:hover{color:#fff;background:#b31e24;box-shadow:none!important}.dpsp-pin-it-button.dpsp-pin-it-button-has-label{padding-right:20px}.dpsp-pin-it-button.dpsp-pin-it-button-has-label:after{display:inline-block;content:attr(title)}.dpsp-pin-it-button .dpsp-network-icon{display:inline-block;width:40px;height:40px;text-align:center;vertical-align:top}.dpsp-pin-it-button .dpsp-network-icon svg{height:20px;display:inline-block;vertical-align:middle;fill:#fff}.dpsp-pin-it-button.dpsp-pin-it-button-top-left{top:10px;left:10px}.dpsp-pin-it-button.dpsp-pin-it-button-top-right{top:10px;right:10px}.dpsp-pin-it-button.dpsp-pin-it-button-bottom-left{bottom:10px;left:10px}.dpsp-pin-it-button.dpsp-pin-it-button-bottom-right{bottom:10px;right:10px}.dpsp-pin-it-button.dpsp-pin-it-button-center{top:50%;left:50%;transform:translate(-50%,-50%);white-space:nowrap}.dpsp-pin-it-button.dpsp-pin-it-button-shape-rectangular{border-radius:0}.dpsp-pin-it-button.dpsp-pin-it-button-shape-rounded{border-radius:4px}.dpsp-pin-it-button.dpsp-pin-it-button-shape-circle{border-radius:40px}.dpsp-pin-it-wrapper .dpsp-pin-it-overlay{display:block;position:absolute;top:0;left:0;width:100%;height:100%;background:#fff;opacity:0;visibility:hidden;transition:all .25s ease-in-out;pointer-events:none}.dpsp-pin-it-wrapper:hover .dpsp-pin-it-overlay{opacity:.4;visibility:visible}.dpsp-networks-btns-wrapper.dpsp-networks-btns-pop-up.dpsp-column-auto{text-align:center}.dpsp-networks-btns-wrapper.dpsp-networks-btns-pop-up.dpsp-column-auto li{display:inline-block;float:none}.dpsp-show-total-share-count{position:relative}.dpsp-total-share-wrapper{position:relative;font-family:Helvetica,Helvetica Neue,Arial,sans-serif;margin-top:10px;line-height:1.345;color:#5d6368}.dpsp-total-share-wrapper .dpsp-total-share-count{font-size:15px;line-height:18px;white-space:nowrap}.dpsp-total-share-wrapper .dpsp-icon-total-share{position:absolute;top:6px;left:0;margin-left:0;margin-top:0}.dpsp-total-share-wrapper .dpsp-icon-total-share svg{max-height:16px;top:2px;width:auto;fill:#5d6368}#dpsp-floating-sidebar .dpsp-total-share-wrapper{margin-bottom:10px}#dpsp-floating-sidebar .dpsp-total-share-wrapper .dpsp-icon-total-share{display:none}.dpsp-total-share-wrapper span{display:block;font-size:9px;font-weight:700;text-transform:uppercase;text-align:center}.dpsp-content-wrapper .dpsp-total-share-wrapper,.dpsp-pop-up-buttons-wrapper .dpsp-total-share-wrapper,.dpsp-share-buttons-wrapper .dpsp-total-share-wrapper,.dpsp-shortcode-wrapper .dpsp-total-share-wrapper{position:absolute;width:60px;height:40px;margin-top:-21px;top:50%;padding-left:20px;box-sizing:border-box}#dpsp-sticky-bar .dpsp-total-share-wrapper{height:32px;margin-top:-16px}#dpsp-sticky-bar-wrapper.dpsp-is-mobile .dpsp-total-share-wrapper{display:none}.dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before,.dpsp-pop-up-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before,.dpsp-share-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before,.dpsp-shortcode-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before{padding-left:70px}.dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after,.dpsp-pop-up-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after,.dpsp-share-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after,.dpsp-shortcode-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after{padding-right:70px}.dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before .dpsp-total-share-wrapper,.dpsp-pop-up-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before .dpsp-total-share-wrapper,.dpsp-share-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before .dpsp-total-share-wrapper,.dpsp-shortcode-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before .dpsp-total-share-wrapper{left:0}.dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after .dpsp-total-share-wrapper,.dpsp-pop-up-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after .dpsp-total-share-wrapper,.dpsp-share-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after .dpsp-total-share-wrapper,.dpsp-shortcode-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after .dpsp-total-share-wrapper{right:0}#dpsp-pop-up{position:fixed;max-width:750px;width:100%;padding:40px;background:#fff;border-radius:10px;z-index:9999;opacity:0;transform:translate(-50%,-50%);-moz-transition:all .25s ease-in-out;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out}#dpsp-pop-up.dpsp-animation-1{transform:translate(-50%,-50%) scale(.1)}#dpsp-pop-up.dpsp-animation-3{transform:translate(-50%)}#dpsp-pop-up.dpsp-animation-4{transform:translate(-50%,-100%)}#dpsp-pop-up-overlay.no-animation,#dpsp-pop-up.no-animation{-moz-transition:none;-webkit-transition:none;-o-transition:none;transition:none}#dpsp-pop-up.opened{top:50%;left:50%;transform:scale(1) translate(-50%,-50%);opacity:1}#dpsp-pop-up-overlay{display:block;position:fixed;top:0;left:0;width:0;height:0;z-index:9998;background:#000;opacity:0;-moz-transition:opacity .25s ease-in-out,margin .25s ease-in-out;-webkit-transition:opacity .25s ease-in-out,margin .25s ease-in-out;-o-transition:opacity .25s ease-in-out,margin .25s ease-in-out;transition:opacity .25s ease-in-out,margin .25s ease-in-out}#dpsp-pop-up-overlay.opened{width:100%;height:100%;opacity:.65}#dpsp-pop-up-content{text-align:center}#dpsp-pop-up-close{position:absolute;top:10px;right:10px;display:block;width:22px;height:22px;line-height:22px;vertical-align:middle;text-align:center;cursor:pointer}#dpsp-pop-up-close svg{position:relative;top:2px;max-height:16px;width:auto;vertical-align:top;fill:#999}#dpsp-pop-up h2{margin-bottom:1em}#dpsp-pop-up h2 p{font-size:inherit}#dpsp-pop-up h2 p:last-of-type{margin-top:0;margin-bottom:0}#dpsp-pop-up p{margin-top:1em;margin-bottom:1em}#dpsp-post-bottom{height:0;width:0;padding:0;margin:0}@media screen and (max-width:800px){#dpsp-pop-up{width:90%}}@media screen and (max-width:720px){#dpsp-pop-up .dpsp-networks-btns-wrapper li{width:100%;margin-left:0;margin-right:0}}.dpsp-top-shared-post{margin-bottom:2em}.dpsp-top-shared-post-thumbnail{display:block;margin-bottom:1.2em}.dpsp-top-shared-post-thumbnail img{max-width:100%;height:auto}.dpsp-top-shared-post-title{display:inline-block;margin-bottom:.5em}.dpsp-shortcode-follow-wrapper>.dpsp-networks-btns-follow-widget{display:flex;flex-flow:row wrap}.dpsp-shortcode-follow-wrapper.dpsp-follow-align-left>.dpsp-networks-btns-follow-widget{justify-content:flex-start}.dpsp-shortcode-follow-wrapper.dpsp-follow-align-center>.dpsp-networks-btns-follow-widget{justify-content:center}.dpsp-shortcode-follow-wrapper.dpsp-follow-align-right>.dpsp-networks-btns-follow-widget{justify-content:flex-end}.dpsp-click-to-tweet{position:relative;display:block;margin:1.5em 0;font-size:105%;text-decoration:none;transition:all .15s ease-in}.dpsp-click-to-tweet,.dpsp-click-to-tweet:hover{box-shadow:none!important}.dpsp-click-to-tweet.dpsp-has-avatar{padding-left:120px!important;min-height:115px}.dpsp-click-to-tweet.dpsp-has-avatar .avatar{position:absolute;top:15px;left:15px;border-radius:50%;box-shadow:none!important}.dpsp-click-to-tweet-footer:after,.dpsp-click-to-tweet:after{content:"";display:block;clear:both}.dpsp-click-to-tweet-content{display:block;position:relative;z-index:2;font-family:Georgia;font-size:18px;line-height:1.5;text-align:left}.dpsp-click-to-tweet-footer{display:block;font-family:Arial;font-weight:700;font-size:14px;color:#999;margin-top:1em}.dpsp-click-to-tweet.dpsp-click-to-tweet-cta-left .dpsp-click-to-tweet-cta{float:left}.dpsp-click-to-tweet.dpsp-click-to-tweet-cta-right .dpsp-click-to-tweet-cta{float:right}.dpsp-click-to-tweet-cta{color:#00abf0;line-height:1}.dpsp-click-to-tweet-cta svg{fill:#00abf0}.dpsp-click-to-tweet-cta .dpsp-twitter{display:inline-block;position:relative;font-size:20px;width:20px;height:20px;vertical-align:middle}.dpsp-click-to-tweet-cta>span{margin-right:10px;vertical-align:middle}.dpsp-click-to-tweet:hover .dpsp-twitter .dpsp-network-icon-inner{transition:all .2s ease-in-out}.dpsp-click-to-tweet.dpsp-click-to-tweet-cta-icon-animation:hover .dpsp-click-to-tweet-cta .dpsp-twitter .dpsp-network-icon-after{margin-left:-10px;opacity:1}.dpsp-click-to-tweet.dpsp-click-to-tweet-cta-icon-animation:hover .dpsp-click-to-tweet-cta .dpsp-twitter .dpsp-network-icon-before{margin-left:10px;opacity:0}a.dpsp-click-to-tweet.dpsp-style-1{border:0;border-left:5px solid #00abf0;color:#555;padding:15px 5px 5px 30px}a.dpsp-click-to-tweet.dpsp-style-1:hover{border-left:5px solid #0099d7}a.dpsp-click-to-tweet.dpsp-style-2{border:0;border-left:5px solid #00abf0;color:#555;background:#f6f6f6;padding:20px 30px}a.dpsp-click-to-tweet.dpsp-style-2:hover{border-left:5px solid #0099d7}a.dpsp-click-to-tweet.dpsp-style-3{border:1px solid #e1e1e1;border-radius:3px;color:#838383;padding:20px 30px}a.dpsp-click-to-tweet.dpsp-style-3:hover{color:#555}a.dpsp-click-to-tweet.dpsp-style-4{border:4px double #e1e1e1;border-radius:0;color:#838383;padding:20px 30px}a.dpsp-click-to-tweet.dpsp-style-4:hover{color:#555}a.dpsp-click-to-tweet.dpsp-style-5{border:0;border-left:0 solid transparent;border-radius:3px;color:#fff;background:#00abf0;padding:20px 30px;transition:border .2s ease-in-out}a.dpsp-click-to-tweet.dpsp-style-5 .dpsp-click-to-tweet-cta{color:#fff}a.dpsp-click-to-tweet.dpsp-style-5 .dpsp-click-to-tweet-cta svg{fill:#fff}a.dpsp-click-to-tweet.dpsp-style-5:hover{color:#fff;border-left:9px solid #0099d7}a.dpsp-click-to-tweet.dpsp-style-5 .dpsp-click-to-tweet-content,a.dpsp-click-to-tweet.dpsp-style-5 .dpsp-click-to-tweet-footer,a.dpsp-click-to-tweet.dpsp-style-5>img{transition:margin-left .2s ease-in-out}a.dpsp-click-to-tweet.dpsp-style-5:hover .dpsp-click-to-tweet-content,a.dpsp-click-to-tweet.dpsp-style-5:hover .dpsp-click-to-tweet-footer,a.dpsp-click-to-tweet.dpsp-style-5:hover>img{margin-left:-9px}
assets/dist/style-frontend-pro.1.18.0.css ADDED
@@ -0,0 +1 @@
 
1
+ .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon{align-self:start;display:block;font-size:14px;line-height:36px;width:40px;height:40px;position:relative;top:-2px;left:-2px;text-align:center;border:2px solid;flex:0 0 auto;-moz-box-sizing:border-box;box-sizing:border-box;-moz-transition:all .15s ease-in;-webkit-transition:all .15s ease-in;-o-transition:all .15s ease-in;transition:all .15s ease-in}.dpsp-icon-total-share svg,.dpsp-network-icon .dpsp-network-icon-inner svg{position:relative;top:.1em;max-height:14px;width:auto;overflow:visible;transition:fill .15s ease-in-out}.dpsp-size-large .dpsp-icon-total-share svg,.dpsp-size-large .dpsp-network-icon .dpsp-network-icon-inner svg{max-height:22px}.widget_dpsp_social_media_follow .dpsp-network-icon .dpsp-network-icon-inner svg{top:.05em}.dpsp-icon-total-share,.dpsp-network-icon-inner{display:flex;align-items:center;justify-content:center}.dpsp-network-icon-inner{transition:all .2s ease;height:36px}.dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon-inner{transition:all .2s cubic-bezier(.62,3.15,.4,-.64);transform:scale(1.5)}#dpsp-floating-sidebar{position:fixed;top:50%;transform:translateY(-50%);z-index:9998}#dpsp-floating-sidebar.dpsp-position-left{left:0}#dpsp-floating-sidebar.dpsp-position-right{right:0}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar li{float:none;margin-left:0}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn{padding:0;width:40px}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{border-color:transparent!important;background:transparent!important}.dpsp-size-medium .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon-inner{height:41px}.dpsp-size-large .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon-inner{height:46px}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-has-count .dpsp-network-icon{height:22px;line-height:22px}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-has-count .dpsp-network-icon-inner{height:18px}#dpsp-floating-sidebar.dpsp-no-animation{display:none}#dpsp-floating-sidebar.dpsp-no-animation.opened{display:block}#dpsp-floating-sidebar.dpsp-animation-1{opacity:0;transition:opacity .2s ease-in-out}#dpsp-floating-sidebar.dpsp-animation-1.opened{opacity:1}#dpsp-floating-sidebar.dpsp-position-left.dpsp-animation-2,#dpsp-floating-sidebar.dpsp-position-left.dpsp-shape-circle.dpsp-animation-2{left:-60px;transition:left .2s ease-in-out}#dpsp-floating-sidebar.dpsp-position-left.dpsp-animation-2.opened{left:0}#dpsp-floating-sidebar.dpsp-position-left.dpsp-shape-circle.dpsp-animation-2.opened{left:12px}#dpsp-floating-sidebar.dpsp-position-right.dpsp-animation-2,#dpsp-floating-sidebar.dpsp-position-right.dpsp-shape-circle.dpsp-animation-2{right:-60px;transition:right .2s ease-in-out}#dpsp-floating-sidebar.dpsp-position-right.dpsp-animation-2.opened{right:0}#dpsp-floating-sidebar.dpsp-position-right.dpsp-shape-circle.dpsp-animation-2.opened{right:10px}.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn,.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{border-radius:0}.dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first,.dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first .dpsp-network-icon{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px}.dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last,.dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last .dpsp-network-icon{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px}.dpsp-position-left.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn,.dpsp-position-left.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px}.dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first,.dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first .dpsp-network-icon{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px}.dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last,.dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last .dpsp-network-icon{-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.dpsp-position-right.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn,.dpsp-position-right.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.dpsp-shape-rounded.dpsp-has-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{border-radius:4px}#dpsp-floating-sidebar.dpsp-position-left.dpsp-shape-circle{left:12px}#dpsp-floating-sidebar.dpsp-position-right.dpsp-shape-circle{right:10px}.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn{margin-bottom:6px}.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px}#dpsp-floating-sidebar.dpsp-style-2 .dpsp-network-btn .dpsp-network-icon{background:none}#dpsp-floating-sidebar .dpsp-networks-btns-wrapper li{position:relative;overflow:visible}#dpsp-floating-sidebar .dpsp-networks-btns-wrapper .dpsp-network-label{position:absolute;z-index:1;display:inline-block;width:auto;white-space:nowrap;top:50%;margin-top:-15px;height:30px;padding:6px 12px;color:#fff;font-size:12px;font-weight:400;line-height:18px;background:#34495e;border-radius:3px;visibility:hidden;opacity:0;transition:all .2s ease-in-out;box-sizing:border-box}#dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper .dpsp-network-label{left:100%}#dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper .dpsp-network-label{right:100%}#dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper li.dpsp-hover .dpsp-network-label{transform:translateX(10px);visibility:visible;opacity:1}#dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper li.dpsp-hover .dpsp-network-label{transform:translateX(-10px);visibility:visible;opacity:1}#dpsp-floating-sidebar .dpsp-networks-btns-wrapper .dpsp-network-label:before{content:"";display:block;position:absolute;top:50%;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent}#dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper .dpsp-network-label:before{left:-5px;border-right:5px solid #34495e}#dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper .dpsp-network-label:before{right:-5px;border-left:5px solid #34495e}.dpsp-settings-button-style .dpsp-networks-btns-sidebar .dpsp-network-label{display:none}#dpsp-content-top{margin-bottom:1.2em}#dpsp-content-bottom{margin-top:1.2em}.dpsp-share-text{font-weight:700;margin-bottom:10px}.dpsp-shortcode-wrapper{margin-bottom:1.2em}#dpsp-sticky-bar-wrapper{position:fixed;z-index:1000;bottom:0;left:0;width:100%;background:#fff}#dpsp-sticky-bar-wrapper.dpsp-position-desktop-top{bottom:auto;top:0}#dpsp-sticky-bar-wrapper.dpsp-position-desktop-bottom{bottom:0;top:auto}#dpsp-sticky-bar-wrapper.dpsp-no-animation{visibility:hidden;opacity:0}#dpsp-sticky-bar-wrapper.dpsp-no-animation.opened{visibility:visible;opacity:1}#dpsp-sticky-bar{display:none;position:relative;margin:7px 0;box-sizing:border-box}#dpsp-sticky-bar .dpsp-networks-btns-wrapper{display:flex}#dpsp-sticky-bar .dpsp-networks-btns-wrapper li{float:none;flex:1;margin-bottom:0;margin-left:3px;margin-right:3px}#dpsp-sticky-bar .dpsp-networks-btns-wrapper li:last-of-type{margin-right:0}#dpsp-sticky-bar .dpsp-network-btn{padding-left:1em;padding-right:1em;text-align:center}#dpsp-sticky-bar .dpsp-network-btn .dpsp-network-icon{display:inline-block;position:relative;width:20px;overflow:visible}#dpsp-sticky-bar .dpsp-network-btn.dpsp-has-count .dpsp-network-icon{margin-right:5px}#dpsp-sticky-bar-wrapper.dpsp-is-mobile.dpsp-position-mobile-top{bottom:auto;top:0}#dpsp-sticky-bar-wrapper.dpsp-is-mobile.dpsp-position-mobile-bottom{bottom:0;top:auto}#dpsp-sticky-bar-wrapper.dpsp-is-mobile #dpsp-sticky-bar{position:static;margin:0;width:100%!important;padding:0}#dpsp-sticky-bar-wrapper.dpsp-is-mobile #dpsp-sticky-bar .dpsp-networks-btns-wrapper li{margin:0}#dpsp-sticky-bar-wrapper.dpsp-is-mobile #dpsp-sticky-bar .dpsp-network-btn{padding-left:0;padding-right:0;text-align:center;height:44px;max-height:44px;line-height:40px;border-radius:0}#dpsp-sticky-bar-wrapper.dpsp-is-mobile #dpsp-sticky-bar .dpsp-network-btn .dpsp-network-icon{position:relative;left:auto;display:inline-block;float:none;font-size:18px;line-height:40px}#dpsp-sticky-bar-wrapper.dpsp-is-mobile #dpsp-sticky-bar .dpsp-network-btn.dpsp-has-count .dpsp-network-icon{position:absolute;display:block;width:100%;height:26px;line-height:26px}#dpsp-sticky-bar-wrapper.dpsp-is-mobile #dpsp-sticky-bar .dpsp-network-btn .dpsp-network-count{position:absolute;bottom:0;left:0;width:100%;margin-left:0;font-size:11px;text-align:center;height:20px;line-height:20px}#dpsp-sticky-bar-wrapper.dpsp-animation-1{visibility:hidden;opacity:0;transition:opacity .2s ease-in-out}#dpsp-sticky-bar-wrapper.dpsp-animation-1.opened{visibility:visible;opacity:1}#dpsp-sticky-bar-wrapper.dpsp-is-mobile.dpsp-position-mobile-bottom.dpsp-animation-2,#dpsp-sticky-bar-wrapper:not(.dpsp-is-mobile).dpsp-position-desktop-bottom.dpsp-animation-2{visibility:hidden;bottom:-88px;transition:bottom .3s ease-in-out,visibility .3s ease-in-out}#dpsp-sticky-bar-wrapper.dpsp-is-mobile.dpsp-position-mobile-bottom.dpsp-animation-2.opened,#dpsp-sticky-bar-wrapper:not(.dpsp-is-mobile).dpsp-position-desktop-bottom.dpsp-animation-2.opened{visibility:visible;bottom:0}#dpsp-sticky-bar-wrapper.dpsp-is-mobile.dpsp-position-mobile-top.dpsp-animation-2,#dpsp-sticky-bar-wrapper:not(.dpsp-is-mobile).dpsp-position-desktop-top.dpsp-animation-2{visibility:hidden;top:-88px;bottom:auto;transition:top .3s ease-in-out,visibility .3s ease-in-out}#dpsp-sticky-bar-wrapper.dpsp-is-mobile.dpsp-position-mobile-top.dpsp-animation-2.opened,#dpsp-sticky-bar-wrapper:not(.dpsp-is-mobile).dpsp-position-desktop-top.dpsp-animation-2.opened{visibility:visible;top:0}@media screen and (min-width:782px){body.admin-bar #dpsp-sticky-bar-wrapper{margin-top:32px}}.dpsp-networks-btns-wrapper{list-style:none!important;padding:0!important;margin:0!important}.dpsp-networks-btns-wrapper:after{content:"";display:block;height:0;clear:both}.dpsp-networks-btns-wrapper li{float:left;-moz-transition:all .15s ease-in;-webkit-transition:all .15s ease-in;-o-transition:all .15s ease-in;transition:all .15s ease-in;margin:0;padding:0;border:0;list-style-type:none!important}.dpsp-networks-btns-wrapper li:before{display:none!important}.dpsp-networks-btns-wrapper li:first-child{margin-left:0!important}.dpsp-networks-btns-wrapper .dpsp-network-btn{position:relative;text-align:center;display:inline-flex;text-decoration:none!important;text-transform:unset!important;height:40px;min-width:40px;font-family:Arial,sans-serif;font-weight:700;font-size:14px;line-height:36px;vertical-align:middle;padding:0;border:2px solid;max-height:40px;width:100%;-moz-box-sizing:border-box;box-sizing:border-box;-moz-transition:all .15s ease-in;-webkit-transition:all .15s ease-in;-o-transition:all .15s ease-in;transition:all .15s ease-in;box-shadow:none;cursor:pointer;border-radius:0}.dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-label{padding-left:.5em;padding-right:.5em}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count .dpsp-network-label{padding-right:.25em}.dpsp-networks-btns-wrapper .dpsp-network-btn:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn:hover{border:2px solid;box-shadow:0 0 0 3px rgba(21,156,228,.4);box-shadow:0 0 0 3px var(--networkHover);outline:none}.dpsp-networks-btns-wrapper .dpsp-network-btn:after{content:"";display:block;height:0;clear:both}.dpsp-networks-btns-wrapper.dpsp-column-auto .dpsp-network-btn.dpsp-no-label{padding-left:0!important}.dpsp-size-small .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn.dpsp-no-label .dpsp-network-icon{width:28px}.dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-count{font-size:13px;font-weight:400;padding-left:.25em;padding-right:.5em;white-space:nowrap}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-count{position:absolute;bottom:0;left:0;width:100%;margin-left:0;font-size:11px;text-align:center;height:20px;line-height:20px}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label .dpsp-network-label-wrapper{display:none}.dpsp-button-style-6 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar):not(.dpsp-column-auto):not(.dpsp-column-6) .dpsp-network-btn.dpsp-has-count-only .dpsp-network-label-wrapper,.dpsp-button-style-7 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar):not(.dpsp-column-auto):not(.dpsp-column-6) .dpsp-network-btn.dpsp-has-count-only .dpsp-network-label-wrapper{display:inline-block;text-indent:2em}.dpsp-networks-btns-wrapper.dpsp-column-1 li{width:100%;margin-left:0}.dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-1 li{margin-right:0}.dpsp-networks-btns-wrapper.dpsp-column-2 li{width:50%}.dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-2 li{width:49%}.dpsp-networks-btns-wrapper.dpsp-column-2 li:nth-child(2n){margin-right:0}.dpsp-networks-btns-wrapper.dpsp-column-3 li{width:33.3333%}.dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-3 li{width:32%}.dpsp-networks-btns-wrapper.dpsp-column-3 li:nth-child(3n){margin-right:0}.dpsp-networks-btns-wrapper.dpsp-column-4 li{width:25%}.dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-4 li{width:23.5%}.dpsp-networks-btns-wrapper.dpsp-column-4 li:nth-child(4n){margin-right:0}.dpsp-networks-btns-wrapper.dpsp-column-5 li{width:20%}.dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-5 li{width:18.4%}.dpsp-networks-btns-wrapper.dpsp-column-5 li:nth-child(5n){margin-right:0}.dpsp-networks-btns-wrapper.dpsp-column-6 li{width:16.6666%}.dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-6 li{width:15%}.dpsp-networks-btns-wrapper.dpsp-column-6 li:nth-child(6n){margin-right:0}.dpsp-networks-btns-wrapper.dpsp-column-7 li{width:14.285%}.dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-7 li{width:13%}.dpsp-networks-btns-wrapper.dpsp-column-7 li:nth-child(6n){margin-right:0}.dpsp-shape-circle .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn:not(.dpsp-no-label){padding-right:10px}.dpsp-no-labels .dpsp-networks-btns-wrapper .dpsp-network-btn{padding:0!important;text-align:center}.dpsp-facebook{--networkColor:rgba(58,87,154,0.4);--networkHover:rgba(51,77,135,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook .dpsp-network-icon{border-color:#3a579a;background:#3a579a;color:#3a579a}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook .dpsp-network-icon svg{fill:#3a579a}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:hover .dpsp-network-icon{border-color:#334d87;background:#334d87;color:#334d87}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:hover .dpsp-network-icon svg{fill:#334d87}.dpsp-twitter{--networkColor:rgba(0,171,240,0.4);--networkHover:rgba(0,153,215,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter .dpsp-network-icon{border-color:#00abf0;background:#00abf0;color:#00abf0}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter .dpsp-network-icon svg{fill:#00abf0}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:hover .dpsp-network-icon{border-color:#0099d7;background:#0099d7;color:#0099d7}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:hover .dpsp-network-icon svg{fill:#0099d7}.dpsp-pinterest{--networkColor:rgba(201,34,40,0.4);--networkHover:rgba(179,30,36,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest .dpsp-network-icon{border-color:#c92228;background:#c92228;color:#c92228}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest .dpsp-network-icon svg{fill:#c92228}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:hover .dpsp-network-icon{border-color:#b31e24;background:#b31e24;color:#b31e24}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:hover .dpsp-network-icon svg{fill:#b31e24}.dpsp-linkedin{--networkColor:rgba(0,119,181,0.4);--networkHover:rgba(0,102,156,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin .dpsp-network-icon{border-color:#0077b5;background:#0077b5;color:#0077b5}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin .dpsp-network-icon svg{fill:#0077b5}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:hover .dpsp-network-icon{border-color:#00669c;background:#00669c;color:#00669c}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:hover .dpsp-network-icon svg{fill:#00669c}.dpsp-reddit{--networkColor:rgba(255,87,0,0.4);--networkHover:rgba(255,66,0,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit .dpsp-network-icon{border-color:#ff5700;background:#ff5700;color:#ff5700}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit .dpsp-network-icon svg{fill:#ff5700}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit:hover .dpsp-network-icon{border-color:#ff4200;background:#ff4200;color:#ff4200}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-reddit:hover .dpsp-network-icon svg{fill:#ff4200}.dpsp-vkontakte{--networkColor:rgba(77,117,163,0.4);--networkHover:rgba(69,105,146,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte .dpsp-network-icon{border-color:#4d75a3;background:#4d75a3;color:#4d75a3}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte .dpsp-network-icon svg{fill:#4d75a3}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte:hover .dpsp-network-icon{border-color:#456992;background:#456992;color:#456992}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vkontakte:hover .dpsp-network-icon svg{fill:#456992}.dpsp-whatsapp{--networkColor:rgba(37,211,102,0.4);--networkHover:rgba(33,201,96,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp .dpsp-network-icon{border-color:#25d366;background:#25d366;color:#25d366}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp .dpsp-network-icon svg{fill:#25d366}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp:hover .dpsp-network-icon{border-color:#21c960;background:#21c960;color:#21c960}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-whatsapp:hover .dpsp-network-icon svg{fill:#21c960}.dpsp-instagram{--networkColor:rgba(188,42,141,0.4);--networkHover:rgba(169,37,126,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram .dpsp-network-icon{border-color:#bc2a8d;background:#bc2a8d;color:#bc2a8d}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram .dpsp-network-icon svg{fill:#bc2a8d}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram:hover .dpsp-network-icon{border-color:#a9257e;background:#a9257e;color:#a9257e}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-instagram:hover .dpsp-network-icon svg{fill:#a9257e}.dpsp-youtube{--networkColor:rgba(187,0,0,0.4);--networkHover:rgba(162,0,0,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube .dpsp-network-icon{border-color:#b00;background:#b00;color:#b00}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube .dpsp-network-icon svg{fill:#b00}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube:hover .dpsp-network-icon{border-color:#a20000;background:#a20000;color:#a20000}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-youtube:hover .dpsp-network-icon svg{fill:#a20000}.dpsp-vimeo{--networkColor:rgba(68,187,255,0.4);--networkHover:rgba(43,178,255,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo .dpsp-network-icon{border-color:#4bf;background:#4bf;color:#4bf}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo .dpsp-network-icon svg{fill:#4bf}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo:hover .dpsp-network-icon{border-color:#2bb2ff;background:#2bb2ff;color:#2bb2ff}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-vimeo:hover .dpsp-network-icon svg{fill:#2bb2ff}.dpsp-soundcloud{--networkColor:rgba(255,85,0,0.4);--networkHover:rgba(230,76,0,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud .dpsp-network-icon{border-color:#f50;background:#f50;color:#f50}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud .dpsp-network-icon svg{fill:#f50}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud:hover .dpsp-network-icon{border-color:#e64c00;background:#e64c00;color:#e64c00}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-soundcloud:hover .dpsp-network-icon svg{fill:#e64c00}.dpsp-twitch{--networkColor:rgba(100,65,165,0.4);--networkHover:rgba(89,58,147,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch .dpsp-network-icon{border-color:#6441a5;background:#6441a5;color:#6441a5}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch .dpsp-network-icon svg{fill:#6441a5}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch:hover .dpsp-network-icon{border-color:#593a93;background:#593a93;color:#593a93}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitch:hover .dpsp-network-icon svg{fill:#593a93}.dpsp-yummly{--networkColor:rgba(229,90,39,0.4);--networkHover:rgba(216,77,26,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly .dpsp-network-icon{border-color:#e55a27;background:#e55a27;color:#e55a27}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly .dpsp-network-icon svg{fill:#e55a27}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly:hover .dpsp-network-icon{border-color:#d84d1a;background:#d84d1a;color:#d84d1a}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-yummly:hover .dpsp-network-icon svg{fill:#d84d1a}.dpsp-behance{--networkColor:rgba(0,92,255,0.4);--networkHover:rgba(0,83,230,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance .dpsp-network-icon{border-color:#005cff;background:#005cff;color:#005cff}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance .dpsp-network-icon svg{fill:#005cff}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance:hover .dpsp-network-icon{border-color:#0053e6;background:#0053e6;color:#0053e6}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-behance:hover .dpsp-network-icon svg{fill:#0053e6}.dpsp-email{--networkColor:rgba(39,174,96,0.4);--networkHover:rgba(35,158,87,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email .dpsp-network-icon{border-color:#27ae60;background:#27ae60;color:#27ae60}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email .dpsp-network-icon svg{fill:#27ae60}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:hover .dpsp-network-icon{border-color:#239e57;background:#239e57;color:#239e57}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:hover .dpsp-network-icon svg{fill:#239e57}.dpsp-print{--networkColor:rgba(189,195,199,0.4);--networkHover:rgba(175,182,187,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print .dpsp-network-icon{border-color:#bdc3c7;background:#bdc3c7;color:#bdc3c7}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print .dpsp-network-icon svg{fill:#bdc3c7}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:hover .dpsp-network-icon{border-color:#afb6bb;background:#afb6bb;color:#afb6bb}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:hover .dpsp-network-icon svg{fill:#afb6bb}.dpsp-pocket{--networkColor:rgba(237,64,85,0.4);--networkHover:rgba(230,60,81,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket .dpsp-network-icon{border-color:#ed4055;background:#ed4055;color:#ed4055}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket .dpsp-network-icon svg{fill:#ed4055}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket:hover .dpsp-network-icon{border-color:#e63c51;background:#e63c51;color:#e63c51}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pocket:hover .dpsp-network-icon svg{fill:#e63c51}.dpsp-buffer{--networkColor:rgba(41,50,59,0.4);--networkHover:rgba(33,40,47,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer .dpsp-network-icon{border-color:#29323b;background:#29323b;color:#29323b}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer .dpsp-network-icon svg{fill:#29323b}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer:hover .dpsp-network-icon{border-color:#21282f;background:#21282f;color:#21282f}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-buffer:hover .dpsp-network-icon svg{fill:#21282f}.dpsp-tumblr{--networkColor:rgba(53,70,92,0.4);--networkHover:rgba(46,61,80,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr .dpsp-network-icon{border-color:#35465c;background:#35465c;color:#35465c}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr .dpsp-network-icon svg{fill:#35465c}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr:hover .dpsp-network-icon{border-color:#2e3d50;background:#2e3d50;color:#2e3d50}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-tumblr:hover .dpsp-network-icon svg{fill:#2e3d50}.dpsp-xing{--networkColor:rgba(0,136,141,0.4);--networkHover:rgba(0,106,108,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing .dpsp-network-icon{border-color:#00888d;background:#00888d;color:#00888d}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing .dpsp-network-icon svg{fill:#00888d}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing:hover .dpsp-network-icon{border-color:#006a6c;background:#006a6c;color:#006a6c}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-xing:hover .dpsp-network-icon svg{fill:#006a6c}.dpsp-github{--networkColor:rgba(51,51,51,0.4);--networkHover:rgba(34,34,34,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github .dpsp-network-icon{border-color:#333;background:#333;color:#333}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github .dpsp-network-icon svg{fill:#333}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github:hover .dpsp-network-icon{border-color:#222;background:#222;color:#222}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-github:hover .dpsp-network-icon svg{fill:#222}.dpsp-flipboard{--networkColor:rgba(225,40,40,0.4);--networkHover:rgba(210,29,29,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard .dpsp-network-icon{border-color:#e12828;background:#e12828;color:#e12828}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard .dpsp-network-icon svg{fill:#e12828}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard:hover .dpsp-network-icon{border-color:#d21d1d;background:#d21d1d;color:#d21d1d}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-flipboard:hover .dpsp-network-icon svg{fill:#d21d1d}.dpsp-telegram{--networkColor:rgba(0,136,204,0.4);--networkHover:rgba(0,119,179,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram .dpsp-network-icon{border-color:#08c;background:#08c;color:#08c}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram .dpsp-network-icon svg{fill:#08c}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram:hover .dpsp-network-icon{border-color:#0077b3;background:#0077b3;color:#0077b3}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-telegram:hover .dpsp-network-icon svg{fill:#0077b3}.dpsp-medium{--networkColor:rgba(51,51,51,0.4);--networkHover:rgba(17,17,17,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium .dpsp-network-icon{border-color:#333;background:#333;color:#333}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium .dpsp-network-icon svg{fill:#333}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium:hover .dpsp-network-icon{border-color:#111;background:#111;color:#111}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-medium:hover .dpsp-network-icon svg{fill:#111}.dpsp-mix{--networkColor:rgba(253,130,53,0.4);--networkHover:rgba(253,114,28,0.4)}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix .dpsp-network-icon{border-color:#fd8235;background:#fd8235;color:#fd8235}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix .dpsp-network-icon svg{fill:#fd8235}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix:focus .dpsp-network-icon,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix:hover .dpsp-network-icon{border-color:#fd721c;background:#fd721c;color:#fd721c}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix:focus .dpsp-network-icon svg,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-mix:hover .dpsp-network-icon svg{fill:#fd721c}.dpsp-shape-rounded .dpsp-network-btn,.dpsp-shape-rounded .dpsp-network-btn .dpsp-network-icon{-webkit-border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-bottomleft:4px;border-top-left-radius:4px;border-bottom-left-radius:4px}.dpsp-shape-rounded .dpsp-network-btn,.dpsp-shape-rounded .dpsp-no-label.dpsp-network-btn .dpsp-network-icon{-webkit-border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px;border-top-right-radius:4px;border-bottom-right-radius:4px}.dpsp-shape-circle .dpsp-network-btn{border-radius:30px}.dpsp-shape-circle .dpsp-network-btn .dpsp-network-icon{border-radius:30px;overflow:hidden}.dpsp-has-spacing .dpsp-networks-btns-wrapper li{margin-bottom:10px;margin-right:2%;margin-left:0!important}.dpsp-size-small .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar):not(.dpsp-networks-btns-sticky-bar) .dpsp-network-btn{height:32px;min-width:32px;line-height:28px;max-height:32px}.dpsp-size-small .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar):not(.dpsp-networks-btns-sticky-bar) .dpsp-network-btn.dpsp-no-label .dpsp-network-icon{width:32px}.dpsp-size-small .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar):not(.dpsp-networks-btns-sticky-bar) .dpsp-network-btn .dpsp-network-icon{line-height:28px;width:32px;height:32px}.dpsp-size-small .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar):not(.dpsp-networks-btns-sticky-bar) .dpsp-network-btn .dpsp-network-icon-inner{height:28px}.dpsp-size-large .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn{height:46px;min-width:46px;line-height:42px;max-height:46px}.dpsp-size-large .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn .dpsp-network-icon{line-height:42px;width:46px;height:46px}.dpsp-size-large .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn .dpsp-network-icon-inner{height:42px}.dpsp-size-medium .dpsp-networks-btns-sidebar .dpsp-network-btn{height:45px;min-width:45px;line-height:41px;max-height:45px;padding-left:0}.dpsp-size-medium .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{line-height:41px;width:45px}.dpsp-size-medium .dpsp-networks-btns-sidebar.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count .dpsp-network-icon{height:26px;line-height:26px}.dpsp-size-large .dpsp-networks-btns-sidebar .dpsp-network-btn{height:50px;min-width:50px;line-height:46px;max-height:50px;padding-left:0}.dpsp-size-large .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{line-height:46px;width:50px}.dpsp-size-large .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-has-count .dpsp-network-icon{height:30px;line-height:30px}@media screen and (max-width:720px){.dpsp-hide-on-mobile{display:none!important}}.dpsp-button-style-1 .dpsp-network-btn{color:#fff!important}.dpsp-button-style-1 .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-1 .dpsp-network-btn.dpsp-no-label{justify-content:center}.dpsp-button-style-1 .dpsp-network-btn .dpsp-network-icon svg{fill:#fff!important}.dpsp-button-style-2 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn{color:#fff!important}.dpsp-button-style-2 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn .dpsp-network-icon svg{fill:#fff!important}.dpsp-button-style-2 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn.dpsp-no-label{justify-content:center}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-facebook.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-facebook .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-facebook.dpsp-no-label{background:#334d87;border-color:#334d87}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-twitter.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-twitter .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-twitter.dpsp-no-label{background:#0099d7;border-color:#0099d7}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-pinterest.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-pinterest .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-pinterest.dpsp-no-label{background:#b31e24;border-color:#b31e24}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-linkedin.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-linkedin .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-linkedin.dpsp-no-label{background:#00669c;border-color:#00669c}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-reddit.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-reddit .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-reddit.dpsp-no-label{background:#ff4200;border-color:#ff4200}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-vkontakte.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-vkontakte .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-vkontakte.dpsp-no-label{background:#456992;border-color:#456992}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-whatsapp.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-whatsapp .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-whatsapp.dpsp-no-label{background:#21c960;border-color:#21c960}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-instagram.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-instagram .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-instagram.dpsp-no-label{background:#a9257e;border-color:#a9257e}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-youtube.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-youtube .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-youtube.dpsp-no-label{background:#a20000;border-color:#a20000}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-vimeo.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-vimeo .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-vimeo.dpsp-no-label{background:#2bb2ff;border-color:#2bb2ff}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-soundcloud.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-soundcloud .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-soundcloud.dpsp-no-label{background:#e64c00;border-color:#e64c00}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-twitch.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-twitch .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-twitch.dpsp-no-label{background:#593a93;border-color:#593a93}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-yummly.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-yummly .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-yummly.dpsp-no-label{background:#d84d1a;border-color:#d84d1a}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-behance.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-behance .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-behance.dpsp-no-label{background:#0053e6;border-color:#0053e6}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-email.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-email .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-email.dpsp-no-label{background:#239e57;border-color:#239e57}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-print.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-print .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-print.dpsp-no-label{background:#afb6bb;border-color:#afb6bb}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-pocket.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-pocket .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-pocket.dpsp-no-label{background:#e63c51;border-color:#e63c51}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-buffer.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-buffer .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-buffer.dpsp-no-label{background:#21282f;border-color:#21282f}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-tumblr.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-tumblr .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-tumblr.dpsp-no-label{background:#2e3d50;border-color:#2e3d50}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-xing.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-xing .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-xing.dpsp-no-label{background:#006a6c;border-color:#006a6c}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-github.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-github .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-github.dpsp-no-label{background:#222;border-color:#222}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-flipboard.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-flipboard .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-flipboard.dpsp-no-label{background:#d21d1d;border-color:#d21d1d}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-telegram.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-telegram .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-telegram.dpsp-no-label{background:#0077b3;border-color:#0077b3}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-medium.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-medium .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-medium.dpsp-no-label{background:#111;border-color:#111}.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-mix.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-mix .dpsp-network-icon,.dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-mix.dpsp-no-label{background:#fd721c;border-color:#fd721c}.dpsp-button-style-2 .dpsp-networks-btns-sidebar .dpsp-network-btn,.dpsp-button-style-2 .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{background:transparent!important}.dpsp-button-style-3 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-3 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{justify-content:center}.dpsp-button-style-3 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn .dpsp-network-icon svg{fill:#fff!important}.dpsp-button-style-3 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count.dpsp-has-label:not(:hover):not(:focus),.dpsp-button-style-3 .dpsp-networks-btns-wrapper .dpsp-network-btn:not(.dpsp-no-label):not(:hover):not(:focus):not(.dpsp-has-count){background:transparent}.dpsp-button-style-3 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-3 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn:focus,.dpsp-button-style-3 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn:hover{color:#fff}.dpsp-networks-btns-sidebar .dpsp-network-btn,.dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{background:transparent;border-color:transparent}.dpsp-networks-btns-sidebar .dpsp-network-btn:focus,.dpsp-networks-btns-sidebar .dpsp-network-btn:hover{border-color:transparent}.dpsp-networks-btns-sidebar .dpsp-network-btn:focus .dpsp-network-icon,.dpsp-networks-btns-sidebar .dpsp-network-btn:hover .dpsp-network-icon{background:transparent;border-color:transparent}.dpsp-button-style-4.dpsp-shape-rounded .dpsp-network-btn .dpsp-network-icon{border-radius:4px}.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-label{color:#fff}.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{justify-content:center}.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label):not(:hover):not(:focus),.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label:not(:hover):not(:focus){background-color:initial}.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label) .dpsp-network-icon,.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label .dpsp-network-icon{border-color:transparent;background-color:initial}.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon{background:#fff}.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus,.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover{color:#fff}.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus .dpsp-network-icon,.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover .dpsp-network-icon{background:transparent}.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus .dpsp-network-icon svg,.dpsp-button-style-4 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover .dpsp-network-icon svg{fill:#fff}.dpsp-button-style-5 .dpsp-network-btn .dpsp-network-icon{border-color:transparent!important}.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn,.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon{background:transparent}.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus,.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover{color:#fff!important;border-color:transparent!important}.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus .dpsp-network-icon,.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover .dpsp-network-icon{background:transparent}.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus .dpsp-network-icon svg,.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover .dpsp-network-icon svg{fill:#fff!important}.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-5 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{justify-content:center}.dpsp-button-style-6.dpsp-shape-rounded .dpsp-network-btn .dpsp-network-icon{border-radius:4px}.dpsp-button-style-6 .dpsp-networks-btns-wrapper .dpsp-network-btn{background:transparent!important;border-color:transparent!important}.dpsp-button-style-6 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-6 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{max-width:40px}.dpsp-button-style-6 .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon svg{fill:#fff!important}.dpsp-button-style-6 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus,.dpsp-button-style-6 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover{border-color:transparent!important}.dpsp-button-style-6.dpsp-size-small .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-6.dpsp-size-small .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{max-width:32px}.dpsp-button-style-7.dpsp-shape-rounded .dpsp-network-btn .dpsp-network-icon{border-radius:4px}.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn{background:transparent}.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{border-color:transparent}.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon{background:transparent}.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{max-width:40px}.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus,.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover{background:transparent!important}.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus .dpsp-network-icon svg,.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover .dpsp-network-icon svg{fill:#fff!important}.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-size-small .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-7 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-size-small .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{max-width:32px}.dpsp-button-style-8 .dpsp-networks-btns-wrapper .dpsp-network-btn{border-color:transparent;background:transparent}.dpsp-button-style-8 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-8 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{max-width:40px}.dpsp-button-style-8 .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon,.dpsp-button-style-8 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus,.dpsp-button-style-8 .dpsp-networks-btns-wrapper .dpsp-network-btn:focus .dpsp-network-icon,.dpsp-button-style-8 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover,.dpsp-button-style-8 .dpsp-networks-btns-wrapper .dpsp-network-btn:hover .dpsp-network-icon{border-color:transparent;background:transparent}.dpsp-button-style-8 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn .dpsp-network-icon{margin-right:-10px}.dpsp-button-style-8.dpsp-size-small .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label),.dpsp-button-style-8.dpsp-size-small .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{max-width:32px}.dpsp-pin-it-wrapper{position:relative!important;display:inline-table!important;line-height:0}.dpsp-pin-it-wrapper.aligncenter,.dpsp-pin-it-wrapper.alignleft,.dpsp-pin-it-wrapper.alignright{display:table!important}.dpsp-pin-it-wrapper:hover .dpsp-pin-it-button{visibility:visible;background-color:#c92228!important;color:#fff!important}.dpsp-pin-it-wrapper.aligncenter{margin-left:auto;margin-right:auto}.wp-block-gallery.is-cropped .blocks-gallery-item .dpsp-pin-it-wrapper{height:100%;flex:1;object-fit:cover}.dpsp-pin-it-button{display:inline-block;position:absolute;background:transparent;color:transparent!important;text-decoration:none!important;border:0!important;height:40px!important;width:auto!important;font-family:Arial;font-weight:700;font-size:14px;line-height:40px;vertical-align:middle;transition:all .25s ease-in-out;visibility:hidden;box-shadow:none!important;background-image:none!important}.dpsp-pin-it-button:hover{color:#fff;background:#b31e24;box-shadow:none!important}.dpsp-pin-it-button.dpsp-pin-it-button-has-label{padding-right:20px}.dpsp-pin-it-button.dpsp-pin-it-button-has-label:after{display:inline-block;content:attr(title)}.dpsp-pin-it-button .dpsp-network-icon{display:inline-block;width:40px;height:40px;text-align:center;vertical-align:top}.dpsp-pin-it-button .dpsp-network-icon svg{height:20px;display:inline-block;vertical-align:middle;fill:#fff}.dpsp-pin-it-button.dpsp-pin-it-button-top-left{top:10px;left:10px}.dpsp-pin-it-button.dpsp-pin-it-button-top-right{top:10px;right:10px}.dpsp-pin-it-button.dpsp-pin-it-button-bottom-left{bottom:10px;left:10px}.dpsp-pin-it-button.dpsp-pin-it-button-bottom-right{bottom:10px;right:10px}.dpsp-pin-it-button.dpsp-pin-it-button-center{top:50%;left:50%;transform:translate(-50%,-50%);white-space:nowrap}.dpsp-pin-it-button.dpsp-pin-it-button-shape-rectangular{border-radius:0}.dpsp-pin-it-button.dpsp-pin-it-button-shape-rounded{border-radius:4px}.dpsp-pin-it-button.dpsp-pin-it-button-shape-circle{border-radius:40px}.dpsp-pin-it-wrapper .dpsp-pin-it-overlay{display:block;position:absolute;top:0;left:0;width:100%;height:100%;background:#fff;opacity:0;visibility:hidden;transition:all .25s ease-in-out;pointer-events:none}.dpsp-pin-it-wrapper:hover .dpsp-pin-it-overlay{opacity:.4;visibility:visible}.dpsp-networks-btns-wrapper.dpsp-networks-btns-pop-up.dpsp-column-auto{text-align:center}.dpsp-networks-btns-wrapper.dpsp-networks-btns-pop-up.dpsp-column-auto li{display:inline-block;float:none}.dpsp-show-total-share-count{position:relative}.dpsp-total-share-wrapper{position:relative;font-family:Helvetica,Helvetica Neue,Arial,sans-serif;margin-top:10px;line-height:1.345;color:#5d6368}.dpsp-total-share-wrapper .dpsp-total-share-count{font-size:15px;line-height:18px;white-space:nowrap}.dpsp-total-share-wrapper .dpsp-icon-total-share{position:absolute;top:6px;left:0;margin-left:0;margin-top:0}.dpsp-total-share-wrapper .dpsp-icon-total-share svg{max-height:16px;top:2px;width:auto;fill:#5d6368}#dpsp-floating-sidebar .dpsp-total-share-wrapper{margin-bottom:10px}#dpsp-floating-sidebar .dpsp-total-share-wrapper .dpsp-icon-total-share{display:none}.dpsp-total-share-wrapper span{display:block;font-size:9px;font-weight:700;text-transform:uppercase;text-align:center}.dpsp-content-wrapper .dpsp-total-share-wrapper,.dpsp-pop-up-buttons-wrapper .dpsp-total-share-wrapper,.dpsp-share-buttons-wrapper .dpsp-total-share-wrapper,.dpsp-shortcode-wrapper .dpsp-total-share-wrapper{position:absolute;width:60px;height:40px;margin-top:-21px;top:50%;padding-left:20px;box-sizing:border-box}#dpsp-sticky-bar .dpsp-total-share-wrapper{height:32px;margin-top:-16px}#dpsp-sticky-bar-wrapper.dpsp-is-mobile .dpsp-total-share-wrapper{display:none}.dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before,.dpsp-pop-up-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before,.dpsp-share-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before,.dpsp-shortcode-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before{padding-left:70px}.dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after,.dpsp-pop-up-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after,.dpsp-share-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after,.dpsp-shortcode-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after{padding-right:70px}.dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before .dpsp-total-share-wrapper,.dpsp-pop-up-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before .dpsp-total-share-wrapper,.dpsp-share-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before .dpsp-total-share-wrapper,.dpsp-shortcode-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before .dpsp-total-share-wrapper{left:0}.dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after .dpsp-total-share-wrapper,.dpsp-pop-up-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after .dpsp-total-share-wrapper,.dpsp-share-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after .dpsp-total-share-wrapper,.dpsp-shortcode-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after .dpsp-total-share-wrapper{right:0}#dpsp-pop-up{position:fixed;max-width:750px;width:100%;padding:40px;background:#fff;border-radius:10px;z-index:9999;opacity:0;transform:translate(-50%,-50%);-moz-transition:all .25s ease-in-out;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out}#dpsp-pop-up.dpsp-animation-1{transform:translate(-50%,-50%) scale(.1)}#dpsp-pop-up.dpsp-animation-3{transform:translate(-50%)}#dpsp-pop-up.dpsp-animation-4{transform:translate(-50%,-100%)}#dpsp-pop-up-overlay.no-animation,#dpsp-pop-up.no-animation{-moz-transition:none;-webkit-transition:none;-o-transition:none;transition:none}#dpsp-pop-up.opened{top:50%;left:50%;transform:scale(1) translate(-50%,-50%);opacity:1}#dpsp-pop-up-overlay{display:block;position:fixed;top:0;left:0;width:0;height:0;z-index:9998;background:#000;opacity:0;-moz-transition:opacity .25s ease-in-out,margin .25s ease-in-out;-webkit-transition:opacity .25s ease-in-out,margin .25s ease-in-out;-o-transition:opacity .25s ease-in-out,margin .25s ease-in-out;transition:opacity .25s ease-in-out,margin .25s ease-in-out}#dpsp-pop-up-overlay.opened{width:100%;height:100%;opacity:.65}#dpsp-pop-up-content{text-align:center}#dpsp-pop-up-close{position:absolute;top:10px;right:10px;display:block;width:22px;height:22px;line-height:22px;vertical-align:middle;text-align:center;cursor:pointer}#dpsp-pop-up-close svg{position:relative;top:2px;max-height:16px;width:auto;vertical-align:top;fill:#999}#dpsp-pop-up h2{margin-bottom:1em}#dpsp-pop-up h2 p{font-size:inherit}#dpsp-pop-up h2 p:last-of-type{margin-top:0;margin-bottom:0}#dpsp-pop-up p{margin-top:1em;margin-bottom:1em}#dpsp-post-bottom{height:0;width:0;padding:0;margin:0}@media screen and (max-width:800px){#dpsp-pop-up{width:90%}}@media screen and (max-width:720px){#dpsp-pop-up .dpsp-networks-btns-wrapper li{width:100%;margin-left:0;margin-right:0}}.dpsp-top-shared-post{margin-bottom:2em}.dpsp-top-shared-post-thumbnail{display:block;margin-bottom:1.2em}.dpsp-top-shared-post-thumbnail img{max-width:100%;height:auto}.dpsp-top-shared-post-title{display:inline-block;margin-bottom:.5em}.dpsp-shortcode-follow-wrapper>.dpsp-networks-btns-follow-widget{display:flex;flex-flow:row wrap}.dpsp-shortcode-follow-wrapper.dpsp-follow-align-left>.dpsp-networks-btns-follow-widget{justify-content:flex-start}.dpsp-shortcode-follow-wrapper.dpsp-follow-align-center>.dpsp-networks-btns-follow-widget{justify-content:center}.dpsp-shortcode-follow-wrapper.dpsp-follow-align-right>.dpsp-networks-btns-follow-widget{justify-content:flex-end}.dpsp-click-to-tweet{position:relative;display:block;margin:1.5em 0;font-size:105%;text-decoration:none;transition:all .15s ease-in}.dpsp-click-to-tweet,.dpsp-click-to-tweet:hover{box-shadow:none!important}.dpsp-click-to-tweet.dpsp-has-avatar{padding-left:120px!important;min-height:115px}.dpsp-click-to-tweet.dpsp-has-avatar .avatar{position:absolute;top:15px;left:15px;border-radius:50%;box-shadow:none!important}.dpsp-click-to-tweet-footer:after,.dpsp-click-to-tweet:after{content:"";display:block;clear:both}.dpsp-click-to-tweet-content{display:block;position:relative;z-index:2;font-family:Georgia;font-size:18px;line-height:1.5;text-align:left}.dpsp-click-to-tweet-footer{display:block;font-family:Arial;font-weight:700;font-size:14px;color:#999;margin-top:1em}.dpsp-click-to-tweet.dpsp-click-to-tweet-cta-left .dpsp-click-to-tweet-cta{float:left}.dpsp-click-to-tweet.dpsp-click-to-tweet-cta-right .dpsp-click-to-tweet-cta{float:right}.dpsp-click-to-tweet-cta{color:#00abf0;line-height:1}.dpsp-click-to-tweet-cta svg{fill:#00abf0}.dpsp-click-to-tweet-cta .dpsp-twitter{display:inline-block;position:relative;font-size:20px;width:20px;height:20px;vertical-align:middle}.dpsp-click-to-tweet-cta>span{margin-right:10px;vertical-align:middle}.dpsp-click-to-tweet:hover .dpsp-twitter .dpsp-network-icon-inner{transition:all .2s ease-in-out}.dpsp-click-to-tweet.dpsp-click-to-tweet-cta-icon-animation:hover .dpsp-click-to-tweet-cta .dpsp-twitter .dpsp-network-icon-after{margin-left:-10px;opacity:1}.dpsp-click-to-tweet.dpsp-click-to-tweet-cta-icon-animation:hover .dpsp-click-to-tweet-cta .dpsp-twitter .dpsp-network-icon-before{margin-left:10px;opacity:0}a.dpsp-click-to-tweet.dpsp-style-1{border:0;border-left:5px solid #00abf0;color:#555;padding:15px 5px 5px 30px}a.dpsp-click-to-tweet.dpsp-style-1:hover{border-left:5px solid #0099d7}a.dpsp-click-to-tweet.dpsp-style-2{border:0;border-left:5px solid #00abf0;color:#555;background:#f6f6f6;padding:20px 30px}a.dpsp-click-to-tweet.dpsp-style-2:hover{border-left:5px solid #0099d7}a.dpsp-click-to-tweet.dpsp-style-3{border:1px solid #e1e1e1;border-radius:3px;color:#838383;padding:20px 30px}a.dpsp-click-to-tweet.dpsp-style-3:hover{color:#555}a.dpsp-click-to-tweet.dpsp-style-4{border:4px double #e1e1e1;border-radius:0;color:#838383;padding:20px 30px}a.dpsp-click-to-tweet.dpsp-style-4:hover{color:#555}a.dpsp-click-to-tweet.dpsp-style-5{border:0;border-left:0 solid transparent;border-radius:3px;color:#fff;background:#00abf0;padding:20px 30px;transition:border .2s ease-in-out}a.dpsp-click-to-tweet.dpsp-style-5 .dpsp-click-to-tweet-cta{color:#fff}a.dpsp-click-to-tweet.dpsp-style-5 .dpsp-click-to-tweet-cta svg{fill:#fff}a.dpsp-click-to-tweet.dpsp-style-5:hover{color:#fff;border-left:9px solid #0099d7}a.dpsp-click-to-tweet.dpsp-style-5 .dpsp-click-to-tweet-content,a.dpsp-click-to-tweet.dpsp-style-5 .dpsp-click-to-tweet-footer,a.dpsp-click-to-tweet.dpsp-style-5>img{transition:margin-left .2s ease-in-out}a.dpsp-click-to-tweet.dpsp-style-5:hover .dpsp-click-to-tweet-content,a.dpsp-click-to-tweet.dpsp-style-5:hover .dpsp-click-to-tweet-footer,a.dpsp-click-to-tweet.dpsp-style-5:hover>img{margin-left:-9px}
assets/dist/style-frontend.1.0.0.css DELETED
@@ -1 +0,0 @@
1
- @font-face{font-family:Social Pug;src:url(./socialpug.1.0.0.eot?gd6mr8);src:url(./socialpug.1.0.0.eot?#iefix) format("embedded-opentype"),url(./socialpug.1.0.0.woff) format("woff"),url(./socialpug.1.0.0.ttf) format("truetype"),url(./socialpug.1.0.0.svg#socialpug) format("svg");font-weight:400;font-style:normal;font-display:swap}.dpsp-icon-total-share:before{line-height:20px;display:inline-block;line-height:1em}.dpsp-icon-total-share:before,.dpsp-network-btn .dpsp-network-icon:after,.dpsp-network-btn .dpsp-network-icon:before{position:absolute;top:50%;left:50%;margin-top:-10px;margin-left:-10px;width:20px;height:20px;vertical-align:middle;font-family:Social Pug;font-style:normal;font-weight:400;text-decoration:inherit;text-align:center;font-variant:normal;text-transform:none}.dpsp-network-btn .dpsp-network-icon:after,.dpsp-network-btn .dpsp-network-icon:before{display:block;line-height:20px}.dpsp-network-btn .dpsp-network-icon:after{margin-left:-20px;opacity:0}.dpsp-icon-total-share:before{content:"\e883"}.dpsp-facebook .dpsp-network-icon:after,.dpsp-facebook .dpsp-network-icon:before{content:"\e800"}.dpsp-twitter .dpsp-network-icon:after,.dpsp-twitter .dpsp-network-icon:before{content:"\e801"}.dpsp-pinterest .dpsp-network-icon:after,.dpsp-pinterest .dpsp-network-icon:before{content:"\e803"}.dpsp-linkedin .dpsp-network-icon:after,.dpsp-linkedin .dpsp-network-icon:before{content:"\e804"}.dpsp-email .dpsp-network-icon:after,.dpsp-email .dpsp-network-icon:before{content:"\e816"}.dpsp-print .dpsp-network-icon:after,.dpsp-print .dpsp-network-icon:before{content:"\e817"}.dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon:after,.dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon:before{transition:all .25s ease-in-out}.dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon:before{margin-left:5px;opacity:0}.dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon:after{margin-left:-10px;opacity:1}#dpsp-floating-sidebar{position:fixed;top:50%;transform:translateY(-50%);z-index:9998}#dpsp-floating-sidebar.dpsp-position-left{left:0}#dpsp-floating-sidebar.dpsp-position-right{right:0}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar li{float:none;margin-left:0}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn{padding:0;width:40px}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{border-color:transparent!important;background:transparent!important}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-has-count .dpsp-network-icon{height:22px;line-height:22px}.dpsp-button-hover .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn:hover:before{color:#fff}.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn,.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{border-radius:0}.dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first,.dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first .dpsp-network-icon{-webkit-border-top-right-radius:5px;-moz-border-radius-topright:5px;border-top-right-radius:5px}.dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last,.dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last .dpsp-network-icon{-webkit-border-bottom-right-radius:5px;-moz-border-radius-bottomright:5px;border-bottom-right-radius:5px}.dpsp-position-left.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn,.dpsp-position-left.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{-webkit-border-top-right-radius:5px;-moz-border-radius-topright:5px;border-top-right-radius:5px;-webkit-border-bottom-right-radius:5px;-moz-border-radius-bottomright:5px;border-bottom-right-radius:5px}.dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first,.dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first .dpsp-network-icon{-webkit-border-top-left-radius:5px;-moz-border-radius-topleft:5px;border-top-left-radius:5px}.dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last,.dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last .dpsp-network-icon{-webkit-border-bottom-left-radius:5px;-moz-border-radius-bottomleft:5px;border-bottom-left-radius:5px}.dpsp-position-right.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn,.dpsp-position-right.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{-webkit-border-top-left-radius:5px;-moz-border-radius-topleft:5px;border-top-left-radius:5px;-webkit-border-bottom-left-radius:5px;-moz-border-radius-bottomleft:5px;border-bottom-left-radius:5px}.dpsp-shape-rounded.dpsp-has-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon{border-radius:5px}#dpsp-floating-sidebar.dpsp-position-left.dpsp-shape-circle{left:12px}#dpsp-floating-sidebar.dpsp-position-right.dpsp-shape-circle{right:10px}.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn{margin-bottom:6px}.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn{-webkit-border-top-right-radius:5px;-moz-border-radius-topright:5px;border-top-right-radius:5px;-webkit-border-bottom-right-radius:5px;-moz-border-radius-bottomright:5px;border-bottom-right-radius:5px}#dpsp-floating-sidebar.dpsp-style-2 .dpsp-network-btn:before{background:none}#dpsp-floating-sidebar .dpsp-networks-btns-wrapper li{position:relative;overflow:visible}#dpsp-floating-sidebar .dpsp-networks-btns-wrapper .dpsp-button-label{position:absolute;z-index:1;display:inline-block;width:auto;white-space:nowrap;top:50%;margin-top:-15px;height:30px;padding:6px 12px;color:#fff;font-size:12px;font-weight:400;line-height:18px;background:#34495e;border-radius:3px;visibility:hidden;opacity:0;transition:all .2s ease-in-out;box-sizing:border-box}#dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper .dpsp-button-label{left:100%}#dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper .dpsp-button-label{right:100%}#dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper li.dpsp-hover .dpsp-button-label{transform:translateX(10px);visibility:visible;opacity:1}#dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper li.dpsp-hover .dpsp-button-label{transform:translateX(-10px);visibility:visible;opacity:1}#dpsp-floating-sidebar .dpsp-networks-btns-wrapper .dpsp-button-label:before{content:"";display:block;position:absolute;top:50%;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent}#dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper .dpsp-button-label:before{left:-5px;border-right:5px solid #34495e}#dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper .dpsp-button-label:before{right:-5px;border-left:5px solid #34495e}#dpsp-content-top{margin-bottom:1.2em}#dpsp-content-bottom{margin-top:1.2em}.dpsp-share-text{font-weight:700;margin-bottom:10px}.dpsp-networks-btns-wrapper{list-style:none!important;padding:0!important;margin:0!important}.dpsp-networks-btns-wrapper:after{content:"";display:block;height:0;clear:both}.dpsp-networks-btns-wrapper li{float:left;overflow:hidden;-moz-transition:all .15s ease-in;-webkit-transition:all .15s ease-in;-o-transition:all .15s ease-in;transition:all .15s ease-in;list-style-type:none!important}.dpsp-networks-btns-wrapper li:before{display:none!important}.dpsp-networks-btns-wrapper li:first-child{margin-left:0!important}.dpsp-networks-btns-wrapper .dpsp-network-btn{position:relative;display:block;text-decoration:none!important;text-transform:unset!important;height:40px;min-width:40px;font-family:Arial;font-weight:700;font-size:14px;line-height:36px;vertical-align:middle;padding:0 10px 0 48px;border:2px solid;max-height:40px;width:100%;-moz-box-sizing:border-box;box-sizing:border-box;-moz-transition:all .15s ease-in;-webkit-transition:all .15s ease-in;-o-transition:all .15s ease-in;transition:all .15s ease-in;box-shadow:none;cursor:pointer}.dpsp-networks-btns-wrapper .dpsp-network-btn:focus,.dpsp-networks-btns-wrapper .dpsp-network-btn:hover{border:2px solid;box-shadow:none}.dpsp-networks-btns-wrapper .dpsp-network-btn:after{content:"";display:block;height:0;clear:both}.dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon{position:absolute;top:-2px;left:-2px;bottom:-2px;float:left;display:block;font-size:14px;line-height:36px;width:40px;text-align:center;vertical-align:middle;border:2px solid;-moz-box-sizing:border-box;box-sizing:border-box;-moz-transition:all .15s ease-in;-webkit-transition:all .15s ease-in;-o-transition:all .15s ease-in;transition:all .15s ease-in}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label{padding:0 18px}.dpsp-button-style-1 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label .dpsp-network-icon{width:auto;right:-2px}.dpsp-has-buttons-count .dpsp-networks-btns-wrapper .dpsp-network-label{margin-right:10px}.dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-count{font-size:13px}.dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-count{position:absolute;bottom:0;left:0;width:100%;margin-left:0;font-size:11px;text-align:center;height:20px;line-height:20px}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label .dpsp-network-label-wrapper{display:none}.dpsp-column-1 .dpsp-networks-btns-wrapper li{width:100%}.dpsp-column-1.dpsp-has-spacing .dpsp-networks-btns-wrapper li{margin-right:0}.dpsp-column-2 .dpsp-networks-btns-wrapper li{width:50%}.dpsp-column-2.dpsp-has-spacing .dpsp-networks-btns-wrapper li{width:49%}.dpsp-column-2 .dpsp-networks-btns-wrapper li:nth-child(2n){margin-right:0}.dpsp-column-3 .dpsp-networks-btns-wrapper li{width:33.3333%}.dpsp-column-3.dpsp-has-spacing .dpsp-networks-btns-wrapper li{width:32%}.dpsp-column-3 .dpsp-networks-btns-wrapper li:nth-child(3n){margin-right:0}.dpsp-column-4 .dpsp-networks-btns-wrapper li{width:25%}.dpsp-column-4.dpsp-has-spacing .dpsp-networks-btns-wrapper li{width:23.5%}.dpsp-column-4 .dpsp-networks-btns-wrapper li:nth-child(4n){margin-right:0}.dpsp-column-5 .dpsp-networks-btns-wrapper li{width:20%}.dpsp-column-5.dpsp-has-spacing .dpsp-networks-btns-wrapper li{width:18.4%}.dpsp-column-5 .dpsp-networks-btns-wrapper li:nth-child(5n){margin-right:0}.dpsp-column-6 .dpsp-networks-btns-wrapper li{width:16.6666%}.dpsp-column-6.dpsp-has-spacing .dpsp-networks-btns-wrapper li{width:15%}.dpsp-column-6 .dpsp-networks-btns-wrapper li:nth-child(6n){margin-right:0}.dpsp-column-2 .dpsp-networks-btns-wrapper .dpsp-network-btn,.dpsp-column-3 .dpsp-networks-btns-wrapper .dpsp-network-btn,.dpsp-column-4 .dpsp-networks-btns-wrapper .dpsp-network-btn,.dpsp-column-5 .dpsp-networks-btns-wrapper .dpsp-network-btn,.dpsp-column-6 .dpsp-networks-btns-wrapper .dpsp-network-btn{padding-right:10px}.dpsp-no-labels .dpsp-networks-btns-wrapper .dpsp-network-btn{padding:0;text-align:center}.dpsp-no-labels:not(.dpsp-column-auto) .dpsp-networks-btns-wrapper .dpsp-network-btn:before{position:relative;left:0;float:none;display:inline-block}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook .dpsp-network-icon{border-color:#3a579a;background:#3a579a;color:#3a579a}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:hover .dpsp-network-icon{border-color:#334d87;background:#334d87;color:#334d87}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter .dpsp-network-icon{border-color:#00abf0;background:#00abf0;color:#00abf0}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:hover .dpsp-network-icon{border-color:#0099d7;background:#0099d7;color:#0099d7}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest .dpsp-network-icon{border-color:#c92228;background:#c92228;color:#c92228}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:hover .dpsp-network-icon{border-color:#b31e24;background:#b31e24;color:#b31e24}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin .dpsp-network-icon{border-color:#0077b5;background:#0077b5;color:#0077b5}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:hover .dpsp-network-icon{border-color:#00669c;background:#00669c;color:#00669c}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email .dpsp-network-icon{border-color:#27ae60;background:#27ae60;color:#27ae60}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:hover .dpsp-network-icon{border-color:#239e57;background:#239e57;color:#239e57}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print .dpsp-network-icon{border-color:#bdc3c7;background:#bdc3c7;color:#bdc3c7}.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:hover,.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:hover .dpsp-network-icon{border-color:#afb6bb;background:#afb6bb;color:#afb6bb}.dpsp-has-button-background .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn:before{color:#fff}.dpsp-shape-rounded .dpsp-network-btn,.dpsp-shape-rounded .dpsp-network-btn .dpsp-network-icon{-webkit-border-top-left-radius:5px;-webkit-border-bottom-left-radius:5px;-moz-border-radius-topleft:5px;-moz-border-radius-bottomleft:5px;border-top-left-radius:5px;border-bottom-left-radius:5px}.dpsp-shape-rounded .dpsp-network-btn,.dpsp-shape-rounded .dpsp-no-label.dpsp-network-btn .dpsp-network-icon{-webkit-border-top-right-radius:5px;-webkit-border-bottom-right-radius:5px;-moz-border-radius-topright:5px;-moz-border-radius-bottomright:5px;border-top-right-radius:5px;border-bottom-right-radius:5px}.dpsp-shape-circle .dpsp-network-btn{border-radius:30px}.dpsp-shape-circle .dpsp-network-btn .dpsp-network-icon{border-radius:30px;overflow:hidden}.dpsp-has-spacing .dpsp-networks-btns-wrapper li{margin-bottom:10px;margin-right:2%;margin-left:0!important}@media screen and (max-width:720px){.dpsp-hide-on-mobile{display:none}}.dpsp-button-style-1 .dpsp-network-btn{color:#fff!important;padding-left:38px}.dpsp-button-style-1 .dpsp-network-btn .dpsp-network-icon{color:#fff!important}.dpsp-show-total-share-count{position:relative}.dpsp-total-share-wrapper{position:relative;font-family:Arial;margin-top:10px;line-height:1.345;color:#5d6368}.dpsp-total-share-wrapper .dpsp-icon-total-share:before{font-size:16px;top:7px;left:-2px;margin-top:0;margin-left:0}#dpsp-floating-sidebar .dpsp-total-share-wrapper{margin-bottom:10px}#dpsp-floating-sidebar .dpsp-total-share-wrapper .dpsp-icon-total-share{display:none}.dpsp-total-share-wrapper span{display:block;font-size:9px;font-weight:700;text-transform:uppercase;text-align:center}.dpsp-total-share-wrapper .dpsp-total-share-count{font-size:15px;line-height:18px;white-space:nowrap}.dpsp-content-wrapper .dpsp-total-share-wrapper{position:absolute;width:60px;height:40px;margin-top:-21px;top:50%;padding-left:20px;box-sizing:border-box}.dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before{padding-left:70px}.dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after{padding-right:70px}.dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before .dpsp-total-share-wrapper{left:0}.dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after .dpsp-total-share-wrapper{right:0}@media print{#dpsp-floating-sidebar,.dpsp-content-wrapper,.dpsp-share-text{display:none}}
 
assets/dist/tool-content.1.18.0.png ADDED
Binary file
assets/dist/tool-follow-widget.1.18.0.png ADDED
Binary file
assets/dist/tool-image-hover-pinterest.1.18.0.png ADDED
Binary file
assets/dist/tool-misc-import-export.1.18.0.png ADDED
Binary file
assets/dist/tool-mobile.1.18.0.png ADDED
Binary file
assets/dist/tool-pop-up.1.18.0.png ADDED
Binary file
assets/dist/tool-sidebar.1.18.0.png ADDED
Binary file
assets/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
assets/libs/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
assets/libs/select2/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
assets/libs/select2/select2.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.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{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid #000 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
assets/libs/select2/select2.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ /*! Select2 4.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice;this.listeners=this.listeners||{},a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")});var f=e.filter("[aria-selected=true]");f.length>0?f.first().trigger("mouseenter"):e.first().trigger("mouseenter")})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&d.setClasses()}),b.on("unselect",function(){b.isOpen()&&d.setClasses()}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-d.$results.scrollTop()+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){
2
+ var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},l,j),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&""!==a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");if(void 0!==f&&(this.createTag=f),b.call(this,c,d),a.isArray(e))for(var g=0;g<e.length;g++){var h=e[g],i=this._normalizeItem(h),j=this.option(i);this.$element.append(j)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(a,b,c){function d(a){e.trigger("select",{data:a})}var e=this;b.term=b.term||"";var f=this.tokenizer(b,this.options,d);f.term!==b.term&&(this.$search.length&&(this.$search.val(f.term),this.$search.focus()),b.term=f.term),a.call(this,b,c)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=(this.$container.position(),this.$container.offset());f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom};if("static"!==this.$dropdownParent[0].style.position){var m=this.$dropdownParent.offset();l.top-=m.top,l.left-=m.left}c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(){d._handleSelectOnClose()})},a.prototype._handleSelectOnClose=function(){var a=this.getHighlightedResults();if(!(a.length<1)){var b=a.data("data");null!=b.element&&b.element.selected||null==b.element&&b.selected||this.trigger("select",{data:b})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend({},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this._sync=c.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",b._sync,!1)},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d;return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2.");var e=Array.prototype.slice.call(arguments,1);d=c[b].apply(c,e)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
assets/src/css/base.scss ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import './lib/icons-general.scss';
2
+
3
+ @import './lib/buttons/sidebar.scss';
4
+
5
+ @import './lib/buttons/content.scss';
6
+
7
+ @import './lib/buttons/shortcode.scss';
8
+
9
+ @import './lib/buttons/sticky.scss';
10
+
11
+ @import './lib/buttons/general.scss';
12
+
13
+ @import './lib/buttons/style-variations.scss';
14
+
15
+ @import './lib/buttons/pin-it.scss';
16
+
17
+ @import './lib/buttons/pop-up.scss';
18
+
19
+ @import './lib/total-shares.scss';
20
+
21
+ @import './lib/pop-up.scss';
22
+
23
+ @import './lib/top-shared-post.scss';
24
+
25
+ @import './lib/follow-widget.scss';
26
+
27
+ @import './lib/click-to-tweet.scss';
assets/src/css/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
assets/src/css/lib/admin/extensions.scss ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ .dpsp-page-wrapper.dpsp-page-extensions { max-width: 1000px; }
2
+
3
+ .dpsp-page-extensions .dpsp-card { margin-top: 0; margin-bottom: 0; }
4
+
5
+ .dpsp-unavailable > a { display: block; line-height: 0; }
6
+ .dpsp-unavailable h4 { padding-bottom: 0; border-bottom: 0; border-top: 1px solid #f1f1f1; text-align: left; }
7
+ .dpsp-unavailable p.dpsp-description { margin: 0; padding: 10px; }
8
+ .dpsp-unavailable .dpsp-tool-actions { padding: 15px 10px; overflow: hidden; text-align: center; background: #f9f9f9; border-top: 1px solid #f1f1f1; }
9
+ .dpsp-unavailable .dpsp-tool-actions .button { padding-left: 25px; padding-right: 25px; }
10
+ .dpsp-unavailable .dpsp-description { height: 57px; }
assets/src/css/lib/admin/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
assets/src/css/lib/admin/settings-sidebar.scss ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .dpsp-settings-sidebar {
2
+ float: left;
3
+ margin-top: 63px;
4
+ padding-left: 20px;
5
+ width: 365px;
6
+ -moz-box-sizing: border-box;
7
+ box-sizing: border-box;
8
+ }
9
+
10
+ .dpsp-settings-sidebar p {
11
+ color: #767676;
12
+ }
13
+
14
+ @media screen and (max-width: 1225px) {
15
+
16
+ .dpsp-settings-sidebar {
17
+ border-left: 0;
18
+ padding-left: 0;
19
+ }
20
+
21
+ }
22
+
23
+ #dpsp-settings-sidebar-social-pug-pro img {
24
+ max-width: 100%;
25
+ height: auto;
26
+ padding: 0 20px;
27
+ box-sizing: border-box;
28
+ }
29
+
30
+ #dpsp-settings-sidebar-social-pug-pro h3 {
31
+ text-align: center;
32
+ line-height: 1.7em;
33
+ font-weight: bold;
34
+ }
35
+
36
+ #dpsp-settings-sidebar-social-pug-pro p {
37
+ position: relative;
38
+ padding-left: 45px;
39
+ color: #454545;
40
+ margin-bottom: 20px;
41
+ }
42
+
43
+ #dpsp-settings-sidebar-social-pug-pro p .dpsp-dashicons {
44
+ position: absolute;
45
+ top: -5px;
46
+ left: 0;
47
+ display: inline-block;
48
+ width: 30px;
49
+ height: 30px;
50
+ }
51
+
52
+ #dpsp-settings-sidebar-social-pug-pro p .dpsp-dashicons:after {
53
+ content: '';
54
+ display: block;
55
+ position: absolute;
56
+ z-index: 1;
57
+ top: -1px;
58
+ left: 2px;
59
+ width: 30px;
60
+ height: 30px;
61
+ border-radius: 20px;
62
+ background: #41a4a9
63
+ }
64
+
65
+ #dpsp-settings-sidebar-social-pug-pro p .dashicons {
66
+ position: absolute;
67
+ top: 0;
68
+ left: 0;
69
+ width: 30px;
70
+ height: 30px;
71
+ font-size: 24px;
72
+ line-height: 30px;
73
+ color: #fff;
74
+ z-index: 2;
75
+ }
76
+
77
+ #dpsp-settings-sidebar-social-pug-pro .dpsp-button-primary {
78
+ width: 100%;
79
+ text-align: center;
80
+ padding: 10px 0;
81
+ box-sizing: border-box;
82
+ }
assets/src/css/lib/buttons/content.scss ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /*****************************************/
2
+ /* Content Buttons
3
+ /*****************************************/
4
+ #dpsp-content-top { margin-bottom: 1.2em; }
5
+ #dpsp-content-bottom { margin-top: 1.2em; }
6
+
7
+ .dpsp-share-text { font-weight: bold; margin-bottom: 10px; }
assets/src/css/lib/buttons/general.scss ADDED
@@ -0,0 +1,411 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import './mixins';
2
+
3
+ /**************************************************/
4
+ /* General button styling, for content and other
5
+ /**************************************************/
6
+ .dpsp-networks-btns-wrapper {
7
+ list-style: none !important;
8
+ padding: 0 !important;
9
+ margin: 0 !important;
10
+ }
11
+
12
+ .dpsp-networks-btns-wrapper:after {
13
+ content: '';
14
+ display: block;
15
+ height: 0;
16
+ clear: both;
17
+ }
18
+
19
+ .dpsp-networks-btns-wrapper li {
20
+ float: left;
21
+
22
+ -moz-transition: all 0.15s ease-in;
23
+ -webkit-transition: all 0.15s ease-in;
24
+ -o-transition: all 0.15s ease-in;
25
+ transition: all 0.15s ease-in;
26
+
27
+ margin: 0;
28
+ padding: 0;
29
+ border: 0;
30
+ list-style-type: none !important;
31
+ }
32
+
33
+ .dpsp-networks-btns-wrapper li:before {
34
+ display: none !important;
35
+ }
36
+
37
+ .dpsp-networks-btns-wrapper li:first-child {
38
+ margin-left: 0 !important;
39
+ }
40
+
41
+ /*
42
+ * Share button
43
+ */
44
+ .dpsp-networks-btns-wrapper .dpsp-network-btn {
45
+ position: relative;
46
+ text-align: center;
47
+ display: inline-flex;
48
+ text-decoration: none !important;
49
+ text-transform: unset !important;
50
+ height: 40px;
51
+ min-width: 40px;
52
+
53
+ font-family: 'Arial', sans-serif;
54
+ font-weight: bold;
55
+ font-size: 14px;
56
+ line-height: 36px;
57
+ vertical-align: middle;
58
+
59
+ padding: 0;
60
+ border: 2px solid;
61
+ max-height: 40px;
62
+
63
+ width: 100%;
64
+ -moz-box-sizing: border-box;
65
+ box-sizing: border-box;
66
+
67
+ -moz-transition: all 0.15s ease-in;
68
+ -webkit-transition: all 0.15s ease-in;
69
+ -o-transition: all 0.15s ease-in;
70
+ transition: all 0.15s ease-in;
71
+
72
+ box-shadow: none;
73
+
74
+ cursor: pointer;
75
+
76
+ border-radius: 0;
77
+ .dpsp-network-label {
78
+ padding-left: 0.5em;
79
+ padding-right: 0.5em;
80
+ }
81
+ &.dpsp-has-count .dpsp-network-label {
82
+ padding-right: 0.25em;
83
+ }
84
+ }
85
+
86
+ .dpsp-networks-btns-wrapper .dpsp-network-btn {
87
+ &:hover, &:focus {
88
+ border: 2px solid;
89
+ box-shadow: 0 0 0 3px rgba(21, 156, 228, 0.4);
90
+ box-shadow: 0 0 0 3px var(--networkHover);
91
+ outline: none;
92
+ }
93
+ }
94
+
95
+ .dpsp-networks-btns-wrapper .dpsp-network-btn:after {
96
+ content: '';
97
+ display: block;
98
+ height: 0;
99
+ clear: both;
100
+ }
101
+
102
+ /*
103
+ * Buttons with no labels
104
+ */
105
+ .dpsp-networks-btns-wrapper .dpsp-network-btn {
106
+ &.dpsp-no-label {
107
+ }
108
+ }
109
+
110
+ .dpsp-networks-btns-wrapper.dpsp-column-auto .dpsp-network-btn {
111
+ &.dpsp-no-label {
112
+ padding-left: 0 !important;
113
+ }
114
+ }
115
+
116
+ // Inline content and pop-up buttons with no labels
117
+ .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn.dpsp-no-label .dpsp-network-icon {
118
+ }
119
+ // Small size
120
+ .dpsp-size-small .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn.dpsp-no-label .dpsp-network-icon {
121
+ width: 28px;
122
+ }
123
+
124
+
125
+ /*
126
+ * Button label
127
+ */
128
+
129
+
130
+ .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-count {
131
+ font-size: 13px;
132
+ font-weight: normal;
133
+ padding-left: 0.25em;
134
+ padding-right: 0.5em;
135
+ white-space: nowrap;
136
+ }
137
+ .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar):not(.dpsp-networks-btns-sticky-bar ) {
138
+ &.dpsp-column-2, &.dpsp-column-1 {
139
+ .dpsp-network-btn .dpsp-network-icon + .dpsp-network-count {
140
+
141
+ }
142
+ }
143
+ }
144
+
145
+ .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-count {
146
+ position: absolute;
147
+ bottom: 0;
148
+ left: 0;
149
+ width: 100%;
150
+ margin-left: 0;
151
+ font-size: 11px;
152
+ text-align: center;
153
+ height: 20px;
154
+ line-height: 20px;
155
+ }
156
+
157
+ .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label .dpsp-network-label-wrapper {
158
+ display: none;
159
+ }
160
+
161
+ .dpsp-button-style-6, .dpsp-button-style-7 {
162
+ .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar):not(.dpsp-column-auto):not(.dpsp-column-6) .dpsp-network-btn.dpsp-has-count-only .dpsp-network-label-wrapper {
163
+ display: inline-block;
164
+ text-indent: 2em;
165
+ }
166
+ }
167
+
168
+
169
+
170
+ /*
171
+ * Buttons columns
172
+ */
173
+ .dpsp-networks-btns-wrapper.dpsp-column-1 li { width: 100%; margin-left: 0;}
174
+ .dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-1 li { margin-right: 0; }
175
+
176
+ .dpsp-networks-btns-wrapper.dpsp-column-2 li { width: 50%; }
177
+ .dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-2 li { width: 49%; }
178
+ .dpsp-networks-btns-wrapper.dpsp-column-2 li:nth-child(2n) { margin-right: 0; }
179
+
180
+ .dpsp-networks-btns-wrapper.dpsp-column-3 li { width: 33.3333%; }
181
+ .dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-3 li { width: 32%; }
182
+ .dpsp-networks-btns-wrapper.dpsp-column-3 li:nth-child(3n) { margin-right: 0; }
183
+
184
+ .dpsp-networks-btns-wrapper.dpsp-column-4 li { width: 25%; }
185
+ .dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-4 li { width: 23.5%; }
186
+ .dpsp-networks-btns-wrapper.dpsp-column-4 li:nth-child(4n) { margin-right: 0; }
187
+
188
+ .dpsp-networks-btns-wrapper.dpsp-column-5 li { width: 20%; }
189
+ .dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-5 li { width: 18.4%; }
190
+ .dpsp-networks-btns-wrapper.dpsp-column-5 li:nth-child(5n) { margin-right: 0; }
191
+
192
+ .dpsp-networks-btns-wrapper.dpsp-column-6 li { width: 16.6666%; }
193
+ .dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-6 li { width: 15%; }
194
+ .dpsp-networks-btns-wrapper.dpsp-column-6 li:nth-child(6n) { margin-right: 0; }
195
+
196
+ .dpsp-networks-btns-wrapper.dpsp-column-7 li { width: 14.285%; }
197
+ .dpsp-has-spacing .dpsp-networks-btns-wrapper.dpsp-column-7 li { width: 13%; }
198
+ .dpsp-networks-btns-wrapper.dpsp-column-7 li:nth-child(6n) { margin-right: 0; }
199
+
200
+ .dpsp-shape-circle .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn:not(.dpsp-no-label) { padding-right: 10px; }
201
+
202
+ /*
203
+ * Buttons width no labels
204
+ */
205
+ .dpsp-no-labels .dpsp-networks-btns-wrapper .dpsp-network-btn { padding: 0 !important; text-align: center; }
206
+
207
+
208
+ /*
209
+ * Buttons colors
210
+ */
211
+ /* Facebook */
212
+ @include networkColor( "facebook", #3a579a, #334d87 );
213
+
214
+ /* Twitter */
215
+ @include networkColor( "twitter", #00abf0, #0099d7 );
216
+
217
+ /* Pinterest */
218
+ @include networkColor( "pinterest", #c92228, #b31e24 );
219
+
220
+ /* LinkedIn */
221
+ @include networkColor( "linkedin", #0077b5, #00669c );
222
+
223
+ /* Reddit */
224
+ @include networkColor( "reddit", #ff5700, #ff4200 );
225
+
226
+ /* VK */
227
+ @include networkColor( "vkontakte", #4d75a3, #456992 );
228
+
229
+ /* WhatsApp */
230
+ @include networkColor( "whatsapp", #25D366, #21c960 );
231
+
232
+ /* Instagram */
233
+ @include networkColor( "instagram", #bc2a8d, #a9257e );
234
+
235
+ /* YouTube */
236
+ @include networkColor( "youtube", #bb0000, #a20000 );
237
+
238
+ /* Vimeo */
239
+ @include networkColor( "vimeo", #4bf, #2bb2ff );
240
+
241
+ /* SoundCloud */
242
+ @include networkColor( "soundcloud", #f50, #e64c00 );
243
+
244
+ /* Twitch */
245
+ @include networkColor( "twitch", #6441A5, #593a93 );
246
+
247
+ /* Yummly */
248
+ @include networkColor( "yummly", #e55a27, #d84d1a );
249
+
250
+ /* Behance */
251
+ @include networkColor( "behance", #005cff, #0053e6 );
252
+
253
+ /* Email */
254
+ @include networkColor( "email", #27ae60, #239e57 );
255
+
256
+ /* Print */
257
+ @include networkColor( "print", #bdc3c7, #afb6bb );
258
+
259
+ /* Pocket */
260
+ @include networkColor( "pocket", #ed4055, #e63c51 );
261
+
262
+ /* Buffer */
263
+ @include networkColor( "buffer", #29323b, #21282f );
264
+
265
+ /* Tumblr */
266
+ @include networkColor( "tumblr", #35465c, #2e3d50 );
267
+
268
+ /* Xing */
269
+ @include networkColor( "xing", #00888d, #006a6c );
270
+
271
+ /* Github */
272
+ @include networkColor( "github", #333333, #222222 );
273
+
274
+ /* Flipboard */
275
+ @include networkColor( "flipboard", #e12828, #d21d1d );
276
+
277
+ /* Telegram */
278
+ @include networkColor( "telegram", #0088cc, #0077b3 );
279
+
280
+ /* Medium */
281
+ @include networkColor( "medium", #333, #111 );
282
+
283
+ /* Mix */
284
+ @include networkColor( "mix", #fd8235, #fd721c );
285
+
286
+
287
+ /*
288
+ * Buttons Shapes
289
+ */
290
+ .dpsp-shape-rounded .dpsp-network-btn,
291
+ .dpsp-shape-rounded .dpsp-network-btn .dpsp-network-icon {
292
+ -webkit-border-top-left-radius: 4px;
293
+ -webkit-border-bottom-left-radius: 4px;
294
+ -moz-border-radius-topleft: 4px;
295
+ -moz-border-radius-bottomleft: 4px;
296
+ border-top-left-radius: 4px;
297
+ border-bottom-left-radius: 4px;
298
+ }
299
+
300
+ .dpsp-shape-rounded .dpsp-network-btn,
301
+ .dpsp-shape-rounded .dpsp-no-label.dpsp-network-btn .dpsp-network-icon {
302
+ -webkit-border-top-right-radius: 4px;
303
+ -webkit-border-bottom-right-radius: 4px;
304
+ -moz-border-radius-topright: 4px;
305
+ -moz-border-radius-bottomright: 4px;
306
+ border-top-right-radius: 4px;
307
+ border-bottom-right-radius: 4px;
308
+ }
309
+
310
+ .dpsp-shape-circle .dpsp-network-btn {
311
+ border-radius: 30px;
312
+ .dpsp-network-icon {
313
+ border-radius: 30px; overflow: hidden;
314
+ }
315
+ }
316
+
317
+ /*
318
+ * Buttons Margins/Spacings
319
+ */
320
+ .dpsp-has-spacing .dpsp-networks-btns-wrapper li {
321
+ margin-bottom: 10px;
322
+ margin-right: 2%;
323
+ margin-left: 0 !important;
324
+ }
325
+
326
+ /*
327
+ * Button sizes
328
+ */
329
+ /* Size Small */
330
+ .dpsp-size-small {
331
+ .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar):not(.dpsp-networks-btns-sticky-bar) .dpsp-network-btn {
332
+ height: 32px;
333
+ min-width: 32px;
334
+ line-height: 28px;
335
+ max-height: 32px;
336
+ &.dpsp-no-label {
337
+ .dpsp-network-icon {
338
+ width: 32px;
339
+ }
340
+ }
341
+ .dpsp-network-icon {
342
+ line-height: 28px;
343
+ width: 32px;
344
+ height: 32px;
345
+ }
346
+ .dpsp-network-icon-inner {
347
+ height: 28px;
348
+ }
349
+ }
350
+ }
351
+
352
+ /* Size Large */
353
+ .dpsp-size-large .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn {
354
+ height: 46px;
355
+ min-width: 46px;
356
+ line-height: 42px;
357
+ max-height: 46px;
358
+ .dpsp-network-icon {
359
+ line-height: 42px;
360
+ width: 46px;
361
+ height: 46px;
362
+ }
363
+ .dpsp-network-icon-inner {
364
+ height: 42px;
365
+ }
366
+ }
367
+
368
+ /* Floating Sidebar */
369
+ .dpsp-size-medium .dpsp-networks-btns-sidebar .dpsp-network-btn {
370
+ height: 45px;
371
+ min-width: 45px;
372
+ line-height: 41px;
373
+ max-height: 45px;
374
+ padding-left: 0;
375
+ .dpsp-network-icon {
376
+ line-height: 41px;
377
+ width: 45px;
378
+ }
379
+ }
380
+
381
+ .dpsp-size-medium .dpsp-networks-btns-sidebar.dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-has-count .dpsp-network-icon {
382
+ height: 26px;
383
+ line-height: 26px;
384
+ }
385
+
386
+ .dpsp-size-large .dpsp-networks-btns-sidebar .dpsp-network-btn {
387
+ height: 50px;
388
+ min-width: 50px;
389
+ line-height: 46px;
390
+ max-height: 50px;
391
+ padding-left: 0;
392
+ .dpsp-network-icon {
393
+ line-height: 46px;
394
+ width: 50px;
395
+ }
396
+ }
397
+
398
+ .dpsp-size-large .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-has-count .dpsp-network-icon {
399
+ height: 30px;
400
+ line-height: 30px;
401
+ }
402
+
403
+
404
+ /*
405
+ * Buttons on mobile
406
+ */
407
+ @media screen and ( max-width : 720px ) {
408
+ .dpsp-hide-on-mobile {
409
+ display: none !important;
410
+ }
411
+ }
assets/src/css/lib/buttons/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
assets/src/css/lib/buttons/mixins.scss ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @mixin networkColor($slug, $default, $hover) {
2
+ .dpsp-#{$slug} {
3
+ --networkColor: #{rgba($default, 0.4)};
4
+ --networkHover: #{rgba($hover, 0.4)};
5
+ }
6
+ .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-#{$slug} {
7
+ border-color: $default;
8
+ background: $default;
9
+ color: $default;
10
+ .dpsp-network-icon {
11
+ border-color: $default;
12
+ background: $default;
13
+ color: $default;
14
+
15
+ svg {
16
+ fill: $default;
17
+ }
18
+ }
19
+
20
+ &:hover, &:focus {
21
+ border-color: $hover;
22
+ background: $hover;
23
+ color: $hover;
24
+
25
+ .dpsp-network-icon {
26
+ border-color: $hover;
27
+ background: $hover;
28
+ color: $hover;
29
+
30
+ svg {
31
+ fill: $hover;
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+
38
+ @mixin style2Colors($slug, $default, $hover) {
39
+ .dpsp-button-style-2 .dpsp-networks-btns-wrapper .dpsp-#{$slug} {
40
+ &.dpsp-no-label, &.dpsp-has-count:not(.dpsp-has-label), .dpsp-network-icon {
41
+ background: $default;
42
+ border-color: $default;
43
+ }
44
+ }
45
+ }
assets/src/css/lib/buttons/pin-it.scss ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Pinterest Pin it button style
3
+ */
4
+ .dpsp-pin-it-wrapper { position: relative !important; display: inline-table !important; line-height: 0; }
5
+ .dpsp-pin-it-wrapper.aligncenter,.dpsp-pin-it-wrapper.alignleft,.dpsp-pin-it-wrapper.alignright {
6
+ display: table !important;
7
+ }
8
+ .dpsp-pin-it-wrapper:hover .dpsp-pin-it-button { visibility: visible; background-color:#c92228 !important; color: #fff !important; }
9
+
10
+ /* Fix for images that */
11
+ .dpsp-pin-it-wrapper.aligncenter { margin-left: auto; margin-right: auto; }
12
+
13
+ /* Fix for Gutenberg cropped images */
14
+ .wp-block-gallery.is-cropped .blocks-gallery-item .dpsp-pin-it-wrapper { height: 100%; flex: 1; object-fit: cover; }
15
+
16
+ .dpsp-pin-it-button { display: inline-block; position: absolute; background: transparent; color: transparent !important; text-decoration: none !important; border: 0 !important; height: 40px !important; width: auto !important; font-family: 'Arial'; font-weight: bold; font-size: 14px; line-height: 40px; vertical-align: middle; transition: all 0.25s ease-in-out; visibility: hidden; box-shadow: none !important; background-image: none !important; }
17
+ .dpsp-pin-it-button:hover { color: #fff; background: #b31e24; box-shadow: none !important; }
18
+
19
+ .dpsp-pin-it-button.dpsp-pin-it-button-has-label { padding-right: 20px; }
20
+ .dpsp-pin-it-button.dpsp-pin-it-button-has-label:after {
21
+ display: inline-block;
22
+ content: attr(title);
23
+ }
24
+
25
+ .dpsp-pin-it-button .dpsp-network-icon { display: inline-block; width: 40px; height: 40px; text-align: center; vertical-align: top; }
26
+
27
+ .dpsp-pin-it-button .dpsp-network-icon svg {
28
+ height: 20px;
29
+ display: inline-block;
30
+ vertical-align: middle;
31
+ fill: #fff;
32
+ }
33
+
34
+ .dpsp-pin-it-button.dpsp-pin-it-button-top-left { top: 10px; left: 10px; }
35
+ .dpsp-pin-it-button.dpsp-pin-it-button-top-right { top: 10px; right: 10px; }
36
+ .dpsp-pin-it-button.dpsp-pin-it-button-bottom-left { bottom: 10px; left: 10px; }
37
+ .dpsp-pin-it-button.dpsp-pin-it-button-bottom-right { bottom: 10px; right: 10px; }
38
+ .dpsp-pin-it-button.dpsp-pin-it-button-center { top: 50%; left: 50%; transform: translate(-50%, -50%); white-space: nowrap;}
39
+
40
+ .dpsp-pin-it-button.dpsp-pin-it-button-shape-rectangular { border-radius: 0; }
41
+ .dpsp-pin-it-button.dpsp-pin-it-button-shape-rounded { border-radius: 4px; }
42
+ .dpsp-pin-it-button.dpsp-pin-it-button-shape-circle { border-radius: 40px; }
43
+
44
+ .dpsp-pin-it-wrapper .dpsp-pin-it-overlay { display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #fff; opacity: 0; visibility: hidden; transition: all 0.25s ease-in-out; pointer-events: none; }
45
+ .dpsp-pin-it-wrapper:hover .dpsp-pin-it-overlay { opacity: 0.4; visibility: visible; }
assets/src/css/lib/buttons/pop-up.scss ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ .dpsp-networks-btns-wrapper.dpsp-networks-btns-pop-up.dpsp-column-auto {
2
+ text-align: center;
3
+ li {
4
+ display: inline-block;
5
+ float: none;
6
+ }
7
+ }
assets/src/css/lib/buttons/shortcode.scss ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ /*****************************************/
2
+ /* Shortcode Buttons
3
+ /*****************************************/
4
+ .dpsp-shortcode-wrapper { margin-bottom: 1.2em; }
assets/src/css/lib/buttons/sidebar.scss ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*****************************************/
2
+ /* Floating Sidebar Buttons
3
+ /*****************************************/
4
+ #dpsp-floating-sidebar {
5
+ position: fixed;
6
+ top: 50%;
7
+ transform: translateY(-50%);
8
+ z-index: 9998;
9
+ }
10
+
11
+ #dpsp-floating-sidebar.dpsp-position-left {
12
+ left: 0;
13
+ }
14
+
15
+ #dpsp-floating-sidebar.dpsp-position-right {
16
+ right: 0;
17
+ }
18
+
19
+ .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar li {
20
+ float: none;
21
+ margin-left: 0;
22
+ }
23
+
24
+ .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn {
25
+ padding: 0;
26
+ width: 40px;
27
+ }
28
+
29
+ .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon {
30
+ border-color: transparent !important;
31
+ background: transparent !important;
32
+ }
33
+
34
+
35
+ .dpsp-size-medium .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon-inner {
36
+ height: 41px;
37
+ }
38
+
39
+ .dpsp-size-large .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon-inner {
40
+ height: 46px;
41
+ }
42
+
43
+ .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-has-count .dpsp-network-icon {
44
+ height: 22px;
45
+ line-height: 22px;
46
+ }
47
+
48
+ .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-has-count .dpsp-network-icon-inner {
49
+ height: 18px;
50
+ }
51
+
52
+ /* Sidebar animations */
53
+ #dpsp-floating-sidebar.dpsp-no-animation {
54
+ display: none;
55
+ }
56
+ #dpsp-floating-sidebar.dpsp-no-animation.opened {
57
+ display: block;
58
+ }
59
+
60
+ /* Animation 1 */
61
+ #dpsp-floating-sidebar.dpsp-animation-1 {
62
+ opacity: 0;
63
+ transition: opacity 0.2s ease-in-out;
64
+ }
65
+ #dpsp-floating-sidebar.dpsp-animation-1.opened {
66
+ opacity: 1;
67
+ }
68
+
69
+ /* Animation 2 */
70
+ #dpsp-floating-sidebar.dpsp-position-left.dpsp-animation-2,
71
+ #dpsp-floating-sidebar.dpsp-position-left.dpsp-shape-circle.dpsp-animation-2 {
72
+ left: -60px;
73
+ transition: left 0.2s ease-in-out;
74
+ }
75
+ #dpsp-floating-sidebar.dpsp-position-left.dpsp-animation-2.opened {
76
+ left: 0;
77
+ }
78
+ #dpsp-floating-sidebar.dpsp-position-left.dpsp-shape-circle.dpsp-animation-2.opened {
79
+ left: 12px;
80
+ }
81
+
82
+ #dpsp-floating-sidebar.dpsp-position-right.dpsp-animation-2,
83
+ #dpsp-floating-sidebar.dpsp-position-right.dpsp-shape-circle.dpsp-animation-2 {
84
+ right: -60px;
85
+ transition: right 0.2s ease-in-out;
86
+ }
87
+ #dpsp-floating-sidebar.dpsp-position-right.dpsp-animation-2.opened {
88
+ right: 0;
89
+ }
90
+ #dpsp-floating-sidebar.dpsp-position-right.dpsp-shape-circle.dpsp-animation-2.opened {
91
+ right: 10px;
92
+ }
93
+
94
+ /* Sidebar buttons option - rounded */
95
+ .dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn,
96
+ .dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon {
97
+ border-radius: 0;
98
+ }
99
+
100
+ .dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first,
101
+ .dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first .dpsp-network-icon {
102
+ -webkit-border-top-right-radius: 4px;
103
+ -moz-border-radius-topright: 4px;
104
+ border-top-right-radius: 4px;
105
+ }
106
+
107
+ .dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last,
108
+ .dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last .dpsp-network-icon {
109
+ -webkit-border-bottom-right-radius: 4px;
110
+ -moz-border-radius-bottomright: 4px;
111
+ border-bottom-right-radius: 4px;
112
+ }
113
+
114
+ .dpsp-position-left.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn,
115
+ .dpsp-position-left.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon {
116
+ -webkit-border-top-right-radius: 4px;
117
+ -moz-border-radius-topright: 4px;
118
+ border-top-right-radius: 4px;
119
+ -webkit-border-bottom-right-radius: 4px;
120
+ -moz-border-radius-bottomright: 4px;
121
+ border-bottom-right-radius: 4px;
122
+ }
123
+
124
+
125
+ .dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first,
126
+ .dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first .dpsp-network-icon {
127
+ -webkit-border-top-left-radius: 4px;
128
+ -moz-border-radius-topleft: 4px;
129
+ border-top-left-radius: 4px;
130
+ }
131
+
132
+ .dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last,
133
+ .dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last .dpsp-network-icon {
134
+ -webkit-border-bottom-left-radius: 4px;
135
+ -moz-border-radius-bottomleft: 4px;
136
+ border-bottom-left-radius: 4px;
137
+ }
138
+
139
+ .dpsp-position-right.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn,
140
+ .dpsp-position-right.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon {
141
+ -webkit-border-top-left-radius: 4px;
142
+ -moz-border-radius-topleft: 4px;
143
+ border-top-left-radius: 4px;
144
+ -webkit-border-bottom-left-radius: 4px;
145
+ -moz-border-radius-bottomleft: 4px;
146
+ border-bottom-left-radius: 4px;
147
+ }
148
+
149
+ .dpsp-shape-rounded.dpsp-has-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon {
150
+ border-radius: 4px;
151
+ }
152
+
153
+ /* Sidebar buttons option - circle */
154
+ #dpsp-floating-sidebar.dpsp-position-left.dpsp-shape-circle {
155
+ left: 12px;
156
+ }
157
+
158
+ #dpsp-floating-sidebar.dpsp-position-right.dpsp-shape-circle {
159
+ right: 10px;
160
+ }
161
+
162
+ /* Sidebar buttons bottom spacing */
163
+ .dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn {
164
+ margin-bottom: 6px;
165
+ }
166
+
167
+ .dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn {
168
+ -webkit-border-top-right-radius: 4px;
169
+ -moz-border-radius-topright: 4px;
170
+ border-top-right-radius: 4px;
171
+
172
+ -webkit-border-bottom-right-radius: 4px;
173
+ -moz-border-radius-bottomright: 4px;
174
+ border-bottom-right-radius: 4px;
175
+ }
176
+
177
+ /*
178
+ * Sidebar buttons style 2
179
+ */
180
+ #dpsp-floating-sidebar.dpsp-style-2 .dpsp-network-btn .dpsp-network-icon {
181
+ background: none;
182
+ }
183
+
184
+
185
+ /**
186
+ * Sidebar button hover label
187
+ *
188
+ */
189
+ #dpsp-floating-sidebar .dpsp-networks-btns-wrapper li { position: relative; overflow: visible; }
190
+
191
+ #dpsp-floating-sidebar .dpsp-networks-btns-wrapper .dpsp-network-label { position: absolute; z-index: 1; display: inline-block; width: auto; white-space: nowrap; top: 50%; margin-top: -15px; height: 30px; padding: 6px 12px; color: #fff; font-size: 12px; font-weight: normal; line-height: 18px; background: #34495e; border-radius: 3px; visibility: hidden; opacity: 0; transition: all 0.2s ease-in-out; box-sizing: border-box; }
192
+ #dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper .dpsp-network-label { left: 100%; }
193
+ #dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper .dpsp-network-label { right: 100%; }
194
+
195
+ #dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper li.dpsp-hover .dpsp-network-label { transform: translateX(10px); visibility: visible; opacity: 1; }
196
+ #dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper li.dpsp-hover .dpsp-network-label { transform: translateX(-10px); visibility: visible; opacity: 1; }
197
+
198
+ #dpsp-floating-sidebar .dpsp-networks-btns-wrapper .dpsp-network-label:before { content: ''; display: block; position: absolute; top: 50%; margin-top: -5px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
199
+ #dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper .dpsp-network-label:before { left: -5px; border-right: 5px solid #34495e; }
200
+ #dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper .dpsp-network-label:before { right: -5px; border-left: 5px solid #34495e; }
201
+
202
+ /** Hide Labels on admin **/
203
+ .dpsp-settings-button-style .dpsp-networks-btns-sidebar .dpsp-network-label {
204
+ display: none;
205
+ }
assets/src/css/lib/buttons/sticky.scss ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*****************************************/
2
+ /* Sticky Bar Buttons
3
+ /*****************************************/
4
+
5
+ /* Desktop */
6
+ #dpsp-sticky-bar-wrapper {
7
+ position: fixed;
8
+ z-index: 1000;
9
+ bottom: 0;
10
+ left: 0;
11
+ width: 100%;
12
+ background: #fff;
13
+ /* Position */
14
+ &.dpsp-position-desktop-top {
15
+ bottom: auto;
16
+ top: 0;
17
+ }
18
+ &.dpsp-position-desktop-bottom {
19
+ bottom: 0;
20
+ top: auto;
21
+ }
22
+ &.dpsp-no-animation {
23
+ visibility: hidden;
24
+ opacity: 0;
25
+ }
26
+ &.dpsp-no-animation.opened {
27
+ visibility: visible;
28
+ opacity: 1;
29
+ }
30
+ }
31
+
32
+ #dpsp-sticky-bar {
33
+ display: none;
34
+ position: relative;
35
+ margin: 7px 0;
36
+ box-sizing: border-box;
37
+ .dpsp-networks-btns-wrapper {
38
+ display: flex;
39
+ li {
40
+ float: none;
41
+ flex: 1;
42
+ margin-bottom: 0;
43
+ margin-left: 3px;
44
+ margin-right: 3px;
45
+ &:last-of-type {
46
+ margin-right: 0;
47
+ }
48
+ }
49
+ }
50
+ .dpsp-network-btn {
51
+ padding-left: 1em;
52
+ padding-right: 1em;
53
+ text-align: center;
54
+ .dpsp-network-icon {
55
+ display: inline-block;
56
+ position: relative;
57
+ width: 20px;
58
+ overflow: visible;
59
+ }
60
+ &.dpsp-has-count .dpsp-network-icon {
61
+ margin-right: 5px;
62
+ }
63
+ }
64
+ }
65
+
66
+ /* Mobile */
67
+ #dpsp-sticky-bar-wrapper.dpsp-is-mobile {
68
+ &.dpsp-position-mobile-top {
69
+ bottom: auto;
70
+ top: 0;
71
+ }
72
+ &.dpsp-position-mobile-bottom {
73
+ bottom: 0;
74
+ top: auto;
75
+ }
76
+ #dpsp-sticky-bar {
77
+ position: static;
78
+ margin: 0;
79
+ width: 100% !important;
80
+ padding: 0;
81
+
82
+ .dpsp-networks-btns-wrapper li {
83
+ margin: 0;
84
+ }
85
+
86
+ .dpsp-network-btn {
87
+ padding-left: 0;
88
+ padding-right: 0;
89
+ text-align: center;
90
+ height: 44px;
91
+ max-height: 44px;
92
+ line-height: 40px;
93
+ border-radius: 0;
94
+
95
+ .dpsp-network-icon {
96
+ position: relative;
97
+ left: auto;
98
+ display: inline-block;
99
+ float: none;
100
+ font-size: 18px;
101
+ line-height: 40px;
102
+ }
103
+
104
+ &.dpsp-has-count .dpsp-network-icon {
105
+ position: absolute;
106
+ display: block;
107
+ width: 100%;
108
+ height: 26px;
109
+ line-height: 26px;
110
+ }
111
+
112
+ .dpsp-network-count {
113
+ position: absolute;
114
+ bottom: 0;
115
+ left: 0;
116
+ width: 100%;
117
+ margin-left: 0;
118
+ font-size: 11px;
119
+ text-align: center;
120
+ height: 20px;
121
+ line-height: 20px;
122
+ }
123
+ }
124
+ }
125
+ }
126
+
127
+ /* Animation 1 */
128
+ #dpsp-sticky-bar-wrapper.dpsp-animation-1 {
129
+ visibility: hidden;
130
+ opacity: 0;
131
+ transition: opacity 0.2s ease-in-out;
132
+ }
133
+
134
+ #dpsp-sticky-bar-wrapper.dpsp-animation-1.opened {
135
+ visibility: visible;
136
+ opacity: 1;
137
+ }
138
+
139
+ /* Animation 2 */
140
+ #dpsp-sticky-bar-wrapper:not(.dpsp-is-mobile).dpsp-position-desktop-bottom.dpsp-animation-2,
141
+ #dpsp-sticky-bar-wrapper.dpsp-is-mobile.dpsp-position-mobile-bottom.dpsp-animation-2 {
142
+ visibility: hidden;
143
+ bottom: -88px;
144
+ transition: bottom 0.3s ease-in-out, visibility 0.3s ease-in-out;
145
+ }
146
+
147
+ #dpsp-sticky-bar-wrapper:not(.dpsp-is-mobile).dpsp-position-desktop-bottom.dpsp-animation-2.opened,
148
+ #dpsp-sticky-bar-wrapper.dpsp-is-mobile.dpsp-position-mobile-bottom.dpsp-animation-2.opened {
149
+ visibility: visible;
150
+ bottom: 0px;
151
+ }
152
+
153
+ #dpsp-sticky-bar-wrapper:not(.dpsp-is-mobile).dpsp-position-desktop-top.dpsp-animation-2,
154
+ #dpsp-sticky-bar-wrapper.dpsp-is-mobile.dpsp-position-mobile-top.dpsp-animation-2 {
155
+ visibility: hidden;
156
+ top: -88px;
157
+ bottom: auto;
158
+ transition: top 0.3s ease-in-out, visibility 0.3s ease-in-out;
159
+ }
160
+
161
+ #dpsp-sticky-bar-wrapper:not(.dpsp-is-mobile).dpsp-position-desktop-top.dpsp-animation-2.opened,
162
+ #dpsp-sticky-bar-wrapper.dpsp-is-mobile.dpsp-position-mobile-top.dpsp-animation-2.opened {
163
+ visibility: visible;
164
+ top: 0px;
165
+ }
166
+
167
+ /* Admin bar */
168
+ @media screen and (min-width: 782px) {
169
+
170
+ body.admin-bar #dpsp-sticky-bar-wrapper {
171
+ margin-top: 32px;
172
+ }
173
+
174
+ }
assets/src/css/lib/buttons/style-variations.scss ADDED
@@ -0,0 +1,261 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ @import './mixins';
3
+
4
+ /*****************************************/
5
+ /* Button styles
6
+ /*****************************************/
7
+
8
+ /*
9
+ * Buttons Style 1
10
+ */
11
+ .dpsp-button-style-1 .dpsp-network-btn {
12
+ color: #fff !important;
13
+ &.dpsp-no-label, &.dpsp-has-count:not(.dpsp-has-label) {
14
+ justify-content: center;
15
+ }
16
+ .dpsp-network-icon svg {
17
+ fill: #fff !important;
18
+ }
19
+ }
20
+
21
+ /*
22
+ * Buttons Style 2
23
+ */
24
+ .dpsp-button-style-2 .dpsp-networks-btns-wrapper:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn {
25
+ color: #fff !important;
26
+ .dpsp-network-icon svg {
27
+ fill: #fff !important;
28
+ }
29
+ &.dpsp-no-label, &.dpsp-has-count:not(.dpsp-has-label) {
30
+ justify-content: center;
31
+ }
32
+ }
33
+ @include style2Colors( "facebook", #334d87, #334d87 );
34
+ @include style2Colors( "twitter", #0099d7, #0099d7 );
35
+ @include style2Colors( "pinterest", #b31e24, #b31e24 );
36
+ @include style2Colors( "linkedin", #00669c, #00669c );
37
+ @include style2Colors( "reddit", #ff4200, #ff4200 );
38
+ @include style2Colors( "vkontakte", #456992, #456992 );
39
+ @include style2Colors( "whatsapp", #21c960, #21c960 );
40
+ @include style2Colors( "instagram", #a9257e, #a9257e );
41
+ @include style2Colors( "youtube", #a20000, #a20000 );
42
+ @include style2Colors( "vimeo", #2bb2ff, #2bb2ff );
43
+ @include style2Colors( "soundcloud", #e64c00, #e64c00 );
44
+ @include style2Colors( "twitch", #593a93, #593a93 );
45
+ @include style2Colors( "yummly", #d84d1a, #d84d1a );
46
+ @include style2Colors( "behance", #0053e6, #0053e6 );
47
+ @include style2Colors( "email", #239e57, #239e57 );
48
+ @include style2Colors( "print", #afb6bb, #afb6bb );
49
+ @include style2Colors( "pocket", #e63c51, #e63c51 );
50
+ @include style2Colors( "buffer", #21282f, #21282f );
51
+ @include style2Colors( "tumblr", #2e3d50, #2e3d50 );
52
+ @include style2Colors( "xing", #006a6c, #006a6c );
53
+ @include style2Colors( "github", #222222, #222222 );
54
+ @include style2Colors( "flipboard", #d21d1d, #d21d1d );
55
+ @include style2Colors( "telegram", #0077b3, #0077b3 );
56
+ @include style2Colors( "medium", #111, #111 );
57
+ @include style2Colors( "mix", #fd721c, #fd721c );
58
+
59
+ /* For floating sidebar */
60
+ .dpsp-button-style-2 .dpsp-networks-btns-sidebar .dpsp-network-btn,
61
+ .dpsp-button-style-2 .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon { background: transparent !important; }
62
+
63
+ /*
64
+ * Buttons Style 3
65
+ */
66
+ .dpsp-button-style-3 .dpsp-networks-btns-wrapper {
67
+ .dpsp-network-btn.dpsp-no-label,
68
+ .dpsp-network-btn.dpsp-has-count:not(.dpsp-has-label) {
69
+ justify-content: center;
70
+ }
71
+ &:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn .dpsp-network-icon svg {
72
+ fill: #fff !important;
73
+ }
74
+ }
75
+ .dpsp-button-style-3 .dpsp-networks-btns-wrapper {
76
+ .dpsp-network-btn:not(.dpsp-no-label):not(:hover):not(:focus):not(.dpsp-has-count),
77
+ .dpsp-network-btn.dpsp-has-count.dpsp-has-label:not(:hover):not(:focus) {
78
+ background: transparent;
79
+ }
80
+ &:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn {
81
+ &:hover, &:focus, &.dpsp-has-count:not(.dpsp-has-label) {
82
+ color: #fff;
83
+ }
84
+ }
85
+ }
86
+
87
+ /*
88
+ * Sidebar buttons
89
+ */
90
+ .dpsp-networks-btns-sidebar .dpsp-network-btn {
91
+ background: transparent;
92
+ border-color: transparent;
93
+ .dpsp-network-icon {
94
+ background: transparent;
95
+ border-color: transparent;
96
+ }
97
+ &:hover, &:focus {
98
+ border-color: transparent;
99
+ .dpsp-network-icon {
100
+ background: transparent;
101
+ border-color: transparent;
102
+ }
103
+ }
104
+ }
105
+
106
+ .dpsp-button-style-4 {
107
+ &.dpsp-shape-rounded .dpsp-network-btn .dpsp-network-icon {
108
+ border-radius: 4px;
109
+ }
110
+ .dpsp-networks-btns-wrapper .dpsp-network-btn {
111
+ &.dpsp-has-label {
112
+ color: #fff;
113
+ }
114
+ &.dpsp-no-label, &.dpsp-has-count:not(.dpsp-has-label) {
115
+ justify-content: center;
116
+ &:not(:hover):not(:focus) {
117
+ background-color: transparent;
118
+ }
119
+ .dpsp-network-icon {
120
+ border-color: transparent;
121
+ background-color: transparent;
122
+ }
123
+ }
124
+ .dpsp-network-icon {
125
+ background: #fff;
126
+ }
127
+ &:hover, &:focus {
128
+ color: #fff;
129
+ .dpsp-network-icon {
130
+ background: transparent;
131
+ svg {
132
+ fill: #fff;
133
+ }
134
+ }
135
+ }
136
+ }
137
+ }
138
+
139
+ /*
140
+ * Buttons Style 5
141
+ */
142
+ .dpsp-button-style-5 {
143
+ .dpsp-network-btn {
144
+ .dpsp-network-icon {
145
+ border-color: transparent !important;
146
+ }
147
+ }
148
+ .dpsp-networks-btns-wrapper .dpsp-network-btn {
149
+ background: transparent;
150
+ .dpsp-network-icon {
151
+ background: transparent;
152
+ }
153
+ &:hover, &:focus {
154
+ color: #fff !important;
155
+ border-color: transparent !important;
156
+ .dpsp-network-icon {
157
+ background: transparent;
158
+ svg {
159
+ fill: #fff !important;
160
+ }
161
+ }
162
+ }
163
+ &.dpsp-no-label, &.dpsp-has-count:not(.dpsp-has-label) {
164
+ justify-content: center;
165
+ }
166
+ }
167
+ }
168
+
169
+ /*
170
+ * Buttons Style 6
171
+ */
172
+ .dpsp-button-style-6 {
173
+ &.dpsp-shape-rounded .dpsp-network-btn .dpsp-network-icon {
174
+ border-radius: 4px;
175
+ }
176
+ .dpsp-networks-btns-wrapper .dpsp-network-btn {
177
+ background: transparent !important;
178
+ border-color: transparent !important;
179
+ &.dpsp-no-label, &.dpsp-has-count:not(.dpsp-has-label) {
180
+ max-width: 40px;
181
+ }
182
+ .dpsp-network-icon svg {
183
+ fill: #fff !important;
184
+ }
185
+ &:hover, &:focus {
186
+ border-color: transparent !important;
187
+ }
188
+ }
189
+ &.dpsp-size-small .dpsp-networks-btns-wrapper .dpsp-network-btn {
190
+ &.dpsp-no-label, &.dpsp-has-count:not(.dpsp-has-label) {
191
+ max-width: 32px;
192
+ }
193
+ }
194
+ }
195
+
196
+ /*
197
+ * Buttons Style 7
198
+ */
199
+ .dpsp-button-style-7 {
200
+ &.dpsp-shape-rounded .dpsp-network-btn .dpsp-network-icon {
201
+ border-radius: 4px;
202
+ }
203
+ .dpsp-networks-btns-wrapper .dpsp-network-btn {
204
+ background: transparent;
205
+ &.dpsp-no-label {
206
+ border-color: transparent;
207
+ }
208
+ .dpsp-network-icon {
209
+ background: transparent;
210
+ }
211
+ &.dpsp-no-label, &.dpsp-has-count:not(.dpsp-has-label) {
212
+ max-width: 40px;
213
+ }
214
+ &:hover, &:focus {
215
+ background: transparent !important;
216
+ .dpsp-network-icon svg {
217
+ fill: #fff !important;
218
+ }
219
+ }
220
+ &.dpsp-size-small .dpsp-networks-btns-wrapper .dpsp-network-btn {
221
+ &.dpsp-no-label, &.dpsp-has-count:not(.dpsp-has-label) {
222
+ max-width: 32px;
223
+ }
224
+ }
225
+ }
226
+ }
227
+
228
+ /*
229
+ * Buttons Style 8
230
+ */
231
+ .dpsp-button-style-8 .dpsp-networks-btns-wrapper {
232
+ .dpsp-network-btn {
233
+ border-color: transparent;
234
+ background: transparent;
235
+ &.dpsp-no-label, &.dpsp-has-count:not(.dpsp-has-label) {
236
+ max-width: 40px;
237
+ }
238
+ &:hover, &:focus {
239
+ border-color: transparent;
240
+ background: transparent;
241
+ .dpsp-network-icon {
242
+ border-color: transparent;
243
+ background: transparent;
244
+ }
245
+ }
246
+ .dpsp-network-icon {
247
+ border-color: transparent;
248
+ background: transparent;
249
+ }
250
+ }
251
+ &:not(.dpsp-networks-btns-sidebar) .dpsp-network-btn {
252
+ .dpsp-network-icon {
253
+ margin-right: -10px;
254
+ }
255
+ }
256
+ }
257
+ .dpsp-button-style-8.dpsp-size-small .dpsp-networks-btns-wrapper .dpsp-network-btn {
258
+ &.dpsp-no-label, &.dpsp-has-count:not(.dpsp-has-label) {
259
+ max-width: 32px;
260
+ }
261
+ }
assets/src/css/lib/click-to-tweet.scss ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*****************************************/
2
+ /* Click to Tweet
3
+ /*****************************************/
4
+ .dpsp-click-to-tweet {
5
+ position: relative;
6
+ display: block;
7
+ margin: 1.5em 0;
8
+ font-size: 105%;
9
+ text-decoration: none;
10
+ box-shadow: none !important;
11
+ transition: all 0.15s ease-in;
12
+ }
13
+
14
+ .dpsp-click-to-tweet:hover {
15
+ box-shadow: none !important;
16
+ }
17
+
18
+ .dpsp-click-to-tweet.dpsp-has-avatar {
19
+ padding-left: 120px !important;
20
+ min-height: 115px;
21
+ }
22
+
23
+ .dpsp-click-to-tweet.dpsp-has-avatar .avatar {
24
+ position: absolute;
25
+ top: 15px;
26
+ left: 15px;
27
+ border-radius: 50%;
28
+ box-shadow: none !important;
29
+ }
30
+
31
+ .dpsp-click-to-tweet:after,
32
+ .dpsp-click-to-tweet-footer:after {
33
+ content: '';
34
+ display: block;
35
+ clear: both;
36
+ }
37
+
38
+ .dpsp-click-to-tweet-content { display: block; position: relative; z-index: 2; font-family: 'Georgia'; font-size: 18px; line-height: 1.5; text-align: left; }
39
+
40
+ .dpsp-click-to-tweet-footer {
41
+ display: block;
42
+ font-family: 'Arial';
43
+ font-weight: bold;
44
+ font-size: 14px;
45
+ color: #999;
46
+ margin-top: 1em;
47
+ }
48
+
49
+ /* Call to Action with Icon */
50
+ .dpsp-click-to-tweet.dpsp-click-to-tweet-cta-left .dpsp-click-to-tweet-cta { float: left; }
51
+ .dpsp-click-to-tweet.dpsp-click-to-tweet-cta-right .dpsp-click-to-tweet-cta { float: right; }
52
+
53
+ .dpsp-click-to-tweet-cta {
54
+ color: #00abf0;
55
+ line-height: 1;
56
+ }
57
+ .dpsp-click-to-tweet-cta svg {
58
+ fill: #00abf0;
59
+ }
60
+ .dpsp-click-to-tweet-cta .dpsp-twitter {
61
+ display: inline-block;
62
+ position: relative;
63
+ font-size: 20px;
64
+ width: 20px;
65
+ height: 20px;
66
+ vertical-align: middle;
67
+ }
68
+ .dpsp-click-to-tweet-cta > span {
69
+ margin-right: 10px;
70
+ vertical-align: middle;
71
+ }
72
+ .dpsp-click-to-tweet:hover .dpsp-twitter .dpsp-network-icon-inner {
73
+ transition: all 0.2s ease-in-out;
74
+ }
75
+ .dpsp-click-to-tweet.dpsp-click-to-tweet-cta-icon-animation:hover .dpsp-click-to-tweet-cta .dpsp-twitter .dpsp-network-icon-after {
76
+ margin-left: -10px;
77
+ opacity: 1;
78
+ }
79
+ .dpsp-click-to-tweet.dpsp-click-to-tweet-cta-icon-animation:hover .dpsp-click-to-tweet-cta .dpsp-twitter .dpsp-network-icon-before {
80
+ margin-left: 10px;
81
+ opacity: 0;
82
+ }
83
+
84
+
85
+ /* Click to Tweet Style 1 */
86
+ a.dpsp-click-to-tweet.dpsp-style-1 {
87
+ border: 0;
88
+ border-left: 5px solid #00abf0;
89
+ color: #555;
90
+ padding: 15px 5px 5px 30px;
91
+ }
92
+ a.dpsp-click-to-tweet.dpsp-style-1:hover {
93
+ border-left: 5px solid #0099d7;
94
+ }
95
+
96
+ /* Click to Tweet Style 2 */
97
+ a.dpsp-click-to-tweet.dpsp-style-2 {
98
+ border: 0;
99
+ border-left: 5px solid #00abf0;
100
+ color: #555;
101
+ background: #f6f6f6;
102
+ padding: 20px 30px 20px 30px;
103
+ }
104
+ a.dpsp-click-to-tweet.dpsp-style-2:hover {
105
+ border-left: 5px solid #0099d7;
106
+ }
107
+
108
+ /* Click to Tweet Style 3 */
109
+ a.dpsp-click-to-tweet.dpsp-style-3 {
110
+ border: 1px solid #e1e1e1;
111
+ border-radius: 3px;
112
+ color: #838383;
113
+ padding: 20px 30px 20px 30px;
114
+ }
115
+ a.dpsp-click-to-tweet.dpsp-style-3:hover {
116
+ color: #555;
117
+ }
118
+
119
+ /* Click to Tweet Style 4 */
120
+ a.dpsp-click-to-tweet.dpsp-style-4 {
121
+ border: 4px double #e1e1e1;
122
+ border-radius: 0;
123
+ color: #838383;
124
+ padding: 20px 30px 20px 30px;
125
+ }
126
+ a.dpsp-click-to-tweet.dpsp-style-4:hover {
127
+ color: #555;
128
+ }
129
+
130
+ /* Click to Tweet Style 5 */
131
+ a.dpsp-click-to-tweet.dpsp-style-5 {
132
+ border: 0;
133
+ border-left: 0px solid transparent;
134
+ border-radius: 3px;
135
+ color: #fff;
136
+ background: #00abf0;
137
+ padding: 20px 30px 20px 30px;
138
+ transition: border 0.2s ease-in-out;
139
+ }
140
+ a.dpsp-click-to-tweet.dpsp-style-5 .dpsp-click-to-tweet-cta {
141
+ color: #fff;
142
+ }
143
+ a.dpsp-click-to-tweet.dpsp-style-5 .dpsp-click-to-tweet-cta svg {
144
+ fill: #fff;
145
+ }
146
+ a.dpsp-click-to-tweet.dpsp-style-5:hover {
147
+ color: #fff;
148
+ border-left: 9px solid #0099D7;
149
+ }
150
+ a.dpsp-click-to-tweet.dpsp-style-5 .dpsp-click-to-tweet-content,
151
+ a.dpsp-click-to-tweet.dpsp-style-5 .dpsp-click-to-tweet-footer,
152
+ a.dpsp-click-to-tweet.dpsp-style-5 > img {
153
+ transition: margin-left 0.2s ease-in-out;
154
+ }
155
+ a.dpsp-click-to-tweet.dpsp-style-5:hover .dpsp-click-to-tweet-content,
156
+ a.dpsp-click-to-tweet.dpsp-style-5:hover .dpsp-click-to-tweet-footer,
157
+ a.dpsp-click-to-tweet.dpsp-style-5:hover > img {
158
+ margin-left: -9px;
159
+ }
assets/src/css/lib/follow-widget.scss ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*****************************************/
2
+ /* Widget: Follow Buttons
3
+ /*****************************************/
4
+ .dpsp-shortcode-follow-wrapper {
5
+ & > .dpsp-networks-btns-follow-widget {
6
+ display: flex;
7
+ flex-flow: row wrap;
8
+ }
9
+ &.dpsp-follow-align-left {
10
+ & > .dpsp-networks-btns-follow-widget {
11
+ justify-content: flex-start;
12
+ }
13
+ }
14
+ &.dpsp-follow-align-center {
15
+ & > .dpsp-networks-btns-follow-widget {
16
+ justify-content: center;
17
+ }
18
+ }
19
+ &.dpsp-follow-align-right {
20
+ & > .dpsp-networks-btns-follow-widget {
21
+ justify-content: flex-end;
22
+ }
23
+ }
24
+ }
assets/src/css/lib/icons-general.scss ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*****************************************/
2
+ /* General: Icons
3
+ /*****************************************/
4
+ .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon {
5
+ align-self: start;
6
+ display: block;
7
+ font-size: 14px;
8
+ line-height: 36px;
9
+ width: 40px;
10
+ height:40px;
11
+ position: relative;
12
+ top: -2px;
13
+ left: -2px;
14
+ text-align: center;
15
+ border: 2px solid;
16
+ flex: 0 0 auto;
17
+ -moz-box-sizing: border-box;
18
+ box-sizing: border-box;
19
+
20
+ -moz-transition: all 0.15s ease-in;
21
+ -webkit-transition: all 0.15s ease-in;
22
+ -o-transition: all 0.15s ease-in;
23
+ transition: all 0.15s ease-in;
24
+ }
25
+
26
+ .dpsp-network-icon .dpsp-network-icon-inner svg,
27
+ .dpsp-icon-total-share svg {
28
+ position: relative;
29
+ top: 0.1em;
30
+ max-height: 14px;
31
+ width: auto;
32
+ overflow:visible;
33
+ transition: fill 0.15s ease-in-out;
34
+ .dpsp-size-large & {
35
+ max-height: 22px;
36
+ }
37
+ }
38
+
39
+ .widget_dpsp_social_media_follow .dpsp-network-icon .dpsp-network-icon-inner svg {
40
+ top: 0.05em;
41
+ }
42
+
43
+ .dpsp-network-icon-inner,
44
+ .dpsp-icon-total-share {
45
+ display: flex;
46
+ align-items: center;
47
+ justify-content: center;
48
+ }
49
+ .dpsp-network-icon-inner {
50
+ transition: all 0.2s ease;
51
+ height: 36px;
52
+ }
53
+
54
+
55
+ /* Button animations */
56
+ .dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon-inner {
57
+ transition: all 0.2s cubic-bezier(.62, 3.15, .4, -0.64);
58
+ transform: scale(1.5);
59
+ }
60
+
assets/src/css/lib/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
assets/src/css/lib/pop-up.scss ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*****************************************/
2
+ /* Pop-Up Buttons
3
+ /*****************************************/
4
+ #dpsp-pop-up {
5
+ position: fixed;
6
+ max-width: 750px;
7
+ width: 100%;
8
+ padding: 40px;
9
+ background: #fff;
10
+ border-radius: 10px;
11
+ z-index: 9999;
12
+ opacity: 0;
13
+ transform: translate(-50%,-50%);
14
+ -moz-transition: all 0.25s ease-in-out;
15
+ -webkit-transition: all 0.25s ease-in-out;
16
+ -o-transition: all 0.25s ease-in-out;
17
+ transition: all 0.25s ease-in-out;
18
+ }
19
+ #dpsp-pop-up.dpsp-animation-1 { transform:translate(-50%,-50%) scale(0.1); }
20
+ #dpsp-pop-up.dpsp-animation-3 { transform:translate(-50%,0%) }
21
+ #dpsp-pop-up.dpsp-animation-4 { transform:translate(-50%,-100%) }
22
+
23
+ #dpsp-pop-up.no-animation,
24
+ #dpsp-pop-up-overlay.no-animation {
25
+ -moz-transition: none;
26
+ -webkit-transition: none;
27
+ -o-transition: none;
28
+ transition: none;
29
+ }
30
+
31
+ #dpsp-pop-up.opened {
32
+ top: 50%;
33
+ left: 50%;
34
+ transform: scale(1) translate(-50%,-50%);
35
+ opacity: 1;
36
+ }
37
+
38
+ #dpsp-pop-up-overlay {
39
+ display: block;
40
+ position: fixed;
41
+ top: 0;
42
+ left: 0;
43
+ width: 0;
44
+ height: 0;
45
+ z-index: 9998;
46
+ background: #000;
47
+ opacity: 0;
48
+
49
+ -moz-transition: opacity 0.25s ease-in-out, margin 0.25s ease-in-out;
50
+ -webkit-transition: opacity 0.25s ease-in-out, margin 0.25s ease-in-out;
51
+ -o-transition: opacity 0.25s ease-in-out, margin 0.25s ease-in-out;
52
+ transition: opacity 0.25s ease-in-out, margin 0.25s ease-in-out;
53
+ }
54
+ #dpsp-pop-up-overlay.opened {
55
+ width: 100%;
56
+ height: 100%;
57
+ opacity: 0.65;
58
+ }
59
+
60
+ #dpsp-pop-up-content {
61
+ text-align: center;
62
+ }
63
+
64
+ #dpsp-pop-up-close {
65
+ position: absolute;
66
+ top: 10px;
67
+ right: 10px;
68
+ display: block;
69
+ width: 22px;
70
+ height: 22px;
71
+ line-height: 22px;
72
+ vertical-align: middle;
73
+ text-align: center;
74
+ cursor: pointer;
75
+ }
76
+
77
+ #dpsp-pop-up-close svg {
78
+ position: relative;
79
+ top: 2px;
80
+ max-height: 16px;
81
+ width: auto;
82
+ vertical-align: top;
83
+ fill: #999;
84
+ }
85
+
86
+ #dpsp-pop-up h2 { margin-bottom: 1em; }
87
+ #dpsp-pop-up h2 p { font-size: inherit; }
88
+ #dpsp-pop-up h2 p:last-of-type { margin-top: 0; margin-bottom: 0; }
89
+ #dpsp-pop-up p { margin-top: 1em; margin-bottom: 1em; }
90
+
91
+ #dpsp-post-bottom {
92
+ height: 0;
93
+ width: 0;
94
+ padding: 0;
95
+ margin: 0;
96
+ }
97
+
98
+ @media screen and ( max-width : 800px ) {
99
+ #dpsp-pop-up {
100
+ width: 90%;
101
+ }
102
+ }
103
+
104
+ @media screen and ( max-width : 720px ) {
105
+ #dpsp-pop-up .dpsp-networks-btns-wrapper li {
106
+ width: 100%;
107
+ margin-left: 0;
108
+ margin-right: 0;
109
+ }
110
+ }
assets/src/css/lib/top-shared-post.scss ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*****************************************/
2
+ /* Widget: Top Shared Posts
3
+ /*****************************************/
4
+ .dpsp-top-shared-post {
5
+ margin-bottom: 2em;
6
+ }
7
+
8
+ .dpsp-top-shared-post-thumbnail {
9
+ display: block;
10
+ margin-bottom: 1.2em;
11
+ }
12
+
13
+ .dpsp-top-shared-post-thumbnail img {
14
+ max-width: 100%;
15
+ height: auto;
16
+ }
17
+
18
+ .dpsp-top-shared-post-title {
19
+ display: inline-block;
20
+ margin-bottom: 0.5em;
21
+ }
assets/src/css/lib/total-shares.scss ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*****************************************/
2
+ /* Total shares
3
+ /*****************************************/
4
+ .dpsp-show-total-share-count {
5
+ position: relative;
6
+ }
7
+
8
+ .dpsp-total-share-wrapper {
9
+ position: relative;
10
+ font-family: 'Helvetica', 'Helvetica Neue', 'Arial', sans-serif;
11
+ margin-top: 10px;
12
+ line-height: 1.345;
13
+ color: #5d6368;
14
+ .dpsp-total-share-count {
15
+ font-size: 15px;
16
+ line-height: 18px;
17
+ white-space: nowrap;
18
+ }
19
+ .dpsp-icon-total-share {
20
+ position: absolute;
21
+ top: 6px;
22
+ left: 0;
23
+ margin-left: 0;
24
+ margin-top: 0;
25
+ svg {
26
+ max-height: 16px;
27
+ top: 2px;
28
+ width: auto;
29
+ fill: #5d6368;
30
+ }
31
+
32
+ }
33
+ #dpsp-floating-sidebar & {
34
+ margin-bottom: 10px;
35
+ .dpsp-icon-total-share {
36
+ display: none;
37
+ }
38
+ }
39
+ span {
40
+ display: block;
41
+ font-size: 9px;
42
+ font-weight: bold;
43
+ text-transform: uppercase;
44
+ text-align: center;
45
+ }
46
+ .dpsp-share-buttons-wrapper &,
47
+ .dpsp-content-wrapper &,
48
+ .dpsp-pop-up-buttons-wrapper &,
49
+ .dpsp-shortcode-wrapper & {
50
+ position: absolute;
51
+ width: 60px;
52
+ height: 40px;
53
+ margin-top: -21px;
54
+ top: 50%;
55
+ padding-left: 20px;
56
+ box-sizing: border-box;
57
+ }
58
+ #dpsp-sticky-bar & {
59
+ height: 32px; margin-top: -16px;
60
+ }
61
+ #dpsp-sticky-bar-wrapper.dpsp-is-mobile & {
62
+ display: none;
63
+ }
64
+
65
+ }
66
+
67
+
68
+
69
+
70
+ .dpsp-share-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before,
71
+ .dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before,
72
+ .dpsp-pop-up-buttons-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before,
73
+ .dpsp-shortcode-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before {
74
+ padding-left: 70px;
75
+ }
76
+
77
+ .dpsp-share-buttons-wrapper,
78
+ .dpsp-content-wrapper,
79
+ .dpsp-pop-up-buttons-wrapper,
80
+ .dpsp-shortcode-wrapper {
81
+ &.dpsp-show-total-share-count.dpsp-show-total-share-count-after {
82
+ padding-right: 70px;
83
+ }
84
+ }
85
+
86
+ .dpsp-share-buttons-wrapper,
87
+ .dpsp-content-wrapper,
88
+ .dpsp-pop-up-buttons-wrapper,
89
+ .dpsp-shortcode-wrapper {
90
+ &.dpsp-show-total-share-count.dpsp-show-total-share-count-before .dpsp-total-share-wrapper {
91
+ left: 0;
92
+ }
93
+ }
94
+
95
+ .dpsp-share-buttons-wrapper,
96
+ .dpsp-content-wrapper,
97
+ .dpsp-pop-up-buttons-wrapper,
98
+ .dpsp-shortcode-wrapper {
99
+ &.dpsp-show-total-share-count.dpsp-show-total-share-count-after .dpsp-total-share-wrapper {
100
+ right: 0;
101
+ }
102
+ }
assets/src/css/{style-dashboard.css → style-dashboard-pro.css} RENAMED
@@ -1,7 +1,9 @@
1
- /**********************************************/
2
  /* Fonts
3
- /**********************************************/
4
- @import url(https://fonts.googleapis.com/css?family=Raleway:300,400,700,800);
 
 
5
 
6
  @font-face {
7
  font-family: 'Social Pug';
@@ -15,10 +17,9 @@
15
  }
16
 
17
  [class^="dpsp-icon-"]:before, [class*=" dpsp-icon-"]:before {
18
- font-family: "Social Pug";
19
  font-style: normal;
20
  font-weight: normal;
21
-
22
  display: inline-block;
23
  text-decoration: inherit;
24
  text-align: center;
@@ -30,18 +31,38 @@
30
  .dpsp-icon-ok:before { content: '\e880'; }
31
  .dpsp-icon-remove:before { content: '\e881'; }
32
  .dpsp-icon-edit:before { content: '\e882'; }
 
33
  .dpsp-icon-facebook:before { content: '\e800'; }
34
  .dpsp-icon-twitter:before { content: '\e801'; }
35
  .dpsp-icon-google-plus:before { content: '\e802'; }
36
  .dpsp-icon-pinterest:before { content: '\e803'; }
37
  .dpsp-icon-linkedin:before { content: '\e804'; }
 
 
 
 
 
 
 
 
 
 
38
  .dpsp-icon-email:before { content: '\e816'; }
39
  .dpsp-icon-print:before { content: '\e817'; }
 
 
 
 
 
 
 
 
 
40
 
41
 
42
- /**********************************************/
43
  /* General
44
- /**********************************************/
45
 
46
  /* Transitions */
47
  .dpsp-transition {
@@ -69,26 +90,16 @@
69
  .dpsp-col-2-5 { width: 40%; }
70
  .dpsp-col-3-5 { width: 60%; }
71
  .dpsp-col-4-5 { width: 80%; }
72
-
73
  .dpsp-col-3-8 { width: 37.5%; }
74
 
75
  .dpsp-row:after { content: ''; display: block; clear: both; }
76
 
77
- /* Admin notices */
78
- .wrap div.dpsp-admin-notice { position: relative; margin-top: 16px; }
79
-
80
-
81
  /* Other */
82
  .dpsp-page-wrapper {
83
- float: left;
84
  position: relative;
 
 
85
  width: 100%;
86
- max-width: 675px;
87
- }
88
-
89
- .dpsp-page-wrapper hr {
90
- border: 0;
91
- border-bottom: 1px solid #e1e1e1;
92
  }
93
 
94
  h1.dpsp-page-title {
@@ -112,46 +123,48 @@ h1.dpsp-page-title {
112
  border-bottom: 1px solid #e5e5e5;
113
  }
114
 
115
- .dpsp-section-title .add-new-h2,
116
- .dpsp-section-title .add-new-h2:focus {
117
- float: right;
118
- padding: 3px 6px;
119
- top: -1px;
120
- margin-left: 15px;
121
- box-shadow: none;
122
- }
123
-
124
- .dpsp-social-platforms .add-new-h2 {
125
- display: inline-block;
126
- padding: 8px 16px;
127
- top: 0;
128
- margin-left: 0;
129
- }
130
-
131
- .dpsp-social-platforms .add-new-h2:active {
132
- top: 0;
133
- margin-left: 0;
134
- padding: 8px 16px;
135
- }
136
-
137
  /* Social Networks background colors */
138
  .dpsp-background-color-network-facebook { background: #3a579a; }
139
  .dpsp-background-color-network-twitter { background: #00abf0; }
140
  .dpsp-background-color-network-google-plus { background: #df4a32; }
141
  .dpsp-background-color-network-pinterest { background: #c92228; }
142
  .dpsp-background-color-network-linkedin { background: #0077b5; }
 
 
 
 
 
 
 
 
 
 
143
  .dpsp-background-color-network-email { background: #27ae60; }
144
  .dpsp-background-color-network-print { background: #bdc3c7; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
 
146
 
147
  /******************************************************************************************/
148
  /* General Pages Header
149
  /******************************************************************************************/
150
- .dpsp-page-header { background: #41A4A9; margin-left: -20px; line-height: 60px; color: #fff; }
151
  .dpsp-page-header .dpsp-logo { padding: 0 10px 0 20px; }
152
- .dpsp-page-header .dpsp-logo-inner { font-family: 'Raleway'; font-weight: 700; font-size: 22px; }
153
  .dpsp-page-header .dpsp-logo-inner span { font-weight: 300; }
154
-
155
  .mv-grow-logo {
156
  max-width: 50px;
157
  display: inline-block;
@@ -159,7 +172,6 @@ h1.dpsp-page-title {
159
  padding-right: 0.5rem;
160
  padding-top: 0.25rem;
161
  }
162
-
163
  .dpsp-page-header:after { content: ''; display: block; clear: both; }
164
 
165
  .dpsp-page-header nav { display: inline-block; margin-left: 25px; line-height: 62px; }
@@ -167,10 +179,6 @@ h1.dpsp-page-title {
167
  .dpsp-page-header nav a .dashicons { font-size: 14px; height: auto; width: auto; margin-right: 5px; margin-top: -2px; }
168
  .dpsp-page-header nav a:hover { background: rgba(255,255,255,0.30); }
169
 
170
- #dpsp-to-premium { display: inline-block; line-height: 18px; padding: 14px 26px; color: #fff; background: #e74c3c; text-decoration: none; font-size: 13px; border-radius: 3px; font-weight: bold; }
171
- #dpsp-to-premium .dashicons { font-size: 18px; height: auto; width: auto; margin-right: 8px; }
172
- #dpsp-to-premium:hover { background: #ea6153; }
173
-
174
 
175
  /******************************************************************************************/
176
  /* General Cards
@@ -190,6 +198,21 @@ h1.dpsp-page-title {
190
  .dpsp-card-footer-actions a:hover { color: #444; }
191
 
192
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  /******************************************************************************************/
194
  /* General Buttons
195
  /******************************************************************************************/
@@ -210,6 +233,71 @@ h1.dpsp-page-title {
210
  .dpsp-button-secondary.disabled { color: #e9eff3; background: #fff; border-color: #e9eff3; cursor: default; }
211
 
212
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  /**********************************************/
214
  /* Sortable Networks Panel
215
  /**********************************************/
@@ -511,18 +599,38 @@ h1.dpsp-page-title {
511
  width: 100%;
512
  }
513
 
 
 
 
 
514
  .dpsp-setting-field-wrapper input[type=text]:focus {
515
  border-color: #0087be;
516
  box-shadow: 0 0 1px 0px #78dcfa;
517
  }
518
 
519
- /* Select */
520
- .dpsp-setting-field-wrapper select {
521
- min-width: 200px;
522
  }
523
 
524
- .dpsp-setting-field-select *:focus {
525
- outline: 0 !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
526
  }
527
 
528
  /* Select2 */
@@ -587,17 +695,31 @@ h1.dpsp-page-title {
587
  box-shadow: 0 0 3px 2px rgba(0,0,0,0.08);
588
  }
589
 
 
 
 
 
 
 
 
590
 
591
  /* Textarea */
592
  .dpsp-setting-field-wrapper textarea {
593
  min-height: 100px;
594
  min-width: 450px;
595
- border: 0;
596
- box-shadow: none;
597
  padding: 5px 8px;
598
  border-radius: 3px;
599
  }
600
 
 
 
 
 
 
 
 
 
 
601
  /* Checkbox and Radio */
602
  .dpsp-setting-field-wrapper input[type=checkbox],
603
  .dpsp-setting-field-wrapper input[type=radio] {
@@ -605,7 +727,9 @@ h1.dpsp-page-title {
605
  }
606
 
607
  .dpsp-setting-field-checkbox.dpsp-single .dpsp-setting-field-label {
608
- padding-right: 18px;
 
 
609
  }
610
 
611
  .dpsp-setting-field-checkbox.dpsp-multiple .dpsp-settings-field-checkbox,
@@ -627,6 +751,7 @@ h1.dpsp-page-title {
627
  border: 1px solid #e7e7e7;
628
  border-radius: 3px;
629
  transition: background 0.1s ease-in-out, border-color 0.1s ease-in-out;
 
630
  }
631
 
632
  .dpsp-setting-field-radio input[type=radio] + label span {
@@ -688,6 +813,9 @@ h1.dpsp-page-title {
688
  background: #fff;
689
  }
690
 
 
 
 
691
  /* Tooltip */
692
  .dpsp-setting-field-tooltip-wrapper {
693
  position: absolute;
@@ -754,7 +882,7 @@ h1.dpsp-page-title {
754
 
755
  .dpsp-settings-button-style {
756
  cursor: pointer;
757
- width: 10%;
758
  margin-right: 1.5%;
759
  margin-bottom: 10px;
760
  padding: 12px;
@@ -765,11 +893,25 @@ h1.dpsp-page-title {
765
  box-sizing: border-box;
766
  }
767
 
768
- .dpsp-setting-field-share-text input { width: 350px; }
769
-
770
  /* Switches */
771
  .dpsp-setting-field-wrapper .dpsp-switch { float: none; margin-left: 0; }
772
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
773
  /* Settings - Facebook App Authorized */
774
  .dpsp-setting-field-facebook-app-authorized { background: rgba(0, 184, 148, 0.3); padding: 9px; border-radius: 3px; color: #27ae60; }
775
  .dpsp-setting-field-facebook-app-authorized-expired { background: rgba( 192, 57, 43, 0.3); padding: 9px; border-radius: 3px; color: #c0392b; margin-bottom: 10px; }
@@ -795,18 +937,20 @@ h1.dpsp-page-title {
795
  }
796
 
797
  .dpsp-page-sidebar .dpsp-settings-button-style .dpsp-shape-rounded .dpsp-networks-btns-wrapper .dpsp-network-btn,
798
- .dpsp-page-sidebar .dpsp-settings-button-style .dpsp-shape-rounded .dpsp-networks-btns-wrapper .dpsp-network-btn:before {
799
  border-radius: 5px;
800
  }
801
 
802
 
803
- /* Page content specific styles */
804
- .dpsp-page-content .dpsp-settings-button-style {
805
- width: 24.25%;
 
806
  margin-right: 1%
807
  }
808
 
809
- .dpsp-page-content .dpsp-section-button-style label:nth-of-type(4n) {
 
810
  margin-right: 0;
811
  }
812
 
@@ -824,14 +968,47 @@ h1.dpsp-page-title {
824
  background: rgba(52, 152, 219, 0.075);
825
  }
826
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
827
 
828
  /**********************************************/
829
  /* Toolkit Page
830
  /**********************************************/
831
- #dpsp-toolkit-welcome { padding: 35px 25px; background: #fff; margin-left: -20px; text-align: center; overflow: hidden; }
832
- #dpsp-toolkit-welcome h2 { font-size: 1.8em; margin-top: 0; margin-bottom: 1.6em; }
833
- #dpsp-toolkit-welcome p { font-size: 14px; }
834
- #dpsp-toolkit-welcome .button { margin-top: 1.6em; box-shadow: none; outline: 0; }
 
835
 
836
  .dpsp-tool-wrapper { background: #fff; border-radius: 3px; overflow: hidden; }
837
  .dpsp-tool-wrapper img { max-width: 100%; height: auto; }
@@ -857,68 +1034,6 @@ h1.dpsp-page-title {
857
  .dpsp-tool-wrapper .dpsp-switch span { text-transform: uppercase; font-size: 0.85em; margin-right: 5px; }
858
  .dpsp-tool-wrapper .dpsp-switch label { display: inline-block !important; }
859
 
860
- .dpsp-page-toolkit .dpsp-col-3-8 { padding-top: 0 !important; }
861
-
862
- /**********************************************/
863
- /* Extensions Page
864
- /**********************************************/
865
- .dpsp-page-extensions { max-width: 1000px; }
866
-
867
- .dpsp-page-extensions .dpsp-card { margin-top: 0; margin-bottom: 0; }
868
-
869
- .dpsp-unavailable > a { display: block; line-height: 0; }
870
- .dpsp-unavailable h4 { padding-bottom: 0; border-bottom: 0; border-top: 1px solid #f1f1f1; text-align: left; }
871
- .dpsp-unavailable p.dpsp-description { margin: 0; padding: 10px; }
872
- .dpsp-unavailable .dpsp-tool-actions { padding: 15px 10px; overflow: hidden; text-align: center; background: #f9f9f9; border-top: 1px solid #f1f1f1; }
873
- .dpsp-unavailable .dpsp-tool-actions .button { padding-left: 25px; padding-right: 25px; }
874
- .dpsp-unavailable .dpsp-description { height: 57px; }
875
-
876
-
877
- /**********************************************/
878
- /* Settings page sidebar
879
- /**********************************************/
880
- .dpsp-settings-sidebar {
881
- float: left;
882
- margin-top: 63px;
883
- padding-left: 20px;
884
- width: 365px;
885
- -moz-box-sizing: border-box;
886
- box-sizing: border-box;
887
- }
888
-
889
- .dpsp-settings-sidebar p {
890
- color: #767676;
891
- }
892
-
893
- @media screen and ( max-width : 1225px ) {
894
-
895
- .dpsp-settings-sidebar {
896
- border-left: 0;
897
- padding-left: 0;
898
- }
899
-
900
- }
901
-
902
- #dpsp-settings-sidebar-social-pug-pro img { max-width: 100%; height: auto; padding: 0 20px; box-sizing: border-box; }
903
- #dpsp-settings-sidebar-social-pug-pro h3 { text-align: center; line-height: 1.7em; font-weight: bold; }
904
- #dpsp-settings-sidebar-social-pug-pro p { position: relative; padding-left: 45px; color: #454545; margin-bottom: 20px; }
905
-
906
- #dpsp-settings-sidebar-social-pug-pro p .dpsp-dashicons { position: absolute; top: -5px; left: 0; display: inline-block; width: 30px; height: 30px; }
907
- #dpsp-settings-sidebar-social-pug-pro p .dpsp-dashicons:after { content: ''; display: block; position: absolute; z-index: 1; top: -1px; left: 2px; width: 30px; height: 30px; border-radius: 20px; background: #41a4a9 }
908
-
909
- #dpsp-settings-sidebar-social-pug-pro p .dashicons { position: absolute; top: 0; left: 0; width: 30px; height: 30px; font-size: 24px; line-height: 30px; color: #fff; z-index: 2;}
910
- #dpsp-settings-sidebar-social-pug-pro .dpsp-button-primary { width: 100%; text-align: center; padding: 10px 0; box-sizing: border-box; }
911
-
912
- #dpsp-settings-sidebar-opt-in-hound img { max-width: 35px; height: auto; margin-right: 10px; border-radius: 50px; vertical-align: middle; }
913
-
914
- /**********************************************/
915
- /* Settings page sidebar: MailChimp Subscribe
916
- /**********************************************/
917
- #dpsp-mailchimp-subscribe-wrapper h3 { margin-bottom: 0; }
918
- #dpsp-mailchimp-subscribe-wrapper p { margin-top: 5px; margin-bottom: 15px; }
919
- #dpsp-mailchimp-subscribe-wrapper label { display: block; margin-bottom: 5px; }
920
- #dpsp-mailchimp-subscribe-wrapper input[type=text],
921
- #dpsp-mailchimp-subscribe-wrapper input[type=email] { margin-bottom: 10px; width: 100%; }
922
 
923
 
924
  /**********************************************/
@@ -995,97 +1110,6 @@ h1.dpsp-page-title {
995
  }
996
 
997
 
998
- /**********************************************/
999
- /* Admin Notices
1000
- /**********************************************/
1001
- .wrap div.dpsp-admin-notice { position: relative; margin-top: 16px; }
1002
- .wrap div.dpsp-admin-notice h4 { font-size: 16px; }
1003
- .wrap div.dpsp-admin-notice p { font-size: 14px; }
1004
-
1005
- .dpsp-admin-notice-activation { border-color: rgba(52,152,219,0.75); }
1006
- .dpsp-admin-notice-activation h4 { font-size: 1.05em; }
1007
- .dpsp-admin-notice-activation a { text-decoration: none; }
1008
- .dpsp-admin-notice-activation .dpsp-admin-notice-link { display: inline-block; padding: 6px 8px; margin-bottom: 10px; color: rgba(52,152,219,1); font-weight: 500; background: #e9e9e9; border-radius: 2px; margin-right: 10px; }
1009
- .dpsp-admin-notice-activation .dpsp-admin-notice-link span { display: inline-block; text-decoration: none; margin-right: 10px; }
1010
- .dpsp-admin-notice-activation .dpsp-admin-notice-link:hover { color: #fff; background: rgba(52,152,219,0.75); }
1011
-
1012
- .dpsp-admin-notice-wp-rating { border-color: rgba(52,152,219,0.75); }
1013
- .dpsp-admin-notice-wp-rating h4 { font-size: 1.05em; }
1014
- .dpsp-admin-notice-wp-rating p:last-of-type { margin-bottom: 20px; }
1015
- .dpsp-admin-notice-wp-rating a { text-decoration: none; }
1016
- .dpsp-admin-notice-wp-rating .dpsp-admin-notice-link { display: inline-block; padding: 6px 8px; margin-bottom: 10px; color: rgba(52,152,219,1); font-weight: 500; background: #e9e9e9; border-radius: 2px; margin-right: 10px; }
1017
- .dpsp-admin-notice-wp-rating .dpsp-admin-notice-link span { display: inline-block; text-decoration: none; margin-right: 10px; }
1018
- .dpsp-admin-notice-wp-rating .dpsp-admin-notice-link:hover { color: #fff; background: rgba(52,152,219,0.75); }
1019
- .dpsp-admin-notice-wp-rating .dashicons-star-filled { position: relative; top: 1px; width: 15px; height: 15px; font-size: 15px; }
1020
-
1021
- .dpsp-admin-notice-opt-in-hound { position: relative; padding-left: 140px; border-color: rgba(52,152,219,0.75); }
1022
- .dpsp-admin-notice-opt-in-hound h4 { font-size: 1.05em; }
1023
- .dpsp-admin-notice-opt-in-hound p:last-of-type { margin-bottom: 20px; }
1024
- .dpsp-admin-notice-opt-in-hound a { text-decoration: none; }
1025
- .dpsp-admin-notice-opt-in-hound img { position: absolute; top: 20px; left: 20px; border-radius: 50px; max-width: 100px; height: auto; }
1026
-
1027
- .wrap div.dpsp-admin-notice.dpsp-admin-grow-notice {
1028
- display: flex;
1029
- flex-flow: row;
1030
- }
1031
-
1032
- @media screen and (max-width: 500px) {
1033
- .wrap div.dpsp-admin-notice.dpsp-admin-grow-notice {
1034
- flex-flow: column;
1035
- }
1036
-
1037
- }
1038
-
1039
- .wrap div.dpsp-admin-notice .notice-img-wrap {
1040
- padding: 1em;
1041
- flex: 0 0 150px;
1042
- }
1043
-
1044
- .wrap div.dpsp-admin-notice .notice-img-wrap img {
1045
- float: left;
1046
- }
1047
-
1048
- .wrap div.dpsp-admin-notice .notice-text-wrap {
1049
- flex: 1 1 auto;
1050
- }
1051
-
1052
-
1053
- .wrap div.dpsp-admin-notice .notice-subtext {
1054
- font-style: italic;
1055
- font-size: 0.9em;
1056
- }
1057
-
1058
- /**********************************************/
1059
- /* Feedback Form
1060
- /**********************************************/
1061
- #dpsp-feedback-form-overlay { display: none; z-index: 9999; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000; opacity: 0.35; }
1062
- #dpsp-feedback-form { display: none; z-index: 10000; position: fixed; top: 10%; left: 50%; background: #fff; border-radius: 3px; max-width: 700px; margin-left: -350px; width: 100%; }
1063
- #dpsp-feedback-form .dpsp-header { position: relative; background: rgba(52,152,219,0.75); padding: 27px 35px; }
1064
- #dpsp-feedback-form > form { padding: 30px 35px; }
1065
- #dpsp-feedback-form h2 { color: #fff; margin-top: 0; margin-bottom: 0; }
1066
- #dpsp-feedback-form label { display: block; margin-bottom: 5px; font-weight: bold; }
1067
- #dpsp-feedback-form textarea { width: 100%; margin-bottom: 10px; min-height: 80px; }
1068
- #dpsp-feedback-form input[type=email],
1069
- #dpsp-feedback-form input[type=text] { width: 50%; margin-bottom: 10px; }
1070
- #dpsp-feedback-form input[type=submit] { margin-top: 15px; }
1071
-
1072
- #dpsp-feedback-form .spinner { float: none; visibility: visible; margin-top: 19px; }
1073
- #dpsp-feedback-form .dpsp-error { display: none; margin-top: 20px; margin-left: 15px; color: #c0392b; }
1074
-
1075
- #dpsp-feedback-done { display: none; position: relative; padding: 35px 25px; }
1076
- #dpsp-feedback-done img { float: left; }
1077
- #dpsp-feedback-done:after { content: ''; display: block; clear: both; }
1078
-
1079
- #dpsp-feedback-done > div { position: relative; float: left; top: -10px; margin-left: 40px; background: #f1f1f1; border-radius: 10px; padding: 10px 20px; max-width: 400px; }
1080
- #dpsp-feedback-done > div p { font-size: 1.1em; }
1081
- #dpsp-feedback-done > div p:first-of-type { font-weight: bold; }
1082
- #dpsp-feedback-done > div:before { content: ''; display: block; position: absolute; left: -30px; bottom: 10px; width: 25px; height: 25px; border-radius: 50%; background: #f1f1f1; }
1083
- #dpsp-feedback-done > div:after { content: ''; display: block; position: absolute; left: -50px; bottom: 20px; width: 15px; height: 15px; border-radius: 50%; background: #f1f1f1; }
1084
- #dpsp-feedback-done > a { position: absolute; bottom: 35px; right: 35px; }
1085
-
1086
- #dpsp-close-feedback { position: absolute; right: 25px; top: 50%; margin-top: -10px; color: #fff; text-decoration: none; }
1087
-
1088
-
1089
  /**********************************************/
1090
  /* Meta-box: Statistics
1091
  /**********************************************/
@@ -1110,9 +1134,11 @@ h1.dpsp-page-title {
1110
  .dpsp-statistic-bar-wrapper .dpsp-statistic-bar-google-plus .dpsp-statistic-bar-inner { background: #df4a32; }
1111
  .dpsp-statistic-bar-wrapper .dpsp-statistic-bar-pinterest .dpsp-statistic-bar-inner { background: #c92228; }
1112
  .dpsp-statistic-bar-wrapper .dpsp-statistic-bar-linkedin .dpsp-statistic-bar-inner { background: #0077b5; }
1113
- .dpsp-statistic-bar-wrapper .dpsp-statistic-bar-stumbleupon .dpsp-statistic-bar-inner { background: #ec4b24; }
1114
  .dpsp-statistic-bar-wrapper .dpsp-statistic-bar-reddit .dpsp-statistic-bar-inner { background: #ff5700; }
1115
  .dpsp-statistic-bar-wrapper .dpsp-statistic-bar-vkontakte .dpsp-statistic-bar-inner { background: #4d75a3; }
 
 
 
1116
 
1117
  .dpsp-statistic-bar-footer { opacity: 0.6; margin: 10px 0; border-top: 1px solid #f1f1f1; border-bottom: 1px solid #f1f1f1; }
1118
  .dpsp-statistic-bar-wrapper.dpsp-statistic-bar-footer:hover { background: none; }
@@ -1122,89 +1148,81 @@ h1.dpsp-page-title {
1122
 
1123
 
1124
  /**********************************************/
1125
- /* Opt-in Hound Promo
1126
  /**********************************************/
1127
- #opt-in-hound-promo-box { background: #fff; max-width: 800px; margin: 35px auto; border-radius: 4px; overflow: hidden; box-shadow: 0 0 20px 4px #e9e9e9; }
1128
- #opt-in-hound-promo-box img { max-width: 100%; height: auto; }
1129
- #opt-in-hound-promo-box hr { margin: 50px 0; }
 
1130
 
1131
- #opt-in-hound-promo-box-banner { position: relative; }
 
 
1132
 
1133
- #opt-in-hound-promo-box-inner { padding: 0 50px; }
 
 
1134
 
1135
- #opt-in-hound-promo-box .opt-in-hound-promo-box-title { font-size: 28px; font-weight: bold; margin: 15px 0; }
1136
- #opt-in-hound-promo-box .opt-in-hound-promo-box-title span { font-weight: 300; font-size: 22px; }
1137
- #opt-in-hound-promo-box .opt-in-hound-promo-box-sub-title { font-size: 20px; font-weight: 300; line-height: 1.3; }
1138
 
1139
- #opt-in-hound-promo-box .opt-in-hound-promo-box-title,
1140
- #opt-in-hound-promo-box .opt-in-hound-promo-box-sub-title { text-align: center; color: #4d5b68; }
1141
 
1142
- #opt-in-hound-promo-box .dpsp-row { margin-bottom: 35px; }
1143
- #opt-in-hound-promo-box .dpsp-row .opt-in-hound-promo-box-sub-title { margin-top: 0; }
1144
 
1145
- #opt-in-hound-promo-box .dpsp-col-1-3 { text-align: center; }
1146
- #opt-in-hound-promo-box .dpsp-col-1-4 { border-right: 1px solid #f1f1f1; }
1147
- #opt-in-hound-promo-box .dpsp-col-1-4.dpsp-last { border-right: 0; }
 
1148
 
1149
- #opt-in-hound-promo-box .dpsp-col-1-4 img { margin: -20px 0; }
 
 
1150
 
1151
- #opt-in-hound-promo-box .opt-in-hound-promo-box-cta { text-align: center; margin: 35px 0; }
1152
- #opt-in-hound-promo-box .opt-in-hound-promo-box-cta.dpsp-last { margin: 35px 0 50px 0; }
1153
- #opt-in-hound-promo-box .opt-in-hound-promo-box-cta .button-primary { font-size: 120%; font-weight: 500; height: 38px; line-height: 34px; padding: 0 25px; }
1154
-
1155
- #opt-in-hound-promo-box-disclaimer { max-width: 800px; margin: 0 auto; font-size: 12px; color: #a1a1a1; }
1156
-
1157
- .dpsp-page-extensions.dpsp-sub-page-opt-in-hound div.notice { display: none; }
1158
 
1159
  /**********************************************/
1160
- /* Deactivation Form
1161
  /**********************************************/
1162
- #dpsp-deactivate-modal { display: none; z-index: 9999; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.35); }
1163
- #dpsp-deactivate-wrapper { z-index: 10000; position: fixed; top: 10%; left: 50%; background: #fff; border-radius: 4px; max-width: 700px; margin-left: -350px; width: 100%; overflow: hidden; }
1164
 
1165
- #dpsp-deactivate-wrapper p { margin-top: 0; margin-bottom: 10px; }
1166
- #dpsp-deactivate-wrapper hr { margin: 25px 0; border: 0; border-top: 1px solid #e1e1e1; }
 
 
 
 
 
1167
 
1168
- #dpsp-deactivate-wrapper textarea { min-height: 65px; width: 100%; }
1169
- #dpsp-deactivate-wrapper .dpsp-deactivate-close { line-height: 26px; margin-left: 10px; }
1170
 
1171
- #dpsp-deactivate-contact-me { display: none; }
1172
- #dpsp-deactivate-contact-me label { display: block; margin-bottom: 10px; }
1173
- #dpsp-deactivate-contact-me input[type=email] { display: block; min-width: 250px; width: 50%; }
 
 
 
1174
 
1175
- #dpsp-deactivate-header { position: relative; padding: 25px 20px 22px 20px; background: #f5f5f5; border-bottom: 1px solid #e1e1e1; overflow: hidden; }
1176
 
1177
- #dpsp-deactivate-header img { position: absolute; right: 15px; top: auto; bottom: -29px; max-width: 80px; }
1178
- #dpsp-deactivate-header h3 { margin: 0; }
 
 
 
 
 
 
 
 
 
 
1179
 
1180
- #dpsp-deactivate-inner { padding: 20px 20px 25px; }
 
 
1181
 
1182
- #dpsp-deactivate-footer { padding: 20px; background: #f5f5f5; border-top: 1px solid #e1e1e1; }
1183
- #dpsp-deactivate-footer a:last-of-type { float: right; }
1184
-
1185
- /************************************************************/
1186
- /* Browser Window Sketch
1187
- /************************************************************/
1188
- .browser-window {
1189
- border: 1px solid rgba(52,152,219,0.75);
1190
- border-radius: 5px;
1191
- line-height: 0;
1192
- overflow: hidden;
1193
- }
1194
- .browser-header {
1195
- text-align: left;
1196
- border-bottom: 1px solid rgba(52,152,219,0.75);
1197
- height: 20px;
1198
- }
1199
- .browser-header:before {
1200
- display: block;
1201
- content: '○ ○ ○';
1202
- position: relative;
1203
- top: 10px;
1204
- left: 7px;
1205
- font-size: 20px;
1206
- color: rgba(52,152,219,0.75);
1207
- }
1208
 
1209
  /**********************************************/
1210
  /* Mobile Display
@@ -1279,4 +1297,24 @@ h1.dpsp-page-title {
1279
  margin-bottom: 30px;
1280
  }
1281
 
1282
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /******************************************************************************************/
2
  /* Fonts
3
+ /******************************************************************************************/
4
+ @import url('https://fonts.googleapis.com/css?family=Raleway:400,700,800');
5
+ @import './lib/admin/settings-sidebar.scss';
6
+ @import './lib/admin/extensions.scss';
7
 
8
  @font-face {
9
  font-family: 'Social Pug';
17
  }
18
 
19
  [class^="dpsp-icon-"]:before, [class*=" dpsp-icon-"]:before {
20
+ font-family: "Social Pug", sans-serif;
21
  font-style: normal;
22
  font-weight: normal;
 
23
  display: inline-block;
24
  text-decoration: inherit;
25
  text-align: center;
31
  .dpsp-icon-ok:before { content: '\e880'; }
32
  .dpsp-icon-remove:before { content: '\e881'; }
33
  .dpsp-icon-edit:before { content: '\e882'; }
34
+ .dpsp-icon-share:before { content: '\e883'; }
35
  .dpsp-icon-facebook:before { content: '\e800'; }
36
  .dpsp-icon-twitter:before { content: '\e801'; }
37
  .dpsp-icon-google-plus:before { content: '\e802'; }
38
  .dpsp-icon-pinterest:before { content: '\e803'; }
39
  .dpsp-icon-linkedin:before { content: '\e804'; }
40
+ .dpsp-icon-reddit:before { content: '\e806'; }
41
+ .dpsp-icon-vkontakte:before { content: '\e807'; }
42
+ .dpsp-icon-whatsapp:before { content: '\e808'; }
43
+ .dpsp-icon-instagram:before { content: '\e809'; }
44
+ .dpsp-icon-youtube:before { content: '\e810'; }
45
+ .dpsp-icon-vimeo:before { content: '\e811'; }
46
+ .dpsp-icon-soundcloud:before { content: '\e812'; }
47
+ .dpsp-icon-twitch:before { content: '\e813'; }
48
+ .dpsp-icon-behance:before { content: '\e814'; }
49
+ .dpsp-icon-yummly:before { content: '\e815'; }
50
  .dpsp-icon-email:before { content: '\e816'; }
51
  .dpsp-icon-print:before { content: '\e817'; }
52
+ .dpsp-icon-pocket:before { content: '\e819'; }
53
+ .dpsp-icon-buffer:before { content: '\e820'; }
54
+ .dpsp-icon-tumblr:before { content: '\e821'; }
55
+ .dpsp-icon-github:before { content: '\e822'; }
56
+ .dpsp-icon-xing:before { content: '\e823'; }
57
+ .dpsp-icon-flipboard:before { content: '\e824'; }
58
+ .dpsp-icon-telegram:before { content: '\e825'; }
59
+ .dpsp-icon-medium:before { content: '\e826'; }
60
+ .dpsp-icon-mix:before { content: '\e827'; }
61
 
62
 
63
+ /******************************************************************************************/
64
  /* General
65
+ /******************************************************************************************/
66
 
67
  /* Transitions */
68
  .dpsp-transition {
90
  .dpsp-col-2-5 { width: 40%; }
91
  .dpsp-col-3-5 { width: 60%; }
92
  .dpsp-col-4-5 { width: 80%; }
 
93
  .dpsp-col-3-8 { width: 37.5%; }
94
 
95
  .dpsp-row:after { content: ''; display: block; clear: both; }
96
 
 
 
 
 
97
  /* Other */
98
  .dpsp-page-wrapper {
 
99
  position: relative;
100
+ max-width: 675px;
101
+ float: left;
102
  width: 100%;
 
 
 
 
 
 
103
  }
104
 
105
  h1.dpsp-page-title {
123
  border-bottom: 1px solid #e5e5e5;
124
  }
125
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  /* Social Networks background colors */
127
  .dpsp-background-color-network-facebook { background: #3a579a; }
128
  .dpsp-background-color-network-twitter { background: #00abf0; }
129
  .dpsp-background-color-network-google-plus { background: #df4a32; }
130
  .dpsp-background-color-network-pinterest { background: #c92228; }
131
  .dpsp-background-color-network-linkedin { background: #0077b5; }
132
+ .dpsp-background-color-network-reddit { background: #ff5700; }
133
+ .dpsp-background-color-network-vkontakte { background: #4d75a3; }
134
+ .dpsp-background-color-network-whatsapp { background: #25D366; }
135
+ .dpsp-background-color-network-instagram { background: #bc2a8d; }
136
+ .dpsp-background-color-network-youtube { background: #bb0000; }
137
+ .dpsp-background-color-network-vimeo { background: #4bf; }
138
+ .dpsp-background-color-network-soundcloud { background: #f50; }
139
+ .dpsp-background-color-network-twitch { background: #6441A5; }
140
+ .dpsp-background-color-network-yummly { background: #e55a27; }
141
+ .dpsp-background-color-network-behance { background: #005cff; }
142
  .dpsp-background-color-network-email { background: #27ae60; }
143
  .dpsp-background-color-network-print { background: #bdc3c7; }
144
+ .dpsp-background-color-network-pocket { background: #ed4055; }
145
+ .dpsp-background-color-network-buffer { background: #29323b; }
146
+ .dpsp-background-color-network-tumblr { background: #35465c; }
147
+ .dpsp-background-color-network-xing { background: #00888d; }
148
+ .dpsp-background-color-network-github { background: #333333; }
149
+ .dpsp-background-color-network-flipboard { background: #e12828; }
150
+ .dpsp-background-color-network-telegram { background: #0088cc; }
151
+ .dpsp-background-color-network-medium { background: #333; }
152
+ .dpsp-background-color-network-mix { background: #fd8235; }
153
+
154
+
155
+ /******************************************************************************************/
156
+ /* General Page Styles
157
+ /******************************************************************************************/
158
+ body.dpsp-pagestyles { background: #f3f6f8; }
159
 
160
 
161
  /******************************************************************************************/
162
  /* General Pages Header
163
  /******************************************************************************************/
164
+ .dpsp-page-header { background: #41a4a9; margin-left: -20px; line-height: 60px; color: #fff; }
165
  .dpsp-page-header .dpsp-logo { padding: 0 10px 0 20px; }
166
+ .dpsp-page-header .dpsp-logo-inner { font-family: 'Raleway', sans-serif; font-weight: 700; font-size: 22px; }
167
  .dpsp-page-header .dpsp-logo-inner span { font-weight: 300; }
 
168
  .mv-grow-logo {
169
  max-width: 50px;
170
  display: inline-block;
172
  padding-right: 0.5rem;
173
  padding-top: 0.25rem;
174
  }
 
175
  .dpsp-page-header:after { content: ''; display: block; clear: both; }
176
 
177
  .dpsp-page-header nav { display: inline-block; margin-left: 25px; line-height: 62px; }
179
  .dpsp-page-header nav a .dashicons { font-size: 14px; height: auto; width: auto; margin-right: 5px; margin-top: -2px; }
180
  .dpsp-page-header nav a:hover { background: rgba(255,255,255,0.30); }
181
 
 
 
 
 
182
 
183
  /******************************************************************************************/
184
  /* General Cards
198
  .dpsp-card-footer-actions a:hover { color: #444; }
199
 
200
 
201
+ /******************************************************************************************/
202
+ /* General Tabs and Nav Tabs
203
+ /******************************************************************************************/
204
+ .dpsp-nav-tab-wrapper { margin: 0; }
205
+ .dpsp-nav-tab-wrapper:after { content: ''; display: block; clear: both; }
206
+
207
+ .dpsp-nav-tab { float: left; border-bottom: 2px solid transparent; margin: 0; }
208
+ .dpsp-nav-tab.dpsp-active { border-bottom-color: #2e4453; }
209
+ .dpsp-nav-tab.dpsp-active a { color: #2e4453; }
210
+ .dpsp-nav-tab a { display: block; width: auto; padding: 16px 16px 14px 16px; text-decoration: none; box-sizing: border-box; box-shadow: none; }
211
+
212
+ .dpsp-tab { display: none; margin-top: 25px; }
213
+ .dpsp-tab.dpsp-active { display: block; }
214
+
215
+
216
  /******************************************************************************************/
217
  /* General Buttons
218
  /******************************************************************************************/
233
  .dpsp-button-secondary.disabled { color: #e9eff3; background: #fff; border-color: #e9eff3; cursor: default; }
234
 
235
 
236
+ /******************************************************************************************/
237
+ /* Widgets
238
+ /******************************************************************************************/
239
+ .dpsp-widget-section-title { display: block; margin-top: 20px; margin-bottom: 5px; font-weight: bold; }
240
+
241
+ .dpsp-widget-label { display: inline-block; width: 200px; }
242
+
243
+ .widget-content .dpsp-settings-field-checkbox { margin-right: 12px; }
244
+
245
+ /* Settings - Pinterest Button Text Label */
246
+ .dpsp-setting-field-button-alignment { display: none; }
247
+
248
+
249
+ /**********************************************/
250
+ /* Admin Notices
251
+ /**********************************************/
252
+ .wrap div.dpsp-admin-notice { position: relative; margin-top: 16px; }
253
+ .wrap div.dpsp-admin-notice h4 { font-size: 16px; }
254
+ .wrap div.dpsp-admin-notice p { font-size: 14px; }
255
+
256
+ .wrap div.dpsp-admin-notice.dpsp-serial-missing { border-color: rgba(52,152,219,0.75); }
257
+ .wrap div.dpsp-admin-notice.dpsp-serial-missing .dpsp-get-license { margin-left: 10px; }
258
+
259
+ .wrap div.dpsp-admin-notice.dpsp-admin-notice-twitter-counts { border-color: rgba(52,152,219,0.75); }
260
+ .wrap div.dpsp-admin-notice.dpsp-admin-notice-twitter-counts h4 { font-size: 1.05em; }
261
+ .wrap div.dpsp-admin-notice.dpsp-admin-notice-twitter-counts a { text-decoration: none; }
262
+ .wrap div.dpsp-admin-notice.dpsp-admin-notice-twitter-counts .dpsp-admin-notice-link { display: inline-block; padding: 6px 8px; margin-bottom: 18px; color: rgba(52,152,219,1); font-weight: 500; background: #e9e9e9; border-radius: 2px; margin-right: 10px; }
263
+ .wrap div.dpsp-admin-notice.dpsp-admin-notice-twitter-counts .dpsp-admin-notice-link span { display: inline-block; text-decoration: none; margin-right: 10px; }
264
+ .wrap div.dpsp-admin-notice.dpsp-admin-notice-twitter-counts .dpsp-admin-notice-link:hover { color: #fff; background: rgba(52,152,219,0.75); }
265
+
266
+ .wrap div.dpsp-admin-notice-icon-animation .button-primary { display: inline-block; margin-bottom: 1.33em; }
267
+ .wrap div.dpsp-admin-notice-icon-animation h4 { margin-bottom: 0; }
268
+ .wrap div.dpsp-admin-notice-icon-animation p { margin-bottom: 0.75em; }
269
+
270
+ .wrap div.dpsp-admin-notice.dpsp-admin-grow-notice {
271
+ display: flex;
272
+ flex-flow: row;
273
+ }
274
+
275
+ @media screen and (max-width: 500px) {
276
+ .wrap div.dpsp-admin-notice.dpsp-admin-grow-notice {
277
+ flex-flow: column;
278
+ }
279
+
280
+ }
281
+
282
+ .wrap div.dpsp-admin-notice .notice-img-wrap {
283
+ padding: 1em;
284
+ flex: 0 0 150px;
285
+ }
286
+
287
+ .wrap div.dpsp-admin-notice .notice-img-wrap img {
288
+ float: left;
289
+ }
290
+
291
+ .wrap div.dpsp-admin-notice .notice-text-wrap {
292
+ flex: 1 1 auto;
293
+ }
294
+
295
+
296
+ .wrap div.dpsp-admin-notice .notice-subtext {
297
+ font-style: italic;
298
+ font-size: 0.9em;
299
+ }
300
+
301
  /**********************************************/
302
  /* Sortable Networks Panel
303
  /**********************************************/
599
  width: 100%;
600
  }
601
 
602
+ .dpsp-setting-field-wrapper input[type=text]:disabled {
603
+ background: #edf2f5;
604
+ }
605
+
606
  .dpsp-setting-field-wrapper input[type=text]:focus {
607
  border-color: #0087be;
608
  box-shadow: 0 0 1px 0px #78dcfa;
609
  }
610
 
611
+ /* Button */
612
+ .dpsp-setting-field-wrapper button {
613
+ vertical-align: middle !important;
614
  }
615
 
616
+ .dpsp-setting-field-button .spinner {
617
+ float: none;
618
+ position: absolute;
619
+ left: auto;
620
+ right: auto;
621
+ }
622
+
623
+ .dpsp-setting-field-button .action-text {
624
+ margin-left: 2rem;
625
+ color: #333;
626
+ display: none;
627
+ }
628
+
629
+ .dpsp-setting-field-button.dpsp-loading .spinner {
630
+ visibility: visible;
631
+ }
632
+ .dpsp-setting-field-button.dpsp-loading .action-text {
633
+ visibility: visible;
634
  }
635
 
636
  /* Select2 */
695
  box-shadow: 0 0 3px 2px rgba(0,0,0,0.08);
696
  }
697
 
698
+ /* Colorpicker */
699
+ .dpsp-setting-field-wrapper .wp-picker-container .wp-color-result.button { height: 32px; border-color: #c8d7e1; border-style: solid; border-width: 1px 1px 2px; cursor: pointer; box-shadow: none; margin-bottom: 0; }
700
+ .dpsp-setting-field-wrapper .wp-picker-container .wp-color-result.button span { line-height: 19px; background: #fff; font-size: 13px; font-weight: 500; text-overflow: ellipsis; text-decoration: none; vertical-align: top; box-sizing: border-box; padding: 5px 11px; }
701
+
702
+ .dpsp-setting-field-wrapper .wp-picker-container .wp-picker-input-wrap .button { height: 32px; background: #fff; border-color: #c8d7e1; border-style: solid; border-width: 1px 1px 2px; cursor: pointer; box-shadow: none; }
703
+
704
+ .dpsp-setting-field-wrapper .wp-picker-container input[type=text].wp-color-picker { width: 65px; font-size: 12px; padding: 7px; font-family: monospace; line-height: 16px; margin: 0; vertical-align: top; }
705
 
706
  /* Textarea */
707
  .dpsp-setting-field-wrapper textarea {
708
  min-height: 100px;
709
  min-width: 450px;
 
 
710
  padding: 5px 8px;
711
  border-radius: 3px;
712
  }
713
 
714
+ .dpsp-page-wrapper .dpsp-setting-field-wrapper textarea {
715
+ border: 0;
716
+ box-shadow: none;
717
+ }
718
+
719
+ .postbox .dpsp-setting-field-wrapper textarea {
720
+ min-height: 80px;
721
+ }
722
+
723
  /* Checkbox and Radio */
724
  .dpsp-setting-field-wrapper input[type=checkbox],
725
  .dpsp-setting-field-wrapper input[type=radio] {
727
  }
728
 
729
  .dpsp-setting-field-checkbox.dpsp-single .dpsp-setting-field-label {
730
+ padding-right: 20px;
731
+ width: 260px;
732
+ box-sizing: border-box;
733
  }
734
 
735
  .dpsp-setting-field-checkbox.dpsp-multiple .dpsp-settings-field-checkbox,
751
  border: 1px solid #e7e7e7;
752
  border-radius: 3px;
753
  transition: background 0.1s ease-in-out, border-color 0.1s ease-in-out;
754
+ box-sizing: content-box !important;
755
  }
756
 
757
  .dpsp-setting-field-radio input[type=radio] + label span {
813
  background: #fff;
814
  }
815
 
816
+ /* Image */
817
+ .dpsp-setting-field-wrapper img { max-width: 200px; height: auto; border-radius: 2px; }
818
+
819
  /* Tooltip */
820
  .dpsp-setting-field-tooltip-wrapper {
821
  position: absolute;
882
 
883
  .dpsp-settings-button-style {
884
  cursor: pointer;
885
+ width: 12%;
886
  margin-right: 1.5%;
887
  margin-bottom: 10px;
888
  padding: 12px;
893
  box-sizing: border-box;
894
  }
895
 
 
 
896
  /* Switches */
897
  .dpsp-setting-field-wrapper .dpsp-switch { float: none; margin-left: 0; }
898
 
899
+ /* Share text */
900
+ .dpsp-setting-field-share-text input { width: 350px; }
901
+
902
+ /* Pop-up Page */
903
+ .dpsp-page-pop-up .dpsp-setting-field-title input { min-width: 450px; }
904
+
905
+ /* Sticky bar */
906
+ .dpsp-setting-field-desktop-position,
907
+ .dpsp-setting-field-mobile-position { display: none; }
908
+
909
+ /* Settings - Tweet Counts */
910
+ .dpsp-setting-field-tweet-counts-provider { display: none; }
911
+
912
+ /* Settings - Pinterest Button Text Label */
913
+ .dpsp-setting-field-button-text-label { display: none; }
914
+
915
  /* Settings - Facebook App Authorized */
916
  .dpsp-setting-field-facebook-app-authorized { background: rgba(0, 184, 148, 0.3); padding: 9px; border-radius: 3px; color: #27ae60; }
917
  .dpsp-setting-field-facebook-app-authorized-expired { background: rgba( 192, 57, 43, 0.3); padding: 9px; border-radius: 3px; color: #c0392b; margin-bottom: 10px; }
937
  }
938
 
939
  .dpsp-page-sidebar .dpsp-settings-button-style .dpsp-shape-rounded .dpsp-networks-btns-wrapper .dpsp-network-btn,
940
+ .dpsp-page-sidebar .dpsp-settings-button-style .dpsp-shape-rounded .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon {
941
  border-radius: 5px;
942
  }
943
 
944
 
945
+ /* Page content and pop-up specific styles */
946
+ .dpsp-page-content .dpsp-settings-button-style,
947
+ .dpsp-page-pop-up .dpsp-settings-button-style {
948
+ width: 32.3333%;
949
  margin-right: 1%
950
  }
951
 
952
+ .dpsp-page-content .dpsp-section-button-style label:nth-of-type(4n),
953
+ .dpsp-page-pop-up .dpsp-section-button-style label:nth-of-type(4n) {
954
  margin-right: 0;
955
  }
956
 
968
  background: rgba(52, 152, 219, 0.075);
969
  }
970
 
971
+ /* Link Shortening Services */
972
+ .dpsp-subsection-link-shortening { display: none; }
973
+
974
+ /* Click to Tweet */
975
+ #section-click-to-tweet-preview { display: none; }
976
+ #section-click-to-tweet-preview > a { margin-top: 0; margin-bottom: 0; }
977
+
978
+ /* Serial Key */
979
+ #dpsp-serial-key-status { display: none; position: relative; top: -1px; padding: 4px 0; line-height: 20px; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; }
980
+ #dpsp-serial-key-status span { vertical-align: middle; }
981
+
982
+ #dpsp-serial-key-status.dpsp-valid { background: rgba(0, 184, 148, 0.3); color: #27ae60; }
983
+ #dpsp-serial-key-status.dpsp-invalid { background: rgba(192, 57, 43, 0.3); color: #c0392b; }
984
+
985
+ #dpsp-serial-key-status .dashicons { margin-left: 5px; margin-right: 5px; }
986
+ #dpsp-serial-key-status .dashicons-yes { color: #27ae60; }
987
+ #dpsp-serial-key-status .dashicons-warning { color: #c0392b; }
988
+
989
+ #dpsp-bitly-key-status { position: relative; top: -1px; padding: 4px 0; line-height: 20px; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; text-align: right; margin-bottom: 12px; margin-top: -6px }
990
+ #dpsp-bitly-key-status span { vertical-align: middle; }
991
+
992
+ #dpsp-bitly-key-status.dpsp-valid { background: rgba(0, 184, 148, 0.3); color: #27ae60; }
993
+ #dpsp-serial-key-status.dpsp-invalid { background: rgba(192, 57, 43, 0.3); color: #c0392b; }
994
+
995
+ #dpsp-bitly-key-status .dashicons { margin-left: 5px; margin-right: 5px; }
996
+ #dpsp-bitly-key-status .dashicons-yes { color: #27ae60; }
997
+ #dpsp-bitly-key-status .dashicons-warning { color: #c0392b; }
998
+
999
+ /* Social Shares Recovery System */
1000
+ #dpsp-card-settings-social-shares-recovery .dpsp-card-inner { border-bottom: 1px solid rgba(200, 215, 225, 0.5); }
1001
+ #dpsp-card-settings-social-shares-recovery .dpsp-card-inner.dpsp-last { border-bottom: 0; }
1002
+
1003
 
1004
  /**********************************************/
1005
  /* Toolkit Page
1006
  /**********************************************/
1007
+ #dpsp-toolkit-welcome { padding: 5px 20px; background: #fff; margin-left: -20px; }
1008
+
1009
+ .dpsp-page-toolkit:not(.dpsp-page-free) { max-width: 1000px; }
1010
+ .dpsp-page-toolkit .dpsp-row { margin-bottom: 2.5em; }
1011
+ .dpsp-page-toolkit .dpsp-card { margin-top: 0; margin-bottom: 0; }
1012
 
1013
  .dpsp-tool-wrapper { background: #fff; border-radius: 3px; overflow: hidden; }
1014
  .dpsp-tool-wrapper img { max-width: 100%; height: auto; }
1034
  .dpsp-tool-wrapper .dpsp-switch span { text-transform: uppercase; font-size: 0.85em; margin-right: 5px; }
1035
  .dpsp-tool-wrapper .dpsp-switch label { display: inline-block !important; }
1036
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1037
 
1038
 
1039
  /**********************************************/
1110
  }
1111
 
1112
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1113
  /**********************************************/
1114
  /* Meta-box: Statistics
1115
  /**********************************************/
1134
  .dpsp-statistic-bar-wrapper .dpsp-statistic-bar-google-plus .dpsp-statistic-bar-inner { background: #df4a32; }
1135
  .dpsp-statistic-bar-wrapper .dpsp-statistic-bar-pinterest .dpsp-statistic-bar-inner { background: #c92228; }
1136
  .dpsp-statistic-bar-wrapper .dpsp-statistic-bar-linkedin .dpsp-statistic-bar-inner { background: #0077b5; }
 
1137
  .dpsp-statistic-bar-wrapper .dpsp-statistic-bar-reddit .dpsp-statistic-bar-inner { background: #ff5700; }
1138
  .dpsp-statistic-bar-wrapper .dpsp-statistic-bar-vkontakte .dpsp-statistic-bar-inner { background: #4d75a3; }
1139
+ .dpsp-statistic-bar-wrapper .dpsp-statistic-bar-buffer .dpsp-statistic-bar-inner { background: #29323b; }
1140
+ .dpsp-statistic-bar-wrapper .dpsp-statistic-bar-tumblr .dpsp-statistic-bar-inner { background: #35465c; }
1141
+ .dpsp-statistic-bar-wrapper .dpsp-statistic-bar-yummly .dpsp-statistic-bar-inner { background: #e55a27; }
1142
 
1143
  .dpsp-statistic-bar-footer { opacity: 0.6; margin: 10px 0; border-top: 1px solid #f1f1f1; border-bottom: 1px solid #f1f1f1; }
1144
  .dpsp-statistic-bar-wrapper.dpsp-statistic-bar-footer:hover { background: none; }
1148
 
1149
 
1150
  /**********************************************/
1151
+ /* Meta-box: Share Options
1152
  /**********************************************/
1153
+ #dpsp_share_options span[class*=dpsp-icon-] { display: inline-block; width: 24px; height: 24px; line-height: 24px; text-align: center; margin-right: 10px; color: #fff; border-radius: 2px; }
1154
+ #dpsp_share_options .dpsp-icon-share { background: #34495e; }
1155
+ #dpsp_share_options .dpsp-icon-twitter { background: #00abf0; }
1156
+ #dpsp_share_options .dpsp-icon-pinterest { background: #c92228; }
1157
 
1158
+ #dpsp_share_options_content .dpsp-section { position: relative; padding-left: 220px; margin: 15px 0 25px 0; }
1159
+ #dpsp_share_options_content label { display: block; margin-bottom: 10px; font-weight: bold; }
1160
+ #dpsp_share_options_content textarea { width: 100%; min-height: 70px; }
1161
 
1162
+ #dpsp_share_options_content .dpsp-setting-field-image { position: absolute; top: 0; left: 0; max-width: 200px; width: 100%; }
1163
+ #dpsp_share_options_content .dpsp-setting-field-image .dpsp-button-primary,
1164
+ #dpsp_share_options_content .dpsp-setting-field-image .dpsp-button-secondary { width: 100%; text-align: center; }
1165
 
1166
+ #dpsp_share_options .dpsp-setting-field-tooltip-wrapper { position: relative; top: -2px; left: auto; }
 
 
1167
 
1168
+ .dpsp-textarea-characters-remaining-wrapper { float: right; background: #f1f1f1; font-size: 12px; padding: 0 10px; height: 24px; line-height: 24px; border-radius: 2px; }
1169
+ .dpsp-textarea-characters-remaining-wrapper.dpsp-excedeed { background: rgba(192, 57, 43, 0.75); color: #fff; }
1170
 
1171
+ /* Multiple Pinterest hidden images */
1172
+ #dpsp-meta-box-section-multiple-pinterest-images { padding-left: 0 !important; }
1173
 
1174
+ #dpsp-meta-box-section-multiple-pinterest-images .dpsp-hidden-image-wrapper { float: left; position: relative; margin-right: 5px; margin-bottom: 5px; max-width: 125px; line-height: 0; }
1175
+ #dpsp-meta-box-section-multiple-pinterest-images .dpsp-hidden-image-wrapper img { max-width: 100%; max-height: auto; height: auto; }
1176
+ #dpsp-meta-box-section-multiple-pinterest-images .dpsp-hidden-image-wrapper .dpsp-button-secondary { position: absolute; top: 5px; right: 5px; padding: 1px 2px; opacity: 0; visibility: hidden; transition: all 0.1s ease-in; }
1177
+ #dpsp-meta-box-section-multiple-pinterest-images .dpsp-hidden-image-wrapper:hover .dpsp-button-secondary { opacity: 1; visibility: visible; }
1178
 
1179
+ #dpsp-meta-box-section-multiple-pinterest-images .dpsp-hidden-image-add-new { float: left; width: 125px; height: 125px; border-radius: 2px; text-align: center; box-sizing: border-box; }
1180
+ #dpsp-meta-box-section-multiple-pinterest-images .dpsp-hidden-image-add-new .dashicons { display: inline-block; padding: 5px; border-radius: 50px; background: #ebf0f4; margin-top: 28px; margin-bottom: 5px; box-sizing: content-box; }
1181
+ #dpsp-meta-box-section-multiple-pinterest-images .dpsp-hidden-image-add-new .dashicons:before { position: relative; top: 1px; }
1182
 
1183
+ #dpsp-meta-box-section-multiple-pinterest-images:after { content: ''; display: block; clear: both; }
 
 
 
 
 
 
1184
 
1185
  /**********************************************/
1186
+ /* TinyMCE
1187
  /**********************************************/
1188
+ .mce-i-dpsp-icon-twitter { position: relative; top: -2px; }
1189
+ .mce-i-dpsp-icon-twitter:before { content: '\e801'; font-family: "Social Pug", sans-serif; font-style: normal; font-weight: normal; font-size: 20px; color: #00abf0; }
1190
 
1191
+ /* Click to Tweet Dialog */
1192
+ #dpsp_click_to_tweet_dialog #dpsp_tweet_length { position: absolute; top: 105px; right: 0; padding-right: 25px; color: #a1a1a1; }
1193
+ #dpsp_click_to_tweet_dialog #dpsp_tweet_length em,
1194
+ #dpsp_click_to_tweet_dialog #dpsp_tweet_length span { font-weight: bold; font-size: 12px; }
1195
+ #dpsp_click_to_tweet_dialog #dpsp_tweet_length span { position: absolute; top: 0; right: 0; }
1196
+ #dpsp_click_to_tweet_dialog #dpsp_tweet_hide_via-al,
1197
+ #dpsp_click_to_tweet_dialog #dpsp_tweet_hide_url-al { position: relative; top: -3px; }
1198
 
 
 
1199
 
1200
+ /**********************************************/
1201
+ /* WP List Table
1202
+ /**********************************************/
1203
+ table.wp-list-table .column-dpsp_shares { width: 5.5em; }
1204
+ table.wp-list-table .dpsp-list-table-shares span { display: none; }
1205
+ #screen-options-wrap .dpsp-list-table-shares i { display: none; }
1206
 
1207
+ .dpsp-list-table-post-share-count { display: inline-block; margin-top: 5px; padding: 0 8px; background: #b6b6b6; color: #fff; border-radius: 5px; line-height: 24px; vertical-align: middle; text-align: center; }
1208
 
1209
+ /**********************************************/
1210
+ /* Attachment Pages
1211
+ /**********************************************/
1212
+ body.post-type-attachment.post-php table.compat-attachment-fields { width: 100%; border-spacing: 0; }
1213
+ body.post-type-attachment.post-php table .compat-field-pin_title th,
1214
+ body.post-type-attachment.post-php table .compat-field-pin_title td,
1215
+ body.post-type-attachment.post-php table .compat-field-pin_description th,
1216
+ body.post-type-attachment.post-php table .compat-field-pin_description td,
1217
+ body.post-type-attachment.post-php table .compat-field-pin_repin_id th,
1218
+ body.post-type-attachment.post-php table .compat-field-pin_repin_id td,
1219
+ body.post-type-attachment.post-php table .compat-field-pin_nopin th,
1220
+ body.post-type-attachment.post-php table .compat-field-pin_nopin td { display: block; width: 100%; }
1221
 
1222
+ body.post-type-attachment.post-php table .compat-field-pin_description textarea { width: 100%; min-height: 75px; }
1223
+ body.post-type-attachment.post-php table .compat-field-pin_title input,
1224
+ body.post-type-attachment.post-php table .compat-field-pin_repin_id input { width: 100%; }
1225
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1226
 
1227
  /**********************************************/
1228
  /* Mobile Display
1297
  margin-bottom: 30px;
1298
  }
1299
 
1300
+ }
1301
+
1302
+
1303
+ /******************************************************************************************/
1304
+ /* Social Shares Recovery Meta-Box
1305
+ /******************************************************************************************/
1306
+ #dpsp-shares-recovery-post-previous-urls h4 { border-bottom: 1px solid #f1f1f1; padding: 10px 0; margin: 10px 0; }
1307
+ #dpsp-shares-recovery-post-previous-urls h4 .dpsp-setting-field-tooltip-wrapper { position: relative; left: auto; }
1308
+
1309
+ #dpsp-shares-recovery-post-previous-urls-empty { background: #f1f1f1; padding: 10px 15px; }
1310
+ #dpsp-shares-recovery-post-previous-urls-empty > :first-child { margin-top: 0; }
1311
+ #dpsp-shares-recovery-post-previous-urls-empty > :last-child { margin-bottom: 0; }
1312
+
1313
+ .dpsp-post-previous-url { display: flex; margin-top: 5px; }
1314
+ .dpsp-post-previous-url.dpsp-hidden { display: none; }
1315
+ .dpsp-post-previous-url input { flex: 1; margin-right: 5px; }
1316
+ .dpsp-post-previous-url a { padding: 3px 10px; }
1317
+
1318
+ #dpsp-add-post-previous-url { margin-top: 10px; }
1319
+
1320
+
assets/src/css/style-frontend-jquery.css DELETED
@@ -1,699 +0,0 @@
1
- /*****************************************/
2
- /* General: Fonts
3
- /*****************************************/
4
- @font-face {
5
- font-family: 'Social Pug';
6
- src:url('../fonts/socialpug.eot?gd6mr8');
7
- src:url('../fonts/socialpug.eot?#iefix') format('embedded-opentype'),
8
- url('../fonts/socialpug.woff') format('woff'),
9
- url('../fonts/socialpug.ttf') format('truetype'),
10
- url('../fonts/socialpug.svg#socialpug') format('svg');
11
- font-weight: normal;
12
- font-style: normal;
13
- }
14
-
15
-
16
- /*****************************************/
17
- /* General: Icons
18
- /*****************************************/
19
- .dpsp-icon-total-share:before {
20
- position: absolute;
21
- top: 50%;
22
- left: 50%;
23
- margin-top: -10px;
24
- margin-left: -10px;
25
- width: 20px;
26
- height: 20px;
27
- vertical-align: middle;
28
- line-height: 20px;
29
- }
30
-
31
-
32
- .dpsp-icon-total-share:before {
33
- font-family: "Social Pug";
34
- font-style: normal;
35
- font-weight: normal;
36
-
37
- display: inline-block;
38
- text-decoration: inherit;
39
- text-align: center;
40
- font-variant: normal;
41
- text-transform: none;
42
- line-height: 1em;
43
- }
44
-
45
- .dpsp-network-btn .dpsp-network-icon:before,
46
- .dpsp-network-btn .dpsp-network-icon:after {
47
- font-family: "Social Pug";
48
- font-style: normal;
49
- font-weight: normal;
50
-
51
- display: block;
52
- text-decoration: inherit;
53
- text-align: center;
54
- font-variant: normal;
55
- text-transform: none;
56
-
57
- position: absolute;
58
- top: 50%;
59
- left: 50%;
60
- margin-top: -10px;
61
- margin-left: -10px;
62
- width: 20px;
63
- height: 20px;
64
- vertical-align: middle;
65
- line-height: 20px;
66
- }
67
-
68
- .dpsp-network-btn .dpsp-network-icon:after {
69
- margin-left: -20px;
70
- opacity: 0;
71
- }
72
-
73
- .dpsp-icon-total-share:before { content: '\e883'; }
74
-
75
- .dpsp-facebook .dpsp-network-icon:before,
76
- .dpsp-facebook .dpsp-network-icon:after { content: '\e800'; }
77
- .dpsp-twitter .dpsp-network-icon:before,
78
- .dpsp-twitter .dpsp-network-icon:after { content: '\e801'; }
79
- .dpsp-pinterest .dpsp-network-icon:before,
80
- .dpsp-pinterest .dpsp-network-icon:after { content: '\e803'; }
81
- .dpsp-linkedin .dpsp-network-icon:before,
82
- .dpsp-linkedin .dpsp-network-icon:after { content: '\e804'; }
83
- .dpsp-email .dpsp-network-icon:before,
84
- .dpsp-email .dpsp-network-icon:after { content: '\e816'; }
85
- .dpsp-print .dpsp-network-icon:before,
86
- .dpsp-print .dpsp-network-icon:after { content: '\e817'; }
87
-
88
- /* Button animations */
89
- .dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon:before,
90
- .dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon:after {
91
- transition: all 0.25s ease-in-out;
92
- }
93
-
94
- .dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon:before {
95
- margin-left: 5px;
96
- opacity: 0;
97
- }
98
-
99
- .dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon:after {
100
- margin-left: -10px;
101
- opacity: 1;
102
- }
103
-
104
- /*****************************************/
105
- /* Floating Sidebar Buttons
106
- /*****************************************/
107
- #dpsp-floating-sidebar {
108
- position: fixed;
109
- top: 30%;
110
- z-index: 9998;
111
- }
112
-
113
- #dpsp-floating-sidebar.dpsp-position-left {
114
- left: 0;
115
- }
116
-
117
- #dpsp-floating-sidebar.dpsp-position-right {
118
- right: 0;
119
- }
120
-
121
- .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar li {
122
- float: none;
123
- margin-left: 0;
124
- }
125
-
126
- .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn {
127
- padding: 0;
128
- width: 40px;
129
- }
130
-
131
- .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon {
132
- border-color: transparent !important;
133
- background: transparent !important;
134
- }
135
-
136
- .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-has-count .dpsp-network-icon {
137
- height: 22px;
138
- line-height: 22px;
139
- }
140
-
141
- .dpsp-button-hover .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn:hover:before {
142
- color: #fff;
143
- }
144
-
145
-
146
- /* Sidebar buttons option - rounded */
147
- .dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn,
148
- .dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon {
149
- border-radius: 0;
150
- }
151
-
152
- .dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first,
153
- .dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first .dpsp-network-icon {
154
- -webkit-border-top-right-radius: 5px;
155
- -moz-border-radius-topright: 5px;
156
- border-top-right-radius: 5px;
157
- }
158
-
159
- .dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last,
160
- .dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last .dpsp-network-icon {
161
- -webkit-border-bottom-right-radius: 5px;
162
- -moz-border-radius-bottomright: 5px;
163
- border-bottom-right-radius: 5px;
164
- }
165
-
166
- .dpsp-position-left.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn,
167
- .dpsp-position-left.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon {
168
- -webkit-border-top-right-radius: 5px;
169
- -moz-border-radius-topright: 5px;
170
- border-top-right-radius: 5px;
171
- -webkit-border-bottom-right-radius: 5px;
172
- -moz-border-radius-bottomright: 5px;
173
- border-bottom-right-radius: 5px;
174
- }
175
-
176
-
177
- .dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first,
178
- .dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first .dpsp-network-icon {
179
- -webkit-border-top-left-radius: 5px;
180
- -moz-border-radius-topleft: 5px;
181
- border-top-left-radius: 5px;
182
- }
183
-
184
- .dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last,
185
- .dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last .dpsp-network-icon {
186
- -webkit-border-bottom-left-radius: 5px;
187
- -moz-border-radius-bottomleft: 5px;
188
- border-bottom-left-radius: 5px;
189
- }
190
-
191
- .dpsp-position-right.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn,
192
- .dpsp-position-right.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon {
193
- -webkit-border-top-left-radius: 5px;
194
- -moz-border-radius-topleft: 5px;
195
- border-top-left-radius: 5px;
196
- -webkit-border-bottom-left-radius: 5px;
197
- -moz-border-radius-bottomleft: 5px;
198
- border-bottom-left-radius: 5px;
199
- }
200
-
201
- .dpsp-shape-rounded.dpsp-has-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon {
202
- border-radius: 5px;
203
- }
204
-
205
- /* Sidebar buttons option - circle */
206
- #dpsp-floating-sidebar.dpsp-position-left.dpsp-shape-circle {
207
- left: 12px;
208
- }
209
-
210
- #dpsp-floating-sidebar.dpsp-position-right.dpsp-shape-circle {
211
- right: 10px;
212
- }
213
-
214
- /* Sidebar buttons bottom spacing */
215
- .dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn {
216
- margin-bottom: 6px;
217
- }
218
-
219
- .dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn {
220
- -webkit-border-top-right-radius: 5px;
221
- -moz-border-radius-topright: 5px;
222
- border-top-right-radius: 5px;
223
-
224
- -webkit-border-bottom-right-radius: 5px;
225
- -moz-border-radius-bottomright: 5px;
226
- border-bottom-right-radius: 5px;
227
- }
228
-
229
- /*
230
- * Sidebar buttons style 2
231
- */
232
- #dpsp-floating-sidebar.dpsp-style-2 .dpsp-network-btn:before {
233
- background: none;
234
- }
235
-
236
- /**
237
- * Sidebar button hover label
238
- *
239
- */
240
- #dpsp-floating-sidebar .dpsp-networks-btns-wrapper li { position: relative; overflow: visible; }
241
-
242
- #dpsp-floating-sidebar .dpsp-networks-btns-wrapper .dpsp-button-label { position: absolute; z-index: 1; display: inline-block; width: auto; white-space: nowrap; top: 50%; margin-top: -15px; height: 30px; padding: 6px 12px; color: #fff; font-size: 12px; font-weight: normal; line-height: 18px; background: #34495e; border-radius: 3px; visibility: hidden; opacity: 0; transition: all 0.2s ease-in-out; box-sizing: border-box; }
243
- #dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper .dpsp-button-label { left: 100%; }
244
- #dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper .dpsp-button-label { right: 100%; }
245
-
246
- #dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper li.dpsp-hover .dpsp-button-label { transform: translateX(10px); visibility: visible; opacity: 1; }
247
- #dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper li.dpsp-hover .dpsp-button-label { transform: translateX(-10px); visibility: visible; opacity: 1; }
248
-
249
- #dpsp-floating-sidebar .dpsp-networks-btns-wrapper .dpsp-button-label:before { content: ''; display: block; position: absolute; top: 50%; margin-top: -5px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
250
- #dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper .dpsp-button-label:before { left: -5px; border-right: 5px solid #34495e; }
251
- #dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper .dpsp-button-label:before { right: -5px; border-left: 5px solid #34495e; }
252
-
253
-
254
- /*****************************************/
255
- /* Content Buttons
256
- /*****************************************/
257
- #dpsp-content-top { margin-bottom: 1.2em; }
258
- #dpsp-content-bottom { margin-top: 1.2em; }
259
-
260
- .dpsp-share-text { font-weight: bold; margin-bottom: 10px; }
261
-
262
- /**************************************************/
263
- /* General button styling, for content and other
264
- /**************************************************/
265
- .dpsp-networks-btns-wrapper {
266
- list-style: none !important;
267
- padding: 0 !important;
268
- margin: 0 !important;
269
- }
270
-
271
- .dpsp-networks-btns-wrapper:after {
272
- content: '';
273
- display: block;
274
- height: 0;
275
- clear: both;
276
- }
277
-
278
- .dpsp-networks-btns-wrapper li {
279
- float: left;
280
- overflow: hidden;
281
-
282
- -moz-transition: all 0.15s ease-in;
283
- -webkit-transition: all 0.15s ease-in;
284
- -o-transition: all 0.15s ease-in;
285
- transition: all 0.15s ease-in;
286
-
287
- list-style-type: none !important;
288
- }
289
-
290
- .dpsp-networks-btns-wrapper li:before {
291
- display: none !important;
292
- }
293
-
294
- .dpsp-networks-btns-wrapper li:first-child {
295
- margin-left: 0 !important;
296
- }
297
-
298
- /*
299
- * Share button
300
- */
301
- .dpsp-networks-btns-wrapper .dpsp-network-btn {
302
- position: relative;
303
-
304
- display: block;
305
- text-decoration: none !important;
306
- text-transform: unset !important;
307
- height: 40px;
308
- min-width: 40px;
309
-
310
- font-family: 'Arial';
311
- font-weight: bold;
312
- font-size: 14px;
313
- line-height: 36px;
314
- vertical-align: middle;
315
-
316
- padding: 0 10px 0 48px;
317
- border: 2px solid;
318
- max-height: 40px;
319
-
320
- width: 100%;
321
- -moz-box-sizing: border-box;
322
- box-sizing: border-box;
323
-
324
- -moz-transition: all 0.15s ease-in;
325
- -webkit-transition: all 0.15s ease-in;
326
- -o-transition: all 0.15s ease-in;
327
- transition: all 0.15s ease-in;
328
-
329
- box-shadow: none;
330
-
331
- cursor: pointer;
332
- }
333
-
334
- .dpsp-networks-btns-wrapper .dpsp-network-btn:hover {
335
- border: 2px solid;
336
- box-shadow: none;
337
- }
338
-
339
- .dpsp-networks-btns-wrapper .dpsp-network-btn:focus {
340
- border: 2px solid;
341
- box-shadow: none;
342
- }
343
-
344
- .dpsp-networks-btns-wrapper .dpsp-network-btn:after {
345
- content: '';
346
- display: block;
347
- height: 0;
348
- clear: both;
349
- }
350
-
351
-
352
- /*
353
- * Button icon
354
- */
355
- .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon {
356
- position: absolute;
357
- top: -2px;
358
- left: -2px;
359
- bottom: -2px;
360
- float: left;
361
- display: block;
362
- font-size: 14px;
363
- line-height: 36px;
364
- width: 40px;
365
- text-align: center;
366
- vertical-align: middle;
367
- border: 2px solid;
368
-
369
- -moz-box-sizing: border-box;
370
- box-sizing: border-box;
371
-
372
- -moz-transition: all 0.15s ease-in;
373
- -webkit-transition: all 0.15s ease-in;
374
- -o-transition: all 0.15s ease-in;
375
- transition: all 0.15s ease-in;
376
- }
377
-
378
-
379
- /*
380
- * Buttons with no labels
381
- */
382
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label {
383
- padding: 0 18px;
384
- }
385
-
386
- .dpsp-button-style-1 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label .dpsp-network-icon {
387
- width: auto;
388
- right: -2px;
389
- }
390
-
391
-
392
- /*
393
- * Button label
394
- */
395
- .dpsp-has-buttons-count .dpsp-networks-btns-wrapper .dpsp-network-label {
396
- margin-right: 10px;
397
- }
398
-
399
- .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-count {
400
- font-size: 13px;
401
- }
402
-
403
- .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-count {
404
- position: absolute;
405
- bottom: 0;
406
- left: 0;
407
- width: 100%;
408
- margin-left: 0;
409
- font-size: 11px;
410
- text-align: center;
411
- height: 20px;
412
- line-height: 20px;
413
- }
414
-
415
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label .dpsp-network-label-wrapper {
416
- display: none;
417
- }
418
-
419
-
420
- /*
421
- * Buttons columns
422
- */
423
- .dpsp-column-1 .dpsp-networks-btns-wrapper li { width: 100%; }
424
- .dpsp-column-1.dpsp-has-spacing .dpsp-networks-btns-wrapper li { margin-right: 0; }
425
-
426
- .dpsp-column-2 .dpsp-networks-btns-wrapper li { width: 50%; }
427
- .dpsp-column-2.dpsp-has-spacing .dpsp-networks-btns-wrapper li { width: 49%; }
428
- .dpsp-column-2 .dpsp-networks-btns-wrapper li:nth-child(2n) { margin-right: 0; }
429
-
430
- .dpsp-column-3 .dpsp-networks-btns-wrapper li { width: 33.3333%; }
431
- .dpsp-column-3.dpsp-has-spacing .dpsp-networks-btns-wrapper li { width: 32%; }
432
- .dpsp-column-3 .dpsp-networks-btns-wrapper li:nth-child(3n) { margin-right: 0; }
433
-
434
- .dpsp-column-4 .dpsp-networks-btns-wrapper li { width: 25%; }
435
- .dpsp-column-4.dpsp-has-spacing .dpsp-networks-btns-wrapper li { width: 23.5%; }
436
- .dpsp-column-4 .dpsp-networks-btns-wrapper li:nth-child(4n) { margin-right: 0; }
437
-
438
- .dpsp-column-5 .dpsp-networks-btns-wrapper li { width: 20%; }
439
- .dpsp-column-5.dpsp-has-spacing .dpsp-networks-btns-wrapper li { width: 18.4%; }
440
- .dpsp-column-5 .dpsp-networks-btns-wrapper li:nth-child(5n) { margin-right: 0; }
441
-
442
- .dpsp-column-6 .dpsp-networks-btns-wrapper li { width: 16.6666%; }
443
- .dpsp-column-6.dpsp-has-spacing .dpsp-networks-btns-wrapper li { width: 15%; }
444
- .dpsp-column-6 .dpsp-networks-btns-wrapper li:nth-child(6n) { margin-right: 0; }
445
-
446
- .dpsp-column-2 .dpsp-networks-btns-wrapper .dpsp-network-btn,
447
- .dpsp-column-3 .dpsp-networks-btns-wrapper .dpsp-network-btn,
448
- .dpsp-column-4 .dpsp-networks-btns-wrapper .dpsp-network-btn,
449
- .dpsp-column-5 .dpsp-networks-btns-wrapper .dpsp-network-btn,
450
- .dpsp-column-6 .dpsp-networks-btns-wrapper .dpsp-network-btn { padding-right: 10px; }
451
-
452
- /*
453
- * let buttons respect the space of their siblings and wrap when needed
454
- */
455
- .article .dpsp-networks-btns-wrapper {
456
- display: flex;
457
- flex-wrap: wrap;
458
- justify-content: center;
459
- }
460
-
461
- .article ul.dpsp-networks-btns-wrapper li {
462
- flex: 0 0 auto;
463
- float: none;
464
- margin: 5px;
465
- width: auto;
466
- }
467
-
468
- /*
469
- * Buttons width no labels
470
- */
471
- .dpsp-no-labels .dpsp-networks-btns-wrapper .dpsp-network-btn { padding: 0; text-align: center; }
472
- .dpsp-no-labels:not(.dpsp-column-auto) .dpsp-networks-btns-wrapper .dpsp-network-btn:before { position: relative; left: 0; float: none; display: inline-block; }
473
-
474
-
475
- /*
476
- * Buttons colors
477
- */
478
- /* Facebook */
479
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook .dpsp-network-icon,
480
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook {
481
- border-color: #3a579a;
482
- background: #3a579a;
483
- color: #3a579a;
484
- }
485
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:hover .dpsp-network-icon,
486
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:hover {
487
- border-color: #334d87;
488
- background: #334d87;
489
- color: #334d87;
490
- }
491
-
492
- /* Twitter */
493
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter .dpsp-network-icon,
494
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter {
495
- border-color: #00abf0;
496
- background: #00abf0;
497
- color: #00abf0;
498
- }
499
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:hover .dpsp-network-icon,
500
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:hover {
501
- border-color: #0099d7;
502
- background: #0099d7;
503
- color: #0099d7;
504
- }
505
-
506
- /* Pinterest */
507
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest .dpsp-network-icon,
508
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest {
509
- border-color: #c92228;
510
- background: #c92228;
511
- color: #c92228;
512
- }
513
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:hover .dpsp-network-icon,
514
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:hover {
515
- border-color: #b31e24;
516
- background: #b31e24;
517
- color: #b31e24;
518
- }
519
-
520
- /* LinkedIn */
521
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin .dpsp-network-icon,
522
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin {
523
- border-color: #0077b5;
524
- background: #0077b5;
525
- color: #0077b5;
526
- }
527
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:hover .dpsp-network-icon,
528
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:hover {
529
- border-color: #00669c;
530
- background: #00669c;
531
- color: #00669c;
532
- }
533
-
534
- /* Email */
535
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email .dpsp-network-icon,
536
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email {
537
- border-color: #27ae60;
538
- background: #27ae60;
539
- color: #27ae60;
540
- }
541
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:hover .dpsp-network-icon,
542
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:hover {
543
- border-color: #239e57;
544
- background: #239e57;
545
- color: #239e57;
546
- }
547
-
548
- /* Print */
549
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print .dpsp-network-icon,
550
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print {
551
- border-color: #bdc3c7;
552
- background: #bdc3c7;
553
- color: #bdc3c7;
554
- }
555
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:hover .dpsp-network-icon,
556
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:hover {
557
- border-color: #afb6bb;
558
- background: #afb6bb;
559
- color: #afb6bb;
560
- }
561
-
562
-
563
- /* Sidebar needs color white for icons */
564
- .dpsp-has-button-background .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn:before {
565
- color: #fff;
566
- }
567
-
568
- /*
569
- * Buttons Shapes
570
- */
571
- .dpsp-shape-rounded .dpsp-network-btn,
572
- .dpsp-shape-rounded .dpsp-network-btn .dpsp-network-icon {
573
- -webkit-border-top-left-radius: 5px;
574
- -webkit-border-bottom-left-radius: 5px;
575
- -moz-border-radius-topleft: 5px;
576
- -moz-border-radius-bottomleft: 5px;
577
- border-top-left-radius: 5px;
578
- border-bottom-left-radius: 5px;
579
- }
580
-
581
- .dpsp-shape-rounded .dpsp-network-btn,
582
- .dpsp-shape-rounded .dpsp-no-label.dpsp-network-btn .dpsp-network-icon {
583
- -webkit-border-top-right-radius: 5px;
584
- -webkit-border-bottom-right-radius: 5px;
585
- -moz-border-radius-topright: 5px;
586
- -moz-border-radius-bottomright: 5px;
587
- border-top-right-radius: 5px;
588
- border-bottom-right-radius: 5px;
589
- }
590
-
591
- .dpsp-shape-circle .dpsp-network-btn { border-radius: 30px; }
592
- .dpsp-shape-circle .dpsp-network-btn .dpsp-network-icon { border-radius: 30px; overflow: hidden; }
593
-
594
- /*
595
- * Buttons Margins/Spacings
596
- */
597
- .dpsp-has-spacing .dpsp-networks-btns-wrapper li { margin-bottom: 10px; margin-right: 2%; margin-left: 0 !important; }
598
-
599
-
600
- /*
601
- * Buttons on mobile
602
- */
603
- @media screen and ( max-width : 720px ) {
604
- .dpsp-hide-on-mobile {
605
- display: none;
606
- }
607
- }
608
-
609
-
610
- /*****************************************/
611
- /* Button styles
612
- /*****************************************/
613
-
614
- /*
615
- * Buttons Style 1
616
- */
617
- .dpsp-button-style-1 .dpsp-network-btn { color: #fff !important; padding-left: 38px; }
618
- .dpsp-button-style-1 .dpsp-network-btn .dpsp-network-icon { color: #fff !important; }
619
-
620
-
621
- /*****************************************/
622
- /* Total shares
623
- /*****************************************/
624
- .dpsp-show-total-share-count {
625
- position: relative;
626
- }
627
-
628
- .dpsp-total-share-wrapper {
629
- position: relative;
630
- font-family: 'Arial';
631
- margin-top: 10px;
632
- line-height: 1.345;
633
- color: #5d6368;
634
- }
635
-
636
- .dpsp-total-share-wrapper .dpsp-icon-total-share:before {
637
- font-size: 16px;
638
- top: 7px;
639
- left: -2px;
640
- margin-top: 0;
641
- margin-left: 0;
642
- }
643
-
644
- #dpsp-floating-sidebar .dpsp-total-share-wrapper {
645
- margin-bottom: 10px;
646
- }
647
-
648
- #dpsp-floating-sidebar .dpsp-total-share-wrapper .dpsp-icon-total-share {
649
- display: none;
650
- }
651
-
652
- .dpsp-total-share-wrapper span {
653
- display: block;
654
- font-size: 9px;
655
- font-weight: bold;
656
- text-transform: uppercase;
657
- text-align: center;
658
- }
659
-
660
- .dpsp-total-share-wrapper .dpsp-total-share-count {
661
- font-size: 15px;
662
- line-height: 18px;
663
- white-space: nowrap;
664
- }
665
-
666
- .dpsp-content-wrapper .dpsp-total-share-wrapper {
667
- position: absolute;
668
- width: 60px;
669
- height: 40px;
670
- margin-top: -21px;
671
- top: 50%;
672
- padding-left: 20px;
673
- box-sizing: border-box;
674
- }
675
-
676
- .dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before {
677
- padding-left: 70px;
678
- }
679
-
680
- .dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after {
681
- padding-right: 70px;
682
- }
683
-
684
- .dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before .dpsp-total-share-wrapper {
685
- left: 0;
686
- }
687
-
688
- .dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after .dpsp-total-share-wrapper {
689
- right: 0;
690
- }
691
-
692
-
693
- @media print {
694
-
695
- #dpsp-floating-sidebar,
696
- .dpsp-share-text,
697
- .dpsp-content-wrapper { display: none; }
698
-
699
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/src/css/style-frontend-pro-jquery.css ADDED
@@ -0,0 +1 @@
 
1
+ @import './base.scss';
assets/src/css/style-frontend-pro.css ADDED
@@ -0,0 +1 @@
 
1
+ @import './base.scss';
assets/src/css/style-frontend.css DELETED
@@ -1,685 +0,0 @@
1
- /*****************************************/
2
- /* General: Fonts
3
- /*****************************************/
4
- @font-face {
5
- font-family: 'Social Pug';
6
- src:url('../fonts/socialpug.eot?gd6mr8');
7
- src:url('../fonts/socialpug.eot?#iefix') format('embedded-opentype'),
8
- url('../fonts/socialpug.woff') format('woff'),
9
- url('../fonts/socialpug.ttf') format('truetype'),
10
- url('../fonts/socialpug.svg#socialpug') format('svg');
11
- font-weight: normal;
12
- font-style: normal;
13
- font-display: swap;
14
- }
15
-
16
-
17
- /*****************************************/
18
- /* General: Icons
19
- /*****************************************/
20
- .dpsp-icon-total-share:before {
21
- position: absolute;
22
- top: 50%;
23
- left: 50%;
24
- margin-top: -10px;
25
- margin-left: -10px;
26
- width: 20px;
27
- height: 20px;
28
- vertical-align: middle;
29
- line-height: 20px;
30
- }
31
-
32
-
33
- .dpsp-icon-total-share:before {
34
- font-family: "Social Pug";
35
- font-style: normal;
36
- font-weight: normal;
37
-
38
- display: inline-block;
39
- text-decoration: inherit;
40
- text-align: center;
41
- font-variant: normal;
42
- text-transform: none;
43
- line-height: 1em;
44
- }
45
-
46
- .dpsp-network-btn .dpsp-network-icon:before,
47
- .dpsp-network-btn .dpsp-network-icon:after {
48
- font-family: "Social Pug";
49
- font-style: normal;
50
- font-weight: normal;
51
-
52
- display: block;
53
- text-decoration: inherit;
54
- text-align: center;
55
- font-variant: normal;
56
- text-transform: none;
57
-
58
- position: absolute;
59
- top: 50%;
60
- left: 50%;
61
- margin-top: -10px;
62
- margin-left: -10px;
63
- width: 20px;
64
- height: 20px;
65
- vertical-align: middle;
66
- line-height: 20px;
67
- }
68
-
69
- .dpsp-network-btn .dpsp-network-icon:after {
70
- margin-left: -20px;
71
- opacity: 0;
72
- }
73
-
74
- .dpsp-icon-total-share:before { content: '\e883'; }
75
-
76
- .dpsp-facebook .dpsp-network-icon:before,
77
- .dpsp-facebook .dpsp-network-icon:after { content: '\e800'; }
78
- .dpsp-twitter .dpsp-network-icon:before,
79
- .dpsp-twitter .dpsp-network-icon:after { content: '\e801'; }
80
- .dpsp-pinterest .dpsp-network-icon:before,
81
- .dpsp-pinterest .dpsp-network-icon:after { content: '\e803'; }
82
- .dpsp-linkedin .dpsp-network-icon:before,
83
- .dpsp-linkedin .dpsp-network-icon:after { content: '\e804'; }
84
- .dpsp-email .dpsp-network-icon:before,
85
- .dpsp-email .dpsp-network-icon:after { content: '\e816'; }
86
- .dpsp-print .dpsp-network-icon:before,
87
- .dpsp-print .dpsp-network-icon:after { content: '\e817'; }
88
-
89
- /* Button animations */
90
- .dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon:before,
91
- .dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon:after {
92
- transition: all 0.25s ease-in-out;
93
- }
94
-
95
- .dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon:before {
96
- margin-left: 5px;
97
- opacity: 0;
98
- }
99
-
100
- .dpsp-networks-btns-wrapper.dpsp-has-button-icon-animation .dpsp-network-btn:hover .dpsp-network-icon:after {
101
- margin-left: -10px;
102
- opacity: 1;
103
- }
104
-
105
- /*****************************************/
106
- /* Floating Sidebar Buttons
107
- /*****************************************/
108
- #dpsp-floating-sidebar {
109
- position: fixed;
110
- top: 50%;
111
- transform: translateY(-50%);
112
- z-index: 9998;
113
- }
114
-
115
- #dpsp-floating-sidebar.dpsp-position-left {
116
- left: 0;
117
- }
118
-
119
- #dpsp-floating-sidebar.dpsp-position-right {
120
- right: 0;
121
- }
122
-
123
- .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar li {
124
- float: none;
125
- margin-left: 0;
126
- }
127
-
128
- .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn {
129
- padding: 0;
130
- width: 40px;
131
- }
132
-
133
- .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon {
134
- border-color: transparent !important;
135
- background: transparent !important;
136
- }
137
-
138
- .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-has-count .dpsp-network-icon {
139
- height: 22px;
140
- line-height: 22px;
141
- }
142
-
143
- .dpsp-button-hover .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn:hover:before {
144
- color: #fff;
145
- }
146
-
147
-
148
- /* Sidebar buttons option - rounded */
149
- .dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn,
150
- .dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon {
151
- border-radius: 0;
152
- }
153
-
154
- .dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first,
155
- .dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first .dpsp-network-icon {
156
- -webkit-border-top-right-radius: 5px;
157
- -moz-border-radius-topright: 5px;
158
- border-top-right-radius: 5px;
159
- }
160
-
161
- .dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last,
162
- .dpsp-position-left.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last .dpsp-network-icon {
163
- -webkit-border-bottom-right-radius: 5px;
164
- -moz-border-radius-bottomright: 5px;
165
- border-bottom-right-radius: 5px;
166
- }
167
-
168
- .dpsp-position-left.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn,
169
- .dpsp-position-left.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon {
170
- -webkit-border-top-right-radius: 5px;
171
- -moz-border-radius-topright: 5px;
172
- border-top-right-radius: 5px;
173
- -webkit-border-bottom-right-radius: 5px;
174
- -moz-border-radius-bottomright: 5px;
175
- border-bottom-right-radius: 5px;
176
- }
177
-
178
-
179
- .dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first,
180
- .dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-first .dpsp-network-icon {
181
- -webkit-border-top-left-radius: 5px;
182
- -moz-border-radius-topleft: 5px;
183
- border-top-left-radius: 5px;
184
- }
185
-
186
- .dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last,
187
- .dpsp-position-right.dpsp-shape-rounded .dpsp-networks-btns-sidebar .dpsp-network-btn.dpsp-last .dpsp-network-icon {
188
- -webkit-border-bottom-left-radius: 5px;
189
- -moz-border-radius-bottomleft: 5px;
190
- border-bottom-left-radius: 5px;
191
- }
192
-
193
- .dpsp-position-right.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn,
194
- .dpsp-position-right.dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon {
195
- -webkit-border-top-left-radius: 5px;
196
- -moz-border-radius-topleft: 5px;
197
- border-top-left-radius: 5px;
198
- -webkit-border-bottom-left-radius: 5px;
199
- -moz-border-radius-bottomleft: 5px;
200
- border-bottom-left-radius: 5px;
201
- }
202
-
203
- .dpsp-shape-rounded.dpsp-has-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-icon {
204
- border-radius: 5px;
205
- }
206
-
207
- /* Sidebar buttons option - circle */
208
- #dpsp-floating-sidebar.dpsp-position-left.dpsp-shape-circle {
209
- left: 12px;
210
- }
211
-
212
- #dpsp-floating-sidebar.dpsp-position-right.dpsp-shape-circle {
213
- right: 10px;
214
- }
215
-
216
- /* Sidebar buttons bottom spacing */
217
- .dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn {
218
- margin-bottom: 6px;
219
- }
220
-
221
- .dpsp-shape-rounded.dpsp-bottom-spacing .dpsp-networks-btns-sidebar .dpsp-network-btn {
222
- -webkit-border-top-right-radius: 5px;
223
- -moz-border-radius-topright: 5px;
224
- border-top-right-radius: 5px;
225
-
226
- -webkit-border-bottom-right-radius: 5px;
227
- -moz-border-radius-bottomright: 5px;
228
- border-bottom-right-radius: 5px;
229
- }
230
-
231
- /*
232
- * Sidebar buttons style 2
233
- */
234
- #dpsp-floating-sidebar.dpsp-style-2 .dpsp-network-btn:before {
235
- background: none;
236
- }
237
-
238
- /**
239
- * Sidebar button hover label
240
- *
241
- */
242
- #dpsp-floating-sidebar .dpsp-networks-btns-wrapper li { position: relative; overflow: visible; }
243
-
244
- #dpsp-floating-sidebar .dpsp-networks-btns-wrapper .dpsp-button-label { position: absolute; z-index: 1; display: inline-block; width: auto; white-space: nowrap; top: 50%; margin-top: -15px; height: 30px; padding: 6px 12px; color: #fff; font-size: 12px; font-weight: normal; line-height: 18px; background: #34495e; border-radius: 3px; visibility: hidden; opacity: 0; transition: all 0.2s ease-in-out; box-sizing: border-box; }
245
- #dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper .dpsp-button-label { left: 100%; }
246
- #dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper .dpsp-button-label { right: 100%; }
247
-
248
- #dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper li.dpsp-hover .dpsp-button-label { transform: translateX(10px); visibility: visible; opacity: 1; }
249
- #dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper li.dpsp-hover .dpsp-button-label { transform: translateX(-10px); visibility: visible; opacity: 1; }
250
-
251
- #dpsp-floating-sidebar .dpsp-networks-btns-wrapper .dpsp-button-label:before { content: ''; display: block; position: absolute; top: 50%; margin-top: -5px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
252
- #dpsp-floating-sidebar.dpsp-position-left .dpsp-networks-btns-wrapper .dpsp-button-label:before { left: -5px; border-right: 5px solid #34495e; }
253
- #dpsp-floating-sidebar.dpsp-position-right .dpsp-networks-btns-wrapper .dpsp-button-label:before { right: -5px; border-left: 5px solid #34495e; }
254
-
255
-
256
- /*****************************************/
257
- /* Content Buttons
258
- /*****************************************/
259
- #dpsp-content-top { margin-bottom: 1.2em; }
260
- #dpsp-content-bottom { margin-top: 1.2em; }
261
-
262
- .dpsp-share-text { font-weight: bold; margin-bottom: 10px; }
263
-
264
- /**************************************************/
265
- /* General button styling, for content and other
266
- /**************************************************/
267
- .dpsp-networks-btns-wrapper {
268
- list-style: none !important;
269
- padding: 0 !important;
270
- margin: 0 !important;
271
- }
272
-
273
- .dpsp-networks-btns-wrapper:after {
274
- content: '';
275
- display: block;
276
- height: 0;
277
- clear: both;
278
- }
279
-
280
- .dpsp-networks-btns-wrapper li {
281
- float: left;
282
- overflow: hidden;
283
-
284
- -moz-transition: all 0.15s ease-in;
285
- -webkit-transition: all 0.15s ease-in;
286
- -o-transition: all 0.15s ease-in;
287
- transition: all 0.15s ease-in;
288
-
289
- list-style-type: none !important;
290
- }
291
-
292
- .dpsp-networks-btns-wrapper li:before {
293
- display: none !important;
294
- }
295
-
296
- .dpsp-networks-btns-wrapper li:first-child {
297
- margin-left: 0 !important;
298
- }
299
-
300
- /*
301
- * Share button
302
- */
303
- .dpsp-networks-btns-wrapper .dpsp-network-btn {
304
- position: relative;
305
-
306
- display: block;
307
- text-decoration: none !important;
308
- text-transform: unset !important;
309
- height: 40px;
310
- min-width: 40px;
311
-
312
- font-family: 'Arial';
313
- font-weight: bold;
314
- font-size: 14px;
315
- line-height: 36px;
316
- vertical-align: middle;
317
-
318
- padding: 0 10px 0 48px;
319
- border: 2px solid;
320
- max-height: 40px;
321
-
322
- width: 100%;
323
- -moz-box-sizing: border-box;
324
- box-sizing: border-box;
325
-
326
- -moz-transition: all 0.15s ease-in;
327
- -webkit-transition: all 0.15s ease-in;
328
- -o-transition: all 0.15s ease-in;
329
- transition: all 0.15s ease-in;
330
-
331
- box-shadow: none;
332
-
333
- cursor: pointer;
334
- }
335
-
336
- .dpsp-networks-btns-wrapper .dpsp-network-btn:hover {
337
- border: 2px solid;
338
- box-shadow: none;
339
- }
340
-
341
- .dpsp-networks-btns-wrapper .dpsp-network-btn:focus {
342
- border: 2px solid;
343
- box-shadow: none;
344
- }
345
-
346
- .dpsp-networks-btns-wrapper .dpsp-network-btn:after {
347
- content: '';
348
- display: block;
349
- height: 0;
350
- clear: both;
351
- }
352
-
353
-
354
- /*
355
- * Button icon
356
- */
357
- .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon {
358
- position: absolute;
359
- top: -2px;
360
- left: -2px;
361
- bottom: -2px;
362
- float: left;
363
- display: block;
364
- font-size: 14px;
365
- line-height: 36px;
366
- width: 40px;
367
- text-align: center;
368
- vertical-align: middle;
369
- border: 2px solid;
370
-
371
- -moz-box-sizing: border-box;
372
- box-sizing: border-box;
373
-
374
- -moz-transition: all 0.15s ease-in;
375
- -webkit-transition: all 0.15s ease-in;
376
- -o-transition: all 0.15s ease-in;
377
- transition: all 0.15s ease-in;
378
- }
379
-
380
-
381
- /*
382
- * Buttons with no labels
383
- */
384
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label {
385
- padding: 0 18px;
386
- }
387
-
388
- .dpsp-button-style-1 .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label .dpsp-network-icon {
389
- width: auto;
390
- right: -2px;
391
- }
392
-
393
-
394
- /*
395
- * Button label
396
- */
397
- .dpsp-has-buttons-count .dpsp-networks-btns-wrapper .dpsp-network-label {
398
- margin-right: 10px;
399
- }
400
-
401
- .dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-count {
402
- font-size: 13px;
403
- }
404
-
405
- .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn .dpsp-network-count {
406
- position: absolute;
407
- bottom: 0;
408
- left: 0;
409
- width: 100%;
410
- margin-left: 0;
411
- font-size: 11px;
412
- text-align: center;
413
- height: 20px;
414
- line-height: 20px;
415
- }
416
-
417
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-no-label .dpsp-network-label-wrapper {
418
- display: none;
419
- }
420
-
421
-
422
- /*
423
- * Buttons columns
424
- */
425
- .dpsp-column-1 .dpsp-networks-btns-wrapper li { width: 100%; }
426
- .dpsp-column-1.dpsp-has-spacing .dpsp-networks-btns-wrapper li { margin-right: 0; }
427
-
428
- .dpsp-column-2 .dpsp-networks-btns-wrapper li { width: 50%; }
429
- .dpsp-column-2.dpsp-has-spacing .dpsp-networks-btns-wrapper li { width: 49%; }
430
- .dpsp-column-2 .dpsp-networks-btns-wrapper li:nth-child(2n) { margin-right: 0; }
431
-
432
- .dpsp-column-3 .dpsp-networks-btns-wrapper li { width: 33.3333%; }
433
- .dpsp-column-3.dpsp-has-spacing .dpsp-networks-btns-wrapper li { width: 32%; }
434
- .dpsp-column-3 .dpsp-networks-btns-wrapper li:nth-child(3n) { margin-right: 0; }
435
-
436
- .dpsp-column-4 .dpsp-networks-btns-wrapper li { width: 25%; }
437
- .dpsp-column-4.dpsp-has-spacing .dpsp-networks-btns-wrapper li { width: 23.5%; }
438
- .dpsp-column-4 .dpsp-networks-btns-wrapper li:nth-child(4n) { margin-right: 0; }
439
-
440
- .dpsp-column-5 .dpsp-networks-btns-wrapper li { width: 20%; }
441
- .dpsp-column-5.dpsp-has-spacing .dpsp-networks-btns-wrapper li { width: 18.4%; }
442
- .dpsp-column-5 .dpsp-networks-btns-wrapper li:nth-child(5n) { margin-right: 0; }
443
-
444
- .dpsp-column-6 .dpsp-networks-btns-wrapper li { width: 16.6666%; }
445
- .dpsp-column-6.dpsp-has-spacing .dpsp-networks-btns-wrapper li { width: 15%; }
446
- .dpsp-column-6 .dpsp-networks-btns-wrapper li:nth-child(6n) { margin-right: 0; }
447
-
448
- .dpsp-column-2 .dpsp-networks-btns-wrapper .dpsp-network-btn,
449
- .dpsp-column-3 .dpsp-networks-btns-wrapper .dpsp-network-btn,
450
- .dpsp-column-4 .dpsp-networks-btns-wrapper .dpsp-network-btn,
451
- .dpsp-column-5 .dpsp-networks-btns-wrapper .dpsp-network-btn,
452
- .dpsp-column-6 .dpsp-networks-btns-wrapper .dpsp-network-btn { padding-right: 10px; }
453
-
454
- /*
455
- * Buttons width no labels
456
- */
457
- .dpsp-no-labels .dpsp-networks-btns-wrapper .dpsp-network-btn { padding: 0; text-align: center; }
458
- .dpsp-no-labels:not(.dpsp-column-auto) .dpsp-networks-btns-wrapper .dpsp-network-btn:before { position: relative; left: 0; float: none; display: inline-block; }
459
-
460
-
461
- /*
462
- * Buttons colors
463
- */
464
- /* Facebook */
465
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook .dpsp-network-icon,
466
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook {
467
- border-color: #3a579a;
468
- background: #3a579a;
469
- color: #3a579a;
470
- }
471
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:hover .dpsp-network-icon,
472
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-facebook:hover {
473
- border-color: #334d87;
474
- background: #334d87;
475
- color: #334d87;
476
- }
477
-
478
- /* Twitter */
479
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter .dpsp-network-icon,
480
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter {
481
- border-color: #00abf0;
482
- background: #00abf0;
483
- color: #00abf0;
484
- }
485
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:hover .dpsp-network-icon,
486
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-twitter:hover {
487
- border-color: #0099d7;
488
- background: #0099d7;
489
- color: #0099d7;
490
- }
491
-
492
- /* Pinterest */
493
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest .dpsp-network-icon,
494
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest {
495
- border-color: #c92228;
496
- background: #c92228;
497
- color: #c92228;
498
- }
499
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:hover .dpsp-network-icon,
500
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-pinterest:hover {
501
- border-color: #b31e24;
502
- background: #b31e24;
503
- color: #b31e24;
504
- }
505
-
506
- /* LinkedIn */
507
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin .dpsp-network-icon,
508
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin {
509
- border-color: #0077b5;
510
- background: #0077b5;
511
- color: #0077b5;
512
- }
513
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:hover .dpsp-network-icon,
514
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-linkedin:hover {
515
- border-color: #00669c;
516
- background: #00669c;
517
- color: #00669c;
518
- }
519
-
520
- /* Email */
521
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email .dpsp-network-icon,
522
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email {
523
- border-color: #27ae60;
524
- background: #27ae60;
525
- color: #27ae60;
526
- }
527
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:hover .dpsp-network-icon,
528
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-email:hover {
529
- border-color: #239e57;
530
- background: #239e57;
531
- color: #239e57;
532
- }
533
-
534
- /* Print */
535
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print .dpsp-network-icon,
536
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print {
537
- border-color: #bdc3c7;
538
- background: #bdc3c7;
539
- color: #bdc3c7;
540
- }
541
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:hover .dpsp-network-icon,
542
- .dpsp-networks-btns-wrapper .dpsp-network-btn.dpsp-print:hover {
543
- border-color: #afb6bb;
544
- background: #afb6bb;
545
- color: #afb6bb;
546
- }
547
-
548
-
549
- /* Sidebar needs color white for icons */
550
- .dpsp-has-button-background .dpsp-networks-btns-wrapper.dpsp-networks-btns-sidebar .dpsp-network-btn:before {
551
- color: #fff;
552
- }
553
-
554
- /*
555
- * Buttons Shapes
556
- */
557
- .dpsp-shape-rounded .dpsp-network-btn,
558
- .dpsp-shape-rounded .dpsp-network-btn .dpsp-network-icon {
559
- -webkit-border-top-left-radius: 5px;
560
- -webkit-border-bottom-left-radius: 5px;
561
- -moz-border-radius-topleft: 5px;
562
- -moz-border-radius-bottomleft: 5px;
563
- border-top-left-radius: 5px;
564
- border-bottom-left-radius: 5px;
565
- }
566
-
567
- .dpsp-shape-rounded .dpsp-network-btn,
568
- .dpsp-shape-rounded .dpsp-no-label.dpsp-network-btn .dpsp-network-icon {
569
- -webkit-border-top-right-radius: 5px;
570
- -webkit-border-bottom-right-radius: 5px;
571
- -moz-border-radius-topright: 5px;
572
- -moz-border-radius-bottomright: 5px;
573
- border-top-right-radius: 5px;
574
- border-bottom-right-radius: 5px;
575
- }
576
-
577
- .dpsp-shape-circle .dpsp-network-btn { border-radius: 30px; }
578
- .dpsp-shape-circle .dpsp-network-btn .dpsp-network-icon { border-radius: 30px; overflow: hidden; }
579
-
580
- /*
581
- * Buttons Margins/Spacings
582
- */
583
- .dpsp-has-spacing .dpsp-networks-btns-wrapper li { margin-bottom: 10px; margin-right: 2%; margin-left: 0 !important; }
584
-
585
-
586
- /*
587
- * Buttons on mobile
588
- */
589
- @media screen and ( max-width : 720px ) {
590
- .dpsp-hide-on-mobile {
591
- display: none;
592
- }
593
- }
594
-
595
-
596
- /*****************************************/
597
- /* Button styles
598
- /*****************************************/
599
-
600
- /*
601
- * Buttons Style 1
602
- */
603
- .dpsp-button-style-1 .dpsp-network-btn { color: #fff !important; padding-left: 38px; }
604
- .dpsp-button-style-1 .dpsp-network-btn .dpsp-network-icon { color: #fff !important; }
605
-
606
-
607
- /*****************************************/
608
- /* Total shares
609
- /*****************************************/
610
- .dpsp-show-total-share-count {
611
- position: relative;
612
- }
613
-
614
- .dpsp-total-share-wrapper {
615
- position: relative;
616
- font-family: 'Arial';
617
- margin-top: 10px;
618
- line-height: 1.345;
619
- color: #5d6368;
620
- }
621
-
622
- .dpsp-total-share-wrapper .dpsp-icon-total-share:before {
623
- font-size: 16px;
624
- top: 7px;
625
- left: -2px;
626
- margin-top: 0;
627
- margin-left: 0;
628
- }
629
-
630
- #dpsp-floating-sidebar .dpsp-total-share-wrapper {
631
- margin-bottom: 10px;
632
- }
633
-
634
- #dpsp-floating-sidebar .dpsp-total-share-wrapper .dpsp-icon-total-share {
635
- display: none;
636
- }
637
-
638
- .dpsp-total-share-wrapper span {
639
- display: block;
640
- font-size: 9px;
641
- font-weight: bold;
642
- text-transform: uppercase;
643
- text-align: center;
644
- }
645
-
646
- .dpsp-total-share-wrapper .dpsp-total-share-count {
647
- font-size: 15px;
648
- line-height: 18px;
649
- white-space: nowrap;
650
- }
651
-
652
- .dpsp-content-wrapper .dpsp-total-share-wrapper {
653
- position: absolute;
654
- width: 60px;
655
- height: 40px;
656
- margin-top: -21px;
657
- top: 50%;
658
- padding-left: 20px;
659
- box-sizing: border-box;
660
- }
661
-
662
- .dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before {
663
- padding-left: 70px;
664
- }
665
-
666
- .dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after {
667
- padding-right: 70px;
668
- }
669
-
670
- .dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-before .dpsp-total-share-wrapper {
671
- left: 0;
672
- }
673
-
674
- .dpsp-content-wrapper.dpsp-show-total-share-count.dpsp-show-total-share-count-after .dpsp-total-share-wrapper {
675
- right: 0;
676
- }
677
-
678
-
679
- @media print {
680
-
681
- #dpsp-floating-sidebar,
682
- .dpsp-share-text,
683
- .dpsp-content-wrapper { display: none; }
684
-
685
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/src/dev-entry-jquery.js CHANGED
@@ -1,4 +1,3 @@
1
- import './css/style-frontend-jquery.css'
2
- import './css/style-dashboard.css'
3
- import './js/front-end-jquery'
4
- import './js/dashboard.js'
1
+ import './css/style-frontend-pro-jquery.css'
2
+ import './css/style-dashboard-pro.css'
3
+ import './js/front-end-pro-jquery'
 
assets/src/dev-entry.js CHANGED
@@ -1,4 +1,4 @@
1
- import './css/style-frontend.css'
2
- import './css/style-dashboard.css'
3
- import './js/front-end'
4
- import './js/dashboard.js'
1
+ import './css/style-frontend-pro.css'
2
+ import './css/style-dashboard-pro.css'
3
+ import './js/front-end-pro'
4
+ import './js/front-end-free'
assets/src/entry.html CHANGED
@@ -1,14 +1,34 @@
1
  <html>
2
  <head>
3
- <link rel="stylesheet" href="css/style-frontend.css"/>
4
- <link rel="stylesheet" href="css/style-frontend-jquery.css"/>
5
- <link rel="stylesheet" href="css/style-dashboard.css"/>
6
- <script src="js/front-end.js"></script>
7
- <script src="js/front-end-jquery.js"></script>
8
- <script src="js/dashboard.js"></script>
 
9
  <script src="js/jquery.ui.touch-punch.min.js"></script>
 
 
 
 
10
  </head>
11
  <body>
12
- Remove me
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  </body>
14
- </html>
1
  <html>
2
  <head>
3
+ <link rel="stylesheet" href="css/style-frontend-pro.css"/>
4
+ <link rel="stylesheet" href="css/style-frontend-pro-jquery.css"/>
5
+ <link rel="stylesheet" href="css/style-dashboard-pro.css"/>
6
+ <script src="js/front-end-free.js"></script>
7
+ <script src="js/front-end-pro.js"></script>
8
+ <script src="js/front-end-pro-jquery.js"></script>
9
+ <script src="js/dashboard-pro.js"></script>
10
  <script src="js/jquery.ui.touch-punch.min.js"></script>
11
+ <script src="js/gutenberg-image-pinterest-pro.js"></script>
12
+ <script src="js/intercom.js"></script>
13
+ <script src="js/dashboard-tinymce.js"></script>
14
+
15
  </head>
16
  <body>
17
+ <img src="img/grow-logo-sq-navy.png">
18
+ <img src="img/custom-social-media-image.png">
19
+ <img src="img/custom-social-media-image-pinterest.png">
20
+ <img src="img/tool-follow-widget.png">
21
+ <img src="img/tool-misc-import-export.png">
22
+ <img src="img/tool-sidebar.png">
23
+ <img src="img/tool-image-hover-pinterest.png">
24
+ <img src="img/tool-content.png">
25
+ <img src="img/tool-pop-up.png">
26
+ <img src="img/tool-mobile.png">
27
+ <img src="img/extension-bitly.png">
28
+ <img src="img/extension-branch.png">
29
+ <img src="img/extension-ctt.png">
30
+ <img src="img/extension-ga-utm-tracking.png">
31
+ <img src="img/extension-networks.png">
32
+ <img src="img/social-pug-upgrade.png">
33
  </body>
34
+ </html>
assets/src/fonts/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
assets/src/fonts/socialpug.eot CHANGED
Binary file
assets/src/fonts/socialpug.svg CHANGED
@@ -1,7 +1,7 @@
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>Copyright (C) 2017 by original authors @ fontello.com</metadata>
5
  <defs>
6
  <font id="socialpug" horiz-adv-x="1000" >
7
  <font-face font-family="socialpug" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
@@ -58,6 +58,10 @@
58
 
59
  <glyph glyph-name="telegram" unicode="&#xe825;" d="M381-3c-28 0-23 11-33 38l-84 276 646 384m-529-698c22 0 32 10 44 22l118 114-147 89m0 0l355-263c41-22 70-11 80 38l145 681c15 59-23 86-61 69l-849-328c-58-23-58-55-11-70l218-68 504 318c24 15 46 7 28-9" horiz-adv-x="1000" />
60
 
 
 
 
 
61
  <glyph glyph-name="ok" unicode="&#xe880;" d="M933 534q0-22-16-38l-404-404-76-76q-16-15-38-15t-38 15l-76 76-202 202q-15 16-15 38t15 38l76 76q16 16 38 16t38-16l164-165 366 367q16 16 38 16t38-16l76-76q16-15 16-38z" horiz-adv-x="1000" />
62
 
63
  <glyph glyph-name="cancel" unicode="&#xe881;" d="M724 112q0-22-15-38l-76-76q-16-15-38-15t-38 15l-164 165-164-165q-16-15-38-15t-38 15l-76 76q-16 16-16 38t16 38l164 164-164 164q-16 16-16 38t16 38l76 76q16 16 38 16t38-16l164-164 164 164q16 16 38 16t38-16l76-76q15-15 15-38t-15-38l-164-164 164-164q15-15 15-38z" horiz-adv-x="785.7" />
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>Copyright (C) 2018 by original authors @ fontello.com</metadata>
5
  <defs>
6
  <font id="socialpug" horiz-adv-x="1000" >
7
  <font-face font-family="socialpug" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
58
 
59
  <glyph glyph-name="telegram" unicode="&#xe825;" d="M381-3c-28 0-23 11-33 38l-84 276 646 384m-529-698c22 0 32 10 44 22l118 114-147 89m0 0l355-263c41-22 70-11 80 38l145 681c15 59-23 86-61 69l-849-328c-58-23-58-55-11-70l218-68 504 318c24 15 46 7 28-9" horiz-adv-x="1000" />
60
 
61
+ <glyph glyph-name="medium" unicode="&#xe826;" d="M140 572c1 12-4 23-12 31l-88 106v16h274l211-464 186 464h262v-16l-76-72c-6-5-10-13-8-21v-531c-2-8 2-17 8-21l74-73v-16h-371v16l77 74c7 8 7 10 7 21v430l-212-539h-29l-247 539v-361c-2-16 3-31 14-42l99-120v-16h-281v16l99 120c11 11 15 27 13 42v417z" horiz-adv-x="1000" />
62
+
63
+ <glyph glyph-name="mix" unicode="&#xe827;" d="M0 725v-681c0-110 172-114 172 0v466c15 103 172 98 172-13v-342c0-114 187-114 187 0v226c11 107 172 103 172-8v-47c0-117 172-110 172 0v399h-875z" horiz-adv-x="875" />
64
+
65
  <glyph glyph-name="ok" unicode="&#xe880;" d="M933 534q0-22-16-38l-404-404-76-76q-16-15-38-15t-38 15l-76 76-202 202q-15 16-15 38t15 38l76 76q16 16 38 16t38-16l164-165 366 367q16 16 38 16t38-16l76-76q16-15 16-38z" horiz-adv-x="1000" />
66
 
67
  <glyph glyph-name="cancel" unicode="&#xe881;" d="M724 112q0-22-15-38l-76-76q-16-15-38-15t-38 15l-164 165-164-165q-16-15-38-15t-38 15l-76 76q-16 16-16 38t16 38l164 164-164 164q-16 16-16 38t16 38l76 76q16 16 38 16t38-16l164-164 164 164q16 16 38 16t38-16l76-76q15-15 15-38t-15-38l-164-164 164-164q15-15 15-38z" horiz-adv-x="785.7" />
assets/src/fonts/socialpug.ttf CHANGED
Binary file
assets/src/fonts/socialpug.woff CHANGED
Binary file
assets/src/fonts/socialpug.woff2 ADDED
Binary file
assets/src/img/custom-social-media-image-pinterest.png ADDED
Binary file
assets/src/img/custom-social-media-image.png ADDED
Binary file
assets/src/img/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
assets/src/img/opt-in-hound-banner.png DELETED
Binary file
assets/src/img/opt-in-hound-icon-256x256.png DELETED
Binary file
assets/src/img/opt-in-hound-promo-pop-up.png DELETED
Binary file
assets/src/img/opt-in-hound-promo-widget.png DELETED
Binary file
assets/src/img/skyepress-banner-clouds.png DELETED
Binary file
assets/src/img/skyepress-banner.png DELETED
Binary file
assets/src/img/skyepress-promo-1.png DELETED
Binary file
assets/src/img/skyepress-promo-2.png DELETED
Binary file
assets/src/img/skyepress-promo-3.png DELETED
Binary file
assets/src/img/skyepress-social-pug-promo.png DELETED
Binary file
assets/src/img/social-shares-recovery-system.png ADDED
Binary file
assets/src/img/tool-integrations-logo-edd.png DELETED
Binary file
assets/src/img/tool-integrations-logo-pb.png DELETED
Binary file
assets/src/img/tool-integrations-logo-pms.png DELETED
Binary file
assets/src/img/tool-integrations-logo-woocommerce.png DELETED
Binary file
assets/src/img/tool-misc-import-export.png ADDED
Binary file
assets/src/img/tool-opt-in-icon-after-content.png DELETED
Binary file
assets/src/img/tool-opt-in-icon-fly-in.png DELETED
Binary file
assets/src/img/tool-opt-in-icon-pop-up.png DELETED
Binary file
assets/src/img/tool-opt-in-icon-shortcode.png DELETED
Binary file
assets/src/img/tool-opt-in-icon-widget.png DELETED
Binary file
assets/src/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
assets/src/js/dashboard.js DELETED
@@ -1,611 +0,0 @@
1
- jQuery( function($) {
2
-
3
- function is_email( email ) {
4
- var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
5
- return re.test(String(email).toLowerCase());
6
- }
7
-
8
- /*****************************************************/
9
- /* Toolkit page
10
- /*****************************************************/
11
- $(document).on( 'click', '.dpsp-tool-wrapper .dpsp-switch label', function(e) {
12
-
13
- var $actions_wrapper = $(this).closest('.dpsp-tool-actions');
14
- var $action_settings = $actions_wrapper.find('.dpsp-tool-settings');
15
-
16
- // Add Loading Overlay
17
- $action_settings.fadeOut(200);
18
- $actions_wrapper.append('<div class="dpsp-tool-actions-overlay"><div class="spinner"></div></div>');
19
- $actions_wrapper.find('.dpsp-tool-actions-overlay').animate({opacity: 1}, 200);
20
-
21
- // Get tool to activate/deactivate
22
- var tool = $(this).siblings('input').data('tool');
23
- var tool_setting = $(this).siblings('input').data('tool-activation');
24
-
25
- if( tool != 'undefined' ) {
26
-
27
- if( $actions_wrapper.hasClass('dpsp-inactive') ) {
28
-
29
- activateTool( tool_setting ).done( function( response ) {
30
- if( response == 1 ) {
31
- $actions_wrapper.find('.dpsp-tool-actions-overlay').animate({opacity: 0}, 200, function() { $(this).remove() });
32
- $actions_wrapper.removeClass('dpsp-inactive').addClass('dpsp-active');
33
- $actions_wrapper.find('span').text('Active');
34
- $action_settings.fadeIn(200);
35
- }
36
- });
37
-
38
- } else {
39
-
40
- deactivateTool( tool_setting ).done( function( response ) {
41
- if( response == 1 ) {
42
- $actions_wrapper.find('.dpsp-tool-actions-overlay').animate({opacity: 0}, 200, function() { $(this).remove() });
43
- $actions_wrapper.removeClass('dpsp-active').addClass('dpsp-inactive');
44
- $actions_wrapper.find('span').text('Inactive');
45
-
46
- hideMenuItem( tool );
47
- }
48
- });
49
-
50
- }
51
-
52
- }
53
-
54
- });
55
-
56
-
57
- /*
58
- * Make an AJAX call to activate a tool
59
- */
60
- function activateTool( setting ) {
61
-
62
- var data = {
63
- 'action' : 'dpsp_activate_tool',
64
- 'dpsptkn' : $('#dpsptkn').val(),
65
- 'setting' : setting
66
- }
67
-
68
- return $.post( ajaxurl, data, function() {});
69
-
70
- }
71
-
72
- /*
73
- * Make an AJAX call to deactivate a tool
74
- */
75
- function deactivateTool( setting ) {
76
-
77
- var data = {
78
- 'action' : 'dpsp_deactivate_tool',
79
- 'dpsptkn' : $('#dpsptkn').val(),
80
- 'setting' : setting
81
- }
82
-
83
- return $.post( ajaxurl, data, function() {});
84
-
85
- }
86
-
87
-
88
- /*
89
- * Hides the menu item from the WP sidebar for a given location
90
- */
91
- function hideMenuItem( location ) {
92
-
93
- location = location.replace('share_', '').replace('follow_', '').replace( '_', '-' );
94
-
95
- var $menuItems = $('#toplevel_page_dpsp-social-pug .wp-submenu li a');
96
-
97
- $menuItems.each( function() {
98
- if( $(this).attr('href').indexOf( location ) != -1 )
99
- $(this).parent().hide();
100
- });
101
-
102
- }
103
-
104
-
105
- /*
106
- * Initialize jQuery select2
107
- *
108
- */
109
- if( $.fn.select2 ) {
110
- $('.dpsp-setting-field-select select').select2({
111
- minimumResultsForSearch : Infinity
112
- }).on('select2:open', function() {
113
- var container = $('.select2-container').last();
114
- container.addClass('dpsp-select2');
115
- });
116
- }
117
-
118
-
119
- /*
120
- * Initialize jQuery sortable
121
- *
122
- */
123
- $( function() {
124
- $('.dpsp-social-platforms-sort-list').sortable({
125
- handle: '.dpsp-sort-handle',
126
- placeholder: 'dpsp-sort-placeholder',
127
- containment: '#wpwrap'
128
- });
129
- });
130
-
131
-
132
- /*
133
- * Social newtworks checkboxes
134
- *
135
- */
136
- $(document).on( 'click', '#dpsp-networks-selector .dpsp-network-item', function() {
137
- $this = $(this);
138
- $checkbox = $this.children('.dpsp-network-item-checkbox');
139
-
140
- if( $this.attr('data-checked') )
141
- $this.removeAttr('data-checked');
142
- else
143
- $this.attr('data-checked', 'true');
144
-
145
- });
146
-
147
-
148
- $(document).on( 'click', '#dpsp-select-networks', function(e) {
149
-
150
- e.preventDefault();
151
-
152
- if( $('#dpsp-networks-selector-wrapper').hasClass('dpsp-active') ) {
153
-
154
- $('#dpsp-networks-selector-wrapper').removeClass('dpsp-active');
155
-
156
- $('#dpsp-networks-selector-wrapper').stop().fadeOut( 250, function() {
157
-
158
- if( $('.dpsp-social-platforms-sort-list').find('li').length == 0 ) {
159
-
160
- $('#dpsp-sortable-networks-empty').stop().fadeIn(400);
161
- $('#dpsp-sortable-networks-empty').addClass('dpsp-active');
162
-
163
- } else {
164
-
165
- $('.dpsp-social-platforms-sort-list').stop().fadeIn(400);
166
- $('.dpsp-social-platforms-sort-list').addClass('dpsp-active');
167
-
168
- }
169
-
170
- });
171
-
172
- } else {
173
-
174
- // Hide the Select Networks button
175
- $('#dpsp-select-networks').hide();
176
-
177
- $('#dpsp-networks-selector-wrapper').addClass('dpsp-active');
178
-
179
- if( $('.dpsp-social-platforms-sort-list').find('li').length == 0 ) {
180
-
181
- $('.dpsp-social-platforms-sort-list').hide();
182
-
183
- $('#dpsp-sortable-networks-empty').removeClass('dpsp-active');
184
- $('#dpsp-sortable-networks-empty').stop().fadeOut( 250, function() {
185
-
186
- $('#dpsp-networks-selector-wrapper').stop().fadeIn( 250 );
187
-
188
- });
189
-
190
- } else {
191
-
192
- $('.dpsp-social-platforms-sort-list').removeClass('dpsp-active');
193
- $('.dpsp-social-platforms-sort-list').stop().fadeOut( 250, function() {
194
-
195
- $('#dpsp-networks-selector-wrapper').stop().fadeIn( 250 );
196
-
197
- });
198
-
199
- }
200
-
201
- }
202
-
203
- });
204
-
205
-
206
- /**
207
- * Apply Selection button action
208
- *
209
- * This will look at what social networks are checked in the Networks Selector
210
- * panel and add them to the Networks Sortable panel
211
- *
212
- */
213
- $(document).on( 'click', '#dpsp-networks-selector-footer a', function(e) {
214
-
215
- e.preventDefault();
216
-
217
- // Show the Select Networks button
218
- $('#dpsp-select-networks').show();
219
-
220
- // Parse each network from the selector panel
221
- $('#dpsp-networks-selector .dpsp-network-item').each( function() {
222
-
223
- $this = $(this);
224
-
225
- var dataNetwork = $this.attr('data-network');
226
- var dataNetworkName = $this.attr('data-network-name');
227
-
228
- if( ! $this.attr('data-checked') ) {
229
-
230
- removeSortableNetworkItem( dataNetwork );
231
-
232
- } else {
233
-
234
- var alreadyInList = false;
235
-
236
- $('.dpsp-social-platforms-sort-list li').each( function() {
237
- if( $(this).attr('data-network') == dataNetwork )
238
- alreadyInList = true;
239
- });
240
-
241
- if( alreadyInList )
242
- return alreadyInList;
243
-
244
- addSortableNetworkItem( dataNetwork, dataNetworkName );
245
- }
246
-
247
- });
248
-
249
- // Hide Networks Selector panel
250
- $('#dpsp-networks-selector-wrapper').removeClass('dpsp-active').stop().fadeOut( 250, function() {
251
-
252
- // If there are no networks in the sortable list display the empty placeholder
253
- if( $('.dpsp-social-platforms-sort-list').find('li').length == 0 ) {
254
-
255
- $('#dpsp-sortable-networks-empty').stop().fadeIn(250);
256
- $('#dpsp-sortable-networks-empty').addClass('dpsp-active');
257
-
258
- // If there are no networks in the sortable list display the Networks Sortable panel
259
- } else {
260
-
261
- $('.dpsp-social-platforms-sort-list').stop().fadeIn(250);
262
- $('.dpsp-social-platforms-sort-list').addClass('dpsp-active');
263
-
264
- }
265
-
266
- });
267
-
268
- });
269
-
270
-
271
- /**
272
- * Selects the edit label field from the sortable list when the admin
273
- * clicks on the edit label button
274
- *
275
- */
276
- $(document).on( 'click', '.dpsp-list-edit-label', function(e) {
277
-
278
- e.preventDefault();
279
-
280
- $(this).closest('li').find( '.dpsp-list-input-wrapper input' ).focus().select();
281
-
282
- });
283
-
284
-
285
- /**
286
- * Removes the social network from the sortable list when clicking
287
- * on the .dpsp-list-remove class and also uncheckes the social
288
- * network from the selectable networks list
289
- *
290
- */
291
- $(document).on( 'click', '.dpsp-list-remove', function(e) {
292
-
293
- e.preventDefault();
294
-
295
- var dataNetwork = $(this).closest('li').attr('data-network');
296
-
297
- removeSortableNetworkItem( dataNetwork );
298
-
299
- $('#dpsp-networks-selector .dpsp-network-item[data-network="' + dataNetwork + '"]').removeAttr('data-checked');
300
-
301
- // If there are no networks in the sortable list display the empty placeholder
302
- if( $('.dpsp-social-platforms-sort-list').find('li').length == 0 ) {
303
-
304
- $('#dpsp-sortable-networks-empty').stop().fadeIn(250);
305
- $('#dpsp-sortable-networks-empty').addClass('dpsp-active');
306
-
307
- $('.dpsp-social-platforms-sort-list').removeClass('dpsp-active');
308
-
309
- }
310
-
311
- });
312
-
313
-
314
- /**
315
- * Function that adds a given item from the Networks Sortable panel
316
- *
317
- */
318
- function addSortableNetworkItem( slug, name ) {
319
-
320
- if( slug == 'undefined')
321
- return false;
322
-
323
- if( name == 'undefined')
324
- return false;
325
-
326
- var html = '';
327
-
328
- var location = $('input[name="dpsp_buttons_location"]').val();
329
-
330
- html += '<li data-network="' + slug + '">';
331
- html += '<div class="dpsp-sort-handle ui-sortable-handle"><!-- --></div>';
332
- html += '<div class="dpsp-list-icon dpsp-list-icon-social dpsp-icon-' + slug + ' dpsp-background-color-network-' + slug + '"><!-- --></div>';
333
- html += '<div class="dpsp-list-input-wrapper"><input type="text" placeholder="' + 'This button has no label text.' + '" name="' + location + '[networks][' + slug + '][label]" value="' + name + '"></div>';
334
-
335
- // List item actions
336
- html += '<div class="dpsp-list-actions">';
337
- html += '<a class="dpsp-list-edit-label dpsp-transition" href="#"><span class="dashicons dashicons-edit"></span>' + 'Edit Label' + '</a>';
338
- html += '<a class="dpsp-list-remove dpsp-transition" href="#"><span class="dashicons dashicons-no-alt"></span>' + 'Remove' + '</a>';
339
- html += '</div>';
340
- html += '</li>';
341
-
342
- $('.dpsp-social-platforms-sort-list').append( html );
343
-
344
- // Set the last class for the last list item
345
- $('.dpsp-social-platforms-sort-list li').removeClass('dpsp-last');
346
- $('.dpsp-social-platforms-sort-list li').last().addClass('dpsp-last');
347
-
348
- }
349
-
350
-
351
- /**
352
- * Function that removes a given item from the Networks Sortable panel
353
- *
354
- */
355
- function removeSortableNetworkItem( slug ) {
356
-
357
- $('.dpsp-social-platforms-sort-list li[data-network="' + slug + '"]').remove();
358
-
359
- // Set the last class for the last list item
360
- $('.dpsp-social-platforms-sort-list li').removeClass('dpsp-last');
361
- $('.dpsp-social-platforms-sort-list li').last().addClass('dpsp-last');
362
-
363
- if( $('.dpsp-social-platforms-sort-list li').length == 0 ) {
364
-
365
- $('.dpsp-social-platforms-sort-list').fadeOut(1);
366
- $('.dpsp-social-platforms-sort-list').removeClass('dpsp-active');
367
-
368
- }
369
-
370
- }
371
-
372
-
373
- $(document).ready( function() {
374
- $('.dpsp-network-btn').attr('href', '#');
375
- });
376
-
377
- $(document).on( 'click', '.dpsp-network-btn', function(e) {
378
- e.preventDefault();
379
- $(this).closest('label').click();
380
- });
381
-
382
-
383
- /*
384
- * Disable inputs for certain networks sortable panels
385
- *
386
- */
387
- $(document).on( 'focus', '.dpsp-page-mobile .dpsp-list-input-wrapper input', function() {
388
- $(this).blur();
389
- });
390
-
391
-
392
- /*
393
- * Set the shape of the network buttons on page load and dynamicly
394
- *
395
- */
396
- $(document).on('click', '.dpsp-setting-field-button-shape input', function() {
397
- $(this)
398
- .closest('.dpsp-page-wrapper')
399
- .find('.dpsp-networks-btns-wrapper')
400
- .parent()
401
- .removeClass('dpsp-shape-circle dpsp-shape-rounded dpsp-shape-rectangular')
402
- .addClass('dpsp-shape-' + $(this).val() );
403
- });
404
-
405
-
406
- /*
407
- * Show and hide back-end settings tool-tips
408
- *
409
- */
410
- $(document).on( 'mouseenter', '.dpsp-setting-field-tooltip-icon', function() {
411
- $(this).siblings('div').css('opacity', 1).css('visibility', 'visible');
412
- });
413
- $(document).on( 'mouseleave', '.dpsp-setting-field-tooltip-icon', function() {
414
- $(this).siblings('div').css('opacity', 0).css('visibility', 'hidden');
415
- });
416
-
417
- $(document).on( 'mouseenter', '.dpsp-setting-field-tooltip-wrapper.dpsp-has-link', function() {
418
- $(this).find('div').css('opacity', 1).css('visibility', 'visible');
419
- });
420
- $(document).on( 'mouseleave', '.dpsp-setting-field-tooltip-wrapper.dpsp-has-link', function() {
421
- $(this).find('div').css('opacity', 0).css('visibility', 'hidden');
422
- });
423
-
424
-
425
- /**
426
- * Mark the last .dpsp-setting-field-wrapper element for each card
427
- *
428
- */
429
- $(document).on( 'change', '.dpsp-setting-field-wrapper *', function() {
430
-
431
- $('.dpsp-card-inner').each( function() {
432
-
433
- $(this).find('.dpsp-setting-field-wrapper').removeClass('dpsp-last');
434
- $(this).find('.dpsp-setting-field-wrapper:not(.disabled)').last().addClass('dpsp-last');
435
-
436
- });
437
-
438
- });
439
-
440
- $('.dpsp-setting-field-wrapper *').first().trigger('change');
441
-
442
-
443
- /*
444
- * Disable / enable settings that depend on other settings
445
- *
446
- */
447
- $( function() {
448
-
449
- // Set settings options
450
- $checkbox_shares = $('.dpsp-setting-field-show-share-count input[type=checkbox]');
451
- $checkbox_total_shares = $('.dpsp-setting-field-show-total-share-count input[type=checkbox]');
452
- $checkbox_count_round = $('.dpsp-setting-field-share-count-round input[type=checkbox]');
453
-
454
- $wrapper_checkbox_count_round = $checkbox_count_round.closest('.dpsp-setting-field-wrapper');
455
-
456
-
457
- // Disable and enable total share count position
458
- if( !$checkbox_total_shares.is(':checked') ) {
459
- $checkbox_total_shares.closest('.dpsp-setting-field-wrapper').next().addClass('disabled');
460
- $checkbox_total_shares.closest('.dpsp-setting-field-wrapper').next().find('select').attr( 'disabled', true );
461
- }
462
-
463
- $checkbox_total_shares.change( function() {
464
- if( !$checkbox_total_shares.is(':checked') ) {
465
- $checkbox_total_shares.closest('.dpsp-setting-field-wrapper').next().addClass('disabled');
466
- $checkbox_total_shares.closest('.dpsp-setting-field-wrapper').next().find('select').attr( 'disabled', true );
467
- } else {
468
- $checkbox_total_shares.closest('.dpsp-setting-field-wrapper').next().removeClass('disabled');
469
- $checkbox_total_shares.closest('.dpsp-setting-field-wrapper').next().find('select').attr( 'disabled', false );
470
- }
471
- });
472
-
473
-
474
- // Disable and enable share count round
475
- // Disable and enable minimum share count
476
- enable_disable_count_round();
477
-
478
- $checkbox_shares.change( function() {
479
- enable_disable_count_round();
480
- });
481
-
482
- $checkbox_total_shares.change( function() {
483
- enable_disable_count_round();
484
- });
485
-
486
- function enable_disable_count_round() {
487
- if( !$checkbox_total_shares.is(':checked') && !$checkbox_shares.is(':checked') ) {
488
- $wrapper_checkbox_count_round.addClass('disabled');
489
- $checkbox_count_round.attr( 'disabled', true );
490
- } else {
491
- $wrapper_checkbox_count_round.removeClass('disabled');
492
- $checkbox_count_round.attr( 'disabled', false );
493
- }
494
- }
495
-
496
- });
497
-
498
- /**********************************************************/
499
- /* Refresh statistics in "Share Statistics" meta-box
500
- /**********************************************************/
501
- $(document).on( 'click', '#dpsp-refresh-share-counts', function(e) {
502
-
503
- e.preventDefault();
504
-
505
- if( $(this).hasClass('disabled') )
506
- return false;
507
-
508
- $refresh_button = $(this);
509
- $spinner = $refresh_button.siblings('.spinner');
510
-
511
- $refresh_button.addClass( 'disabled' );
512
- $spinner.css( 'visibility', 'visible' );
513
-
514
- $('.dpsp-statistic-bar-wrapper-network').css( 'opacity', 0.6 );
515
-
516
- var data = {
517
- action : 'dpsp_refresh_share_counts',
518
- nonce : $refresh_button.siblings('[name="dpsp_refresh_share_counts"]').val(),
519
- post_id : parseInt( $('#post_ID').val() )
520
- }
521
-
522
- $.post( ajaxurl, data, function( response ) {
523
-
524
- if( response ) {
525
- $('.dpsp-statistic-bars-wrapper').replaceWith( response );
526
- }
527
-
528
- });
529
-
530
- });
531
-
532
-
533
- /**********************************************************/
534
- /* Display the Facebook authorization fields, based on the share counts provider
535
- /**********************************************************/
536
- $(document).on( 'change', '[name="dpsp_settings[facebook_share_counts_provider]"]', function() {
537
-
538
- $('.dpsp-setting-field-facebook-authorize-app').hide();
539
- $('.dpsp-setting-field-facebook-app-id, .dpsp-setting-field-facebook-app-secret').hide();
540
-
541
- // Authorized app
542
- if( $(this).val() == 'authorized_app' )
543
- $('.dpsp-setting-field-facebook-authorize-app').show();
544
-
545
- // Own app
546
- if( $(this).val() == 'own_app' )
547
- $('.dpsp-setting-field-facebook-app-id, .dpsp-setting-field-facebook-app-secret').show();
548
-
549
- });
550
-
551
- $('[name="dpsp_settings[facebook_share_counts_provider]"]').trigger( 'change' );
552
-
553
-
554
- /**
555
- * Enable/disable the submit button when the users write in the textarea
556
- *
557
- */
558
- $(document).on( 'keyup', '#dpsp-deactivate-modal [name=dpsp_disable_text]', function() {
559
-
560
- if( $(this).val() != '' )
561
- $('#dpsp-feedback-submit').attr( 'disabled', false );
562
- else
563
- $('#dpsp-feedback-submit').attr( 'disabled', true );
564
-
565
- });
566
-
567
- /**
568
- * Enable/disable the submit button when the users completes their email address
569
- *
570
- */
571
- $(document).on( 'keyup', '#dpsp-deactivate-modal [name=dpsp_disable_from]', function() {
572
-
573
- if( is_email( $(this).val() ) )
574
- $('#dpsp-feedback-submit').attr( 'disabled', false );
575
- else
576
- $('#dpsp-feedback-submit').attr( 'disabled', true );
577
-
578
- });
579
-
580
- $('#dpsp-feedback-submit').click(function (e) {
581
- e.preventDefault();
582
- $('#dpsp-deactivate-modal').hide();
583
- $.ajax({
584
- type: 'POST',
585
- url: ajaxurl,
586
- dataType: 'json',
587
- data: {
588
- action: 'dpsp_send_deactivation_feedback',
589
- data: $('#dpsp-deactivate-modal form').serialize()
590
- },
591
- complete: function (MLHttpRequest, textStatus, errorThrown) {
592
- $('#dpsp-deactivate-modal').remove();
593
- window.location.href = $('.wp-admin.plugins-php tr[data-slug="social-pug"] .row-actions .deactivate a').attr('href');
594
- }
595
- });
596
- });
597
-
598
- $('#dpsp-only-deactivate').click(function (e) {
599
- e.preventDefault();
600
- $('#dpsp-deactivate-modal').hide();
601
- $('#dpsp-deactivate-modal').remove();
602
- window.location.href = $('.wp-admin.plugins-php tr[data-slug="social-pug"] .row-actions .deactivate a').attr('href');
603
-
604
- });
605
-
606
- $('.dpsp-deactivate-close').click(function (e) {
607
- e.preventDefault();
608
- $('#dpsp-deactivate-modal').hide();
609
- });
610
-
611
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/src/js/front-end-jquery.js DELETED
@@ -1,105 +0,0 @@
1
- jQuery( function($) {
2
-
3
- /**
4
- * Pull share counts
5
- *
6
- */
7
- $(document).ready( function() {
8
-
9
- if( typeof dpsp_ajax_url != 'undefined' && typeof dpsp_ajax_pull_post_share_counts_data != 'undefined' ) {
10
-
11
- $.post( dpsp_ajax_url, dpsp_ajax_pull_post_share_counts_data, function( response ) { });
12
-
13
- }
14
-
15
- });
16
-
17
-
18
- /*
19
- * Position sidebar icons vertically
20
- *
21
- */
22
- $(document).ready( function() {
23
- $('#dpsp-floating-sidebar').css('top', ( window.innerHeight - $('#dpsp-floating-sidebar').height() ) / 2 );
24
- });
25
-
26
- $(window).on( 'resize', function() {
27
- $('#dpsp-floating-sidebar').css('top', ( window.innerHeight - $('#dpsp-floating-sidebar').height() ) / 2 );
28
- });
29
-
30
-
31
- /**
32
- * When entering and leaving a button, add a class of hover to the wrapping <li> element
33
- *
34
- */
35
- $(document).on( 'mouseenter', '.dpsp-networks-btns-wrapper li a', function(e) {
36
-
37
- $(this).closest('li').addClass('dpsp-hover');
38
-
39
- });
40
-
41
- $(document).on( 'mouseleave', '.dpsp-networks-btns-wrapper li a', function() {
42
-
43
- $(this).closest('li').removeClass('dpsp-hover');
44
-
45
- });
46
-
47
-
48
- /*
49
- * Open Pinterest overlay to select which image to pin when
50
- * clicking on a Pin button without media attached
51
- *
52
- */
53
- $(document).ready( function() {
54
- $('.dpsp-network-btn.dpsp-pinterest').click( function(e) {
55
-
56
- if( $(this).attr('href') != '#' )
57
- return false;
58
-
59
- e.preventDefault();
60
-
61
- var elem = document.createElement('script');
62
- elem.setAttribute('type', 'text/javascript');
63
- elem.setAttribute('charset', 'UTF-8');
64
- elem.setAttribute('src', 'https://assets.pinterest.com/js/pinmarklet.js');
65
- document.body.appendChild(elem);
66
-
67
- });
68
- });
69
-
70
-
71
- /**
72
- * Print button action
73
- *
74
- */
75
- $(document).ready( function() {
76
- $('.dpsp-network-btn.dpsp-print').click( function(e) {
77
- window.print();
78
- });
79
- });
80
-
81
-
82
- /**
83
- * Open share links in a pop-up window
84
- *
85
- */
86
- $(document).on( 'click', '.dpsp-network-btn', function(e) {
87
-
88
- if( $(this).hasClass('dpsp-twitter') && typeof window.twttr != 'undefined' )
89
- return;
90
-
91
- if( $(this).hasClass('dpsp-email') )
92
- return;
93
-
94
- e.preventDefault();
95
-
96
- if( $(this).attr('href') == '#' )
97
- return false;
98
-
99
- $(this).blur();
100
-
101
- window.open( $(this).attr('href'),'targetWindow', "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=700,height=300,top=200,left=" + ($(window).innerWidth() - 700)/2 );
102
-
103
- });
104
-
105
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/src/js/front-end.js DELETED
@@ -1,80 +0,0 @@
1
- function initializeButtonHover() {
2
- const btns = document.querySelectorAll('.dpsp-networks-btns-wrapper li a')
3
- for(const btn of btns) {
4
- btn.addEventListener('mouseenter', ({ target }) => {
5
- target.parentNode.classList.add('dpsp-hover')
6
- })
7
- btn.addEventListener('mouseleave', ({ target }) => {
8
- target.parentNode.classList.remove('dpsp-hover')
9
- })
10
- }
11
- }
12
-
13
- function initializePinterest() {
14
- const btns = document.querySelectorAll('.dpsp-network-btn.dpsp-pinterest')
15
- Array.prototype.forEach.call(btns, (btn) => {
16
- btn.addEventListener('click', (e) => {
17
- const { target } = e
18
-
19
- if(!/#$/.test(target.href)) {
20
- e.stopPropagation()
21
- e.preventDefault()
22
- return
23
- }
24
-
25
- e.preventDefault()
26
-
27
- const el = document.createElement('script');
28
- el.setAttribute('type', 'text/javascript');
29
- el.setAttribute('charset', 'UTF-8');
30
- el.setAttribute('src', 'https://assets.pinterest.com/js/pinmarklet.js');
31
- document.body.appendChild(el);
32
- })
33
- })
34
- }
35
-
36
- function initializePrint() {
37
- const btns = document.querySelectorAll('.dpsp-network-btn.dpsp-print')
38
- Array.prototype.forEach.call(btns, (btn) => {
39
- btn.addEventListener('click', () => {
40
- window.print()
41
- })
42
- })
43
- }
44
-
45
- function initializeButtons() {
46
- const btns = document.querySelectorAll('.dpsp-network-btn')
47
- Array.prototype.forEach.call(btns, (btn) => {
48
- btn.addEventListener('click', (e) => {
49
- const { target } = e
50
-
51
- if(target.classList.contains('dpsp-email')) return
52
-
53
- e.preventDefault()
54
-
55
- if(/#$/.test(target.href)) {
56
- e.stopPropagation()
57
- return
58
- }
59
-
60
- target.blur()
61
-
62
- window.open(
63
- target.href,
64
- 'targetWindow',
65
- `toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=700,height=300,top=200,left=${(window.innerWidth - 700)/2}`
66
- )
67
-
68
- })
69
- })
70
- }
71
-
72
- const init = () => {
73
- initializeButtonHover()
74
- initializePinterest()
75
- initializePrint()
76
- initializeButtons()
77
- window.removeEventListener('mousemove', init)
78
- }
79
-
80
- window.addEventListener('mousemove', init)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/src/js/jquery.ui.touch-punch.min.js DELETED
@@ -1,11 +0,0 @@
1
- /*!
2
- * jQuery UI Touch Punch 0.2.3
3
- *
4
- * Copyright 2011–2014, Dave Furfero
5
- * Dual licensed under the MIT or GPL Version 2 licenses.
6
- *
7
- * Depends:
8
- * jquery.ui.widget.js
9
- * jquery.ui.mouse.js
10
- */
11
- !function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);
 
 
 
 
 
 
 
 
 
 
 
inc/admin/admin-metaboxes.php CHANGED
@@ -1,136 +1,598 @@
1
  <?php
2
- /*
3
  * Meta-boxes file
4
- *
5
  */
6
 
7
- /*
8
- * Individual posts share statistics meta-box
9
- *
10
- */
11
- function dpsp_meta_boxes() {
12
-
13
- $screens = get_post_types( array( 'public' => true ) );
14
 
15
- if( empty( $screens ) )
16
- return;
17
 
18
- foreach( $screens as $screen ) {
 
 
19
 
20
- // Share statistics meta-box
21
- add_meta_box( 'dpsp_share_statistics', __( 'Share Statistics', 'social-pug' ), 'dpsp_share_statistics_output', $screen, 'normal', 'core' );
 
 
 
 
 
 
 
 
 
22
 
 
 
 
23
  }
 
 
 
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  }
26
- add_action( 'add_meta_boxes', 'dpsp_meta_boxes' );
27
 
 
 
28
 
29
- /*
30
- * Callback for the share statistics meta-box
31
  *
32
  */
33
- function dpsp_share_statistics_output( $post ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
- $networks = dpsp_get_active_networks();
 
 
 
 
36
 
37
- if( !empty( $networks ) ) {
 
38
 
39
- echo '<div class="dpsp-statistic-bars-wrapper">';
 
40
 
41
- $networks_shares = get_post_meta( $post->ID, 'dpsp_networks_shares', true );
42
- $networks_shares = ( !empty( $networks_shares ) ? $networks_shares : array() );
43
 
44
- // Get total share counts
45
- $total_shares = dpsp_get_post_total_share_count( $post->ID );
 
46
 
47
- // Shares header
48
- echo '<div class="dpsp-statistic-bar-wrapper dpsp-statistic-bar-header">';
49
- echo '<label>' . __( 'Network', 'social-pug' ) . '</label>';
50
- echo '<div class="dpsp-network-share-count"><span class="dpsp-count">' . __( 'Shares', 'social-pug' ) . '</span><span class="dpsp-divider">|</span><span class="dpsp-percentage">%</span></div>';
 
51
  echo '</div>';
52
 
53
- // Actual shares per network
54
- foreach( $networks as $network_slug ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
- // Jump to the next one if the network by some chance does not support
57
- // share count
58
- if( !in_array( $network_slug, dpsp_get_networks_with_social_count() ) )
59
- continue;
60
 
61
- // Get current network social share count
62
- $network_shares = ( isset($networks_shares[$network_slug]) ? $networks_shares[$network_slug] : 0 );
 
63
 
64
- // Get the percentage of the total shares for current network
65
- $share_percentage = ( $total_shares != 0 ? (float)($network_shares / $total_shares * 100) : 0 );
66
 
67
- echo '<div class="dpsp-statistic-bar-wrapper dpsp-statistic-bar-wrapper-network">';
68
- echo '<label>' . dpsp_get_network_name( $network_slug ) . '</label>';
69
 
70
- echo '<div class="dpsp-statistic-bar dpsp-statistic-bar-' . $network_slug . '">';
71
- echo '<div class="dpsp-statistic-bar-inner" style="width:' . round( $share_percentage, 1 ) . '%"></div>';
 
 
 
 
 
 
 
 
 
 
 
 
72
  echo '</div>';
73
 
74
- echo '<div class="dpsp-network-share-count"><span class="dpsp-count">' . $network_shares . '</span><span class="dpsp-divider">|</span><span class="dpsp-percentage">' . round( $share_percentage, 2 ) . '</span></div>';
75
  echo '</div>';
76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  }
78
 
79
- // Shares footer with total count
80
- echo '<div class="dpsp-statistic-bar-wrapper dpsp-statistic-bar-footer">';
81
- echo '<label>' . __( 'Total shares', 'social-pug' ) . '</label>';
82
- echo '<div class="dpsp-network-share-count"><span class="dpsp-count">' . $total_shares . '</span></div>';
 
 
 
 
 
 
 
 
 
 
83
  echo '</div>';
84
 
85
- // Refresh counts button
86
- echo '<div id="dpsp-refresh-share-counts-wrapper">';
87
- echo '<a id="dpsp-refresh-share-counts" class="button-secondary" href="#">' . __( 'Refresh shares', 'social-pug' ) . '</a>';
88
- echo '<span class="spinner"></span>';
89
- echo wp_nonce_field( 'dpsp_refresh_share_counts', 'dpsp_refresh_share_counts', false, false );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  echo '</div>';
91
 
 
 
 
 
 
 
 
92
  echo '</div>';
 
 
 
 
 
 
 
 
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  }
95
-
 
 
 
 
 
 
 
 
 
 
 
96
  }
97
 
 
 
98
 
99
- /**
100
- * Ajax callback action that refreshes the social counts for the "Share Statistics"
101
- * meta-box from each single edit post admin screen
102
- *
103
- */
104
- function dpsp_refresh_share_counts() {
105
 
106
- if( empty( $_POST['action'] ) || empty( $_POST['nonce'] ) || empty( $_POST['post_id'] ) )
107
- return;
 
 
 
108
 
109
- if( $_POST['action'] != 'dpsp_refresh_share_counts' )
110
- return;
 
 
 
 
 
 
 
 
 
 
 
 
111
 
112
- if( ! wp_verify_nonce( $_POST['nonce'], 'dpsp_refresh_share_counts' ) )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  return;
 
 
114
 
115
- $post_id = (int)$_POST['post_id'];
 
 
 
 
 
 
 
 
116
 
117
- if( ! in_array( $post->post_status, array( 'future', 'draft', 'pending', 'trash', 'auto-draft' ) ) ) {
118
 
119
- // Flush existing shares before pulling a new set
120
- update_post_meta( $post_id, 'dpsp_networks_shares', '' );
121
 
122
- // Get social shares from the networks
123
- $share_counts = dpsp_pull_post_share_counts( $post_id );
124
 
125
- // Update share counts in the db
126
- $shares_updated = dpsp_update_post_share_counts( $post_id, $share_counts );
127
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  }
129
 
130
- // Echos the share statistics
131
- dpsp_share_statistics_output( get_post( $post_id ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
 
133
- wp_die();
 
 
134
 
 
 
135
  }
136
- add_action( 'wp_ajax_dpsp_refresh_share_counts', 'dpsp_refresh_share_counts' );
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
+ /**
3
  * Meta-boxes file
 
4
  */
5
 
6
+ /**
7
+ * Individual posts share statistics meta-box.
8
+ */
9
+ function dpsp_meta_boxes() {
 
 
 
10
 
11
+ $screens = get_post_types( [ 'public' => true ] );
12
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
13
 
14
+ if ( empty( $screens ) ) {
15
+ return;
16
+ }
17
 
18
+ // Remove the attachment post type
19
+ if ( ! empty( $screens['attachment'] ) ) {
20
+ unset( $screens['attachment'] );
21
+ }
22
+
23
+ foreach ( $screens as $screen ) {
24
+ // Share option meta-box
25
+ add_meta_box( 'dpsp_share_options', __( 'Grow: Share Options', 'social-pug' ), 'dpsp_share_options_output', $screen, 'normal', 'core' );
26
+
27
+ // Share statistics meta-box
28
+ add_meta_box( 'dpsp_share_statistics', __( 'Grow: Share Statistics', 'social-pug' ), 'dpsp_share_statistics_output', $screen, 'normal', 'core' );
29
 
30
+ // Add debugger metabox
31
+ if ( ! empty( $settings['debugger_enabled'] ) ) {
32
+ add_meta_box( 'dpsp_post_debugger', __( 'Grow: Debug Log', 'social-pug' ), 'dpsp_post_debugger_output', $screen, 'normal', 'core' );
33
  }
34
+ }
35
+
36
+ }
37
 
38
+ /**
39
+ * Callback for the Share Options meta box
40
+ *
41
+ */
42
+ function dpsp_share_options_output( $post ) {
43
+
44
+ // Get general settings
45
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
46
+ $pinterest_settings = Mediavine\Grow\Settings::get_setting( 'dpsp_pinterest_share_images_setting', [] );
47
+
48
+ // Pull share options meta data
49
+ $share_options = dpsp_maybe_unserialize( get_post_meta( $post->ID, 'dpsp_share_options', true ) );
50
+
51
+ if ( empty( $share_options ) || ! is_array( $share_options ) ) {
52
+ $share_options = [];
53
  }
 
54
 
55
+ // Nonce field
56
+ wp_nonce_field( 'dpsp_meta_box', 'dpsptkn' );
57
 
58
+ /**
59
+ * New version
60
  *
61
  */
62
+ echo '<div id="dpsp_share_options_content">';
63
+
64
+ // General social media content
65
+ echo '<div class="dpsp-section">';
66
+
67
+ // Social media image
68
+ echo '<div class="dpsp-setting-field-wrapper dpsp-setting-field-image">';
69
+ echo '<label for="dpsp_share_options[custom_image]">' . '<span class="dpsp-icon-share"></span>' . __( 'Social Media Image', 'social-pug' );
70
+ echo dpsp_output_backend_tooltip( __( 'Add an image that will populate the "og:image" Open Graph meta tag. For maximum exposure on Facebook, Google+ or LinkedIn we recommend an image size of 1200px X 630px.', 'social-pug' ) );
71
+ echo '</label>';
72
+ echo '<div>';
73
+
74
+ $thumb_details = [];
75
+ $image_details = [];
76
+
77
+ if ( ! empty( $share_options['custom_image']['id'] ) ) {
78
+ $thumb_details = wp_get_attachment_image_src( $share_options['custom_image']['id'], 'high' );
79
+ $image_details = wp_get_attachment_image_src( $share_options['custom_image']['id'], 'full' );
80
+ }
81
+
82
+ if ( ! empty( $thumb_details[0] ) && ! empty( $image_details[0] ) ) {
83
+ $thumb_src = $thumb_details[0];
84
+ $image_src = $image_details[0];
85
+ } else {
86
+ $thumb_src = DPSP_PLUGIN_DIR_URL . 'assets/dist/custom-social-media-image.' . DPSP_VERSION . '.png';
87
+ $image_src = '';
88
+ }
89
+
90
+ echo '<div>';
91
+ echo '<img src="' . esc_attr( $thumb_src ) . '" data-pin-nopin="true" />';
92
+ echo '<span class="dpsp-field-image-placeholder" data-src="' . DPSP_PLUGIN_DIR_URL . 'assets/dist/custom-social-media-image.' . DPSP_VERSION . '.png"></span>';
93
+ echo '</div>';
94
+
95
+ echo '<a class="dpsp-image-select dpsp-button-primary ' . ( ! empty( $share_options['custom_image']['id'] ) ? 'dpsp-hidden' : '' ) . '" href="#">' . __( 'Select Image', 'social-pug' ) . '</a>';
96
+ echo '<a class="dpsp-image-remove dpsp-button-secondary ' . ( empty( $share_options['custom_image']['id'] ) ? 'dpsp-hidden' : '' ) . '" href="#">' . __( 'Remove Image', 'social-pug' ) . '</a>';
97
+
98
+ echo '<input class="dpsp-image-id" type="hidden" name="dpsp_share_options[custom_image][id]" value="' . ( ! empty( $share_options['custom_image']['id'] ) ? esc_attr( $share_options['custom_image']['id'] ) : '' ) . '" />';
99
+ echo '<input class="dpsp-image-src" type="hidden" name="dpsp_share_options[custom_image][src]" value="' . esc_attr( $image_src ) . '" />';
100
+
101
+ echo '</div>';
102
+ echo '</div>';
103
+
104
+ // Social media title
105
+ echo '<div class="dpsp-setting-field-wrapper">';
106
+
107
+ $maximum_count = 70;
108
+ $current_count = ( ! empty( $share_options['custom_title'] ) ? strlen( wp_kses_post( $share_options['custom_title'] ) ) : 0 );
109
+ $remaining_count = $maximum_count - $current_count;
110
+
111
+ echo '<label for="dpsp_share_options[custom_title]">' . '<span class="dpsp-icon-share"></span>' . __( 'Social Media Title', 'social-pug' ) . '<span class="dpsp-textarea-characters-remaining-wrapper" data-maximum-count="' . $maximum_count . '"><span class="dpsp-textarea-characters-remaining">' . $remaining_count . '</span> ' . __( 'Characters Remaining', 'social-pug' ) . '</span>';
112
+ echo dpsp_output_backend_tooltip( __( 'Add a title that will populate the "og:title" Open Graph meta tag. This will be used when users share your content on Facebook, Google+ or LinkedIn. The title of the post will be used if this field is empty.', 'social-pug' ) );
113
+ echo '</label>';
114
+ echo '<textarea id="dpsp_share_options[custom_title]" name="dpsp_share_options[custom_title]" placeholder="' . __( 'Write a social media title...', 'social-pug' ) . '">' . ( isset( $share_options['custom_title'] ) ? wp_kses_post( $share_options['custom_title'] ) : '' ) . '</textarea>';
115
+ echo '</div>';
116
+
117
+ // Social media description
118
+ echo '<div class="dpsp-setting-field-wrapper">';
119
+
120
+ $maximum_count = 200;
121
+ $current_count = ( ! empty( $share_options['custom_description'] ) ? strlen( wp_kses_post( $share_options['custom_description'] ) ) : 0 );
122
+ $remaining_count = $maximum_count - $current_count;
123
+
124
+ echo '<label for="dpsp_share_options[custom_description]">' . '<span class="dpsp-icon-share"></span>' . __( 'Social Media Description', 'social-pug' ) . '<span class="dpsp-textarea-characters-remaining-wrapper" data-maximum-count="' . $maximum_count . '"><span class="dpsp-textarea-characters-remaining">' . $remaining_count . '</span> ' . __( 'Characters Remaining', 'social-pug' ) . '</span>';
125
+ echo dpsp_output_backend_tooltip( __( 'Add a description that will populate the "og:description" Open Graph meta tag. This will be used when users share your content on Facebook, Google+ or LinkedIn.', 'social-pug' ) );
126
+ echo '</label>';
127
+ echo '<textarea id="dpsp_share_options[custom_description]" name="dpsp_share_options[custom_description]" placeholder="' . __( 'Write a social media description...', 'social-pug' ) . '">' . ( isset( $share_options['custom_description'] ) ? wp_kses_post( $share_options['custom_description'] ) : '' ) . '</textarea>';
128
+ echo '</div>';
129
+
130
+ echo '</div>';
131
+
132
+ // Individual networks social media content
133
+ echo '<div class="dpsp-section">';
134
+
135
+ // Pinterest image
136
+ echo '<div class="dpsp-setting-field-wrapper dpsp-setting-field-image">';
137
+ echo '<label for="dpsp_share_options[custom_image_pinterest]">' . '<span class="dpsp-icon-pinterest"></span>' . __( 'Pinterest Image', 'social-pug' );
138
+ echo dpsp_output_backend_tooltip( __( 'Add an image that will be used when this post is shared on Pinterest. For maximum exposure we recommend using an image that has a 2:3 aspect ratio, for example 800px X 1200px.', 'social-pug' ) );
139
+ echo '</label>';
140
+ echo '<div>';
141
+
142
+ $thumb_details = [];
143
+ $image_details = [];
144
+
145
+ if ( ! empty( $share_options['custom_image_pinterest']['id'] ) ) {
146
+ $thumb_details = wp_get_attachment_image_src( $share_options['custom_image_pinterest']['id'], 'high' );
147
+ $image_details = wp_get_attachment_image_src( $share_options['custom_image_pinterest']['id'], 'full' );
148
+ }
149
+
150
+ if ( ! empty( $thumb_details[0] ) && ! empty( $image_details[0] ) ) {
151
+ $thumb_src = $thumb_details[0];
152
+ $image_src = $image_details[0];
153
+ } else {
154
+ $thumb_src = DPSP_PLUGIN_DIR_URL . 'assets/dist/custom-social-media-image-pinterest.' . DPSP_VERSION . '.png';
155
+ $image_src = '';
156
+ }
157
+
158
+ echo '<div>';
159
+ echo '<img src="' . esc_attr( $thumb_src ) . '" data-pin-nopin="true" />';
160
+ echo '<span class="dpsp-field-image-placeholder" data-src="' . DPSP_PLUGIN_DIR_URL . 'assets/dist/custom-social-media-image-pinterest.' . DPSP_VERSION . '.png"></span>';
161
+ echo '</div>';
162
+
163
+ echo '<a class="dpsp-image-select dpsp-button-primary ' . ( ! empty( $share_options['custom_image_pinterest']['id'] ) ? 'dpsp-hidden' : '' ) . '" href="#">' . __( 'Select Image', 'social-pug' ) . '</a>';
164
+ echo '<a class="dpsp-image-remove dpsp-button-secondary ' . ( empty( $share_options['custom_image_pinterest']['id'] ) ? 'dpsp-hidden' : '' ) . '" href="#">' . __( 'Remove Image', 'social-pug' ) . '</a>';
165
+
166
+ echo '<input class="dpsp-image-id" type="hidden" name="dpsp_share_options[custom_image_pinterest][id]" value="' . ( ! empty( $share_options['custom_image_pinterest']['id'] ) ? esc_attr( $share_options['custom_image_pinterest']['id'] ) : '' ) . '" />';
167
+ echo '<input class="dpsp-image-src" type="hidden" name="dpsp_share_options[custom_image_pinterest][src]" value="' . esc_attr( $image_src ) . '" />';
168
+
169
+ echo '</div>';
170
+ echo '</div>';
171
+
172
+ // Pinterest title
173
+ echo '<div class="dpsp-setting-field-wrapper">';
174
+
175
+ $maximum_count = 70;
176
+ $current_count = ( ! empty( $share_options['custom_title_pinterest'] ) ? strlen( wp_kses_post( $share_options['custom_title_pinterest'] ) ) : 0 );
177
+ $remaining_count = $maximum_count - $current_count;
178
+
179
+ echo '<label for="dpsp_share_options[custom_title_pinterest]">' . '<span class="dpsp-icon-pinterest"></span>' . __( 'Pinterest Title', 'social-pug' ) . '<span class="dpsp-textarea-characters-remaining-wrapper" data-maximum-count="' . $maximum_count . '"><span class="dpsp-textarea-characters-remaining">' . $remaining_count . '</span> ' . __( 'Characters Remaining', 'social-pug' ) . '</span></label>';
180
+ echo '<textarea id="dpsp_share_options[custom_title_pinterest]" name="dpsp_share_options[custom_title_pinterest]" placeholder="' . __( 'Write a custom Pinterest title...', 'social-pug' ) . '">' . ( isset( $share_options['custom_title_pinterest'] ) ? wp_kses_post( $share_options['custom_title_pinterest'] ) : '' ) . '</textarea>';
181
+ echo '<p class="description">' . __( "Please note: Pinterest does not yet support pin titles. Pinterest is still in the process of releasing this feature. We've added the field in advance, to make sure you're ready for when the feature rolls out.", 'social-pug' ) . '</p>';
182
+ echo '</div>';
183
+
184
+ // Pinterest description
185
+ echo '<div class="dpsp-setting-field-wrapper">';
186
+
187
+ $maximum_count = 500;
188
+ $current_count = ( ! empty( $share_options['custom_description_pinterest'] ) ? strlen( wp_kses_post( $share_options['custom_description_pinterest'] ) ) : 0 );
189
+ $remaining_count = $maximum_count - $current_count;
190
 
191
+ echo '<label for="dpsp_share_options[custom_description_pinterest]">' . '<span class="dpsp-icon-pinterest"></span>' . __( 'Pinterest Description', 'social-pug' ) . '<span class="dpsp-textarea-characters-remaining-wrapper" data-maximum-count="' . $maximum_count . '"><span class="dpsp-textarea-characters-remaining">' . $remaining_count . '</span> ' . __( 'Characters Remaining', 'social-pug' ) . '</span>';
192
+ echo dpsp_output_backend_tooltip( __( 'Add a customized message that will be used when this post is shared on Pinterest.', 'social-pug' ) );
193
+ echo '</label>';
194
+ echo '<textarea id="dpsp_share_options[custom_description_pinterest]" name="dpsp_share_options[custom_description_pinterest]" placeholder="' . __( 'Write a custom Pinterest description...', 'social-pug' ) . '">' . ( isset( $share_options['custom_description_pinterest'] ) ? wp_kses_post( $share_options['custom_description_pinterest'] ) : '' ) . '</textarea>';
195
+ echo '</div>';
196
 
197
+ // Twitter custom tweet
198
+ echo '<div class="dpsp-setting-field-wrapper">';
199
 
200
+ $has_via = ! empty( $settings['twitter_username'] ) && ! empty( $settings['tweets_have_username'] );
201
+ $tweet_via = $has_via ? ' via @' . $settings['twitter_username'] : '';
202
 
203
+ $tweet_meta_content_length = 24 + strlen( $tweet_via ); /* 23 is the lenth of the URL as Twitter sees it + 1 for the empty space before it */
 
204
 
205
+ $maximum_count = apply_filters( 'dpsp_tweet_maximum_count', 280 ) - $tweet_meta_content_length;
206
+ $current_count = ( ! empty( $share_options['custom_tweet'] ) ? strlen( wp_kses_post( $share_options['custom_tweet'] ) ) : 0 );
207
+ $remaining_count = $maximum_count - $current_count;
208
 
209
+ echo '<label for="dpsp_share_options[custom_tweet]">' . '<span class="dpsp-icon-twitter"></span>' . __( 'Custom Tweet', 'social-pug' ) . '<span class="dpsp-textarea-characters-remaining-wrapper" data-maximum-count="' . $maximum_count . '"><span class="dpsp-textarea-characters-remaining">' . $remaining_count . '</span> ' . __( 'Characters Remaining', 'social-pug' ) . '</span>';
210
+ echo dpsp_output_backend_tooltip( __( 'Add a customized tweet that will be used when this post is shared on Twitter.', 'social-pug' ) );
211
+ echo '</label>';
212
+ echo '<textarea id="dpsp_share_options[custom_tweet]" name="dpsp_share_options[custom_tweet]" placeholder="' . __( 'Write a custom tweet...', 'social-pug' ) . '">' . ( isset( $share_options['custom_tweet'] ) ? wp_kses_post( $share_options['custom_tweet'] ) : '' ) . '</textarea>';
213
+ echo '<p class="description">' . __( 'Maximum characters is based off of the Twitter maximum, the post permalink, and whether your Twitter username is included in the tweet.', 'social-pug' ) . '</p>';
214
  echo '</div>';
215
 
216
+ echo '</div>';
217
+
218
+ // Multiple hidden Pinterest images section
219
+ if ( ! empty( $pinterest_settings['share_image_post_multiple_hidden_pinterest_images'] ) ) {
220
+
221
+ // Add nonce
222
+ wp_nonce_field( 'dpsp_save_multiple_pinterest_images', 'dpsp_save_multiple_pinterest_images', false );
223
+
224
+ echo '<div id="dpsp-meta-box-section-multiple-pinterest-images" class="dpsp-section">';
225
+
226
+ echo '<div class="dpsp-setting-field-wrapper">';
227
+
228
+ echo '<label>' . '<span class="dpsp-icon-pinterest"></span>' . __( 'Pinterest Hidden Images', 'social-pug' ) . '</label>';
229
+
230
+ $hidden_images = dpsp_maybe_unserialize( get_post_meta( $post->ID, 'dpsp_pinterest_hidden_images', true ) );
231
+ $hidden_images = ( ! empty( $hidden_images ) && is_array( $hidden_images ) ? $hidden_images : [] );
232
+
233
+ // Add the image thumbnails
234
+ foreach ( $hidden_images as $image_id ) {
235
 
236
+ $image_src = wp_get_attachment_image_src( $image_id, 'thumbnail' );
 
 
 
237
 
238
+ if ( empty( $image_src[0] ) ) {
239
+ continue;
240
+ }
241
 
242
+ echo '<div class="dpsp-hidden-image-wrapper" data-image-id="' . absint( $image_id ) . '">';
 
243
 
244
+ // Image thumbnail
245
+ echo '<img src="' . esc_url( $image_src[0] ) . '" data-pin-nopin="true" />';
246
 
247
+ // Remove image button
248
+ echo '<a href="#" class="dpsp-button-secondary" title="' . __( 'Remove image', 'social-pug' ) . '"><span class="dashicons dashicons-no-alt"></span></a>';
249
+
250
+ // Add hidden field with the image_id
251
+ echo '<input type="hidden" name="dpsp_pinterest_hidden_images[]" value="' . absint( $image_id ) . '" />';
252
+
253
+ echo '</div>';
254
+
255
+ }
256
+
257
+ // Add the add new images button
258
+ echo '<div class="dpsp-hidden-image-add-new dpsp-button-secondary">';
259
+ echo '<span class="dashicons dashicons-plus"></span>';
260
+ echo '<div>' . __( 'Add images', 'social-pug' ) . '</div>';
261
  echo '</div>';
262
 
 
263
  echo '</div>';
264
 
265
+ echo '</div>';
266
+
267
+ }
268
+
269
+ echo '</div>';
270
+
271
+ // Overwrite options
272
+ echo '<h4 class="dpsp-section-title">' . __( 'Display Options', 'social-pug' ) . '</h4>';
273
+ echo '<div>';
274
+ dpsp_settings_field( 'checkbox', 'dpsp_share_options[locations_overwrite][]', ( isset( $share_options['locations_overwrite'] ) ? $share_options['locations_overwrite'] : [] ), __( 'Hide buttons for the', 'social-pug' ), dpsp_get_network_locations( 'all', false ) );
275
+ echo '</div>';
276
+ echo '<div>';
277
+ dpsp_settings_field( 'checkbox', 'dpsp_share_options[locations_overwrite_show][]', ( isset( $share_options['locations_overwrite_show'] ) ? $share_options['locations_overwrite_show'] : [] ), __( 'Show buttons for the', 'social-pug' ), dpsp_get_network_locations( 'all', false ) );
278
+ echo '</div>';
279
+
280
+ }
281
+
282
+
283
+ /**
284
+ * Callback for the share statistics meta-box.
285
+ */
286
+ function dpsp_share_statistics_output( $post ) {
287
+
288
+ $networks = dpsp_get_active_networks();
289
+
290
+ if ( ! empty( $networks ) ) {
291
+
292
+ echo '<div class="dpsp-statistic-bars-wrapper">';
293
+
294
+ // Get share counts
295
+ $networks_shares = dpsp_get_post_share_counts( $post->ID );
296
+
297
+ // Get total share counts
298
+ $total_shares = dpsp_get_post_total_share_count( $post->ID );
299
+
300
+ // Shares header
301
+ echo '<div class="dpsp-statistic-bar-wrapper dpsp-statistic-bar-header">';
302
+ echo '<label>' . __( 'Network', 'social-pug' ) . '</label>';
303
+ echo '<div class="dpsp-network-share-count"><span class="dpsp-count">' . __( 'Shares', 'social-pug' ) . '</span><span class="dpsp-divider">|</span><span class="dpsp-percentage">%</span></div>';
304
+ echo '</div>';
305
+
306
+ // Actual shares per network
307
+ foreach ( $networks as $network_slug ) {
308
+
309
+ // Jump to the next one if the network by some chance does not support
310
+ // share count
311
+ if ( ! in_array( $network_slug, dpsp_get_networks_with_social_count() ) ) {
312
+ continue;
313
  }
314
 
315
+ // Get current network social share count
316
+ $network_shares = ( isset( $networks_shares[ $network_slug ] ) ? $networks_shares[ $network_slug ] : 0 );
317
+
318
+ // Get the percentage of the total shares for current network
319
+ $share_percentage = ( $total_shares != 0 ? (float) ( $network_shares / $total_shares * 100 ) : 0 );
320
+
321
+ echo '<div class="dpsp-statistic-bar-wrapper dpsp-statistic-bar-wrapper-network">';
322
+ echo '<label>' . dpsp_get_network_name( $network_slug ) . '</label>';
323
+
324
+ echo '<div class="dpsp-statistic-bar dpsp-statistic-bar-' . $network_slug . '">';
325
+ echo '<div class="dpsp-statistic-bar-inner" style="width:' . round( $share_percentage, 1 ) . '%"></div>';
326
+ echo '</div>';
327
+
328
+ echo '<div class="dpsp-network-share-count"><span class="dpsp-count">' . $network_shares . '</span><span class="dpsp-divider">|</span><span class="dpsp-percentage">' . round( $share_percentage, 2 ) . '</span></div>';
329
  echo '</div>';
330
 
331
+ }
332
+
333
+ // Shares footer with total count
334
+ echo '<div class="dpsp-statistic-bar-wrapper dpsp-statistic-bar-footer">';
335
+ echo '<label>' . __( 'Total shares', 'social-pug' ) . '</label>';
336
+ echo '<div class="dpsp-network-share-count"><span class="dpsp-count">' . $total_shares . '</span></div>';
337
+ echo '</div>';
338
+
339
+ // Refresh counts button
340
+ echo '<div id="dpsp-refresh-share-counts-wrapper">';
341
+ echo '<a id="dpsp-refresh-share-counts" class="dpsp-button-secondary" href="#">' . __( 'Refresh shares', 'social-pug' ) . '</a>';
342
+ echo '<span class="spinner"></span>';
343
+ echo wp_nonce_field( 'dpsp_refresh_share_counts', 'dpsp_refresh_share_counts', false, false );
344
+ echo '</div>';
345
+
346
+ echo '</div>';
347
+
348
+ /**
349
+ * Share recovery links
350
+ *
351
+ * Because the share statistics meta-box is rendered both on load and through
352
+ * AJAX when the Refresh Shares button is clicked, we need to only add it on pageload
353
+ *
354
+ */
355
+ if ( ! wp_doing_ajax() ) {
356
+
357
+ echo '<div id="dpsp-shares-recovery-post-previous-urls">';
358
+
359
+ $urls = dpsp_maybe_unserialize( get_post_meta( $post->ID, 'dpsp_post_single_previous_urls', true ) );
360
+
361
+ echo '<h4>' . __( 'Social Shares Recovery', 'social-pug' ) . dpsp_output_backend_tooltip( __( 'If you have modified the permalink for this particular post, add the previous URL variations for the post, so that Grow can recover the social shares for each individual URL.', 'social-pug' ), true ) . '</h4>';
362
+
363
+ // Add the empty placeholder with a message, when previous URLs don't exist
364
+ echo '<div id="dpsp-shares-recovery-post-previous-urls-empty" ' . ( ! empty( $urls ) ? 'style="display: none;"' : '' ) . '>';
365
+ echo '<p>' . __( 'If you have ever modified the permalink for this particular post and want to recover lost shares for any previous links this post had, add the old links by pressing the Add Link button.', 'social-pug' ) . '</p>';
366
+ echo '</div>';
367
+
368
+ // Add each previous URL for the post
369
+ if ( ! empty( $urls ) ) {
370
+
371
+ foreach ( $urls as $url ) {
372
+
373
+ echo '<div class="dpsp-post-previous-url">';
374
+
375
+ echo '<input type="text" name="dpsp_post_single_previous_urls[]" placeholder="eg. http://www.domain.com/sample-post/" value="' . esc_attr( $url ) . '" />';
376
+
377
+ echo '<a href="#" class="dpsp-button-secondary">' . __( 'Remove', 'social-pug' ) . '</a>';
378
+
379
+ echo '</div>';
380
+
381
+ }
382
+ }
383
+
384
+ echo '<a href="#" id="dpsp-add-post-previous-url" class="dpsp-button-secondary">' . __( 'Add Link', 'social-pug' ) . '</a>';
385
+
386
  echo '</div>';
387
 
388
+ // Hidden URL field used to add new fields through JS
389
+ echo '<div class="dpsp-post-previous-url dpsp-hidden">';
390
+
391
+ echo '<input type="text" name="dpsp_post_single_previous_urls[]" placeholder="eg. http://www.domain.com/sample-post/" value="" />';
392
+
393
+ echo '<a href="#" class="dpsp-button-secondary">' . __( 'Remove', 'social-pug' ) . '</a>';
394
+
395
  echo '</div>';
396
+ }
397
+ }
398
+ }
399
+
400
+ /**
401
+ * Callback for the debugger meta-box.
402
+ */
403
+ function dpsp_post_debugger_output( $post ) {
404
 
405
+ $post_meta = get_post_meta( $post->ID );
406
+
407
+ echo '<textarea readonly style="width: 100%; min-height: 600px;">';
408
+
409
+ // Add post data
410
+ echo '----------------------------------------------------------------------------------' . PHP_EOL;
411
+ echo 'post_id' . PHP_EOL;
412
+ echo '----------------------------------------------------------------------------------' . PHP_EOL;
413
+ echo $post->ID;
414
+ echo PHP_EOL . PHP_EOL;
415
+
416
+ echo '----------------------------------------------------------------------------------' . PHP_EOL;
417
+ echo 'post_permalink' . PHP_EOL;
418
+ echo '----------------------------------------------------------------------------------' . PHP_EOL;
419
+ echo get_permalink( $post->ID );
420
+ echo PHP_EOL . PHP_EOL;
421
+
422
+ // Add Social Pug related meta-data
423
+ foreach ( $post_meta as $meta_key => $meta_value ) {
424
+
425
+ if ( false === strpos( $meta_key, 'dpsp' ) ) {
426
+ continue;
427
  }
428
+
429
+ echo '----------------------------------------------------------------------------------' . PHP_EOL;
430
+ echo $meta_key . PHP_EOL;
431
+ echo '----------------------------------------------------------------------------------' . PHP_EOL;
432
+
433
+ if ( is_serialized( $meta_value[0] ) ) {
434
+ print_r( unserialize( $meta_value[0] ) );
435
+ } else {
436
+ print_r( $meta_value[0] . PHP_EOL );
437
+ }
438
+
439
+ echo PHP_EOL;
440
  }
441
 
442
+ echo '</textarea>';
443
+ }
444
 
 
 
 
 
 
 
445
 
446
+ /**
447
+ * Ajax callback action that refreshes the social counts for the "Share Statistics"
448
+ * meta-box from each single edit post admin screen.
449
+ */
450
+ function dpsp_refresh_share_counts() {
451
 
452
+ if ( empty( $_POST['action'] ) || empty( $_POST['nonce'] ) || empty( $_POST['post_id'] ) ) {
453
+ return;
454
+ }
455
+
456
+ if ( $_POST['action'] != 'dpsp_refresh_share_counts' ) {
457
+ return;
458
+ }
459
+
460
+ if ( ! wp_verify_nonce( $_POST['nonce'], 'dpsp_refresh_share_counts' ) ) {
461
+ return;
462
+ }
463
+
464
+ $post_id = (int) $_POST['post_id'];
465
+ $post = get_post( $post_id );
466
 
467
+ if ( ! in_array( $post->post_status, [ 'future', 'draft', 'pending', 'trash', 'auto-draft' ] ) ) {
468
+
469
+ // Flush existing shares before pulling a new set
470
+ update_post_meta( $post_id, 'dpsp_networks_shares', '' );
471
+
472
+ // Get social shares from the networks
473
+ $share_counts = dpsp_pull_post_share_counts( $post_id );
474
+
475
+ // Update share counts in the db
476
+ $shares_updated = dpsp_update_post_share_counts( $post_id, $share_counts );
477
+
478
+ }
479
+
480
+ // Echos the share statistics
481
+ dpsp_share_statistics_output( $post );
482
+ wp_die();
483
+ }
484
+
485
+ /**
486
+ * Save meta data for Social Pug meta boxes.
487
+ */
488
+ function dpsp_save_post_meta( $post_id ) {
489
+
490
+ // Check if our nonce is set.
491
+ if ( ! isset( $_POST['dpsptkn'] ) ) {
492
+ return;
493
+ }
494
+
495
+ // Verify that the nonce is valid.
496
+ if ( ! wp_verify_nonce( $_POST['dpsptkn'], 'dpsp_meta_box' ) ) {
497
+ return;
498
+ }
499
+
500
+ // If this is an autosave, our form has not been submitted, so we don't want to do anything.
501
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
502
+ return;
503
+ }
504
+
505
+ // Check the user's permissions.
506
+ if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {
507
+ if ( ! current_user_can( 'edit_page', $post_id ) ) {
508
+ return;
509
+ }
510
+ } else {
511
+ if ( ! current_user_can( 'edit_post', $post_id ) ) {
512
  return;
513
+ }
514
+ }
515
 
516
+ // Clear cached shortened links
517
+ delete_post_meta( $post_id, 'dpsp_short_link_bitly' );
518
+
519
+ // Save information for the Share Options meta-box
520
+ if ( isset( $_POST['dpsp_share_options'] ) ) {
521
+ $share_options = $_POST['dpsp_share_options'];
522
+ } else {
523
+ $share_options = '';
524
+ }
525
 
526
+ update_post_meta( $post_id, 'dpsp_share_options', $share_options );
527
 
528
+ // Save information for the Pinterest hidden images
529
+ if ( ! empty( $_POST['dpsp_save_multiple_pinterest_images'] ) && wp_verify_nonce( $_POST['dpsp_save_multiple_pinterest_images'], 'dpsp_save_multiple_pinterest_images' ) ) {
530
 
531
+ // Remove the images if none are present
532
+ if ( ! empty( $_POST['dpsp_pinterest_hidden_images'] ) ) {
533
 
534
+ // Sanitize the values
535
+ $hidden_images = array_map( 'absint', $_POST['dpsp_pinterest_hidden_images'] );
536
+ $hidden_images = array_filter( $hidden_images );
537
+
538
+ } else {
539
+ $hidden_images = '';
540
+ }
541
+
542
+ // Update hidden images value
543
+ update_post_meta( $post_id, 'dpsp_pinterest_hidden_images', $hidden_images );
544
+ }
545
+
546
+ // Save information for the Share Statistics meta-box
547
+ if ( ! empty( $_POST['dpsp_post_single_previous_urls'] ) ) {
548
+
549
+ $previous_urls = ( is_array( $_POST['dpsp_post_single_previous_urls'] ) ? $_POST['dpsp_post_single_previous_urls'] : [] );
550
+
551
+ foreach ( $previous_urls as $key => $previous_url ) {
552
+ // Sanitize the URL
553
+ $previous_urls[ $key ] = wp_http_validate_url( sanitize_text_field( $previous_url ) );
554
  }
555
 
556
+ // Exclude invalid and empty values
557
+ $previous_urls = array_filter( $previous_urls );
558
+
559
+ // Make sure there are no duplicates
560
+ $previous_urls = array_unique( $previous_urls );
561
+
562
+ } else {
563
+ $previous_urls = '';
564
+ }
565
+
566
+ // Update previous URL's
567
+ update_post_meta( $post_id, 'dpsp_post_single_previous_urls', $previous_urls );
568
+ }
569
+
570
+ /**
571
+ *
572
+ */
573
+ function dpsp_refresh_all_share_counts_ajax() {
574
+ if ( empty( $_POST['action'] ) || empty( $_POST['nonce'] ) ) {
575
+ return;
576
+ }
577
 
578
+ if ( $_POST['action'] != 'dpsp_refresh_all_share_counts' ) {
579
+ return;
580
+ }
581
 
582
+ if ( ! wp_verify_nonce( $_POST['nonce'], 'dpsp_refresh_all_share_counts' ) ) {
583
+ return;
584
  }
585
+
586
+ dpsp_invalidate_all_share_counts();
587
+ wp_die();
588
+ }
589
+
590
+ /**
591
+ * Register hooks for admin-metaboxes.php
592
+ */
593
+ function dpsp_register_admin_metaboxes() {
594
+ add_action( 'add_meta_boxes', 'dpsp_meta_boxes' );
595
+ add_action( 'wp_ajax_dpsp_refresh_share_counts', 'dpsp_refresh_share_counts' );
596
+ add_action( 'save_post', 'dpsp_save_post_meta' );
597
+ add_action( 'wp_ajax_dpsp_refresh_all_share_counts', 'dpsp_refresh_all_share_counts_ajax' );
598
+ }
inc/admin/admin-widgets.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Register the Top Shared Posts widget.
5
+ */
6
+ function dpsp_register_widget_top_shared_posts() {
7
+ if ( class_exists( 'DPSP_Top_Shared_Posts' ) ) {
8
+ register_widget( 'DPSP_Top_Shared_Posts' );
9
+ }
10
+ }
11
+
12
+ /**
13
+ * Register hooks for admin-widgets.php.
14
+ */
15
+ function dpsp_register_admin_widgets() {
16
+ add_action( 'widgets_init', 'dpsp_register_widget_top_shared_posts' );
17
+ }
inc/admin/feedback-form/assets/css/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/admin/feedback-form/assets/img/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/admin/feedback-form/assets/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/admin/feedback-form/assets/js/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/admin/feedback-form/functions-ajax.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
 
3
- // Exit if accessed directly
4
- if ( ! defined( 'ABSPATH' ) ) exit;
5
-
6
  /**
7
  * AJAX callback to send the feedback
8
  *
@@ -52,11 +49,10 @@ function dpsp_ajax_send_feedback() {
52
 
53
 
54
  // Send the email
55
- $sent = wp_mail( 'support@devpups.com', 'Grow by Mediavine User Feedback', $message, $headers );
56
 
57
  // Return
58
  echo ( $sent ? 1 : 0 );
59
  wp_die();
60
 
61
  }
62
- add_action( 'wp_ajax_dpsp_ajax_send_feedback', 'dpsp_ajax_send_feedback' );
1
  <?php
2
 
 
 
 
3
  /**
4
  * AJAX callback to send the feedback
5
  *
49
 
50
 
51
  // Send the email
52
+ $sent = wp_mail( 'grow@mediavine.com', 'Grow Social by Mediavine User Feedback', $message, $headers );
53
 
54
  // Return
55
  echo ( $sent ? 1 : 0 );
56
  wp_die();
57
 
58
  }
 
inc/admin/feedback-form/functions.php CHANGED
@@ -1,15 +1,9 @@
1
  <?php
2
 
3
- // Exit if accessed directly
4
- if ( ! defined( 'ABSPATH' ) ) exit;
5
-
6
-
7
  /**
8
- * Enqueue admin scripts for the feedback form
9
- *
10
  */
11
  function dpsp_enqueue_admin_scripts_feedback() {
12
-
13
  // Plugin styles
14
  wp_register_style( 'dpsp-style-feedback', DPSP_PLUGIN_DIR_URL . 'inc/admin/feedback-form/assets/css/style-admin-feedback-form.css', array(), DPSP_VERSION );
15
  wp_enqueue_style( 'dpsp-style-feedback' );
@@ -17,21 +11,14 @@ function dpsp_enqueue_admin_scripts_feedback() {
17
  // Plugin script
18
  wp_register_script( 'dpsp-script-feedback', DPSP_PLUGIN_DIR_URL . 'inc/admin/feedback-form/assets/js/script-admin-feedback-form.js', array( 'jquery' ), DPSP_VERSION );
19
  wp_enqueue_script( 'dpsp-script-feedback' );
20
-
21
  }
22
- add_action( 'dpsp_enqueue_admin_scripts', 'dpsp_enqueue_admin_scripts_feedback' );
23
-
24
 
25
  /**
26
- * Outputs the feedback form in the admin footer
27
- *
28
  */
29
  function dpsp_output_feedback_form() {
30
-
31
- if( empty( $_GET['page'] ) || false === strpos( $_GET['page'], 'dpsp' ) )
32
  return;
33
-
34
  include 'views/view-feedback-form.php';
35
-
36
  }
37
- add_action( 'admin_footer', 'dpsp_output_feedback_form' );
1
  <?php
2
 
 
 
 
 
3
  /**
4
+ * Enqueue admin scripts for the feedback form.
 
5
  */
6
  function dpsp_enqueue_admin_scripts_feedback() {
 
7
  // Plugin styles
8
  wp_register_style( 'dpsp-style-feedback', DPSP_PLUGIN_DIR_URL . 'inc/admin/feedback-form/assets/css/style-admin-feedback-form.css', array(), DPSP_VERSION );
9
  wp_enqueue_style( 'dpsp-style-feedback' );
11
  // Plugin script
12
  wp_register_script( 'dpsp-script-feedback', DPSP_PLUGIN_DIR_URL . 'inc/admin/feedback-form/assets/js/script-admin-feedback-form.js', array( 'jquery' ), DPSP_VERSION );
13
  wp_enqueue_script( 'dpsp-script-feedback' );
 
14
  }
 
 
15
 
16
  /**
17
+ * Outputs the feedback form in the admin footer.
 
18
  */
19
  function dpsp_output_feedback_form() {
20
+ if ( empty( $_GET['page'] ) || false === strpos( $_GET['page'], 'dpsp' ) ) {
 
21
  return;
22
+ }
23
  include 'views/view-feedback-form.php';
 
24
  }
 
inc/admin/feedback-form/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/admin/feedback-form/views/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/admin/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/admin/submenu-page-debugger.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Function that creates the sub-menu item and page for the debugger.
5
+ *
6
+ * @return void
7
+ */
8
+ function dpsp_register_debugger_subpage() {
9
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
10
+
11
+ if ( ! empty( $settings['debugger_enabled'] ) ) {
12
+ add_submenu_page( 'dpsp-social-pug', __( 'Debugger', 'social-pug' ), __( 'Debugger', 'social-pug' ), 'manage_options', 'dpsp-debugger', 'dpsp_debugger_subpage' );
13
+ }
14
+ }
15
+
16
+ /**
17
+ * Outputs content to the debugger subpage.
18
+ */
19
+ function dpsp_debugger_subpage() {
20
+ include DPSP_PLUGIN_DIR . '/inc/admin/views/view-submenu-page-debugger.php';
21
+ }
22
+
23
+ /**
24
+ * Register hooks for submenu-page-debugger.php
25
+ */
26
+ function dpsp_register_admin_debugger() {
27
+ add_action( 'admin_menu', 'dpsp_register_debugger_subpage', 101 );
28
+ }
inc/admin/submenu-page-extensions.php CHANGED
@@ -1,27 +1,21 @@
1
- <?php
2
- /**
3
- * Function that creates the sub-menu item and page for the extra tools page
4
- *
5
- * @return void
6
- *
7
- */
8
- function dpsp_register_extensions_subpage() {
9
- add_submenu_page( 'dpsp-social-pug', __('Extensions', 'social-pug'), '<span style="color: orange;">' . __('Extensions', 'social-pug') . '</span>', 'manage_options', 'dpsp-extensions', 'dpsp_extensions_subpage' );
10
- }
11
- add_action( 'admin_menu', 'dpsp_register_extensions_subpage' );
12
-
13
 
14
- /**
15
- * Function that adds content to the extensions subpage
16
- *
17
- * @return string
18
- *
19
- */
20
- function dpsp_extensions_subpage() {
21
 
22
- if( ! empty( $_GET['sub-page'] ) && $_GET['sub-page'] == 'opt-in-hound' )
23
- include_once 'views/view-submenu-page-extensions-sub-page-opt-in-hound.php';
24
- else
25
- include_once 'views/view-submenu-page-extensions.php';
26
-
27
- }
 
 
 
 
 
 
1
+ <?php
 
 
 
 
 
 
 
 
 
 
 
2
 
3
+ /**
4
+ * Function that creates the sub-menu item and page for the extra tools page.
5
+ */
6
+ function dpsp_register_extensions_subpage() {
7
+ add_submenu_page( 'dpsp-social-pug', __('Extensions', 'social-pug'), '<span style="color: orange;">' . __('Extensions', 'social-pug') . '</span>', 'manage_options', 'dpsp-extensions', 'dpsp_extensions_subpage' );
8
+ }
 
9
 
10
+ /**
11
+ * Function that adds content to the extensions subpage.
12
+ *
13
+ * @return string
14
+ */
15
+ function dpsp_extensions_subpage() {
16
+ if( ! empty( $_GET['sub-page'] ) && $_GET['sub-page'] == 'opt-in-hound' ) {
17
+ include_once 'views/view-submenu-page-extensions-sub-page-opt-in-hound.php';
18
+ } else {
19
+ include_once 'views/view-submenu-page-extensions.php';
20
+ }
21
+ }
inc/admin/submenu-page-settings.php CHANGED
@@ -1,79 +1,139 @@
1
- <?php
2
- /*
3
- * Function that creates the sub-menu item and page for the settings page
4
- *
5
- *
6
- * @return void
7
- *
8
- */
9
- function dpsp_register_settings_subpage() {
10
- add_submenu_page( 'dpsp-social-pug', __('Settings', 'social-pug'), __('Settings', 'social-pug'), 'manage_options', 'dpsp-settings', 'dpsp_settings_subpage' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  }
12
- add_action( 'admin_menu', 'dpsp_register_settings_subpage' );
13
-
14
-
15
- /*
16
- * Function that adds content to the settings subpage
17
- *
18
- * @return string
19
- *
20
- */
21
- function dpsp_settings_subpage() {
22
-
23
- include_once 'views/view-submenu-page-settings.php';
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  }
26
 
27
-
28
- function dpsp_settings_register_settings() {
29
-
30
- register_setting( 'dpsp_settings', 'dpsp_settings', 'dpsp_settings_sanitize' );
31
-
32
  }
33
- add_action( 'admin_init', 'dpsp_settings_register_settings' );
34
-
35
 
36
- /**
37
- * Filter and sanitize settings
38
- *
39
- * @param array $new_settings
40
- *
41
- */
42
- function dpsp_settings_sanitize( $new_settings ) {
43
-
44
- $new_settings = dpsp_array_strip_script_tags( $new_settings );
45
-
46
- return $new_settings;
47
 
 
 
48
  }
49
 
 
 
50
 
51
- /**
52
- * Hooks to generate a Facebook App access token that will be used for retrieving share counts
53
- *
54
- */
55
- function dpsp_generate_facebook_app_access_token( $new_settings = array(), $old_settings = array() ) {
56
-
57
- if( empty( $new_settings['facebook_app_id'] ) || empty( $new_settings['facebook_app_secret'] ) )
58
- return $new_settings;
59
 
 
60
 
61
- $response = wp_remote_post( add_query_arg( array( 'client_id' => trim( $new_settings['facebook_app_id'] ), 'client_secret' => trim( $new_settings['facebook_app_secret'] ), 'grant_type' => 'client_credentials' ), 'https://graph.facebook.com/oauth/access_token' ) );
 
62
 
63
- if( is_wp_error( $response ) )
64
- return $new_settings;
 
 
 
 
65
 
66
- if( wp_remote_retrieve_response_code( $response ) !== 200 )
67
- return $new_settings;
 
 
68
 
 
 
 
69
 
70
- $body = wp_remote_retrieve_body( $response );
71
- $body = json_decode( $body, true );
72
 
73
- if( ! empty( $body['access_token'] ) && strpos( $body['access_token'], '|' ) !== false )
74
- $new_settings['facebook_app_access_token'] = $body['access_token'];
 
75
 
76
- return $new_settings;
 
 
77
 
 
 
 
 
 
 
 
 
78
  }
79
- add_filter( 'pre_update_option_dpsp_settings', 'dpsp_generate_facebook_app_access_token', 10, 2 );
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Function that creates the sub-menu item and page for the settings page.
5
+ */
6
+ function dpsp_register_settings_subpage() {
7
+ add_submenu_page( 'dpsp-social-pug', __( 'Settings', 'social-pug' ), __( 'Settings', 'social-pug' ), 'manage_options', 'dpsp-settings', 'dpsp_settings_subpage' );
8
+ }
9
+
10
+ /**
11
+ * Outputs content to the settings subpage.
12
+ */
13
+ function dpsp_settings_subpage() {
14
+ $tabs = [
15
+ 'general-settings' => __( 'General Settings', 'social-pug' ),
16
+ 'social-identity' => __( 'Social Identity', 'social-pug' ),
17
+ ];
18
+
19
+ $tabs = apply_filters( 'dpsp_submenu_page_settings_tabs', $tabs );
20
+
21
+ $pro = ( \Social_Pug::is_free() ) ? '' : '-pro';
22
+ include DPSP_PLUGIN_DIR . '/inc/admin/views/view-submenu-page-settings' . $pro . '.php';
23
+ }
24
+
25
+ /**
26
+ *
27
+ */
28
+ function dpsp_settings_register_settings() {
29
+ register_setting( 'dpsp_settings', 'dpsp_settings', 'dpsp_settings_sanitize' );
30
+ }
31
+
32
+ /**
33
+ * Filter and sanitize settings.
34
+ *
35
+ * @param array $new_settings
36
+ * @return array
37
+ * @deprecated
38
+ */
39
+ function dpsp_settings_sanitize( $new_settings ) {
40
+ return $new_settings;
41
+ }
42
+
43
+ /**
44
+ * Hooks to generate a Facebook App access token that will be used for retrieving share counts.
45
+ */
46
+ function dpsp_generate_facebook_app_access_token( $new_settings = [], $old_settings = [] ) {
47
+
48
+ if ( empty( $new_settings['facebook_app_id'] ) || empty( $new_settings['facebook_app_secret'] ) ) {
49
+ return $new_settings;
50
  }
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
+ $response = wp_remote_post(
53
+ add_query_arg(
54
+ [
55
+ 'client_id' => trim( $new_settings['facebook_app_id'] ),
56
+ 'client_secret' => trim( $new_settings['facebook_app_secret'] ),
57
+ 'grant_type' => 'client_credentials',
58
+ ],
59
+ 'https://graph.facebook.com/oauth/access_token'
60
+ )
61
+ );
62
+
63
+ if ( is_wp_error( $response ) ) {
64
+ return $new_settings;
65
  }
66
 
67
+ if ( wp_remote_retrieve_response_code( $response ) !== 200 ) {
68
+ return $new_settings;
 
 
 
69
  }
 
 
70
 
71
+ $body = wp_remote_retrieve_body( $response );
72
+ $body = json_decode( $body, true );
 
 
 
 
 
 
 
 
 
73
 
74
+ if ( ! empty( $body['access_token'] ) && strpos( $body['access_token'], '|' ) !== false ) {
75
+ $new_settings['facebook_app_access_token'] = $body['access_token'];
76
  }
77
 
78
+ return $new_settings;
79
+ }
80
 
81
+ /**
82
+ * Hooks to update settings to check the serial status and update it.
83
+ */
84
+ function dpsp_update_serial_key_status( $old_settings = [], $new_settings = [] ) {
 
 
 
 
85
 
86
+ $serial = ( isset( $new_settings['product_serial'] ) ? $new_settings['product_serial'] : '' );
87
 
88
+ // Get serial status
89
+ $serial_status = dpsp_get_serial_key_status( $serial );
90
 
91
+ if ( ! is_null( $serial_status ) ) {
92
+ update_option( 'dpsp_product_serial_status', $serial_status );
93
+ } else {
94
+ update_option( 'dpsp_product_serial_status', '' );
95
+ }
96
+ }
97
 
98
+ /**
99
+ * Adds a validation icon for the serial key.
100
+ */
101
+ function dpsp_add_serial_status_icon( $slug, $type, $name ) {
102
 
103
+ if ( $slug != 'serial-key' ) {
104
+ return;
105
+ }
106
 
107
+ $dpsp_settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
108
+ $dpsp_serial_status = Mediavine\Grow\Settings::get_setting( 'dpsp_product_serial_status', '' );
109
 
110
+ if ( Mediavine\Grow\Settings::get_setting( 'mv_grow_license', false ) ) {
111
+ return;
112
+ }
113
 
114
+ if ( empty( $dpsp_settings['product_serial'] ) && empty( $dpsp_serial_status ) ) {
115
+ return;
116
+ }
117
 
118
+ switch ( $dpsp_serial_status ) {
119
+ case 1:
120
+ case 2:
121
+ echo '<div id="dpsp-serial-key-status" class="dpsp-valid"><span title="' . __( 'Serial key is valid.', 'social-pug' ) . '" class="dashicons dashicons-yes"></span><span>' . __( 'Serial key is valid.', 'social-pug' ) . '</span></div>';
122
+ break;
123
+ default:
124
+ echo '<div id="dpsp-serial-key-status" class="dpsp-invalid"><span title="' . __( 'Serial key is invalid or expired.', 'social-pug' ) . '" class="dashicons dashicons-warning"></span><span>' . __( 'Serial key is invalid or expired.', 'social-pug' ) . '</span></div>';
125
+ break;
126
  }
127
+ }
128
+
129
+ /**
130
+ * Register hooks for submenu-page-settings.php.
131
+ */
132
+ function dpsp_register_admin_settings() {
133
+ add_action( 'admin_menu', 'dpsp_register_settings_subpage', 100 );
134
+ add_action( 'admin_init', 'dpsp_settings_register_settings' );
135
+ add_filter( 'pre_update_option_dpsp_settings', 'dpsp_generate_facebook_app_access_token', 10, 2 );
136
+ add_action( 'add_option_dpsp_settings', 'dpsp_update_serial_key_status', 10, 2 );
137
+ add_action( 'update_option_dpsp_settings', 'dpsp_update_serial_key_status', 10, 2 );
138
+ add_action( 'dpsp_inner_after_settings_field', 'dpsp_add_serial_status_icon', 10, 3 );
139
+ }
inc/admin/submenu-page-sidebar.php CHANGED
@@ -1,55 +1,42 @@
1
- <?php
2
-
3
- /*
4
- * Function that creates the sub-menu item and page for the floating sidebar location of the share buttons
5
- *
6
- * @return void
7
- *
8
- */
9
- function dpsp_register_floating_sidebar_subpage() {
10
- add_submenu_page( 'dpsp-social-pug', __('Floating Sidebar', 'social-pug'), __('Floating Sidebar', 'social-pug'), 'manage_options', 'dpsp-sidebar', 'dpsp_sidebar_subpage' );
11
- }
12
- add_action( 'admin_menu', 'dpsp_register_floating_sidebar_subpage' );
13
-
14
-
15
- /*
16
- * Function that adds content to the floating sidebar subpage
17
- *
18
- * @return string
19
- *
20
- */
21
- function dpsp_sidebar_subpage() {
22
-
23
- include_once 'views/view-submenu-page-sidebar.php';
24
-
25
- }
26
-
27
-
28
- function dpsp_sidebar_register_settings() {
29
-
30
- register_setting( 'dpsp_location_sidebar', 'dpsp_location_sidebar', 'dpsp_sidebar_settings_sanitize' );
31
-
32
- }
33
- add_action( 'admin_init', 'dpsp_sidebar_register_settings' );
34
-
35
-
36
- /*
37
- * Filter and sanitize settings
38
- *
39
- * @param array $new_settings
40
- *
41
- */
42
- function dpsp_sidebar_settings_sanitize( $new_settings ) {
43
-
44
- // Save default values even if values do not exist
45
- if( !isset( $new_settings['networks'] ) )
46
- $new_settings['networks'] = array();
47
-
48
- if( !isset( $new_settings['button_style'] ) )
49
- $new_settings['button_style'] = 1;
50
-
51
- $new_settings = dpsp_array_strip_script_tags( $new_settings );
52
-
53
- return $new_settings;
54
-
55
- }
1
+ <?php
2
+
3
+ /**
4
+ * Function that creates the sub-menu item and page for the floating sidebar location of the share buttons.
5
+ *
6
+ * @return void
7
+ */
8
+ function dpsp_register_floating_sidebar_subpage() {
9
+ add_submenu_page( 'dpsp-social-pug', __('Floating Sidebar', 'social-pug'), __('Floating Sidebar', 'social-pug'), 'manage_options', 'dpsp-sidebar', 'dpsp_sidebar_subpage' );
10
+ }
11
+
12
+ /**
13
+ * Function that adds content to the floating sidebar subpage.
14
+ *
15
+ * @return string
16
+ */
17
+ function dpsp_sidebar_subpage() {
18
+ include_once 'views/view-submenu-page-sidebar.php';
19
+ }
20
+
21
+ function dpsp_sidebar_register_settings() {
22
+ register_setting( 'dpsp_location_sidebar', 'dpsp_location_sidebar', 'dpsp_sidebar_settings_sanitize' );
23
+ }
24
+
25
+ /**
26
+ * Filter and sanitize settings.
27
+ *
28
+ * @param array $new_settings
29
+ * @return array
30
+ */
31
+ function dpsp_sidebar_settings_sanitize( $new_settings ) {
32
+ // Save default values even if values do not exist
33
+ if( !isset( $new_settings['networks'] ) )
34
+ $new_settings['networks'] = array();
35
+
36
+ if( !isset( $new_settings['button_style'] ) )
37
+ $new_settings['button_style'] = 1;
38
+
39
+ $new_settings = dpsp_array_strip_script_tags( $new_settings );
40
+
41
+ return $new_settings;
42
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/admin/submenu-page-toolkit.php CHANGED
@@ -1,25 +1,22 @@
1
- <?php
2
- /*
3
- * Function that creates the sub-menu item and page for the tools page
4
- *
5
- *
6
- * @return void
7
- *
8
- */
9
- function dpsp_register_toolkit_subpage() {
10
- add_submenu_page( 'dpsp-social-pug', __('Toolkit', 'social-pug'), __('Toolkit', 'social-pug'), 'manage_options', 'dpsp-toolkit', 'dpsp_toolkit_subpage' );
11
- }
12
- add_action( 'admin_menu', 'dpsp_register_toolkit_subpage' );
13
 
 
 
 
 
 
 
14
 
15
- /*
16
- * Function that adds content to the toolkit subpage
17
- *
18
- * @return string
19
- *
20
- */
21
- function dpsp_toolkit_subpage() {
22
 
23
- include_once 'views/view-submenu-page-toolkit.php';
24
-
25
- }
 
 
 
1
+ <?php
 
 
 
 
 
 
 
 
 
 
 
2
 
3
+ /**
4
+ * Function that creates the sub-menu item and page for the tools page.
5
+ */
6
+ function dpsp_register_toolkit_subpage() {
7
+ add_submenu_page( 'dpsp-social-pug', __( 'Toolkit', 'social-pug' ), __( 'Toolkit', 'social-pug' ), 'manage_options', 'dpsp-toolkit', 'dpsp_toolkit_subpage' );
8
+ }
9
 
10
+ /**
11
+ * Outputs content to the toolkit subpage.
12
+ */
13
+ function dpsp_toolkit_subpage() {
14
+ include DPSP_PLUGIN_DIR . '/inc/admin/views/view-submenu-page-toolkit.php';
15
+ }
 
16
 
17
+ /**
18
+ * Register hooks for submenu-page-toolkit.php.
19
+ */
20
+ function dpsp_register_admin_toolkit() {
21
+ add_action( 'admin_menu', 'dpsp_register_toolkit_subpage', 15 );
22
+ }
inc/admin/views/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/admin/views/view-submenu-page-content.php DELETED
@@ -1,118 +0,0 @@
1
- <form method="post" action="options.php">
2
-
3
- <?php
4
- $dpsp_location_content = get_option( 'dpsp_location_content', 'not_set' );
5
- settings_fields( 'dpsp_location_content' );
6
- ?>
7
-
8
- <div class="dpsp-page-wrapper dpsp-page-content wrap">
9
-
10
- <!-- Page Title -->
11
- <h1 class="dpsp-page-title">
12
- <?php _e('Configure Content Sharing Buttons', 'social-pug'); ?>
13
-
14
- <input type="hidden" name="dpsp_buttons_location" value="dpsp_location_content" />
15
- <input type="hidden" name="dpsp_location_content[active]" value="<?php echo ( isset( $dpsp_location_content["active"] ) ? 1 : '' ); ?>" <?php echo ( !isset( $dpsp_location_content["active"] ) ? 'disabled' : '' ); ?> />
16
- </h1>
17
-
18
-
19
- <!-- Networks Selectable and Sortable Panels -->
20
- <div id="dpsp-social-platforms-wrapper" class="dpsp-card">
21
-
22
- <div class="dpsp-card-header">
23
- <?php _e( 'Social Networks', 'social-pug' ); ?>
24
- <a id="dpsp-select-networks" class="dpsp-button-secondary" href="#"><?php echo __( 'Select Networks', 'social-pug' ) ?></a>
25
- </div>
26
-
27
- <div id="dpsp-sortable-networks-empty" class="dpsp-card-inner <?php echo ( empty( $dpsp_location_content['networks'] ) ? 'dpsp-active' : '' ); ?>">
28
- <p><?php _e( 'Select which social buttons to display', 'social-pug' ); ?></p>
29
- </div>
30
-
31
- <?php echo dpsp_output_sortable_networks( ( ! empty( $dpsp_location_content['networks'] ) ? $dpsp_location_content['networks'] : array() ), 'dpsp_location_content' ); ?>
32
-
33
- <?php
34
- $available_networks = dpsp_get_networks();
35
- echo dpsp_output_selectable_networks( $available_networks, ( ! empty( $dpsp_location_content['networks'] ) ? $dpsp_location_content['networks'] : array() ) );
36
- ?>
37
-
38
- </div>
39
-
40
-
41
- <!-- General Display Settings -->
42
- <div class="dpsp-card">
43
-
44
- <div class="dpsp-card-header">
45
- <?php _e( 'Display Settings', 'social-pug' ); ?>
46
- </div>
47
-
48
- <div class="dpsp-card-inner">
49
-
50
- <?php dpsp_settings_field( 'select', 'dpsp_location_content[display][shape]', ( isset($dpsp_location_content['display']['shape']) ? $dpsp_location_content['display']['shape'] : '' ), __( 'Button shape', 'social-pug' ), array( 'rectangular' => __( 'Rectangular', 'social-pug' ), 'rounded' => __( 'Rounded', 'social-pug' ), 'circle' => __( 'Circle', 'social-pug' ) ) ); ?>
51
-
52
- <?php dpsp_settings_field( 'switch', 'dpsp_location_content[display][icon_animation]', ( isset( $dpsp_location_content['display']['icon_animation']) ? $dpsp_location_content['display']['icon_animation'] : '' ), __( 'Show icon animation', 'social-pug' ), array('yes'), __( 'Will animate the social media icon when the user hovers over the button.', 'social-pug' ) ); ?>
53
-
54
- <?php dpsp_settings_field( 'select', 'dpsp_location_content[display][position]', ( isset($dpsp_location_content['display']['position']) ? $dpsp_location_content['display']['position'] : '' ), __( 'Buttons position', 'social-pug' ), array( 'top' => __( 'Above Content', 'social-pug' ), 'bottom' => __( 'Below Content', 'social-pug' ), 'both' => __( 'Above and Below', 'social-pug' ) ) ); ?>
55
-
56
- <?php dpsp_settings_field( 'select', 'dpsp_location_content[display][column_count]', ( isset($dpsp_location_content['display']['column_count']) ? $dpsp_location_content['display']['column_count'] : '' ), __( 'Number of columns', 'social-pug' ), array( 'auto' => __( 'Width Auto', 'social-pug' ), '1' => __( '1 column', 'social-pug' ), '2' => __( '2 columns', 'social-pug' ), '3' => __( '3 columns', 'social-pug' ), '4' => __( '4 columns', 'social-pug' ), '5' => __( '5 columns', 'social-pug' ), '6' => __( '6 columns', 'social-pug' ) ) ); ?>
57
-
58
- <?php dpsp_settings_field( 'text', 'dpsp_location_content[display][message]', ( isset( $dpsp_location_content['display']['message']) ? $dpsp_location_content['display']['message'] : 'Sharing is caring!' ), __( 'Share text', 'social-pug' ), '' ); ?>
59
-
60
- <?php dpsp_settings_field( 'switch', 'dpsp_location_content[display][show_labels]', ( isset( $dpsp_location_content['display']['show_labels']) ? $dpsp_location_content['display']['show_labels'] : '' ), __( 'Show button labels', 'social-pug' ), array('yes') ); ?>
61
-
62
- <?php dpsp_settings_field( 'switch', 'dpsp_location_content[display][spacing]', ( isset( $dpsp_location_content['display']['spacing']) ? $dpsp_location_content['display']['spacing'] : '' ), __( 'Button spacing', 'social-pug' ), array('yes') ); ?>
63
-
64
- <?php dpsp_settings_field( 'switch', 'dpsp_location_content[display][show_mobile]', ( isset( $dpsp_location_content['display']['show_mobile']) ? $dpsp_location_content['display']['show_mobile'] : '' ), __( 'Show on mobile', 'social-pug' ), array('yes') ); ?>
65
-
66
- <?php dpsp_settings_field( 'text', 'dpsp_location_content[display][screen_size]', ( isset( $dpsp_location_content['display']['screen_size']) ? $dpsp_location_content['display']['screen_size'] : '' ), __( 'Mobile screen width (pixels)', 'social-pug' ), '', __( 'For screen widths smaller than this value ( in pixels ) the buttons will be displayed on screen if the show on mobile option is checked.', 'social-pug' ) ); ?>
67
-
68
- </div>
69
-
70
- </div>
71
-
72
-
73
- <!-- Share Counts -->
74
- <div class="dpsp-card">
75
-
76
- <div class="dpsp-card-header">
77
- <?php _e( 'Buttons Share Counts', 'social-pug' ); ?>
78
- </div>
79
-
80
- <div class="dpsp-card-inner">
81
-
82
- <?php dpsp_settings_field( 'switch', 'dpsp_location_content[display][show_count]', ( isset( $dpsp_location_content['display']['show_count']) ? $dpsp_location_content['display']['show_count'] : '' ), __( 'Show share count', 'social-pug' ), array('yes'), __( 'Display the share count for each social network.', 'social-pug' ) ); ?>
83
-
84
- <?php dpsp_settings_field( 'switch', 'dpsp_location_content[display][show_count_total]', ( isset( $dpsp_location_content['display']['show_count_total']) ? $dpsp_location_content['display']['show_count_total'] : '' ), __( 'Show total share count', 'social-pug' ), array('yes'), __( 'Display the share count for all social networks.', 'social-pug' ) ); ?>
85
-
86
- <?php dpsp_settings_field( 'select', 'dpsp_location_content[display][total_count_position]', ( isset( $dpsp_location_content['display']['total_count_position'] ) ? $dpsp_location_content['display']['total_count_position'] : '' ), __( 'Total count position', 'social-pug' ), array( 'before' => __( 'Before Buttons', 'social-pug' ), 'after' => __( 'After Buttons', 'social-pug' ) ) ); ?>
87
-
88
- <?php dpsp_settings_field( 'switch', 'dpsp_location_content[display][count_round]', ( isset( $dpsp_location_content['display']['count_round']) ? $dpsp_location_content['display']['count_round'] : '' ), __( 'Share count round', 'social-pug' ), array('yes'), __( 'If the share count for each network is bigger than 1000 it will be rounded to one decimal ( eg. 1267 will show as 1.2k ). Applies to Total Share Counts as well.', 'social-pug' ) ); ?>
89
-
90
- </div>
91
-
92
- </div>
93
-
94
-
95
- <!-- Post Type Display Settings -->
96
- <div class="dpsp-card">
97
-
98
- <div class="dpsp-card-header">
99
- <?php _e( 'Post Type Display Settings', 'social-pug' ); ?>
100
- </div>
101
-
102
- <div class="dpsp-card-inner">
103
-
104
- <?php dpsp_settings_field( 'checkbox', 'dpsp_location_content[post_type_display][]', ( isset( $dpsp_location_content['post_type_display']) ? $dpsp_location_content['post_type_display'] : array() ), '', dpsp_get_post_types() ); ?>
105
-
106
- </div>
107
-
108
- </div>
109
-
110
-
111
- <!-- Save Changes Button -->
112
- <input type="hidden" name="action" value="update" />
113
- <p class="submit"><input type="submit" class="dpsp-button-primary" value="<?php _e( 'Save Changes' ); ?>" /></p>
114
-
115
- </div>
116
-
117
- </form>
118
- <?php do_action( 'dpsp_submenu_page_bottom' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/admin/views/view-submenu-page-debugger.php ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Get all system versions
5
+ *
6
+ */
7
+ global $wp_version;
8
+
9
+ $php_version = phpversion();
10
+ $curl_version = ( function_exists( 'curl_version' ) ? curl_version() : 'Not installed' );
11
+ $curl_version = ( is_array( $curl_version ) ? $curl_version['version'] : $curl_version );
12
+ $dpsp_version = DPSP_VERSION;
13
+
14
+ /**
15
+ * Get all plugins and active plugins
16
+ *
17
+ */
18
+ $plugins = get_plugins();
19
+ $active_plugins = [];
20
+
21
+ foreach ( $plugins as $key => $plugin ) {
22
+ if ( is_plugin_active( $key ) ) {
23
+ $active_plugins[ $key ]['Name'] = $plugin['Name'];
24
+ }
25
+ }
26
+
27
+ /**
28
+ * Get all Grow cron jobs
29
+ *
30
+ */
31
+ $cron_jobs = [];
32
+
33
+ if ( false !== wp_get_schedule( 'dpsp_cron_get_posts_networks_share_count' ) ) {
34
+ $cron_jobs[] = 'dpsp_cron_get_posts_networks_share_count';
35
+ }
36
+
37
+ if ( false !== wp_get_schedule( 'dpsp_cron_get_posts_networks_share_count', [ '2x_hourly' ] ) ) {
38
+ $cron_jobs[] = 'dpsp_cron_get_posts_networks_share_count - 2x_hourly';
39
+ }
40
+
41
+ if ( false !== wp_get_schedule( 'dpsp_cron_get_posts_networks_share_count', [ 'daily' ] ) ) {
42
+ $cron_jobs[] = 'dpsp_cron_get_posts_networks_share_count - daily';
43
+ }
44
+
45
+ if ( false !== wp_get_schedule( 'dpsp_cron_get_posts_networks_share_count', [ 'weekly' ] ) ) {
46
+ $cron_jobs[] = 'dpsp_cron_get_posts_networks_share_count - weekly';
47
+ }
48
+
49
+ /**
50
+ * Get serial check request response
51
+ *
52
+ */
53
+ if ( function_exists( 'dpsp_get_serial_key_request_response' ) ) {
54
+ $serial_response = dpsp_get_serial_key_request_response();
55
+ } else {
56
+ $serial_response = null;
57
+ }
58
+
59
+ if ( ! isset( $serial_response ) ) {
60
+ $serial_response = '';
61
+ }
62
+
63
+ $serial_status_db = Mediavine\Grow\Settings::get_setting( 'dpsp_product_serial_status', '' );
64
+
65
+ if ( function_exists( 'dpsp_get_serial_key_status' ) ) {
66
+ $serial_status_request = dpsp_get_serial_key_status();
67
+ }
68
+
69
+ if ( ! isset( $serial_status_request ) ) {
70
+ $serial_status_request = '';
71
+ }
72
+
73
+ ?>
74
+
75
+ <div class="dpsp-page-wrapper dpsp-page-content wrap">
76
+
77
+ <h1 class="dpsp-page-title"><?php echo __( 'System Status', 'social-pug' ); ?></h1>
78
+
79
+ <textarea readonly style="width: 100%; min-height: 600px;">
80
+ System Versions:
81
+ ---------------------------------------------------------------------------------------------------&#13;
82
+ PHP Version: <?php echo $php_version; ?> &#13;
83
+ cURL Version: <?php echo $curl_version; ?> &#13;
84
+ WP Version: <?php echo $wp_version; ?> &#13;
85
+ Grow Version: <?php echo $dpsp_version; ?> &#13;
86
+ &#13;
87
+ All Plugins:
88
+ ---------------------------------------------------------------------------------------------------&#13;
89
+ <?php
90
+ if ( ! empty( $plugins ) ) {
91
+ foreach ( $plugins as $key => $plugin ) {
92
+ echo esc_attr( $plugin['Name'] ) . ' (' . esc_attr( $key ) . ')' . '&#13;';
93
+ }
94
+ } else {
95
+ echo 'None' . '&#13;';
96
+ }
97
+ ?>
98
+ &#13;
99
+ Active Plugins:
100
+ ---------------------------------------------------------------------------------------------------&#13;
101
+ <?php
102
+ if ( ! empty( $active_plugins ) ) {
103
+ foreach ( $active_plugins as $key => $plugin ) {
104
+ echo esc_attr( $plugin['Name'] ) . ' (' . esc_attr( $key ) . ')' . '&#13;';
105
+ }
106
+ } else {
107
+ echo 'None' . '&#13;';
108
+ }
109
+
110
+ ?>
111
+ &#13;
112
+ Grow Cron Jobs:
113
+ ---------------------------------------------------------------------------------------------------&#13;
114
+ <?php
115
+ if ( ! empty( $cron_jobs ) ) {
116
+ foreach ( $cron_jobs as $cron_job ) {
117
+ echo $cron_job . '&#13;';
118
+ }
119
+ } else {
120
+ echo 'None' . '&#13;';
121
+ }
122
+ ?>
123
+ &#13;
124
+ Serial response:
125
+ ---------------------------------------------------------------------------------------------------&#13;
126
+ <?php echo esc_attr( $serial_response ); ?>
127
+ &#13;&#13;
128
+ Saved serial status:
129
+ ---------------------------------------------------------------------------------------------------&#13;
130
+ <?php echo esc_attr( $serial_status_db ); ?>
131
+ &#13;&#13;
132
+ Request serial status:
133
+ ---------------------------------------------------------------------------------------------------&#13;
134
+ <?php echo esc_attr( $serial_status_request ); ?>
135
+ </textarea>
136
+
137
+ </div>
inc/admin/views/view-submenu-page-extensions.php CHANGED
@@ -7,68 +7,68 @@
7
  <p><?php echo __( 'To gain immediate access to the tools below, <a href="https://marketplace.mediavine.com/grow-social-pro/" target="_blank">have a look at our pricing.</a>', 'social-pug' ); ?></p>
8
 
9
  <div class="dpsp-row dpsp-m-padding">
10
- <?php
11
  $tools = array();
12
 
13
  $tools['premium_networks'] = array(
14
  'name' => __( 'Social Networks Pack', 'social-pug' ),
15
- 'img' => 'assets/src/img/extension-networks.png',
16
  'desc' => __( 'Take advantage of all the social networks available.', 'social-pug' ),
17
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=social-networks-pack&amp;utm_campaign=social-pug#social-share-buttons'
18
  );
19
 
20
  $tools['share_mobile'] = array(
21
  'name' => __( 'Share Mobile Sticky', 'social-pug' ),
22
- 'img' => 'assets/src/img/tool-mobile.png',
23
  'desc' => __( 'Add a mobile sticky share footer to your posts and pages.', 'social-pug' ),
24
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=share-mobile-sticky&amp;utm_campaign=social-pug#share-mobile-sticky'
25
  );
26
 
27
  $tools['share_pop_up'] = array(
28
  'name' => __( 'Share Pop-Up', 'social-pug' ),
29
- 'img' => 'assets/src/img/tool-pop-up.png',
30
  'desc' => __( 'Add a simple share pop-up that has custom triggers.', 'social-pug' ),
31
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=share-pop-up&amp;utm_campaign=social-pug#share-pop-up'
32
  );
33
 
34
  $tools['share_image'] = array(
35
  'name' => __( 'Image Hover Pinterest Button', 'social-pug' ),
36
- 'img' => 'assets/src/img/tool-image-hover-pinterest.png',
37
  'desc' => __( 'Add a Pinterest button to your single posts images when a user hovers on them.', 'social-pug' ),
38
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=share-image&amp;utm_campaign=social-pug#share-pinterest-hover'
39
  );
40
 
41
  $tools['follow_widget'] = array(
42
  'name' => __( 'Follow Buttons Widget', 'social-pug' ),
43
- 'img' => 'assets/src/img/tool-follow-widget.png',
44
  'desc' => __( 'Link your social profiles with the help of the follow buttons.', 'social-pug' ),
45
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=follow-buttons-widget&amp;utm_campaign=social-pug#social-share-buttons'
46
  );
47
 
48
  $tools['click_to_tweet'] = array(
49
  'name' => __( 'Click to Tweet', 'social-pug' ),
50
- 'img' => 'assets/src/img/extension-ctt.png',
51
  'desc' => __( 'Add custom tweetable quotes anywhere in your content.', 'social-pug' ),
52
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=click-to-tweet&amp;utm_campaign=social-pug#sharable-quotes'
53
  );
54
 
55
  $tools['branch_shortening'] = array(
56
  'name' => __( 'Branch Integration', 'social-pug' ),
57
- 'img' => 'assets/src/img/extension-branch.png',
58
  'desc' => __( 'Shorten share links with the help of Branch.', 'social-pug' ),
59
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=share-branch&amp;utm_campaign=social-pug#share-bitly-ga'
60
  );
61
 
62
  $tools['bitly_shortening'] = array(
63
  'name' => __( 'Bitly Integration', 'social-pug' ),
64
- 'img' => 'assets/src/img/extension-bitly.png',
65
  'desc' => __( 'Shorten share links with the help of Bitly.', 'social-pug' ),
66
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=share-bitly&amp;utm_campaign=social-pug#share-bitly-ga'
67
  );
68
 
69
  $tools['ga_utm_tracking'] = array(
70
  'name' => __( 'Analytics UTM Tracking', 'social-pug' ),
71
- 'img' => 'assets/src/img/extension-ga-utm-tracking.png',
72
  'desc' => __( 'Track shared links with the help of the UTM parameters.', 'social-pug' ),
73
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=share-utm-tracking&amp;utm_campaign=social-pug#share-bitly-ga'
74
  );
@@ -79,16 +79,16 @@
79
  </div><!-- End of Share Tools -->
80
 
81
 
82
- <?php /*
83
  <h1 class="dpsp-page-title" style="margin-top: 25px;"><?php echo __( 'Recommended Plugins', 'social-pug' ); ?></h1>
84
 
85
  <div class="dpsp-row dpsp-m-padding">
86
- <?php
87
  $tools = array();
88
 
89
  $tools['premium_networks'] = array(
90
  'name' => __( 'SkyePress - Auto Post and Schedule to Social Media', 'social-pug' ),
91
- 'img' => 'assets/src/img/skyepress-social-pug-promo.png',
92
  'desc' => __( 'Auto Post to your Twitter, Facebook and LinkedIn profiles and much more...', 'social-pug' ),
93
  'url' => admin_url( 'admin.php?page=dpsp-extensions&sub-page=skyepress' )
94
  );
@@ -99,4 +99,4 @@
99
  </div><!-- End of Our Plugins -->
100
  */ ?>
101
 
102
- </div>
7
  <p><?php echo __( 'To gain immediate access to the tools below, <a href="https://marketplace.mediavine.com/grow-social-pro/" target="_blank">have a look at our pricing.</a>', 'social-pug' ); ?></p>
8
 
9
  <div class="dpsp-row dpsp-m-padding">
10
+ <?php
11
  $tools = array();
12
 
13
  $tools['premium_networks'] = array(
14
  'name' => __( 'Social Networks Pack', 'social-pug' ),
15
+ 'img' => 'assets/dist/extension-networks.' . DPSP_VERSION . '.png',
16
  'desc' => __( 'Take advantage of all the social networks available.', 'social-pug' ),
17
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=social-networks-pack&amp;utm_campaign=social-pug#social-share-buttons'
18
  );
19
 
20
  $tools['share_mobile'] = array(
21
  'name' => __( 'Share Mobile Sticky', 'social-pug' ),
22
+ 'img' => 'assets/dist/tool-mobile.' . DPSP_VERSION . '.png',
23
  'desc' => __( 'Add a mobile sticky share footer to your posts and pages.', 'social-pug' ),
24
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=share-mobile-sticky&amp;utm_campaign=social-pug#share-mobile-sticky'
25
  );
26
 
27
  $tools['share_pop_up'] = array(
28
  'name' => __( 'Share Pop-Up', 'social-pug' ),
29
+ 'img' => 'assets/dist/tool-pop-up.' . DPSP_VERSION . '.png',
30
  'desc' => __( 'Add a simple share pop-up that has custom triggers.', 'social-pug' ),
31
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=share-pop-up&amp;utm_campaign=social-pug#share-pop-up'
32
  );
33
 
34
  $tools['share_image'] = array(
35
  'name' => __( 'Image Hover Pinterest Button', 'social-pug' ),
36
+ 'img' => 'assets/dist/tool-image-hover-pinterest.' . DPSP_VERSION . '.png',
37
  'desc' => __( 'Add a Pinterest button to your single posts images when a user hovers on them.', 'social-pug' ),
38
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=share-image&amp;utm_campaign=social-pug#share-pinterest-hover'
39
  );
40
 
41
  $tools['follow_widget'] = array(
42
  'name' => __( 'Follow Buttons Widget', 'social-pug' ),
43
+ 'img' => 'assets/dist/tool-follow-widget.' . DPSP_VERSION . '.png',
44
  'desc' => __( 'Link your social profiles with the help of the follow buttons.', 'social-pug' ),
45
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=follow-buttons-widget&amp;utm_campaign=social-pug#social-share-buttons'
46
  );
47
 
48
  $tools['click_to_tweet'] = array(
49
  'name' => __( 'Click to Tweet', 'social-pug' ),
50
+ 'img' => 'assets/dist/extension-ctt.' . DPSP_VERSION . '.png',
51
  'desc' => __( 'Add custom tweetable quotes anywhere in your content.', 'social-pug' ),
52
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=click-to-tweet&amp;utm_campaign=social-pug#sharable-quotes'
53
  );
54
 
55
  $tools['branch_shortening'] = array(
56
  'name' => __( 'Branch Integration', 'social-pug' ),
57
+ 'img' => 'assets/dist/extension-branch.' . DPSP_VERSION . '.png',
58
  'desc' => __( 'Shorten share links with the help of Branch.', 'social-pug' ),
59
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=share-branch&amp;utm_campaign=social-pug#share-bitly-ga'
60
  );
61
 
62
  $tools['bitly_shortening'] = array(
63
  'name' => __( 'Bitly Integration', 'social-pug' ),
64
+ 'img' => 'assets/dist/extension-bitly.' . DPSP_VERSION . '.png',
65
  'desc' => __( 'Shorten share links with the help of Bitly.', 'social-pug' ),
66
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=share-bitly&amp;utm_campaign=social-pug#share-bitly-ga'
67
  );
68
 
69
  $tools['ga_utm_tracking'] = array(
70
  'name' => __( 'Analytics UTM Tracking', 'social-pug' ),
71
+ 'img' => 'assets/dist/extension-ga-utm-tracking.' . DPSP_VERSION . '.png',
72
  'desc' => __( 'Track shared links with the help of the UTM parameters.', 'social-pug' ),
73
  'url' => 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin-extensions&amp;utm_medium=share-utm-tracking&amp;utm_campaign=social-pug#share-bitly-ga'
74
  );
79
  </div><!-- End of Share Tools -->
80
 
81
 
82
+ <?php /*
83
  <h1 class="dpsp-page-title" style="margin-top: 25px;"><?php echo __( 'Recommended Plugins', 'social-pug' ); ?></h1>
84
 
85
  <div class="dpsp-row dpsp-m-padding">
86
+ <?php
87
  $tools = array();
88
 
89
  $tools['premium_networks'] = array(
90
  'name' => __( 'SkyePress - Auto Post and Schedule to Social Media', 'social-pug' ),
91
+ 'img' => 'assets/dist/skyepress-social-pug-promo.' . DPSP_VERSION . '.png',
92
  'desc' => __( 'Auto Post to your Twitter, Facebook and LinkedIn profiles and much more...', 'social-pug' ),
93
  'url' => admin_url( 'admin.php?page=dpsp-extensions&sub-page=skyepress' )
94
  );
99
  </div><!-- End of Our Plugins -->
100
  */ ?>
101
 
102
+ </div>
inc/admin/views/view-submenu-page-settings.php CHANGED
@@ -3,7 +3,7 @@
3
  <h1 class="dpsp-page-title"><?php echo __( 'Settings', 'social-pug' ); ?></h1>
4
 
5
  <form method="post" action="options.php">
6
-
7
  <?php
8
  $dpsp_settings = get_option( 'dpsp_settings', 'not_set' );
9
  settings_fields( 'dpsp_settings' );
@@ -22,7 +22,7 @@
22
 
23
  <?php dpsp_settings_field( 'text', 'dpsp_settings[twitter_username]', ( isset($dpsp_settings['twitter_username']) ? $dpsp_settings['twitter_username'] : '' ), __( 'Twitter Username', 'social-pug' ), '' ); ?>
24
  <?php dpsp_settings_field( 'switch', 'dpsp_settings[tweets_have_username]', ( isset( $dpsp_settings['tweets_have_username']) ? $dpsp_settings['tweets_have_username'] : '' ), __( 'Add Twitter Username to all tweets', 'social-pug' ), array('yes') ); ?>
25
-
26
  </div>
27
 
28
  </div>
@@ -40,7 +40,7 @@
40
 
41
  <div class="dpsp-setting-field-wrapper dpsp-setting-field-text dpsp-has-field-label dpsp-setting-field-facebook-authorize-app">
42
 
43
- <?php $facebook_access_token = get_transient( 'dpsp_facebook_access_token' ); ?>
44
 
45
  <?php if( ! empty( $facebook_access_token['access_token'] ) && ! empty( $facebook_access_token['expires_in'] ) ): ?>
46
 
@@ -89,4 +89,4 @@
89
  </form>
90
  </div>
91
 
92
- <?php do_action( 'dpsp_submenu_page_bottom' ); ?>
3
  <h1 class="dpsp-page-title"><?php echo __( 'Settings', 'social-pug' ); ?></h1>
4
 
5
  <form method="post" action="options.php">
6
+
7
  <?php
8
  $dpsp_settings = get_option( 'dpsp_settings', 'not_set' );
9
  settings_fields( 'dpsp_settings' );
22
 
23
  <?php dpsp_settings_field( 'text', 'dpsp_settings[twitter_username]', ( isset($dpsp_settings['twitter_username']) ? $dpsp_settings['twitter_username'] : '' ), __( 'Twitter Username', 'social-pug' ), '' ); ?>
24
  <?php dpsp_settings_field( 'switch', 'dpsp_settings[tweets_have_username]', ( isset( $dpsp_settings['tweets_have_username']) ? $dpsp_settings['tweets_have_username'] : '' ), __( 'Add Twitter Username to all tweets', 'social-pug' ), array('yes') ); ?>
25
+
26
  </div>
27
 
28
  </div>
40
 
41
  <div class="dpsp-setting-field-wrapper dpsp-setting-field-text dpsp-has-field-label dpsp-setting-field-facebook-authorize-app">
42
 
43
+ <?php $facebook_access_token = Mediavine\Grow\Settings::get_setting( 'dpsp_facebook_access_token' ); ?>
44
 
45
  <?php if( ! empty( $facebook_access_token['access_token'] ) && ! empty( $facebook_access_token['expires_in'] ) ): ?>
46
 
89
  </form>
90
  </div>
91
 
92
+ <?php do_action( 'dpsp_submenu_page_bottom' ); ?>
inc/admin/views/view-submenu-page-toolkit.php CHANGED
@@ -1,4 +1,4 @@
1
- <div class="dpsp-page-wrapper dpsp-page-toolkit wrap">
2
 
3
  <?php wp_nonce_field( 'dpsptkn', 'dpsptkn' ); ?>
4
 
@@ -6,14 +6,46 @@
6
  <h1 class="dpsp-page-title"><?php echo __( 'Social Share Tools', 'social-pug' ); ?></h1>
7
 
8
  <div class="dpsp-row dpsp-m-padding">
9
- <?php
10
- $tools = dpsp_get_tools('share_tool');
11
 
12
- foreach( $tools as $tool_slug => $tool )
13
  dpsp_output_tool_box( $tool_slug, $tool );
 
14
  ?>
15
  </div><!-- End of Share Tools -->
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  </div>
18
 
19
- <?php do_action( 'dpsp_submenu_page_bottom' ); ?>
1
+ <div class="dpsp-page-wrapper dpsp-page-toolkit wrap <?php echo Social_Pug::is_free() ? 'dpsp-page-free' : 'dpsp-page-pro' ?>">
2
 
3
  <?php wp_nonce_field( 'dpsptkn', 'dpsptkn' ); ?>
4
 
6
  <h1 class="dpsp-page-title"><?php echo __( 'Social Share Tools', 'social-pug' ); ?></h1>
7
 
8
  <div class="dpsp-row dpsp-m-padding">
9
+ <?php
10
+ $tools = dpsp_get_tools( 'share_tool' );
11
 
12
+ foreach ( $tools as $tool_slug => $tool ) {
13
  dpsp_output_tool_box( $tool_slug, $tool );
14
+ }
15
  ?>
16
  </div><!-- End of Share Tools -->
17
 
18
+ <?php do_action( 'dpsp_page_toolkit_after_share_tools' ); ?>
19
+
20
+ <!-- Follow Tools -->
21
+ <?php $tools = dpsp_get_tools( 'follow_tool' ); ?>
22
+ <?php if ( count( $tools ) ) : ?>
23
+ <h1 class="dpsp-page-title"><?php echo __( 'Social Follow Tools', 'social-pug' ); ?></h1>
24
+ <div class="dpsp-row dpsp-m-padding">
25
+ <?php
26
+ foreach ( $tools as $tool_slug => $tool ) {
27
+ dpsp_output_tool_box( $tool_slug, $tool );
28
+ }
29
+ ?>
30
+ </div><?php endif; ?><!-- End of Follow Tools -->
31
+
32
+ <?php do_action( 'dpsp_page_toolkit_after_follow_tools' ); ?>
33
+
34
+ <!-- Misc Tools -->
35
+ <?php $tools = dpsp_get_tools( 'misc_tool' ); ?>
36
+ <?php if ( count( $tools ) ) : ?>
37
+ <h1 class="dpsp-page-title"><?php echo __( 'Misc Tools', 'social-pug' ); ?></h1>
38
+
39
+ <div class="dpsp-row dpsp-m-padding">
40
+ <?php
41
+ foreach ( $tools as $tool_slug => $tool ) {
42
+ dpsp_output_tool_box( $tool_slug, $tool );
43
+ }
44
+ ?>
45
+ </div><?php endif; ?><!-- End of Misc Tools -->
46
+
47
+ <?php do_action( 'dpsp_page_toolkit_after_misc_tools' ); ?>
48
+
49
  </div>
50
 
51
+ <?php do_action( 'dpsp_submenu_page_bottom' ); ?>
inc/autoloader-pro.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/class-activation.php ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Mediavine\Grow;
4
+
5
+ if ( class_exists( '\Social_Pug' ) ) {
6
+ class Activation extends \Social_Pug {
7
+
8
+ private static $instance = null;
9
+
10
+ public static function get_instance() {
11
+ if ( null === self::$instance ) {
12
+ self::$instance = new self;
13
+ self::$instance->init();
14
+ }
15
+
16
+ return self::$instance;
17
+ }
18
+
19
+ public function init() {
20
+ add_action( 'update_option_dpsp_settings', [ $this, 'manage_grow_license' ], 10, 2 );
21
+ add_action( 'wp_loaded', [ $this, 'plugin_updated_check' ] );
22
+ add_action( 'mv_grow_plugin_updated', [ $this, 'relicense' ], 10 );
23
+ add_action( 'wp_loaded', [ $this, 'relicense_check' ] );
24
+
25
+ register_activation_hook( mv_grow_get_activation_path(), [ $this, 'plugin_activation' ] );
26
+ register_deactivation_hook( mv_grow_get_activation_path(), [ $this, 'plugin_deactivation' ] );
27
+ }
28
+
29
+ /**
30
+ * Runs hook at plugin activation.
31
+ *
32
+ * The update hook will run a bit later through its own hook.
33
+ *
34
+ * @return void
35
+ */
36
+ public function plugin_activation() {
37
+ do_action( 'mv_grow_plugin_activated' );
38
+ }
39
+
40
+ /**
41
+ * Runs hook at plugin update.
42
+ *
43
+ * This runs after all plugins are loaded so it can run after update. It also performs a
44
+ * check based on version number, just in case someone updates in a non-conventional way.
45
+ * After completing hooks, Grow version number is updated in the db.
46
+ *
47
+ * @return void
48
+ */
49
+ public function plugin_updated_check() {
50
+ // Only progress if version has changed
51
+ if ( get_option( 'mv_grow_version' ) === self::$VERSION ) {
52
+ return;
53
+ }
54
+
55
+ do_action( 'mv_grow_plugin_updated' );
56
+ update_option( 'mv_grow_version', self::$VERSION );
57
+ }
58
+
59
+ /**
60
+ * Runs hook at plugin deactivation.
61
+ *
62
+ * @return void
63
+ */
64
+ public function plugin_deactivation() {
65
+ do_action( 'mv_grow_plugin_deactivated' );
66
+ }
67
+
68
+ /**
69
+ * Checks to make sure there's a license, and runs relicense if not found
70
+ *
71
+ * @return void
72
+ */
73
+ public function relicense_check() {
74
+ if ( ! get_option( 'mv_grow_license' ) ) {
75
+ $this->relicense();
76
+ }
77
+ }
78
+
79
+ public function relicense() {
80
+ if ( get_transient( 'mv_grow_relicense_lockout' ) == 'LOCK' ) {
81
+ return;
82
+ }
83
+ set_transient( 'mv_grow_relicense_lockout', 'LOCK', 300 );
84
+ $settings = get_option( 'dpsp_settings', [] );
85
+ $grow_license = get_option( 'mv_grow_license', false );
86
+
87
+ // Remove serial key if it exists, we don't want it exposed
88
+ if ( empty( $settings['product_serial'] ) ) {
89
+ return;
90
+ }
91
+
92
+ if ( ! empty( $settings['mv_grow_license'] ) ) {
93
+ return;
94
+ }
95
+
96
+ $params = [
97
+ 'serial' => $settings['product_serial'],
98
+ 'url' => get_site_url(),
99
+ ];
100
+
101
+ $url_string = http_build_query( $params );
102
+ $response = wp_remote_get( 'https://marketplace.mediavine.com/wp-json/mv-edd/v1/convert?' . $url_string );
103
+
104
+ if ( ! is_array( $response ) || is_wp_error( $response ) ) {
105
+ return;
106
+ }
107
+ $headers = $response['headers']; // array of http header lines
108
+ $body = json_decode( $response['body'] ); // use the content
109
+ error_log( print_r( $body, true ) );
110
+ if ( ! $body ) {
111
+ error_log( 'No Body Response from Marketplace' );
112
+
113
+ return;
114
+ }
115
+ if ( isset( $body->data ) && $body->data->status === 401 ) {
116
+ error_log( 'Access to Marketplace REST API forbidden' );
117
+
118
+ return;
119
+ }
120
+ if ( ! isset( $body->license ) ) {
121
+ error_log( 'Response received but no license in response from Marketplace' );
122
+
123
+ return;
124
+ }
125
+ if ( ! isset( $body->license->license_key ) ) {
126
+ error_log( print_r( $body->license, true ) );
127
+ error_log( 'License in response but missing actual key.' );
128
+
129
+ return;
130
+ }
131
+ $settings['mv_grow_license'] = $body->license->license_key;
132
+ update_option( 'dpsp_settings', $settings );
133
+ update_option( 'mv_grow_license', $body->license->license_key );
134
+ $KernlUpdater = new \MV_GROW_PRO_PluginUpdateChecker_2_0(
135
+ 'https://kernl.us/api/v1/updates/5d9de9137dd3c26d2ebaad23/',
136
+ mv_grow_get_activation_path(),
137
+ 'social-pug',
138
+ 1,
139
+ 'Grow Social Pro by Mediavine',
140
+ 'external_updates-mv-grow'
141
+ );
142
+
143
+ $KernlUpdater->license = $body->license->license_key;
144
+ add_filter( 'puc_check_now-social-pug', '__return_true' );
145
+ $KernlUpdater->handleManualCheck();
146
+ }
147
+
148
+ function validate_license( $old_values, $new_values ) {
149
+ $grow_license = $new_values['mv_grow_license'];
150
+ update_option( 'mv_grow_license', $new_values['mv_grow_license'] );
151
+
152
+ $params = [
153
+ 'edd_action' => 'activate_license',
154
+ 'item_id' => '28',
155
+ 'license' => $grow_license,
156
+ 'url' => get_site_url(),
157
+ ];
158
+
159
+ $url_string = http_build_query( $params );
160
+ $result = wp_remote_get( 'https://marketplace.mediavine.com/?' . $url_string );
161
+
162
+ $KernlUpdater = new \MV_GROW_PRO_PluginUpdateChecker_2_0(
163
+ 'https://kernl.us/api/v1/updates/5d9de9137dd3c26d2ebaad23/',
164
+ mv_grow_get_activation_path(),
165
+ 'social-pug',
166
+ 1,
167
+ 'Grow Social Pro by Mediavine',
168
+ 'external_updates-mv-grow'
169
+ );
170
+ $KernlUpdater->license = $grow_license;
171
+ add_filter( 'puc_check_now-social-pug', '__return_true' );
172
+ $KernlUpdater->handleManualCheck();
173
+ }
174
+
175
+ function manage_grow_license( $old_values, $new_values ) {
176
+ $grow_license = null;
177
+ if (
178
+ isset( $new_values['mv_grow_license'] ) &&
179
+ ( $old_values['mv_grow_license'] !== $new_values['mv_grow_license'] )
180
+ ) {
181
+ $this->validate_license( $old_values, $new_values );
182
+ }
183
+ }
184
+ }
185
+ }
inc/class-asset-loader.php ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Mediavine\Grow;
3
+
4
+ if ( class_exists( 'Social_Pug' ) ) {
5
+
6
+ class Asset_Loader extends \Social_Pug {
7
+ private static $instance = null;
8
+
9
+ /**
10
+ * @var string $script_handle WordPress handle for front end js
11
+ */
12
+ public static $script_handle = 'dpsp-frontend-js-pro';
13
+
14
+ /**
15
+ * @var string $style_handle WordPress handle for front end css
16
+ */
17
+ public static $style_handle = 'dpsp-frontend-style-pro';
18
+
19
+ /**
20
+ * Get instance of Class
21
+ * @return Asset_Loader
22
+ */
23
+ public static function get_instance() {
24
+ if ( null === self::$instance ) {
25
+ self::$instance = new self();
26
+ self::$instance->init();
27
+ }
28
+
29
+ return self::$instance;
30
+ }
31
+
32
+ /**
33
+ * Set up hooks
34
+ */
35
+ public function init() {
36
+ add_filter( 'script_loader_tag', [ $this, 'add_async_attribute' ], 10, 2 );
37
+ add_filter( 'style_loader_tag', [ $this, 'add_async_styles' ], 10, 3 );
38
+ }
39
+
40
+ /**
41
+ * Add async attributes to Script tag
42
+ * @param $tag
43
+ * @param $handle
44
+ *
45
+ * @return string|string[]
46
+ */
47
+ public function add_async_attribute( $tag, $handle ) {
48
+ if ( substr( $handle, 0, strlen( self::$script_handle ) ) === self::$script_handle ) {
49
+ $tag = str_replace( ' src', ' async data-noptimize src', $tag );
50
+ }
51
+
52
+ return $tag;
53
+ }
54
+
55
+ /**
56
+ * Adds async when we aren't sure if styles are needed
57
+ *
58
+ * @param string $tag script tag to be outputted
59
+ * @param string $handle enqueue handle
60
+ * @param string $href Value for tag
61
+ *
62
+ * @return string script tag to be outputted
63
+ */
64
+ public static function add_async_styles( $tag, $handle, $href ) {
65
+ if ( self::will_style() ) {
66
+ return $tag;
67
+ }
68
+ $prefix = self::$style_handle;
69
+ if ( substr( $handle, 0, strlen( $prefix ) ) === $prefix ) {
70
+ $tag = '<link rel="preload" class="mv-grow-style" href="' . $href . '" as="style">' .
71
+ "<noscript>$tag</noscript>";
72
+ }
73
+
74
+ return $tag;
75
+ }
76
+
77
+
78
+ /**
79
+ * Register the Scripts and Styles that will run in the front end
80
+ */
81
+ public static function register_front_end_scripts() {
82
+
83
+ // Development mode activated via filter
84
+ $IS_DEVELOPMENT = apply_filters( 'mv_grow_dev_mode', false );
85
+
86
+ $settings = Settings::get_setting( 'dpsp_settings' );
87
+
88
+ $is_free = \Social_Pug::is_free();
89
+
90
+ $script_filename = $is_free ? 'front-end-free' : 'front-end-pro';
91
+
92
+ if ( $IS_DEVELOPMENT ) {
93
+ if ( isset( $settings['legacy_javascript'] ) && $settings['legacy_javascript'] ) {
94
+ wp_register_style( self::$style_handle, self::$PLUGIN_DIR . 'assets/dist/dev-entry-jquery.css', [], self::$VERSION );
95
+ wp_register_script( self::$script_handle, self::$PLUGIN_DIR . 'assets/dist/dev-entry-jquery.js', [ 'jquery' ], self::$VERSION, true );
96
+ } else {
97
+ wp_register_style( self::$style_handle, self::$PLUGIN_DIR . 'assets/dist/dev-entry.css', [], self::$VERSION );
98
+ wp_register_script( self::$script_handle, self::$PLUGIN_DIR . 'assets/dist/dev-entry.js', [], self::$VERSION, true );
99
+ }
100
+ } else {
101
+ if ( isset( $settings['legacy_javascript'] ) && $settings['legacy_javascript'] && ! $is_free ) {
102
+ wp_register_style( self::$style_handle, self::$PLUGIN_DIR . 'assets/dist/style-frontend-pro-jquery.' . self::$VERSION . '.css', [], self::$VERSION );
103
+ wp_register_script( self::$script_handle, self::$PLUGIN_DIR . 'assets/dist/front-end-pro-jquery.' . self::$VERSION . '.js', [ 'jquery' ], self::$VERSION, true );
104
+ } else {
105
+ wp_register_style( self::$style_handle, self::$PLUGIN_DIR . 'assets/dist/style-frontend-pro.' . self::$VERSION . '.css', [], self::$VERSION );
106
+ wp_register_script( self::$script_handle, self::$PLUGIN_DIR . 'assets/dist/' . $script_filename . '.' . self::$VERSION . '.js', [], self::$VERSION, true );
107
+ }
108
+ }
109
+
110
+ }
111
+
112
+ /**
113
+ * Enqueue Style and Script
114
+ */
115
+ public static function enqueue_scripts() {
116
+ do_action( 'dpsp_pre_enqueue_frontend_scripts' );
117
+ wp_enqueue_style( self::$style_handle );
118
+ wp_enqueue_script( self::$script_handle );
119
+ do_action( 'dpsp_post_enqueue_frontend_scripts' );
120
+ }
121
+
122
+ /**
123
+ * Determine if Styles are definitely needed, or defer that decision later on
124
+ * @return bool
125
+ */
126
+ public static function will_style() {
127
+ $should_load = false;
128
+ // Always load if on admin
129
+ if ( is_admin() ) {
130
+ $should_load = true;
131
+ }
132
+ $active_tools = dpsp_get_active_tools();
133
+ $single_only_tools = [
134
+ 'share_content',
135
+ 'share_sidebar',
136
+ 'share_images',
137
+ 'share_sticky_bar',
138
+ 'share_pop_up',
139
+ ];
140
+ $widget_tools = [ 'follow_widget' ];
141
+ if ( is_singular() ) {
142
+ $should_load = $should_load ? true : count( array_intersect( $single_only_tools, $active_tools ) ) > 0;
143
+ }
144
+ foreach ( $widget_tools as $tool ) {
145
+ if ( in_array( $tool, $active_tools ) ) {
146
+ $should_load = true;
147
+ }
148
+ }
149
+ return apply_filters( 'mv_grow_styles_should_enqueue', $should_load );
150
+ }
151
+
152
+ /**
153
+ * Dequeue Scripts if not needed
154
+ */
155
+ public static function maybe_dequeue() {
156
+ $should_load = false;
157
+ $active_tools = dpsp_get_active_tools();
158
+ $single_only_tools = [
159
+ 'share_content',
160
+ 'share_sidebar',
161
+ 'share_images',
162
+ 'share_sticky_bar',
163
+ 'share_pop_up',
164
+ ];
165
+ if ( is_singular() ) {
166
+ $should_load = $should_load ? true : count( array_intersect( $single_only_tools, $active_tools ) ) > 0;
167
+ }
168
+ $should_load = apply_filters( 'mv_grow_scripts_should_enqueue', $should_load );
169
+ if ( ! $should_load ) {
170
+ wp_dequeue_script( self::$script_handle );
171
+ }
172
+ }
173
+ }
174
+
175
+ }
inc/class-buttons-outputter.php ADDED
@@ -0,0 +1,487 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Class that handles the output of the social button list items and unordered
5
+ * list wrapper
6
+ *
7
+ */
8
+
9
+ class DPSP_Network_Buttons_Outputter {
10
+
11
+ private static $button_defaults = [
12
+ 'tag' => 'a',
13
+ 'rel' => '',
14
+ 'network_slug' => '',
15
+ 'href_attribute' => '',
16
+ 'button_classes' => '',
17
+ 'icon_svg' => '',
18
+ 'title_attribute' => '',
19
+ 'location' => '',
20
+ 'action' => 'share',
21
+ 'network_label' => '',
22
+ 'network_shares' => 0,
23
+ 'show_labels' => true,
24
+ 'show_share_counts' => true,
25
+ ];
26
+
27
+ /**
28
+ * Return the output for a button location
29
+ *
30
+ * @param {Array[]} $settings Array of settings for this location
31
+ * @param {string} $action The action these buttons will be used for, either share or follow
32
+ * @param {string} $location The location slug where these buttons will be output
33
+ * @param {Array[]} $data Other data about how these buttons should be output
34
+ *
35
+ * @return string
36
+ */
37
+ public static function get_render( $settings = [], $action = '', $location = '', $data = [] ) {
38
+ $data['settings'] = apply_filters( 'dpsp_network_buttons_outputter_settings', $settings, $action, $location );
39
+ $data['action'] = $action;
40
+ $data['location'] = $location;
41
+ if ( empty( $data['settings']['networks'] ) ) {
42
+ return '';
43
+ }
44
+ $data['post_details'] = self::get_post_details( $data );
45
+ // Start concatenating the output
46
+ $output = '<ul class="' . self::make_wrapper_classes( $data['settings'], $data['action'], $data['location'] ) . '">';
47
+
48
+ // Array position for css classes, start off with first
49
+ $array_position = [ 'first' ];
50
+ // Loop through each network and create the button
51
+ end( $data['settings']['networks'] );
52
+ $last_key = key( $data['settings']['networks'] );
53
+ foreach ( $data['settings']['networks'] as $network_slug => $network ) {
54
+ // Check if we are at the last position to for the css class
55
+ if ( $last_key === $network_slug ) {
56
+ $array_position[] = 'last';
57
+ }
58
+ $output .= self::single_button_html( self::single_button_data( $data, $network_slug, $network, $array_position ) );
59
+ // Set position to false after first iteration
60
+ $array_position = [];
61
+ }
62
+
63
+ $output .= '</ul>';
64
+
65
+ return $output;
66
+ }
67
+
68
+ /**
69
+ * Collects general data about the current post
70
+ * @param array $data Data about the current call for buttons
71
+ *
72
+ * @return array $post_details
73
+ */
74
+ public static function get_post_details( $data ) {
75
+ if ( is_admin() ) {
76
+ return [];
77
+ }
78
+ // Set networks shares and post details
79
+ $post_obj = dpsp_get_current_post();
80
+ $post_details = [];
81
+ // Get post url and title
82
+
83
+ if ( empty( $data['shortcode_url'] ) ) {
84
+ $post_details['post_id'] = $post_obj->ID;
85
+ $post_details['post_url'] = dpsp_get_post_url( $post_obj->ID );
86
+ $post_details['post_title'] = dpsp_get_post_title( $post_obj->ID );
87
+ $post_details['post_description'] = dpsp_get_post_description( $post_obj->ID );
88
+ $post_details['post_featured_image_url'] = get_the_post_thumbnail_url( $post_obj, 'full' );
89
+
90
+ // If a shortcode URL is provided we don't use the post's data
91
+ } else {
92
+ $post_details['post_url'] = $data['shortcode_url'];
93
+ $post_details['post_title'] = ( ! empty( $data['shortcode_desc'] ) ? $data['shortcode_desc'] : '' );
94
+ }
95
+
96
+ // Get custom sharable content ( custom tweet, pinterest image and pinterest description )
97
+ $share_options = dpsp_maybe_unserialize( get_post_meta( $post_obj->ID, 'dpsp_share_options', true ) );
98
+
99
+ if ( ! empty( $share_options['custom_tweet'] ) ) {
100
+ $post_details['custom_tweet'] = $share_options['custom_tweet'];
101
+ }
102
+
103
+ if ( ! empty( $share_options['custom_image_pinterest']['src'] ) ) {
104
+ $post_details['post_custom_image_pinterest'] = rawurlencode( esc_url( $share_options['custom_image_pinterest']['src'] ) );
105
+ }
106
+
107
+ // Get networks share count for this post
108
+ if ( $post_obj ) {
109
+ $networks_shares = apply_filters( 'dpsp_get_output_post_shares_counts', dpsp_get_post_share_counts( $post_obj->ID ), $data['location'] );
110
+ }
111
+
112
+ $post_details['networks_shares'] = ( ! empty( $networks_shares ) ? $networks_shares : [] );
113
+
114
+ return $post_details;
115
+
116
+ }
117
+
118
+ /**
119
+ * Generate the wrapper class string
120
+ *
121
+ * @param array $settings settings for this location
122
+ * @param string $action string representing the action, either share or follow
123
+ * @param string $location string representing the location
124
+ *
125
+ * @return string of classes for wrapper
126
+ */
127
+ private static function make_wrapper_classes( $settings, $action, $location ) {
128
+ $wrapper_classes = [];
129
+ $wrapper_classes[] = 'dpsp-networks-btns-wrapper';
130
+ $wrapper_classes[] = 'dpsp-networks-btns-' . esc_attr( $action );
131
+ if ( ! empty( $location ) ) {
132
+ $wrapper_classes[] = 'dpsp-networks-btns-' . str_replace( '_', '-', $location );
133
+ }
134
+ $wrapper_classes[] = ( isset( $settings['display']['column_count'] ) ? 'dpsp-column-' . $settings['display']['column_count'] : '' );
135
+ $wrapper_classes[] = ( isset( $settings['display']['icon_animation'] ) ? 'dpsp-has-button-icon-animation' : '' );
136
+
137
+ return implode( ' ', $wrapper_classes );
138
+ }
139
+
140
+
141
+ /**
142
+ * Generate the string html output of a single button
143
+ *
144
+ * @param array $button_data
145
+ *
146
+ * @return string
147
+ * @see self::single_button_data
148
+ *
149
+ */
150
+ public static function single_button_html( $button_data ) {
151
+ // Merge data with defaults
152
+ $button_data = array_merge( self::$button_defaults, $button_data );
153
+ $output = sprintf(
154
+ '
155
+ <li>
156
+ <%1$s rel="%2$s" %3$s class="%4$s" target="_blank" aria-label="%5$s" title="%5$s">
157
+ <span class="dpsp-network-icon">
158
+ <span class="dpsp-network-icon-inner">%6$s</span>
159
+ </span>
160
+ %7$s
161
+ %8$s
162
+ </%1$s>
163
+ %9$s
164
+ </li>
165
+ ',
166
+ $button_data['tag'], // The block html element to use, either <a> or <button>
167
+ $button_data['rel'], // The rel attribute for the element
168
+ $button_data['href_attribute'], // The href attribute for the element, either href or data-href
169
+ $button_data['button_classes'], // A list of classes ( should be a space separated string)
170
+ $button_data['title_attribute'], // Text to use for the title attribute, also applied to aria-label to cover more assistive tech
171
+ $button_data['icon_svg'], // A string of the svg element representing the icon
172
+ $button_data['show_labels'] && 'sidebar' != $button_data['location'] ? self::make_label( $button_data['network_label'] ) : '', // A string representing an html span for the label, inside the block for everything except Floating sidebar
173
+ $button_data['show_share_counts'] ? self::make_count( $button_data['network_shares'] ) : '', // A string representing an html span with the count inside
174
+ $button_data['show_labels'] && 'sidebar' == $button_data['location'] ? self::make_label( $button_data['network_label'] ) : '' // Only for floating sidebar, A string representing an html span for the label
175
+ );
176
+
177
+ // Filter the output
178
+ return apply_filters( 'dpsp_get_button_output', $output, $button_data['network_slug'], $button_data['action'], $button_data['location'] );
179
+ }
180
+
181
+ /**
182
+ * Generate a html span string for the network label
183
+ *
184
+ * @param {string} $label Network Label
185
+ *
186
+ * @return string
187
+ */
188
+ private static function make_label( $label ) {
189
+ return '<span class="dpsp-network-label">' . $label . '</span>';
190
+ }
191
+
192
+ /**
193
+ * Generate a html span string for the network share count
194
+ *
195
+ * @param $network_shares
196
+ *
197
+ * @return string
198
+ */
199
+ private static function make_count( $network_shares ) {
200
+ return '<span class="dpsp-network-count">' . $network_shares . '</span>';
201
+ }
202
+
203
+ /**
204
+ * Returns an array of data that contains all information for button output
205
+ *
206
+ * @param {Array[]} $data Data about how button should be output
207
+ * @param {string} $network_slug Slug of network
208
+ * @param {Array[]} $network Associative array of network data
209
+ * @param {Array} $array_position An array of string identifiers for css classes to indicate the position
210
+ *
211
+ * @return array
212
+ */
213
+ private static function single_button_data( $data, $network_slug, $network, $array_position ) {
214
+ $button_data = [
215
+ 'network_slug' => $network_slug,
216
+ 'icon_svg' => dpsp_get_svg_icon_output( $network_slug ),
217
+ 'title_attribute' => esc_attr( 'share' === $data['action'] ? self::get_share_link_title_attribute( $network_slug, $network['label'] ) : self::get_follow_link_title_attribute( $network_slug, $network['label'] ) ),
218
+ 'network_label' => esc_attr( $network['label'] ),
219
+ 'network_shares' => ! empty( $data['post_details']['networks_shares'] ) ? self::get_network_shares( $network_slug, $data['post_details']['networks_shares'], $data['location'] ) : 0,
220
+ 'location' => $data['location'],
221
+ 'action' => $data['action'],
222
+ ];
223
+
224
+ $button_data['show_share_counts'] = self::should_count_show( $data['settings'], $network_slug, $button_data['network_shares'] );
225
+ $button_data['show_labels'] = self::should_label_show( $data['settings'] );
226
+
227
+ // Get the link of the button
228
+ $network_share_link = 'share' === $data['action'] ? self::get_button_share_link( $network_slug, $data ) : self::get_button_follow_link( $network_slug );
229
+
230
+ // Set button classes
231
+ $button_data['button_classes'] = [ 'dpsp-network-btn' ];
232
+ $button_data['button_classes'][] = ( isset( $network_slug ) ? 'dpsp-' . $network_slug : '' );
233
+ $button_data['button_classes'][] = ( ( empty( $network['label'] ) || ! isset( $data['settings']['display']['show_labels'] ) ) && ( ! in_array( $network_slug, dpsp_get_networks_with_social_count() ) || ! $button_data['show_share_counts'] ) ? 'dpsp-no-label' : '' );
234
+ $button_data['button_classes'][] = ( $button_data['show_share_counts'] ? 'dpsp-has-count' : '' );
235
+ foreach ( $array_position as $position ) {
236
+ $button_data['button_classes'][] = 'dpsp-' . $position;
237
+ }
238
+ $button_data['button_classes'][] = $button_data['show_labels'] ? 'dpsp-has-label' : '';
239
+
240
+ // Filter the button classes
241
+ $button_data['button_classes'] = apply_filters( 'dpsp_button_classes', $button_data['button_classes'], $data['location'], $button_data['network_shares'] );
242
+ $button_data['button_classes'] = esc_attr( implode( ' ', array_filter( $button_data['button_classes'] ) ) );
243
+
244
+ // Load pinterest as a button when no href value is used
245
+ if ( 'pinterest' == $network_slug && 'share' == $data['action'] ) {
246
+ $button_data['tag'] = 'button';
247
+ $button_data['href_attribute'] = 'data-href="' . $network_share_link . '"';
248
+ } else {
249
+ $button_data['tag'] = 'a';
250
+ $button_data['href_attribute'] = 'href="' . $network_share_link . '"';
251
+ }
252
+
253
+ /**
254
+ * Filter the "rel" attribute before adding it
255
+ *
256
+ * @param array $rel
257
+ *
258
+ */
259
+ $button_data['rel'] = esc_attr( implode( ' ', apply_filters( 'dpsp_network_button_attribute_rel', [ 'nofollow', 'noopener' ] ) ) );
260
+
261
+ return $button_data;
262
+ }
263
+
264
+ /**
265
+ * Returns the value that should be populated in the link's "title" attribute,
266
+ * based on the provided network
267
+ *
268
+ * @param string $network_slug
269
+ * @param string $network_label
270
+ *
271
+ * @return string
272
+ *
273
+ */
274
+ private static function get_share_link_title_attribute( $network_slug, $network_label ) {
275
+
276
+ $title = sprintf( __( 'Share on %s', 'social-pug' ), $network_label );
277
+
278
+ if ( 'pinterest' == $network_slug ) {
279
+ $title = __( 'Save to Pinterest', 'social-pug' );
280
+ }
281
+
282
+ if ( 'email' == $network_slug ) {
283
+ $title = __( 'Send over email', 'social-pug' );
284
+ }
285
+
286
+ if ( 'print' == $network_slug ) {
287
+ $title = __( 'Print this webpage', 'social-pug' );
288
+ }
289
+
290
+ /**
291
+ * Filter the title before returning it
292
+ *
293
+ * @param string $title
294
+ * @param string $network_slug
295
+ *
296
+ */
297
+ $title = apply_filters( 'dpsp_link_title_attribute', $title, $network_slug );
298
+
299
+ return $title;
300
+ }
301
+
302
+ /**
303
+ * Returns the value that should be populated in the link's "title" attribute,
304
+ * based on the provided network
305
+ *
306
+ * @param string $network_slug
307
+ * @param string $network_label
308
+ *
309
+ * @return string
310
+ *
311
+ */
312
+ private static function get_follow_link_title_attribute( $network_slug, $network_label ) {
313
+
314
+ $title = sprintf( __( 'Follow on %s', 'social-pug' ), $network_label );
315
+
316
+ $title = apply_filters( 'dpsp_link_title_attribute', $title, $network_slug );
317
+
318
+ return $title;
319
+ }
320
+
321
+ /**
322
+ * Get the network shares for a given network
323
+ *
324
+ * @param {string} $network_slug Machine readable name of network
325
+ * @param {number[]} $networks_shares Array representing share counts from various networks
326
+ * @param {string} $location Location where these buttons are being output
327
+ *
328
+ * @return number|string Number or String (in the case of rounded counts) that represents the count that will be displayed on the front end
329
+ */
330
+ private static function get_network_shares( $network_slug, $networks_shares, $location ) {
331
+ $network_shares = ( isset( $networks_shares[ $network_slug ] ) ? $networks_shares[ $network_slug ] : 0 );
332
+
333
+ return apply_filters( 'dpsp_get_output_post_network_share_count', $network_shares, $location );
334
+ }
335
+
336
+ /**
337
+ * Determine if the share count should be output for a given button
338
+ *
339
+ * @param {Array} $settings Array of settings for this location
340
+ * @param {string} $network_slug
341
+ * @param {number} $network_shares
342
+ *
343
+ * @return bool
344
+ */
345
+ private static function should_count_show( $settings, $network_slug, $network_shares ) {
346
+ if ( ! isset( $settings['display']['show_count'] ) ) {
347
+ // Settings are not set for showing count
348
+ return false;
349
+ }
350
+ if ( ! in_array( $network_slug, dpsp_get_networks_with_social_count() ) ) {
351
+ // Network doesn't support share counts
352
+ return false;
353
+ }
354
+ if ( ! ( 0 < intval( $network_shares ) ) ) {
355
+ //Shares are not more than zero
356
+ return false;
357
+ }
358
+ if ( ! empty( $settings['display']['minimum_count'] ) && $settings['display']['minimum_count'] > dpsp_get_post_total_share_count() ) {
359
+ // Minimum global count is set, and there are not enough shares
360
+ return false;
361
+ }
362
+ if ( ! empty( $settings['display']['minimum_individual_count'] ) && $settings['display']['minimum_individual_count'] > $network_shares ) {
363
+ // Minimum individual count is set, and there are not enough shares
364
+ return false;
365
+ }
366
+
367
+ return true;
368
+ }
369
+
370
+ /**
371
+ * Determine if the label for a button should show
372
+ *
373
+ * @param {Array} $settings Array of settings for this location
374
+ *
375
+ * @return bool
376
+ */
377
+ private static function should_label_show( $settings ) {
378
+ return isset( $settings['display']['show_labels'] );
379
+ }
380
+
381
+ /**
382
+ * Get the url string that a button or link will point to
383
+ *
384
+ * @param {string} $network_slug Machine readable name of the network
385
+ * @param {Array} $data Data bout the post and button output
386
+ *
387
+ * @return string
388
+ */
389
+ private static function get_button_share_link( $network_slug, $data ) {
390
+ if ( is_admin() ) {
391
+ // Don't generate real link for admin pages
392
+ return dpsp_get_network_share_link( $network_slug, '#', '', '' );
393
+ }
394
+
395
+ $post_image = null;
396
+ $post_title = sanitize_text_field( $data['post_details']['post_title'] );
397
+ $post_description = sanitize_text_field( $data['post_details']['post_description'] );
398
+
399
+ // Replace post title with custom tweet for Twitter
400
+ if ( 'twitter' == $network_slug && ! empty( $data['post_details']['custom_tweet'] ) ) {
401
+ $post_title = $data['post_details']['custom_tweet'];
402
+ } elseif ( 'pinterest' == $network_slug ) {
403
+ // Replace post title with custom pinterest description
404
+ // and post image with custom image for Pinterest
405
+ $pinterest_custom_description = self::get_post_custom_description_pinterest();
406
+ if ( ! empty( $pinterest_custom_description ) ) {
407
+ $post_title = $pinterest_custom_description;
408
+ }
409
+
410
+ if ( ! empty( $data['post_details']['post_custom_image_pinterest'] ) ) {
411
+ $post_image = $data['post_details']['post_custom_image_pinterest'];
412
+ }
413
+ } elseif ( 'yummly' == $network_slug ) {
414
+ $post_image = $data['post_details']['post_featured_image_url'];
415
+ }
416
+
417
+ // Filter values before getting the share links
418
+ $post_url = apply_filters( 'dpsp_get_button_share_link_url', $data['post_details']['post_url'], $data['post_details']['post_id'], $network_slug, $data['location'] );
419
+ $post_title = apply_filters( 'dpsp_get_button_share_link_title', $post_title, $data['post_details']['post_id'], $network_slug, $data['location'] );
420
+ $post_description = apply_filters( 'dpsp_get_button_share_link_description', $post_description, $data['post_details']['post_id'], $network_slug, $data['location'] );
421
+ $post_image = apply_filters( 'dpsp_get_button_share_link_image', $post_image, $data['post_details']['post_id'], $network_slug, $data['location'] );
422
+ return dpsp_get_network_share_link( $network_slug, $post_url, $post_title, $post_description, $post_image );
423
+
424
+ }
425
+
426
+ /**
427
+ * Returns the Pinterest description for the post
428
+ *
429
+ * @return string
430
+ *
431
+ */
432
+ private static function get_post_custom_description_pinterest() {
433
+
434
+ $pinterest_description = '';
435
+
436
+ $post_obj = dpsp_get_current_post();
437
+ $share_options = dpsp_maybe_unserialize( get_post_meta( $post_obj->ID, 'dpsp_share_options', true ) );
438
+
439
+ // Set the custom Pinterest description of the post if it exists
440
+ if ( ! empty( $share_options['custom_description_pinterest'] ) ) {
441
+ $pinterest_description = $share_options['custom_description_pinterest'];
442
+ } elseif ( ! empty( $share_options['custom_image_pinterest']['id'] ) ) {
443
+ // If it doesn't, check to see if a Pinterest image is set for the post,
444
+ // if it is grab the Pinterest description from the image
445
+
446
+ $image_id = absint( $share_options['custom_image_pinterest']['id'] );
447
+
448
+ $image_pin_description = get_post_meta( $image_id, 'pin_description', true );
449
+
450
+ // If the Pin description is set for the image, set it
451
+ if ( ! empty( $image_pin_description ) ) {
452
+ $pinterest_description = $image_pin_description;
453
+ } else {
454
+ // If not, check for the value from the Pin Description Source settings
455
+
456
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_pinterest_share_images_setting', [] );
457
+
458
+ $pin_source = ( ! empty( $settings['share_image_pin_description_source'] ) ? $settings['share_image_pin_description_source'] : 'image_alt_tag' );
459
+
460
+ // Get the alt text
461
+ if ( 'image_alt_tag' == $pin_source ) {
462
+ $pinterest_description = get_post_meta( $image_id, '_wp_attachment_image_alt', true );
463
+ }
464
+
465
+ // Get the title text
466
+ if ( 'image_title' == $pin_source ) {
467
+ $pinterest_description = get_the_title( $image_id );
468
+ }
469
+ }
470
+ }
471
+
472
+ return $pinterest_description;
473
+
474
+ }
475
+
476
+ /**
477
+ * Get the url string that a follow link will point to
478
+ *
479
+ * @param {string} $network_slug Machine readable name of the network
480
+ *
481
+ * @return string
482
+ */
483
+ private static function get_button_follow_link( $network_slug ) {
484
+ // @TODO: Bring this function into this class?
485
+ return dpsp_get_network_follow_link( $network_slug );
486
+ }
487
+ }
inc/class-color-utilities.php ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Mediavine\Grow;
4
+
5
+ if ( class_exists( 'Social_Pug' ) ) {
6
+
7
+ /**
8
+ * Class Color_Utilities
9
+ * @package Mediavine\Grow
10
+ */
11
+ class Color_Utilities extends \Social_Pug {
12
+ private static $instance = null;
13
+
14
+ public static function get_instance() {
15
+ if ( null === self::$instance ) {
16
+ self::$instance = new self();
17
+ self::$instance->init();
18
+ }
19
+
20
+ return self::$instance;
21
+ }
22
+
23
+ /**
24
+ * Init function in case it is needed in the future
25
+ */
26
+ public function init() {
27
+ }
28
+
29
+ /**
30
+ * @param $hex string Hexadecimal value to convert to rgb component array
31
+ *
32
+ * @return array rgb component array
33
+ */
34
+ public static function hex_to_rgb( $hex ) {
35
+ $hex = ltrim( $hex, '#' );
36
+ if ( strlen( $hex ) === 3 ) {
37
+ $hex_component = str_split( $hex );
38
+ } else {
39
+ $hex_component = [
40
+ $hex[0] . $hex[1],
41
+ $hex[2] . $hex[3],
42
+ $hex[4] . $hex[5],
43
+ ];
44
+ }
45
+ $rgb_component = [];
46
+ foreach ( $hex_component as $component ) {
47
+ $rgb_component[] = hexdec( $component );
48
+ }
49
+
50
+ return $rgb_component;
51
+ }
52
+
53
+ /**
54
+ * Convert an RGB component array into a hexadecimal string ready for css
55
+ *
56
+ * @param array $color Array of decimal values representing an RGB color
57
+ *
58
+ * @return string Representation of a color as a hexadecimal string ready to be used in css strings
59
+ */
60
+ public static function rgb_to_hex( $color ) {
61
+ // Join converted components together to create color string
62
+ return '#' . implode( '', array_map( function ( $component ) {
63
+ // Convert Decimal value to a hex string then make sure it has two characters
64
+ return str_pad( strval( dechex( $component ) ), 2, '0', STR_PAD_LEFT );
65
+ }, $color ) );
66
+ }
67
+
68
+ /**
69
+ * Determine if a given color is light
70
+ * @link https://www.w3.org/TR/AERT/#color-contrast for reference on the luminance constants for RGB values
71
+ *
72
+ * @param $color array|string Color to check against, it will be converted to component array format if it is not already in that format
73
+ *
74
+ * @return bool
75
+ */
76
+ public static function is_light( $color ) {
77
+ $color = self::convert_color( $color );
78
+ // Apply constants for perceived brightness against RGB values for sRGB color space, add together, then reduce to a value between 0 and 1 to compare against.
79
+ $luminance = ( 0.299 * $color[0] + 0.587 * $color[1] + 0.114 * $color[2] ) / 255;
80
+
81
+ return $luminance > 0.5;
82
+ }
83
+
84
+ /**
85
+ * Determine if a given color is considered dark
86
+ *
87
+ * @param $color
88
+ *
89
+ * @return bool
90
+ */
91
+ public static function is_dark( $color ) {
92
+ return ! self::is_light( $color );
93
+ }
94
+
95
+ /**
96
+ * If a color passed in needs to be converted to a component array format, do so, otherwise
97
+ * return the color passed in.
98
+ *
99
+ * @param $color array|string the color to be converted
100
+ *
101
+ * @return array|string The color passed in in the proper format
102
+ */
103
+ public static function convert_color( $color ) {
104
+ if ( is_array( $color ) ) {
105
+ // Color is already in a format we want it
106
+ return $color;
107
+ }
108
+ if ( is_string( $color ) && strpos( $color, '#' ) === 0 ) {
109
+ // Color is hexadecimal string
110
+ return self::hex_to_rgb( $color );
111
+ };
112
+ // @TODO Add detection for rgb css strings
113
+ // If it's not a format recognized by the class, return white to fail somewhat gracefully
114
+ return [ 255, 255, 255 ];
115
+ }
116
+
117
+ /**
118
+ * Get an appropriate color for text based on given background color
119
+ *
120
+ * @param $bg_color string|array Background Color to get appropriate text color for
121
+ *
122
+ * @return string $text_color Hexadecimal string representing appropriately contrasting color for text given the background color
123
+ */
124
+ public static function get_readable_text( $bg_color ) {
125
+ $bg_color = self::convert_color( $bg_color );
126
+ $text_color = '#eee';
127
+ if ( self::is_light( $bg_color ) ) {
128
+ $text_color = '#333';
129
+ }
130
+
131
+ return $text_color;
132
+ }
133
+
134
+
135
+ /**
136
+ * @param string|array $color Hexadecimal string or RGB component array representing a color
137
+ * @param number $darker Amount to darken color by
138
+ *
139
+ * @return string Hexadecimal representation of darker color ready for css inclusion
140
+ */
141
+ public static function darken( $color, $darker ) {
142
+ $color = self::convert_color( $color );
143
+ $darker = ( $darker > 1 ) ? $darker : 1;
144
+
145
+ $darkened = array_map( function ( $component ) use ( $darker ) {
146
+ return floor( $component / $darker );
147
+ }, $color );
148
+
149
+ return self::rgb_to_hex( $darkened );
150
+ }
151
+
152
+ /**
153
+ * @param string|array $color Hexadecimal string or RGB component array representing a color
154
+ * @param number $opacity How opaque the color should be, range from 0 to 1
155
+ *
156
+ * @return string RGBA string ready for css inclusion
157
+ */
158
+ public static function opacity( $color, $opacity ) {
159
+ $color = self::convert_color( $color );
160
+
161
+ return 'rgba(' . implode( ', ', $color ) . ', ' . $opacity . ')';
162
+ }
163
+ }
164
+
165
+
166
+ }
inc/class-custom-color.php ADDED
@@ -0,0 +1,301 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Mediavine\Grow;
4
+
5
+ class Custom_Color {
6
+
7
+ /**
8
+ * Get CSS output of custom color styles for all passed locations
9
+ *
10
+ * @param array $locations Array of location slugs to get custom color styles for
11
+ *
12
+ * @return string CSS output of custom color styles for all passed locations
13
+ */
14
+ public static function get_multiple_locations( $locations = [] ) {
15
+ $output = '';
16
+ foreach ( $locations as $location ) {
17
+ $output .= self::get_style( $location );
18
+ }
19
+
20
+ return $output;
21
+ }
22
+
23
+ /**
24
+ * @param string $location Slug of location to get custom color styles for.
25
+ *
26
+ * @return string CSS output of custom color styles for the passed location
27
+ */
28
+ public static function get_style( $location = '' ) {
29
+ if ( empty( $location ) ) {
30
+ return '';
31
+ }
32
+ $location_settings = dpsp_get_location_settings( $location );
33
+ if ( empty( $location_settings['active'] ) ) {
34
+ return '';
35
+ }
36
+ $output = '';
37
+ /**
38
+ * Custom colors
39
+ */
40
+ $color = ! empty( $location_settings['display']['custom_color'] ) ? $location_settings['display']['custom_color'] : false;
41
+ $hover_color = ! empty( $location_settings['display']['custom_hover_color'] ) ? $location_settings['display']['custom_hover_color'] : false;
42
+
43
+ // Have clases with normal line
44
+ $location = str_replace( '_', '-', $location );
45
+
46
+ // Handle sticky bar background
47
+ if ( ! empty( $location_settings['display']['custom_background_color'] ) ) {
48
+ $output .= self::sticky_bar( $location_settings );
49
+ }
50
+
51
+ $output .= self::style_variation( $location_settings['button_style'], $location, $color, $hover_color );
52
+
53
+ if ( $hover_color ) {
54
+ $output .= '.dpsp-networks-btns-wrapper.dpsp-networks-btns-' . $location . ' .dpsp-network-btn {--networkHover: ' . Color_Utilities::opacity( $hover_color, 0.4 ) . ' }';
55
+ }
56
+
57
+ return $output;
58
+ }
59
+
60
+ /**
61
+ * Generate styles for custom Sticky Bar Background
62
+ *
63
+ * @param array $settings Sticky bar location settings
64
+ *
65
+ * @return string Styles for Sticky Bar custom background
66
+ */
67
+ private static function sticky_bar( $settings ) {
68
+ $bg_color = $settings['display']['custom_background_color'];
69
+ $text_color = Color_Utilities::get_readable_text( $bg_color );
70
+
71
+ return '
72
+ #dpsp-sticky-bar-wrapper { background: ' . $bg_color . '; }
73
+ #dpsp-sticky-bar-wrapper .dpsp-total-share-wrapper { color: ' . $text_color . '; }
74
+ #dpsp-sticky-bar-wrapper .dpsp-total-share-wrapper .dpsp-icon-total-share svg { fill: ' . $text_color . '; }
75
+ ';
76
+ }
77
+
78
+ /**
79
+ * Get Custom Color styles for a particular style variation and location
80
+ *
81
+ * @param number $style_variation The style variation to get styles for
82
+ * @param string $location Slug for the location to get stlyes for
83
+ * @param string $color The color for the default state
84
+ * @param string $hover_color The color for when the button is hovered
85
+ *
86
+ * @return string Styles for the given style variation and location
87
+ */
88
+ private static function style_variation( $style_variation, $location, $color, $hover_color ) {
89
+ $variations = [
90
+ 1 => [
91
+
92
+ 'color' => '
93
+ .dpsp-button-style-1 .dpsp-networks-btns-%1$s .dpsp-network-btn .dpsp-network-icon,
94
+ .dpsp-button-style-1 .dpsp-networks-btns-%1$s .dpsp-network-btn {
95
+ background: %2$s;
96
+ border-color: %2$s;
97
+ }
98
+ ',
99
+
100
+ 'hover_color' => '
101
+ .dpsp-button-style-1 .dpsp-networks-btns-%1$s .dpsp-network-btn:hover .dpsp-network-icon,
102
+ .dpsp-button-style-1 .dpsp-networks-btns-%1$s .dpsp-network-btn:focus .dpsp-network-icon,
103
+ .dpsp-button-style-1 .dpsp-networks-btns-%1$s .dpsp-network-btn:hover,
104
+ .dpsp-button-style-1 .dpsp-networks-btns-%1$s .dpsp-network-btn:focus {
105
+ border-color: %3$s !important;
106
+ background: %3$s !important;
107
+ }
108
+ ',
109
+ ],
110
+
111
+ 2 => [
112
+ 'color' => '
113
+ .dpsp-button-style-2 .dpsp-networks-btns-%1$s.dpsp-networks-btns-wrapper .dpsp-network-btn {
114
+ background: %2$s;
115
+ border-color: %2$s;
116
+ }
117
+ .dpsp-button-style-2 .dpsp-networks-btns-%1$s.dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon {
118
+ background: %4$s;
119
+ border-color: %4$s;
120
+ }
121
+ ',
122
+
123
+ 'hover_color' => '
124
+ .dpsp-button-style-2 .dpsp-networks-btns-%1$s .dpsp-network-btn:hover,
125
+ .dpsp-button-style-2 .dpsp-networks-btns-%1$s .dpsp-network-btn:focus,
126
+ .dpsp-button-style-2 .dpsp-networks-btns-%1$s .dpsp-network-btn:focus .dpsp-network-icon,
127
+ .dpsp-button-style-2 .dpsp-networks-btns-%1$s .dpsp-network-btn:hover .dpsp-network-icon {
128
+ background: %3$s;
129
+ border-color: %3$s;
130
+ }
131
+ ',
132
+ ],
133
+
134
+ 3 => [
135
+ 'color' => '
136
+ .dpsp-button-style-3 .dpsp-networks-btns-%1$s.dpsp-networks-btns-wrapper .dpsp-network-btn {
137
+ border-color: %2$s;
138
+ color: %2$s;
139
+ background-color: %2$s;
140
+ }
141
+ .dpsp-button-style-3 .dpsp-networks-btns-%1$s.dpsp-networks-btns-wrapper .dpsp-network-btn .dpsp-network-icon {
142
+ background: %2$s;
143
+ border-color: %2$s;
144
+ }
145
+ ',
146
+
147
+ 'hover_color' => '
148
+ .dpsp-button-style-3 .dpsp-networks-btns-%1$s .dpsp-network-btn:hover .dpsp-network-icon,
149
+ .dpsp-button-style-3 .dpsp-networks-btns-%1$s .dpsp-network-btn:focus .dpsp-network-icon,
150
+ .dpsp-button-style-3 .dpsp-networks-btns-%1$s .dpsp-network-btn:focus,
151
+ .dpsp-button-style-3 .dpsp-networks-btns-%1$s .dpsp-network-btn:hover {
152
+ border-color: %3$s !important;
153
+ background: %3$s !important;
154
+ }
155
+ ',
156
+ ],
157
+ 4 => [
158
+ 'color' => '
159
+ .dpsp-button-style-4 .dpsp-networks-btns-%1$s .dpsp-network-btn {
160
+ background: %2$s;
161
+ border-color: %2$s;
162
+ }
163
+ .dpsp-button-style-4 .dpsp-networks-btns-%1$s .dpsp-network-btn .dpsp-network-icon {
164
+ border-color: %2$s;
165
+ }
166
+ .dpsp-button-style-4 .dpsp-networks-btns-%1$s .dpsp-network-btn .dpsp-network-icon svg {
167
+ fill: %2$s;
168
+ }
169
+ ',
170
+
171
+ 'hover_color' => '
172
+ .dpsp-button-style-4 .dpsp-networks-btns-%1$s .dpsp-network-btn:hover .dpsp-network-icon,
173
+ .dpsp-button-style-4 .dpsp-networks-btns-%1$s .dpsp-network-btn:focus .dpsp-network-icon,
174
+ .dpsp-button-style-4 .dpsp-networks-btns-%1$s .dpsp-network-btn:focus,
175
+ .dpsp-button-style-4 .dpsp-networks-btns-%1$s .dpsp-network-btn:hover {
176
+ border-color: %3$s !important;
177
+ background: %3$s !important;
178
+ }
179
+ ',
180
+ ],
181
+ 5 => [
182
+ 'color' => '
183
+ .dpsp-button-style-5 .dpsp-networks-btns-%1$s .dpsp-network-btn .dpsp-network-icon,
184
+ .dpsp-button-style-5 .dpsp-networks-btns-%1$s .dpsp-network-btn {
185
+ border-color: %2$s;
186
+ color: %2$s;
187
+ }
188
+ .dpsp-button-style-5 .dpsp-networks-btns-%1$s .dpsp-network-btn .dpsp-network-icon svg {
189
+ fill: %2$s;
190
+ }
191
+ ',
192
+
193
+ 'hover_color' => '
194
+ .dpsp-button-style-5 .dpsp-networks-btns-%1$s .dpsp-network-btn:hover,
195
+ .dpsp-button-style-5 .dpsp-networks-btns-%1$s .dpsp-network-btn:focus {
196
+ border-color: %3$s;
197
+ background: %3$s;
198
+ }
199
+ ',
200
+ ],
201
+ 6 => [
202
+ 'color' => '
203
+ .dpsp-button-style-6 .dpsp-networks-btns-%1$s .dpsp-network-btn {
204
+ color: %2$s;
205
+ }
206
+ .dpsp-button-style-6 .dpsp-networks-btns-%1$s .dpsp-network-btn .dpsp-network-icon {
207
+ border-color: %2$s;
208
+ background: %2$s;
209
+ }
210
+ ',
211
+
212
+ 'hover_color' => '
213
+ .dpsp-button-style-6 .dpsp-networks-btns-%1$s .dpsp-network-btn:focus,
214
+ .dpsp-button-style-6 .dpsp-networks-btns-%1$s .dpsp-network-btn:hover {
215
+ color: %3$s;
216
+ }
217
+ .dpsp-button-style-6 .dpsp-networks-btns-%1$s .dpsp-network-btn:hover .dpsp-network-icon,
218
+ .dpsp-button-style-6 .dpsp-networks-btns-%1$s .dpsp-network-btn:focus .dpsp-network-icon {
219
+ border-color: %3$s;
220
+ background: %3$s;
221
+ }
222
+ ',
223
+ ],
224
+
225
+ 7 => [
226
+ 'color' => '
227
+ .dpsp-button-style-7 .dpsp-networks-btns-%1$s .dpsp-network-btn {
228
+ color: %2$s;
229
+ border-color: %2$s;
230
+ }
231
+ .dpsp-button-style-7 .dpsp-networks-btns-%1$s .dpsp-network-btn .dpsp-network-icon {
232
+ border-color: %2$s;
233
+ }
234
+ .dpsp-button-style-7 .dpsp-networks-btns-%1$s .dpsp-network-btn .dpsp-network-icon svg {
235
+ fill: %2$s;
236
+ }
237
+ ',
238
+
239
+ 'hover_color' => '
240
+ .dpsp-button-style-7 .dpsp-networks-btns-%1$s .dpsp-network-btn:hover,
241
+ .dpsp-button-style-7 .dpsp-networks-btns-%1$s .dpsp-network-btn:focus {
242
+ color: %3$s;
243
+ border-color: %3$s;
244
+ }
245
+ .dpsp-button-style-7 .dpsp-networks-btns-%1$s .dpsp-network-btn:hover .dpsp-network-icon,
246
+ .dpsp-button-style-7 .dpsp-networks-btns-%1$s .dpsp-network-btn:focus .dpsp-network-icon {
247
+ border-color: %3$s;
248
+ background: %3$s;
249
+ }
250
+ ',
251
+ ],
252
+ 8 => [
253
+ 'color' => '
254
+ .dpsp-button-style-8 .dpsp-networks-btns-%1$s .dpsp-network-btn {
255
+ color: %2$s;
256
+ }
257
+ .dpsp-button-style-8 .dpsp-networks-btns-%1$s .dpsp-network-btn .dpsp-network-icon svg {
258
+ fill: %2$s;
259
+ }
260
+ ',
261
+
262
+ 'hover_color' => '
263
+ .dpsp-button-style-8 .dpsp-networks-btns-%1$s .dpsp-network-btn:hover,
264
+ .dpsp-button-style-8 .dpsp-networks-btns-%1$s .dpsp-network-btn:focus {
265
+ color: %3$s;
266
+ }
267
+ .dpsp-button-style-8 .dpsp-networks-btns-%1$s .dpsp-network-btn:focus .dpsp-network-icon svg,
268
+ .dpsp-button-style-8 .dpsp-networks-btns-%1$s .dpsp-network-btn:hover .dpsp-network-icon svg {
269
+ fill: %3$s;
270
+ }
271
+ ',
272
+ ]
273
+ ];
274
+ if ( 'sidebar' == $location ) {
275
+ $variations[1] = [
276
+ 'color' => '
277
+ .dpsp-button-style-1 .dpsp-networks-btns-%1$s .dpsp-network-btn {
278
+ background: %2$s;
279
+ border-color: %2$s;
280
+ }',
281
+
282
+ 'hover_color' => '
283
+ .dpsp-button-style-1 .dpsp-networks-btns-%1$s .dpsp-network-btn:hover,
284
+ .dpsp-button-style-1 .dpsp-networks-btns-%1$s .dpsp-network-btn:focus {
285
+ border-color: %3$s !important;
286
+ background: %3$s !important;
287
+ }'
288
+ ];
289
+ }
290
+ $output = '';
291
+ $darker_color = Color_Utilities::darken( $color, 1.1 );
292
+ if ( $color ) {
293
+ $output .= sprintf( $variations[ $style_variation ]['color'], $location, $color, $hover_color, $darker_color );
294
+ }
295
+ if ( $hover_color ) {
296
+ $output .= sprintf( $variations[ $style_variation ]['hover_color'], $location, $color, $hover_color, $darker_color );
297
+ }
298
+
299
+ return $output;
300
+ }
301
+ }
inc/class-data-sync.php ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Mediavine\Grow;
4
+
5
+ if ( class_exists( '\Social_Pug' ) ) {
6
+ class Data_Sync extends \Social_Pug {
7
+
8
+ private static $instance = null;
9
+
10
+ private static $data_sync_run = false;
11
+
12
+ /**
13
+ * Makes sure class is only instantiated once
14
+ *
15
+ * @return object Instantiated class
16
+ */
17
+ public static function get_instance() {
18
+ if ( null === self::$instance ) {
19
+ self::$instance = new self;
20
+ self::$instance->init();
21
+ }
22
+ return self::$instance;
23
+ }
24
+
25
+ /**
26
+ * Hooks to be run on class instantiation
27
+ *
28
+ * @return void
29
+ */
30
+ public function init() {
31
+ add_action( 'mv_grow_plugin_activated', [ $this, 'sync_data' ], 10 );
32
+ add_action( 'mv_grow_plugin_activated', [ $this, 'schedule_data_sync' ], 20 );
33
+ add_action( 'mv_grow_plugin_updated', [ $this, 'sync_data' ], 20 );
34
+ add_action( 'mv_grow_sync_data', [ $this, 'sync_data' ] );
35
+ add_action( 'mv_grow_plugin_deactivated', [ $this, 'sync_data' ], 10 );
36
+ add_action( 'mv_grow_plugin_deactivated', [ $this, 'remove_scheduled_data_sync' ], 20 );
37
+ }
38
+
39
+ /**
40
+ * Schedules data sync to run every 12 hours
41
+ *
42
+ * @return void
43
+ */
44
+ public function schedule_data_sync() {
45
+ // Make sure who don't already have something scheduled
46
+ if ( ! wp_next_scheduled( 'mv_grow_sync_data' ) ) {
47
+ // Because we are also running data sync on every activation,
48
+ // we wait 12 hours before running the first scheduled event
49
+ wp_schedule_event( time() + HOUR_IN_SECONDS * 12, 'twicedaily', 'mv_grow_sync_data' );
50
+ }
51
+ }
52
+
53
+ /**
54
+ * Removes Schedules data sync event
55
+ *
56
+ * @return void
57
+ */
58
+ public function remove_scheduled_data_sync() {
59
+ wp_clear_scheduled_hook( 'mv_grow_sync_data' );
60
+ }
61
+
62
+ /**
63
+ * Determines whether MCP is enabled
64
+ *
65
+ * @return boolean True if enabled
66
+ */
67
+ public function is_mcp_enabled() {
68
+ if (
69
+ (
70
+ class_exists( 'MV_Control_Panel' ) ||
71
+ class_exists( 'MVCP' )
72
+ ) && get_option( 'MVCP_site_id' )
73
+ ) {
74
+ return true;
75
+ }
76
+
77
+ return false;
78
+ }
79
+
80
+ /**
81
+ * Get MCP site id
82
+ *
83
+ * @return string|null|false Site id if exists and MCP active; false if doesn't exist; null if MCP not active
84
+ */
85
+ public function get_mcp_site_id() {
86
+ $mcp_site_id = null;
87
+ if ( $this->is_mcp_enabled() ) {
88
+ $mcp_site_id = get_option( 'MVCP_site_id', false );
89
+ }
90
+
91
+ return $mcp_site_id;
92
+ }
93
+
94
+ /**
95
+ * Syncs site and plugin data with Mediavine Product Data Sync API
96
+ *
97
+ * @return void
98
+ */
99
+ public function sync_data() {
100
+ // Check if the data sync has already run
101
+ if ( $this::$data_sync_run ) {
102
+ return;
103
+ }
104
+
105
+ global $wp_version;
106
+
107
+ // Find what action was run
108
+ $action_run = null;
109
+ if ( did_action( 'mv_grow_sync_data' ) ) {
110
+ $action_run = 'scheduled_event';
111
+ }
112
+ if ( empty( $action_run ) && did_action( 'mv_grow_plugin_updated' ) ) {
113
+ $action_run = 'plugin_updated';
114
+ }
115
+ if ( empty( $action_run ) && did_action( 'mv_grow_plugin_activated' ) ) {
116
+ $action_run = 'plugin_activated';
117
+ }
118
+ if ( empty( $action_run ) && did_action( 'mv_grow_plugin_deactivated' ) ) {
119
+ $action_run = 'plugin_deactivated';
120
+ }
121
+
122
+ // Get site domain and remove www if exists
123
+ $site_domain = $_SERVER['HTTP_HOST'];
124
+ if ( strpos( $site_domain, 'www.' ) === 0 ) {
125
+ $site_domain = substr( $site_domain, 4 );
126
+ }
127
+
128
+ // Get admin email addresses
129
+ $admins = get_users( [ 'role__in' => [ 'administrator' ] ] );
130
+ $admin_emails = wp_list_pluck( $admins, 'user_email' );
131
+
132
+ // Build data array for sync
133
+ $data_to_send = [
134
+ 'action_run' => $action_run,
135
+ 'php_version' => PHP_VERSION,
136
+ 'wp_version' => $wp_version,
137
+ // We quickly want to pull the db version, which is not easily pulled from $wpdb
138
+ // phpcs:disable
139
+ 'mysql_version' => mysqli_get_client_info(),
140
+ // phpcs:enable
141
+ 'email' => wp_get_current_user()->user_email,
142
+ 'grow_license' => get_option( 'mv_grow_license', false ),
143
+ 'grow_version' => $this::$VERSION,
144
+ 'plugin_name' => 'Grow Social Pro by Mediavine',
145
+ 'plugin_slug' => 'mediavine-grow',
146
+ 'plugin_dir' => dirname( plugin_basename( mv_grow_get_activation_path() ) ),
147
+ 'site_url' => site_url(),
148
+ 'site_domain' => $site_domain,
149
+ 'site_admin_emails' => $admin_emails,
150
+ 'mcp_status' => $this->is_mcp_enabled(),
151
+ 'mcp_site_id' => $this->get_mcp_site_id(),
152
+ ];
153
+
154
+ $data_sync = wp_remote_post(
155
+ 'https://product-data-sync.herokuapp.com/record',
156
+ [
157
+ 'headers' => [
158
+ 'Content-Type' => 'application/json; charset=utf-8',
159
+ ],
160
+ 'body' => wp_json_encode( $data_to_send ),
161
+ ]
162
+ );
163
+
164
+ // Prevent duplicate data syncs from running
165
+ if ( ! empty( $data_sync ) ) {
166
+ $this::$data_sync_run = true;
167
+ }
168
+ }
169
+ }
170
+ }
inc/class-frontend-data.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Mediavine\Grow;
4
+
5
+ if ( class_exists( 'Social_Pug' ) ) {
6
+ class Frontend_Data extends Asset_Loader {
7
+
8
+ private static $instance = null;
9
+
10
+ /**
11
+ * @var $data array|null
12
+ */
13
+ private $data = null;
14
+
15
+ public static function get_instance() {
16
+ if ( null === self::$instance ) {
17
+ self::$instance = new self();
18
+ self::$instance->init();
19
+ }
20
+
21
+ return self::$instance;
22
+ }
23
+
24
+
25
+ /**
26
+ * Set up data and add hook for output
27
+ */
28
+ public function init() {
29
+ $this->data = [];
30
+ add_action( 'wp_footer', [ $this, 'output_data' ] );
31
+ add_filter( 'mv_grow_frontend_data', [ $this, 'general_data' ] );
32
+ add_filter( 'mv_grow_frontend_data', [ $this, 'get_counts' ] );
33
+ add_filter( 'mv_grow_frontend_data', [ $this, 'should_run' ] );
34
+ }
35
+
36
+ /**
37
+ * Run hook to collect all data
38
+ */
39
+ public function get_data() {
40
+ $this->data = apply_filters( 'mv_grow_frontend_data', $this->data );
41
+ }
42
+
43
+
44
+ /**
45
+ * Get share counts for post if they exist
46
+ *
47
+ * @param $data array Data that will be output
48
+ *
49
+ * @return array Data to be output
50
+ */
51
+ public function get_counts( $data ) {
52
+ $post = dpsp_get_current_post();
53
+ if ( $post ) {
54
+ $data['shareCounts'] = dpsp_get_post_share_counts( $post->ID );
55
+ }
56
+
57
+ return $data;
58
+ }
59
+
60
+ /**
61
+ * Output data as data attribute on div
62
+ */
63
+ public function output_data() {
64
+ $this->get_data();
65
+ $data = htmlspecialchars( json_encode( $this->data ), ENT_QUOTES, 'UTF-8' );
66
+ echo wp_kses_post( '<div id="mv-grow-data" data-settings=\'' . $data . '\'></div>' );
67
+ }
68
+
69
+ public function general_data( $data ) {
70
+ $general = [
71
+ 'contentSelector' => apply_filters( 'mv_grow_content_wrapper_selector', false ),
72
+ ];
73
+ $data['general'] = $general;
74
+
75
+ return $data;
76
+ }
77
+
78
+ /**
79
+ * Determine if Grow should do anything based on if the page is singular or not
80
+ *
81
+ * @param $data array Existing data that will be output to frontend
82
+ *
83
+ * @return array
84
+ */
85
+ public function should_run( $data ) {
86
+ $data['shouldRun'] = is_singular();
87
+
88
+ return $data;
89
+ }
90
+ }
91
+ }
inc/class-mobile-detect.php ADDED
@@ -0,0 +1,895 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Mediavine\Grow;
4
+ /**
5
+ * Mobile Detect Library
6
+ * =====================
7
+ *
8
+ * Motto: "Every business should have a mobile detection script to detect mobile readers"
9
+ *
10
+ * Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets).
11
+ * It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
12
+ *
13
+ * @author Current authors: Serban Ghita <serbanghita@gmail.com>
14
+ * Nick Ilyin <nick.ilyin@gmail.com>
15
+ *
16
+ * Original author: Victor Stanciu <vic.stanciu@gmail.com>
17
+ *
18
+ * @license Code and contributions have 'MIT License'
19
+ * More details: https://github.com/serbanghita/Mobile-Detect/blob/master/LICENSE.txt
20
+ *
21
+ * @link Homepage: http://mobiledetect.net
22
+ * GitHub Repo: https://github.com/serbanghita/Mobile-Detect
23
+ * Google Code: http://code.google.com/p/php-mobile-detect/
24
+ * README: https://github.com/serbanghita/Mobile-Detect/blob/master/README.md
25
+ * HOWTO: https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples
26
+ *
27
+ * @version 2.8.24
28
+ */
29
+ class Mobile_Detect {
30
+ /**
31
+ * Mobile detection type.
32
+ *
33
+ * @deprecated since version 2.6.9
34
+ */
35
+ const DETECTION_TYPE_MOBILE = 'mobile';
36
+
37
+ /**
38
+ * Extended detection type.
39
+ *
40
+ * @deprecated since version 2.6.9
41
+ */
42
+ const DETECTION_TYPE_EXTENDED = 'extended';
43
+
44
+ /**
45
+ * A frequently used regular expression to extract version #s.
46
+ *
47
+ * @deprecated since version 2.6.9
48
+ */
49
+ const VER = '([\w._\+]+)';
50
+
51
+ /**
52
+ * Top-level device.
53
+ */
54
+ const MOBILE_GRADE_A = 'A';
55
+
56
+ /**
57
+ * Mid-level device.
58
+ */
59
+ const MOBILE_GRADE_B = 'B';
60
+
61
+ /**
62
+ * Low-level device.
63
+ */
64
+ const MOBILE_GRADE_C = 'C';
65
+
66
+ /**
67
+ * Stores the version number of the current release.
68
+ */
69
+ const VERSION = '2.8.24';
70
+
71
+ /**
72
+ * A type for the version() method indicating a string return value.
73
+ */
74
+ const VERSION_TYPE_STRING = 'text';
75
+
76
+ /**
77
+ * A type for the version() method indicating a float return value.
78
+ */
79
+ const VERSION_TYPE_FLOAT = 'float';
80
+ /**
81
+ * HTTP headers that trigger the 'isMobile' detection
82
+ * to be true.
83
+ *
84
+ * @var array
85
+ */
86
+ protected static $mobileHeaders = [
87
+
88
+ 'HTTP_ACCEPT' => [
89
+ 'matches' => [
90
+ // Opera Mini; @reference: http://dev.opera.com/articles/view/opera-binary-markup-language/
91
+ 'application/x-obml2d',
92
+ // BlackBerry devices.
93
+ 'application/vnd.rim.html',
94
+ 'text/vnd.wap.wml',
95
+ 'application/vnd.wap.xhtml+xml',
96
+ ],
97
+ ],
98
+ 'HTTP_X_WAP_PROFILE' => null,
99
+ 'HTTP_X_WAP_CLIENTID' => null,
100
+ 'HTTP_WAP_CONNECTION' => null,
101
+ 'HTTP_PROFILE' => null,
102
+ // Reported by Opera on Nokia devices (eg. C3).
103
+ 'HTTP_X_OPERAMINI_PHONE_UA' => null,
104
+ 'HTTP_X_NOKIA_GATEWAY_ID' => null,
105
+ 'HTTP_X_ORANGE_ID' => null,
106
+ 'HTTP_X_VODAFONE_3GPDPCONTEXT' => null,
107
+ 'HTTP_X_HUAWEI_USERID' => null,
108
+ // Reported by Windows Smartphones.
109
+ 'HTTP_UA_OS' => null,
110
+ // Reported by Verizon, Vodafone proxy system.
111
+ 'HTTP_X_MOBILE_GATEWAY' => null,
112
+ // Seen this on HTC Sensation. SensationXE_Beats_Z715e.
113
+ 'HTTP_X_ATT_DEVICEID' => null,
114
+ // Seen this on a HTC.
115
+ 'HTTP_UA_CPU' => [ 'matches' => [ 'ARM' ] ],
116
+ ];
117
+ /**
118
+ * List of mobile devices (phones).
119
+ *
120
+ * @var array
121
+ */
122
+ protected static $phoneDevices = [
123
+ 'iPhone' => '\biPhone\b|\biPod\b',
124
+ // |\biTunes
125
+ 'BlackBerry' => 'BlackBerry|\bBB10\b|rim[0-9]+',
126
+ 'HTC' => 'HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b|T-Mobile G1|Z520m',
127
+ 'Nexus' => 'Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6',
128
+ // @todo: Is 'Dell Streak' a tablet or a phone? ;)
129
+ 'Dell' => 'Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b',
130
+ 'Motorola' => 'Motorola|DROIDX|DROID BIONIC|\bDroid\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\bMoto E\b',
131
+ 'Samsung' => '\bSamsung\b|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F',
132
+ 'LG' => '\bLG\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323)',
133
+ 'Sony' => 'SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533',
134
+ 'Asus' => 'Asus.*Galaxy|PadFone.*Mobile',
135
+ 'NokiaLumia' => 'Lumia [0-9]{3,4}',
136
+ // http://www.micromaxinfo.com/mobiles/smartphones
137
+ // Added because the codes might conflict with Acer Tablets.
138
+ 'Micromax' => 'Micromax.*\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\b',
139
+ // @todo Complete the regex.
140
+ 'Palm' => 'PalmSource|Palm',
141
+ // avantgo|blazer|elaine|hiptop|plucker|xiino ;
142
+ 'Vertu' => 'Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature',
143
+ // Just for fun ;)
144
+ // http://www.pantech.co.kr/en/prod/prodList.do?gbrand=VEGA (PANTECH)
145
+ // Most of the VEGA devices are legacy. PANTECH seem to be newer devices based on Android.
146
+ 'Pantech' => 'PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790',
147
+ // http://www.fly-phone.com/devices/smartphones/ ; Included only smartphones.
148
+ 'Fly' => 'IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250',
149
+ // http://fr.wikomobile.com
150
+ 'Wiko' => 'KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM',
151
+ 'iMobile' => 'i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)',
152
+ // Added simvalley mobile just for fun. They have some interesting devices.
153
+ // http://www.simvalley.fr/telephonie---gps-_22_telephonie-mobile_telephones_.html
154
+ 'SimValley' => '\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\b',
155
+ // Wolfgang - a brand that is sold by Aldi supermarkets.
156
+ // http://www.wolfgangmobile.com/
157
+ 'Wolfgang' => 'AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q',
158
+ 'Alcatel' => 'Alcatel',
159
+ 'Nintendo' => 'Nintendo 3DS',
160
+ // http://en.wikipedia.org/wiki/Amoi
161
+ 'Amoi' => 'Amoi',
162
+ // http://en.wikipedia.org/wiki/INQ
163
+ 'INQ' => 'INQ',
164
+ // @Tapatalk is a mobile app; http://support.tapatalk.com/threads/smf-2-0-2-os-and-browser-detection-plugin-and-tapatalk.15565/#post-79039
165
+ 'GenericPhone' => 'Tapatalk|PDA;|SAGEM|\bmmp\b|pocket|\bpsp\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\bwap\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser',
166
+ ];
167
+ /**
168
+ * List of mobile Operating Systems.
169
+ *
170
+ * @var array
171
+ */
172
+ protected static $operatingSystems = [
173
+ 'AndroidOS' => 'Android',
174
+ 'BlackBerryOS' => 'blackberry|\bBB10\b|rim tablet os',
175
+ 'PalmOS' => 'PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino',
176
+ 'SymbianOS' => 'Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\bS60\b',
177
+ // @reference: http://en.wikipedia.org/wiki/Windows_Mobile
178
+ 'WindowsMobileOS' => 'Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;',
179
+ // @reference: http://en.wikipedia.org/wiki/Windows_Phone
180
+ // http://wifeng.cn/?r=blog&a=view&id=106
181
+ // http://nicksnettravels.builttoroam.com/post/2011/01/10/Bogus-Windows-Phone-7-User-Agent-String.aspx
182
+ // http://msdn.microsoft.com/library/ms537503.aspx
183
+ // https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx
184
+ 'WindowsPhoneOS' => 'Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;',
185
+ 'iOS' => '\biPhone.*Mobile|\biPod|\biPad',
186
+ // http://en.wikipedia.org/wiki/MeeGo
187
+ // @todo: research MeeGo in UAs
188
+ 'MeeGoOS' => 'MeeGo',
189
+ // http://en.wikipedia.org/wiki/Maemo
190
+ // @todo: research Maemo in UAs
191
+ 'MaemoOS' => 'Maemo',
192
+ 'JavaOS' => 'J2ME/|\bMIDP\b|\bCLDC\b', // '|Java/' produces bug #135
193
+ 'webOS' => 'webOS|hpwOS',
194
+ 'badaOS' => '\bBada\b',
195
+ 'BREWOS' => 'BREW',
196
+ ];
197
+ /**
198
+ * List of mobile User Agents.
199
+ *
200
+ * IMPORTANT: This is a list of only mobile browsers.
201
+ * Mobile Detect 2.x supports only mobile browsers,
202
+ * it was never designed to detect all browsers.
203
+ * The change will come in 2017 in the 3.x release for PHP7.
204
+ *
205
+ * @var array
206
+ */
207
+ protected static $browsers = [
208
+ //'Vivaldi' => 'Vivaldi',
209
+ // @reference: https://developers.google.com/chrome/mobile/docs/user-agent
210
+ 'Chrome' => '\bCrMo\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?',
211
+ 'Dolfin' => '\bDolfin\b',
212
+ 'Opera' => 'Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+|Coast/[0-9.]+',
213
+ 'Skyfire' => 'Skyfire',
214
+ 'Edge' => 'Mobile Safari/[.0-9]* Edge',
215
+ 'IE' => 'IEMobile|MSIEMobile',
216
+ // |Trident/[.0-9]+
217
+ 'Firefox' => 'fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile|FxiOS',
218
+ 'Bolt' => 'bolt',
219
+ 'TeaShark' => 'teashark',
220
+ 'Blazer' => 'Blazer',
221
+ // @reference: http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html#//apple_ref/doc/uid/TP40006517-SW3
222
+ 'Safari' => 'Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari',
223
+ // http://en.wikipedia.org/wiki/Midori_(web_browser)
224
+ //'Midori' => 'midori',
225
+ //'Tizen' => 'Tizen',
226
+ 'UCBrowser' => 'UC.*Browser|UCWEB',
227
+ 'baiduboxapp' => 'baiduboxapp',
228
+ 'baidubrowser' => 'baidubrowser',
229
+ // https://github.com/serbanghita/Mobile-Detect/issues/7
230
+ 'DiigoBrowser' => 'DiigoBrowser',
231
+ // http://www.puffinbrowser.com/index.php
232
+ 'Puffin' => 'Puffin',
233
+ // http://mercury-browser.com/index.html
234
+ 'Mercury' => '\bMercury\b',
235
+ // http://en.wikipedia.org/wiki/Obigo_Browser
236
+ 'ObigoBrowser' => 'Obigo',
237
+ // http://en.wikipedia.org/wiki/NetFront
238
+ 'NetFront' => 'NF-Browser',
239
+ // @reference: http://en.wikipedia.org/wiki/Minimo
240
+ // http://en.wikipedia.org/wiki/Vision_Mobile_Browser
241
+ 'GenericBrowser' => 'NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger',
242
+ // @reference: https://en.wikipedia.org/wiki/Pale_Moon_(web_browser)
243
+ 'PaleMoon' => 'Android.*PaleMoon|Mobile.*PaleMoon',
244
+ ];
245
+ /**
246
+ * Utilities.
247
+ *
248
+ * @var array
249
+ */
250
+ protected static $utilities = [
251
+ // Experimental. When a mobile device wants to switch to 'Desktop Mode'.
252
+ // http://scottcate.com/technology/windows-phone-8-ie10-desktop-or-mobile/
253
+ // https://github.com/serbanghita/Mobile-Detect/issues/57#issuecomment-15024011
254
+ // https://developers.facebook.com/docs/sharing/best-practices
255
+ 'Bot' => 'Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom',
256
+ 'MobileBot' => 'Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2',
257
+ 'DesktopMode' => 'WPDesktop',
258
+ 'TV' => 'SonyDTV|HbbTV', // experimental
259
+ 'WebKit' => '(webkit)[ /]([\w.]+)',
260
+ // @todo: Include JXD consoles.
261
+ 'Console' => '\b(Nintendo|Nintendo WiiU|Nintendo 3DS|PLAYSTATION|Xbox)\b',
262
+ 'Watch' => 'SM-V700',
263
+ ];
264
+ /**
265
+ * All possible HTTP headers that represent the
266
+ * User-Agent string.
267
+ *
268
+ * @var array
269
+ */
270
+ protected static $uaHttpHeaders = [
271
+ // The default User-Agent string.
272
+ 'HTTP_USER_AGENT',
273
+ // Header can occur on devices using Opera Mini.
274
+ 'HTTP_X_OPERAMINI_PHONE_UA',
275
+ // Vodafone specific header: http://www.seoprinciple.com/mobile-web-community-still-angry-at-vodafone/24/
276
+ 'HTTP_X_DEVICE_USER_AGENT',
277
+ 'HTTP_X_ORIGINAL_USER_AGENT',
278
+ 'HTTP_X_SKYFIRE_PHONE',
279
+ 'HTTP_X_BOLT_PHONE_UA',
280
+ 'HTTP_DEVICE_STOCK_UA',
281
+ 'HTTP_X_UCBROWSER_DEVICE_UA',
282
+ ];
283
+ /**
284
+ * The individual segments that could exist in a User-Agent string. VER refers to the regular
285
+ * expression defined in the constant self::VER.
286
+ *
287
+ * @var array
288
+ */
289
+ protected static $properties = [
290
+
291
+ // Build
292
+ 'Mobile' => 'Mobile/[VER]',
293
+ 'Build' => 'Build/[VER]',
294
+ 'Version' => 'Version/[VER]',
295
+ 'VendorID' => 'VendorID/[VER]',
296
+
297
+ // Devices
298
+ 'iPad' => 'iPad.*CPU[a-z ]+[VER]',
299
+ 'iPhone' => 'iPhone.*CPU[a-z ]+[VER]',
300
+ 'iPod' => 'iPod.*CPU[a-z ]+[VER]',
301
+ //'BlackBerry' => array('BlackBerry[VER]', 'BlackBerry [VER];'),
302
+ 'Kindle' => 'Kindle/[VER]',
303
+
304
+ // Browser
305
+ 'Chrome' => [ 'Chrome/[VER]', 'CriOS/[VER]', 'CrMo/[VER]' ],
306
+ 'Coast' => [ 'Coast/[VER]' ],
307
+ 'Dolfin' => 'Dolfin/[VER]',
308
+ // @reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox
309
+ 'Firefox' => [ 'Firefox/[VER]', 'FxiOS/[VER]' ],
310
+ 'Fennec' => 'Fennec/[VER]',
311
+ // http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx
312
+ // https://msdn.microsoft.com/en-us/library/ie/hh869301(v=vs.85).aspx
313
+ 'Edge' => 'Edge/[VER]',
314
+ 'IE' => [ 'IEMobile/[VER];', 'IEMobile [VER]', 'MSIE [VER];', 'Trident/[0-9.]+;.*rv:[VER]' ],
315
+ // http://en.wikipedia.org/wiki/NetFront
316
+ 'NetFront' => 'NetFront/[VER]',
317
+ 'NokiaBrowser' => 'NokiaBrowser/[VER]',
318
+ 'Opera' => [ ' OPR/[VER]', 'Opera Mini/[VER]', 'Version/[VER]' ],
319
+ 'Opera Mini' => 'Opera Mini/[VER]',
320
+ 'Opera Mobi' => 'Version/[VER]',
321
+ 'UC Browser' => 'UC Browser[VER]',
322
+ 'MQQBrowser' => 'MQQBrowser/[VER]',
323
+ 'MicroMessenger' => 'MicroMessenger/[VER]',
324
+ 'baiduboxapp' => 'baiduboxapp/[VER]',
325
+ 'baidubrowser' => 'baidubrowser/[VER]',
326
+ 'SamsungBrowser' => 'SamsungBrowser/[VER]',
327
+ 'Iron' => 'Iron/[VER]',
328
+ // @note: Safari 7534.48.3 is actually Version 5.1.
329
+ // @note: On BlackBerry the Version is overwriten by the OS.
330
+ 'Safari' => [ 'Version/[VER]', 'Safari/[VER]' ],
331
+ 'Skyfire' => 'Skyfire/[VER]',
332
+ 'Tizen' => 'Tizen/[VER]',
333
+ 'Webkit' => 'webkit[ /][VER]',
334
+ 'PaleMoon' => 'PaleMoon/[VER]',
335
+
336
+ // Engine
337
+ 'Gecko' => 'Gecko/[VER]',
338
+ 'Trident' => 'Trident/[VER]',
339
+ 'Presto' => 'Presto/[VER]',
340
+ 'Goanna' => 'Goanna/[VER]',
341
+
342
+ // OS
343
+ 'iOS' => ' \bi?OS\b [VER][ ;]{1}',
344
+ 'Android' => 'Android [VER]',
345
+ 'BlackBerry' => [ 'BlackBerry[\w]+/[VER]', 'BlackBerry.*Version/[VER]', 'Version/[VER]' ],
346
+ 'BREW' => 'BREW [VER]',
347
+ 'Java' => 'Java/[VER]',
348
+ // @reference: http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/08/29/introducing-the-ie9-on-windows-phone-mango-user-agent-string.aspx
349
+ // @reference: http://en.wikipedia.org/wiki/Windows_NT#Releases
350
+ 'Windows Phone OS' => [ 'Windows Phone OS [VER]', 'Windows Phone [VER]' ],
351
+ 'Windows Phone' => 'Windows Phone [VER]',
352
+ 'Windows CE' => 'Windows CE/[VER]',
353
+ // http://social.msdn.microsoft.com/Forums/en-US/windowsdeveloperpreviewgeneral/thread/6be392da-4d2f-41b4-8354-8dcee20c85cd
354
+ 'Windows NT' => 'Windows NT [VER]',
355
+ 'Symbian' => [ 'SymbianOS/[VER]', 'Symbian/[VER]' ],
356
+ 'webOS' => [ 'webOS/[VER]', 'hpwOS/[VER];' ],
357
+ ];
358
+ /**
359
+ * A cache for resolved matches
360
+ * @var array
361
+ */
362
+ protected $cache = [];
363
+ /**
364
+ * The User-Agent HTTP header is stored in here.
365
+ * @var string
366
+ */
367
+ protected $userAgent = null;
368
+ /**
369
+ * HTTP headers in the PHP-flavor. So HTTP_USER_AGENT and SERVER_SOFTWARE.
370
+ * @var array
371
+ */
372
+ protected $httpHeaders = [];
373
+ /**
374
+ * CloudFront headers. E.g. CloudFront-Is-Desktop-Viewer, CloudFront-Is-Mobile-Viewer & CloudFront-Is-Tablet-Viewer.
375
+ * @var array
376
+ */
377
+ protected $cloudfrontHeaders = [];
378
+ /**
379
+ * The matching Regex.
380
+ * This is good for debug.
381
+ * @var string
382
+ */
383
+ protected $matchingRegex = null;
384
+ /**
385
+ * The matches extracted from the regex expression.
386
+ * This is good for debug.
387
+ * @var string
388
+ */
389
+ protected $matchesArray = null;
390
+ /**
391
+ * The detection type, using self::DETECTION_TYPE_MOBILE or self::DETECTION_TYPE_EXTENDED.
392
+ *
393
+ * @deprecated since version 2.6.9
394
+ *
395
+ * @var string
396
+ */
397
+ protected $detectionType = self::DETECTION_TYPE_MOBILE;
398
+
399
+ /**
400
+ * Construct an instance of this class.
401
+ *
402
+ * @param array $headers Specify the headers as injection. Should be PHP _SERVER flavored.
403
+ * If left empty, will use the global _SERVER['HTTP_*'] vars instead.
404
+ * @param string $userAgent Inject the User-Agent header. If null, will use HTTP_USER_AGENT
405
+ * from the $headers array instead.
406
+ */
407
+ public function __construct(
408
+ array $headers = null,
409
+ $userAgent = null
410
+ ) {
411
+ $this->setHttpHeaders( $headers );
412
+ $this->setUserAgent( $userAgent );
413
+ }
414
+
415
+ /**
416
+ * Get the current script version.
417
+ * This is useful for the demo.php file,
418
+ * so people can check on what version they are testing
419
+ * for mobile devices.
420
+ *
421
+ * @return string The version number in semantic version format.
422
+ */
423
+ public static function getScriptVersion() {
424
+ return self::$VERSION;
425
+ }
426
+
427
+ /**
428
+ * Retrieve the list of known phone devices.
429
+ *
430
+ * @return array List of phone devices.
431
+ */
432
+ public static function getPhoneDevices() {
433
+ return self::$phoneDevices;
434
+ }
435
+
436
+ /**
437
+ * Alias for getBrowsers() method.
438
+ *
439
+ * @return array List of user agents.
440
+ */
441
+ public static function getUserAgents() {
442
+ return self::getBrowsers();
443
+ }
444
+
445
+ /**
446
+ * Retrieve the list of known browsers. Specifically, the user agents.
447
+ *
448
+ * @return array List of browsers / user agents.
449
+ */
450
+ public static function getBrowsers() {
451
+ return self::$browsers;
452
+ }
453
+
454
+ /**
455
+ * Retrieve the list of known utilities.
456
+ *
457
+ * @return array List of utilities.
458
+ */
459
+ public static function getUtilities() {
460
+ return self::$utilities;
461
+ }
462
+
463
+ /**
464
+ * Retrieve the list of mobile operating systems.
465
+ *
466
+ * @return array The list of mobile operating systems.
467
+ */
468
+ public static function getOperatingSystems() {
469
+ return self::$operatingSystems;
470
+ }
471
+
472
+ /**
473
+ * Retrieves the HTTP headers.
474
+ *
475
+ * @return array
476
+ */
477
+ public function getHttpHeaders() {
478
+ return $this->httpHeaders;
479
+ }
480
+
481
+ /**
482
+ * Set the HTTP Headers. Must be PHP-flavored. This method will reset existing headers.
483
+ *
484
+ * @param array $httpHeaders The headers to set. If null, then using PHP's _SERVER to extract
485
+ * the headers. The default null is left for backwards compatibility.
486
+ */
487
+ public function setHttpHeaders( $httpHeaders = null ) {
488
+ // use global _SERVER if $httpHeaders aren't defined
489
+ if ( ! is_array( $httpHeaders ) || ! count( $httpHeaders ) ) {
490
+ $httpHeaders = $_SERVER;
491
+ }
492
+
493
+ // clear existing headers
494
+ $this->httpHeaders = [];
495
+
496
+ // Only save HTTP headers. In PHP land, that means only _SERVER vars that
497
+ // start with HTTP_.
498
+ foreach ( $httpHeaders as $key => $value ) {
499
+ if ( substr( $key, 0, 5 ) === 'HTTP_' ) {
500
+ $this->httpHeaders[ $key ] = $value;
501
+ }
502
+ }
503
+
504
+ // In case we're dealing with CloudFront, we need to know.
505
+ $this->setCfHeaders( $httpHeaders );
506
+ }
507
+
508
+ /**
509
+ * Retrieves a particular header. If it doesn't exist, no exception/error is caused.
510
+ * Simply null is returned.
511
+ *
512
+ * @param string $header The name of the header to retrieve. Can be HTTP compliant such as
513
+ * "User-Agent" or "X-Device-User-Agent" or can be php-esque with the
514
+ * all-caps, HTTP_ prefixed, underscore seperated awesomeness.
515
+ *
516
+ * @return string|null The value of the header.
517
+ */
518
+ public function getHttpHeader( $header ) {
519
+ // are we using PHP-flavored headers?
520
+ if ( strpos( $header, '_' ) === false ) {
521
+ $header = str_replace( '-', '_', $header );
522
+ $header = strtoupper( $header );
523
+ }
524
+
525
+ // test the alternate, too
526
+ $altHeader = 'HTTP_' . $header;
527
+
528
+ //Test both the regular and the HTTP_ prefix
529
+ if ( isset( $this->httpHeaders[ $header ] ) ) {
530
+ return $this->httpHeaders[ $header ];
531
+ } elseif ( isset( $this->httpHeaders[ $altHeader ] ) ) {
532
+ return $this->httpHeaders[ $altHeader ];
533
+ }
534
+
535
+ return null;
536
+ }
537
+
538
+ /**
539
+ * Get all possible HTTP headers that
540
+ * can contain the User-Agent string.
541
+ *
542
+ * @return array List of HTTP headers.
543
+ */
544
+ public function getUaHttpHeaders() {
545
+ return self::$uaHttpHeaders;
546
+ }
547
+
548
+ /**
549
+ * Set CloudFront headers
550
+ * http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html#header-caching-web-device
551
+ *
552
+ * @param array $cfHeaders List of HTTP headers
553
+ *
554
+ * @return boolean If there were CloudFront headers to be set
555
+ */
556
+ public function setCfHeaders( $cfHeaders = null ) {
557
+ // use global _SERVER if $cfHeaders aren't defined
558
+ if ( ! is_array( $cfHeaders ) || ! count( $cfHeaders ) ) {
559
+ $cfHeaders = $_SERVER;
560
+ }
561
+
562
+ // clear existing headers
563
+ $this->cloudfrontHeaders = [];
564
+
565
+ // Only save CLOUDFRONT headers. In PHP land, that means only _SERVER vars that
566
+ // start with cloudfront-.
567
+ $response = false;
568
+ foreach ( $cfHeaders as $key => $value ) {
569
+ if ( substr( strtolower( $key ), 0, 16 ) === 'http_cloudfront_' ) {
570
+ $this->cloudfrontHeaders[ strtoupper( $key ) ] = $value;
571
+ $response = true;
572
+ }
573
+ }
574
+
575
+ return $response;
576
+ }
577
+
578
+ public function getMatchingRegex() {
579
+ return $this->matchingRegex;
580
+ }
581
+
582
+ public function getMatchesArray() {
583
+ return $this->matchesArray;
584
+ }
585
+
586
+ /**
587
+ * Magic overloading method.
588
+ *
589
+ * @method boolean is[...]()
590
+ * @param string $name
591
+ * @param array $arguments
592
+ *
593
+ * @return mixed
594
+ * @throws BadMethodCallException when the method doesn't exist and doesn't start with 'is'
595
+ */
596
+ public function __call( $name, $arguments ) {
597
+ // make sure the name starts with 'is', otherwise
598
+ if ( substr( $name, 0, 2 ) !== 'is' ) {
599
+ throw new BadMethodCallException( "No such method exists: $name" );
600
+ }
601
+
602
+ $this->setDetectionType( self::DETECTION_TYPE_MOBILE );
603
+
604
+ $key = substr( $name, 2 );
605
+
606
+ return $this->matchUAAgainstKey( $key );
607
+ }
608
+
609
+ /**
610
+ * Set the detection type. Must be one of self::DETECTION_TYPE_MOBILE or
611
+ * self::DETECTION_TYPE_EXTENDED. Otherwise, nothing is set.
612
+ *
613
+ * @param string $type The type. Must be a self::DETECTION_TYPE_* constant. The default
614
+ * parameter is null which will default to self::DETECTION_TYPE_MOBILE.
615
+ *
616
+ * @deprecated since version 2.6.9
617
+ *
618
+ */
619
+ public function setDetectionType( $type = null ) {
620
+ if ( $type === null ) {
621
+ $type = self::DETECTION_TYPE_MOBILE;
622
+ }
623
+
624
+ if ( $type !== self::DETECTION_TYPE_MOBILE && $type !== self::DETECTION_TYPE_EXTENDED ) {
625
+ return;
626
+ }
627
+
628
+ $this->detectionType = $type;
629
+ }
630
+
631
+ /**
632
+ * Search for a certain key in the rules array.
633
+ * If the key is found then try to match the corresponding
634
+ * regex against the User-Agent.
635
+ *
636
+ * @param string $key
637
+ *
638
+ * @return boolean
639
+ */
640
+ protected function matchUAAgainstKey( $key ) {
641
+ // Make the keys lowercase so we can match: isIphone(), isiPhone(), isiphone(), etc.
642
+ $key = strtolower( $key );
643
+ if ( false === isset( $this->cache[ $key ] ) ) {
644
+
645
+ // change the keys to lower case
646
+ $_rules = array_change_key_case( $this->getRules() );
647
+
648
+ if ( false === empty( $_rules[ $key ] ) ) {
649
+ $this->cache[ $key ] = $this->match( $_rules[ $key ] );
650
+ }
651
+
652
+ if ( false === isset( $this->cache[ $key ] ) ) {
653
+ $this->cache[ $key ] = false;
654
+ }
655
+ }
656
+
657
+ return $this->cache[ $key ];
658
+ }
659
+
660
+ /**
661
+ * Retrieve the current set of rules.
662
+ *
663
+ * @return array
664
+ * @deprecated since version 2.6.9
665
+ *
666
+ */
667
+ public function getRules() {
668
+ if ( $this->detectionType == self::DETECTION_TYPE_EXTENDED ) {
669
+ return self::getMobileDetectionRulesExtended();
670
+ } else {
671
+ return self::getMobileDetectionRules();
672
+ }
673
+ }
674
+
675
+ /**
676
+ * Method gets the mobile detection rules + utilities.
677
+ * The reason this is separate is because utilities rules
678
+ * don't necessary imply mobile. This method is used inside
679
+ * the new $detect->is('stuff') method.
680
+ *
681
+ * @return array All the rules + extended.
682
+ * @deprecated since version 2.6.9
683
+ *
684
+ */
685
+ public function getMobileDetectionRulesExtended() {
686
+ static $rules;
687
+
688
+ if ( ! $rules ) {
689
+ // Merge all rules together.
690
+ $rules = array_merge(
691
+ self::$phoneDevices,
692
+ self::$tabletDevices,
693
+ self::$operatingSystems,
694
+ self::$browsers,
695
+ self::$utilities
696
+ );
697
+ }
698
+
699
+ return $rules;
700
+ }
701
+
702
+ /**
703
+ * Method gets the mobile detection rules. This method is used for the magic methods $detect->is*().
704
+ *
705
+ * @return array All the rules (but not extended).
706
+ * @deprecated since version 2.6.9
707
+ *
708
+ */
709
+ public static function getMobileDetectionRules() {
710
+ static $rules;
711
+
712
+ if ( ! $rules ) {
713
+ $rules = array_merge(
714
+ self::$phoneDevices,
715
+ //self::$tabletDevices,
716
+ self::$operatingSystems,
717
+ self::$browsers
718
+ );
719
+ }
720
+
721
+ return $rules;
722
+
723
+ }
724
+
725
+ /**
726
+ * Some detection rules are relative (not standard),
727
+ * because of the diversity of devices, vendors and
728
+ * their conventions in representing the User-Agent or
729
+ * the HTTP headers.
730
+ *
731
+ * This method will be used to check custom regexes against
732
+ * the User-Agent string.
733
+ *
734
+ * @param $regex
735
+ * @param string $userAgent
736
+ *
737
+ * @return bool
738
+ *
739
+ * @todo: search in the HTTP headers too.
740
+ */
741
+ public function match( $regex, $userAgent = null ) {
742
+ $match = (bool) preg_match( sprintf( '#%s#is', $regex ), ( false === empty( $userAgent ) ? $userAgent : $this->userAgent ), $matches );
743
+ // If positive match is found, store the results for debug.
744
+ if ( $match ) {
745
+ $this->matchingRegex = $regex;
746
+ $this->matchesArray = $matches;
747
+ }
748
+
749
+ return $match;
750
+ }
751
+
752
+ /**
753
+ * Check if the device is mobile.
754
+ * Returns true if any type of mobile device detected, including special ones
755
+ *
756
+ * @param null $userAgent deprecated
757
+ * @param null $httpHeaders deprecated
758
+ *
759
+ * @return bool
760
+ */
761
+ public function isMobile( $userAgent = null, $httpHeaders = null ) {
762
+
763
+ if ( $httpHeaders ) {
764
+ $this->setHttpHeaders( $httpHeaders );
765
+ }
766
+
767
+ if ( $userAgent ) {
768
+ $this->setUserAgent( $userAgent );
769
+ }
770
+
771
+ // Check specifically for cloudfront headers if the useragent === 'Amazon CloudFront'
772
+ if ( $this->getUserAgent() === 'Amazon CloudFront' ) {
773
+ $cfHeaders = $this->getCfHeaders();
774
+ if ( array_key_exists( 'HTTP_CLOUDFRONT_IS_MOBILE_VIEWER', $cfHeaders ) && $cfHeaders['HTTP_CLOUDFRONT_IS_MOBILE_VIEWER'] === 'true' ) {
775
+ return true;
776
+ }
777
+ }
778
+
779
+ $this->setDetectionType( self::DETECTION_TYPE_MOBILE );
780
+
781
+ if ( $this->checkHttpHeadersForMobile() ) {
782
+ return true;
783
+ } else {
784
+ return $this->matchDetectionRulesAgainstUA();
785
+ }
786
+
787
+ }
788
+
789
+ /**
790
+ * Retrieve the User-Agent.
791
+ *
792
+ * @return string|null The user agent if it's set.
793
+ */
794
+ public function getUserAgent() {
795
+ return $this->userAgent;
796
+ }
797
+
798
+ /**
799
+ * Set the User-Agent to be used.
800
+ *
801
+ * @param string $userAgent The user agent string to set.
802
+ *
803
+ * @return string|null
804
+ */
805
+ public function setUserAgent( $userAgent = null ) {
806
+ // Invalidate cache due to #375
807
+ $this->cache = [];
808
+
809
+ if ( false === empty( $userAgent ) ) {
810
+ return $this->userAgent = $userAgent;
811
+ } else {
812
+ $this->userAgent = null;
813
+ foreach ( $this->getUaHttpHeaders() as $altHeader ) {
814
+ if ( false === empty( $this->httpHeaders[ $altHeader ] ) ) { // @todo: should use getHttpHeader(), but it would be slow. (Serban)
815
+ $this->userAgent .= $this->httpHeaders[ $altHeader ] . ' ';
816
+ }
817
+ }
818
+
819
+ if ( ! empty( $this->userAgent ) ) {
820
+ return $this->userAgent = trim( $this->userAgent );
821
+ }
822
+ }
823
+
824
+ if ( count( $this->getCfHeaders() ) > 0 ) {
825
+ return $this->userAgent = 'Amazon CloudFront';
826
+ }
827
+
828
+ return $this->userAgent = null;
829
+ }
830
+
831
+ /**
832
+ * Retrieves the cloudfront headers.
833
+ *
834
+ * @return array
835
+ */
836
+ public function getCfHeaders() {
837
+ return $this->cloudfrontHeaders;
838
+ }
839
+
840
+ /**
841
+ * Check the HTTP headers for signs of mobile.
842
+ * This is the fastest mobile check possible; it's used
843
+ * inside isMobile() method.
844
+ *
845
+ * @return bool
846
+ */
847
+ public function checkHttpHeadersForMobile() {
848
+
849
+ foreach ( $this->getMobileHeaders() as $mobileHeader => $matchType ) {
850
+ if ( isset( $this->httpHeaders[ $mobileHeader ] ) ) {
851
+ if ( is_array( $matchType['matches'] ) ) {
852
+ foreach ( $matchType['matches'] as $_match ) {
853
+ if ( strpos( $this->httpHeaders[ $mobileHeader ], $_match ) !== false ) {
854
+ return true;
855
+ }
856
+ }
857
+
858
+ return false;
859
+ } else {
860
+ return true;
861
+ }
862
+ }
863
+ }
864
+
865
+ return false;
866
+
867
+ }
868
+
869
+ public function getMobileHeaders() {
870
+ return self::$mobileHeaders;
871
+ }
872
+
873
+ /**
874
+ * Find a detection rule that matches the current User-agent.
875
+ *
876
+ * @param null $userAgent deprecated
877
+ *
878
+ * @return boolean
879
+ */
880
+ protected function matchDetectionRulesAgainstUA( $userAgent = null ) {
881
+ // Begin general search.
882
+ foreach ( $this->getRules() as $_regex ) {
883
+ if ( empty( $_regex ) ) {
884
+ continue;
885
+ }
886
+
887
+ if ( $this->match( $_regex, $userAgent ) ) {
888
+ return true;
889
+ }
890
+ }
891
+
892
+ return false;
893
+ }
894
+
895
+ }
inc/class-settings.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Mediavine\Grow;
3
+
4
+ class Settings extends \Social_Pug {
5
+
6
+ private static $instance = null;
7
+
8
+ private $no_setting_flag = 'NO_SETTING';
9
+
10
+ /**
11
+ * Get instance of Class
12
+ * @return Settings
13
+ */
14
+ public static function get_instance() {
15
+ if ( null === self::$instance ) {
16
+ self::$instance = new self();
17
+ self::$instance->init();
18
+ }
19
+
20
+ return self::$instance;
21
+ }
22
+
23
+ /**
24
+ * Set up hooks
25
+ */
26
+ public function init() {
27
+ }
28
+
29
+ /**
30
+ * Internal get settings implementation,Allows the output to be filtered, and set via Query Parameters for QA
31
+ *
32
+ * @param string $slug
33
+ * @param mixed $default
34
+ *
35
+ * @return mixed
36
+ */
37
+ private function get_setting_internal( $slug, $default = [] ) {
38
+ $setting = get_option( $slug, $default );
39
+
40
+ $setting = apply_filters( 'mv_grow_setting_' . $slug, $setting );
41
+ if ( apply_filters( 'mv_grow_flag_allow_settings_query', false ) ) {
42
+ // For QA purposes, allow settings to be programmatically set via query params, this code should only be reachable in development
43
+ $parsed_setting = $this->parse_setting_from_query( $slug );
44
+ if ( $parsed_setting !== $this->no_setting_flag ) {
45
+ if ( ! is_array( $setting ) ) {
46
+ $setting = $parsed_setting;
47
+ } else {
48
+ $setting = array_merge( $setting, $parsed_setting );
49
+ }
50
+ }
51
+ }
52
+
53
+ return $setting;
54
+ }
55
+
56
+ /**
57
+ * Public facing static get setting method, uses the same function signature as the native WordPress get option for easy replacement
58
+ * @param string $slug
59
+ * @param array $default
60
+ *
61
+ * @return mixed
62
+ */
63
+ public static function get_setting( $slug, $default = [] ) {
64
+ $settings_instance = self::get_instance();
65
+
66
+ return $settings_instance->get_setting_internal( $slug, $default );
67
+ }
68
+
69
+ /**
70
+ * Get settings values from the Get Query Parameter
71
+ * Warning, this path should not be able to be reached in production
72
+ * @param string $slug Setting slug to look for
73
+ *
74
+ * @return array|mixed
75
+ */
76
+ public function parse_setting_from_query( $slug ) {
77
+ return $_GET && isset( $_GET[ $slug ] ) ? $_GET[ $slug ] : $this->no_setting_flag;
78
+ }
79
+ }
inc/class-share-counts.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Mediavine\Grow;
4
+
5
+ if ( class_exists( 'Social_Pug' ) ) {
6
+ class Share_Counts extends \Social_Pug {
7
+
8
+ /**
9
+ * WordPress post meta key for the last updated timestamp
10
+ * @var string $last_updated_key
11
+ */
12
+ public static $last_updated_key = 'dpsp_networks_shares_last_updated';
13
+
14
+ private static $instance = null;
15
+
16
+ public static function get_instance() {
17
+ if ( null === self::$instance ) {
18
+ self::$instance = new self;
19
+ self::$instance->init();
20
+ }
21
+
22
+ return self::$instance;
23
+ }
24
+
25
+ public function init() {
26
+ }
27
+
28
+ /**
29
+ * Set the last updated timestamp to a value very far in the past so that the value will be updated when it is next checked
30
+ */
31
+ public static function invalidate_all() {
32
+ $posts = self::get_all_posts_with_counts();
33
+ foreach ( $posts as $post ) {
34
+ \update_post_meta( $post->ID, self::$last_updated_key, 1 );
35
+ }
36
+ }
37
+
38
+ /**
39
+ * Return an array with all posts that have share counts
40
+ * @return \WP_Post[]
41
+ */
42
+ public static function get_all_posts_with_counts() {
43
+ $args = [
44
+ 'meta_query' => [
45
+ [
46
+ 'key' => self::$last_updated_key,
47
+ 'compare' => 'EXISTS',
48
+ ],
49
+ ],
50
+ 'nopaging' => true,
51
+ ];
52
+
53
+ return \get_posts( $args );
54
+ }
55
+ }
56
+ }
inc/functions-admin.php CHANGED
@@ -6,37 +6,35 @@
6
  */
7
  function dpsp_admin_header() {
8
 
9
- if( empty( $_GET['page'] ) )
10
  return;
 
11
 
12
- if( false === strpos( $_GET['page'], 'dpsp' ) )
13
  return;
 
14
 
15
  $page = trim( $_GET['page'] );
16
 
17
  echo '<div class="dpsp-page-header">';
18
  echo '<span class="dpsp-logo">';
19
- echo '<svg version="1.1" class="mv-grow-logo" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 20 20" fill="white" xml:space="preserve">
20
  <path d="M0 7.2c0 .1-.6 4.7 2 7.2 1.7 1.8 4.3 2 5.9 2h.9A12.7 12.7 0 014.4 14a6.7 6.7 0 01-1.6-2.3c-.3-.9-.5-1.9-.4-3 0-.7.2-1.6.5-2.4h-2l-.7.1-.1.8zM4.7 3.4l-.4.6-.8 1.8 2.4.5 1.3-2c-1-.5-1.7-.7-1.8-.7l-.7-.2z"/>
21
  <path d="M3.3 11.5c1.1 2.8 4.3 4 5.5 4.4l-.5-.4-.4-.4a10.7 10.7 0 01-2.2-3c-.4-1-.6-1.9-.6-2.8 0-.7.2-1.4.4-2.1l.1-.2.1-.3a10.8 10.8 0 00-2.1-.4h-.3v.4a7.4 7.4 0 000 4.8zM10.6 2.8l-.6-.4-.6.4L8 4.2l2 1.3c.6-.5 1.3-1 2-1.3l-1.4-1.4zM6.5 6.6h.2l1.6 1.1a6.4 6.4 0 011.4-1.9L8 4.8l-.2-.2-.2-.1-.2.2-.1.2c-.4.4-.8 1-1 1.6h.1z"/>
22
  <path d="M6 7.1v.2a6 6 0 00-.4 2c0 3 2.4 5.4 3.4 6.2l-.3-.5-.2-.6a12.5 12.5 0 01-.8-3.4A7 7 0 018 8.4l.1-.3a6 6 0 00-1.6-1L6.3 7h-.2V7zM15.3 3.5l-.7.1s-.8.2-1.8.7c.5.7 1 1.3 1.3 2l.5-.1a11 11 0 011.9-.4l-.8-1.7-.4-.6zM13.4 6.6l.3-.1-1-1.6-.2-.2-.2-.2-.2.1-.2.1-1.6 1.1.2.2.1.2c.5.4.8 1 1 1.5a6.6 6.6 0 011.8-1.1zM10.3 6.5l-.2-.2-.1-.1-.2.1-.1.2a5.8 5.8 0 00-1 1.6v.1h.1l.2.2c.4.5.7 1.1 1 1.8a7 7 0 011-1.8l.1-.2.2-.2c-.2-.6-.6-1-1-1.5z"/>
23
  <path d="M8.7 8.9v-.2h-.1l-.2-.2V9h-.1c-.6 2.5.5 5 1 6.1v-.6-.6-1.1l.2-1 .1-.5.1-.4a6.9 6.9 0 00-1-2zM17 6.3h-.4c-.7 0-1.5.2-2.3.4l-.2.1-.3.1h-.2l-.2.2A6 6 0 0012 8l-.2.2-.2.2-.2.2-.1.2c-.5.6-.8 1.3-1 2l-.1.4-.1.3v.2l-.1.5v.2a12 12 0 000 3V16.4h.5l.2.1H12c1.6 0 4.2-.2 6-2 2.5-2.5 1.8-7 1.8-7.3v-.7H19a10.2 10.2 0 00-2-.1zm-.4 6.8c-1.3 1.2-3.3 1.4-4.6 1.4h-.3c0-1.3.1-3.6 1.4-4.9 1.2-1.2 3.3-1.4 4.5-1.4h.4c0 1.2 0 3.5-1.4 4.9z"/>
24
  </svg>
25
  ';
26
- echo '<span class="dpsp-logo-inner">Grow by Mediavine</span>';
27
  echo '<small class="dpsp-version">v.' . DPSP_VERSION . '</small>';
28
  echo '</span>';
29
 
30
  echo '<nav>';
31
  echo '<a href="' . dpsp_get_documentation_link( $page ) . '" target="_blank"><i class="dashicons dashicons-book"></i>Documentation</a>';
32
- //echo '<a href="https://wordpress.org/support/view/plugin-reviews/social-pug?filter=5#postform" target="_blank">5<i class="dashicons dashicons-star-filled"></i>Leave a Review</a>';
33
  echo '</nav>';
34
-
35
  echo '</div>';
36
 
37
  }
38
- add_action( 'admin_notices', 'dpsp_admin_header', 1 );
39
-
40
 
41
  /*
42
  * Returns the link to the docs depending on the page the user is on
@@ -46,18 +44,30 @@
46
 
47
  $page = str_replace( 'dpsp-', '', $page );
48
 
49
- switch( $page ) {
50
 
51
  case 'sidebar':
52
- $url = 'https://docs.devpups.com/social-pug/floating-sidebar-settings/';
53
  break;
54
 
55
  case 'content':
56
- $url = 'https://docs.devpups.com/social-pug/before-and-after-content-settings/';
 
 
 
 
 
57
  break;
58
 
 
 
 
 
 
 
 
59
  default:
60
- $url = 'https://docs.devpups.com/social-pug/';
61
  break;
62
  }
63
 
@@ -66,66 +76,66 @@
66
  }
67
 
68
 
69
- /*
70
  * Displays the HTML for a given tool
71
- *
72
  * @param array $tool
73
  *
74
  */
75
  function dpsp_output_tool_box( $tool_slug, $tool ) {
 
 
 
 
 
76
 
77
- echo '<div class="' . ( ! empty( $tool['admin_page'] ) ? 'dpsp-col-3-8' : 'dpsp-col-1-4' ) . '">';
78
-
79
- echo '<div class="dpsp-tool-wrapper dpsp-card ' . ( empty($tool['admin_page']) ? 'dpsp-unavailable' : '' ) . '">';
80
 
81
- // Tool image
82
- if( !isset( $tool['admin_page'] ) ) {
83
  if( empty( $tool['url'] ) )
84
- $tool['url'] = 'http://www.devpups.com/';
85
 
86
  echo '<a href="' . $tool['url'] . '">';
87
  }
88
 
89
- echo '<img src="' . DPSP_PLUGIN_DIR_URL . $tool['img'] . '" />';
 
90
 
91
- if( !isset( $tool['admin_page'] ) )
92
  echo '</a>';
 
93
 
94
  // Tool name
95
  echo '<h4 class="dpsp-tool-name">' . $tool['name'] . '</h4>';
96
 
97
- if( !empty( $tool['desc'] ) )
98
  echo '<p class="dpsp-description">' . $tool['desc'] . '</p>';
 
99
 
100
  $tool_active = dpsp_is_tool_active( $tool_slug );
101
 
102
  // Tool actions
103
  echo '<div class="dpsp-tool-actions dpsp-card-footer dpsp-' . ( $tool_active ? 'active' : 'inactive' ) . '">';
104
-
105
- if( isset( $tool['admin_page'] ) ) {
106
 
107
- // Tool admin page
108
- echo '<a class="dpsp-tool-settings" href="' . admin_url( $tool['admin_page'] ) . '"><i class="dashicons dashicons-admin-generic"></i>' . __( 'Settings', 'social-pug' ) . '</a>';
 
109
 
110
- // Tool activation switch
111
- echo '<div class="dpsp-switch small">';
112
 
113
- echo ( $tool_active ? '<span>' . __( 'Active', 'social-pug' ) . '</span>' : '<span>' . __( 'Inactive', 'social-pug' ) . '</span>' );
114
 
115
- echo '<input id="dpsp-' . $tool_slug . '-active" data-tool="' . $tool_slug . '" data-tool-activation="' . $tool['activation_setting'] . '" class="cmn-toggle cmn-toggle-round" type="checkbox" value="1"' . ( $tool_active ? 'checked' : '' ) . ' />';
116
- echo '<label for="dpsp-' . $tool_slug . '-active"></label>';
117
 
118
- echo '</div>';
119
-
120
- } else {
121
-
122
- if( empty( $tool['url'] ) )
123
- $tool['url'] = 'http://www.devpups.com/';
124
-
125
- echo '<a href="' . $tool['url'] . '" class="dpsp-button-primary">' . __( 'Learn More', 'social-pug' ) . '</a>';
126
 
127
- }
128
 
 
129
  echo '</div>';
130
 
131
  echo '</div>';
@@ -138,25 +148,24 @@
138
  * Function that displays the HTML for a settings field
139
  *
140
  */
141
- function dpsp_settings_field( $type, $name, $saved_value = '', $label = '', $options = array(), $tooltip = '', $editor_settings = array() ) {
142
 
143
- $settings_field_slug = ( !empty($label) ? strtolower(str_replace(' ', '-', $label)) : '' );
144
 
145
- echo '<div class="dpsp-setting-field-wrapper dpsp-setting-field-' . $type . ( is_array( $options ) && count( $options ) == 1 ? ' dpsp-single' : ( is_array( $options ) && count( $options ) > 1 ? ' dpsp-multiple' : '' ) ) . ' ' . ( !empty($label) ? 'dpsp-has-field-label dpsp-setting-field-' . $settings_field_slug : '' ) . '">';
146
 
147
- switch( $type ) {
148
 
149
  // Display input type text
150
  case 'text':
 
151
 
152
- echo !empty( $label ) ? '<label for="' . esc_attr( $name ) . '" class="dpsp-setting-field-label">' . $label . '</label>' : '';
153
-
154
- echo '<input type="text" ' . ( isset( $label ) ? 'id="' . esc_attr( $name ) . '"' : '' ) . ' name="' . esc_attr( $name ) . '" value="' . esc_attr( $saved_value ) . '" />';
155
  break;
156
 
157
  // Display textareas
158
  case 'textarea':
159
- echo !empty( $label ) ? '<label for="' . esc_attr( $name ) . '" class="dpsp-setting-field-label">' . $label . '</label>' : '';
160
 
161
  echo '<textarea ' . ( isset( $label ) ? 'id="' . esc_attr( $name ) . '"' : '' ) . ' name="' . esc_attr( $name ) . '">' . $saved_value . '</textarea>';
162
 
@@ -164,7 +173,7 @@
164
 
165
  // Display wp_editors
166
  case 'editor':
167
- echo !empty( $label ) ? '<label for="' . esc_attr( $name ) . '" class="dpsp-setting-field-label">' . $label . '</label>' : '';
168
 
169
  wp_editor( $saved_value, $name, $editor_settings );
170
 
@@ -172,11 +181,10 @@
172
 
173
  // Display input type radio
174
  case 'radio':
 
175
 
176
- echo !empty( $label ) ? '<label class="dpsp-setting-field-label">' . $label . '</label>' : '';
177
-
178
- if( !empty( $options ) ) {
179
- foreach( $options as $option_value => $option_name ) {
180
  echo '<input type="radio" id="' . esc_attr( $name ) . '[' . esc_attr( $option_value ) . ']' . '" name="' . esc_attr( $name ) . '" value="' . esc_attr( $option_value ) . '" ' . checked( $option_value, $saved_value, false ) . ' />';
181
  echo '<label for="' . esc_attr( $name ) . '[' . esc_attr( $option_value ) . ']' . '" class="dpsp-settings-field-radio">' . ( isset( $option_name ) ? $option_name : $option_value ) . '<span></span></label>';
182
  }
@@ -185,38 +193,37 @@
185
 
186
  // Display input type checkbox
187
  case 'checkbox':
188
-
189
  // If no options are passed make the main label as the label for the checkbox
190
- if( count( $options ) == 1 ) {
191
 
192
- if( is_array( $saved_value ) )
193
  $saved_value = $saved_value[0];
 
194
 
195
  echo '<input type="checkbox" ' . ( isset( $label ) ? 'id="' . esc_attr( $name ) . '"' : '' ) . ' name="' . esc_attr( $name ) . '" value="' . esc_attr( $options[0] ) . '" ' . checked( $options[0], $saved_value, false ) . ' />';
196
- echo !empty( $label ) ? '<label for="' . esc_attr( $name ) . '" class="dpsp-setting-field-label">' . $label . '<span></span></label>' : '';
197
 
198
  // Else display checkboxes just like radios
199
  } else {
200
 
201
- echo !empty( $label ) ? '<label class="dpsp-setting-field-label">' . $label . '</label>' : '';
202
 
203
- if( !empty( $options ) ) {
204
- foreach( $options as $option_value => $option_name ) {
205
  echo '<input type="checkbox" id="' . esc_attr( $name ) . '[' . esc_attr( $option_value ) . ']' . '" name="' . esc_attr( $name ) . '" value="' . esc_attr( $option_value ) . '" ' . ( in_array( $option_value, $saved_value ) ? 'checked' : '' ) . ' />';
206
  echo '<label for="' . esc_attr( $name ) . '[' . esc_attr( $option_value ) . ']' . '" class="dpsp-settings-field-checkbox">' . ( isset( $option_name ) ? $option_name : $option_value ) . '<span></span></label>';
207
  }
208
  }
209
-
210
- }
211
  break;
212
 
213
  // Display switch
214
  case 'switch':
 
215
 
216
- if( count( $options ) == 1 ) {
217
-
218
- if( is_array( $saved_value ) )
219
  $saved_value = $saved_value[0];
 
220
 
221
  echo '<div class="dpsp-switch">';
222
  echo '<input type="checkbox" ' . ( isset( $label ) ? 'id="' . esc_attr( $name ) . '"' : '' ) . ' name="' . esc_attr( $name ) . '" class="cmn-toggle cmn-toggle-round" value="' . esc_attr( $options[0] ) . '" ' . checked( $options[0], $saved_value, false ) . ' />';
@@ -239,11 +246,10 @@
239
  break;
240
 
241
  case 'select':
 
 
242
 
243
- echo !empty( $label ) ? '<label for="' . esc_attr( $name ) . '" class="dpsp-setting-field-label">' . $label . '</label>' : '';
244
- echo '<select id="' . esc_attr( $name ) . '" name="' . esc_attr( $name ) . '">';
245
-
246
- foreach( $options as $option_value => $option_name ) {
247
  echo '<option value="' . esc_attr( $option_value ) . '" ' . selected( $saved_value, $option_value, false ) . '>' . $option_name . '</option>';
248
  }
249
 
@@ -252,27 +258,27 @@
252
  break;
253
 
254
  case 'color-picker':
255
- echo !empty( $label ) ? '<label for="' . esc_attr( $name ) . '" class="dpsp-setting-field-label">' . $label . '</label>' : '';
256
 
257
  echo '<input class="dpsp-color-picker" type="text" ' . ( isset( $label ) ? 'id="' . esc_attr( $name ) . '"' : '' ) . ' name="' . esc_attr( $name ) . '" value="' . esc_attr( $saved_value ) . '" />';
258
  break;
259
 
260
  case 'image':
261
- echo !empty( $label ) ? '<label for="' . esc_attr( $name ) . '" class="dpsp-setting-field-label">' . $label . '</label>' : '';
262
 
263
  echo '<div>';
264
-
265
- if( !empty( $saved_value['id'] ) ) {
266
  $thumb_details = wp_get_attachment_image_src( $saved_value['id'], 'medium' );
267
  $image_details = wp_get_attachment_image_src( $saved_value['id'], 'full' );
268
  }
269
 
270
- if( !empty( $thumb_details[0] ) && !empty( $image_details[0] ) ) {
271
- $thumb_src = $thumb_details[0];
272
- $image_src = $image_details[0];
273
  } else {
274
- $thumb_src = '';
275
- $image_src = '';
276
  $saved_value['id'] = '';
277
  }
278
 
@@ -280,7 +286,7 @@
280
  echo '<img src="' . esc_attr( $thumb_src ) . '">';
281
  echo '</div>';
282
 
283
- echo '<a class="dpsp-image-select button button-primary ' . ( !empty( $saved_value['id'] ) ? 'hidden' : '' ) . '" href="#">' . __( 'Select Image', 'social-pug' ) . '</a>';
284
  echo '<a class="dpsp-image-remove button button-secondary ' . ( empty( $saved_value['id'] ) ? 'hidden' : '' ) . '" href="#">' . __( 'Remove Image', 'social-pug' ) . '</a>';
285
 
286
  echo '<input class="dpsp-image-id" type="hidden" name="' . esc_attr( $name ) . '[id]" value="' . esc_attr( $saved_value['id'] ) . '" />';
@@ -292,14 +298,13 @@
292
 
293
  } // end of switch
294
 
295
-
296
  // Tooltip
297
- if( ! empty( $tooltip ) ) {
298
 
299
  dpsp_output_backend_tooltip( $tooltip );
300
 
301
  }
302
-
303
  do_action( 'dpsp_inner_after_settings_field', $settings_field_slug, $type, $name );
304
 
305
  echo '</div>';
@@ -307,71 +312,31 @@
307
  }
308
 
309
 
310
- /*
311
- * Activates a network location
312
  *
313
- */
314
- function dpsp_activate_tool() {
315
-
316
- if( empty( $_POST['dpsptkn'] ) || !wp_verify_nonce( $_POST['dpsptkn'], 'dpsptkn' ) )
317
- return 0;
318
-
319
- $tool_setting = sanitize_text_field( $_POST['setting'] );
320
-
321
- $option_name = explode( '[', $tool_setting );
322
- $option_name = $option_name[0];
323
-
324
- $settings = get_option( $option_name );
325
- $active_option = str_replace( array( $option_name, '[', ']' ) , '', $tool_setting );
326
-
327
- if( !isset( $settings[$active_option] ) ) {
328
-
329
- $settings[$active_option] = 1;
330
- update_option( $option_name, $settings );
331
-
332
- echo 1;
333
- } else
334
- echo 0;
335
-
336
-
337
- wp_die();
338
-
339
- }
340
- add_action( 'wp_ajax_dpsp_activate_tool', 'dpsp_activate_tool' );
341
-
342
-
343
- /*
344
- * Deactivates a network location
345
  *
346
  */
347
- function dpsp_deactivate_tool() {
348
-
349
- if( empty( $_POST['dpsptkn'] ) || !wp_verify_nonce( $_POST['dpsptkn'], 'dpsptkn' ) )
350
- return 0;
351
 
352
- $tool_setting = sanitize_text_field( $_POST['setting'] );
353
-
354
- $option_name = explode( '[', $tool_setting );
355
- $option_name = $option_name[0];
356
-
357
- $settings = get_option( $option_name );
358
- $active_option = str_replace( array( $option_name, '[', ']' ) , '', $tool_setting );
359
-
360
- if( isset( $settings[$active_option] ) ) {
361
-
362
- unset($settings[$active_option]);
363
- update_option( $option_name, $settings );
364
 
365
- echo 1;
366
- } else
367
- echo 0;
368
 
 
369
 
370
- wp_die();
371
 
372
  }
373
- add_action( 'wp_ajax_dpsp_deactivate_tool', 'dpsp_deactivate_tool' );
374
-
375
 
376
  /**
377
  * Returns the HTML output with the selectable networks
@@ -380,30 +345,30 @@
380
  * @param array $settings_networks - the networks saved for the location
381
  *
382
  */
383
- function dpsp_output_selectable_networks( $networks = array(), $settings_networks ) {
384
 
385
  $output = '<div id="dpsp-networks-selector-wrapper">';
386
 
387
  $output .= '<ul id="dpsp-networks-selector">';
388
 
389
- if( !empty($networks) ) {
390
- foreach( $networks as $network_slug => $network_name ) {
391
- $output .= '<li>';
392
- $output .= '<div class="dpsp-network-item" data-network="' . $network_slug . '" data-network-name="' . $network_name . '" ' . ( isset( $settings_networks[$network_slug] ) ? 'data-checked="true"' : '' ) . '>';
393
- $output .= '<div class="dpsp-network-item-checkbox dpsp-icon-ok"></div>';
394
- $output .= '<div class="dpsp-network-item-name-wrapper dpsp-network-' . $network_slug . ' dpsp-background-color-network-' . $network_slug . '">';
395
  $output .= '<span class="dpsp-list-icon dpsp-list-icon-social dpsp-icon-' . $network_slug . ' dpsp-background-color-network-' . $network_slug . '"><!-- --></span>';
396
  $output .= '<h4>' . $network_name . '</h4>';
397
- $output .= '</div>';
398
- $output .= '</li>';
399
  }
400
  }
401
 
402
  $output .= '</ul>';
403
 
404
- $output .= '<div id="dpsp-networks-selector-footer" class="dpsp-card-footer">';
405
  $output .= '<a href="#" class="dpsp-button-primary">' . __( 'Apply Selection', 'social-pug' ) . '</a>';
406
- $output .= '</div>';
407
 
408
  $output .= '</div>';
409
 
@@ -421,9 +386,9 @@
421
 
422
  $current_network = 1;
423
 
424
- if( ! empty( $networks ) ) {
425
 
426
- foreach( $networks as $network_slug => $network ) {
427
 
428
  $output .= '<li data-network="' . $network_slug . '" ' . ( $current_network == count( $networks ) ? 'class="dpsp-last"' : '' ) . '>';
429
 
@@ -434,22 +399,21 @@
434
  $output .= '<div class="dpsp-list-icon dpsp-list-icon-social dpsp-icon-' . $network_slug . ' dpsp-background-color-network-' . $network_slug . '"><!-- --></div>';
435
 
436
  // The label edit field
437
- $output .= '<div class="dpsp-list-input-wrapper">';
438
  $output .= '<input type="text" placeholder="' . __( 'This button has no label text.', 'social-pug' ) . '" name="' . $settings_name . '[networks][' . $network_slug . '][label]" value="' . ( isset( $network['label'] ) ? esc_attr( $network['label'] ) : dpsp_get_network_name( $network_slug ) ) . '" />';
439
- $output .= '</div>';
440
 
441
  // List item actions
442
- $output .= '<div class="dpsp-list-actions">';
443
  $output .= '<a class="dpsp-list-edit-label" href="#"><span class="dashicons dashicons-edit"></span>' . __( 'Edit Label' ) . '</a>';
444
  $output .= '<a class="dpsp-list-remove" href="#"><span class="dashicons dashicons-no-alt"></span>' . __( 'Remove' ) . '</a>';
445
- $output .= '</div>';
446
- $output .= '</li>';
447
 
448
  $current_network++;
449
 
450
  }
451
-
452
- }
453
 
454
  $output .= '</ul>';
455
 
@@ -459,216 +423,250 @@
459
 
460
  /*
461
  * Outputs the HTML of the tooltip
462
- *
463
  * @param string tooltip - the text of the tooltip
464
  * @param bool $return - wether to return or to output the HTML
465
  *
466
  */
467
  function dpsp_output_backend_tooltip( $tooltip = '', $return = false ) {
468
 
469
- $output = '<div class="dpsp-setting-field-tooltip-wrapper ' . ( ( strpos( $tooltip, '</a>' ) !== false ) ? 'dpsp-has-link' : '' ) . '">';
470
  $output .= '<span class="dpsp-setting-field-tooltip-icon"></span>';
471
  $output .= '<div class="dpsp-setting-field-tooltip dpsp-transition">' . $tooltip . '</div>';
472
- $output .= '</div>';
473
 
474
- if( $return )
475
  return $output;
476
- else
477
- echo $output;
 
478
 
479
  }
480
 
481
-
482
  /*
483
- * Display admin notices for our pages
484
  *
485
  */
486
- function dpsp_admin_notices() {
487
 
488
- // Exit if settings updated is not present
489
- if( !isset( $_GET['settings-updated'] ) )
490
- return;
491
 
492
- $admin_page = ( isset( $_GET['page'] ) ? $_GET['page'] : '' );
 
 
 
 
 
 
 
493
 
494
- // Show these notices only on dpsp pages
495
- if( strpos( $admin_page, 'dpsp' ) === false || $admin_page == 'dpsp-register-version' )
496
- return;
 
 
 
 
 
 
497
 
498
- // Get messages
499
- $message_id = ( isset( $_GET['dpsp_message_id'] ) ? $_GET['dpsp_message_id'] : 0 );
500
- $message = dpsp_get_admin_notice_message( $message_id );
501
 
502
- $class = ( isset( $_GET['dpsp_message_class'] ) ? $_GET['dpsp_message_class'] : 'updated' );;
503
 
504
- if( isset( $message ) ) {
505
 
506
- echo '<div class="dpsp-admin-notice notice is-dismissible ' . esc_attr( $class ) . '">';
507
- echo '<p>' . esc_attr( $message ) . '</p>';
508
- echo '</div>';
 
 
 
509
  }
510
 
 
511
  }
512
- add_action( 'admin_notices', 'dpsp_admin_notices' );
513
 
514
 
515
  /**
516
- * Returns a human readable message given a message id
517
  *
518
- * @param int $message_id
 
 
519
  *
520
  */
521
- function dpsp_get_admin_notice_message( $message_id ) {
522
 
523
- $messages = apply_filters( 'dpsp_get_admin_notice_message', array(
524
- __( 'Settings saved. If you have any form of caching, please delete the cache in order for the changes to take effect immediately.', 'social-pug' ),
525
- __( 'Settings imported.', 'social-pug' ),
526
- __( 'Please select an import file.', 'social-pug' ),
527
- __( 'Import file is not valid.', 'social-pug' ),
528
- __( 'Grow App authorized successfully.', 'social-pug' )
529
- ));
530
 
531
- return $messages[ $message_id ];
532
  }
533
 
534
 
535
  /**
536
- * Remove dpsp query args from the URL
537
  *
538
- * @param array $removable_query_args - the args that WP will remove
 
539
  *
540
  */
541
- function dpsp_removable_query_args( $removable_query_args ) {
542
 
543
- $new_args = array( 'dpsp_message_id', 'dpsp_message_class' );
544
 
545
- return array_merge( $new_args, $removable_query_args );
 
 
546
 
547
  }
548
- add_filter( 'removable_query_args', 'dpsp_removable_query_args' );
549
 
550
 
551
  /**
552
- * Adds a sidebar to the submenu pages for subscribing to newsletter
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
553
  *
554
  */
555
- function dpsp_add_submenu_page_sidebar() {
556
 
557
- // The Settings Sidebar
558
- echo '<div class="dpsp-settings-sidebar">';
 
559
 
560
- echo '<div id="dpsp-settings-sidebar-social-pug-pro" class="dpsp-card">';
561
 
562
- echo '<div class="dpsp-card-inner">';
 
 
563
 
564
- echo '<img data-pin-nopin="true" src="' . DPSP_PLUGIN_DIR_URL . 'assets/src/img/social-pug-upgrade.png" />';
 
565
 
566
- echo '<h3>' . __( 'Skyrocket your social media marketing', 'social-pug' ) . '</h3>';
 
 
 
 
 
 
567
 
568
- echo '<p><span class="dpsp-dashicons"><span class="dashicons dashicons-yes"></span></span>' . __( 'Force a custom image to be shared on Pinterest when using the Pinterest button.', 'social-pug' ) . '</p>';
 
569
 
570
- echo '<p><span class="dpsp-dashicons"><span class="dashicons dashicons-yes"></span></span>' . __( 'Add unlimited hidden Pinterest images to your posts and pages.', 'social-pug' ) . '</p>';
 
 
 
 
571
 
572
- echo '<p><span class="dpsp-dashicons"><span class="dashicons dashicons-yes"></span></span>' . __( 'Add a "Pin It" button that appears when visitors hover your in-post images.', 'social-pug' ) . '</p>';
 
 
 
573
 
574
- echo '<p><span class="dpsp-dashicons"><span class="dashicons dashicons-yes"></span></span>' . __( 'Add custom pin descriptions and repin IDs to your in-post images.', 'social-pug' ) . '</p>';
575
 
576
- echo '<p><span class="dpsp-dashicons"><span class="dashicons dashicons-yes"></span></span>' . __( "Recover your lost social share counts if you've ever changed your permalink structure.", 'social-pug' ) . '</p>';
 
 
 
577
 
578
- echo '<p><span class="dpsp-dashicons"><span class="dashicons dashicons-yes"></span></span>' . __( 'Add unlimited "Click to Tweet" boxes so that your users can share your content on Twitter with just one click.', 'social-pug' ) . '</p>';
 
 
579
 
580
- echo '<p><span class="dpsp-dashicons"><span class="dashicons dashicons-yes"></span></span>' . __( 'Get immediate help with priority support.', 'social-pug' ) . '</p>';
581
 
582
- echo '<p><span class="dpsp-dashicons"><span class="dashicons dashicons-yes"></span></span>' . __( 'And much, much more...', 'social-pug' ) . '</p>';
583
-
584
- echo '</div>';
585
-
586
- echo '<div class="dpsp-card-footer"><a class="dpsp-button-primary" href="https://devpups.com/social-pug/?utm_source=plugin&amp;utm_medium=sidebar&amp;utm_campaign=social-pug" target="_blank">' . __( 'Upgrade to Pro', 'social-pug' ) . '</a></div>';
587
 
 
 
588
  echo '</div>';
 
589
 
590
- /*
591
-
592
- echo '<br /><hr />';
593
-
594
- ?>
595
- <!-- Begin MailChimp Signup Form -->
596
- <div id="dpsp-mailchimp-subscribe-wrapper">
597
- <form action="//devpups.us10.list-manage.com/subscribe/post?u=391911b7881ba9ca27be83107&amp;id=e8045e44a7" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
598
-
599
- <h3><?php echo __( 'Drive More Traffic', 'social-pug' ); ?></h3>
600
- <p><?php echo __( "Learn how to drive more traffic to your website with our free monthly tips and tricks.", 'social-pug' ); ?></p>
601
-
602
- <div class="mc-field-group">
603
- <label for="mce-EMAIL"><?php echo __( 'Email Address', 'social-pug' ); ?> *</label>
604
- <input type="email" value="" name="EMAIL" class="required email" required id="mce-EMAIL">
605
- </div>
606
- <div class="mc-field-group">
607
- <label for="mce-FNAME"><?php echo __( 'First Name', 'social-pug' ); ?> *</label>
608
- <input type="text" value="" name="FNAME" class="required" required id="mce-FNAME">
609
- </div>
610
-
611
- <div id="mce-responses" class="clear">
612
- <div class="response" id="mce-error-response" style="display:none"></div>
613
- <div class="response" id="mce-success-response" style="display:none"></div>
614
- </div> <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
615
-
616
- <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_391911b7881ba9ca27be83107_e8045e44a7" tabindex="-1" value=""></div>
617
- <div class="clear"><input type="submit" value="<?php echo __( 'Stay Informed', 'social-pug' ); ?>" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
618
-
619
- </form>
620
- </div>
621
- <!--End mc_embed_signup-->
622
 
623
- <?php
624
- */
 
 
 
 
 
625
 
 
 
 
 
 
 
 
 
 
 
626
 
 
627
  }
628
- add_action( 'dpsp_submenu_page_bottom', 'dpsp_add_submenu_page_sidebar' );
629
 
630
 
631
  /*
632
- * Add admin notice on plugin activation
633
  *
634
  */
635
- function dpsp_admin_notice_first_activation() {
636
 
637
- // Get first activation of the plugin
638
- $first_activation = get_option( 'dpsp_first_activation', '' );
639
-
640
- if( empty($first_activation) )
641
  return;
 
642
 
643
- // Do not display this notice if user cannot activate plugins
644
- if( !current_user_can( 'activate_plugins' ) )
645
- return;
646
 
647
- // Do not display this notice if plugin has been activated for more than 1 minute
648
- if( time() - 3 * MINUTE_IN_SECONDS >= $first_activation )
649
- return;
 
650
 
651
- // Do not display this notice for users that have dismissed it
652
- if( get_user_meta( get_current_user_id(), 'dpsp_admin_notice_first_activation', true ) != '' )
653
- return;
654
 
655
- // Echo the admin notice
656
- echo '<div class="dpsp-admin-notice dpsp-admin-notice-activation notice">';
657
-
658
- echo '<h4>' . __( 'Thank you for installing Grow by Mediavine. Let\'s start pumping up those social shares.', 'social-pug' ) . '</h4>';
659
-
660
- echo '<a class="dpsp-admin-notice-link" href="' . add_query_arg( array( 'dpsp_admin_notice_activation' => 1 ), admin_url('admin.php?page=dpsp-toolkit') ) . '"><span class="dashicons dashicons-admin-settings"></span>' . __( 'Go to the Plugin', 'social-pug' ) . '</a>';
661
- echo '<a class="dpsp-admin-notice-link" href="http://docs.devpups.com/?utm_source=plugin&utm_medium=plugin-activation&utm_campaign=social-pug" target="_blank"><span class="dashicons dashicons-book"></span>' . __( 'View Documentation', 'social-pug' ) . '</a>';
662
- echo '<a class="dpsp-admin-notice-link" href="https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin&utm_medium=plugin-activation&utm_campaign=social-pug" target="_blank"><span class="dashicons dashicons-external"></span>' . __( 'Upgrade to Pro', 'social-pug' ) . '</a>';
663
 
664
- echo '<a href="' . add_query_arg( array( 'dpsp_admin_notice_activation' => 1 ) ) . '" type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></a>';
 
 
 
665
 
666
- echo '</div>';
 
 
667
 
 
 
668
  }
669
- add_action( 'admin_notices', 'dpsp_admin_notice_first_activation' );
670
-
671
-
672
 
673
  /**
674
  * Add admin notice to let you know the Facebook access token has expired
@@ -677,39 +675,41 @@
677
  function dpsp_admin_notice_facebook_access_token_expired() {
678
 
679
  // Do not display this notice if user cannot activate plugins
680
- if( ! current_user_can( 'activate_plugins' ) )
681
  return;
 
682
 
683
- $transient = get_transient( 'dpsp_facebook_access_token' );
684
 
685
- // Do not display the notice of the access token is missing
686
- if( empty( $transient['access_token'] ) || empty( $transient['expires_in'] ) )
687
  return;
 
688
 
689
  // Do not display the notice if the token isn't expired
690
- if( time() < absint( $transient['expires_in'] ) )
691
  return;
 
692
 
693
- $settings = get_option( 'dpsp_settings', array() );
694
 
695
- // Do not display the notice if the Facebook share count provider isn't set to Grow by Mediavine's app
696
- if( ! empty( $settings['facebook_share_counts_provider'] ) && $settings['facebook_share_counts_provider'] != 'authorized_app' )
697
  return;
 
698
 
699
  // Echo the admin notice
700
  echo '<div class="dpsp-admin-notice notice notice-error">';
701
 
702
- echo '<h4>' . __( 'Grow Important Notification', 'social-pug' ) . '</h4>';
703
 
704
- echo '<p>' . __( 'Your Grow by Mediavine Facebook app authorization has expired. Please reauthorize the app for continued Facebook share counts functionality.', 'social-pug' ) . '</p>';
705
 
706
- echo '<p><a class="dpsp-button-primary" href="' . add_query_arg( array( 'page' => 'dpsp-settings' ), admin_url( 'admin.php' ) ) . '#dpsp-card-misc">' . __( 'Reauthorize Grow App', 'social-pug' ) . '</a></p>';
707
 
708
- echo '</div>';
709
 
710
  }
711
- add_action( 'admin_notices', 'dpsp_admin_notice_facebook_access_token_expired' );
712
-
713
 
714
  /**
715
  * Add admin notice to anounce the removal of Google+
@@ -718,37 +718,40 @@
718
  function dpsp_admin_notice_google_plus_removal() {
719
 
720
  // Do not display this notice if user cannot activate plugins
721
- if( ! current_user_can( 'activate_plugins' ) )
722
  return;
 
723
 
724
  // Don't show this if the plugin has been activated after 29th of July 2018
725
- $first_activation = get_option( 'dpsp_first_activation', '' );
726
 
727
- if( empty( $first_activation ) )
728
  return;
 
729
 
730
- if( $first_activation > strtotime( '2019-06-10 00:00:00' ) )
731
  return;
 
732
 
733
  // Do not display this notice for users that have dismissed it
734
- if( get_user_meta( get_current_user_id(), 'dpsp_admin_notice_google_plus_removal', true ) != '' )
735
  return;
 
736
 
737
  // Echo the admin notice
738
  echo '<div class="dpsp-admin-notice notice notice-error">';
739
 
740
- echo '<h4>' . __( 'Grow by Mediavine Important Notification', 'social-pug' ) . '</h4>';
741
 
742
- echo '<p>' . __( 'As you may already know, Google+ has shut down. As a result, with this latest update, Grow by Mediavine no longer supports Google+ functionality.', 'social-pug' ) . '</p>';
743
 
744
- echo '<p>' . __( 'Please make sure to verify your settings and remove any Google+ buttons you may have placed within your website.', 'social-pug' ) . '</p>';
745
 
746
- echo '<p><a href="' . add_query_arg( array( 'dpsp_admin_notice_google_plus_removal' => 1 ) ) . '">' . __( 'Thank you, I understand.', 'social-pug' ) . '</a></p>';
747
 
748
- echo '</div>';
749
 
750
  }
751
- add_action( 'admin_notices', 'dpsp_admin_notice_google_plus_removal' );
752
 
753
  /**
754
  * Add admin notice to anounce the name change
@@ -757,108 +760,180 @@
757
  function dpsp_admin_notice_grow_name_change() {
758
 
759
  // Do not display this notice if user cannot activate plugins
760
- if( ! current_user_can( 'activate_plugins' ) )
761
  return;
 
762
 
763
  // Don't show this if the plugin has been activated after 30th of Nov 2019
764
- $first_activation = get_option( 'dpsp_first_activation', '' );
765
 
766
- if( empty( $first_activation ) )
767
  return;
 
768
 
769
- if( $first_activation > strtotime( '2019-11-30 00:00:00' ) )
770
  return;
 
771
 
772
  // Do not display this notice for users that have dismissed it
773
- if( get_user_meta( get_current_user_id(), 'dpsp_admin_notice_grow_name_change', true ) != '' )
774
  return;
 
775
 
776
  // Echo the admin notice
777
  echo '<div class="dpsp-admin-notice dpsp-admin-grow-notice notice notice-info">';
778
  echo '<div class="notice-img-wrap" >';
779
- echo '<img src="' . DPSP_PLUGIN_DIR_URL . 'assets/src/img/grow-logo-sq-navy.png" />';
780
  echo '</div>';
781
  echo '<div class="notice-text-wrap">';
782
 
783
- echo '<h4>' . __( 'Social Pug is now Grow by Mediavine!', 'social-pug' ) . '</h4>';
 
 
784
 
785
- echo '<p>' . __( 'You\'re going to notice some new paint and a new name today and we wanted to let you know what that\'s all about. The short version is that Grow by Mediavine is the same plugin you know and love but with a new, larger development team!', 'social-pug' ) . '</p>';
786
-
787
- echo '<p><a href="https://www.mediavine.com/social-pug-is-now-grow-mediavines-new-social-sharing-buttons-marketplace-more/" target="_blank">' . __( 'Check out the blog post', 'social-pug') . '</a>' . __( ' for all the details on this development and our exciting plans to continue Growing an already awesome plugin.', 'social-pug' ) . '</p>';
788
 
789
  echo '<p class="notice-subtext">' . __( '(Those who are familiar with Mediavine for our full-service ad management, rest assured that this plugin is totally independent of ads and available to anyone and everyone who wants to Grow their social presence.)', 'social-pug' ) . '</p>';
790
 
791
- echo '<p><a href="' . add_query_arg( array( 'dpsp_admin_notice_grow_name_change' => 1 ) ) . '">' . __( 'Thank you, I understand.', 'social-pug' ) . '</a></p>';
792
 
793
  echo '</div>';
794
- echo '</div>';
795
-
796
  }
797
- add_action( 'admin_notices', 'dpsp_admin_notice_grow_name_change' );
798
-
799
 
800
  /**
801
- * Add admin notice to anounce the removal of StumbleUpon
802
  *
803
  */
804
  function dpsp_admin_notice_facebook_app_authorized() {
805
 
806
  // Do not display this notice if user cannot activate plugins
807
- if( ! current_user_can( 'activate_plugins' ) )
808
  return;
 
809
 
810
- $settings = get_option( 'dpsp_settings', array() );
811
 
812
- if( ! empty( $settings['facebook_app_access_token'] ) )
813
  return;
 
814
 
815
- $access_token = get_transient( 'dpsp_facebook_access_token' );
816
 
817
- if( ! empty( $access_token['access_token'] ) && ! empty( $access_token['expires_in'] ) )
818
  return;
 
819
 
820
  // Do not display this notice for users that have dismissed it
821
- if( get_user_meta( get_current_user_id(), 'dpsp_admin_notice_facebook_app_authorized', true ) != '' )
822
  return;
 
823
 
824
  // Echo the admin notice
825
  echo '<div class="dpsp-admin-notice notice notice-warning">';
826
 
827
- echo '<a class="notice-dismiss" href="' . add_query_arg( array( 'dpsp_admin_notice_facebook_app_authorized' => 1 ) ) . '"></a>';
828
-
829
- echo '<h4>' . __( 'Grow Notification', 'social-pug' ) . '</h4>';
830
 
831
- echo '<p>' . __( "To activate social share counts for Facebook, connecting Grow to a Facebook App is required. Please click the button below for a step-by-step guide on how to achieve this.", 'social-pug' ) . '</p>';
832
 
833
- echo '<p><a class="dpsp-button-primary" target="_blank" href="https://docs.devpups.com/social-pug/activate-facebook-share-counts/">Learn how to activate Facebook share counts</a></p>';
834
 
835
- echo '</div>';
836
 
 
837
  }
838
- add_action( 'admin_notices', 'dpsp_admin_notice_facebook_app_authorized' );
839
 
840
 
841
- /*
842
  * Handle admin notices dismissals
843
  *
844
  */
845
  function dpsp_admin_notice_dismiss() {
846
 
847
- if( isset( $_GET['dpsp_admin_notice_activation'] ) )
848
- add_user_meta( get_current_user_id(), 'dpsp_admin_notice_first_activation', 1, true );
 
849
 
850
- if( isset( $_GET['dpsp_admin_notice_promo_opt_in_hound'] ) )
851
- add_user_meta( get_current_user_id(), 'dpsp_admin_notice_promo_opt_in_hound', 1, true );
 
 
 
 
 
852
 
853
- if( isset( $_GET['dpsp_admin_notice_google_plus_removal'] ) )
 
 
 
 
854
  add_user_meta( get_current_user_id(), 'dpsp_admin_notice_google_plus_removal', 1, true );
 
855
 
856
- if( isset( $_GET['dpsp_admin_notice_facebook_app_authorized'] ) )
857
  add_user_meta( get_current_user_id(), 'dpsp_admin_notice_facebook_app_authorized', 1, true );
 
858
 
859
- if( isset( $_GET['dpsp_admin_notice_grow_name_change'] ) )
860
  add_user_meta( get_current_user_id(), 'dpsp_admin_notice_grow_name_change', 1, true );
 
861
  }
862
- add_action( 'admin_init', 'dpsp_admin_notice_dismiss' );
863
 
 
 
 
 
 
 
 
 
 
864
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  */
7
  function dpsp_admin_header() {
8
 
9
+ if ( empty( $_GET['page'] ) ) {
10
  return;
11
+ }
12
 
13
+ if ( strpos( $_GET['page'], 'dpsp' ) === false ) {
14
  return;
15
+ }
16
 
17
  $page = trim( $_GET['page'] );
18
 
19
  echo '<div class="dpsp-page-header">';
20
  echo '<span class="dpsp-logo">';
21
+ echo '<svg version="1.1" class="mv-grow-logo" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 20 20" fill="white" xml:space="preserve">
22
  <path d="M0 7.2c0 .1-.6 4.7 2 7.2 1.7 1.8 4.3 2 5.9 2h.9A12.7 12.7 0 014.4 14a6.7 6.7 0 01-1.6-2.3c-.3-.9-.5-1.9-.4-3 0-.7.2-1.6.5-2.4h-2l-.7.1-.1.8zM4.7 3.4l-.4.6-.8 1.8 2.4.5 1.3-2c-1-.5-1.7-.7-1.8-.7l-.7-.2z"/>
23
  <path d="M3.3 11.5c1.1 2.8 4.3 4 5.5 4.4l-.5-.4-.4-.4a10.7 10.7 0 01-2.2-3c-.4-1-.6-1.9-.6-2.8 0-.7.2-1.4.4-2.1l.1-.2.1-.3a10.8 10.8 0 00-2.1-.4h-.3v.4a7.4 7.4 0 000 4.8zM10.6 2.8l-.6-.4-.6.4L8 4.2l2 1.3c.6-.5 1.3-1 2-1.3l-1.4-1.4zM6.5 6.6h.2l1.6 1.1a6.4 6.4 0 011.4-1.9L8 4.8l-.2-.2-.2-.1-.2.2-.1.2c-.4.4-.8 1-1 1.6h.1z"/>
24
  <path d="M6 7.1v.2a6 6 0 00-.4 2c0 3 2.4 5.4 3.4 6.2l-.3-.5-.2-.6a12.5 12.5 0 01-.8-3.4A7 7 0 018 8.4l.1-.3a6 6 0 00-1.6-1L6.3 7h-.2V7zM15.3 3.5l-.7.1s-.8.2-1.8.7c.5.7 1 1.3 1.3 2l.5-.1a11 11 0 011.9-.4l-.8-1.7-.4-.6zM13.4 6.6l.3-.1-1-1.6-.2-.2-.2-.2-.2.1-.2.1-1.6 1.1.2.2.1.2c.5.4.8 1 1 1.5a6.6 6.6 0 011.8-1.1zM10.3 6.5l-.2-.2-.1-.1-.2.1-.1.2a5.8 5.8 0 00-1 1.6v.1h.1l.2.2c.4.5.7 1.1 1 1.8a7 7 0 011-1.8l.1-.2.2-.2c-.2-.6-.6-1-1-1.5z"/>
25
  <path d="M8.7 8.9v-.2h-.1l-.2-.2V9h-.1c-.6 2.5.5 5 1 6.1v-.6-.6-1.1l.2-1 .1-.5.1-.4a6.9 6.9 0 00-1-2zM17 6.3h-.4c-.7 0-1.5.2-2.3.4l-.2.1-.3.1h-.2l-.2.2A6 6 0 0012 8l-.2.2-.2.2-.2.2-.1.2c-.5.6-.8 1.3-1 2l-.1.4-.1.3v.2l-.1.5v.2a12 12 0 000 3V16.4h.5l.2.1H12c1.6 0 4.2-.2 6-2 2.5-2.5 1.8-7 1.8-7.3v-.7H19a10.2 10.2 0 00-2-.1zm-.4 6.8c-1.3 1.2-3.3 1.4-4.6 1.4h-.3c0-1.3.1-3.6 1.4-4.9 1.2-1.2 3.3-1.4 4.5-1.4h.4c0 1.2 0 3.5-1.4 4.9z"/>
26
  </svg>
27
  ';
28
+ echo '<span class="dpsp-logo-inner">Grow Social by Mediavine</span>';
29
  echo '<small class="dpsp-version">v.' . DPSP_VERSION . '</small>';
30
  echo '</span>';
31
 
32
  echo '<nav>';
33
  echo '<a href="' . dpsp_get_documentation_link( $page ) . '" target="_blank"><i class="dashicons dashicons-book"></i>Documentation</a>';
 
34
  echo '</nav>';
 
35
  echo '</div>';
36
 
37
  }
 
 
38
 
39
  /*
40
  * Returns the link to the docs depending on the page the user is on
44
 
45
  $page = str_replace( 'dpsp-', '', $page );
46
 
47
+ switch ( $page ) {
48
 
49
  case 'sidebar':
50
+ $url = 'https://help.mediavine.com/en/articles/3625801-how-to-add-social-sharing-buttons-as-a-floating-sidebar';
51
  break;
52
 
53
  case 'content':
54
+ $url = 'https://help.mediavine.com/en/articles/3667466-how-to-add-social-share-buttons-before-and-after-your-post-s-content';
55
+ break;
56
+
57
+ case 'sticky-bar':
58
+ case 'mobile':
59
+ $url = 'https://help.mediavine.com/en/articles/3667616-sticky-bar-sharing-buttons';
60
  break;
61
 
62
+ case 'pinterest-images':
63
+ $url = 'https://help.mediavine.com/en/articles/3667495-how-to-add-a-pin-it-button-to-your-post-s-images';
64
+ break;
65
+
66
+ case 'import-export':
67
+ case 'follow-widget':
68
+ case 'pop-up':
69
  default:
70
+ $url = 'https://help.mediavine.com/en/collections/2071158-grow-by-mediavine';
71
  break;
72
  }
73
 
76
  }
77
 
78
 
79
+ /**
80
  * Displays the HTML for a given tool
81
+ *
82
  * @param array $tool
83
  *
84
  */
85
  function dpsp_output_tool_box( $tool_slug, $tool ) {
86
+ $grow_url = 'https://marketplace.mediavine.com/grow-social-pro/';
87
+ $is_extension = empty( $tool['admin_page'] );
88
+ $box_class = Social_Pug::is_free() && ! $is_extension ? 'dpsp-col-3-8' : 'dpsp-col-1-4';
89
+ echo '<div class="' . $box_class . '">';
90
+ echo '<div class="dpsp-tool-wrapper dpsp-card ' . ( $is_extension ? 'dpsp-unavailable' : '' ) . '">';
91
 
 
 
 
92
 
93
+ if( $is_extension ) {
 
94
  if( empty( $tool['url'] ) )
95
+ $tool['url'] = $grow_url;
96
 
97
  echo '<a href="' . $tool['url'] . '">';
98
  }
99
 
100
+ // Tool image
101
+ echo '<img src="' . ( strpos( $tool['img'], 'http' ) === false ? DPSP_PLUGIN_DIR_URL . $tool['img'] : $tool['img'] ) . '" />';
102
 
103
+ if( $is_extension ) {
104
  echo '</a>';
105
+ }
106
 
107
  // Tool name
108
  echo '<h4 class="dpsp-tool-name">' . $tool['name'] . '</h4>';
109
 
110
+ if( !empty( $tool['desc'] ) ) {
111
  echo '<p class="dpsp-description">' . $tool['desc'] . '</p>';
112
+ }
113
 
114
  $tool_active = dpsp_is_tool_active( $tool_slug );
115
 
116
  // Tool actions
117
  echo '<div class="dpsp-tool-actions dpsp-card-footer dpsp-' . ( $tool_active ? 'active' : 'inactive' ) . '">';
 
 
118
 
119
+ if (! $is_extension) {
120
+ // Tool admin page
121
+ echo '<a class="dpsp-tool-settings" href="' . admin_url( $tool['admin_page'] ) . '"><i class="dashicons dashicons-admin-generic"></i>' . __( 'Settings', 'social-pug' ) . '</a>';
122
 
123
+ // Tool activation switch
124
+ echo '<div class="dpsp-switch small">';
125
 
126
+ echo( $tool_active ? '<span>' . __( 'Active', 'social-pug' ) . '</span>' : '<span>' . __( 'Inactive', 'social-pug' ) . '</span>' );
127
 
128
+ echo '<input id="dpsp-' . $tool_slug . '-active" data-tool="' . esc_attr( $tool_slug ) . '" data-tool-activation="' . esc_attr( ! empty( $tool['activation_setting'] ) ? $tool['activation_setting'] : '' ) . '" class="cmn-toggle cmn-toggle-round" type="checkbox" value="1"' . ( $tool_active ? 'checked' : '' ) . ' />';
129
+ echo '<label for="dpsp-' . $tool_slug . '-active"></label>';
130
 
131
+ echo '</div>';
132
+ } else {
133
+ if( empty( $tool['url'] ) )
134
+ $tool['url'] = $grow_url;
 
 
 
 
135
 
136
+ echo '<a href="' . $tool['url'] . '" class="dpsp-button-primary">' . __( 'Learn More', 'social-pug' ) . '</a>';
137
 
138
+ }
139
  echo '</div>';
140
 
141
  echo '</div>';
148
  * Function that displays the HTML for a settings field
149
  *
150
  */
151
+ function dpsp_settings_field( $type, $name, $saved_value = '', $label = '', $options = [], $tooltip = '', $editor_settings = [], $disabled = '' ) {
152
 
153
+ $settings_field_slug = ( ! empty( $label ) ? strtolower( str_replace( ' ', '-', $label ) ) : '' );
154
 
155
+ echo '<div class="dpsp-setting-field-wrapper dpsp-setting-field-' . $type . ( is_array( $options ) && count( $options ) == 1 ? ' dpsp-single' : ( is_array( $options ) && count( $options ) > 1 ? ' dpsp-multiple' : '' ) ) . ' ' . ( ! empty( $label ) ? 'dpsp-has-field-label dpsp-setting-field-' . $settings_field_slug : '' ) . '">';
156
 
157
+ switch ( $type ) {
158
 
159
  // Display input type text
160
  case 'text':
161
+ echo ! empty( $label ) ? '<label for="' . esc_attr( $name ) . '" class="dpsp-setting-field-label">' . $label . '</label>' : '';
162
 
163
+ echo '<input type="text" ' . ( isset( $label ) ? 'id="' . esc_attr( $name ) . '"' : '' ) . ' name="' . esc_attr( $name ) . '" value="' . esc_attr( $saved_value ) . '" ' . $disabled . ' />';
 
 
164
  break;
165
 
166
  // Display textareas
167
  case 'textarea':
168
+ echo ! empty( $label ) ? '<label for="' . esc_attr( $name ) . '" class="dpsp-setting-field-label">' . $label . '</label>' : '';
169
 
170
  echo '<textarea ' . ( isset( $label ) ? 'id="' . esc_attr( $name ) . '"' : '' ) . ' name="' . esc_attr( $name ) . '">' . $saved_value . '</textarea>';
171
 
173
 
174
  // Display wp_editors
175
  case 'editor':
176
+ echo ! empty( $label ) ? '<label for="' . esc_attr( $name ) . '" class="dpsp-setting-field-label">' . $label . '</label>' : '';
177
 
178
  wp_editor( $saved_value, $name, $editor_settings );
179
 
181
 
182
  // Display input type radio
183
  case 'radio':
184
+ echo ! empty( $label ) ? '<label class="dpsp-setting-field-label">' . $label . '</label>' : '';
185
 
186
+ if ( ! empty( $options ) ) {
187
+ foreach ( $options as $option_value => $option_name ) {
 
 
188
  echo '<input type="radio" id="' . esc_attr( $name ) . '[' . esc_attr( $option_value ) . ']' . '" name="' . esc_attr( $name ) . '" value="' . esc_attr( $option_value ) . '" ' . checked( $option_value, $saved_value, false ) . ' />';
189
  echo '<label for="' . esc_attr( $name ) . '[' . esc_attr( $option_value ) . ']' . '" class="dpsp-settings-field-radio">' . ( isset( $option_name ) ? $option_name : $option_value ) . '<span></span></label>';
190
  }
193
 
194
  // Display input type checkbox
195
  case 'checkbox':
 
196
  // If no options are passed make the main label as the label for the checkbox
197
+ if ( count( $options ) == 1 ) {
198
 
199
+ if ( is_array( $saved_value ) ) {
200
  $saved_value = $saved_value[0];
201
+ }
202
 
203
  echo '<input type="checkbox" ' . ( isset( $label ) ? 'id="' . esc_attr( $name ) . '"' : '' ) . ' name="' . esc_attr( $name ) . '" value="' . esc_attr( $options[0] ) . '" ' . checked( $options[0], $saved_value, false ) . ' />';
204
+ echo ! empty( $label ) ? '<label for="' . esc_attr( $name ) . '" class="dpsp-setting-field-label">' . $label . '<span></span></label>' : '';
205
 
206
  // Else display checkboxes just like radios
207
  } else {
208
 
209
+ echo ! empty( $label ) ? '<label class="dpsp-setting-field-label">' . $label . '</label>' : '';
210
 
211
+ if ( ! empty( $options ) ) {
212
+ foreach ( $options as $option_value => $option_name ) {
213
  echo '<input type="checkbox" id="' . esc_attr( $name ) . '[' . esc_attr( $option_value ) . ']' . '" name="' . esc_attr( $name ) . '" value="' . esc_attr( $option_value ) . '" ' . ( in_array( $option_value, $saved_value ) ? 'checked' : '' ) . ' />';
214
  echo '<label for="' . esc_attr( $name ) . '[' . esc_attr( $option_value ) . ']' . '" class="dpsp-settings-field-checkbox">' . ( isset( $option_name ) ? $option_name : $option_value ) . '<span></span></label>';
215
  }
216
  }
217
+ }
 
218
  break;
219
 
220
  // Display switch
221
  case 'switch':
222
+ if ( count( $options ) == 1 ) {
223
 
224
+ if ( is_array( $saved_value ) ) {
 
 
225
  $saved_value = $saved_value[0];
226
+ }
227
 
228
  echo '<div class="dpsp-switch">';
229
  echo '<input type="checkbox" ' . ( isset( $label ) ? 'id="' . esc_attr( $name ) . '"' : '' ) . ' name="' . esc_attr( $name ) . '" class="cmn-toggle cmn-toggle-round" value="' . esc_attr( $options[0] ) . '" ' . checked( $options[0], $saved_value, false ) . ' />';
246
  break;
247
 
248
  case 'select':
249
+ echo ! empty( $label ) ? '<label for="' . esc_attr( $name ) . '" class="dpsp-setting-field-label">' . $label . '</label>' : '';
250
+ echo '<select id="' . esc_attr( $name ) . '" name="' . esc_attr( $name ) . '"' . $disabled . '>';
251
 
252
+ foreach ( $options as $option_value => $option_name ) {
 
 
 
253
  echo '<option value="' . esc_attr( $option_value ) . '" ' . selected( $saved_value, $option_value, false ) . '>' . $option_name . '</option>';
254
  }
255
 
258
  break;
259
 
260
  case 'color-picker':
261
+ echo ! empty( $label ) ? '<label for="' . esc_attr( $name ) . '" class="dpsp-setting-field-label">' . $label . '</label>' : '';
262
 
263
  echo '<input class="dpsp-color-picker" type="text" ' . ( isset( $label ) ? 'id="' . esc_attr( $name ) . '"' : '' ) . ' name="' . esc_attr( $name ) . '" value="' . esc_attr( $saved_value ) . '" />';
264
  break;
265
 
266
  case 'image':
267
+ echo ! empty( $label ) ? '<label for="' . esc_attr( $name ) . '" class="dpsp-setting-field-label">' . $label . '</label>' : '';
268
 
269
  echo '<div>';
270
+
271
+ if ( ! empty( $saved_value['id'] ) ) {
272
  $thumb_details = wp_get_attachment_image_src( $saved_value['id'], 'medium' );
273
  $image_details = wp_get_attachment_image_src( $saved_value['id'], 'full' );
274
  }
275
 
276
+ if ( ! empty( $thumb_details[0] ) && ! empty( $image_details[0] ) ) {
277
+ $thumb_src = $thumb_details[0];
278
+ $image_src = $image_details[0];
279
  } else {
280
+ $thumb_src = '';
281
+ $image_src = '';
282
  $saved_value['id'] = '';
283
  }
284
 
286
  echo '<img src="' . esc_attr( $thumb_src ) . '">';
287
  echo '</div>';
288
 
289
+ echo '<a class="dpsp-image-select button button-primary ' . ( ! empty( $saved_value['id'] ) ? 'hidden' : '' ) . '" href="#">' . __( 'Select Image', 'social-pug' ) . '</a>';
290
  echo '<a class="dpsp-image-remove button button-secondary ' . ( empty( $saved_value['id'] ) ? 'hidden' : '' ) . '" href="#">' . __( 'Remove Image', 'social-pug' ) . '</a>';
291
 
292
  echo '<input class="dpsp-image-id" type="hidden" name="' . esc_attr( $name ) . '[id]" value="' . esc_attr( $saved_value['id'] ) . '" />';
298
 
299
  } // end of switch
300
 
 
301
  // Tooltip
302
+ if ( ! empty( $tooltip ) ) {
303
 
304
  dpsp_output_backend_tooltip( $tooltip );
305
 
306
  }
307
+
308
  do_action( 'dpsp_inner_after_settings_field', $settings_field_slug, $type, $name );
309
 
310
  echo '</div>';
312
  }
313
 
314
 
315
+ /**
316
+ * Set the column_count option to 1 when displaying the buttons inside the WP dashboard admin
317
  *
318
+ * @param array $settings - the settings array for the current location
319
+ * @param string $action - the current type of action ( share/follow )
320
+ * @param string $location - the display location for the buttons
321
+ *
322
+ * @return array
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
323
  *
324
  */
325
+ function dpsp_admin_buttons_display_column_count_to_one( $settings, $action, $location ) {
 
 
 
326
 
327
+ if ( empty( $settings['display']['column_count'] ) ) {
328
+ return $settings;
329
+ }
 
 
 
 
 
 
 
 
 
330
 
331
+ if ( ! is_admin() ) {
332
+ return $settings;
333
+ }
334
 
335
+ $settings['display']['column_count'] = 1;
336
 
337
+ return $settings;
338
 
339
  }
 
 
340
 
341
  /**
342
  * Returns the HTML output with the selectable networks
345
  * @param array $settings_networks - the networks saved for the location
346
  *
347
  */
348
+ function dpsp_output_selectable_networks( $networks = [], $settings_networks ) {
349
 
350
  $output = '<div id="dpsp-networks-selector-wrapper">';
351
 
352
  $output .= '<ul id="dpsp-networks-selector">';
353
 
354
+ if ( ! empty( $networks ) ) {
355
+ foreach ( $networks as $network_slug => $network_name ) {
356
+ $output .= '<li>';
357
+ $output .= '<div class="dpsp-network-item" data-network="' . $network_slug . '" data-network-name="' . $network_name . '" ' . ( isset( $settings_networks[ $network_slug ] ) ? 'data-checked="true"' : '' ) . '>';
358
+ $output .= '<div class="dpsp-network-item-checkbox dpsp-icon-ok"></div>';
359
+ $output .= '<div class="dpsp-network-item-name-wrapper dpsp-network-' . $network_slug . ' dpsp-background-color-network-' . $network_slug . '">';
360
  $output .= '<span class="dpsp-list-icon dpsp-list-icon-social dpsp-icon-' . $network_slug . ' dpsp-background-color-network-' . $network_slug . '"><!-- --></span>';
361
  $output .= '<h4>' . $network_name . '</h4>';
362
+ $output .= '</div>';
363
+ $output .= '</li>';
364
  }
365
  }
366
 
367
  $output .= '</ul>';
368
 
369
+ $output .= '<div id="dpsp-networks-selector-footer" class="dpsp-card-footer">';
370
  $output .= '<a href="#" class="dpsp-button-primary">' . __( 'Apply Selection', 'social-pug' ) . '</a>';
371
+ $output .= '</div>';
372
 
373
  $output .= '</div>';
374
 
386
 
387
  $current_network = 1;
388
 
389
+ if ( ! empty( $networks ) ) {
390
 
391
+ foreach ( $networks as $network_slug => $network ) {
392
 
393
  $output .= '<li data-network="' . $network_slug . '" ' . ( $current_network == count( $networks ) ? 'class="dpsp-last"' : '' ) . '>';
394
 
399
  $output .= '<div class="dpsp-list-icon dpsp-list-icon-social dpsp-icon-' . $network_slug . ' dpsp-background-color-network-' . $network_slug . '"><!-- --></div>';
400
 
401
  // The label edit field
402
+ $output .= '<div class="dpsp-list-input-wrapper">';
403
  $output .= '<input type="text" placeholder="' . __( 'This button has no label text.', 'social-pug' ) . '" name="' . $settings_name . '[networks][' . $network_slug . '][label]" value="' . ( isset( $network['label'] ) ? esc_attr( $network['label'] ) : dpsp_get_network_name( $network_slug ) ) . '" />';
404
+ $output .= '</div>';
405
 
406
  // List item actions
407
+ $output .= '<div class="dpsp-list-actions">';
408
  $output .= '<a class="dpsp-list-edit-label" href="#"><span class="dashicons dashicons-edit"></span>' . __( 'Edit Label' ) . '</a>';
409
  $output .= '<a class="dpsp-list-remove" href="#"><span class="dashicons dashicons-no-alt"></span>' . __( 'Remove' ) . '</a>';
410
+ $output .= '</div>';
411
+ $output .= '</li>';
412
 
413
  $current_network++;
414
 
415
  }
416
+ }
 
417
 
418
  $output .= '</ul>';
419
 
423
 
424
  /*
425
  * Outputs the HTML of the tooltip
426
+ *
427
  * @param string tooltip - the text of the tooltip
428
  * @param bool $return - wether to return or to output the HTML
429
  *
430
  */
431
  function dpsp_output_backend_tooltip( $tooltip = '', $return = false ) {
432
 
433
+ $output = '<div class="dpsp-setting-field-tooltip-wrapper ' . ( ( strpos( $tooltip, '</a>' ) !== false ) ? 'dpsp-has-link' : '' ) . '">';
434
  $output .= '<span class="dpsp-setting-field-tooltip-icon"></span>';
435
  $output .= '<div class="dpsp-setting-field-tooltip dpsp-transition">' . $tooltip . '</div>';
436
+ $output .= '</div>';
437
 
438
+ if ( $return ) {
439
  return $output;
440
+ } else {
441
+ echo $output;
442
+ }
443
 
444
  }
445
 
 
446
  /*
447
+ * Registers an extra column for the shares with all active custom post types
448
  *
449
  */
450
+ function dpsp_register_custom_post_type_columns() {
451
 
452
+ $active_post_types = dpsp_get_active_post_types();
 
 
453
 
454
+ if ( ! empty( $active_post_types ) ) {
455
+ foreach ( $active_post_types as $post_type ) {
456
+ add_filter( 'manage_' . $post_type . '_posts_columns', 'dpsp_set_shares_column' );
457
+ add_filter( 'manage_edit-' . $post_type . '_sortable_columns', 'dpsp_set_shares_column_sortable' );
458
+ add_action( 'manage_' . $post_type . '_posts_custom_column', 'dpsp_output_shares_column', 10, 2 );
459
+ }
460
+ }
461
+ }
462
 
463
+ /**
464
+ * Adds the Shares column to all active post types
465
+ *
466
+ * @param array $columns
467
+ *
468
+ * @return array
469
+ *
470
+ */
471
+ function dpsp_set_shares_column( $columns ) {
472
 
473
+ $column_output = '<span class="dpsp-list-table-shares"><i class="dashicons dashicons-share"></i><span>' . __( 'Shares', 'social-pug' ) . '</span></span>';
 
 
474
 
475
+ if ( isset( $columns['date'] ) ) {
476
 
477
+ $array = array_slice( $columns, 0, array_search( 'date', array_keys( $columns ) ) );
478
 
479
+ $array['dpsp_shares'] = $column_output;
480
+
481
+ $columns = array_merge( $array, $columns );
482
+
483
+ } else {
484
+ $columns['dpsp_shares'] = $column_output;
485
  }
486
 
487
+ return $columns;
488
  }
 
489
 
490
 
491
  /**
492
+ * Defines the total shares column as sortable
493
  *
494
+ * @param array $columns
495
+ *
496
+ * @return array
497
  *
498
  */
499
+ function dpsp_set_shares_column_sortable( $columns ) {
500
 
501
+ $columns['dpsp_shares'] = 'dpsp_shares';
 
 
 
 
 
 
502
 
503
+ return $columns;
504
  }
505
 
506
 
507
  /**
508
+ * Outputs the share counts in the Shares columns
509
  *
510
+ * @param string $column_name
511
+ * @param int $post_id
512
  *
513
  */
514
+ function dpsp_output_shares_column( $column_name, $post_id ) {
515
 
516
+ if ( $column_name == 'dpsp_shares' ) {
517
 
518
+ echo '<span class="dpsp-list-table-post-share-count">' . dpsp_get_post_total_share_count( $post_id ) . '</span>';
519
+
520
+ }
521
 
522
  }
 
523
 
524
 
525
  /**
526
+ * Check to see if the user selected to order the posts by share counts and
527
+ * changes the query accordingly
528
+ *
529
+ * @param WP_Query $query
530
+ *
531
+ */
532
+ function dpsp_pre_get_posts_shares_query( $query ) {
533
+
534
+ if ( ! is_admin() ) {
535
+ return;
536
+ }
537
+
538
+ $orderby = $query->get( 'orderby' );
539
+
540
+ if ( $orderby == 'dpsp_shares' ) {
541
+ $query->set( 'meta_key', 'dpsp_networks_shares_total' );
542
+ $query->set( 'orderby', 'meta_value_num' );
543
+ }
544
+
545
+ }
546
+
547
+ /**
548
+ * Makes a call to Facebook to scrape the post's Open Graph data after the post has been saved
549
+ *
550
+ * @param int $post_id
551
+ * @param WP_Post $post
552
  *
553
  */
554
+ function dpsp_save_post_facebook_scrape_url( $post_id, $post ) {
555
 
556
+ if ( ! is_admin() ) {
557
+ return;
558
+ }
559
 
560
+ $not_allowed_post_statuses = [ 'draft', 'auto-draft', 'future', 'pending', 'trash' ];
561
 
562
+ if ( in_array( $post->post_status, $not_allowed_post_statuses ) ) {
563
+ return;
564
+ }
565
 
566
+ $post_url = get_permalink( $post );
567
+ $post_url = rawurlencode( $post_url );
568
 
569
+ $url = add_query_arg(
570
+ [
571
+ 'id' => $post_url,
572
+ 'scrape' => 'true',
573
+ ],
574
+ 'https://graph.facebook.com/'
575
+ );
576
 
577
+ $response = wp_remote_post( $url );
578
+ }
579
 
580
+ /*
581
+ * Display admin notices for our pages
582
+ *
583
+ */
584
+ function dpsp_admin_notices() {
585
 
586
+ // Exit if settings updated is not present
587
+ if ( ! isset( $_GET['settings-updated'] ) ) {
588
+ return;
589
+ }
590
 
591
+ $admin_page = ( isset( $_GET['page'] ) ? $_GET['page'] : '' );
592
 
593
+ // Show these notices only on dpsp pages
594
+ if ( strpos( $admin_page, 'dpsp' ) === false || $admin_page == 'dpsp-register-version' ) {
595
+ return;
596
+ }
597
 
598
+ // Get messages
599
+ $message_id = ( isset( $_GET['dpsp_message_id'] ) ? $_GET['dpsp_message_id'] : 0 );
600
+ $message = dpsp_get_admin_notice_message( $message_id );
601
 
602
+ $class = ( isset( $_GET['dpsp_message_class'] ) ? $_GET['dpsp_message_class'] : 'updated' );
603
 
604
+ if ( isset( $message ) ) {
 
 
 
 
605
 
606
+ echo '<div class="dpsp-admin-notice notice is-dismissible ' . esc_attr( $class ) . '">';
607
+ echo '<p>' . esc_attr( $message ) . '</p>';
608
  echo '</div>';
609
+ }
610
 
611
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
612
 
613
+ /**
614
+ * Returns a human readable message given a message id
615
+ *
616
+ * @param int $message_id
617
+ *
618
+ */
619
+ function dpsp_get_admin_notice_message( $message_id ) {
620
 
621
+ $messages = apply_filters(
622
+ 'dpsp_get_admin_notice_message',
623
+ [
624
+ __( 'Settings saved.', 'social-pug' ),
625
+ __( 'Settings imported.', 'social-pug' ),
626
+ __( 'Please select an import file.', 'social-pug' ),
627
+ __( 'Import file is not valid.', 'social-pug' ),
628
+ __( 'Grow Social by Mediavine App authorized successfully.', 'social-pug' ),
629
+ ]
630
+ );
631
 
632
+ return $messages[ $message_id ];
633
  }
 
634
 
635
 
636
  /*
637
+ * Adds admin notifications for entering the license serial key
638
  *
639
  */
640
+ function dpsp_serial_admin_notification() {
641
 
642
+ if ( ! current_user_can( 'manage_options' ) ) {
 
 
 
643
  return;
644
+ }
645
 
646
+ $dpsp_settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings' );
 
 
647
 
648
+ $serial = ( ! empty( $dpsp_settings['product_serial'] ) ? $dpsp_settings['product_serial'] : '' );
649
+ $license = ( ! empty( $dpsp_settings['mv_grow_license'] ) ? $dpsp_settings['mv_grow_license'] : '' );
650
+ // Check to see if serial is saved in the database
651
+ if ( empty( $serial ) && empty( $license ) ) {
652
 
653
+ $notice_classes = 'dpsp-serial-missing';
654
+ $message = sprintf( __( 'Your <strong>Grow Social by Mediavine</strong> license key is empty. Please <a href="%1$s">register your copy</a> to receive automatic updates and support. <br /><br /> Need a license key? <a class="dpsp-get-license button button-primary" target="_blank" href="%2$s">Get your license here</a>', 'social-pug' ), admin_url( 'admin.php?page=dpsp-settings' ), 'https://marketplace.mediavine.com/grow-social-pro/' );
 
655
 
656
+ }
 
 
 
 
 
 
 
657
 
658
+ // Display the notice if notice classes have been added
659
+ if ( isset( $notice_classes ) ) {
660
+ echo '<div class="dpsp-admin-notice notice ' . $notice_classes . '">';
661
+ echo '<p>' . $message . '</p>';
662
 
663
+ if ( isset( $extra_content ) ) {
664
+ echo $extra_content;
665
+ }
666
 
667
+ echo '</div>';
668
+ }
669
  }
 
 
 
670
 
671
  /**
672
  * Add admin notice to let you know the Facebook access token has expired
675
  function dpsp_admin_notice_facebook_access_token_expired() {
676
 
677
  // Do not display this notice if user cannot activate plugins
678
+ if ( ! current_user_can( 'activate_plugins' ) ) {
679
  return;
680
+ }
681
 
682
+ $facebook_access_token = Mediavine\Grow\Settings::get_setting( 'dpsp_facebook_access_token' );
683
 
684
+ // Do not display the notice if the access token is missing
685
+ if ( empty( $facebook_access_token['access_token'] ) || empty( $facebook_access_token['expires_in'] ) ) {
686
  return;
687
+ }
688
 
689
  // Do not display the notice if the token isn't expired
690
+ if ( time() < absint( $facebook_access_token['expires_in'] ) ) {
691
  return;
692
+ }
693
 
694
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
695
 
696
+ // Do not display the notice if the Facebook share count provider isn't set to Grow Social by Mediavine's app
697
+ if ( ! empty( $settings['facebook_share_counts_provider'] ) && $settings['facebook_share_counts_provider'] != 'authorized_app' ) {
698
  return;
699
+ }
700
 
701
  // Echo the admin notice
702
  echo '<div class="dpsp-admin-notice notice notice-error">';
703
 
704
+ echo '<h4>' . __( 'Grow Social by Mediavine Important Notification', 'social-pug' ) . '</h4>';
705
 
706
+ echo '<p>' . __( 'Your Grow Social by Mediavine Facebook app authorization has expired. Please reauthorize the app for continued Facebook share counts functionality.', 'social-pug' ) . '</p>';
707
 
708
+ echo '<p><a class="dpsp-button-primary" href="' . add_query_arg( [ 'page' => 'dpsp-settings' ], admin_url( 'admin.php' ) ) . '#dpsp-card-misc">' . __( 'Reauthorize Grow Social by Mediavine App', 'social-pug' ) . '</a></p>';
709
 
710
+ echo '</div>';
711
 
712
  }
 
 
713
 
714
  /**
715
  * Add admin notice to anounce the removal of Google+
718
  function dpsp_admin_notice_google_plus_removal() {
719
 
720
  // Do not display this notice if user cannot activate plugins
721
+ if ( ! current_user_can( 'activate_plugins' ) ) {
722
  return;
723
+ }
724
 
725
  // Don't show this if the plugin has been activated after 29th of July 2018
726
+ $first_activation = Mediavine\Grow\Settings::get_setting( 'dpsp_first_activation', '' );
727
 
728
+ if ( empty( $first_activation ) ) {
729
  return;
730
+ }
731
 
732
+ if ( $first_activation > strtotime( '2019-04-10 00:00:00' ) ) {
733
  return;
734
+ }
735
 
736
  // Do not display this notice for users that have dismissed it
737
+ if ( get_user_meta( get_current_user_id(), 'dpsp_admin_notice_google_plus_removal', true ) != '' ) {
738
  return;
739
+ }
740
 
741
  // Echo the admin notice
742
  echo '<div class="dpsp-admin-notice notice notice-error">';
743
 
744
+ echo '<h4>' . __( 'Grow Social by Mediavine Important Notification', 'social-pug' ) . '</h4>';
745
 
746
+ echo '<p>' . __( 'As you may already know, Google+ has shut down on April 2nd. As a result, with this latest update, Grow Social by Mediavine no longer supports Google+ functionality.', 'social-pug' ) . '</p>';
747
 
748
+ echo '<p>' . __( 'Please make sure to verify your settings, your widgets, your shortcodes, and remove any Google+ buttons you may have placed within your website.', 'social-pug' ) . '</p>';
749
 
750
+ echo '<p><a href="' . add_query_arg( [ 'dpsp_admin_notice_google_plus_removal' => 1 ] ) . '">' . __( 'Thank you, I understand.', 'social-pug' ) . '</a></p>';
751
 
752
+ echo '</div>';
753
 
754
  }
 
755
 
756
  /**
757
  * Add admin notice to anounce the name change
760
  function dpsp_admin_notice_grow_name_change() {
761
 
762
  // Do not display this notice if user cannot activate plugins
763
+ if ( ! current_user_can( 'activate_plugins' ) ) {
764
  return;
765
+ }
766
 
767
  // Don't show this if the plugin has been activated after 30th of Nov 2019
768
+ $first_activation = Mediavine\Grow\Settings::get_setting( 'dpsp_first_activation', '' );
769
 
770
+ if ( empty( $first_activation ) ) {
771
  return;
772
+ }
773
 
774
+ if ( $first_activation > strtotime( '2019-11-30 00:00:00' ) ) {
775
  return;
776
+ }
777
 
778
  // Do not display this notice for users that have dismissed it
779
+ if ( get_user_meta( get_current_user_id(), 'dpsp_admin_notice_grow_name_change', true ) != '' ) {
780
  return;
781
+ }
782
 
783
  // Echo the admin notice
784
  echo '<div class="dpsp-admin-notice dpsp-admin-grow-notice notice notice-info">';
785
  echo '<div class="notice-img-wrap" >';
786
+ echo '<img src="' . DPSP_PLUGIN_DIR_URL . 'assets/dist/grow-logo-sq-navy.' . DPSP_VERSION . '.png" />';
787
  echo '</div>';
788
  echo '<div class="notice-text-wrap">';
789
 
790
+ echo '<h4>' . __( 'Social Pug is now Grow Social by Mediavine!', 'social-pug' ) . '</h4>';
791
+
792
+ echo '<p>' . __( 'You\'re going to notice some new paint and a new name today and we wanted to let you know what that\'s all about. The short version is that Grow Social by Mediavine is the same plugin you know and love but with a new, larger development team!', 'social-pug' ) . '</p>';
793
 
794
+ echo '<p><a href="https://www.mediavine.com/social-pug-is-now-grow-mediavines-new-social-sharing-buttons-marketplace-more/" target="_blank">' . __( 'Check out the blog post', 'social-pug' ) . '</a>' . __( ' for all the details on this development and our exciting plans to continue Growing an already awesome plugin.', 'social-pug' ) . '</p>';
 
 
795
 
796
  echo '<p class="notice-subtext">' . __( '(Those who are familiar with Mediavine for our full-service ad management, rest assured that this plugin is totally independent of ads and available to anyone and everyone who wants to Grow their social presence.)', 'social-pug' ) . '</p>';
797
 
798
+ echo '<p><a href="' . add_query_arg( [ 'dpsp_admin_notice_grow_name_change' => 1 ] ) . '">' . __( 'Thank you, I understand.', 'social-pug' ) . '</a></p>';
799
 
800
  echo '</div>';
801
+ echo '</div>';
 
802
  }
 
 
803
 
804
  /**
805
+ * Add admin notice for needed Facebook App authorization
806
  *
807
  */
808
  function dpsp_admin_notice_facebook_app_authorized() {
809
 
810
  // Do not display this notice if user cannot activate plugins
811
+ if ( ! current_user_can( 'activate_plugins' ) ) {
812
  return;
813
+ }
814
 
815
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
816
 
817
+ if ( ! empty( $settings['facebook_app_access_token'] ) ) {
818
  return;
819
+ }
820
 
821
+ $facebook_access_token = Mediavine\Grow\Settings::get_setting( 'dpsp_facebook_access_token' );
822
 
823
+ if ( ! empty( $facebook_access_token['access_token'] ) && ! empty( $facebook_access_token['expires_in'] ) ) {
824
  return;
825
+ }
826
 
827
  // Do not display this notice for users that have dismissed it
828
+ if ( get_user_meta( get_current_user_id(), 'dpsp_admin_notice_facebook_app_authorized', true ) != '' ) {
829
  return;
830
+ }
831
 
832
  // Echo the admin notice
833
  echo '<div class="dpsp-admin-notice notice notice-warning">';
834
 
835
+ echo '<a class="notice-dismiss" href="' . add_query_arg( [ 'dpsp_admin_notice_facebook_app_authorized' => 1 ] ) . '"></a>';
 
 
836
 
837
+ echo '<h4>' . __( 'Grow Social by Mediavine Notification', 'social-pug' ) . '</h4>';
838
 
839
+ echo '<p>' . __( 'To activate social share counts for Facebook, connecting Grow Social by Mediavine to a Facebook App is required. Please click the button below for a step-by-step guide on how to achieve this.', 'social-pug' ) . '</p>';
840
 
841
+ echo '<p><a class="dpsp-button-primary" target="_blank" href="https://help.mediavine.com/en/articles/3667605-how-to-activate-facebook-share-count">Learn how to activate Facebook share counts</a></p>';
842
 
843
+ echo '</div>';
844
  }
 
845
 
846
 
847
+ /**
848
  * Handle admin notices dismissals
849
  *
850
  */
851
  function dpsp_admin_notice_dismiss() {
852
 
853
+ if ( isset( $_GET['dpsp_admin_notice_twitter_counts'] ) ) {
854
+ add_user_meta( get_current_user_id(), 'dpsp_admin_notice_twitter_counts', 1, true );
855
+ }
856
 
857
+ if ( isset( $_GET['dpsp_admin_notice_renew_1'] ) ) {
858
+ add_user_meta( get_current_user_id(), 'dpsp_admin_notice_renew_1', 1, true );
859
+ }
860
+
861
+ if ( isset( $_GET['dpsp_admin_notice_recovery_system'] ) ) {
862
+ add_user_meta( get_current_user_id(), 'dpsp_admin_notice_recovery_system', 1, true );
863
+ }
864
 
865
+ if ( isset( $_GET['dpsp_admin_notice_major_update_2_6_0'] ) ) {
866
+ add_user_meta( get_current_user_id(), 'dpsp_admin_notice_major_update_2_6_0', 1, true );
867
+ }
868
+
869
+ if ( isset( $_GET['dpsp_admin_notice_google_plus_removal'] ) ) {
870
  add_user_meta( get_current_user_id(), 'dpsp_admin_notice_google_plus_removal', 1, true );
871
+ }
872
 
873
+ if ( isset( $_GET['dpsp_admin_notice_facebook_app_authorized'] ) ) {
874
  add_user_meta( get_current_user_id(), 'dpsp_admin_notice_facebook_app_authorized', 1, true );
875
+ }
876
 
877
+ if ( isset( $_GET['dpsp_admin_notice_grow_name_change'] ) ) {
878
  add_user_meta( get_current_user_id(), 'dpsp_admin_notice_grow_name_change', 1, true );
879
+ }
880
  }
 
881
 
882
+ /**
883
+ * Remove dpsp query args from the URL
884
+ *
885
+ * @param array $removable_query_args - the args that WP will remove
886
+ *
887
+ */
888
+ function dpsp_removable_query_args( $removable_query_args ) {
889
+
890
+ $new_args = [ 'dpsp_message_id', 'dpsp_message_class', 'dpsp_admin_notice_dismiss_button_icon_animation', 'dpsp_admin_notice_activate_button_icon_animation', 'dpsp_admin_notice_activate_button_icon_animation_done' ];
891
 
892
+ return array_merge( $new_args, $removable_query_args );
893
+ }
894
+
895
+ /**
896
+ * Output settings sidebar — CTA to upgrade to Pro.
897
+ */
898
+ function dpsp_add_submenu_page_sidebar() {
899
+ $icon = '<span class="dpsp-dashicons"><span class="dashicons dashicons-yes"></span></span>';
900
+ $url = 'https://marketplace.mediavine.com/grow-social-pro/?utm_source=plugin&utm_medium=sidebar&utm_campaign=social-pug';
901
+
902
+ echo '<div class="dpsp-settings-sidebar">';
903
+ echo '<div id="dpsp-settings-sidebar-social-pug-pro" class="dpsp-card">';
904
+ echo '<div class="dpsp-card-inner">';
905
+
906
+ echo '<img data-pin-nopin="true" src="' . DPSP_PLUGIN_DIR_URL . 'assets/dist/social-pug-upgrade.' . DPSP_VERSION . '.png" />';
907
+
908
+ echo '<h3>' . __( 'Skyrocket your social media marketing', 'social-pug' ) . '</h3>';
909
+ echo '<p>' . $icon . __( 'Force a custom image to be shared on Pinterest when using the Pinterest button.', 'social-pug' ) . '</p>';
910
+ echo '<p>' . $icon . __( 'Add unlimited hidden Pinterest images to your posts and pages.', 'social-pug' ) . '</p>';
911
+ echo '<p>' . $icon . __( 'Add a "Pin It" button that appears when visitors hover your in-post images.', 'social-pug' ) . '</p>';
912
+ echo '<p>' . $icon . __( 'Add custom pin descriptions and repin IDs to your in-post images.', 'social-pug' ) . '</p>';
913
+ echo '<p>' . $icon . __( "Recover your lost social share counts if you've ever changed your permalink structure.", 'social-pug' ) . '</p>';
914
+ echo '<p>' . $icon . __( 'Add unlimited "Click to Tweet" boxes so that your users can share your content on Twitter with just one click.', 'social-pug' ) . '</p>';
915
+ echo '<p>' . $icon . __( 'Get immediate help with priority support.', 'social-pug' ) . '</p>';
916
+ echo '<p>' . $icon . __( 'And much, much more...', 'social-pug' ) . '</p>';
917
+
918
+ echo '</div>';
919
+ echo '<div class="dpsp-card-footer"><a class="dpsp-button-primary" href="' . $url . '" target="_blank">' . __( 'Upgrade to Pro', 'social-pug' ) . '</a></div>';
920
+ echo '</div>';
921
+ }
922
+
923
+ /**
924
+ * Register hooks for functions-admin.php
925
+ */
926
+ function dpsp_register_functions_admin() {
927
+ add_action( 'admin_notices', 'dpsp_admin_header', 1 );
928
+ add_filter( 'dpsp_network_buttons_outputter_settings', 'dpsp_admin_buttons_display_column_count_to_one', 10, 3 );
929
+ add_action( 'admin_init', 'dpsp_register_custom_post_type_columns' );
930
+ add_action( 'pre_get_posts', 'dpsp_pre_get_posts_shares_query' );
931
+ add_action( 'save_post', 'dpsp_save_post_facebook_scrape_url', 99, 2 );
932
+ add_action( 'admin_notices', 'dpsp_admin_notices' );
933
+ add_action( 'admin_notices', 'dpsp_admin_notice_facebook_access_token_expired' );
934
+ add_action( 'admin_notices', 'dpsp_admin_notice_google_plus_removal' );
935
+ add_action( 'admin_notices', 'dpsp_admin_notice_grow_name_change' );
936
+ add_action( 'admin_notices', 'dpsp_admin_notice_facebook_app_authorized' );
937
+ add_action( 'admin_init', 'dpsp_admin_notice_dismiss' );
938
+ add_filter( 'removable_query_args', 'dpsp_removable_query_args' );
939
+ }
inc/functions-cron.php CHANGED
@@ -1,134 +1,102 @@
1
  <?php
2
 
3
 
4
- /*
5
- * Add custom schedules to use for the cron jobs
6
- *
7
- */
8
- function dpsp_cron_schedules( $schedules ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
- $schedules['dpsp_2x_hourly'] = array(
11
- 'interval' => (3600 * 2),
12
- 'display' => __( 'Once every two hours', 'social-pug' )
13
- );
14
 
15
- return $schedules;
16
 
17
- }
18
- add_filter( 'cron_schedules', 'dpsp_cron_schedules' );
 
 
 
 
 
19
 
20
-
21
- /*
22
- * Set cron jobs
23
- *
24
- * @return void
25
- *
26
- */
27
- function dpsp_set_cron_jobs() {
28
 
29
- wp_schedule_event( time(), 'dpsp_2x_hourly', 'dpsp_cron_get_posts_networks_share_count');
30
 
31
- }
32
 
 
33
 
34
- /*
35
- * Stop cron jobs
36
- *
37
- * @return void
38
- *
39
- */
40
- function dpsp_stop_cron_jobs() {
41
 
42
- wp_clear_scheduled_hook( 'dpsp_cron_get_posts_networks_share_count' );
 
 
 
 
 
 
43
 
44
- }
 
 
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
- /*
48
- * Retreives the share counts for each post, for each network and saves
49
- * them in the post meta
50
- *
51
- * @return void
52
- *
53
- */
54
- function dpsp_cron_get_posts_networks_share_count() {
55
-
56
- $settings = get_option( 'dpsp_settings', array() );
57
-
58
- /*
59
- * Start with getting all post types saved in every
60
- * settings page. We only wish to get share counts for the
61
- * posts that have these certain post types.
62
- *
63
- * Also get all active social networks from each of the
64
- * settings page
65
- *
66
- */
67
- $locations = dpsp_get_network_locations();
68
- $social_networks = dpsp_get_active_networks();
69
- $post_types = array();
70
-
71
- foreach( $locations as $location ) {
72
-
73
- $location_settings = get_option( 'dpsp_location_' . $location );
74
-
75
- /*
76
- * Get post types of settings page
77
- *
78
- */
79
- if( isset( $location_settings['post_type_display'] ) )
80
- $post_types = array_merge( $post_types, $location_settings['post_type_display'] );
81
-
82
- }
83
-
84
-
85
- /*
86
- * Filter post types
87
- *
88
- */
89
- $post_types = array_unique( $post_types );
90
- $registered_post_types = get_post_types();
91
-
92
- foreach( $post_types as $key => $post_type ) {
93
- if( !in_array($post_type, $registered_post_types) )
94
- unset( $post_types[$key] );
95
- }
96
-
97
-
98
- /*
99
- * Get all posts for each post type saved in every
100
- * settings page and get network share counts
101
- *
102
- */
103
- $args = array( 'post_type' => $post_types, 'numberposts' => 20 );
104
-
105
- if( ! empty( $settings['facebook_app_access_token'] ) )
106
- $args['numberposts'] = 500;
107
-
108
-
109
- // Get posts
110
- $posts = get_posts( $args );
111
-
112
-
113
- // Exit execution for following statements
114
- if( empty( $posts ) )
115
- return;
116
-
117
- if( empty( $social_networks ) )
118
- return;
119
-
120
-
121
- // Continue if we reach this point
122
- foreach( $posts as $post_object ) {
123
-
124
- // Get social shares from the networks
125
- $share_counts = dpsp_pull_post_share_counts( $post_object->ID );
126
-
127
- // Update share counts in the db
128
- $shares_updated = dpsp_update_post_share_counts( $post_object->ID, $share_counts );
129
-
130
-
131
- } // End of posts loop
132
-
133
  }
134
- //add_action( 'dpsp_cron_get_posts_networks_share_count', 'dpsp_cron_get_posts_networks_share_count' );
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
 
3
 
4
+ /**
5
+ * Add custom schedules to use for the cron jobs
6
+ *
7
+ * @return array
8
+ */
9
+ function dpsp_cron_schedules( $schedules ) {
10
+
11
+ $schedules['dpsp_2x_hourly'] = [
12
+ 'interval' => ( 3600 * 2 ),
13
+ 'display' => __( 'Once every two hours', 'social-pug' ),
14
+ ];
15
+
16
+ $schedules['weekly'] = [
17
+ 'interval' => ( 3600 * 24 * 7 ),
18
+ 'display' => __( 'Once every week', 'social-pug' ),
19
+ ];
20
+
21
+ return $schedules;
22
+
23
+ }
24
+
25
+ /**
26
+ * Set cron jobs
27
+ *
28
+ * @return void
29
+ *
30
+ */
31
+ function dpsp_set_cron_jobs() {
32
+
33
+ // Verifies the serial key
34
+ if ( false === wp_get_schedule( 'dpsp_cron_update_serial_key_status' ) ) {
35
+ wp_schedule_event( time(), 'daily', 'dpsp_cron_update_serial_key_status' );
36
+ }
37
 
38
+ }
 
 
 
39
 
 
40
 
41
+ /**
42
+ * Stop cron jobs
43
+ *
44
+ * @return void
45
+ *
46
+ */
47
+ function dpsp_stop_cron_jobs() {
48
 
49
+ // Remove deprecated cron
50
+ wp_clear_scheduled_hook( 'dpsp_cron_get_posts_networks_share_count', [ '2x_hourly' ] );
51
+ wp_clear_scheduled_hook( 'dpsp_cron_get_posts_networks_share_count', [ 'daily' ] );
52
+ wp_clear_scheduled_hook( 'dpsp_cron_get_posts_networks_share_count', [ 'weekly' ] );
 
 
 
 
53
 
54
+ wp_clear_scheduled_hook( 'dpsp_cron_get_posts_networks_share_count' );
55
 
56
+ wp_clear_scheduled_hook( 'dpsp_cron_update_serial_key_status' );
57
 
58
+ }
59
 
 
 
 
 
 
 
 
60
 
61
+ /**
62
+ * Checks the status of the users serial key and updates the returned value
63
+ *
64
+ * @return void
65
+ *
66
+ */
67
+ function dpsp_cron_update_serial_key_status() {
68
 
69
+ dpsp_update_serial_key_status();
70
+
71
+ }
72
 
73
+ /**
74
+ * Disables old unused cron jobs and enables the new ones
75
+ *
76
+ * @return void
77
+ *
78
+ */
79
+ function dpsp_cron_disable_old_crons( $old_plugin_version = '', $new_plugin_version = '' ) {
80
+
81
+ // In version 1.6.0 the cron job handling social shares was deprecated and
82
+ // three new cron jobs were added
83
+ if ( version_compare( $new_plugin_version, '1.6.0' ) != - 1 ) {
84
+
85
+ // Stop cron jobs
86
+ dpsp_stop_cron_jobs();
87
+
88
+ // Add new cron jobs
89
+ dpsp_set_cron_jobs();
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  }
92
+
93
+ }
94
+
95
+ /**
96
+ * Register hooks for functions-cron.php
97
+ */
98
+ function dpsp_register_functions_cron() {
99
+ add_filter( 'cron_schedules', 'dpsp_cron_schedules' );
100
+ add_action( 'dpsp_cron_update_serial_key_status', 'dpsp_cron_update_serial_key_status' );
101
+ add_action( 'dpsp_update_database', 'dpsp_cron_disable_old_crons', 10, 2 );
102
+ }
inc/functions-frontend.php CHANGED
@@ -1,468 +1,673 @@
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
- /*
5
- * Function that displays the floating sidebar sharing buttons
6
- *
7
- */
8
- function dpsp_output_front_end_floating_sidebar() {
9
-
10
- if( !dpsp_is_location_displayable( 'sidebar' ) )
11
- return;
12
-
13
- // Get saved settings
14
- $settings = get_option( 'dpsp_location_sidebar', array() );
15
-
16
- if( !isset( $settings['post_type_display'] ) || ( isset( $settings['post_type_display'] ) && !is_singular( $settings['post_type_display'] ) ) )
17
- return;
18
-
19
-
20
- // Classes for the wrapper
21
- $wrapper_classes = array();
22
- $wrapper_classes[] = ( isset( $settings['display']['spacing'] ) ? 'dpsp-bottom-spacing' : '' );
23
- $wrapper_classes[] = ( isset( $settings['display']['position'] ) ? 'dpsp-position-' . $settings['display']['position'] : '' );
24
- $wrapper_classes[] = ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' );
25
- $wrapper_classes[] = ( isset( $settings['display']['show_count'] ) ? 'dpsp-has-buttons-count' : '' );
26
- $wrapper_classes[] = ( isset( $settings['display']['show_mobile'] ) ? 'dpsp-show-on-mobile' : 'dpsp-hide-on-mobile' );
27
-
28
- // Button styles
29
- $wrapper_classes[] = ( isset( $settings['button_style'] ) ? 'dpsp-button-style-' . $settings['button_style'] : '' );
30
- $wrapper_classes[] = ( isset( $settings['button_style'] ) && $settings['button_style'] == 1 ? 'dpsp-has-button-background' : '' );
31
- $wrapper_classes[] = ( isset( $settings['button_style'] ) && $settings['button_style'] == 2 ? 'dpsp-button-hover' : '' );
32
 
33
- $wrapper_classes = implode(' ', $wrapper_classes);
 
 
34
 
35
- $output = '<div id="dpsp-floating-sidebar" class="' . $wrapper_classes . '">';
 
 
 
 
 
36
 
37
- // Total share count before buttons
38
- if( isset( $settings['display']['show_count_total'] ) && ( !isset( $settings['display']['total_count_position'] ) || $settings['display']['total_count_position'] == 'before' ) )
39
- $output .= dpsp_get_output_total_share_count( 'sidebar' );
40
 
41
- // Gets the social networks buttons
42
- if( isset( $settings['networks'] ) )
43
- $output .= dpsp_get_output_network_buttons( $settings, 'sidebar' );
44
 
45
- // Total share count after buttons
46
- if( isset( $settings['display']['show_count_total'] ) && $settings['display']['total_count_position'] == 'after' )
47
- $output .= dpsp_get_output_total_share_count( 'sidebar' );
 
 
48
 
 
 
49
 
50
- $output .= '</div>';
 
 
 
51
 
52
- // Echo the final output
53
- echo apply_filters( 'dpsp_output_front_end_floating_sidebar', $output );
54
 
 
 
 
 
 
55
  }
56
- add_action( 'wp_footer', 'dpsp_output_front_end_floating_sidebar' );
57
-
58
 
59
-
60
- /*
61
- * Function that displays the sharing buttons in the post content
62
- *
63
  */
64
- function dpsp_output_front_end_content( $content ) {
65
 
66
- // Make sure the_content isn't executed in wp_head
67
- global $wp_current_filter;
68
 
69
- if( ! empty( $wp_current_filter ) && is_array( $wp_current_filter ) ) {
70
 
71
- foreach( $wp_current_filter as $filter ) {
 
 
 
72
 
73
- if( $filter == 'wp_head' )
74
- return $content;
 
 
75
 
76
- }
 
 
77
 
78
- }
 
 
79
 
80
- if( ! is_main_query() )
81
- return $content;
 
82
 
83
- if( ! dpsp_is_location_displayable( 'content' ) )
84
- return $content;
 
85
 
86
- // Get saved settings
87
- $settings = dpsp_get_location_settings( 'content' );
88
 
89
- // Get the post object
90
- $post_obj = dpsp_get_current_post();
91
 
92
- if( ! $post_obj )
93
- return $content;
94
 
95
- global $post;
 
 
 
 
96
 
97
- if( $post_obj->ID != $post->ID )
98
- return $content;
99
 
100
- if( !isset( $settings['post_type_display'] ) || ( isset( $settings['post_type_display'] ) && !is_singular( $settings['post_type_display'] ) ) )
101
- return $content;
102
-
103
 
104
- // Set output
105
- $output = '';
106
 
107
- // Classes for the wrapper
108
- $wrapper_classes = array( 'dpsp-content-wrapper' );
109
- $wrapper_classes[] = ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' );
110
- $wrapper_classes[] = ( isset( $settings['display']['column_count'] ) ? 'dpsp-column-' . $settings['display']['column_count'] : '' );
111
- $wrapper_classes[] = ( isset( $settings['display']['spacing'] ) ? 'dpsp-has-spacing' : '' );
112
- $wrapper_classes[] = ( isset( $settings['display']['show_labels'] ) || isset( $settings['display']['show_count'] ) ? '' : 'dpsp-no-labels' );
113
- $wrapper_classes[] = ( isset( $settings['display']['show_count'] ) ? 'dpsp-has-buttons-count' : '' );
114
- $wrapper_classes[] = ( isset( $settings['display']['show_mobile'] ) ? 'dpsp-show-on-mobile' : 'dpsp-hide-on-mobile' );
115
 
116
- // Button styles
117
- $wrapper_classes[] = ( isset( $settings['button_style'] ) ? 'dpsp-button-style-' . $settings['button_style'] : '' );
118
- $wrapper_classes[] = ( isset( $settings['button_style'] ) && $settings['button_style'] == 1 ? 'dpsp-has-icon-background dpsp-has-button-background' : '' );
119
- $wrapper_classes[] = ( isset( $settings['button_style'] ) && $settings['button_style'] == 2 ? 'dpsp-has-icon-background dpsp-has-icon-dark dpsp-has-button-background' : '' );
120
- $wrapper_classes[] = ( isset( $settings['button_style'] ) && $settings['button_style'] == 3 ? 'dpsp-has-icon-background dpsp-button-hover' : '' );
121
- $wrapper_classes[] = ( isset( $settings['button_style'] ) && $settings['button_style'] == 4 ? 'dpsp-has-button-background dpsp-icon-hover' : '' );
122
- $wrapper_classes[] = ( isset( $settings['button_style'] ) && $settings['button_style'] == 5 ? 'dpsp-button-hover' : '' );
123
- $wrapper_classes[] = ( isset( $settings['button_style'] ) && $settings['button_style'] == 6 ? 'dpsp-has-icon-background' : '' );
124
- $wrapper_classes[] = ( isset( $settings['button_style'] ) && $settings['button_style'] == 7 ? 'dpsp-icon-hover' : '' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
 
126
- // Button total share counts
127
- $show_total_count = ( ! empty( $settings['display']['show_count_total'] ) ? true : false );
 
 
 
128
 
129
- $wrapper_classes[] = ( $show_total_count ? 'dpsp-show-total-share-count' : '' );
130
- $wrapper_classes[] = ( $show_total_count ? ( ! empty( $settings['display']['total_count_position'] ) ? 'dpsp-show-total-share-count-' . $settings['display']['total_count_position'] : 'dpsp-show-total-share-count-before' ) : '' );
131
 
132
- $wrapper_classes = implode( ' ', array_filter( $wrapper_classes ) );
 
 
 
133
 
134
- // Total share count before buttons
135
- if( isset( $settings['display']['show_count_total'] ) && ( !isset( $settings['display']['total_count_position'] ) || $settings['display']['total_count_position'] == 'before' ) )
136
- $output .= dpsp_get_output_total_share_count( 'content' );
 
137
 
138
- // Gets the social network buttons
139
- if( isset( $settings['networks'] ) )
140
- $output .= dpsp_get_output_network_buttons( $settings, 'content' );
141
 
142
- // Total share count before buttons
143
- if( isset( $settings['display']['show_count_total'] ) && $settings['display']['total_count_position'] == 'after' )
144
- $output .= dpsp_get_output_total_share_count( 'content' );
145
 
146
-
147
- $output = apply_filters( 'dpsp_output_front_end_content', $output );
 
 
 
148
 
149
- // Wrap output for top and bottom cases
150
- $output_top = '<div id="dpsp-content-top" class="' . $wrapper_classes . '">' . $output . '</div>';
151
- $output_bottom = '<div id="dpsp-content-bottom" class="' . $wrapper_classes . '">' . $output . '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
 
153
- // Share text
154
- if( !empty( $settings['display']['message'] ) ) {
155
 
156
- $share_text = '<p class="dpsp-share-text">' . esc_attr( $settings['display']['message'] ) . '</p>';
 
 
 
157
 
158
- $output_top = $share_text . $output_top;
159
- $output_bottom = $share_text . $output_bottom;
160
 
161
- }
 
 
162
 
163
- // Concatenate output and content
164
- if( $settings['display']['position'] == 'top' ) {
165
- $content = $output_top . $content;
166
- } elseif( $settings['display']['position'] == 'bottom' ) {
167
- $content = $content . $output_bottom;
168
- } else {
169
- $content = $output_top . $content . $output_bottom;
170
- }
171
 
172
- return $content;
 
 
 
173
 
 
 
174
  }
175
- add_filter( 'the_content', 'dpsp_output_front_end_content' );
176
- add_filter( 'woocommerce_short_description', 'dpsp_output_front_end_content' );
177
 
 
 
 
 
 
 
 
 
 
 
178
 
179
  /**
180
- * Returns the social network buttons
181
- *
182
- * @param array $settings - the current section settings for the social networks
183
- * @param string $location - the location where the social networks will be displayed
184
  *
 
 
185
  */
186
- function dpsp_get_output_network_buttons( $settings, $location = '' ) {
 
 
187
 
188
- // Return if no networks are found
189
- if( empty( $settings['networks'] ) )
190
- return '';
191
 
192
- global $post;
 
193
 
194
- $wrapper_classes = array();
195
- $wrapper_classes[] = ( isset( $settings['display']['icon_animation'] ) ? 'dpsp-has-button-icon-animation' : '' );
196
 
197
- $wrapper_classes = implode(' ', $wrapper_classes);
 
 
 
198
 
199
- // Start concatenating the output
200
- $output = '<ul class="dpsp-networks-btns-wrapper ' . ( ! empty( $location ) ? 'dpsp-networks-btns-' . esc_attr( $location ) : '' ) . ' ' . $wrapper_classes . '">';
201
 
202
- // Set current network and networks count
203
- $current_network = 1;
204
- $networks_count = count( $settings['networks'] );
205
 
206
- // Get networks share count for this post
207
- if( $post )
208
- $networks_shares = apply_filters( 'dpsp_get_output_post_shares_counts', dpsp_get_post_share_counts( $post->ID ), $location );
209
 
210
- $networks_shares = ( !empty( $networks_shares ) ? $networks_shares : array() );
 
 
211
 
212
- // Loop throught each network and create the button
213
- foreach( $settings['networks'] as $network_slug => $network ) {
214
-
215
- $output .= '<li>';
216
 
217
- // Get share count for current network
218
- $network_shares = ( isset( $networks_shares[$network_slug] ) ? $networks_shares[$network_slug] : 0 );
219
- $network_shares = apply_filters( 'dpsp_get_output_post_network_share_count', $network_shares, $location );
220
 
221
- // Check to see if the share counts should be displayed
222
- $show_share_counts = ( in_array( $network_slug, dpsp_get_networks_with_social_count() ) && isset( $settings['display']['show_count'] ) ? true : false );
223
 
224
- // Set button classes
225
- $button_classes = array('dpsp-network-btn');
226
- $button_classes[] = ( isset($network_slug) ? 'dpsp-' . $network_slug : '' );
227
- $button_classes[] = ( ( empty( $network['label'] ) || !isset( $settings['display']['show_labels'] ) ) && !isset( $settings['display']['show_count'] ) ? 'dpsp-no-label' : '' );
228
- $button_classes[] = ( $show_share_counts ? 'dpsp-has-count' : '' );
229
- $button_classes[] = ( $current_network == 1 ? 'dpsp-first' : '' );
230
- $button_classes[] = ( $current_network == $networks_count ? 'dpsp-last' : '' );
231
- // Filter the button classes
232
- $button_classes = apply_filters( 'dpsp_button_classes', $button_classes, $location, $network_shares );
233
- $button_classes = array_filter($button_classes);
234
 
 
 
 
235
 
236
- // Get the share link for the admin / front-end
237
- if( ! is_admin() ) {
 
238
 
239
- // Get post url and title
240
- $post_url = rawurlencode( esc_url( dpsp_get_post_url() ) );
241
- $post_title = rawurlencode( dpsp_get_post_title() );
242
 
243
- $network_share_link = dpsp_get_network_share_link( $network_slug, $post_url, $post_title );
 
244
 
245
- } else
246
- $network_share_link = dpsp_get_network_share_link( $network_slug, '#', '' );
247
 
248
- /**
249
- * Filter the "rel" attribute before adding it
250
- *
251
- * @param array $rel
252
- *
253
- */
254
- $rel = apply_filters( 'dpsp_network_button_attribute_rel', array( 'nofollow' ) );
255
 
256
- // Output the network button
257
- $output .= '<a ' . ( ! empty( $rel ) ? 'rel="' . esc_attr( implode( ' ', $rel ) ) . '"' : '' ) . ' href="' . $network_share_link . '" class="' . implode( ' ', $button_classes ) . '" title="' . esc_attr( dpsp_get_link_title_attribute( $network_slug ) ) . '">';
258
 
259
- $output .= '<span class="dpsp-network-icon"></span>';
 
 
 
260
 
261
- // Social network label and count wrapper
262
- $output .= '<span class="dpsp-network-label-wrapper">';
 
263
 
264
- // Labels output
265
- if( ( isset( $settings['display']['show_labels'] ) || is_admin() ) && $location != 'sidebar' )
266
- $output .= '<span class="dpsp-network-label">' . esc_attr( $network['label'] ) . '</span>';
267
 
268
- // Social count
269
- if( $show_share_counts )
270
- $output .= '<span class="dpsp-network-count">' . esc_attr( $network_shares ) . '</span>';
 
271
 
272
- $output .= '</span>';
 
 
273
 
274
- $output .= '</a>';
 
 
275
 
276
- // Add the label for the floating sidebar
277
- if( $location == 'sidebar' && ! is_admin() && ! empty( $settings['display']['show_labels'] ) && ! empty( $network['label'] ) )
278
- $output .= '<span class="dpsp-button-label">' . esc_attr( $network['label'] ) . '</span>';
279
 
280
- $output .= '</li>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
281
 
282
- // Increment network count
283
- $current_network++;
284
  }
 
285
 
286
- $output .= '</ul>';
 
 
 
287
 
288
- return $output;
 
 
289
 
 
 
 
 
 
290
  }
291
 
 
 
 
 
 
 
 
 
 
 
 
 
292
 
293
  /**
294
- * Returns the value that should be populated in the link's "title" attribute,
295
- * based on the provided network
296
- *
297
- * @param string $network_slug
298
- *
299
- * @return string
300
- *
301
  */
302
- function dpsp_get_link_title_attribute( $network_slug ) {
303
 
304
- $title = '';
305
- $networks = dpsp_get_networks( 'all' );
 
306
 
307
- $title = sprintf( __( 'Share on %s', 'social-pug' ), $networks[$network_slug] );
 
 
 
308
 
309
- if( $network_slug == 'pinterest' ) {
310
- $title = __( 'Save to Pinterest', 'social-pug' );
311
- }
312
 
313
- if( $network_slug == 'email' ) {
314
- $title = __( 'Send over email', 'social-pug' );
315
- }
316
 
317
- if( $network_slug == 'print' ) {
318
- $title = __( 'Print this webpage', 'social-pug' );
319
- }
320
 
321
- /**
322
- * Filter the title before returning it
323
- *
324
- * @param string $title
325
- * @param string $network_slug
326
- *
327
- */
328
- $title = apply_filters( 'dpsp_link_title_attribute', $title, $network_slug );
329
 
330
- return $title;
 
331
 
 
 
332
  }
333
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
 
335
  /*
336
- * Returns the HTML for the total share counts of the networks passed
337
- * If no networks are passed, the total count for all active networks will be outputed
338
- *
339
- * @param string $location - the location of the share buttons
340
- * @param array $networks - list with all networks we wish to output total for
341
- *
342
- * @return int
343
  *
344
  */
345
- function dpsp_get_output_total_share_count( $location = '', $networks = array() ) {
346
-
347
- global $post;
348
 
349
- if( !$post )
350
- return;
351
 
352
- $total_shares = dpsp_get_post_total_share_count( $post->ID, $networks, $location );
 
353
 
354
- if( is_null($total_shares) )
355
- return '';
 
 
 
356
 
357
- // HTML output
358
- $output = '<div class="dpsp-total-share-wrapper">';
359
- $output .= '<span class="dpsp-icon-total-share"></span>';
360
- $output .= '<span class="dpsp-total-share-count">' . apply_filters( 'dpsp_get_output_total_share_count', $total_shares, $location ) . '</span>';
361
- $output .= '<span>' . apply_filters( 'dpsp_total_share_count_text', __( 'shares', 'social-pug' ) ) . '</span>';
362
- $output .= '</div>';
363
 
364
- return $output;
365
  }
366
 
 
 
 
 
 
 
 
 
367
 
368
- /*
369
- * Outputs custom inline CSS needed for certain functionality
370
- *
371
- */
372
- function dpsp_output_inline_style() {
373
 
374
- // Styling default
375
- $output = '';
 
 
376
 
377
- /**
378
- * Handle locations
379
- *
380
- */
381
- $locations = dpsp_get_network_locations();
382
 
383
- foreach( $locations as $location ) {
 
 
 
384
 
385
- $location_settings = dpsp_get_location_settings( $location );
 
 
 
386
 
387
- // Jump to next one if location is not active
388
- if( empty( $location_settings['active'] ) )
389
- continue;
 
390
 
391
- /**
392
- * Mobile display
393
- *
394
- */
395
- switch( $location ) {
396
 
397
- case 'sidebar':
398
- $tool_html_selector = '#dpsp-floating-sidebar';
399
- break;
 
400
 
401
- case 'content':
402
- $tool_html_selector = '.dpsp-content-wrapper';
403
- break;
 
404
 
405
- default:
406
- $tool_html_selector = '';
407
- break;
 
408
 
409
- }
 
 
 
410
 
411
- if( ! empty( $tool_html_selector ) && empty( $location_settings['display']['show_mobile'] ) ) {
 
 
 
412
 
413
- $mobile_screen_width = ( ! empty( $location_settings['display']['screen_size'] ) ? (int)$location_settings['display']['screen_size'] : 720 );
 
414
 
415
- $output .= '
416
- @media screen and ( max-width : ' . $mobile_screen_width . 'px ) {
417
- ' . $tool_html_selector . '.dpsp-hide-on-mobile { display: none !important; }
418
- }
419
- ';
420
 
421
- }
 
422
 
423
- }
 
424
 
425
- // Actually outputting the styling
426
- echo '<style type="text/css" data-source="Social Pug">' . apply_filters( 'dpsp_output_inline_style', $output ) . '</style>';
427
 
 
 
 
 
 
428
  }
429
- add_action( 'wp_head', 'dpsp_output_inline_style' );
430
 
 
 
 
 
 
 
 
431
 
432
  /*
433
- * Output the meta tags needed by the social networks
434
  *
435
  */
436
- function dpsp_output_meta_tags() {
437
-
438
- global $post;
439
 
440
- $settings = get_option('dpsp_settings');
 
 
 
 
 
 
 
 
441
 
442
- if( !empty( $settings['disable_meta_tags'] ) )
443
- return;
 
444
 
445
- if( !$post )
446
- return;
447
 
448
- if( !is_singular() )
449
- return;
450
 
451
- // Facebook specific
452
- if( ! empty( $settings['facebook_app_id'] ) )
453
- echo '<meta property="fb:app_id" content ="' . esc_attr( $settings['facebook_app_id'] ) . '" />';
454
 
455
- // Twitter specific
456
- echo '<meta name="twitter:card" content="summary_large_image" />';
 
 
457
 
458
- // Meta tags for Open Graph
459
- echo '<meta property="og:url" content="' . esc_attr( dpsp_get_post_url() ) . '" />';
460
- echo '<meta property="og:type" content="article" />';
461
- echo '<meta property="og:title" content="' . esc_attr( dpsp_get_post_title() ) . '" />';
462
- echo '<meta property="og:description" content="' . esc_attr( dpsp_get_post_description() ) . '" />';
463
- echo '<meta property="og:image" content="' . esc_attr( dpsp_get_post_image_url() ) . '" />';
464
 
465
- do_action( 'dpsp_output_meta_tags' );
466
 
 
 
 
 
467
  }
468
- add_action( 'wp_head', 'dpsp_output_meta_tags' );
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
 
3
+ /**
4
+ * Returns the social network buttons
5
+ *
6
+ * @param array $settings - the current section settings for the social networks
7
+ * @param string $action - the action being taken
8
+ * @param string $location - the location where the social networks will be displayed
9
+ * @param array $data - data passed to class
10
+ *
11
+ * @return string
12
+ */
13
+ function dpsp_get_output_network_buttons( $settings, $action = 'share', $location = '', $data = [] ) {
14
+ $output = DPSP_Network_Buttons_Outputter::get_render( $settings, $action, $location, $data );
15
+
16
+ return $output;
17
+
18
+ }
19
+
20
+
21
+ /**
22
+ * Returns the HTML for the total share counts of the networks passed
23
+ * If no networks are passed, the total count for all active networks will be outputed
24
+ *
25
+ * @param string $location - the location of the share buttons
26
+ * @param array $networks - list with all networks we wish to output total for
27
+ *
28
+ * @return int
29
+ */
30
+ function dpsp_get_output_total_share_count( $location = '', $networks = [] ) {
31
+
32
+ $post_obj = dpsp_get_current_post();
33
+
34
+ if ( ! $post_obj ) {
35
+ return null;
36
+ }
37
 
38
+ $total_shares = dpsp_get_post_total_share_count( $post_obj->ID, $networks, $location );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
+ if ( is_null( $total_shares ) ) {
41
+ return '';
42
+ }
43
 
44
+ // HTML output
45
+ $output = '<div class="dpsp-total-share-wrapper">';
46
+ $output .= '<span class="dpsp-icon-total-share">' . dpsp_get_svg_icon_output( 'share' ) . '</span>';
47
+ $output .= '<span class="dpsp-total-share-count">' . apply_filters( 'dpsp_get_output_total_share_count', $total_shares, $location ) . '</span>';
48
+ $output .= '<span>' . apply_filters( 'dpsp_total_share_count_text', __( 'shares', 'social-pug' ) ) . '</span>';
49
+ $output .= '</div>';
50
 
51
+ return $output;
52
+ }
 
53
 
 
 
 
54
 
55
+ /**
56
+ * Outputs custom inline CSS needed for certain functionality
57
+ *
58
+ */
59
+ function dpsp_output_inline_style() {
60
 
61
+ // Styling default
62
+ $output = '';
63
 
64
+ /*
65
+ * Location: Mobile Sticky
66
+ */
67
+ $dpsp_location_mobile = Mediavine\Grow\Settings::get_setting( 'dpsp_location_mobile' );
68
 
69
+ if ( ! empty( $dpsp_location_mobile['active'] ) ) {
70
+ $screen_size = (int) $dpsp_location_mobile['display']['screen_size'];
71
 
72
+ $output .= '
73
+ @media screen and ( min-width : ' . $screen_size . 'px ) {
74
+ #dpsp-mobile-sticky.opened { display: none; }
75
+ }
76
+ ';
77
  }
 
 
78
 
79
+ /**
80
+ * Handle locations
 
 
81
  */
82
+ $locations = dpsp_get_network_locations();
83
 
84
+ foreach ( $locations as $location ) {
 
85
 
86
+ $location_settings = dpsp_get_location_settings( $location );
87
 
88
+ // Jump to next one if location is not active
89
+ if ( empty( $location_settings['active'] ) ) {
90
+ continue;
91
+ }
92
 
93
+ /**
94
+ * Mobile display
95
+ */
96
+ switch ( $location ) {
97
 
98
+ case 'sidebar':
99
+ $tool_html_selector = '#dpsp-floating-sidebar';
100
+ break;
101
 
102
+ case 'content':
103
+ $tool_html_selector = '.dpsp-content-wrapper';
104
+ break;
105
 
106
+ case 'pop_up':
107
+ $tool_html_selector = '#dpsp-pop';
108
+ break;
109
 
110
+ default:
111
+ $tool_html_selector = '';
112
+ break;
113
 
114
+ }
 
115
 
116
+ if ( ! empty( $tool_html_selector ) && empty( $location_settings['display']['show_mobile'] ) ) {
 
117
 
118
+ $mobile_screen_width = ( ! empty( $location_settings['display']['screen_size'] ) ? (int) $location_settings['display']['screen_size'] : 720 );
 
119
 
120
+ $output .= '
121
+ @media screen and ( max-width : ' . $mobile_screen_width . 'px ) {
122
+ ' . $tool_html_selector . '.dpsp-hide-on-mobile { display: none !important; }
123
+ }
124
+ ';
125
 
126
+ }
 
127
 
128
+ if ( ! empty( $tool_html_selector ) && empty( $location_settings['display']['show_mobile'] ) ) {
 
 
129
 
130
+ $mobile_screen_width = ( ! empty( $location_settings['display']['screen_size'] ) ? (int) $location_settings['display']['screen_size'] : 720 );
 
131
 
132
+ $output .= '
133
+ @media screen and ( max-width : ' . $mobile_screen_width . 'px ) {
134
+ .dpsp-share-text.dpsp-hide-on-mobile { display: none !important; }
135
+ }
136
+ ';
137
+ }
138
+ }
 
139
 
140
+ $output .= \Mediavine\Grow\Custom_Color::get_multiple_locations($locations);
141
+
142
+ // Actually outputting the styling
143
+ echo '<style type="text/css" data-source="Grow Social by Mediavine">' . esc_attr( apply_filters( 'dpsp_output_inline_style', $output ) ) . '</style>';
144
+
145
+ }
146
+
147
+ /**
148
+ * Determine if a given Yoast Presenter class instance should be blocked from output
149
+ * @param object $presenter Yoast presenter class instance
150
+ *
151
+ * @return bool
152
+ */
153
+ function dpsp_yoast_present_should_block( $presenter ) {
154
+ $base_namespace = 'Yoast\WP\SEO\Presenters\\';
155
+ $blocked_classes = [
156
+ 'Open_Graph\Locale_Presenter',
157
+ 'Open_Graph\Type_Presenter',
158
+ 'Open_Graph\Title_Presenter',
159
+ 'Open_Graph\Description_Presenter',
160
+ 'Open_Graph\Url_Presenter',
161
+ 'Open_Graph\Site_Name_Presenter',
162
+ 'Open_Graph\Article_Publisher_Presenter',
163
+ 'Open_Graph\Article_Author_Presenter',
164
+ 'Open_Graph\Article_Published_Time_Presenter',
165
+ 'Open_Graph\Article_Modified_Time_Presenter',
166
+ 'Open_Graph\Image_Presenter',
167
+ 'Open_Graph\FB_App_ID_Presenter',
168
+ 'Twitter\Card_Presenter',
169
+ 'Twitter\Title_Presenter',
170
+ 'Twitter\Description_Presenter',
171
+ 'Twitter\Image_Presenter',
172
+ 'Twitter\Creator_Presenter',
173
+ 'Twitter\Site_Presenter',
174
+ ];
175
+
176
+ foreach ( $blocked_classes as $class ) {
177
+ if ( class_exists( $base_namespace . $class ) && is_a( $presenter, $base_namespace . $class ) ) {
178
+ return true;
179
+ }
180
+ }
181
+ return false;
182
+ }
183
 
184
+ /**
185
+ * Attemps to disable the outputting of know Open Graph and Twitter meta-tags
186
+ * generated by other plugins. Plugins covered: Jetpack, Yoast SEO
187
+ */
188
+ function dpsp_disable_known_meta_tags() {
189
 
190
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
 
191
 
192
+ // Do nothing if the meta-tags option is disabled
193
+ if ( ! empty( $settings['disable_meta_tags'] ) ) {
194
+ return;
195
+ }
196
 
197
+ // Do nothing on singular pages
198
+ if ( ! is_singular() ) {
199
+ return;
200
+ }
201
 
202
+ // Check for current post
203
+ $current_post = dpsp_get_current_post();
 
204
 
205
+ if ( is_null( $current_post ) ) {
206
+ return;
207
+ }
208
 
209
+ /**
210
+ * Disable Jackpack Open Graph tags
211
+ */
212
+ add_filter( 'jetpack_enable_opengraph', '__return_false', 99 );
213
+ add_filter( 'jetpack_enable_open_graph', '__return_false', 99 );
214
 
215
+ /**
216
+ * Remove the Open Graph and Twitter tags added by Yoast
217
+ */
218
+ if ( defined( 'WPSEO_VERSION' ) ) {
219
+
220
+ global $wpseo_og;
221
+
222
+ remove_action( 'wpseo_head', [ $wpseo_og, 'opengraph' ], 30 );
223
+ remove_action( 'wpseo_head', [ 'WPSEO_Twitter', 'get_instance' ], 40 );
224
+ add_filter(
225
+ 'wpseo_frontend_presenters',
226
+ function ( $presenters ) {
227
+ $pass = [];
228
+ foreach ( $presenters as $presenter ) {
229
+ if ( ! dpsp_yoast_present_should_block( $presenter ) ) {
230
+ $pass[] = $presenter;
231
+ }
232
+ }
233
+ return $pass;
234
+ }
235
+ );
236
+ }
237
 
238
+ }
 
239
 
240
+ /**
241
+ * Output the meta tags needed by the social networks
242
+ */
243
+ function dpsp_output_meta_tags() {
244
 
245
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
 
246
 
247
+ if ( ! empty( $settings['disable_meta_tags'] ) ) {
248
+ return;
249
+ }
250
 
251
+ if ( ! is_singular() ) {
252
+ return;
253
+ }
 
 
 
 
 
254
 
255
+ /**
256
+ * Get our own set of Open Graph tags
257
+ */
258
+ $current_post = dpsp_get_current_post();
259
 
260
+ if ( is_null( $current_post ) ) {
261
+ return;
262
  }
 
 
263
 
264
+ /**
265
+ * Get and set custom post Open Graph and Twitter values
266
+ */
267
+ $custom_og_title = dpsp_get_post_custom_title( $current_post->ID );
268
+ $custom_og_description = dpsp_get_post_custom_description( $current_post->ID );
269
+ $custom_og_image_data = dpsp_get_post_custom_image_data( $current_post->ID );
270
+
271
+ $custom_twitter_title = '';
272
+ $custom_twitter_description = '';
273
+ $custom_twitter_image_data = [];
274
 
275
  /**
276
+ * Get Yoast SEO set of Open Graph tags
 
 
 
277
  *
278
+ * Given the large number of websites using Yoast, we'll do a check to see
279
+ * if Yoast is installed and if the user has added meta tags information in Yoast
280
  */
281
+ if ( defined( 'WPSEO_VERSION' ) ) {
282
+
283
+ if ( empty( $custom_og_title ) || empty( $custom_og_description ) || empty( $custom_og_image_data ) ) {
284
 
285
+ // Grab the Open Graph data saved into Yoast
286
+ $yoast_og_title = get_post_meta( $current_post->ID, '_yoast_wpseo_opengraph-title', true );
287
+ $yoast_og_description = get_post_meta( $current_post->ID, '_yoast_wpseo_opengraph-description', true );
288
 
289
+ // Replace the vars
290
+ if ( function_exists( 'wpseo_replace_vars' ) ) {
291
 
292
+ $yoast_og_title = ( ! empty( $yoast_og_title ) ? wpseo_replace_vars( $yoast_og_title, $current_post ) : '' );
293
+ $yoast_og_description = ( ! empty( $yoast_og_description ) ? wpseo_replace_vars( $yoast_og_description, $current_post ) : '' );
294
 
295
+ }
296
+
297
+ // Grab the Open Graph image data saved into Yoast
298
+ $yoast_og_image_data = [];
299
 
300
+ if ( class_exists( 'WPSEO_Image_Utils' ) ) {
 
301
 
302
+ $yoast_og_image_url = get_post_meta( $current_post->ID, '_yoast_wpseo_opengraph-image', true );
303
+ $yoast_og_image_id = WPSEO_Image_Utils::get_attachment_by_url( $yoast_og_image_url );
304
+ $yoast_og_image_data = wp_get_attachment_image_src( $yoast_og_image_id, 'full' );
305
 
306
+ }
 
 
307
 
308
+ // Grab the Twitter data saved into Yoast
309
+ $yoast_twitter_title = get_post_meta( $current_post->ID, '_yoast_wpseo_twitter-title', true );
310
+ $yoast_twitter_description = get_post_meta( $current_post->ID, '_yoast_wpseo_twitter-description', true );
311
 
312
+ // Replace the vars
313
+ if ( function_exists( 'wpseo_replace_vars' ) ) {
 
 
314
 
315
+ $yoast_twitter_title = ( ! empty( $yoast_twitter_title ) ? wpseo_replace_vars( $yoast_twitter_title, $current_post ) : '' );
316
+ $yoast_twitter_description = ( ! empty( $yoast_twitter_description ) ? wpseo_replace_vars( $yoast_twitter_description, $current_post ) : '' );
 
317
 
318
+ }
 
319
 
320
+ // Grab the Twitter image data saved into Yoast
321
+ $yoast_twitter_image_data = [];
322
+ $yoast_twitter_image_url = get_post_meta( $current_post->ID, '_yoast_wpseo_twitter-image', true );
 
 
 
 
 
 
 
323
 
324
+ if ( ! empty( $yoast_twitter_image_url ) ) {
325
+ $yoast_twitter_image_data[] = $yoast_og_image_url;
326
+ }
327
 
328
+ // Grab the Yoast general meta-data
329
+ $yoast_meta_title = get_post_meta( $current_post->ID, '_yoast_wpseo_title', true );
330
+ $yoast_meta_description = get_post_meta( $current_post->ID, '_yoast_wpseo_metadesc', true );
331
 
332
+ // Replace the vars
333
+ if ( function_exists( 'wpseo_replace_vars' ) ) {
 
334
 
335
+ $yoast_meta_title = ( ! empty( $yoast_meta_title ) ? wpseo_replace_vars( $yoast_meta_title, $current_post ) : '' );
336
+ $yoast_meta_description = ( ! empty( $yoast_meta_description ) ? wpseo_replace_vars( $yoast_meta_description, $current_post ) : '' );
337
 
338
+ }
 
339
 
340
+ // Overwrite the Yoast OG and Twitter if they are empty with the Yoast general meta
341
+ $yoast_og_title = ( ! empty( $yoast_og_title ) ? $yoast_og_title : $yoast_meta_title );
342
+ $yoast_og_description = ( ! empty( $yoast_og_description ) ? $yoast_og_description : $yoast_meta_description );
 
 
 
 
343
 
344
+ $yoast_twitter_title = ( ! empty( $yoast_twitter_title ) ? $yoast_twitter_title : $yoast_meta_title );
345
+ $yoast_twitter_description = ( ! empty( $yoast_twitter_description ) ? $yoast_twitter_description : $yoast_meta_description );
346
 
347
+ // Overwrite custom data with the Yoast data
348
+ $custom_og_title = ( ! empty( $custom_og_title ) ? $custom_og_title : $yoast_og_title );
349
+ $custom_og_description = ( ! empty( $custom_og_description ) ? $custom_og_description : $yoast_og_description );
350
+ $custom_og_image_data = ( ! empty( $custom_og_image_data ) ? $custom_og_image_data : $yoast_og_image_data );
351
 
352
+ $custom_twitter_title = ( ! empty( $custom_twitter_title ) ? $custom_twitter_title : $yoast_twitter_title );
353
+ $custom_twitter_description = ( ! empty( $custom_twitter_description ) ? $custom_twitter_description : $yoast_twitter_description );
354
+ $custom_twitter_image_data = ( ! empty( $custom_twitter_image_data ) ? $custom_twitter_image_data : $yoast_twitter_image_data );
355
 
356
+ }
357
+ }
 
358
 
359
+ /**
360
+ * Set final Open Graph and Twitter values
361
+ */
362
+ $og_url = dpsp_get_post_url( $current_post->ID );
363
 
364
+ $og_title = ( ! empty( $custom_og_title ) ? $custom_og_title : dpsp_get_post_title( $current_post->ID ) );
365
+ $og_description = ( ! empty( $custom_og_description ) ? $custom_og_description : dpsp_get_post_description( $current_post->ID ) );
366
+ $og_image_data = ( ! empty( $custom_og_image_data ) ? $custom_og_image_data : dpsp_get_post_image_data( $current_post->ID ) );
367
 
368
+ $twitter_title = ( ! empty( $custom_twitter_title ) ? $custom_twitter_title : $og_title );
369
+ $twitter_description = ( ! empty( $custom_twitter_description ) ? $custom_twitter_description : $og_description );
370
+ $twitter_image_data = ( ! empty( $custom_twitter_image_data ) ? $custom_twitter_image_data : $og_image_data );
371
 
372
+ // Begin output
373
+ echo '<!-- Grow Social by Mediavine v.' . DPSP_VERSION . ' https://marketplace.mediavine.com/grow-social-pro/ -->';
 
374
 
375
+ /**
376
+ * Open Graph tags
377
+ */
378
+ echo PHP_EOL . '<meta property="og:locale" content="' . esc_attr( get_locale() ) . '"/>';
379
+ echo PHP_EOL . '<meta property="og:type" content="article" />';
380
+ echo PHP_EOL . '<meta property="og:title" content="' . esc_attr( sanitize_text_field( $og_title ) ) . '" />';
381
+ echo PHP_EOL . '<meta property="og:description" content="' . esc_attr( sanitize_text_field( $og_description ) ) . '" />';
382
+ echo PHP_EOL . '<meta property="og:url" content="' . esc_attr( $og_url ) . '" />';
383
+ echo PHP_EOL . '<meta property="og:site_name" content="' . esc_attr( get_bloginfo( 'name' ) ) . '" />';
384
+ echo PHP_EOL . '<meta property="og:updated_time" content="' . date( 'c', strtotime( $current_post->post_modified ) ) . '" />';
385
+ echo PHP_EOL . '<meta property="article:published_time" content="' . date( 'c', strtotime( $current_post->post_date ) ) . '" />';
386
+ echo PHP_EOL . '<meta property="article:modified_time" content="' . date( 'c', strtotime( $current_post->post_modified ) ) . '" />';
387
+
388
+ if ( ! is_null( $og_image_data ) && is_array( $og_image_data ) ) {
389
+
390
+ echo PHP_EOL . '<meta property="og:image" content="' . esc_attr( $og_image_data[0] ) . '" />';
391
+
392
+ if ( ! empty( $og_image_data[1] ) ) {
393
+ echo PHP_EOL . '<meta property="og:image:width" content="' . esc_attr( $og_image_data[1] ) . '" />';
394
+ }
395
 
396
+ if ( ! empty( $og_image_data[2] ) ) {
397
+ echo PHP_EOL . '<meta property="og:image:height" content="' . esc_attr( $og_image_data[2] ) . '" />';
398
  }
399
+ }
400
 
401
+ /**
402
+ * Yoast extra Open Graph tags that are not handled by Grow Social by Mediavine
403
+ */
404
+ $facebook = apply_filters( 'wpseo_opengraph_author_facebook', get_the_author_meta( 'facebook', $current_post->post_author ) );
405
 
406
+ if ( $facebook && ( is_string( $facebook ) && '' !== $facebook ) ) {
407
+ echo PHP_EOL . '<meta property="article:author" content ="' . esc_attr( $facebook ) . '" />';
408
+ }
409
 
410
+ /**
411
+ * Facebook specific tags
412
+ */
413
+ if ( ! empty( $settings['facebook_app_id'] ) ) {
414
+ echo PHP_EOL . '<meta property="fb:app_id" content ="' . esc_attr( $settings['facebook_app_id'] ) . '" />';
415
  }
416
 
417
+ /**
418
+ * Twitter specific tags
419
+ */
420
+ echo PHP_EOL . '<meta name="twitter:card" content="summary_large_image" />';
421
+ echo PHP_EOL . '<meta name="twitter:title" content="' . esc_attr( sanitize_text_field( $twitter_title ) ) . '" />';
422
+ echo PHP_EOL . '<meta name="twitter:description" content="' . esc_attr( sanitize_text_field( $twitter_description ) ) . '" />';
423
+
424
+ if ( ! is_null( $twitter_image_data ) && is_array( $twitter_image_data ) ) {
425
+
426
+ echo PHP_EOL . '<meta name="twitter:image" content="' . esc_attr( $twitter_image_data[0] ) . '" />';
427
+
428
+ }
429
 
430
  /**
431
+ * Yoast extra Twitter tags that are not handled by Social Pug
 
 
 
 
 
 
432
  */
433
+ $twitter = apply_filters( 'wpseo_twitter_creator_account', ltrim( trim( get_the_author_meta( 'twitter', $current_post->post_author ) ), '@' ) );
434
 
435
+ if ( is_string( $twitter ) && '' !== $twitter ) {
436
+ echo PHP_EOL . '<meta name="twitter:creator" content="' . '@' . esc_attr( $twitter ) . '" />';
437
+ }
438
 
439
+ /**
440
+ * Output extra meta tags
441
+ */
442
+ do_action( 'dpsp_output_meta_tags' );
443
 
444
+ // End output
445
+ echo PHP_EOL . '<!-- Grow Social by Mediavine v.' . esc_attr( DPSP_VERSION ) . ' https://marketplace.mediavine.com/grow-social-pro/ -->' . PHP_EOL;
 
446
 
447
+ }
 
 
448
 
 
 
 
449
 
450
+ /**
451
+ * Given the importance of Yoast, we will take it into account when printing the meta-tags
452
+ *
453
+ * If it's activated, print the meta-tags in exactly the same place it prints them, as we will remove the ones
454
+ * printed by them
455
+ */
456
+ function dpsp_set_hook_output_meta_tags() {
 
457
 
458
+ if ( defined( 'WPSEO_VERSION' ) ) {
459
+ add_action( 'wpseo_head', 'dpsp_output_meta_tags', 30 );
460
 
461
+ } else {
462
+ add_action( 'wp_head', 'dpsp_output_meta_tags', 1 );
463
  }
464
 
465
+ }
466
+
467
+ /**
468
+ * Returns the HTML string for the social share buttons
469
+ *
470
+ * @param array $args
471
+ *
472
+ * Arguments array elements
473
+ *
474
+ * 'id' - string
475
+ * 'networks' - array
476
+ * 'networks_labels' - array
477
+ * 'button_style' - int (from 1 to 8)
478
+ * 'shape' - string (rectangle/rounded/circle)
479
+ * 'size' - string (small/medium/large)
480
+ * 'columns' - string (auto) / int (from 1 to 6),
481
+ * 'show_labels' - bool
482
+ * 'button_spacing' - bool
483
+ * 'show_count' - bool
484
+ * 'show_total_count' - bool
485
+ * 'total_count_position' - string (before/after)
486
+ * 'count_round' - bool
487
+ * 'minimum_count' - int
488
+ * 'minimum_individual_count' - int
489
+ * 'show_mobile' - bool
490
+ * 'overwrite' - bool
491
+ *
492
+ * @return string
493
+ */
494
+ function dpsp_get_share_buttons( $args = [] ) {
495
 
496
  /*
497
+ * Modify settings based on the attributes
 
 
 
 
 
 
498
  *
499
  */
500
+ $settings = [];
 
 
501
 
502
+ // Set networks and network labels
503
+ if ( ! empty( $args['networks'] ) ) {
504
 
505
+ $networks = array_map( 'trim', $args['networks'] );
506
+ $networks_labels = ( ! empty( $args['networks_labels'] ) ? $args['networks_labels'] : [] );
507
 
508
+ // Set the array with the networks slug and labels
509
+ foreach ( $networks as $key => $network_slug ) {
510
+ $networks[ $network_slug ]['label'] = ( isset( $networks_labels[ $key ] ) ? $networks_labels[ $key ] : dpsp_get_network_name( $network_slug ) );
511
+ unset( $networks[ $key ] );
512
+ }
513
 
514
+ $settings['networks'] = $networks;
 
 
 
 
 
515
 
 
516
  }
517
 
518
+ // Set button style
519
+ if ( ! empty( $args['button_style'] ) ) {
520
+ $settings['button_style'] = $args['button_style'];
521
+ }
522
+ // If no style is set, set the default to the first style
523
+ if ( ! isset( $settings['button_style'] ) ) {
524
+ $settings['button_style'] = 1;
525
+ }
526
 
527
+ // Set buttons shape
528
+ if ( ! empty( $args['shape'] ) ) {
529
+ $settings['display']['shape'] = $args['shape'];
530
+ }
 
531
 
532
+ // Set buttons size
533
+ if ( ! empty( $args['size'] ) ) {
534
+ $settings['display']['size'] = $args['size'];
535
+ }
536
 
537
+ // Set columns
538
+ if ( ! empty( $args['columns'] ) ) {
539
+ $settings['display']['column_count'] = $args['columns'];
540
+ }
 
541
 
542
+ // Show labels
543
+ if ( isset( $args['show_labels'] ) ) {
544
+ $settings['display']['show_labels'] = ( ! empty( $args['show_labels'] ) ? 'yes' : 'no' );
545
+ }
546
 
547
+ // Button spacing
548
+ if ( isset( $args['button_spacing'] ) ) {
549
+ $settings['display']['spacing'] = ( ! empty( $args['button_spacing'] ) ? 'yes' : 'no' );
550
+ }
551
 
552
+ // Show count
553
+ if ( isset( $args['show_count'] ) ) {
554
+ $settings['display']['show_count'] = ( ! empty( $args['show_count'] ) ? 'yes' : 'no' );
555
+ }
556
 
557
+ // Show count total
558
+ if ( isset( $args['show_total_count'] ) ) {
559
+ $settings['display']['show_count_total'] = ( ! empty( $args['show_total_count'] ) ? 'yes' : 'no' );
560
+ }
 
561
 
562
+ // Total count position
563
+ if ( ! empty( $args['total_count_position'] ) ) {
564
+ $settings['display']['total_count_position'] = $args['total_count_position'];
565
+ }
566
 
567
+ // Share counts round
568
+ if ( isset( $args['count_round'] ) ) {
569
+ $settings['display']['count_round'] = ( ! empty( $args['count_round'] ) ? 'yes' : 'no' );
570
+ }
571
 
572
+ // Share minimum global count
573
+ if ( ! empty( $args['minimum_count'] ) ) {
574
+ $settings['display']['minimum_count'] = (int) $args['minimum_count'];
575
+ }
576
 
577
+ // Share minimum individual count
578
+ if ( ! empty( $args['minimum_individual_count'] ) ) {
579
+ $settings['display']['minimum_individual_count'] = (int) $args['minimum_individual_count'];
580
+ }
581
 
582
+ // Show on mobile
583
+ if ( isset( $args['show_mobile'] ) ) {
584
+ $settings['display']['show_mobile'] = ( ! empty( $args['show_mobile'] ) ? 'yes' : 'no' );
585
+ }
586
 
587
+ // If Overwrite is set to "yes" strip everything
588
+ if ( empty( $args['overwrite'] ) ) {
589
 
590
+ // Location settings for the Content location
591
+ $saved_settings = dpsp_get_location_settings( 'content' );
 
 
 
592
 
593
+ // Social networks
594
+ $settings['networks'] = ( ! empty( $settings['networks'] ) ? $settings['networks'] : $saved_settings['networks'] );
595
 
596
+ // Display settings
597
+ $settings['display'] = array_merge( $saved_settings['display'], $settings['display'] );
598
 
599
+ }
 
600
 
601
+ // Remove all display settings that have "no" as a value
602
+ foreach ( $settings['display'] as $key => $value ) {
603
+ if ( 'no' == $value ) {
604
+ unset( $settings['display'][ $key ] );
605
+ }
606
  }
 
607
 
608
+ // Round counts cannot be changed direcly because they are too dependend
609
+ // on the location settings saved in the database.
610
+ // For the moment removing the filters and adding them again is the only solution
611
+ if ( ! isset( $settings['display']['count_round'] ) ) {
612
+ remove_filter( 'dpsp_get_output_post_shares_counts', 'dpsp_round_share_counts', 10, 2 );
613
+ remove_filter( 'dpsp_get_output_total_share_count', 'dpsp_round_share_counts', 10, 2 );
614
+ }
615
 
616
  /*
617
+ * Start outputing
618
  *
619
  */
620
+ $output = '';
 
 
621
 
622
+ // Classes for the wrapper
623
+ $wrapper_classes = [ 'dpsp-share-buttons-wrapper' ];
624
+ $wrapper_classes[] = ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' );
625
+ $wrapper_classes[] = ( isset( $settings['display']['size'] ) ? 'dpsp-size-' . $settings['display']['size'] : 'dpsp-size-medium' );
626
+ $wrapper_classes[] = ( isset( $settings['display']['column_count'] ) ? 'dpsp-column-' . $settings['display']['column_count'] : '' );
627
+ $wrapper_classes[] = ( isset( $settings['display']['spacing'] ) ? 'dpsp-has-spacing' : '' );
628
+ $wrapper_classes[] = ( isset( $settings['display']['show_labels'] ) || isset( $settings['display']['show_count'] ) ? '' : 'dpsp-no-labels' );
629
+ $wrapper_classes[] = ( isset( $settings['display']['show_count'] ) ? 'dpsp-has-buttons-count' : '' );
630
+ $wrapper_classes[] = ( isset( $settings['display']['show_mobile'] ) ? 'dpsp-show-on-mobile' : 'dpsp-hide-on-mobile' );
631
 
632
+ // Button total share counts
633
+ $minimum_count = ( ! empty( $settings['display']['minimum_count'] ) ? (int) $settings['display']['minimum_count'] : 0 );
634
+ $show_total_count = ( $minimum_count <= (int) dpsp_get_post_total_share_count() && ! empty( $settings['display']['show_count_total'] ) ? true : false );
635
 
636
+ $wrapper_classes[] = ( $show_total_count ? 'dpsp-show-total-share-count' : '' );
637
+ $wrapper_classes[] = ( $show_total_count ? ( ! empty( $settings['display']['total_count_position'] ) ? 'dpsp-show-total-share-count-' . $settings['display']['total_count_position'] : 'dpsp-show-total-share-count-before' ) : '' );
638
 
639
+ // Button styles
640
+ $wrapper_classes[] = ( isset( $settings['button_style'] ) ? 'dpsp-button-style-' . $settings['button_style'] : '' );
641
 
642
+ $wrapper_classes = implode( ' ', array_filter( $wrapper_classes ) );
 
 
643
 
644
+ // Output total share counts
645
+ if ( $show_total_count ) {
646
+ $output .= dpsp_get_output_total_share_count( 'content' );
647
+ }
648
 
649
+ // Gets the social network buttons
650
+ if ( isset( $settings['networks'] ) ) {
651
+ $output .= dpsp_get_output_network_buttons( $settings, 'share', 'content' );
652
+ }
 
 
653
 
654
+ $output = '<div ' . ( ! empty( $args['id'] ) ? 'id="' . esc_attr( $args['id'] ) . '"' : '' ) . ' class="' . $wrapper_classes . '">' . $output . '</div>';
655
 
656
+ // Add back the filters
657
+ if ( ! isset( $settings['display']['count_round'] ) ) {
658
+ add_filter( 'dpsp_get_output_post_shares_counts', 'dpsp_round_share_counts', 10, 2 );
659
+ add_filter( 'dpsp_get_output_total_share_count', 'dpsp_round_share_counts', 10, 2 );
660
  }
661
+
662
+ return $output;
663
+
664
+ }
665
+
666
+ /**
667
+ * Register hooks for functions-frontend.php
668
+ */
669
+ function dpsp_register_functions_frontend() {
670
+ add_action( 'wp_head', 'dpsp_disable_known_meta_tags', 1 );
671
+ add_action( 'wp', 'dpsp_set_hook_output_meta_tags', 10 );
672
+ add_action( 'wp_head', 'dpsp_output_inline_style' );
673
+ }
inc/functions-mobile.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Hides social networks that are mobile only from the share tools when these are
5
+ * displayed on devices that are not mobile
6
+ *
7
+ * @param array $settings - the settings array for the current location
8
+ * @param string $action - the current type of action ( share/follow )
9
+ * @param string $location - the display location for the buttons
10
+ *
11
+ * @return array
12
+ *
13
+ */
14
+ function dpsp_handle_mobile_only_networks( $settings, $action, $location ) {
15
+
16
+ if ( 'share' !== $action ) {
17
+ return $settings;
18
+ }
19
+
20
+ if ( empty( $settings['networks'] ) || ! is_array( $settings['networks'] ) ) {
21
+ return $settings;
22
+ }
23
+
24
+ if ( ! array_key_exists( 'whatsapp', $settings['networks'] ) ) {
25
+ return $settings;
26
+ }
27
+
28
+ $plugin_settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
29
+
30
+ if ( empty( $plugin_settings['whatsapp_display_only_mobile'] ) ) {
31
+ return $settings;
32
+ }
33
+
34
+ $mobile_detect = new \Mediavine\Grow\Mobile_Detect();
35
+
36
+ // Remove WhatsApp from the networks array if we are not on a mobile device
37
+ if ( ! $mobile_detect->isMobile() ) {
38
+
39
+ unset( $settings['networks']['whatsapp'] );
40
+
41
+ } else {
42
+
43
+ if ( ! empty( $settings['display']['column_count'] ) && 'auto' != $settings['display']['column_count'] ) {
44
+
45
+ $networks_count = count( $settings['networks'] );
46
+ $column_count = (int) $settings['display']['column_count'];
47
+
48
+ if ( ( ( $networks_count + 1 ) / $column_count < 2 ) && ( $networks_count > $column_count ) ) {
49
+ $settings['display']['column_count'] += 1;
50
+ }
51
+ }
52
+ }
53
+
54
+ return $settings;
55
+
56
+ }
57
+
58
+ /**
59
+ * Register hooks for functions-mobile.php
60
+ */
61
+ function dpsp_register_functions_mobile() {
62
+ add_filter( 'dpsp_network_buttons_outputter_settings', 'dpsp_handle_mobile_only_networks', 10, 3 );
63
+ }
inc/functions-post.php ADDED
@@ -0,0 +1,600 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Because certain widgets / plugins reset the global $post variable
5
+ * we are going to cache it when WP has just loaded, so that we have the
6
+ * original post available at all times
7
+ *
8
+ */
9
+ function dpsp_cache_post_object() {
10
+
11
+ global $dpsp_cache_wp_post;
12
+
13
+ $dpsp_cache_wp_post = null;
14
+
15
+ if ( is_singular() && ! is_front_page() && ! is_home() ) {
16
+ global $post;
17
+ $dpsp_cache_wp_post = $post;
18
+ }
19
+ }
20
+
21
+ /**
22
+ * Returns the current post object
23
+ *
24
+ * @return mixed - WP_Post | null
25
+ *
26
+ */
27
+ function dpsp_get_current_post() {
28
+
29
+ global $dpsp_cache_wp_post;
30
+
31
+ if ( ! is_null( $dpsp_cache_wp_post ) ) {
32
+ return $dpsp_cache_wp_post;
33
+ }
34
+
35
+ global $post;
36
+
37
+ if ( ! is_null( $post ) ) {
38
+ return $post;
39
+ }
40
+
41
+ return null;
42
+
43
+ }
44
+
45
+
46
+ /**
47
+ * Returns the post object for the given post id
48
+ *
49
+ * @param int $post_id
50
+ *
51
+ * @param mixed - WP_Post | null
52
+ *
53
+ */
54
+ function dpsp_get_post( $post_id = 0 ) {
55
+
56
+ if ( empty( $post_id ) ) {
57
+ return null;
58
+ }
59
+
60
+ $current_post = dpsp_get_current_post();
61
+
62
+ if ( ! is_null( $current_post ) && $current_post->ID == $post_id ) {
63
+ return $current_post;
64
+ }
65
+
66
+ return get_post( $post_id );
67
+
68
+ }
69
+
70
+
71
+ /**
72
+ * Returns the url of the given post
73
+ *
74
+ * @param int $post_id
75
+ *
76
+ * @return string
77
+ *
78
+ */
79
+ function dpsp_get_post_url( $post_id = 0 ) {
80
+
81
+ $post_obj = dpsp_get_post( $post_id );
82
+
83
+ if ( is_null( $post_obj ) ) {
84
+ return '';
85
+ }
86
+
87
+ $post_url = get_permalink( $post_obj );
88
+
89
+ /**
90
+ * Filter the post URL before returning
91
+ *
92
+ * @param string $post_url
93
+ * @param int $post_id
94
+ *
95
+ */
96
+ return apply_filters( 'dpsp_get_post_url', $post_url, $post_obj->ID );
97
+
98
+ }
99
+
100
+
101
+ /**
102
+ * Returns the title of the given post
103
+ *
104
+ * @param int $post_id
105
+ *
106
+ * @return string
107
+ *
108
+ */
109
+ function dpsp_get_post_title( $post_id = 0 ) {
110
+
111
+ $post_obj = dpsp_get_post( $post_id );
112
+
113
+ if ( is_null( $post_obj ) ) {
114
+ return '';
115
+ }
116
+
117
+ $post_title = $post_obj->post_title;
118
+
119
+ /**
120
+ * Filter the post title before returning
121
+ *
122
+ * @param string $post_title
123
+ * @param int $post_id
124
+ *
125
+ */
126
+ return apply_filters( 'dpsp_get_post_title', $post_title, $post_obj->ID );
127
+
128
+ }
129
+
130
+
131
+ /**
132
+ * Returns the a description for the given post
133
+ *
134
+ * @param int $post_id
135
+ *
136
+ * @return string
137
+ *
138
+ */
139
+ function dpsp_get_post_description( $post_id = 0 ) {
140
+
141
+ $post_obj = dpsp_get_post( $post_id );
142
+
143
+ if ( is_null( $post_obj ) ) {
144
+ return '';
145
+ }
146
+
147
+ // Check to see if the post has an excerpt
148
+ if ( ! empty( $post_obj->post_excerpt ) ) {
149
+ $post_description = $post_obj->post_excerpt;
150
+ } elseif ( ! empty( $post_obj->post_content ) ) {
151
+ // If not, strip the content
152
+
153
+ $post_description = strip_shortcodes( $post_obj->post_content );
154
+ $post_description = wp_trim_words( $post_description, apply_filters( 'dpsp_post_description_length', 35 ), '' );
155
+
156
+ } else {
157
+ $post_description = '';
158
+ }
159
+
160
+ /**
161
+ * Filter the post description before returning
162
+ *
163
+ * @param string $post_description
164
+ * @param int $post_id
165
+ *
166
+ */
167
+ return apply_filters( 'dpsp_get_post_description', $post_description, $post_obj->ID );
168
+
169
+ }
170
+
171
+
172
+ /**
173
+ * Returns the featured image data for the given post
174
+ *
175
+ * @param int $post_id
176
+ * @param string $size
177
+ *
178
+ * @return mixed array | null
179
+ *
180
+ */
181
+ function dpsp_get_post_image_data( $post_id = 0, $size = 'full' ) {
182
+
183
+ $post_obj = dpsp_get_post( $post_id );
184
+
185
+ if ( is_null( $post_obj ) ) {
186
+ return null;
187
+ }
188
+
189
+ $post_thumbnail_id = get_post_thumbnail_id( $post_obj->ID );
190
+ $post_thumbnail_data = wp_get_attachment_image_src( $post_thumbnail_id, $size );
191
+
192
+ if ( false === $post_thumbnail_data ) {
193
+ $post_thumbnail_data = null;
194
+ }
195
+
196
+ /**
197
+ * Filter the post image data before returning
198
+ *
199
+ * @param array $post_thumbnail_data
200
+ * @param int $post_id
201
+ * @param string $size
202
+ *
203
+ */
204
+ return apply_filters( 'dpsp_get_post_image_data', $post_thumbnail_data, $post_obj->ID, $size );
205
+
206
+ }
207
+
208
+
209
+ /**
210
+ * Returns the featured image URL for the given post
211
+ *
212
+ * @param int $post_id
213
+ * @param string $size
214
+ *
215
+ * @return mixed string | false
216
+ *
217
+ */
218
+ function dpsp_get_post_image_url( $post_id = 0, $size = 'full' ) {
219
+
220
+ // Get post image data
221
+ $image_data = dpsp_get_post_image_data( $post_id, $size );
222
+
223
+ if ( ! is_array( $image_data ) ) {
224
+ return false;
225
+ }
226
+
227
+ $post_thumbnail_url = $image_data[0];
228
+
229
+ /**
230
+ * Filter the post image URL before returning
231
+ *
232
+ * @param array $post_thumbnail_data
233
+ * @param int $post_id
234
+ * @param string $size
235
+ *
236
+ */
237
+ return apply_filters( 'dpsp_get_post_image_url', $post_thumbnail_url, $post_id, $size );
238
+
239
+ }
240
+
241
+
242
+ /**
243
+ * Returns the custom post title set in the Custom Social Options meta-box for a given post
244
+ *
245
+ * @param int $post_id
246
+ *
247
+ * @return string
248
+ *
249
+ */
250
+ function dpsp_get_post_custom_title( $post_id = 0 ) {
251
+
252
+ // Check to see if a custom title is in place
253
+ $share_options = dpsp_maybe_unserialize( get_post_meta( $post_id, 'dpsp_share_options', true ) );
254
+
255
+ // Set custom title
256
+ $post_title = ( ! empty( $share_options['custom_title'] ) ? $share_options['custom_title'] : '' );
257
+
258
+ return apply_filters( 'dpsp_get_post_custom_title', $post_title, $post_id );
259
+
260
+ }
261
+
262
+
263
+ /**
264
+ * Returns the custom post description set in the Custom Social Options meta-box
265
+ *
266
+ * @return string
267
+ *
268
+ */
269
+ function dpsp_get_post_custom_description( $post_id = 0 ) {
270
+
271
+ // Check to see if a custom description is in place
272
+ $share_options = dpsp_maybe_unserialize( get_post_meta( $post_id, 'dpsp_share_options', true ) );
273
+
274
+ // Set post description
275
+ $post_description = ( ! empty( $share_options['custom_description'] ) ? $share_options['custom_description'] : '' );
276
+
277
+ return apply_filters( 'dpsp_get_post_custom_description', $post_description, $post_id );
278
+
279
+ }
280
+
281
+
282
+ /**
283
+ * Returns the custom post image data set in the Custom Social Options meta-box
284
+ *
285
+ * @return mixed array | null
286
+ *
287
+ */
288
+ function dpsp_get_post_custom_image_data( $post_id = 0, $size = 'full' ) {
289
+
290
+ // Check to see if a custom description is in place
291
+ $share_options = dpsp_maybe_unserialize( get_post_meta( $post_id, 'dpsp_share_options', true ) );
292
+
293
+ if ( empty( $share_options['custom_image']['id'] ) ) {
294
+ return null;
295
+ }
296
+
297
+ $post_image_id = (int) $share_options['custom_image']['id'];
298
+ $post_image_data = wp_get_attachment_image_src( $post_image_id, $size );
299
+
300
+ return apply_filters( 'dpsp_get_post_custom_image_data', $post_image_data, $post_id, $size );
301
+
302
+ }
303
+
304
+
305
+ /**
306
+ * If the custom post title of the post is set in the Custom Social Options meta-box,
307
+ * return it instead of the default post title
308
+ *
309
+ * @param string
310
+ *
311
+ * @return string
312
+ *
313
+ */
314
+ function dpsp_add_custom_post_title( $post_title = '', $post_id = 0 ) {
315
+
316
+ $custom_title = dpsp_get_post_custom_title( $post_id );
317
+ $post_title = ( ! empty( $custom_title ) ? $custom_title : $post_title );
318
+
319
+ return $post_title;
320
+
321
+ }
322
+
323
+ /**
324
+ * If the custom post description of the post is set in the Custom Social Options meta-box,
325
+ * return it instead of the default post description
326
+ *
327
+ * @param string
328
+ *
329
+ * @return string
330
+ *
331
+ */
332
+ function dpsp_add_custom_post_description( $post_description = '', $post_id = 0 ) {
333
+
334
+ $custom_description = dpsp_get_post_custom_description( $post_id );
335
+ $post_description = ( ! empty( $custom_description ) ? $custom_description : $post_description );
336
+
337
+ return $post_description;
338
+
339
+ }
340
+
341
+ /**
342
+ * If the custom post image data of the post is set in the Custom Social Options meta-box,
343
+ * return it instead of the default post image data
344
+ *
345
+ * @param string
346
+ *
347
+ * @return string
348
+ *
349
+ */
350
+ function dpsp_add_custom_post_image_data( $post_image_data = [], $post_id = 0, $size = '' ) {
351
+
352
+ $custom_image_data = dpsp_get_post_custom_image_data( $post_id, $size );
353
+ $post_image_data = ( ! is_null( $custom_image_data ) ? $custom_image_data : $post_image_data );
354
+
355
+ return $post_image_data;
356
+
357
+ }
358
+
359
+ /**
360
+ * Returns the custom post title for Pinterest set in the Custom Social Options meta-box
361
+ *
362
+ * @return string
363
+ *
364
+ */
365
+ function dpsp_get_post_pinterest_title( $post_id = 0 ) {
366
+
367
+ // Check to see if a custom title is in place
368
+ $share_options = dpsp_maybe_unserialize( get_post_meta( $post_id, 'dpsp_share_options', true ) );
369
+
370
+ // Set post Pinterest title
371
+ $pinterest_title = ( ! empty( $share_options['custom_title_pinterest'] ) ? $share_options['custom_title_pinterest'] : '' );
372
+
373
+ return apply_filters( 'dpsp_get_post_pinterest_title', $pinterest_title, $post_id );
374
+
375
+ }
376
+
377
+
378
+ /**
379
+ * Returns the custom post description for Pinterest set in the Custom Social Options meta-box
380
+ *
381
+ * @return string
382
+ *
383
+ */
384
+ function dpsp_get_post_pinterest_description( $post_id = 0 ) {
385
+
386
+ // Check to see if a custom description is in place
387
+ $share_options = dpsp_maybe_unserialize( get_post_meta( $post_id, 'dpsp_share_options', true ) );
388
+
389
+ // Set post Pinterest description
390
+ $pinterest_description = ( ! empty( $share_options['custom_description_pinterest'] ) ? $share_options['custom_description_pinterest'] : '' );
391
+
392
+ return apply_filters( 'dpsp_get_post_pinterest_description', $pinterest_description, $post_id );
393
+
394
+ }
395
+
396
+
397
+ /**
398
+ * Returns the ID of the Pinterest image set in the Custom Social Options meta-box
399
+ *
400
+ * @param int $post_id
401
+ *
402
+ * @return int
403
+ *
404
+ */
405
+ function dpsp_get_post_pinterest_image_id( $post_id = 0 ) {
406
+
407
+ // Check to see if a custom description is in place
408
+ $share_options = dpsp_maybe_unserialize( get_post_meta( $post_id, 'dpsp_share_options', true ) );
409
+
410
+ if ( empty( $share_options['custom_image_pinterest']['id'] ) ) {
411
+ return 0;
412
+ }
413
+
414
+ return absint( $share_options['custom_image_pinterest']['id'] );
415
+
416
+ }
417
+
418
+
419
+ /**
420
+ * Returns the custom post Pinterest image data set in the Custom Social Options meta-box
421
+ *
422
+ * @param int $post_id
423
+ * @param string $size
424
+ *
425
+ * @return mixed array | null
426
+ *
427
+ */
428
+ function dpsp_get_post_pinterest_image_data( $post_id = 0, $size = 'full' ) {
429
+
430
+ // Check to see if a custom description is in place
431
+ $share_options = dpsp_maybe_unserialize( get_post_meta( $post_id, 'dpsp_share_options', true ) );
432
+
433
+ if ( empty( $share_options['custom_image_pinterest']['id'] ) ) {
434
+ return null;
435
+ }
436
+
437
+ $post_pinterest_image_id = (int) $share_options['custom_image_pinterest']['id'];
438
+ $post_pinterest_image_data = wp_get_attachment_image_src( $post_pinterest_image_id, $size );
439
+
440
+ return apply_filters( 'dpsp_get_post_pinterest_image_data', $post_pinterest_image_data, $post_id, $size );
441
+
442
+ }
443
+
444
+
445
+ /**
446
+ * Returns the post's permalink based on the given permalink structure
447
+ *
448
+ * @param int|WP_Post $post
449
+ * @param string $permalink - the permalink structure
450
+ * @param bool $leavename
451
+ *
452
+ * @return string|false
453
+ *
454
+ */
455
+ function dpsp_get_post_permalink( $post = 0, $permalink = '', $leavename = false ) {
456
+
457
+ if ( empty( $permalink ) ) {
458
+ return false;
459
+ }
460
+
461
+ $rewritecode = [
462
+ '%year%',
463
+ '%monthnum%',
464
+ '%day%',
465
+ '%hour%',
466
+ '%minute%',
467
+ '%second%',
468
+ $leavename ? '' : '%postname%',
469
+ '%post_id%',
470
+ '%category%',
471
+ '%author%',
472
+ $leavename ? '' : '%pagename%',
473
+ ];
474
+
475
+ if ( is_object( $post ) && isset( $post->filter ) && 'sample' == $post->filter ) {
476
+ $sample = true;
477
+ } else {
478
+ $post = get_post( $post );
479
+ $sample = false;
480
+ }
481
+
482
+ if ( empty( $post->ID ) ) {
483
+ return false;
484
+ }
485
+
486
+ /**
487
+ * Filters the permalink structure for a post before token replacement occurs.
488
+ *
489
+ * Only applies to posts with post_type of 'post'.
490
+ *
491
+ * @param string $permalink The site's permalink structure.
492
+ * @param WP_Post $post The post in question.
493
+ * @param bool $leavename Whether to keep the post name.
494
+ *
495
+ * @since 3.0.0
496
+ *
497
+ */
498
+ $permalink = apply_filters( 'pre_post_link', $permalink, $post, $leavename );
499
+
500
+ if ( 'plain' != $permalink && ! in_array(
501
+ $post->post_status,
502
+ [
503
+ 'draft',
504
+ 'pending',
505
+ 'auto-draft',
506
+ 'future',
507
+ ]
508
+ ) ) {
509
+ $unixtime = strtotime( $post->post_date );
510
+
511
+ $category = '';
512
+ if ( strpos( $permalink, '%category%' ) !== false ) {
513
+ $cats = get_the_category( $post->ID );
514
+ if ( $cats ) {
515
+ $cats = wp_list_sort(
516
+ $cats,
517
+ [
518
+ 'term_id' => 'ASC',
519
+ ]
520
+ );
521
+
522
+ /**
523
+ * Filters the category that gets used in the %category% permalink token.
524
+ *
525
+ * @param WP_Term $cat The category to use in the permalink.
526
+ * @param array $cats Array of all categories (WP_Term objects) associated with the post.
527
+ * @param WP_Post $post The post in question.
528
+ *
529
+ * @since 3.5.0
530
+ *
531
+ */
532
+ $category_object = apply_filters( 'post_link_category', $cats[0], $cats, $post );
533
+
534
+ $category_object = get_term( $category_object, 'category' );
535
+ $category = $category_object->slug;
536
+ if ( $parent = $category_object->parent ) {
537
+ $category = get_category_parents( $parent, false, '/', true ) . $category;
538
+ }
539
+ }
540
+ // show default category in permalinks, without
541
+ // having to assign it explicitly
542
+ if ( empty( $category ) ) {
543
+ $default_category = get_term( Mediavine\Grow\Settings::get_setting( 'default_category' ), 'category' );
544
+ if ( $default_category && ! is_wp_error( $default_category ) ) {
545
+ $category = $default_category->slug;
546
+ }
547
+ }
548
+ }
549
+
550
+ $author = '';
551
+ if ( strpos( $permalink, '%author%' ) !== false ) {
552
+ $authordata = get_userdata( $post->post_author );
553
+ $author = $authordata->user_nicename;
554
+ }
555
+
556
+ $date = explode( ' ', date( 'Y m d H i s', $unixtime ) );
557
+ $rewritereplace =
558
+ [
559
+ $date[0],
560
+ $date[1],
561
+ $date[2],
562
+ $date[3],
563
+ $date[4],
564
+ $date[5],
565
+ $post->post_name,
566
+ $post->ID,
567
+ $category,
568
+ $author,
569
+ $post->post_name,
570
+ ];
571
+ $permalink = home_url( str_replace( $rewritecode, $rewritereplace, $permalink ) );
572
+
573
+ } else { // if they're not using the fancy permalink option
574
+ $permalink = home_url( '?p=' . $post->ID );
575
+ }
576
+
577
+ /**
578
+ * Filters the permalink for a post.
579
+ *
580
+ * Only applies to posts with post_type of 'post'.
581
+ *
582
+ * @param string $permalink The post's permalink.
583
+ * @param WP_Post $post The post in question.
584
+ * @param bool $leavename Whether to keep the post name.
585
+ *
586
+ * @since 1.5.0
587
+ *
588
+ */
589
+ return apply_filters( 'post_link', $permalink, $post, $leavename );
590
+ }
591
+
592
+ /**
593
+ * Register hooks for functions-post.php
594
+ */
595
+ function dpsp_register_functions_post() {
596
+ add_action( 'wp', 'dpsp_cache_post_object' );
597
+ add_filter( 'dpsp_get_post_title', 'dpsp_add_custom_post_title', 10, 2 );
598
+ add_filter( 'dpsp_get_post_description', 'dpsp_add_custom_post_description', 10, 2 );
599
+ add_filter( 'dpsp_get_post_image_data', 'dpsp_add_custom_post_image_data', 10, 3 );
600
+ }
inc/functions-share-counts.php CHANGED
@@ -1,597 +1,850 @@
1
  <?php
2
-
3
- /**
4
- * Not all social networks support social count.
5
- * This function returns an array of network slugs
6
- * for the networks that do support it
7
- *
8
- * @return array
9
- *
10
- */
11
- function dpsp_get_networks_with_social_count() {
12
 
13
- $networks = array(
14
- 'facebook',
15
- 'pinterest'
16
- );
17
-
18
- // Twitter share counts are handled through TwitCount ( https://www.twitcount.com/ )
19
- $settings = get_option( 'dpsp_settings' );
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
- if( isset( $settings['twitter_share_counts'] ) )
22
- array_push( $networks, 'twitter' );
23
-
24
- /**
25
- * Filter the networks that support share counts before returning
26
- *
27
- * @param array
28
- *
29
- */
30
- return apply_filters( 'dpsp_get_networks_with_social_count', $networks );
31
 
 
 
32
  }
33
 
34
-
35
  /**
36
- * Pulls the share counts for all active networks for a certain post
37
  *
38
- * @param int $post_id
39
- *
40
- * @return array
41
  *
42
  */
43
- function dpsp_pull_post_share_counts( $post_id = 0 ) {
 
 
44
 
45
- if( $post_id === 0 )
46
- return $share_counts;
47
 
48
- // Get active social networks
49
- $social_networks = dpsp_get_active_networks();
 
 
 
 
 
 
 
50
 
51
- // Get saved shares
52
- $networks_shares = get_post_meta( $post_id, 'dpsp_networks_shares', true );
 
53
 
54
- if( empty( $networks_shares ) )
55
- $networks_shares = array();
56
 
57
- // Pass through each active social networks and grab the share counts for the post
58
- foreach( $social_networks as $network_slug ) {
59
 
60
- if( ! in_array( $network_slug, dpsp_get_networks_with_social_count() ) )
61
- continue;
 
62
 
63
- $share_count = dpsp_get_post_network_share_count( $post_id, $network_slug );
 
64
 
65
- if( $share_count === false )
66
- continue;
67
 
68
- /**
69
- * Take into account Twitter old counts from NewShareCounts and OpenShareCount
70
- *
71
- * The post meta "dpsp_cache_shares_twitter" was used for NewShareCounts
72
- * The post meta "dpsp_cache_shares_twitter_2" was used for OpenShareCount
73
- *
74
- */
75
- if( $network_slug == 'twitter' && isset( $networks_shares[$network_slug] ) ) {
76
 
77
- $cached_old_twitter_shares = get_post_meta( $post_id, 'dpsp_cache_shares_twitter_2', true );
78
 
79
- // Add the Twitter shares to the cache if they do not exist
80
- if( $cached_old_twitter_shares == '' ) {
 
81
 
82
- $cached_old_twitter_shares = absint( $networks_shares[$network_slug] );
 
 
 
 
 
 
 
83
 
84
- update_post_meta( $post_id, 'dpsp_cache_shares_twitter_2', $cached_old_twitter_shares );
85
 
86
- // Delete the post meta for NewShareCounts
87
- delete_post_meta( $post_id, 'dpsp_cache_shares_twitter' );
88
 
89
- }
 
 
90
 
91
- // Add the current shares to the cached ones
92
- $share_count += $cached_old_twitter_shares;
93
 
94
  }
95
 
96
- // If share counts exist for this network, check to see if the new shares
97
- // are greater than the existing ones. If so, replace the counts
98
- if( isset( $networks_shares[$network_slug] ) )
99
- $networks_shares[$network_slug] = ( $share_count > (int)$networks_shares[$network_slug] ? $share_count : (int)$networks_shares[$network_slug] ) ;
 
 
 
100
 
101
- // If the share counts don't exist for the network, add them
102
- else
103
- $networks_shares[$network_slug] = $share_count;
104
 
105
- } // End of social_networks loop
 
 
 
 
 
 
 
106
 
 
 
107
 
108
- // Remove social counts for networks that are not required
109
- if( !empty( $networks_shares ) ) {
110
- foreach( $networks_shares as $network_slug => $share_count ) {
111
- if( !in_array( $network_slug, $social_networks ) )
112
- unset( $networks_shares[ $network_slug ] );
 
 
 
 
 
 
 
 
113
  }
114
  }
 
 
 
 
 
 
 
115
 
116
- // Return
117
- return $networks_shares;
 
 
 
118
 
 
 
119
  }
120
 
 
 
 
121
 
122
- /**
123
- * Refreshes the share counts if the share counts cache has expired
124
- *
125
- */
126
- function dpsp_refresh_post_share_counts() {
127
 
128
- if( ! is_singular() )
129
- return;
 
130
 
131
- $current_post = dpsp_get_current_post();
132
 
133
- if( is_null( $current_post ) )
134
- return;
 
135
 
136
- if( in_array( $current_post->post_status, array( 'future', 'draft', 'pending', 'trash', 'auto-draft' ) ) )
137
- return;
138
 
139
- $expired = dpsp_is_post_share_counts_cache_expired( $current_post );
 
140
 
141
- if( ! $expired )
142
- return;
143
 
144
- // Get social shares from the networks
145
- $share_counts = dpsp_pull_post_share_counts( $current_post->ID );
 
 
 
146
 
147
- // Update share counts in the db
148
- $shares_updated = dpsp_update_post_share_counts( $current_post->ID, $share_counts );
 
 
149
 
 
 
150
  }
151
- add_action( 'wp_head', 'dpsp_refresh_post_share_counts', 10 );
152
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
 
154
  /**
155
- * Checks to see if the post's share counts were updated recently or not
156
- *
157
- * @param int $post_id
158
  *
159
- * @return bool
 
160
  *
161
  */
162
- function dpsp_is_post_share_counts_cache_expired( $post_id ) {
163
 
164
- if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && preg_match( '/bot|crawl|slurp|spider/i', wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) )
165
- return false;
166
 
167
- if( ! is_singular() )
168
- return false;
 
 
 
169
 
170
- // Get the post's time
171
- $post_time = get_post_time( 'U', false, $post_id );
172
 
173
- // Set the refresh rate, depending on how many days
174
- // have pased since it was created
175
- if( time() - $post_time <= 10 * DAY_IN_SECONDS )
176
- $refresh_rate = 2;
177
 
178
- elseif( time() - $post_time <= 20 * DAY_IN_SECONDS )
179
- $refresh_rate = 6;
 
 
 
 
 
 
 
 
 
180
 
181
- else
182
- $refresh_rate = 12;
 
183
 
184
- // Get the last updated time for the share counts
185
- $shares_last_updated = (int)get_post_meta( $post_id, 'dpsp_networks_shares_last_updated', true );
186
-
187
- if( $shares_last_updated >= time() - $refresh_rate * HOUR_IN_SECONDS )
188
- return false;
189
- else
190
- return true;
191
 
192
- }
 
193
 
 
 
194
 
195
  /**
196
- * Returns the share count for a post and a social network from the
197
- * social network through an API
198
  *
199
- * @param int post_id - id of the post
200
- * @param string $network_slug - slug of the social network
201
  *
202
- * @return mixed - bool false if something went wrong, and int if everything went well
203
  *
204
  */
205
- function dpsp_get_post_network_share_count( $post_id, $network_slug ) {
206
 
207
- if( !isset( $post_id ) && !isset( $network_slug ) )
208
- return false;
 
 
 
 
 
209
 
210
- // Plugin settings
211
- $settings = get_option( 'dpsp_settings', array() );
 
 
 
212
 
213
- // Get page url for the post
214
- $page_url = get_permalink( $post_id );
215
- $page_url = urlencode( $page_url );
216
 
217
- // Default post arguments
218
- $args = array( 'timeout' => 30 );
219
 
220
- // Prepare urls to get remote request
221
- switch( $network_slug ) {
222
 
223
- case 'facebook':
224
-
225
- $access_token = '';
226
 
227
- if( ! empty( $settings['facebook_share_counts_provider'] ) ) {
228
 
229
- // Grab the token from the authorized app
230
- if( $settings['facebook_share_counts_provider'] == 'authorized_app' ) {
231
 
232
- $transient = get_transient( 'dpsp_facebook_access_token' );
233
- $access_token = ( ! empty( $transient['access_token'] ) ? $transient['access_token'] : '' );
 
 
234
 
235
- }
 
 
236
 
237
- // Grab the token from the user's own app
238
- if( $settings['facebook_share_counts_provider'] == 'own_app' ) {
 
 
239
 
240
- $access_token = ( ! empty( $settings['facebook_app_access_token'] ) ? $settings['facebook_app_access_token'] : '' );
 
 
 
 
 
 
 
 
241
 
242
- }
243
 
244
- }
245
 
246
- if( empty( $access_token ) )
247
- $url = 'https://graph.facebook.com/?id=' . $page_url;
248
- else
249
- $url = 'https://graph.facebook.com/v2.12/?id=' . $page_url . '&access_token=' . $access_token . '&fields=engagement';
250
 
251
- break;
 
 
 
 
 
 
 
 
 
 
252
 
253
- case 'twitter':
254
- $url = 'https://counts.twitcount.com/counts.php?url=' . $page_url;
255
- break;
256
 
257
- case 'pinterest':
258
- $url = 'http://widgets.pinterest.com/v1/urls/count.json?source=6&url=' . $page_url;
259
- break;
260
 
261
- case 'linkedin':
262
- $url = 'https://www.linkedin.com/countserv/count/share?format=json&url=' . $page_url;
263
- break;
264
 
265
- }
 
266
 
267
- // Get response from the api call
268
- $response = wp_remote_get( $url, $args );
269
 
 
 
 
270
 
271
- // Continue only if response code is 200
272
- if( wp_remote_retrieve_response_code( $response ) == 200 ) {
 
273
 
274
- $body = json_decode( wp_remote_retrieve_body( $response ), true );
 
275
 
276
- // Get share value from response body
277
- switch( $network_slug ) {
 
 
 
278
 
279
- case 'facebook':
280
- $reaction_count = isset( $body['engagement']['reaction_count'] ) ? $body['engagement']['reaction_count'] : false;
281
- $comment_count = isset( $body['engagement']['comment_count'] ) ? $body['engagement']['comment_count'] : false;
282
- $share_count = isset( $body['engagement']['share_count'] ) ? $body['engagement']['share_count'] : false;
 
 
283
 
284
- $share_count = ( false !== $reaction_count && false !== $comment_count && false !== $share_count ? (int)$reaction_count + (int)$comment_count + (int)$share_count : false );
 
 
 
 
285
 
286
- break;
 
287
 
288
- case 'pinterest':
289
- $body = wp_remote_retrieve_body( $response );
290
- $start = strpos( $body, '(' );
291
- $end = strpos( $body, ')', $start + 1 );
292
- $length = $end - $start;
293
- $body = json_decode( substr( $body, $start + 1, $length - 1 ), true );
294
 
295
- $share_count = ( isset( $body['count'] ) ? $body['count'] : false );
296
 
297
- break;
 
298
 
299
- default:
300
- $share_count = ( isset( $body['count'] ) ? $body['count'] : false );
301
- break;
 
302
 
303
- }
304
 
305
- return ( $share_count ? (int)$share_count : $share_count );
306
 
307
- } else {
 
 
 
 
 
308
 
309
- return false;
310
 
 
 
 
 
 
 
 
 
 
311
  }
312
 
 
 
 
 
313
  return false;
314
 
315
  }
316
 
 
317
 
318
- /**
319
- * Returns an array with the saved shares from the database
320
- *
321
- * @param $post_id
322
- *
323
- * @return array
324
- *
325
- */
326
- function dpsp_get_post_share_counts( $post_id = 0 ) {
327
-
328
- $network_shares = get_post_meta( $post_id, 'dpsp_networks_shares', true );
329
 
330
- if( empty( $network_shares ) )
331
- $network_shares = array();
332
 
333
- /**
334
- * Filter the post's network shares before returning them
335
- *
336
- * @param array $network_shares
337
- * @param int $post_id
338
- *
339
- */
340
- $network_shares = apply_filters( 'dpsp_get_post_share_counts', $network_shares, $post_id );
 
341
 
342
- return $network_shares;
343
 
 
 
344
  }
345
 
346
-
347
  /**
348
- * Returns the share count saved for a post given the post_id and the
349
- * network we wish to retreive the value for
350
  *
351
- * @param int post_id - id of the post
352
- * @param string $network_slug - slug of the social network
353
- *
354
- * @return mixed - bool false if something went wrong, and int if everything went well
355
  *
356
  */
357
- function dpsp_get_post_share_count( $post_id, $network_slug ) {
358
-
359
- if( !isset( $post_id ) && !isset( $network_slug ) )
360
- return false;
361
 
 
362
 
363
- $shares = dpsp_get_post_share_counts( $post_id );
364
 
365
- if( isset( $shares[$network_slug] ) && in_array( $network_slug, dpsp_get_networks_with_social_count() ) )
366
- return $shares[$network_slug];
367
- else
368
- return false;
 
 
 
 
 
 
369
 
 
 
370
  }
371
 
 
 
 
 
 
 
 
 
372
 
373
  /**
374
- * Updates the given share counts for a post into the database
375
  *
376
- * @param int $post_id - the id of the post to save the shares
377
- * @param array $shares - an array with the network shares and total shares
378
- *
379
- * @return bool
380
  *
381
  */
382
- function dpsp_update_post_share_counts( $post_id = 0, $share_counts = array() ) {
383
 
384
- if( empty( $post_id ) || empty( $share_counts ) )
385
- return false;
386
 
387
- // Update post meta with all shares
388
- update_post_meta( $post_id, 'dpsp_networks_shares', $share_counts );
389
 
390
- // Update post meta with total share counts
391
- update_post_meta( $post_id, 'dpsp_networks_shares_total', array_sum( $share_counts ) );
392
-
393
- // Update post meta with last updated timestamp
394
- update_post_meta( $post_id, 'dpsp_networks_shares_last_updated', time() );
 
 
 
 
 
395
 
 
 
 
396
 
397
- /**
398
- * Do extra actions after updating the post's share counts
399
- *
400
- * @param int $post_id - the id of the post to save the shares
401
- * @param array $shares - an array with the network shares and total shares
402
- *
403
- */
404
- do_action( 'dpsp_update_post_share_counts', $post_id, $share_counts );
405
 
406
- return true;
 
 
407
 
 
 
 
408
  }
409
 
 
410
 
411
  /**
412
- * Updates the top shared posts array
413
- *
414
- * @param int $post_id - the id of the post to save the shares
415
- * @param array $shares - an array with the network shares and total shares
416
  *
417
- * @return bool
 
418
  *
419
  */
420
- function dpsp_update_top_shared_posts( $post_id = 0, $share_counts = array() ) {
421
 
422
- if( empty( $post_id ) || empty( $share_counts ) )
423
- return false;
 
 
424
 
425
- // Get the post's post type
426
- $post_type = get_post_type( $post_id );
427
 
428
- // Get current saved top shared posts
429
- $top_posts = get_option( 'dpsp_top_shared_posts', array() );
430
 
431
- // Decode the top posts into an array
432
- if( ! empty( $top_posts ) && ! is_array($top_posts) )
433
- $top_posts = json_decode( $top_posts, ARRAY_A );
434
-
435
-
436
- $top_posts[$post_type][$post_id] = array_sum( $share_counts );
437
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
438
 
439
- /**
440
- * Filter top shared posts before saving in the db
441
- *
442
- * @param array $top_posts
443
- *
444
- */
445
- $top_posts = apply_filters( 'dpsp_top_shared_posts_raw', $top_posts );
446
 
 
 
447
 
448
- // Filter top posts array
449
- if( ! empty( $top_posts ) ) {
450
- foreach( $top_posts as $post_type => $post_list ) {
451
- if( ! empty( $top_posts[$post_type] ) ) {
452
 
453
- // Sort descending
454
- arsort( $top_posts[$post_type] );
455
 
456
- // Get only first ten
457
- $top_posts[$post_type] = array_slice( $top_posts[$post_type], 0, 10, true );
 
458
 
459
- }
460
- }
 
461
  }
462
-
463
- // Update top posts
464
- update_option( 'dpsp_top_shared_posts', json_encode( $top_posts ) );
465
-
466
- return true;
467
-
468
  }
469
- add_action( 'dpsp_update_post_share_counts', 'dpsp_update_top_shared_posts', 10, 2 );
470
-
471
 
472
  /**
473
- * Return total share count calculated for the social networks passed, if no social network is passed
474
- * the total share value will be calculated for all active networks
475
- *
476
- * @param array $networks - the networks for which we want to return the total count
477
- * @param string $location - the location of the share buttons
478
  *
479
- * @return int
 
 
480
  *
481
  */
482
- function dpsp_get_post_total_share_count( $post_id = 0, $networks = array(), $location = '' ) {
483
 
484
- if( $post_id == 0 ) {
485
- global $post;
486
- $post_id = $post->ID;
487
- }
488
 
489
- if( empty($networks) )
490
- $networks = dpsp_get_active_networks();
491
 
492
 
493
- // Get saved total share counts
494
- $total_shares = get_post_meta( $post_id, 'dpsp_networks_shares_total', true );
 
 
 
 
 
 
 
 
 
 
495
 
496
- // If the total shares are not set in the post meta, calculate them
497
- // based on the shares for each platform
498
- if( empty( $total_shares ) ) {
499
 
500
- $total_shares = 0;
 
 
501
 
502
- // Get network shares for this post
503
- $networks_shares = get_post_meta( $post_id, 'dpsp_networks_shares', true );
504
- $networks_shares = ( !empty( $networks_shares ) ? $networks_shares : array() );
505
 
506
- // Pass through each network and increment the total shares counter
507
- foreach( $networks as $network_slug )
508
- $total_shares += ( isset($networks_shares[$network_slug]) && in_array( $network_slug, dpsp_get_networks_with_social_count() ) ? $networks_shares[$network_slug] : 0 );
509
 
510
- }
511
 
512
- /**
513
- * Filter total shares before returning them
514
- *
515
- * @param int $total_shares
516
- * @param string $location
517
- *
518
- */
519
- $total_shares = apply_filters( 'dpsp_get_post_total_share_count', (int)$total_shares, $location );
520
 
521
- return $total_shares;
 
 
 
 
 
 
 
 
 
522
 
 
 
523
  }
524
 
 
 
 
 
 
 
 
 
 
525
 
526
  /**
527
- * Rounds the share counts
528
- *
529
- * @param int $share_count
530
- * @param string $location
531
  *
532
- * @return int
533
  *
534
  */
535
- function dpsp_round_share_counts( $share_count, $location = '' ) {
536
-
537
- if( empty( $location ) )
538
- return $share_count;
539
-
540
- if( empty( $share_count ) )
541
- return $share_count;
542
-
543
 
544
- $location_settings = get_option( 'dpsp_location_' . $location, array() );
545
 
546
- if( !isset( $location_settings['display']['count_round'] ) )
547
- return $share_count;
548
 
549
- if( is_array( $share_count ) ) {
550
-
551
- foreach( $share_count as $key => $count ) {
552
- if( $count / 1000 >= 1 )
553
- $share_count[$key] = round( $count / 1000, 1 ) . 'k';
554
  }
 
 
555
 
 
 
 
 
 
 
556
 
557
- } else {
558
 
559
- if( $share_count / 1000 >= 1 )
560
- $share_count = round( $share_count / 1000, 1 ) . 'k';
561
 
562
- }
563
 
564
- return $share_count;
 
 
 
 
565
 
 
 
566
  }
567
- add_filter( 'dpsp_get_output_post_shares_counts', 'dpsp_round_share_counts', 10, 2 );
568
- add_filter( 'dpsp_get_output_total_share_count', 'dpsp_round_share_counts', 10, 2 );
569
 
 
 
 
570
 
571
- /**
572
- * Listens for the Facebook response with the access code from the Social Pug app
573
- *
574
- */
575
- function dpsp_capture_authorize_facebook_access_token() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
576
 
577
- if( empty( $_GET['tkn'] ) || ! wp_verify_nonce( $_GET['tkn'], 'dpsp_authorize_facebook_app' ) )
578
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
579
 
580
- if( empty( $_GET['facebook_access_token'] ) )
581
- return;
582
 
583
- if( empty( $_GET['expires_in'] ) )
584
- return;
 
 
 
585
 
586
- $transient = array(
587
- 'access_token' => sanitize_text_field( $_GET['facebook_access_token'] ),
588
- 'expires_in' => time() + absint( $_GET['expires_in'] )
589
- );
590
 
591
- set_transient( 'dpsp_facebook_access_token', $transient );
 
592
 
593
- wp_redirect( add_query_arg( array( 'page' => 'dpsp-settings', 'dpsp_message_id' => 4, 'settings-updated' => '' ), admin_url( 'admin.php' ) ) );
594
- exit;
595
 
596
- }
597
- add_action( 'admin_init', 'dpsp_capture_authorize_facebook_access_token' );
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
 
 
 
 
 
 
 
 
 
 
2
 
3
+ use Mediavine\Grow\Share_Counts;
4
+
5
+ /**
6
+ * Not all social networks support social count.
7
+ * This function returns an array of network slugs
8
+ * for the networks that do support it
9
+ *
10
+ * @return array
11
+ *
12
+ */
13
+ function dpsp_get_networks_with_social_count() {
14
+
15
+ $networks = [
16
+ 'facebook',
17
+ 'pinterest',
18
+ 'linkedin',
19
+ ];
20
+ if ( function_exists( 'dpsp_get_pro_networks_with_social_count' ) ) {
21
+ $networks = array_merge( $networks, dpsp_get_pro_networks_with_social_count() );
22
+ }
23
 
24
+ // Twitter share counts are handled through TwitCount ( http://www.twitcount.com/ )
25
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings' );
 
 
 
 
 
 
 
 
26
 
27
+ if ( isset( $settings['twitter_share_counts'] ) ) {
28
+ array_push( $networks, 'twitter' );
29
  }
30
 
 
31
  /**
32
+ * Filter the networks that support share counts before returning
33
  *
34
+ * @param array
 
 
35
  *
36
  */
37
+ return apply_filters( 'dpsp_get_networks_with_social_count', $networks );
38
+
39
+ }
40
 
 
 
41
 
42
+ /**
43
+ * Pulls the share counts for all active networks for a certain post
44
+ *
45
+ * @param int $post_id
46
+ *
47
+ * @return array
48
+ *
49
+ */
50
+ function dpsp_pull_post_share_counts( $post_id = 0 ) {
51
 
52
+ if ( 0 === $post_id ) {
53
+ return [];
54
+ }
55
 
56
+ // Get active social networks
57
+ $social_networks = dpsp_get_active_networks();
58
 
59
+ // Get saved shares
60
+ $networks_shares = dpsp_maybe_unserialize( get_post_meta( $post_id, 'dpsp_networks_shares', true ) );
61
 
62
+ if ( empty( $networks_shares ) ) {
63
+ $networks_shares = [];
64
+ }
65
 
66
+ // Set temporary variable
67
+ $_networks_shares = [];
68
 
69
+ // Pass through each active social networks and grab the share counts for the post
70
+ foreach ( $social_networks as $network_slug ) {
71
 
72
+ if ( ! in_array( $network_slug, dpsp_get_networks_with_social_count() ) ) {
73
+ continue;
74
+ }
 
 
 
 
 
75
 
76
+ $share_count = dpsp_get_post_network_share_count( $post_id, $network_slug );
77
 
78
+ if ( false === $share_count ) {
79
+ continue;
80
+ }
81
 
82
+ /**
83
+ * Take into account Twitter old counts from NewShareCounts and OpenShareCount
84
+ *
85
+ * The post meta "dpsp_cache_shares_twitter" was used for NewShareCounts
86
+ * The post meta "dpsp_cache_shares_twitter_2" was used for OpenShareCount
87
+ *
88
+ */
89
+ if ( 'twitter' == $network_slug && isset( $networks_shares[ $network_slug ] ) ) {
90
 
91
+ $cached_old_twitter_shares = get_post_meta( $post_id, 'dpsp_cache_shares_twitter_2', true );
92
 
93
+ // Add the Twitter shares to the cache if they do not exist
94
+ if ( '' == $cached_old_twitter_shares ) {
95
 
96
+ $cached_old_twitter_shares = absint( $networks_shares[ $network_slug ] );
97
+
98
+ update_post_meta( $post_id, 'dpsp_cache_shares_twitter_2', $cached_old_twitter_shares );
99
 
100
+ // Delete the post meta for NewShareCounts
101
+ delete_post_meta( $post_id, 'dpsp_cache_shares_twitter' );
102
 
103
  }
104
 
105
+ // Add the current shares to the cached ones
106
+ $share_count += $cached_old_twitter_shares;
107
+
108
+ }
109
+
110
+ // Add the share counts
111
+ $_networks_shares[ $network_slug ] = $share_count;
112
 
113
+ } // End of social_networks loop
 
 
114
 
115
+ /**
116
+ * Filter the social share counts as they are retrieved from the social networks
117
+ *
118
+ * @param array $_networks_shares
119
+ * @param int $post_id
120
+ *
121
+ */
122
+ $_networks_shares = apply_filters( 'dpsp_pull_post_share_counts_raw', $_networks_shares, $post_id );
123
 
124
+ // Update the share counts only if they are bigger
125
+ foreach ( $_networks_shares as $network_slug => $share_count ) {
126
 
127
+ if ( isset( $networks_shares[ $network_slug ] ) ) {
128
+ $networks_shares[ $network_slug ] = ( absint( $share_count ) > absint( $networks_shares[ $network_slug ] ) ? absint( $share_count ) : absint( $networks_shares[ $network_slug ] ) );
129
+ } else {
130
+ // If the share counts don't exist for the network, add them
131
+ $networks_shares[ $network_slug ] = absint( $_networks_shares[ $network_slug ] );
132
+ }
133
+ }
134
+
135
+ // Remove social counts for networks that are not required
136
+ if ( ! empty( $networks_shares ) ) {
137
+ foreach ( $networks_shares as $network_slug => $share_count ) {
138
+ if ( ! in_array( $network_slug, $social_networks ) ) {
139
+ unset( $networks_shares[ $network_slug ] );
140
  }
141
  }
142
+ }
143
+
144
+ // Return
145
+ return $networks_shares;
146
+
147
+ }
148
+
149
 
150
+ /**
151
+ * Refreshes the share counts if the share counts cache has expired
152
+ *
153
+ */
154
+ function dpsp_refresh_post_share_counts() {
155
 
156
+ if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && preg_match( '/bot|crawl|slurp|spider/i', wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) ) {
157
+ return;
158
  }
159
 
160
+ if ( ! is_singular() ) {
161
+ return;
162
+ }
163
 
164
+ $current_post = dpsp_get_current_post();
165
+ if ( is_null( $current_post ) ) {
166
+ return;
167
+ }
 
168
 
169
+ if ( in_array( $current_post->post_status, [ 'future', 'draft', 'pending', 'trash', 'auto-draft' ] ) ) {
170
+ return;
171
+ }
172
 
173
+ $expired = dpsp_is_post_share_counts_cache_expired( $current_post );
174
 
175
+ if ( ! $expired ) {
176
+ return;
177
+ }
178
 
179
+ // Get social shares from the networks
180
+ $share_counts = dpsp_pull_post_share_counts( $current_post->ID );
181
 
182
+ // Update share counts in the db
183
+ $shares_updated = dpsp_update_post_share_counts( $current_post->ID, $share_counts );
184
 
185
+ }
 
186
 
187
+ /**
188
+ * Refreshes the share counts if the share counts cache has expired
189
+ *
190
+ */
191
+ function dpsp_refresh_post_share_counts_edit() {
192
 
193
+ $current_post = dpsp_get_current_post();
194
+ if ( is_null( $current_post ) ) {
195
+ return;
196
+ }
197
 
198
+ if ( is_attachment( $current_post->ID ) ) {
199
+ return;
200
  }
 
201
 
202
+ if ( in_array( $current_post->post_status, [ 'future', 'draft', 'pending', 'trash', 'auto-draft' ] ) ) {
203
+ return;
204
+ }
205
+
206
+ $expired = dpsp_is_post_share_counts_cache_expired( $current_post );
207
+
208
+ if ( ! $expired ) {
209
+ return;
210
+ }
211
+
212
+ // Get social shares from the networks
213
+ $share_counts = dpsp_pull_post_share_counts( $current_post->ID );
214
+
215
+ // Update share counts in the db
216
+ $shares_updated = dpsp_update_post_share_counts( $current_post->ID, $share_counts );
217
+
218
+ }
219
+
220
+ /**
221
+ * Checks to see if the post's share counts were updated recently or not
222
+ *
223
+ * @param WP_Post $post_obj
224
+ *
225
+ * @return bool
226
+ *
227
+ */
228
+ function dpsp_is_post_share_counts_cache_expired( $post_obj ) {
229
+
230
+ // Get the post's time
231
+ $post_time = mysql2date( 'U', $post_obj->post_date, false );
232
+
233
+ // Set the refresh rate, depending on how many days
234
+ // have pased since it was created
235
+ if ( time() - $post_time <= 10 * DAY_IN_SECONDS ) {
236
+ $refresh_rate = 2;
237
+ } elseif ( time() - $post_time <= 20 * DAY_IN_SECONDS ) {
238
+ $refresh_rate = 6;
239
+ } else {
240
+ $refresh_rate = 12;
241
+ }
242
 
243
  /**
244
+ * Filter the share counts cache refresh rate
 
 
245
  *
246
+ * @param int $refresh_rate
247
+ * @param int $post_time
248
  *
249
  */
250
+ $refresh_rate = apply_filters( 'dpsp_post_share_counts_cache_refresh_rate', $refresh_rate, $post_time );
251
 
252
+ // Get the last updated time for the share counts
253
+ $shares_last_updated = (int) get_post_meta( $post_obj->ID, 'dpsp_networks_shares_last_updated', true );
254
 
255
+ if ( $shares_last_updated >= time() - $refresh_rate * HOUR_IN_SECONDS ) {
256
+ return false;
257
+ } else {
258
+ return true;
259
+ }
260
 
261
+ }
 
262
 
 
 
 
 
263
 
264
+ /**
265
+ * Returns the share count for a post and a social network from the
266
+ * social network through an API
267
+ *
268
+ * @param int post_id - id of the post
269
+ * @param string $network_slug - slug of the social network
270
+ *
271
+ * @return mixed - bool false if something went wrong, and int if everything went well
272
+ *
273
+ */
274
+ function dpsp_get_post_network_share_count( $post_id, $network_slug ) {
275
 
276
+ if ( ! isset( $post_id ) && ! isset( $network_slug ) ) {
277
+ return false;
278
+ }
279
 
280
+ // The return value
281
+ $share_count = false;
 
 
 
 
 
282
 
283
+ // Get page url for the post
284
+ $page_url = get_permalink( $post_id );
285
 
286
+ // Get plugin settings
287
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
288
 
289
  /**
290
+ * These are the networks that consider http and https versions of the
291
+ * same page URL as being different.
292
  *
293
+ * Example: http://mediavine.com/ - returns a share count of 134
294
+ * https://mediavine.com/ - returns a share count of 208
295
  *
296
+ * Given that it is basically the same page, we may want to return the sum of the two
297
  *
298
  */
299
+ $networks = [ 'facebook', 'pinterest' ];
300
 
301
+ /**
302
+ * Return the share counts only for the current protocol
303
+ *
304
+ */
305
+ if ( ! in_array( $network_slug, $networks ) || empty( $settings['http_and_https_share_counts'] ) ) {
306
+ $share_count = dpsp_get_url_network_share_count( $page_url, $network_slug );
307
+ }
308
 
309
+ /**
310
+ * Return the share counts for both HTTP and HTTPS protocols
311
+ *
312
+ */
313
+ if ( in_array( $network_slug, $networks ) && ! empty( $settings['http_and_https_share_counts'] ) ) {
314
 
315
+ // Check if the post's permalink has HTTP or HTTPS
316
+ if ( 0 === strpos( strtolower( $page_url ), 'https' ) ) {
 
317
 
318
+ $https_page_url = $page_url;
319
+ $http_page_url = substr_replace( $page_url, 'http', 0, 5 );
320
 
321
+ } else {
 
322
 
323
+ $https_page_url = substr_replace( $page_url, 'https', 0, 4 );
324
+ $http_page_url = $page_url;
 
325
 
326
+ }
327
 
328
+ $http_share_counts = dpsp_get_url_network_share_count( $http_page_url, $network_slug );
329
+ $https_share_counts = dpsp_get_url_network_share_count( $https_page_url, $network_slug );
330
 
331
+ // If both share counts are good return the sum of them
332
+ if ( false !== $http_share_counts && false !== $https_share_counts ) {
333
+ $share_count = $http_share_counts + $https_share_counts;
334
+ }
335
 
336
+ if ( false === $http_share_counts ) {
337
+ $share_count = $https_share_counts;
338
+ }
339
 
340
+ if ( false === $https_share_counts ) {
341
+ $share_count = $http_share_counts;
342
+ }
343
+ }
344
 
345
+ /**
346
+ * Filter the share count just before returning
347
+ *
348
+ * @param int|false $share_count
349
+ * @param int $post_id
350
+ * @param string $network_slug
351
+ *
352
+ */
353
+ $share_count = apply_filters( 'dpsp_get_post_network_share_count', $share_count, $post_id, $network_slug );
354
 
355
+ return $share_count;
356
 
357
+ }
358
 
 
 
 
 
359
 
360
+ /**
361
+ * Returns the share count for a given url and a social network from the
362
+ * social network through an API
363
+ *
364
+ * @param int post_id - the URL for which we want the share counts
365
+ * @param string $network_slug - slug of the social network
366
+ *
367
+ * @return mixed - bool false if something went wrong, and int if everything went well
368
+ *
369
+ */
370
+ function dpsp_get_url_network_share_count( $url = '', $network_slug = '' ) {
371
 
372
+ if ( empty( $url ) || empty( $network_slug ) ) {
373
+ return false;
374
+ }
375
 
376
+ // Plugin settings
377
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
 
378
 
379
+ // Encode URL
380
+ $page_url = rawurlencode( $url );
 
381
 
382
+ // Default post arguments
383
+ $args = [ 'timeout' => 30 ];
384
 
385
+ // Prepare urls to get remote request
386
+ switch ( $network_slug ) {
387
 
388
+ case 'facebook':
389
+ $access_token = '';
390
+ if ( ! empty( $settings['facebook_share_counts_provider'] ) ) {
391
 
392
+ // Grab the token from the authorized app
393
+ if ( 'authorized_app' == $settings['facebook_share_counts_provider'] ) {
394
+ $facebook_access_token = Mediavine\Grow\Settings::get_setting( 'dpsp_facebook_access_token' );
395
 
396
+ $access_token = ( ! empty( $facebook_access_token['access_token'] ) ? $facebook_access_token['access_token'] : '' );
397
+ }
398
 
399
+ // Grab the token from the user's own app
400
+ if ( 'own_app' == $settings['facebook_share_counts_provider'] ) {
401
+ $access_token = ( ! empty( $settings['facebook_app_access_token'] ) ? $settings['facebook_app_access_token'] : '' );
402
+ }
403
+ }
404
 
405
+ if ( empty( $access_token ) ) {
406
+ $url = 'https://graph.facebook.com/?id=' . $page_url;
407
+ } else {
408
+ $url = 'https://graph.facebook.com/v2.12/?id=' . $page_url . '&access_token=' . $access_token . '&fields=engagement';
409
+ }
410
+ break;
411
 
412
+ default:
413
+ if ( function_exists( 'dpsp_get_pro_url_network_share_count' ) ) {
414
+ $url = dpsp_get_pro_url_network_share_count( $network_slug, $page_url, $settings );
415
+ }
416
+ }
417
 
418
+ // Get response from the api call
419
+ $response = wp_remote_get( $url, $args );
420
 
421
+ // Continue only if response code is 200
422
+ if ( wp_remote_retrieve_response_code( $response ) == 200 ) {
 
 
 
 
423
 
424
+ $body = json_decode( wp_remote_retrieve_body( $response ), true );
425
 
426
+ // Get share value from response body
427
+ switch ( $network_slug ) {
428
 
429
+ case 'facebook':
430
+ $reaction_count = isset( $body['engagement']['reaction_count'] ) ? $body['engagement']['reaction_count'] : false;
431
+ $comment_count = isset( $body['engagement']['comment_count'] ) ? $body['engagement']['comment_count'] : false;
432
+ $share_count = isset( $body['engagement']['share_count'] ) ? $body['engagement']['share_count'] : false;
433
 
434
+ $share_count = ( false !== $reaction_count && false !== $comment_count && false !== $share_count ? (int) $reaction_count + (int) $comment_count + (int) $share_count : false );
435
 
436
+ break;
437
 
438
+ case 'pinterest':
439
+ $body = wp_remote_retrieve_body( $response );
440
+ $start = strpos( $body, '(' );
441
+ $end = strpos( $body, ')', $start + 1 );
442
+ $length = $end - $start;
443
+ $body = json_decode( substr( $body, $start + 1, $length - 1 ), true );
444
 
445
+ $share_count = ( isset( $body['count'] ) ? $body['count'] : false );
446
 
447
+ break;
448
+
449
+ default:
450
+ if ( function_exists( 'dpsp_get_pro_url_network_share_count_response' ) ) {
451
+ $share_count = dpsp_get_pro_url_network_share_count_response( $network_slug, $body, $response );
452
+ } else {
453
+ $share_count = ( isset( $body['count'] ) ? $body['count'] : false );
454
+ }
455
+ break;
456
  }
457
 
458
+ return ( false !== $share_count ? (int) $share_count : $share_count );
459
+
460
+ } else {
461
+
462
  return false;
463
 
464
  }
465
 
466
+ return false;
467
 
468
+ }
 
 
 
 
 
 
 
 
 
 
469
 
 
 
470
 
471
+ /**
472
+ * Returns an array with the saved shares from the database
473
+ *
474
+ * @param $post_id
475
+ *
476
+ * @return array
477
+ *
478
+ */
479
+ function dpsp_get_post_share_counts( $post_id = 0 ) {
480
 
481
+ $networks_shares = dpsp_maybe_unserialize( get_post_meta( $post_id, 'dpsp_networks_shares', true ) );
482
 
483
+ if ( empty( $networks_shares ) ) {
484
+ $networks_shares = [];
485
  }
486
 
 
487
  /**
488
+ * Filter the post's network shares before returning them
 
489
  *
490
+ * @param array $networks_shares
491
+ * @param int $post_id
 
 
492
  *
493
  */
494
+ $networks_shares = apply_filters( 'dpsp_get_post_share_counts', $networks_shares, $post_id );
 
 
 
495
 
496
+ return $networks_shares;
497
 
498
+ }
499
 
500
+ /**
501
+ * Updates the given share counts for a post into the database
502
+ *
503
+ * @param int $post_id - the id of the post to save the shares
504
+ * @param array $share_counts - an array with the network shares and total shares
505
+ *
506
+ * @return bool
507
+ *
508
+ */
509
+ function dpsp_update_post_share_counts( $post_id = 0, $share_counts = [] ) {
510
 
511
+ if ( empty( $post_id ) || empty( $share_counts ) ) {
512
+ return false;
513
  }
514
 
515
+ // Update post meta with all shares
516
+ update_post_meta( $post_id, 'dpsp_networks_shares', $share_counts );
517
+
518
+ // Update post meta with total share counts
519
+ update_post_meta( $post_id, 'dpsp_networks_shares_total', array_sum( $share_counts ) );
520
+
521
+ // Update post meta with last updated timestamp
522
+ update_post_meta( $post_id, 'dpsp_networks_shares_last_updated', time() );
523
 
524
  /**
525
+ * Do extra actions after updating the post's share counts
526
  *
527
+ * @param int $post_id - the id of the post to save the shares
528
+ * @param array $shares - an array with the network shares and total shares
 
 
529
  *
530
  */
531
+ do_action( 'dpsp_update_post_share_counts', $post_id, $share_counts );
532
 
533
+ return true;
 
534
 
535
+ }
 
536
 
537
+ /**
538
+ * Updates the top shared posts array
539
+ *
540
+ * @param int $post_id - the id of the post to save the shares
541
+ * @param array $shares - an array with the network shares and total shares
542
+ *
543
+ * @return bool
544
+ *
545
+ */
546
+ function dpsp_update_top_shared_posts( $post_id = 0, $share_counts = [] ) {
547
 
548
+ if ( empty( $post_id ) || empty( $share_counts ) ) {
549
+ return false;
550
+ }
551
 
552
+ // Get the post's post type
553
+ $post_type = get_post_type( $post_id );
 
 
 
 
 
 
554
 
555
+ // Get current saved top shared posts
556
+ $top_posts = Mediavine\Grow\Settings::get_setting( 'dpsp_top_shared_posts', [] );
557
+ $top_posts = ( ! empty( $top_posts ) ? $top_posts : [] );
558
 
559
+ // Decode the top posts into an array
560
+ if ( ! empty( $top_posts ) && ! is_array( $top_posts ) ) {
561
+ $top_posts = json_decode( $top_posts, ARRAY_A );
562
  }
563
 
564
+ $top_posts[ $post_type ][ $post_id ] = array_sum( $share_counts );
565
 
566
  /**
567
+ * Filter top shared posts before saving in the db
 
 
 
568
  *
569
+ * @param array $top_posts
570
+ * @param int $post_id
571
  *
572
  */
573
+ $top_posts = apply_filters( 'dpsp_top_shared_posts_raw', $top_posts, $post_id );
574
 
575
+ // Filter top posts array
576
+ if ( ! empty( $top_posts ) ) {
577
+ foreach ( $top_posts as $post_type => $post_list ) {
578
+ if ( ! empty( $top_posts[ $post_type ] ) ) {
579
 
580
+ // Sort descending
581
+ arsort( $top_posts[ $post_type ] );
582
 
583
+ // Get only first ten
584
+ $top_posts[ $post_type ] = array_slice( $top_posts[ $post_type ], 0, 10, true );
585
 
586
+ }
587
+ }
588
+ }
 
 
 
589
 
590
+ // Update top posts
591
+ update_option( 'dpsp_top_shared_posts', json_encode( $top_posts ) );
592
+ }
593
+
594
+ /**
595
+ * Return total share count calculated for the social networks passed, if no social network is passed
596
+ * the total share value will be calculated for all active networks
597
+ *
598
+ * @param array $networks - the networks for which we want to return the total count
599
+ * @param string $location - the location of the share buttons
600
+ *
601
+ * @return int
602
+ *
603
+ */
604
+ function dpsp_get_post_total_share_count( $post_id = 0, $networks = [], $location = '' ) {
605
+
606
+ if ( 0 == $post_id ) {
607
+ $post_obj = dpsp_get_current_post();
608
+ $post_id = $post_obj->ID;
609
+ }
610
 
611
+ if ( empty( $networks ) ) {
612
+ $networks = dpsp_get_active_networks();
613
+ }
 
 
 
 
614
 
615
+ // Get saved total share counts
616
+ $total_shares = get_post_meta( $post_id, 'dpsp_networks_shares_total', true );
617
 
618
+ // If the total shares are not set in the post meta, calculate them
619
+ // based on the shares for each platform
620
+ if ( empty( $total_shares ) ) {
 
621
 
622
+ $total_shares = 0;
 
623
 
624
+ // Get network shares for this post
625
+ $networks_shares = dpsp_maybe_unserialize( get_post_meta( $post_id, 'dpsp_networks_shares', true ) );
626
+ $networks_shares = ( ! empty( $networks_shares ) ? $networks_shares : [] );
627
 
628
+ // Pass through each network and increment the total shares counter
629
+ foreach ( $networks as $network_slug ) {
630
+ $total_shares += ( isset( $networks_shares[ $network_slug ] ) && in_array( $network_slug, dpsp_get_networks_with_social_count() ) ? $networks_shares[ $network_slug ] : 0 );
631
  }
 
 
 
 
 
 
632
  }
 
 
633
 
634
  /**
635
+ * Filter total shares before returning them
 
 
 
 
636
  *
637
+ * @param int $total_shares
638
+ * @param int $post_id
639
+ * @param string $location
640
  *
641
  */
642
+ $total_shares = apply_filters( 'dpsp_get_post_total_share_count', (int) $total_shares, $post_id, $location );
643
 
644
+ return $total_shares;
 
 
 
645
 
646
+ }
 
647
 
648
 
649
+ /**
650
+ * Checks to see if total shares are at least as high as the minimum count
651
+ * needed. Return null if the minimum shares is greater than the total
652
+ *
653
+ * @param $total_shares - the total shares of the post for all active networks
654
+ * @param $post_id - the ID of the post
655
+ * @param $location - the location where the buttons are displayed
656
+ *
657
+ * @return mixed int | null
658
+ *
659
+ */
660
+ function dpsp_post_total_share_count_minimum_count( $total_shares, $post_id, $location ) {
661
 
662
+ if ( ! ctype_digit( $total_shares ) ) {
663
+ return $total_shares;
664
+ }
665
 
666
+ if ( empty( $location ) ) {
667
+ return $total_shares;
668
+ }
669
 
670
+ $location_settings = Mediavine\Grow\Settings::get_setting( 'dpsp_location_' . $location );
 
 
671
 
672
+ if ( isset( $location_settings['display']['minimum_count'] ) && ctype_digit( $location_settings['display']['minimum_count'] ) && $location_settings['display']['minimum_count'] > $total_shares ) {
673
+ $total_shares = null;
674
+ }
675
 
676
+ return $total_shares;
677
 
678
+ }
 
 
 
 
 
 
 
679
 
680
+ /**
681
+ * Rounds the share counts
682
+ *
683
+ * @param int $share_count
684
+ * @param string $location
685
+ *
686
+ * @return int
687
+ *
688
+ */
689
+ function dpsp_round_share_counts( $share_count, $location = '' ) {
690
 
691
+ if ( empty( $location ) ) {
692
+ return $share_count;
693
  }
694
 
695
+ if ( empty( $share_count ) ) {
696
+ return $share_count;
697
+ }
698
+
699
+ $location_settings = Mediavine\Grow\Settings::get_setting( 'dpsp_location_' . $location, [] );
700
+
701
+ if ( ! isset( $location_settings['display']['count_round'] ) ) {
702
+ return $share_count;
703
+ }
704
 
705
  /**
706
+ * Filter the precision at which the number should be rounded
 
 
 
707
  *
708
+ * @param int $round_precision
709
  *
710
  */
711
+ $round_precision = apply_filters( 'dpsp_share_counts_round_precision', 1 );
 
 
 
 
 
 
 
712
 
713
+ if ( is_array( $share_count ) ) {
714
 
715
+ foreach ( $share_count as $key => $count ) {
 
716
 
717
+ if ( $count / 1000000 >= 1 ) {
718
+ $share_count[ $key ] = number_format( $count / 1000000, $round_precision ) . 'M';
719
+ } elseif ( $count / 1000 >= 1 ) {
720
+ $share_count[ $key ] = number_format( $count / 1000, $round_precision ) . 'K';
 
721
  }
722
+ }
723
+ } else {
724
 
725
+ if ( $share_count / 1000000 >= 1 ) {
726
+ $share_count = number_format( $share_count / 1000000, $round_precision ) . 'M';
727
+ } elseif ( $share_count / 1000 >= 1 ) {
728
+ $share_count = number_format( $share_count / 1000, $round_precision ) . 'K';
729
+ }
730
+ }
731
 
732
+ return $share_count;
733
 
734
+ }
 
735
 
 
736
 
737
+ /**
738
+ * Listens for the Facebook response with the access code from the Grow Social by Mediavine app
739
+ *
740
+ */
741
+ function dpsp_capture_authorize_facebook_access_token() {
742
 
743
+ if ( empty( $_GET['tkn'] ) || ! wp_verify_nonce( $_GET['tkn'], 'dpsp_authorize_facebook_app' ) ) {
744
+ return;
745
  }
 
 
746
 
747
+ if ( empty( $_GET['facebook_access_token'] ) ) {
748
+ return;
749
+ }
750
 
751
+ if ( empty( $_GET['expires_in'] ) ) {
752
+ return;
753
+ }
754
+
755
+ $facebook_access_token = [
756
+ 'access_token' => sanitize_text_field( $_GET['facebook_access_token'] ),
757
+ 'expires_in' => time() + absint( $_GET['expires_in'] ),
758
+ ];
759
+
760
+ update_option( 'dpsp_facebook_access_token', $facebook_access_token );
761
+
762
+ wp_redirect(
763
+ add_query_arg(
764
+ [
765
+ 'page' => 'dpsp-settings',
766
+ 'dpsp_message_id' => 4,
767
+ 'settings-updated' => '',
768
+ ],
769
+ admin_url( 'admin.php' )
770
+ )
771
+ );
772
+ exit;
773
+
774
+ }
775
+
776
+ /**
777
+ * Transients have proved to be unreliable for Facebook App tokens,
778
+ * so we've moved them over to options.
779
+ *
780
+ * This function migrates the value saved in the Facebook App token transient to an option.
781
+ *
782
+ * @todo This function can be removed sometime in the future, as it won't be needed anymore.
783
+ * The token is saved in a token once every two months, because it expires and it needs manual
784
+ * reauthorization. This code was added to Pro on the 5th of February 2020 and to Free on the 1st of December 2020.
785
+ *
786
+ */
787
+ function dpsp_migrate_facebook_access_token_transient_to_option() {
788
+
789
+ // Get the access token saved in transient
790
+ $facebook_access_token = get_transient( 'dpsp_facebook_access_token' );
791
+
792
+ // If the transient value doesn't exit, no need to do anything
793
+ if ( empty( $facebook_access_token ) ) {
794
+ return;
795
+ }
796
 
797
+ // Add the transient value as an option
798
+ update_option( 'dpsp_facebook_access_token', $facebook_access_token );
799
+
800
+ // Delete the transient value altogether
801
+ delete_transient( 'dpsp_facebook_access_token' );
802
+
803
+ }
804
+
805
+ /**
806
+ * Returns the share count saved for a post given the post_id and the
807
+ * network we wish to retreive the value for
808
+ *
809
+ * @param int post_id - id of the post
810
+ * @param string $network_slug - slug of the social network
811
+ *
812
+ * @return mixed - bool false if something went wrong, and int if everything went well
813
+ *
814
+ * @deprecated 2.6.0
815
+ *
816
+ */
817
+ function dpsp_get_post_share_count( $post_id, $network_slug ) {
818
+
819
+ if ( ! isset( $post_id ) && ! isset( $network_slug ) ) {
820
+ return false;
821
+ }
822
 
823
+ $shares = dpsp_get_post_share_counts( $post_id );
 
824
 
825
+ if ( isset( $shares[ $network_slug ] ) && in_array( $network_slug, dpsp_get_networks_with_social_count() ) ) {
826
+ return $shares[ $network_slug ];
827
+ } else {
828
+ return false;
829
+ }
830
 
831
+ }
 
 
 
832
 
833
+ function dpsp_invalidate_all_share_counts() {
834
+ Share_Counts::invalidate_all();
835
 
836
+ }
 
837
 
838
+ /**
839
+ * Register hooks for functions-share-counts.php
840
+ */
841
+ function dpsp_register_functions_share_counts() {
842
+ add_action( 'wp_head', 'dpsp_refresh_post_share_counts', 10 );
843
+ add_action( 'admin_head', 'dpsp_refresh_post_share_counts_edit', 10 );
844
+ add_action( 'dpsp_update_post_share_counts', 'dpsp_update_top_shared_posts', 10, 2 );
845
+ add_filter( 'dpsp_get_post_total_share_count', 'dpsp_post_total_share_count_minimum_count', 20, 3 );
846
+ add_filter( 'dpsp_get_output_post_shares_counts', 'dpsp_round_share_counts', 10, 2 );
847
+ add_filter( 'dpsp_get_output_total_share_count', 'dpsp_round_share_counts', 10, 2 );
848
+ add_action( 'admin_init', 'dpsp_capture_authorize_facebook_access_token' );
849
+ add_action( 'admin_init', 'dpsp_migrate_facebook_access_token_transient_to_option' );
850
+ }
inc/functions-tools.php ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Returns all the tools available with all their data
5
+ *
6
+ * @param string $type
7
+ * @param bool $only_slugs
8
+ *
9
+ * @return array
10
+ *
11
+ */
12
+ function dpsp_get_tools( $type = 'all', $only_slugs = false ) {
13
+
14
+ // The tools array
15
+ $tools = [];
16
+
17
+ /**
18
+ * Possibility to add other tools into the tools array
19
+ *
20
+ * @param array $tools
21
+ *
22
+ */
23
+ $tools = apply_filters( 'dpsp_get_tools', $tools );
24
+
25
+ // Return only the tools of a certain type
26
+ if ( 'all' != $type && ! empty( $tools ) ) {
27
+ foreach ( $tools as $tool_slug => $tool ) {
28
+ if ( $tool['type'] != $type ) {
29
+ unset( $tools[ $tool_slug ] );
30
+ }
31
+ }
32
+ }
33
+
34
+ // Return only the slugs
35
+ if ( $only_slugs ) {
36
+ $tools = array_keys( $tools );
37
+ }
38
+
39
+ return $tools;
40
+
41
+ }
42
+
43
+ /**
44
+ * Returns all active tools
45
+ *
46
+ * Does not take into account the custom activation settings of the tools
47
+ *
48
+ * @return array
49
+ *
50
+ */
51
+ function dpsp_get_active_tools() {
52
+
53
+ $active_tools = Mediavine\Grow\Settings::get_setting( 'dpsp_active_tools', [] );
54
+
55
+ return $active_tools;
56
+
57
+ }
58
+
59
+
60
+ /**
61
+ * Checks to see if the tool settings is active or not
62
+ *
63
+ * @param string $tool_slug
64
+ *
65
+ * @return bool
66
+ *
67
+ */
68
+ function dpsp_is_tool_active( $tool_slug ) {
69
+
70
+ $tools = dpsp_get_tools();
71
+
72
+ // Handle if there is no particular activation setting for the tool
73
+ if ( empty( $tools[ $tool_slug ]['activation_setting'] ) ) {
74
+
75
+ $active_tools = dpsp_get_active_tools();
76
+
77
+ if ( in_array( $tool_slug, $active_tools ) ) {
78
+ return true;
79
+ } else {
80
+ return false;
81
+ }
82
+ }
83
+
84
+ $setting = $tools[ $tool_slug ]['activation_setting'];
85
+
86
+ $option_name = explode( '[', $setting );
87
+ $option_name = $option_name[0];
88
+
89
+ $settings = Mediavine\Grow\Settings::get_setting( $option_name );
90
+
91
+ if ( isset( $settings[ str_replace( [ $option_name, '[', ']' ], '', $setting ) ] ) ) {
92
+ return true;
93
+ } else {
94
+ return false;
95
+ }
96
+
97
+ }
98
+
99
+
100
+ /**
101
+ * Activates a network location
102
+ *
103
+ */
104
+ function dpsp_activate_tool() {
105
+
106
+ if ( empty( $_POST['dpsptkn'] ) || ! wp_verify_nonce( $_POST['dpsptkn'], 'dpsptkn' ) ) {
107
+ echo 0;
108
+ wp_die();
109
+ }
110
+
111
+ $tool = trim( $_POST['tool'] );
112
+ $tools = dpsp_get_tools();
113
+
114
+ // Update the tools array
115
+ $active_tools = Mediavine\Grow\Settings::get_setting( 'dpsp_active_tools', [] );
116
+
117
+ if ( ! in_array( $tool, $active_tools ) ) {
118
+ array_push( $active_tools, $tool );
119
+ }
120
+
121
+ $active_tools = array_unique( $active_tools );
122
+
123
+ update_option( 'dpsp_active_tools', $active_tools );
124
+
125
+ // Update the activation setting if there is one
126
+ $tool_setting = ( ! empty( $tools[ $tool ]['activation_setting'] ) ? $tools[ $tool ]['activation_setting'] : '' );
127
+
128
+ if ( ! empty( $tool_setting ) ) {
129
+
130
+ $option_name = explode( '[', $tool_setting );
131
+ $option_name = $option_name[0];
132
+
133
+ $settings = Mediavine\Grow\Settings::get_setting( $option_name );
134
+ $active_option = str_replace( [ $option_name, '[', ']' ], '', $tool_setting );
135
+
136
+ if ( ! isset( $settings[ $active_option ] ) ) {
137
+
138
+ $settings[ $active_option ] = 1;
139
+ update_option( $option_name, $settings );
140
+
141
+ }
142
+ }
143
+
144
+ echo 1;
145
+ wp_die();
146
+ }
147
+
148
+ /**
149
+ * Deactivates a network location
150
+ *
151
+ */
152
+ function dpsp_deactivate_tool() {
153
+
154
+ if ( empty( $_POST['dpsptkn'] ) || ! wp_verify_nonce( $_POST['dpsptkn'], 'dpsptkn' ) ) {
155
+ echo 0;
156
+ wp_die();
157
+ }
158
+
159
+ $tool = trim( $_POST['tool'] );
160
+ $tools = dpsp_get_tools();
161
+
162
+ // Update the tools array
163
+ $active_tools = Mediavine\Grow\Settings::get_setting( 'dpsp_active_tools', [] );
164
+ if ( ( $key = array_search( $tool, $active_tools ) ) !== false ) {
165
+ unset( $active_tools[ $key ] );
166
+ $active_tools = array_values( $active_tools );
167
+ }
168
+
169
+ $active_tools = array_unique( $active_tools );
170
+
171
+ update_option( 'dpsp_active_tools', $active_tools );
172
+
173
+ // Update the activation setting if there is one
174
+ $tool_setting = ( ! empty( $tools[ $tool ]['activation_setting'] ) ? $tools[ $tool ]['activation_setting'] : '' );
175
+
176
+ if ( ! empty( $tool_setting ) ) {
177
+
178
+ $option_name = explode( '[', $tool_setting );
179
+ $option_name = $option_name[0];
180
+
181
+ $settings = Mediavine\Grow\Settings::get_setting( $option_name );
182
+ $active_option = str_replace( [ $option_name, '[', ']' ], '', $tool_setting );
183
+
184
+ if ( isset( $settings[ $active_option ] ) ) {
185
+
186
+ unset( $settings[ $active_option ] );
187
+ update_option( $option_name, $settings );
188
+
189
+ }
190
+ }
191
+
192
+ echo 1;
193
+ wp_die();
194
+
195
+ }
196
+
197
+ /**
198
+ * Register hooks for functions-tools.php
199
+ */
200
+ function dpsp_register_functions_tools() {
201
+ add_action( 'wp_ajax_dpsp_activate_tool', 'dpsp_activate_tool' );
202
+ add_action( 'wp_ajax_dpsp_deactivate_tool', 'dpsp_deactivate_tool' );
203
+ }
inc/functions-version-update.php CHANGED
@@ -4,82 +4,487 @@
4
  *
5
  */
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
  /**
9
- * Updates needed to the database when updating to version 1.5.1
10
  *
11
- * In this version OpenShareCount support has been removed, must default to TwitCount
 
12
  *
13
- * @param string $old_db_version - the previous version of the plugin
14
- * @param string $new_db_version - the new version of the plugin
15
  *
16
  */
17
- function dpsp_version_update_1_5_1( $old_db_version, $new_db_version ) {
18
 
19
- // Do this only if the version is greater than 1.5.1
20
- if( false === version_compare( $new_db_version, '1.5.1', '>=' ) )
21
  return;
 
 
 
 
 
 
 
22
 
23
  // Check to see if we've done this check before
24
- $version_updated = get_option( 'dpsp_version_update_1_5_1', false );
25
 
26
- if( $version_updated )
27
  return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
  // Update the main plugin settings
30
- $settings = get_option( 'dpsp_settings', array() );
31
 
32
- if( ! empty( $settings['twitter_share_counts'] ) )
33
- unset( $settings['twitter_share_counts'] );
 
 
 
 
 
34
 
35
  update_option( 'dpsp_settings', $settings );
36
 
37
- // Save a true bool value in the database so we know we've done this
38
  // version update
39
- update_option( 'dpsp_version_update_1_5_1', 1 );
40
-
41
  }
42
- add_action( 'dpsp_update_database', 'dpsp_version_update_1_5_1', 10, 2 );
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
  /**
46
- * Updates needed to the database when updating to version 1.6.1
47
  *
48
  * In this version the Facebook share counts provider was added
49
  *
50
- * @param string $old_db_version - the previous version of the plugin
51
- * @param string $new_db_version - the new version of the plugin
52
  *
53
  */
54
- function dpsp_version_update_1_6_1( $old_db_version, $new_db_version ) {
55
 
56
- // Do this only if the version is greater than 1.6.1
57
- if( false === version_compare( $new_db_version, '1.6.1', '>=' ) )
58
  return;
 
59
 
60
  // Check to see if we've done this check before
61
- $version_updated = get_option( 'dpsp_version_update_1_6_1', false );
62
 
63
- if( $version_updated )
64
  return;
 
65
 
66
  // Update the main plugin settings
67
- $settings = get_option( 'dpsp_settings', array() );
68
 
69
- if( empty( $settings['facebook_share_counts_provider'] ) ) {
70
 
71
- if( ! empty( $settings['facebook_app_id'] ) && ! empty( $settings['facebook_app_secret'] ) )
72
  $settings['facebook_share_counts_provider'] = 'own_app';
73
- else
74
  $settings['facebook_share_counts_provider'] = 'authorized_app';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
  }
77
 
78
  update_option( 'dpsp_settings', $settings );
79
 
80
- // Save a true bool value in the database so we know we've done this
81
  // version update
82
- update_option( 'dpsp_version_update_1_6_1', 1 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  }
85
- add_action( 'dpsp_update_database', 'dpsp_version_update_1_6_1', 10, 2 );
4
  *
5
  */
6
 
7
+ /**
8
+ * Updates needed to the database when updating to version 2.0.0
9
+ *
10
+ * In this version the new active_tools array has been added and we need to grab
11
+ * all current active button locations and add them as active tools
12
+ *
13
+ * @param string $old_db_version - the previous version of the plugin
14
+ * @param string $new_db_version - the new version of the plugin
15
+ *
16
+ */
17
+ function dpsp_version_update_2_0_0( $old_db_version, $new_db_version ) {
18
+
19
+ // Do this only if the version is greater than 2.0.0
20
+ if ( false === version_compare( $new_db_version, '2.0.0', '>=' ) ) {
21
+ return;
22
+ }
23
+
24
+ // The version update is dependent on this function
25
+ // Check to see if it exists first so we don't go into a fatal error
26
+ if ( ! function_exists( 'dpsp_is_location_active' ) ) {
27
+ return;
28
+ }
29
+
30
+ // Check to see if we've done this check before
31
+ $version_updated = Mediavine\Grow\Settings::get_setting( 'dpsp_version_update_2_0_0', false );
32
+
33
+ if ( $version_updated ) {
34
+ return;
35
+ }
36
+
37
+ $active_tools = Mediavine\Grow\Settings::get_setting( 'dpsp_active_tools', [] );
38
+
39
+ // Supported network locations in version 1.6.2
40
+ $network_locations = [ 'sidebar', 'content', 'mobile', 'pop_up', 'follow_widget' ];
41
+
42
+ // If any of the supported network locations are active add them to the
43
+ // active_tools array
44
+ foreach ( $network_locations as $location_slug ) {
45
+ if ( dpsp_is_location_active( $location_slug ) ) {
46
+
47
+ if ( 'follow_widget' != $location_slug ) {
48
+ $tool_slug = 'share_' . $location_slug;
49
+ } else {
50
+ $tool_slug = $location_slug;
51
+ }
52
+
53
+ array_push( $active_tools, $tool_slug );
54
+
55
+ }
56
+ }
57
+
58
+ $active_tools = array_unique( $active_tools );
59
+
60
+ update_option( 'dpsp_active_tools', $active_tools );
61
+
62
+ // Save a true bool value in the database so we know we've done this
63
+ // version update
64
+ update_option( 'dpsp_version_update_2_0_0', 1 );
65
+ }
66
 
67
  /**
68
+ * Updates needed to the database when updating to version 2.3.4
69
  *
70
+ * In this version StumbleUpon has been removed and we need to remove it from
71
+ * all location settings
72
  *
73
+ * @param string $old_db_version - the previous version of the plugin
74
+ * @param string $new_db_version - the new version of the plugin
75
  *
76
  */
77
+ function dpsp_version_update_2_3_4( $old_db_version, $new_db_version ) {
78
 
79
+ // Do this only if the version is greater than 2.3.4
80
+ if ( false === version_compare( $new_db_version, '2.3.4', '>=' ) ) {
81
  return;
82
+ }
83
+
84
+ // The version update is dependent on this function
85
+ // Check to see if it exists first so we don't go into a fatal error
86
+ if ( ! function_exists( 'dpsp_is_location_active' ) ) {
87
+ return;
88
+ }
89
 
90
  // Check to see if we've done this check before
91
+ $version_updated = Mediavine\Grow\Settings::get_setting( 'dpsp_version_update_2_3_4', false );
92
 
93
+ if ( $version_updated ) {
94
  return;
95
+ }
96
+
97
+ // Get all network locations
98
+ $locations = dpsp_get_network_locations( 'share', true );
99
+
100
+ foreach ( $locations as $location_slug ) {
101
+
102
+ $location_settings = dpsp_get_location_settings( $location_slug );
103
+
104
+ // If no networks are set, just go on to the next location
105
+ if ( empty( $location_settings['networks'] ) ) {
106
+ continue;
107
+ }
108
+
109
+ $networks = array_keys( $location_settings['networks'] );
110
+
111
+ // If StumbleUpon is not present, jump to the next location
112
+ if ( ! in_array( 'stumbleupon', $networks ) ) {
113
+ continue;
114
+ }
115
+
116
+ // Remove StumbleUpon and update the settings
117
+ unset( $location_settings['networks']['stumbleupon'] );
118
+
119
+ update_option( 'dpsp_location_' . $location_slug, $location_settings );
120
+
121
+ }
122
+
123
+ // Save a true bool value in the database so we know we've done this
124
+ // version update
125
+ update_option( 'dpsp_version_update_2_3_4', 1 );
126
+ }
127
+
128
+ /**
129
+ * Updates needed to the database when updating to version 2.4.0
130
+ *
131
+ * In this version the Mobile Sticky sharing tool has been transformed into the
132
+ * Sticky Bar sharing tool and the settings need to be transfered
133
+ *
134
+ * @param string $old_db_version - the previous version of the plugin
135
+ * @param string $new_db_version - the new version of the plugin
136
+ *
137
+ */
138
+ function dpsp_version_update_2_4_0( $old_db_version, $new_db_version ) {
139
+
140
+ // Do this only if the version is greater than 2.4.0
141
+ if ( false === version_compare( $new_db_version, '2.4.0', '>=' ) ) {
142
+ return;
143
+ }
144
+
145
+ // The version update is dependent on this function
146
+ // Check to see if it exists first so we don't go into a fatal error
147
+ if ( ! function_exists( 'dpsp_is_location_active' ) ) {
148
+ return;
149
+ }
150
+
151
+ // Check to see if we've done this check before
152
+ $version_updated = Mediavine\Grow\Settings::get_setting( 'dpsp_version_update_2_4_0', false );
153
+
154
+ if ( $version_updated ) {
155
+ return;
156
+ }
157
+
158
+ $settings_mobile = Mediavine\Grow\Settings::get_setting( 'dpsp_location_mobile', [] );
159
+
160
+ if ( empty( $settings_mobile ) ) {
161
+ return;
162
+ }
163
+
164
+ // Additional settings
165
+ $settings_mobile['display']['shape'] = 'rounded';
166
+ $settings_mobile['display']['icon_animation'] = 'yes';
167
+ $settings_mobile['display']['show_on_device'] = 'mobile';
168
+
169
+ update_option( 'dpsp_location_sticky_bar', $settings_mobile );
170
+
171
+ // Need to update the active tools db option
172
+ $active_tools = Mediavine\Grow\Settings::get_setting( 'dpsp_active_tools', [] );
173
+
174
+ if ( is_array( $active_tools ) && in_array( 'share_mobile', $active_tools ) ) {
175
+
176
+ $active_tools[] = 'share_sticky_bar';
177
+
178
+ update_option( 'dpsp_active_tools', $active_tools );
179
+
180
+ }
181
+
182
+ // Save a true bool value in the database so we know we've done this
183
+ // version update
184
+ update_option( 'dpsp_version_update_2_4_0', 1 );
185
+ }
186
+
187
+ /**
188
+ * Updates needed to the database when updating to version 2.5.0
189
+ *
190
+ * In this version the Sticky Sticky sharing tool supports positioning, top or bottom
191
+ * Need to set the "bottom" value to both the desktop and mobile positions, as per default
192
+ *
193
+ * @param string $old_db_version - the previous version of the plugin
194
+ * @param string $new_db_version - the new version of the plugin
195
+ *
196
+ */
197
+ function dpsp_version_update_2_5_0( $old_db_version, $new_db_version ) {
198
+
199
+ // Do this only if the version is greater than 2.4.0
200
+ if ( false === version_compare( $new_db_version, '2.5.0', '>=' ) ) {
201
+ return;
202
+ }
203
+
204
+ // The version update is dependent on this function
205
+ // Check to see if it exists first so we don't go into a fatal error
206
+ if ( ! function_exists( 'dpsp_is_location_active' ) ) {
207
+ return;
208
+ }
209
+
210
+ // Check to see if we've done this check before
211
+ $version_updated = Mediavine\Grow\Settings::get_setting( 'dpsp_version_update_2_5_0', false );
212
+
213
+ if ( $version_updated ) {
214
+ return;
215
+ }
216
+
217
+ // Update the sticky bar settings
218
+ $settings_sticky_bar = Mediavine\Grow\Settings::get_setting( 'dpsp_location_sticky_bar', [] );
219
+
220
+ if ( ! empty( $settings_sticky_bar ) ) {
221
+
222
+ // Additional settings
223
+ $settings_sticky_bar['display']['position_desktop'] = 'bottom';
224
+ $settings_sticky_bar['display']['position_mobile'] = 'bottom';
225
+
226
+ update_option( 'dpsp_location_sticky_bar', $settings_sticky_bar );
227
+
228
+ }
229
 
230
  // Update the main plugin settings
231
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
232
 
233
+ if ( empty( $settings['twitter_share_counts_provider'] ) ) {
234
+ $settings['twitter_share_counts_provider'] = 'twitcount';
235
+ }
236
+
237
+ if ( empty( $settings['share_image_pin_description_source'] ) ) {
238
+ $settings['share_image_pin_description_source'] = 'image_alt_tag';
239
+ }
240
 
241
  update_option( 'dpsp_settings', $settings );
242
 
243
+ // Save a true bool value in the database so we know we've done this
244
  // version update
245
+ update_option( 'dpsp_version_update_2_5_0', 1 );
 
246
  }
 
247
 
248
+ /**
249
+ * Updates needed to the database when updating to version 2.5.2
250
+ *
251
+ * In this version OpenShareCount support has been removed, must default to TwitCount
252
+ *
253
+ * @param string $old_db_version - the previous version of the plugin
254
+ * @param string $new_db_version - the new version of the plugin
255
+ *
256
+ */
257
+ function dpsp_version_update_2_5_2( $old_db_version, $new_db_version ) {
258
+
259
+ // Do this only if the version is greater than 2.5.2
260
+ if ( false === version_compare( $new_db_version, '2.5.2', '>=' ) ) {
261
+ return;
262
+ }
263
+
264
+ // Check to see if we've done this check before
265
+ $version_updated = Mediavine\Grow\Settings::get_setting( 'dpsp_version_update_2_5_2', false );
266
+
267
+ if ( $version_updated ) {
268
+ return;
269
+ }
270
+
271
+ // Update the main plugin settings
272
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
273
+
274
+ if ( ! empty( $settings['twitter_share_counts_provider'] ) && 'twitcount' != $settings['twitter_share_counts_provider'] ) {
275
+ if ( ! empty( $settings['twitter_share_counts'] ) ) {
276
+ unset( $settings['twitter_share_counts'] );
277
+ }
278
+
279
+ $settings['twitter_share_counts_provider'] = 'twitcount';
280
+
281
+ }
282
+
283
+ update_option( 'dpsp_settings', $settings );
284
+
285
+ // Save a true bool value in the database so we know we've done this
286
+ // version update
287
+ update_option( 'dpsp_version_update_2_5_2', 1 );
288
+ }
289
 
290
  /**
291
+ * Updates needed to the database when updating to version 2.6.6
292
  *
293
  * In this version the Facebook share counts provider was added
294
  *
295
+ * @param string $old_db_version - the previous version of the plugin
296
+ * @param string $new_db_version - the new version of the plugin
297
  *
298
  */
299
+ function dpsp_version_update_2_6_6( $old_db_version, $new_db_version ) {
300
 
301
+ // Do this only if the version is greater than 2.6.6
302
+ if ( false === version_compare( $new_db_version, '2.6.6', '>=' ) ) {
303
  return;
304
+ }
305
 
306
  // Check to see if we've done this check before
307
+ $version_updated = Mediavine\Grow\Settings::get_setting( 'dpsp_version_update_2_6_6', false );
308
 
309
+ if ( $version_updated ) {
310
  return;
311
+ }
312
 
313
  // Update the main plugin settings
314
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
315
 
316
+ if ( empty( $settings['facebook_share_counts_provider'] ) ) {
317
 
318
+ if ( ! empty( $settings['facebook_app_id'] ) && ! empty( $settings['facebook_app_secret'] ) ) {
319
  $settings['facebook_share_counts_provider'] = 'own_app';
320
+ } else {
321
  $settings['facebook_share_counts_provider'] = 'authorized_app';
322
+ }
323
+ }
324
+
325
+ update_option( 'dpsp_settings', $settings );
326
+
327
+ // Save a true bool value in the database so we know we've done this
328
+ // version update
329
+ update_option( 'dpsp_version_update_2_6_6', 1 );
330
+ }
331
+
332
+ /**
333
+ * Updates needed to the database when updating to version 2.7.0
334
+ *
335
+ * In this version
336
+ *
337
+ * @param string $old_db_version - the previous version of the plugin
338
+ * @param string $new_db_version - the new version of the plugin
339
+ *
340
+ */
341
+ function dpsp_version_update_2_7_0( $old_db_version, $new_db_version ) {
342
+
343
+ // Do this only if the version is greater than 2.7.0
344
+ if ( false === version_compare( $new_db_version, '2.7.0', '>=' ) ) {
345
+ return;
346
+ }
347
+
348
+ // Check to see if we've done this check before
349
+ $version_updated = Mediavine\Grow\Settings::get_setting( 'dpsp_version_update_2_7_0', false );
350
+
351
+ if ( $version_updated ) {
352
+ return;
353
+ }
354
+
355
+ // Update the main plugin settings
356
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
357
+
358
+ if ( empty( $settings['share_image_pinterest_button_share_behavior'] ) ) {
359
+
360
+ $settings['share_image_pinterest_button_share_behavior'] = 'post_image';
361
 
362
  }
363
 
364
  update_option( 'dpsp_settings', $settings );
365
 
366
+ // Save a true bool value in the database so we know we've done this
367
  // version update
368
+ update_option( 'dpsp_version_update_2_7_0', 1 );
369
+ }
370
+
371
+ /**
372
+ * Updates needed to the database when updating to version 2.10.0
373
+ *
374
+ * In this version support for custom post types was added to the Pinterest Image Hover Button.
375
+ * Previously, only posts were supported. Because of this, post type checkboxes have been added
376
+ * to the settings page for the Pinterest Image Hover Button.
377
+ *
378
+ * We need to make sure the "Post" checkbox is checked when upgrading, if the Image Hover Pinterest Button
379
+ * share tool is active.
380
+ *
381
+ * @param string $old_db_version - the previous version of the plugin
382
+ * @param string $new_db_version - the new version of the plugin
383
+ *
384
+ */
385
+ function dpsp_version_update_2_10_0( $old_db_version, $new_db_version ) {
386
+
387
+ // Do this only if the version is greater than 2.10.0
388
+ if ( false === version_compare( $new_db_version, '2.10.0', '>=' ) ) {
389
+ return;
390
+ }
391
+
392
+ // Check to see if we've done this check before
393
+ $version_updated = Mediavine\Grow\Settings::get_setting( 'dpsp_version_update_2_10_0', false );
394
+
395
+ if ( $version_updated ) {
396
+ return;
397
+ }
398
+
399
+ // Check for seperate pinterest settings, if missing, pull them over from the general settings
400
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
401
+ $dpsp_pinterest_settings = Mediavine\Grow\Settings::get_setting( 'dpsp_pinterest_share_images_setting', [] );
402
 
403
+ if ( empty( $dpsp_pinterest_settings ) ) {
404
+ $dpsp_pinterest_settings_slugs = [
405
+ 'share_image_pin_description_source',
406
+ 'share_image_pinterest_pinnable_images',
407
+ 'share_image_pinterest_button_share_behavior',
408
+ 'share_image_post_pinterest_image_hidden',
409
+ 'share_image_post_multiple_hidden_pinterest_images',
410
+ 'share_image_page_builder_compatibility',
411
+ 'share_image_lazy_load_compatibility',
412
+ 'share_image_button_position',
413
+ 'share_image_button_shape',
414
+ 'share_image_minimum_image_width',
415
+ 'share_image_minimum_image_height',
416
+ 'share_image_show_button_text_label',
417
+ 'share_image_button_text_label',
418
+ 'share_image_show_image_overlay',
419
+ 'share_image_button_share_behavior',
420
+ 'share_image_post_type_display',
421
+ ];
422
+
423
+ foreach ( $dpsp_pinterest_settings_slugs as $slug ) {
424
+ if ( isset( $settings[ $slug ] ) ) {
425
+ $dpsp_pinterest_settings[ $slug ] = $settings[ $slug ];
426
+ }
427
+ }
428
+ // Update for new post type settings
429
+ if ( dpsp_is_tool_active( 'share_images' ) && empty( $settings['share_image_post_type_display'] ) ) {
430
+ $dpsp_pinterest_settings['share_image_post_type_display'] = [ 'post' ];
431
+ }
432
+
433
+ update_option( 'dpsp_pinterest_share_images_setting', $dpsp_pinterest_settings );
434
+ }
435
+
436
+ // Save a true bool value in the database so we know we've done this
437
+ // version update
438
+ update_option( 'dpsp_version_update_2_10_0', 1 );
439
+ }
440
+
441
+ /**
442
+ * Updates needed to the database when updating to version 2.12.4
443
+ *
444
+ * In this version
445
+ *
446
+ * @param string $old_db_version - the previous version of the plugin
447
+ * @param string $new_db_version - the new version of the plugin
448
+ *
449
+ */
450
+ function dpsp_version_update_2_12_4( $old_db_version, $new_db_version ) {
451
+
452
+ // Do this only if the version is greater than 2.12.4
453
+ if ( false === version_compare( $new_db_version, '2.12.4', '>=' ) ) {
454
+ return;
455
+ }
456
+
457
+ // Check to see if we've done this check before
458
+ $version_updated = Mediavine\Grow\Settings::get_setting( 'dpsp_version_update_2_12_4', false );
459
+
460
+ if ( $version_updated ) {
461
+ return;
462
+ }
463
+
464
+ // Update the main plugin settings
465
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
466
+ if ( empty( $settings['legacy_javascript'] ) && ! empty( $old_db_version ) && empty( $settings['optimize_javascript'] ) ) {
467
+ $settings['legacy_javascript'] = '1';
468
+ }
469
+
470
+ update_option( 'dpsp_settings', $settings );
471
+
472
+ // Save a true bool value in the database so we know we've done this
473
+ // version update
474
+ update_option( 'dpsp_version_update_2_12_4', 1 );
475
+ }
476
+
477
+ /**
478
+ * Register hooks for functions-version-update.php
479
+ */
480
+ function dpsp_register_functions_version_update() {
481
+ add_action( 'dpsp_update_database', 'dpsp_version_update_2_0_0', 10, 2 );
482
+ add_action( 'dpsp_update_database', 'dpsp_version_update_2_3_4', 10, 2 );
483
+ add_action( 'dpsp_update_database', 'dpsp_version_update_2_4_0', 10, 2 );
484
+ add_action( 'dpsp_update_database', 'dpsp_version_update_2_5_0', 10, 2 );
485
+ add_action( 'dpsp_update_database', 'dpsp_version_update_2_5_2', 10, 2 );
486
+ add_action( 'dpsp_update_database', 'dpsp_version_update_2_6_6', 10, 2 );
487
+ add_action( 'dpsp_update_database', 'dpsp_version_update_2_7_0', 10, 2 );
488
+ add_action( 'dpsp_update_database', 'dpsp_version_update_2_10_0', 10, 2 );
489
+ add_action( 'dpsp_update_database', 'dpsp_version_update_2_12_4', 10, 2 );
490
  }
 
inc/functions.php CHANGED
@@ -1,627 +1,959 @@
1
- <?php
2
-
3
-
4
- /**
5
- * Returns all the tools available with all their data
6
- *
7
- */
8
- function dpsp_get_tools( $type = 'all', $only_slugs = false ) {
9
-
10
- $tools = array();
11
-
12
- // Social share floating sidebar
13
- $tools['share_sidebar'] = array(
14
- 'name' => __( 'Floating Sidebar', 'social-pug' ),
15
- 'type' => 'share_tool',
16
- 'activation_setting' => 'dpsp_location_sidebar[active]',
17
- 'img' => 'assets/src/img/tool-sidebar.png',
18
- 'admin_page' => 'admin.php?page=dpsp-sidebar'
19
- );
20
-
21
- // Social share before and after the content
22
- $tools['share_content'] = array(
23
- 'name' => __( 'Inline Content', 'social-pug' ),
24
- 'type' => 'share_tool',
25
- 'activation_setting' => 'dpsp_location_content[active]',
26
- 'img' => 'assets/src/img/tool-content.png',
27
- 'admin_page' => 'admin.php?page=dpsp-content'
28
- );
29
-
30
- // Return only the tools of a certain type
31
- if( $type != 'all' ) {
32
- foreach( $tools as $tool_slug => $tool ) {
33
- if( $tool['type'] != $type )
34
- unset( $tools[$tool_slug] );
35
- }
36
- }
37
-
38
- // Return only the slugs
39
- if( $only_slugs )
40
- $tools = array_keys( $tools );
41
-
42
- return apply_filters( 'dpsp_get_tools', $tools );
43
-
44
- }
45
-
46
-
47
- /**
48
- * Checks to see if the tool settings is active or not
49
- *
50
- */
51
- function dpsp_is_tool_active( $tool_slug ) {
52
-
53
- $tools = dpsp_get_tools();
54
-
55
- if( empty( $tools[$tool_slug]['activation_setting'] ) )
56
- return false;
57
-
58
- $setting = $tools[$tool_slug]['activation_setting'];
59
-
60
- $option_name = explode( '[', $setting );
61
- $option_name = $option_name[0];
62
-
63
- $settings = get_option( $option_name );
64
-
65
- if( isset( $settings[ str_replace( array( $option_name, '[', ']' ) , '', $setting ) ] ) )
66
- return true;
67
- else
68
- return false;
69
-
70
- }
71
-
72
-
73
- /**
74
- * Returns an array with the positions where the social networks
75
- * can be placed
76
- *
77
- * @return array
78
- *
79
- */
80
- function dpsp_get_network_locations( $only_slugs = true ) {
81
-
82
- $locations = array(
83
- 'sidebar' => __( 'Floating Sidebar', 'social-pug' ),
84
- 'content' => __( 'Content', 'social-pug' )
85
- );
86
-
87
- $locations = apply_filters( 'dpsp_get_network_locations', $locations );
88
-
89
- if( $only_slugs )
90
- $locations = array_keys( $locations );
91
-
92
- return $locations;
93
-
94
- }
95
-
96
-
97
- /**
98
- * Returns the name of a location
99
- *
100
- * @param string $location_slug
101
- *
102
- * @return string
103
- *
104
- */
105
- function dpsp_get_network_location_name( $location_slug ) {
106
-
107
- $locations = dpsp_get_network_locations( false );
108
-
109
- if( isset( $locations[$location_slug] ) )
110
- return $locations[$location_slug];
111
- else
112
- return '';
113
-
114
- }
115
-
116
-
117
- /**
118
- * Checks to see if the location is active or not
119
- *
120
- */
121
- function dpsp_is_location_active( $location_slug ) {
122
-
123
- $settings = dpsp_get_location_settings( $location_slug );
124
-
125
- if( isset( $settings['active'] ) )
126
- return true;
127
- else
128
- return false;
129
-
130
- }
131
-
132
-
133
- /**
134
- * Determines whether the location should be displayed or not
135
- *
136
- * @param string $location_slug
137
- *
138
- * @return bool
139
- *
140
- */
141
- function dpsp_is_location_displayable( $location_slug ) {
142
-
143
- $return = true;
144
-
145
- // Get saved settings for the location
146
- $settings = dpsp_get_location_settings( $location_slug );
147
-
148
- if( empty( $settings ) )
149
- $return = false;
150
-
151
- if( !isset( $settings['active'] ) )
152
- $return = false;
153
-
154
- return apply_filters( 'dpsp_is_location_displayable', $return, $location_slug, $settings );
155
-
156
- }
157
-
158
-
159
- /**
160
- * Get settings for a particular location
161
- * This is a developer friendly function
162
- *
163
- * @param string $location
164
- *
165
- * @return mixed null | array
166
- *
167
- */
168
- function dpsp_get_location_settings( $location = '' ) {
169
-
170
- // Return null if no location is provided
171
- if( empty( $location ) )
172
- return null;
173
-
174
- $location_settings = get_option( 'dpsp_location_' . $location, array() );
175
-
176
- return apply_filters( 'dpsp_get_location_settings', $location_settings, $location );
177
-
178
- }
179
-
180
-
181
- /**
182
- * Function that returns all networks
183
- *
184
- * @return array
185
- *
186
- */
187
- function dpsp_get_networks() {
188
-
189
- $nerworks = array(
190
- 'facebook' => 'Facebook',
191
- 'twitter' => 'Twitter',
192
- 'pinterest' => 'Pinterest',
193
- 'linkedin' => 'LinkedIn',
194
- 'email' => 'Email',
195
- 'print' => 'Print'
196
- );
197
-
198
- return apply_filters( 'dpsp_get_networks', $nerworks );
199
-
200
- }
201
-
202
-
203
- /**
204
- * Function that returns the name of a social network given its slug
205
- *
206
- */
207
- function dpsp_get_network_name( $slug ) {
208
-
209
- $nerworks = dpsp_get_networks();
210
-
211
- if( isset( $nerworks[$slug] ) )
212
- return $nerworks[$slug];
213
- else
214
- return '';
215
- }
216
-
217
-
218
- /**
219
- * Returns all networks that are set in every location panel
220
- *
221
- * @return array;
222
- *
223
- */
224
- function dpsp_get_active_networks() {
225
-
226
- $locations = dpsp_get_network_locations();
227
- $networks = array();
228
-
229
- foreach( $locations as $location ) {
230
-
231
- $location_settings = get_option( 'dpsp_location_' . $location, array() );
232
-
233
- if( isset( $location_settings['networks'] ) && !empty( $location_settings['networks'] ) ) {
234
- foreach( $location_settings['networks'] as $network_slug => $network ) {
235
-
236
- if( !in_array( $network_slug, $networks ) )
237
- $networks[] = $network_slug;
238
-
239
- }
240
- }
241
-
242
- }
243
-
244
- return $networks;
245
-
246
- }
247
-
248
-
249
- /**
250
- * Return an array of registered post types slugs and names
251
- *
252
- * @return array
253
- *
254
- */
255
- function dpsp_get_post_types() {
256
-
257
- // Get default and custom post types
258
- $default_post_types = array( 'post', 'page' );
259
- $custom_post_types = get_post_types( array( 'public' => true, '_builtin' => false ) );
260
- $post_types = array_merge( $default_post_types, $custom_post_types );
261
-
262
- // The array we wish to return
263
- $return_post_types = array();
264
-
265
- foreach( $post_types as $post_type ) {
266
- $post_type_object = get_post_type_object( $post_type );
267
-
268
- $return_post_types[$post_type] = $post_type_object->labels->singular_name;
269
- }
270
-
271
- return apply_filters( 'dpsp_get_post_types', $return_post_types );
272
-
273
- }
274
-
275
-
276
- /**
277
- * Returns the post types that are active for all locations
278
- *
279
- */
280
- function dpsp_get_active_post_types() {
281
-
282
- $locations = dpsp_get_network_locations();
283
- $post_types = array();
284
-
285
- foreach( $locations as $location ) {
286
-
287
- $location_settings = get_option( 'dpsp_location_' . $location, array() );
288
-
289
- if( isset( $location_settings['active'] ) && !empty( $location_settings['post_type_display'] ) )
290
- $post_types = array_merge( $post_types, $location_settings['post_type_display'] );
291
-
292
- }
293
-
294
- $post_types = array_unique( $post_types );
295
-
296
- return $post_types;
297
-
298
- }
299
-
300
-
301
- /**
302
- * Returns the saved option, but replaces the saved social network
303
- * data with simple data to display in the back-end
304
- *
305
- * @param string $option_name
306
- *
307
- */
308
- function dpsp_get_back_end_display_option( $option_name ) {
309
-
310
- $settings = get_option($option_name);
311
- $networks = dpsp_get_networks();
312
-
313
- $settings_networks_count = count($settings['networks']);
314
-
315
- if( $settings_networks_count > 2 ) {
316
-
317
- $current_network = 0;
318
- foreach( $settings['networks'] as $network_slug => $network ) {
319
-
320
- if( $current_network > 2 ) {
321
- unset( $settings['networks'][$network_slug] );
322
- } else {
323
- $settings['networks'][$network_slug] = array( 'label' => $networks[$network_slug] );
324
- }
325
-
326
- $current_network++;
327
- }
328
-
329
- } else {
330
- $settings['networks'] = array(
331
- 'facebook' => array( 'label' => 'Facebook' ),
332
- 'twitter' => array( 'label' => 'Twitter' ),
333
- 'pinterest' => array( 'label' => 'Pinterest' )
334
- );
335
- }
336
-
337
-
338
- //Unset certain options
339
- unset( $settings['display']['show_count'] );
340
-
341
- return $settings;
342
-
343
- }
344
-
345
-
346
- /**
347
- * Returns the share link for a social network given the network slug
348
- *
349
- * @param string $network_slug
350
- * @param string $post_url
351
- * @param string $post_title
352
- *
353
- * return string
354
- *
355
- */
356
- function dpsp_get_network_share_link( $network_slug, $post_url = null, $post_title = null ) {
357
-
358
- if( !isset( $network_slug ) )
359
- return '';
360
-
361
- if( is_null( $post_url ) )
362
- $post_url = rawurlencode( esc_url( dpsp_get_post_url() ) );
363
-
364
- if( is_null( $post_title ) )
365
- $post_title = rawurlencode( dpsp_get_post_title() );
366
-
367
-
368
- switch( $network_slug ) {
369
-
370
- case 'facebook':
371
- return sprintf( 'https://www.facebook.com/sharer/sharer.php?u=%1$s&t=%2$s', $post_url, $post_title );
372
- break;
373
-
374
- case 'twitter':
375
- $settings = get_option( 'dpsp_settings' );
376
-
377
- $via = ( !empty( $settings['twitter_username'] ) && !empty( $settings['tweets_have_username'] ) ) ? '&via=' . $settings['twitter_username'] : '';
378
-
379
- return sprintf( 'https://twitter.com/intent/tweet?text=%2$s&url=%1$s%3$s', $post_url, $post_title, $via );
380
- break;
381
-
382
- case 'google-plus':
383
- return sprintf( 'https://plus.google.com/share?url=%1$s', $post_url );
384
- break;
385
-
386
- case 'pinterest':
387
- return '#';
388
- break;
389
-
390
- case 'linkedin':
391
- return sprintf( 'https://www.linkedin.com/shareArticle?url=%1$s&title=%2$s&mini=true', $post_url, $post_title );
392
- break;
393
-
394
- case 'email':
395
- return sprintf( 'mailto:?subject=%1$s&amp;body=%2$s', $post_title, $post_url );
396
- break;
397
-
398
- case 'print':
399
- return '#';
400
- break;
401
-
402
- default:
403
- return '';
404
- break;
405
- }
406
-
407
- }
408
-
409
-
410
- /*
411
- * Function that adds the initial options and settings
412
- *
413
- */
414
- function dpsp_default_settings() {
415
-
416
- /*
417
- * Add default settings for each share buttons location
418
- */
419
- $locations = dpsp_get_network_locations();
420
-
421
- foreach( $locations as $location ) {
422
-
423
- $location_settings = get_option( 'dpsp_location_' . $location, array() );
424
-
425
- if( !empty( $location_settings ) )
426
- continue;
427
-
428
- // General settings for all locations
429
- $location_settings = array(
430
- 'active' => 1,
431
- 'networks' => array(
432
- 'facebook' => array( 'label' => 'Facebook' ),
433
- 'twitter' => array( 'label' => 'Twitter' ),
434
- 'pinterest' => array( 'label' => 'Pinterest')
435
- ),
436
- 'button_style' => 1,
437
- 'display' => array(
438
- 'shape' => 'rounded',
439
- 'icon_animation' => 'yes',
440
- 'show_count_total' => 'yes'
441
- ),
442
- 'post_type_display' => array( 'post' )
443
- );
444
-
445
- // Individual settings per location
446
- switch( $location ) {
447
-
448
- case 'sidebar':
449
- $location_settings['display']['position'] = 'left';
450
- break;
451
-
452
- case 'content':
453
- $location_settings['networks'] = array(
454
- 'facebook' => array( 'label' => 'Share' ),
455
- 'twitter' => array( 'label' => 'Tweet' ),
456
- 'pinterest' => array( 'label' => 'Pin')
457
- );
458
- $location_settings['display']['position'] = 'top';
459
- $location_settings['display']['column_count'] = '3';
460
- $location_settings['display']['show_labels'] = 'yes';
461
- $location_settings['display']['spacing'] = 'yes';
462
- $location_settings['display']['total_count_position'] = 'after';
463
- break;
464
-
465
- }
466
-
467
- // Update option with values
468
- update_option( 'dpsp_location_' . $location, $location_settings );
469
-
470
- }
471
-
472
- }
473
-
474
-
475
- /**
476
- * Because certain widgets / plugins reset the global $post variable
477
- * we are going to cache it when WP has just loaded, so that we have the
478
- * original post available at all times
479
- *
480
- */
481
- function dpsp_cache_post_object() {
482
-
483
- global $dpsp_cache_wp_post;
484
-
485
- $dpsp_cache_wp_post = null;
486
-
487
- if( is_singular() && ! is_front_page() && ! is_home() ) {
488
-
489
- global $post;
490
- $dpsp_cache_wp_post = $post;
491
-
492
- }
493
-
494
- }
495
- add_action( 'wp', 'dpsp_cache_post_object' );
496
-
497
-
498
- /**
499
- * Returns the current post object
500
- *
501
- * @return mixed - WP_Post | null
502
- *
503
- */
504
- function dpsp_get_current_post() {
505
-
506
- global $dpsp_cache_wp_post;
507
-
508
- if( ! is_null( $dpsp_cache_wp_post ) )
509
- return $dpsp_cache_wp_post;
510
-
511
- global $post;
512
-
513
- if( ! is_null( $post ) )
514
- return $post;
515
-
516
- return null;
517
-
518
- }
519
-
520
-
521
- /*
522
- * Returns the url of the current post
523
- *
524
- * @return string
525
- *
526
- */
527
- function dpsp_get_post_url() {
528
-
529
- global $post;
530
-
531
- $post_url = get_permalink( $post );
532
-
533
- return apply_filters( 'dpsp_get_post_url', $post_url, $post->ID );
534
-
535
- }
536
-
537
-
538
- /*
539
- * Returns the title of the current post
540
- *
541
- * @return string
542
- *
543
- */
544
- function dpsp_get_post_title() {
545
-
546
- global $post;
547
-
548
- $post_title = $post->post_title;
549
-
550
- return apply_filters( 'dpsp_get_post_title', $post_title, $post->ID );
551
-
552
- }
553
-
554
-
555
- /*
556
- * Returns the a description for the current post
557
- *
558
- * @return string
559
- *
560
- */
561
- function dpsp_get_post_description() {
562
-
563
- global $post;
564
-
565
- if( !empty( $post->post_excerpt ) )
566
-
567
- $post_description = $post->post_excerpt;
568
-
569
- elseif( !empty( $post->post_content ) ) {
570
-
571
- $post_description = strip_shortcodes( $post->post_content );
572
- $post_description = wp_trim_words( $post_description, apply_filters( 'dpsp_post_description_length', 15 ), '' );
573
-
574
- } else
575
- $post_description = '';
576
-
577
-
578
- return apply_filters( 'dpsp_get_post_description', $post_description, $post->ID );
579
-
580
- }
581
-
582
-
583
- /*
584
- * Returns the featured image src for the current post
585
- *
586
- * @return string
587
- *
588
- */
589
- function dpsp_get_post_image_url() {
590
-
591
- global $post;
592
-
593
- $post_thumbnail_id = get_post_thumbnail_id( $post->ID );
594
-
595
- $post_thumbnail_data = wp_get_attachment_image_src( $post_thumbnail_id, 'large' );
596
-
597
- return apply_filters( 'dpsp_get_post_image_url', $post_thumbnail_data[0], $post->ID );
598
-
599
- }
600
-
601
-
602
- /**
603
- * Removes the script tags from the values of an array recursivelly
604
- *
605
- * @param array $array
606
- *
607
- * @return array
608
- *
609
- */
610
- function dpsp_array_strip_script_tags( $array = array() ) {
611
-
612
- if( empty( $array ) || ! is_array( $array ) )
613
- return array();
614
-
615
- foreach( $array as $key => $value ) {
616
-
617
- if( is_array( $value ) )
618
- $array[$key] = dpsp_array_strip_script_tags( $value );
619
-
620
- else
621
- $array[$key] = preg_replace( '@<(script)[^>]*?>.*?</\\1>@si', '', $value );
622
-
623
- }
624
-
625
- return $array;
626
-
627
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Returns an array with the positions where the social networks
5
+ * can be placed
6
+ *
7
+ * @return array
8
+ *
9
+ */
10
+ function dpsp_get_network_locations( $for = 'all', $only_slugs = true ) {
11
+
12
+ $locations_share = [
13
+ 'sidebar' => __( 'Floating Sidebar', 'social-pug' ),
14
+ 'content' => __( 'Content', 'social-pug' ),
15
+ 'sticky_bar' => __( 'Sticky Bar', 'social-pug' ),
16
+ 'pop_up' => __( 'Pop-Up', 'social-pug' ),
17
+ ];
18
+
19
+ $locations_follow = [
20
+ 'follow_widget' => __( 'Follow Widget', 'social-pug' ),
21
+ ];
22
+
23
+ switch ( $for ) {
24
+ case 'share':
25
+ $locations = $locations_share;
26
+ break;
27
+ case 'follow':
28
+ $locations = $locations_follow;
29
+ break;
30
+ case 'all':
31
+ $locations = array_merge( $locations_share, $locations_follow );
32
+ break;
33
+
34
+ }
35
+
36
+ $locations = apply_filters( 'dpsp_get_network_locations', $locations, $for );
37
+
38
+ if ( $only_slugs ) {
39
+ $locations = array_keys( $locations );
40
+ }
41
+
42
+ return $locations;
43
+
44
+ }
45
+
46
+
47
+ /**
48
+ * Returns the name of a location
49
+ *
50
+ * @param string $location_slug
51
+ *
52
+ * @return string
53
+ *
54
+ */
55
+ function dpsp_get_network_location_name( $location_slug ) {
56
+
57
+ $locations = dpsp_get_network_locations( 'all', false );
58
+
59
+ if ( isset( $locations[ $location_slug ] ) ) {
60
+ return $locations[ $location_slug ];
61
+ } else {
62
+ return '';
63
+ }
64
+
65
+ }
66
+
67
+ /*
68
+ * Checks to see if the location is active or not
69
+ *
70
+ */
71
+ function dpsp_is_location_active( $location_slug ) {
72
+
73
+ $settings = dpsp_get_location_settings( $location_slug );
74
+
75
+ if ( isset( $settings['active'] ) ) {
76
+ return true;
77
+ } else {
78
+ return false;
79
+ }
80
+
81
+ }
82
+
83
+
84
+ /**
85
+ * Determines whether the location should be displayed or not
86
+ *
87
+ * @param string $location_slug
88
+ *
89
+ * @return bool
90
+ *
91
+ */
92
+ function dpsp_is_location_displayable( $location_slug ) {
93
+
94
+ $return = true;
95
+
96
+ // Get saved settings for the location
97
+ $settings = dpsp_get_location_settings( $location_slug );
98
+
99
+ if ( empty( $settings ) ) {
100
+ $return = false;
101
+ }
102
+
103
+ if ( ! isset( $settings['post_type_display'] ) || ( isset( $settings['post_type_display'] ) && ! is_singular( $settings['post_type_display'] ) ) ) {
104
+ $return = false;
105
+ }
106
+
107
+ return apply_filters( 'dpsp_is_location_displayable', $return, $location_slug, $settings );
108
+
109
+ }
110
+
111
+
112
+ /**
113
+ * Get settings for a particular location
114
+ * This is a developer friendly function
115
+ *
116
+ * @param string $location
117
+ *
118
+ * @return mixed null | array
119
+ *
120
+ */
121
+ function dpsp_get_location_settings( $location = '' ) {
122
+
123
+ // Return null if no location is provided
124
+ if ( empty( $location ) ) {
125
+ return null;
126
+ }
127
+
128
+ $location_settings = Mediavine\Grow\Settings::get_setting( 'dpsp_location_' . $location, [] );
129
+
130
+ return apply_filters( 'dpsp_get_location_settings', $location_settings, $location );
131
+
132
+ }
133
+
134
+
135
+ /**
136
+ * Function that returns all networks
137
+ *
138
+ * @param string $for - buttons for share(ing) or follow(ing)
139
+ *
140
+ * @return array
141
+ *
142
+ */
143
+ function dpsp_get_networks( $for = 'share' ) {
144
+
145
+ $networks = [];
146
+
147
+ $networks_share = [
148
+ 'facebook' => 'Facebook',
149
+ 'twitter' => 'Twitter',
150
+ 'pinterest' => 'Pinterest',
151
+ 'linkedin' => 'LinkedIn',
152
+ ];
153
+ $networks_share = apply_filters( 'dpsp_share_networks', $networks_share );
154
+ $networks_share = array_merge( $networks_share, [
155
+ 'email' => 'Email',
156
+ 'print' => 'Print',
157
+ ]);
158
+
159
+ $networks_follow = [
160
+ 'facebook' => 'Facebook',
161
+ 'twitter' => 'Twitter',
162
+ 'pinterest' => 'Pinterest',
163
+ 'linkedin' => 'LinkedIn',
164
+ ];
165
+ $networks_follow = apply_filters( 'dpsp_follow_networks', $networks_follow );
166
+
167
+ switch ( $for ) {
168
+ case 'share':
169
+ $networks = $networks_share;
170
+ break;
171
+
172
+ case 'follow':
173
+ $networks = $networks_follow;
174
+ break;
175
+
176
+ case 'all':
177
+ $networks = array_merge( $networks_share, $networks_follow );
178
+ break;
179
+
180
+ default:
181
+ break;
182
+ }
183
+
184
+ /**
185
+ * Filter the networks before returning them
186
+ *
187
+ * @param array $networks
188
+ * @param string $for
189
+ *
190
+ */
191
+ return apply_filters( 'dpsp_get_networks', $networks, $for );
192
+
193
+ }
194
+
195
+
196
+ /*
197
+ * Function that returns the name of a social network given its slug
198
+ *
199
+ */
200
+ function dpsp_get_network_name( $slug ) {
201
+
202
+ $nerworks = dpsp_get_networks( 'all' );
203
+
204
+ if ( isset( $nerworks[ $slug ] ) ) {
205
+ return $nerworks[ $slug ];
206
+ } else {
207
+ return '';
208
+ }
209
+ }
210
+
211
+
212
+ /**
213
+ * Returns all networks that are set in every location panel
214
+ *
215
+ * @return array;
216
+ *
217
+ */
218
+ function dpsp_get_active_networks( $for = 'share' ) {
219
+
220
+ $locations = dpsp_get_network_locations( $for );
221
+ $networks = [];
222
+
223
+ foreach ( $locations as $location ) {
224
+
225
+ $location_settings = dpsp_get_location_settings( $location );
226
+
227
+ if ( isset( $location_settings['networks'] ) && ! empty( $location_settings['networks'] ) ) {
228
+ foreach ( $location_settings['networks'] as $network_slug => $network ) {
229
+
230
+ if ( ! in_array( $network_slug, $networks ) ) {
231
+ $networks[] = $network_slug;
232
+ }
233
+ }
234
+ }
235
+ }
236
+
237
+ return apply_filters( 'dpsp_get_active_networks', $networks, $for );
238
+
239
+ }
240
+
241
+
242
+ /**
243
+ * Return an array of registered post types slugs and names
244
+ *
245
+ * @return array
246
+ *
247
+ */
248
+ function dpsp_get_post_types() {
249
+
250
+ // Get default and custom post types
251
+ $default_post_types = [ 'post', 'page' ];
252
+ $custom_post_types = get_post_types(
253
+ [
254
+ 'public' => true,
255
+ '_builtin' => false,
256
+ ]
257
+ );
258
+ $post_types = array_merge( $default_post_types, $custom_post_types );
259
+
260
+ // The array we wish to return
261
+ $return_post_types = [];
262
+
263
+ foreach ( $post_types as $post_type ) {
264
+ $post_type_object = get_post_type_object( $post_type );
265
+
266
+ $return_post_types[ $post_type ] = $post_type_object->labels->singular_name;
267
+ }
268
+
269
+ return apply_filters( 'dpsp_get_post_types', $return_post_types );
270
+
271
+ }
272
+
273
+
274
+ /**
275
+ * Returns the post types that are active for all locations
276
+ *
277
+ */
278
+ function dpsp_get_active_post_types() {
279
+
280
+ $locations = dpsp_get_network_locations();
281
+ $post_types = [];
282
+
283
+ foreach ( $locations as $location ) {
284
+
285
+ $location_settings = Mediavine\Grow\Settings::get_setting( 'dpsp_location_' . $location, [] );
286
+
287
+ if ( isset( $location_settings['active'] ) && ! empty( $location_settings['post_type_display'] ) ) {
288
+ $post_types = array_merge( $post_types, $location_settings['post_type_display'] );
289
+ }
290
+ }
291
+
292
+ $post_types = array_unique( $post_types );
293
+
294
+ return $post_types;
295
+
296
+ }
297
+
298
+
299
+ /**
300
+ * Returns the saved option, but replaces the saved social network
301
+ * data with simple data to display in the back-end
302
+ *
303
+ * @param string $option_name
304
+ *
305
+ * @return array $settings
306
+ */
307
+ function dpsp_get_back_end_display_option( $option_name ) {
308
+ $settings = Mediavine\Grow\Settings::get_setting( $option_name );
309
+ $networks = dpsp_get_networks( 'all' );
310
+
311
+ $settings_networks_count = ( ! empty( $settings['networks'] ) ? count( $settings['networks'] ) : 0 );
312
+
313
+ if ( $settings_networks_count > 2 ) {
314
+
315
+ $current_network = 0;
316
+ foreach ( $settings['networks'] as $network_slug => $network ) {
317
+
318
+ if ( $current_network > 2 ) {
319
+ unset( $settings['networks'][ $network_slug ] );
320
+ } else {
321
+ $settings['networks'][ $network_slug ] = [ 'label' => $networks[ $network_slug ] ];
322
+ }
323
+
324
+ $current_network ++;
325
+ }
326
+ } else {
327
+ $settings['networks'] = [
328
+ 'facebook' => [ 'label' => 'Facebook' ],
329
+ 'twitter' => [ 'label' => 'Twitter' ],
330
+ 'pinterest' => [ 'label' => 'Pinterest' ],
331
+ ];
332
+ }
333
+
334
+ //Unset certain options
335
+ unset( $settings['display']['show_count'] );
336
+
337
+ return $settings;
338
+
339
+ }
340
+
341
+
342
+ /**
343
+ * Returns the share link for a social network given the network slug
344
+ *
345
+ * @param string $network_slug
346
+ * @param string $post_url
347
+ * @param string $post_title
348
+ * @param string $post_description
349
+ * @param string $post_image
350
+ *
351
+ * @return string
352
+ *
353
+ */
354
+ function dpsp_get_network_share_link( $network_slug = '', $post_url = null, $post_title = null, $post_description = null, $post_image = null ) {
355
+
356
+ if ( empty( $network_slug ) ) {
357
+ return '';
358
+ }
359
+
360
+ if ( is_null( $post_url ) ) {
361
+ $post_obj = dpsp_get_current_post();
362
+ $post_url = dpsp_get_post_url( $post_obj->ID );
363
+ }
364
+
365
+ if ( is_null( $post_title ) ) {
366
+ $post_obj = dpsp_get_current_post();
367
+ $post_title = dpsp_get_post_title( $post_obj->ID );
368
+ }
369
+
370
+ if ( is_null( $post_description ) ) {
371
+ $post_obj = dpsp_get_current_post();
372
+ $post_description = dpsp_get_post_description( $post_obj->ID );
373
+ }
374
+
375
+ // Late filtering
376
+ $post_url = rawurlencode( apply_filters( 'dpsp_get_network_share_link_post_url', $post_url, $network_slug ) );
377
+ $post_title = rawurlencode( apply_filters( 'dpsp_get_network_share_link_post_title', $post_title, $network_slug ) );
378
+ $post_description = rawurlencode( apply_filters( 'dpsp_get_network_share_link_post_description', $post_description, $network_slug ) );
379
+ $post_image = apply_filters( 'dpsp_get_network_share_link_post_image', $post_image, $network_slug );
380
+
381
+ switch ( $network_slug ) {
382
+
383
+ case 'facebook':
384
+ $share_link = sprintf( 'https://www.facebook.com/sharer/sharer.php?u=%1$s&t=%2$s', $post_url, $post_title );
385
+ break;
386
+
387
+ case 'twitter':
388
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
389
+
390
+ $via = ( ! empty( $settings['twitter_username'] ) && ! empty( $settings['tweets_have_username'] ) ) ? '&via=' . $settings['twitter_username'] : '';
391
+
392
+ $share_link = sprintf( 'https://twitter.com/intent/tweet?text=%2$s&url=%1$s%3$s', $post_url, $post_title, $via );
393
+ break;
394
+
395
+ case 'pinterest':
396
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_pinterest_share_images_setting', [] );
397
+
398
+ $share_behavior = ( ! empty( $settings['share_image_pinterest_button_share_behavior'] ) ? $settings['share_image_pinterest_button_share_behavior'] : 'all_images' );
399
+
400
+ if ( ! is_null( $post_image ) && 'post_image' == $share_behavior ) {
401
+ $share_link = sprintf( 'https://pinterest.com/pin/create/button/?url=%1$s&media=%2$s&description=%3$s', $post_url, $post_image, $post_title );
402
+ } else {
403
+ $share_link = '#';
404
+ }
405
+ break;
406
+
407
+ case 'linkedin':
408
+ $share_link = sprintf( 'https://www.linkedin.com/shareArticle?url=%1$s&title=%2$s&summary=%3$s&mini=true', $post_url, $post_title, $post_description );
409
+ break;
410
+
411
+ case 'email':
412
+ $share_link = sprintf( 'mailto:?subject=%1$s&amp;body=%2$s', $post_title, $post_url );
413
+ break;
414
+
415
+ case 'print':
416
+ $share_link = '#';
417
+ break;
418
+
419
+ default:
420
+ if ( function_exists('dpsp_get_pro_network_share_link' ) ) {
421
+ $share_link = dpsp_get_pro_network_share_link( $network_slug, $post_url, $post_title, $post_image );
422
+ } else {
423
+ $share_link = '';
424
+ }
425
+ break;
426
+ }
427
+
428
+ return apply_filters( 'dpsp_get_network_share_link', $share_link, $network_slug );
429
+
430
+ }
431
+
432
+
433
+ /**
434
+ * Returns the network follow link
435
+ *
436
+ * @param string $network_slug
437
+ *
438
+ * @return string
439
+ *
440
+ */
441
+ function dpsp_get_network_follow_link( $network_slug ) {
442
+
443
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
444
+
445
+ // We need a network username or url
446
+ if ( empty( $settings[ $network_slug . '_username' ] ) ) {
447
+ return;
448
+ }
449
+
450
+ $network_handle = $settings[ $network_slug . '_username' ];
451
+
452
+ // Default follow link is full link
453
+ $follow_link = $network_handle;
454
+
455
+ // If it is a network username
456
+ if ( strpos( $network_handle, 'http' ) === false ) {
457
+
458
+ switch ( $network_slug ) {
459
+
460
+ case 'facebook':
461
+ $follow_link = sprintf( 'https://www.facebook.com/%1$s', $network_handle );
462
+ break;
463
+
464
+ case 'twitter':
465
+ $follow_link = sprintf( 'https://twitter.com/%1$s', $network_handle );
466
+ break;
467
+
468
+ case 'pinterest':
469
+ $follow_link = sprintf( 'https://pinterest.com/%1$s', $network_handle );
470
+ break;
471
+
472
+ case 'linkedin':
473
+ $follow_link = sprintf( 'https://www.linkedin.com/in/%1$s', $network_handle );
474
+ break;
475
+
476
+ default:
477
+ if ( function_exists( 'dpsp_get_pro_network_follow_link' ) ) {
478
+ $follow_link = dpsp_get_pro_network_follow_link( $network_slug, $network_handle );
479
+ } else {
480
+ $follow_link = '';
481
+ }
482
+ break;
483
+ }
484
+ }
485
+
486
+ return apply_filters( 'dpsp_get_network_follow_link', $follow_link, $network_slug );
487
+ }
488
+
489
+
490
+ /**
491
+ * Return Facebook, Pinterest and Pinterest networks if no active networks are present
492
+ * on first ever activation of the plugin in order for the first ever cron job to pull
493
+ * the share counts for these three social networks.
494
+ *
495
+ * Without this, the cron job will be executed later and at first no share counts will be
496
+ * available for the last posts.
497
+ *
498
+ * @param array $networks
499
+ * @param string $for
500
+ *
501
+ * @return array
502
+ *
503
+ */
504
+ function dpsp_first_activation_active_networks( $networks = [], $for = 'share' ) {
505
+
506
+ if ( ! empty( $networks ) ) {
507
+ return $networks;
508
+ }
509
+
510
+ if ( 'share' != $for ) {
511
+ return $networks;
512
+ }
513
+
514
+ $first_activation = Mediavine\Grow\Settings::get_setting( 'dpsp_first_activation', '' );
515
+
516
+ if ( ! empty( $first_activation ) ) {
517
+ return $networks;
518
+ }
519
+
520
+ $networks = [ 'facebook', 'pinterest', 'pinterest' ];
521
+
522
+ return $networks;
523
+
524
+ }
525
+
526
+
527
+
528
+ /**
529
+ * Function that adds the initial options and settings
530
+ *
531
+ */
532
+ function dpsp_default_settings() {
533
+
534
+ /*
535
+ * Add general settings
536
+ */
537
+ $dpsp_settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings', [] );
538
+
539
+ // Click to Tweet
540
+ if ( ! isset( $dpsp_settings['shortening_service'] ) ) {
541
+ $dpsp_settings['shortening_service'] = 'bitly';
542
+ }
543
+
544
+ if ( ! isset( $dpsp_settings['ctt_style'] ) ) {
545
+ $dpsp_settings['ctt_style'] = 1;
546
+ }
547
+
548
+ if ( ! isset( $dpsp_settings['ctt_link_text'] ) ) {
549
+ $dpsp_settings['ctt_link_text'] = 'Click to Tweet';
550
+ }
551
+
552
+ // Google Analytics UTM tracking
553
+ if ( ! isset( $dpsp_settings['utm_source'] ) ) {
554
+ $dpsp_settings['utm_source'] = '{{network_name}}';
555
+ }
556
+
557
+ if ( ! isset( $dpsp_settings['utm_medium'] ) ) {
558
+ $dpsp_settings['utm_medium'] = 'social';
559
+ }
560
+
561
+ if ( ! isset( $dpsp_settings['utm_campaign'] ) ) {
562
+ $dpsp_settings['utm_campaign'] = 'grow-social-pro';
563
+ }
564
+
565
+ // Update settings
566
+ update_option( 'dpsp_settings', $dpsp_settings );
567
+
568
+ /*
569
+ * Add default settings for each share buttons location
570
+ */
571
+ $locations = dpsp_get_network_locations();
572
+
573
+ foreach ( $locations as $location ) {
574
+
575
+ $location_settings = Mediavine\Grow\Settings::get_setting( 'dpsp_location_' . $location, [] );
576
+
577
+ if ( ! empty( $location_settings ) ) {
578
+ continue;
579
+ }
580
+
581
+ // General settings for all locations
582
+ $location_settings = [
583
+ 'networks' => [],
584
+ 'button_style' => 1,
585
+ 'display' => [
586
+ 'shape' => 'rectangular',
587
+ 'size' => 'medium',
588
+ ],
589
+ 'post_type_display' => [
590
+ 'post',
591
+ ],
592
+ ];
593
+
594
+ // Individual settings per location
595
+ switch ( $location ) {
596
+
597
+ case 'sidebar':
598
+ $location_settings['display']['position'] = 'left';
599
+ $location_settings['display']['icon_animation'] = 'yes';
600
+ break;
601
+
602
+ case 'content':
603
+ $location_settings['display']['position'] = 'top';
604
+ $location_settings['display']['column_count'] = 'auto';
605
+ $location_settings['display']['icon_animation'] = 'yes';
606
+ $location_settings['display']['show_labels'] = 'yes';
607
+ break;
608
+
609
+ case 'sticky_bar':
610
+ $location_settings['display']['screen_size'] = '720';
611
+ $location_settings['display']['column_count'] = '3';
612
+ $location_settings['display']['icon_animation'] = 'yes';
613
+ $location_settings['display']['show_on_device'] = 'mobile';
614
+ $location_settings['display']['position_desktop'] = 'bottom';
615
+ $location_settings['display']['position_mobile'] = 'bottom';
616
+ break;
617
+
618
+ case 'pop_up':
619
+ $location_settings['display']['icon_animation'] = 'yes';
620
+ $location_settings['display']['show_labels'] = 'yes';
621
+ $location_settings['display']['title'] = __( 'Sharing is Caring', 'social-pug' );
622
+ $location_settings['display']['message'] = __( 'Help spread the word. You\'re awesome for doing it!', 'social-pug' );
623
+ break;
624
+
625
+ case 'follow_widget':
626
+ $location_settings['display']['show_labels'] = 'yes';
627
+ $location_settings['display']['show_mobile'] = 'yes';
628
+ break;
629
+
630
+ }
631
+
632
+ // Update option with values
633
+ update_option( 'dpsp_location_' . $location, $location_settings );
634
+
635
+ }
636
+
637
+ }
638
+
639
+
640
+ /**
641
+ * Connects to DevPups to return the status of the serial key
642
+ *
643
+ */
644
+ function dpsp_get_serial_key_status( $serial = '' ) {
645
+ // @TODO Determine if this function is still needed and delete if not
646
+ // Get serial from settings if the serial is not passed
647
+ if ( empty( $serial ) ) {
648
+ $dpsp_settings = Mediavine\Grow\Settings::get_setting( 'dpsp_settings' );
649
+ $serial = ( isset( $dpsp_settings['product_serial'] ) ? $dpsp_settings['product_serial'] : '' );
650
+ }
651
+
652
+ if ( empty( $serial ) ) {
653
+ return null;
654
+ }
655
+
656
+ // Make request
657
+ $request = wp_remote_get(
658
+ add_query_arg(
659
+ [
660
+ 'serial' => $serial,
661
+ 'action' => 'check_serial',
662
+ ],
663
+ 'http://updates.devpups.com'
664
+ ),
665
+ [ 'timeout' => 30 ]
666
+ );
667
+
668
+ if ( is_wp_error( $request ) ) {
669
+ $request = wp_remote_get(
670
+ add_query_arg(
671
+ [
672
+ 'serial' => $serial,
673
+ 'action' => 'check_serial',
674
+ ],
675
+ 'http://updates.devpups.com'
676
+ ),
677
+ [
678
+ 'timeout' => 30,
679
+ 'sslverify' => false,
680
+ ]
681
+ );
682
+ }
683
+
684
+ if ( ! is_wp_error( $request ) && isset( $request['response']['code'] ) && $request['response']['code'] == 200 ) {
685
+ $serial_status = trim( $request['body'] );
686
+
687
+ return $serial_status;
688
+ }
689
+
690
+ return null;
691
+
692
+ }
693
+
694
+
695
+ /**
696
+ * Determines whether to display the buttons for a location by checking if
697
+ * the post has overwrite display option selected
698
+ *
699
+ */
700
+ function dpsp_post_location_overwrite_option( $return, $location_slug, $settings ) {
701
+
702
+ $post_obj = dpsp_get_current_post();
703
+
704
+ if ( ! $post_obj ) {
705
+ return $return;
706
+ }
707
+
708
+ // Pull share options meta data
709
+ $share_options = dpsp_maybe_unserialize( get_post_meta( $post_obj->ID, 'dpsp_share_options', true ) );
710
+
711
+ if ( ! empty( $share_options['locations_overwrite'] ) && is_array( $share_options['locations_overwrite'] ) && in_array( $location_slug, $share_options['locations_overwrite'] ) ) {
712
+ return false;
713
+ }
714
+
715
+ if ( ! empty( $share_options['locations_overwrite_show'] ) && is_array( $share_options['locations_overwrite_show'] ) && in_array( $location_slug, $share_options['locations_overwrite_show'] ) ) {
716
+ return true;
717
+ }
718
+
719
+ return $return;
720
+
721
+ }
722
+
723
+ /*
724
+ * Darkens a given color
725
+ *
726
+ */
727
+ function dpsp_darken_color( $rgb, $darker ) {
728
+
729
+ $hash = ( strpos( $rgb, '#' ) !== false ) ? '#' : '';
730
+ $rgb = ( strlen( $rgb ) == 7 ) ? str_replace( '#', '', $rgb ) : ( ( strlen( $rgb ) == 6 ) ? $rgb : false );
731
+ if ( strlen( $rgb ) != 6 ) {
732
+ return $hash . '000000';
733
+ }
734
+ $darker = ( $darker > 1 ) ? $darker : 1;
735
+
736
+ list( $R16, $G16, $B16 ) = str_split( $rgb, 2 );
737
+
738
+ $R = sprintf( '%02X', floor( hexdec( $R16 ) / $darker ) );
739
+ $G = sprintf( '%02X', floor( hexdec( $G16 ) / $darker ) );
740
+ $B = sprintf( '%02X', floor( hexdec( $B16 ) / $darker ) );
741
+
742
+ return $hash . $R . $G . $B;
743
+ }
744
+
745
+
746
+ /**
747
+ * Removes the script tags from the values of an array recursivelly
748
+ *
749
+ * @param array $array
750
+ *
751
+ * @return array
752
+ *
753
+ */
754
+ function dpsp_array_strip_script_tags( $array = [] ) {
755
+
756
+ if ( empty( $array ) || ! is_array( $array ) ) {
757
+ return [];
758
+ }
759
+
760
+ foreach ( $array as $key => $value ) {
761
+
762
+ if ( is_array( $value ) ) {
763
+ $array[ $key ] = dpsp_array_strip_script_tags( $value );
764
+ } else {
765
+ $array[ $key ] = preg_replace( '@<(script)[^>]*?>.*?</\\1>@si', '', $value );
766
+ }
767
+ }
768
+
769
+ return $array;
770
+
771
+ }
772
+
773
+
774
+ /**
775
+ * Wrapper to WP's "attachment_url_to_postid" function, which also handles URLs for image sizes
776
+ *
777
+ * @param string $url
778
+ *
779
+ * @return int
780
+ *
781
+ */
782
+ function dpsp_attachment_url_to_postid( $url ) {
783
+
784
+ /**
785
+ * Try to get post ID with given URL
786
+ *
787
+ */
788
+ $post_id = attachment_url_to_postid( $url );
789
+
790
+ /**
791
+ * Try to get post ID with URL image sizes stripped down
792
+ *
793
+ */
794
+ if ( empty( $post_id ) ) {
795
+
796
+ $dir = wp_upload_dir();
797
+ $path = $url;
798
+
799
+ if ( 0 === strpos( $path, $dir['baseurl'] . '/' ) ) {
800
+ $path = substr( $path, strlen( $dir['baseurl'] . '/' ) );
801
+ }
802
+
803
+ if ( preg_match( '/^(.*)(\-\d*x\d*)(\.\w{1,})/i', $path, $matches ) ) {
804
+ $url = $dir['baseurl'] . '/' . $matches[1] . $matches[3];
805
+ $post_id = attachment_url_to_postid( $url );
806
+ }
807
+ }
808
+
809
+ /**
810
+ * Try to get post ID with scaled image URL
811
+ *
812
+ */
813
+ if ( empty( $post_id ) ) {
814
+
815
+ $extension_pos = strrpos( $url, '.' );
816
+
817
+ $url = substr( $url, 0, $extension_pos ) . '-scaled' . substr( $url, $extension_pos );
818
+ $post_id = attachment_url_to_postid( $url );
819
+
820
+ }
821
+
822
+ return absint( $post_id );
823
+
824
+ }
825
+
826
+
827
+ /**
828
+ * Returns the SVG data for the provided icon slug
829
+ *
830
+ * @param string $icon_slug
831
+ *
832
+ * @return array
833
+ *
834
+ */
835
+ function dpsp_get_svg_icon_data( $icon_slug ) {
836
+
837
+ $svg_icons = [
838
+ 'facebook' => [
839
+ 'path' => 'M17.12 0.224v4.704h-2.784q-1.536 0-2.080 0.64t-0.544 1.92v3.392h5.248l-0.704 5.28h-4.544v13.568h-5.472v-13.568h-4.544v-5.28h4.544v-3.904q0-3.328 1.856-5.152t4.96-1.824q2.624 0 4.064 0.224z',
840
+ 'width' => 18,
841
+ 'height' => 32,
842
+ ],
843
+ 'twitter' => [
844
+ 'path' => 'M28.928 7.296q-1.184 1.728-2.88 2.976 0 0.256 0 0.736 0 2.336-0.672 4.64t-2.048 4.448-3.296 3.744-4.608 2.624-5.792 0.96q-4.832 0-8.832-2.592 0.608 0.064 1.376 0.064 4.032 0 7.168-2.464-1.888-0.032-3.36-1.152t-2.048-2.848q0.608 0.096 1.088 0.096 0.768 0 1.536-0.192-2.016-0.416-3.328-1.984t-1.312-3.68v-0.064q1.216 0.672 2.624 0.736-1.184-0.8-1.888-2.048t-0.704-2.752q0-1.568 0.8-2.912 2.176 2.656 5.248 4.256t6.656 1.76q-0.16-0.672-0.16-1.312 0-2.4 1.696-4.064t4.064-1.696q2.528 0 4.224 1.824 1.952-0.384 3.68-1.408-0.672 2.048-2.56 3.2 1.664-0.192 3.328-0.896z',
845
+ 'width' => 30,
846
+ 'height' => 32,
847
+ ],
848
+ 'pinterest' => [
849
+ 'path' => 'M0 10.656q0-1.92 0.672-3.616t1.856-2.976 2.72-2.208 3.296-1.408 3.616-0.448q2.816 0 5.248 1.184t3.936 3.456 1.504 5.12q0 1.728-0.32 3.36t-1.088 3.168-1.792 2.656-2.56 1.856-3.392 0.672q-1.216 0-2.4-0.576t-1.728-1.568q-0.16 0.704-0.48 2.016t-0.448 1.696-0.352 1.28-0.48 1.248-0.544 1.12-0.832 1.408-1.12 1.536l-0.224 0.096-0.16-0.192q-0.288-2.816-0.288-3.36 0-1.632 0.384-3.68t1.184-5.152 0.928-3.616q-0.576-1.152-0.576-3.008 0-1.504 0.928-2.784t2.368-1.312q1.088 0 1.696 0.736t0.608 1.824q0 1.184-0.768 3.392t-0.8 3.36q0 1.12 0.8 1.856t1.952 0.736q0.992 0 1.824-0.448t1.408-1.216 0.992-1.696 0.672-1.952 0.352-1.984 0.128-1.792q0-3.072-1.952-4.8t-5.12-1.728q-3.552 0-5.952 2.304t-2.4 5.856q0 0.8 0.224 1.536t0.48 1.152 0.48 0.832 0.224 0.544q0 0.48-0.256 1.28t-0.672 0.8q-0.032 0-0.288-0.032-0.928-0.288-1.632-0.992t-1.088-1.696-0.576-1.92-0.192-1.92z',
850
+ 'width' => 23,
851
+ 'height' => 32,
852
+ ],
853
+ 'linkedin' => [
854
+ 'path' => 'M6.24 11.168v17.696h-5.888v-17.696h5.888zM6.624 5.696q0 1.312-0.928 2.176t-2.4 0.864h-0.032q-1.472 0-2.368-0.864t-0.896-2.176 0.928-2.176 2.4-0.864 2.368 0.864 0.928 2.176zM27.424 18.72v10.144h-5.856v-9.472q0-1.888-0.736-2.944t-2.272-1.056q-1.12 0-1.856 0.608t-1.152 1.536q-0.192 0.544-0.192 1.44v9.888h-5.888q0.032-7.136 0.032-11.552t0-5.28l-0.032-0.864h5.888v2.56h-0.032q0.352-0.576 0.736-0.992t0.992-0.928 1.568-0.768 2.048-0.288q3.040 0 4.896 2.016t1.856 5.952z',
855
+ 'width' => 27,
856
+ 'height' => 32,
857
+ ],
858
+ 'email' => [
859
+ 'path' => 'M18.56 17.408l8.256 8.544h-25.248l8.288-8.448 4.32 4.064zM2.016 6.048h24.32l-12.16 11.584zM20.128 15.936l8.224-7.744v16.256zM0 24.448v-16.256l8.288 7.776z',
860
+ 'width' => 28,
861
+ 'height' => 32,
862
+ ],
863
+ 'print' => [
864
+ 'path' => 'M27.712 9.152c1.28 0 2.4 1.12 2.4 2.496v11.712c0 1.344-1.12 2.464-2.4 2.464h-2.432l1.088 4.896h-22.112l0.864-4.896h-2.624c-1.44 0-2.496-1.12-2.496-2.464v-11.712c0-1.376 1.056-2.496 2.496-2.496h3.072v-3.744h1.088v-4.128h16.864v4.128h1.088v3.744h3.104zM7.776 2.784v9.344h14.624v-9.344h-14.624zM4.16 15.232c0.96 0 1.76-0.768 1.76-1.728 0-0.896-0.8-1.696-1.76-1.696-0.928 0-1.728 0.8-1.728 1.696 0 0.96 0.8 1.728 1.728 1.728zM6.176 29.248h18.144l-1.504-7.744h-15.488zM14.24 25.632h-4.448v-1.12h4.448v1.12zM20.576 25.632h-4.448v-1.12h4.448v1.12z',
865
+ 'width' => 30,
866
+ 'height' => 32,
867
+ ],
868
+ 'share' => [
869
+ 'path' => 'M20.8 20.8q1.984 0 3.392 1.376t1.408 3.424q0 1.984-1.408 3.392t-3.392 1.408-3.392-1.408-1.408-3.392q0-0.192 0.032-0.448t0.032-0.384l-8.32-4.992q-1.344 1.024-2.944 1.024-1.984 0-3.392-1.408t-1.408-3.392 1.408-3.392 3.392-1.408q1.728 0 2.944 0.96l8.32-4.992q0-0.128-0.032-0.384t-0.032-0.384q0-1.984 1.408-3.392t3.392-1.408 3.392 1.376 1.408 3.424q0 1.984-1.408 3.392t-3.392 1.408q-1.664 0-2.88-1.024l-8.384 4.992q0.064 0.256 0.064 0.832 0 0.512-0.064 0.768l8.384 4.992q1.152-0.96 2.88-0.96z',
870
+ 'width' => 26,
871
+ 'height' => 32,
872
+ ],
873
+ 'cancel' => [
874
+ 'path' => 'M23.168 23.616q0 0.704-0.48 1.216l-2.432 2.432q-0.512 0.48-1.216 0.48t-1.216-0.48l-5.248-5.28-5.248 5.28q-0.512 0.48-1.216 0.48t-1.216-0.48l-2.432-2.432q-0.512-0.512-0.512-1.216t0.512-1.216l5.248-5.248-5.248-5.248q-0.512-0.512-0.512-1.216t0.512-1.216l2.432-2.432q0.512-0.512 1.216-0.512t1.216 0.512l5.248 5.248 5.248-5.248q0.512-0.512 1.216-0.512t1.216 0.512l2.432 2.432q0.48 0.48 0.48 1.216t-0.48 1.216l-5.248 5.248 5.248 5.248q0.48 0.48 0.48 1.216z',
875
+ 'width' => 25,
876
+ 'height' => 32,
877
+ ],
878
+ ];
879
+
880
+ if ( function_exists( 'dpsp_get_pro_svg_icon_data' ) ){
881
+ $svg_icons = array_merge( $svg_icons, dpsp_get_pro_svg_icon_data());
882
+ }
883
+
884
+ return ( ! empty( $svg_icons[ $icon_slug ] ) ? $svg_icons[ $icon_slug ] : [] );
885
+
886
+ }
887
+
888
+
889
+ /**
890
+ * Outputs the <svg> element corresponding to the provided icon
891
+ *
892
+ * @param string $icon_slug
893
+ *
894
+ * @return string
895
+ *
896
+ */
897
+ function dpsp_get_svg_icon_output( $icon_slug ) {
898
+
899
+ $icon_data = dpsp_get_svg_icon_data( $icon_slug );
900
+
901
+ if ( empty( $icon_data ) ) {
902
+ return false;
903
+ }
904
+
905
+ $output = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="' . absint( $icon_data['width'] ) . '" height="' . absint( $icon_data['height'] ) . '" viewBox="0 0 ' . absint( $icon_data['width'] ) . ' ' . absint( $icon_data['height'] ) . '">';
906
+ $output .= '<path d="' . esc_attr( $icon_data['path'] ) . '"></path>';
907
+ $output .= '</svg>';
908
+
909
+ return $output;
910
+
911
+ }
912
+
913
+
914
+ /**
915
+ * Attempts to recursively unserialize the given value
916
+ *
917
+ * @param mixed $value
918
+ *
919
+ * @return mixed
920
+ *
921
+ */
922
+ function dpsp_maybe_unserialize( $value ) {
923
+
924
+ $index = 1;
925
+ $type = gettype( $value );
926
+
927
+ while ( 'string' == $type ) {
928
+
929
+ if ( $index >= 5 ) {
930
+ break;
931
+ }
932
+
933
+ $value = maybe_unserialize( $value );
934
+ $type = gettype( $value );
935
+
936
+ $index ++;
937
+
938
+ }
939
+
940
+ return $value;
941
+
942
+ }
943
+
944
+ function dpsp_get_svg_data_for_networks( $networks ) {
945
+ $output = [];
946
+ foreach ( $networks as $slug => $label ) {
947
+ $output[ $slug ] = dpsp_get_svg_icon_data( $slug );
948
+ }
949
+
950
+ return $output;
951
+ }
952
+
953
+ /**
954
+ * Register hooks for functions.php
955
+ */
956
+ function dpsp_register_functions() {
957
+ add_filter( 'dpsp_get_active_networks', 'dpsp_first_activation_active_networks', 10, 2 );
958
+ add_filter( 'dpsp_is_location_displayable', 'dpsp_post_location_overwrite_option', 10, 3 );
959
+ }
inc/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/integrations/class-container.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Mediavine\Grow\Integrations;
4
+
5
+ if ( class_exists( 'Social_Pug' ) ) {
6
+ /**
7
+ * Class Container
8
+ *
9
+ * @package Mediavine\Grow\Integrations
10
+ */
11
+ class Container extends \Social_Pug {
12
+
13
+ /** @var null */
14
+ private static $instance = null;
15
+
16
+ /** @var string Prefix to use for all integration hook names. */
17
+ public static $hook_prefix = 'mv_grow_integration_hook_';
18
+
19
+ /** @var Integration[] Array of integration classes. */
20
+ private $integrations = [];
21
+
22
+ /** */
23
+ public static function get_instance() {
24
+ if ( null === self::$instance ) {
25
+ self::$instance = new self;
26
+ self::$instance->init();
27
+ }
28
+
29
+ return self::$instance;
30
+ }
31
+
32
+ /**
33
+ *
34
+ */
35
+ public function init() {
36
+
37
+ }
38
+
39
+ /**
40
+ * Add a set of integrations to this class.
41
+ *
42
+ * @param Integration[] $integration
43
+ * @return bool
44
+ */
45
+ public function add_integrations( $integration = [] ) {
46
+ if ( empty( $integration ) ) {
47
+ return false;
48
+ }
49
+ $this->integrations = array_merge( $this->integrations, $integration );
50
+ return true;
51
+ }
52
+
53
+ /**
54
+ * Get all the integrations registered with this class.
55
+ *
56
+ * @return Integration[]
57
+ */
58
+ public function get_integrations() {
59
+ return $this->integrations;
60
+ }
61
+
62
+ /**
63
+ * Determine if any integrations are currently active for a given integration location.
64
+ *
65
+ * @param string $location
66
+ * @return bool
67
+ */
68
+ public static function has_location( $location ) {
69
+ $container = self::get_instance();
70
+ $should_run = false;
71
+ foreach ( $container->integrations as $integration ) {
72
+ if ( $integration->should_run() && in_array( $location, $integration->locations ) ) {
73
+ $should_run = true;
74
+ $integration->add_hook( $location );
75
+ }
76
+ }
77
+
78
+ return $should_run;
79
+ }
80
+
81
+ /**
82
+ * Run integration actions for a given location.
83
+ *
84
+ * @param string $location
85
+ * @param array $args
86
+ * @return bool
87
+ */
88
+ public static function do_location( $location, $args = [] ) {
89
+ if ( empty( $location ) ) {
90
+ return false;
91
+ }
92
+ \do_action( self::$hook_prefix . $location, $args );
93
+
94
+ return true;
95
+ }
96
+ }
97
+ }
inc/integrations/class-integration.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Mediavine\Grow\Integrations;
4
+
5
+ if ( class_exists( '\Mediavine\Grow\Integrations\Container' ) ) {
6
+ /**
7
+ * Class Integration
8
+ *
9
+ * @package Mediavine\Grow\Integrations
10
+ */
11
+ abstract class Integration extends Container {
12
+
13
+ /** @var string[] The locations where this integration will perform an action. */
14
+ public $locations = [];
15
+
16
+ /**
17
+ *
18
+ */
19
+ public function init() {
20
+
21
+ }
22
+
23
+ /**
24
+ * Add a hook for a given location.
25
+ *
26
+ * @param string $location
27
+ */
28
+ public function add_hook( $location ) {
29
+ $callback = method_exists( $this, $location ) ? [ $this, $location ] : '__return_false';
30
+ \add_action( self::$hook_prefix . $location, $callback );
31
+ }
32
+
33
+ /**
34
+ * @return mixed
35
+ */
36
+ abstract public function should_run();
37
+ }
38
+ }
39
+
inc/integrations/class-mv-create.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Mediavine\Grow\Integrations;
4
+
5
+ use function add_filter;
6
+
7
+ if ( class_exists( '\Mediavine\Grow\Integrations\Integration' ) ) {
8
+ /**
9
+ * Class MV_Create
10
+ *
11
+ * @package Mediavine\Grow\Integrations
12
+ */
13
+ class MV_Create extends Integration {
14
+
15
+ /** @var string[] */
16
+ public $locations = [];
17
+
18
+ /** @var null */
19
+ private static $instance = null;
20
+
21
+ /**
22
+ * @return Container|MV_Create|\Social_Pug|null
23
+ */
24
+ public static function get_instance() {
25
+ if ( null === self::$instance ) {
26
+ self::$instance = new self;
27
+ self::$instance->init();
28
+ }
29
+
30
+ return self::$instance;
31
+ }
32
+
33
+ /**
34
+ *
35
+ */
36
+ public function init() {
37
+ if ( $this->should_run() ) {
38
+ add_filter( 'mv_grow_pinterest_bypass_classes', [ $this, 'list_image_bypass' ] );
39
+ }
40
+ }
41
+
42
+ /**
43
+ * @return bool|mixed
44
+ */
45
+ public function should_run() {
46
+ return class_exists( 'Mediavine\Create\Plugin' );
47
+ }
48
+
49
+ /**
50
+ * Bypass Create List Images
51
+ *
52
+ * @param array $classes
53
+ *
54
+ * @return array
55
+ */
56
+ public function list_image_bypass( $classes = [] ) {
57
+ $classes[] = 'mv-list-single-img';
58
+
59
+ return $classes;
60
+ }
61
+ }
62
+ }
inc/integrations/class-mv-trellis.php ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Mediavine\Grow\Integrations;
4
+
5
+ use function add_filter;
6
+ use function apply_filters;
7
+ use function wp_kses_post;
8
+
9
+ if ( class_exists( '\Mediavine\Grow\Integrations\Integration' ) ) {
10
+ /**
11
+ * Class MV_Trellis
12
+ *
13
+ * @package Mediavine\Grow\Integrations
14
+ */
15
+ class MV_Trellis extends Integration {
16
+
17
+ /** @var string[] */
18
+ public $locations = [ 'inline_content_frontend', 'output_pinterest_content_markup', 'output_sticky_bar_content_markup' ];
19
+
20
+ /** @var */
21
+ private $output_top;
22
+
23
+ /** @var */
24
+ private $output_bottom;
25
+
26
+ /** @var null */
27
+ private static $instance = null;
28
+
29
+ /**
30
+ * @return Container|MV_Trellis|\Social_Pug|null
31
+ */
32
+ public static function get_instance() {
33
+ if ( null === self::$instance ) {
34
+ self::$instance = new self;
35
+ self::$instance->init();
36
+ }
37
+ return self::$instance;
38
+ }
39
+
40
+ /**
41
+ *
42
+ */
43
+ public function init() {
44
+ add_filter( 'mv_trellis_css_bypass', [ $this, 'css_bypass' ] );
45
+ add_filter( 'mv_trellis_disable_lazy_load_classes', [ $this, 'lazyload_bypass' ] );
46
+ }
47
+
48
+ /**
49
+ * @return bool|mixed
50
+ */
51
+ public function should_run() {
52
+ return class_exists( 'Mediavine\Trellis\Post_Meta' );
53
+ }
54
+
55
+ /**
56
+ *
57
+ */
58
+ public function inline_content_frontend() {
59
+ add_filter( 'tha_entry_before', [ $this, 'inline_content_share_top' ] );
60
+ add_filter( 'tha_entry_after', [ $this, 'inline_content_share_bottom' ] );
61
+ }
62
+
63
+ /**
64
+ *
65
+ */
66
+ public function inline_content_share_top() {
67
+ if ( $this->share_content() ) {
68
+ echo wp_kses_post( $this->output_top );
69
+ }
70
+ }
71
+
72
+ /**
73
+ *
74
+ */
75
+ public function inline_content_share_bottom() {
76
+ if ( $this->share_content() ) {
77
+ echo wp_kses_post( $this->output_bottom );
78
+ }
79
+ }
80
+
81
+ /**
82
+ * @return bool
83
+ */
84
+ function share_content() {
85
+ if ( $this->output_top && $this->output_bottom ) {
86
+ return true;
87
+ }
88
+
89
+ if ( ! dpsp_is_tool_active( 'share_content' ) ) {
90
+ return false;
91
+ }
92
+
93
+ if ( ! dpsp_is_location_displayable( 'content' ) ) {
94
+ return false;
95
+ }
96
+
97
+ // Get saved settings
98
+ $settings = dpsp_get_location_settings( 'content' );
99
+
100
+ // Get the post object
101
+ $post_obj = dpsp_get_current_post();
102
+
103
+ if ( ! $post_obj ) {
104
+ return false;
105
+ }
106
+
107
+ global $post;
108
+
109
+ if ( $post_obj->ID !== $post->ID ) {
110
+ return false;
111
+ }
112
+
113
+ // Return the content if the output for this callback isn't permitted by filters
114
+ // This filter has been added for edge cases
115
+ if ( false === apply_filters( 'dpsp_output_the_content_callback', true ) ) {
116
+ return false;
117
+ }
118
+
119
+ // Set output
120
+ $output = '';
121
+
122
+ // Classes for the wrapper
123
+ $wrapper_classes = [ 'dpsp-content-wrapper' ];
124
+ $wrapper_classes[] = ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' );
125
+ $wrapper_classes[] = ( isset( $settings['display']['size'] ) ? 'dpsp-size-' . $settings['display']['size'] : 'dpsp-size-medium' );
126
+ $wrapper_classes[] = ( isset( $settings['display']['spacing'] ) ? 'dpsp-has-spacing' : '' );
127
+ $wrapper_classes[] = ( isset( $settings['display']['show_labels'] ) || isset( $settings['display']['show_count'] ) ? '' : 'dpsp-no-labels' );
128
+ $wrapper_classes[] = ( isset( $settings['display']['show_count'] ) ? 'dpsp-has-buttons-count' : '' );
129
+ $wrapper_classes[] = ( isset( $settings['display']['show_mobile'] ) ? 'dpsp-show-on-mobile' : 'dpsp-hide-on-mobile' );
130
+
131
+ // Button total share counts
132
+ $minimum_count = ( ! empty( $settings['display']['minimum_count'] ) ? (int) $settings['display']['minimum_count'] : 0 );
133
+ $show_total_count = ( $minimum_count <= (int) dpsp_get_post_total_share_count() && ! empty( $settings['display']['show_count_total'] ) ? true : false );
134
+
135
+ $wrapper_classes[] = ( $show_total_count ? 'dpsp-show-total-share-count' : '' );
136
+ $wrapper_classes[] = ( $show_total_count ? ( ! empty( $settings['display']['total_count_position'] ) ? 'dpsp-show-total-share-count-' . $settings['display']['total_count_position'] : 'dpsp-show-total-share-count-before' ) : '' );
137
+
138
+ // Button styles
139
+ $wrapper_classes[] = ( isset( $settings['button_style'] ) ? 'dpsp-button-style-' . $settings['button_style'] : '' );
140
+
141
+ $wrapper_classes = implode( ' ', array_filter( $wrapper_classes ) );
142
+
143
+ // Output total share counts
144
+ if ( $show_total_count ) {
145
+ $output .= dpsp_get_output_total_share_count( 'content' );
146
+ }
147
+
148
+ // Gets the social network buttons
149
+ if ( isset( $settings['networks'] ) ) {
150
+ $output .= dpsp_get_output_network_buttons( $settings, 'share', 'content' );
151
+ }
152
+
153
+ $output = apply_filters( 'dpsp_output_front_end_content', $output );
154
+
155
+ // Wrap output for top and bottom cases
156
+ $this->output_top = '<div id="dpsp-content-top" class="' . $wrapper_classes . '">' . $output . '</div>';
157
+ $this->output_bottom = '<div id="dpsp-content-bottom" class="' . $wrapper_classes . '">' . $output . '</div>';
158
+
159
+ // Share text
160
+ if ( ! empty( $settings['display']['message'] ) ) {
161
+ $share_text = '<p class="dpsp-share-text ' . ( isset( $settings['display']['show_mobile'] ) ? '' : 'dpsp-hide-on-mobile' ) . '">' . esc_attr( apply_filters( 'gettext', $settings['display']['message'], $settings['display']['message'], 'social-pug' ) ) . '</p>';
162
+
163
+ $this->output_top = $share_text . $this->output_top;
164
+ $this->output_bottom = $share_text . $this->output_bottom;
165
+ }
166
+
167
+ // Filter out content that shouldn't be output
168
+ $should_output_top = $settings['display']['position'] == 'top' || $settings['display']['position'] == 'both';
169
+ $should_output_bottom = $settings['display']['position'] == 'bottom' || $settings['display']['position'] == 'both';
170
+
171
+ $this->output_top = $should_output_top ? $this->output_top : '';
172
+ $this->output_bottom = $should_output_bottom ? $this->output_bottom : '';
173
+
174
+ return true;
175
+ }
176
+
177
+ /**
178
+ *
179
+ *
180
+ * @param array $bypass
181
+ * @return array
182
+ */
183
+ public function css_bypass( $bypass = [] ) {
184
+ $bypass[] = '((\.|#)?dpsp-(pin-it|pop-up|button-style|network|floating|animation|column|hide|has-button|position)[a-z-0-9]*)';
185
+ return $bypass;
186
+ }
187
+
188
+ /**
189
+ *
190
+ *
191
+ * @param array $bypass
192
+ * @return array
193
+ */
194
+ public function lazyload_bypass( $bypass = [] ) {
195
+ $bypass[] = 'dpsp-post-pinterest-image-hidden-inner';
196
+ return $bypass;
197
+ }
198
+ }
199
+ }
inc/integrations/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/tools/class-tool.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Mediavine\Grow\Tools;
4
+
5
+ abstract class Tool {
6
+
7
+ /**
8
+ * @var array $metadata Associative array of metadata for this tool
9
+ */
10
+ protected $metadata;
11
+
12
+ /**
13
+ * @var string $slug Unique identifier for this tool e.g. floating-sidebar
14
+ */
15
+ public $slug;
16
+
17
+ /**
18
+ * @var string $name Displayed Name for this tool e.g. Floating Sidebar
19
+ */
20
+ protected $name;
21
+
22
+ /**
23
+ * @var string $type What type of tool this is
24
+ */
25
+ protected $type;
26
+
27
+ /**
28
+ * @var string $img Path to image for this tool
29
+ */
30
+ protected $img;
31
+
32
+ /**
33
+ * @var string $admin_page URL of WordPress admin page for this tool
34
+ */
35
+ protected $admin_page;
36
+
37
+ /**
38
+ * @var string[] $required_properties Properties all tools must have
39
+ */
40
+ private $required_properties = ['slug','name', 'type', 'img', 'admin_page'];
41
+
42
+
43
+ /**
44
+ * Construct action to run child init method
45
+ */
46
+ public function __construct() {
47
+ $this->init();
48
+ }
49
+
50
+ abstract public function init();
51
+
52
+ public function load_properties($props) {
53
+ foreach ($this->required_properties as $property_slug) {
54
+ $this->{$property_slug} = $props[$property_slug];
55
+ unset($props[$property_slug]);
56
+ }
57
+ $this->metadata = $props;
58
+ }
59
+
60
+ /**
61
+ * @param string $key Property key to get value for
62
+ *
63
+ * @return mixed Value of the property or false if it doesn't exist
64
+ */
65
+ public function get_property( $key = '' ) {
66
+ if ( empty( $key ) ) {
67
+ return false;
68
+ }
69
+ if (property_exists($this, $key)) {
70
+ return $this->{$key};
71
+ }
72
+ if ( array_key_exists( $key, $this->metadata ) ) {
73
+ return $this->metadata[ $key ];
74
+ }
75
+ return false;
76
+ }
77
+
78
+ /**
79
+ * Get all properties including metadata for this tool
80
+ * @return array
81
+ */
82
+ public function get_properties() {
83
+ $properties = [];
84
+ foreach($this->required_properties as $key) {
85
+ $properties[$key] = $this->{$key};
86
+ }
87
+ return array_merge($this->metadata, $properties);
88
+ }
89
+
90
+ }
inc/tools/class-toolkit.php ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Mediavine\Grow\Tools;
4
+
5
+ /**
6
+ * Class Toolkit
7
+ *
8
+ * @package Mediavine\Grow\Tools
9
+ */
10
+ class Toolkit {
11
+
12
+ /** @var null */
13
+ private static $instance = null;
14
+
15
+ /** @var Tool[] Array of tool classes. */
16
+ private $tools = [];
17
+
18
+ /**
19
+ * @var string[] $required_metadata Array of slugs for metadata that is required for all tools to validate
20
+ */
21
+ private static $required_metadata = [
22
+ 'name',
23
+ 'type',
24
+ 'img',
25
+ 'admin_page',
26
+ ];
27
+
28
+ /**
29
+ * Get instance of Tool Container
30
+ * @return Toolkit
31
+ */
32
+ public static function get_instance() {
33
+ if ( null === self::$instance ) {
34
+ self::$instance = new self;
35
+ self::$instance->init();
36
+ }
37
+
38
+ return self::$instance;
39
+ }
40
+
41
+ /**
42
+ * Tasks to be run on init
43
+ */
44
+ public function init() {
45
+
46
+ }
47
+
48
+ /**
49
+ * Add a set of tools to this class.
50
+ *
51
+ * @param Tool[] $tools Array of Tools
52
+ *
53
+ * @return bool
54
+ */
55
+ public function add( $tools = [] ) {
56
+ if ( empty( $tools ) ) {
57
+ return false;
58
+ }
59
+
60
+ // Filter out tools that don't have the required metadata
61
+ $valid_tools = array_filter( $tools, 'self::validate' );
62
+
63
+ // Create an associative array by pulling slugs off of each tool;
64
+ $keyed_tools = array_combine( array_column( $valid_tools, 'slug' ), $valid_tools );
65
+
66
+ // Merge tools into new tools
67
+ $this->tools = array_merge( $this->tools, $keyed_tools );
68
+
69
+ return true;
70
+ }
71
+
72
+ /**
73
+ * Get all the tools registered with this class.
74
+ *
75
+ * @return Tool[]
76
+ */
77
+ public function get_all() {
78
+ return self::get_instance()->tools;
79
+ }
80
+
81
+ /**
82
+ * Get a tool by slug
83
+ *
84
+ * @param string $slug Slug for tool to get
85
+ *
86
+ * @return bool|Tool Tool if it exists, false if it doesn't exist or no slug passed in
87
+ */
88
+ public function get( $slug = '' ) {
89
+ if ( empty( $slug ) ) {
90
+ return false;
91
+ }
92
+ $instance = self::get_instance();
93
+ if ( ! isset( $instance->tools[ $slug ] ) ) {
94
+ return false;
95
+ }
96
+
97
+ return $instance->tools[ $slug ];
98
+ }
99
+
100
+ /**
101
+ * @param Tool $tool Tool to validate
102
+ *
103
+ * @return bool Whether or not tool is valid
104
+ */
105
+ public static function validate( $tool ) {
106
+ return self::has_required_metadata( $tool ) && ! empty( $tool->slug );
107
+ }
108
+
109
+ /**
110
+ * Make sure tool has required metadata exists and is non empty
111
+ *
112
+ * @param Tool $tool Tool instance
113
+ *
114
+ * @return bool Whether or not the passed tool contains all required keys
115
+ */
116
+ public static function has_required_metadata( $tool ) {
117
+ $metadata = $tool->get_properties();
118
+ // Filter out empty values
119
+ $non_empty_metadata = array_filter(
120
+ $metadata,
121
+ function ( $value ) {
122
+ return ! empty( $value );
123
+ }
124
+ );
125
+
126
+ // Get Remaining Keys
127
+ $meta_keys = array_keys( $non_empty_metadata );
128
+
129
+ // Get required keys that are missing from the non-empty keys we have
130
+ $missing_keys = array_diff( self::$required_metadata, $meta_keys );
131
+
132
+ // If that array is empty, we have all keys
133
+ return count( $missing_keys ) === 0;
134
+ }
135
+
136
+ }
inc/tools/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/tools/share-floating-sidebar/class-floating-sidebar.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Mediavine\Grow\Tools;
3
+
4
+ class Floating_Sidebar extends Tool {
5
+ use Renderable;
6
+
7
+ /**
8
+ * Floating Sidebar constructor. Set metadata and slug
9
+ */
10
+ public function init() {
11
+ $this->load_properties([
12
+ 'slug' => 'floating_sidebar',
13
+ 'name' => __( 'Floating Sidebar', 'social-pug' ),
14
+ 'type' => 'share_tool',
15
+ 'activation_setting' => 'dpsp_location_sidebar[active]',
16
+ 'img' => 'assets/dist/tool-sidebar.' . DPSP_VERSION . '.png',
17
+ 'admin_page' => 'admin.php?page=dpsp-sidebar',
18
+ ]);
19
+ }
20
+
21
+ /**
22
+ * The rendering action of this tool
23
+ * @return string HTML output of tool
24
+ */
25
+ public function render() {
26
+ // @TODO Migrate functionality from global function to this class
27
+ $this->has_rendered = true;
28
+ return '';
29
+ }
30
+
31
+ }
inc/tools/share-floating-sidebar/functions-frontend.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Check that the sidebar has been added only once
4
+ global $dpsp_output_front_end_floating_sidebar;
5
+
6
+ /**
7
+ * Function that displays the floating sidebar sharing buttons
8
+ *
9
+ */
10
+ function dpsp_output_front_end_floating_sidebar() {
11
+ // Only run if share sidebar is active
12
+ if ( ! dpsp_is_tool_active( 'share_sidebar' ) ) {
13
+ return;
14
+ }
15
+
16
+ if ( ! dpsp_is_tool_active( 'share_sidebar' ) ) {
17
+ return;
18
+ }
19
+
20
+ if ( ! dpsp_is_location_displayable( 'sidebar' ) ) {
21
+ return;
22
+ }
23
+
24
+ // Check that the sidebar has been added only once
25
+ $tool_container = \Mediavine\Grow\Tools\Toolkit::get_instance();
26
+ $tool_instance = $tool_container->get( 'floating_sidebar' );
27
+ if ( $tool_instance->has_rendered() ) {
28
+ return;
29
+ }
30
+ $tool_instance->render();
31
+
32
+ // Get saved settings
33
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_location_sidebar', [] );
34
+
35
+ // Classes for the wrapper
36
+ $wrapper_classes = [];
37
+ $wrapper_classes[] = ( isset( $settings['display']['spacing'] ) ? 'dpsp-bottom-spacing' : '' );
38
+ $wrapper_classes[] = ( isset( $settings['display']['position'] ) ? 'dpsp-position-' . $settings['display']['position'] : '' );
39
+ $wrapper_classes[] = ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' );
40
+ $wrapper_classes[] = ( isset( $settings['display']['size'] ) ? 'dpsp-size-' . $settings['display']['size'] : 'dpsp-size-small' );
41
+ $wrapper_classes[] = ( isset( $settings['display']['show_count'] ) ? 'dpsp-has-buttons-count' : '' );
42
+ $wrapper_classes[] = ( isset( $settings['display']['show_mobile'] ) ? 'dpsp-show-on-mobile' : 'dpsp-hide-on-mobile' );
43
+
44
+ // Button styles
45
+ $wrapper_classes[] = ( isset( $settings['button_style'] ) ? 'dpsp-button-style-' . $settings['button_style'] : '' );
46
+
47
+ // Set intro animation
48
+ $wrapper_classes[] = ( ! empty( $settings['display']['intro_animation'] ) && $settings['display']['intro_animation'] != '-1' ? 'dpsp-animation-' . esc_attr( $settings['display']['intro_animation'] ) : 'dpsp-no-animation' );
49
+
50
+ $wrapper_classes = implode( ' ', $wrapper_classes );
51
+
52
+ // Set trigger extra data
53
+ $trigger_data = [];
54
+ $trigger_data[] = 'data-trigger-scroll="' . ( isset( $settings['display']['show_after_scrolling'] ) ? ( ! empty( $settings['display']['scroll_distance'] ) ? (int) str_replace( '%', '', trim( $settings['display']['scroll_distance'] ) ) : 0 ) : 'false' ) . '"';
55
+ $trigger_data = implode( ' ', array_filter( $trigger_data ) );
56
+
57
+ $output = '<div id="dpsp-floating-sidebar" class="' . $wrapper_classes . '" ' . $trigger_data . '>';
58
+
59
+ // Show total share count
60
+ $show_total_count = ( ! isset( $settings['display']['minimum_count'] ) || empty( $settings['display']['minimum_count'] ) || ( ! empty( $settings['display']['minimum_count'] ) && (int) $settings['display']['minimum_count'] < dpsp_get_post_total_share_count() ) ) ? true : false;
61
+
62
+ // Total share count before buttons
63
+ if ( $show_total_count && isset( $settings['display']['show_count_total'] ) && ( ! isset( $settings['display']['total_count_position'] ) || $settings['display']['total_count_position'] == 'before' ) ) {
64
+ $output .= dpsp_get_output_total_share_count( 'sidebar' );
65
+ }
66
+
67
+ // Gets the social networks buttons
68
+ if ( isset( $settings['networks'] ) ) {
69
+ $output .= dpsp_get_output_network_buttons( $settings, 'share', 'sidebar' );
70
+ }
71
+
72
+ // Total share count after buttons
73
+ if ( $show_total_count && isset( $settings['display']['show_count_total'] ) && $settings['display']['total_count_position'] == 'after' ) {
74
+ $output .= dpsp_get_output_total_share_count( 'sidebar' );
75
+ }
76
+
77
+ $output .= '</div>';
78
+
79
+ // Echo the final output
80
+ echo apply_filters( 'dpsp_output_front_end_floating_sidebar', $output );
81
+
82
+ }
inc/tools/share-floating-sidebar/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/tools/share-floating-sidebar/share-floating-sidebar.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Add the share floating sidebar tool to the toolkit array
5
+ *
6
+ * @param array $tools
7
+ *
8
+ * @return array
9
+ *
10
+ */
11
+ function dpsp_tool_share_sidebar( $tools = [] ) {
12
+
13
+ $tools['share_sidebar'] = [
14
+ 'name' => __( 'Floating Sidebar', 'social-pug' ),
15
+ 'type' => 'share_tool',
16
+ 'activation_setting' => 'dpsp_location_sidebar[active]',
17
+ 'img' => 'assets/dist/tool-sidebar.' . DPSP_VERSION . '.png',
18
+ 'admin_page' => 'admin.php?page=dpsp-sidebar',
19
+ ];
20
+
21
+ return $tools;
22
+
23
+ }
24
+
25
+ /**
26
+ * Register the Floating Sidebar hooks.
27
+ */
28
+ function dpsp_register_floating_sidebar() {
29
+ add_action( 'wp_footer', 'dpsp_output_front_end_floating_sidebar' );
30
+ add_filter( 'dpsp_get_tools', 'dpsp_tool_share_sidebar', 10 );
31
+ add_action( 'admin_menu', 'dpsp_register_floating_sidebar_subpage', 20 );
32
+ add_action( 'admin_init', 'dpsp_sidebar_register_settings' );
33
+ }
inc/tools/share-floating-sidebar/submenu-page-sidebar.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Function that creates the sub-menu item and page for the floating sidebar location of the share buttons
5
+ *
6
+ * @return void
7
+ *
8
+ */
9
+ function dpsp_register_floating_sidebar_subpage() {
10
+ // Only run if share sidebar is active
11
+ if ( ! dpsp_is_tool_active( 'share_sidebar' ) ) {
12
+ return;
13
+ }
14
+
15
+ add_submenu_page( 'dpsp-social-pug', __( 'Floating Sidebar', 'social-pug' ), __( 'Floating Sidebar', 'social-pug' ), 'manage_options', 'dpsp-sidebar', 'dpsp_sidebar_subpage' );
16
+ }
17
+
18
+ /**
19
+ * Outputs content to the floating sidebar subpage.
20
+ */
21
+ function dpsp_sidebar_subpage() {
22
+ include DPSP_PLUGIN_DIR . '/inc/tools/share-floating-sidebar/views/view-submenu-page-sidebar.php';
23
+ }
24
+
25
+
26
+ function dpsp_sidebar_register_settings() {
27
+ // Only run if share sidebar is active
28
+ if ( ! dpsp_is_tool_active( 'share_sidebar' ) ) {
29
+ return;
30
+ }
31
+
32
+ register_setting( 'dpsp_location_sidebar', 'dpsp_location_sidebar', 'dpsp_sidebar_settings_sanitize' );
33
+
34
+ }
35
+
36
+ /*
37
+ * Filter and sanitize settings
38
+ *
39
+ * @param array $new_settings
40
+ *
41
+ */
42
+ function dpsp_sidebar_settings_sanitize( $new_settings ) {
43
+
44
+ // Save default values even if values do not exist
45
+ if ( ! isset( $new_settings['networks'] ) ) {
46
+ $new_settings['networks'] = [];
47
+ }
48
+
49
+ if ( ! isset( $new_settings['button_style'] ) ) {
50
+ $new_settings['button_style'] = 1;
51
+ }
52
+
53
+ $new_settings = dpsp_array_strip_script_tags( $new_settings );
54
+
55
+ return $new_settings;
56
+
57
+ }
inc/tools/share-floating-sidebar/views/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/tools/share-floating-sidebar/views/view-submenu-page-sidebar.php ADDED
@@ -0,0 +1,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <form method="post" action="options.php">
2
+ <div class="dpsp-page-wrapper dpsp-page-sidebar wrap">
3
+
4
+ <?php
5
+ $dpsp_location_sidebar = Mediavine\Grow\Settings::get_setting( 'dpsp_location_sidebar', 'not_set' );
6
+ settings_fields( 'dpsp_location_sidebar' );
7
+ ?>
8
+
9
+
10
+ <!-- Page Title -->
11
+ <h1 class="dpsp-page-title">
12
+ <?php _e( 'Configure Sidebar Sharing Buttons', 'social-pug' ); ?>
13
+
14
+ <input type="hidden" name="dpsp_buttons_location" value="dpsp_location_sidebar" />
15
+ <input type="hidden" name="dpsp_location_sidebar[active]" value="<?php echo ( isset( $dpsp_location_sidebar['active'] ) ? 1 : '' ); ?>" <?php echo ( ! isset( $dpsp_location_sidebar['active'] ) ? 'disabled' : '' ); ?> />
16
+ </h1>
17
+
18
+
19
+ <!-- Networks Selectable and Sortable Panels -->
20
+ <div id="dpsp-social-platforms-wrapper" class="dpsp-card">
21
+
22
+ <div class="dpsp-card-header">
23
+ <?php _e( 'Social Networks', 'social-pug' ); ?>
24
+ <a id="dpsp-select-networks" class="dpsp-button-secondary" href="#"><?php echo __( 'Select Networks', 'social-pug' ); ?></a>
25
+ </div>
26
+
27
+ <div id="dpsp-sortable-networks-empty" class="dpsp-card-inner <?php echo ( empty( $dpsp_location_sidebar['networks'] ) ? 'dpsp-active' : '' ); ?>">
28
+ <p><?php _e( 'Select which social buttons to display', 'social-pug' ); ?></p>
29
+ </div>
30
+
31
+ <?php echo dpsp_output_sortable_networks( ( ! empty( $dpsp_location_sidebar['networks'] ) ? $dpsp_location_sidebar['networks'] : [] ), 'dpsp_location_sidebar' ); ?>
32
+
33
+ <?php
34
+ $available_networks = dpsp_get_networks();
35
+ echo dpsp_output_selectable_networks( $available_networks, ( ! empty( $dpsp_location_sidebar['networks'] ) ? $dpsp_location_sidebar['networks'] : [] ) );
36
+ ?>
37
+
38
+ </div>
39
+
40
+
41
+ <!-- Button Style Settings -->
42
+ <div class="dpsp-card">
43
+
44
+ <div class="dpsp-card-header">
45
+ <?php _e( 'Button Style', 'social-pug' ); ?>
46
+ </div>
47
+
48
+ <div class="dpsp-card-inner">
49
+
50
+ <?php $settings = dpsp_get_back_end_display_option( 'dpsp_location_sidebar' ); ?>
51
+
52
+ <input type="radio" id="dpsp-settings-button-style-input-1" name="dpsp_location_sidebar[button_style]" value="1" class="dpsp-settings-button-style-input" <?php echo isset( $dpsp_location_sidebar['button_style'] ) && $dpsp_location_sidebar['button_style'] == 1 ? 'checked="checked"' : ''; ?> />
53
+ <label for="dpsp-settings-button-style-input-1" class="dpsp-settings-button-style dpsp-transition">
54
+ <div class="dpsp-button-style-1 dpsp-has-button-background dpsp-column-1 <?php echo ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' ); ?>">
55
+ <?php echo dpsp_get_output_network_buttons( $settings, 'share', 'sidebar' ); ?>
56
+ </div>
57
+ </label>
58
+
59
+ <input type="radio" id="dpsp-settings-button-style-input-5" name="dpsp_location_sidebar[button_style]" value="5" class="dpsp-settings-button-style-input" <?php echo isset( $dpsp_location_sidebar['button_style'] ) && $dpsp_location_sidebar['button_style'] == 5 ? 'checked="checked"' : ''; ?> />
60
+ <label for="dpsp-settings-button-style-input-5" class="dpsp-settings-button-style dpsp-transition">
61
+ <div class="dpsp-button-style-5 dpsp-column-1 dpsp-button-hover <?php echo ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' ); ?>">
62
+ <?php echo dpsp_get_output_network_buttons( $settings, 'share', 'sidebar' ); ?>
63
+ </div>
64
+ </label>
65
+
66
+ <input type="radio" id="dpsp-settings-button-style-input-8" name="dpsp_location_sidebar[button_style]" value="8" class="dpsp-settings-button-style-input" <?php echo isset( $dpsp_location_sidebar['button_style'] ) && $dpsp_location_sidebar['button_style'] == 8 ? 'checked="checked"' : ''; ?> />
67
+ <label for="dpsp-settings-button-style-input-8" class="dpsp-settings-button-style dpsp-transition">
68
+ <div class="dpsp-button-style-8 dpsp-column-1 <?php echo ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' ); ?>">
69
+ <?php echo dpsp_get_output_network_buttons( $settings, 'share', 'sidebar' ); ?>
70
+ </div>
71
+ </label>
72
+
73
+ </div>
74
+
75
+ </div>
76
+
77
+
78
+ <!-- General Display Settings -->
79
+ <div class="dpsp-card">
80
+
81
+ <div class="dpsp-card-header">
82
+ <?php _e( 'Display Settings', 'social-pug' ); ?>
83
+ </div>
84
+
85
+ <div class="dpsp-card-inner">
86
+
87
+ <?php
88
+ dpsp_settings_field(
89
+ 'select',
90
+ 'dpsp_location_sidebar[display][shape]',
91
+ $dpsp_location_sidebar['display']['shape'],
92
+ __( 'Button shape', 'social-pug' ),
93
+ [
94
+ 'rectangular' => __( 'Rectangular', 'social-pug' ),
95
+ 'rounded' => __( 'Rounded', 'social-pug' ),
96
+ 'circle' => __(
97
+ 'Circle',
98
+ 'social-pug'
99
+ ),
100
+ ]
101
+ );
102
+ ?>
103
+
104
+ <?php
105
+ dpsp_settings_field(
106
+ 'select',
107
+ 'dpsp_location_sidebar[display][size]',
108
+ ( isset( $dpsp_location_sidebar['display']['size'] ) ? $dpsp_location_sidebar['display']['size'] : '' ),
109
+ __( 'Button size', 'social-pug' ),
110
+ [
111
+ 'small' => __( 'Small', 'social-pug' ),
112
+ 'medium' => __( 'Medium', 'social-pug' ),
113
+ 'large' => __(
114
+ 'Large',
115
+ 'social-pug'
116
+ ),
117
+ ]
118
+ );
119
+ ?>
120
+
121
+ <?php dpsp_settings_field( 'switch', 'dpsp_location_sidebar[display][icon_animation]', ( isset( $dpsp_location_sidebar['display']['icon_animation'] ) ? $dpsp_location_sidebar['display']['icon_animation'] : '' ), __( 'Show icon animation', 'social-pug' ), [ 'yes' ], __( 'Will animate the social media icon when the user hovers over the button.', 'social-pug' ) ); ?>
122
+
123
+ <?php
124
+ dpsp_settings_field(
125
+ 'select',
126
+ 'dpsp_location_sidebar[display][position]',
127
+ $dpsp_location_sidebar['display']['position'],
128
+ __( 'Buttons position', 'social-pug' ),
129
+ [
130
+ 'left' => __( 'Left', 'social-pug' ),
131
+ 'right' => __(
132
+ 'Right',
133
+ 'social-pug'
134
+ ),
135
+ ]
136
+ );
137
+ ?>
138
+
139
+ <?php dpsp_settings_field( 'switch', 'dpsp_location_sidebar[display][show_labels]', ( isset( $dpsp_location_sidebar['display']['show_labels'] ) ? $dpsp_location_sidebar['display']['show_labels'] : '' ), __( 'Show button labels', 'social-pug' ), [ 'yes' ] ); ?>
140
+
141
+ <?php dpsp_settings_field( 'switch', 'dpsp_location_sidebar[display][spacing]', ( isset( $dpsp_location_sidebar['display']['spacing'] ) ? $dpsp_location_sidebar['display']['spacing'] : '' ), __( 'Button spacing', 'social-pug' ), [ 'yes' ], __( 'Adds bottom spacing for each button.', 'social-pug' ) ); ?>
142
+
143
+ <?php
144
+ dpsp_settings_field(
145
+ 'select',
146
+ 'dpsp_location_sidebar[display][intro_animation]',
147
+ ( isset( $dpsp_location_sidebar['display']['intro_animation'] ) ? $dpsp_location_sidebar['display']['intro_animation'] : '' ),
148
+ __( 'Intro Animation', 'social-pug' ),
149
+ [
150
+ '-1' => __( 'No Animation', 'social-pug' ),
151
+ '1' => __( 'Fade In', 'social-pug' ),
152
+ '2' => __(
153
+ 'Slide In',
154
+ 'social-pug'
155
+ ),
156
+ ]
157
+ );
158
+ ?>
159
+
160
+ <?php dpsp_settings_field( 'switch', 'dpsp_location_sidebar[display][show_after_scrolling]', ( isset( $dpsp_location_sidebar['display']['show_after_scrolling'] ) ? $dpsp_location_sidebar['display']['show_after_scrolling'] : '' ), __( 'Show after user scrolls', 'social-pug' ), [ 'yes' ] ); ?>
161
+
162
+ <?php dpsp_settings_field( 'text', 'dpsp_location_sidebar[display][scroll_distance]', ( isset( $dpsp_location_sidebar['display']['scroll_distance'] ) ? $dpsp_location_sidebar['display']['scroll_distance'] : '' ), __( 'Scroll distance (%)', 'social-pug' ), '30', __( 'The distance in percentage (%) of the total page height the user has to scroll before the buttons will appear.', 'social-pug' ) ); ?>
163
+
164
+ <?php dpsp_settings_field( 'switch', 'dpsp_location_sidebar[display][show_mobile]', ( isset( $dpsp_location_sidebar['display']['show_mobile'] ) ? $dpsp_location_sidebar['display']['show_mobile'] : '' ), __( 'Show on mobile', 'social-pug' ), [ 'yes' ] ); ?>
165
+
166
+ <?php dpsp_settings_field( 'text', 'dpsp_location_sidebar[display][screen_size]', ( isset( $dpsp_location_sidebar['display']['screen_size'] ) ? $dpsp_location_sidebar['display']['screen_size'] : '' ), __( 'Mobile screen width (pixels)', 'social-pug' ), '', __( 'For screen widths smaller than this value ( in pixels ) the buttons will be displayed on screen if the show on mobile option is checked.', 'social-pug' ) ); ?>
167
+
168
+ </div>
169
+
170
+ </div>
171
+
172
+
173
+ <!-- Share Counts -->
174
+ <div class="dpsp-card">
175
+
176
+ <div class="dpsp-card-header">
177
+ <?php _e( 'Buttons Share Counts', 'social-pug' ); ?>
178
+ </div>
179
+
180
+ <div class="dpsp-card-inner">
181
+
182
+ <?php dpsp_settings_field( 'switch', 'dpsp_location_sidebar[display][show_count]', ( isset( $dpsp_location_sidebar['display']['show_count'] ) ? $dpsp_location_sidebar['display']['show_count'] : '' ), __( 'Show share count', 'social-pug' ), [ 'yes' ], __( 'Display the share count for each social network.', 'social-pug' ) ); ?>
183
+
184
+ <?php dpsp_settings_field( 'switch', 'dpsp_location_sidebar[display][show_count_total]', ( isset( $dpsp_location_sidebar['display']['show_count_total'] ) ? $dpsp_location_sidebar['display']['show_count_total'] : '' ), __( 'Show total share count', 'social-pug' ), [ 'yes' ], __( 'Display the share count for all social networks.', 'social-pug' ) ); ?>
185
+
186
+ <?php
187
+ dpsp_settings_field(
188
+ 'select',
189
+ 'dpsp_location_sidebar[display][total_count_position]',
190
+ ( isset( $dpsp_location_sidebar['display']['total_count_position'] ) ? $dpsp_location_sidebar['display']['total_count_position'] : '' ),
191
+ __( 'Total count position', 'social-pug' ),
192
+ [
193
+ 'before' => __( 'Before Buttons', 'social-pug' ),
194
+ 'after' => __(
195
+ 'After Buttons',
196
+ 'social-pug'
197
+ ),
198
+ ]
199
+ );
200
+ ?>
201
+
202
+ <?php dpsp_settings_field( 'switch', 'dpsp_location_sidebar[display][count_round]', ( isset( $dpsp_location_sidebar['display']['count_round'] ) ? $dpsp_location_sidebar['display']['count_round'] : '' ), __( 'Share count round', 'social-pug' ), [ 'yes' ], __( 'If the share count for each network is bigger than 1000 it will be rounded to one decimal ( eg. 1267 will show as 1.2k ). Applies to Total Share Counts as well.', 'social-pug' ) ); ?>
203
+
204
+ <?php dpsp_settings_field( 'text', 'dpsp_location_sidebar[display][minimum_count]', ( isset( $dpsp_location_sidebar['display']['minimum_count'] ) ? $dpsp_location_sidebar['display']['minimum_count'] : '' ), __( 'Minimum global share count', 'social-pug' ), '', __( 'Display share counts only if the total share count is higher than this value.', 'social-pug' ) ); ?>
205
+
206
+ <?php dpsp_settings_field( 'text', 'dpsp_location_sidebar[display][minimum_individual_count]', ( isset( $dpsp_location_sidebar['display']['minimum_individual_count'] ) ? $dpsp_location_sidebar['display']['minimum_individual_count'] : '' ), __( 'Minimum individual share count', 'social-pug' ), '', __( 'Display share counts for an individual network only if the share count for that network is higher than this value.', 'social-pug' ) ); ?>
207
+ </div>
208
+
209
+ </div>
210
+
211
+
212
+ <!-- Custom Colors Settings -->
213
+ <div class="dpsp-card">
214
+
215
+ <div class="dpsp-card-header">
216
+ <?php _e( 'Buttons Custom Colors', 'social-pug' ); ?>
217
+ </div>
218
+
219
+ <div class="dpsp-card-inner">
220
+
221
+ <?php dpsp_settings_field( 'color-picker', 'dpsp_location_sidebar[display][custom_color]', ( isset( $dpsp_location_sidebar['display']['custom_color'] ) ? $dpsp_location_sidebar['display']['custom_color'] : '' ), __( 'Buttons color', 'social-pug' ), '' ); ?>
222
+ <?php dpsp_settings_field( 'color-picker', 'dpsp_location_sidebar[display][custom_hover_color]', ( isset( $dpsp_location_sidebar['display']['custom_hover_color'] ) ? $dpsp_location_sidebar['display']['custom_hover_color'] : '' ), __( 'Buttons hover color', 'social-pug' ), '' ); ?>
223
+
224
+ </div>
225
+
226
+ </div>
227
+
228
+
229
+ <!-- Post Type Display Settings -->
230
+ <div class="dpsp-card">
231
+
232
+ <div class="dpsp-card-header">
233
+ <?php _e( 'Post Type Display Settings', 'social-pug' ); ?>
234
+ </div>
235
+
236
+ <div class="dpsp-card-inner">
237
+
238
+ <?php dpsp_settings_field( 'checkbox', 'dpsp_location_sidebar[post_type_display][]', ( isset( $dpsp_location_sidebar['post_type_display'] ) ? $dpsp_location_sidebar['post_type_display'] : [] ), '', dpsp_get_post_types() ); ?>
239
+
240
+ </div>
241
+
242
+ </div>
243
+
244
+
245
+ <!-- Save Changes Button -->
246
+ <input type="hidden" name="action" value="update" />
247
+ <p class="submit"><input type="submit" class="dpsp-button-primary" value="<?php _e( 'Save Changes' ); ?>" /></p>
248
+
249
+ </div>
250
+ </form>
251
+ <?php do_action( 'dpsp_submenu_page_bottom' ); ?>
252
+
inc/tools/share-inline-content/class-inline-content.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Mediavine\Grow\Tools;
3
+
4
+ class Inline_Content extends Tool {
5
+ use Renderable;
6
+
7
+ /**
8
+ * Inline_Content constructor. Set metadata and slug
9
+ */
10
+ public function init() {
11
+ $this->load_properties([
12
+ 'slug' => 'inline_content',
13
+ 'name' => __( 'Inline Content', 'social-pug' ),
14
+ 'type' => 'share_tool',
15
+ 'activation_setting' => 'dpsp_location_content[active]',
16
+ 'img' => 'assets/dist/tool-content.' . DPSP_VERSION . '.png',
17
+ 'admin_page' => 'admin.php?page=dpsp-content',
18
+ ]);
19
+ }
20
+
21
+ /**
22
+ * The rendering action of this tool
23
+ * @return string HTML output of tool
24
+ */
25
+ public function render() {
26
+ // @TODO Migrate functionality from global function to this class
27
+ $this->has_rendered = true;
28
+ return '';
29
+ }
30
+
31
+ }
inc/tools/share-inline-content/functions-frontend.php ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Mediavine\Grow;
4
+
5
+ class Frontend_Content {
6
+
7
+ private static $instance;
8
+
9
+ /**
10
+ * Makes sure class is only instantiated once and runs init
11
+ *
12
+ * @return object Instantiated class
13
+ */
14
+ static function get_instance() {
15
+ if ( ! self::$instance ) {
16
+ self::$instance = new self();
17
+ self::$instance->init();
18
+ }
19
+
20
+ return self::$instance;
21
+ }
22
+
23
+ public $output_top = '';
24
+
25
+ public $output_bottom = '';
26
+
27
+ /**
28
+ * Hooks to be run on class instantiation
29
+ *
30
+ * @return void
31
+ */
32
+ public function init() {
33
+ // Only run if share content is active
34
+ if ( ! dpsp_is_tool_active( 'share_content' ) ) {
35
+ return;
36
+ }
37
+
38
+ if ( Integrations\Container::has_location( 'inline_content_frontend' ) ) {
39
+ Integrations\Container::do_location( 'inline_content_frontend' );
40
+ } else {
41
+ add_filter( 'the_content', [ $this, 'dpsp_output_front_end_content' ], 25 );
42
+ }
43
+
44
+ add_filter( 'woocommerce_short_description', [ $this, 'dpsp_output_front_end_content' ] );
45
+ add_filter( 'mv_grow_frontend_data', [ $this, 'localize_icon_svg_data' ] );
46
+
47
+ }
48
+
49
+ /*
50
+ * Function that displays the sharing buttons in the post content
51
+ *
52
+ */
53
+ function dpsp_output_front_end_content( $content ) {
54
+
55
+ global $wp_current_filter;
56
+
57
+ // We need to filter out all instances where this callback functions is applied
58
+ // due to the_content filter being used by other plugins
59
+ if ( ! empty( $wp_current_filter ) && is_array( $wp_current_filter ) ) {
60
+
61
+ foreach ( $wp_current_filter as $filter ) {
62
+
63
+ if ( 'wp_head' == $filter || 'p3_content_end' == $filter ) {
64
+ return $content;
65
+ }
66
+ }
67
+ }
68
+
69
+ if ( ! is_main_query() ) {
70
+ return $content;
71
+ }
72
+
73
+ if ( ! dpsp_is_tool_active( 'share_content' ) ) {
74
+ return $content;
75
+ }
76
+
77
+ if ( ! dpsp_is_location_displayable( 'content' ) ) {
78
+ return $content;
79
+ }
80
+
81
+ $tool_container = \Mediavine\Grow\Tools\Toolkit::get_instance();
82
+ $tool_instance = $tool_container->get( 'inline_content' );
83
+ if ( $tool_instance->has_rendered() ) {
84
+ return $content;
85
+ }
86
+ $tool_instance->render();
87
+
88
+ // Get saved settings
89
+ $settings = dpsp_get_location_settings( 'content' );
90
+
91
+ // Get the post object
92
+ $post_obj = dpsp_get_current_post();
93
+
94
+ if ( ! $post_obj ) {
95
+ return $content;
96
+ }
97
+
98
+ global $post;
99
+
100
+ if ( $post_obj->ID != $post->ID ) {
101
+ return $content;
102
+ }
103
+
104
+ /**
105
+ * Return the content if the output for this callback isn't permitted by filters
106
+ *
107
+ * This filter has been added for edge cases
108
+ */
109
+ if ( false === apply_filters( 'dpsp_output_the_content_callback', true ) ) {
110
+ return $content;
111
+ }
112
+
113
+ // Set output
114
+ $output = '';
115
+
116
+ // Classes for the wrapper
117
+ $wrapper_classes = [ 'dpsp-content-wrapper' ];
118
+ $wrapper_classes[] = ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' );
119
+ $wrapper_classes[] = ( isset( $settings['display']['size'] ) ? 'dpsp-size-' . $settings['display']['size'] : 'dpsp-size-medium' );
120
+ $wrapper_classes[] = ( isset( $settings['display']['spacing'] ) ? 'dpsp-has-spacing' : '' );
121
+ $wrapper_classes[] = ( isset( $settings['display']['show_labels'] ) || isset( $settings['display']['show_count'] ) ? '' : 'dpsp-no-labels' );
122
+ $wrapper_classes[] = ( isset( $settings['display']['show_count'] ) ? 'dpsp-has-buttons-count' : '' );
123
+ $wrapper_classes[] = ( isset( $settings['display']['show_mobile'] ) ? 'dpsp-show-on-mobile' : 'dpsp-hide-on-mobile' );
124
+
125
+ // Button total share counts
126
+ $minimum_count = ( ! empty( $settings['display']['minimum_count'] ) ? (int) $settings['display']['minimum_count'] : 0 );
127
+ $show_total_count = ( $minimum_count <= (int) dpsp_get_post_total_share_count() && ! empty( $settings['display']['show_count_total'] ) ? true : false );
128
+
129
+ $wrapper_classes[] = ( $show_total_count ? 'dpsp-show-total-share-count' : '' );
130
+ $wrapper_classes[] = ( $show_total_count ? ( ! empty( $settings['display']['total_count_position'] ) ? 'dpsp-show-total-share-count-' . $settings['display']['total_count_position'] : 'dpsp-show-total-share-count-before' ) : '' );
131
+
132
+ // Button styles
133
+ $wrapper_classes[] = ( isset( $settings['button_style'] ) ? 'dpsp-button-style-' . $settings['button_style'] : '' );
134
+
135
+ $wrapper_classes = implode( ' ', array_filter( $wrapper_classes ) );
136
+
137
+ // Output total share counts
138
+ if ( $show_total_count ) {
139
+ $output .= dpsp_get_output_total_share_count( 'content' );
140
+ }
141
+
142
+ // Gets the social network buttons
143
+ if ( isset( $settings['networks'] ) ) {
144
+ $output .= dpsp_get_output_network_buttons( $settings, 'share', 'content' );
145
+ }
146
+
147
+ $output = apply_filters( 'dpsp_output_front_end_content', $output );
148
+
149
+ // Wrap output for top and bottom cases
150
+ $output_top = '<div id="dpsp-content-top" class="' . $wrapper_classes . '">' . $output . '</div>';
151
+ $output_bottom = '<div id="dpsp-content-bottom" class="' . $wrapper_classes . '">' . $output . '</div>';
152
+
153
+ // Share text
154
+ if ( ! empty( $settings['display']['message'] ) ) {
155
+
156
+ $share_text = '<p class="dpsp-share-text ' . ( isset( $settings['display']['show_mobile'] ) ? '' : 'dpsp-hide-on-mobile' ) . '">' . esc_attr( apply_filters( 'gettext', $settings['display']['message'], $settings['display']['message'], 'social-pug' ) ) . '</p>';
157
+
158
+ $output_top = $share_text . $output_top;
159
+ $output_bottom = $share_text . $output_bottom;
160
+
161
+ }
162
+
163
+ // Concatenate output and content
164
+ if ( 'top' == $settings['display']['position'] ) {
165
+ $content = $output_top . $content;
166
+ } elseif ( 'bottom' == $settings['display']['position'] ) {
167
+ $content = $content . $output_bottom;
168
+ } else {
169
+ $content = $output_top . $content . $output_bottom;
170
+ }
171
+
172
+ return $content;
173
+
174
+ }
175
+
176
+ public function localize_icon_svg_data( $data = [] ) {
177
+ $settings = dpsp_get_location_settings( 'content' );
178
+ if ( ! isset( $settings['networks'] ) || empty( $settings['networks'] ) ) {
179
+ return $data;
180
+ }
181
+ $svg_arr = isset( $data['buttonSVG'] ) ? $data['buttonSVG'] : [];
182
+ $data['buttonSVG'] = array_merge( $svg_arr, dpsp_get_svg_data_for_networks( $settings['networks'] ) );
183
+ return $data;
184
+ }
185
+ }
inc/tools/share-inline-content/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/tools/share-inline-content/share-inline-content.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Add the share inline content tool to the toolkit array
5
+ *
6
+ * @param array $tools
7
+ *
8
+ * @return array
9
+ *
10
+ */
11
+ function dpsp_tool_share_inline_content( $tools = [] ) {
12
+
13
+ $tools['share_content'] = [
14
+ 'name' => __( 'Inline Content', 'social-pug' ),
15
+ 'type' => 'share_tool',
16
+ 'activation_setting' => 'dpsp_location_content[active]',
17
+ 'img' => 'assets/dist/tool-content.' . DPSP_VERSION . '.png',
18
+ 'admin_page' => 'admin.php?page=dpsp-content',
19
+ ];
20
+
21
+ return $tools;
22
+
23
+ }
24
+
25
+ /**
26
+ * Register the Inline Content hooks.
27
+ */
28
+ function dpsp_register_inline_content() {
29
+ \Mediavine\Grow\Frontend_Content::get_instance();
30
+ add_filter( 'dpsp_get_tools', 'dpsp_tool_share_inline_content', 15 );
31
+ add_action( 'admin_menu', 'dpsp_register_content_subpage', 30 );
32
+ add_action( 'admin_init', 'dpsp_content_register_settings' );
33
+ }
inc/{admin → tools/share-inline-content}/submenu-page-content.php RENAMED
@@ -1,55 +1,57 @@
1
- <?php
2
- /*
3
- * Function that creates the sub-menu item and page for the content location of the share buttons
4
- *
5
- *
6
- * @return void
7
- *
8
- */
9
- function dpsp_register_content_subpage() {
10
- add_submenu_page( 'dpsp-social-pug', __('Inline Content', 'social-pug'), __('Inline Content', 'social-pug'), 'manage_options', 'dpsp-content', 'dpsp_content_subpage' );
11
- }
12
- add_action( 'admin_menu', 'dpsp_register_content_subpage' );
13
-
14
-
15
- /*
16
- * Function that adds content to the content icons subpage
17
- *
18
- * @return string
19
- *
20
- */
21
- function dpsp_content_subpage() {
22
-
23
- include_once 'views/view-submenu-page-content.php';
24
-
25
- }
26
-
27
-
28
- function dpsp_content_register_settings() {
29
-
30
- register_setting( 'dpsp_location_content', 'dpsp_location_content', 'dpsp_content_settings_sanitize' );
31
-
32
- }
33
- add_action( 'admin_init', 'dpsp_content_register_settings' );
34
-
35
-
36
- /*
37
- * Filter and sanitize settings
38
- *
39
- * @param array $new_settings
40
- *
41
- */
42
- function dpsp_content_settings_sanitize( $new_settings ) {
43
-
44
- // Save default values even if values do not exist
45
- if( !isset( $new_settings['networks'] ) )
46
- $new_settings['networks'] = array();
47
-
48
- if( !isset( $new_settings['button_style'] ) )
49
- $new_settings['button_style'] = 1;
50
-
51
- $new_settings = dpsp_array_strip_script_tags( $new_settings );
52
-
53
- return $new_settings;
54
-
55
- }
 
 
1
+ <?php
2
+ /*
3
+ * Function that creates the sub-menu item and page for the content location of the share buttons
4
+ *
5
+ *
6
+ * @return void
7
+ *
8
+ */
9
+ function dpsp_register_content_subpage() {
10
+ // Only run if share content is active
11
+ if ( ! dpsp_is_tool_active( 'share_content' ) ) {
12
+ return;
13
+ }
14
+
15
+ add_submenu_page( 'dpsp-social-pug', __( 'Inline Content', 'social-pug' ), __( 'Inline Content', 'social-pug' ), 'manage_options', 'dpsp-content', 'dpsp_content_subpage' );
16
+ }
17
+
18
+ /**
19
+ * Outputs content to the content icons subpage.
20
+ */
21
+ function dpsp_content_subpage() {
22
+ include DPSP_PLUGIN_DIR . '/inc/tools/share-inline-content/views/view-submenu-page-content.php';
23
+ }
24
+
25
+
26
+ function dpsp_content_register_settings() {
27
+ // Only run if share content is active
28
+ if ( ! dpsp_is_tool_active( 'share_content' ) ) {
29
+ return;
30
+ }
31
+
32
+ register_setting( 'dpsp_location_content', 'dpsp_location_content', 'dpsp_content_settings_sanitize' );
33
+
34
+ }
35
+
36
+ /*
37
+ * Filter and sanitize settings
38
+ *
39
+ * @param array $new_settings
40
+ *
41
+ */
42
+ function dpsp_content_settings_sanitize( $new_settings ) {
43
+
44
+ // Save default values even if values do not exist
45
+ if ( ! isset( $new_settings['networks'] ) ) {
46
+ $new_settings['networks'] = [];
47
+ }
48
+
49
+ if ( ! isset( $new_settings['button_style'] ) ) {
50
+ $new_settings['button_style'] = 1;
51
+ }
52
+
53
+ $new_settings = dpsp_array_strip_script_tags( $new_settings );
54
+
55
+ return $new_settings;
56
+
57
+ }
inc/tools/share-inline-content/views/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/tools/share-inline-content/views/view-submenu-page-content.php ADDED
@@ -0,0 +1,291 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <form method="post" action="options.php">
2
+
3
+ <?php
4
+ $dpsp_location_content = Mediavine\Grow\Settings::get_setting( 'dpsp_location_content', 'not_set' );
5
+ settings_fields( 'dpsp_location_content' );
6
+ ?>
7
+
8
+ <div class="dpsp-page-wrapper dpsp-page-content wrap">
9
+
10
+ <!-- Page Title -->
11
+ <h1 class="dpsp-page-title">
12
+ <?php _e( 'Configure Content Sharing Buttons', 'social-pug' ); ?>
13
+
14
+ <input type="hidden" name="dpsp_buttons_location" value="dpsp_location_content" />
15
+ <input type="hidden" name="dpsp_location_content[active]" value="<?php echo ( isset( $dpsp_location_content['active'] ) ? 1 : '' ); ?>" <?php echo ( ! isset( $dpsp_location_content['active'] ) ? 'disabled' : '' ); ?> />
16
+ </h1>
17
+
18
+
19
+ <!-- Networks Selectable and Sortable Panels -->
20
+ <div id="dpsp-social-platforms-wrapper" class="dpsp-card">
21
+
22
+ <div class="dpsp-card-header">
23
+ <?php _e( 'Social Networks', 'social-pug' ); ?>
24
+ <a id="dpsp-select-networks" class="dpsp-button-secondary" href="#"><?php echo __( 'Select Networks', 'social-pug' ); ?></a>
25
+ </div>
26
+
27
+ <div id="dpsp-sortable-networks-empty" class="dpsp-card-inner <?php echo ( empty( $dpsp_location_content['networks'] ) ? 'dpsp-active' : '' ); ?>">
28
+ <p><?php _e( 'Select which social buttons to display', 'social-pug' ); ?></p>
29
+ </div>
30
+
31
+ <?php echo dpsp_output_sortable_networks( ( ! empty( $dpsp_location_content['networks'] ) ? $dpsp_location_content['networks'] : [] ), 'dpsp_location_content' ); ?>
32
+
33
+ <?php
34
+ $available_networks = dpsp_get_networks();
35
+ echo dpsp_output_selectable_networks( $available_networks, ( ! empty( $dpsp_location_content['networks'] ) ? $dpsp_location_content['networks'] : [] ) );
36
+ ?>
37
+
38
+ </div>
39
+
40
+
41
+ <!-- Button Style Settings -->
42
+ <div class="dpsp-card">
43
+
44
+ <div class="dpsp-card-header">
45
+ <?php _e( 'Button Style', 'social-pug' ); ?>
46
+ </div>
47
+
48
+ <div class="dpsp-card-inner">
49
+
50
+ <?php $settings = dpsp_get_back_end_display_option( 'dpsp_location_content' ); ?>
51
+
52
+ <input type="radio" id="dpsp-settings-button-style-input-1" name="dpsp_location_content[button_style]" value="1" class="dpsp-settings-button-style-input" <?php echo isset( $dpsp_location_content['button_style'] ) && $dpsp_location_content['button_style'] == 1 ? 'checked="checked"' : ''; ?> />
53
+ <label for="dpsp-settings-button-style-input-1" class="dpsp-settings-button-style dpsp-transition">
54
+ <div class="dpsp-button-style-1 dpsp-has-icon-background dpsp-has-button-background dpsp-column-1 <?php echo ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' ); ?>">
55
+ <?php echo dpsp_get_output_network_buttons( $settings ); ?>
56
+ </div>
57
+ </label>
58
+
59
+ <input type="radio" id="dpsp-settings-button-style-input-2" name="dpsp_location_content[button_style]" value="2" class="dpsp-settings-button-style-input" <?php echo isset( $dpsp_location_content['button_style'] ) && $dpsp_location_content['button_style'] == 2 ? 'checked="checked"' : ''; ?> />
60
+ <label for="dpsp-settings-button-style-input-2" class="dpsp-settings-button-style dpsp-transition">
61
+ <div class="dpsp-button-style-2 dpsp-has-icon-background dpsp-has-icon-dark dpsp-has-button-background dpsp-column-1 <?php echo ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' ); ?>">
62
+ <?php echo dpsp_get_output_network_buttons( $settings ); ?>
63
+ </div>
64
+ </label>
65
+
66
+ <input type="radio" id="dpsp-settings-button-style-input-3" name="dpsp_location_content[button_style]" value="3" class="dpsp-settings-button-style-input" <?php echo isset( $dpsp_location_content['button_style'] ) && $dpsp_location_content['button_style'] == 3 ? 'checked="checked"' : ''; ?> />
67
+ <label for="dpsp-settings-button-style-input-3" class="dpsp-settings-button-style dpsp-transition">
68
+ <div class="dpsp-button-style-3 dpsp-column-1 dpsp-has-icon-background dpsp-button-hover <?php echo ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' ); ?>">
69
+ <?php echo dpsp_get_output_network_buttons( $settings ); ?>
70
+ </div>
71
+ </label>
72
+
73
+ <input type="radio" id="dpsp-settings-button-style-input-4" name="dpsp_location_content[button_style]" value="4" class="dpsp-settings-button-style-input" <?php echo isset( $dpsp_location_content['button_style'] ) && $dpsp_location_content['button_style'] == 4 ? 'checked="checked"' : ''; ?> />
74
+ <label for="dpsp-settings-button-style-input-4" class="dpsp-settings-button-style dpsp-transition">
75
+ <div class="dpsp-button-style-4 dpsp-column-1 dpsp-has-button-background dpsp-icon-hover <?php echo ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' ); ?>">
76
+ <?php echo dpsp_get_output_network_buttons( $settings ); ?>
77
+ </div>
78
+ </label>
79
+
80
+ <input type="radio" id="dpsp-settings-button-style-input-5" name="dpsp_location_content[button_style]" value="5" class="dpsp-settings-button-style-input" <?php echo isset( $dpsp_location_content['button_style'] ) && $dpsp_location_content['button_style'] == 5 ? 'checked="checked"' : ''; ?> />
81
+ <label for="dpsp-settings-button-style-input-5" class="dpsp-settings-button-style dpsp-transition">
82
+ <div class="dpsp-button-style-5 dpsp-column-1 dpsp-button-hover <?php echo ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' ); ?>">
83
+ <?php echo dpsp_get_output_network_buttons( $settings ); ?>
84
+ </div>
85
+ </label>
86
+
87
+ <input type="radio" id="dpsp-settings-button-style-input-6" name="dpsp_location_content[button_style]" value="6" class="dpsp-settings-button-style-input" <?php echo isset( $dpsp_location_content['button_style'] ) && $dpsp_location_content['button_style'] == 6 ? 'checked="checked"' : ''; ?> />
88
+ <label for="dpsp-settings-button-style-input-6" class="dpsp-settings-button-style dpsp-transition">
89
+ <div class="dpsp-button-style-6 dpsp-column-1 dpsp-has-icon-background <?php echo ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' ); ?>">
90
+ <?php echo dpsp_get_output_network_buttons( $settings ); ?>
91
+ </div>
92
+ </label>
93
+
94
+ <input type="radio" id="dpsp-settings-button-style-input-7" name="dpsp_location_content[button_style]" value="7" class="dpsp-settings-button-style-input" <?php echo isset( $dpsp_location_content['button_style'] ) && $dpsp_location_content['button_style'] == 7 ? 'checked="checked"' : ''; ?> />
95
+ <label for="dpsp-settings-button-style-input-7" class="dpsp-settings-button-style dpsp-transition">
96
+ <div class="dpsp-button-style-7 dpsp-column-1 dpsp-icon-hover <?php echo ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' ); ?>">
97
+ <?php echo dpsp_get_output_network_buttons( $settings ); ?>
98
+ </div>
99
+ </label>
100
+
101
+ <input type="radio" id="dpsp-settings-button-style-input-8" name="dpsp_location_content[button_style]" value="8" class="dpsp-settings-button-style-input" <?php echo isset( $dpsp_location_content['button_style'] ) && $dpsp_location_content['button_style'] == 8 ? 'checked="checked"' : ''; ?> />
102
+ <label for="dpsp-settings-button-style-input-8" class="dpsp-settings-button-style dpsp-transition">
103
+ <div class="dpsp-button-style-8 dpsp-column-1 <?php echo ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' ); ?>">
104
+ <?php echo dpsp_get_output_network_buttons( $settings ); ?>
105
+ </div>
106
+ </label>
107
+
108
+ </div>
109
+
110
+ </div>
111
+
112
+
113
+ <!-- General Display Settings -->
114
+ <div class="dpsp-card">
115
+
116
+ <div class="dpsp-card-header">
117
+ <?php _e( 'Display Settings', 'social-pug' ); ?>
118
+ </div>
119
+
120
+ <div class="dpsp-card-inner">
121
+
122
+ <?php
123
+ dpsp_settings_field(
124
+ 'select',
125
+ 'dpsp_location_content[display][shape]',
126
+ ( isset( $dpsp_location_content['display']['shape'] ) ? $dpsp_location_content['display']['shape'] : '' ),
127
+ __( 'Button shape', 'social-pug' ),
128
+ [
129
+ 'rectangular' => __( 'Rectangular', 'social-pug' ),
130
+ 'rounded' => __( 'Rounded', 'social-pug' ),
131
+ 'circle' => __(
132
+ 'Circle',
133
+ 'social-pug'
134
+ ),
135
+ ]
136
+ );
137
+ ?>
138
+
139
+ <?php
140
+ dpsp_settings_field(
141
+ 'select',
142
+ 'dpsp_location_content[display][size]',
143
+ ( isset( $dpsp_location_content['display']['size'] ) ? $dpsp_location_content['display']['size'] : '' ),
144
+ __( 'Button size', 'social-pug' ),
145
+ [
146
+ 'small' => __( 'Small', 'social-pug' ),
147
+ 'medium' => __( 'Medium', 'social-pug' ),
148
+ 'large' => __(
149
+ 'Large',
150
+ 'social-pug'
151
+ ),
152
+ ]
153
+ );
154
+ ?>
155
+
156
+ <?php dpsp_settings_field( 'switch', 'dpsp_location_content[display][icon_animation]', ( isset( $dpsp_location_content['display']['icon_animation'] ) ? $dpsp_location_content['display']['icon_animation'] : '' ), __( 'Show icon animation', 'social-pug' ), [ 'yes' ], __( 'Will animate the social media icon when the user hovers over the button.', 'social-pug' ) ); ?>
157
+
158
+ <?php
159
+ dpsp_settings_field(
160
+ 'select',
161
+ 'dpsp_location_content[display][position]',
162
+ ( isset( $dpsp_location_content['display']['position'] ) ? $dpsp_location_content['display']['position'] : '' ),
163
+ __( 'Buttons Position', 'social-pug' ),
164
+ [
165
+ 'top' => __( 'Above Content', 'social-pug' ),
166
+ 'bottom' => __( 'Below Content', 'social-pug' ),
167
+ 'both' => __(
168
+ 'Above and Below',
169
+ 'social-pug'
170
+ ),
171
+ ]
172
+ );
173
+ ?>
174
+
175
+ <?php
176
+ dpsp_settings_field(
177
+ 'select',
178
+ 'dpsp_location_content[display][column_count]',
179
+ ( isset( $dpsp_location_content['display']['column_count'] ) ? $dpsp_location_content['display']['column_count'] : '' ),
180
+ __( 'Number of columns', 'social-pug' ),
181
+ [
182
+ 'auto' => __( 'Width Auto', 'social-pug' ),
183
+ '1' => __( '1 column', 'social-pug' ),
184
+ '2' => __( '2 columns', 'social-pug' ),
185
+ '3' => __( '3 columns', 'social-pug' ),
186
+ '4' => __( '4 columns', 'social-pug' ),
187
+ '5' => __( '5 columns', 'social-pug' ),
188
+ '6' => __(
189
+ '6 columns',
190
+ 'social-pug'
191
+ ),
192
+ ]
193
+ );
194
+ ?>
195
+
196
+ <?php dpsp_settings_field( 'text', 'dpsp_location_content[display][message]', ( isset( $dpsp_location_content['display']['message'] ) ? $dpsp_location_content['display']['message'] : 'Sharing is caring!' ), __( 'Share Text', 'social-pug' ), '' ); ?>
197
+
198
+ <?php dpsp_settings_field( 'switch', 'dpsp_location_content[display][show_labels]', ( isset( $dpsp_location_content['display']['show_labels'] ) ? $dpsp_location_content['display']['show_labels'] : '' ), __( 'Show button labels', 'social-pug' ), [ 'yes' ] ); ?>
199
+
200
+ <?php dpsp_settings_field( 'switch', 'dpsp_location_content[display][spacing]', ( isset( $dpsp_location_content['display']['spacing'] ) ? $dpsp_location_content['display']['spacing'] : '' ), __( 'Button spacing', 'social-pug' ), [ 'yes' ] ); ?>
201
+
202
+ <?php dpsp_settings_field( 'switch', 'dpsp_location_content[display][show_mobile]', ( isset( $dpsp_location_content['display']['show_mobile'] ) ? $dpsp_location_content['display']['show_mobile'] : '' ), __( 'Show on mobile', 'social-pug' ), [ 'yes' ] ); ?>
203
+
204
+ <?php dpsp_settings_field( 'text', 'dpsp_location_content[display][screen_size]', ( isset( $dpsp_location_content['display']['screen_size'] ) ? $dpsp_location_content['display']['screen_size'] : '' ), __( 'Mobile screen width (pixels)', 'social-pug' ), '', __( 'For screen widths smaller than this value ( in pixels ) the buttons will be displayed on screen if the show on mobile option is checked.', 'social-pug' ) ); ?>
205
+
206
+ </div>
207
+
208
+ </div>
209
+
210
+
211
+ <!-- Share Counts -->
212
+ <div class="dpsp-card">
213
+
214
+ <div class="dpsp-card-header">
215
+ <?php _e( 'Buttons Share Counts', 'social-pug' ); ?>
216
+ </div>
217
+
218
+ <div class="dpsp-card-inner">
219
+
220
+ <?php dpsp_settings_field( 'switch', 'dpsp_location_content[display][show_count]', ( isset( $dpsp_location_content['display']['show_count'] ) ? $dpsp_location_content['display']['show_count'] : '' ), __( 'Show share count', 'social-pug' ), [ 'yes' ], __( 'Display the share count for each social network.', 'social-pug' ) ); ?>
221
+
222
+ <?php dpsp_settings_field( 'switch', 'dpsp_location_content[display][show_count_total]', ( isset( $dpsp_location_content['display']['show_count_total'] ) ? $dpsp_location_content['display']['show_count_total'] : '' ), __( 'Show total share count', 'social-pug' ), [ 'yes' ], __( 'Display the share count for all social networks.', 'social-pug' ) ); ?>
223
+
224
+ <?php
225
+ dpsp_settings_field(
226
+ 'select',
227
+ 'dpsp_location_content[display][total_count_position]',
228
+ ( isset( $dpsp_location_content['display']['total_count_position'] ) ? $dpsp_location_content['display']['total_count_position'] : '' ),
229
+ __( 'Total count position', 'social-pug' ),
230
+ [
231
+ 'before' => __( 'Before Buttons', 'social-pug' ),
232
+ 'after' => __(
233
+ 'After Buttons',
234
+ 'social-pug'
235
+ ),
236
+ ]
237
+ );
238
+ ?>
239
+
240
+ <?php dpsp_settings_field( 'switch', 'dpsp_location_content[display][count_round]', ( isset( $dpsp_location_content['display']['count_round'] ) ? $dpsp_location_content['display']['count_round'] : '' ), __( 'Share count round', 'social-pug' ), [ 'yes' ], __( 'If the share count for each network is bigger than 1000 it will be rounded to one decimal ( eg. 1267 will show as 1.2k ). Applies to Total Share Counts as well.', 'social-pug' ) ); ?>
241
+
242
+ <?php dpsp_settings_field( 'text', 'dpsp_location_content[display][minimum_count]', ( isset( $dpsp_location_content['display']['minimum_count'] ) ? $dpsp_location_content['display']['minimum_count'] : '' ), __( 'Minimum global share count', 'social-pug' ), '', __( 'Display share counts only if the total share count is higher than this value.', 'social-pug' ) ); ?>
243
+
244
+ <?php dpsp_settings_field( 'text', 'dpsp_location_content[display][minimum_individual_count]', ( isset( $dpsp_location_content['display']['minimum_individual_count'] ) ? $dpsp_location_content['display']['minimum_individual_count'] : '' ), __( 'Minimum individual share count', 'social-pug' ), '', __( 'Display share counts for an individual network only if the share count for that network is higher than this value.', 'social-pug' ) ); ?>
245
+
246
+ </div>
247
+
248
+ </div>
249
+
250
+
251
+ <!-- Custom Colors Settings -->
252
+ <div class="dpsp-card">
253
+
254
+ <div class="dpsp-card-header">
255
+ <?php _e( 'Buttons Custom Colors', 'social-pug' ); ?>
256
+ </div>
257
+
258
+ <div class="dpsp-card-inner">
259
+
260
+ <?php dpsp_settings_field( 'color-picker', 'dpsp_location_content[display][custom_color]', ( isset( $dpsp_location_content['display']['custom_color'] ) ? $dpsp_location_content['display']['custom_color'] : '' ), __( 'Buttons color', 'social-pug' ), '' ); ?>
261
+ <?php dpsp_settings_field( 'color-picker', 'dpsp_location_content[display][custom_hover_color]', ( isset( $dpsp_location_content['display']['custom_hover_color'] ) ? $dpsp_location_content['display']['custom_hover_color'] : '' ), __( 'Buttons hover color', 'social-pug' ), '' ); ?>
262
+
263
+ </div>
264
+
265
+ </div>
266
+
267
+
268
+ <!-- Post Type Display Settings -->
269
+ <div class="dpsp-card">
270
+
271
+ <div class="dpsp-card-header">
272
+ <?php _e( 'Post Type Display Settings', 'social-pug' ); ?>
273
+ </div>
274
+
275
+ <div class="dpsp-card-inner">
276
+
277
+ <?php dpsp_settings_field( 'checkbox', 'dpsp_location_content[post_type_display][]', ( isset( $dpsp_location_content['post_type_display'] ) ? $dpsp_location_content['post_type_display'] : [] ), '', dpsp_get_post_types() ); ?>
278
+
279
+ </div>
280
+
281
+ </div>
282
+
283
+
284
+ <!-- Save Changes Button -->
285
+ <input type="hidden" name="action" value="update" />
286
+ <p class="submit"><input type="submit" class="dpsp-button-primary" value="<?php _e( 'Save Changes' ); ?>" /></p>
287
+
288
+ </div>
289
+
290
+ </form>
291
+ <?php do_action( 'dpsp_submenu_page_bottom' ); ?>
inc/tools/share-sticky-bar/class-sticky-bar.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Mediavine\Grow\Tools;
3
+
4
+ class Sticky_Bar extends Tool {
5
+ use Renderable;
6
+
7
+ /**
8
+ * Sticky_Bar constructor. Set metadata and slug
9
+ */
10
+ public function init() {
11
+ $this->load_properties([
12
+ 'slug' => 'sticky_bar',
13
+ 'name' => __( 'Sticky Bar', 'social-pug' ),
14
+ 'type' => 'share_tool',
15
+ 'activation_setting' => 'dpsp_location_sticky_bar[active]',
16
+ 'img' => 'assets/dist/tool-mobile.' . DPSP_VERSION . '.png',
17
+ 'admin_page' => 'admin.php?page=dpsp-sticky-bar',
18
+ ]);
19
+ }
20
+
21
+ /**
22
+ * The rendering action of this tool
23
+ * @return string HTML output of tool
24
+ */
25
+ public function render() {
26
+ // @TODO Migrate functionality from global function to this class
27
+ $this->has_rendered = true;
28
+ return '';
29
+ }
30
+
31
+ }
inc/tools/share-sticky-bar/functions-frontend.php ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Check that the sticky bar has been added only once
4
+ global $dpsp_output_front_end_sticky_bar;
5
+
6
+ /*
7
+ * Function that displays the sticky bar sharing buttons
8
+ *
9
+ */
10
+ function dpsp_output_front_end_sticky_bar() {
11
+ // Only run if share sticky bar is active
12
+ if ( ! dpsp_is_tool_active( 'share_sticky_bar' ) ) {
13
+ return;
14
+ }
15
+
16
+ if ( ! dpsp_is_location_displayable( 'sticky_bar' ) ) {
17
+ return;
18
+ }
19
+
20
+ $tool_container = \Mediavine\Grow\Tools\Toolkit::get_instance();
21
+ $tool_instance = $tool_container->get( 'sticky_bar' );
22
+ if ( $tool_instance->has_rendered() ) {
23
+ return;
24
+ }
25
+ $tool_instance->render();
26
+
27
+ // Get saved settings
28
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_location_sticky_bar', [] );
29
+
30
+ // Classes for the wrapper
31
+ $wrapper_classes = [ 'dpsp-share-buttons-wrapper' ];
32
+ $wrapper_classes[] = ( isset( $settings['display']['shape'] ) ? 'dpsp-shape-' . $settings['display']['shape'] : '' );
33
+ $wrapper_classes[] = 'dpsp-size-small';
34
+ $wrapper_classes[] = ( isset( $settings['display']['show_count'] ) ? 'dpsp-has-buttons-count' : '' );
35
+ $wrapper_classes[] = ( empty( $settings['display']['show_after_scrolling'] ) ? 'opened' : '' );
36
+
37
+ // Button total share counts
38
+ $minimum_count = ( ! empty( $settings['display']['minimum_count'] ) ? (int) $settings['display']['minimum_count'] : 0 );
39
+ $show_total_count = ( $minimum_count <= (int) dpsp_get_post_total_share_count() && ! empty( $settings['display']['show_count_total'] ) ? true : false );
40
+
41
+ $wrapper_classes[] = ( $show_total_count ? 'dpsp-show-total-share-count' : '' );
42
+ $wrapper_classes[] = ( $show_total_count ? ( ! empty( $settings['display']['total_count_position'] ) ? 'dpsp-show-total-share-count-' . $settings['display']['total_count_position'] : 'dpsp-show-total-share-count-before' ) : '' );
43
+
44
+ // Button styles
45
+ $wrapper_classes[] = 'dpsp-button-style-1';
46
+
47
+ $wrapper_classes = implode( ' ', $wrapper_classes );
48
+
49
+ // Set trigger extra data
50
+ $trigger_data = [];
51
+ $trigger_data[] = 'data-trigger-scroll="' . ( isset( $settings['display']['show_after_scrolling'] ) ? ( ! empty( $settings['display']['scroll_distance'] ) ? (int) str_replace( '%', '', trim( $settings['display']['scroll_distance'] ) ) : 0 ) : 'false' ) . '"';
52
+ $trigger_data = implode( ' ', array_filter( $trigger_data ) );
53
+
54
+ $output = '<div id="dpsp-sticky-bar-wrapper" class="' . ( ! empty( $settings['display']['intro_animation'] ) && $settings['display']['intro_animation'] != '-1' ? 'dpsp-animation-' . esc_attr( $settings['display']['intro_animation'] ) : 'dpsp-no-animation' ) . ' ' . ( ! empty( $settings['display']['show_on_device'] ) ? 'dpsp-device-' . esc_attr( $settings['display']['show_on_device'] ) : 'dpsp-device-mobile' ) . ' ' . ( ! empty( $settings['display']['position_desktop'] ) ? 'dpsp-position-desktop-' . esc_attr( $settings['display']['position_desktop'] ) : 'dpsp-position-desktop-bottom' ) . ' ' . ( ! empty( $settings['display']['position_mobile'] ) ? 'dpsp-position-mobile-' . esc_attr( $settings['display']['position_mobile'] ) : 'dpsp-position-mobile-bottom' ) . '" ' . $trigger_data . '>';
55
+
56
+ $output .= '<div id="dpsp-sticky-bar" class="' . $wrapper_classes . '">';
57
+
58
+ // Output total share counts
59
+ if ( $show_total_count ) {
60
+ $output .= dpsp_get_output_total_share_count( 'sticky_bar' );
61
+ }
62
+
63
+ // Gets the social networks buttons
64
+ if ( isset( $settings['networks'] ) ) {
65
+ $output .= dpsp_get_output_network_buttons( $settings, 'share', 'sticky_bar' );
66
+ }
67
+
68
+ $output .= '</div>';
69
+
70
+ $output .= '</div>';
71
+
72
+ // Echo the final output
73
+ echo apply_filters( 'dpsp_output_front_end_sticky_bar', $output );
74
+
75
+ }
76
+
77
+ /**
78
+ * Adds extra mark-up just after the content so we know the position and width of the content wrapper
79
+ *
80
+ */
81
+ function dpsp_output_front_end_sticky_bar_content_markup( $content ) {
82
+ // Only run if share sticky bar is active
83
+ if ( ! dpsp_is_tool_active( 'share_sticky_bar' ) ) {
84
+ return $content;
85
+ }
86
+
87
+ if ( ! is_singular() ) {
88
+ return $content;
89
+ }
90
+
91
+ if ( ! is_main_query() ) {
92
+ return $content;
93
+ }
94
+
95
+ /**
96
+ * Return the content if the output for this callback isn't permitted by filters
97
+ *
98
+ * This filter has been added for edge cases
99
+ *
100
+ */
101
+ if ( false === apply_filters( 'dpsp_output_the_content_callback', true ) ) {
102
+ return $content;
103
+ }
104
+
105
+ if ( \Mediavine\Grow\Integrations\Container::has_location( 'output_sticky_bar_content_markup' ) ) {
106
+ \Mediavine\Grow\Integrations\Container::do_location( 'output_sticky_bar_content_markup' );
107
+ return $content;
108
+ }
109
+
110
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_location_sticky_bar', [] );
111
+
112
+ $content = '<span id="dpsp-post-sticky-bar-markup" data-mobile-size="' . ( ! empty( $settings['display']['screen_size'] ) ? absint( $settings['display']['screen_size'] ) : 720 ) . '"></span>' . $content;
113
+
114
+ return $content;
115
+
116
+ }
117
+
118
+ function dpsp_sticky_bar_content_data( $data = [] ) {
119
+ // Only run if share sticky bar is active
120
+ if ( ! dpsp_is_tool_active( 'share_sticky_bar' ) ) {
121
+ return $data;
122
+ }
123
+
124
+ $settings = Mediavine\Grow\Settings::get_setting( 'dpsp_location_sticky_bar', [] );
125
+ $data['stickyBar'] = [
126
+ 'mobileSize' => ( ! empty( $settings['display']['screen_size'] ) ? absint( $settings['display']['screen_size'] ) : 720 ),
127
+ 'hasSticky' => is_singular() && is_main_query() && dpsp_is_tool_active( 'share_sticky_bar' ) ? '1' : '0',
128
+ ];
129
+ return $data;
130
+ }
inc/tools/share-sticky-bar/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/tools/share-sticky-bar/share-sticky-bar.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Add the share sticky bar tool to the toolkit array
5
+ *
6
+ * @param array $tools
7
+ *
8
+ * @return array
9
+ *
10
+ */
11
+ function dpsp_tool_share_sticky_bar( $tools = [] ) {
12
+
13
+ $tools['share_sticky_bar'] = [
14
+ 'name' => __( 'Sticky Bar', 'social-pug' ),
15
+ 'type' => 'share_tool',
16
+ 'activation_setting' => 'dpsp_location_sticky_bar[active]',
17
+ 'img' => 'assets/dist/tool-mobile.' . DPSP_VERSION . '.png',
18
+ 'admin_page' => 'admin.php?page=dpsp-sticky-bar',
19
+ ];
20
+
21
+ return $tools;
22
+
23
+ }
24
+
25
+ /**
26
+ * Register the Sticky Bar hooks.
27
+ */
28
+ function dpsp_register_sticky_bar() {
29
+ add_filter( 'dpsp_get_tools', 'dpsp_tool_share_sticky_bar', 20 );
30
+
31
+ add_action( 'wp_footer', 'dpsp_output_front_end_sticky_bar' );
32
+ add_filter( 'the_content', 'dpsp_output_front_end_sticky_bar_content_markup' );
33
+ add_filter( 'mv_grow_frontend_data', 'dpsp_sticky_bar_content_data' );
34
+
35
+ add_action( 'admin_menu', 'dpsp_register_sticky_bar_subpage', 40 );
36
+ add_action( 'admin_init', 'dpsp_sticky_bar_register_settings' );
37
+ }
inc/tools/share-sticky-bar/submenu-page-sticky-bar.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Function that creates the sub-menu item and page for the sticky bar location of the share buttons
5
+ *
6
+ * @return void
7
+ *
8
+ */
9
+ function dpsp_register_sticky_bar_subpage() {
10
+ // Only run if share sticky bar is active
11
+ if ( ! dpsp_is_tool_active( 'share_sticky_bar' ) ) {
12
+ return;
13
+ }
14
+
15
+ add_submenu_page( 'dpsp-social-pug', __( 'Sticky Bar', 'social-pug' ), __( 'Sticky Bar', 'social-pug' ), 'manage_options', 'dpsp-sticky-bar', 'dpsp_sticky_bar_subpage' );
16
+
17
+ }
18
+
19
+ /**
20
+ * Outputs content to the sticky bar icons subpage.
21
+ */
22
+ function dpsp_sticky_bar_subpage() {
23
+ include DPSP_PLUGIN_DIR . '/inc/tools/share-sticky-bar/views/view-submenu-page-sticky-bar.php';
24
+ }
25
+
26
+
27
+ /**
28
+ * Registers the settings for the sticky bar
29
+ *
30
+ */
31
+ function dpsp_sticky_bar_register_settings() {
32
+ // Only run if share sticky bar is active
33
+ if ( ! dpsp_is_tool_active( 'share_sticky_bar' ) ) {
34
+ return;
35
+ }
36
+
37
+ register_setting( 'dpsp_location_sticky_bar', 'dpsp_location_sticky_bar', 'dpsp_sticky_bar_settings_sanitize' );
38
+
39
+ }
40
+
41
+ /**
42
+ * Filter and sanitize settings
43
+ *
44
+ * @param array $new_settings
45
+ *
46
+ * @return array
47
+ *
48
+ */
49
+ function dpsp_sticky_bar_settings_sanitize( $new_settings ) {
50
+
51
+ // Save default values even if values do not exist
52
+ if ( ! isset( $new_settings['networks'] ) ) {
53
+ $new_settings['networks'] = [];
54
+ }
55
+
56
+ if ( ! isset( $new_settings['button_style'] ) ) {
57
+ $new_settings['button_style'] = 1;
58
+ }
59
+
60
+ // Add default screen size to display the buttons
61
+ if ( empty( $new_settings['display']['screen_size'] ) ) {
62
+ $new_settings['display']['screen_size'] = '720';
63
+ }
64
+
65
+ // Remove "px", "pixels" or "pixel" if found
66
+ $new_settings['display']['screen_size'] = str_replace( 'px', '', $new_settings['display']['screen_size'] );
67
+ $new_settings['display']['screen_size'] = str_replace( 'pixels', '', $new_settings['display']['screen_size'] );
68
+ $new_settings['display']['screen_size'] = str_replace( 'pixel', '', $new_settings['display']['screen_size'] );
69
+ $new_settings['display']['screen_size'] = trim( $new_settings['display']['screen_size'] );
70
+
71
+ $new_settings = dpsp_array_strip_script_tags( $new_settings );
72
+
73
+ return $new_settings;
74
+
75
+ }
inc/tools/share-sticky-bar/views/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
inc/tools/share-sticky-bar/views/view-submenu-page-sticky-bar.php ADDED
@@ -0,0 +1,225 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <form method="post" action="options.php">
2
+ <div class="dpsp-page-wrapper dpsp-page-sticky-bar wrap">
3
+
4
+ <?php
5
+ $dpsp_location_sticky_bar = Mediavine\Grow\Settings::get_setting( 'dpsp_location_sticky_bar', 'not_set' );
6
+ settings_fields( 'dpsp_location_sticky_bar' );
7
+ ?>
8
+
9
+
10
+ <!-- Page Title -->
11
+ <h1 class="dpsp-page-title">
12
+ <?php _e( 'Configure Sticky Bar Sharing Buttons', 'social-pug' ); ?>
13
+
14
+ <input type="hidden" name="dpsp_buttons_location" value="dpsp_location_sticky_bar" />
15
+ <input type="hidden" name="dpsp_location_sticky_bar[active]" value="<?php echo