Comments – wpDiscuz - Version 7.0.4

Version Description

Download this release

Release Info

Developer AdvancedCoding
Plugin Icon 128x128 Comments – wpDiscuz
Version 7.0.4
Comparing to
See all releases

Code changes from version 7.0.3 to 7.0.4

Files changed (64) hide show
  1. assets/css/wpdiscuz-options.css +10 -0
  2. assets/js/wpdiscuz-combo-no_quill.min.js +3 -3
  3. assets/js/wpdiscuz-combo.min.js +3 -3
  4. assets/js/wpdiscuz-options.js +15 -15
  5. assets/js/wpdiscuz-social.js +1 -1
  6. assets/js/wpdiscuz-social.min.js +1 -1
  7. assets/js/wpdiscuz-user-content.js +7 -6
  8. assets/js/wpdiscuz-user-content.min.js +1 -1
  9. assets/js/wpdiscuz.js +11 -8
  10. assets/js/wpdiscuz.min.js +1 -1
  11. assets/third-party/font-awesome-5.13.0/css/fa.min.css +1 -1
  12. assets/third-party/quicktags/index.html +0 -0
  13. assets/third-party/quicktags/wpdiscuz-quictags.js +35 -0
  14. class.WpdiscuzCore.php +54 -38
  15. forms/wpDiscuzForm.php +8 -5
  16. forms/wpdFormAttr/Field/AgreementCheckbox.php +1 -1
  17. forms/wpdFormAttr/Form.php +34 -28
  18. forms/wpdFormAttr/Login/SocialLogin.php +5 -3
  19. forms/wpdFormAttr/Row.php +0 -3
  20. includes/class.WpdiscuzDBManager.php +70 -20
  21. includes/interface.WpDiscuzConstants.php +1 -1
  22. options/class.WpdiscuzOptions.php +59 -10
  23. options/html-options.php +4 -4
  24. options/html-tools_old.php +0 -72
  25. options/options-layouts/html-content.php +16 -12
  26. options/options-layouts/html-form.php +24 -6
  27. options/options-layouts/html-general.php +26 -16
  28. options/options-layouts/html-inline.php +2 -2
  29. options/options-layouts/html-labels.php +2 -2
  30. options/options-layouts/html-live.php +9 -9
  31. options/options-layouts/html-login.php +22 -8
  32. options/options-layouts/html-moderation.php +6 -6
  33. options/options-layouts/html-rating.php +5 -3
  34. options/options-layouts/html-recaptcha.php +8 -8
  35. options/options-layouts/html-social.php +98 -56
  36. options/options-layouts/html-subscription.php +13 -11
  37. options/options-layouts/html-thread_display.php +30 -10
  38. options/options-layouts/html-thread_layouts.php +14 -12
  39. options/options-layouts/html-thread_styles.php +5 -5
  40. options/phrases-layouts/phrases-email.php +4 -0
  41. options/phrases-layouts/phrases-follow.php +1 -0
  42. options/tools-layouts/tool-images.php +68 -17
  43. options/tools-layouts/tool-subscriptions.php +26 -6
  44. options/tools-layouts_old/fix-tables.php +0 -24
  45. options/tools-layouts_old/images-import.php +0 -46
  46. options/tools-layouts_old/options-export.php +0 -35
  47. options/tools-layouts_old/options-import.php +0 -29
  48. options/tools-layouts_old/phrases-export.php +0 -35
  49. options/tools-layouts_old/phrases-import.php +0 -29
  50. options/tools-layouts_old/rebuild-ratings.php +0 -29
  51. options/tools-layouts_old/regenerate-closed-comments.php +0 -31
  52. options/tools-layouts_old/regenerate-vote-data.php +0 -31
  53. options/tools-layouts_old/regenerate-vote-metas.php +0 -31
  54. options/tools-layouts_old/subscriptions-import.php +0 -31
  55. options/tools-layouts_old/sync-commenter-data.php +0 -25
  56. readme.txt +23 -1
  57. themes/default/class.WpdiscuzWalker.php +2 -1
  58. themes/default/comment-form.php +13 -8
  59. themes/default/style-rtl.css +25 -18
  60. themes/default/style.css +23 -10
  61. utils/class.WpdiscuzHelper.php +43 -23
  62. utils/class.WpdiscuzHelperAjax.php +22 -76
  63. utils/class.WpdiscuzHelperEmail.php +9 -8
  64. utils/class.WpdiscuzHelperUpload.php +86 -57
assets/css/wpdiscuz-options.css CHANGED
@@ -331,6 +331,16 @@
331
  #wpd-setbox .wpd-setcon .wpd-opt-row .wpd-opt-input .wpd-optset .wpd-switcher{margin: 0px;}
332
  #wpd-setbox .wpd-setcon .wpd-opt-row .wpd-opt-input .wpd-optset .wpd-optset-label{padding: 0px 10px 2px 10px; color: #777777;}
333
  #wpd-setbox .wpd-setcon .wpd-opt-row .wpd-opt-intro{width: calc(100% - 40px); font-size: 15px; line-height: 22px; padding: 5px 0px 20px 0px; text-align: justify;}
 
 
 
 
 
 
 
 
 
 
334
  #wpd-setbox .wpd-setbar .wpd-box.wpd-menu-group{width: 100%; }
335
  #wpd-setbox .wpd-setbar .wpd-box.wpd-menu-group:first-child{margin-bottom: 20px;}
336
  #wpd-setbox .wpd-setbar ul{width: 100%; margin: 0px; padding: 0px; box-sizing: border-box;}
331
  #wpd-setbox .wpd-setcon .wpd-opt-row .wpd-opt-input .wpd-optset .wpd-switcher{margin: 0px;}
332
  #wpd-setbox .wpd-setcon .wpd-opt-row .wpd-opt-input .wpd-optset .wpd-optset-label{padding: 0px 10px 2px 10px; color: #777777;}
333
  #wpd-setbox .wpd-setcon .wpd-opt-row .wpd-opt-intro{width: calc(100% - 40px); font-size: 15px; line-height: 22px; padding: 5px 0px 20px 0px; text-align: justify;}
334
+ #wpd-setbox .wpd-setcon .wpd-opt-row.wpd-custom-option-group-wrapper{flex-wrap:wrap;}
335
+ #wpd-setbox .wpd-setcon .wpd-opt-row.wpd-custom-option-group-wrapper .wpd-opt-input{width:100%;}
336
+ #wpd-setbox .wpd-setcon .wpd-opt-row.wpd-custom-option-group-wrapper .wpd-custom-option-group{margin-top:10px;display:flex;align-items:center;justify-content:space-between;}
337
+ #wpd-setbox .wpd-setcon .wpd-opt-row.wpd-custom-option-group-wrapper .wpd-custom-option-group.wpd-custom-option-group-default{display:none !important;}
338
+ #wpd-setbox .wpd-setcon .wpd-opt-row.wpd-custom-option-group-wrapper .wpd-custom-option-group .wpd-custom-option-label{width: 28%;}
339
+ #wpd-setbox .wpd-setcon .wpd-opt-row.wpd-custom-option-group-wrapper .wpd-custom-option-group .wpd-custom-option-value{width: 68%;}
340
+ #wpd-setbox .wpd-setcon .wpd-opt-row.wpd-custom-option-group-wrapper .wpd-custom-option-group .dashicons.dashicons-trash{color:#e51c23;cursor:pointer;}
341
+ #wpd-setbox .wpd-setcon .wpd-opt-row.wpd-custom-option-group-wrapper .wpd-custom-option-group-add{display:flex;align-items:center;justify-content:center;color:#07B290;background-color:#f5f5f5;margin:10px 0;height: 20px;font-size:23px;padding:15px;cursor:pointer;}
342
+ #wpd-setbox .wpd-setcon .wpd-opt-row.wpd-custom-option-group-wrapper .wpd-custom-option-group-add:hover{color:#f5f5f5;background-color:#07B290;}
343
+ #wpd-setbox .wpd-setcon .wpd-opt-row.wpd-custom-option-group-wrapper .wpd-custom-option-group-add .dashicons.dashicons-plus{font-size:40px;width:40px;height:35px;}
344
  #wpd-setbox .wpd-setbar .wpd-box.wpd-menu-group{width: 100%; }
345
  #wpd-setbox .wpd-setbar .wpd-box.wpd-menu-group:first-child{margin-bottom: 20px;}
346
  #wpd-setbox .wpd-setbar ul{width: 100%; margin: 0px; padding: 0px; box-sizing: border-box;}
assets/js/wpdiscuz-combo-no_quill.min.js CHANGED
@@ -3,7 +3,7 @@
3
  /* Autogrow */
4
  jQuery.fn.autoGrow=function(){return this.each(function(){var createMirror=function(textarea){jQuery(textarea).after('<div class="autogrow-textarea-mirror"></div>');return jQuery(textarea).next(".autogrow-textarea-mirror")[0]};var sendContentToMirror=function(textarea){mirror.innerHTML=String(textarea.value).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br />")+".<br/>.";if(jQuery(textarea).height()!=jQuery(mirror).height())jQuery(textarea).height(jQuery(mirror).height())};var growTextarea=function(){sendContentToMirror(this)};var mirror=createMirror(this);mirror.style.display="none";mirror.style.wordWrap="break-word";mirror.style.padding=jQuery(this).css("padding");mirror.style.width=jQuery(this).css("width");mirror.style.fontFamily=jQuery(this).css("font-family");mirror.style.fontSize=jQuery(this).css("font-size");mirror.style.lineHeight=jQuery(this).css("line-height");this.style.overflow="hidden";this.style.minHeight=this.rows+"em";this.onkeydown=growTextarea;sendContentToMirror(this)})};
5
  /* wpDiscuz */
6
- var wpdiscuzLoadRichEditor=parseInt(wpdiscuzAjaxObj.loadRichEditor);if(wpdiscuzLoadRichEditor)var wpDiscuzEditor=new WpdEditor;function wpdMessagesOnInit(e,t){wpdiscuzAjaxObj.setCommentMessage(e,t),setTimeout(function(){location.href=location.href.substring(0,location.href.indexOf("wpdiscuzUrlAnchor")-1)},3e3)}wpdiscuzAjaxObj.setCommentMessage=function(e,t,a){var o="wpdiscuz-message-error";if("[object Array]"===Object.prototype.toString.call(e))for(var d in e)"[object Array]"===Object.prototype.toString.call(t)?"success"===t[d]?o="wpdiscuz-message-success":"warning"===t[d]&&(o="wpdiscuz-message-warning"):"success"===t?o="wpdiscuz-message-success":"warning"===t&&(o="wpdiscuz-message-warning"),jQuery("<div/>").addClass(o).html(e[d]).prependTo("#wpdiscuz-comment-message").delay("[object Array]"===Object.prototype.toString.call(a)?a[d]:a||4e3).fadeOut(1e3,function(){jQuery(this).remove()});else"success"===t?o="wpdiscuz-message-success":"warning"===t&&(o="wpdiscuz-message-warning"),jQuery("<div/>").addClass(o).html(e).prependTo("#wpdiscuz-comment-message").delay(a||4e3).fadeOut(1e3,function(){jQuery(this).remove()})},jQuery(document).ready(function(e){e("body").addClass("wpdiscuz_"+wpdiscuzAjaxObj.version);var t=wpdiscuzAjaxObj.is_user_logged_in,a=1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!t,o=1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&t,d=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,n=parseInt(wpdiscuzAjaxObj.commentListLoadType),s=parseInt(wpdiscuzAjaxObj.wc_post_id),i=parseInt(wpdiscuzAjaxObj.commentListUpdateType),c=1e3*parseInt(wpdiscuzAjaxObj.commentListUpdateTimer),p=parseInt(wpdiscuzAjaxObj.liveUpdateGuests),r=wpdiscuzAjaxObj.loadLastCommentId,l=r,m=parseInt(wpdiscuzAjaxObj.firstLoadWithAjax);Cookies.get("wpdiscuz_comments_sorting")&&Cookies.remove("wpdiscuz_comments_sorting",{path:""}),Cookies.get("wordpress_last_visit")&&Cookies.remove("wordpress_last_visit",{path:""}),Cookies.get("wpdiscuz_last_visit")&&Cookies.remove("wpdiscuz_last_visit",{path:""});var w,u=wpdiscuzAjaxObj.storeCommenterData,f=parseInt(wpdiscuzAjaxObj.wmuEnabled),h=wpdiscuzAjaxObj.isCookiesEnabled,b=!0,g=wpdiscuzAjaxObj.cookiehash,_=parseInt(wpdiscuzAjaxObj.isLoadOnlyParentComments),v=parseInt(wpdiscuzAjaxObj.enableDropAnimation)?500:0,z=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),j=parseInt(wpdiscuzAjaxObj.enableBubble),C=parseInt(wpdiscuzAjaxObj.bubbleLiveUpdate),k=parseInt(wpdiscuzAjaxObj.bubbleHintTimeout),x=parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout)?parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout):5,y=parseInt(wpdiscuzAjaxObj.bubbleShowNewCommentMessage),O=wpdiscuzAjaxObj.bubbleLocation,A=wpdiscuzAjaxObj.inlineFeedbackAttractionType,I=[],T=[],D=[],E=!1,M=1;(e(".wc_social_plugin_wrapper .wp-social-login-provider-list").length?e(".wc_social_plugin_wrapper .wp-social-login-provider-list").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .the_champ_login_container").length?e(".wc_social_plugin_wrapper .the_champ_login_container").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .social_connect_form").length?e(".wc_social_plugin_wrapper .social_connect_form").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .oneall_social_login_providers").length&&e(".wc_social_plugin_wrapper .oneall_social_login .oneall_social_login_providers").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"),wpdiscuzLoadRichEditor&&e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0"),e(document).delegate("#wpdcom .ql-editor, #wpdcom .wc_comment","focus",function(){e(".wpd-form-foot",e(this).parents(".wpd_comm_form")).slideDown(v)}),e(document).delegate("#wpdcom textarea","focus",function(){e(this).next(".autogrow-textarea-mirror").length||e(this).autoGrow()}),t)||S({comment_author:Cookies.get("comment_author_"+g),comment_author_email:Cookies.get("comment_author_email_"+g),comment_author_url:Cookies.get("comment_author_url_"+g)});if(e(".wpd-vote-down.wpd-dislike-hidden").remove(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd"),e(document).delegate("#wpd-editor-source-code-wrapper-bg","click",function(){e(this).hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),wpdiscuzLoadRichEditor&&e(document).delegate("#wpd-insert-source-code","click",function(){var t=wpDiscuzEditor.createEditor("#"+e("#wpd-editor-uid").val());t.deleteText(0,t.getLength(),Quill.sources.USER);var a=e("#wpd-editor-source-code").val();a.length&&t.clipboard.dangerouslyPasteHTML(0,a,Quill.sources.USER),t.update(),e("#wpd-editor-source-code-wrapper-bg").hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),e(document).delegate(".wpd-reply-button","click",function(){var n=V(e(this),0);e(this).hasClass("wpdiscuz-clonned")?(wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+n).focus()},v):setTimeout(function(){e("#wc-textarea-"+n).trigger("focus")},v),e("#wpd-secondary-form-wrapper-"+n).slideToggle(v)):function(a){var o=V(a,0);e("#wpdiscuz_form_anchor-"+o).before(function(t){return e("#wpdiscuz_hidden_secondary_form").html().replace(/wpdiscuzuniqueid/g,t)}(o));var d=e("#wpd-secondary-form-wrapper-"+o);if(!t){var n={comment_author:Cookies.get("comment_author_"+g),comment_author_email:Cookies.get("comment_author_email_"+g),comment_author_url:Cookies.get("comment_author_url_"+g)};S(n)}wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+o).focus()},v):setTimeout(function(){e("#wc-textarea-"+o).trigger("focus")},v);d.slideToggle(v,function(){a.addClass("wpdiscuz-clonned")})}(e(this)),function(t){if((a||o)&&"2.0"===d){var n=B(t);setTimeout(function(){if(!T[n])try{T[n]=grecaptcha.render("wpdiscuz-recaptcha-"+t,{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(a){e("#wpdiscuz-recaptcha-field-"+t).val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-"+t).val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}},1e3)}}(n)}),e(document).delegate("#wpdcom .wpd-comment-link [data-comment-url]","click",function(){var t=e(this).data("comment-url"),a=e("<input/>");a.appendTo("body").css({position:"absolute",top:"-10000000px"}).val(t),a.select(),document.execCommand("copy"),a.remove(),wpdiscuzAjaxObj.setCommentMessage(t+"<br/>"+wpdiscuzAjaxObj.wc_copied_to_clipboard,"success",5e3)}),e(document).delegate(".wpdiscuz-nofollow,.wc_captcha_refresh_img,.wpd-load-more-submit","click",function(e){e.preventDefault()}),e(document).delegate(".wpd-toggle.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked");var a=V(e(this),0),o=e(this),d=e(".fas",o);!o.parents(".wpd-comment:not(.wpd-reply)").children(".wpd-reply").length&&_?function(t,a){var o=B(t),d=new FormData;d.append("action","wpdShowReplies"),d.append("commentId",o),ce(z,!0,d).done(function(o){a.addClass("wpd_not_clicked"),"object"==typeof o&&o.success&&(e("#wpd-comm-"+t).replaceWith(o.data.comment_list),e("#wpd-comm-"+t+" .wpd-toggle .fas").removeClass("fa-chevron-down").addClass("fa-chevron-up"),e("#wpd-comm-"+t+" .wpd-toggle").attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text),e("#wpd-comm-"+t+" .wpd-toggle .wpd-view-replies").remove(),ie(o)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,d){console.log(d),a.addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}(a,t):e("#wpd-comm-"+a+"> .wpd-reply").slideToggle(700,function(){e(this).is(":hidden")?(d.removeClass("fa-chevron-up"),d.addClass("fa-chevron-down"),o.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_show_replies_text)):(d.removeClass("fa-chevron-down"),d.addClass("fa-chevron-up"),o.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text)),t.addClass("wpd_not_clicked")})}),e(document).delegate(".wpd-new-loaded-comment","mouseenter",function(){e(this).removeClass("wpd-new-loaded-comment")}),e(document).delegate(".wpd-sbs-toggle","click",function(){e(".wpdiscuz-subscribe-bar").slideToggle(v)}),parseInt(wpdiscuzAjaxObj.wpDiscuzIsShowOnSubscribeForm)&&!t&&wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&("2.0"===d?(setTimeout(function(){try{grecaptcha.render("wpdiscuz-recaptcha-subscribe-form",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-subscribe-form").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}},1e3),e(document).delegate("#wpdiscuz-subscribe-form","submit",function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val()?e(".wpdiscuz-recaptcha",e(this)).css("border","none"):(e(".wpdiscuz-recaptcha",e(this)).css("border","1px solid red"),t.preventDefault())})):"3.0"===d&&e(document).delegate("#wpdiscuz_subscription_button","click",function(t){var a=e(this).parents("#wpdiscuz-subscribe-form");t.preventDefault();try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/wpdAddSubscription"}).then(function(e){console.log(5555),document.getElementById("wpdiscuz-recaptcha-field-subscribe-form").value=e,a.submit()},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error")}})),(a||o)&&"2.0"===d){var F=e(window).width(),L=e("#wpdcom").width();L>=1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"65%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"35%"})),L>=940&&L<1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"60%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"40%"})),L>=810&&L<940&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"60%"})),L>=730&&L<810&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"45%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"55%"})),L>=610&&L<730&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.85)","-webkit-transform":"scale(0.85)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"43%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"55%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"})),F>650&&(L>=510&&L<610&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"35%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"63%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%",position:"relative",right:"-60px"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),L>=470&&L<510&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"60%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd_main_comm_form .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),L<470&&(e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({margin:"0px auto","transform-origin":"center 0","-webkit-transform-origin":"center 0"}),e("#wpdcom .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc_notification_checkboxes").css({"text-align":"center"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-field-submit").css({"text-align":"center"})))}function R(t,a,o){ce(z||f,!1,a).done(function(a){if(e(o).addClass("wpd_not_clicked"),"object"==typeof a)if(a.success){"collapsed"===wpdiscuzAjaxObj.commentFormView&&e(".wpd-form-foot",t).slideUp(v),e(".wpd-thread-info").html(a.data.wc_all_comments_count_new_html),a.data.wc_all_comments_count_new=parseInt(a.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").text(a.data.wc_all_comments_count_new),a.data.wc_all_comments_count_new?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide();var d=v;a.data.is_main?X(a.data.message):(d=v+700,e("#wpd-secondary-form-wrapper-"+a.data.uniqueid).slideToggle(700),1==a.data.is_in_same_container?e("#wpd-secondary-form-wrapper-"+a.data.uniqueid).after(a.data.message):e("#wpd-comm-"+a.data.uniqueid).after(a.data.message)),function(e){if(!e.data.held_moderate){var t=new FormData;t.append("action","wpdCheckNotificationType"),t.append("comment_id",e.data.new_comment_id),t.append("email",e.data.comment_author_email),t.append("isParent",e.data.is_main),ce(z,!0,t)}}(a),function(e){if(e.data.redirect>0&&e.data.new_comment_id){var t=new FormData;t.append("action","wpdRedirect"),t.append("commentId",e.data.new_comment_id),ce(z,!0,t).done(function(e){"object"==typeof e&&e.success&&setTimeout(function(){location.href=e.data},2e3)}).fail(function(e,t,a){console.log(a)})}}(a),h&&b?function(t){var a=t.comment_author_email,o=t.comment_author,d=t.comment_author_url;null==u?(Cookies.set("comment_author_email_"+g,a),Cookies.set("comment_author_"+g,o),d.length&&Cookies.set("comment_author_url_"+g,d)):(u=parseInt(u),Cookies.set("comment_author_email_"+g,a,{expires:u,path:"/"}),Cookies.set("comment_author_"+g,o,{expires:u,path:"/"}),d.length&&Cookies.set("comment_author_url_"+g,d,{expires:u,path:"/"}));e(".wpd-cookies-checkbox").length&&e(".wpd-cookies-checkbox").attr("checked","checked")}(a.data):b||e(".wpd-cookies-checkbox").removeAttr("checked"),wpdiscuzLoadRichEditor&&wpDiscuzEditor.createEditor("#wpd-editor-"+e(".wpdiscuz_unique_id",t).val()).setContents([{insert:"\n"}]),t.get(0).reset(),S(a.data),e(".wmu-preview-wrap",t).remove(),I.length&&(I.forEach(function(e){e.parents(".wpd-field-checkbox").remove()}),I=[]),parseInt(wpdiscuzAjaxObj.scrollToComment)&&setTimeout(function(){e("html, body").animate({scrollTop:e("#comment-"+a.data.new_comment_id).offset().top-32},1e3)},d),ie(a,t)}else a.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"),ie(a,t));else wpdiscuzAjaxObj.setCommentMessage(a,"error");e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,d){console.log(d),e(o).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}function S(t){e(".wpd_comm_form .wc_name").val(t.comment_author),t.comment_author_email&&t.comment_author_email.indexOf("@example.com")<0&&e(".wpd_comm_form .wc_email").val(t.comment_author_email),t.comment_author_url&&e(".wpd_comm_form .wc_website").val(t.comment_author_url)}function q(t,a){e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").show(),e("#wpd-comm-"+t+" .wpdiscuz-edit-form-wrap").replaceWith(a),e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").show()}e(document).delegate(".wc_comm_submit.wpd_not_clicked","click",function(){var t=e(this),n=1,s=e(this).parents("form");if(s.hasClass("wpd_main_comm_form")||(n=function(t){var a=t.attr("class").split(" "),o="";return e.each(a,function(e,t){"wpd_comment_level"===G(t,!1)&&(o=G(t,!0))}),parseInt(o)+1}(e(this).parents(".wpd-comment"))),J(s,"#wpd-editor-"+e(".wpdiscuz_unique_id",s).val()),s.submit(function(e){e.preventDefault()}),""!==e(".wc_comment",s).val().trim()&&"&nbsp;"!==e(".wc_comment",s).val().trim()){if(s[0].checkValidity()&&(c=s,p=!0,"2.0"===d&&e("input[name=wc_captcha]",c).length&&!e("input[name=wc_captcha]",c).val().length?(p=!1,e(".wpdiscuz-recaptcha",c).css("border","1px solid red")):"2.0"===d&&e("input[name=wc_captcha]",c).length&&e(".wpdiscuz-recaptcha",c).css("border","none"),p)){E=!0,function(t){e(".wpd-agreement-checkbox",t).each(function(){e(this).hasClass("wpd_agreement_hide")&&h&&e(this).prop("checked")&&(Cookies.set(e(this).attr("name")+"_"+g,1,{expires:30,path:"/"}),e("input[name="+e(this).attr("name")+"]").each(function(){I.push(e(this))}))})}(s),e(t).removeClass("wpd_not_clicked");var i=new FormData;if(i.append("action","wpdAddComment"),e(":input",s).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&i.append(this.name+"",e(this).val().trim()),"checkbox"!=this.type&&"radio"!=this.type||e(this).is(":checked")&&i.append(this.name+"",e(this).val())}),i.append("wpd_comment_depth",n),wpdiscuzAjaxObj.wpdiscuz_zs&&i.append("wpdiscuz_zs",wpdiscuzAjaxObj.wpdiscuz_zs),e(".wpd-cookies-checkbox",s).length&&!e(".wpd-cookies-checkbox",s).prop("checked")&&(b=!1),e("#wpdiscuz-loading-bar").show(),wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&"3.0"===d&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/addComment"}).then(function(e){i.append("g-recaptcha-response",e),R(s,i,t)},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error"),e("#wpdiscuz-loading-bar").fadeOut(250)}else R(s,i,t)}var c,p;!function(e){if((a||o)&&"2.0"===d){var t=B(e);grecaptcha.reset(T[t])}}(e(".wpdiscuz_unique_id",s).val()),e(".wpdiscuz_reset").val("")}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.wc_msg_required_fields,"error")}),e(document).delegate(".wpd_editable_comment","click",function(){w&&e(".wpdiscuz-edit-form-wrap").length&&q(V(e(".wpdiscuz-edit-form-wrap"),0),w);var t=V(e(this),0),a=B(t),o=new FormData;o.append("action","wpdEditComment"),o.append("commentId",a),w=e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-text").get(0),ce(z,!0,o).done(function(a){if("object"==typeof a)if(a.success){if(e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text").replaceWith(a.data.html),wpdiscuzLoadRichEditor){let o=wpDiscuzEditor.createEditor("#wpd-editor-edit_"+t);o.clipboard.dangerouslyPasteHTML(0,a.data.content),o.update(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd")}else e("#wc-textarea-edit_"+t).val(a.data.content);e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").hide(),e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").hide()}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error");else console.log(a);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wc_save_edited_comment","click",function(){var t=V(e(this)),a=B(t),o=e("#wpd-comm-"+t+" #wpdiscuz-edit-form");if(J(o,"#wpd-editor-edit_"+t),o.submit(function(e){e.preventDefault()}),o[0].checkValidity()){var d=new FormData;d.append("action","wpdSaveEditedComment"),d.append("commentId",a),e(":input",o).each(function(){""!==this.name&&"checkbox"!==this.type&&"radio"!==this.type&&d.append(this.name+"",e(this).val()),"checkbox"!==this.type&&"radio"!==this.type||e(this).is(":checked")&&d.append(this.name+"",e(this).val())}),ce(z,!0,d).done(function(o){"object"==typeof o?(o.success?(q(t,o.data.message),o.data.lastEdited&&(e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").remove(),e(o.data.lastEdited).insertAfter("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text")),o.data.twitterShareLink&&e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_tw").attr("href",o.data.twitterShareLink),o.data.whatsappShareLink&&e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_whatsapp").attr("href",o.data.whatsappShareLink),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[o.data],"error"),ie(o,a)):console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(document).delegate(".wc_cancel_edit","click",function(){var t=V(e(this));q(t,w),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)}),!wpdiscuzAjaxObj.wordpressIsPaginate&&m&&(M=0,1==m?setTimeout(function(){W(!0)},500):e(document).delegate(".wpd-load-comments","click",function(){e(this).parent(".wpd-load-more-submit-wrap").remove(),W(!0)})),e(document).delegate(".wpd-load-more-submit","click",function(){var t=e(this);t.hasClass("wpd-loaded")&&W(!1,t,"wpd-loaded","wpd-loading")});var U=!1;function H(){var t=e("#wpdiscuzHasMoreComments").val(),a=e(document).height(),o=e(window).height()+e(window).scrollTop();a&&o&&(100*o/a>=80&&!1===U&&1==t&&(U=!0,W(!1,e(".wpd-load-more-submit"))))}function W(t,a,o,d){a&&(a.toggleClass(o),a.toggleClass(d));var s=new FormData;s.append("action","wpdLoadMoreComments");var i=e(".wpdiscuz-sort-button-active").attr("data-sorting");i&&s.append("sorting",i),s.append("offset",M),s.append("lastParentId",e(".wpd-load-more-submit").attr("data-lastparentid")),s.append("isFirstLoad",t?1:0);var c=e(".wpdf-active").attr("data-filter-type");s.append("wpdType",c||""),ce(z,!t||1!=m,s).done(function(s){"object"==typeof s&&s.success&&(M++,t&&e(".wpd-comment").remove(),e(".wpdiscuz_single").remove(),e(".wpdiscuz-comment-pagination").before(s.data.comment_list),K(s,t&&2!==n),U=!1,r=s.data.loadLastCommentId,ie(s),t&&P(!1)),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(d))}).fail(function(t,n,s){console.log(s),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(d))})}function K(t,a){var o;0==t.data.is_show_load_more?(e("#wpdiscuzHasMoreComments").val(0),e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide()):(o=t.data.last_parent_id,e(".wpd-load-more-submit").attr("data-lastparentid",o),2!==n&&e(".wpdiscuz-comment-pagination").show(),e("#wpdiscuzHasMoreComments").val(1),a&&e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").show()),ie(t)}function P(t){var a=location.href.match(/#comment\-(\d+)/);if(null!==a){var o=a[1];if(e("#comment-"+o).length)setTimeout(function(){e("html, body").animate({scrollTop:e("#comment-"+o).parents("[id^=wpd-comm-]").offset().top-32},1e3),t&&N(o)},500);else{var d=new FormData;d.append("action","wpdGetSingleComment"),d.append("commentId",o),ce(z,!0,d).done(function(a){if("object"==typeof a&&a.success){var d="#comment-"+o;e("#comment-"+a.data.parentCommentID).length?e("#comment-"+a.data.parentCommentID).parents("[id^=wpd-comm-"+a.data.parentCommentID+"]").replaceWith(a.data.message):e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e(d).offset().top-32},1e3),t&&N(o)}e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}}function N(t){setTimeout(function(){e("#comment-"+t).siblings(".wpd-secondary-form-wrapper").is(":visible")||e("#comment-"+t).find(".wpd-reply-button").trigger("click")},1100)}function Q(e){if(void 0!==e.data.message)for(var t,a=e.data.message,o=0;o<a.length;o++)$((t=a[o]).comment_parent,t.comment_html)}function V(e,t){var a="";return(a=t?e.parents(".wpd-main-form-wrapper").attr("id"):e.parents(".wpd-comment").attr("id")).substring(a.lastIndexOf("-")+1)}function B(e){return e.substring(0,e.indexOf("_"))}function G(e,t){return t?e.substring(e.indexOf("-")+1):e.substring(0,e.indexOf("-"))}function $(t,a){if(0==t)X(a);else{var o=V(e("#comment-"+t),0);e("#wpdiscuz_form_anchor-"+o).after(a)}}function Y(){var t,a,o="";return e(".wpd-comment-right").each(function(){t=V(e(this),0),a=B(t),o+=a+","}),o}function J(t,a){var o=t.find(".wpd-required-group");wpdiscuzLoadRichEditor&&t.find(".wc_comment").val(e(a+">.ql-editor").html()),function(e){var t=e.find(".wc_comment"),a=t.val().trim().replace(/<p><br><\/p>/g,"\n").replace(/<p>(.*?)<\/p>/g,"$1\n");a=(a=(a=(a=a.replace(/<img src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g,"$3")).replace(/<img[^>]+alt=["|']([^"|']+)["|'][^>]+src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'][^>]?>/g,"$1")).replace(/<img\s+([^>]*)class=["|']wpdem\-sticker["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g,"$3")).replace(/<img\s+([^>]*)src=["|']([^"|']+)["|'](.*?)[^>]*>/g,"$2"),t.val(a)}(t),e.each(o,function(){e("input",this).removeAttr("required"),0===e("input:checked",this).length?e("input",e(this)).attr("required","required"):e(".wpd-field-invalid",this).remove()})}function X(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function Z(t){t?t.prop("required")||(t.val()?t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none")):e.each(e(".wc_email"),function(t,a){var o=e(a);o.prop("required")||(o.val()?o.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):o.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none"))})}if(2!==n||wpdiscuzAjaxObj.wordpressIsPaginate||(e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide(),H(),e(window).scroll(function(){H()})),wpdiscuzAjaxObj.setLoadMoreVisibility=K,e(document).delegate(".wpd-vote-up.wpd_not_clicked, .wpd-vote-down.wpd_not_clicked","click",function(){var t=e(this);e(t).removeClass("wpd_not_clicked");var a,o=B(V(t));a=e(this).hasClass("wpd-vote-up")?1:-1;var d=new FormData;d.append("action","wpdVoteOnComment"),d.append("commentId",o),d.append("voteType",a),ce(z,!0,d).done(function(d){if(e(t).addClass("wpd_not_clicked"),"object"==typeof d){if(d.success){if("total"===d.data.buttonsStyle){var n=e(".wpd-comment-footer .wpd-vote-result",e("#comment-"+o)),s=d.data.votes;n.text(s),n.removeClass("wpd-up wpd-down"),s>0&&n.addClass("wpd-up"),s<0&&n.addClass("wpd-down")}else{var i=e(".wpd-comment-footer .wpd-vote-result-like",e("#comment-"+o)),c=e(".wpd-comment-footer .wpd-vote-result-dislike",e("#comment-"+o));i.text(d.data.likeCount),c.text(d.data.dislikeCount),parseInt(d.data.likeCount)>0?i.addClass("wpd-up"):i.removeClass("wpd-up"),parseInt(d.data.dislikeCount)<0?c.addClass("wpd-down"):c.removeClass("wpd-down")}var p=e(".wpd-comment-footer .wpd-vote-up",e("#comment-"+o)),r=e(".wpd-comment-footer .wpd-vote-down",e("#comment-"+o));p.removeClass("wpd-up"),r.removeClass("wpd-down"),d.data.curUserReaction>0?p.addClass("wpd-up"):d.data.curUserReaction<0&&r.addClass("wpd-down")}else d.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[d.data],"error");ie(d,o,a)}else console.log(d);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(a,o,d){console.log(d),e(t).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate("body","click",function(t){var a=e(".wpdiscuz-sort-buttons");e(t.target).hasClass("wpdf-sorting")||e(t.target).parent().hasClass("wpdf-sorting")?a.css({display:a.is(":visible")?"none":"flex"}):a.hide()}),e(document).delegate(".wpdiscuz-sort-button:not(.wpdiscuz-sort-button-active)","click",function(){var t=e(this),a=e(this).attr("data-sorting");if(a){e(".wpdiscuz-sort-button.wpdiscuz-sort-button-active").removeClass("wpdiscuz-sort-button-active").appendTo(".wpdiscuz-sort-buttons"),t.addClass("wpdiscuz-sort-button-active").prependTo(".wpdf-sorting");var o=new FormData;o.append("action","wpdSorting"),o.append("sorting",a);var d=e(".wpdf-active").attr("data-filter-type");o.append("wpdType",d||""),ce(z,!0,o).done(function(t){"object"==typeof t&&t.success&&(e("#wpdcom .wpd-comment").remove(),e("#wpdcom .wpd-thread-list").prepend(t.data.message),K(t,!1),M=1),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),window.onhashchange=function(){P(!1)},1!=m&&P(!1),e(document).delegate(".wpdiscuz-readmore","click",function(){var t=V(e(this)),a=B(t),o=new FormData;o.append("action","wpdReadMore"),o.append("commentId",a),ce(z,!0,o).done(function(o){"object"==typeof o?(o.success?(e("#comment-"+a+" .wpd-comment-text").html(" "+o.data.message),e("#wpdiscuz-readmore-"+t).remove()):console.log(o.data),ie(o)):console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-required-group","change",function(){0!==e("input:checked",this).length?e("input",e(this)).removeAttr("required"):e("input",e(this)).attr("required","required")}),e(document).delegate(".wpdiscuz-spoiler","click",function(){e(this).next().slideToggle(),e(this).hasClass("wpdiscuz-spoiler-closed")?e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-plus").removeClass("fa-plus").addClass("fa-minus"):e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-minus").removeClass("fa-minus").addClass("fa-plus"),e(this).toggleClass("wpdiscuz-spoiler-closed")}),e(document).delegate(".wpd-tools i","click",function(){var t=e(this).siblings(".wpd-tools-actions");t.css({display:t.is(":visible")?"none":"flex"})}),e(document).delegate(".wpd-comment-right","mouseleave",function(){e(this).find(".wpd-tools-actions").hide()}),e(document).delegate(".wpd_stick_btn","click",function(){var t=B(V(e(this),0)),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",t),ce(z,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd_close_btn","click",function(){var t=B(V(e(this),0)),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",t),ce(z,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-filter.wpd_not_clicked[data-filter-type]","click",function(){var t=e(this),a=t.attr("data-filter-type");wpdiscuzAjaxObj.resetActiveFilters(".wpdf-"+a),t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=new FormData;o.append("action","wpdLoadMoreComments");var d=e(".wpdiscuz-sort-button-active").attr("data-sorting");d&&o.append("sorting",d),o.append("lastParentId",0),o.append("offset",0),M=1,o.append("wpdType",t.hasClass("wpdf-active")?"":a),o.append("isFirstLoad",1),e(this).hasClass("wpdf-inline")?e(this).hasClass("wpdf-active")?e(".wpd-comment-info-bar").hide():e(".wpd-comment-info-bar").css("display","flex"):e(".wpd-comment-info-bar").hide(),ce(z,!1,o).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(t.toggleClass("wpdf-active"),e(".wpd-load-comments").remove(),e(".wpd-comment").remove(),e(".wpd-thread-list").prepend(a.data.comment_list),K(a),r=a.data.loadLastCommentId,e(".wpd-load-more-submit").blur(),ie(a)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpdf-reacted.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdMostReactedComment"),ce(z,!1,a).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(e("#comment-"+a.data.parentCommentID).length?e("#comment-"+a.data.parentCommentID).parents("[id^=wpd-comm-"+a.data.parentCommentID+"]").replaceWith(a.data.message):e("#comment-"+a.data.commentId).length||e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3))}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e(document).delegate(".wpdf-hottest.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdHottestThread"),ce(z,!1,a).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(e("#comment-"+a.data.commentId).length?e("#comment-"+a.data.commentId).parents("[id^=wpd-comm-"+a.data.commentId+"]").replaceWith(a.data.message):e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3))}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e(document).delegate(".wpd-filter-view-all","click",function(){e(".wpdf-inline.wpdf-active.wpd_not_clicked").trigger("click")}),e(document).delegate(".wpd-follow-link.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=B(V(t,0)),o=new FormData;o.append("action","wpdFollowUser"),o.append("commentId",a),ce(z,!0,o).done(function(a){t.addClass("wpd_not_clicked"),"object"==typeof a?a.success?(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data.code],"success"),t.removeClass("wpd-follow-active"),a.data.followTip&&t.attr("wpd-tooltip",a.data.followTip),a.data.followClass&&t.addClass(a.data.followClass)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"):console.log(a),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),Z(),e(document).delegate(".wc_email","keyup",function(){Z(e(this))}),j&&e("#wpdcom").length){if(e("#wpd-bubble-wrapper").hover(function(){e(this).addClass("wpd-bubble-hover")},function(){e(this).removeClass("wpd-bubble-hover")}),k&&!Cookies.get(wpdiscuzAjaxObj.cookieHideBubbleHint)&&setTimeout(function(){e("#wpd-bubble-wrapper").addClass("wpd-bubble-hover"),Cookies.set(wpdiscuzAjaxObj.cookieHideBubbleHint,"1",{expires:7,path:"/"}),setTimeout(function(){e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")},1e3*x)},1e3*k),"content_left"===O)if(e(".entry-content").length){var ee=(te=Math.min(e(".entry-content").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){ee=(te=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var te;ee=(te=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner");else"left_corner"===O?(e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner")):"right_corner"===O&&(e("#wpd-bubble-wrapper").css({right:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-right-corner"));e("#wpd-bubble-wrapper").show(),e("#wpd-bubble-add-message-close").click(function(t){t.preventDefault(),t.stopPropagation(),e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")}),e("#wpd-bubble").click(function(){e("html, body").animate({scrollTop:e("#wpdcom").offset().top-60},1e3,function(){wpdiscuzLoadRichEditor?wpDiscuzEditor.createEditor("#wpd-editor-0_0").focus():e("#wc-textarea-0_0").focus()})}),e("#wpd-bubble-comment-close").click(function(t){t.preventDefault(),e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")}),e("#wpd-bubble-comment-reply-link a").click(function(){var t=e(this).attr("href");setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),P(!0);var a=t.match(/#comment\-(\d+)/);D=D.filter(function(e){return e!=a[1]}),e("#wpd-bubble-count .wpd-new-comments-count").text(D.length),0==D.length&&e("#wpd-bubble-count").removeClass("wpd-new-comments")},100)}),e("#wpd-bubble-count").click(function(){if(D.length){var t=new FormData;t.append("action","wpdBubbleUpdate"),t.append("newCommentIds",D.join()),ce(z,!0,t).done(function(t){"object"==typeof t&&t.success&&(t.data.message=t.data.message.filter(function(t){if(!e("#comment-"+t.comment_id).length)return t}),Q(t),e("#wpd-bubble-count").removeClass("wpd-new-comments"),e("#wpd-bubble-count .wpd-new-comments-count").text("0"),D=[],e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-60},1e3),ie(t)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(e,t,a){console.log(a)})}})}if((j&&C||i)&&(t||!t&&p)&&setTimeout(function t(){e.ajax({type:"GET",url:wpdiscuzAjaxObj.bubbleUpdateUrl,data:{postId:s,lastId:l,visibleCommentIds:Y()}}).done(function(a){if(!E)if("object"==typeof a){if(a.ids.length){i&&((n=new FormData).append("action","wpdUpdateAutomatically"),n.append("loadLastCommentId",r),n.append("visibleCommentIds",Y()),ce(z,!1,n).done(function(t){E||"object"==typeof t&&t.success&&(Q(t),e(".wpd-thread-info").html(t.data.wc_all_comments_count_new_html),t.data.wc_all_comments_count_new=parseInt(t.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").text(t.data.wc_all_comments_count_new),t.data.wc_all_comments_count_new?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),r=t.data.loadLastCommentId)}).fail(function(e,t,a){console.log(a)})),a.ids=a.ids.filter(function(t){if(!e("#comment-"+t).length)return t});var o=5e3;l=parseInt(a.ids[a.ids.length-1]),D=D.concat(a.ids),y&&a.commentText&&(e("#wpd-bubble-author-avatar").html(a.avatar),e("#wpd-bubble-author-name").html(a.authorName),e("#wpd-bubble-comment-date span").html(a.commentDate),e("#wpd-bubble-comment-text").html(a.commentText),e("#wpd-bubble-comment-reply-link a").attr("href",a.commentLink),e("#wpd-bubble-notification-message").show(),o=1e4);var d=parseInt(e(".wpd-new-comments-count").text());d+=a.ids.length,e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),e("#wpd-bubble-wrapper").addClass("wpd-new-comment-added"),setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")},o),e(".wpd-new-comments-count").text(d),e("#wpd-bubble-count").addClass("wpd-new-comments"),a.all_comments_count=parseInt(a.all_comments_count),e("#wpd-bubble-all-comments-count").text(a.all_comments_count),a.all_comments_count?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),e(".wpd-thread-info").html(a.all_comments_count_html)}}else console.log(a);var n;setTimeout(t,c)}).fail(function(e,a,o){console.log(o),setTimeout(t,c)})},c),e(".wpd-inline-form-wrapper").length){var ae=new FormData;ae.append("action","wpdGetInlineCommentForm"),ce(z,!1,ae).done(function(t){"object"==typeof t?t.success?(e(".wpd-inline-form-wrapper").append(t.data),e.each(e("[name=_wpd_inline_nonce]"),function(){var t=e(this).attr("id"),a=e(this).parents(".wpd-inline-shortcode").attr("id");e(this).attr("id",t+"-"+a.substring(a.lastIndexOf("-")+1))}),e(".wpd-inline-opened").addClass("wpd-active"),e(".wpd-inline-opened").find(".wpd-inline-form-wrapper").show(),e(".wpd-inline-opened").find(".wpd-inline-icon").addClass("wpd-open"),e(".wpd-inline-opened").find(".wpd-inline-icon").removeClass("wpd-ignored"),se()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t)}).fail(function(e,t,a){console.log(a)})}function oe(t){if(e(t).hasClass("wpd-inline-shortcode"))var a=e(t).attr("id");else a=e(t).parents(".wpd-inline-shortcode").attr("id");return a.substring(a.lastIndexOf("-")+1)}function de(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function ne(){e.each(e(".wpd-inline-shortcode:not(.wpd-inline-opened) .wpd-inline-icon"),function(){var t=e(this),a=t.offset().top-window.pageYOffset;a>0&&a<300&&("blink"===A?(t.addClass("wpd-blink"),setTimeout(function(){t.removeClass("wpd-blink")},3e3)):(t.parents(".wpd-inline-shortcode").addClass("wpd-active"),t.siblings(".wpd-inline-form-wrapper").show(),t.addClass("wpd-open"),se(t.siblings(".wpd-inline-form-wrapper"))))})}function se(t){if(t){if(t.offset().left<=10)t.css("left",Math.ceil(parseInt(t.css("left"))-t.offset().left+10)),(a=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2))<3&&(a=3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+a+"px;");else if(t.offset().left+t.width()>document.body.clientWidth-10){var a;t.css("left",Math.ceil(parseInt(t.css("left"))+(document.body.clientWidth-(t.offset().left+t.width()))-10)),(a=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2))>t.width()-3&&(a=t.width()-3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+a+"px;")}}else e.each(e(".wpd-inline-form-wrapper:visible"),function(){if(e(this).offset().left<=10)e(this).css("left",Math.ceil(parseInt(e(this).css("left"))-e(this).offset().left+10)),(t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2))<3&&(t=3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;");else if(e(this).offset().left+e(this).width()>document.body.clientWidth-10){var t;e(this).css("left",Math.ceil(parseInt(e(this).css("left"))+(document.body.clientWidth-(e(this).offset().left+e(this).width()))-10)),(t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2))>e(this).width()-3&&(t=e(this).width()-3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;")}})}function ie(t,a,o,d){t.data.callbackFunctions&&e.each(t.data.callbackFunctions,function(e){"function"==typeof wpdiscuzAjaxObj[t.data.callbackFunctions[e]]?wpdiscuzAjaxObj[t.data.callbackFunctions[e]](t,a,o,d):console.log(t.data.callbackFunctions[e]+" is not a function")})}function ce(t,a,o){a&&e("#wpdiscuz-loading-bar").show(),o.append("postId",s);var d=o.get("action");wpdiscuzAjaxObj.dataFilterCallbacks&&wpdiscuzAjaxObj.dataFilterCallbacks[d]&&e.each(wpdiscuzAjaxObj.dataFilterCallbacks[d],function(e){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[d][e]]&&(o=wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[d][e]](o,t,a))});var n=t?wpdiscuzAjaxObj.url:wpdiscuzAjaxObj.customAjaxUrl;return e.ajax({type:"POST",url:n,data:o,contentType:!1,processData:!1})}e(document).delegate("body","click",function(t){if(e(t.target).hasClass("wpd-inline-form-close")||e(t.target).parents(".wpd-inline-form-close").length)t.preventDefault(),e(t.target).parents(".wpd-inline-form-wrapper").hide(),e(t.target).parents(".wpd-inline-shortcode").removeClass("wpd-active"),e(t.target).parents(".wpd-inline-form-wrapper").siblings(".wpd-inline-icon").removeClass("wpd-open");else if(!e(t.target).hasClass("wpd-inline-form-wrapper")&&!e(t.target).parents(".wpd-inline-form-wrapper").length){de();var a="";e(t.target).hasClass("wpd-inline-icon")?a=e(t.target):e(t.target).parents(".wpd-inline-icon").length&&(a=e(t.target).parents(".wpd-inline-icon")),a.length&&(a.parents(".wpd-inline-shortcode").addClass("wpd-active"),a.siblings(".wpd-inline-form-wrapper").show(),a.addClass("wpd-open"),a.removeClass("wpd-ignored"),se(a.siblings(".wpd-inline-form-wrapper")))}(!e(t.target).hasClass("wpd-last-inline-comments-wrapper")&&!e(t.target).parents(".wpd-last-inline-comments-wrapper").length||e(t.target).parents(".wpd-last-inline-comments-wrapper").length&&e(t.target).hasClass("wpd-load-inline-comment"))&&e(".wpd-last-inline-comments-wrapper").remove()}),e(document).delegate(".wpd-inline-submit.wpd_not_clicked","click",function(t){t.preventDefault();var a=e(this),o=e(this).parents(".wpd_inline_comm_form");if(o[0].checkValidity()){e(this).removeClass("wpd_not_clicked");var d=new FormData;d.append("action","wpdAddInlineComment"),d.append("inline_form_id",oe(o)),e.each(e("input, textarea",o),function(t,a){"checkbox"===this.type?e(this).is(":checked")&&d.append(e(a).attr("name"),e(a).val()):d.append(e(a).attr("name"),e(a).val())}),ce(z,!0,d).done(function(t){if(a.addClass("wpd_not_clicked"),"object"==typeof t)if(t.success){o[0].reset(),de();var d=parseInt(t.data.newCount),n=a.parents(".wpd-inline-icon-wrapper").find(".wpd-inline-icon-count");n.text(d),d?n.addClass("wpd-has-comments"):n.removeClass("wpd-has-comments"),e(".wpd-thread-info").html(t.data.allCommentsCountNewHtml),t.data.allCommentsCountNew=parseInt(t.data.allCommentsCountNew),e("#wpd-bubble-all-comments-count").text(t.data.allCommentsCountNew),t.data.allCommentsCountNew?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),t.data.message&&X(t.data.message),wpdiscuzAjaxObj.setCommentMessage(t.data.notification,"success")}else t.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error");else wpdiscuzAjaxObj.setCommentMessage(t,"error");e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(document).delegate(".wpd-form","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_comm_submit").trigger("click")}),e(document).delegate("#wpdiscuz-edit-form","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_save_edited_comment").trigger("click")}),e(document).delegate(".wpd-inline-comment-content","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).parents(".wpd_inline_comm_form").find(".wpd-inline-submit.wpd_not_clicked").trigger("click")}),e(document).delegate(".wpd-inline-icon-count.wpd-has-comments","click",function(){var t=e(this),a=new FormData;a.append("action","wpdGetLastInlineComments"),a.append("inline_form_id",oe(t)),ce(z,!0,a).done(function(a){"object"==typeof a?a.success?e(a.data).insertAfter(t):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"):console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-view-all-inline-comments","click",function(t){t.preventDefault(),e(this).parents(".wpd-last-inline-comments-wrapper").remove(),e(".wpdf-inline").hasClass("wpdf-active")||e(".wpdf-inline").trigger("click"),e("html, body").animate({scrollTop:e(".wpdf-inline").offset().top-32},1e3)}),e(document).delegate(".wpd-feedback-content-link","click",function(t){t.preventDefault();var a=e(this).data("feedback-content-id");e("html, body").animate({scrollTop:e("#wpd-inline-"+a).offset().top-38},1e3,function(){e("#wpd-inline-"+a).addClass("wpd-active")})}),"scroll_open"!==A&&"blink"!==A||(ne(),e(window).scroll(ne)),e(document).delegate("#wpd-post-rating.wpd-not-rated .wpd-rate-starts svg","click",function(){var t=new FormData,a=e(this).index();a>=0&&a<5&&(t.append("action","wpdUserRate"),t.append("rating",a+1),ce(z,!0,t).done(function(t){"object"==typeof t?t.success?location.reload(!0):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}))}),e("#wpdiscuz-subscribe-form").submit(function(t){t.preventDefault();var a,o,n=e(this);if(n[0].checkValidity()&&(a=n,o=!0,"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).length&&!e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).val().length?(o=!1,e(".wpdiscuz-recaptcha",a).css("border","1px solid red")):"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).length&&e(".wpdiscuz-recaptcha",a).css("border","none"),o)){var s=new FormData;s.append("action","wpdAddSubscription"),e("*",n).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&s.append(this.name+"",e(this).val()),"checkbox"!=this.type&&"radio"!=this.type||e(this).is(":checked")&&s.append(this.name+"",e(this).val())}),ce(z,!0,s).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):wpdiscuzAjaxObj.setCommentMessage(t,"error"),e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(".wpd-unsubscribe").click(function(t){t.preventDefault();var a=new FormData;a.append("action","wpdUnsubscribe"),a.append("sid",e(this).data("sid")),a.append("skey",e(this).data("skey")),ce(z,!0,a).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),wpdiscuzAjaxObj.resetActiveFilters=function(t){e(".wpd-filter.wpdf-active"+(t?":not("+t+")":"")).removeClass("wpdf-active")},wpdiscuzAjaxObj.getAjaxObj=ce});var onloadCallback=function(){if(document.getElementById("wpdiscuz-recaptcha-0_0")&&"2.0"===wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.render("wpdiscuz-recaptcha-0_0",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(e){jQuery("#wpdiscuz-recaptcha-field-0_0").val("key")},"expired-callback":function(){jQuery("#wpdiscuz-recaptcha-field-0_0").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}};
7
  /* Colorbox */
8
  (function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!U){U=$=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("<div/>"),w()}}function p(){x||(V=!1,E=t(i),x=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),L=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),y=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),R=n(se,"Current"),P=t('<button type="button"/>').attr({id:Z+"Previous"}),K=t('<button type="button"/>').attr({id:Z+"Next"}),S=t('<button type="button"/>').attr({id:Z+"Slideshow"}),L),B=t('<button type="button"/>').attr({id:Z+"Close"}),y.append(n(se).append(n(se,"TopLeft"),T=n(se,"TopCenter"),n(se,"TopRight")),n(se,!1,"clear:left").append(C=n(se,"MiddleLeft"),b,H=n(se,"MiddleRight")),n(se,!1,"clear:left").append(n(se,"BottomLeft"),k=n(se,"BottomCenter"),n(se,"BottomRight"))).find("div div").css({"float":"left"}),M=n(se,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=K.add(P).add(R).add(S)),e.body&&!x.parent().length&&t(e.body).append(v,x.append(y,M))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),f(this))}return x?(V||(V=!0,K.click(function(){J.next()}),P.click(function(){J.prev()}),B.click(function(){J.close()}),v.click(function(){_.get("overlayClose")&&J.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;U&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),U&&_.get("arrowKey")&&W[1]&&!t.altKey&&(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),K.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,i):t("."+te).live("click."+Z,i)),!0):!1}function w(){var e,o,r,h=J.prep,d=++le;if($=!0,q=!1,u(he),u(ie),_.get("onLoad"),_.h=_.get("height")?a(_.get("height"),"y")-N-j:_.get("innerHeight")&&a(_.get("innerHeight"),"y"),_.w=_.get("width")?a(_.get("width"),"x")-z-D:_.get("innerWidth")&&a(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=a(_.get("maxWidth"),"x")-z-D,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=a(_.get("maxHeight"),"y")-N-j,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.get("href"),Q=setTimeout(function(){L.show()},100),_.get("inline")){var c=t(e).eq(0);r=t("<div>").hide().insertBefore(c),ae.one(he,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),q=_.get("createImg"),t(q).addClass(Z+"Photo").bind("error."+Z,function(){h(n(se,"Error").html(_.get("imgError")))}).one("load",function(){d===le&&setTimeout(function(){var e;_.get("retinaImage")&&i.devicePixelRatio>1&&(q.height=q.height/i.devicePixelRatio,q.width=q.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){q.height-=q.height*e,q.width-=q.width*e},_.mw&&q.width>_.mw&&(e=(q.width-_.mw)/q.width,o()),_.mh&&q.height>_.mh&&(e=(q.height-_.mh)/q.height,o())),_.h&&(q.style.marginTop=Math.max(_.mh-q.height,0)/2+"px"),W[1]&&(_.get("loop")||W[A+1])&&(q.style.cursor="pointer",t(q).bind("click."+Z,function(){J.next()})),q.style.width=q.width+"px",q.style.height=q.height+"px",h(q)},1)}),q.src=e):e&&M.load(e,_.get("data"),function(e,i){d===le&&h("error"===i?n(se,"Error").html(_.get("xhrError")):t(this).contents())})}var v,x,y,b,T,C,H,k,W,E,I,M,L,F,R,S,K,P,B,O,_,j,D,N,z,A,q,U,$,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),n=t(this).data("cbox-iframe-attrs");return"object"==typeof n&&t.each(n,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",ne=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",ae=t("<a/>"),se="div",le=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){S.html(_.get("slideshowStop")).unbind(s).one(s,n),ae.bind(ne,e).bind(ie,t),x.removeClass(a+"off").addClass(a+"on")}function n(){t(),ae.unbind(ne,e).unbind(ie,t),S.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),x.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,S.hide(),t(),ae.unbind(ne,e).unbind(ie,t),x.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(ae.unbind(oe,o),o()):_.get("slideshow")&&W[1]&&(r=!0,ae.one(oe,o),_.get("slideshowAuto")?i():n(),S.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;return e=e||{},t.isFunction(o)&&(o=t("<a/>"),e.open=!0),o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(te),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(x[0].style.width,10)-D+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(x[0].style.height,10)-j+"px"}var r,h,s,l=0,d=0,c=x.offset();if(E.unbind("resize."+Z),x.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,x.css({position:"fixed"})):(l=h,d=s,x.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-z-D-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-z-D,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-N-j-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-N-j,0)/2),x.css({top:c.top,left:c.left,visibility:"visible"}),y[0].style.width=y[0].style.height="9999px",r={width:_.w+z+D,height:_.h+N+j,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==de[t]?(g=e,void 0):void 0}),e=g}de=r,e||x.css(r),x.dequeue().animate(r,{duration:e||0,complete:function(){n(),$=!1,y[0].style.width=_.w+z+D+"px",y[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;U&&(t=t||{},t.width&&(_.w=a(t.width,"x")-z-D),t.innerWidth&&(_.w=a(t.innerWidth,"x")),I.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-N-j),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=I.scrollTop(),I.css({height:"auto"}),_.h=I.height()),I.css({height:_.h}),e&&I.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||I.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||I.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if(U){var d,g="none"===_.get("transition")?0:_.get("speed");I.remove(),I=n(se,"LoadedContent").append(i),I.hide().appendTo(M.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),M.hide(),t(q).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&x[0].style.removeAttribute("filter")}var n,o,a=W.length;U&&(o=function(){clearTimeout(Q),L.hide(),u(ne),_.get("onComplete")},F.html(_.get("title")).show(),I.show(),a>1?("string"==typeof _.get("current")&&R.html(_.get("current").replace("{current}",A+1).replace("{total}",a)).show(),K[_.get("loop")||a-1>A?"show":"hide"]().html(_.get("next")),P[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ce(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=_.get("createIframe"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(I),ae.one(he,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?x.fadeTo(g,1,i):i())},"fade"===_.get("transition")?x.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!$&&W[1]&&(_.get("loop")||W[A+1])&&(A=h(1),f(W[A]))},J.prev=function(){!$&&W[1]&&(_.get("loop")||A)&&(A=h(-1),f(W[A]))},J.close=function(){U&&!G&&(G=!0,U=!1,u(oe),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),x.stop().fadeTo(_.get("fadeOut")||0,0,function(){x.hide(),v.hide(),u(he),I.remove(),setTimeout(function(){G=!1,u(re),_.get("onClosed")},1)}))},J.remove=function(){x&&(x.stop(),t[Y].close(),x.stop(!1,!0).remove(),v.remove(),G=!1,x=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)})(jQuery,document,window);
9
  /* Media Uploader */
@@ -11,6 +11,6 @@ jQuery(document).ready(function(e){if(e(document).delegate("#wpdcom .wmu-upload-
11
  /* Lity */
12
  !function(e,t){"function"==typeof define&&define.amd?define(["jquery"],function(n){return t(e,n)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(e,require("jquery")):e.lity=t(e,e.jQuery||e.Zepto)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=e.document,i=t(e),r=t.Deferred,o=t("html"),a=[],l="aria-hidden",s="lity-"+l,d='a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not([tabindex^="-"])',c={esc:!0,handler:null,handlers:{image:C,inline:function(e,n){var i,r,o;try{i=t(e)}catch(e){return!1}if(!i.length)return!1;return r=t('<i style="display:none !important"/>'),o=i.hasClass("lity-hide"),n.element().one("lity:remove",function(){r.before(i).remove(),o&&!i.closest(".lity-content").length&&i.addClass("lity-hide")}),i.removeClass("lity-hide").after(r)},youtube:function(e){var n=f.exec(e);if(!n)return!1;return k(x(e,w("https://www.youtube"+(n[2]||"")+".com/embed/"+n[4],t.extend({autoplay:1},b(n[5]||"")))))},vimeo:function(e){var n=y.exec(e);if(!n)return!1;return k(x(e,w("https://player.vimeo.com/video/"+n[3],t.extend({autoplay:1},b(n[4]||"")))))},googlemaps:function(e){var t=v.exec(e);if(!t)return!1;return k(x(e,w("https://www.google."+t[3]+"/maps?"+t[6],{output:t[6].indexOf("layer=c")>0?"svembed":"embed"})))},facebookvideo:function(e){var n=p.exec(e);if(!n)return!1;0!==e.indexOf("http")&&(e="https:"+e);return k(x(e,w("https://www.facebook.com/plugins/video.php?href="+e,t.extend({autoplay:1},b(n[4]||"")))))},iframe:k},template:'<div class="lity" role="dialog" aria-label="Dialog Window (Press escape to close)" tabindex="-1"><div class="lity-wrap" data-lity-close role="document"><div class="lity-loader" aria-hidden="true">Loading...</div><div class="lity-container"><div class="lity-content"></div><button class="lity-close" type="button" aria-label="Close (Press escape to close)" data-lity-close>&times;</button></div></div></div>'},u=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i,f=/(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i,y=/(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/,v=/((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i,p=/(facebook\.com)\/([a-z0-9_-]*)\/videos\/([0-9]*)(.*)?$/i,m=function(){var e=n.createElement("div"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in t)if(void 0!==e.style[i])return t[i];return!1}();function h(e){var t=r();return m&&e.length?(e.one(m,t.resolve),setTimeout(t.resolve,500)):t.resolve(),t.promise()}function g(e,n,i){if(1===arguments.length)return t.extend({},e);if("string"==typeof n){if(void 0===i)return void 0===e[n]?null:e[n];e[n]=i}else t.extend(e,n);return this}function b(e){for(var t,n=decodeURI(e.split("#")[0]).split("&"),i={},r=0,o=n.length;r<o;r++)n[r]&&(i[(t=n[r].split("="))[0]]=t[1]);return i}function w(e,n){return e+(e.indexOf("?")>-1?"&":"?")+t.param(n)}function x(e,t){var n=e.indexOf("#");return-1===n?t:(n>0&&(e=e.substr(n)),t+e)}function C(e,n){var i=n.opener()&&n.opener().data("lity-desc")||"Image with no description",o=t('<img src="'+e+'" alt="'+i+'"/>'),a=r(),l=function(){var e;a.reject((e="Failed loading image",t('<span class="lity-error"/>').append(e)))};return o.on("load",function(){if(0===this.naturalWidth)return l();a.resolve(o)}).on("error",l),a.promise()}function k(e){return'<div class="lity-iframe-container"><iframe frameborder="0" allowfullscreen src="'+e+'"/></div>'}function E(){return n.documentElement.clientHeight?.9*n.documentElement.clientHeight:Math.round(.9*i.height())}function j(e){var t,i,r,o=z();o&&(27===e.keyCode&&o.options("esc")&&o.close(),9===e.keyCode&&(t=e,i=o.element().find(d),r=i.index(n.activeElement),t.shiftKey&&r<=0?(i.get(i.length-1).focus(),t.preventDefault()):t.shiftKey||r!==i.length-1||(i.get(0).focus(),t.preventDefault())))}function D(){t.each(a,function(e,t){t.resize()})}function z(){return 0===a.length?null:a[0]}function T(e,d,u,f){var y,v,p,m,b,w,x,C,k,z,T,O=this,q=!1,W=!1;d=t.extend({},c,d),v=t(d.template),O.element=function(){return v},O.opener=function(){return u},O.options=t.proxy(g,O,d),O.handlers=t.proxy(g,O,d.handlers),O.resize=function(){q&&!W&&p.css("max-height",E()+"px").trigger("lity:resize",[O])},O.close=function(){if(q&&!W){var e;W=!0,(e=O).element().attr(l,"true"),1===a.length&&(o.removeClass("lity-active"),i.off({resize:D,keydown:j})),((a=t.grep(a,function(t){return e!==t})).length?a[0].element():t(".lity-hidden")).removeClass("lity-hidden").each(function(){var e=t(this),n=e.data(s);n?e.attr(l,n):e.removeAttr(l),e.removeData(s)});var d=r();if(f&&(n.activeElement===v[0]||t.contains(v[0],n.activeElement)))try{f.focus()}catch(e){}return p.trigger("lity:close",[O]),v.removeClass("lity-opened").addClass("lity-closed"),h(p.add(v)).always(function(){p.trigger("lity:remove",[O]),v.remove(),v=void 0,d.resolve()}),d.promise()}},m=e,b=O,w=d.handlers,x=d.handler,k="inline",z=t.extend({},w),x&&z[x]?(C=z[x](m,b),k=x):(t.each(["inline","iframe"],function(e,t){delete z[t],z[t]=w[t]}),t.each(z,function(e,t){return!t||!(!t.test||t.test(m,b))||(!1!==(C=t(m,b))?(k=e,!1):void 0)})),y={handler:k,content:C||""},v.attr(l,"false").addClass("lity-loading lity-opened lity-"+y.handler).appendTo("body").focus().on("click","[data-lity-close]",function(e){t(e.target).is("[data-lity-close]")&&O.close()}).trigger("lity:open",[O]),T=O,1===a.unshift(T)&&(o.addClass("lity-active"),i.on({resize:D,keydown:j})),t("body > *").not(T.element()).addClass("lity-hidden").each(function(){var e=t(this);void 0===e.data(s)&&e.data(s,e.attr(l)||null)}).attr(l,"true"),t.when(y.content).always(function(e){p=t(e).css("max-height",E()+"px"),v.find(".lity-loader").each(function(){var e=t(this);h(e).always(function(){e.remove()})}),v.removeClass("lity-loading").find(".lity-content").empty().append(p),q=!0,p.trigger("lity:ready",[O])})}function O(e,i,r){e.preventDefault?(e.preventDefault(),e=(r=t(this)).data("lity-target")||r.attr("rel")||r.attr("src")):r=t(r);var o=new T(e,t.extend({},r.data("lity-options")||r.data("lity"),i),r,n.activeElement);if(!e.preventDefault)return o}return C.test=function(e){return u.test(e)},O.version="2.2.2",O.options=t.proxy(g,O,c),O.handlers=t.proxy(g,O,c.handlers),O.current=z,t(n).on("click.lity","[data-wpd-lity]",O),O});
13
  /* My Content and Settings */
14
- jQuery(document).ready(function(e){var t=0,d=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled);e(document).delegate(".wpd-info,.wpd-page-link,.wpd-delete-content,.wpd-user-email-delete-links","click",function(e){e.preventDefault()}),e(document).delegate(".wpd-info.wpd-not-clicked","click",function(t){var n=e(this);n.removeClass("wpd-not-clicked");var a=new FormData;return a.append("action","wpdGetInfo"),function(t,n){var a=e(".fas",t),i=a.attr("class");a.removeClass(),a.addClass("fas fa-pulse fa-spinner"),wpdiscuzAjaxObj.getAjaxObj(d,!1,n).done(function(d){t.addClass("wpd-not-clicked"),a.removeClass(),a.addClass(i),d&&(e("#wpdUserContentInfo").html(d),e("#wpdUserContentInfo ul.wpd-list .wpd-list-item:first-child").addClass("wpd-active"),e("#wpdUserContentInfo div.wpd-content .wpd-content-item:first-child").addClass("wpd-active"),e("#wpdUserContentInfo").is(":visible")||e("#wpdUserContentInfoAnchor").trigger("click"))})}(n,a),!1}),e(document).delegate(".wpd-list-item","click",function(){var t=e("input.wpd-rel",this).val();e("#wpdUserContentInfo .wpd-list-item").removeClass("wpd-active"),e("#wpdUserContentInfo .wpd-content-item").removeClass("wpd-active");var n=e(this);if(e("#wpdUserContentInfo #"+t).text().length)n.addClass("wpd-active"),e("#wpdUserContentInfo #"+t).addClass("wpd-active");else{var a=new FormData;a.append("action",n.attr("data-action")),a.append("page",0),e("#wpdUserContentInfo #"+t).addClass("wpd-active"),e("#wpdUserContentInfo #"+t).css("text-align","center"),wpdiscuzAjaxObj.getAjaxObj(d,!0,a).done(function(d){d&&(e("#wpdUserContentInfo #"+t).css("text-align",""),n.addClass("wpd-active"),e("#wpdUserContentInfo #"+t).html(d)),e("#wpdiscuz-loading-bar").hide()})}}),e(document).delegate(".wpd-page-link.wpd-not-clicked","click",function(t){var n=e(this);n.removeClass("wpd-not-clicked");var a=n.data("wpd-page"),i=e(".wpd-active .wpd-pagination .wpd-action").val(),o=new FormData;o.append("action",i),o.append("page",a),wpdiscuzAjaxObj.getAjaxObj(d,!0,o).done(function(t){n.addClass("wpd-not-clicked"),t&&e(".wpd-content-item.wpd-active").html(t),e("#wpdiscuz-loading-bar").hide()})}),e(document).delegate(".wpd-delete-content.wpd-not-clicked","click",function(){var n=e(this),a=parseInt(n.data("wpd-content-id"));if(!isNaN(a)){var i=n.data("wpd-delete-action");if("wpdDeleteComment"==i&&!confirm(wpdiscuzUCObj.msgConfirmDeleteComment))return!1;if("wpdCancelSubscription"==i&&!confirm(wpdiscuzUCObj.msgConfirmCancelSubscription))return!1;if("wpdCancelFollow"==i&&!confirm(wpdiscuzUCObj.msgConfirmCancelFollow))return!1;var o=e("i",n),s=o.attr("class"),c=e(".wpd-wrapper .wpd-page-number").val(),l=e(".wpd-content-item.wpd-active").children(".wpd-item").length;n.removeClass("wpd-not-clicked"),o.removeClass().addClass("fas fa-pulse fa-spinner"),1==l&&c>0&&(c-=1);var p=new FormData;p.append("id",a),p.append("page",c),p.append("action",i),wpdiscuzAjaxObj.getAjaxObj(d,!1,p).done(function(d){n.addClass("wpd-not-clicked"),o.removeClass().addClass(s),e(".wpd-content-item.wpd-active").html(d),t=1})}}),e(document).delegate("[data-lity-close]","click",function(d){e(d.target).is("[data-lity-close]")&&t&&window.location.reload(!0)}),e(document).delegate(".wpd-user-email-delete-links.wpd-not-clicked","click",function(){var t=e(this);t.removeClass("wpd-not-clicked"),e(".wpd-loading",t).addClass("wpd-show");var n=new FormData;n.append("action","wpdEmailDeleteLinks"),wpdiscuzAjaxObj.getAjaxObj(d,!1,n).done(function(d){t.addClass("wpd-not-clicked"),e("[data-lity-close]",window.parent.document).trigger("click")})}),e(document).delegate(".wpd-user-settings-button.wpd-not-clicked","click",function(){var t=e(this);t.removeClass("wpd-not-clicked");var n=t.data("wpd-delete-action");if(console.log(n),"deleteCookies"!==n){t.find(".wpd-loading").addClass("wpd-show");var a=new FormData;a.append("action","wpdGuestAction"),a.append("guestAction",n),wpdiscuzAjaxObj.getAjaxObj(d,!1,a).done(function(d){t.addClass("wpd-not-clicked"),t.find(".wpd-loading").removeClass("wpd-show");try{var n=e.parseJSON(d);t.after(n.message);var a=t.next(".wpd-guest-action-message");a.fadeIn(100).fadeOut(7e3,function(){a.remove(),1===parseInt(n.code)&&(t.parent().remove(),e(".wpd-delete-all-comments").length||e(".wpd-delete-all-subscriptions").length||e(".wpd-delete-all-cookies").parent().addClass("wpd-show"))})}catch(e){console.log(e)}})}else!function(){for(var e=document.cookie.split(";"),t=0;t<e.length;t++){var d=e[t],n=d.indexOf("="),a=n>-1?d.substr(0,n):d;Cookies.remove(a.trim())}location.reload(!0)}()})});
15
  /* Social */
16
- function wpcShareCommentFB(e,s){FB.ui({method:"share",href:e,quote:s},function(e){})}(wpdiscuzAjaxObj.enableFbLogin||wpdiscuzAjaxObj.enableFbShare)&&wpdiscuzAjaxObj.facebookAppID&&(!function(e,s,n){var o,a=e.getElementsByTagName(s)[0];e.getElementById(n)||((o=e.createElement(s)).id=n,o.src="//connect.facebook.net/en_US/sdk.js",a.parentNode.insertBefore(o,a))}(document,"script","facebook-jssdk"),window.fbAsyncInit=function(){FB.init({appId:wpdiscuzAjaxObj.facebookAppID,cookie:!0,xfbml:!0,version:"v2.8"})}),jQuery(document).ready(function(e){var s;(s=Cookies.get("wpdiscuz_social_login_message"))&&"undefined"!==s&&(Cookies.remove("wpdiscuz_social_login_message"),wpdiscuzAjaxObj.setCommentMessage(decodeURIComponent(s.replace(/\+/g,"%20")),"error")),Cookies.get("wpdiscuz_scroll_to_comments")&&(Cookies.remove("wpdiscuz_scroll_to_comments",{path:"/"}),e("html, body").animate({scrollTop:e("#comments").offset().top-32},1e3)),e(document).delegate(".wpd-comment-share .fa-facebook-f","click",function(){if(1==wpdiscuzAjaxObj.enableFbShare){var s=e(this).parents(".wpd-comment").find(".wpd-comment-right").attr("id"),n=window.location.href;-1!==n.indexOf("#")&&(n=n.substring(0,n.indexOf("#"))),wpcShareCommentFB(n+="#"+s,e(this).parents(".wpd-comment-right").find(".wpd-comment-text").text())}});var n="";function o(e,s){var n,o="";t(s,1),Cookies.set("wpdiscuz_scroll_to_comments",1,{path:"/"}),"facebook"===e&&0==wpdiscuzAjaxObj.facebookUseOAuth2?FB.getLoginStatus(function(t){"connected"===t.status?(n=t.authResponse.accessToken,o=t.authResponse.userID,a(e,n,o,s)):FB.login(function(t){"connected"===t.status&&(n=t.authResponse.accessToken,o=t.authResponse.userID,a(e,n,o,s))},{scope:"public_profile,email"})}):a(e,n,o,s)}function a(s,n,o,a){return e.ajax({type:"POST",url:wpdiscuzAjaxObj.url,data:{action:"wpd_social_login",provider:s,token:n,userID:o,postID:wpdiscuzAjaxObj.wc_post_id}}).done(function(s){!function(s,n){try{var o=e.parseJSON(s),a=o.code,i=o.message,c=o.url;200===parseInt(a)?location.assign(c):wpdiscuzAjaxObj.setCommentMessage(i,"error")}catch(e){console.log(e)}t(n,0)}(s,a)}),""}function t(e,s){1===s?e.find(".wpdiscuz-social-login-spinner").show():e.find(".wpdiscuz-social-login-spinner").hide()}e(document).delegate("#wpdcom .wpd-social-login .wpdiscuz-login-button","click",function(){var s=e(this).parents(".wpd-social-login");!function(e,s){1!=parseInt(wpdiscuzAjaxObj.socialLoginAgreementCheckbox)||1==Cookies.get("socialLoginAgreementConfirmed")?o(e,s):s.parents(".wpd-form-wrap, .wpd-form").find(".wpd-social-login-agreement").first().slideDown(700)}(n=function(e){var s="";e.hasClass("wpdsn-fb")&&(s="facebook");e.hasClass("wpdsn-insta")&&(s="instagram");e.hasClass("wpdsn-gg")&&(s="google");e.hasClass("wpdsn-ds")&&(s="disqus");e.hasClass("wpdsn-wp")&&(s="wordpress");e.hasClass("wpdsn-tw")&&(s="twitter");e.hasClass("wpdsn-vk")&&(s="vk");e.hasClass("wpdsn-ok")&&(s="ok");e.hasClass("wpdsn-linked")&&(s="linkedin");e.hasClass("wpdsn-yandex")&&(s="yandex");e.hasClass("wpdsn-mailru")&&(s="mailru");e.hasClass("wpdsn-weixin")&&(s="wechat");e.hasClass("wpdsn-weibo")&&(s="weibo");e.hasClass("wpdsn-qq")&&(s="qq");e.hasClass("wpdsn-baidu")&&(s="baidu");return s}(e(this)),s)}),e(document).delegate("#wpdcom .wpd-agreement-buttons-right .wpd-agreement-button","click",function(){var s=e(this).parents(".wpd-form-wrap, .wpd-form").find(".wpd-social-login-agreement").slideUp(700);e(this).hasClass("wpd-agreement-button-agree")&&(wpdiscuzAjaxObj.isCookiesEnabled&&Cookies.set("socialLoginAgreementConfirmed",1,{expires:30,path:"/"}),o(n,s))})});
3
  /* Autogrow */
4
  jQuery.fn.autoGrow=function(){return this.each(function(){var createMirror=function(textarea){jQuery(textarea).after('<div class="autogrow-textarea-mirror"></div>');return jQuery(textarea).next(".autogrow-textarea-mirror")[0]};var sendContentToMirror=function(textarea){mirror.innerHTML=String(textarea.value).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br />")+".<br/>.";if(jQuery(textarea).height()!=jQuery(mirror).height())jQuery(textarea).height(jQuery(mirror).height())};var growTextarea=function(){sendContentToMirror(this)};var mirror=createMirror(this);mirror.style.display="none";mirror.style.wordWrap="break-word";mirror.style.padding=jQuery(this).css("padding");mirror.style.width=jQuery(this).css("width");mirror.style.fontFamily=jQuery(this).css("font-family");mirror.style.fontSize=jQuery(this).css("font-size");mirror.style.lineHeight=jQuery(this).css("line-height");this.style.overflow="hidden";this.style.minHeight=this.rows+"em";this.onkeydown=growTextarea;sendContentToMirror(this)})};
5
  /* wpDiscuz */
6
+ var wpdiscuzLoadRichEditor=parseInt(wpdiscuzAjaxObj.loadRichEditor);if(wpdiscuzLoadRichEditor)var wpDiscuzEditor=new WpdEditor;function wpdMessagesOnInit(e,t){wpdiscuzAjaxObj.setCommentMessage(e,t),setTimeout(function(){location.href=location.href.substring(0,location.href.indexOf("wpdiscuzUrlAnchor")-1)},3e3)}wpdiscuzAjaxObj.setCommentMessage=function(e,t,a){var o="wpdiscuz-message-error";if("[object Array]"===Object.prototype.toString.call(e))for(var d in e)"[object Array]"===Object.prototype.toString.call(t)?"success"===t[d]?o="wpdiscuz-message-success":"warning"===t[d]&&(o="wpdiscuz-message-warning"):"success"===t?o="wpdiscuz-message-success":"warning"===t&&(o="wpdiscuz-message-warning"),jQuery("<div/>").addClass(o).html(e[d]).prependTo("#wpdiscuz-comment-message").delay("[object Array]"===Object.prototype.toString.call(a)?a[d]:a||4e3).fadeOut(1e3,function(){jQuery(this).remove()});else"success"===t?o="wpdiscuz-message-success":"warning"===t&&(o="wpdiscuz-message-warning"),jQuery("<div/>").addClass(o).html(e).prependTo("#wpdiscuz-comment-message").delay(a||4e3).fadeOut(1e3,function(){jQuery(this).remove()})},jQuery(document).ready(function(e){e("body").addClass("wpdiscuz_"+wpdiscuzAjaxObj.version);var t=wpdiscuzAjaxObj.is_user_logged_in,a=1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!t,o=1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&t,d=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,n=parseInt(wpdiscuzAjaxObj.commentListLoadType),s=parseInt(wpdiscuzAjaxObj.wc_post_id),i=parseInt(wpdiscuzAjaxObj.commentListUpdateType),c=1e3*parseInt(wpdiscuzAjaxObj.commentListUpdateTimer),p=parseInt(wpdiscuzAjaxObj.liveUpdateGuests),r=wpdiscuzAjaxObj.loadLastCommentId,l=r,m=parseInt(wpdiscuzAjaxObj.firstLoadWithAjax);Cookies.get("wpdiscuz_comments_sorting")&&Cookies.remove("wpdiscuz_comments_sorting",{path:""}),Cookies.get("wordpress_last_visit")&&Cookies.remove("wordpress_last_visit",{path:""}),Cookies.get("wpdiscuz_last_visit")&&Cookies.remove("wpdiscuz_last_visit",{path:""});var w,u=wpdiscuzAjaxObj.storeCommenterData,f=parseInt(wpdiscuzAjaxObj.wmuEnabled),h=wpdiscuzAjaxObj.isCookiesEnabled,b=!0,g=wpdiscuzAjaxObj.cookiehash,_=parseInt(wpdiscuzAjaxObj.isLoadOnlyParentComments),v=parseInt(wpdiscuzAjaxObj.enableDropAnimation)?500:0,z=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),j=parseInt(wpdiscuzAjaxObj.enableBubble),C=parseInt(wpdiscuzAjaxObj.bubbleLiveUpdate),k=parseInt(wpdiscuzAjaxObj.bubbleHintTimeout),x=parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout)?parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout):5,y=parseInt(wpdiscuzAjaxObj.bubbleShowNewCommentMessage),O=wpdiscuzAjaxObj.bubbleLocation,A=wpdiscuzAjaxObj.inlineFeedbackAttractionType,I=[],T=[],D=[],E=!1,M=1;(e(".wc_social_plugin_wrapper .wp-social-login-provider-list").length?e(".wc_social_plugin_wrapper .wp-social-login-provider-list").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .the_champ_login_container").length?e(".wc_social_plugin_wrapper .the_champ_login_container").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .social_connect_form").length?e(".wc_social_plugin_wrapper .social_connect_form").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .oneall_social_login_providers").length&&e(".wc_social_plugin_wrapper .oneall_social_login .oneall_social_login_providers").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"),wpdiscuzLoadRichEditor&&e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0"),e(document).delegate("#wpdcom .ql-editor, #wpdcom .wc_comment","focus",function(){e(".wpd-form-foot",e(this).parents(".wpd_comm_form")).slideDown(v)}),e(document).delegate("#wpdcom textarea","focus",function(){e(this).next(".autogrow-textarea-mirror").length||e(this).autoGrow()}),t)||S({comment_author:Cookies.get("comment_author_"+g),comment_author_email:Cookies.get("comment_author_email_"+g),comment_author_url:Cookies.get("comment_author_url_"+g)});if(e(".wpd-vote-down.wpd-dislike-hidden").remove(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd"),e(document).delegate("#wpd-editor-source-code-wrapper-bg","click",function(){e(this).hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),wpdiscuzLoadRichEditor&&e(document).delegate("#wpd-insert-source-code","click",function(){var t=wpDiscuzEditor.createEditor("#"+e("#wpd-editor-uid").val());t.deleteText(0,t.getLength(),Quill.sources.USER);var a=e("#wpd-editor-source-code").val();a.length&&t.clipboard.dangerouslyPasteHTML(0,a,Quill.sources.USER),t.update(),e("#wpd-editor-source-code-wrapper-bg").hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),e(document).delegate(".wpd-reply-button","click",function(){var n=V(e(this),0);e(this).hasClass("wpdiscuz-clonned")?(wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+n).focus()},v):setTimeout(function(){e("#wc-textarea-"+n).trigger("focus")},v),e("#wpd-secondary-form-wrapper-"+n).slideToggle(v)):function(a){var o=V(a,0);e("#wpdiscuz_form_anchor-"+o).before(function(t){return e("#wpdiscuz_hidden_secondary_form").html().replace(/wpdiscuzuniqueid/g,t)}(o));var d=e("#wpd-secondary-form-wrapper-"+o);if(!t){var n={comment_author:Cookies.get("comment_author_"+g),comment_author_email:Cookies.get("comment_author_email_"+g),comment_author_url:Cookies.get("comment_author_url_"+g)};S(n)}wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+o).focus()},v):setTimeout(function(){e("#wc-textarea-"+o).trigger("focus")},v);d.slideToggle(v,function(){a.addClass("wpdiscuz-clonned")})}(e(this)),function(t){if((a||o)&&"2.0"===d){var n=B(t);setTimeout(function(){if(!T[n])try{T[n]=grecaptcha.render("wpdiscuz-recaptcha-"+t,{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(a){e("#wpdiscuz-recaptcha-field-"+t).val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-"+t).val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}},1e3)}}(n)}),e(document).delegate("#wpdcom .wpd-comment-link [data-comment-url]","click",function(){var t=e(this).data("comment-url"),a=e("<input/>");a.appendTo("body").css({position:"absolute",top:"-10000000px"}).val(t),a.select(),document.execCommand("copy"),a.remove(),wpdiscuzAjaxObj.setCommentMessage(t+"<br/>"+wpdiscuzAjaxObj.wc_copied_to_clipboard,"success",5e3)}),e(document).delegate(".wpdiscuz-nofollow,.wc_captcha_refresh_img,.wpd-load-more-submit","click",function(e){e.preventDefault()}),e(document).delegate(".wpd-toggle.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked");var a=V(e(this),0),o=e(this),d=e(".fas",o);!o.parents(".wpd-comment:not(.wpd-reply)").children(".wpd-reply").length&&_?function(t,a){var o=B(t),d=new FormData;d.append("action","wpdShowReplies"),d.append("commentId",o),ce(z,!0,d).done(function(o){a.addClass("wpd_not_clicked"),"object"==typeof o&&o.success&&(e("#wpd-comm-"+t).replaceWith(o.data.comment_list),e("#wpd-comm-"+t+" .wpd-toggle .fas").removeClass("fa-chevron-down").addClass("fa-chevron-up"),e("#wpd-comm-"+t+" .wpd-toggle").attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text),e("#wpd-comm-"+t+" .wpd-toggle .wpd-view-replies").remove(),ie(o)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,d){console.log(d),a.addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}(a,t):e("#wpd-comm-"+a+"> .wpd-reply").slideToggle(700,function(){e(this).is(":hidden")?(d.removeClass("fa-chevron-up"),d.addClass("fa-chevron-down"),o.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_show_replies_text)):(d.removeClass("fa-chevron-down"),d.addClass("fa-chevron-up"),o.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text)),t.addClass("wpd_not_clicked")})}),e(document).delegate(".wpd-new-loaded-comment","mouseenter",function(){e(this).removeClass("wpd-new-loaded-comment")}),e(document).delegate(".wpd-sbs-toggle","click",function(){e(".wpdiscuz-subscribe-bar").slideToggle(v)}),parseInt(wpdiscuzAjaxObj.wpDiscuzIsShowOnSubscribeForm)&&!t&&wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&("2.0"===d?(setTimeout(function(){try{grecaptcha.render("wpdiscuz-recaptcha-subscribe-form",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-subscribe-form").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}},1e3),e(document).delegate("#wpdiscuz-subscribe-form","submit",function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val()?e(".wpdiscuz-recaptcha",e(this)).css("border","none"):(e(".wpdiscuz-recaptcha",e(this)).css("border","1px solid red"),t.preventDefault())})):"3.0"===d&&e(document).delegate("#wpdiscuz_subscription_button","click",function(t){var a=e(this).parents("#wpdiscuz-subscribe-form");t.preventDefault();try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/wpdAddSubscription"}).then(function(e){console.log(5555),document.getElementById("wpdiscuz-recaptcha-field-subscribe-form").value=e,a.submit()},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error")}})),(a||o)&&"2.0"===d){var F=e(window).width(),L=e("#wpdcom").width();L>=1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"65%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"35%"})),L>=940&&L<1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"60%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"40%"})),L>=810&&L<940&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"60%"})),L>=730&&L<810&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"45%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"55%"})),L>=610&&L<730&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.85)","-webkit-transform":"scale(0.85)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"43%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"55%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"})),F>650&&(L>=510&&L<610&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"35%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"63%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%",position:"relative",right:"-60px"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),L>=470&&L<510&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"60%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd_main_comm_form .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),L<470&&(e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({margin:"0px auto","transform-origin":"center 0","-webkit-transform-origin":"center 0"}),e("#wpdcom .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc_notification_checkboxes").css({"text-align":"center"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-field-submit").css({"text-align":"center"})))}function R(t,a,o){ce(z||f,!1,a).done(function(a){if(e(o).addClass("wpd_not_clicked"),"object"==typeof a)if(a.success){"collapsed"===wpdiscuzAjaxObj.commentFormView&&e(".wpd-form-foot",t).slideUp(v),e(".wpd-thread-info").html(a.data.wc_all_comments_count_new_html),a.data.wc_all_comments_count_new=parseInt(a.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").text(a.data.wc_all_comments_count_new),a.data.wc_all_comments_count_new?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide();var d=v;a.data.is_main?X(a.data.message):(d=v+700,e("#wpd-secondary-form-wrapper-"+a.data.uniqueid).slideToggle(700),1==a.data.is_in_same_container?e("#wpd-secondary-form-wrapper-"+a.data.uniqueid).after(a.data.message):e("#wpd-comm-"+a.data.uniqueid).after(a.data.message)),function(e){if(!e.data.held_moderate){var t=new FormData;t.append("action","wpdCheckNotificationType"),t.append("comment_id",e.data.new_comment_id),t.append("email",e.data.comment_author_email),t.append("isParent",e.data.is_main),ce(z,!0,t)}}(a),function(e){if(e.data.redirect>0&&e.data.new_comment_id){var t=new FormData;t.append("action","wpdRedirect"),t.append("commentId",e.data.new_comment_id),ce(z,!0,t).done(function(e){"object"==typeof e&&e.success&&setTimeout(function(){location.href=e.data},2e3)}).fail(function(e,t,a){console.log(a)})}}(a),h&&b?function(t){var a=t.comment_author_email,o=t.comment_author,d=t.comment_author_url;null==u?(Cookies.set("comment_author_email_"+g,a),Cookies.set("comment_author_"+g,o),d.length&&Cookies.set("comment_author_url_"+g,d)):(u=parseInt(u),Cookies.set("comment_author_email_"+g,a,{expires:u,path:"/"}),Cookies.set("comment_author_"+g,o,{expires:u,path:"/"}),d.length&&Cookies.set("comment_author_url_"+g,d,{expires:u,path:"/"}));e(".wpd-cookies-checkbox").length&&e(".wpd-cookies-checkbox").attr("checked","checked")}(a.data):b||e(".wpd-cookies-checkbox").removeAttr("checked"),wpdiscuzLoadRichEditor&&wpDiscuzEditor.createEditor("#wpd-editor-"+e(".wpdiscuz_unique_id",t).val()).setContents([{insert:"\n"}]),t.get(0).reset(),S(a.data),e(".wmu-preview-wrap",t).remove(),I.length&&(I.forEach(function(e){e.parents(".wpd-field-checkbox").remove()}),I=[]),parseInt(wpdiscuzAjaxObj.scrollToComment)&&setTimeout(function(){e("html, body").animate({scrollTop:e("#comment-"+a.data.new_comment_id).offset().top-32},1e3)},d),ie(a,t)}else a.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"),ie(a,t));else wpdiscuzAjaxObj.setCommentMessage(a,"error");e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,d){console.log(d),e(o).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}function S(t){e(".wpd_comm_form .wc_name").val(t.comment_author),t.comment_author_email&&t.comment_author_email.indexOf("@example.com")<0&&e(".wpd_comm_form .wc_email").val(t.comment_author_email),t.comment_author_url&&e(".wpd_comm_form .wc_website").val(t.comment_author_url)}function q(t,a){e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").show(),e("#wpd-comm-"+t+" .wpdiscuz-edit-form-wrap").replaceWith(a),e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").show()}e(document).delegate(".wc_comm_submit.wpd_not_clicked","click",function(){var t=e(this),n=1,s=e(this).parents("form");if(s.hasClass("wpd_main_comm_form")||(n=function(t){var a=t.attr("class").split(" "),o="";return e.each(a,function(e,t){"wpd_comment_level"===G(t,!1)&&(o=G(t,!0))}),parseInt(o)+1}(e(this).parents(".wpd-comment"))),J(s,"#wpd-editor-"+e(".wpdiscuz_unique_id",s).val()),s.submit(function(e){e.preventDefault()}),""!==e(".wc_comment",s).val().trim()){if(s[0].checkValidity()&&(c=s,p=!0,"2.0"===d&&e("input[name=wc_captcha]",c).length&&!e("input[name=wc_captcha]",c).val().length?(p=!1,e(".wpdiscuz-recaptcha",c).css("border","1px solid red")):"2.0"===d&&e("input[name=wc_captcha]",c).length&&e(".wpdiscuz-recaptcha",c).css("border","none"),p)){E=!0,function(t){e(".wpd-agreement-checkbox",t).each(function(){e(this).hasClass("wpd_agreement_hide")&&h&&e(this).prop("checked")&&(Cookies.set(e(this).attr("name")+"_"+g,1,{expires:30,path:"/"}),e("input[name="+e(this).attr("name")+"]").each(function(){I.push(e(this))}))})}(s),e(t).removeClass("wpd_not_clicked");var i=new FormData;if(i.append("action","wpdAddComment"),e(":input",s).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&i.append(this.name+"",e(this).val().trim()),"checkbox"!=this.type&&"radio"!=this.type||e(this).is(":checked")&&i.append(this.name+"",e(this).val())}),i.append("wpd_comment_depth",n),wpdiscuzAjaxObj.wpdiscuz_zs&&i.append("wpdiscuz_zs",wpdiscuzAjaxObj.wpdiscuz_zs),e(".wpd-cookies-checkbox",s).length&&!e(".wpd-cookies-checkbox",s).prop("checked")&&(b=!1),e("#wpdiscuz-loading-bar").show(),wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&"3.0"===d&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/addComment"}).then(function(e){i.append("g-recaptcha-response",e),R(s,i,t)},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error"),e("#wpdiscuz-loading-bar").fadeOut(250)}else R(s,i,t)}var c,p;!function(e){if((a||o)&&"2.0"===d){var t=B(e);grecaptcha.reset(T[t])}}(e(".wpdiscuz_unique_id",s).val()),e(".wpdiscuz_reset").val("")}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.wc_msg_required_fields,"error")}),e(document).delegate(".wpd_editable_comment","click",function(){w&&e(".wpdiscuz-edit-form-wrap").length&&q(V(e(".wpdiscuz-edit-form-wrap"),0),w);var t=V(e(this),0),a=B(t),o=new FormData;o.append("action","wpdEditComment"),o.append("commentId",a),w=e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-text").get(0),ce(z,!0,o).done(function(a){if("object"==typeof a)if(a.success){if(e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text").replaceWith(a.data.html),wpdiscuzLoadRichEditor){let o=wpDiscuzEditor.createEditor("#wpd-editor-edit_"+t);o.clipboard.dangerouslyPasteHTML(0,a.data.content),o.update(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd")}else e("#wc-textarea-edit_"+t).val(a.data.content);e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").hide(),e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").hide()}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error");else console.log(a);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wc_save_edited_comment","click",function(){var t=V(e(this)),a=B(t),o=e("#wpd-comm-"+t+" #wpdiscuz-edit-form");if(J(o,"#wpd-editor-edit_"+t),o.submit(function(e){e.preventDefault()}),o[0].checkValidity()){var d=new FormData;d.append("action","wpdSaveEditedComment"),d.append("commentId",a),e(":input",o).each(function(){""!==this.name&&"checkbox"!==this.type&&"radio"!==this.type&&d.append(this.name+"",e(this).val()),"checkbox"!==this.type&&"radio"!==this.type||e(this).is(":checked")&&d.append(this.name+"",e(this).val())}),ce(z,!0,d).done(function(o){"object"==typeof o?(o.success?(q(t,o.data.message),o.data.lastEdited&&(e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").remove(),e(o.data.lastEdited).insertAfter("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text")),o.data.twitterShareLink&&e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_tw").attr("href",o.data.twitterShareLink),o.data.whatsappShareLink&&e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_whatsapp").attr("href",o.data.whatsappShareLink),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[o.data],"error"),ie(o,a)):console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(document).delegate(".wc_cancel_edit","click",function(){var t=V(e(this));q(t,w),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)}),!wpdiscuzAjaxObj.wordpressIsPaginate&&m&&(M=0,1==m?setTimeout(function(){W(!0)},500):e(document).delegate(".wpd-load-comments","click",function(){e(this).parent(".wpd-load-more-submit-wrap").remove(),W(!0)})),e(document).delegate(".wpd-load-more-submit","click",function(){var t=e(this);t.hasClass("wpd-loaded")&&W(!1,t,"wpd-loaded","wpd-loading")});var U=!1;function H(){var t=e("#wpdiscuzHasMoreComments").val(),a=e(document).height(),o=e(window).height()+e(window).scrollTop();a&&o&&(100*o/a>=80&&!1===U&&1==t&&(U=!0,W(!1,e(".wpd-load-more-submit"))))}function W(t,a,o,d){a&&(a.toggleClass(o),a.toggleClass(d));var s=new FormData;s.append("action","wpdLoadMoreComments");var i=e(".wpdiscuz-sort-button-active").attr("data-sorting");i&&s.append("sorting",i),s.append("offset",M),s.append("lastParentId",e(".wpd-load-more-submit").attr("data-lastparentid")),s.append("isFirstLoad",t?1:0);var c=e(".wpdf-active").attr("data-filter-type");s.append("wpdType",c||""),ce(z,!t||1!=m,s).done(function(s){"object"==typeof s&&s.success&&(M++,t&&e(".wpd-comment").remove(),e(".wpdiscuz_single").remove(),e(".wpdiscuz-comment-pagination").before(s.data.comment_list),K(s,t&&2!==n),U=!1,r=s.data.loadLastCommentId,ie(s),t&&P(!1)),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(d))}).fail(function(t,n,s){console.log(s),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(d))})}function K(t,a){var o;0==t.data.is_show_load_more?(e("#wpdiscuzHasMoreComments").val(0),e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide()):(o=t.data.last_parent_id,e(".wpd-load-more-submit").attr("data-lastparentid",o),2!==n&&e(".wpdiscuz-comment-pagination").show(),e("#wpdiscuzHasMoreComments").val(1),a&&e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").show()),ie(t)}function P(t){var a=location.href.match(/#comment\-(\d+)/);if(null!==a){var o=a[1];if(e("#comment-"+o).length)setTimeout(function(){e("html, body").animate({scrollTop:e("#comment-"+o).parents("[id^=wpd-comm-]").offset().top-32},1e3),t&&N(o)},500);else{var d=new FormData;d.append("action","wpdGetSingleComment"),d.append("commentId",o),ce(z,!0,d).done(function(a){if("object"==typeof a&&a.success){var d="#comment-"+o;e("#comment-"+a.data.parentCommentID).length?e("#comment-"+a.data.parentCommentID).parents("[id^=wpd-comm-"+a.data.parentCommentID+"]").replaceWith(a.data.message):e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e(d).offset().top-32},1e3),t&&N(o)}e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}}function N(t){setTimeout(function(){e("#comment-"+t).siblings(".wpd-secondary-form-wrapper").is(":visible")||e("#comment-"+t).find(".wpd-reply-button").trigger("click")},1100)}function Q(e){if(void 0!==e.data.message)for(var t,a=e.data.message,o=0;o<a.length;o++)$((t=a[o]).comment_parent,t.comment_html)}function V(e,t){var a="";return(a=t?e.parents(".wpd-main-form-wrapper").attr("id"):e.parents(".wpd-comment").attr("id")).substring(a.lastIndexOf("-")+1)}function B(e){return e.substring(0,e.indexOf("_"))}function G(e,t){return t?e.substring(e.indexOf("-")+1):e.substring(0,e.indexOf("-"))}function $(t,a){if(0==t)X(a);else{var o=V(e("#comment-"+t),0);e("#wpdiscuz_form_anchor-"+o).after(a)}}function Y(){var t,a,o="";return e(".wpd-comment-right").each(function(){t=V(e(this),0),a=B(t),o+=a+","}),o}function J(t,a){var o=t.find(".wpd-required-group");wpdiscuzLoadRichEditor&&t.find(".wc_comment").val(e(a+">.ql-editor").html()),function(e){var t=e.find(".wc_comment"),a=t.val().trim().replace(/<p><br><\/p>/g,"\n").replace(/<p>(.*?)<\/p>/g,"$1\n");a=(a=(a=(a=a.replace(/<img src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g," $3 ")).replace(/<img[^>]+alt=["|']([^"|']+)["|'][^>]+src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'][^>]?>/g," $1 ")).replace(/<img\s+([^>]*)class=["|']wpdem\-sticker["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g," $3 ")).replace(/<img\s+([^>]*)src=["|']([^"|']+)["|'](.*?)[^>]*>/g," $2 "),t.val(a)}(t),e.each(o,function(){e("input",this).removeAttr("required"),0===e("input:checked",this).length?e("input",e(this)).attr("required","required"):e(".wpd-field-invalid",this).remove()})}function X(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function Z(t){t?t.prop("required")||(t.val()?t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none")):e.each(e(".wc_email"),function(t,a){var o=e(a);o.prop("required")||(o.val()?o.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):o.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none"))})}if(2!==n||wpdiscuzAjaxObj.wordpressIsPaginate||(e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide(),H(),e(window).scroll(function(){H()})),wpdiscuzAjaxObj.setLoadMoreVisibility=K,e(document).delegate(".wpd-vote-up.wpd_not_clicked, .wpd-vote-down.wpd_not_clicked","click",function(){var t=e(this);e(t).removeClass("wpd_not_clicked");var a,o=B(V(t));a=e(this).hasClass("wpd-vote-up")?1:-1;var d=new FormData;d.append("action","wpdVoteOnComment"),d.append("commentId",o),d.append("voteType",a),ce(z,!0,d).done(function(d){if(e(t).addClass("wpd_not_clicked"),"object"==typeof d){if(d.success){if("total"===d.data.buttonsStyle){var n=e(".wpd-comment-footer .wpd-vote-result",e("#comment-"+o)),s=d.data.votes;n.text(s),n.removeClass("wpd-up wpd-down"),s>0&&n.addClass("wpd-up"),s<0&&n.addClass("wpd-down")}else{var i=e(".wpd-comment-footer .wpd-vote-result-like",e("#comment-"+o)),c=e(".wpd-comment-footer .wpd-vote-result-dislike",e("#comment-"+o));i.text(d.data.likeCount),c.text(d.data.dislikeCount),parseInt(d.data.likeCount)>0?i.addClass("wpd-up"):i.removeClass("wpd-up"),parseInt(d.data.dislikeCount)<0?c.addClass("wpd-down"):c.removeClass("wpd-down")}var p=e(".wpd-comment-footer .wpd-vote-up",e("#comment-"+o)),r=e(".wpd-comment-footer .wpd-vote-down",e("#comment-"+o));p.removeClass("wpd-up"),r.removeClass("wpd-down"),d.data.curUserReaction>0?p.addClass("wpd-up"):d.data.curUserReaction<0&&r.addClass("wpd-down")}else d.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[d.data],"error");ie(d,o,a)}else console.log(d);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(a,o,d){console.log(d),e(t).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate("body","click",function(t){var a=e(".wpdiscuz-sort-buttons");e(t.target).hasClass("wpdf-sorting")||e(t.target).parent().hasClass("wpdf-sorting")?a.css({display:a.is(":visible")?"none":"flex"}):a.hide()}),e(document).delegate(".wpdiscuz-sort-button:not(.wpdiscuz-sort-button-active)","click",function(){var t=e(this),a=e(this).attr("data-sorting");if(a){e(".wpdiscuz-sort-button.wpdiscuz-sort-button-active").removeClass("wpdiscuz-sort-button-active").appendTo(".wpdiscuz-sort-buttons"),t.addClass("wpdiscuz-sort-button-active").prependTo(".wpdf-sorting");var o=new FormData;o.append("action","wpdSorting"),o.append("sorting",a);var d=e(".wpdf-active").attr("data-filter-type");o.append("wpdType",d||""),ce(z,!0,o).done(function(t){"object"==typeof t&&t.success&&(e("#wpdcom .wpd-comment").remove(),e("#wpdcom .wpd-thread-list").prepend(t.data.message),K(t,!1),M=1),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),window.onhashchange=function(){P(!1)},1!=m&&P(!1),e(document).delegate(".wpdiscuz-readmore","click",function(){var t=V(e(this)),a=B(t),o=new FormData;o.append("action","wpdReadMore"),o.append("commentId",a),ce(z,!0,o).done(function(o){"object"==typeof o?(o.success?(e("#comment-"+a+" .wpd-comment-text").replaceWith(" "+o.data.message),e("#wpdiscuz-readmore-"+t).remove()):console.log(o.data),ie(o)):console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-required-group","change",function(){0!==e("input:checked",this).length?e("input",e(this)).removeAttr("required"):e("input",e(this)).attr("required","required")}),e(document).delegate(".wpdiscuz-spoiler","click",function(){e(this).next().slideToggle(),e(this).hasClass("wpdiscuz-spoiler-closed")?e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-plus").removeClass("fa-plus").addClass("fa-minus"):e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-minus").removeClass("fa-minus").addClass("fa-plus"),e(this).toggleClass("wpdiscuz-spoiler-closed")}),e(document).delegate(".wpd-tools i","click",function(){var t=e(this).siblings(".wpd-tools-actions");t.css({display:t.is(":visible")?"none":"flex"})}),e(document).delegate(".wpd-comment-right","mouseleave",function(){e(this).find(".wpd-tools-actions").hide()}),e(document).delegate(".wpd_stick_btn","click",function(){var t=B(V(e(this),0)),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",t),ce(z,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd_close_btn","click",function(){var t=B(V(e(this),0)),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",t),ce(z,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-filter.wpd_not_clicked[data-filter-type]","click",function(){var t=e(this),a=t.attr("data-filter-type");wpdiscuzAjaxObj.resetActiveFilters(".wpdf-"+a),t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=new FormData;o.append("action","wpdLoadMoreComments");var d=e(".wpdiscuz-sort-button-active").attr("data-sorting");d&&o.append("sorting",d),o.append("lastParentId",0),o.append("offset",0),M=1,o.append("wpdType",t.hasClass("wpdf-active")?"":a),o.append("isFirstLoad",1),e(this).hasClass("wpdf-inline")?e(this).hasClass("wpdf-active")?e(".wpd-comment-info-bar").hide():e(".wpd-comment-info-bar").css("display","flex"):e(".wpd-comment-info-bar").hide(),ce(z,!1,o).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(t.toggleClass("wpdf-active"),e(".wpd-load-comments").remove(),e(".wpd-comment").remove(),e(".wpd-thread-list").prepend(a.data.comment_list),K(a),r=a.data.loadLastCommentId,e(".wpd-load-more-submit").blur(),ie(a)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpdf-reacted.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdMostReactedComment"),ce(z,!1,a).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(e("#comment-"+a.data.parentCommentID).length?e("#comment-"+a.data.parentCommentID).parents("[id^=wpd-comm-"+a.data.parentCommentID+"]").replaceWith(a.data.message):e("#comment-"+a.data.commentId).length||e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3))}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e(document).delegate(".wpdf-hottest.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdHottestThread"),ce(z,!1,a).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(e("#comment-"+a.data.commentId).length?e("#comment-"+a.data.commentId).parents("[id^=wpd-comm-"+a.data.commentId+"]").replaceWith(a.data.message):e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3))}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e(document).delegate(".wpd-filter-view-all","click",function(){e(".wpdf-inline.wpdf-active.wpd_not_clicked").trigger("click")}),e(document).delegate(".wpd-follow-link.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=B(V(t,0)),o=new FormData;o.append("action","wpdFollowUser"),o.append("commentId",a),ce(z,!0,o).done(function(a){t.addClass("wpd_not_clicked"),"object"==typeof a?a.success?(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data.code],"success"),t.removeClass("wpd-follow-active"),a.data.followTip&&t.attr("wpd-tooltip",a.data.followTip),a.data.followClass&&t.addClass(a.data.followClass)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"):console.log(a),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),Z(),e(document).delegate(".wc_email","keyup",function(){Z(e(this))}),j&&e("#wpdcom").length){if(e("#wpd-bubble-wrapper").hover(function(){e(this).addClass("wpd-bubble-hover")},function(){e(this).removeClass("wpd-bubble-hover")}),k&&!Cookies.get(wpdiscuzAjaxObj.cookieHideBubbleHint)&&setTimeout(function(){e("#wpd-bubble-wrapper").addClass("wpd-bubble-hover"),Cookies.set(wpdiscuzAjaxObj.cookieHideBubbleHint,"1",{expires:7,path:"/"}),setTimeout(function(){e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")},1e3*x)},1e3*k),"content_left"===O)if(e(".entry-content").length){var ee=(te=Math.min(e(".entry-content").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){ee=(te=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var te;ee=(te=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner");else"left_corner"===O?(e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner")):"right_corner"===O&&(e("#wpd-bubble-wrapper").css({right:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-right-corner"));e("#wpd-bubble-wrapper").show(),e("#wpd-bubble-add-message-close").click(function(t){t.preventDefault(),t.stopPropagation(),e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")}),e("#wpd-bubble").click(function(){e("html, body").animate({scrollTop:e("#wpdcom").offset().top-60},1e3,function(){e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover"),wpdiscuzLoadRichEditor?e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0").focus():e("#wc-textarea-0_0").length&&e("#wc-textarea-0_0").focus()})}),e("#wpd-bubble-comment-close").click(function(t){t.preventDefault(),e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")}),e("#wpd-bubble-comment-reply-link a").click(function(){var t=e(this).attr("href");setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),P(!0);var a=t.match(/#comment\-(\d+)/);D=D.filter(function(e){return e!=a[1]}),e("#wpd-bubble-count .wpd-new-comments-count").text(D.length),0==D.length&&e("#wpd-bubble-count").removeClass("wpd-new-comments")},100)}),e("#wpd-bubble-count").click(function(){if(D.length){var t=new FormData;t.append("action","wpdBubbleUpdate"),t.append("newCommentIds",D.join()),ce(z,!0,t).done(function(t){"object"==typeof t&&t.success&&(t.data.message=t.data.message.filter(function(t){if(!e("#comment-"+t.comment_id).length)return t}),Q(t),e("#wpd-bubble-count").removeClass("wpd-new-comments"),e("#wpd-bubble-count .wpd-new-comments-count").text("0"),D=[],e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-60},1e3),ie(t)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(e,t,a){console.log(a)})}})}if((j&&C||i)&&(t||!t&&p)&&setTimeout(function t(){e.ajax({type:"GET",url:wpdiscuzAjaxObj.bubbleUpdateUrl,data:{postId:s,lastId:l,visibleCommentIds:Y()}}).done(function(a){if(!E)if("object"==typeof a){if(a.ids.length){i&&((n=new FormData).append("action","wpdUpdateAutomatically"),n.append("loadLastCommentId",r),n.append("visibleCommentIds",Y()),ce(z,!1,n).done(function(t){E||"object"==typeof t&&t.success&&(Q(t),e(".wpd-thread-info").html(t.data.wc_all_comments_count_new_html),t.data.wc_all_comments_count_new=parseInt(t.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").text(t.data.wc_all_comments_count_new),t.data.wc_all_comments_count_new?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),r=t.data.loadLastCommentId)}).fail(function(e,t,a){console.log(a)})),a.ids=a.ids.filter(function(t){if(!e("#comment-"+t).length)return t});var o=5e3;l=parseInt(a.ids[a.ids.length-1]),D=D.concat(a.ids),y&&a.commentText&&(e("#wpd-bubble-author-avatar").html(a.avatar),e("#wpd-bubble-author-name").html(a.authorName),e("#wpd-bubble-comment-date span").html(a.commentDate),e("#wpd-bubble-comment-text").html(a.commentText),e("#wpd-bubble-comment-reply-link a").attr("href",a.commentLink),e("#wpd-bubble-notification-message").show(),o=1e4);var d=parseInt(e(".wpd-new-comments-count").text());d+=a.ids.length,e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),e("#wpd-bubble-wrapper").addClass("wpd-new-comment-added"),setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")},o),e(".wpd-new-comments-count").text(d),e("#wpd-bubble-count").addClass("wpd-new-comments"),a.all_comments_count=parseInt(a.all_comments_count),e("#wpd-bubble-all-comments-count").text(a.all_comments_count),a.all_comments_count?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),e(".wpd-thread-info").html(a.all_comments_count_html)}}else console.log(a);var n;setTimeout(t,c)}).fail(function(e,a,o){console.log(o),setTimeout(t,c)})},c),e(".wpd-inline-form-wrapper").length){var ae=new FormData;ae.append("action","wpdGetInlineCommentForm"),ce(z,!1,ae).done(function(t){"object"==typeof t?t.success?(e(".wpd-inline-form-wrapper").append(t.data),e.each(e("[name=_wpd_inline_nonce]"),function(){var t=e(this).attr("id"),a=e(this).parents(".wpd-inline-shortcode").attr("id");e(this).attr("id",t+"-"+a.substring(a.lastIndexOf("-")+1))}),e(".wpd-inline-opened").addClass("wpd-active"),e(".wpd-inline-opened").find(".wpd-inline-form-wrapper").show(),e(".wpd-inline-opened").find(".wpd-inline-icon").addClass("wpd-open"),e(".wpd-inline-opened").find(".wpd-inline-icon").removeClass("wpd-ignored"),se()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t)}).fail(function(e,t,a){console.log(a)})}function oe(t){if(e(t).hasClass("wpd-inline-shortcode"))var a=e(t).attr("id");else a=e(t).parents(".wpd-inline-shortcode").attr("id");return a.substring(a.lastIndexOf("-")+1)}function de(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function ne(){e.each(e(".wpd-inline-shortcode:not(.wpd-inline-opened) .wpd-inline-icon"),function(){var t=e(this),a=t.offset().top-window.pageYOffset;a>0&&a<300&&("blink"===A?(t.addClass("wpd-blink"),setTimeout(function(){t.removeClass("wpd-blink")},3e3)):(t.parents(".wpd-inline-shortcode").addClass("wpd-active"),t.siblings(".wpd-inline-form-wrapper").show(),t.addClass("wpd-open"),se(t.siblings(".wpd-inline-form-wrapper"))))})}function se(t){if(t){if(t.offset().left<=10)t.css("left",Math.ceil(parseInt(t.css("left"))-t.offset().left+10)),(a=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2))<3&&(a=3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+a+"px;");else if(t.offset().left+t.width()>document.body.clientWidth-10){var a;t.css("left",Math.ceil(parseInt(t.css("left"))+(document.body.clientWidth-(t.offset().left+t.width()))-10)),(a=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2))>t.width()-3&&(a=t.width()-3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+a+"px;")}}else e.each(e(".wpd-inline-form-wrapper:visible"),function(){if(e(this).offset().left<=10)e(this).css("left",Math.ceil(parseInt(e(this).css("left"))-e(this).offset().left+10)),(t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2))<3&&(t=3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;");else if(e(this).offset().left+e(this).width()>document.body.clientWidth-10){var t;e(this).css("left",Math.ceil(parseInt(e(this).css("left"))+(document.body.clientWidth-(e(this).offset().left+e(this).width()))-10)),(t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2))>e(this).width()-3&&(t=e(this).width()-3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;")}})}function ie(t,a,o,d){t.data.callbackFunctions&&e.each(t.data.callbackFunctions,function(e){"function"==typeof wpdiscuzAjaxObj[t.data.callbackFunctions[e]]?wpdiscuzAjaxObj[t.data.callbackFunctions[e]](t,a,o,d):console.log(t.data.callbackFunctions[e]+" is not a function")})}function ce(t,a,o){a&&e("#wpdiscuz-loading-bar").show(),o.append("postId",s);var d=o.get("action");wpdiscuzAjaxObj.dataFilterCallbacks&&wpdiscuzAjaxObj.dataFilterCallbacks[d]&&e.each(wpdiscuzAjaxObj.dataFilterCallbacks[d],function(e){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[d][e]]&&(o=wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[d][e]](o,t,a))});var n=t?wpdiscuzAjaxObj.url:wpdiscuzAjaxObj.customAjaxUrl;return e.ajax({type:"POST",url:n,data:o,contentType:!1,processData:!1})}e(document).delegate("body","click",function(t){if(e(t.target).hasClass("wpd-inline-form-close")||e(t.target).parents(".wpd-inline-form-close").length)t.preventDefault(),e(t.target).parents(".wpd-inline-form-wrapper").hide(),e(t.target).parents(".wpd-inline-shortcode").removeClass("wpd-active"),e(t.target).parents(".wpd-inline-form-wrapper").siblings(".wpd-inline-icon").removeClass("wpd-open");else if(!e(t.target).hasClass("wpd-inline-form-wrapper")&&!e(t.target).parents(".wpd-inline-form-wrapper").length){de();var a="";e(t.target).hasClass("wpd-inline-icon")?a=e(t.target):e(t.target).parents(".wpd-inline-icon").length&&(a=e(t.target).parents(".wpd-inline-icon")),a.length&&(a.parents(".wpd-inline-shortcode").addClass("wpd-active"),a.siblings(".wpd-inline-form-wrapper").show(),a.addClass("wpd-open"),a.removeClass("wpd-ignored"),se(a.siblings(".wpd-inline-form-wrapper")))}(!e(t.target).hasClass("wpd-last-inline-comments-wrapper")&&!e(t.target).parents(".wpd-last-inline-comments-wrapper").length||e(t.target).parents(".wpd-last-inline-comments-wrapper").length&&e(t.target).hasClass("wpd-load-inline-comment"))&&e(".wpd-last-inline-comments-wrapper").remove()}),e(document).delegate(".wpd-inline-submit.wpd_not_clicked","click",function(t){t.preventDefault();var a=e(this),o=e(this).parents(".wpd_inline_comm_form");if(o[0].checkValidity()){e(this).removeClass("wpd_not_clicked");var d=new FormData;d.append("action","wpdAddInlineComment"),d.append("inline_form_id",oe(o)),e.each(e("input, textarea",o),function(t,a){"checkbox"===this.type?e(this).is(":checked")&&d.append(e(a).attr("name"),e(a).val()):d.append(e(a).attr("name"),e(a).val())}),ce(z,!0,d).done(function(t){if(a.addClass("wpd_not_clicked"),"object"==typeof t)if(t.success){o[0].reset(),de();var d=parseInt(t.data.newCount),n=a.parents(".wpd-inline-icon-wrapper").find(".wpd-inline-icon-count");n.text(d),d?n.addClass("wpd-has-comments"):n.removeClass("wpd-has-comments"),e(".wpd-thread-info").html(t.data.allCommentsCountNewHtml),t.data.allCommentsCountNew=parseInt(t.data.allCommentsCountNew),e("#wpd-bubble-all-comments-count").text(t.data.allCommentsCountNew),t.data.allCommentsCountNew?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),t.data.message&&X(t.data.message),wpdiscuzAjaxObj.setCommentMessage(t.data.notification,"success")}else t.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error");else wpdiscuzAjaxObj.setCommentMessage(t,"error");e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(document).delegate(".wpd-form","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_comm_submit").trigger("click")}),e(document).delegate("#wpdiscuz-edit-form","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_save_edited_comment").trigger("click")}),e(document).delegate(".wpd-inline-comment-content","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).parents(".wpd_inline_comm_form").find(".wpd-inline-submit.wpd_not_clicked").trigger("click")}),e(document).delegate(".wpd-inline-icon-count.wpd-has-comments","click",function(){var t=e(this),a=new FormData;a.append("action","wpdGetLastInlineComments"),a.append("inline_form_id",oe(t)),ce(z,!0,a).done(function(a){"object"==typeof a?a.success?e(a.data).insertAfter(t):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"):console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-view-all-inline-comments","click",function(t){t.preventDefault(),e(this).parents(".wpd-last-inline-comments-wrapper").remove(),e(".wpdf-inline").hasClass("wpdf-active")||e(".wpdf-inline").trigger("click"),e("html, body").animate({scrollTop:e(".wpdf-inline").offset().top-32},1e3)}),e(document).delegate(".wpd-feedback-content-link","click",function(t){t.preventDefault();var a=e(this).data("feedback-content-id");e("html, body").animate({scrollTop:e("#wpd-inline-"+a).offset().top-38},1e3,function(){e("#wpd-inline-"+a).addClass("wpd-active")})}),"scroll_open"!==A&&"blink"!==A||(ne(),e(window).scroll(ne)),e(document).delegate("#wpd-post-rating.wpd-not-rated .wpd-rate-starts svg","click",function(){var t=new FormData,a=e(this).index();a>=0&&a<5&&(t.append("action","wpdUserRate"),t.append("rating",a+1),ce(z,!0,t).done(function(t){"object"==typeof t?t.success?location.reload(!0):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}))}),e("#wpdiscuz-subscribe-form").submit(function(t){t.preventDefault();var a,o,n=e(this);if(n[0].checkValidity()&&(a=n,o=!0,"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).length&&!e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).val().length?(o=!1,e(".wpdiscuz-recaptcha",a).css("border","1px solid red")):"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).length&&e(".wpdiscuz-recaptcha",a).css("border","none"),o)){var s=new FormData;s.append("action","wpdAddSubscription"),e("*",n).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&s.append(this.name+"",e(this).val()),"checkbox"!=this.type&&"radio"!=this.type||e(this).is(":checked")&&s.append(this.name+"",e(this).val())}),ce(z,!0,s).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):wpdiscuzAjaxObj.setCommentMessage(t,"error"),e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(".wpd-unsubscribe").click(function(t){t.preventDefault();var a=new FormData;a.append("action","wpdUnsubscribe"),a.append("sid",e(this).data("sid")),a.append("skey",e(this).data("skey")),ce(z,!0,a).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),wpdiscuzAjaxObj.resetActiveFilters=function(t){e(".wpd-filter.wpdf-active"+(t?":not("+t+")":"")).removeClass("wpdf-active")},wpdiscuzAjaxObj.getAjaxObj=ce});var onloadCallback=function(){if(document.getElementById("wpdiscuz-recaptcha-0_0")&&"2.0"===wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.render("wpdiscuz-recaptcha-0_0",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(e){jQuery("#wpdiscuz-recaptcha-field-0_0").val("key")},"expired-callback":function(){jQuery("#wpdiscuz-recaptcha-field-0_0").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}};
7
  /* Colorbox */
8
  (function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!U){U=$=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("<div/>"),w()}}function p(){x||(V=!1,E=t(i),x=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),L=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),y=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),R=n(se,"Current"),P=t('<button type="button"/>').attr({id:Z+"Previous"}),K=t('<button type="button"/>').attr({id:Z+"Next"}),S=t('<button type="button"/>').attr({id:Z+"Slideshow"}),L),B=t('<button type="button"/>').attr({id:Z+"Close"}),y.append(n(se).append(n(se,"TopLeft"),T=n(se,"TopCenter"),n(se,"TopRight")),n(se,!1,"clear:left").append(C=n(se,"MiddleLeft"),b,H=n(se,"MiddleRight")),n(se,!1,"clear:left").append(n(se,"BottomLeft"),k=n(se,"BottomCenter"),n(se,"BottomRight"))).find("div div").css({"float":"left"}),M=n(se,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=K.add(P).add(R).add(S)),e.body&&!x.parent().length&&t(e.body).append(v,x.append(y,M))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),f(this))}return x?(V||(V=!0,K.click(function(){J.next()}),P.click(function(){J.prev()}),B.click(function(){J.close()}),v.click(function(){_.get("overlayClose")&&J.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;U&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),U&&_.get("arrowKey")&&W[1]&&!t.altKey&&(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),K.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,i):t("."+te).live("click."+Z,i)),!0):!1}function w(){var e,o,r,h=J.prep,d=++le;if($=!0,q=!1,u(he),u(ie),_.get("onLoad"),_.h=_.get("height")?a(_.get("height"),"y")-N-j:_.get("innerHeight")&&a(_.get("innerHeight"),"y"),_.w=_.get("width")?a(_.get("width"),"x")-z-D:_.get("innerWidth")&&a(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=a(_.get("maxWidth"),"x")-z-D,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=a(_.get("maxHeight"),"y")-N-j,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.get("href"),Q=setTimeout(function(){L.show()},100),_.get("inline")){var c=t(e).eq(0);r=t("<div>").hide().insertBefore(c),ae.one(he,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),q=_.get("createImg"),t(q).addClass(Z+"Photo").bind("error."+Z,function(){h(n(se,"Error").html(_.get("imgError")))}).one("load",function(){d===le&&setTimeout(function(){var e;_.get("retinaImage")&&i.devicePixelRatio>1&&(q.height=q.height/i.devicePixelRatio,q.width=q.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){q.height-=q.height*e,q.width-=q.width*e},_.mw&&q.width>_.mw&&(e=(q.width-_.mw)/q.width,o()),_.mh&&q.height>_.mh&&(e=(q.height-_.mh)/q.height,o())),_.h&&(q.style.marginTop=Math.max(_.mh-q.height,0)/2+"px"),W[1]&&(_.get("loop")||W[A+1])&&(q.style.cursor="pointer",t(q).bind("click."+Z,function(){J.next()})),q.style.width=q.width+"px",q.style.height=q.height+"px",h(q)},1)}),q.src=e):e&&M.load(e,_.get("data"),function(e,i){d===le&&h("error"===i?n(se,"Error").html(_.get("xhrError")):t(this).contents())})}var v,x,y,b,T,C,H,k,W,E,I,M,L,F,R,S,K,P,B,O,_,j,D,N,z,A,q,U,$,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),n=t(this).data("cbox-iframe-attrs");return"object"==typeof n&&t.each(n,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",ne=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",ae=t("<a/>"),se="div",le=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){S.html(_.get("slideshowStop")).unbind(s).one(s,n),ae.bind(ne,e).bind(ie,t),x.removeClass(a+"off").addClass(a+"on")}function n(){t(),ae.unbind(ne,e).unbind(ie,t),S.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),x.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,S.hide(),t(),ae.unbind(ne,e).unbind(ie,t),x.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(ae.unbind(oe,o),o()):_.get("slideshow")&&W[1]&&(r=!0,ae.one(oe,o),_.get("slideshowAuto")?i():n(),S.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;return e=e||{},t.isFunction(o)&&(o=t("<a/>"),e.open=!0),o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(te),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(x[0].style.width,10)-D+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(x[0].style.height,10)-j+"px"}var r,h,s,l=0,d=0,c=x.offset();if(E.unbind("resize."+Z),x.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,x.css({position:"fixed"})):(l=h,d=s,x.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-z-D-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-z-D,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-N-j-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-N-j,0)/2),x.css({top:c.top,left:c.left,visibility:"visible"}),y[0].style.width=y[0].style.height="9999px",r={width:_.w+z+D,height:_.h+N+j,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==de[t]?(g=e,void 0):void 0}),e=g}de=r,e||x.css(r),x.dequeue().animate(r,{duration:e||0,complete:function(){n(),$=!1,y[0].style.width=_.w+z+D+"px",y[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;U&&(t=t||{},t.width&&(_.w=a(t.width,"x")-z-D),t.innerWidth&&(_.w=a(t.innerWidth,"x")),I.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-N-j),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=I.scrollTop(),I.css({height:"auto"}),_.h=I.height()),I.css({height:_.h}),e&&I.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||I.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||I.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if(U){var d,g="none"===_.get("transition")?0:_.get("speed");I.remove(),I=n(se,"LoadedContent").append(i),I.hide().appendTo(M.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),M.hide(),t(q).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&x[0].style.removeAttribute("filter")}var n,o,a=W.length;U&&(o=function(){clearTimeout(Q),L.hide(),u(ne),_.get("onComplete")},F.html(_.get("title")).show(),I.show(),a>1?("string"==typeof _.get("current")&&R.html(_.get("current").replace("{current}",A+1).replace("{total}",a)).show(),K[_.get("loop")||a-1>A?"show":"hide"]().html(_.get("next")),P[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ce(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=_.get("createIframe"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(I),ae.one(he,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?x.fadeTo(g,1,i):i())},"fade"===_.get("transition")?x.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!$&&W[1]&&(_.get("loop")||W[A+1])&&(A=h(1),f(W[A]))},J.prev=function(){!$&&W[1]&&(_.get("loop")||A)&&(A=h(-1),f(W[A]))},J.close=function(){U&&!G&&(G=!0,U=!1,u(oe),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),x.stop().fadeTo(_.get("fadeOut")||0,0,function(){x.hide(),v.hide(),u(he),I.remove(),setTimeout(function(){G=!1,u(re),_.get("onClosed")},1)}))},J.remove=function(){x&&(x.stop(),t[Y].close(),x.stop(!1,!0).remove(),v.remove(),G=!1,x=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)})(jQuery,document,window);
9
  /* Media Uploader */
11
  /* Lity */
12
  !function(e,t){"function"==typeof define&&define.amd?define(["jquery"],function(n){return t(e,n)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(e,require("jquery")):e.lity=t(e,e.jQuery||e.Zepto)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=e.document,i=t(e),r=t.Deferred,o=t("html"),a=[],l="aria-hidden",s="lity-"+l,d='a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not([tabindex^="-"])',c={esc:!0,handler:null,handlers:{image:C,inline:function(e,n){var i,r,o;try{i=t(e)}catch(e){return!1}if(!i.length)return!1;return r=t('<i style="display:none !important"/>'),o=i.hasClass("lity-hide"),n.element().one("lity:remove",function(){r.before(i).remove(),o&&!i.closest(".lity-content").length&&i.addClass("lity-hide")}),i.removeClass("lity-hide").after(r)},youtube:function(e){var n=f.exec(e);if(!n)return!1;return k(x(e,w("https://www.youtube"+(n[2]||"")+".com/embed/"+n[4],t.extend({autoplay:1},b(n[5]||"")))))},vimeo:function(e){var n=y.exec(e);if(!n)return!1;return k(x(e,w("https://player.vimeo.com/video/"+n[3],t.extend({autoplay:1},b(n[4]||"")))))},googlemaps:function(e){var t=v.exec(e);if(!t)return!1;return k(x(e,w("https://www.google."+t[3]+"/maps?"+t[6],{output:t[6].indexOf("layer=c")>0?"svembed":"embed"})))},facebookvideo:function(e){var n=p.exec(e);if(!n)return!1;0!==e.indexOf("http")&&(e="https:"+e);return k(x(e,w("https://www.facebook.com/plugins/video.php?href="+e,t.extend({autoplay:1},b(n[4]||"")))))},iframe:k},template:'<div class="lity" role="dialog" aria-label="Dialog Window (Press escape to close)" tabindex="-1"><div class="lity-wrap" data-lity-close role="document"><div class="lity-loader" aria-hidden="true">Loading...</div><div class="lity-container"><div class="lity-content"></div><button class="lity-close" type="button" aria-label="Close (Press escape to close)" data-lity-close>&times;</button></div></div></div>'},u=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i,f=/(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i,y=/(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/,v=/((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i,p=/(facebook\.com)\/([a-z0-9_-]*)\/videos\/([0-9]*)(.*)?$/i,m=function(){var e=n.createElement("div"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in t)if(void 0!==e.style[i])return t[i];return!1}();function h(e){var t=r();return m&&e.length?(e.one(m,t.resolve),setTimeout(t.resolve,500)):t.resolve(),t.promise()}function g(e,n,i){if(1===arguments.length)return t.extend({},e);if("string"==typeof n){if(void 0===i)return void 0===e[n]?null:e[n];e[n]=i}else t.extend(e,n);return this}function b(e){for(var t,n=decodeURI(e.split("#")[0]).split("&"),i={},r=0,o=n.length;r<o;r++)n[r]&&(i[(t=n[r].split("="))[0]]=t[1]);return i}function w(e,n){return e+(e.indexOf("?")>-1?"&":"?")+t.param(n)}function x(e,t){var n=e.indexOf("#");return-1===n?t:(n>0&&(e=e.substr(n)),t+e)}function C(e,n){var i=n.opener()&&n.opener().data("lity-desc")||"Image with no description",o=t('<img src="'+e+'" alt="'+i+'"/>'),a=r(),l=function(){var e;a.reject((e="Failed loading image",t('<span class="lity-error"/>').append(e)))};return o.on("load",function(){if(0===this.naturalWidth)return l();a.resolve(o)}).on("error",l),a.promise()}function k(e){return'<div class="lity-iframe-container"><iframe frameborder="0" allowfullscreen src="'+e+'"/></div>'}function E(){return n.documentElement.clientHeight?.9*n.documentElement.clientHeight:Math.round(.9*i.height())}function j(e){var t,i,r,o=z();o&&(27===e.keyCode&&o.options("esc")&&o.close(),9===e.keyCode&&(t=e,i=o.element().find(d),r=i.index(n.activeElement),t.shiftKey&&r<=0?(i.get(i.length-1).focus(),t.preventDefault()):t.shiftKey||r!==i.length-1||(i.get(0).focus(),t.preventDefault())))}function D(){t.each(a,function(e,t){t.resize()})}function z(){return 0===a.length?null:a[0]}function T(e,d,u,f){var y,v,p,m,b,w,x,C,k,z,T,O=this,q=!1,W=!1;d=t.extend({},c,d),v=t(d.template),O.element=function(){return v},O.opener=function(){return u},O.options=t.proxy(g,O,d),O.handlers=t.proxy(g,O,d.handlers),O.resize=function(){q&&!W&&p.css("max-height",E()+"px").trigger("lity:resize",[O])},O.close=function(){if(q&&!W){var e;W=!0,(e=O).element().attr(l,"true"),1===a.length&&(o.removeClass("lity-active"),i.off({resize:D,keydown:j})),((a=t.grep(a,function(t){return e!==t})).length?a[0].element():t(".lity-hidden")).removeClass("lity-hidden").each(function(){var e=t(this),n=e.data(s);n?e.attr(l,n):e.removeAttr(l),e.removeData(s)});var d=r();if(f&&(n.activeElement===v[0]||t.contains(v[0],n.activeElement)))try{f.focus()}catch(e){}return p.trigger("lity:close",[O]),v.removeClass("lity-opened").addClass("lity-closed"),h(p.add(v)).always(function(){p.trigger("lity:remove",[O]),v.remove(),v=void 0,d.resolve()}),d.promise()}},m=e,b=O,w=d.handlers,x=d.handler,k="inline",z=t.extend({},w),x&&z[x]?(C=z[x](m,b),k=x):(t.each(["inline","iframe"],function(e,t){delete z[t],z[t]=w[t]}),t.each(z,function(e,t){return!t||!(!t.test||t.test(m,b))||(!1!==(C=t(m,b))?(k=e,!1):void 0)})),y={handler:k,content:C||""},v.attr(l,"false").addClass("lity-loading lity-opened lity-"+y.handler).appendTo("body").focus().on("click","[data-lity-close]",function(e){t(e.target).is("[data-lity-close]")&&O.close()}).trigger("lity:open",[O]),T=O,1===a.unshift(T)&&(o.addClass("lity-active"),i.on({resize:D,keydown:j})),t("body > *").not(T.element()).addClass("lity-hidden").each(function(){var e=t(this);void 0===e.data(s)&&e.data(s,e.attr(l)||null)}).attr(l,"true"),t.when(y.content).always(function(e){p=t(e).css("max-height",E()+"px"),v.find(".lity-loader").each(function(){var e=t(this);h(e).always(function(){e.remove()})}),v.removeClass("lity-loading").find(".lity-content").empty().append(p),q=!0,p.trigger("lity:ready",[O])})}function O(e,i,r){e.preventDefault?(e.preventDefault(),e=(r=t(this)).data("lity-target")||r.attr("rel")||r.attr("src")):r=t(r);var o=new T(e,t.extend({},r.data("lity-options")||r.data("lity"),i),r,n.activeElement);if(!e.preventDefault)return o}return C.test=function(e){return u.test(e)},O.version="2.2.2",O.options=t.proxy(g,O,c),O.handlers=t.proxy(g,O,c.handlers),O.current=z,t(n).on("click.lity","[data-wpd-lity]",O),O});
13
  /* My Content and Settings */
14
+ jQuery(document).ready(function(e){var t=0,d=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),n=parseInt(wpdiscuzUCObj.additionalTab);e(document).delegate(".wpd-info,.wpd-page-link,.wpd-delete-content,.wpd-user-email-delete-links","click",function(e){e.preventDefault()}),e(document).delegate(".wpd-info.wpd-not-clicked","click",function(t){var a=e(this);a.removeClass("wpd-not-clicked");var i=new FormData;return i.append("action","wpdGetInfo"),function(t,a){var i=e(".fas",t),o=i.attr("class");i.removeClass(),i.addClass("fas fa-pulse fa-spinner"),wpdiscuzAjaxObj.getAjaxObj(d||n,!1,a).done(function(d){t.addClass("wpd-not-clicked"),i.removeClass(),i.addClass(o),d&&(e("#wpdUserContentInfo").html(d),e("#wpdUserContentInfo ul.wpd-list .wpd-list-item:first-child").addClass("wpd-active"),e("#wpdUserContentInfo div.wpd-content .wpd-content-item:first-child").addClass("wpd-active"),e("#wpdUserContentInfo").is(":visible")||e("#wpdUserContentInfoAnchor").trigger("click"))})}(a,i),!1}),e(document).delegate(".wpd-list-item","click",function(){var t=e("input.wpd-rel",this).val();e("#wpdUserContentInfo .wpd-list-item").removeClass("wpd-active"),e("#wpdUserContentInfo .wpd-content-item").removeClass("wpd-active");var a=e(this);if(e("#wpdUserContentInfo #"+t).text().length)a.addClass("wpd-active"),e("#wpdUserContentInfo #"+t).addClass("wpd-active");else{var i=new FormData;i.append("action",a.attr("data-action")),i.append("page",0),e("#wpdUserContentInfo #"+t).addClass("wpd-active"),e("#wpdUserContentInfo #"+t).css("text-align","center"),wpdiscuzAjaxObj.getAjaxObj(d||n,!0,i).done(function(d){d&&(e("#wpdUserContentInfo #"+t).css("text-align",""),a.addClass("wpd-active"),e("#wpdUserContentInfo #"+t).html(d)),e("#wpdiscuz-loading-bar").hide()})}}),e(document).delegate(".wpd-page-link.wpd-not-clicked","click",function(t){var a=e(this);a.removeClass("wpd-not-clicked");var i=a.data("wpd-page"),o=e(".wpd-active .wpd-pagination .wpd-action").val(),s=new FormData;s.append("action",o),s.append("page",i),wpdiscuzAjaxObj.getAjaxObj(d||n,!0,s).done(function(t){a.addClass("wpd-not-clicked"),t&&e(".wpd-content-item.wpd-active").html(t),e("#wpdiscuz-loading-bar").hide()})}),e(document).delegate(".wpd-delete-content.wpd-not-clicked","click",function(){var a=e(this),i=parseInt(a.data("wpd-content-id"));if(!isNaN(i)){var o=a.data("wpd-delete-action");if("wpdDeleteComment"==o&&!confirm(wpdiscuzUCObj.msgConfirmDeleteComment))return!1;if("wpdCancelSubscription"==o&&!confirm(wpdiscuzUCObj.msgConfirmCancelSubscription))return!1;if("wpdCancelFollow"==o&&!confirm(wpdiscuzUCObj.msgConfirmCancelFollow))return!1;var s=e("i",a),c=s.attr("class"),l=e(".wpd-wrapper .wpd-page-number").val(),p=e(".wpd-content-item.wpd-active").children(".wpd-item").length;a.removeClass("wpd-not-clicked"),s.removeClass().addClass("fas fa-pulse fa-spinner"),1==p&&l>0&&(l-=1);var w=new FormData;w.append("id",i),w.append("page",l),w.append("action",o),wpdiscuzAjaxObj.getAjaxObj(d||n,!1,w).done(function(d){a.addClass("wpd-not-clicked"),s.removeClass().addClass(c),e(".wpd-content-item.wpd-active").html(d),t=1})}}),e(document).delegate("[data-lity-close]","click",function(d){e(d.target).is("[data-lity-close]")&&t&&window.location.reload(!0)}),e(document).delegate(".wpd-user-email-delete-links.wpd-not-clicked","click",function(){var t=e(this);t.removeClass("wpd-not-clicked"),e(".wpd-loading",t).addClass("wpd-show");var a=new FormData;a.append("action","wpdEmailDeleteLinks"),wpdiscuzAjaxObj.getAjaxObj(d||n,!1,a).done(function(d){t.addClass("wpd-not-clicked"),e("[data-lity-close]",window.parent.document).trigger("click")})}),e(document).delegate(".wpd-user-settings-button.wpd-not-clicked","click",function(){var t=e(this);t.removeClass("wpd-not-clicked");var a=t.data("wpd-delete-action");if(console.log(a),"deleteCookies"!==a){t.find(".wpd-loading").addClass("wpd-show");var i=new FormData;i.append("action","wpdGuestAction"),i.append("guestAction",a),wpdiscuzAjaxObj.getAjaxObj(d||n,!1,i).done(function(d){t.addClass("wpd-not-clicked"),t.find(".wpd-loading").removeClass("wpd-show");try{var n=e.parseJSON(d);t.after(n.message);var a=t.next(".wpd-guest-action-message");a.fadeIn(100).fadeOut(7e3,function(){a.remove(),1===parseInt(n.code)&&(t.parent().remove(),e(".wpd-delete-all-comments").length||e(".wpd-delete-all-subscriptions").length||e(".wpd-delete-all-cookies").parent().addClass("wpd-show"))})}catch(e){console.log(e)}})}else!function(){for(var e=document.cookie.split(";"),t=0;t<e.length;t++){var d=e[t],n=d.indexOf("="),a=n>-1?d.substr(0,n):d;Cookies.remove(a.trim())}location.reload(!0)}()})});
15
  /* Social */
16
+ function wpcShareCommentFB(e,s){FB.ui({method:"share",href:e,quote:s},function(e){})}(wpdiscuzAjaxObj.enableFbLogin||wpdiscuzAjaxObj.enableFbShare)&&wpdiscuzAjaxObj.facebookAppID&&(!function(e,s,n){var o,a=e.getElementsByTagName(s)[0];e.getElementById(n)||((o=e.createElement(s)).id=n,o.src="//connect.facebook.net/en_US/sdk.js",a.parentNode.insertBefore(o,a))}(document,"script","facebook-jssdk"),window.fbAsyncInit=function(){FB.init({appId:wpdiscuzAjaxObj.facebookAppID,cookie:!0,xfbml:!0,version:"v7.0"})}),jQuery(document).ready(function(e){var s;(s=Cookies.get("wpdiscuz_social_login_message"))&&"undefined"!==s&&(Cookies.remove("wpdiscuz_social_login_message"),wpdiscuzAjaxObj.setCommentMessage(decodeURIComponent(s.replace(/\+/g,"%20")),"error")),Cookies.get("wpdiscuz_scroll_to_comments")&&(Cookies.remove("wpdiscuz_scroll_to_comments",{path:"/"}),e("html, body").animate({scrollTop:e("#comments").offset().top-32},1e3)),e(document).delegate(".wpd-comment-share .fa-facebook-f","click",function(){if(1==wpdiscuzAjaxObj.enableFbShare){var s=e(this).parents(".wpd-comment").find(".wpd-comment-right").attr("id"),n=window.location.href;-1!==n.indexOf("#")&&(n=n.substring(0,n.indexOf("#"))),wpcShareCommentFB(n+="#"+s,e(this).parents(".wpd-comment-right").find(".wpd-comment-text").text())}});var n="";function o(e,s){var n,o="";t(s,1),Cookies.set("wpdiscuz_scroll_to_comments",1,{path:"/"}),"facebook"===e&&0==wpdiscuzAjaxObj.facebookUseOAuth2?FB.getLoginStatus(function(t){"connected"===t.status?(n=t.authResponse.accessToken,o=t.authResponse.userID,a(e,n,o,s)):FB.login(function(t){"connected"===t.status&&(n=t.authResponse.accessToken,o=t.authResponse.userID,a(e,n,o,s))},{scope:"public_profile,email"})}):a(e,n,o,s)}function a(s,n,o,a){return e.ajax({type:"POST",url:wpdiscuzAjaxObj.url,data:{action:"wpd_social_login",provider:s,token:n,userID:o,postID:wpdiscuzAjaxObj.wc_post_id}}).done(function(s){!function(s,n){try{var o=e.parseJSON(s),a=o.code,i=o.message,c=o.url;200===parseInt(a)?location.assign(c):wpdiscuzAjaxObj.setCommentMessage(i,"error")}catch(e){console.log(e)}t(n,0)}(s,a)}),""}function t(e,s){1===s?e.find(".wpdiscuz-social-login-spinner").show():e.find(".wpdiscuz-social-login-spinner").hide()}e(document).delegate("#wpdcom .wpd-social-login .wpdiscuz-login-button","click",function(){var s=e(this).parents(".wpd-social-login");!function(e,s){1!=parseInt(wpdiscuzAjaxObj.socialLoginAgreementCheckbox)||1==Cookies.get("socialLoginAgreementConfirmed")?o(e,s):s.parents(".wpd-form-wrap, .wpd-form").find(".wpd-social-login-agreement").first().slideDown(700)}(n=function(e){var s="";e.hasClass("wpdsn-fb")&&(s="facebook");e.hasClass("wpdsn-insta")&&(s="instagram");e.hasClass("wpdsn-gg")&&(s="google");e.hasClass("wpdsn-ds")&&(s="disqus");e.hasClass("wpdsn-wp")&&(s="wordpress");e.hasClass("wpdsn-tw")&&(s="twitter");e.hasClass("wpdsn-vk")&&(s="vk");e.hasClass("wpdsn-ok")&&(s="ok");e.hasClass("wpdsn-linked")&&(s="linkedin");e.hasClass("wpdsn-yandex")&&(s="yandex");e.hasClass("wpdsn-mailru")&&(s="mailru");e.hasClass("wpdsn-weixin")&&(s="wechat");e.hasClass("wpdsn-weibo")&&(s="weibo");e.hasClass("wpdsn-qq")&&(s="qq");e.hasClass("wpdsn-baidu")&&(s="baidu");return s}(e(this)),s)}),e(document).delegate("#wpdcom .wpd-agreement-buttons-right .wpd-agreement-button","click",function(){var s=e(this).parents(".wpd-form-wrap, .wpd-form").find(".wpd-social-login-agreement").slideUp(700);e(this).hasClass("wpd-agreement-button-agree")&&(wpdiscuzAjaxObj.isCookiesEnabled&&Cookies.set("socialLoginAgreementConfirmed",1,{expires:30,path:"/"}),o(n,s))})});
assets/js/wpdiscuz-combo.min.js CHANGED
@@ -7,7 +7,7 @@
7
  /* Autogrow */
8
  jQuery.fn.autoGrow=function(){return this.each(function(){var createMirror=function(textarea){jQuery(textarea).after('<div class="autogrow-textarea-mirror"></div>');return jQuery(textarea).next(".autogrow-textarea-mirror")[0]};var sendContentToMirror=function(textarea){mirror.innerHTML=String(textarea.value).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br />")+".<br/>.";if(jQuery(textarea).height()!=jQuery(mirror).height())jQuery(textarea).height(jQuery(mirror).height())};var growTextarea=function(){sendContentToMirror(this)};var mirror=createMirror(this);mirror.style.display="none";mirror.style.wordWrap="break-word";mirror.style.padding=jQuery(this).css("padding");mirror.style.width=jQuery(this).css("width");mirror.style.fontFamily=jQuery(this).css("font-family");mirror.style.fontSize=jQuery(this).css("font-size");mirror.style.lineHeight=jQuery(this).css("line-height");this.style.overflow="hidden";this.style.minHeight=this.rows+"em";this.onkeydown=growTextarea;sendContentToMirror(this)})};
9
  /* wpDiscuz */
10
- var wpdiscuzLoadRichEditor=parseInt(wpdiscuzAjaxObj.loadRichEditor);if(wpdiscuzLoadRichEditor)var wpDiscuzEditor=new WpdEditor;function wpdMessagesOnInit(e,t){wpdiscuzAjaxObj.setCommentMessage(e,t),setTimeout(function(){location.href=location.href.substring(0,location.href.indexOf("wpdiscuzUrlAnchor")-1)},3e3)}wpdiscuzAjaxObj.setCommentMessage=function(e,t,a){var o="wpdiscuz-message-error";if("[object Array]"===Object.prototype.toString.call(e))for(var d in e)"[object Array]"===Object.prototype.toString.call(t)?"success"===t[d]?o="wpdiscuz-message-success":"warning"===t[d]&&(o="wpdiscuz-message-warning"):"success"===t?o="wpdiscuz-message-success":"warning"===t&&(o="wpdiscuz-message-warning"),jQuery("<div/>").addClass(o).html(e[d]).prependTo("#wpdiscuz-comment-message").delay("[object Array]"===Object.prototype.toString.call(a)?a[d]:a||4e3).fadeOut(1e3,function(){jQuery(this).remove()});else"success"===t?o="wpdiscuz-message-success":"warning"===t&&(o="wpdiscuz-message-warning"),jQuery("<div/>").addClass(o).html(e).prependTo("#wpdiscuz-comment-message").delay(a||4e3).fadeOut(1e3,function(){jQuery(this).remove()})},jQuery(document).ready(function(e){e("body").addClass("wpdiscuz_"+wpdiscuzAjaxObj.version);var t=wpdiscuzAjaxObj.is_user_logged_in,a=1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!t,o=1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&t,d=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,n=parseInt(wpdiscuzAjaxObj.commentListLoadType),s=parseInt(wpdiscuzAjaxObj.wc_post_id),i=parseInt(wpdiscuzAjaxObj.commentListUpdateType),c=1e3*parseInt(wpdiscuzAjaxObj.commentListUpdateTimer),p=parseInt(wpdiscuzAjaxObj.liveUpdateGuests),r=wpdiscuzAjaxObj.loadLastCommentId,l=r,m=parseInt(wpdiscuzAjaxObj.firstLoadWithAjax);Cookies.get("wpdiscuz_comments_sorting")&&Cookies.remove("wpdiscuz_comments_sorting",{path:""}),Cookies.get("wordpress_last_visit")&&Cookies.remove("wordpress_last_visit",{path:""}),Cookies.get("wpdiscuz_last_visit")&&Cookies.remove("wpdiscuz_last_visit",{path:""});var w,u=wpdiscuzAjaxObj.storeCommenterData,f=parseInt(wpdiscuzAjaxObj.wmuEnabled),h=wpdiscuzAjaxObj.isCookiesEnabled,b=!0,g=wpdiscuzAjaxObj.cookiehash,_=parseInt(wpdiscuzAjaxObj.isLoadOnlyParentComments),v=parseInt(wpdiscuzAjaxObj.enableDropAnimation)?500:0,z=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),j=parseInt(wpdiscuzAjaxObj.enableBubble),C=parseInt(wpdiscuzAjaxObj.bubbleLiveUpdate),k=parseInt(wpdiscuzAjaxObj.bubbleHintTimeout),x=parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout)?parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout):5,y=parseInt(wpdiscuzAjaxObj.bubbleShowNewCommentMessage),O=wpdiscuzAjaxObj.bubbleLocation,A=wpdiscuzAjaxObj.inlineFeedbackAttractionType,I=[],T=[],D=[],E=!1,M=1;(e(".wc_social_plugin_wrapper .wp-social-login-provider-list").length?e(".wc_social_plugin_wrapper .wp-social-login-provider-list").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .the_champ_login_container").length?e(".wc_social_plugin_wrapper .the_champ_login_container").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .social_connect_form").length?e(".wc_social_plugin_wrapper .social_connect_form").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .oneall_social_login_providers").length&&e(".wc_social_plugin_wrapper .oneall_social_login .oneall_social_login_providers").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"),wpdiscuzLoadRichEditor&&e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0"),e(document).delegate("#wpdcom .ql-editor, #wpdcom .wc_comment","focus",function(){e(".wpd-form-foot",e(this).parents(".wpd_comm_form")).slideDown(v)}),e(document).delegate("#wpdcom textarea","focus",function(){e(this).next(".autogrow-textarea-mirror").length||e(this).autoGrow()}),t)||S({comment_author:Cookies.get("comment_author_"+g),comment_author_email:Cookies.get("comment_author_email_"+g),comment_author_url:Cookies.get("comment_author_url_"+g)});if(e(".wpd-vote-down.wpd-dislike-hidden").remove(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd"),e(document).delegate("#wpd-editor-source-code-wrapper-bg","click",function(){e(this).hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),wpdiscuzLoadRichEditor&&e(document).delegate("#wpd-insert-source-code","click",function(){var t=wpDiscuzEditor.createEditor("#"+e("#wpd-editor-uid").val());t.deleteText(0,t.getLength(),Quill.sources.USER);var a=e("#wpd-editor-source-code").val();a.length&&t.clipboard.dangerouslyPasteHTML(0,a,Quill.sources.USER),t.update(),e("#wpd-editor-source-code-wrapper-bg").hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),e(document).delegate(".wpd-reply-button","click",function(){var n=V(e(this),0);e(this).hasClass("wpdiscuz-clonned")?(wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+n).focus()},v):setTimeout(function(){e("#wc-textarea-"+n).trigger("focus")},v),e("#wpd-secondary-form-wrapper-"+n).slideToggle(v)):function(a){var o=V(a,0);e("#wpdiscuz_form_anchor-"+o).before(function(t){return e("#wpdiscuz_hidden_secondary_form").html().replace(/wpdiscuzuniqueid/g,t)}(o));var d=e("#wpd-secondary-form-wrapper-"+o);if(!t){var n={comment_author:Cookies.get("comment_author_"+g),comment_author_email:Cookies.get("comment_author_email_"+g),comment_author_url:Cookies.get("comment_author_url_"+g)};S(n)}wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+o).focus()},v):setTimeout(function(){e("#wc-textarea-"+o).trigger("focus")},v);d.slideToggle(v,function(){a.addClass("wpdiscuz-clonned")})}(e(this)),function(t){if((a||o)&&"2.0"===d){var n=B(t);setTimeout(function(){if(!T[n])try{T[n]=grecaptcha.render("wpdiscuz-recaptcha-"+t,{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(a){e("#wpdiscuz-recaptcha-field-"+t).val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-"+t).val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}},1e3)}}(n)}),e(document).delegate("#wpdcom .wpd-comment-link [data-comment-url]","click",function(){var t=e(this).data("comment-url"),a=e("<input/>");a.appendTo("body").css({position:"absolute",top:"-10000000px"}).val(t),a.select(),document.execCommand("copy"),a.remove(),wpdiscuzAjaxObj.setCommentMessage(t+"<br/>"+wpdiscuzAjaxObj.wc_copied_to_clipboard,"success",5e3)}),e(document).delegate(".wpdiscuz-nofollow,.wc_captcha_refresh_img,.wpd-load-more-submit","click",function(e){e.preventDefault()}),e(document).delegate(".wpd-toggle.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked");var a=V(e(this),0),o=e(this),d=e(".fas",o);!o.parents(".wpd-comment:not(.wpd-reply)").children(".wpd-reply").length&&_?function(t,a){var o=B(t),d=new FormData;d.append("action","wpdShowReplies"),d.append("commentId",o),ce(z,!0,d).done(function(o){a.addClass("wpd_not_clicked"),"object"==typeof o&&o.success&&(e("#wpd-comm-"+t).replaceWith(o.data.comment_list),e("#wpd-comm-"+t+" .wpd-toggle .fas").removeClass("fa-chevron-down").addClass("fa-chevron-up"),e("#wpd-comm-"+t+" .wpd-toggle").attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text),e("#wpd-comm-"+t+" .wpd-toggle .wpd-view-replies").remove(),ie(o)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,d){console.log(d),a.addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}(a,t):e("#wpd-comm-"+a+"> .wpd-reply").slideToggle(700,function(){e(this).is(":hidden")?(d.removeClass("fa-chevron-up"),d.addClass("fa-chevron-down"),o.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_show_replies_text)):(d.removeClass("fa-chevron-down"),d.addClass("fa-chevron-up"),o.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text)),t.addClass("wpd_not_clicked")})}),e(document).delegate(".wpd-new-loaded-comment","mouseenter",function(){e(this).removeClass("wpd-new-loaded-comment")}),e(document).delegate(".wpd-sbs-toggle","click",function(){e(".wpdiscuz-subscribe-bar").slideToggle(v)}),parseInt(wpdiscuzAjaxObj.wpDiscuzIsShowOnSubscribeForm)&&!t&&wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&("2.0"===d?(setTimeout(function(){try{grecaptcha.render("wpdiscuz-recaptcha-subscribe-form",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-subscribe-form").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}},1e3),e(document).delegate("#wpdiscuz-subscribe-form","submit",function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val()?e(".wpdiscuz-recaptcha",e(this)).css("border","none"):(e(".wpdiscuz-recaptcha",e(this)).css("border","1px solid red"),t.preventDefault())})):"3.0"===d&&e(document).delegate("#wpdiscuz_subscription_button","click",function(t){var a=e(this).parents("#wpdiscuz-subscribe-form");t.preventDefault();try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/wpdAddSubscription"}).then(function(e){console.log(5555),document.getElementById("wpdiscuz-recaptcha-field-subscribe-form").value=e,a.submit()},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error")}})),(a||o)&&"2.0"===d){var F=e(window).width(),L=e("#wpdcom").width();L>=1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"65%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"35%"})),L>=940&&L<1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"60%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"40%"})),L>=810&&L<940&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"60%"})),L>=730&&L<810&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"45%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"55%"})),L>=610&&L<730&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.85)","-webkit-transform":"scale(0.85)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"43%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"55%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"})),F>650&&(L>=510&&L<610&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"35%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"63%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%",position:"relative",right:"-60px"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),L>=470&&L<510&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"60%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd_main_comm_form .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),L<470&&(e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({margin:"0px auto","transform-origin":"center 0","-webkit-transform-origin":"center 0"}),e("#wpdcom .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc_notification_checkboxes").css({"text-align":"center"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-field-submit").css({"text-align":"center"})))}function R(t,a,o){ce(z||f,!1,a).done(function(a){if(e(o).addClass("wpd_not_clicked"),"object"==typeof a)if(a.success){"collapsed"===wpdiscuzAjaxObj.commentFormView&&e(".wpd-form-foot",t).slideUp(v),e(".wpd-thread-info").html(a.data.wc_all_comments_count_new_html),a.data.wc_all_comments_count_new=parseInt(a.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").text(a.data.wc_all_comments_count_new),a.data.wc_all_comments_count_new?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide();var d=v;a.data.is_main?X(a.data.message):(d=v+700,e("#wpd-secondary-form-wrapper-"+a.data.uniqueid).slideToggle(700),1==a.data.is_in_same_container?e("#wpd-secondary-form-wrapper-"+a.data.uniqueid).after(a.data.message):e("#wpd-comm-"+a.data.uniqueid).after(a.data.message)),function(e){if(!e.data.held_moderate){var t=new FormData;t.append("action","wpdCheckNotificationType"),t.append("comment_id",e.data.new_comment_id),t.append("email",e.data.comment_author_email),t.append("isParent",e.data.is_main),ce(z,!0,t)}}(a),function(e){if(e.data.redirect>0&&e.data.new_comment_id){var t=new FormData;t.append("action","wpdRedirect"),t.append("commentId",e.data.new_comment_id),ce(z,!0,t).done(function(e){"object"==typeof e&&e.success&&setTimeout(function(){location.href=e.data},2e3)}).fail(function(e,t,a){console.log(a)})}}(a),h&&b?function(t){var a=t.comment_author_email,o=t.comment_author,d=t.comment_author_url;null==u?(Cookies.set("comment_author_email_"+g,a),Cookies.set("comment_author_"+g,o),d.length&&Cookies.set("comment_author_url_"+g,d)):(u=parseInt(u),Cookies.set("comment_author_email_"+g,a,{expires:u,path:"/"}),Cookies.set("comment_author_"+g,o,{expires:u,path:"/"}),d.length&&Cookies.set("comment_author_url_"+g,d,{expires:u,path:"/"}));e(".wpd-cookies-checkbox").length&&e(".wpd-cookies-checkbox").attr("checked","checked")}(a.data):b||e(".wpd-cookies-checkbox").removeAttr("checked"),wpdiscuzLoadRichEditor&&wpDiscuzEditor.createEditor("#wpd-editor-"+e(".wpdiscuz_unique_id",t).val()).setContents([{insert:"\n"}]),t.get(0).reset(),S(a.data),e(".wmu-preview-wrap",t).remove(),I.length&&(I.forEach(function(e){e.parents(".wpd-field-checkbox").remove()}),I=[]),parseInt(wpdiscuzAjaxObj.scrollToComment)&&setTimeout(function(){e("html, body").animate({scrollTop:e("#comment-"+a.data.new_comment_id).offset().top-32},1e3)},d),ie(a,t)}else a.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"),ie(a,t));else wpdiscuzAjaxObj.setCommentMessage(a,"error");e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,d){console.log(d),e(o).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}function S(t){e(".wpd_comm_form .wc_name").val(t.comment_author),t.comment_author_email&&t.comment_author_email.indexOf("@example.com")<0&&e(".wpd_comm_form .wc_email").val(t.comment_author_email),t.comment_author_url&&e(".wpd_comm_form .wc_website").val(t.comment_author_url)}function q(t,a){e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").show(),e("#wpd-comm-"+t+" .wpdiscuz-edit-form-wrap").replaceWith(a),e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").show()}e(document).delegate(".wc_comm_submit.wpd_not_clicked","click",function(){var t=e(this),n=1,s=e(this).parents("form");if(s.hasClass("wpd_main_comm_form")||(n=function(t){var a=t.attr("class").split(" "),o="";return e.each(a,function(e,t){"wpd_comment_level"===G(t,!1)&&(o=G(t,!0))}),parseInt(o)+1}(e(this).parents(".wpd-comment"))),J(s,"#wpd-editor-"+e(".wpdiscuz_unique_id",s).val()),s.submit(function(e){e.preventDefault()}),""!==e(".wc_comment",s).val().trim()&&"&nbsp;"!==e(".wc_comment",s).val().trim()){if(s[0].checkValidity()&&(c=s,p=!0,"2.0"===d&&e("input[name=wc_captcha]",c).length&&!e("input[name=wc_captcha]",c).val().length?(p=!1,e(".wpdiscuz-recaptcha",c).css("border","1px solid red")):"2.0"===d&&e("input[name=wc_captcha]",c).length&&e(".wpdiscuz-recaptcha",c).css("border","none"),p)){E=!0,function(t){e(".wpd-agreement-checkbox",t).each(function(){e(this).hasClass("wpd_agreement_hide")&&h&&e(this).prop("checked")&&(Cookies.set(e(this).attr("name")+"_"+g,1,{expires:30,path:"/"}),e("input[name="+e(this).attr("name")+"]").each(function(){I.push(e(this))}))})}(s),e(t).removeClass("wpd_not_clicked");var i=new FormData;if(i.append("action","wpdAddComment"),e(":input",s).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&i.append(this.name+"",e(this).val().trim()),"checkbox"!=this.type&&"radio"!=this.type||e(this).is(":checked")&&i.append(this.name+"",e(this).val())}),i.append("wpd_comment_depth",n),wpdiscuzAjaxObj.wpdiscuz_zs&&i.append("wpdiscuz_zs",wpdiscuzAjaxObj.wpdiscuz_zs),e(".wpd-cookies-checkbox",s).length&&!e(".wpd-cookies-checkbox",s).prop("checked")&&(b=!1),e("#wpdiscuz-loading-bar").show(),wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&"3.0"===d&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/addComment"}).then(function(e){i.append("g-recaptcha-response",e),R(s,i,t)},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error"),e("#wpdiscuz-loading-bar").fadeOut(250)}else R(s,i,t)}var c,p;!function(e){if((a||o)&&"2.0"===d){var t=B(e);grecaptcha.reset(T[t])}}(e(".wpdiscuz_unique_id",s).val()),e(".wpdiscuz_reset").val("")}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.wc_msg_required_fields,"error")}),e(document).delegate(".wpd_editable_comment","click",function(){w&&e(".wpdiscuz-edit-form-wrap").length&&q(V(e(".wpdiscuz-edit-form-wrap"),0),w);var t=V(e(this),0),a=B(t),o=new FormData;o.append("action","wpdEditComment"),o.append("commentId",a),w=e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-text").get(0),ce(z,!0,o).done(function(a){if("object"==typeof a)if(a.success){if(e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text").replaceWith(a.data.html),wpdiscuzLoadRichEditor){let o=wpDiscuzEditor.createEditor("#wpd-editor-edit_"+t);o.clipboard.dangerouslyPasteHTML(0,a.data.content),o.update(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd")}else e("#wc-textarea-edit_"+t).val(a.data.content);e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").hide(),e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").hide()}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error");else console.log(a);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wc_save_edited_comment","click",function(){var t=V(e(this)),a=B(t),o=e("#wpd-comm-"+t+" #wpdiscuz-edit-form");if(J(o,"#wpd-editor-edit_"+t),o.submit(function(e){e.preventDefault()}),o[0].checkValidity()){var d=new FormData;d.append("action","wpdSaveEditedComment"),d.append("commentId",a),e(":input",o).each(function(){""!==this.name&&"checkbox"!==this.type&&"radio"!==this.type&&d.append(this.name+"",e(this).val()),"checkbox"!==this.type&&"radio"!==this.type||e(this).is(":checked")&&d.append(this.name+"",e(this).val())}),ce(z,!0,d).done(function(o){"object"==typeof o?(o.success?(q(t,o.data.message),o.data.lastEdited&&(e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").remove(),e(o.data.lastEdited).insertAfter("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text")),o.data.twitterShareLink&&e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_tw").attr("href",o.data.twitterShareLink),o.data.whatsappShareLink&&e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_whatsapp").attr("href",o.data.whatsappShareLink),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[o.data],"error"),ie(o,a)):console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(document).delegate(".wc_cancel_edit","click",function(){var t=V(e(this));q(t,w),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)}),!wpdiscuzAjaxObj.wordpressIsPaginate&&m&&(M=0,1==m?setTimeout(function(){W(!0)},500):e(document).delegate(".wpd-load-comments","click",function(){e(this).parent(".wpd-load-more-submit-wrap").remove(),W(!0)})),e(document).delegate(".wpd-load-more-submit","click",function(){var t=e(this);t.hasClass("wpd-loaded")&&W(!1,t,"wpd-loaded","wpd-loading")});var U=!1;function H(){var t=e("#wpdiscuzHasMoreComments").val(),a=e(document).height(),o=e(window).height()+e(window).scrollTop();a&&o&&(100*o/a>=80&&!1===U&&1==t&&(U=!0,W(!1,e(".wpd-load-more-submit"))))}function W(t,a,o,d){a&&(a.toggleClass(o),a.toggleClass(d));var s=new FormData;s.append("action","wpdLoadMoreComments");var i=e(".wpdiscuz-sort-button-active").attr("data-sorting");i&&s.append("sorting",i),s.append("offset",M),s.append("lastParentId",e(".wpd-load-more-submit").attr("data-lastparentid")),s.append("isFirstLoad",t?1:0);var c=e(".wpdf-active").attr("data-filter-type");s.append("wpdType",c||""),ce(z,!t||1!=m,s).done(function(s){"object"==typeof s&&s.success&&(M++,t&&e(".wpd-comment").remove(),e(".wpdiscuz_single").remove(),e(".wpdiscuz-comment-pagination").before(s.data.comment_list),K(s,t&&2!==n),U=!1,r=s.data.loadLastCommentId,ie(s),t&&P(!1)),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(d))}).fail(function(t,n,s){console.log(s),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(d))})}function K(t,a){var o;0==t.data.is_show_load_more?(e("#wpdiscuzHasMoreComments").val(0),e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide()):(o=t.data.last_parent_id,e(".wpd-load-more-submit").attr("data-lastparentid",o),2!==n&&e(".wpdiscuz-comment-pagination").show(),e("#wpdiscuzHasMoreComments").val(1),a&&e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").show()),ie(t)}function P(t){var a=location.href.match(/#comment\-(\d+)/);if(null!==a){var o=a[1];if(e("#comment-"+o).length)setTimeout(function(){e("html, body").animate({scrollTop:e("#comment-"+o).parents("[id^=wpd-comm-]").offset().top-32},1e3),t&&N(o)},500);else{var d=new FormData;d.append("action","wpdGetSingleComment"),d.append("commentId",o),ce(z,!0,d).done(function(a){if("object"==typeof a&&a.success){var d="#comment-"+o;e("#comment-"+a.data.parentCommentID).length?e("#comment-"+a.data.parentCommentID).parents("[id^=wpd-comm-"+a.data.parentCommentID+"]").replaceWith(a.data.message):e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e(d).offset().top-32},1e3),t&&N(o)}e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}}function N(t){setTimeout(function(){e("#comment-"+t).siblings(".wpd-secondary-form-wrapper").is(":visible")||e("#comment-"+t).find(".wpd-reply-button").trigger("click")},1100)}function Q(e){if(void 0!==e.data.message)for(var t,a=e.data.message,o=0;o<a.length;o++)$((t=a[o]).comment_parent,t.comment_html)}function V(e,t){var a="";return(a=t?e.parents(".wpd-main-form-wrapper").attr("id"):e.parents(".wpd-comment").attr("id")).substring(a.lastIndexOf("-")+1)}function B(e){return e.substring(0,e.indexOf("_"))}function G(e,t){return t?e.substring(e.indexOf("-")+1):e.substring(0,e.indexOf("-"))}function $(t,a){if(0==t)X(a);else{var o=V(e("#comment-"+t),0);e("#wpdiscuz_form_anchor-"+o).after(a)}}function Y(){var t,a,o="";return e(".wpd-comment-right").each(function(){t=V(e(this),0),a=B(t),o+=a+","}),o}function J(t,a){var o=t.find(".wpd-required-group");wpdiscuzLoadRichEditor&&t.find(".wc_comment").val(e(a+">.ql-editor").html()),function(e){var t=e.find(".wc_comment"),a=t.val().trim().replace(/<p><br><\/p>/g,"\n").replace(/<p>(.*?)<\/p>/g,"$1\n");a=(a=(a=(a=a.replace(/<img src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g,"$3")).replace(/<img[^>]+alt=["|']([^"|']+)["|'][^>]+src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'][^>]?>/g,"$1")).replace(/<img\s+([^>]*)class=["|']wpdem\-sticker["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g,"$3")).replace(/<img\s+([^>]*)src=["|']([^"|']+)["|'](.*?)[^>]*>/g,"$2"),t.val(a)}(t),e.each(o,function(){e("input",this).removeAttr("required"),0===e("input:checked",this).length?e("input",e(this)).attr("required","required"):e(".wpd-field-invalid",this).remove()})}function X(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function Z(t){t?t.prop("required")||(t.val()?t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none")):e.each(e(".wc_email"),function(t,a){var o=e(a);o.prop("required")||(o.val()?o.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):o.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none"))})}if(2!==n||wpdiscuzAjaxObj.wordpressIsPaginate||(e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide(),H(),e(window).scroll(function(){H()})),wpdiscuzAjaxObj.setLoadMoreVisibility=K,e(document).delegate(".wpd-vote-up.wpd_not_clicked, .wpd-vote-down.wpd_not_clicked","click",function(){var t=e(this);e(t).removeClass("wpd_not_clicked");var a,o=B(V(t));a=e(this).hasClass("wpd-vote-up")?1:-1;var d=new FormData;d.append("action","wpdVoteOnComment"),d.append("commentId",o),d.append("voteType",a),ce(z,!0,d).done(function(d){if(e(t).addClass("wpd_not_clicked"),"object"==typeof d){if(d.success){if("total"===d.data.buttonsStyle){var n=e(".wpd-comment-footer .wpd-vote-result",e("#comment-"+o)),s=d.data.votes;n.text(s),n.removeClass("wpd-up wpd-down"),s>0&&n.addClass("wpd-up"),s<0&&n.addClass("wpd-down")}else{var i=e(".wpd-comment-footer .wpd-vote-result-like",e("#comment-"+o)),c=e(".wpd-comment-footer .wpd-vote-result-dislike",e("#comment-"+o));i.text(d.data.likeCount),c.text(d.data.dislikeCount),parseInt(d.data.likeCount)>0?i.addClass("wpd-up"):i.removeClass("wpd-up"),parseInt(d.data.dislikeCount)<0?c.addClass("wpd-down"):c.removeClass("wpd-down")}var p=e(".wpd-comment-footer .wpd-vote-up",e("#comment-"+o)),r=e(".wpd-comment-footer .wpd-vote-down",e("#comment-"+o));p.removeClass("wpd-up"),r.removeClass("wpd-down"),d.data.curUserReaction>0?p.addClass("wpd-up"):d.data.curUserReaction<0&&r.addClass("wpd-down")}else d.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[d.data],"error");ie(d,o,a)}else console.log(d);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(a,o,d){console.log(d),e(t).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate("body","click",function(t){var a=e(".wpdiscuz-sort-buttons");e(t.target).hasClass("wpdf-sorting")||e(t.target).parent().hasClass("wpdf-sorting")?a.css({display:a.is(":visible")?"none":"flex"}):a.hide()}),e(document).delegate(".wpdiscuz-sort-button:not(.wpdiscuz-sort-button-active)","click",function(){var t=e(this),a=e(this).attr("data-sorting");if(a){e(".wpdiscuz-sort-button.wpdiscuz-sort-button-active").removeClass("wpdiscuz-sort-button-active").appendTo(".wpdiscuz-sort-buttons"),t.addClass("wpdiscuz-sort-button-active").prependTo(".wpdf-sorting");var o=new FormData;o.append("action","wpdSorting"),o.append("sorting",a);var d=e(".wpdf-active").attr("data-filter-type");o.append("wpdType",d||""),ce(z,!0,o).done(function(t){"object"==typeof t&&t.success&&(e("#wpdcom .wpd-comment").remove(),e("#wpdcom .wpd-thread-list").prepend(t.data.message),K(t,!1),M=1),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),window.onhashchange=function(){P(!1)},1!=m&&P(!1),e(document).delegate(".wpdiscuz-readmore","click",function(){var t=V(e(this)),a=B(t),o=new FormData;o.append("action","wpdReadMore"),o.append("commentId",a),ce(z,!0,o).done(function(o){"object"==typeof o?(o.success?(e("#comment-"+a+" .wpd-comment-text").html(" "+o.data.message),e("#wpdiscuz-readmore-"+t).remove()):console.log(o.data),ie(o)):console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-required-group","change",function(){0!==e("input:checked",this).length?e("input",e(this)).removeAttr("required"):e("input",e(this)).attr("required","required")}),e(document).delegate(".wpdiscuz-spoiler","click",function(){e(this).next().slideToggle(),e(this).hasClass("wpdiscuz-spoiler-closed")?e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-plus").removeClass("fa-plus").addClass("fa-minus"):e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-minus").removeClass("fa-minus").addClass("fa-plus"),e(this).toggleClass("wpdiscuz-spoiler-closed")}),e(document).delegate(".wpd-tools i","click",function(){var t=e(this).siblings(".wpd-tools-actions");t.css({display:t.is(":visible")?"none":"flex"})}),e(document).delegate(".wpd-comment-right","mouseleave",function(){e(this).find(".wpd-tools-actions").hide()}),e(document).delegate(".wpd_stick_btn","click",function(){var t=B(V(e(this),0)),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",t),ce(z,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd_close_btn","click",function(){var t=B(V(e(this),0)),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",t),ce(z,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-filter.wpd_not_clicked[data-filter-type]","click",function(){var t=e(this),a=t.attr("data-filter-type");wpdiscuzAjaxObj.resetActiveFilters(".wpdf-"+a),t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=new FormData;o.append("action","wpdLoadMoreComments");var d=e(".wpdiscuz-sort-button-active").attr("data-sorting");d&&o.append("sorting",d),o.append("lastParentId",0),o.append("offset",0),M=1,o.append("wpdType",t.hasClass("wpdf-active")?"":a),o.append("isFirstLoad",1),e(this).hasClass("wpdf-inline")?e(this).hasClass("wpdf-active")?e(".wpd-comment-info-bar").hide():e(".wpd-comment-info-bar").css("display","flex"):e(".wpd-comment-info-bar").hide(),ce(z,!1,o).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(t.toggleClass("wpdf-active"),e(".wpd-load-comments").remove(),e(".wpd-comment").remove(),e(".wpd-thread-list").prepend(a.data.comment_list),K(a),r=a.data.loadLastCommentId,e(".wpd-load-more-submit").blur(),ie(a)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpdf-reacted.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdMostReactedComment"),ce(z,!1,a).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(e("#comment-"+a.data.parentCommentID).length?e("#comment-"+a.data.parentCommentID).parents("[id^=wpd-comm-"+a.data.parentCommentID+"]").replaceWith(a.data.message):e("#comment-"+a.data.commentId).length||e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3))}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e(document).delegate(".wpdf-hottest.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdHottestThread"),ce(z,!1,a).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(e("#comment-"+a.data.commentId).length?e("#comment-"+a.data.commentId).parents("[id^=wpd-comm-"+a.data.commentId+"]").replaceWith(a.data.message):e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3))}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e(document).delegate(".wpd-filter-view-all","click",function(){e(".wpdf-inline.wpdf-active.wpd_not_clicked").trigger("click")}),e(document).delegate(".wpd-follow-link.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=B(V(t,0)),o=new FormData;o.append("action","wpdFollowUser"),o.append("commentId",a),ce(z,!0,o).done(function(a){t.addClass("wpd_not_clicked"),"object"==typeof a?a.success?(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data.code],"success"),t.removeClass("wpd-follow-active"),a.data.followTip&&t.attr("wpd-tooltip",a.data.followTip),a.data.followClass&&t.addClass(a.data.followClass)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"):console.log(a),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),Z(),e(document).delegate(".wc_email","keyup",function(){Z(e(this))}),j&&e("#wpdcom").length){if(e("#wpd-bubble-wrapper").hover(function(){e(this).addClass("wpd-bubble-hover")},function(){e(this).removeClass("wpd-bubble-hover")}),k&&!Cookies.get(wpdiscuzAjaxObj.cookieHideBubbleHint)&&setTimeout(function(){e("#wpd-bubble-wrapper").addClass("wpd-bubble-hover"),Cookies.set(wpdiscuzAjaxObj.cookieHideBubbleHint,"1",{expires:7,path:"/"}),setTimeout(function(){e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")},1e3*x)},1e3*k),"content_left"===O)if(e(".entry-content").length){var ee=(te=Math.min(e(".entry-content").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){ee=(te=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var te;ee=(te=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner");else"left_corner"===O?(e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner")):"right_corner"===O&&(e("#wpd-bubble-wrapper").css({right:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-right-corner"));e("#wpd-bubble-wrapper").show(),e("#wpd-bubble-add-message-close").click(function(t){t.preventDefault(),t.stopPropagation(),e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")}),e("#wpd-bubble").click(function(){e("html, body").animate({scrollTop:e("#wpdcom").offset().top-60},1e3,function(){wpdiscuzLoadRichEditor?wpDiscuzEditor.createEditor("#wpd-editor-0_0").focus():e("#wc-textarea-0_0").focus()})}),e("#wpd-bubble-comment-close").click(function(t){t.preventDefault(),e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")}),e("#wpd-bubble-comment-reply-link a").click(function(){var t=e(this).attr("href");setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),P(!0);var a=t.match(/#comment\-(\d+)/);D=D.filter(function(e){return e!=a[1]}),e("#wpd-bubble-count .wpd-new-comments-count").text(D.length),0==D.length&&e("#wpd-bubble-count").removeClass("wpd-new-comments")},100)}),e("#wpd-bubble-count").click(function(){if(D.length){var t=new FormData;t.append("action","wpdBubbleUpdate"),t.append("newCommentIds",D.join()),ce(z,!0,t).done(function(t){"object"==typeof t&&t.success&&(t.data.message=t.data.message.filter(function(t){if(!e("#comment-"+t.comment_id).length)return t}),Q(t),e("#wpd-bubble-count").removeClass("wpd-new-comments"),e("#wpd-bubble-count .wpd-new-comments-count").text("0"),D=[],e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-60},1e3),ie(t)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(e,t,a){console.log(a)})}})}if((j&&C||i)&&(t||!t&&p)&&setTimeout(function t(){e.ajax({type:"GET",url:wpdiscuzAjaxObj.bubbleUpdateUrl,data:{postId:s,lastId:l,visibleCommentIds:Y()}}).done(function(a){if(!E)if("object"==typeof a){if(a.ids.length){i&&((n=new FormData).append("action","wpdUpdateAutomatically"),n.append("loadLastCommentId",r),n.append("visibleCommentIds",Y()),ce(z,!1,n).done(function(t){E||"object"==typeof t&&t.success&&(Q(t),e(".wpd-thread-info").html(t.data.wc_all_comments_count_new_html),t.data.wc_all_comments_count_new=parseInt(t.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").text(t.data.wc_all_comments_count_new),t.data.wc_all_comments_count_new?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),r=t.data.loadLastCommentId)}).fail(function(e,t,a){console.log(a)})),a.ids=a.ids.filter(function(t){if(!e("#comment-"+t).length)return t});var o=5e3;l=parseInt(a.ids[a.ids.length-1]),D=D.concat(a.ids),y&&a.commentText&&(e("#wpd-bubble-author-avatar").html(a.avatar),e("#wpd-bubble-author-name").html(a.authorName),e("#wpd-bubble-comment-date span").html(a.commentDate),e("#wpd-bubble-comment-text").html(a.commentText),e("#wpd-bubble-comment-reply-link a").attr("href",a.commentLink),e("#wpd-bubble-notification-message").show(),o=1e4);var d=parseInt(e(".wpd-new-comments-count").text());d+=a.ids.length,e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),e("#wpd-bubble-wrapper").addClass("wpd-new-comment-added"),setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")},o),e(".wpd-new-comments-count").text(d),e("#wpd-bubble-count").addClass("wpd-new-comments"),a.all_comments_count=parseInt(a.all_comments_count),e("#wpd-bubble-all-comments-count").text(a.all_comments_count),a.all_comments_count?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),e(".wpd-thread-info").html(a.all_comments_count_html)}}else console.log(a);var n;setTimeout(t,c)}).fail(function(e,a,o){console.log(o),setTimeout(t,c)})},c),e(".wpd-inline-form-wrapper").length){var ae=new FormData;ae.append("action","wpdGetInlineCommentForm"),ce(z,!1,ae).done(function(t){"object"==typeof t?t.success?(e(".wpd-inline-form-wrapper").append(t.data),e.each(e("[name=_wpd_inline_nonce]"),function(){var t=e(this).attr("id"),a=e(this).parents(".wpd-inline-shortcode").attr("id");e(this).attr("id",t+"-"+a.substring(a.lastIndexOf("-")+1))}),e(".wpd-inline-opened").addClass("wpd-active"),e(".wpd-inline-opened").find(".wpd-inline-form-wrapper").show(),e(".wpd-inline-opened").find(".wpd-inline-icon").addClass("wpd-open"),e(".wpd-inline-opened").find(".wpd-inline-icon").removeClass("wpd-ignored"),se()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t)}).fail(function(e,t,a){console.log(a)})}function oe(t){if(e(t).hasClass("wpd-inline-shortcode"))var a=e(t).attr("id");else a=e(t).parents(".wpd-inline-shortcode").attr("id");return a.substring(a.lastIndexOf("-")+1)}function de(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function ne(){e.each(e(".wpd-inline-shortcode:not(.wpd-inline-opened) .wpd-inline-icon"),function(){var t=e(this),a=t.offset().top-window.pageYOffset;a>0&&a<300&&("blink"===A?(t.addClass("wpd-blink"),setTimeout(function(){t.removeClass("wpd-blink")},3e3)):(t.parents(".wpd-inline-shortcode").addClass("wpd-active"),t.siblings(".wpd-inline-form-wrapper").show(),t.addClass("wpd-open"),se(t.siblings(".wpd-inline-form-wrapper"))))})}function se(t){if(t){if(t.offset().left<=10)t.css("left",Math.ceil(parseInt(t.css("left"))-t.offset().left+10)),(a=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2))<3&&(a=3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+a+"px;");else if(t.offset().left+t.width()>document.body.clientWidth-10){var a;t.css("left",Math.ceil(parseInt(t.css("left"))+(document.body.clientWidth-(t.offset().left+t.width()))-10)),(a=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2))>t.width()-3&&(a=t.width()-3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+a+"px;")}}else e.each(e(".wpd-inline-form-wrapper:visible"),function(){if(e(this).offset().left<=10)e(this).css("left",Math.ceil(parseInt(e(this).css("left"))-e(this).offset().left+10)),(t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2))<3&&(t=3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;");else if(e(this).offset().left+e(this).width()>document.body.clientWidth-10){var t;e(this).css("left",Math.ceil(parseInt(e(this).css("left"))+(document.body.clientWidth-(e(this).offset().left+e(this).width()))-10)),(t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2))>e(this).width()-3&&(t=e(this).width()-3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;")}})}function ie(t,a,o,d){t.data.callbackFunctions&&e.each(t.data.callbackFunctions,function(e){"function"==typeof wpdiscuzAjaxObj[t.data.callbackFunctions[e]]?wpdiscuzAjaxObj[t.data.callbackFunctions[e]](t,a,o,d):console.log(t.data.callbackFunctions[e]+" is not a function")})}function ce(t,a,o){a&&e("#wpdiscuz-loading-bar").show(),o.append("postId",s);var d=o.get("action");wpdiscuzAjaxObj.dataFilterCallbacks&&wpdiscuzAjaxObj.dataFilterCallbacks[d]&&e.each(wpdiscuzAjaxObj.dataFilterCallbacks[d],function(e){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[d][e]]&&(o=wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[d][e]](o,t,a))});var n=t?wpdiscuzAjaxObj.url:wpdiscuzAjaxObj.customAjaxUrl;return e.ajax({type:"POST",url:n,data:o,contentType:!1,processData:!1})}e(document).delegate("body","click",function(t){if(e(t.target).hasClass("wpd-inline-form-close")||e(t.target).parents(".wpd-inline-form-close").length)t.preventDefault(),e(t.target).parents(".wpd-inline-form-wrapper").hide(),e(t.target).parents(".wpd-inline-shortcode").removeClass("wpd-active"),e(t.target).parents(".wpd-inline-form-wrapper").siblings(".wpd-inline-icon").removeClass("wpd-open");else if(!e(t.target).hasClass("wpd-inline-form-wrapper")&&!e(t.target).parents(".wpd-inline-form-wrapper").length){de();var a="";e(t.target).hasClass("wpd-inline-icon")?a=e(t.target):e(t.target).parents(".wpd-inline-icon").length&&(a=e(t.target).parents(".wpd-inline-icon")),a.length&&(a.parents(".wpd-inline-shortcode").addClass("wpd-active"),a.siblings(".wpd-inline-form-wrapper").show(),a.addClass("wpd-open"),a.removeClass("wpd-ignored"),se(a.siblings(".wpd-inline-form-wrapper")))}(!e(t.target).hasClass("wpd-last-inline-comments-wrapper")&&!e(t.target).parents(".wpd-last-inline-comments-wrapper").length||e(t.target).parents(".wpd-last-inline-comments-wrapper").length&&e(t.target).hasClass("wpd-load-inline-comment"))&&e(".wpd-last-inline-comments-wrapper").remove()}),e(document).delegate(".wpd-inline-submit.wpd_not_clicked","click",function(t){t.preventDefault();var a=e(this),o=e(this).parents(".wpd_inline_comm_form");if(o[0].checkValidity()){e(this).removeClass("wpd_not_clicked");var d=new FormData;d.append("action","wpdAddInlineComment"),d.append("inline_form_id",oe(o)),e.each(e("input, textarea",o),function(t,a){"checkbox"===this.type?e(this).is(":checked")&&d.append(e(a).attr("name"),e(a).val()):d.append(e(a).attr("name"),e(a).val())}),ce(z,!0,d).done(function(t){if(a.addClass("wpd_not_clicked"),"object"==typeof t)if(t.success){o[0].reset(),de();var d=parseInt(t.data.newCount),n=a.parents(".wpd-inline-icon-wrapper").find(".wpd-inline-icon-count");n.text(d),d?n.addClass("wpd-has-comments"):n.removeClass("wpd-has-comments"),e(".wpd-thread-info").html(t.data.allCommentsCountNewHtml),t.data.allCommentsCountNew=parseInt(t.data.allCommentsCountNew),e("#wpd-bubble-all-comments-count").text(t.data.allCommentsCountNew),t.data.allCommentsCountNew?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),t.data.message&&X(t.data.message),wpdiscuzAjaxObj.setCommentMessage(t.data.notification,"success")}else t.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error");else wpdiscuzAjaxObj.setCommentMessage(t,"error");e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(document).delegate(".wpd-form","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_comm_submit").trigger("click")}),e(document).delegate("#wpdiscuz-edit-form","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_save_edited_comment").trigger("click")}),e(document).delegate(".wpd-inline-comment-content","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).parents(".wpd_inline_comm_form").find(".wpd-inline-submit.wpd_not_clicked").trigger("click")}),e(document).delegate(".wpd-inline-icon-count.wpd-has-comments","click",function(){var t=e(this),a=new FormData;a.append("action","wpdGetLastInlineComments"),a.append("inline_form_id",oe(t)),ce(z,!0,a).done(function(a){"object"==typeof a?a.success?e(a.data).insertAfter(t):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"):console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-view-all-inline-comments","click",function(t){t.preventDefault(),e(this).parents(".wpd-last-inline-comments-wrapper").remove(),e(".wpdf-inline").hasClass("wpdf-active")||e(".wpdf-inline").trigger("click"),e("html, body").animate({scrollTop:e(".wpdf-inline").offset().top-32},1e3)}),e(document).delegate(".wpd-feedback-content-link","click",function(t){t.preventDefault();var a=e(this).data("feedback-content-id");e("html, body").animate({scrollTop:e("#wpd-inline-"+a).offset().top-38},1e3,function(){e("#wpd-inline-"+a).addClass("wpd-active")})}),"scroll_open"!==A&&"blink"!==A||(ne(),e(window).scroll(ne)),e(document).delegate("#wpd-post-rating.wpd-not-rated .wpd-rate-starts svg","click",function(){var t=new FormData,a=e(this).index();a>=0&&a<5&&(t.append("action","wpdUserRate"),t.append("rating",a+1),ce(z,!0,t).done(function(t){"object"==typeof t?t.success?location.reload(!0):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}))}),e("#wpdiscuz-subscribe-form").submit(function(t){t.preventDefault();var a,o,n=e(this);if(n[0].checkValidity()&&(a=n,o=!0,"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).length&&!e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).val().length?(o=!1,e(".wpdiscuz-recaptcha",a).css("border","1px solid red")):"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).length&&e(".wpdiscuz-recaptcha",a).css("border","none"),o)){var s=new FormData;s.append("action","wpdAddSubscription"),e("*",n).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&s.append(this.name+"",e(this).val()),"checkbox"!=this.type&&"radio"!=this.type||e(this).is(":checked")&&s.append(this.name+"",e(this).val())}),ce(z,!0,s).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):wpdiscuzAjaxObj.setCommentMessage(t,"error"),e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(".wpd-unsubscribe").click(function(t){t.preventDefault();var a=new FormData;a.append("action","wpdUnsubscribe"),a.append("sid",e(this).data("sid")),a.append("skey",e(this).data("skey")),ce(z,!0,a).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),wpdiscuzAjaxObj.resetActiveFilters=function(t){e(".wpd-filter.wpdf-active"+(t?":not("+t+")":"")).removeClass("wpdf-active")},wpdiscuzAjaxObj.getAjaxObj=ce});var onloadCallback=function(){if(document.getElementById("wpdiscuz-recaptcha-0_0")&&"2.0"===wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.render("wpdiscuz-recaptcha-0_0",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(e){jQuery("#wpdiscuz-recaptcha-field-0_0").val("key")},"expired-callback":function(){jQuery("#wpdiscuz-recaptcha-field-0_0").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}};
11
  /* Colorbox */
12
  (function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!U){U=$=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("<div/>"),w()}}function p(){x||(V=!1,E=t(i),x=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),L=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),y=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),R=n(se,"Current"),P=t('<button type="button"/>').attr({id:Z+"Previous"}),K=t('<button type="button"/>').attr({id:Z+"Next"}),S=t('<button type="button"/>').attr({id:Z+"Slideshow"}),L),B=t('<button type="button"/>').attr({id:Z+"Close"}),y.append(n(se).append(n(se,"TopLeft"),T=n(se,"TopCenter"),n(se,"TopRight")),n(se,!1,"clear:left").append(C=n(se,"MiddleLeft"),b,H=n(se,"MiddleRight")),n(se,!1,"clear:left").append(n(se,"BottomLeft"),k=n(se,"BottomCenter"),n(se,"BottomRight"))).find("div div").css({"float":"left"}),M=n(se,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=K.add(P).add(R).add(S)),e.body&&!x.parent().length&&t(e.body).append(v,x.append(y,M))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),f(this))}return x?(V||(V=!0,K.click(function(){J.next()}),P.click(function(){J.prev()}),B.click(function(){J.close()}),v.click(function(){_.get("overlayClose")&&J.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;U&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),U&&_.get("arrowKey")&&W[1]&&!t.altKey&&(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),K.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,i):t("."+te).live("click."+Z,i)),!0):!1}function w(){var e,o,r,h=J.prep,d=++le;if($=!0,q=!1,u(he),u(ie),_.get("onLoad"),_.h=_.get("height")?a(_.get("height"),"y")-N-j:_.get("innerHeight")&&a(_.get("innerHeight"),"y"),_.w=_.get("width")?a(_.get("width"),"x")-z-D:_.get("innerWidth")&&a(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=a(_.get("maxWidth"),"x")-z-D,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=a(_.get("maxHeight"),"y")-N-j,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.get("href"),Q=setTimeout(function(){L.show()},100),_.get("inline")){var c=t(e).eq(0);r=t("<div>").hide().insertBefore(c),ae.one(he,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),q=_.get("createImg"),t(q).addClass(Z+"Photo").bind("error."+Z,function(){h(n(se,"Error").html(_.get("imgError")))}).one("load",function(){d===le&&setTimeout(function(){var e;_.get("retinaImage")&&i.devicePixelRatio>1&&(q.height=q.height/i.devicePixelRatio,q.width=q.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){q.height-=q.height*e,q.width-=q.width*e},_.mw&&q.width>_.mw&&(e=(q.width-_.mw)/q.width,o()),_.mh&&q.height>_.mh&&(e=(q.height-_.mh)/q.height,o())),_.h&&(q.style.marginTop=Math.max(_.mh-q.height,0)/2+"px"),W[1]&&(_.get("loop")||W[A+1])&&(q.style.cursor="pointer",t(q).bind("click."+Z,function(){J.next()})),q.style.width=q.width+"px",q.style.height=q.height+"px",h(q)},1)}),q.src=e):e&&M.load(e,_.get("data"),function(e,i){d===le&&h("error"===i?n(se,"Error").html(_.get("xhrError")):t(this).contents())})}var v,x,y,b,T,C,H,k,W,E,I,M,L,F,R,S,K,P,B,O,_,j,D,N,z,A,q,U,$,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),n=t(this).data("cbox-iframe-attrs");return"object"==typeof n&&t.each(n,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",ne=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",ae=t("<a/>"),se="div",le=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){S.html(_.get("slideshowStop")).unbind(s).one(s,n),ae.bind(ne,e).bind(ie,t),x.removeClass(a+"off").addClass(a+"on")}function n(){t(),ae.unbind(ne,e).unbind(ie,t),S.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),x.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,S.hide(),t(),ae.unbind(ne,e).unbind(ie,t),x.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(ae.unbind(oe,o),o()):_.get("slideshow")&&W[1]&&(r=!0,ae.one(oe,o),_.get("slideshowAuto")?i():n(),S.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;return e=e||{},t.isFunction(o)&&(o=t("<a/>"),e.open=!0),o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(te),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(x[0].style.width,10)-D+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(x[0].style.height,10)-j+"px"}var r,h,s,l=0,d=0,c=x.offset();if(E.unbind("resize."+Z),x.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,x.css({position:"fixed"})):(l=h,d=s,x.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-z-D-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-z-D,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-N-j-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-N-j,0)/2),x.css({top:c.top,left:c.left,visibility:"visible"}),y[0].style.width=y[0].style.height="9999px",r={width:_.w+z+D,height:_.h+N+j,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==de[t]?(g=e,void 0):void 0}),e=g}de=r,e||x.css(r),x.dequeue().animate(r,{duration:e||0,complete:function(){n(),$=!1,y[0].style.width=_.w+z+D+"px",y[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;U&&(t=t||{},t.width&&(_.w=a(t.width,"x")-z-D),t.innerWidth&&(_.w=a(t.innerWidth,"x")),I.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-N-j),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=I.scrollTop(),I.css({height:"auto"}),_.h=I.height()),I.css({height:_.h}),e&&I.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||I.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||I.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if(U){var d,g="none"===_.get("transition")?0:_.get("speed");I.remove(),I=n(se,"LoadedContent").append(i),I.hide().appendTo(M.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),M.hide(),t(q).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&x[0].style.removeAttribute("filter")}var n,o,a=W.length;U&&(o=function(){clearTimeout(Q),L.hide(),u(ne),_.get("onComplete")},F.html(_.get("title")).show(),I.show(),a>1?("string"==typeof _.get("current")&&R.html(_.get("current").replace("{current}",A+1).replace("{total}",a)).show(),K[_.get("loop")||a-1>A?"show":"hide"]().html(_.get("next")),P[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ce(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=_.get("createIframe"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(I),ae.one(he,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?x.fadeTo(g,1,i):i())},"fade"===_.get("transition")?x.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!$&&W[1]&&(_.get("loop")||W[A+1])&&(A=h(1),f(W[A]))},J.prev=function(){!$&&W[1]&&(_.get("loop")||A)&&(A=h(-1),f(W[A]))},J.close=function(){U&&!G&&(G=!0,U=!1,u(oe),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),x.stop().fadeTo(_.get("fadeOut")||0,0,function(){x.hide(),v.hide(),u(he),I.remove(),setTimeout(function(){G=!1,u(re),_.get("onClosed")},1)}))},J.remove=function(){x&&(x.stop(),t[Y].close(),x.stop(!1,!0).remove(),v.remove(),G=!1,x=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)})(jQuery,document,window);
13
  /* Media Uploader */
@@ -15,6 +15,6 @@ jQuery(document).ready(function(e){if(e(document).delegate("#wpdcom .wmu-upload-
15
  /* Lity */
16
  !function(e,t){"function"==typeof define&&define.amd?define(["jquery"],function(n){return t(e,n)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(e,require("jquery")):e.lity=t(e,e.jQuery||e.Zepto)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=e.document,i=t(e),r=t.Deferred,o=t("html"),a=[],l="aria-hidden",s="lity-"+l,d='a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not([tabindex^="-"])',c={esc:!0,handler:null,handlers:{image:C,inline:function(e,n){var i,r,o;try{i=t(e)}catch(e){return!1}if(!i.length)return!1;return r=t('<i style="display:none !important"/>'),o=i.hasClass("lity-hide"),n.element().one("lity:remove",function(){r.before(i).remove(),o&&!i.closest(".lity-content").length&&i.addClass("lity-hide")}),i.removeClass("lity-hide").after(r)},youtube:function(e){var n=f.exec(e);if(!n)return!1;return k(x(e,w("https://www.youtube"+(n[2]||"")+".com/embed/"+n[4],t.extend({autoplay:1},b(n[5]||"")))))},vimeo:function(e){var n=y.exec(e);if(!n)return!1;return k(x(e,w("https://player.vimeo.com/video/"+n[3],t.extend({autoplay:1},b(n[4]||"")))))},googlemaps:function(e){var t=v.exec(e);if(!t)return!1;return k(x(e,w("https://www.google."+t[3]+"/maps?"+t[6],{output:t[6].indexOf("layer=c")>0?"svembed":"embed"})))},facebookvideo:function(e){var n=p.exec(e);if(!n)return!1;0!==e.indexOf("http")&&(e="https:"+e);return k(x(e,w("https://www.facebook.com/plugins/video.php?href="+e,t.extend({autoplay:1},b(n[4]||"")))))},iframe:k},template:'<div class="lity" role="dialog" aria-label="Dialog Window (Press escape to close)" tabindex="-1"><div class="lity-wrap" data-lity-close role="document"><div class="lity-loader" aria-hidden="true">Loading...</div><div class="lity-container"><div class="lity-content"></div><button class="lity-close" type="button" aria-label="Close (Press escape to close)" data-lity-close>&times;</button></div></div></div>'},u=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i,f=/(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i,y=/(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/,v=/((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i,p=/(facebook\.com)\/([a-z0-9_-]*)\/videos\/([0-9]*)(.*)?$/i,m=function(){var e=n.createElement("div"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in t)if(void 0!==e.style[i])return t[i];return!1}();function h(e){var t=r();return m&&e.length?(e.one(m,t.resolve),setTimeout(t.resolve,500)):t.resolve(),t.promise()}function g(e,n,i){if(1===arguments.length)return t.extend({},e);if("string"==typeof n){if(void 0===i)return void 0===e[n]?null:e[n];e[n]=i}else t.extend(e,n);return this}function b(e){for(var t,n=decodeURI(e.split("#")[0]).split("&"),i={},r=0,o=n.length;r<o;r++)n[r]&&(i[(t=n[r].split("="))[0]]=t[1]);return i}function w(e,n){return e+(e.indexOf("?")>-1?"&":"?")+t.param(n)}function x(e,t){var n=e.indexOf("#");return-1===n?t:(n>0&&(e=e.substr(n)),t+e)}function C(e,n){var i=n.opener()&&n.opener().data("lity-desc")||"Image with no description",o=t('<img src="'+e+'" alt="'+i+'"/>'),a=r(),l=function(){var e;a.reject((e="Failed loading image",t('<span class="lity-error"/>').append(e)))};return o.on("load",function(){if(0===this.naturalWidth)return l();a.resolve(o)}).on("error",l),a.promise()}function k(e){return'<div class="lity-iframe-container"><iframe frameborder="0" allowfullscreen src="'+e+'"/></div>'}function E(){return n.documentElement.clientHeight?.9*n.documentElement.clientHeight:Math.round(.9*i.height())}function j(e){var t,i,r,o=z();o&&(27===e.keyCode&&o.options("esc")&&o.close(),9===e.keyCode&&(t=e,i=o.element().find(d),r=i.index(n.activeElement),t.shiftKey&&r<=0?(i.get(i.length-1).focus(),t.preventDefault()):t.shiftKey||r!==i.length-1||(i.get(0).focus(),t.preventDefault())))}function D(){t.each(a,function(e,t){t.resize()})}function z(){return 0===a.length?null:a[0]}function T(e,d,u,f){var y,v,p,m,b,w,x,C,k,z,T,O=this,q=!1,W=!1;d=t.extend({},c,d),v=t(d.template),O.element=function(){return v},O.opener=function(){return u},O.options=t.proxy(g,O,d),O.handlers=t.proxy(g,O,d.handlers),O.resize=function(){q&&!W&&p.css("max-height",E()+"px").trigger("lity:resize",[O])},O.close=function(){if(q&&!W){var e;W=!0,(e=O).element().attr(l,"true"),1===a.length&&(o.removeClass("lity-active"),i.off({resize:D,keydown:j})),((a=t.grep(a,function(t){return e!==t})).length?a[0].element():t(".lity-hidden")).removeClass("lity-hidden").each(function(){var e=t(this),n=e.data(s);n?e.attr(l,n):e.removeAttr(l),e.removeData(s)});var d=r();if(f&&(n.activeElement===v[0]||t.contains(v[0],n.activeElement)))try{f.focus()}catch(e){}return p.trigger("lity:close",[O]),v.removeClass("lity-opened").addClass("lity-closed"),h(p.add(v)).always(function(){p.trigger("lity:remove",[O]),v.remove(),v=void 0,d.resolve()}),d.promise()}},m=e,b=O,w=d.handlers,x=d.handler,k="inline",z=t.extend({},w),x&&z[x]?(C=z[x](m,b),k=x):(t.each(["inline","iframe"],function(e,t){delete z[t],z[t]=w[t]}),t.each(z,function(e,t){return!t||!(!t.test||t.test(m,b))||(!1!==(C=t(m,b))?(k=e,!1):void 0)})),y={handler:k,content:C||""},v.attr(l,"false").addClass("lity-loading lity-opened lity-"+y.handler).appendTo("body").focus().on("click","[data-lity-close]",function(e){t(e.target).is("[data-lity-close]")&&O.close()}).trigger("lity:open",[O]),T=O,1===a.unshift(T)&&(o.addClass("lity-active"),i.on({resize:D,keydown:j})),t("body > *").not(T.element()).addClass("lity-hidden").each(function(){var e=t(this);void 0===e.data(s)&&e.data(s,e.attr(l)||null)}).attr(l,"true"),t.when(y.content).always(function(e){p=t(e).css("max-height",E()+"px"),v.find(".lity-loader").each(function(){var e=t(this);h(e).always(function(){e.remove()})}),v.removeClass("lity-loading").find(".lity-content").empty().append(p),q=!0,p.trigger("lity:ready",[O])})}function O(e,i,r){e.preventDefault?(e.preventDefault(),e=(r=t(this)).data("lity-target")||r.attr("rel")||r.attr("src")):r=t(r);var o=new T(e,t.extend({},r.data("lity-options")||r.data("lity"),i),r,n.activeElement);if(!e.preventDefault)return o}return C.test=function(e){return u.test(e)},O.version="2.2.2",O.options=t.proxy(g,O,c),O.handlers=t.proxy(g,O,c.handlers),O.current=z,t(n).on("click.lity","[data-wpd-lity]",O),O});
17
  /* My Content and Settings */
18
- jQuery(document).ready(function(e){var t=0,d=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled);e(document).delegate(".wpd-info,.wpd-page-link,.wpd-delete-content,.wpd-user-email-delete-links","click",function(e){e.preventDefault()}),e(document).delegate(".wpd-info.wpd-not-clicked","click",function(t){var n=e(this);n.removeClass("wpd-not-clicked");var a=new FormData;return a.append("action","wpdGetInfo"),function(t,n){var a=e(".fas",t),i=a.attr("class");a.removeClass(),a.addClass("fas fa-pulse fa-spinner"),wpdiscuzAjaxObj.getAjaxObj(d,!1,n).done(function(d){t.addClass("wpd-not-clicked"),a.removeClass(),a.addClass(i),d&&(e("#wpdUserContentInfo").html(d),e("#wpdUserContentInfo ul.wpd-list .wpd-list-item:first-child").addClass("wpd-active"),e("#wpdUserContentInfo div.wpd-content .wpd-content-item:first-child").addClass("wpd-active"),e("#wpdUserContentInfo").is(":visible")||e("#wpdUserContentInfoAnchor").trigger("click"))})}(n,a),!1}),e(document).delegate(".wpd-list-item","click",function(){var t=e("input.wpd-rel",this).val();e("#wpdUserContentInfo .wpd-list-item").removeClass("wpd-active"),e("#wpdUserContentInfo .wpd-content-item").removeClass("wpd-active");var n=e(this);if(e("#wpdUserContentInfo #"+t).text().length)n.addClass("wpd-active"),e("#wpdUserContentInfo #"+t).addClass("wpd-active");else{var a=new FormData;a.append("action",n.attr("data-action")),a.append("page",0),e("#wpdUserContentInfo #"+t).addClass("wpd-active"),e("#wpdUserContentInfo #"+t).css("text-align","center"),wpdiscuzAjaxObj.getAjaxObj(d,!0,a).done(function(d){d&&(e("#wpdUserContentInfo #"+t).css("text-align",""),n.addClass("wpd-active"),e("#wpdUserContentInfo #"+t).html(d)),e("#wpdiscuz-loading-bar").hide()})}}),e(document).delegate(".wpd-page-link.wpd-not-clicked","click",function(t){var n=e(this);n.removeClass("wpd-not-clicked");var a=n.data("wpd-page"),i=e(".wpd-active .wpd-pagination .wpd-action").val(),o=new FormData;o.append("action",i),o.append("page",a),wpdiscuzAjaxObj.getAjaxObj(d,!0,o).done(function(t){n.addClass("wpd-not-clicked"),t&&e(".wpd-content-item.wpd-active").html(t),e("#wpdiscuz-loading-bar").hide()})}),e(document).delegate(".wpd-delete-content.wpd-not-clicked","click",function(){var n=e(this),a=parseInt(n.data("wpd-content-id"));if(!isNaN(a)){var i=n.data("wpd-delete-action");if("wpdDeleteComment"==i&&!confirm(wpdiscuzUCObj.msgConfirmDeleteComment))return!1;if("wpdCancelSubscription"==i&&!confirm(wpdiscuzUCObj.msgConfirmCancelSubscription))return!1;if("wpdCancelFollow"==i&&!confirm(wpdiscuzUCObj.msgConfirmCancelFollow))return!1;var o=e("i",n),s=o.attr("class"),c=e(".wpd-wrapper .wpd-page-number").val(),l=e(".wpd-content-item.wpd-active").children(".wpd-item").length;n.removeClass("wpd-not-clicked"),o.removeClass().addClass("fas fa-pulse fa-spinner"),1==l&&c>0&&(c-=1);var p=new FormData;p.append("id",a),p.append("page",c),p.append("action",i),wpdiscuzAjaxObj.getAjaxObj(d,!1,p).done(function(d){n.addClass("wpd-not-clicked"),o.removeClass().addClass(s),e(".wpd-content-item.wpd-active").html(d),t=1})}}),e(document).delegate("[data-lity-close]","click",function(d){e(d.target).is("[data-lity-close]")&&t&&window.location.reload(!0)}),e(document).delegate(".wpd-user-email-delete-links.wpd-not-clicked","click",function(){var t=e(this);t.removeClass("wpd-not-clicked"),e(".wpd-loading",t).addClass("wpd-show");var n=new FormData;n.append("action","wpdEmailDeleteLinks"),wpdiscuzAjaxObj.getAjaxObj(d,!1,n).done(function(d){t.addClass("wpd-not-clicked"),e("[data-lity-close]",window.parent.document).trigger("click")})}),e(document).delegate(".wpd-user-settings-button.wpd-not-clicked","click",function(){var t=e(this);t.removeClass("wpd-not-clicked");var n=t.data("wpd-delete-action");if(console.log(n),"deleteCookies"!==n){t.find(".wpd-loading").addClass("wpd-show");var a=new FormData;a.append("action","wpdGuestAction"),a.append("guestAction",n),wpdiscuzAjaxObj.getAjaxObj(d,!1,a).done(function(d){t.addClass("wpd-not-clicked"),t.find(".wpd-loading").removeClass("wpd-show");try{var n=e.parseJSON(d);t.after(n.message);var a=t.next(".wpd-guest-action-message");a.fadeIn(100).fadeOut(7e3,function(){a.remove(),1===parseInt(n.code)&&(t.parent().remove(),e(".wpd-delete-all-comments").length||e(".wpd-delete-all-subscriptions").length||e(".wpd-delete-all-cookies").parent().addClass("wpd-show"))})}catch(e){console.log(e)}})}else!function(){for(var e=document.cookie.split(";"),t=0;t<e.length;t++){var d=e[t],n=d.indexOf("="),a=n>-1?d.substr(0,n):d;Cookies.remove(a.trim())}location.reload(!0)}()})});
19
  /* Social */
20
- function wpcShareCommentFB(e,s){FB.ui({method:"share",href:e,quote:s},function(e){})}(wpdiscuzAjaxObj.enableFbLogin||wpdiscuzAjaxObj.enableFbShare)&&wpdiscuzAjaxObj.facebookAppID&&(!function(e,s,n){var o,a=e.getElementsByTagName(s)[0];e.getElementById(n)||((o=e.createElement(s)).id=n,o.src="//connect.facebook.net/en_US/sdk.js",a.parentNode.insertBefore(o,a))}(document,"script","facebook-jssdk"),window.fbAsyncInit=function(){FB.init({appId:wpdiscuzAjaxObj.facebookAppID,cookie:!0,xfbml:!0,version:"v2.8"})}),jQuery(document).ready(function(e){var s;(s=Cookies.get("wpdiscuz_social_login_message"))&&"undefined"!==s&&(Cookies.remove("wpdiscuz_social_login_message"),wpdiscuzAjaxObj.setCommentMessage(decodeURIComponent(s.replace(/\+/g,"%20")),"error")),Cookies.get("wpdiscuz_scroll_to_comments")&&(Cookies.remove("wpdiscuz_scroll_to_comments",{path:"/"}),e("html, body").animate({scrollTop:e("#comments").offset().top-32},1e3)),e(document).delegate(".wpd-comment-share .fa-facebook-f","click",function(){if(1==wpdiscuzAjaxObj.enableFbShare){var s=e(this).parents(".wpd-comment").find(".wpd-comment-right").attr("id"),n=window.location.href;-1!==n.indexOf("#")&&(n=n.substring(0,n.indexOf("#"))),wpcShareCommentFB(n+="#"+s,e(this).parents(".wpd-comment-right").find(".wpd-comment-text").text())}});var n="";function o(e,s){var n,o="";t(s,1),Cookies.set("wpdiscuz_scroll_to_comments",1,{path:"/"}),"facebook"===e&&0==wpdiscuzAjaxObj.facebookUseOAuth2?FB.getLoginStatus(function(t){"connected"===t.status?(n=t.authResponse.accessToken,o=t.authResponse.userID,a(e,n,o,s)):FB.login(function(t){"connected"===t.status&&(n=t.authResponse.accessToken,o=t.authResponse.userID,a(e,n,o,s))},{scope:"public_profile,email"})}):a(e,n,o,s)}function a(s,n,o,a){return e.ajax({type:"POST",url:wpdiscuzAjaxObj.url,data:{action:"wpd_social_login",provider:s,token:n,userID:o,postID:wpdiscuzAjaxObj.wc_post_id}}).done(function(s){!function(s,n){try{var o=e.parseJSON(s),a=o.code,i=o.message,c=o.url;200===parseInt(a)?location.assign(c):wpdiscuzAjaxObj.setCommentMessage(i,"error")}catch(e){console.log(e)}t(n,0)}(s,a)}),""}function t(e,s){1===s?e.find(".wpdiscuz-social-login-spinner").show():e.find(".wpdiscuz-social-login-spinner").hide()}e(document).delegate("#wpdcom .wpd-social-login .wpdiscuz-login-button","click",function(){var s=e(this).parents(".wpd-social-login");!function(e,s){1!=parseInt(wpdiscuzAjaxObj.socialLoginAgreementCheckbox)||1==Cookies.get("socialLoginAgreementConfirmed")?o(e,s):s.parents(".wpd-form-wrap, .wpd-form").find(".wpd-social-login-agreement").first().slideDown(700)}(n=function(e){var s="";e.hasClass("wpdsn-fb")&&(s="facebook");e.hasClass("wpdsn-insta")&&(s="instagram");e.hasClass("wpdsn-gg")&&(s="google");e.hasClass("wpdsn-ds")&&(s="disqus");e.hasClass("wpdsn-wp")&&(s="wordpress");e.hasClass("wpdsn-tw")&&(s="twitter");e.hasClass("wpdsn-vk")&&(s="vk");e.hasClass("wpdsn-ok")&&(s="ok");e.hasClass("wpdsn-linked")&&(s="linkedin");e.hasClass("wpdsn-yandex")&&(s="yandex");e.hasClass("wpdsn-mailru")&&(s="mailru");e.hasClass("wpdsn-weixin")&&(s="wechat");e.hasClass("wpdsn-weibo")&&(s="weibo");e.hasClass("wpdsn-qq")&&(s="qq");e.hasClass("wpdsn-baidu")&&(s="baidu");return s}(e(this)),s)}),e(document).delegate("#wpdcom .wpd-agreement-buttons-right .wpd-agreement-button","click",function(){var s=e(this).parents(".wpd-form-wrap, .wpd-form").find(".wpd-social-login-agreement").slideUp(700);e(this).hasClass("wpd-agreement-button-agree")&&(wpdiscuzAjaxObj.isCookiesEnabled&&Cookies.set("socialLoginAgreementConfirmed",1,{expires:30,path:"/"}),o(n,s))})});
7
  /* Autogrow */
8
  jQuery.fn.autoGrow=function(){return this.each(function(){var createMirror=function(textarea){jQuery(textarea).after('<div class="autogrow-textarea-mirror"></div>');return jQuery(textarea).next(".autogrow-textarea-mirror")[0]};var sendContentToMirror=function(textarea){mirror.innerHTML=String(textarea.value).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br />")+".<br/>.";if(jQuery(textarea).height()!=jQuery(mirror).height())jQuery(textarea).height(jQuery(mirror).height())};var growTextarea=function(){sendContentToMirror(this)};var mirror=createMirror(this);mirror.style.display="none";mirror.style.wordWrap="break-word";mirror.style.padding=jQuery(this).css("padding");mirror.style.width=jQuery(this).css("width");mirror.style.fontFamily=jQuery(this).css("font-family");mirror.style.fontSize=jQuery(this).css("font-size");mirror.style.lineHeight=jQuery(this).css("line-height");this.style.overflow="hidden";this.style.minHeight=this.rows+"em";this.onkeydown=growTextarea;sendContentToMirror(this)})};
9
  /* wpDiscuz */
10
+ var wpdiscuzLoadRichEditor=parseInt(wpdiscuzAjaxObj.loadRichEditor);if(wpdiscuzLoadRichEditor)var wpDiscuzEditor=new WpdEditor;function wpdMessagesOnInit(e,t){wpdiscuzAjaxObj.setCommentMessage(e,t),setTimeout(function(){location.href=location.href.substring(0,location.href.indexOf("wpdiscuzUrlAnchor")-1)},3e3)}wpdiscuzAjaxObj.setCommentMessage=function(e,t,a){var o="wpdiscuz-message-error";if("[object Array]"===Object.prototype.toString.call(e))for(var d in e)"[object Array]"===Object.prototype.toString.call(t)?"success"===t[d]?o="wpdiscuz-message-success":"warning"===t[d]&&(o="wpdiscuz-message-warning"):"success"===t?o="wpdiscuz-message-success":"warning"===t&&(o="wpdiscuz-message-warning"),jQuery("<div/>").addClass(o).html(e[d]).prependTo("#wpdiscuz-comment-message").delay("[object Array]"===Object.prototype.toString.call(a)?a[d]:a||4e3).fadeOut(1e3,function(){jQuery(this).remove()});else"success"===t?o="wpdiscuz-message-success":"warning"===t&&(o="wpdiscuz-message-warning"),jQuery("<div/>").addClass(o).html(e).prependTo("#wpdiscuz-comment-message").delay(a||4e3).fadeOut(1e3,function(){jQuery(this).remove()})},jQuery(document).ready(function(e){e("body").addClass("wpdiscuz_"+wpdiscuzAjaxObj.version);var t=wpdiscuzAjaxObj.is_user_logged_in,a=1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!t,o=1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&t,d=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,n=parseInt(wpdiscuzAjaxObj.commentListLoadType),s=parseInt(wpdiscuzAjaxObj.wc_post_id),i=parseInt(wpdiscuzAjaxObj.commentListUpdateType),c=1e3*parseInt(wpdiscuzAjaxObj.commentListUpdateTimer),p=parseInt(wpdiscuzAjaxObj.liveUpdateGuests),r=wpdiscuzAjaxObj.loadLastCommentId,l=r,m=parseInt(wpdiscuzAjaxObj.firstLoadWithAjax);Cookies.get("wpdiscuz_comments_sorting")&&Cookies.remove("wpdiscuz_comments_sorting",{path:""}),Cookies.get("wordpress_last_visit")&&Cookies.remove("wordpress_last_visit",{path:""}),Cookies.get("wpdiscuz_last_visit")&&Cookies.remove("wpdiscuz_last_visit",{path:""});var w,u=wpdiscuzAjaxObj.storeCommenterData,f=parseInt(wpdiscuzAjaxObj.wmuEnabled),h=wpdiscuzAjaxObj.isCookiesEnabled,b=!0,g=wpdiscuzAjaxObj.cookiehash,_=parseInt(wpdiscuzAjaxObj.isLoadOnlyParentComments),v=parseInt(wpdiscuzAjaxObj.enableDropAnimation)?500:0,z=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),j=parseInt(wpdiscuzAjaxObj.enableBubble),C=parseInt(wpdiscuzAjaxObj.bubbleLiveUpdate),k=parseInt(wpdiscuzAjaxObj.bubbleHintTimeout),x=parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout)?parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout):5,y=parseInt(wpdiscuzAjaxObj.bubbleShowNewCommentMessage),O=wpdiscuzAjaxObj.bubbleLocation,A=wpdiscuzAjaxObj.inlineFeedbackAttractionType,I=[],T=[],D=[],E=!1,M=1;(e(".wc_social_plugin_wrapper .wp-social-login-provider-list").length?e(".wc_social_plugin_wrapper .wp-social-login-provider-list").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .the_champ_login_container").length?e(".wc_social_plugin_wrapper .the_champ_login_container").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .social_connect_form").length?e(".wc_social_plugin_wrapper .social_connect_form").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .oneall_social_login_providers").length&&e(".wc_social_plugin_wrapper .oneall_social_login .oneall_social_login_providers").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"),wpdiscuzLoadRichEditor&&e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0"),e(document).delegate("#wpdcom .ql-editor, #wpdcom .wc_comment","focus",function(){e(".wpd-form-foot",e(this).parents(".wpd_comm_form")).slideDown(v)}),e(document).delegate("#wpdcom textarea","focus",function(){e(this).next(".autogrow-textarea-mirror").length||e(this).autoGrow()}),t)||S({comment_author:Cookies.get("comment_author_"+g),comment_author_email:Cookies.get("comment_author_email_"+g),comment_author_url:Cookies.get("comment_author_url_"+g)});if(e(".wpd-vote-down.wpd-dislike-hidden").remove(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd"),e(document).delegate("#wpd-editor-source-code-wrapper-bg","click",function(){e(this).hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),wpdiscuzLoadRichEditor&&e(document).delegate("#wpd-insert-source-code","click",function(){var t=wpDiscuzEditor.createEditor("#"+e("#wpd-editor-uid").val());t.deleteText(0,t.getLength(),Quill.sources.USER);var a=e("#wpd-editor-source-code").val();a.length&&t.clipboard.dangerouslyPasteHTML(0,a,Quill.sources.USER),t.update(),e("#wpd-editor-source-code-wrapper-bg").hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),e(document).delegate(".wpd-reply-button","click",function(){var n=V(e(this),0);e(this).hasClass("wpdiscuz-clonned")?(wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+n).focus()},v):setTimeout(function(){e("#wc-textarea-"+n).trigger("focus")},v),e("#wpd-secondary-form-wrapper-"+n).slideToggle(v)):function(a){var o=V(a,0);e("#wpdiscuz_form_anchor-"+o).before(function(t){return e("#wpdiscuz_hidden_secondary_form").html().replace(/wpdiscuzuniqueid/g,t)}(o));var d=e("#wpd-secondary-form-wrapper-"+o);if(!t){var n={comment_author:Cookies.get("comment_author_"+g),comment_author_email:Cookies.get("comment_author_email_"+g),comment_author_url:Cookies.get("comment_author_url_"+g)};S(n)}wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+o).focus()},v):setTimeout(function(){e("#wc-textarea-"+o).trigger("focus")},v);d.slideToggle(v,function(){a.addClass("wpdiscuz-clonned")})}(e(this)),function(t){if((a||o)&&"2.0"===d){var n=B(t);setTimeout(function(){if(!T[n])try{T[n]=grecaptcha.render("wpdiscuz-recaptcha-"+t,{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(a){e("#wpdiscuz-recaptcha-field-"+t).val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-"+t).val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}},1e3)}}(n)}),e(document).delegate("#wpdcom .wpd-comment-link [data-comment-url]","click",function(){var t=e(this).data("comment-url"),a=e("<input/>");a.appendTo("body").css({position:"absolute",top:"-10000000px"}).val(t),a.select(),document.execCommand("copy"),a.remove(),wpdiscuzAjaxObj.setCommentMessage(t+"<br/>"+wpdiscuzAjaxObj.wc_copied_to_clipboard,"success",5e3)}),e(document).delegate(".wpdiscuz-nofollow,.wc_captcha_refresh_img,.wpd-load-more-submit","click",function(e){e.preventDefault()}),e(document).delegate(".wpd-toggle.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked");var a=V(e(this),0),o=e(this),d=e(".fas",o);!o.parents(".wpd-comment:not(.wpd-reply)").children(".wpd-reply").length&&_?function(t,a){var o=B(t),d=new FormData;d.append("action","wpdShowReplies"),d.append("commentId",o),ce(z,!0,d).done(function(o){a.addClass("wpd_not_clicked"),"object"==typeof o&&o.success&&(e("#wpd-comm-"+t).replaceWith(o.data.comment_list),e("#wpd-comm-"+t+" .wpd-toggle .fas").removeClass("fa-chevron-down").addClass("fa-chevron-up"),e("#wpd-comm-"+t+" .wpd-toggle").attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text),e("#wpd-comm-"+t+" .wpd-toggle .wpd-view-replies").remove(),ie(o)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,d){console.log(d),a.addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}(a,t):e("#wpd-comm-"+a+"> .wpd-reply").slideToggle(700,function(){e(this).is(":hidden")?(d.removeClass("fa-chevron-up"),d.addClass("fa-chevron-down"),o.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_show_replies_text)):(d.removeClass("fa-chevron-down"),d.addClass("fa-chevron-up"),o.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text)),t.addClass("wpd_not_clicked")})}),e(document).delegate(".wpd-new-loaded-comment","mouseenter",function(){e(this).removeClass("wpd-new-loaded-comment")}),e(document).delegate(".wpd-sbs-toggle","click",function(){e(".wpdiscuz-subscribe-bar").slideToggle(v)}),parseInt(wpdiscuzAjaxObj.wpDiscuzIsShowOnSubscribeForm)&&!t&&wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&("2.0"===d?(setTimeout(function(){try{grecaptcha.render("wpdiscuz-recaptcha-subscribe-form",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-subscribe-form").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}},1e3),e(document).delegate("#wpdiscuz-subscribe-form","submit",function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val()?e(".wpdiscuz-recaptcha",e(this)).css("border","none"):(e(".wpdiscuz-recaptcha",e(this)).css("border","1px solid red"),t.preventDefault())})):"3.0"===d&&e(document).delegate("#wpdiscuz_subscription_button","click",function(t){var a=e(this).parents("#wpdiscuz-subscribe-form");t.preventDefault();try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/wpdAddSubscription"}).then(function(e){console.log(5555),document.getElementById("wpdiscuz-recaptcha-field-subscribe-form").value=e,a.submit()},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error")}})),(a||o)&&"2.0"===d){var F=e(window).width(),L=e("#wpdcom").width();L>=1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"65%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"35%"})),L>=940&&L<1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"60%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"40%"})),L>=810&&L<940&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"60%"})),L>=730&&L<810&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"45%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"55%"})),L>=610&&L<730&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.85)","-webkit-transform":"scale(0.85)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"43%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"55%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"})),F>650&&(L>=510&&L<610&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"35%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"63%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%",position:"relative",right:"-60px"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),L>=470&&L<510&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"60%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd_main_comm_form .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),L<470&&(e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({margin:"0px auto","transform-origin":"center 0","-webkit-transform-origin":"center 0"}),e("#wpdcom .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc_notification_checkboxes").css({"text-align":"center"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-field-submit").css({"text-align":"center"})))}function R(t,a,o){ce(z||f,!1,a).done(function(a){if(e(o).addClass("wpd_not_clicked"),"object"==typeof a)if(a.success){"collapsed"===wpdiscuzAjaxObj.commentFormView&&e(".wpd-form-foot",t).slideUp(v),e(".wpd-thread-info").html(a.data.wc_all_comments_count_new_html),a.data.wc_all_comments_count_new=parseInt(a.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").text(a.data.wc_all_comments_count_new),a.data.wc_all_comments_count_new?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide();var d=v;a.data.is_main?X(a.data.message):(d=v+700,e("#wpd-secondary-form-wrapper-"+a.data.uniqueid).slideToggle(700),1==a.data.is_in_same_container?e("#wpd-secondary-form-wrapper-"+a.data.uniqueid).after(a.data.message):e("#wpd-comm-"+a.data.uniqueid).after(a.data.message)),function(e){if(!e.data.held_moderate){var t=new FormData;t.append("action","wpdCheckNotificationType"),t.append("comment_id",e.data.new_comment_id),t.append("email",e.data.comment_author_email),t.append("isParent",e.data.is_main),ce(z,!0,t)}}(a),function(e){if(e.data.redirect>0&&e.data.new_comment_id){var t=new FormData;t.append("action","wpdRedirect"),t.append("commentId",e.data.new_comment_id),ce(z,!0,t).done(function(e){"object"==typeof e&&e.success&&setTimeout(function(){location.href=e.data},2e3)}).fail(function(e,t,a){console.log(a)})}}(a),h&&b?function(t){var a=t.comment_author_email,o=t.comment_author,d=t.comment_author_url;null==u?(Cookies.set("comment_author_email_"+g,a),Cookies.set("comment_author_"+g,o),d.length&&Cookies.set("comment_author_url_"+g,d)):(u=parseInt(u),Cookies.set("comment_author_email_"+g,a,{expires:u,path:"/"}),Cookies.set("comment_author_"+g,o,{expires:u,path:"/"}),d.length&&Cookies.set("comment_author_url_"+g,d,{expires:u,path:"/"}));e(".wpd-cookies-checkbox").length&&e(".wpd-cookies-checkbox").attr("checked","checked")}(a.data):b||e(".wpd-cookies-checkbox").removeAttr("checked"),wpdiscuzLoadRichEditor&&wpDiscuzEditor.createEditor("#wpd-editor-"+e(".wpdiscuz_unique_id",t).val()).setContents([{insert:"\n"}]),t.get(0).reset(),S(a.data),e(".wmu-preview-wrap",t).remove(),I.length&&(I.forEach(function(e){e.parents(".wpd-field-checkbox").remove()}),I=[]),parseInt(wpdiscuzAjaxObj.scrollToComment)&&setTimeout(function(){e("html, body").animate({scrollTop:e("#comment-"+a.data.new_comment_id).offset().top-32},1e3)},d),ie(a,t)}else a.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"),ie(a,t));else wpdiscuzAjaxObj.setCommentMessage(a,"error");e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,d){console.log(d),e(o).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}function S(t){e(".wpd_comm_form .wc_name").val(t.comment_author),t.comment_author_email&&t.comment_author_email.indexOf("@example.com")<0&&e(".wpd_comm_form .wc_email").val(t.comment_author_email),t.comment_author_url&&e(".wpd_comm_form .wc_website").val(t.comment_author_url)}function q(t,a){e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").show(),e("#wpd-comm-"+t+" .wpdiscuz-edit-form-wrap").replaceWith(a),e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").show()}e(document).delegate(".wc_comm_submit.wpd_not_clicked","click",function(){var t=e(this),n=1,s=e(this).parents("form");if(s.hasClass("wpd_main_comm_form")||(n=function(t){var a=t.attr("class").split(" "),o="";return e.each(a,function(e,t){"wpd_comment_level"===G(t,!1)&&(o=G(t,!0))}),parseInt(o)+1}(e(this).parents(".wpd-comment"))),J(s,"#wpd-editor-"+e(".wpdiscuz_unique_id",s).val()),s.submit(function(e){e.preventDefault()}),""!==e(".wc_comment",s).val().trim()){if(s[0].checkValidity()&&(c=s,p=!0,"2.0"===d&&e("input[name=wc_captcha]",c).length&&!e("input[name=wc_captcha]",c).val().length?(p=!1,e(".wpdiscuz-recaptcha",c).css("border","1px solid red")):"2.0"===d&&e("input[name=wc_captcha]",c).length&&e(".wpdiscuz-recaptcha",c).css("border","none"),p)){E=!0,function(t){e(".wpd-agreement-checkbox",t).each(function(){e(this).hasClass("wpd_agreement_hide")&&h&&e(this).prop("checked")&&(Cookies.set(e(this).attr("name")+"_"+g,1,{expires:30,path:"/"}),e("input[name="+e(this).attr("name")+"]").each(function(){I.push(e(this))}))})}(s),e(t).removeClass("wpd_not_clicked");var i=new FormData;if(i.append("action","wpdAddComment"),e(":input",s).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&i.append(this.name+"",e(this).val().trim()),"checkbox"!=this.type&&"radio"!=this.type||e(this).is(":checked")&&i.append(this.name+"",e(this).val())}),i.append("wpd_comment_depth",n),wpdiscuzAjaxObj.wpdiscuz_zs&&i.append("wpdiscuz_zs",wpdiscuzAjaxObj.wpdiscuz_zs),e(".wpd-cookies-checkbox",s).length&&!e(".wpd-cookies-checkbox",s).prop("checked")&&(b=!1),e("#wpdiscuz-loading-bar").show(),wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&"3.0"===d&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/addComment"}).then(function(e){i.append("g-recaptcha-response",e),R(s,i,t)},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error"),e("#wpdiscuz-loading-bar").fadeOut(250)}else R(s,i,t)}var c,p;!function(e){if((a||o)&&"2.0"===d){var t=B(e);grecaptcha.reset(T[t])}}(e(".wpdiscuz_unique_id",s).val()),e(".wpdiscuz_reset").val("")}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.wc_msg_required_fields,"error")}),e(document).delegate(".wpd_editable_comment","click",function(){w&&e(".wpdiscuz-edit-form-wrap").length&&q(V(e(".wpdiscuz-edit-form-wrap"),0),w);var t=V(e(this),0),a=B(t),o=new FormData;o.append("action","wpdEditComment"),o.append("commentId",a),w=e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-text").get(0),ce(z,!0,o).done(function(a){if("object"==typeof a)if(a.success){if(e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text").replaceWith(a.data.html),wpdiscuzLoadRichEditor){let o=wpDiscuzEditor.createEditor("#wpd-editor-edit_"+t);o.clipboard.dangerouslyPasteHTML(0,a.data.content),o.update(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd")}else e("#wc-textarea-edit_"+t).val(a.data.content);e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").hide(),e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").hide()}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error");else console.log(a);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wc_save_edited_comment","click",function(){var t=V(e(this)),a=B(t),o=e("#wpd-comm-"+t+" #wpdiscuz-edit-form");if(J(o,"#wpd-editor-edit_"+t),o.submit(function(e){e.preventDefault()}),o[0].checkValidity()){var d=new FormData;d.append("action","wpdSaveEditedComment"),d.append("commentId",a),e(":input",o).each(function(){""!==this.name&&"checkbox"!==this.type&&"radio"!==this.type&&d.append(this.name+"",e(this).val()),"checkbox"!==this.type&&"radio"!==this.type||e(this).is(":checked")&&d.append(this.name+"",e(this).val())}),ce(z,!0,d).done(function(o){"object"==typeof o?(o.success?(q(t,o.data.message),o.data.lastEdited&&(e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").remove(),e(o.data.lastEdited).insertAfter("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text")),o.data.twitterShareLink&&e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_tw").attr("href",o.data.twitterShareLink),o.data.whatsappShareLink&&e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_whatsapp").attr("href",o.data.whatsappShareLink),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[o.data],"error"),ie(o,a)):console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(document).delegate(".wc_cancel_edit","click",function(){var t=V(e(this));q(t,w),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)}),!wpdiscuzAjaxObj.wordpressIsPaginate&&m&&(M=0,1==m?setTimeout(function(){W(!0)},500):e(document).delegate(".wpd-load-comments","click",function(){e(this).parent(".wpd-load-more-submit-wrap").remove(),W(!0)})),e(document).delegate(".wpd-load-more-submit","click",function(){var t=e(this);t.hasClass("wpd-loaded")&&W(!1,t,"wpd-loaded","wpd-loading")});var U=!1;function H(){var t=e("#wpdiscuzHasMoreComments").val(),a=e(document).height(),o=e(window).height()+e(window).scrollTop();a&&o&&(100*o/a>=80&&!1===U&&1==t&&(U=!0,W(!1,e(".wpd-load-more-submit"))))}function W(t,a,o,d){a&&(a.toggleClass(o),a.toggleClass(d));var s=new FormData;s.append("action","wpdLoadMoreComments");var i=e(".wpdiscuz-sort-button-active").attr("data-sorting");i&&s.append("sorting",i),s.append("offset",M),s.append("lastParentId",e(".wpd-load-more-submit").attr("data-lastparentid")),s.append("isFirstLoad",t?1:0);var c=e(".wpdf-active").attr("data-filter-type");s.append("wpdType",c||""),ce(z,!t||1!=m,s).done(function(s){"object"==typeof s&&s.success&&(M++,t&&e(".wpd-comment").remove(),e(".wpdiscuz_single").remove(),e(".wpdiscuz-comment-pagination").before(s.data.comment_list),K(s,t&&2!==n),U=!1,r=s.data.loadLastCommentId,ie(s),t&&P(!1)),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(d))}).fail(function(t,n,s){console.log(s),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(d))})}function K(t,a){var o;0==t.data.is_show_load_more?(e("#wpdiscuzHasMoreComments").val(0),e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide()):(o=t.data.last_parent_id,e(".wpd-load-more-submit").attr("data-lastparentid",o),2!==n&&e(".wpdiscuz-comment-pagination").show(),e("#wpdiscuzHasMoreComments").val(1),a&&e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").show()),ie(t)}function P(t){var a=location.href.match(/#comment\-(\d+)/);if(null!==a){var o=a[1];if(e("#comment-"+o).length)setTimeout(function(){e("html, body").animate({scrollTop:e("#comment-"+o).parents("[id^=wpd-comm-]").offset().top-32},1e3),t&&N(o)},500);else{var d=new FormData;d.append("action","wpdGetSingleComment"),d.append("commentId",o),ce(z,!0,d).done(function(a){if("object"==typeof a&&a.success){var d="#comment-"+o;e("#comment-"+a.data.parentCommentID).length?e("#comment-"+a.data.parentCommentID).parents("[id^=wpd-comm-"+a.data.parentCommentID+"]").replaceWith(a.data.message):e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e(d).offset().top-32},1e3),t&&N(o)}e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}}function N(t){setTimeout(function(){e("#comment-"+t).siblings(".wpd-secondary-form-wrapper").is(":visible")||e("#comment-"+t).find(".wpd-reply-button").trigger("click")},1100)}function Q(e){if(void 0!==e.data.message)for(var t,a=e.data.message,o=0;o<a.length;o++)$((t=a[o]).comment_parent,t.comment_html)}function V(e,t){var a="";return(a=t?e.parents(".wpd-main-form-wrapper").attr("id"):e.parents(".wpd-comment").attr("id")).substring(a.lastIndexOf("-")+1)}function B(e){return e.substring(0,e.indexOf("_"))}function G(e,t){return t?e.substring(e.indexOf("-")+1):e.substring(0,e.indexOf("-"))}function $(t,a){if(0==t)X(a);else{var o=V(e("#comment-"+t),0);e("#wpdiscuz_form_anchor-"+o).after(a)}}function Y(){var t,a,o="";return e(".wpd-comment-right").each(function(){t=V(e(this),0),a=B(t),o+=a+","}),o}function J(t,a){var o=t.find(".wpd-required-group");wpdiscuzLoadRichEditor&&t.find(".wc_comment").val(e(a+">.ql-editor").html()),function(e){var t=e.find(".wc_comment"),a=t.val().trim().replace(/<p><br><\/p>/g,"\n").replace(/<p>(.*?)<\/p>/g,"$1\n");a=(a=(a=(a=a.replace(/<img src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g," $3 ")).replace(/<img[^>]+alt=["|']([^"|']+)["|'][^>]+src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'][^>]?>/g," $1 ")).replace(/<img\s+([^>]*)class=["|']wpdem\-sticker["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g," $3 ")).replace(/<img\s+([^>]*)src=["|']([^"|']+)["|'](.*?)[^>]*>/g," $2 "),t.val(a)}(t),e.each(o,function(){e("input",this).removeAttr("required"),0===e("input:checked",this).length?e("input",e(this)).attr("required","required"):e(".wpd-field-invalid",this).remove()})}function X(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function Z(t){t?t.prop("required")||(t.val()?t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none")):e.each(e(".wc_email"),function(t,a){var o=e(a);o.prop("required")||(o.val()?o.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):o.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none"))})}if(2!==n||wpdiscuzAjaxObj.wordpressIsPaginate||(e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide(),H(),e(window).scroll(function(){H()})),wpdiscuzAjaxObj.setLoadMoreVisibility=K,e(document).delegate(".wpd-vote-up.wpd_not_clicked, .wpd-vote-down.wpd_not_clicked","click",function(){var t=e(this);e(t).removeClass("wpd_not_clicked");var a,o=B(V(t));a=e(this).hasClass("wpd-vote-up")?1:-1;var d=new FormData;d.append("action","wpdVoteOnComment"),d.append("commentId",o),d.append("voteType",a),ce(z,!0,d).done(function(d){if(e(t).addClass("wpd_not_clicked"),"object"==typeof d){if(d.success){if("total"===d.data.buttonsStyle){var n=e(".wpd-comment-footer .wpd-vote-result",e("#comment-"+o)),s=d.data.votes;n.text(s),n.removeClass("wpd-up wpd-down"),s>0&&n.addClass("wpd-up"),s<0&&n.addClass("wpd-down")}else{var i=e(".wpd-comment-footer .wpd-vote-result-like",e("#comment-"+o)),c=e(".wpd-comment-footer .wpd-vote-result-dislike",e("#comment-"+o));i.text(d.data.likeCount),c.text(d.data.dislikeCount),parseInt(d.data.likeCount)>0?i.addClass("wpd-up"):i.removeClass("wpd-up"),parseInt(d.data.dislikeCount)<0?c.addClass("wpd-down"):c.removeClass("wpd-down")}var p=e(".wpd-comment-footer .wpd-vote-up",e("#comment-"+o)),r=e(".wpd-comment-footer .wpd-vote-down",e("#comment-"+o));p.removeClass("wpd-up"),r.removeClass("wpd-down"),d.data.curUserReaction>0?p.addClass("wpd-up"):d.data.curUserReaction<0&&r.addClass("wpd-down")}else d.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[d.data],"error");ie(d,o,a)}else console.log(d);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(a,o,d){console.log(d),e(t).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate("body","click",function(t){var a=e(".wpdiscuz-sort-buttons");e(t.target).hasClass("wpdf-sorting")||e(t.target).parent().hasClass("wpdf-sorting")?a.css({display:a.is(":visible")?"none":"flex"}):a.hide()}),e(document).delegate(".wpdiscuz-sort-button:not(.wpdiscuz-sort-button-active)","click",function(){var t=e(this),a=e(this).attr("data-sorting");if(a){e(".wpdiscuz-sort-button.wpdiscuz-sort-button-active").removeClass("wpdiscuz-sort-button-active").appendTo(".wpdiscuz-sort-buttons"),t.addClass("wpdiscuz-sort-button-active").prependTo(".wpdf-sorting");var o=new FormData;o.append("action","wpdSorting"),o.append("sorting",a);var d=e(".wpdf-active").attr("data-filter-type");o.append("wpdType",d||""),ce(z,!0,o).done(function(t){"object"==typeof t&&t.success&&(e("#wpdcom .wpd-comment").remove(),e("#wpdcom .wpd-thread-list").prepend(t.data.message),K(t,!1),M=1),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),window.onhashchange=function(){P(!1)},1!=m&&P(!1),e(document).delegate(".wpdiscuz-readmore","click",function(){var t=V(e(this)),a=B(t),o=new FormData;o.append("action","wpdReadMore"),o.append("commentId",a),ce(z,!0,o).done(function(o){"object"==typeof o?(o.success?(e("#comment-"+a+" .wpd-comment-text").replaceWith(" "+o.data.message),e("#wpdiscuz-readmore-"+t).remove()):console.log(o.data),ie(o)):console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-required-group","change",function(){0!==e("input:checked",this).length?e("input",e(this)).removeAttr("required"):e("input",e(this)).attr("required","required")}),e(document).delegate(".wpdiscuz-spoiler","click",function(){e(this).next().slideToggle(),e(this).hasClass("wpdiscuz-spoiler-closed")?e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-plus").removeClass("fa-plus").addClass("fa-minus"):e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-minus").removeClass("fa-minus").addClass("fa-plus"),e(this).toggleClass("wpdiscuz-spoiler-closed")}),e(document).delegate(".wpd-tools i","click",function(){var t=e(this).siblings(".wpd-tools-actions");t.css({display:t.is(":visible")?"none":"flex"})}),e(document).delegate(".wpd-comment-right","mouseleave",function(){e(this).find(".wpd-tools-actions").hide()}),e(document).delegate(".wpd_stick_btn","click",function(){var t=B(V(e(this),0)),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",t),ce(z,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd_close_btn","click",function(){var t=B(V(e(this),0)),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",t),ce(z,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-filter.wpd_not_clicked[data-filter-type]","click",function(){var t=e(this),a=t.attr("data-filter-type");wpdiscuzAjaxObj.resetActiveFilters(".wpdf-"+a),t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=new FormData;o.append("action","wpdLoadMoreComments");var d=e(".wpdiscuz-sort-button-active").attr("data-sorting");d&&o.append("sorting",d),o.append("lastParentId",0),o.append("offset",0),M=1,o.append("wpdType",t.hasClass("wpdf-active")?"":a),o.append("isFirstLoad",1),e(this).hasClass("wpdf-inline")?e(this).hasClass("wpdf-active")?e(".wpd-comment-info-bar").hide():e(".wpd-comment-info-bar").css("display","flex"):e(".wpd-comment-info-bar").hide(),ce(z,!1,o).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(t.toggleClass("wpdf-active"),e(".wpd-load-comments").remove(),e(".wpd-comment").remove(),e(".wpd-thread-list").prepend(a.data.comment_list),K(a),r=a.data.loadLastCommentId,e(".wpd-load-more-submit").blur(),ie(a)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpdf-reacted.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdMostReactedComment"),ce(z,!1,a).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(e("#comment-"+a.data.parentCommentID).length?e("#comment-"+a.data.parentCommentID).parents("[id^=wpd-comm-"+a.data.parentCommentID+"]").replaceWith(a.data.message):e("#comment-"+a.data.commentId).length||e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3))}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e(document).delegate(".wpdf-hottest.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdHottestThread"),ce(z,!1,a).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(e("#comment-"+a.data.commentId).length?e("#comment-"+a.data.commentId).parents("[id^=wpd-comm-"+a.data.commentId+"]").replaceWith(a.data.message):e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3))}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e(document).delegate(".wpd-filter-view-all","click",function(){e(".wpdf-inline.wpdf-active.wpd_not_clicked").trigger("click")}),e(document).delegate(".wpd-follow-link.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=B(V(t,0)),o=new FormData;o.append("action","wpdFollowUser"),o.append("commentId",a),ce(z,!0,o).done(function(a){t.addClass("wpd_not_clicked"),"object"==typeof a?a.success?(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data.code],"success"),t.removeClass("wpd-follow-active"),a.data.followTip&&t.attr("wpd-tooltip",a.data.followTip),a.data.followClass&&t.addClass(a.data.followClass)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"):console.log(a),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),Z(),e(document).delegate(".wc_email","keyup",function(){Z(e(this))}),j&&e("#wpdcom").length){if(e("#wpd-bubble-wrapper").hover(function(){e(this).addClass("wpd-bubble-hover")},function(){e(this).removeClass("wpd-bubble-hover")}),k&&!Cookies.get(wpdiscuzAjaxObj.cookieHideBubbleHint)&&setTimeout(function(){e("#wpd-bubble-wrapper").addClass("wpd-bubble-hover"),Cookies.set(wpdiscuzAjaxObj.cookieHideBubbleHint,"1",{expires:7,path:"/"}),setTimeout(function(){e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")},1e3*x)},1e3*k),"content_left"===O)if(e(".entry-content").length){var ee=(te=Math.min(e(".entry-content").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){ee=(te=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var te;ee=(te=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner");else"left_corner"===O?(e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner")):"right_corner"===O&&(e("#wpd-bubble-wrapper").css({right:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-right-corner"));e("#wpd-bubble-wrapper").show(),e("#wpd-bubble-add-message-close").click(function(t){t.preventDefault(),t.stopPropagation(),e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")}),e("#wpd-bubble").click(function(){e("html, body").animate({scrollTop:e("#wpdcom").offset().top-60},1e3,function(){e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover"),wpdiscuzLoadRichEditor?e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0").focus():e("#wc-textarea-0_0").length&&e("#wc-textarea-0_0").focus()})}),e("#wpd-bubble-comment-close").click(function(t){t.preventDefault(),e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")}),e("#wpd-bubble-comment-reply-link a").click(function(){var t=e(this).attr("href");setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),P(!0);var a=t.match(/#comment\-(\d+)/);D=D.filter(function(e){return e!=a[1]}),e("#wpd-bubble-count .wpd-new-comments-count").text(D.length),0==D.length&&e("#wpd-bubble-count").removeClass("wpd-new-comments")},100)}),e("#wpd-bubble-count").click(function(){if(D.length){var t=new FormData;t.append("action","wpdBubbleUpdate"),t.append("newCommentIds",D.join()),ce(z,!0,t).done(function(t){"object"==typeof t&&t.success&&(t.data.message=t.data.message.filter(function(t){if(!e("#comment-"+t.comment_id).length)return t}),Q(t),e("#wpd-bubble-count").removeClass("wpd-new-comments"),e("#wpd-bubble-count .wpd-new-comments-count").text("0"),D=[],e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-60},1e3),ie(t)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(e,t,a){console.log(a)})}})}if((j&&C||i)&&(t||!t&&p)&&setTimeout(function t(){e.ajax({type:"GET",url:wpdiscuzAjaxObj.bubbleUpdateUrl,data:{postId:s,lastId:l,visibleCommentIds:Y()}}).done(function(a){if(!E)if("object"==typeof a){if(a.ids.length){i&&((n=new FormData).append("action","wpdUpdateAutomatically"),n.append("loadLastCommentId",r),n.append("visibleCommentIds",Y()),ce(z,!1,n).done(function(t){E||"object"==typeof t&&t.success&&(Q(t),e(".wpd-thread-info").html(t.data.wc_all_comments_count_new_html),t.data.wc_all_comments_count_new=parseInt(t.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").text(t.data.wc_all_comments_count_new),t.data.wc_all_comments_count_new?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),r=t.data.loadLastCommentId)}).fail(function(e,t,a){console.log(a)})),a.ids=a.ids.filter(function(t){if(!e("#comment-"+t).length)return t});var o=5e3;l=parseInt(a.ids[a.ids.length-1]),D=D.concat(a.ids),y&&a.commentText&&(e("#wpd-bubble-author-avatar").html(a.avatar),e("#wpd-bubble-author-name").html(a.authorName),e("#wpd-bubble-comment-date span").html(a.commentDate),e("#wpd-bubble-comment-text").html(a.commentText),e("#wpd-bubble-comment-reply-link a").attr("href",a.commentLink),e("#wpd-bubble-notification-message").show(),o=1e4);var d=parseInt(e(".wpd-new-comments-count").text());d+=a.ids.length,e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),e("#wpd-bubble-wrapper").addClass("wpd-new-comment-added"),setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")},o),e(".wpd-new-comments-count").text(d),e("#wpd-bubble-count").addClass("wpd-new-comments"),a.all_comments_count=parseInt(a.all_comments_count),e("#wpd-bubble-all-comments-count").text(a.all_comments_count),a.all_comments_count?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),e(".wpd-thread-info").html(a.all_comments_count_html)}}else console.log(a);var n;setTimeout(t,c)}).fail(function(e,a,o){console.log(o),setTimeout(t,c)})},c),e(".wpd-inline-form-wrapper").length){var ae=new FormData;ae.append("action","wpdGetInlineCommentForm"),ce(z,!1,ae).done(function(t){"object"==typeof t?t.success?(e(".wpd-inline-form-wrapper").append(t.data),e.each(e("[name=_wpd_inline_nonce]"),function(){var t=e(this).attr("id"),a=e(this).parents(".wpd-inline-shortcode").attr("id");e(this).attr("id",t+"-"+a.substring(a.lastIndexOf("-")+1))}),e(".wpd-inline-opened").addClass("wpd-active"),e(".wpd-inline-opened").find(".wpd-inline-form-wrapper").show(),e(".wpd-inline-opened").find(".wpd-inline-icon").addClass("wpd-open"),e(".wpd-inline-opened").find(".wpd-inline-icon").removeClass("wpd-ignored"),se()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t)}).fail(function(e,t,a){console.log(a)})}function oe(t){if(e(t).hasClass("wpd-inline-shortcode"))var a=e(t).attr("id");else a=e(t).parents(".wpd-inline-shortcode").attr("id");return a.substring(a.lastIndexOf("-")+1)}function de(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function ne(){e.each(e(".wpd-inline-shortcode:not(.wpd-inline-opened) .wpd-inline-icon"),function(){var t=e(this),a=t.offset().top-window.pageYOffset;a>0&&a<300&&("blink"===A?(t.addClass("wpd-blink"),setTimeout(function(){t.removeClass("wpd-blink")},3e3)):(t.parents(".wpd-inline-shortcode").addClass("wpd-active"),t.siblings(".wpd-inline-form-wrapper").show(),t.addClass("wpd-open"),se(t.siblings(".wpd-inline-form-wrapper"))))})}function se(t){if(t){if(t.offset().left<=10)t.css("left",Math.ceil(parseInt(t.css("left"))-t.offset().left+10)),(a=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2))<3&&(a=3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+a+"px;");else if(t.offset().left+t.width()>document.body.clientWidth-10){var a;t.css("left",Math.ceil(parseInt(t.css("left"))+(document.body.clientWidth-(t.offset().left+t.width()))-10)),(a=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2))>t.width()-3&&(a=t.width()-3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+a+"px;")}}else e.each(e(".wpd-inline-form-wrapper:visible"),function(){if(e(this).offset().left<=10)e(this).css("left",Math.ceil(parseInt(e(this).css("left"))-e(this).offset().left+10)),(t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2))<3&&(t=3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;");else if(e(this).offset().left+e(this).width()>document.body.clientWidth-10){var t;e(this).css("left",Math.ceil(parseInt(e(this).css("left"))+(document.body.clientWidth-(e(this).offset().left+e(this).width()))-10)),(t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2))>e(this).width()-3&&(t=e(this).width()-3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;")}})}function ie(t,a,o,d){t.data.callbackFunctions&&e.each(t.data.callbackFunctions,function(e){"function"==typeof wpdiscuzAjaxObj[t.data.callbackFunctions[e]]?wpdiscuzAjaxObj[t.data.callbackFunctions[e]](t,a,o,d):console.log(t.data.callbackFunctions[e]+" is not a function")})}function ce(t,a,o){a&&e("#wpdiscuz-loading-bar").show(),o.append("postId",s);var d=o.get("action");wpdiscuzAjaxObj.dataFilterCallbacks&&wpdiscuzAjaxObj.dataFilterCallbacks[d]&&e.each(wpdiscuzAjaxObj.dataFilterCallbacks[d],function(e){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[d][e]]&&(o=wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[d][e]](o,t,a))});var n=t?wpdiscuzAjaxObj.url:wpdiscuzAjaxObj.customAjaxUrl;return e.ajax({type:"POST",url:n,data:o,contentType:!1,processData:!1})}e(document).delegate("body","click",function(t){if(e(t.target).hasClass("wpd-inline-form-close")||e(t.target).parents(".wpd-inline-form-close").length)t.preventDefault(),e(t.target).parents(".wpd-inline-form-wrapper").hide(),e(t.target).parents(".wpd-inline-shortcode").removeClass("wpd-active"),e(t.target).parents(".wpd-inline-form-wrapper").siblings(".wpd-inline-icon").removeClass("wpd-open");else if(!e(t.target).hasClass("wpd-inline-form-wrapper")&&!e(t.target).parents(".wpd-inline-form-wrapper").length){de();var a="";e(t.target).hasClass("wpd-inline-icon")?a=e(t.target):e(t.target).parents(".wpd-inline-icon").length&&(a=e(t.target).parents(".wpd-inline-icon")),a.length&&(a.parents(".wpd-inline-shortcode").addClass("wpd-active"),a.siblings(".wpd-inline-form-wrapper").show(),a.addClass("wpd-open"),a.removeClass("wpd-ignored"),se(a.siblings(".wpd-inline-form-wrapper")))}(!e(t.target).hasClass("wpd-last-inline-comments-wrapper")&&!e(t.target).parents(".wpd-last-inline-comments-wrapper").length||e(t.target).parents(".wpd-last-inline-comments-wrapper").length&&e(t.target).hasClass("wpd-load-inline-comment"))&&e(".wpd-last-inline-comments-wrapper").remove()}),e(document).delegate(".wpd-inline-submit.wpd_not_clicked","click",function(t){t.preventDefault();var a=e(this),o=e(this).parents(".wpd_inline_comm_form");if(o[0].checkValidity()){e(this).removeClass("wpd_not_clicked");var d=new FormData;d.append("action","wpdAddInlineComment"),d.append("inline_form_id",oe(o)),e.each(e("input, textarea",o),function(t,a){"checkbox"===this.type?e(this).is(":checked")&&d.append(e(a).attr("name"),e(a).val()):d.append(e(a).attr("name"),e(a).val())}),ce(z,!0,d).done(function(t){if(a.addClass("wpd_not_clicked"),"object"==typeof t)if(t.success){o[0].reset(),de();var d=parseInt(t.data.newCount),n=a.parents(".wpd-inline-icon-wrapper").find(".wpd-inline-icon-count");n.text(d),d?n.addClass("wpd-has-comments"):n.removeClass("wpd-has-comments"),e(".wpd-thread-info").html(t.data.allCommentsCountNewHtml),t.data.allCommentsCountNew=parseInt(t.data.allCommentsCountNew),e("#wpd-bubble-all-comments-count").text(t.data.allCommentsCountNew),t.data.allCommentsCountNew?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),t.data.message&&X(t.data.message),wpdiscuzAjaxObj.setCommentMessage(t.data.notification,"success")}else t.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error");else wpdiscuzAjaxObj.setCommentMessage(t,"error");e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(document).delegate(".wpd-form","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_comm_submit").trigger("click")}),e(document).delegate("#wpdiscuz-edit-form","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_save_edited_comment").trigger("click")}),e(document).delegate(".wpd-inline-comment-content","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).parents(".wpd_inline_comm_form").find(".wpd-inline-submit.wpd_not_clicked").trigger("click")}),e(document).delegate(".wpd-inline-icon-count.wpd-has-comments","click",function(){var t=e(this),a=new FormData;a.append("action","wpdGetLastInlineComments"),a.append("inline_form_id",oe(t)),ce(z,!0,a).done(function(a){"object"==typeof a?a.success?e(a.data).insertAfter(t):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"):console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-view-all-inline-comments","click",function(t){t.preventDefault(),e(this).parents(".wpd-last-inline-comments-wrapper").remove(),e(".wpdf-inline").hasClass("wpdf-active")||e(".wpdf-inline").trigger("click"),e("html, body").animate({scrollTop:e(".wpdf-inline").offset().top-32},1e3)}),e(document).delegate(".wpd-feedback-content-link","click",function(t){t.preventDefault();var a=e(this).data("feedback-content-id");e("html, body").animate({scrollTop:e("#wpd-inline-"+a).offset().top-38},1e3,function(){e("#wpd-inline-"+a).addClass("wpd-active")})}),"scroll_open"!==A&&"blink"!==A||(ne(),e(window).scroll(ne)),e(document).delegate("#wpd-post-rating.wpd-not-rated .wpd-rate-starts svg","click",function(){var t=new FormData,a=e(this).index();a>=0&&a<5&&(t.append("action","wpdUserRate"),t.append("rating",a+1),ce(z,!0,t).done(function(t){"object"==typeof t?t.success?location.reload(!0):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}))}),e("#wpdiscuz-subscribe-form").submit(function(t){t.preventDefault();var a,o,n=e(this);if(n[0].checkValidity()&&(a=n,o=!0,"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).length&&!e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).val().length?(o=!1,e(".wpdiscuz-recaptcha",a).css("border","1px solid red")):"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).length&&e(".wpdiscuz-recaptcha",a).css("border","none"),o)){var s=new FormData;s.append("action","wpdAddSubscription"),e("*",n).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&s.append(this.name+"",e(this).val()),"checkbox"!=this.type&&"radio"!=this.type||e(this).is(":checked")&&s.append(this.name+"",e(this).val())}),ce(z,!0,s).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):wpdiscuzAjaxObj.setCommentMessage(t,"error"),e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(".wpd-unsubscribe").click(function(t){t.preventDefault();var a=new FormData;a.append("action","wpdUnsubscribe"),a.append("sid",e(this).data("sid")),a.append("skey",e(this).data("skey")),ce(z,!0,a).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),wpdiscuzAjaxObj.resetActiveFilters=function(t){e(".wpd-filter.wpdf-active"+(t?":not("+t+")":"")).removeClass("wpdf-active")},wpdiscuzAjaxObj.getAjaxObj=ce});var onloadCallback=function(){if(document.getElementById("wpdiscuz-recaptcha-0_0")&&"2.0"===wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.render("wpdiscuz-recaptcha-0_0",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(e){jQuery("#wpdiscuz-recaptcha-field-0_0").val("key")},"expired-callback":function(){jQuery("#wpdiscuz-recaptcha-field-0_0").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}};
11
  /* Colorbox */
12
  (function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!U){U=$=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("<div/>"),w()}}function p(){x||(V=!1,E=t(i),x=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),L=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),y=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),R=n(se,"Current"),P=t('<button type="button"/>').attr({id:Z+"Previous"}),K=t('<button type="button"/>').attr({id:Z+"Next"}),S=t('<button type="button"/>').attr({id:Z+"Slideshow"}),L),B=t('<button type="button"/>').attr({id:Z+"Close"}),y.append(n(se).append(n(se,"TopLeft"),T=n(se,"TopCenter"),n(se,"TopRight")),n(se,!1,"clear:left").append(C=n(se,"MiddleLeft"),b,H=n(se,"MiddleRight")),n(se,!1,"clear:left").append(n(se,"BottomLeft"),k=n(se,"BottomCenter"),n(se,"BottomRight"))).find("div div").css({"float":"left"}),M=n(se,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=K.add(P).add(R).add(S)),e.body&&!x.parent().length&&t(e.body).append(v,x.append(y,M))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),f(this))}return x?(V||(V=!0,K.click(function(){J.next()}),P.click(function(){J.prev()}),B.click(function(){J.close()}),v.click(function(){_.get("overlayClose")&&J.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;U&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),U&&_.get("arrowKey")&&W[1]&&!t.altKey&&(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),K.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,i):t("."+te).live("click."+Z,i)),!0):!1}function w(){var e,o,r,h=J.prep,d=++le;if($=!0,q=!1,u(he),u(ie),_.get("onLoad"),_.h=_.get("height")?a(_.get("height"),"y")-N-j:_.get("innerHeight")&&a(_.get("innerHeight"),"y"),_.w=_.get("width")?a(_.get("width"),"x")-z-D:_.get("innerWidth")&&a(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=a(_.get("maxWidth"),"x")-z-D,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=a(_.get("maxHeight"),"y")-N-j,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.get("href"),Q=setTimeout(function(){L.show()},100),_.get("inline")){var c=t(e).eq(0);r=t("<div>").hide().insertBefore(c),ae.one(he,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),q=_.get("createImg"),t(q).addClass(Z+"Photo").bind("error."+Z,function(){h(n(se,"Error").html(_.get("imgError")))}).one("load",function(){d===le&&setTimeout(function(){var e;_.get("retinaImage")&&i.devicePixelRatio>1&&(q.height=q.height/i.devicePixelRatio,q.width=q.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){q.height-=q.height*e,q.width-=q.width*e},_.mw&&q.width>_.mw&&(e=(q.width-_.mw)/q.width,o()),_.mh&&q.height>_.mh&&(e=(q.height-_.mh)/q.height,o())),_.h&&(q.style.marginTop=Math.max(_.mh-q.height,0)/2+"px"),W[1]&&(_.get("loop")||W[A+1])&&(q.style.cursor="pointer",t(q).bind("click."+Z,function(){J.next()})),q.style.width=q.width+"px",q.style.height=q.height+"px",h(q)},1)}),q.src=e):e&&M.load(e,_.get("data"),function(e,i){d===le&&h("error"===i?n(se,"Error").html(_.get("xhrError")):t(this).contents())})}var v,x,y,b,T,C,H,k,W,E,I,M,L,F,R,S,K,P,B,O,_,j,D,N,z,A,q,U,$,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),n=t(this).data("cbox-iframe-attrs");return"object"==typeof n&&t.each(n,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",ne=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",ae=t("<a/>"),se="div",le=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){S.html(_.get("slideshowStop")).unbind(s).one(s,n),ae.bind(ne,e).bind(ie,t),x.removeClass(a+"off").addClass(a+"on")}function n(){t(),ae.unbind(ne,e).unbind(ie,t),S.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),x.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,S.hide(),t(),ae.unbind(ne,e).unbind(ie,t),x.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(ae.unbind(oe,o),o()):_.get("slideshow")&&W[1]&&(r=!0,ae.one(oe,o),_.get("slideshowAuto")?i():n(),S.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;return e=e||{},t.isFunction(o)&&(o=t("<a/>"),e.open=!0),o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(te),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(x[0].style.width,10)-D+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(x[0].style.height,10)-j+"px"}var r,h,s,l=0,d=0,c=x.offset();if(E.unbind("resize."+Z),x.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,x.css({position:"fixed"})):(l=h,d=s,x.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-z-D-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-z-D,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-N-j-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-N-j,0)/2),x.css({top:c.top,left:c.left,visibility:"visible"}),y[0].style.width=y[0].style.height="9999px",r={width:_.w+z+D,height:_.h+N+j,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==de[t]?(g=e,void 0):void 0}),e=g}de=r,e||x.css(r),x.dequeue().animate(r,{duration:e||0,complete:function(){n(),$=!1,y[0].style.width=_.w+z+D+"px",y[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;U&&(t=t||{},t.width&&(_.w=a(t.width,"x")-z-D),t.innerWidth&&(_.w=a(t.innerWidth,"x")),I.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-N-j),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=I.scrollTop(),I.css({height:"auto"}),_.h=I.height()),I.css({height:_.h}),e&&I.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||I.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||I.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if(U){var d,g="none"===_.get("transition")?0:_.get("speed");I.remove(),I=n(se,"LoadedContent").append(i),I.hide().appendTo(M.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),M.hide(),t(q).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&x[0].style.removeAttribute("filter")}var n,o,a=W.length;U&&(o=function(){clearTimeout(Q),L.hide(),u(ne),_.get("onComplete")},F.html(_.get("title")).show(),I.show(),a>1?("string"==typeof _.get("current")&&R.html(_.get("current").replace("{current}",A+1).replace("{total}",a)).show(),K[_.get("loop")||a-1>A?"show":"hide"]().html(_.get("next")),P[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ce(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=_.get("createIframe"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(I),ae.one(he,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?x.fadeTo(g,1,i):i())},"fade"===_.get("transition")?x.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!$&&W[1]&&(_.get("loop")||W[A+1])&&(A=h(1),f(W[A]))},J.prev=function(){!$&&W[1]&&(_.get("loop")||A)&&(A=h(-1),f(W[A]))},J.close=function(){U&&!G&&(G=!0,U=!1,u(oe),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),x.stop().fadeTo(_.get("fadeOut")||0,0,function(){x.hide(),v.hide(),u(he),I.remove(),setTimeout(function(){G=!1,u(re),_.get("onClosed")},1)}))},J.remove=function(){x&&(x.stop(),t[Y].close(),x.stop(!1,!0).remove(),v.remove(),G=!1,x=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)})(jQuery,document,window);
13
  /* Media Uploader */
15
  /* Lity */
16
  !function(e,t){"function"==typeof define&&define.amd?define(["jquery"],function(n){return t(e,n)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(e,require("jquery")):e.lity=t(e,e.jQuery||e.Zepto)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=e.document,i=t(e),r=t.Deferred,o=t("html"),a=[],l="aria-hidden",s="lity-"+l,d='a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not([tabindex^="-"])',c={esc:!0,handler:null,handlers:{image:C,inline:function(e,n){var i,r,o;try{i=t(e)}catch(e){return!1}if(!i.length)return!1;return r=t('<i style="display:none !important"/>'),o=i.hasClass("lity-hide"),n.element().one("lity:remove",function(){r.before(i).remove(),o&&!i.closest(".lity-content").length&&i.addClass("lity-hide")}),i.removeClass("lity-hide").after(r)},youtube:function(e){var n=f.exec(e);if(!n)return!1;return k(x(e,w("https://www.youtube"+(n[2]||"")+".com/embed/"+n[4],t.extend({autoplay:1},b(n[5]||"")))))},vimeo:function(e){var n=y.exec(e);if(!n)return!1;return k(x(e,w("https://player.vimeo.com/video/"+n[3],t.extend({autoplay:1},b(n[4]||"")))))},googlemaps:function(e){var t=v.exec(e);if(!t)return!1;return k(x(e,w("https://www.google."+t[3]+"/maps?"+t[6],{output:t[6].indexOf("layer=c")>0?"svembed":"embed"})))},facebookvideo:function(e){var n=p.exec(e);if(!n)return!1;0!==e.indexOf("http")&&(e="https:"+e);return k(x(e,w("https://www.facebook.com/plugins/video.php?href="+e,t.extend({autoplay:1},b(n[4]||"")))))},iframe:k},template:'<div class="lity" role="dialog" aria-label="Dialog Window (Press escape to close)" tabindex="-1"><div class="lity-wrap" data-lity-close role="document"><div class="lity-loader" aria-hidden="true">Loading...</div><div class="lity-container"><div class="lity-content"></div><button class="lity-close" type="button" aria-label="Close (Press escape to close)" data-lity-close>&times;</button></div></div></div>'},u=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i,f=/(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i,y=/(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/,v=/((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i,p=/(facebook\.com)\/([a-z0-9_-]*)\/videos\/([0-9]*)(.*)?$/i,m=function(){var e=n.createElement("div"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in t)if(void 0!==e.style[i])return t[i];return!1}();function h(e){var t=r();return m&&e.length?(e.one(m,t.resolve),setTimeout(t.resolve,500)):t.resolve(),t.promise()}function g(e,n,i){if(1===arguments.length)return t.extend({},e);if("string"==typeof n){if(void 0===i)return void 0===e[n]?null:e[n];e[n]=i}else t.extend(e,n);return this}function b(e){for(var t,n=decodeURI(e.split("#")[0]).split("&"),i={},r=0,o=n.length;r<o;r++)n[r]&&(i[(t=n[r].split("="))[0]]=t[1]);return i}function w(e,n){return e+(e.indexOf("?")>-1?"&":"?")+t.param(n)}function x(e,t){var n=e.indexOf("#");return-1===n?t:(n>0&&(e=e.substr(n)),t+e)}function C(e,n){var i=n.opener()&&n.opener().data("lity-desc")||"Image with no description",o=t('<img src="'+e+'" alt="'+i+'"/>'),a=r(),l=function(){var e;a.reject((e="Failed loading image",t('<span class="lity-error"/>').append(e)))};return o.on("load",function(){if(0===this.naturalWidth)return l();a.resolve(o)}).on("error",l),a.promise()}function k(e){return'<div class="lity-iframe-container"><iframe frameborder="0" allowfullscreen src="'+e+'"/></div>'}function E(){return n.documentElement.clientHeight?.9*n.documentElement.clientHeight:Math.round(.9*i.height())}function j(e){var t,i,r,o=z();o&&(27===e.keyCode&&o.options("esc")&&o.close(),9===e.keyCode&&(t=e,i=o.element().find(d),r=i.index(n.activeElement),t.shiftKey&&r<=0?(i.get(i.length-1).focus(),t.preventDefault()):t.shiftKey||r!==i.length-1||(i.get(0).focus(),t.preventDefault())))}function D(){t.each(a,function(e,t){t.resize()})}function z(){return 0===a.length?null:a[0]}function T(e,d,u,f){var y,v,p,m,b,w,x,C,k,z,T,O=this,q=!1,W=!1;d=t.extend({},c,d),v=t(d.template),O.element=function(){return v},O.opener=function(){return u},O.options=t.proxy(g,O,d),O.handlers=t.proxy(g,O,d.handlers),O.resize=function(){q&&!W&&p.css("max-height",E()+"px").trigger("lity:resize",[O])},O.close=function(){if(q&&!W){var e;W=!0,(e=O).element().attr(l,"true"),1===a.length&&(o.removeClass("lity-active"),i.off({resize:D,keydown:j})),((a=t.grep(a,function(t){return e!==t})).length?a[0].element():t(".lity-hidden")).removeClass("lity-hidden").each(function(){var e=t(this),n=e.data(s);n?e.attr(l,n):e.removeAttr(l),e.removeData(s)});var d=r();if(f&&(n.activeElement===v[0]||t.contains(v[0],n.activeElement)))try{f.focus()}catch(e){}return p.trigger("lity:close",[O]),v.removeClass("lity-opened").addClass("lity-closed"),h(p.add(v)).always(function(){p.trigger("lity:remove",[O]),v.remove(),v=void 0,d.resolve()}),d.promise()}},m=e,b=O,w=d.handlers,x=d.handler,k="inline",z=t.extend({},w),x&&z[x]?(C=z[x](m,b),k=x):(t.each(["inline","iframe"],function(e,t){delete z[t],z[t]=w[t]}),t.each(z,function(e,t){return!t||!(!t.test||t.test(m,b))||(!1!==(C=t(m,b))?(k=e,!1):void 0)})),y={handler:k,content:C||""},v.attr(l,"false").addClass("lity-loading lity-opened lity-"+y.handler).appendTo("body").focus().on("click","[data-lity-close]",function(e){t(e.target).is("[data-lity-close]")&&O.close()}).trigger("lity:open",[O]),T=O,1===a.unshift(T)&&(o.addClass("lity-active"),i.on({resize:D,keydown:j})),t("body > *").not(T.element()).addClass("lity-hidden").each(function(){var e=t(this);void 0===e.data(s)&&e.data(s,e.attr(l)||null)}).attr(l,"true"),t.when(y.content).always(function(e){p=t(e).css("max-height",E()+"px"),v.find(".lity-loader").each(function(){var e=t(this);h(e).always(function(){e.remove()})}),v.removeClass("lity-loading").find(".lity-content").empty().append(p),q=!0,p.trigger("lity:ready",[O])})}function O(e,i,r){e.preventDefault?(e.preventDefault(),e=(r=t(this)).data("lity-target")||r.attr("rel")||r.attr("src")):r=t(r);var o=new T(e,t.extend({},r.data("lity-options")||r.data("lity"),i),r,n.activeElement);if(!e.preventDefault)return o}return C.test=function(e){return u.test(e)},O.version="2.2.2",O.options=t.proxy(g,O,c),O.handlers=t.proxy(g,O,c.handlers),O.current=z,t(n).on("click.lity","[data-wpd-lity]",O),O});
17
  /* My Content and Settings */
18
+ jQuery(document).ready(function(e){var t=0,d=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),n=parseInt(wpdiscuzUCObj.additionalTab);e(document).delegate(".wpd-info,.wpd-page-link,.wpd-delete-content,.wpd-user-email-delete-links","click",function(e){e.preventDefault()}),e(document).delegate(".wpd-info.wpd-not-clicked","click",function(t){var a=e(this);a.removeClass("wpd-not-clicked");var i=new FormData;return i.append("action","wpdGetInfo"),function(t,a){var i=e(".fas",t),o=i.attr("class");i.removeClass(),i.addClass("fas fa-pulse fa-spinner"),wpdiscuzAjaxObj.getAjaxObj(d||n,!1,a).done(function(d){t.addClass("wpd-not-clicked"),i.removeClass(),i.addClass(o),d&&(e("#wpdUserContentInfo").html(d),e("#wpdUserContentInfo ul.wpd-list .wpd-list-item:first-child").addClass("wpd-active"),e("#wpdUserContentInfo div.wpd-content .wpd-content-item:first-child").addClass("wpd-active"),e("#wpdUserContentInfo").is(":visible")||e("#wpdUserContentInfoAnchor").trigger("click"))})}(a,i),!1}),e(document).delegate(".wpd-list-item","click",function(){var t=e("input.wpd-rel",this).val();e("#wpdUserContentInfo .wpd-list-item").removeClass("wpd-active"),e("#wpdUserContentInfo .wpd-content-item").removeClass("wpd-active");var a=e(this);if(e("#wpdUserContentInfo #"+t).text().length)a.addClass("wpd-active"),e("#wpdUserContentInfo #"+t).addClass("wpd-active");else{var i=new FormData;i.append("action",a.attr("data-action")),i.append("page",0),e("#wpdUserContentInfo #"+t).addClass("wpd-active"),e("#wpdUserContentInfo #"+t).css("text-align","center"),wpdiscuzAjaxObj.getAjaxObj(d||n,!0,i).done(function(d){d&&(e("#wpdUserContentInfo #"+t).css("text-align",""),a.addClass("wpd-active"),e("#wpdUserContentInfo #"+t).html(d)),e("#wpdiscuz-loading-bar").hide()})}}),e(document).delegate(".wpd-page-link.wpd-not-clicked","click",function(t){var a=e(this);a.removeClass("wpd-not-clicked");var i=a.data("wpd-page"),o=e(".wpd-active .wpd-pagination .wpd-action").val(),s=new FormData;s.append("action",o),s.append("page",i),wpdiscuzAjaxObj.getAjaxObj(d||n,!0,s).done(function(t){a.addClass("wpd-not-clicked"),t&&e(".wpd-content-item.wpd-active").html(t),e("#wpdiscuz-loading-bar").hide()})}),e(document).delegate(".wpd-delete-content.wpd-not-clicked","click",function(){var a=e(this),i=parseInt(a.data("wpd-content-id"));if(!isNaN(i)){var o=a.data("wpd-delete-action");if("wpdDeleteComment"==o&&!confirm(wpdiscuzUCObj.msgConfirmDeleteComment))return!1;if("wpdCancelSubscription"==o&&!confirm(wpdiscuzUCObj.msgConfirmCancelSubscription))return!1;if("wpdCancelFollow"==o&&!confirm(wpdiscuzUCObj.msgConfirmCancelFollow))return!1;var s=e("i",a),c=s.attr("class"),l=e(".wpd-wrapper .wpd-page-number").val(),p=e(".wpd-content-item.wpd-active").children(".wpd-item").length;a.removeClass("wpd-not-clicked"),s.removeClass().addClass("fas fa-pulse fa-spinner"),1==p&&l>0&&(l-=1);var w=new FormData;w.append("id",i),w.append("page",l),w.append("action",o),wpdiscuzAjaxObj.getAjaxObj(d||n,!1,w).done(function(d){a.addClass("wpd-not-clicked"),s.removeClass().addClass(c),e(".wpd-content-item.wpd-active").html(d),t=1})}}),e(document).delegate("[data-lity-close]","click",function(d){e(d.target).is("[data-lity-close]")&&t&&window.location.reload(!0)}),e(document).delegate(".wpd-user-email-delete-links.wpd-not-clicked","click",function(){var t=e(this);t.removeClass("wpd-not-clicked"),e(".wpd-loading",t).addClass("wpd-show");var a=new FormData;a.append("action","wpdEmailDeleteLinks"),wpdiscuzAjaxObj.getAjaxObj(d||n,!1,a).done(function(d){t.addClass("wpd-not-clicked"),e("[data-lity-close]",window.parent.document).trigger("click")})}),e(document).delegate(".wpd-user-settings-button.wpd-not-clicked","click",function(){var t=e(this);t.removeClass("wpd-not-clicked");var a=t.data("wpd-delete-action");if(console.log(a),"deleteCookies"!==a){t.find(".wpd-loading").addClass("wpd-show");var i=new FormData;i.append("action","wpdGuestAction"),i.append("guestAction",a),wpdiscuzAjaxObj.getAjaxObj(d||n,!1,i).done(function(d){t.addClass("wpd-not-clicked"),t.find(".wpd-loading").removeClass("wpd-show");try{var n=e.parseJSON(d);t.after(n.message);var a=t.next(".wpd-guest-action-message");a.fadeIn(100).fadeOut(7e3,function(){a.remove(),1===parseInt(n.code)&&(t.parent().remove(),e(".wpd-delete-all-comments").length||e(".wpd-delete-all-subscriptions").length||e(".wpd-delete-all-cookies").parent().addClass("wpd-show"))})}catch(e){console.log(e)}})}else!function(){for(var e=document.cookie.split(";"),t=0;t<e.length;t++){var d=e[t],n=d.indexOf("="),a=n>-1?d.substr(0,n):d;Cookies.remove(a.trim())}location.reload(!0)}()})});
19
  /* Social */
20
+ function wpcShareCommentFB(e,s){FB.ui({method:"share",href:e,quote:s},function(e){})}(wpdiscuzAjaxObj.enableFbLogin||wpdiscuzAjaxObj.enableFbShare)&&wpdiscuzAjaxObj.facebookAppID&&(!function(e,s,n){var o,a=e.getElementsByTagName(s)[0];e.getElementById(n)||((o=e.createElement(s)).id=n,o.src="//connect.facebook.net/en_US/sdk.js",a.parentNode.insertBefore(o,a))}(document,"script","facebook-jssdk"),window.fbAsyncInit=function(){FB.init({appId:wpdiscuzAjaxObj.facebookAppID,cookie:!0,xfbml:!0,version:"v7.0"})}),jQuery(document).ready(function(e){var s;(s=Cookies.get("wpdiscuz_social_login_message"))&&"undefined"!==s&&(Cookies.remove("wpdiscuz_social_login_message"),wpdiscuzAjaxObj.setCommentMessage(decodeURIComponent(s.replace(/\+/g,"%20")),"error")),Cookies.get("wpdiscuz_scroll_to_comments")&&(Cookies.remove("wpdiscuz_scroll_to_comments",{path:"/"}),e("html, body").animate({scrollTop:e("#comments").offset().top-32},1e3)),e(document).delegate(".wpd-comment-share .fa-facebook-f","click",function(){if(1==wpdiscuzAjaxObj.enableFbShare){var s=e(this).parents(".wpd-comment").find(".wpd-comment-right").attr("id"),n=window.location.href;-1!==n.indexOf("#")&&(n=n.substring(0,n.indexOf("#"))),wpcShareCommentFB(n+="#"+s,e(this).parents(".wpd-comment-right").find(".wpd-comment-text").text())}});var n="";function o(e,s){var n,o="";t(s,1),Cookies.set("wpdiscuz_scroll_to_comments",1,{path:"/"}),"facebook"===e&&0==wpdiscuzAjaxObj.facebookUseOAuth2?FB.getLoginStatus(function(t){"connected"===t.status?(n=t.authResponse.accessToken,o=t.authResponse.userID,a(e,n,o,s)):FB.login(function(t){"connected"===t.status&&(n=t.authResponse.accessToken,o=t.authResponse.userID,a(e,n,o,s))},{scope:"public_profile,email"})}):a(e,n,o,s)}function a(s,n,o,a){return e.ajax({type:"POST",url:wpdiscuzAjaxObj.url,data:{action:"wpd_social_login",provider:s,token:n,userID:o,postID:wpdiscuzAjaxObj.wc_post_id}}).done(function(s){!function(s,n){try{var o=e.parseJSON(s),a=o.code,i=o.message,c=o.url;200===parseInt(a)?location.assign(c):wpdiscuzAjaxObj.setCommentMessage(i,"error")}catch(e){console.log(e)}t(n,0)}(s,a)}),""}function t(e,s){1===s?e.find(".wpdiscuz-social-login-spinner").show():e.find(".wpdiscuz-social-login-spinner").hide()}e(document).delegate("#wpdcom .wpd-social-login .wpdiscuz-login-button","click",function(){var s=e(this).parents(".wpd-social-login");!function(e,s){1!=parseInt(wpdiscuzAjaxObj.socialLoginAgreementCheckbox)||1==Cookies.get("socialLoginAgreementConfirmed")?o(e,s):s.parents(".wpd-form-wrap, .wpd-form").find(".wpd-social-login-agreement").first().slideDown(700)}(n=function(e){var s="";e.hasClass("wpdsn-fb")&&(s="facebook");e.hasClass("wpdsn-insta")&&(s="instagram");e.hasClass("wpdsn-gg")&&(s="google");e.hasClass("wpdsn-ds")&&(s="disqus");e.hasClass("wpdsn-wp")&&(s="wordpress");e.hasClass("wpdsn-tw")&&(s="twitter");e.hasClass("wpdsn-vk")&&(s="vk");e.hasClass("wpdsn-ok")&&(s="ok");e.hasClass("wpdsn-linked")&&(s="linkedin");e.hasClass("wpdsn-yandex")&&(s="yandex");e.hasClass("wpdsn-mailru")&&(s="mailru");e.hasClass("wpdsn-weixin")&&(s="wechat");e.hasClass("wpdsn-weibo")&&(s="weibo");e.hasClass("wpdsn-qq")&&(s="qq");e.hasClass("wpdsn-baidu")&&(s="baidu");return s}(e(this)),s)}),e(document).delegate("#wpdcom .wpd-agreement-buttons-right .wpd-agreement-button","click",function(){var s=e(this).parents(".wpd-form-wrap, .wpd-form").find(".wpd-social-login-agreement").slideUp(700);e(this).hasClass("wpd-agreement-button-agree")&&(wpdiscuzAjaxObj.isCookiesEnabled&&Cookies.set("socialLoginAgreementConfirmed",1,{expires:30,path:"/"}),o(n,s))})});
assets/js/wpdiscuz-options.js CHANGED
@@ -139,13 +139,13 @@ jQuery(document).ready(function ($) {
139
 
140
 
141
  if (resp.progress <= 3) {
142
- $('.import-progress').text(3 + '%');
143
  } else {
144
  if (resp.progress < 100) {
145
- $('.import-progress').text(resp.progress + '%');
146
  } else {
147
- $('.import-progress').css({'color': '#10b493'});
148
- $('.import-progress').text(resp.progress + '% Done');
149
  $('.stcr-step').val(0);
150
  doingAjax = false;
151
  }
@@ -159,26 +159,26 @@ jQuery(document).ready(function ($) {
159
  });
160
  }
161
 
162
- $(document).delegate('.import-cir', 'click', function (e) {
163
  e.preventDefault();
164
  var btn = $(this);
165
  btn.attr('disabled', 'disabled');
166
  $('.fas', btn).addClass('fa-pulse fa-spinner').removeClass('wc-hidden');
167
- importCIR(btn);
168
  });
169
- function importCIR(btn) {
170
  doingAjax = true;
171
  var data = btn.parents('.wc-form').serialize();
172
  $.ajax({
173
  type: 'POST',
174
  url: ajaxurl,
175
- data: {cirData: data, 'action': 'wpdImportCIR'}
176
  }).done(function (response) {
177
  try {
178
  var resp = JSON.parse(response);
179
- $('.cir-step').val(resp.step);
180
  if (resp.progress < 100) {
181
- importCIR(btn);
182
  } else {
183
  btn.removeAttr('disabled');
184
  $('.fas', btn).removeClass('fa-pulse fa-spinner').addClass('wc-hidden');
@@ -186,14 +186,14 @@ jQuery(document).ready(function ($) {
186
 
187
 
188
  if (resp.progress <= 3) {
189
- $('.import-progress').text(3 + '%');
190
  } else {
191
  if (resp.progress < 100) {
192
- $('.import-progress').text(resp.progress + '%');
193
  } else {
194
- $('.import-progress').css({'color': '#10b493'});
195
- $('.import-progress').text(resp.progress + '% Done');
196
- $('.cir-step').val(0);
197
  doingAjax = false;
198
  }
199
  }
139
 
140
 
141
  if (resp.progress <= 3) {
142
+ $('.stcr-import-progress').text(3 + '%');
143
  } else {
144
  if (resp.progress < 100) {
145
+ $('.stcr-import-progress').text(resp.progress + '%');
146
  } else {
147
+ $('.stcr-import-progress').css({'color': '#10b493'});
148
+ $('.stcr-import-progress').text(resp.progress + '% Done');
149
  $('.stcr-step').val(0);
150
  doingAjax = false;
151
  }
159
  });
160
  }
161
 
162
+ $(document).delegate('.import-lstc', 'click', function (e) {
163
  e.preventDefault();
164
  var btn = $(this);
165
  btn.attr('disabled', 'disabled');
166
  $('.fas', btn).addClass('fa-pulse fa-spinner').removeClass('wc-hidden');
167
+ importLSTC(btn);
168
  });
169
+ function importLSTC(btn) {
170
  doingAjax = true;
171
  var data = btn.parents('.wc-form').serialize();
172
  $.ajax({
173
  type: 'POST',
174
  url: ajaxurl,
175
+ data: {lstcData: data, 'action': 'wpdImportLSTC'}
176
  }).done(function (response) {
177
  try {
178
  var resp = JSON.parse(response);
179
+ $('.lstc-step').val(resp.step);
180
  if (resp.progress < 100) {
181
+ importLSTC(btn);
182
  } else {
183
  btn.removeAttr('disabled');
184
  $('.fas', btn).removeClass('fa-pulse fa-spinner').addClass('wc-hidden');
186
 
187
 
188
  if (resp.progress <= 3) {
189
+ $('.lstc-import-progress').text(3 + '%');
190
  } else {
191
  if (resp.progress < 100) {
192
+ $('.lstc-import-progress').text(resp.progress + '%');
193
  } else {
194
+ $('.lstc-import-progress').css({'color': '#10b493'});
195
+ $('.lstc-import-progress').text(resp.progress + '% Done');
196
+ $('.lstc-step').val(0);
197
  doingAjax = false;
198
  }
199
  }
assets/js/wpdiscuz-social.js CHANGED
@@ -17,7 +17,7 @@ if ((wpdiscuzAjaxObj.enableFbLogin || wpdiscuzAjaxObj.enableFbShare) && wpdiscuz
17
  appId: wpdiscuzAjaxObj.facebookAppID,
18
  cookie: true,
19
  xfbml: true,
20
- version: 'v2.8'
21
  });
22
  };
23
  }
17
  appId: wpdiscuzAjaxObj.facebookAppID,
18
  cookie: true,
19
  xfbml: true,
20
+ version: 'v7.0'
21
  });
22
  };
23
  }
assets/js/wpdiscuz-social.min.js CHANGED
@@ -1 +1 @@
1
- function wpcShareCommentFB(e,s){FB.ui({method:"share",href:e,quote:s},function(e){})}(wpdiscuzAjaxObj.enableFbLogin||wpdiscuzAjaxObj.enableFbShare)&&wpdiscuzAjaxObj.facebookAppID&&(!function(e,s,n){var o,a=e.getElementsByTagName(s)[0];e.getElementById(n)||((o=e.createElement(s)).id=n,o.src="//connect.facebook.net/en_US/sdk.js",a.parentNode.insertBefore(o,a))}(document,"script","facebook-jssdk"),window.fbAsyncInit=function(){FB.init({appId:wpdiscuzAjaxObj.facebookAppID,cookie:!0,xfbml:!0,version:"v2.8"})}),jQuery(document).ready(function(e){var s;(s=Cookies.get("wpdiscuz_social_login_message"))&&"undefined"!==s&&(Cookies.remove("wpdiscuz_social_login_message"),wpdiscuzAjaxObj.setCommentMessage(decodeURIComponent(s.replace(/\+/g,"%20")),"error")),Cookies.get("wpdiscuz_scroll_to_comments")&&(Cookies.remove("wpdiscuz_scroll_to_comments",{path:"/"}),e("html, body").animate({scrollTop:e("#comments").offset().top-32},1e3)),e(document).delegate(".wpd-comment-share .fa-facebook-f","click",function(){if(1==wpdiscuzAjaxObj.enableFbShare){var s=e(this).parents(".wpd-comment").find(".wpd-comment-right").attr("id"),n=window.location.href;-1!==n.indexOf("#")&&(n=n.substring(0,n.indexOf("#"))),wpcShareCommentFB(n+="#"+s,e(this).parents(".wpd-comment-right").find(".wpd-comment-text").text())}});var n="";function o(e,s){var n,o="";t(s,1),Cookies.set("wpdiscuz_scroll_to_comments",1,{path:"/"}),"facebook"===e&&0==wpdiscuzAjaxObj.facebookUseOAuth2?FB.getLoginStatus(function(t){"connected"===t.status?(n=t.authResponse.accessToken,o=t.authResponse.userID,a(e,n,o,s)):FB.login(function(t){"connected"===t.status&&(n=t.authResponse.accessToken,o=t.authResponse.userID,a(e,n,o,s))},{scope:"public_profile,email"})}):a(e,n,o,s)}function a(s,n,o,a){return e.ajax({type:"POST",url:wpdiscuzAjaxObj.url,data:{action:"wpd_social_login",provider:s,token:n,userID:o,postID:wpdiscuzAjaxObj.wc_post_id}}).done(function(s){!function(s,n){try{var o=e.parseJSON(s),a=o.code,i=o.message,c=o.url;200===parseInt(a)?location.assign(c):wpdiscuzAjaxObj.setCommentMessage(i,"error")}catch(e){console.log(e)}t(n,0)}(s,a)}),""}function t(e,s){1===s?e.find(".wpdiscuz-social-login-spinner").show():e.find(".wpdiscuz-social-login-spinner").hide()}e(document).delegate("#wpdcom .wpd-social-login .wpdiscuz-login-button","click",function(){var s=e(this).parents(".wpd-social-login");!function(e,s){1!=parseInt(wpdiscuzAjaxObj.socialLoginAgreementCheckbox)||1==Cookies.get("socialLoginAgreementConfirmed")?o(e,s):s.parents(".wpd-form-wrap, .wpd-form").find(".wpd-social-login-agreement").first().slideDown(700)}(n=function(e){var s="";e.hasClass("wpdsn-fb")&&(s="facebook");e.hasClass("wpdsn-insta")&&(s="instagram");e.hasClass("wpdsn-gg")&&(s="google");e.hasClass("wpdsn-ds")&&(s="disqus");e.hasClass("wpdsn-wp")&&(s="wordpress");e.hasClass("wpdsn-tw")&&(s="twitter");e.hasClass("wpdsn-vk")&&(s="vk");e.hasClass("wpdsn-ok")&&(s="ok");e.hasClass("wpdsn-linked")&&(s="linkedin");e.hasClass("wpdsn-yandex")&&(s="yandex");e.hasClass("wpdsn-mailru")&&(s="mailru");e.hasClass("wpdsn-weixin")&&(s="wechat");e.hasClass("wpdsn-weibo")&&(s="weibo");e.hasClass("wpdsn-qq")&&(s="qq");e.hasClass("wpdsn-baidu")&&(s="baidu");return s}(e(this)),s)}),e(document).delegate("#wpdcom .wpd-agreement-buttons-right .wpd-agreement-button","click",function(){var s=e(this).parents(".wpd-form-wrap, .wpd-form").find(".wpd-social-login-agreement").slideUp(700);e(this).hasClass("wpd-agreement-button-agree")&&(wpdiscuzAjaxObj.isCookiesEnabled&&Cookies.set("socialLoginAgreementConfirmed",1,{expires:30,path:"/"}),o(n,s))})});
1
+ function wpcShareCommentFB(e,s){FB.ui({method:"share",href:e,quote:s},function(e){})}(wpdiscuzAjaxObj.enableFbLogin||wpdiscuzAjaxObj.enableFbShare)&&wpdiscuzAjaxObj.facebookAppID&&(!function(e,s,n){var o,a=e.getElementsByTagName(s)[0];e.getElementById(n)||((o=e.createElement(s)).id=n,o.src="//connect.facebook.net/en_US/sdk.js",a.parentNode.insertBefore(o,a))}(document,"script","facebook-jssdk"),window.fbAsyncInit=function(){FB.init({appId:wpdiscuzAjaxObj.facebookAppID,cookie:!0,xfbml:!0,version:"v7.0"})}),jQuery(document).ready(function(e){var s;(s=Cookies.get("wpdiscuz_social_login_message"))&&"undefined"!==s&&(Cookies.remove("wpdiscuz_social_login_message"),wpdiscuzAjaxObj.setCommentMessage(decodeURIComponent(s.replace(/\+/g,"%20")),"error")),Cookies.get("wpdiscuz_scroll_to_comments")&&(Cookies.remove("wpdiscuz_scroll_to_comments",{path:"/"}),e("html, body").animate({scrollTop:e("#comments").offset().top-32},1e3)),e(document).delegate(".wpd-comment-share .fa-facebook-f","click",function(){if(1==wpdiscuzAjaxObj.enableFbShare){var s=e(this).parents(".wpd-comment").find(".wpd-comment-right").attr("id"),n=window.location.href;-1!==n.indexOf("#")&&(n=n.substring(0,n.indexOf("#"))),wpcShareCommentFB(n+="#"+s,e(this).parents(".wpd-comment-right").find(".wpd-comment-text").text())}});var n="";function o(e,s){var n,o="";t(s,1),Cookies.set("wpdiscuz_scroll_to_comments",1,{path:"/"}),"facebook"===e&&0==wpdiscuzAjaxObj.facebookUseOAuth2?FB.getLoginStatus(function(t){"connected"===t.status?(n=t.authResponse.accessToken,o=t.authResponse.userID,a(e,n,o,s)):FB.login(function(t){"connected"===t.status&&(n=t.authResponse.accessToken,o=t.authResponse.userID,a(e,n,o,s))},{scope:"public_profile,email"})}):a(e,n,o,s)}function a(s,n,o,a){return e.ajax({type:"POST",url:wpdiscuzAjaxObj.url,data:{action:"wpd_social_login",provider:s,token:n,userID:o,postID:wpdiscuzAjaxObj.wc_post_id}}).done(function(s){!function(s,n){try{var o=e.parseJSON(s),a=o.code,i=o.message,c=o.url;200===parseInt(a)?location.assign(c):wpdiscuzAjaxObj.setCommentMessage(i,"error")}catch(e){console.log(e)}t(n,0)}(s,a)}),""}function t(e,s){1===s?e.find(".wpdiscuz-social-login-spinner").show():e.find(".wpdiscuz-social-login-spinner").hide()}e(document).delegate("#wpdcom .wpd-social-login .wpdiscuz-login-button","click",function(){var s=e(this).parents(".wpd-social-login");!function(e,s){1!=parseInt(wpdiscuzAjaxObj.socialLoginAgreementCheckbox)||1==Cookies.get("socialLoginAgreementConfirmed")?o(e,s):s.parents(".wpd-form-wrap, .wpd-form").find(".wpd-social-login-agreement").first().slideDown(700)}(n=function(e){var s="";e.hasClass("wpdsn-fb")&&(s="facebook");e.hasClass("wpdsn-insta")&&(s="instagram");e.hasClass("wpdsn-gg")&&(s="google");e.hasClass("wpdsn-ds")&&(s="disqus");e.hasClass("wpdsn-wp")&&(s="wordpress");e.hasClass("wpdsn-tw")&&(s="twitter");e.hasClass("wpdsn-vk")&&(s="vk");e.hasClass("wpdsn-ok")&&(s="ok");e.hasClass("wpdsn-linked")&&(s="linkedin");e.hasClass("wpdsn-yandex")&&(s="yandex");e.hasClass("wpdsn-mailru")&&(s="mailru");e.hasClass("wpdsn-weixin")&&(s="wechat");e.hasClass("wpdsn-weibo")&&(s="weibo");e.hasClass("wpdsn-qq")&&(s="qq");e.hasClass("wpdsn-baidu")&&(s="baidu");return s}(e(this)),s)}),e(document).delegate("#wpdcom .wpd-agreement-buttons-right .wpd-agreement-button","click",function(){var s=e(this).parents(".wpd-form-wrap, .wpd-form").find(".wpd-social-login-agreement").slideUp(700);e(this).hasClass("wpd-agreement-button-agree")&&(wpdiscuzAjaxObj.isCookiesEnabled&&Cookies.set("socialLoginAgreementConfirmed",1,{expires:30,path:"/"}),o(n,s))})});
assets/js/wpdiscuz-user-content.js CHANGED
@@ -2,6 +2,7 @@
2
  jQuery(document).ready(function ($) {
3
  var refreshAfterDeleting = 0;
4
  var isNativeAjaxEnabled = parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled);
 
5
  $(document).delegate('.wpd-info,.wpd-page-link,.wpd-delete-content,.wpd-user-email-delete-links', 'click', function (e) {
6
  e.preventDefault();
7
  });
@@ -20,7 +21,7 @@ jQuery(document).ready(function ($) {
20
  var oldClass = icon.attr('class');
21
  icon.removeClass();
22
  icon.addClass('fas fa-pulse fa-spinner');
23
- wpdiscuzAjaxObj.getAjaxObj(isNativeAjaxEnabled, false, data)
24
  .done(function (response) {
25
  btn.addClass('wpd-not-clicked');
26
  icon.removeClass();
@@ -48,7 +49,7 @@ jQuery(document).ready(function ($) {
48
  data.append('page', 0);
49
  $('#wpdUserContentInfo #' + relValue).addClass('wpd-active');
50
  $('#wpdUserContentInfo #' + relValue).css('text-align', 'center');
51
- wpdiscuzAjaxObj.getAjaxObj(isNativeAjaxEnabled, true, data)
52
  .done(function (response) {
53
  if (response) {
54
  $('#wpdUserContentInfo #' + relValue).css('text-align', '');
@@ -72,7 +73,7 @@ jQuery(document).ready(function ($) {
72
  var data = new FormData();
73
  data.append('action', action);
74
  data.append('page', goToPage);
75
- wpdiscuzAjaxObj.getAjaxObj(isNativeAjaxEnabled, true, data)
76
  .done(function (response) {
77
  btn.addClass('wpd-not-clicked');
78
  if (response) {
@@ -110,7 +111,7 @@ jQuery(document).ready(function ($) {
110
  data.append('page', goToPage);
111
  data.append('action', action);
112
 
113
- wpdiscuzAjaxObj.getAjaxObj(isNativeAjaxEnabled, false, data)
114
  .done(function (response) {
115
  btn.addClass('wpd-not-clicked');
116
  icon.removeClass().addClass(oldClass);
@@ -135,7 +136,7 @@ jQuery(document).ready(function ($) {
135
  $('.wpd-loading', btn).addClass('wpd-show');
136
  var data = new FormData();
137
  data.append('action', 'wpdEmailDeleteLinks');
138
- wpdiscuzAjaxObj.getAjaxObj(isNativeAjaxEnabled, false, data)
139
  .done(function (response) {
140
  btn.addClass('wpd-not-clicked');
141
  $('[data-lity-close]', window.parent.document).trigger('click');
@@ -152,7 +153,7 @@ jQuery(document).ready(function ($) {
152
  var data = new FormData();
153
  data.append('action', 'wpdGuestAction');
154
  data.append('guestAction', guestAction);
155
- wpdiscuzAjaxObj.getAjaxObj(isNativeAjaxEnabled, false, data)
156
  .done(function (response) {
157
  btn.addClass('wpd-not-clicked');
158
  btn.find('.wpd-loading').removeClass('wpd-show');
2
  jQuery(document).ready(function ($) {
3
  var refreshAfterDeleting = 0;
4
  var isNativeAjaxEnabled = parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled);
5
+ var additionalTab = parseInt(wpdiscuzUCObj.additionalTab);
6
  $(document).delegate('.wpd-info,.wpd-page-link,.wpd-delete-content,.wpd-user-email-delete-links', 'click', function (e) {
7
  e.preventDefault();
8
  });
21
  var oldClass = icon.attr('class');
22
  icon.removeClass();
23
  icon.addClass('fas fa-pulse fa-spinner');
24
+ wpdiscuzAjaxObj.getAjaxObj(isNativeAjaxEnabled || additionalTab, false, data)
25
  .done(function (response) {
26
  btn.addClass('wpd-not-clicked');
27
  icon.removeClass();
49
  data.append('page', 0);
50
  $('#wpdUserContentInfo #' + relValue).addClass('wpd-active');
51
  $('#wpdUserContentInfo #' + relValue).css('text-align', 'center');
52
+ wpdiscuzAjaxObj.getAjaxObj(isNativeAjaxEnabled || additionalTab, true, data)
53
  .done(function (response) {
54
  if (response) {
55
  $('#wpdUserContentInfo #' + relValue).css('text-align', '');
73
  var data = new FormData();
74
  data.append('action', action);
75
  data.append('page', goToPage);
76
+ wpdiscuzAjaxObj.getAjaxObj(isNativeAjaxEnabled || additionalTab, true, data)
77
  .done(function (response) {
78
  btn.addClass('wpd-not-clicked');
79
  if (response) {
111
  data.append('page', goToPage);
112
  data.append('action', action);
113
 
114
+ wpdiscuzAjaxObj.getAjaxObj(isNativeAjaxEnabled || additionalTab, false, data)
115
  .done(function (response) {
116
  btn.addClass('wpd-not-clicked');
117
  icon.removeClass().addClass(oldClass);
136
  $('.wpd-loading', btn).addClass('wpd-show');
137
  var data = new FormData();
138
  data.append('action', 'wpdEmailDeleteLinks');
139
+ wpdiscuzAjaxObj.getAjaxObj(isNativeAjaxEnabled || additionalTab, false, data)
140
  .done(function (response) {
141
  btn.addClass('wpd-not-clicked');
142
  $('[data-lity-close]', window.parent.document).trigger('click');
153
  var data = new FormData();
154
  data.append('action', 'wpdGuestAction');
155
  data.append('guestAction', guestAction);
156
+ wpdiscuzAjaxObj.getAjaxObj(isNativeAjaxEnabled || additionalTab, false, data)
157
  .done(function (response) {
158
  btn.addClass('wpd-not-clicked');
159
  btn.find('.wpd-loading').removeClass('wpd-show');
assets/js/wpdiscuz-user-content.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(e){var t=0,d=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled);e(document).delegate(".wpd-info,.wpd-page-link,.wpd-delete-content,.wpd-user-email-delete-links","click",function(e){e.preventDefault()}),e(document).delegate(".wpd-info.wpd-not-clicked","click",function(t){var n=e(this);n.removeClass("wpd-not-clicked");var a=new FormData;return a.append("action","wpdGetInfo"),function(t,n){var a=e(".fas",t),i=a.attr("class");a.removeClass(),a.addClass("fas fa-pulse fa-spinner"),wpdiscuzAjaxObj.getAjaxObj(d,!1,n).done(function(d){t.addClass("wpd-not-clicked"),a.removeClass(),a.addClass(i),d&&(e("#wpdUserContentInfo").html(d),e("#wpdUserContentInfo ul.wpd-list .wpd-list-item:first-child").addClass("wpd-active"),e("#wpdUserContentInfo div.wpd-content .wpd-content-item:first-child").addClass("wpd-active"),e("#wpdUserContentInfo").is(":visible")||e("#wpdUserContentInfoAnchor").trigger("click"))})}(n,a),!1}),e(document).delegate(".wpd-list-item","click",function(){var t=e("input.wpd-rel",this).val();e("#wpdUserContentInfo .wpd-list-item").removeClass("wpd-active"),e("#wpdUserContentInfo .wpd-content-item").removeClass("wpd-active");var n=e(this);if(e("#wpdUserContentInfo #"+t).text().length)n.addClass("wpd-active"),e("#wpdUserContentInfo #"+t).addClass("wpd-active");else{var a=new FormData;a.append("action",n.attr("data-action")),a.append("page",0),e("#wpdUserContentInfo #"+t).addClass("wpd-active"),e("#wpdUserContentInfo #"+t).css("text-align","center"),wpdiscuzAjaxObj.getAjaxObj(d,!0,a).done(function(d){d&&(e("#wpdUserContentInfo #"+t).css("text-align",""),n.addClass("wpd-active"),e("#wpdUserContentInfo #"+t).html(d)),e("#wpdiscuz-loading-bar").hide()})}}),e(document).delegate(".wpd-page-link.wpd-not-clicked","click",function(t){var n=e(this);n.removeClass("wpd-not-clicked");var a=n.data("wpd-page"),i=e(".wpd-active .wpd-pagination .wpd-action").val(),o=new FormData;o.append("action",i),o.append("page",a),wpdiscuzAjaxObj.getAjaxObj(d,!0,o).done(function(t){n.addClass("wpd-not-clicked"),t&&e(".wpd-content-item.wpd-active").html(t),e("#wpdiscuz-loading-bar").hide()})}),e(document).delegate(".wpd-delete-content.wpd-not-clicked","click",function(){var n=e(this),a=parseInt(n.data("wpd-content-id"));if(!isNaN(a)){var i=n.data("wpd-delete-action");if("wpdDeleteComment"==i&&!confirm(wpdiscuzUCObj.msgConfirmDeleteComment))return!1;if("wpdCancelSubscription"==i&&!confirm(wpdiscuzUCObj.msgConfirmCancelSubscription))return!1;if("wpdCancelFollow"==i&&!confirm(wpdiscuzUCObj.msgConfirmCancelFollow))return!1;var o=e("i",n),s=o.attr("class"),c=e(".wpd-wrapper .wpd-page-number").val(),l=e(".wpd-content-item.wpd-active").children(".wpd-item").length;n.removeClass("wpd-not-clicked"),o.removeClass().addClass("fas fa-pulse fa-spinner"),1==l&&c>0&&(c-=1);var p=new FormData;p.append("id",a),p.append("page",c),p.append("action",i),wpdiscuzAjaxObj.getAjaxObj(d,!1,p).done(function(d){n.addClass("wpd-not-clicked"),o.removeClass().addClass(s),e(".wpd-content-item.wpd-active").html(d),t=1})}}),e(document).delegate("[data-lity-close]","click",function(d){e(d.target).is("[data-lity-close]")&&t&&window.location.reload(!0)}),e(document).delegate(".wpd-user-email-delete-links.wpd-not-clicked","click",function(){var t=e(this);t.removeClass("wpd-not-clicked"),e(".wpd-loading",t).addClass("wpd-show");var n=new FormData;n.append("action","wpdEmailDeleteLinks"),wpdiscuzAjaxObj.getAjaxObj(d,!1,n).done(function(d){t.addClass("wpd-not-clicked"),e("[data-lity-close]",window.parent.document).trigger("click")})}),e(document).delegate(".wpd-user-settings-button.wpd-not-clicked","click",function(){var t=e(this);t.removeClass("wpd-not-clicked");var n=t.data("wpd-delete-action");if(console.log(n),"deleteCookies"!==n){t.find(".wpd-loading").addClass("wpd-show");var a=new FormData;a.append("action","wpdGuestAction"),a.append("guestAction",n),wpdiscuzAjaxObj.getAjaxObj(d,!1,a).done(function(d){t.addClass("wpd-not-clicked"),t.find(".wpd-loading").removeClass("wpd-show");try{var n=e.parseJSON(d);t.after(n.message);var a=t.next(".wpd-guest-action-message");a.fadeIn(100).fadeOut(7e3,function(){a.remove(),1===parseInt(n.code)&&(t.parent().remove(),e(".wpd-delete-all-comments").length||e(".wpd-delete-all-subscriptions").length||e(".wpd-delete-all-cookies").parent().addClass("wpd-show"))})}catch(e){console.log(e)}})}else!function(){for(var e=document.cookie.split(";"),t=0;t<e.length;t++){var d=e[t],n=d.indexOf("="),a=n>-1?d.substr(0,n):d;Cookies.remove(a.trim())}location.reload(!0)}()})});
1
+ jQuery(document).ready(function(e){var t=0,d=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),n=parseInt(wpdiscuzUCObj.additionalTab);e(document).delegate(".wpd-info,.wpd-page-link,.wpd-delete-content,.wpd-user-email-delete-links","click",function(e){e.preventDefault()}),e(document).delegate(".wpd-info.wpd-not-clicked","click",function(t){var a=e(this);a.removeClass("wpd-not-clicked");var i=new FormData;return i.append("action","wpdGetInfo"),function(t,a){var i=e(".fas",t),o=i.attr("class");i.removeClass(),i.addClass("fas fa-pulse fa-spinner"),wpdiscuzAjaxObj.getAjaxObj(d||n,!1,a).done(function(d){t.addClass("wpd-not-clicked"),i.removeClass(),i.addClass(o),d&&(e("#wpdUserContentInfo").html(d),e("#wpdUserContentInfo ul.wpd-list .wpd-list-item:first-child").addClass("wpd-active"),e("#wpdUserContentInfo div.wpd-content .wpd-content-item:first-child").addClass("wpd-active"),e("#wpdUserContentInfo").is(":visible")||e("#wpdUserContentInfoAnchor").trigger("click"))})}(a,i),!1}),e(document).delegate(".wpd-list-item","click",function(){var t=e("input.wpd-rel",this).val();e("#wpdUserContentInfo .wpd-list-item").removeClass("wpd-active"),e("#wpdUserContentInfo .wpd-content-item").removeClass("wpd-active");var a=e(this);if(e("#wpdUserContentInfo #"+t).text().length)a.addClass("wpd-active"),e("#wpdUserContentInfo #"+t).addClass("wpd-active");else{var i=new FormData;i.append("action",a.attr("data-action")),i.append("page",0),e("#wpdUserContentInfo #"+t).addClass("wpd-active"),e("#wpdUserContentInfo #"+t).css("text-align","center"),wpdiscuzAjaxObj.getAjaxObj(d||n,!0,i).done(function(d){d&&(e("#wpdUserContentInfo #"+t).css("text-align",""),a.addClass("wpd-active"),e("#wpdUserContentInfo #"+t).html(d)),e("#wpdiscuz-loading-bar").hide()})}}),e(document).delegate(".wpd-page-link.wpd-not-clicked","click",function(t){var a=e(this);a.removeClass("wpd-not-clicked");var i=a.data("wpd-page"),o=e(".wpd-active .wpd-pagination .wpd-action").val(),s=new FormData;s.append("action",o),s.append("page",i),wpdiscuzAjaxObj.getAjaxObj(d||n,!0,s).done(function(t){a.addClass("wpd-not-clicked"),t&&e(".wpd-content-item.wpd-active").html(t),e("#wpdiscuz-loading-bar").hide()})}),e(document).delegate(".wpd-delete-content.wpd-not-clicked","click",function(){var a=e(this),i=parseInt(a.data("wpd-content-id"));if(!isNaN(i)){var o=a.data("wpd-delete-action");if("wpdDeleteComment"==o&&!confirm(wpdiscuzUCObj.msgConfirmDeleteComment))return!1;if("wpdCancelSubscription"==o&&!confirm(wpdiscuzUCObj.msgConfirmCancelSubscription))return!1;if("wpdCancelFollow"==o&&!confirm(wpdiscuzUCObj.msgConfirmCancelFollow))return!1;var s=e("i",a),c=s.attr("class"),l=e(".wpd-wrapper .wpd-page-number").val(),p=e(".wpd-content-item.wpd-active").children(".wpd-item").length;a.removeClass("wpd-not-clicked"),s.removeClass().addClass("fas fa-pulse fa-spinner"),1==p&&l>0&&(l-=1);var w=new FormData;w.append("id",i),w.append("page",l),w.append("action",o),wpdiscuzAjaxObj.getAjaxObj(d||n,!1,w).done(function(d){a.addClass("wpd-not-clicked"),s.removeClass().addClass(c),e(".wpd-content-item.wpd-active").html(d),t=1})}}),e(document).delegate("[data-lity-close]","click",function(d){e(d.target).is("[data-lity-close]")&&t&&window.location.reload(!0)}),e(document).delegate(".wpd-user-email-delete-links.wpd-not-clicked","click",function(){var t=e(this);t.removeClass("wpd-not-clicked"),e(".wpd-loading",t).addClass("wpd-show");var a=new FormData;a.append("action","wpdEmailDeleteLinks"),wpdiscuzAjaxObj.getAjaxObj(d||n,!1,a).done(function(d){t.addClass("wpd-not-clicked"),e("[data-lity-close]",window.parent.document).trigger("click")})}),e(document).delegate(".wpd-user-settings-button.wpd-not-clicked","click",function(){var t=e(this);t.removeClass("wpd-not-clicked");var a=t.data("wpd-delete-action");if(console.log(a),"deleteCookies"!==a){t.find(".wpd-loading").addClass("wpd-show");var i=new FormData;i.append("action","wpdGuestAction"),i.append("guestAction",a),wpdiscuzAjaxObj.getAjaxObj(d||n,!1,i).done(function(d){t.addClass("wpd-not-clicked"),t.find(".wpd-loading").removeClass("wpd-show");try{var n=e.parseJSON(d);t.after(n.message);var a=t.next(".wpd-guest-action-message");a.fadeIn(100).fadeOut(7e3,function(){a.remove(),1===parseInt(n.code)&&(t.parent().remove(),e(".wpd-delete-all-comments").length||e(".wpd-delete-all-subscriptions").length||e(".wpd-delete-all-cookies").parent().addClass("wpd-show"))})}catch(e){console.log(e)}})}else!function(){for(var e=document.cookie.split(";"),t=0;t<e.length;t++){var d=e[t],n=d.indexOf("="),a=n>-1?d.substr(0,n):d;Cookies.remove(a.trim())}location.reload(!0)}()})});
assets/js/wpdiscuz.js CHANGED
@@ -402,7 +402,7 @@ jQuery(document).ready(function ($) {
402
  wcForm.submit(function (e) {
403
  e.preventDefault();
404
  });
405
- if ($('.wc_comment', wcForm).val().trim() === '' || $('.wc_comment', wcForm).val().trim() === '&nbsp;') {
406
  wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.wc_msg_required_fields, 'error');
407
  return;
408
  }
@@ -1044,7 +1044,7 @@ jQuery(document).ready(function ($) {
1044
  .done(function (r) {
1045
  if (typeof r === 'object') {
1046
  if (r.success) {
1047
- $('#comment-' + commentId + ' .wpd-comment-text').html(' ' + r.data.message);
1048
  $('#wpdiscuz-readmore-' + uniqueId).remove();
1049
  } else {
1050
  console.log(r.data);
@@ -1200,10 +1200,10 @@ jQuery(document).ready(function ($) {
1200
  var textarea = form.find('.wc_comment');
1201
  var commentText = textarea.val().trim();
1202
  var replacedText = commentText.replace(/<p><br><\/p>/g, "\n").replace(/<p>(.*?)<\/p>/g, "$1\n");
1203
- replacedText = replacedText.replace(/<img src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g, "$3");
1204
- replacedText = replacedText.replace(/<img[^>]+alt=["|']([^"|']+)["|'][^>]+src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'][^>]?>/g, "$1");
1205
- replacedText = replacedText.replace(/<img\s+([^>]*)class=["|']wpdem\-sticker["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g, "$3");
1206
- replacedText = replacedText.replace(/<img\s+([^>]*)src=["|']([^"|']+)["|'](.*?)[^>]*>/g, "$2");
1207
  textarea.val(replacedText);
1208
  }
1209
 
@@ -1571,9 +1571,12 @@ jQuery(document).ready(function ($) {
1571
  $('html, body').animate({
1572
  scrollTop: $('#wpdcom').offset().top - 60
1573
  }, 1000, function () {
 
1574
  if (wpdiscuzLoadRichEditor) {
1575
- wpDiscuzEditor.createEditor('#wpd-editor-0_0').focus();
1576
- } else {
 
 
1577
  $('#wc-textarea-0_0').focus();
1578
  }
1579
  });
402
  wcForm.submit(function (e) {
403
  e.preventDefault();
404
  });
405
+ if ($('.wc_comment', wcForm).val().trim() === '') {
406
  wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.wc_msg_required_fields, 'error');
407
  return;
408
  }
1044
  .done(function (r) {
1045
  if (typeof r === 'object') {
1046
  if (r.success) {
1047
+ $('#comment-' + commentId + ' .wpd-comment-text').replaceWith(' ' + r.data.message);
1048
  $('#wpdiscuz-readmore-' + uniqueId).remove();
1049
  } else {
1050
  console.log(r.data);
1200
  var textarea = form.find('.wc_comment');
1201
  var commentText = textarea.val().trim();
1202
  var replacedText = commentText.replace(/<p><br><\/p>/g, "\n").replace(/<p>(.*?)<\/p>/g, "$1\n");
1203
+ replacedText = replacedText.replace(/<img src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g, " $3 ");
1204
+ replacedText = replacedText.replace(/<img[^>]+alt=["|']([^"|']+)["|'][^>]+src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'][^>]?>/g, " $1 ");
1205
+ replacedText = replacedText.replace(/<img\s+([^>]*)class=["|']wpdem\-sticker["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g, " $3 ");
1206
+ replacedText = replacedText.replace(/<img\s+([^>]*)src=["|']([^"|']+)["|'](.*?)[^>]*>/g, " $2 ");
1207
  textarea.val(replacedText);
1208
  }
1209
 
1571
  $('html, body').animate({
1572
  scrollTop: $('#wpdcom').offset().top - 60
1573
  }, 1000, function () {
1574
+ $('#wpd-bubble-wrapper').removeClass('wpd-bubble-hover');
1575
  if (wpdiscuzLoadRichEditor) {
1576
+ if ($('#wpd-editor-0_0').length) {
1577
+ wpDiscuzEditor.createEditor('#wpd-editor-0_0').focus();
1578
+ }
1579
+ } else if ($('#wc-textarea-0_0').length) {
1580
  $('#wc-textarea-0_0').focus();
1581
  }
1582
  });
assets/js/wpdiscuz.min.js CHANGED
@@ -1 +1 @@
1
- var wpdiscuzLoadRichEditor=parseInt(wpdiscuzAjaxObj.loadRichEditor);if(wpdiscuzLoadRichEditor)var wpDiscuzEditor=new WpdEditor;function wpdMessagesOnInit(e,t){wpdiscuzAjaxObj.setCommentMessage(e,t),setTimeout(function(){location.href=location.href.substring(0,location.href.indexOf("wpdiscuzUrlAnchor")-1)},3e3)}wpdiscuzAjaxObj.setCommentMessage=function(e,t,a){var o="wpdiscuz-message-error";if("[object Array]"===Object.prototype.toString.call(e))for(var d in e)"[object Array]"===Object.prototype.toString.call(t)?"success"===t[d]?o="wpdiscuz-message-success":"warning"===t[d]&&(o="wpdiscuz-message-warning"):"success"===t?o="wpdiscuz-message-success":"warning"===t&&(o="wpdiscuz-message-warning"),jQuery("<div/>").addClass(o).html(e[d]).prependTo("#wpdiscuz-comment-message").delay("[object Array]"===Object.prototype.toString.call(a)?a[d]:a||4e3).fadeOut(1e3,function(){jQuery(this).remove()});else"success"===t?o="wpdiscuz-message-success":"warning"===t&&(o="wpdiscuz-message-warning"),jQuery("<div/>").addClass(o).html(e).prependTo("#wpdiscuz-comment-message").delay(a||4e3).fadeOut(1e3,function(){jQuery(this).remove()})},jQuery(document).ready(function(e){e("body").addClass("wpdiscuz_"+wpdiscuzAjaxObj.version);var t=wpdiscuzAjaxObj.is_user_logged_in,a=1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!t,o=1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&t,d=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,n=parseInt(wpdiscuzAjaxObj.commentListLoadType),s=parseInt(wpdiscuzAjaxObj.wc_post_id),i=parseInt(wpdiscuzAjaxObj.commentListUpdateType),c=1e3*parseInt(wpdiscuzAjaxObj.commentListUpdateTimer),p=parseInt(wpdiscuzAjaxObj.liveUpdateGuests),r=wpdiscuzAjaxObj.loadLastCommentId,l=r,m=parseInt(wpdiscuzAjaxObj.firstLoadWithAjax);Cookies.get("wpdiscuz_comments_sorting")&&Cookies.remove("wpdiscuz_comments_sorting",{path:""}),Cookies.get("wordpress_last_visit")&&Cookies.remove("wordpress_last_visit",{path:""}),Cookies.get("wpdiscuz_last_visit")&&Cookies.remove("wpdiscuz_last_visit",{path:""});var w,u=wpdiscuzAjaxObj.storeCommenterData,f=parseInt(wpdiscuzAjaxObj.wmuEnabled),h=wpdiscuzAjaxObj.isCookiesEnabled,b=!0,g=wpdiscuzAjaxObj.cookiehash,_=parseInt(wpdiscuzAjaxObj.isLoadOnlyParentComments),v=parseInt(wpdiscuzAjaxObj.enableDropAnimation)?500:0,z=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),j=parseInt(wpdiscuzAjaxObj.enableBubble),C=parseInt(wpdiscuzAjaxObj.bubbleLiveUpdate),k=parseInt(wpdiscuzAjaxObj.bubbleHintTimeout),x=parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout)?parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout):5,y=parseInt(wpdiscuzAjaxObj.bubbleShowNewCommentMessage),O=wpdiscuzAjaxObj.bubbleLocation,A=wpdiscuzAjaxObj.inlineFeedbackAttractionType,I=[],T=[],D=[],E=!1,M=1;(e(".wc_social_plugin_wrapper .wp-social-login-provider-list").length?e(".wc_social_plugin_wrapper .wp-social-login-provider-list").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .the_champ_login_container").length?e(".wc_social_plugin_wrapper .the_champ_login_container").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .social_connect_form").length?e(".wc_social_plugin_wrapper .social_connect_form").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .oneall_social_login_providers").length&&e(".wc_social_plugin_wrapper .oneall_social_login .oneall_social_login_providers").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"),wpdiscuzLoadRichEditor&&e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0"),e(document).delegate("#wpdcom .ql-editor, #wpdcom .wc_comment","focus",function(){e(".wpd-form-foot",e(this).parents(".wpd_comm_form")).slideDown(v)}),e(document).delegate("#wpdcom textarea","focus",function(){e(this).next(".autogrow-textarea-mirror").length||e(this).autoGrow()}),t)||S({comment_author:Cookies.get("comment_author_"+g),comment_author_email:Cookies.get("comment_author_email_"+g),comment_author_url:Cookies.get("comment_author_url_"+g)});if(e(".wpd-vote-down.wpd-dislike-hidden").remove(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd"),e(document).delegate("#wpd-editor-source-code-wrapper-bg","click",function(){e(this).hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),wpdiscuzLoadRichEditor&&e(document).delegate("#wpd-insert-source-code","click",function(){var t=wpDiscuzEditor.createEditor("#"+e("#wpd-editor-uid").val());t.deleteText(0,t.getLength(),Quill.sources.USER);var a=e("#wpd-editor-source-code").val();a.length&&t.clipboard.dangerouslyPasteHTML(0,a,Quill.sources.USER),t.update(),e("#wpd-editor-source-code-wrapper-bg").hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),e(document).delegate(".wpd-reply-button","click",function(){var n=V(e(this),0);e(this).hasClass("wpdiscuz-clonned")?(wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+n).focus()},v):setTimeout(function(){e("#wc-textarea-"+n).trigger("focus")},v),e("#wpd-secondary-form-wrapper-"+n).slideToggle(v)):function(a){var o=V(a,0);e("#wpdiscuz_form_anchor-"+o).before(function(t){return e("#wpdiscuz_hidden_secondary_form").html().replace(/wpdiscuzuniqueid/g,t)}(o));var d=e("#wpd-secondary-form-wrapper-"+o);if(!t){var n={comment_author:Cookies.get("comment_author_"+g),comment_author_email:Cookies.get("comment_author_email_"+g),comment_author_url:Cookies.get("comment_author_url_"+g)};S(n)}wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+o).focus()},v):setTimeout(function(){e("#wc-textarea-"+o).trigger("focus")},v);d.slideToggle(v,function(){a.addClass("wpdiscuz-clonned")})}(e(this)),function(t){if((a||o)&&"2.0"===d){var n=B(t);setTimeout(function(){if(!T[n])try{T[n]=grecaptcha.render("wpdiscuz-recaptcha-"+t,{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(a){e("#wpdiscuz-recaptcha-field-"+t).val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-"+t).val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}},1e3)}}(n)}),e(document).delegate("#wpdcom .wpd-comment-link [data-comment-url]","click",function(){var t=e(this).data("comment-url"),a=e("<input/>");a.appendTo("body").css({position:"absolute",top:"-10000000px"}).val(t),a.select(),document.execCommand("copy"),a.remove(),wpdiscuzAjaxObj.setCommentMessage(t+"<br/>"+wpdiscuzAjaxObj.wc_copied_to_clipboard,"success",5e3)}),e(document).delegate(".wpdiscuz-nofollow,.wc_captcha_refresh_img,.wpd-load-more-submit","click",function(e){e.preventDefault()}),e(document).delegate(".wpd-toggle.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked");var a=V(e(this),0),o=e(this),d=e(".fas",o);!o.parents(".wpd-comment:not(.wpd-reply)").children(".wpd-reply").length&&_?function(t,a){var o=B(t),d=new FormData;d.append("action","wpdShowReplies"),d.append("commentId",o),ce(z,!0,d).done(function(o){a.addClass("wpd_not_clicked"),"object"==typeof o&&o.success&&(e("#wpd-comm-"+t).replaceWith(o.data.comment_list),e("#wpd-comm-"+t+" .wpd-toggle .fas").removeClass("fa-chevron-down").addClass("fa-chevron-up"),e("#wpd-comm-"+t+" .wpd-toggle").attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text),e("#wpd-comm-"+t+" .wpd-toggle .wpd-view-replies").remove(),ie(o)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,d){console.log(d),a.addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}(a,t):e("#wpd-comm-"+a+"> .wpd-reply").slideToggle(700,function(){e(this).is(":hidden")?(d.removeClass("fa-chevron-up"),d.addClass("fa-chevron-down"),o.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_show_replies_text)):(d.removeClass("fa-chevron-down"),d.addClass("fa-chevron-up"),o.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text)),t.addClass("wpd_not_clicked")})}),e(document).delegate(".wpd-new-loaded-comment","mouseenter",function(){e(this).removeClass("wpd-new-loaded-comment")}),e(document).delegate(".wpd-sbs-toggle","click",function(){e(".wpdiscuz-subscribe-bar").slideToggle(v)}),parseInt(wpdiscuzAjaxObj.wpDiscuzIsShowOnSubscribeForm)&&!t&&wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&("2.0"===d?(setTimeout(function(){try{grecaptcha.render("wpdiscuz-recaptcha-subscribe-form",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-subscribe-form").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}},1e3),e(document).delegate("#wpdiscuz-subscribe-form","submit",function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val()?e(".wpdiscuz-recaptcha",e(this)).css("border","none"):(e(".wpdiscuz-recaptcha",e(this)).css("border","1px solid red"),t.preventDefault())})):"3.0"===d&&e(document).delegate("#wpdiscuz_subscription_button","click",function(t){var a=e(this).parents("#wpdiscuz-subscribe-form");t.preventDefault();try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/wpdAddSubscription"}).then(function(e){console.log(5555),document.getElementById("wpdiscuz-recaptcha-field-subscribe-form").value=e,a.submit()},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error")}})),(a||o)&&"2.0"===d){var F=e(window).width(),L=e("#wpdcom").width();L>=1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"65%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"35%"})),L>=940&&L<1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"60%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"40%"})),L>=810&&L<940&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"60%"})),L>=730&&L<810&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"45%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"55%"})),L>=610&&L<730&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.85)","-webkit-transform":"scale(0.85)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"43%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"55%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"})),F>650&&(L>=510&&L<610&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"35%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"63%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%",position:"relative",right:"-60px"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),L>=470&&L<510&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"60%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd_main_comm_form .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),L<470&&(e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({margin:"0px auto","transform-origin":"center 0","-webkit-transform-origin":"center 0"}),e("#wpdcom .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc_notification_checkboxes").css({"text-align":"center"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-field-submit").css({"text-align":"center"})))}function R(t,a,o){ce(z||f,!1,a).done(function(a){if(e(o).addClass("wpd_not_clicked"),"object"==typeof a)if(a.success){"collapsed"===wpdiscuzAjaxObj.commentFormView&&e(".wpd-form-foot",t).slideUp(v),e(".wpd-thread-info").html(a.data.wc_all_comments_count_new_html),a.data.wc_all_comments_count_new=parseInt(a.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").text(a.data.wc_all_comments_count_new),a.data.wc_all_comments_count_new?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide();var d=v;a.data.is_main?X(a.data.message):(d=v+700,e("#wpd-secondary-form-wrapper-"+a.data.uniqueid).slideToggle(700),1==a.data.is_in_same_container?e("#wpd-secondary-form-wrapper-"+a.data.uniqueid).after(a.data.message):e("#wpd-comm-"+a.data.uniqueid).after(a.data.message)),function(e){if(!e.data.held_moderate){var t=new FormData;t.append("action","wpdCheckNotificationType"),t.append("comment_id",e.data.new_comment_id),t.append("email",e.data.comment_author_email),t.append("isParent",e.data.is_main),ce(z,!0,t)}}(a),function(e){if(e.data.redirect>0&&e.data.new_comment_id){var t=new FormData;t.append("action","wpdRedirect"),t.append("commentId",e.data.new_comment_id),ce(z,!0,t).done(function(e){"object"==typeof e&&e.success&&setTimeout(function(){location.href=e.data},2e3)}).fail(function(e,t,a){console.log(a)})}}(a),h&&b?function(t){var a=t.comment_author_email,o=t.comment_author,d=t.comment_author_url;null==u?(Cookies.set("comment_author_email_"+g,a),Cookies.set("comment_author_"+g,o),d.length&&Cookies.set("comment_author_url_"+g,d)):(u=parseInt(u),Cookies.set("comment_author_email_"+g,a,{expires:u,path:"/"}),Cookies.set("comment_author_"+g,o,{expires:u,path:"/"}),d.length&&Cookies.set("comment_author_url_"+g,d,{expires:u,path:"/"}));e(".wpd-cookies-checkbox").length&&e(".wpd-cookies-checkbox").attr("checked","checked")}(a.data):b||e(".wpd-cookies-checkbox").removeAttr("checked"),wpdiscuzLoadRichEditor&&wpDiscuzEditor.createEditor("#wpd-editor-"+e(".wpdiscuz_unique_id",t).val()).setContents([{insert:"\n"}]),t.get(0).reset(),S(a.data),e(".wmu-preview-wrap",t).remove(),I.length&&(I.forEach(function(e){e.parents(".wpd-field-checkbox").remove()}),I=[]),parseInt(wpdiscuzAjaxObj.scrollToComment)&&setTimeout(function(){e("html, body").animate({scrollTop:e("#comment-"+a.data.new_comment_id).offset().top-32},1e3)},d),ie(a,t)}else a.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"),ie(a,t));else wpdiscuzAjaxObj.setCommentMessage(a,"error");e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,d){console.log(d),e(o).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}function S(t){e(".wpd_comm_form .wc_name").val(t.comment_author),t.comment_author_email&&t.comment_author_email.indexOf("@example.com")<0&&e(".wpd_comm_form .wc_email").val(t.comment_author_email),t.comment_author_url&&e(".wpd_comm_form .wc_website").val(t.comment_author_url)}function q(t,a){e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").show(),e("#wpd-comm-"+t+" .wpdiscuz-edit-form-wrap").replaceWith(a),e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").show()}e(document).delegate(".wc_comm_submit.wpd_not_clicked","click",function(){var t=e(this),n=1,s=e(this).parents("form");if(s.hasClass("wpd_main_comm_form")||(n=function(t){var a=t.attr("class").split(" "),o="";return e.each(a,function(e,t){"wpd_comment_level"===G(t,!1)&&(o=G(t,!0))}),parseInt(o)+1}(e(this).parents(".wpd-comment"))),J(s,"#wpd-editor-"+e(".wpdiscuz_unique_id",s).val()),s.submit(function(e){e.preventDefault()}),""!==e(".wc_comment",s).val().trim()&&"&nbsp;"!==e(".wc_comment",s).val().trim()){if(s[0].checkValidity()&&(c=s,p=!0,"2.0"===d&&e("input[name=wc_captcha]",c).length&&!e("input[name=wc_captcha]",c).val().length?(p=!1,e(".wpdiscuz-recaptcha",c).css("border","1px solid red")):"2.0"===d&&e("input[name=wc_captcha]",c).length&&e(".wpdiscuz-recaptcha",c).css("border","none"),p)){E=!0,function(t){e(".wpd-agreement-checkbox",t).each(function(){e(this).hasClass("wpd_agreement_hide")&&h&&e(this).prop("checked")&&(Cookies.set(e(this).attr("name")+"_"+g,1,{expires:30,path:"/"}),e("input[name="+e(this).attr("name")+"]").each(function(){I.push(e(this))}))})}(s),e(t).removeClass("wpd_not_clicked");var i=new FormData;if(i.append("action","wpdAddComment"),e(":input",s).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&i.append(this.name+"",e(this).val().trim()),"checkbox"!=this.type&&"radio"!=this.type||e(this).is(":checked")&&i.append(this.name+"",e(this).val())}),i.append("wpd_comment_depth",n),wpdiscuzAjaxObj.wpdiscuz_zs&&i.append("wpdiscuz_zs",wpdiscuzAjaxObj.wpdiscuz_zs),e(".wpd-cookies-checkbox",s).length&&!e(".wpd-cookies-checkbox",s).prop("checked")&&(b=!1),e("#wpdiscuz-loading-bar").show(),wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&"3.0"===d&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/addComment"}).then(function(e){i.append("g-recaptcha-response",e),R(s,i,t)},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error"),e("#wpdiscuz-loading-bar").fadeOut(250)}else R(s,i,t)}var c,p;!function(e){if((a||o)&&"2.0"===d){var t=B(e);grecaptcha.reset(T[t])}}(e(".wpdiscuz_unique_id",s).val()),e(".wpdiscuz_reset").val("")}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.wc_msg_required_fields,"error")}),e(document).delegate(".wpd_editable_comment","click",function(){w&&e(".wpdiscuz-edit-form-wrap").length&&q(V(e(".wpdiscuz-edit-form-wrap"),0),w);var t=V(e(this),0),a=B(t),o=new FormData;o.append("action","wpdEditComment"),o.append("commentId",a),w=e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-text").get(0),ce(z,!0,o).done(function(a){if("object"==typeof a)if(a.success){if(e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text").replaceWith(a.data.html),wpdiscuzLoadRichEditor){let o=wpDiscuzEditor.createEditor("#wpd-editor-edit_"+t);o.clipboard.dangerouslyPasteHTML(0,a.data.content),o.update(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd")}else e("#wc-textarea-edit_"+t).val(a.data.content);e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").hide(),e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").hide()}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error");else console.log(a);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wc_save_edited_comment","click",function(){var t=V(e(this)),a=B(t),o=e("#wpd-comm-"+t+" #wpdiscuz-edit-form");if(J(o,"#wpd-editor-edit_"+t),o.submit(function(e){e.preventDefault()}),o[0].checkValidity()){var d=new FormData;d.append("action","wpdSaveEditedComment"),d.append("commentId",a),e(":input",o).each(function(){""!==this.name&&"checkbox"!==this.type&&"radio"!==this.type&&d.append(this.name+"",e(this).val()),"checkbox"!==this.type&&"radio"!==this.type||e(this).is(":checked")&&d.append(this.name+"",e(this).val())}),ce(z,!0,d).done(function(o){"object"==typeof o?(o.success?(q(t,o.data.message),o.data.lastEdited&&(e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").remove(),e(o.data.lastEdited).insertAfter("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text")),o.data.twitterShareLink&&e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_tw").attr("href",o.data.twitterShareLink),o.data.whatsappShareLink&&e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_whatsapp").attr("href",o.data.whatsappShareLink),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[o.data],"error"),ie(o,a)):console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(document).delegate(".wc_cancel_edit","click",function(){var t=V(e(this));q(t,w),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)}),!wpdiscuzAjaxObj.wordpressIsPaginate&&m&&(M=0,1==m?setTimeout(function(){W(!0)},500):e(document).delegate(".wpd-load-comments","click",function(){e(this).parent(".wpd-load-more-submit-wrap").remove(),W(!0)})),e(document).delegate(".wpd-load-more-submit","click",function(){var t=e(this);t.hasClass("wpd-loaded")&&W(!1,t,"wpd-loaded","wpd-loading")});var U=!1;function H(){var t=e("#wpdiscuzHasMoreComments").val(),a=e(document).height(),o=e(window).height()+e(window).scrollTop();a&&o&&(100*o/a>=80&&!1===U&&1==t&&(U=!0,W(!1,e(".wpd-load-more-submit"))))}function W(t,a,o,d){a&&(a.toggleClass(o),a.toggleClass(d));var s=new FormData;s.append("action","wpdLoadMoreComments");var i=e(".wpdiscuz-sort-button-active").attr("data-sorting");i&&s.append("sorting",i),s.append("offset",M),s.append("lastParentId",e(".wpd-load-more-submit").attr("data-lastparentid")),s.append("isFirstLoad",t?1:0);var c=e(".wpdf-active").attr("data-filter-type");s.append("wpdType",c||""),ce(z,!t||1!=m,s).done(function(s){"object"==typeof s&&s.success&&(M++,t&&e(".wpd-comment").remove(),e(".wpdiscuz_single").remove(),e(".wpdiscuz-comment-pagination").before(s.data.comment_list),K(s,t&&2!==n),U=!1,r=s.data.loadLastCommentId,ie(s),t&&P(!1)),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(d))}).fail(function(t,n,s){console.log(s),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(d))})}function K(t,a){var o;0==t.data.is_show_load_more?(e("#wpdiscuzHasMoreComments").val(0),e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide()):(o=t.data.last_parent_id,e(".wpd-load-more-submit").attr("data-lastparentid",o),2!==n&&e(".wpdiscuz-comment-pagination").show(),e("#wpdiscuzHasMoreComments").val(1),a&&e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").show()),ie(t)}function P(t){var a=location.href.match(/#comment\-(\d+)/);if(null!==a){var o=a[1];if(e("#comment-"+o).length)setTimeout(function(){e("html, body").animate({scrollTop:e("#comment-"+o).parents("[id^=wpd-comm-]").offset().top-32},1e3),t&&N(o)},500);else{var d=new FormData;d.append("action","wpdGetSingleComment"),d.append("commentId",o),ce(z,!0,d).done(function(a){if("object"==typeof a&&a.success){var d="#comment-"+o;e("#comment-"+a.data.parentCommentID).length?e("#comment-"+a.data.parentCommentID).parents("[id^=wpd-comm-"+a.data.parentCommentID+"]").replaceWith(a.data.message):e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e(d).offset().top-32},1e3),t&&N(o)}e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}}function N(t){setTimeout(function(){e("#comment-"+t).siblings(".wpd-secondary-form-wrapper").is(":visible")||e("#comment-"+t).find(".wpd-reply-button").trigger("click")},1100)}function Q(e){if(void 0!==e.data.message)for(var t,a=e.data.message,o=0;o<a.length;o++)$((t=a[o]).comment_parent,t.comment_html)}function V(e,t){var a="";return(a=t?e.parents(".wpd-main-form-wrapper").attr("id"):e.parents(".wpd-comment").attr("id")).substring(a.lastIndexOf("-")+1)}function B(e){return e.substring(0,e.indexOf("_"))}function G(e,t){return t?e.substring(e.indexOf("-")+1):e.substring(0,e.indexOf("-"))}function $(t,a){if(0==t)X(a);else{var o=V(e("#comment-"+t),0);e("#wpdiscuz_form_anchor-"+o).after(a)}}function Y(){var t,a,o="";return e(".wpd-comment-right").each(function(){t=V(e(this),0),a=B(t),o+=a+","}),o}function J(t,a){var o=t.find(".wpd-required-group");wpdiscuzLoadRichEditor&&t.find(".wc_comment").val(e(a+">.ql-editor").html()),function(e){var t=e.find(".wc_comment"),a=t.val().trim().replace(/<p><br><\/p>/g,"\n").replace(/<p>(.*?)<\/p>/g,"$1\n");a=(a=(a=(a=a.replace(/<img src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g,"$3")).replace(/<img[^>]+alt=["|']([^"|']+)["|'][^>]+src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'][^>]?>/g,"$1")).replace(/<img\s+([^>]*)class=["|']wpdem\-sticker["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g,"$3")).replace(/<img\s+([^>]*)src=["|']([^"|']+)["|'](.*?)[^>]*>/g,"$2"),t.val(a)}(t),e.each(o,function(){e("input",this).removeAttr("required"),0===e("input:checked",this).length?e("input",e(this)).attr("required","required"):e(".wpd-field-invalid",this).remove()})}function X(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function Z(t){t?t.prop("required")||(t.val()?t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none")):e.each(e(".wc_email"),function(t,a){var o=e(a);o.prop("required")||(o.val()?o.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):o.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none"))})}if(2!==n||wpdiscuzAjaxObj.wordpressIsPaginate||(e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide(),H(),e(window).scroll(function(){H()})),wpdiscuzAjaxObj.setLoadMoreVisibility=K,e(document).delegate(".wpd-vote-up.wpd_not_clicked, .wpd-vote-down.wpd_not_clicked","click",function(){var t=e(this);e(t).removeClass("wpd_not_clicked");var a,o=B(V(t));a=e(this).hasClass("wpd-vote-up")?1:-1;var d=new FormData;d.append("action","wpdVoteOnComment"),d.append("commentId",o),d.append("voteType",a),ce(z,!0,d).done(function(d){if(e(t).addClass("wpd_not_clicked"),"object"==typeof d){if(d.success){if("total"===d.data.buttonsStyle){var n=e(".wpd-comment-footer .wpd-vote-result",e("#comment-"+o)),s=d.data.votes;n.text(s),n.removeClass("wpd-up wpd-down"),s>0&&n.addClass("wpd-up"),s<0&&n.addClass("wpd-down")}else{var i=e(".wpd-comment-footer .wpd-vote-result-like",e("#comment-"+o)),c=e(".wpd-comment-footer .wpd-vote-result-dislike",e("#comment-"+o));i.text(d.data.likeCount),c.text(d.data.dislikeCount),parseInt(d.data.likeCount)>0?i.addClass("wpd-up"):i.removeClass("wpd-up"),parseInt(d.data.dislikeCount)<0?c.addClass("wpd-down"):c.removeClass("wpd-down")}var p=e(".wpd-comment-footer .wpd-vote-up",e("#comment-"+o)),r=e(".wpd-comment-footer .wpd-vote-down",e("#comment-"+o));p.removeClass("wpd-up"),r.removeClass("wpd-down"),d.data.curUserReaction>0?p.addClass("wpd-up"):d.data.curUserReaction<0&&r.addClass("wpd-down")}else d.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[d.data],"error");ie(d,o,a)}else console.log(d);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(a,o,d){console.log(d),e(t).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate("body","click",function(t){var a=e(".wpdiscuz-sort-buttons");e(t.target).hasClass("wpdf-sorting")||e(t.target).parent().hasClass("wpdf-sorting")?a.css({display:a.is(":visible")?"none":"flex"}):a.hide()}),e(document).delegate(".wpdiscuz-sort-button:not(.wpdiscuz-sort-button-active)","click",function(){var t=e(this),a=e(this).attr("data-sorting");if(a){e(".wpdiscuz-sort-button.wpdiscuz-sort-button-active").removeClass("wpdiscuz-sort-button-active").appendTo(".wpdiscuz-sort-buttons"),t.addClass("wpdiscuz-sort-button-active").prependTo(".wpdf-sorting");var o=new FormData;o.append("action","wpdSorting"),o.append("sorting",a);var d=e(".wpdf-active").attr("data-filter-type");o.append("wpdType",d||""),ce(z,!0,o).done(function(t){"object"==typeof t&&t.success&&(e("#wpdcom .wpd-comment").remove(),e("#wpdcom .wpd-thread-list").prepend(t.data.message),K(t,!1),M=1),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),window.onhashchange=function(){P(!1)},1!=m&&P(!1),e(document).delegate(".wpdiscuz-readmore","click",function(){var t=V(e(this)),a=B(t),o=new FormData;o.append("action","wpdReadMore"),o.append("commentId",a),ce(z,!0,o).done(function(o){"object"==typeof o?(o.success?(e("#comment-"+a+" .wpd-comment-text").html(" "+o.data.message),e("#wpdiscuz-readmore-"+t).remove()):console.log(o.data),ie(o)):console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-required-group","change",function(){0!==e("input:checked",this).length?e("input",e(this)).removeAttr("required"):e("input",e(this)).attr("required","required")}),e(document).delegate(".wpdiscuz-spoiler","click",function(){e(this).next().slideToggle(),e(this).hasClass("wpdiscuz-spoiler-closed")?e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-plus").removeClass("fa-plus").addClass("fa-minus"):e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-minus").removeClass("fa-minus").addClass("fa-plus"),e(this).toggleClass("wpdiscuz-spoiler-closed")}),e(document).delegate(".wpd-tools i","click",function(){var t=e(this).siblings(".wpd-tools-actions");t.css({display:t.is(":visible")?"none":"flex"})}),e(document).delegate(".wpd-comment-right","mouseleave",function(){e(this).find(".wpd-tools-actions").hide()}),e(document).delegate(".wpd_stick_btn","click",function(){var t=B(V(e(this),0)),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",t),ce(z,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd_close_btn","click",function(){var t=B(V(e(this),0)),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",t),ce(z,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-filter.wpd_not_clicked[data-filter-type]","click",function(){var t=e(this),a=t.attr("data-filter-type");wpdiscuzAjaxObj.resetActiveFilters(".wpdf-"+a),t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=new FormData;o.append("action","wpdLoadMoreComments");var d=e(".wpdiscuz-sort-button-active").attr("data-sorting");d&&o.append("sorting",d),o.append("lastParentId",0),o.append("offset",0),M=1,o.append("wpdType",t.hasClass("wpdf-active")?"":a),o.append("isFirstLoad",1),e(this).hasClass("wpdf-inline")?e(this).hasClass("wpdf-active")?e(".wpd-comment-info-bar").hide():e(".wpd-comment-info-bar").css("display","flex"):e(".wpd-comment-info-bar").hide(),ce(z,!1,o).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(t.toggleClass("wpdf-active"),e(".wpd-load-comments").remove(),e(".wpd-comment").remove(),e(".wpd-thread-list").prepend(a.data.comment_list),K(a),r=a.data.loadLastCommentId,e(".wpd-load-more-submit").blur(),ie(a)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpdf-reacted.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdMostReactedComment"),ce(z,!1,a).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(e("#comment-"+a.data.parentCommentID).length?e("#comment-"+a.data.parentCommentID).parents("[id^=wpd-comm-"+a.data.parentCommentID+"]").replaceWith(a.data.message):e("#comment-"+a.data.commentId).length||e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3))}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e(document).delegate(".wpdf-hottest.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdHottestThread"),ce(z,!1,a).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(e("#comment-"+a.data.commentId).length?e("#comment-"+a.data.commentId).parents("[id^=wpd-comm-"+a.data.commentId+"]").replaceWith(a.data.message):e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3))}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e(document).delegate(".wpd-filter-view-all","click",function(){e(".wpdf-inline.wpdf-active.wpd_not_clicked").trigger("click")}),e(document).delegate(".wpd-follow-link.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=B(V(t,0)),o=new FormData;o.append("action","wpdFollowUser"),o.append("commentId",a),ce(z,!0,o).done(function(a){t.addClass("wpd_not_clicked"),"object"==typeof a?a.success?(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data.code],"success"),t.removeClass("wpd-follow-active"),a.data.followTip&&t.attr("wpd-tooltip",a.data.followTip),a.data.followClass&&t.addClass(a.data.followClass)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"):console.log(a),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),Z(),e(document).delegate(".wc_email","keyup",function(){Z(e(this))}),j&&e("#wpdcom").length){if(e("#wpd-bubble-wrapper").hover(function(){e(this).addClass("wpd-bubble-hover")},function(){e(this).removeClass("wpd-bubble-hover")}),k&&!Cookies.get(wpdiscuzAjaxObj.cookieHideBubbleHint)&&setTimeout(function(){e("#wpd-bubble-wrapper").addClass("wpd-bubble-hover"),Cookies.set(wpdiscuzAjaxObj.cookieHideBubbleHint,"1",{expires:7,path:"/"}),setTimeout(function(){e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")},1e3*x)},1e3*k),"content_left"===O)if(e(".entry-content").length){var ee=(te=Math.min(e(".entry-content").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){ee=(te=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var te;ee=(te=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner");else"left_corner"===O?(e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner")):"right_corner"===O&&(e("#wpd-bubble-wrapper").css({right:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-right-corner"));e("#wpd-bubble-wrapper").show(),e("#wpd-bubble-add-message-close").click(function(t){t.preventDefault(),t.stopPropagation(),e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")}),e("#wpd-bubble").click(function(){e("html, body").animate({scrollTop:e("#wpdcom").offset().top-60},1e3,function(){wpdiscuzLoadRichEditor?wpDiscuzEditor.createEditor("#wpd-editor-0_0").focus():e("#wc-textarea-0_0").focus()})}),e("#wpd-bubble-comment-close").click(function(t){t.preventDefault(),e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")}),e("#wpd-bubble-comment-reply-link a").click(function(){var t=e(this).attr("href");setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),P(!0);var a=t.match(/#comment\-(\d+)/);D=D.filter(function(e){return e!=a[1]}),e("#wpd-bubble-count .wpd-new-comments-count").text(D.length),0==D.length&&e("#wpd-bubble-count").removeClass("wpd-new-comments")},100)}),e("#wpd-bubble-count").click(function(){if(D.length){var t=new FormData;t.append("action","wpdBubbleUpdate"),t.append("newCommentIds",D.join()),ce(z,!0,t).done(function(t){"object"==typeof t&&t.success&&(t.data.message=t.data.message.filter(function(t){if(!e("#comment-"+t.comment_id).length)return t}),Q(t),e("#wpd-bubble-count").removeClass("wpd-new-comments"),e("#wpd-bubble-count .wpd-new-comments-count").text("0"),D=[],e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-60},1e3),ie(t)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(e,t,a){console.log(a)})}})}if((j&&C||i)&&(t||!t&&p)&&setTimeout(function t(){e.ajax({type:"GET",url:wpdiscuzAjaxObj.bubbleUpdateUrl,data:{postId:s,lastId:l,visibleCommentIds:Y()}}).done(function(a){if(!E)if("object"==typeof a){if(a.ids.length){i&&((n=new FormData).append("action","wpdUpdateAutomatically"),n.append("loadLastCommentId",r),n.append("visibleCommentIds",Y()),ce(z,!1,n).done(function(t){E||"object"==typeof t&&t.success&&(Q(t),e(".wpd-thread-info").html(t.data.wc_all_comments_count_new_html),t.data.wc_all_comments_count_new=parseInt(t.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").text(t.data.wc_all_comments_count_new),t.data.wc_all_comments_count_new?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),r=t.data.loadLastCommentId)}).fail(function(e,t,a){console.log(a)})),a.ids=a.ids.filter(function(t){if(!e("#comment-"+t).length)return t});var o=5e3;l=parseInt(a.ids[a.ids.length-1]),D=D.concat(a.ids),y&&a.commentText&&(e("#wpd-bubble-author-avatar").html(a.avatar),e("#wpd-bubble-author-name").html(a.authorName),e("#wpd-bubble-comment-date span").html(a.commentDate),e("#wpd-bubble-comment-text").html(a.commentText),e("#wpd-bubble-comment-reply-link a").attr("href",a.commentLink),e("#wpd-bubble-notification-message").show(),o=1e4);var d=parseInt(e(".wpd-new-comments-count").text());d+=a.ids.length,e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),e("#wpd-bubble-wrapper").addClass("wpd-new-comment-added"),setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")},o),e(".wpd-new-comments-count").text(d),e("#wpd-bubble-count").addClass("wpd-new-comments"),a.all_comments_count=parseInt(a.all_comments_count),e("#wpd-bubble-all-comments-count").text(a.all_comments_count),a.all_comments_count?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),e(".wpd-thread-info").html(a.all_comments_count_html)}}else console.log(a);var n;setTimeout(t,c)}).fail(function(e,a,o){console.log(o),setTimeout(t,c)})},c),e(".wpd-inline-form-wrapper").length){var ae=new FormData;ae.append("action","wpdGetInlineCommentForm"),ce(z,!1,ae).done(function(t){"object"==typeof t?t.success?(e(".wpd-inline-form-wrapper").append(t.data),e.each(e("[name=_wpd_inline_nonce]"),function(){var t=e(this).attr("id"),a=e(this).parents(".wpd-inline-shortcode").attr("id");e(this).attr("id",t+"-"+a.substring(a.lastIndexOf("-")+1))}),e(".wpd-inline-opened").addClass("wpd-active"),e(".wpd-inline-opened").find(".wpd-inline-form-wrapper").show(),e(".wpd-inline-opened").find(".wpd-inline-icon").addClass("wpd-open"),e(".wpd-inline-opened").find(".wpd-inline-icon").removeClass("wpd-ignored"),se()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t)}).fail(function(e,t,a){console.log(a)})}function oe(t){if(e(t).hasClass("wpd-inline-shortcode"))var a=e(t).attr("id");else a=e(t).parents(".wpd-inline-shortcode").attr("id");return a.substring(a.lastIndexOf("-")+1)}function de(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function ne(){e.each(e(".wpd-inline-shortcode:not(.wpd-inline-opened) .wpd-inline-icon"),function(){var t=e(this),a=t.offset().top-window.pageYOffset;a>0&&a<300&&("blink"===A?(t.addClass("wpd-blink"),setTimeout(function(){t.removeClass("wpd-blink")},3e3)):(t.parents(".wpd-inline-shortcode").addClass("wpd-active"),t.siblings(".wpd-inline-form-wrapper").show(),t.addClass("wpd-open"),se(t.siblings(".wpd-inline-form-wrapper"))))})}function se(t){if(t){if(t.offset().left<=10)t.css("left",Math.ceil(parseInt(t.css("left"))-t.offset().left+10)),(a=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2))<3&&(a=3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+a+"px;");else if(t.offset().left+t.width()>document.body.clientWidth-10){var a;t.css("left",Math.ceil(parseInt(t.css("left"))+(document.body.clientWidth-(t.offset().left+t.width()))-10)),(a=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2))>t.width()-3&&(a=t.width()-3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+a+"px;")}}else e.each(e(".wpd-inline-form-wrapper:visible"),function(){if(e(this).offset().left<=10)e(this).css("left",Math.ceil(parseInt(e(this).css("left"))-e(this).offset().left+10)),(t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2))<3&&(t=3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;");else if(e(this).offset().left+e(this).width()>document.body.clientWidth-10){var t;e(this).css("left",Math.ceil(parseInt(e(this).css("left"))+(document.body.clientWidth-(e(this).offset().left+e(this).width()))-10)),(t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2))>e(this).width()-3&&(t=e(this).width()-3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;")}})}function ie(t,a,o,d){t.data.callbackFunctions&&e.each(t.data.callbackFunctions,function(e){"function"==typeof wpdiscuzAjaxObj[t.data.callbackFunctions[e]]?wpdiscuzAjaxObj[t.data.callbackFunctions[e]](t,a,o,d):console.log(t.data.callbackFunctions[e]+" is not a function")})}function ce(t,a,o){a&&e("#wpdiscuz-loading-bar").show(),o.append("postId",s);var d=o.get("action");wpdiscuzAjaxObj.dataFilterCallbacks&&wpdiscuzAjaxObj.dataFilterCallbacks[d]&&e.each(wpdiscuzAjaxObj.dataFilterCallbacks[d],function(e){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[d][e]]&&(o=wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[d][e]](o,t,a))});var n=t?wpdiscuzAjaxObj.url:wpdiscuzAjaxObj.customAjaxUrl;return e.ajax({type:"POST",url:n,data:o,contentType:!1,processData:!1})}e(document).delegate("body","click",function(t){if(e(t.target).hasClass("wpd-inline-form-close")||e(t.target).parents(".wpd-inline-form-close").length)t.preventDefault(),e(t.target).parents(".wpd-inline-form-wrapper").hide(),e(t.target).parents(".wpd-inline-shortcode").removeClass("wpd-active"),e(t.target).parents(".wpd-inline-form-wrapper").siblings(".wpd-inline-icon").removeClass("wpd-open");else if(!e(t.target).hasClass("wpd-inline-form-wrapper")&&!e(t.target).parents(".wpd-inline-form-wrapper").length){de();var a="";e(t.target).hasClass("wpd-inline-icon")?a=e(t.target):e(t.target).parents(".wpd-inline-icon").length&&(a=e(t.target).parents(".wpd-inline-icon")),a.length&&(a.parents(".wpd-inline-shortcode").addClass("wpd-active"),a.siblings(".wpd-inline-form-wrapper").show(),a.addClass("wpd-open"),a.removeClass("wpd-ignored"),se(a.siblings(".wpd-inline-form-wrapper")))}(!e(t.target).hasClass("wpd-last-inline-comments-wrapper")&&!e(t.target).parents(".wpd-last-inline-comments-wrapper").length||e(t.target).parents(".wpd-last-inline-comments-wrapper").length&&e(t.target).hasClass("wpd-load-inline-comment"))&&e(".wpd-last-inline-comments-wrapper").remove()}),e(document).delegate(".wpd-inline-submit.wpd_not_clicked","click",function(t){t.preventDefault();var a=e(this),o=e(this).parents(".wpd_inline_comm_form");if(o[0].checkValidity()){e(this).removeClass("wpd_not_clicked");var d=new FormData;d.append("action","wpdAddInlineComment"),d.append("inline_form_id",oe(o)),e.each(e("input, textarea",o),function(t,a){"checkbox"===this.type?e(this).is(":checked")&&d.append(e(a).attr("name"),e(a).val()):d.append(e(a).attr("name"),e(a).val())}),ce(z,!0,d).done(function(t){if(a.addClass("wpd_not_clicked"),"object"==typeof t)if(t.success){o[0].reset(),de();var d=parseInt(t.data.newCount),n=a.parents(".wpd-inline-icon-wrapper").find(".wpd-inline-icon-count");n.text(d),d?n.addClass("wpd-has-comments"):n.removeClass("wpd-has-comments"),e(".wpd-thread-info").html(t.data.allCommentsCountNewHtml),t.data.allCommentsCountNew=parseInt(t.data.allCommentsCountNew),e("#wpd-bubble-all-comments-count").text(t.data.allCommentsCountNew),t.data.allCommentsCountNew?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),t.data.message&&X(t.data.message),wpdiscuzAjaxObj.setCommentMessage(t.data.notification,"success")}else t.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error");else wpdiscuzAjaxObj.setCommentMessage(t,"error");e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(document).delegate(".wpd-form","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_comm_submit").trigger("click")}),e(document).delegate("#wpdiscuz-edit-form","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_save_edited_comment").trigger("click")}),e(document).delegate(".wpd-inline-comment-content","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).parents(".wpd_inline_comm_form").find(".wpd-inline-submit.wpd_not_clicked").trigger("click")}),e(document).delegate(".wpd-inline-icon-count.wpd-has-comments","click",function(){var t=e(this),a=new FormData;a.append("action","wpdGetLastInlineComments"),a.append("inline_form_id",oe(t)),ce(z,!0,a).done(function(a){"object"==typeof a?a.success?e(a.data).insertAfter(t):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"):console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-view-all-inline-comments","click",function(t){t.preventDefault(),e(this).parents(".wpd-last-inline-comments-wrapper").remove(),e(".wpdf-inline").hasClass("wpdf-active")||e(".wpdf-inline").trigger("click"),e("html, body").animate({scrollTop:e(".wpdf-inline").offset().top-32},1e3)}),e(document).delegate(".wpd-feedback-content-link","click",function(t){t.preventDefault();var a=e(this).data("feedback-content-id");e("html, body").animate({scrollTop:e("#wpd-inline-"+a).offset().top-38},1e3,function(){e("#wpd-inline-"+a).addClass("wpd-active")})}),"scroll_open"!==A&&"blink"!==A||(ne(),e(window).scroll(ne)),e(document).delegate("#wpd-post-rating.wpd-not-rated .wpd-rate-starts svg","click",function(){var t=new FormData,a=e(this).index();a>=0&&a<5&&(t.append("action","wpdUserRate"),t.append("rating",a+1),ce(z,!0,t).done(function(t){"object"==typeof t?t.success?location.reload(!0):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}))}),e("#wpdiscuz-subscribe-form").submit(function(t){t.preventDefault();var a,o,n=e(this);if(n[0].checkValidity()&&(a=n,o=!0,"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).length&&!e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).val().length?(o=!1,e(".wpdiscuz-recaptcha",a).css("border","1px solid red")):"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).length&&e(".wpdiscuz-recaptcha",a).css("border","none"),o)){var s=new FormData;s.append("action","wpdAddSubscription"),e("*",n).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&s.append(this.name+"",e(this).val()),"checkbox"!=this.type&&"radio"!=this.type||e(this).is(":checked")&&s.append(this.name+"",e(this).val())}),ce(z,!0,s).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):wpdiscuzAjaxObj.setCommentMessage(t,"error"),e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(".wpd-unsubscribe").click(function(t){t.preventDefault();var a=new FormData;a.append("action","wpdUnsubscribe"),a.append("sid",e(this).data("sid")),a.append("skey",e(this).data("skey")),ce(z,!0,a).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),wpdiscuzAjaxObj.resetActiveFilters=function(t){e(".wpd-filter.wpdf-active"+(t?":not("+t+")":"")).removeClass("wpdf-active")},wpdiscuzAjaxObj.getAjaxObj=ce});var onloadCallback=function(){if(document.getElementById("wpdiscuz-recaptcha-0_0")&&"2.0"===wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.render("wpdiscuz-recaptcha-0_0",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(e){jQuery("#wpdiscuz-recaptcha-field-0_0").val("key")},"expired-callback":function(){jQuery("#wpdiscuz-recaptcha-field-0_0").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}};
1
+ var wpdiscuzLoadRichEditor=parseInt(wpdiscuzAjaxObj.loadRichEditor);if(wpdiscuzLoadRichEditor)var wpDiscuzEditor=new WpdEditor;function wpdMessagesOnInit(e,t){wpdiscuzAjaxObj.setCommentMessage(e,t),setTimeout(function(){location.href=location.href.substring(0,location.href.indexOf("wpdiscuzUrlAnchor")-1)},3e3)}wpdiscuzAjaxObj.setCommentMessage=function(e,t,a){var o="wpdiscuz-message-error";if("[object Array]"===Object.prototype.toString.call(e))for(var d in e)"[object Array]"===Object.prototype.toString.call(t)?"success"===t[d]?o="wpdiscuz-message-success":"warning"===t[d]&&(o="wpdiscuz-message-warning"):"success"===t?o="wpdiscuz-message-success":"warning"===t&&(o="wpdiscuz-message-warning"),jQuery("<div/>").addClass(o).html(e[d]).prependTo("#wpdiscuz-comment-message").delay("[object Array]"===Object.prototype.toString.call(a)?a[d]:a||4e3).fadeOut(1e3,function(){jQuery(this).remove()});else"success"===t?o="wpdiscuz-message-success":"warning"===t&&(o="wpdiscuz-message-warning"),jQuery("<div/>").addClass(o).html(e).prependTo("#wpdiscuz-comment-message").delay(a||4e3).fadeOut(1e3,function(){jQuery(this).remove()})},jQuery(document).ready(function(e){e("body").addClass("wpdiscuz_"+wpdiscuzAjaxObj.version);var t=wpdiscuzAjaxObj.is_user_logged_in,a=1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!t,o=1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&t,d=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,n=parseInt(wpdiscuzAjaxObj.commentListLoadType),s=parseInt(wpdiscuzAjaxObj.wc_post_id),i=parseInt(wpdiscuzAjaxObj.commentListUpdateType),c=1e3*parseInt(wpdiscuzAjaxObj.commentListUpdateTimer),p=parseInt(wpdiscuzAjaxObj.liveUpdateGuests),r=wpdiscuzAjaxObj.loadLastCommentId,l=r,m=parseInt(wpdiscuzAjaxObj.firstLoadWithAjax);Cookies.get("wpdiscuz_comments_sorting")&&Cookies.remove("wpdiscuz_comments_sorting",{path:""}),Cookies.get("wordpress_last_visit")&&Cookies.remove("wordpress_last_visit",{path:""}),Cookies.get("wpdiscuz_last_visit")&&Cookies.remove("wpdiscuz_last_visit",{path:""});var w,u=wpdiscuzAjaxObj.storeCommenterData,f=parseInt(wpdiscuzAjaxObj.wmuEnabled),h=wpdiscuzAjaxObj.isCookiesEnabled,b=!0,g=wpdiscuzAjaxObj.cookiehash,_=parseInt(wpdiscuzAjaxObj.isLoadOnlyParentComments),v=parseInt(wpdiscuzAjaxObj.enableDropAnimation)?500:0,z=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),j=parseInt(wpdiscuzAjaxObj.enableBubble),C=parseInt(wpdiscuzAjaxObj.bubbleLiveUpdate),k=parseInt(wpdiscuzAjaxObj.bubbleHintTimeout),x=parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout)?parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout):5,y=parseInt(wpdiscuzAjaxObj.bubbleShowNewCommentMessage),O=wpdiscuzAjaxObj.bubbleLocation,A=wpdiscuzAjaxObj.inlineFeedbackAttractionType,I=[],T=[],D=[],E=!1,M=1;(e(".wc_social_plugin_wrapper .wp-social-login-provider-list").length?e(".wc_social_plugin_wrapper .wp-social-login-provider-list").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .the_champ_login_container").length?e(".wc_social_plugin_wrapper .the_champ_login_container").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .social_connect_form").length?e(".wc_social_plugin_wrapper .social_connect_form").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .oneall_social_login_providers").length&&e(".wc_social_plugin_wrapper .oneall_social_login .oneall_social_login_providers").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"),wpdiscuzLoadRichEditor&&e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0"),e(document).delegate("#wpdcom .ql-editor, #wpdcom .wc_comment","focus",function(){e(".wpd-form-foot",e(this).parents(".wpd_comm_form")).slideDown(v)}),e(document).delegate("#wpdcom textarea","focus",function(){e(this).next(".autogrow-textarea-mirror").length||e(this).autoGrow()}),t)||S({comment_author:Cookies.get("comment_author_"+g),comment_author_email:Cookies.get("comment_author_email_"+g),comment_author_url:Cookies.get("comment_author_url_"+g)});if(e(".wpd-vote-down.wpd-dislike-hidden").remove(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd"),e(document).delegate("#wpd-editor-source-code-wrapper-bg","click",function(){e(this).hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),wpdiscuzLoadRichEditor&&e(document).delegate("#wpd-insert-source-code","click",function(){var t=wpDiscuzEditor.createEditor("#"+e("#wpd-editor-uid").val());t.deleteText(0,t.getLength(),Quill.sources.USER);var a=e("#wpd-editor-source-code").val();a.length&&t.clipboard.dangerouslyPasteHTML(0,a,Quill.sources.USER),t.update(),e("#wpd-editor-source-code-wrapper-bg").hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),e(document).delegate(".wpd-reply-button","click",function(){var n=V(e(this),0);e(this).hasClass("wpdiscuz-clonned")?(wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+n).focus()},v):setTimeout(function(){e("#wc-textarea-"+n).trigger("focus")},v),e("#wpd-secondary-form-wrapper-"+n).slideToggle(v)):function(a){var o=V(a,0);e("#wpdiscuz_form_anchor-"+o).before(function(t){return e("#wpdiscuz_hidden_secondary_form").html().replace(/wpdiscuzuniqueid/g,t)}(o));var d=e("#wpd-secondary-form-wrapper-"+o);if(!t){var n={comment_author:Cookies.get("comment_author_"+g),comment_author_email:Cookies.get("comment_author_email_"+g),comment_author_url:Cookies.get("comment_author_url_"+g)};S(n)}wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+o).focus()},v):setTimeout(function(){e("#wc-textarea-"+o).trigger("focus")},v);d.slideToggle(v,function(){a.addClass("wpdiscuz-clonned")})}(e(this)),function(t){if((a||o)&&"2.0"===d){var n=B(t);setTimeout(function(){if(!T[n])try{T[n]=grecaptcha.render("wpdiscuz-recaptcha-"+t,{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(a){e("#wpdiscuz-recaptcha-field-"+t).val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-"+t).val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}},1e3)}}(n)}),e(document).delegate("#wpdcom .wpd-comment-link [data-comment-url]","click",function(){var t=e(this).data("comment-url"),a=e("<input/>");a.appendTo("body").css({position:"absolute",top:"-10000000px"}).val(t),a.select(),document.execCommand("copy"),a.remove(),wpdiscuzAjaxObj.setCommentMessage(t+"<br/>"+wpdiscuzAjaxObj.wc_copied_to_clipboard,"success",5e3)}),e(document).delegate(".wpdiscuz-nofollow,.wc_captcha_refresh_img,.wpd-load-more-submit","click",function(e){e.preventDefault()}),e(document).delegate(".wpd-toggle.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked");var a=V(e(this),0),o=e(this),d=e(".fas",o);!o.parents(".wpd-comment:not(.wpd-reply)").children(".wpd-reply").length&&_?function(t,a){var o=B(t),d=new FormData;d.append("action","wpdShowReplies"),d.append("commentId",o),ce(z,!0,d).done(function(o){a.addClass("wpd_not_clicked"),"object"==typeof o&&o.success&&(e("#wpd-comm-"+t).replaceWith(o.data.comment_list),e("#wpd-comm-"+t+" .wpd-toggle .fas").removeClass("fa-chevron-down").addClass("fa-chevron-up"),e("#wpd-comm-"+t+" .wpd-toggle").attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text),e("#wpd-comm-"+t+" .wpd-toggle .wpd-view-replies").remove(),ie(o)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,d){console.log(d),a.addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}(a,t):e("#wpd-comm-"+a+"> .wpd-reply").slideToggle(700,function(){e(this).is(":hidden")?(d.removeClass("fa-chevron-up"),d.addClass("fa-chevron-down"),o.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_show_replies_text)):(d.removeClass("fa-chevron-down"),d.addClass("fa-chevron-up"),o.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text)),t.addClass("wpd_not_clicked")})}),e(document).delegate(".wpd-new-loaded-comment","mouseenter",function(){e(this).removeClass("wpd-new-loaded-comment")}),e(document).delegate(".wpd-sbs-toggle","click",function(){e(".wpdiscuz-subscribe-bar").slideToggle(v)}),parseInt(wpdiscuzAjaxObj.wpDiscuzIsShowOnSubscribeForm)&&!t&&wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&("2.0"===d?(setTimeout(function(){try{grecaptcha.render("wpdiscuz-recaptcha-subscribe-form",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-subscribe-form").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}},1e3),e(document).delegate("#wpdiscuz-subscribe-form","submit",function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val()?e(".wpdiscuz-recaptcha",e(this)).css("border","none"):(e(".wpdiscuz-recaptcha",e(this)).css("border","1px solid red"),t.preventDefault())})):"3.0"===d&&e(document).delegate("#wpdiscuz_subscription_button","click",function(t){var a=e(this).parents("#wpdiscuz-subscribe-form");t.preventDefault();try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/wpdAddSubscription"}).then(function(e){console.log(5555),document.getElementById("wpdiscuz-recaptcha-field-subscribe-form").value=e,a.submit()},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error")}})),(a||o)&&"2.0"===d){var F=e(window).width(),L=e("#wpdcom").width();L>=1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"65%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"35%"})),L>=940&&L<1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"60%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"40%"})),L>=810&&L<940&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"60%"})),L>=730&&L<810&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"45%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"55%"})),L>=610&&L<730&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.85)","-webkit-transform":"scale(0.85)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"43%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"55%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"})),F>650&&(L>=510&&L<610&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"35%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"63%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%",position:"relative",right:"-60px"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),L>=470&&L<510&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"60%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd_main_comm_form .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),L<470&&(e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({margin:"0px auto","transform-origin":"center 0","-webkit-transform-origin":"center 0"}),e("#wpdcom .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc_notification_checkboxes").css({"text-align":"center"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-field-submit").css({"text-align":"center"})))}function R(t,a,o){ce(z||f,!1,a).done(function(a){if(e(o).addClass("wpd_not_clicked"),"object"==typeof a)if(a.success){"collapsed"===wpdiscuzAjaxObj.commentFormView&&e(".wpd-form-foot",t).slideUp(v),e(".wpd-thread-info").html(a.data.wc_all_comments_count_new_html),a.data.wc_all_comments_count_new=parseInt(a.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").text(a.data.wc_all_comments_count_new),a.data.wc_all_comments_count_new?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide();var d=v;a.data.is_main?X(a.data.message):(d=v+700,e("#wpd-secondary-form-wrapper-"+a.data.uniqueid).slideToggle(700),1==a.data.is_in_same_container?e("#wpd-secondary-form-wrapper-"+a.data.uniqueid).after(a.data.message):e("#wpd-comm-"+a.data.uniqueid).after(a.data.message)),function(e){if(!e.data.held_moderate){var t=new FormData;t.append("action","wpdCheckNotificationType"),t.append("comment_id",e.data.new_comment_id),t.append("email",e.data.comment_author_email),t.append("isParent",e.data.is_main),ce(z,!0,t)}}(a),function(e){if(e.data.redirect>0&&e.data.new_comment_id){var t=new FormData;t.append("action","wpdRedirect"),t.append("commentId",e.data.new_comment_id),ce(z,!0,t).done(function(e){"object"==typeof e&&e.success&&setTimeout(function(){location.href=e.data},2e3)}).fail(function(e,t,a){console.log(a)})}}(a),h&&b?function(t){var a=t.comment_author_email,o=t.comment_author,d=t.comment_author_url;null==u?(Cookies.set("comment_author_email_"+g,a),Cookies.set("comment_author_"+g,o),d.length&&Cookies.set("comment_author_url_"+g,d)):(u=parseInt(u),Cookies.set("comment_author_email_"+g,a,{expires:u,path:"/"}),Cookies.set("comment_author_"+g,o,{expires:u,path:"/"}),d.length&&Cookies.set("comment_author_url_"+g,d,{expires:u,path:"/"}));e(".wpd-cookies-checkbox").length&&e(".wpd-cookies-checkbox").attr("checked","checked")}(a.data):b||e(".wpd-cookies-checkbox").removeAttr("checked"),wpdiscuzLoadRichEditor&&wpDiscuzEditor.createEditor("#wpd-editor-"+e(".wpdiscuz_unique_id",t).val()).setContents([{insert:"\n"}]),t.get(0).reset(),S(a.data),e(".wmu-preview-wrap",t).remove(),I.length&&(I.forEach(function(e){e.parents(".wpd-field-checkbox").remove()}),I=[]),parseInt(wpdiscuzAjaxObj.scrollToComment)&&setTimeout(function(){e("html, body").animate({scrollTop:e("#comment-"+a.data.new_comment_id).offset().top-32},1e3)},d),ie(a,t)}else a.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"),ie(a,t));else wpdiscuzAjaxObj.setCommentMessage(a,"error");e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,d){console.log(d),e(o).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}function S(t){e(".wpd_comm_form .wc_name").val(t.comment_author),t.comment_author_email&&t.comment_author_email.indexOf("@example.com")<0&&e(".wpd_comm_form .wc_email").val(t.comment_author_email),t.comment_author_url&&e(".wpd_comm_form .wc_website").val(t.comment_author_url)}function q(t,a){e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").show(),e("#wpd-comm-"+t+" .wpdiscuz-edit-form-wrap").replaceWith(a),e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").show()}e(document).delegate(".wc_comm_submit.wpd_not_clicked","click",function(){var t=e(this),n=1,s=e(this).parents("form");if(s.hasClass("wpd_main_comm_form")||(n=function(t){var a=t.attr("class").split(" "),o="";return e.each(a,function(e,t){"wpd_comment_level"===G(t,!1)&&(o=G(t,!0))}),parseInt(o)+1}(e(this).parents(".wpd-comment"))),J(s,"#wpd-editor-"+e(".wpdiscuz_unique_id",s).val()),s.submit(function(e){e.preventDefault()}),""!==e(".wc_comment",s).val().trim()){if(s[0].checkValidity()&&(c=s,p=!0,"2.0"===d&&e("input[name=wc_captcha]",c).length&&!e("input[name=wc_captcha]",c).val().length?(p=!1,e(".wpdiscuz-recaptcha",c).css("border","1px solid red")):"2.0"===d&&e("input[name=wc_captcha]",c).length&&e(".wpdiscuz-recaptcha",c).css("border","none"),p)){E=!0,function(t){e(".wpd-agreement-checkbox",t).each(function(){e(this).hasClass("wpd_agreement_hide")&&h&&e(this).prop("checked")&&(Cookies.set(e(this).attr("name")+"_"+g,1,{expires:30,path:"/"}),e("input[name="+e(this).attr("name")+"]").each(function(){I.push(e(this))}))})}(s),e(t).removeClass("wpd_not_clicked");var i=new FormData;if(i.append("action","wpdAddComment"),e(":input",s).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&i.append(this.name+"",e(this).val().trim()),"checkbox"!=this.type&&"radio"!=this.type||e(this).is(":checked")&&i.append(this.name+"",e(this).val())}),i.append("wpd_comment_depth",n),wpdiscuzAjaxObj.wpdiscuz_zs&&i.append("wpdiscuz_zs",wpdiscuzAjaxObj.wpdiscuz_zs),e(".wpd-cookies-checkbox",s).length&&!e(".wpd-cookies-checkbox",s).prop("checked")&&(b=!1),e("#wpdiscuz-loading-bar").show(),wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&"3.0"===d&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/addComment"}).then(function(e){i.append("g-recaptcha-response",e),R(s,i,t)},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error"),e("#wpdiscuz-loading-bar").fadeOut(250)}else R(s,i,t)}var c,p;!function(e){if((a||o)&&"2.0"===d){var t=B(e);grecaptcha.reset(T[t])}}(e(".wpdiscuz_unique_id",s).val()),e(".wpdiscuz_reset").val("")}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.wc_msg_required_fields,"error")}),e(document).delegate(".wpd_editable_comment","click",function(){w&&e(".wpdiscuz-edit-form-wrap").length&&q(V(e(".wpdiscuz-edit-form-wrap"),0),w);var t=V(e(this),0),a=B(t),o=new FormData;o.append("action","wpdEditComment"),o.append("commentId",a),w=e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-text").get(0),ce(z,!0,o).done(function(a){if("object"==typeof a)if(a.success){if(e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text").replaceWith(a.data.html),wpdiscuzLoadRichEditor){let o=wpDiscuzEditor.createEditor("#wpd-editor-edit_"+t);o.clipboard.dangerouslyPasteHTML(0,a.data.content),o.update(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd")}else e("#wc-textarea-edit_"+t).val(a.data.content);e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").hide(),e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").hide()}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error");else console.log(a);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wc_save_edited_comment","click",function(){var t=V(e(this)),a=B(t),o=e("#wpd-comm-"+t+" #wpdiscuz-edit-form");if(J(o,"#wpd-editor-edit_"+t),o.submit(function(e){e.preventDefault()}),o[0].checkValidity()){var d=new FormData;d.append("action","wpdSaveEditedComment"),d.append("commentId",a),e(":input",o).each(function(){""!==this.name&&"checkbox"!==this.type&&"radio"!==this.type&&d.append(this.name+"",e(this).val()),"checkbox"!==this.type&&"radio"!==this.type||e(this).is(":checked")&&d.append(this.name+"",e(this).val())}),ce(z,!0,d).done(function(o){"object"==typeof o?(o.success?(q(t,o.data.message),o.data.lastEdited&&(e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").remove(),e(o.data.lastEdited).insertAfter("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text")),o.data.twitterShareLink&&e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_tw").attr("href",o.data.twitterShareLink),o.data.whatsappShareLink&&e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_whatsapp").attr("href",o.data.whatsappShareLink),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[o.data],"error"),ie(o,a)):console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(document).delegate(".wc_cancel_edit","click",function(){var t=V(e(this));q(t,w),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)}),!wpdiscuzAjaxObj.wordpressIsPaginate&&m&&(M=0,1==m?setTimeout(function(){W(!0)},500):e(document).delegate(".wpd-load-comments","click",function(){e(this).parent(".wpd-load-more-submit-wrap").remove(),W(!0)})),e(document).delegate(".wpd-load-more-submit","click",function(){var t=e(this);t.hasClass("wpd-loaded")&&W(!1,t,"wpd-loaded","wpd-loading")});var U=!1;function H(){var t=e("#wpdiscuzHasMoreComments").val(),a=e(document).height(),o=e(window).height()+e(window).scrollTop();a&&o&&(100*o/a>=80&&!1===U&&1==t&&(U=!0,W(!1,e(".wpd-load-more-submit"))))}function W(t,a,o,d){a&&(a.toggleClass(o),a.toggleClass(d));var s=new FormData;s.append("action","wpdLoadMoreComments");var i=e(".wpdiscuz-sort-button-active").attr("data-sorting");i&&s.append("sorting",i),s.append("offset",M),s.append("lastParentId",e(".wpd-load-more-submit").attr("data-lastparentid")),s.append("isFirstLoad",t?1:0);var c=e(".wpdf-active").attr("data-filter-type");s.append("wpdType",c||""),ce(z,!t||1!=m,s).done(function(s){"object"==typeof s&&s.success&&(M++,t&&e(".wpd-comment").remove(),e(".wpdiscuz_single").remove(),e(".wpdiscuz-comment-pagination").before(s.data.comment_list),K(s,t&&2!==n),U=!1,r=s.data.loadLastCommentId,ie(s),t&&P(!1)),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(d))}).fail(function(t,n,s){console.log(s),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(d))})}function K(t,a){var o;0==t.data.is_show_load_more?(e("#wpdiscuzHasMoreComments").val(0),e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide()):(o=t.data.last_parent_id,e(".wpd-load-more-submit").attr("data-lastparentid",o),2!==n&&e(".wpdiscuz-comment-pagination").show(),e("#wpdiscuzHasMoreComments").val(1),a&&e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").show()),ie(t)}function P(t){var a=location.href.match(/#comment\-(\d+)/);if(null!==a){var o=a[1];if(e("#comment-"+o).length)setTimeout(function(){e("html, body").animate({scrollTop:e("#comment-"+o).parents("[id^=wpd-comm-]").offset().top-32},1e3),t&&N(o)},500);else{var d=new FormData;d.append("action","wpdGetSingleComment"),d.append("commentId",o),ce(z,!0,d).done(function(a){if("object"==typeof a&&a.success){var d="#comment-"+o;e("#comment-"+a.data.parentCommentID).length?e("#comment-"+a.data.parentCommentID).parents("[id^=wpd-comm-"+a.data.parentCommentID+"]").replaceWith(a.data.message):e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e(d).offset().top-32},1e3),t&&N(o)}e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}}function N(t){setTimeout(function(){e("#comment-"+t).siblings(".wpd-secondary-form-wrapper").is(":visible")||e("#comment-"+t).find(".wpd-reply-button").trigger("click")},1100)}function Q(e){if(void 0!==e.data.message)for(var t,a=e.data.message,o=0;o<a.length;o++)$((t=a[o]).comment_parent,t.comment_html)}function V(e,t){var a="";return(a=t?e.parents(".wpd-main-form-wrapper").attr("id"):e.parents(".wpd-comment").attr("id")).substring(a.lastIndexOf("-")+1)}function B(e){return e.substring(0,e.indexOf("_"))}function G(e,t){return t?e.substring(e.indexOf("-")+1):e.substring(0,e.indexOf("-"))}function $(t,a){if(0==t)X(a);else{var o=V(e("#comment-"+t),0);e("#wpdiscuz_form_anchor-"+o).after(a)}}function Y(){var t,a,o="";return e(".wpd-comment-right").each(function(){t=V(e(this),0),a=B(t),o+=a+","}),o}function J(t,a){var o=t.find(".wpd-required-group");wpdiscuzLoadRichEditor&&t.find(".wc_comment").val(e(a+">.ql-editor").html()),function(e){var t=e.find(".wc_comment"),a=t.val().trim().replace(/<p><br><\/p>/g,"\n").replace(/<p>(.*?)<\/p>/g,"$1\n");a=(a=(a=(a=a.replace(/<img src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g," $3 ")).replace(/<img[^>]+alt=["|']([^"|']+)["|'][^>]+src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'][^>]?>/g," $1 ")).replace(/<img\s+([^>]*)class=["|']wpdem\-sticker["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g," $3 ")).replace(/<img\s+([^>]*)src=["|']([^"|']+)["|'](.*?)[^>]*>/g," $2 "),t.val(a)}(t),e.each(o,function(){e("input",this).removeAttr("required"),0===e("input:checked",this).length?e("input",e(this)).attr("required","required"):e(".wpd-field-invalid",this).remove()})}function X(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function Z(t){t?t.prop("required")||(t.val()?t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none")):e.each(e(".wc_email"),function(t,a){var o=e(a);o.prop("required")||(o.val()?o.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):o.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none"))})}if(2!==n||wpdiscuzAjaxObj.wordpressIsPaginate||(e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide(),H(),e(window).scroll(function(){H()})),wpdiscuzAjaxObj.setLoadMoreVisibility=K,e(document).delegate(".wpd-vote-up.wpd_not_clicked, .wpd-vote-down.wpd_not_clicked","click",function(){var t=e(this);e(t).removeClass("wpd_not_clicked");var a,o=B(V(t));a=e(this).hasClass("wpd-vote-up")?1:-1;var d=new FormData;d.append("action","wpdVoteOnComment"),d.append("commentId",o),d.append("voteType",a),ce(z,!0,d).done(function(d){if(e(t).addClass("wpd_not_clicked"),"object"==typeof d){if(d.success){if("total"===d.data.buttonsStyle){var n=e(".wpd-comment-footer .wpd-vote-result",e("#comment-"+o)),s=d.data.votes;n.text(s),n.removeClass("wpd-up wpd-down"),s>0&&n.addClass("wpd-up"),s<0&&n.addClass("wpd-down")}else{var i=e(".wpd-comment-footer .wpd-vote-result-like",e("#comment-"+o)),c=e(".wpd-comment-footer .wpd-vote-result-dislike",e("#comment-"+o));i.text(d.data.likeCount),c.text(d.data.dislikeCount),parseInt(d.data.likeCount)>0?i.addClass("wpd-up"):i.removeClass("wpd-up"),parseInt(d.data.dislikeCount)<0?c.addClass("wpd-down"):c.removeClass("wpd-down")}var p=e(".wpd-comment-footer .wpd-vote-up",e("#comment-"+o)),r=e(".wpd-comment-footer .wpd-vote-down",e("#comment-"+o));p.removeClass("wpd-up"),r.removeClass("wpd-down"),d.data.curUserReaction>0?p.addClass("wpd-up"):d.data.curUserReaction<0&&r.addClass("wpd-down")}else d.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[d.data],"error");ie(d,o,a)}else console.log(d);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(a,o,d){console.log(d),e(t).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate("body","click",function(t){var a=e(".wpdiscuz-sort-buttons");e(t.target).hasClass("wpdf-sorting")||e(t.target).parent().hasClass("wpdf-sorting")?a.css({display:a.is(":visible")?"none":"flex"}):a.hide()}),e(document).delegate(".wpdiscuz-sort-button:not(.wpdiscuz-sort-button-active)","click",function(){var t=e(this),a=e(this).attr("data-sorting");if(a){e(".wpdiscuz-sort-button.wpdiscuz-sort-button-active").removeClass("wpdiscuz-sort-button-active").appendTo(".wpdiscuz-sort-buttons"),t.addClass("wpdiscuz-sort-button-active").prependTo(".wpdf-sorting");var o=new FormData;o.append("action","wpdSorting"),o.append("sorting",a);var d=e(".wpdf-active").attr("data-filter-type");o.append("wpdType",d||""),ce(z,!0,o).done(function(t){"object"==typeof t&&t.success&&(e("#wpdcom .wpd-comment").remove(),e("#wpdcom .wpd-thread-list").prepend(t.data.message),K(t,!1),M=1),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),window.onhashchange=function(){P(!1)},1!=m&&P(!1),e(document).delegate(".wpdiscuz-readmore","click",function(){var t=V(e(this)),a=B(t),o=new FormData;o.append("action","wpdReadMore"),o.append("commentId",a),ce(z,!0,o).done(function(o){"object"==typeof o?(o.success?(e("#comment-"+a+" .wpd-comment-text").replaceWith(" "+o.data.message),e("#wpdiscuz-readmore-"+t).remove()):console.log(o.data),ie(o)):console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-required-group","change",function(){0!==e("input:checked",this).length?e("input",e(this)).removeAttr("required"):e("input",e(this)).attr("required","required")}),e(document).delegate(".wpdiscuz-spoiler","click",function(){e(this).next().slideToggle(),e(this).hasClass("wpdiscuz-spoiler-closed")?e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-plus").removeClass("fa-plus").addClass("fa-minus"):e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-minus").removeClass("fa-minus").addClass("fa-plus"),e(this).toggleClass("wpdiscuz-spoiler-closed")}),e(document).delegate(".wpd-tools i","click",function(){var t=e(this).siblings(".wpd-tools-actions");t.css({display:t.is(":visible")?"none":"flex"})}),e(document).delegate(".wpd-comment-right","mouseleave",function(){e(this).find(".wpd-tools-actions").hide()}),e(document).delegate(".wpd_stick_btn","click",function(){var t=B(V(e(this),0)),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",t),ce(z,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd_close_btn","click",function(){var t=B(V(e(this),0)),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",t),ce(z,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-filter.wpd_not_clicked[data-filter-type]","click",function(){var t=e(this),a=t.attr("data-filter-type");wpdiscuzAjaxObj.resetActiveFilters(".wpdf-"+a),t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=new FormData;o.append("action","wpdLoadMoreComments");var d=e(".wpdiscuz-sort-button-active").attr("data-sorting");d&&o.append("sorting",d),o.append("lastParentId",0),o.append("offset",0),M=1,o.append("wpdType",t.hasClass("wpdf-active")?"":a),o.append("isFirstLoad",1),e(this).hasClass("wpdf-inline")?e(this).hasClass("wpdf-active")?e(".wpd-comment-info-bar").hide():e(".wpd-comment-info-bar").css("display","flex"):e(".wpd-comment-info-bar").hide(),ce(z,!1,o).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(t.toggleClass("wpdf-active"),e(".wpd-load-comments").remove(),e(".wpd-comment").remove(),e(".wpd-thread-list").prepend(a.data.comment_list),K(a),r=a.data.loadLastCommentId,e(".wpd-load-more-submit").blur(),ie(a)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpdf-reacted.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdMostReactedComment"),ce(z,!1,a).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(e("#comment-"+a.data.parentCommentID).length?e("#comment-"+a.data.parentCommentID).parents("[id^=wpd-comm-"+a.data.parentCommentID+"]").replaceWith(a.data.message):e("#comment-"+a.data.commentId).length||e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3))}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e(document).delegate(".wpdf-hottest.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdHottestThread"),ce(z,!1,a).done(function(a){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(e("#comment-"+a.data.commentId).length?e("#comment-"+a.data.commentId).parents("[id^=wpd-comm-"+a.data.commentId+"]").replaceWith(a.data.message):e(".wpd-thread-list").prepend(a.data.message),ie(a),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3))}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e(document).delegate(".wpd-filter-view-all","click",function(){e(".wpdf-inline.wpdf-active.wpd_not_clicked").trigger("click")}),e(document).delegate(".wpd-follow-link.wpd_not_clicked","click",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=B(V(t,0)),o=new FormData;o.append("action","wpdFollowUser"),o.append("commentId",a),ce(z,!0,o).done(function(a){t.addClass("wpd_not_clicked"),"object"==typeof a?a.success?(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data.code],"success"),t.removeClass("wpd-follow-active"),a.data.followTip&&t.attr("wpd-tooltip",a.data.followTip),a.data.followClass&&t.addClass(a.data.followClass)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"):console.log(a),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(a,o,d){console.log(d),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),Z(),e(document).delegate(".wc_email","keyup",function(){Z(e(this))}),j&&e("#wpdcom").length){if(e("#wpd-bubble-wrapper").hover(function(){e(this).addClass("wpd-bubble-hover")},function(){e(this).removeClass("wpd-bubble-hover")}),k&&!Cookies.get(wpdiscuzAjaxObj.cookieHideBubbleHint)&&setTimeout(function(){e("#wpd-bubble-wrapper").addClass("wpd-bubble-hover"),Cookies.set(wpdiscuzAjaxObj.cookieHideBubbleHint,"1",{expires:7,path:"/"}),setTimeout(function(){e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")},1e3*x)},1e3*k),"content_left"===O)if(e(".entry-content").length){var ee=(te=Math.min(e(".entry-content").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){ee=(te=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var te;ee=(te=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120)>25?te:25;e("#wpd-bubble-wrapper").css({left:ee+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner");else"left_corner"===O?(e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner")):"right_corner"===O&&(e("#wpd-bubble-wrapper").css({right:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-right-corner"));e("#wpd-bubble-wrapper").show(),e("#wpd-bubble-add-message-close").click(function(t){t.preventDefault(),t.stopPropagation(),e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")}),e("#wpd-bubble").click(function(){e("html, body").animate({scrollTop:e("#wpdcom").offset().top-60},1e3,function(){e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover"),wpdiscuzLoadRichEditor?e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0").focus():e("#wc-textarea-0_0").length&&e("#wc-textarea-0_0").focus()})}),e("#wpd-bubble-comment-close").click(function(t){t.preventDefault(),e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")}),e("#wpd-bubble-comment-reply-link a").click(function(){var t=e(this).attr("href");setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),P(!0);var a=t.match(/#comment\-(\d+)/);D=D.filter(function(e){return e!=a[1]}),e("#wpd-bubble-count .wpd-new-comments-count").text(D.length),0==D.length&&e("#wpd-bubble-count").removeClass("wpd-new-comments")},100)}),e("#wpd-bubble-count").click(function(){if(D.length){var t=new FormData;t.append("action","wpdBubbleUpdate"),t.append("newCommentIds",D.join()),ce(z,!0,t).done(function(t){"object"==typeof t&&t.success&&(t.data.message=t.data.message.filter(function(t){if(!e("#comment-"+t.comment_id).length)return t}),Q(t),e("#wpd-bubble-count").removeClass("wpd-new-comments"),e("#wpd-bubble-count .wpd-new-comments-count").text("0"),D=[],e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-60},1e3),ie(t)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(e,t,a){console.log(a)})}})}if((j&&C||i)&&(t||!t&&p)&&setTimeout(function t(){e.ajax({type:"GET",url:wpdiscuzAjaxObj.bubbleUpdateUrl,data:{postId:s,lastId:l,visibleCommentIds:Y()}}).done(function(a){if(!E)if("object"==typeof a){if(a.ids.length){i&&((n=new FormData).append("action","wpdUpdateAutomatically"),n.append("loadLastCommentId",r),n.append("visibleCommentIds",Y()),ce(z,!1,n).done(function(t){E||"object"==typeof t&&t.success&&(Q(t),e(".wpd-thread-info").html(t.data.wc_all_comments_count_new_html),t.data.wc_all_comments_count_new=parseInt(t.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").text(t.data.wc_all_comments_count_new),t.data.wc_all_comments_count_new?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),r=t.data.loadLastCommentId)}).fail(function(e,t,a){console.log(a)})),a.ids=a.ids.filter(function(t){if(!e("#comment-"+t).length)return t});var o=5e3;l=parseInt(a.ids[a.ids.length-1]),D=D.concat(a.ids),y&&a.commentText&&(e("#wpd-bubble-author-avatar").html(a.avatar),e("#wpd-bubble-author-name").html(a.authorName),e("#wpd-bubble-comment-date span").html(a.commentDate),e("#wpd-bubble-comment-text").html(a.commentText),e("#wpd-bubble-comment-reply-link a").attr("href",a.commentLink),e("#wpd-bubble-notification-message").show(),o=1e4);var d=parseInt(e(".wpd-new-comments-count").text());d+=a.ids.length,e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),e("#wpd-bubble-wrapper").addClass("wpd-new-comment-added"),setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")},o),e(".wpd-new-comments-count").text(d),e("#wpd-bubble-count").addClass("wpd-new-comments"),a.all_comments_count=parseInt(a.all_comments_count),e("#wpd-bubble-all-comments-count").text(a.all_comments_count),a.all_comments_count?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),e(".wpd-thread-info").html(a.all_comments_count_html)}}else console.log(a);var n;setTimeout(t,c)}).fail(function(e,a,o){console.log(o),setTimeout(t,c)})},c),e(".wpd-inline-form-wrapper").length){var ae=new FormData;ae.append("action","wpdGetInlineCommentForm"),ce(z,!1,ae).done(function(t){"object"==typeof t?t.success?(e(".wpd-inline-form-wrapper").append(t.data),e.each(e("[name=_wpd_inline_nonce]"),function(){var t=e(this).attr("id"),a=e(this).parents(".wpd-inline-shortcode").attr("id");e(this).attr("id",t+"-"+a.substring(a.lastIndexOf("-")+1))}),e(".wpd-inline-opened").addClass("wpd-active"),e(".wpd-inline-opened").find(".wpd-inline-form-wrapper").show(),e(".wpd-inline-opened").find(".wpd-inline-icon").addClass("wpd-open"),e(".wpd-inline-opened").find(".wpd-inline-icon").removeClass("wpd-ignored"),se()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t)}).fail(function(e,t,a){console.log(a)})}function oe(t){if(e(t).hasClass("wpd-inline-shortcode"))var a=e(t).attr("id");else a=e(t).parents(".wpd-inline-shortcode").attr("id");return a.substring(a.lastIndexOf("-")+1)}function de(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function ne(){e.each(e(".wpd-inline-shortcode:not(.wpd-inline-opened) .wpd-inline-icon"),function(){var t=e(this),a=t.offset().top-window.pageYOffset;a>0&&a<300&&("blink"===A?(t.addClass("wpd-blink"),setTimeout(function(){t.removeClass("wpd-blink")},3e3)):(t.parents(".wpd-inline-shortcode").addClass("wpd-active"),t.siblings(".wpd-inline-form-wrapper").show(),t.addClass("wpd-open"),se(t.siblings(".wpd-inline-form-wrapper"))))})}function se(t){if(t){if(t.offset().left<=10)t.css("left",Math.ceil(parseInt(t.css("left"))-t.offset().left+10)),(a=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2))<3&&(a=3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+a+"px;");else if(t.offset().left+t.width()>document.body.clientWidth-10){var a;t.css("left",Math.ceil(parseInt(t.css("left"))+(document.body.clientWidth-(t.offset().left+t.width()))-10)),(a=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2))>t.width()-3&&(a=t.width()-3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+a+"px;")}}else e.each(e(".wpd-inline-form-wrapper:visible"),function(){if(e(this).offset().left<=10)e(this).css("left",Math.ceil(parseInt(e(this).css("left"))-e(this).offset().left+10)),(t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2))<3&&(t=3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;");else if(e(this).offset().left+e(this).width()>document.body.clientWidth-10){var t;e(this).css("left",Math.ceil(parseInt(e(this).css("left"))+(document.body.clientWidth-(e(this).offset().left+e(this).width()))-10)),(t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2))>e(this).width()-3&&(t=e(this).width()-3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;")}})}function ie(t,a,o,d){t.data.callbackFunctions&&e.each(t.data.callbackFunctions,function(e){"function"==typeof wpdiscuzAjaxObj[t.data.callbackFunctions[e]]?wpdiscuzAjaxObj[t.data.callbackFunctions[e]](t,a,o,d):console.log(t.data.callbackFunctions[e]+" is not a function")})}function ce(t,a,o){a&&e("#wpdiscuz-loading-bar").show(),o.append("postId",s);var d=o.get("action");wpdiscuzAjaxObj.dataFilterCallbacks&&wpdiscuzAjaxObj.dataFilterCallbacks[d]&&e.each(wpdiscuzAjaxObj.dataFilterCallbacks[d],function(e){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[d][e]]&&(o=wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[d][e]](o,t,a))});var n=t?wpdiscuzAjaxObj.url:wpdiscuzAjaxObj.customAjaxUrl;return e.ajax({type:"POST",url:n,data:o,contentType:!1,processData:!1})}e(document).delegate("body","click",function(t){if(e(t.target).hasClass("wpd-inline-form-close")||e(t.target).parents(".wpd-inline-form-close").length)t.preventDefault(),e(t.target).parents(".wpd-inline-form-wrapper").hide(),e(t.target).parents(".wpd-inline-shortcode").removeClass("wpd-active"),e(t.target).parents(".wpd-inline-form-wrapper").siblings(".wpd-inline-icon").removeClass("wpd-open");else if(!e(t.target).hasClass("wpd-inline-form-wrapper")&&!e(t.target).parents(".wpd-inline-form-wrapper").length){de();var a="";e(t.target).hasClass("wpd-inline-icon")?a=e(t.target):e(t.target).parents(".wpd-inline-icon").length&&(a=e(t.target).parents(".wpd-inline-icon")),a.length&&(a.parents(".wpd-inline-shortcode").addClass("wpd-active"),a.siblings(".wpd-inline-form-wrapper").show(),a.addClass("wpd-open"),a.removeClass("wpd-ignored"),se(a.siblings(".wpd-inline-form-wrapper")))}(!e(t.target).hasClass("wpd-last-inline-comments-wrapper")&&!e(t.target).parents(".wpd-last-inline-comments-wrapper").length||e(t.target).parents(".wpd-last-inline-comments-wrapper").length&&e(t.target).hasClass("wpd-load-inline-comment"))&&e(".wpd-last-inline-comments-wrapper").remove()}),e(document).delegate(".wpd-inline-submit.wpd_not_clicked","click",function(t){t.preventDefault();var a=e(this),o=e(this).parents(".wpd_inline_comm_form");if(o[0].checkValidity()){e(this).removeClass("wpd_not_clicked");var d=new FormData;d.append("action","wpdAddInlineComment"),d.append("inline_form_id",oe(o)),e.each(e("input, textarea",o),function(t,a){"checkbox"===this.type?e(this).is(":checked")&&d.append(e(a).attr("name"),e(a).val()):d.append(e(a).attr("name"),e(a).val())}),ce(z,!0,d).done(function(t){if(a.addClass("wpd_not_clicked"),"object"==typeof t)if(t.success){o[0].reset(),de();var d=parseInt(t.data.newCount),n=a.parents(".wpd-inline-icon-wrapper").find(".wpd-inline-icon-count");n.text(d),d?n.addClass("wpd-has-comments"):n.removeClass("wpd-has-comments"),e(".wpd-thread-info").html(t.data.allCommentsCountNewHtml),t.data.allCommentsCountNew=parseInt(t.data.allCommentsCountNew),e("#wpd-bubble-all-comments-count").text(t.data.allCommentsCountNew),t.data.allCommentsCountNew?e("#wpd-bubble-all-comments-count").show():e("#wpd-bubble-all-comments-count").hide(),t.data.message&&X(t.data.message),wpdiscuzAjaxObj.setCommentMessage(t.data.notification,"success")}else t.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error");else wpdiscuzAjaxObj.setCommentMessage(t,"error");e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(document).delegate(".wpd-form","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_comm_submit").trigger("click")}),e(document).delegate("#wpdiscuz-edit-form","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_save_edited_comment").trigger("click")}),e(document).delegate(".wpd-inline-comment-content","keydown",function(t){t.ctrlKey&&13==t.keyCode&&e(this).parents(".wpd_inline_comm_form").find(".wpd-inline-submit.wpd_not_clicked").trigger("click")}),e(document).delegate(".wpd-inline-icon-count.wpd-has-comments","click",function(){var t=e(this),a=new FormData;a.append("action","wpdGetLastInlineComments"),a.append("inline_form_id",oe(t)),ce(z,!0,a).done(function(a){"object"==typeof a?a.success?e(a.data).insertAfter(t):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"):console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).delegate(".wpd-view-all-inline-comments","click",function(t){t.preventDefault(),e(this).parents(".wpd-last-inline-comments-wrapper").remove(),e(".wpdf-inline").hasClass("wpdf-active")||e(".wpdf-inline").trigger("click"),e("html, body").animate({scrollTop:e(".wpdf-inline").offset().top-32},1e3)}),e(document).delegate(".wpd-feedback-content-link","click",function(t){t.preventDefault();var a=e(this).data("feedback-content-id");e("html, body").animate({scrollTop:e("#wpd-inline-"+a).offset().top-38},1e3,function(){e("#wpd-inline-"+a).addClass("wpd-active")})}),"scroll_open"!==A&&"blink"!==A||(ne(),e(window).scroll(ne)),e(document).delegate("#wpd-post-rating.wpd-not-rated .wpd-rate-starts svg","click",function(){var t=new FormData,a=e(this).index();a>=0&&a<5&&(t.append("action","wpdUserRate"),t.append("rating",a+1),ce(z,!0,t).done(function(t){"object"==typeof t?t.success?location.reload(!0):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}))}),e("#wpdiscuz-subscribe-form").submit(function(t){t.preventDefault();var a,o,n=e(this);if(n[0].checkValidity()&&(a=n,o=!0,"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).length&&!e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).val().length?(o=!1,e(".wpdiscuz-recaptcha",a).css("border","1px solid red")):"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",a).length&&e(".wpdiscuz-recaptcha",a).css("border","none"),o)){var s=new FormData;s.append("action","wpdAddSubscription"),e("*",n).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&s.append(this.name+"",e(this).val()),"checkbox"!=this.type&&"radio"!=this.type||e(this).is(":checked")&&s.append(this.name+"",e(this).val())}),ce(z,!0,s).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):wpdiscuzAjaxObj.setCommentMessage(t,"error"),e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e(".wpd-unsubscribe").click(function(t){t.preventDefault();var a=new FormData;a.append("action","wpdUnsubscribe"),a.append("sid",e(this).data("sid")),a.append("skey",e(this).data("skey")),ce(z,!0,a).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}),wpdiscuzAjaxObj.resetActiveFilters=function(t){e(".wpd-filter.wpdf-active"+(t?":not("+t+")":"")).removeClass("wpdf-active")},wpdiscuzAjaxObj.getAjaxObj=ce});var onloadCallback=function(){if(document.getElementById("wpdiscuz-recaptcha-0_0")&&"2.0"===wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.render("wpdiscuz-recaptcha-0_0",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(e){jQuery("#wpdiscuz-recaptcha-field-0_0").val("key")},"expired-callback":function(){jQuery("#wpdiscuz-recaptcha-field-0_0").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}};
assets/third-party/font-awesome-5.13.0/css/fa.min.css CHANGED
@@ -1,3 +1,3 @@
1
  .fa,.fab,.fad,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1);transform:scale(-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}
2
- .fa-asterisk:before{content:"\f069"}.fa-plus:before{content:"\f067"}.fa-question:before{content:"\f128"}.fa-minus:before{content:"\f068"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before{content:"\f00d"}.fa-remove:before{content:"\f00d"}.fa-times:before{content:"\f00d"}.fa-signal:before{content:"\f012"}.fa-cog:before{content:"\f013"}.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-repeat:before{content:"\f01e"}.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-tag:before{content:"\f02b"}.fa-bookmark:before{content:"\f02e"}.fa-camera:before{content:"\f030"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-video-camera:before{content:"\f03d"}.fa-image:before{content:"\f03e"}.fa-photo:before{content:"\f03e"}.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-edit:before{content:"\f044"}.fa-pencil-square-o:before{content:"\f044"}.fa-check-square-o:before{content:"\f046"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-check-circle-o:before{content:"\f05d"}.fa-mail-forward:before{content:"\f064"}.fa-share:before{content:"\f064"}.fa-exclamation-circle:before{content:"\f06a"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before{content:"\f071"}.fa-warning:before{content:"\f071"}.fa-comment:before{content:"\f075"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-bar-chart:before{content:"\f080"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-cogs:before{content:"\f085"}.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f09a"}.fa-unlock:before{content:"\f09c"}.fa-feed:before{content:"\f09e"}.fa-rss:before{content:"\f09e"}.fa-bell-o:before{content:"\f0a2"}.fa-certificate:before{content:"\f0a3"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-wrench:before{content:"\f0ad"}.fa-group:before{content:"\f0c0"}.fa-users:before{content:"\f0c0"}.fa-chain:before{content:"\f0c1"}.fa-link:before{content:"\f0c1"}.fa-paperclip:before{content:"\f0c6"}.fa-bars:before{content:"\f0c9"}.fa-navicon:before{content:"\f0c9"}.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before{content:"\f0e2"}.fa-undo:before{content:"\f0e2"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before{content:"\f0e7"}.fa-flash:before{content:"\f0e7"}.fa-bell:before{content:"\f0f3"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-mail-reply:before{content:"\f112"}.fa-reply:before{content:"\f112"}.fa-smile-o:before{content:"\f118"}.fa-smile:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-frown:before{content:"\f119"}.fa-flag-o:before{content:"\f11d"}.fa-mail-reply-all:before{content:"\f122"}.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before{content:"\f123"}.fa-star-half-full:before{content:"\f123"}.fa-star-half-o:before{content:"\f123"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-shield:before{content:"\f132"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-unlock-alt:before{content:"\f13e"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-play:before{content:"\f16a"}.fa-vk:before{content:"\f189"}.fa-wordpress:before{content:"\f19a"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-language:before{content:"\f1ab"}.fa-cubes:before{content:"\f1b3"}.fa-life-bouy:before{content:"\f1cd"}.fa-life-buoy:before{content:"\f1cd"}.fa-life-ring:before{content:"\f1cd"}.fa-life-saver:before{content:"\f1cd"}.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-facebook-official:before{content:"\f230"}.fa-whatsapp:before{content:"\f232"}.fa-user-plus:before{content:"\f234"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-fa:before{content:"\f2b4"}.fa-font-awesome:before{content:"\f2b4"}.fa-address-card:before{content:"\f2bb"}.fa-vcard:before{content:"\f2bb"}.fa-address-card-o:before{content:"\f2bc"}.fa-vcard-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-pencil-alt:before{content:"\f303"}.fa-columns:before{content:"\f0db"}.fa-trash-alt:before{content:"\f2ed"}.fa-arrows-alt:before{content:"\f0b2"}.fa-shield-alt:before{content:"\f3ed"}.fa-user-cog:before{content:"\f4fe"}.fa-photo-video:before{content:"\f87c"}.fa-fire:before{content:"\f06d"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-up:before{content:"\f0de"}.fa-thumbtack:before{content:"\f08d"}.fa-instagram:before{content:"\f16d"}.fa-wordpress-simple:before{content:"\f411"}.fa-linkedin-in:before{content:"\f0e1"}.fa-yandex-international:before{content:"\f414"}.fa-at:before{content:"\f1fa"}.fa-weixin:before{content:"\f1d7"}.fa-weibo:before{content:"\f18a"}.fa-qq:before{content:"\f1d6"}.fa-baidu:before{content:"\f1b0"}
3
  .sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:400;font-display:block; src:url(../webfonts/fa-brands-400.eot); src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"), url(../webfonts/fa-brands-400.woff2) format("woff2"), url(../webfonts/fa-brands-400.woff) format("woff"), url(../webfonts/fa-brands-400.ttf) format("truetype"), url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands"} @font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;font-display:block; src:url(../webfonts/fa-regular-400.eot); src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"), url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"), url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.fab,.far{font-weight:400} @font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;font-display:block; src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.far,.fas{font-family:"Font Awesome 5 Free"}.fa,.fas{font-weight:900}
1
  .fa,.fab,.fad,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1);transform:scale(-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}
2
+ .fa-asterisk:before{content:"\f069"}.fa-plus:before{content:"\f067"}.fa-question:before{content:"\f128"}.fa-minus:before{content:"\f068"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before{content:"\f00d"}.fa-remove:before{content:"\f00d"}.fa-times:before{content:"\f00d"}.fa-signal:before{content:"\f012"}.fa-cog:before{content:"\f013"}.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-repeat:before{content:"\f01e"}.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-tag:before{content:"\f02b"}.fa-bookmark:before{content:"\f02e"}.fa-camera:before{content:"\f030"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-video-camera:before{content:"\f03d"}.fa-image:before{content:"\f03e"}.fa-photo:before{content:"\f03e"}.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-edit:before{content:"\f044"}.fa-pencil-square-o:before{content:"\f044"}.fa-check-square-o:before{content:"\f046"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-check-circle-o:before{content:"\f05d"}.fa-mail-forward:before{content:"\f064"}.fa-share:before{content:"\f064"}.fa-exclamation-circle:before{content:"\f06a"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before{content:"\f071"}.fa-warning:before{content:"\f071"}.fa-comment:before{content:"\f075"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-bar-chart:before{content:"\f080"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-cogs:before{content:"\f085"}.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f09a"}.fa-unlock:before{content:"\f09c"}.fa-feed:before{content:"\f09e"}.fa-rss:before{content:"\f09e"}.fa-bell-o:before{content:"\f0a2"}.fa-certificate:before{content:"\f0a3"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-wrench:before{content:"\f0ad"}.fa-group:before{content:"\f0c0"}.fa-users:before{content:"\f0c0"}.fa-chain:before{content:"\f0c1"}.fa-link:before{content:"\f0c1"}.fa-paperclip:before{content:"\f0c6"}.fa-bars:before{content:"\f0c9"}.fa-navicon:before{content:"\f0c9"}.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before{content:"\f0e2"}.fa-undo:before{content:"\f0e2"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before{content:"\f0e7"}.fa-flash:before{content:"\f0e7"}.fa-bell:before{content:"\f0f3"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-mail-reply:before{content:"\f112"}.fa-reply:before{content:"\f112"}.fa-smile-o:before{content:"\f118"}.fa-smile:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-frown:before{content:"\f119"}.fa-flag-o:before{content:"\f11d"}.fa-mail-reply-all:before{content:"\f122"}.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before{content:"\f123"}.fa-star-half-full:before{content:"\f123"}.fa-star-half-o:before{content:"\f123"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-shield:before{content:"\f132"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-unlock-alt:before{content:"\f13e"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-play:before{content:"\f16a"}.fa-vk:before{content:"\f189"}.fa-wordpress:before{content:"\f19a"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-language:before{content:"\f1ab"}.fa-cubes:before{content:"\f1b3"}.fa-life-bouy:before{content:"\f1cd"}.fa-life-buoy:before{content:"\f1cd"}.fa-life-ring:before{content:"\f1cd"}.fa-life-saver:before{content:"\f1cd"}.fa-support:before{content:"\f1cd"}.fa-circle:before{content:"\f111"}.fa-clock:before{content:"\f017"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-facebook-official:before{content:"\f230"}.fa-whatsapp:before{content:"\f232"}.fa-user-plus:before{content:"\f234"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-fa:before{content:"\f2b4"}.fa-font-awesome:before{content:"\f2b4"}.fa-address-card:before{content:"\f2bb"}.fa-vcard:before{content:"\f2bb"}.fa-address-card-o:before{content:"\f2bc"}.fa-vcard-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-pencil-alt:before{content:"\f303"}.fa-columns:before{content:"\f0db"}.fa-trash-alt:before{content:"\f2ed"}.fa-arrows-alt:before{content:"\f0b2"}.fa-shield-alt:before{content:"\f3ed"}.fa-user-cog:before{content:"\f4fe"}.fa-photo-video:before{content:"\f87c"}.fa-fire:before{content:"\f06d"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-up:before{content:"\f0de"}.fa-thumbtack:before{content:"\f08d"}.fa-instagram:before{content:"\f16d"}.fa-wordpress-simple:before{content:"\f411"}.fa-linkedin-in:before{content:"\f0e1"}.fa-yandex-international:before{content:"\f414"}.fa-at:before{content:"\f1fa"}.fa-weixin:before{content:"\f1d7"}.fa-weibo:before{content:"\f18a"}.fa-qq:before{content:"\f1d6"}.fa-baidu:before{content:"\f1b0"}
3
  .sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:400;font-display:block; src:url(../webfonts/fa-brands-400.eot); src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"), url(../webfonts/fa-brands-400.woff2) format("woff2"), url(../webfonts/fa-brands-400.woff) format("woff"), url(../webfonts/fa-brands-400.ttf) format("truetype"), url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands"} @font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;font-display:block; src:url(../webfonts/fa-regular-400.eot); src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"), url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"), url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.fab,.far{font-weight:400} @font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;font-display:block; src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.far,.fas{font-family:"Font Awesome 5 Free"}.fa,.fas{font-weight:900}
assets/third-party/quicktags/index.html ADDED
File without changes
assets/third-party/quicktags/wpdiscuz-quictags.js ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function ($) {
2
+ var id = 'wc-textarea-0_0';
3
+ settings = {
4
+ id: id,
5
+ buttons: 'strong,em,link,ul,ol,li'
6
+ }
7
+ QTags.addButton('wpdiscuz_blockquot', 'b-quote', '<blockquote>', '</blockquote>', '', 'Blockquote', 40);
8
+ QTags.addButton('wpdiscuz_underline', 'U', '<u>', '</u>', '', 'Underline', 50);
9
+ QTags.addButton('wpdiscuz_code', 'code', '`', '`', '', 'Code', 110);
10
+ QTags.addButton('wpdiscuz_spoiler', 'spoiler', '[spoiler title=" "]', '[/spoiler]', '', 'Spoiler', 115);
11
+ quicktags(settings);
12
+
13
+ $(document).delegate('.wpd-reply-button', 'click', function () {
14
+ var uniqueId = 'wc-textarea-' + wpdiscuzGetUniqueId($(this));
15
+ if (uniqueId) {
16
+ var settings = {
17
+ id: uniqueId,
18
+ buttons: 'strong,em,link,ul,ol,li'
19
+ }
20
+ quicktags(settings);
21
+ QTags._buttonsInit();
22
+ }
23
+ });
24
+ function wpdiscuzGetUniqueId(field) {
25
+ var uniqueId = 0;
26
+ if (field.parents('.wpd-comment').attr('id')) {
27
+ uniqueId = field.parents('.wpd-comment').attr('id');
28
+ }
29
+ if (uniqueId !== 0 && uniqueId.length) {
30
+ uniqueId = uniqueId.substring(uniqueId.lastIndexOf('-') + 1);
31
+ }
32
+ return uniqueId;
33
+ }
34
+ });
35
+
class.WpdiscuzCore.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  * Plugin Name: wpDiscuz
4
  * Description: #1 WordPress Comment Plugin. Innovative, modern and feature-rich comment system to supercharge your website comment section.
5
- * Version: 7.0.3
6
  * Author: gVectors Team
7
  * Author URI: https://gvectors.com/
8
  * Plugin URI: https://wpdiscuz.com/
@@ -68,9 +68,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
68
  $this->helperEmail = new WpdiscuzHelperEmail($this->options, $this->dbManager);
69
  $this->helperOptimization = new WpdiscuzHelperOptimization($this->options, $this->dbManager, $this->helperEmail);
70
  $this->helperAjax = new WpdiscuzHelperAjax($this->options, $this->dbManager, $this->helper, $this->helperEmail, $this->wpdiscuzForm);
71
- if ($this->options->content["wmuIsEnabled"]) {
72
- $this->helperUpload = new WpdiscuzHelperUpload($this->options, $this->dbManager, $this->wpdiscuzForm, $this->helper);
73
- }
74
  $this->cache = new WpdiscuzCache($this->options, $this->helper, $this->dbManager);
75
  $this->requestUri = !empty($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : "";
76
 
@@ -552,6 +550,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
552
  if ($commentReadMoreLimit && WpdiscuzHelper::strWordCount(wp_strip_all_tags($commentContent)) > $commentReadMoreLimit) {
553
  $commentContent = WpdiscuzHelper::getCommentExcerpt($commentContent, $uniqueId, $this->options);
554
  }
 
555
 
556
  $components = $this->helper->getComponents($form->getTheme(), $form->getLayout());
557
  $inlineContent = "";
@@ -657,10 +656,10 @@ class WpdiscuzCore implements WpDiscuzConstants {
657
  }
658
  $sorting = isset($_POST["sorting"]) ? trim($_POST["sorting"]) : "";
659
  if ($sorting === "newest") {
660
- $args["orderby"] = "comment_ID";
661
  $args["order"] = "desc";
662
  } else if ($sorting === "oldest") {
663
- $args["orderby"] = "comment_ID";
664
  $args["order"] = "asc";
665
  } else if ($sorting === "by_vote") {
666
  $args["orderby"] = "by_vote";
@@ -687,10 +686,10 @@ class WpdiscuzCore implements WpDiscuzConstants {
687
  $this->isWpdiscuzLoaded = true;
688
  $args = ["post_id" => $postId];
689
  if ($sorting === "newest") {
690
- $args["orderby"] = "comment_ID";
691
  $args["order"] = "desc";
692
  } else if ($sorting === "oldest") {
693
- $args["orderby"] = "comment_ID";
694
  $args["order"] = "asc";
695
  } else if ($sorting === "by_vote") {
696
  $args["orderby"] = "by_vote";
@@ -887,7 +886,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
887
  } else if ($this->commentsArgs["last_parent_id"] && empty($this->commentsArgs["sticky"])) {
888
  $args["where"] = $wpdb->comments . ".`comment_ID`" . ($this->commentsArgs["order"] === 'desc' ? " < " : " > ") . $this->commentsArgs["last_parent_id"] . ($args["where"] ? " AND " : "") . $args["where"];
889
  }
890
- $args["orderby"] = $orderby . $wpdb->comments . ".comment_ID ";
891
  $args["orderby"] .= isset($args["order"]) ? "" : $this->commentsArgs["order"];
892
  }
893
  return $args;
@@ -900,7 +899,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
900
  "caller" => "wpdiscuz",
901
  "post_id" => intval($postId),
902
  "last_parent_id" => 0,
903
- "orderby" => "comment_ID",
904
  "order" => $this->options->wp["commentOrder"],
905
  // max value of php int for limit
906
  "number" => $this->options->thread_display["commentListLoadType"] == 3 ? PHP_INT_MAX - 1 : $this->options->wp["commentPerPage"],
@@ -1093,6 +1092,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
1093
  "msgConfirmDeleteComment" => esc_html($this->options->phrases["wc_confirm_comment_delete"]),
1094
  "msgConfirmCancelSubscription" => esc_html($this->options->phrases["wc_confirm_cancel_subscription"]),
1095
  "msgConfirmCancelFollow" => esc_html($this->options->phrases["wc_confirm_cancel_follow"]),
 
1096
  ];
1097
  if ($this->options->thread_styles["enableFontAwesome"]) {
1098
  if ($this->form->hasIcon) {
@@ -1160,6 +1160,11 @@ class WpdiscuzCore implements WpDiscuzConstants {
1160
  wp_localize_script("wpdiscuz-user-content-js", "wpdiscuzUCObj", $ucArgs);
1161
  }
1162
  }
 
 
 
 
 
1163
  do_action("wpdiscuz_front_scripts", $this->options);
1164
  }
1165
  }
@@ -1384,6 +1389,15 @@ class WpdiscuzCore implements WpDiscuzConstants {
1384
  if (version_compare($this->version, "7.0.0", ">=") && version_compare($this->version, "7.0.2", "<")) {
1385
  $oldOptions[self::TAB_RATING]["enablePostRatingSchema"] = 0;
1386
  }
 
 
 
 
 
 
 
 
 
1387
  return $oldOptions;
1388
  }
1389
 
@@ -1547,7 +1561,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
1547
  $this->options->phrases[$key] = $value;
1548
  }
1549
  $this->options->labels["blogRoles"] = $newBlogRoles;
1550
- $this->options->labels["blogRoleLabels"] = $newBlogRoleLabels;
1551
  }
1552
 
1553
  public function showReplies() {
@@ -1734,36 +1748,38 @@ class WpdiscuzCore implements WpDiscuzConstants {
1734
  }
1735
 
1736
  public function addBubble($post) {
1737
- echo "<div id='wpd-bubble-wrapper'>";
1738
- $commentsNumber = get_comments_number($post->ID);
1739
- echo "<span id='wpd-bubble-all-comments-count'" . ($commentsNumber ? "" : " style='display:none;'") . ">" . esc_html($commentsNumber) . "</span>";
1740
- echo "<div id='wpd-bubble-count'>";
1741
- echo "<svg xmlns='https://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path class='wpd-bubble-count-first' d='M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z'/><path class='wpd-bubble-count-second' d='M0 0h24v24H0z' /></svg>";
1742
- echo "<span class='wpd-new-comments-count'>0</span>";
1743
- echo "</div>";
1744
- echo "<div id='wpd-bubble'>";
1745
- echo "<svg xmlns='https://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path class='wpd-bubble-plus-first' d='M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z'/><path class='wpd-bubble-plus-second' d='M0 0h24v24H0z' /></svg>";
1746
- echo "<div id='wpd-bubble-add-message'>" . esc_html($this->options->phrases["wc_bubble_invite_message"]) . "<span id='wpd-bubble-add-message-close'><a href='#'>x</a></span></div>";
1747
- echo "</div>";
1748
- echo "<div id='wpd-bubble-notification'><svg xmlns='https://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path class='wpd-bubble-notification-first' d='M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z'/><path class='wpd-bubble-notification-second' d='M0 0h24v24H0z' /></svg>";
1749
- if ($this->options->live["bubbleShowNewCommentMessage"]) {
1750
- echo "<div id='wpd-bubble-notification-message'>";
1751
- echo "<div id='wpd-bubble-author'>";
1752
- echo "<div>";
1753
- echo "<span id='wpd-bubble-author-avatar'></span>";
1754
- echo "<span id='wpd-bubble-author-name'></span>";
1755
- echo "<span id='wpd-bubble-comment-date'>(<span class='wpd-bubble-spans'></span>)</span>";
1756
  echo "</div>";
1757
- echo "<span id='wpd-bubble-comment-close'><a href='#'>x</a></span>";
 
 
1758
  echo "</div>";
1759
- echo "<div id='wpd-bubble-comment'>";
1760
- echo "<span id='wpd-bubble-comment-text'></span>";
1761
- echo "<span id='wpd-bubble-comment-reply-link'>| <a href='#'>Reply</a></span>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1762
  echo "</div>";
1763
  echo "</div>";
1764
  }
1765
- echo "</div>";
1766
- echo "</div>";
1767
  }
1768
 
1769
  public function registerRestRoutes() {
@@ -1868,8 +1884,8 @@ class WpdiscuzCore implements WpDiscuzConstants {
1868
  }
1869
 
1870
  public function feedbackShortcode($atts, $content = "") {
1871
- if ($this->isWpdiscuzLoaded) {
1872
- global $post;
1873
  $atts = shortcode_atts(["id" => "", "question" => "", "opened" => 0], $atts, self::WPDISCUZ_FEEDBACK_SHORTCODE);
1874
  if ($atts["id"] && $atts["question"] && ($inline_form = $this->dbManager->getFeedbackFormByUid($post->ID, $atts["id"]))) {
1875
  $content = "<div class='wpd-inline-shortcode wpd-inline-" . ($inline_form->opened ? "opened" : "closed") . "' id='wpd-inline-" . $inline_form->id . "'>" . html_entity_decode($content);
2
  /*
3
  * Plugin Name: wpDiscuz
4
  * Description: #1 WordPress Comment Plugin. Innovative, modern and feature-rich comment system to supercharge your website comment section.
5
+ * Version: 7.0.4
6
  * Author: gVectors Team
7
  * Author URI: https://gvectors.com/
8
  * Plugin URI: https://wpdiscuz.com/
68
  $this->helperEmail = new WpdiscuzHelperEmail($this->options, $this->dbManager);
69
  $this->helperOptimization = new WpdiscuzHelperOptimization($this->options, $this->dbManager, $this->helperEmail);
70
  $this->helperAjax = new WpdiscuzHelperAjax($this->options, $this->dbManager, $this->helper, $this->helperEmail, $this->wpdiscuzForm);
71
+ $this->helperUpload = new WpdiscuzHelperUpload($this->options, $this->dbManager, $this->wpdiscuzForm, $this->helper);
 
 
72
  $this->cache = new WpdiscuzCache($this->options, $this->helper, $this->dbManager);
73
  $this->requestUri = !empty($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : "";
74
 
550
  if ($commentReadMoreLimit && WpdiscuzHelper::strWordCount(wp_strip_all_tags($commentContent)) > $commentReadMoreLimit) {
551
  $commentContent = WpdiscuzHelper::getCommentExcerpt($commentContent, $uniqueId, $this->options);
552
  }
553
+ $commentContent = apply_filters("wpdiscuz_after_read_more", $commentContent, $comment, ["is_wpdiscuz_comment" => true]);
554
 
555
  $components = $this->helper->getComponents($form->getTheme(), $form->getLayout());
556
  $inlineContent = "";
656
  }
657
  $sorting = isset($_POST["sorting"]) ? trim($_POST["sorting"]) : "";
658
  if ($sorting === "newest") {
659
+ $args["orderby"] = $this->options->thread_display["orderCommentsBy"];
660
  $args["order"] = "desc";
661
  } else if ($sorting === "oldest") {
662
+ $args["orderby"] = $this->options->thread_display["orderCommentsBy"];
663
  $args["order"] = "asc";
664
  } else if ($sorting === "by_vote") {
665
  $args["orderby"] = "by_vote";
686
  $this->isWpdiscuzLoaded = true;
687
  $args = ["post_id" => $postId];
688
  if ($sorting === "newest") {
689
+ $args["orderby"] = $this->options->thread_display["orderCommentsBy"];
690
  $args["order"] = "desc";
691
  } else if ($sorting === "oldest") {
692
+ $args["orderby"] = $this->options->thread_display["orderCommentsBy"];
693
  $args["order"] = "asc";
694
  } else if ($sorting === "by_vote") {
695
  $args["orderby"] = "by_vote";
886
  } else if ($this->commentsArgs["last_parent_id"] && empty($this->commentsArgs["sticky"])) {
887
  $args["where"] = $wpdb->comments . ".`comment_ID`" . ($this->commentsArgs["order"] === 'desc' ? " < " : " > ") . $this->commentsArgs["last_parent_id"] . ($args["where"] ? " AND " : "") . $args["where"];
888
  }
889
+ $args["orderby"] = $orderby . $wpdb->comments . ".`{$this->options->thread_display["orderCommentsBy"]}` ";
890
  $args["orderby"] .= isset($args["order"]) ? "" : $this->commentsArgs["order"];
891
  }
892
  return $args;
899
  "caller" => "wpdiscuz",
900
  "post_id" => intval($postId),
901
  "last_parent_id" => 0,
902
+ "orderby" => $this->options->thread_display["orderCommentsBy"],
903
  "order" => $this->options->wp["commentOrder"],
904
  // max value of php int for limit
905
  "number" => $this->options->thread_display["commentListLoadType"] == 3 ? PHP_INT_MAX - 1 : $this->options->wp["commentPerPage"],
1092
  "msgConfirmDeleteComment" => esc_html($this->options->phrases["wc_confirm_comment_delete"]),
1093
  "msgConfirmCancelSubscription" => esc_html($this->options->phrases["wc_confirm_cancel_subscription"]),
1094
  "msgConfirmCancelFollow" => esc_html($this->options->phrases["wc_confirm_cancel_follow"]),
1095
+ "additionalTab" => (int) apply_filters("wpdiscuz_enable_content_modal", false),
1096
  ];
1097
  if ($this->options->thread_styles["enableFontAwesome"]) {
1098
  if ($this->form->hasIcon) {
1160
  wp_localize_script("wpdiscuz-user-content-js", "wpdiscuzUCObj", $ucArgs);
1161
  }
1162
  }
1163
+ if (!$loadQuill && $this->options->form["enableQuickTags"]) {
1164
+ wp_enqueue_script("quicktags");
1165
+ wp_register_script("wpdiscuz-quicktags", plugins_url("/assets/third-party/quicktags/wpdiscuz-quictags.js", __FILE__), [$this->options->general["loadComboVersion"] ? "wpdiscuz-combo-js" : "wpdiscuz-ajax-js"], $this->version, true);
1166
+ wp_enqueue_script("wpdiscuz-quicktags");
1167
+ }
1168
  do_action("wpdiscuz_front_scripts", $this->options);
1169
  }
1170
  }
1389
  if (version_compare($this->version, "7.0.0", ">=") && version_compare($this->version, "7.0.2", "<")) {
1390
  $oldOptions[self::TAB_RATING]["enablePostRatingSchema"] = 0;
1391
  }
1392
+ if (version_compare($this->version, "7.0.0", ">=") && version_compare($this->version, "7.0.4", "<")) {
1393
+ $newMimeTypes = [];
1394
+ foreach ($oldOptions[self::TAB_CONTENT]["wmuMimeTypes"] as $exts => $type) {
1395
+ foreach (explode('|', $exts) as $k => $ext) {
1396
+ $newMimeTypes[$ext] = $type;
1397
+ }
1398
+ }
1399
+ $oldOptions[self::TAB_CONTENT]["wmuMimeTypes"] = $newMimeTypes;
1400
+ }
1401
  return $oldOptions;
1402
  }
1403
 
1561
  $this->options->phrases[$key] = $value;
1562
  }
1563
  $this->options->labels["blogRoles"] = $newBlogRoles;
1564
+ $this->options->labels["blogRoleLabels"] = $newBlogRoleLabels;
1565
  }
1566
 
1567
  public function showReplies() {
1748
  }
1749
 
1750
  public function addBubble($post) {
1751
+ if (comments_open($post->ID)) {
1752
+ echo "<div id='wpd-bubble-wrapper'>";
1753
+ $commentsNumber = get_comments_number($post->ID);
1754
+ echo "<span id='wpd-bubble-all-comments-count'" . ($commentsNumber ? "" : " style='display:none;'") . ">" . esc_html($commentsNumber) . "</span>";
1755
+ echo "<div id='wpd-bubble-count'>";
1756
+ echo "<svg xmlns='https://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path class='wpd-bubble-count-first' d='M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z'/><path class='wpd-bubble-count-second' d='M0 0h24v24H0z' /></svg>";
1757
+ echo "<span class='wpd-new-comments-count'>0</span>";
 
 
 
 
 
 
 
 
 
 
 
 
1758
  echo "</div>";
1759
+ echo "<div id='wpd-bubble'>";
1760
+ echo "<svg xmlns='https://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path class='wpd-bubble-plus-first' d='M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z'/><path class='wpd-bubble-plus-second' d='M0 0h24v24H0z' /></svg>";
1761
+ echo "<div id='wpd-bubble-add-message'>" . esc_html($this->options->phrases["wc_bubble_invite_message"]) . "<span id='wpd-bubble-add-message-close'><a href='#'>x</a></span></div>";
1762
  echo "</div>";
1763
+ echo "<div id='wpd-bubble-notification'><svg xmlns='https://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path class='wpd-bubble-notification-first' d='M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z'/><path class='wpd-bubble-notification-second' d='M0 0h24v24H0z' /></svg>";
1764
+ if ($this->options->live["bubbleShowNewCommentMessage"]) {
1765
+ echo "<div id='wpd-bubble-notification-message'>";
1766
+ echo "<div id='wpd-bubble-author'>";
1767
+ echo "<div>";
1768
+ echo "<span id='wpd-bubble-author-avatar'></span>";
1769
+ echo "<span id='wpd-bubble-author-name'></span>";
1770
+ echo "<span id='wpd-bubble-comment-date'>(<span class='wpd-bubble-spans'></span>)</span>";
1771
+ echo "</div>";
1772
+ echo "<span id='wpd-bubble-comment-close'><a href='#'>x</a></span>";
1773
+ echo "</div>";
1774
+ echo "<div id='wpd-bubble-comment'>";
1775
+ echo "<span id='wpd-bubble-comment-text'></span>";
1776
+ echo "<span id='wpd-bubble-comment-reply-link'>| <a href='#'>Reply</a></span>";
1777
+ echo "</div>";
1778
+ echo "</div>";
1779
+ }
1780
  echo "</div>";
1781
  echo "</div>";
1782
  }
 
 
1783
  }
1784
 
1785
  public function registerRestRoutes() {
1884
  }
1885
 
1886
  public function feedbackShortcode($atts, $content = "") {
1887
+ global $post;
1888
+ if ($this->isWpdiscuzLoaded && comments_open($post->ID)) {
1889
  $atts = shortcode_atts(["id" => "", "question" => "", "opened" => 0], $atts, self::WPDISCUZ_FEEDBACK_SHORTCODE);
1890
  if ($atts["id"] && $atts["question"] && ($inline_form = $this->dbManager->getFeedbackFormByUid($post->ID, $atts["id"]))) {
1891
  $content = "<div class='wpd-inline-shortcode wpd-inline-" . ($inline_form->opened ? "opened" : "closed") . "' id='wpd-inline-" . $inline_form->id . "'>" . html_entity_decode($content);
forms/wpDiscuzForm.php CHANGED
@@ -44,7 +44,8 @@ class wpDiscuzForm implements wpdFormConst {
44
  add_action("add_meta_boxes_comment", [&$this, "renderEditCommentForm"], 10);
45
  add_filter("comment_save_pre", [&$this, "validateMetaCommentSavePre"], 10);
46
  add_action("edit_comment", [&$this, "updateCommentMeta"], 10);
47
- add_filter("comment_text", [&$this, "renderCommentMetaHtml"], 10, 3);
 
48
  add_filter("post_row_actions", [&$this, "addCloneFormAction"], 10, 2);
49
  add_filter("admin_post_cloneWpdiscuzForm", [&$this, "cloneForm"]);
50
  add_filter("the_content", [&$this->form, "displayRatingMeta"], 10);
@@ -263,12 +264,14 @@ class wpDiscuzForm implements wpdFormConst {
263
  }
264
  return $content;
265
  }
 
 
 
 
266
 
267
- public function renderCommentMetaHtml($output, $comment, $args = []) {
268
  global $pagenow;
269
- if (!empty($args["is_wpdiscuz_comment"])) {
270
- return $this->renderFrontCommentMetaHtml($output, $comment);
271
- } else if (strpos("edit-comments.php", $pagenow) !== false) {
272
  return $this->renderAdminCommentMetaHtml($output, $comment);
273
  }
274
  return $output;
44
  add_action("add_meta_boxes_comment", [&$this, "renderEditCommentForm"], 10);
45
  add_filter("comment_save_pre", [&$this, "validateMetaCommentSavePre"], 10);
46
  add_action("edit_comment", [&$this, "updateCommentMeta"], 10);
47
+ add_filter("comment_text", [&$this, "renderCommentMetaHtml"], 10, 2);
48
+ add_filter("wpdiscuz_after_read_more", [&$this, "afterReadMore"], 10, 2);
49
  add_filter("post_row_actions", [&$this, "addCloneFormAction"], 10, 2);
50
  add_filter("admin_post_cloneWpdiscuzForm", [&$this, "cloneForm"]);
51
  add_filter("the_content", [&$this->form, "displayRatingMeta"], 10);
264
  }
265
  return $content;
266
  }
267
+
268
+ public function afterReadMore($output, $comment) {
269
+ return $this->renderFrontCommentMetaHtml($output, $comment);
270
+ }
271
 
272
+ public function renderCommentMetaHtml($output, $comment) {
273
  global $pagenow;
274
+ if (is_admin() && strpos("edit-comments.php", $pagenow) !== false) {
 
 
275
  return $this->renderAdminCommentMetaHtml($output, $comment);
276
  }
277
  return $output;
forms/wpdFormAttr/Field/AgreementCheckbox.php CHANGED
@@ -50,7 +50,7 @@ class AgreementCheckbox extends Field {
50
  }
51
 
52
  public function editCommentHtml($key, $value, $data, $comment) {
53
- if (current_user_can("moderate_comments") || (!$this->isCommentParentZero() && !$data["is_show_sform"]) || !$this->displayField($key, $data)) {
54
  return "";
55
  }
56
  $showAgainClass = $data["donot_show_again_if_checked"] == 1 ? " wpd_agreement_hide " : "";
50
  }
51
 
52
  public function editCommentHtml($key, $value, $data, $comment) {
53
+ if (current_user_can("moderate_comments") || ($comment->comment_parent && !$data["is_show_sform"]) || !$this->displayField($key, $data)) {
54
  return "";
55
  }
56
  $showAgainClass = $data["donot_show_again_if_checked"] == 1 ? " wpd_agreement_hide " : "";
forms/wpdFormAttr/Form.php CHANGED
@@ -785,7 +785,6 @@ class Form {
785
  $message = "";
786
  ?>
787
  <div class="wpd-form wpd-form-wrapper <?php echo!$isMain ? "wpd-secondary-form-wrapper" : "wpd-main-form-wrapper"; ?>" <?php echo!$isMain ? "id='wpd-secondary-form-wrapper-" . esc_attr($uniqueId) . "' style='display: none;'" : "id='wpd-main-form-wrapper-" . esc_attr($uniqueId) . "'"; ?>>
788
- <div class="wpdiscuz-comment-message" style="display: block;"></div>
789
  <?php if (!$isMain) { ?>
790
  <div class="wpd-secondary-forms-social-content"><?php do_action("comment_reply_form_bar_top", $this); ?></div><div class="clearfix"></div>
791
  <?php } ?>
@@ -822,6 +821,11 @@ class Form {
822
  }
823
  ?>
824
  </div>
 
 
 
 
 
825
  <input type="hidden" class="wpdiscuz_unique_id" value="<?php echo esc_attr($uniqueId); ?>" name="wpdiscuz_unique_id">
826
  </form>
827
  <?php
@@ -839,7 +843,7 @@ class Form {
839
  <div id="wpd-editor-char-counter-<?php echo esc_attr($uniqueId); ?>" class="wpd-editor-char-counter"></div>
840
  <textarea id="wc-textarea-<?php echo esc_attr($uniqueId); ?>" required name="wc_comment" class="wc_comment wpd-field"></textarea>
841
  <div id="wpd-editor-<?php echo esc_attr($uniqueId); ?>"></div>
842
- <?php $this->renderTextEditorButtons($uniqueId); ?>
843
  </div>
844
  <?php
845
  } else {
@@ -849,7 +853,9 @@ class Form {
849
  $textarea_placeholder = $this->wpdOptions->phrases["wc_be_the_first_text"];
850
  }
851
  ?>
852
- <textarea id="wc-textarea-<?php echo esc_attr($uniqueId); ?>" placeholder="<?php echo esc_attr($textarea_placeholder); ?>" required name="wc_comment" class="wc_comment wpd-field"></textarea>
 
 
853
  <?php
854
  echo apply_filters("wpdiscuz_editor_buttons_html", "", $uniqueId);
855
  }
@@ -916,7 +922,7 @@ class Form {
916
  $uniqueId = $comment->comment_ID . "_" . $comment->comment_parent;
917
  $html = "<div class='wpdiscuz-edit-form-wrap'><form id='wpdiscuz-edit-form'>";
918
  $html .= "<div class='wpdiscuz-item wpdiscuz-textarea-wrap'>";
919
- $content = str_replace(["<code>", "</code>"], ["`", "`"], ($this->wpdOptions->form["richEditor"] === "both" || (!wp_is_mobile() && $this->wpdOptions->form["richEditor"] === "desktop") ? str_replace(["</p>\n","<br />\n"],["</p><br>","<br />"],wpautop($comment->comment_content)) : $comment->comment_content));
920
  ob_start();
921
  $this->renderTextEditor("edit_" . $uniqueId, 1);
922
  $html .= ob_get_clean();
@@ -937,7 +943,7 @@ class Form {
937
  $html .= "<input type='hidden' name='wpdiscuz_unique_id' value='" . esc_attr($uniqueId) . "'>";
938
  $html .= "<div class='wc_save_wrap'><input class='wc_cancel_edit wpd-second-button' type='button' value='" . esc_attr($this->wpdOptions->phrases["wc_comment_edit_cancel_button"]) . "'><input id='wpd-field-submit-edit_" . esc_attr($uniqueId) . "' class='wc_save_edited_comment wpd-prim-button' type='submit' value='" . esc_attr($this->wpdOptions->phrases["wc_comment_edit_save_button"]) . "'></div>";
939
  $html .= "</form></div>";
940
- return wp_send_json_success(['html'=>$html,'content'=>$content]);
941
  }
942
 
943
  public function renderEditAdminCommentForm($comment) {
@@ -981,17 +987,17 @@ class Form {
981
  <tbody>
982
  <tr>
983
  <th>
984
- <?php esc_html_e("Language", "wpdiscuz"); ?>
985
  </th>
986
  <td>
987
- <?php $lang = isset($this->generalOptions["lang"]) ? $this->generalOptions["lang"] : get_locale(); ?>
988
  <input required="" type="text" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[lang]" value="<?php echo htmlentities($lang, ENT_QUOTES); ?>" >
989
  <a href="https://wpdiscuz.com/docs/wpdiscuz-7/getting-started/manage-comment-forms/comment-form-settings/#language" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
990
  </td>
991
  </tr>
992
  <tr>
993
  <th>
994
- <?php esc_html_e("Disable commenting for roles", "wpdiscuz"); ?>
995
  </th>
996
  <td>
997
  <?php
@@ -1013,10 +1019,10 @@ class Form {
1013
  </tr>
1014
  <tr>
1015
  <th>
1016
- <?php esc_html_e("Allow guests to comment", "wpdiscuz"); ?>
1017
  </th>
1018
  <td>
1019
- <?php $guestCanComment = isset($this->generalOptions["guest_can_comment"]) ? $this->generalOptions["guest_can_comment"] : 1; ?>
1020
  <input <?php checked($guestCanComment, 1, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[guest_can_comment]" value="1" id="wpd_cf_guest_yes" > <label for="wpd_cf_guest_yes"><?php esc_html_e("Yes", "wpdiscuz"); ?></label>
1021
  &nbsp;
1022
  <input <?php checked($guestCanComment, 0, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[guest_can_comment]" value="0" id="wpd_cf_guest_no"> <label for="wpd_cf_guest_no"><?php esc_html_e("No", "wpdiscuz"); ?></label>
@@ -1025,10 +1031,10 @@ class Form {
1025
  </tr>
1026
  <tr>
1027
  <th>
1028
- <?php esc_html_e("Enable subscription bar", "wpdiscuz"); ?>
1029
  </th>
1030
  <td>
1031
- <?php $showSubscriptionBar = isset($this->generalOptions["show_subscription_bar"]) ? $this->generalOptions["show_subscription_bar"] : 1; ?>
1032
  <input <?php checked($showSubscriptionBar, 1, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[show_subscription_bar]" value="1" id="wpd_cf_sbbar_yes" > <label for="wpd_cf_sbbar_yes"><?php esc_html_e("Yes", "wpdiscuz"); ?></label>
1033
  &nbsp;
1034
  <input <?php checked($showSubscriptionBar, 0, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[show_subscription_bar]" value="0" id="wpd_cf_sbbar_no"> <label for="wpd_cf_sbbar_no"><?php esc_html_e("No", "wpdiscuz"); ?></label>
@@ -1037,10 +1043,10 @@ class Form {
1037
  </tr>
1038
  <tr>
1039
  <th>
1040
- <?php esc_html_e("Display agreement checkbox in Comment Subscription bar", "wpdiscuz"); ?>
1041
  </th>
1042
  <td>
1043
- <?php $showSubscriptionAgreement = isset($this->generalOptions["show_subscription_agreement"]) ? $this->generalOptions["show_subscription_agreement"] : 0; ?>
1044
  <input <?php checked($showSubscriptionAgreement, 1, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[show_subscription_agreement]" value="1" id="wpd_cf_sbbar_agreement_yes" > <label for="wpd_cf_sbbar_agreement_yes"><?php esc_html_e("Yes", "wpdiscuz"); ?></label>
1045
  &nbsp;
1046
  <input <?php checked($showSubscriptionAgreement, 0, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[show_subscription_agreement]" value="0" id="wpd_cf_sbbar_agreement_no"> <label for="wpd_cf_sbbar_agreement_no"><?php esc_html_e("No", "wpdiscuz"); ?></label>
@@ -1049,16 +1055,16 @@ class Form {
1049
  </tr>
1050
  <tr>
1051
  <th>
1052
- <?php esc_html_e("Comment Subscription bar agreement checkbox label", "wpdiscuz"); ?>
1053
  </th>
1054
  <td>
1055
- <?php $subscriptionAgreementLabel = isset($this->generalOptions["subscription_agreement_label"]) && $this->generalOptions["subscription_agreement_label"] ? $this->generalOptions["subscription_agreement_label"] : esc_html__("I allow to use my email address and send notification about new comments and replies (you can unsubscribe at any time).", "wpdiscuz"); ?>
1056
  <textarea name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[subscription_agreement_label]" style="width:80%;"><?php echo $subscriptionAgreementLabel; ?></textarea>
1057
  </td>
1058
  </tr>
1059
  <tr>
1060
  <th>
1061
- <?php esc_html_e("Comment form header text (singular)", "wpdiscuz"); ?>
1062
  </th>
1063
  <td >
1064
  <div>
@@ -1069,7 +1075,7 @@ class Form {
1069
  </tr>
1070
  <tr>
1071
  <th>
1072
- <?php esc_html_e("Comment form header text (plural)", "wpdiscuz"); ?>
1073
  </th>
1074
  <td >
1075
  <div>
@@ -1103,13 +1109,13 @@ class Form {
1103
  <span><?php echo esc_html($typeValue); ?></span>
1104
  </label>
1105
  <?php } ?>
1106
- <?php if ($hasForm) echo $formRelExistsInfo; ?>
1107
  <a href="https://wpdiscuz.com/docs/wpdiscuz-7/getting-started/manage-comment-forms/comment-form-settings/#post-types" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
1108
  </td>
1109
  </tr>
1110
  <tr>
1111
  <th>
1112
- <?php esc_html_e("Display comment form for post IDs", "wpdiscuz"); ?>
1113
  <p class="wpd-info"> <?php esc_html_e("You can use this form for certain posts/pages specified by comma separated IDs.", "wpdiscuz"); ?></p>
1114
  </th>
1115
  <td>
@@ -1124,7 +1130,7 @@ class Form {
1124
  ?>
1125
  <tr>
1126
  <th>
1127
- <?php esc_html_e("Theme", "wpdiscuz"); ?>
1128
  </th>
1129
  <td>
1130
  <?php
@@ -1143,7 +1149,7 @@ class Form {
1143
  ?>
1144
  <tr>
1145
  <th>
1146
- <?php esc_html_e("Comment List Layout", "wpdiscuz"); ?>
1147
  </th>
1148
  <td>
1149
  <div id="wpd_comment_layouts" style="width: 290px; margin: 15px 0 0 0">
@@ -1169,10 +1175,10 @@ class Form {
1169
  ?>
1170
  <tr>
1171
  <th>
1172
- <?php esc_html_e("Enable Post Rating", "wpdiscuz"); ?>
1173
  </th>
1174
  <td>
1175
- <?php $enablePostRating = isset($this->generalOptions["enable_post_rating"]) ? $this->generalOptions["enable_post_rating"] : 1; ?>
1176
  <input <?php checked($enablePostRating, 1, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[enable_post_rating]" value="1" id="wpd_enable_post_rating_yes" > <label for="wpd_enable_post_rating_yes"><?php esc_html_e("Yes", "wpdiscuz"); ?></label>
1177
  &nbsp;
1178
  <input <?php checked($enablePostRating, 0, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[enable_post_rating]" value="0" id="wpd_enable_post_rating_no"> <label for="wpd_enable_post_rating_no"><?php esc_html_e("No", "wpdiscuz"); ?></label>
@@ -1181,7 +1187,7 @@ class Form {
1181
  </tr>
1182
  <tr>
1183
  <th>
1184
- <?php esc_html_e("Post Rating Title", "wpdiscuz"); ?>
1185
  </th>
1186
  <td >
1187
  <div>
@@ -1191,10 +1197,10 @@ class Form {
1191
  </tr>
1192
  <tr>
1193
  <th>
1194
- <?php esc_html_e("Allow Guests to Rate", "wpdiscuz"); ?>
1195
  </th>
1196
  <td>
1197
- <?php $allowGuestsRateOnPost = isset($this->generalOptions["allow_guests_rate_on_post"]) ? $this->generalOptions["allow_guests_rate_on_post"] : 1; ?>
1198
  <input <?php checked($allowGuestsRateOnPost, 1, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[allow_guests_rate_on_post]" value="1" id="wpd_allow_guests_rate_on_post_yes" > <label for="wpd_allow_guests_rate_on_post_yes"><?php esc_html_e("Yes", "wpdiscuz"); ?></label>
1199
  &nbsp;
1200
  <input <?php checked($allowGuestsRateOnPost, 0, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[allow_guests_rate_on_post]" value="0" id="wpd_allow_guests_rate_on_post_no"> <label for="wpd_allow_guests_rate_on_post_no"><?php esc_html_e("No", "wpdiscuz"); ?></label>
@@ -1205,7 +1211,7 @@ class Form {
1205
  </table>
1206
  </div>
1207
  <div class="wpdiscuz-wrapper">
1208
- <div class="wpdiscuz-form-builder-help"><a href="https://wpdiscuz.com/docs/wpdiscuz-documentation/getting-started/custom-comment-form/comment-form-builder/" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a></div>
1209
  <div class="wpd-form">
1210
  <div class="wpd-col-wrap">
1211
  <div class="wpd-field">
785
  $message = "";
786
  ?>
787
  <div class="wpd-form wpd-form-wrapper <?php echo!$isMain ? "wpd-secondary-form-wrapper" : "wpd-main-form-wrapper"; ?>" <?php echo!$isMain ? "id='wpd-secondary-form-wrapper-" . esc_attr($uniqueId) . "' style='display: none;'" : "id='wpd-main-form-wrapper-" . esc_attr($uniqueId) . "'"; ?>>
 
788
  <?php if (!$isMain) { ?>
789
  <div class="wpd-secondary-forms-social-content"><?php do_action("comment_reply_form_bar_top", $this); ?></div><div class="clearfix"></div>
790
  <?php } ?>
821
  }
822
  ?>
823
  </div>
824
+ <?php
825
+ if ($this->wpdOptions->isGoodbyeCaptchaActive) {
826
+ echo $this->wpdOptions->goodbyeCaptchaTocken;
827
+ }
828
+ ?>
829
  <input type="hidden" class="wpdiscuz_unique_id" value="<?php echo esc_attr($uniqueId); ?>" name="wpdiscuz_unique_id">
830
  </form>
831
  <?php
843
  <div id="wpd-editor-char-counter-<?php echo esc_attr($uniqueId); ?>" class="wpd-editor-char-counter"></div>
844
  <textarea id="wc-textarea-<?php echo esc_attr($uniqueId); ?>" required name="wc_comment" class="wc_comment wpd-field"></textarea>
845
  <div id="wpd-editor-<?php echo esc_attr($uniqueId); ?>"></div>
846
+ <?php $this->renderTextEditorButtons($uniqueId); ?>
847
  </div>
848
  <?php
849
  } else {
853
  $textarea_placeholder = $this->wpdOptions->phrases["wc_be_the_first_text"];
854
  }
855
  ?>
856
+ <div class="wpd-textarea-wrap">
857
+ <textarea id="wc-textarea-<?php echo esc_attr($uniqueId); ?>" placeholder="<?php echo esc_attr($textarea_placeholder); ?>" required name="wc_comment" class="wc_comment wpd-field"></textarea>
858
+ </div>
859
  <?php
860
  echo apply_filters("wpdiscuz_editor_buttons_html", "", $uniqueId);
861
  }
922
  $uniqueId = $comment->comment_ID . "_" . $comment->comment_parent;
923
  $html = "<div class='wpdiscuz-edit-form-wrap'><form id='wpdiscuz-edit-form'>";
924
  $html .= "<div class='wpdiscuz-item wpdiscuz-textarea-wrap'>";
925
+ $content = str_replace(["<code>", "</code>"], ["`", "`"], ($this->wpdOptions->form["richEditor"] === "both" || (!wp_is_mobile() && $this->wpdOptions->form["richEditor"] === "desktop") ? str_replace(["</p>\n", "<br />\n"], ["</p><br>", "<br />"], wpautop($comment->comment_content)) : $comment->comment_content));
926
  ob_start();
927
  $this->renderTextEditor("edit_" . $uniqueId, 1);
928
  $html .= ob_get_clean();
943
  $html .= "<input type='hidden' name='wpdiscuz_unique_id' value='" . esc_attr($uniqueId) . "'>";
944
  $html .= "<div class='wc_save_wrap'><input class='wc_cancel_edit wpd-second-button' type='button' value='" . esc_attr($this->wpdOptions->phrases["wc_comment_edit_cancel_button"]) . "'><input id='wpd-field-submit-edit_" . esc_attr($uniqueId) . "' class='wc_save_edited_comment wpd-prim-button' type='submit' value='" . esc_attr($this->wpdOptions->phrases["wc_comment_edit_save_button"]) . "'></div>";
945
  $html .= "</form></div>";
946
+ return wp_send_json_success(['html' => $html, 'content' => $content]);
947
  }
948
 
949
  public function renderEditAdminCommentForm($comment) {
987
  <tbody>
988
  <tr>
989
  <th>
990
+ <?php esc_html_e("Language", "wpdiscuz"); ?>
991
  </th>
992
  <td>
993
+ <?php $lang = isset($this->generalOptions["lang"]) ? $this->generalOptions["lang"] : get_locale(); ?>
994
  <input required="" type="text" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[lang]" value="<?php echo htmlentities($lang, ENT_QUOTES); ?>" >
995
  <a href="https://wpdiscuz.com/docs/wpdiscuz-7/getting-started/manage-comment-forms/comment-form-settings/#language" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
996
  </td>
997
  </tr>
998
  <tr>
999
  <th>
1000
+ <?php esc_html_e("Disable commenting for roles", "wpdiscuz"); ?>
1001
  </th>
1002
  <td>
1003
  <?php
1019
  </tr>
1020
  <tr>
1021
  <th>
1022
+ <?php esc_html_e("Allow guests to comment", "wpdiscuz"); ?>
1023
  </th>
1024
  <td>
1025
+ <?php $guestCanComment = isset($this->generalOptions["guest_can_comment"]) ? $this->generalOptions["guest_can_comment"] : 1; ?>
1026
  <input <?php checked($guestCanComment, 1, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[guest_can_comment]" value="1" id="wpd_cf_guest_yes" > <label for="wpd_cf_guest_yes"><?php esc_html_e("Yes", "wpdiscuz"); ?></label>
1027
  &nbsp;
1028
  <input <?php checked($guestCanComment, 0, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[guest_can_comment]" value="0" id="wpd_cf_guest_no"> <label for="wpd_cf_guest_no"><?php esc_html_e("No", "wpdiscuz"); ?></label>
1031
  </tr>
1032
  <tr>
1033
  <th>
1034
+ <?php esc_html_e("Enable subscription bar", "wpdiscuz"); ?>
1035
  </th>
1036
  <td>
1037
+ <?php $showSubscriptionBar = isset($this->generalOptions["show_subscription_bar"]) ? $this->generalOptions["show_subscription_bar"] : 1; ?>
1038
  <input <?php checked($showSubscriptionBar, 1, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[show_subscription_bar]" value="1" id="wpd_cf_sbbar_yes" > <label for="wpd_cf_sbbar_yes"><?php esc_html_e("Yes", "wpdiscuz"); ?></label>
1039
  &nbsp;
1040
  <input <?php checked($showSubscriptionBar, 0, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[show_subscription_bar]" value="0" id="wpd_cf_sbbar_no"> <label for="wpd_cf_sbbar_no"><?php esc_html_e("No", "wpdiscuz"); ?></label>
1043
  </tr>
1044
  <tr>
1045
  <th>
1046
+ <?php esc_html_e("Display agreement checkbox in Comment Subscription bar", "wpdiscuz"); ?>
1047
  </th>
1048
  <td>
1049
+ <?php $showSubscriptionAgreement = isset($this->generalOptions["show_subscription_agreement"]) ? $this->generalOptions["show_subscription_agreement"] : 0; ?>
1050
  <input <?php checked($showSubscriptionAgreement, 1, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[show_subscription_agreement]" value="1" id="wpd_cf_sbbar_agreement_yes" > <label for="wpd_cf_sbbar_agreement_yes"><?php esc_html_e("Yes", "wpdiscuz"); ?></label>
1051
  &nbsp;
1052
  <input <?php checked($showSubscriptionAgreement, 0, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[show_subscription_agreement]" value="0" id="wpd_cf_sbbar_agreement_no"> <label for="wpd_cf_sbbar_agreement_no"><?php esc_html_e("No", "wpdiscuz"); ?></label>
1055
  </tr>
1056
  <tr>
1057
  <th>
1058
+ <?php esc_html_e("Comment Subscription bar agreement checkbox label", "wpdiscuz"); ?>
1059
  </th>
1060
  <td>
1061
+ <?php $subscriptionAgreementLabel = isset($this->generalOptions["subscription_agreement_label"]) && $this->generalOptions["subscription_agreement_label"] ? $this->generalOptions["subscription_agreement_label"] : esc_html__("I allow to use my email address and send notification about new comments and replies (you can unsubscribe at any time).", "wpdiscuz"); ?>
1062
  <textarea name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[subscription_agreement_label]" style="width:80%;"><?php echo $subscriptionAgreementLabel; ?></textarea>
1063
  </td>
1064
  </tr>
1065
  <tr>
1066
  <th>
1067
+ <?php esc_html_e("Comment form header text (singular)", "wpdiscuz"); ?>
1068
  </th>
1069
  <td >
1070
  <div>
1075
  </tr>
1076
  <tr>
1077
  <th>
1078
+ <?php esc_html_e("Comment form header text (plural)", "wpdiscuz"); ?>
1079
  </th>
1080
  <td >
1081
  <div>
1109
  <span><?php echo esc_html($typeValue); ?></span>
1110
  </label>
1111
  <?php } ?>
1112
+ <?php if ($hasForm) echo $formRelExistsInfo; ?>
1113
  <a href="https://wpdiscuz.com/docs/wpdiscuz-7/getting-started/manage-comment-forms/comment-form-settings/#post-types" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
1114
  </td>
1115
  </tr>
1116
  <tr>
1117
  <th>
1118
+ <?php esc_html_e("Display comment form for post IDs", "wpdiscuz"); ?>
1119
  <p class="wpd-info"> <?php esc_html_e("You can use this form for certain posts/pages specified by comma separated IDs.", "wpdiscuz"); ?></p>
1120
  </th>
1121
  <td>
1130
  ?>
1131
  <tr>
1132
  <th>
1133
+ <?php esc_html_e("Theme", "wpdiscuz"); ?>
1134
  </th>
1135
  <td>
1136
  <?php
1149
  ?>
1150
  <tr>
1151
  <th>
1152
+ <?php esc_html_e("Comment List Layout", "wpdiscuz"); ?>
1153
  </th>
1154
  <td>
1155
  <div id="wpd_comment_layouts" style="width: 290px; margin: 15px 0 0 0">
1175
  ?>
1176
  <tr>
1177
  <th>
1178
+ <?php esc_html_e("Enable Post Rating", "wpdiscuz"); ?>
1179
  </th>
1180
  <td>
1181
+ <?php $enablePostRating = isset($this->generalOptions["enable_post_rating"]) ? $this->generalOptions["enable_post_rating"] : 1; ?>
1182
  <input <?php checked($enablePostRating, 1, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[enable_post_rating]" value="1" id="wpd_enable_post_rating_yes" > <label for="wpd_enable_post_rating_yes"><?php esc_html_e("Yes", "wpdiscuz"); ?></label>
1183
  &nbsp;
1184
  <input <?php checked($enablePostRating, 0, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[enable_post_rating]" value="0" id="wpd_enable_post_rating_no"> <label for="wpd_enable_post_rating_no"><?php esc_html_e("No", "wpdiscuz"); ?></label>
1187
  </tr>
1188
  <tr>
1189
  <th>
1190
+ <?php esc_html_e("Post Rating Title", "wpdiscuz"); ?>
1191
  </th>
1192
  <td >
1193
  <div>
1197
  </tr>
1198
  <tr>
1199
  <th>
1200
+ <?php esc_html_e("Allow Guests to Rate", "wpdiscuz"); ?>
1201
  </th>
1202
  <td>
1203
+ <?php $allowGuestsRateOnPost = isset($this->generalOptions["allow_guests_rate_on_post"]) ? $this->generalOptions["allow_guests_rate_on_post"] : 1; ?>
1204
  <input <?php checked($allowGuestsRateOnPost, 1, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[allow_guests_rate_on_post]" value="1" id="wpd_allow_guests_rate_on_post_yes" > <label for="wpd_allow_guests_rate_on_post_yes"><?php esc_html_e("Yes", "wpdiscuz"); ?></label>
1205
  &nbsp;
1206
  <input <?php checked($allowGuestsRateOnPost, 0, true); ?> type="radio" name="<?php echo esc_attr(wpdFormConst::WPDISCUZ_META_FORMS_GENERAL_OPTIONS); ?>[allow_guests_rate_on_post]" value="0" id="wpd_allow_guests_rate_on_post_no"> <label for="wpd_allow_guests_rate_on_post_no"><?php esc_html_e("No", "wpdiscuz"); ?></label>
1211
  </table>
1212
  </div>
1213
  <div class="wpdiscuz-wrapper">
1214
+ <div class="wpdiscuz-form-builder-help"><a href="https://wpdiscuz.com/docs/wpdiscuz-7/getting-started/manage-comment-forms/comment-form-builder/" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a></div>
1215
  <div class="wpd-form">
1216
  <div class="wpd-col-wrap">
1217
  <div class="wpd-field">
forms/wpdFormAttr/Login/SocialLogin.php CHANGED
@@ -155,6 +155,8 @@ class SocialLogin {
155
  $uID = Utils::addUser($fb_user, "facebook");
156
  if (is_wp_error($uID)) {
157
  $response["message"] = $uID->get_error_message();
 
 
158
  }
159
  $this->setCurrentUser($uID);
160
  return $response;
@@ -165,7 +167,7 @@ class SocialLogin {
165
  $response["message"] = esc_html__("Facebook Application ID and Application Secret required.", "wpdiscuz");
166
  return $response;
167
  }
168
- $fbAuthorizeURL = "https://www.facebook.com/v3.0/dialog/oauth";
169
  $fbCallBack = $this->createCallBackURL("facebook");
170
  $state = Utils::generateOAuthState($this->generalOptions->social["fbAppID"]);
171
  Utils::addOAuthState("facebook", $state, $postID);
@@ -195,7 +197,7 @@ class SocialLogin {
195
  $this->redirect($postID, esc_html__("Facebook authentication failed (OAuth code does not exist).", "wpdiscuz"));
196
  }
197
  $fbCallBack = $this->createCallBackURL("facebook");
198
- $fbAccessTokenURL = "https://graph.facebook.com/v3.0/oauth/access_token";
199
  $accessTokenArgs = ["client_id" => $this->generalOptions->social["fbAppID"],
200
  "client_secret" => $this->generalOptions->social["fbAppSecret"],
201
  "redirect_uri" => urlencode($fbCallBack),
@@ -212,7 +214,7 @@ class SocialLogin {
212
  }
213
  $token = $fbAccesTokenData["access_token"];
214
  $appsecret_proof = hash_hmac("sha256", $token, trim($this->generalOptions->social["fbAppSecret"]));
215
- $fbGetUserDataURL = add_query_arg(["fields" => "id,first_name,last_name,picture,email", "access_token" => $token, "appsecret_proof" => $appsecret_proof], "https://graph.facebook.com/v3.0/me");
216
  $getFbUserResponse = wp_remote_get($fbGetUserDataURL);
217
  if (is_wp_error($getFbUserResponse)) {
218
  $this->redirect($postID, $getFbUserResponse->get_error_message());
155
  $uID = Utils::addUser($fb_user, "facebook");
156
  if (is_wp_error($uID)) {
157
  $response["message"] = $uID->get_error_message();
158
+ }else{
159
+ $response = ["code" => 200];
160
  }
161
  $this->setCurrentUser($uID);
162
  return $response;
167
  $response["message"] = esc_html__("Facebook Application ID and Application Secret required.", "wpdiscuz");
168
  return $response;
169
  }
170
+ $fbAuthorizeURL = "https://www.facebook.com/v7.0/dialog/oauth";
171
  $fbCallBack = $this->createCallBackURL("facebook");
172
  $state = Utils::generateOAuthState($this->generalOptions->social["fbAppID"]);
173
  Utils::addOAuthState("facebook", $state, $postID);
197
  $this->redirect($postID, esc_html__("Facebook authentication failed (OAuth code does not exist).", "wpdiscuz"));
198
  }
199
  $fbCallBack = $this->createCallBackURL("facebook");
200
+ $fbAccessTokenURL = "https://graph.facebook.com/v7.0/oauth/access_token";
201
  $accessTokenArgs = ["client_id" => $this->generalOptions->social["fbAppID"],
202
  "client_secret" => $this->generalOptions->social["fbAppSecret"],
203
  "redirect_uri" => urlencode($fbCallBack),
214
  }
215
  $token = $fbAccesTokenData["access_token"];
216
  $appsecret_proof = hash_hmac("sha256", $token, trim($this->generalOptions->social["fbAppSecret"]));
217
+ $fbGetUserDataURL = add_query_arg(["fields" => "id,first_name,last_name,picture,email", "access_token" => $token, "appsecret_proof" => $appsecret_proof], "https://graph.facebook.com/v7.0/me");
218
  $getFbUserResponse = wp_remote_get($fbGetUserDataURL);
219
  if (is_wp_error($getFbUserResponse)) {
220
  $this->redirect($postID, $getFbUserResponse->get_error_message());
forms/wpdFormAttr/Row.php CHANGED
@@ -107,9 +107,6 @@ class Row {
107
  $field->frontFormHtml($fieldName, $fieldData, $options, $currentUser, $uniqueId, $isMainForm);
108
  }
109
  }
110
- if ($options->isGoodbyeCaptchaActive) {
111
- echo $options->goodbyeCaptchaTocken;
112
- }
113
  ?>
114
  </div>
115
  <?php
107
  $field->frontFormHtml($fieldName, $fieldData, $options, $currentUser, $uniqueId, $isMainForm);
108
  }
109
  }
 
 
 
110
  ?>
111
  </div>
112
  <?php
includes/class.WpdiscuzDBManager.php CHANGED
@@ -31,8 +31,9 @@ class WpdiscuzDBManager implements WpDiscuzConstants {
31
  * check if table exists in database
32
  * return true if exists false otherwise
33
  */
34
- public function isTableExists($tableName) {
35
- return $this->db->get_var("SHOW TABLES LIKE '$tableName'");
 
36
  }
37
 
38
  /**
@@ -42,26 +43,25 @@ class WpdiscuzDBManager implements WpDiscuzConstants {
42
  $this->initDB();
43
  require_once(ABSPATH . "wp-admin/includes/upgrade.php");
44
  $charset_collate = $this->db->get_charset_collate();
45
- $engine = version_compare($this->db->db_version(), "5.6.4", ">=") ? "InnoDB" : "MyISAM";
46
- $sql = "CREATE TABLE `{$this->usersVoted}`(`id` INT(11) NOT NULL AUTO_INCREMENT,`user_id` VARCHAR(32) NOT NULL, `comment_id` INT(11) NOT NULL, `vote_type` INT(11) DEFAULT NULL, `is_guest` TINYINT(1) DEFAULT 0, `post_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `date` INT(11) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `user_id` (`user_id`), KEY `comment_id` (`comment_id`), KEY `vote_type` (`vote_type`), KEY `is_guest` (`is_guest`), KEY `post_id` (`post_id`)) ENGINE=$engine {$charset_collate};";
47
  maybe_create_table($this->usersVoted, $sql);
48
 
49
- $sql = "CREATE TABLE `{$this->phrases}`(`id` INT(11) NOT NULL AUTO_INCREMENT, `phrase_key` VARCHAR(100) NOT NULL, `phrase_value` TEXT NOT NULL, PRIMARY KEY (`id`), KEY `phrase_key` (`phrase_key`)) ENGINE=$engine {$charset_collate};";
50
  maybe_create_table($this->phrases, $sql);
51
 
52
- $sql = "CREATE TABLE `{$this->emailNotification}`(`id` INT(11) NOT NULL AUTO_INCREMENT, `email` VARCHAR(100) NOT NULL, `subscribtion_id` INT(11) NOT NULL, `post_id` INT(11) NOT NULL, `subscribtion_type` VARCHAR(20) NOT NULL, `activation_key` VARCHAR(32) NOT NULL, `confirm` TINYINT DEFAULT 0, `subscription_date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `imported_from` VARCHAR(25) NOT NULL DEFAULT '', PRIMARY KEY (`id`), KEY `subscribtion_id` (`subscribtion_id`), KEY `post_id` (`post_id`), KEY `confirm`(`confirm`), UNIQUE KEY `subscribe_unique_index` (`subscribtion_id`,`email`,`post_id`)) ENGINE=$engine {$charset_collate};";
53
  maybe_create_table($this->emailNotification, $sql);
54
 
55
- $sql = "CREATE TABLE `{$this->avatarsCache}`(`id` INT(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL DEFAULT 0, `user_email` VARCHAR(100) NOT NULL, `url` VARCHAR(255) NOT NULL, `hash` VARCHAR(32) NOT NULL, `maketime` INT(11) NOT NULL DEFAULT 0, `cached` TINYINT(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `user_id` (`user_id`), UNIQUE KEY `user_email` (`user_email`), KEY `maketime` (`maketime`), KEY `cached` (`cached`)) ENGINE=$engine {$charset_collate};";
56
  maybe_create_table($this->avatarsCache, $sql);
57
 
58
- $sql = "CREATE TABLE `{$this->followUsers}` (`id` int(11) NOT NULL AUTO_INCREMENT, `post_id` int(11) NOT NULL DEFAULT '0', `user_id` int(11) NOT NULL DEFAULT '0', `user_email` varchar(100) NOT NULL, `user_name` varchar(255) NOT NULL, `follower_id` int(11) NOT NULL DEFAULT '0', `follower_email` varchar(100) NOT NULL, `follower_name` varchar(255) NOT NULL, `activation_key` varchar(32) NOT NULL, `confirm` tinyint(1) NOT NULL DEFAULT '0', `follow_timestamp` int(11) NOT NULL, `follow_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `post_id` (`post_id`), KEY `user_id` (`user_id`), KEY `user_email` (`user_email`), KEY `follower_id` (`follower_id`), KEY `follower_email` (`follower_email`), KEY `confirm` (`confirm`), KEY `follow_timestamp` (`follow_timestamp`), UNIQUE KEY `follow_unique_key` (`user_email`, `follower_email`)) ENGINE=$engine {$charset_collate};";
59
  maybe_create_table($this->followUsers, $sql);
60
 
61
- $sql = "CREATE TABLE `{$this->feedbackForms}` (`id` int(11) NOT NULL AUTO_INCREMENT, `post_id` int(11) NOT NULL DEFAULT 0, `unique_id` VARCHAR(15) NOT NULL, `question` varchar(255) NOT NULL, `opened` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0, `content` LONGTEXT NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `unique_id` (`unique_id`), KEY `post_id` (`post_id`)) ENGINE=$engine {$charset_collate};";
62
  maybe_create_table($this->feedbackForms, $sql);
63
 
64
- $sql = "CREATE TABLE `{$this->usersRated}` (`id` int(11) NOT NULL AUTO_INCREMENT, `post_id` int(11) NOT NULL DEFAULT 0, `user_id` int(11) NOT NULL DEFAULT 0, `user_ip` VARCHAR(32) NOT NULL DEFAULT '', `rating` int(11) NOT NULL, `date` INT(11) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `post_id` (`post_id`), KEY `user_id` (`user_id`)) ENGINE=$engine {$charset_collate};";
65
  maybe_create_table($this->usersRated, $sql);
66
  }
67
 
@@ -152,9 +152,9 @@ class WpdiscuzDBManager implements WpDiscuzConstants {
152
  } else {
153
  $approved = " AND `c`.`comment_approved` = '1'";
154
  }
155
- $sql = $this->db->prepare("SELECT `c`.`comment_ID` FROM `{$this->db->comments}` AS `c`$inlineType WHERE `c`.`comment_post_ID` = %d" . $approved . " ORDER BY `c`.`comment_ID` DESC LIMIT 1;", $args["post_id"]);
156
  } else {
157
- $sql = "SELECT `c`.`comment_ID` FROM `{$this->db->comments}` AS `c`$inlineType ORDER BY `c`.`comment_ID` DESC LIMIT 1;";
158
  }
159
  return intval($this->db->get_var($sql));
160
  }
@@ -163,6 +163,7 @@ class WpdiscuzDBManager implements WpDiscuzConstants {
163
  * retrives new comment ids for live update (UA - Update Automatically)
164
  */
165
  public function getNewCommentIds($args, $loadLastCommentId, $email, $visibleCommentIds) {
 
166
  $approved = "";
167
  if ($args["status"] == "all") {
168
  $approved = " AND `comment_approved` IN('1','0')";
@@ -173,7 +174,7 @@ class WpdiscuzDBManager implements WpDiscuzConstants {
173
  if ($visibleCommentIds) {
174
  $visible = " AND `comment_ID` NOT IN(" . rtrim($visibleCommentIds, ",") . ")";
175
  }
176
- $sqlCommentIds = $this->db->prepare("SELECT `comment_ID` FROM `{$this->db->comments}` WHERE `comment_post_ID` = %d AND `comment_ID` > %d AND `comment_author_email` != %s" . $approved . $visible . " ORDER BY `comment_ID` ASC;", $args["post_id"], $loadLastCommentId, $email);
177
  return $this->db->get_col($sqlCommentIds);
178
  }
179
 
@@ -317,7 +318,7 @@ class WpdiscuzDBManager implements WpDiscuzConstants {
317
  $sql_alter = "ALTER TABLE `{$this->emailNotification}` DROP INDEX subscribe_unique_index, ADD UNIQUE KEY `subscribe_unique_index` (`subscribtion_id`,`email`, `post_id`);";
318
  $this->db->query($sql_alter);
319
  }
320
-
321
  public function alterSubscriptionTable() {
322
  $sql_alter = "ALTER TABLE `{$this->emailNotification}` ADD COLUMN `imported_from` VARCHAR(25) NOT NULL DEFAULT '';";
323
  $this->db->query($sql_alter);
@@ -449,7 +450,7 @@ class WpdiscuzDBManager implements WpDiscuzConstants {
449
 
450
  /* === GRAVATARS CACHE === */
451
 
452
- /* === STCR SUBSCRIPTIONS === */
453
 
454
  public function getStcrAllSubscriptions() {
455
  $sql = "SELECT COUNT(*) FROM `{$this->db->postmeta}` WHERE meta_key LIKE '%_stcr@%' AND SUBSTRING(meta_value, 21) IN ('Y', 'R');";
@@ -475,18 +476,19 @@ class WpdiscuzDBManager implements WpDiscuzConstants {
475
  $subscriptionDate = $subscription["date"];
476
  $confirm = $subscription["status"];
477
  $userSubscription = $this->getUserSubscription($email, $postId);
 
478
 
479
  if ($userSubscription) {
480
  if ($userSubscription["type"] == self::SUBSCRIPTION_POST) {
481
  continue;
482
  } else {
483
- $sql = "UPDATE `{$this->emailNotification}` SET `subscribtion_id` = %d, `post_id` = %d, `subscribtion_type` = %s, `imported_from` = 'Subscribe to Comments Reloaded' WHERE `id` = %d;";
484
- $sql = $this->db->prepare($sql, $subscriptionId, $postId, $subscriptionType, $userSubscription["id"]);
485
  $this->db->query($sql);
486
  }
487
  } else {
488
- $sql = "INSERT INTO `{$this->emailNotification}` (`email`, `subscribtion_id`, `post_id`, `subscribtion_type`, `activation_key`, `confirm`, `subscription_date`, `imported_from`) VALUES (%s, %d, %d, %s, %s, %d, %s, 'Subscribe to Comments Reloaded');";
489
- $sql = $this->db->prepare($sql, $email, $postId, $postId, $subscriptionType, $activationKey, $confirm, $subscriptionDate);
490
  $this->db->query($sql);
491
  }
492
  }
@@ -498,7 +500,55 @@ class WpdiscuzDBManager implements WpDiscuzConstants {
498
  return $this->db->get_row($sql, ARRAY_A);
499
  }
500
 
501
- /* === STCR SUBSCRIPTIONS === */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
502
 
503
  /* === STATISTICS === */
504
 
31
  * check if table exists in database
32
  * return true if exists false otherwise
33
  */
34
+ public function isTableExists($tableName, $isFullname = true) {
35
+ $sql = $isFullname ? "SHOW TABLES LIKE '$tableName'" : "SHOW TABLES LIKE '{$this->db->prefix}{$tableName}'";
36
+ return $this->db->get_var($sql);
37
  }
38
 
39
  /**
43
  $this->initDB();
44
  require_once(ABSPATH . "wp-admin/includes/upgrade.php");
45
  $charset_collate = $this->db->get_charset_collate();
46
+ $sql = "CREATE TABLE `{$this->usersVoted}`(`id` INT(11) NOT NULL AUTO_INCREMENT,`user_id` VARCHAR(32) NOT NULL, `comment_id` INT(11) NOT NULL, `vote_type` INT(11) DEFAULT NULL, `is_guest` TINYINT(1) DEFAULT 0, `post_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `date` INT(11) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `user_id` (`user_id`), KEY `comment_id` (`comment_id`), KEY `vote_type` (`vote_type`), KEY `is_guest` (`is_guest`), KEY `post_id` (`post_id`)) {$charset_collate};";
 
47
  maybe_create_table($this->usersVoted, $sql);
48
 
49
+ $sql = "CREATE TABLE `{$this->phrases}`(`id` INT(11) NOT NULL AUTO_INCREMENT, `phrase_key` VARCHAR(100) NOT NULL, `phrase_value` TEXT NOT NULL, PRIMARY KEY (`id`), KEY `phrase_key` (`phrase_key`)) {$charset_collate};";
50
  maybe_create_table($this->phrases, $sql);
51
 
52
+ $sql = "CREATE TABLE `{$this->emailNotification}`(`id` INT(11) NOT NULL AUTO_INCREMENT, `email` VARCHAR(100) NOT NULL, `subscribtion_id` INT(11) NOT NULL, `post_id` INT(11) NOT NULL, `subscribtion_type` VARCHAR(20) NOT NULL, `activation_key` VARCHAR(32) NOT NULL, `confirm` TINYINT DEFAULT 0, `subscription_date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `imported_from` VARCHAR(25) NOT NULL DEFAULT '', PRIMARY KEY (`id`), KEY `subscribtion_id` (`subscribtion_id`), KEY `post_id` (`post_id`), KEY `confirm`(`confirm`), UNIQUE KEY `subscribe_unique_index` (`subscribtion_id`,`email`,`post_id`)) {$charset_collate};";
53
  maybe_create_table($this->emailNotification, $sql);
54
 
55
+ $sql = "CREATE TABLE `{$this->avatarsCache}`(`id` INT(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL DEFAULT 0, `user_email` VARCHAR(100) NOT NULL, `url` VARCHAR(255) NOT NULL, `hash` VARCHAR(32) NOT NULL, `maketime` INT(11) NOT NULL DEFAULT 0, `cached` TINYINT(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `user_id` (`user_id`), UNIQUE KEY `user_email` (`user_email`), KEY `maketime` (`maketime`), KEY `cached` (`cached`)) {$charset_collate};";
56
  maybe_create_table($this->avatarsCache, $sql);
57
 
58
+ $sql = "CREATE TABLE `{$this->followUsers}` (`id` int(11) NOT NULL AUTO_INCREMENT, `post_id` int(11) NOT NULL DEFAULT '0', `user_id` int(11) NOT NULL DEFAULT '0', `user_email` varchar(100) NOT NULL, `user_name` varchar(255) NOT NULL, `follower_id` int(11) NOT NULL DEFAULT '0', `follower_email` varchar(100) NOT NULL, `follower_name` varchar(255) NOT NULL, `activation_key` varchar(32) NOT NULL, `confirm` tinyint(1) NOT NULL DEFAULT '0', `follow_timestamp` int(11) NOT NULL, `follow_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `post_id` (`post_id`), KEY `user_id` (`user_id`), KEY `user_email` (`user_email`), KEY `follower_id` (`follower_id`), KEY `follower_email` (`follower_email`), KEY `confirm` (`confirm`), KEY `follow_timestamp` (`follow_timestamp`), UNIQUE KEY `follow_unique_key` (`user_email`, `follower_email`)) {$charset_collate};";
59
  maybe_create_table($this->followUsers, $sql);
60
 
61
+ $sql = "CREATE TABLE `{$this->feedbackForms}` (`id` int(11) NOT NULL AUTO_INCREMENT, `post_id` int(11) NOT NULL DEFAULT 0, `unique_id` VARCHAR(15) NOT NULL, `question` varchar(255) NOT NULL, `opened` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0, `content` LONGTEXT NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `unique_id` (`unique_id`), KEY `post_id` (`post_id`)) {$charset_collate};";
62
  maybe_create_table($this->feedbackForms, $sql);
63
 
64
+ $sql = "CREATE TABLE `{$this->usersRated}` (`id` int(11) NOT NULL AUTO_INCREMENT, `post_id` int(11) NOT NULL DEFAULT 0, `user_id` int(11) NOT NULL DEFAULT 0, `user_ip` VARCHAR(32) NOT NULL DEFAULT '', `rating` int(11) NOT NULL, `date` INT(11) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `post_id` (`post_id`), KEY `user_id` (`user_id`)) {$charset_collate};";
65
  maybe_create_table($this->usersRated, $sql);
66
  }
67
 
152
  } else {
153
  $approved = " AND `c`.`comment_approved` = '1'";
154
  }
155
+ $sql = $this->db->prepare("SELECT MAX(`c`.`comment_ID`) FROM `{$this->db->comments}` AS `c`$inlineType WHERE `c`.`comment_post_ID` = %d" . $approved . ";", $args["post_id"]);
156
  } else {
157
+ $sql = "SELECT MAX(`c`.`comment_ID`) FROM `{$this->db->comments}` AS `c`$inlineType;";
158
  }
159
  return intval($this->db->get_var($sql));
160
  }
163
  * retrives new comment ids for live update (UA - Update Automatically)
164
  */
165
  public function getNewCommentIds($args, $loadLastCommentId, $email, $visibleCommentIds) {
166
+ $wpdiscuz = wpDiscuz();
167
  $approved = "";
168
  if ($args["status"] == "all") {
169
  $approved = " AND `comment_approved` IN('1','0')";
174
  if ($visibleCommentIds) {
175
  $visible = " AND `comment_ID` NOT IN(" . rtrim($visibleCommentIds, ",") . ")";
176
  }
177
+ $sqlCommentIds = $this->db->prepare("SELECT `comment_ID` FROM `{$this->db->comments}` WHERE `comment_post_ID` = %d AND `comment_ID` > %d AND `comment_author_email` != %s" . $approved . $visible . " ORDER BY `{$wpdiscuz->options->thread_display["orderCommentsBy"]}` ASC;", $args["post_id"], $loadLastCommentId, $email);
178
  return $this->db->get_col($sqlCommentIds);
179
  }
180
 
318
  $sql_alter = "ALTER TABLE `{$this->emailNotification}` DROP INDEX subscribe_unique_index, ADD UNIQUE KEY `subscribe_unique_index` (`subscribtion_id`,`email`, `post_id`);";
319
  $this->db->query($sql_alter);
320
  }
321
+
322
  public function alterSubscriptionTable() {
323
  $sql_alter = "ALTER TABLE `{$this->emailNotification}` ADD COLUMN `imported_from` VARCHAR(25) NOT NULL DEFAULT '';";
324
  $this->db->query($sql_alter);
450
 
451
  /* === GRAVATARS CACHE === */
452
 
453
+ /* === STCR SUBSCRIPTIONS - Subscribe To Comments Reloaded === */
454
 
455
  public function getStcrAllSubscriptions() {
456
  $sql = "SELECT COUNT(*) FROM `{$this->db->postmeta}` WHERE meta_key LIKE '%_stcr@%' AND SUBSTRING(meta_value, 21) IN ('Y', 'R');";
476
  $subscriptionDate = $subscription["date"];
477
  $confirm = $subscription["status"];
478
  $userSubscription = $this->getUserSubscription($email, $postId);
479
+ $importedFrom = "subscribe-to-comments-reloaded"; // this is a slug in wp repo
480
 
481
  if ($userSubscription) {
482
  if ($userSubscription["type"] == self::SUBSCRIPTION_POST) {
483
  continue;
484
  } else {
485
+ $sql = "UPDATE `{$this->emailNotification}` SET `subscribtion_id` = %d, `post_id` = %d, `subscribtion_type` = %s, `imported_from` = %s WHERE `id` = %d;";
486
+ $sql = $this->db->prepare($sql, $subscriptionId, $postId, $subscriptionType, $importedFrom, $userSubscription["id"]);
487
  $this->db->query($sql);
488
  }
489
  } else {
490
+ $sql = "INSERT INTO `{$this->emailNotification}` (`email`, `subscribtion_id`, `post_id`, `subscribtion_type`, `activation_key`, `confirm`, `subscription_date`, `imported_from`) VALUES (%s, %d, %d, %s, %s, %d, %s, %s);";
491
+ $sql = $this->db->prepare($sql, $email, $postId, $postId, $subscriptionType, $activationKey, $confirm, $subscriptionDate, $importedFrom);
492
  $this->db->query($sql);
493
  }
494
  }
500
  return $this->db->get_row($sql, ARRAY_A);
501
  }
502
 
503
+ /* === STCR SUBSCRIPTIONS - Subscribe To Comments Reloaded === */
504
+
505
+ /* === LSTC SUBSCRIPTIONS - Lightweight Subscribe To Comments === */
506
+
507
+ // TODO
508
+
509
+ public function getLstcAllSubscriptions() {
510
+ $sql = "SELECT COUNT(*) FROM `{$this->db->prefix}comment_notifier`;";
511
+ return $this->db->get_var($sql);
512
+ }
513
+
514
+ public function getLstcSubscriptions($limit, $offset) {
515
+ $data = [];
516
+ if (intval($limit) && intval($offset) >= 0) {
517
+ $sql = "SELECT `post_id`, `email`, NOW() AS `date`, 'post' AS `subscription_type`, 1 AS `status` FROM `{$this->db->prefix}comment_notifier` ORDER BY `id` ASC LIMIT $offset, $limit;";
518
+ $data = $this->db->get_results($sql, ARRAY_A);
519
+ }
520
+ return $data;
521
+ }
522
+
523
+ public function addLstcSubscriptions($subscriptions = []) {
524
+ foreach ($subscriptions as $k => $subscription) {
525
+ $email = $subscription["email"];
526
+ $subscriptionId = $subscription["post_id"];
527
+ $postId = $subscription["post_id"];
528
+ $subscriptionType = self::SUBSCRIPTION_POST;
529
+ $activationKey = md5($email . uniqid() . time());
530
+ $subscriptionDate = $subscription["date"];
531
+ $confirm = $subscription["status"];
532
+ $userSubscription = $this->getUserSubscription($email, $postId);
533
+ $importedFrom = "comment-notifier-no-spammers"; // this is a slug in wp repo
534
+
535
+ if ($userSubscription) {
536
+ if ($userSubscription["type"] == self::SUBSCRIPTION_POST) {
537
+ continue;
538
+ } else {
539
+ $sql = "UPDATE `{$this->emailNotification}` SET `subscribtion_id` = %d, `post_id` = %d, `subscribtion_type` = %s, `imported_from` = %s WHERE `id` = %d;";
540
+ $sql = $this->db->prepare($sql, $subscriptionId, $postId, $subscriptionType, $importedFrom, $userSubscription["id"]);
541
+ $this->db->query($sql);
542
+ }
543
+ } else {
544
+ $sql = "INSERT INTO `{$this->emailNotification}` (`email`, `subscribtion_id`, `post_id`, `subscribtion_type`, `activation_key`, `confirm`, `subscription_date`, `imported_from`) VALUES (%s, %d, %d, %s, %s, %d, %s, %s);";
545
+ $sql = $this->db->prepare($sql, $email, $postId, $postId, $subscriptionType, $activationKey, $confirm, $subscriptionDate, $importedFrom);
546
+ $this->db->query($sql);
547
+ }
548
+ }
549
+ }
550
+
551
+ /* === LSTC SUBSCRIPTIONS - Lightweight Subscribe To Comments === */
552
 
553
  /* === STATISTICS === */
554
 
includes/interface.WpDiscuzConstants.php CHANGED
@@ -87,7 +87,7 @@ interface WpDiscuzConstants {
87
  /* === Media Uploading === */
88
  const METAKEY_ATTCHMENT_COMMENT_ID = "_wmu_comment_id";
89
  const METAKEY_ATTCHMENT_OWNER_IP = "_wmu_owner_ip";
90
- const METAKEY_IMPORTED_FROM = "_wmu_imported_from";
91
  const METAKEY_ATTACHMENTS = "wmu_attachments";
92
  const KEY_IMAGES = "images";
93
  const INPUT_NAME = "wmu_files";
87
  /* === Media Uploading === */
88
  const METAKEY_ATTCHMENT_COMMENT_ID = "_wmu_comment_id";
89
  const METAKEY_ATTCHMENT_OWNER_IP = "_wmu_owner_ip";
90
+ const METAKEY_ATTCHMENT_IMPORTED_FROM = "_wmu_imported_from";
91
  const METAKEY_ATTACHMENTS = "wmu_attachments";
92
  const KEY_IMAGES = "images";
93
  const INPUT_NAME = "wmu_files";
options/class.WpdiscuzOptions.php CHANGED
@@ -91,6 +91,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
91
  $this->form["linkButton"] = isset($options[self::TAB_FORM]["linkButton"]) ? $options[self::TAB_FORM]["linkButton"] : $defaultOptions[self::TAB_FORM]["linkButton"];
92
  $this->form["sourcecodeButton"] = isset($options[self::TAB_FORM]["sourcecodeButton"]) ? $options[self::TAB_FORM]["sourcecodeButton"] : $defaultOptions[self::TAB_FORM]["sourcecodeButton"];
93
  $this->form["spoilerButton"] = isset($options[self::TAB_FORM]["spoilerButton"]) ? $options[self::TAB_FORM]["spoilerButton"] : $defaultOptions[self::TAB_FORM]["spoilerButton"];
 
94
  $this->form["commenterNameMinLength"] = isset($options[self::TAB_FORM]["commenterNameMinLength"]) ? $options[self::TAB_FORM]["commenterNameMinLength"] : $defaultOptions[self::TAB_FORM]["commenterNameMinLength"];
95
  $this->form["commenterNameMaxLength"] = isset($options[self::TAB_FORM]["commenterNameMaxLength"]) ? $options[self::TAB_FORM]["commenterNameMaxLength"] : $defaultOptions[self::TAB_FORM]["commenterNameMaxLength"];
96
  $this->form["storeCommenterData"] = isset($options[self::TAB_FORM]["storeCommenterData"]) ? $options[self::TAB_FORM]["storeCommenterData"] : $defaultOptions[self::TAB_FORM]["storeCommenterData"];
@@ -116,6 +117,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
116
  $this->login["enableProfileURLs"] = isset($options[self::TAB_LOGIN]["enableProfileURLs"]) ? $options[self::TAB_LOGIN]["enableProfileURLs"] : $defaultOptions[self::TAB_LOGIN]["enableProfileURLs"];
117
  $this->login["websiteAsProfileUrl"] = isset($options[self::TAB_LOGIN]["websiteAsProfileUrl"]) ? $options[self::TAB_LOGIN]["websiteAsProfileUrl"] : $defaultOptions[self::TAB_LOGIN]["websiteAsProfileUrl"];
118
  $this->login["isUserByEmail"] = isset($options[self::TAB_LOGIN]["isUserByEmail"]) ? $options[self::TAB_LOGIN]["isUserByEmail"] : $defaultOptions[self::TAB_LOGIN]["isUserByEmail"];
 
119
  /* social */
120
  $this->social["socialLoginAgreementCheckbox"] = isset($options[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"]) ? $options[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"] : $defaultOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"];
121
  $this->social["socialLoginInSecondaryForm"] = isset($options[self::TAB_SOCIAL]["socialLoginInSecondaryForm"]) ? $options[self::TAB_SOCIAL]["socialLoginInSecondaryForm"] : $defaultOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"];
@@ -206,6 +208,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
206
  $this->thread_display["reverseChildren"] = isset($options[self::TAB_THREAD_DISPLAY]["reverseChildren"]) ? $options[self::TAB_THREAD_DISPLAY]["reverseChildren"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"];
207
  $this->thread_display["highlightUnreadComments"] = isset($options[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"]) ? $options[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"];
208
  $this->thread_display["scrollToComment"] = isset($options[self::TAB_THREAD_DISPLAY]["scrollToComment"]) ? $options[self::TAB_THREAD_DISPLAY]["scrollToComment"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["scrollToComment"];
 
209
  /* thread_layouts */
210
  $this->thread_layouts["showCommentLink"] = isset($options[self::TAB_THREAD_LAYOUTS]["showCommentLink"]) ? $options[self::TAB_THREAD_LAYOUTS]["showCommentLink"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showCommentLink"];
211
  $this->thread_layouts["showCommentDate"] = isset($options[self::TAB_THREAD_LAYOUTS]["showCommentDate"]) ? $options[self::TAB_THREAD_LAYOUTS]["showCommentDate"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"];
@@ -534,6 +537,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
534
  "linkButton" => $this->form["linkButton"],
535
  "sourcecodeButton" => $this->form["sourcecodeButton"],
536
  "spoilerButton" => $this->form["spoilerButton"],
 
537
  "commenterNameMinLength" => $this->form["commenterNameMinLength"],
538
  "commenterNameMaxLength" => $this->form["commenterNameMaxLength"],
539
  "storeCommenterData" => $this->form["storeCommenterData"],
@@ -557,6 +561,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
557
  "enableProfileURLs" => $this->login["enableProfileURLs"],
558
  "websiteAsProfileUrl" => $this->login["websiteAsProfileUrl"],
559
  "isUserByEmail" => $this->login["isUserByEmail"],
 
560
  ],
561
  self::TAB_SOCIAL => [
562
  "socialLoginAgreementCheckbox" => $this->social["socialLoginAgreementCheckbox"],
@@ -650,6 +655,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
650
  "reverseChildren" => $this->thread_display["reverseChildren"],
651
  "highlightUnreadComments" => $this->thread_display["highlightUnreadComments"],
652
  "scrollToComment" => $this->thread_display["scrollToComment"],
 
653
  ],
654
  self::TAB_THREAD_LAYOUTS => [
655
  "showCommentLink" => $this->thread_layouts["showCommentLink"],
@@ -791,6 +797,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
791
  "linkButton" => 1,
792
  "sourcecodeButton" => 1,
793
  "spoilerButton" => 1,
 
794
  "commenterNameMinLength" => 3,
795
  "commenterNameMaxLength" => 50,
796
  "storeCommenterData" => -1,
@@ -814,6 +821,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
814
  "enableProfileURLs" => 1,
815
  "websiteAsProfileUrl" => 1,
816
  "isUserByEmail" => 0,
 
817
  ],
818
  self::TAB_SOCIAL => [
819
  "socialLoginAgreementCheckbox" => 1,
@@ -891,6 +899,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
891
  "reverseChildren" => 0,
892
  "highlightUnreadComments" => 0,
893
  "scrollToComment" => 1,
 
894
  ],
895
  self::TAB_THREAD_LAYOUTS => [
896
  "showCommentLink" => 1,
@@ -1103,7 +1112,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
1103
  $jsArgs["loadRichEditor"] = intval($this->form["richEditor"] === "both" || (!wp_is_mobile() && $this->form["richEditor"] === "desktop"));
1104
  //**reCaptcha**//
1105
  $jsArgs["wpDiscuzReCaptchaSK"] = apply_filters("wpdiscuz_recaptcha_site_key", $this->recaptcha["siteKey"]);
1106
- $jsArgs["wpDiscuztheme"] = $this->recaptcha["theme"];
1107
  $jsArgs["wpDiscuzReCaptchaVersion"] = apply_filters("wpdiscuz_recaptcha_version", $this->recaptcha["version"]);
1108
  $jsArgs["wc_captcha_show_for_guest"] = $this->recaptcha["showForGuests"];
1109
  $jsArgs["wc_captcha_show_for_members"] = $this->recaptcha["showForUsers"];
@@ -1214,6 +1223,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
1214
  $this->form["linkButton"] = isset($_POST[self::TAB_FORM]["linkButton"]) ? intval($_POST[self::TAB_FORM]["linkButton"]) : 0;
1215
  $this->form["sourcecodeButton"] = isset($_POST[self::TAB_FORM]["sourcecodeButton"]) ? intval($_POST[self::TAB_FORM]["sourcecodeButton"]) : 0;
1216
  $this->form["spoilerButton"] = isset($_POST[self::TAB_FORM]["spoilerButton"]) ? intval($_POST[self::TAB_FORM]["spoilerButton"]) : 0;
 
1217
  $this->form["commenterNameMinLength"] = isset($_POST[self::TAB_FORM]["commenterNameMinLength"]) && absint($_POST[self::TAB_FORM]["commenterNameMinLength"]) >= 1 ? absint($_POST[self::TAB_FORM]["commenterNameMinLength"]) : 1;
1218
  $this->form["commenterNameMaxLength"] = isset($_POST[self::TAB_FORM]["commenterNameMaxLength"]) && absint($_POST[self::TAB_FORM]["commenterNameMaxLength"]) >= 3 && absint($_POST[self::TAB_FORM]["commenterNameMaxLength"]) <= 50 ? absint($_POST[self::TAB_FORM]["commenterNameMaxLength"]) : 50;
1219
  $this->form["storeCommenterData"] = isset($_POST[self::TAB_FORM]["storeCommenterData"]) && (intval($_POST[self::TAB_FORM]["storeCommenterData"]) || $_POST[self::TAB_FORM]["storeCommenterData"] == 0) ? intval($_POST[self::TAB_FORM]["storeCommenterData"]) : -1;
@@ -1247,6 +1257,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
1247
  $this->login["enableProfileURLs"] = isset($_POST[self::TAB_LOGIN]["enableProfileURLs"]) ? absint($_POST[self::TAB_LOGIN]["enableProfileURLs"]) : 0;
1248
  $this->login["websiteAsProfileUrl"] = isset($_POST[self::TAB_LOGIN]["websiteAsProfileUrl"]) ? absint($_POST[self::TAB_LOGIN]["websiteAsProfileUrl"]) : 0;
1249
  $this->login["isUserByEmail"] = isset($_POST[self::TAB_LOGIN]["isUserByEmail"]) ? absint($_POST[self::TAB_LOGIN]["isUserByEmail"]) : 0;
 
1250
  } else if (self::TAB_SOCIAL === $_POST["wpd_tab"]) {
1251
  $this->social["socialLoginAgreementCheckbox"] = isset($_POST[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"]) ? absint($_POST[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"]) : 0;
1252
  $this->social["socialLoginInSecondaryForm"] = isset($_POST[self::TAB_SOCIAL]["socialLoginInSecondaryForm"]) ? absint($_POST[self::TAB_SOCIAL]["socialLoginInSecondaryForm"]) : 0;
@@ -1337,6 +1348,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
1337
  $this->thread_display["reverseChildren"] = isset($_POST[self::TAB_THREAD_DISPLAY]["reverseChildren"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["reverseChildren"]) : 0;
1338
  $this->thread_display["highlightUnreadComments"] = isset($_POST[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"]) : 0;
1339
  $this->thread_display["scrollToComment"] = isset($_POST[self::TAB_THREAD_DISPLAY]["scrollToComment"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["scrollToComment"]) : 0;
 
1340
  } else if (self::TAB_THREAD_LAYOUTS === $_POST["wpd_tab"]) {
1341
  $this->thread_layouts["showCommentLink"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showCommentLink"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showCommentLink"]) : 0;
1342
  $this->thread_layouts["showCommentDate"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showCommentDate"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showCommentDate"]) : 0;
@@ -1816,7 +1828,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
1816
  "private" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "wpDiscuzPrivateComment", "title" => "Private Comments", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/private/header.png"), "desc" => esc_html__("Allows to create private comment threads. Rich management options in dashboard by user roles.", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-private-comments/"],
1817
  "subscriptions" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "wpdSubscribeManager", "title" => "Subscription Manager", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/subscriptions/header.png"), "desc" => esc_html__("Total control over comment subscriptions. Full list, monitor, manage, filter, unsubscribe, confirm...", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-subscribe-manager/"],
1818
  "ads-manager" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "WpdiscuzAdsManager", "title" => "Ads Manager", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/ads-manager/header.png"), "desc" => esc_html__("A full-fledged tool-kit for advertising in comment section of your website. Separate banner and ad managment.", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-ads-manager/"],
1819
- "user-mention" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "Wpdiscuz_UCM", "title" => "User &amp; Comment Mentioning", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/user-mention/header.png"), "desc" => esc_html__("Allows to mention comments and users in comment text using #comment-id and @username tags.", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-user-comment-mentioning/"],
1820
  "likers" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "WpdiscuzVoters", "title" => "Advanced Likers", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/likers/header.png"), "desc" => esc_html__("See comment likers and voters of each comment. Adds user reputation and badges based on received likes.", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-advanced-likers/"],
1821
  "translate" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "WpDiscuzTranslate", "title" => "Comment Translate", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/translate/header.png"), "desc" => esc_html__('Adds a smart and intuitive AJAX "Translate" button with 60 language options. Uses free translation API.', "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-comment-translation/"],
1822
  "search" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "wpDiscuzCommentSearch", "title" => "Comment Search", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/search/header.png"), "desc" => esc_html__("AJAX powered front-end comment search. It starts searching while you type search words. ", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-comment-search/"],
@@ -2044,7 +2056,17 @@ class WpdiscuzOptions implements WpDiscuzConstants {
2044
  }
2045
 
2046
  public function getDefaultFileTypes() {
2047
- $types = ["jpg|jpeg|jpe" => "image/jpeg", "gif" => "image/gif", "png" => "image/png", "bmp" => "image/bmp", "tiff|tif" => "image/tiff", "ico" => "image/x-icon"];
 
 
 
 
 
 
 
 
 
 
2048
  $types = apply_filters("wpdiscuz_mu_file_types", $types);
2049
  return $types;
2050
  }
@@ -2540,6 +2562,12 @@ class WpdiscuzOptions implements WpDiscuzConstants {
2540
  return $newOptions;
2541
  }
2542
 
 
 
 
 
 
 
2543
  public function settingsArray() {
2544
  $settings = [
2545
  "core" => [
@@ -2593,6 +2621,13 @@ class WpdiscuzOptions implements WpDiscuzConstants {
2593
  "description_original" => "Please click on buttons to disable or enable. The enabled buttons are colored green, the disabled buttons are gray. If you want to disable the whole formatting toolbar, please click on the [Disable formatting buttons] button. Options to manage Image Attachment button are located in 'Comment Content and Media' setting page.",
2594
  "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#rich-editor-toolbar-buttons"
2595
  ],
 
 
 
 
 
 
 
2596
  ]
2597
  ],
2598
  WpdiscuzCore::TAB_RECAPTCHA => [
@@ -2711,7 +2746,14 @@ class WpdiscuzOptions implements WpDiscuzConstants {
2711
  "description" => esc_html__("Sometimes registered users comment as guest using the same email address. wpDiscuz can detect the account role using guest email and display commenter label correctly.", "wpdiscuz"),
2712
  "description_original" => "Sometimes registered users comment as guest using the same email address. wpDiscuz can detect the account role using guest email and display commenter label correctly.",
2713
  "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#use-guest-email-to-detect-registered-account"
2714
- ]
 
 
 
 
 
 
 
2715
  ]
2716
  ],
2717
  WpdiscuzCore::TAB_SOCIAL => [
@@ -3218,6 +3260,13 @@ class WpdiscuzOptions implements WpDiscuzConstants {
3218
  "description_original" => "",
3219
  "docurl" => ""
3220
  ],
 
 
 
 
 
 
 
3221
  ]
3222
  ],
3223
  WpdiscuzCore::TAB_THREAD_LAYOUTS => [
@@ -3348,7 +3397,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
3348
  "label_original" => "Comment Text Size",
3349
  "description" => "",
3350
  "description_original" => "",
3351
- "docurl" => "#"
3352
  ],
3353
  "enableFontAwesome" => [
3354
  "label" => esc_html__("Load Font Awesome css lib", "wpdiscuz"),
@@ -3761,7 +3810,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
3761
  "label_original" => "Secure comment content in HTTPS protocol.",
3762
  "description" => esc_html__("This option detects images and other contents with non-https source URLs and fix according to your selected logic.", "wpdiscuz"),
3763
  "description_original" => "This option detects images and other contents with non-https source URLs and fix according to your selected logic.",
3764
- "docurl" => "#"
3765
  ],
3766
  "redirectPage" => [
3767
  "label" => esc_html__("Redirect First Comment to", "wpdiscuz"),
@@ -3796,7 +3845,7 @@ class WpdiscuzOptions implements WpDiscuzConstants {
3796
  "label_original" => "Help wpDiscuz to grow allowing people to recognize which comment plugin you use",
3797
  "description" => esc_html__("Please check this option on to help wpDiscuz get more popularity as your thank to the hard work we do for you totally free. This option adds a very small (16x16px) icon under the comment section which will allow your site visitors recognize the name of comment solution you use.", "wpdiscuz"),
3798
  "description_original" => "Please check this option on to help wpDiscuz get more popularity as your thank to the hard work we do for you totally free. This option adds a very small (16x16px) icon under the comment section which will allow your site visitors recognize the name of comment solution you use.",
3799
- "docurl" => "#"
3800
  ],
3801
  "isGravatarCacheEnabled" => [
3802
  "label" => esc_html__("Enable Gravatar caching", "wpdiscuz"),
@@ -3824,21 +3873,21 @@ class WpdiscuzOptions implements WpDiscuzConstants {
3824
  "label_original" => "Remove Vote Data",
3825
  "description" => "",
3826
  "description_original" => "",
3827
- "docurl" => "#"
3828
  ],
3829
  "purgeAvatarCache" => [
3830
  "label" => esc_html__("Purge Expired Avatar Caches", "wpdiscuz"),
3831
  "label_original" => "Purge Expired Avatar Caches",
3832
  "description" => "",
3833
  "description_original" => "",
3834
- "docurl" => "#"
3835
  ],
3836
  "purgeAllCaches" => [
3837
  "label" => esc_html__("Purge All Avatar Caches", "wpdiscuz"),
3838
  "label_original" => "Purge All Avatar Caches",
3839
  "description" => "",
3840
  "description_original" => "",
3841
- "docurl" => "#"
3842
  ]
3843
  ]
3844
  ],
91
  $this->form["linkButton"] = isset($options[self::TAB_FORM]["linkButton"]) ? $options[self::TAB_FORM]["linkButton"] : $defaultOptions[self::TAB_FORM]["linkButton"];
92
  $this->form["sourcecodeButton"] = isset($options[self::TAB_FORM]["sourcecodeButton"]) ? $options[self::TAB_FORM]["sourcecodeButton"] : $defaultOptions[self::TAB_FORM]["sourcecodeButton"];
93
  $this->form["spoilerButton"] = isset($options[self::TAB_FORM]["spoilerButton"]) ? $options[self::TAB_FORM]["spoilerButton"] : $defaultOptions[self::TAB_FORM]["spoilerButton"];
94
+ $this->form["enableQuickTags"] = isset($options[self::TAB_FORM]["enableQuickTags"]) ? $options[self::TAB_FORM]["enableQuickTags"] : $defaultOptions[self::TAB_FORM]["enableQuickTags"];
95
  $this->form["commenterNameMinLength"] = isset($options[self::TAB_FORM]["commenterNameMinLength"]) ? $options[self::TAB_FORM]["commenterNameMinLength"] : $defaultOptions[self::TAB_FORM]["commenterNameMinLength"];
96
  $this->form["commenterNameMaxLength"] = isset($options[self::TAB_FORM]["commenterNameMaxLength"]) ? $options[self::TAB_FORM]["commenterNameMaxLength"] : $defaultOptions[self::TAB_FORM]["commenterNameMaxLength"];
97
  $this->form["storeCommenterData"] = isset($options[self::TAB_FORM]["storeCommenterData"]) ? $options[self::TAB_FORM]["storeCommenterData"] : $defaultOptions[self::TAB_FORM]["storeCommenterData"];
117
  $this->login["enableProfileURLs"] = isset($options[self::TAB_LOGIN]["enableProfileURLs"]) ? $options[self::TAB_LOGIN]["enableProfileURLs"] : $defaultOptions[self::TAB_LOGIN]["enableProfileURLs"];
118
  $this->login["websiteAsProfileUrl"] = isset($options[self::TAB_LOGIN]["websiteAsProfileUrl"]) ? $options[self::TAB_LOGIN]["websiteAsProfileUrl"] : $defaultOptions[self::TAB_LOGIN]["websiteAsProfileUrl"];
119
  $this->login["isUserByEmail"] = isset($options[self::TAB_LOGIN]["isUserByEmail"]) ? $options[self::TAB_LOGIN]["isUserByEmail"] : $defaultOptions[self::TAB_LOGIN]["isUserByEmail"];
120
+ $this->login["loginUrl"] = isset($options[self::TAB_LOGIN]["loginUrl"]) ? $options[self::TAB_LOGIN]["loginUrl"] : $defaultOptions[self::TAB_LOGIN]["loginUrl"];
121
  /* social */
122
  $this->social["socialLoginAgreementCheckbox"] = isset($options[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"]) ? $options[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"] : $defaultOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"];
123
  $this->social["socialLoginInSecondaryForm"] = isset($options[self::TAB_SOCIAL]["socialLoginInSecondaryForm"]) ? $options[self::TAB_SOCIAL]["socialLoginInSecondaryForm"] : $defaultOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"];
208
  $this->thread_display["reverseChildren"] = isset($options[self::TAB_THREAD_DISPLAY]["reverseChildren"]) ? $options[self::TAB_THREAD_DISPLAY]["reverseChildren"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"];
209
  $this->thread_display["highlightUnreadComments"] = isset($options[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"]) ? $options[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"];
210
  $this->thread_display["scrollToComment"] = isset($options[self::TAB_THREAD_DISPLAY]["scrollToComment"]) ? $options[self::TAB_THREAD_DISPLAY]["scrollToComment"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["scrollToComment"];
211
+ $this->thread_display["orderCommentsBy"] = isset($options[self::TAB_THREAD_DISPLAY]["orderCommentsBy"]) ? $options[self::TAB_THREAD_DISPLAY]["orderCommentsBy"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["orderCommentsBy"];
212
  /* thread_layouts */
213
  $this->thread_layouts["showCommentLink"] = isset($options[self::TAB_THREAD_LAYOUTS]["showCommentLink"]) ? $options[self::TAB_THREAD_LAYOUTS]["showCommentLink"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showCommentLink"];
214
  $this->thread_layouts["showCommentDate"] = isset($options[self::TAB_THREAD_LAYOUTS]["showCommentDate"]) ? $options[self::TAB_THREAD_LAYOUTS]["showCommentDate"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"];
537
  "linkButton" => $this->form["linkButton"],
538
  "sourcecodeButton" => $this->form["sourcecodeButton"],
539
  "spoilerButton" => $this->form["spoilerButton"],
540
+ "enableQuickTags" => $this->form["enableQuickTags"],
541
  "commenterNameMinLength" => $this->form["commenterNameMinLength"],
542
  "commenterNameMaxLength" => $this->form["commenterNameMaxLength"],
543
  "storeCommenterData" => $this->form["storeCommenterData"],
561
  "enableProfileURLs" => $this->login["enableProfileURLs"],
562
  "websiteAsProfileUrl" => $this->login["websiteAsProfileUrl"],
563
  "isUserByEmail" => $this->login["isUserByEmail"],
564
+ "loginUrl" => $this->login["loginUrl"],
565
  ],
566
  self::TAB_SOCIAL => [
567
  "socialLoginAgreementCheckbox" => $this->social["socialLoginAgreementCheckbox"],
655
  "reverseChildren" => $this->thread_display["reverseChildren"],
656
  "highlightUnreadComments" => $this->thread_display["highlightUnreadComments"],
657
  "scrollToComment" => $this->thread_display["scrollToComment"],
658
+ "orderCommentsBy" => $this->thread_display["orderCommentsBy"],
659
  ],
660
  self::TAB_THREAD_LAYOUTS => [
661
  "showCommentLink" => $this->thread_layouts["showCommentLink"],
797
  "linkButton" => 1,
798
  "sourcecodeButton" => 1,
799
  "spoilerButton" => 1,
800
+ "enableQuickTags" => 0,
801
  "commenterNameMinLength" => 3,
802
  "commenterNameMaxLength" => 50,
803
  "storeCommenterData" => -1,
821
  "enableProfileURLs" => 1,
822
  "websiteAsProfileUrl" => 1,
823
  "isUserByEmail" => 0,
824
+ "loginUrl" => "",
825
  ],
826
  self::TAB_SOCIAL => [
827
  "socialLoginAgreementCheckbox" => 1,
899
  "reverseChildren" => 0,
900
  "highlightUnreadComments" => 0,
901
  "scrollToComment" => 1,
902
+ "orderCommentsBy" => "comment_ID",
903
  ],
904
  self::TAB_THREAD_LAYOUTS => [
905
  "showCommentLink" => 1,
1112
  $jsArgs["loadRichEditor"] = intval($this->form["richEditor"] === "both" || (!wp_is_mobile() && $this->form["richEditor"] === "desktop"));
1113
  //**reCaptcha**//
1114
  $jsArgs["wpDiscuzReCaptchaSK"] = apply_filters("wpdiscuz_recaptcha_site_key", $this->recaptcha["siteKey"]);
1115
+ $jsArgs["wpDiscuzReCaptchaTheme"] = $this->recaptcha["theme"];
1116
  $jsArgs["wpDiscuzReCaptchaVersion"] = apply_filters("wpdiscuz_recaptcha_version", $this->recaptcha["version"]);
1117
  $jsArgs["wc_captcha_show_for_guest"] = $this->recaptcha["showForGuests"];
1118
  $jsArgs["wc_captcha_show_for_members"] = $this->recaptcha["showForUsers"];
1223
  $this->form["linkButton"] = isset($_POST[self::TAB_FORM]["linkButton"]) ? intval($_POST[self::TAB_FORM]["linkButton"]) : 0;
1224
  $this->form["sourcecodeButton"] = isset($_POST[self::TAB_FORM]["sourcecodeButton"]) ? intval($_POST[self::TAB_FORM]["sourcecodeButton"]) : 0;
1225
  $this->form["spoilerButton"] = isset($_POST[self::TAB_FORM]["spoilerButton"]) ? intval($_POST[self::TAB_FORM]["spoilerButton"]) : 0;
1226
+ $this->form["enableQuickTags"] = isset($_POST[self::TAB_FORM]["enableQuickTags"]) ? intval($_POST[self::TAB_FORM]["enableQuickTags"]) : 0;
1227
  $this->form["commenterNameMinLength"] = isset($_POST[self::TAB_FORM]["commenterNameMinLength"]) && absint($_POST[self::TAB_FORM]["commenterNameMinLength"]) >= 1 ? absint($_POST[self::TAB_FORM]["commenterNameMinLength"]) : 1;
1228
  $this->form["commenterNameMaxLength"] = isset($_POST[self::TAB_FORM]["commenterNameMaxLength"]) && absint($_POST[self::TAB_FORM]["commenterNameMaxLength"]) >= 3 && absint($_POST[self::TAB_FORM]["commenterNameMaxLength"]) <= 50 ? absint($_POST[self::TAB_FORM]["commenterNameMaxLength"]) : 50;
1229
  $this->form["storeCommenterData"] = isset($_POST[self::TAB_FORM]["storeCommenterData"]) && (intval($_POST[self::TAB_FORM]["storeCommenterData"]) || $_POST[self::TAB_FORM]["storeCommenterData"] == 0) ? intval($_POST[self::TAB_FORM]["storeCommenterData"]) : -1;
1257
  $this->login["enableProfileURLs"] = isset($_POST[self::TAB_LOGIN]["enableProfileURLs"]) ? absint($_POST[self::TAB_LOGIN]["enableProfileURLs"]) : 0;
1258
  $this->login["websiteAsProfileUrl"] = isset($_POST[self::TAB_LOGIN]["websiteAsProfileUrl"]) ? absint($_POST[self::TAB_LOGIN]["websiteAsProfileUrl"]) : 0;
1259
  $this->login["isUserByEmail"] = isset($_POST[self::TAB_LOGIN]["isUserByEmail"]) ? absint($_POST[self::TAB_LOGIN]["isUserByEmail"]) : 0;
1260
+ $this->login["loginUrl"] = isset($_POST[self::TAB_LOGIN]["loginUrl"]) && ($l = trim($_POST[self::TAB_LOGIN]["loginUrl"])) ? $l : "";
1261
  } else if (self::TAB_SOCIAL === $_POST["wpd_tab"]) {
1262
  $this->social["socialLoginAgreementCheckbox"] = isset($_POST[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"]) ? absint($_POST[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"]) : 0;
1263
  $this->social["socialLoginInSecondaryForm"] = isset($_POST[self::TAB_SOCIAL]["socialLoginInSecondaryForm"]) ? absint($_POST[self::TAB_SOCIAL]["socialLoginInSecondaryForm"]) : 0;
1348
  $this->thread_display["reverseChildren"] = isset($_POST[self::TAB_THREAD_DISPLAY]["reverseChildren"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["reverseChildren"]) : 0;
1349
  $this->thread_display["highlightUnreadComments"] = isset($_POST[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"]) : 0;
1350
  $this->thread_display["scrollToComment"] = isset($_POST[self::TAB_THREAD_DISPLAY]["scrollToComment"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["scrollToComment"]) : 0;
1351
+ $this->thread_display["orderCommentsBy"] = isset($_POST[self::TAB_THREAD_DISPLAY]["orderCommentsBy"]) && ($o = trim($_POST[self::TAB_THREAD_DISPLAY]["orderCommentsBy"])) && in_array($o, ["comment_ID", "comment_date_gmt"]) ? $o : "comment_ID";
1352
  } else if (self::TAB_THREAD_LAYOUTS === $_POST["wpd_tab"]) {
1353
  $this->thread_layouts["showCommentLink"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showCommentLink"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showCommentLink"]) : 0;
1354
  $this->thread_layouts["showCommentDate"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showCommentDate"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showCommentDate"]) : 0;
1828
  "private" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "wpDiscuzPrivateComment", "title" => "Private Comments", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/private/header.png"), "desc" => esc_html__("Allows to create private comment threads. Rich management options in dashboard by user roles.", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-private-comments/"],
1829
  "subscriptions" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "wpdSubscribeManager", "title" => "Subscription Manager", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/subscriptions/header.png"), "desc" => esc_html__("Total control over comment subscriptions. Full list, monitor, manage, filter, unsubscribe, confirm...", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-subscribe-manager/"],
1830
  "ads-manager" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "WpdiscuzAdsManager", "title" => "Ads Manager", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/ads-manager/header.png"), "desc" => esc_html__("A full-fledged tool-kit for advertising in comment section of your website. Separate banner and ad managment.", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-ads-manager/"],
1831
+ "user-mention" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "WpdiscuzUCM", "title" => "User &amp; Comment Mentioning", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/user-mention/header.png"), "desc" => esc_html__("Allows to mention comments and users in comment text using #comment-id and @username tags.", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-user-comment-mentioning/"],
1832
  "likers" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "WpdiscuzVoters", "title" => "Advanced Likers", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/likers/header.png"), "desc" => esc_html__("See comment likers and voters of each comment. Adds user reputation and badges based on received likes.", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-advanced-likers/"],
1833
  "translate" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "WpDiscuzTranslate", "title" => "Comment Translate", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/translate/header.png"), "desc" => esc_html__('Adds a smart and intuitive AJAX "Translate" button with 60 language options. Uses free translation API.', "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-comment-translation/"],
1834
  "search" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "wpDiscuzCommentSearch", "title" => "Comment Search", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/search/header.png"), "desc" => esc_html__("AJAX powered front-end comment search. It starts searching while you type search words. ", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-comment-search/"],
2056
  }
2057
 
2058
  public function getDefaultFileTypes() {
2059
+ $types = [
2060
+ "jpg" => "image/jpeg",
2061
+ "jpeg" => "image/jpeg",
2062
+ "jpe" => "image/jpeg",
2063
+ "gif" => "image/gif",
2064
+ "png" => "image/png",
2065
+ "bmp" => "image/bmp",
2066
+ "tiff" => "image/tiff",
2067
+ "tif" => "image/tiff",
2068
+ "ico" => "image/x-icon",
2069
+ ];
2070
  $types = apply_filters("wpdiscuz_mu_file_types", $types);
2071
  return $types;
2072
  }
2562
  return $newOptions;
2563
  }
2564
 
2565
+ public function printDocLink($docUrl) {
2566
+ if ($docUrl && $docUrl !== "#") {
2567
+ echo "<a href='" . esc_url_raw($docUrl) . "' title='" . esc_attr("Read the documentation", "wpdiscuz") . "' target='_blank'><i class='far fa-question-circle'></i></a>";
2568
+ }
2569
+ }
2570
+
2571
  public function settingsArray() {
2572
  $settings = [
2573
  "core" => [
2621
  "description_original" => "Please click on buttons to disable or enable. The enabled buttons are colored green, the disabled buttons are gray. If you want to disable the whole formatting toolbar, please click on the [Disable formatting buttons] button. Options to manage Image Attachment button are located in 'Comment Content and Media' setting page.",
2622
  "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#rich-editor-toolbar-buttons"
2623
  ],
2624
+ "enableQuickTags" => [
2625
+ "label" => esc_html__("Enable Quicktags", "wpdiscuz"),
2626
+ "label_original" => "Enable Quicktags",
2627
+ "description" => esc_html__('Quicktag is a on-click button that inserts HTML in to comment textarea. For example the "b" Quicktag will insert the HTML bold tags < b > < /b >.', "wpdiscuz"),
2628
+ "description_original" => 'Quicktag is a on-click button that inserts HTML in to comment textarea. For example the "b" Quicktag will insert the HTML bold tags < b > < /b >.',
2629
+ "docurl" => ""
2630
+ ],
2631
  ]
2632
  ],
2633
  WpdiscuzCore::TAB_RECAPTCHA => [
2746
  "description" => esc_html__("Sometimes registered users comment as guest using the same email address. wpDiscuz can detect the account role using guest email and display commenter label correctly.", "wpdiscuz"),
2747
  "description_original" => "Sometimes registered users comment as guest using the same email address. wpDiscuz can detect the account role using guest email and display commenter label correctly.",
2748
  "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#use-guest-email-to-detect-registered-account"
2749
+ ],
2750
+ "loginUrl" => [
2751
+ "label" => esc_html__("Login URL", "wpdiscuz"),
2752
+ "label_original" => "Login URL",
2753
+ "description" => "",
2754
+ "description_original" => "",
2755
+ "docurl" => ""
2756
+ ],
2757
  ]
2758
  ],
2759
  WpdiscuzCore::TAB_SOCIAL => [
3260
  "description_original" => "",
3261
  "docurl" => ""
3262
  ],
3263
+ "orderCommentsBy" => [
3264
+ "label" => __("Newest and oldest comment ordering by", "wpdiscuz"),
3265
+ "label_original" => "Newest and oldest comment ordering by",
3266
+ "description" => "",
3267
+ "description_original" => "",
3268
+ "docurl" => ""
3269
+ ],
3270
  ]
3271
  ],
3272
  WpdiscuzCore::TAB_THREAD_LAYOUTS => [
3397
  "label_original" => "Comment Text Size",
3398
  "description" => "",
3399
  "description_original" => "",
3400
+ "docurl" => ""
3401
  ],
3402
  "enableFontAwesome" => [
3403
  "label" => esc_html__("Load Font Awesome css lib", "wpdiscuz"),
3810
  "label_original" => "Secure comment content in HTTPS protocol.",
3811
  "description" => esc_html__("This option detects images and other contents with non-https source URLs and fix according to your selected logic.", "wpdiscuz"),
3812
  "description_original" => "This option detects images and other contents with non-https source URLs and fix according to your selected logic.",
3813
+ "docurl" => ""
3814
  ],
3815
  "redirectPage" => [
3816
  "label" => esc_html__("Redirect First Comment to", "wpdiscuz"),
3845
  "label_original" => "Help wpDiscuz to grow allowing people to recognize which comment plugin you use",
3846
  "description" => esc_html__("Please check this option on to help wpDiscuz get more popularity as your thank to the hard work we do for you totally free. This option adds a very small (16x16px) icon under the comment section which will allow your site visitors recognize the name of comment solution you use.", "wpdiscuz"),
3847
  "description_original" => "Please check this option on to help wpDiscuz get more popularity as your thank to the hard work we do for you totally free. This option adds a very small (16x16px) icon under the comment section which will allow your site visitors recognize the name of comment solution you use.",
3848
+ "docurl" => ""
3849
  ],
3850
  "isGravatarCacheEnabled" => [
3851
  "label" => esc_html__("Enable Gravatar caching", "wpdiscuz"),
3873
  "label_original" => "Remove Vote Data",
3874
  "description" => "",
3875
  "description_original" => "",
3876
+ "docurl" => ""
3877
  ],
3878
  "purgeAvatarCache" => [
3879
  "label" => esc_html__("Purge Expired Avatar Caches", "wpdiscuz"),
3880
  "label_original" => "Purge Expired Avatar Caches",
3881
  "description" => "",
3882
  "description_original" => "",
3883
+ "docurl" => ""
3884
  ],
3885
  "purgeAllCaches" => [
3886
  "label" => esc_html__("Purge All Avatar Caches", "wpdiscuz"),
3887
  "label_original" => "Purge All Avatar Caches",
3888
  "description" => "",
3889
  "description_original" => "",
3890
+ "docurl" => ""
3891
  ]
3892
  ]
3893
  ],
options/html-options.php CHANGED
@@ -470,7 +470,7 @@ $settings = $this->settingsArray();
470
  }
471
  } else {
472
  ?>
473
- <div id="wpd-settings-tab" class="wpd-box-wrap" style="align-items:flex-start;">
474
  <!-- Settings Content start -->
475
  <div class="wpd-box wpd-setcon">
476
  <?php
@@ -525,9 +525,9 @@ $settings = $this->settingsArray();
525
  foreach ($settings["addons"] as $addon_key => $addon) {
526
  ?>
527
  <li<?php if ($tab === $addon_key) echo " class='wpd-active'"; ?>><a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . WpdiscuzCore::PAGE_SETTINGS . "&wpd_tab=" . $addon_key)); ?>"><span class="dashicons dashicons-arrow-left-alt2"></span> <?php echo esc_html($addon["title"]); ?></a></li>
528
- <?php
529
- }
530
- ?>
531
  </ul>
532
  <?php
533
  }
470
  }
471
  } else {
472
  ?>
473
+ <div id="wpd-settings-tab" class="wpd-box-wrap wpd-settings-tab_<?php echo esc_attr($tab); ?>" style="align-items:flex-start;">
474
  <!-- Settings Content start -->
475
  <div class="wpd-box wpd-setcon">
476
  <?php
525
  foreach ($settings["addons"] as $addon_key => $addon) {
526
  ?>
527
  <li<?php if ($tab === $addon_key) echo " class='wpd-active'"; ?>><a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . WpdiscuzCore::PAGE_SETTINGS . "&wpd_tab=" . $addon_key)); ?>"><span class="dashicons dashicons-arrow-left-alt2"></span> <?php echo esc_html($addon["title"]); ?></a></li>
528
+ <?php
529
+ }
530
+ ?>
531
  </ul>
532
  <?php
533
  }
options/html-tools_old.php DELETED
@@ -1,72 +0,0 @@
1
- <?php
2
- if (!defined("ABSPATH")) {
3
- exit();
4
- }
5
- ?>
6
- <div class="wrap wpdiscuz_tools_page">
7
- <div style="float:left; width:50px; height:55px; margin:10px 10px 10px 0px;">
8
- <img src="<?php echo esc_url_raw(plugins_url(WPDISCUZ_DIR_NAME . "/assets/img/dashboard/wpdiscuz-7-logo.png")); ?>" style="height: 48px;"/>
9
- </div>
10
- <h1 style="padding-bottom:20px; padding-top:15px;"><?php esc_html_e("wpDiscuz Tools", "wpdiscuz"); ?></h1>
11
- <br style="clear:both" />
12
- <?php settings_errors("wpdiscuz"); ?>
13
- <div id="toolsTab">
14
- <ul class="resp-tabs-list tools_tab_id">
15
- <li><?php esc_html_e("Export options", "wpdiscuz"); ?></li>
16
- <li><?php esc_html_e("Import options", "wpdiscuz"); ?></li>
17
- <li><?php esc_html_e("Export phrases", "wpdiscuz"); ?></li>
18
- <li><?php esc_html_e("Import phrases", "wpdiscuz"); ?></li>
19
- <li><?php esc_html_e("Import subscriptions", "wpdiscuz"); ?></li>
20
- <li><?php esc_html_e("Import images", "wpdiscuz"); ?></li>
21
- <li><?php esc_html_e("Regenerate Vote Metas", "wpdiscuz"); ?></li>
22
- <li><?php esc_html_e("Regenerate Closed Comments", "wpdiscuz"); ?></li>
23
- <li><?php esc_html_e("Regenerate Vote Data", "wpdiscuz"); ?></li>
24
- <li><?php esc_html_e("Synchronize Commenter Data", "wpdiscuz"); ?></li>
25
- <li><?php esc_html_e("Rebuild Ratings", "wpdiscuz"); ?></li>
26
- <li><?php esc_html_e("Fix Tables", "wpdiscuz"); ?></li>
27
- </ul>
28
- <div class="resp-tabs-container tools_tab_id">
29
- <?php
30
- include_once WPDISCUZ_DIR_PATH . "/options/tools-layouts/options-export.php";
31
- include_once WPDISCUZ_DIR_PATH . "/options/tools-layouts/options-import.php";
32
- include_once WPDISCUZ_DIR_PATH . "/options/tools-layouts/phrases-export.php";
33
- include_once WPDISCUZ_DIR_PATH . "/options/tools-layouts/phrases-import.php";
34
- include_once WPDISCUZ_DIR_PATH . "/options/tools-layouts/subscriptions-import.php";
35
- include_once WPDISCUZ_DIR_PATH . "/options/tools-layouts/images-import.php";
36
- include_once WPDISCUZ_DIR_PATH . "/options/tools-layouts/regenerate-vote-metas.php";
37
- include_once WPDISCUZ_DIR_PATH . "/options/tools-layouts/regenerate-closed-comments.php";
38
- include_once WPDISCUZ_DIR_PATH . "/options/tools-layouts/regenerate-vote-data.php";
39
- include_once WPDISCUZ_DIR_PATH . "/options/tools-layouts/sync-commenter-data.php";
40
- include_once WPDISCUZ_DIR_PATH . "/options/tools-layouts/rebuild-ratings.php";
41
- include_once WPDISCUZ_DIR_PATH . "/options/tools-layouts/fix-tables.php";
42
- ?>
43
- </div>
44
- </div>
45
- <script>
46
- jQuery(document).ready(function ($) {
47
- var width = 0;
48
- var toolsTabsType = 'default';
49
- $('#toolsTab ul.resp-tabs-list.tools_tab_id li').each(function () {
50
- width += $(this).outerWidth(true);
51
- });
52
-
53
- if (width > $('#toolsTab').innerWidth()) {
54
- toolsTabsType = 'vertical';
55
- }
56
-
57
- //Horizontal Tab
58
- $('#toolsTab').wpdiscuzEasyResponsiveTabs({
59
- type: toolsTabsType, //Types: default, vertical, accordion
60
- width: 'auto', //auto or any width like 600px
61
- fit: true, // 100% fit in a container
62
- tabidentify: 'tools_tab_id' // The tab groups identifier
63
- });
64
- window.addEventListener("hashchange", function () {
65
- var matches = location.href.match(/#toolsTab(\d+)/);
66
- if (matches !== null) {
67
- $('.resp-tabs-list.tools_tab_id li').eq(matches[1] - 1).click();
68
- }
69
- });
70
- });
71
- </script>
72
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
options/options-layouts/html-content.php CHANGED
@@ -26,7 +26,7 @@ if (!defined("ABSPATH")) {
26
  <span for="commentTextMaxLength">&nbsp; <input type="number" placeholder="&infin;" value="<?php echo esc_attr($this->content["commentTextMaxLength"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_CONTENT); ?>[commentTextMaxLength]" id="commentTextMaxLength" style="width:70px;"> <?php esc_html_e("Max", "wpdiscuz") ?></span>
27
  </div>
28
  <div class="wpd-opt-doc">
29
- <a href="<?php echo esc_url_raw($setting["options"]["commentTextLength"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
30
  </div>
31
  </div>
32
  <!-- Option end -->
@@ -44,7 +44,7 @@ if (!defined("ABSPATH")) {
44
  </div>
45
  </div>
46
  <div class="wpd-opt-doc">
47
- <a href="<?php echo esc_url_raw($setting["options"]["enableImageConversion"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
48
  </div>
49
  </div>
50
  <!-- Option end -->
@@ -62,7 +62,7 @@ if (!defined("ABSPATH")) {
62
  </div>
63
  </div>
64
  <div class="wpd-opt-doc">
65
- <a href="<?php echo esc_url_raw($setting["options"]["enableShortcodes"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
66
  </div>
67
  </div>
68
  <!-- Option end -->
@@ -77,7 +77,7 @@ if (!defined("ABSPATH")) {
77
  <input type="number" value="<?php echo esc_attr($this->content["commentReadMoreLimit"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_CONTENT); ?>[commentReadMoreLimit]" id="commentReadMoreLimit" style="width:100px;" />
78
  </div>
79
  <div class="wpd-opt-doc">
80
- <a href="<?php echo esc_url_raw($setting["options"]["commentReadMoreLimit"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
81
  </div>
82
  </div>
83
  <!-- Option end -->
@@ -99,7 +99,7 @@ if (!defined("ABSPATH")) {
99
  </div>
100
  </div>
101
  <div class="wpd-opt-doc">
102
- <a href="<?php echo esc_url_raw($setting["options"]["wmuIsEnabled"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
103
  </div>
104
  </div>
105
  <!-- Option end -->
@@ -116,7 +116,9 @@ if (!defined("ABSPATH")) {
116
  <label for="wmuIsGuestAllowed"></label>
117
  </div>
118
  </div>
119
- <div class="wpd-opt-doc"></div>
 
 
120
  </div>
121
  <!-- Option end -->
122
 
@@ -133,7 +135,7 @@ if (!defined("ABSPATH")) {
133
  </div>
134
  </div>
135
  <div class="wpd-opt-doc">
136
- <a href="<?php echo esc_url_raw($setting["options"]["wmuIsLightbox"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
137
  </div>
138
  </div>
139
  <!-- Option end -->
@@ -146,7 +148,7 @@ if (!defined("ABSPATH")) {
146
  <p class="wpd-desc"><?php echo $setting["options"]["wmuMimeTypes"]["description"] ?></p>
147
  </div>
148
  <div class="wpd-opt-doc" style="float: right;">
149
- <a href="<?php echo esc_url_raw($setting["options"]["wmuMimeTypes"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
150
  </div>
151
  <div class="wpd-clear"></div>
152
  </div>
@@ -172,6 +174,8 @@ if (!defined("ABSPATH")) {
172
  </div>
173
  <!-- Option end -->
174
 
 
 
175
  <!-- Option start -->
176
  <div class="wpd-opt-row" data-wpd-opt="wmuMaxFileSize">
177
  <div class="wpd-opt-name">
@@ -192,7 +196,7 @@ if (!defined("ABSPATH")) {
192
  </p>
193
  </div>
194
  <div class="wpd-opt-doc">
195
- <a href="<?php echo esc_url_raw($setting["options"]["wmuMaxFileSize"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
196
  </div>
197
  </div>
198
  <!-- Option end -->
@@ -210,7 +214,7 @@ if (!defined("ABSPATH")) {
210
  </div>
211
  </div>
212
  <div class="wpd-opt-doc">
213
- <a href="<?php echo esc_url_raw($setting["options"]["wmuIsShowFilesDashboard"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
214
  </div>
215
  </div>
216
  <!-- Option end -->
@@ -226,7 +230,7 @@ if (!defined("ABSPATH")) {
226
  <input type="text" value="<?php echo esc_attr($this->content["wmuSingleImageHeight"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_CONTENT); ?>[wmuSingleImageHeight]" id="wmuSingleImageHeight" class="wmu-number wmu-image-dimension wmu-image-height" style="width: 80px;" /><span> <?php esc_html_e("Height (px)", "wpdiscuz"); ?> </span>
227
  </div>
228
  <div class="wpd-opt-doc">
229
- <a href="<?php echo esc_url_raw($setting["options"]["wmuSingleImageSize"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
230
  </div>
231
  </div>
232
  <!-- Option end -->
@@ -258,7 +262,7 @@ if (!defined("ABSPATH")) {
258
  ?>
259
  </div>
260
  <div class="wpd-opt-doc">
261
- <a href="<?php echo esc_url_raw($setting["options"]["wmuImageSizes"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
262
  </div>
263
  </div>
264
  <!-- Option end -->
26
  <span for="commentTextMaxLength">&nbsp; <input type="number" placeholder="&infin;" value="<?php echo esc_attr($this->content["commentTextMaxLength"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_CONTENT); ?>[commentTextMaxLength]" id="commentTextMaxLength" style="width:70px;"> <?php esc_html_e("Max", "wpdiscuz") ?></span>
27
  </div>
28
  <div class="wpd-opt-doc">
29
+ <?php $this->printDocLink($setting["options"]["commentTextLength"]["docurl"]) ?>
30
  </div>
31
  </div>
32
  <!-- Option end -->
44
  </div>
45
  </div>
46
  <div class="wpd-opt-doc">
47
+ <?php $this->printDocLink($setting["options"]["enableImageConversion"]["docurl"]) ?>
48
  </div>
49
  </div>
50
  <!-- Option end -->
62
  </div>
63
  </div>
64
  <div class="wpd-opt-doc">
65
+ <?php $this->printDocLink($setting["options"]["enableShortcodes"]["docurl"]) ?>
66
  </div>
67
  </div>
68
  <!-- Option end -->
77
  <input type="number" value="<?php echo esc_attr($this->content["commentReadMoreLimit"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_CONTENT); ?>[commentReadMoreLimit]" id="commentReadMoreLimit" style="width:100px;" />
78
  </div>
79
  <div class="wpd-opt-doc">
80
+ <?php $this->printDocLink($setting["options"]["commentReadMoreLimit"]["docurl"]) ?>
81
  </div>
82
  </div>
83
  <!-- Option end -->
99
  </div>
100
  </div>
101
  <div class="wpd-opt-doc">
102
+ <?php $this->printDocLink($setting["options"]["wmuIsEnabled"]["docurl"]) ?>
103
  </div>
104
  </div>
105
  <!-- Option end -->
116
  <label for="wmuIsGuestAllowed"></label>
117
  </div>
118
  </div>
119
+ <div class="wpd-opt-doc">
120
+ <?php $this->printDocLink($setting["options"]["wmuIsGuestAllowed"]["docurl"]) ?>
121
+ </div>
122
  </div>
123
  <!-- Option end -->
124
 
135
  </div>
136
  </div>
137
  <div class="wpd-opt-doc">
138
+ <?php $this->printDocLink($setting["options"]["wmuIsLightbox"]["docurl"]) ?>
139
  </div>
140
  </div>
141
  <!-- Option end -->
148
  <p class="wpd-desc"><?php echo $setting["options"]["wmuMimeTypes"]["description"] ?></p>
149
  </div>
150
  <div class="wpd-opt-doc" style="float: right;">
151
+ <?php $this->printDocLink($setting["options"]["wmuMimeTypes"]["docurl"]) ?>
152
  </div>
153
  <div class="wpd-clear"></div>
154
  </div>
174
  </div>
175
  <!-- Option end -->
176
 
177
+ <?php do_action("wpdiscuz_mu_custom_mime_types", $setting, $this); ?>
178
+
179
  <!-- Option start -->
180
  <div class="wpd-opt-row" data-wpd-opt="wmuMaxFileSize">
181
  <div class="wpd-opt-name">
196
  </p>
197
  </div>
198
  <div class="wpd-opt-doc">
199
+ <?php $this->printDocLink($setting["options"]["wmuMaxFileSize"]["docurl"]) ?>
200
  </div>
201
  </div>
202
  <!-- Option end -->
214
  </div>
215
  </div>
216
  <div class="wpd-opt-doc">
217
+ <?php $this->printDocLink($setting["options"]["wmuIsShowFilesDashboard"]["docurl"]) ?>
218
  </div>
219
  </div>
220
  <!-- Option end -->
230
  <input type="text" value="<?php echo esc_attr($this->content["wmuSingleImageHeight"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_CONTENT); ?>[wmuSingleImageHeight]" id="wmuSingleImageHeight" class="wmu-number wmu-image-dimension wmu-image-height" style="width: 80px;" /><span> <?php esc_html_e("Height (px)", "wpdiscuz"); ?> </span>
231
  </div>
232
  <div class="wpd-opt-doc">
233
+ <?php $this->printDocLink($setting["options"]["wmuSingleImageSize"]["docurl"]) ?>
234
  </div>
235
  </div>
236
  <!-- Option end -->
262
  ?>
263
  </div>
264
  <div class="wpd-opt-doc">
265
+ <?php $this->printDocLink($setting["options"]["wmuImageSizes"]["docurl"]) ?>
266
  </div>
267
  </div>
268
  <!-- Option end -->
options/options-layouts/html-form.php CHANGED
@@ -30,7 +30,7 @@ if (!defined("ABSPATH")) {
30
  </div>
31
  </div>
32
  <div class="wpd-opt-doc">
33
- <a href="<?php echo esc_url_raw($setting["options"]["commentFormView"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
34
  </div>
35
  </div>
36
  <!-- Option end -->
@@ -48,7 +48,7 @@ if (!defined("ABSPATH")) {
48
  </div>
49
  </div>
50
  <div class="wpd-opt-doc">
51
- <a href="<?php echo esc_url_raw($setting["options"]["enableDropAnimation"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
52
  </div>
53
  </div>
54
  <!-- Option end -->
@@ -77,7 +77,7 @@ if (!defined("ABSPATH")) {
77
  </div>
78
  </div>
79
  <div class="wpd-opt-doc">
80
- <a href="<?php echo esc_url_raw($setting["options"]["richEditor"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
81
  </div>
82
  </div>
83
  <!-- Option end -->
@@ -119,7 +119,25 @@ if (!defined("ABSPATH")) {
119
  </div>
120
  </div>
121
  <div class="wpd-opt-doc">
122
- <a href="<?php echo esc_url_raw($setting["options"]["editorToolbar"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  </div>
124
  </div>
125
  <!-- Option end -->
@@ -135,7 +153,7 @@ if (!defined("ABSPATH")) {
135
  <span>&nbsp; <input type="number" value="<?php echo esc_attr($this->form["commenterNameMaxLength"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_FORM); ?>[commenterNameMaxLength]" id="commenterNameMaxLength" style="width:70px;"> <?php esc_html_e("Max", "wpdiscuz") ?></span>
136
  </div>
137
  <div class="wpd-opt-doc">
138
- <a href="<?php echo esc_url_raw($setting["options"]["commenterNameLength"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
139
  </div>
140
  </div>
141
  <!-- Option end -->
@@ -150,7 +168,7 @@ if (!defined("ABSPATH")) {
150
  <input type="number" value="<?php echo esc_attr($this->form["storeCommenterData"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_FORM); ?>[storeCommenterData]" id="storeCommenterData" style="width:100px;">
151
  </div>
152
  <div class="wpd-opt-doc">
153
- <a href="<?php echo esc_url_raw($setting["options"]["storeCommenterData"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
154
  </div>
155
  </div>
156
  <!-- Option end -->
30
  </div>
31
  </div>
32
  <div class="wpd-opt-doc">
33
+ <?php $this->printDocLink($setting["options"]["commentFormView"]["docurl"]) ?>
34
  </div>
35
  </div>
36
  <!-- Option end -->
48
  </div>
49
  </div>
50
  <div class="wpd-opt-doc">
51
+ <?php $this->printDocLink($setting["options"]["enableDropAnimation"]["docurl"]) ?>
52
  </div>
53
  </div>
54
  <!-- Option end -->
77
  </div>
78
  </div>
79
  <div class="wpd-opt-doc">
80
+ <?php $this->printDocLink($setting["options"]["richEditor"]["docurl"]) ?>
81
  </div>
82
  </div>
83
  <!-- Option end -->
119
  </div>
120
  </div>
121
  <div class="wpd-opt-doc">
122
+ <?php $this->printDocLink($setting["options"]["editorToolbar"]["docurl"]) ?>
123
+ </div>
124
+ </div>
125
+ <!-- Option end -->
126
+
127
+ <!-- Option start -->
128
+ <div class="wpd-opt-row" data-wpd-opt="enableQuickTags">
129
+ <div class="wpd-opt-name">
130
+ <label for="enableQuickTags"><?php echo esc_html($setting["options"]["enableQuickTags"]["label"]) ?></label>
131
+ <p class="wpd-desc"><?php echo $setting["options"]["enableQuickTags"]["description"] ?></p>
132
+ </div>
133
+ <div class="wpd-opt-input">
134
+ <div class="wpd-switcher">
135
+ <input type="checkbox" <?php checked($this->form["enableQuickTags"] == 1) ?> value="1" name="<?php echo esc_attr(WpdiscuzCore::TAB_FORM); ?>[enableQuickTags]" id="enableQuickTags">
136
+ <label for="enableQuickTags"></label>
137
+ </div>
138
+ </div>
139
+ <div class="wpd-opt-doc">
140
+ <?php $this->printDocLink($setting["options"]["enableQuickTags"]["docurl"]) ?>
141
  </div>
142
  </div>
143
  <!-- Option end -->
153
  <span>&nbsp; <input type="number" value="<?php echo esc_attr($this->form["commenterNameMaxLength"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_FORM); ?>[commenterNameMaxLength]" id="commenterNameMaxLength" style="width:70px;"> <?php esc_html_e("Max", "wpdiscuz") ?></span>
154
  </div>
155
  <div class="wpd-opt-doc">
156
+ <?php $this->printDocLink($setting["options"]["commenterNameLength"]["docurl"]) ?>
157
  </div>
158
  </div>
159
  <!-- Option end -->
168
  <input type="number" value="<?php echo esc_attr($this->form["storeCommenterData"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_FORM); ?>[storeCommenterData]" id="storeCommenterData" style="width:100px;">
169
  </div>
170
  <div class="wpd-opt-doc">
171
+ <?php $this->printDocLink($setting["options"]["storeCommenterData"]["docurl"]) ?>
172
  </div>
173
  </div>
174
  <!-- Option end -->
options/options-layouts/html-general.php CHANGED
@@ -17,7 +17,7 @@ if (!defined("ABSPATH")) {
17
  </div>
18
  </div>
19
  <div class="wpd-opt-doc">
20
- <a href="<?php echo esc_url_raw($setting["options"]["isEnableOnHome"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
21
  </div>
22
  </div>
23
  <!-- Option end -->
@@ -35,7 +35,7 @@ if (!defined("ABSPATH")) {
35
  </div>
36
  </div>
37
  <div class="wpd-opt-doc">
38
- <a href="<?php echo esc_url_raw($setting["options"]["isNativeAjaxEnabled"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
39
  </div>
40
  </div>
41
  <!-- Option end -->
@@ -52,7 +52,7 @@ if (!defined("ABSPATH")) {
52
  </div>
53
  </div>
54
  <div class="wpd-opt-doc">
55
- <a href="<?php echo esc_url_raw($setting["options"]["loadComboVersion"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
56
  </div>
57
  </div>
58
  <!-- Option end -->
@@ -69,7 +69,7 @@ if (!defined("ABSPATH")) {
69
  </div>
70
  </div>
71
  <div class="wpd-opt-doc">
72
- <a href="<?php echo esc_url_raw($setting["options"]["loadMinVersion"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
73
  </div>
74
  </div>
75
  <!-- Option end -->
@@ -97,7 +97,9 @@ if (!defined("ABSPATH")) {
97
  <label for="ignore-https"><?php esc_html_e("Ignore non-https content", "wpdiscuz") ?></label>
98
  </div>
99
  </div>
100
- <div class="wpd-opt-doc"></div>
 
 
101
  </div>
102
  <!-- Option end -->
103
  <?php } ?>
@@ -118,7 +120,7 @@ if (!defined("ABSPATH")) {
118
  ?>
119
  </div>
120
  <div class="wpd-opt-doc">
121
- <a href="<?php echo esc_url_raw($setting["options"]["redirectPage"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
122
  </div>
123
  </div>
124
  <!-- Option end -->
@@ -140,7 +142,7 @@ if (!defined("ABSPATH")) {
140
  </span>
141
  </div>
142
  <div class="wpd-opt-doc">
143
- <a href="<?php echo esc_url_raw($setting["options"]["simpleCommentDate"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
144
  </div>
145
  </div>
146
  <!-- Option end -->
@@ -155,7 +157,7 @@ if (!defined("ABSPATH")) {
155
  <input type="text" value="<?php echo esc_attr($this->general["dateDiffFormat"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_GENERAL); ?>[dateDiffFormat]" id="dateDiffFormat" />
156
  </div>
157
  <div class="wpd-opt-doc">
158
- <a href="<?php echo esc_url_raw($setting["options"]["dateDiffFormat"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
159
  </div>
160
  </div>
161
  <!-- Option end -->
@@ -173,7 +175,7 @@ if (!defined("ABSPATH")) {
173
  </div>
174
  </div>
175
  <div class="wpd-opt-doc">
176
- <a href="<?php echo esc_url_raw($setting["options"]["isUsePoMo"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
177
  </div>
178
  </div>
179
  <!-- Option end -->
@@ -190,7 +192,9 @@ if (!defined("ABSPATH")) {
190
  <span id="wpdiscuz_thank_you" style="color:#006600; font-size:13px;"> &nbsp;<?php esc_attr_e("Thank you!", "wpdiscuz"); ?></span>
191
  </label>
192
  </div>
193
- <div class="wpd-opt-doc"></div>
 
 
194
  </div>
195
  <!-- Option end -->
196
 
@@ -214,7 +218,7 @@ if (!defined("ABSPATH")) {
214
  </div>
215
  </div>
216
  <div class="wpd-opt-doc">
217
- <a href="<?php echo esc_url_raw($setting["options"]["isGravatarCacheEnabled"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
218
  </div>
219
  </div>
220
  <!-- Option end -->
@@ -232,7 +236,7 @@ if (!defined("ABSPATH")) {
232
  </div>
233
  </div>
234
  <div class="wpd-opt-doc">
235
- <a href="<?php echo esc_url_raw($setting["options"]["gravatarCacheMethod"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
236
  </div>
237
  </div>
238
  <!-- Option end -->
@@ -248,7 +252,7 @@ if (!defined("ABSPATH")) {
248
  <input type="number" id="gravatarCacheTimeout" name="<?php echo esc_attr(WpdiscuzCore::TAB_GENERAL); ?>[gravatarCacheTimeout]" value="<?php echo esc_attr($gravatarCacheTimeout); ?>" style="width: 80px;"/>&nbsp; <?php esc_html_e("days", "wpdiscuz") ?>
249
  </div>
250
  <div class="wpd-opt-doc">
251
- <a href="<?php echo esc_url_raw($setting["options"]["gravatarCacheTimeout"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
252
  </div>
253
  </div>
254
  <!-- Option end -->
@@ -267,7 +271,9 @@ if (!defined("ABSPATH")) {
267
  <?php $voteUrl = admin_url("admin-post.php?action=removeVoteData"); ?>
268
  <a id="wpdiscuz-remove-votes" href="<?php echo esc_url_raw(wp_nonce_url($voteUrl, "removeVoteData")); ?>" class="button button-secondary" style="text-decoration: none;"><?php esc_html_e("Remove vote data", "wpdiscuz"); ?></a>
269
  </div>
270
- <div class="wpd-opt-doc"></div>
 
 
271
  </div>
272
  <!-- Option end -->
273
 
@@ -281,7 +287,9 @@ if (!defined("ABSPATH")) {
281
  <?php $expiredCacheUrl = admin_url("admin-post.php?action=purgeExpiredGravatarsCaches"); ?>
282
  <a id="wpdiscuz-purge-expired-gravatars-cache" href="<?php echo esc_url_raw(wp_nonce_url($expiredCacheUrl, "purgeExpiredGravatarsCaches")); ?>" class="button button-secondary" style="text-decoration: none;"><?php esc_html_e("Purge expired caches", "wpdiscuz"); ?></a>
283
  </div>
284
- <div class="wpd-opt-doc"></div>
 
 
285
  </div>
286
  <!-- Option end -->
287
 
@@ -295,6 +303,8 @@ if (!defined("ABSPATH")) {
295
  <?php $allCacheUrl = admin_url("admin-post.php?action=purgeGravatarsCaches"); ?>
296
  <a id="wpdiscuz-purge-gravatars-cache" href="<?php echo esc_url_raw(wp_nonce_url($allCacheUrl, "purgeGravatarsCaches")); ?>" class="button button-secondary" style="text-decoration: none;"><?php esc_html_e("Purge all caches", "wpdiscuz"); ?></a>
297
  </div>
298
- <div class="wpd-opt-doc"></div>
 
 
299
  </div>
300
  <!-- Option end -->
17
  </div>
18
  </div>
19
  <div class="wpd-opt-doc">
20
+ <?php $this->printDocLink($setting["options"]["isEnableOnHome"]["docurl"]) ?>
21
  </div>
22
  </div>
23
  <!-- Option end -->
35
  </div>
36
  </div>
37
  <div class="wpd-opt-doc">
38
+ <?php $this->printDocLink($setting["options"]["isNativeAjaxEnabled"]["docurl"]) ?>
39
  </div>
40
  </div>
41
  <!-- Option end -->
52
  </div>
53
  </div>
54
  <div class="wpd-opt-doc">
55
+ <?php $this->printDocLink($setting["options"]["loadComboVersion"]["docurl"]) ?>
56
  </div>
57
  </div>
58
  <!-- Option end -->
69
  </div>
70
  </div>
71
  <div class="wpd-opt-doc">
72
+ <?php $this->printDocLink($setting["options"]["loadMinVersion"]["docurl"]) ?>
73
  </div>
74
  </div>
75
  <!-- Option end -->
97
  <label for="ignore-https"><?php esc_html_e("Ignore non-https content", "wpdiscuz") ?></label>
98
  </div>
99
  </div>
100
+ <div class="wpd-opt-doc">
101
+ <?php $this->printDocLink($setting["options"]["commentLinkFilter"]["docurl"]) ?>
102
+ </div>
103
  </div>
104
  <!-- Option end -->
105
  <?php } ?>
120
  ?>
121
  </div>
122
  <div class="wpd-opt-doc">
123
+ <?php $this->printDocLink($setting["options"]["redirectPage"]["docurl"]) ?>
124
  </div>
125
  </div>
126
  <!-- Option end -->
142
  </span>
143
  </div>
144
  <div class="wpd-opt-doc">
145
+ <?php $this->printDocLink($setting["options"]["simpleCommentDate"]["docurl"]) ?>
146
  </div>
147
  </div>
148
  <!-- Option end -->
157
  <input type="text" value="<?php echo esc_attr($this->general["dateDiffFormat"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_GENERAL); ?>[dateDiffFormat]" id="dateDiffFormat" />
158
  </div>
159
  <div class="wpd-opt-doc">
160
+ <?php $this->printDocLink($setting["options"]["dateDiffFormat"]["docurl"]) ?>
161
  </div>
162
  </div>
163
  <!-- Option end -->
175
  </div>
176
  </div>
177
  <div class="wpd-opt-doc">
178
+ <?php $this->printDocLink($setting["options"]["isUsePoMo"]["docurl"]) ?>
179
  </div>
180
  </div>
181
  <!-- Option end -->
192
  <span id="wpdiscuz_thank_you" style="color:#006600; font-size:13px;"> &nbsp;<?php esc_attr_e("Thank you!", "wpdiscuz"); ?></span>
193
  </label>
194
  </div>
195
+ <div class="wpd-opt-doc">
196
+ <?php $this->printDocLink($setting["options"]["showPluginPoweredByLink"]["docurl"]) ?>
197
+ </div>
198
  </div>
199
  <!-- Option end -->
200
 
218
  </div>
219
  </div>
220
  <div class="wpd-opt-doc">
221
+ <?php $this->printDocLink($setting["options"]["isGravatarCacheEnabled"]["docurl"]) ?>
222
  </div>
223
  </div>
224
  <!-- Option end -->
236
  </div>
237
  </div>
238
  <div class="wpd-opt-doc">
239
+ <?php $this->printDocLink($setting["options"]["gravatarCacheMethod"]["docurl"]) ?>
240
  </div>
241
  </div>
242
  <!-- Option end -->
252
  <input type="number" id="gravatarCacheTimeout" name="<?php echo esc_attr(WpdiscuzCore::TAB_GENERAL); ?>[gravatarCacheTimeout]" value="<?php echo esc_attr($gravatarCacheTimeout); ?>" style="width: 80px;"/>&nbsp; <?php esc_html_e("days", "wpdiscuz") ?>
253
  </div>
254
  <div class="wpd-opt-doc">
255
+ <?php $this->printDocLink($setting["options"]["gravatarCacheTimeout"]["docurl"]) ?>
256
  </div>
257
  </div>
258
  <!-- Option end -->
271
  <?php $voteUrl = admin_url("admin-post.php?action=removeVoteData"); ?>
272
  <a id="wpdiscuz-remove-votes" href="<?php echo esc_url_raw(wp_nonce_url($voteUrl, "removeVoteData")); ?>" class="button button-secondary" style="text-decoration: none;"><?php esc_html_e("Remove vote data", "wpdiscuz"); ?></a>
273
  </div>
274
+ <div class="wpd-opt-doc">
275
+ <?php $this->printDocLink($setting["options"]["removeVoteData"]["docurl"]) ?>
276
+ </div>
277
  </div>
278
  <!-- Option end -->
279
 
287
  <?php $expiredCacheUrl = admin_url("admin-post.php?action=purgeExpiredGravatarsCaches"); ?>
288
  <a id="wpdiscuz-purge-expired-gravatars-cache" href="<?php echo esc_url_raw(wp_nonce_url($expiredCacheUrl, "purgeExpiredGravatarsCaches")); ?>" class="button button-secondary" style="text-decoration: none;"><?php esc_html_e("Purge expired caches", "wpdiscuz"); ?></a>
289
  </div>
290
+ <div class="wpd-opt-doc">
291
+ <?php $this->printDocLink($setting["options"]["purgeAvatarCache"]["docurl"]) ?>
292
+ </div>
293
  </div>
294
  <!-- Option end -->
295
 
303
  <?php $allCacheUrl = admin_url("admin-post.php?action=purgeGravatarsCaches"); ?>
304
  <a id="wpdiscuz-purge-gravatars-cache" href="<?php echo esc_url_raw(wp_nonce_url($allCacheUrl, "purgeGravatarsCaches")); ?>" class="button button-secondary" style="text-decoration: none;"><?php esc_html_e("Purge all caches", "wpdiscuz"); ?></a>
305
  </div>
306
+ <div class="wpd-opt-doc">
307
+ <?php $this->printDocLink($setting["options"]["purgeAllCaches"]["docurl"]) ?>
308
+ </div>
309
  </div>
310
  <!-- Option end -->
options/options-layouts/html-inline.php CHANGED
@@ -36,7 +36,7 @@ if (!defined("ABSPATH")) {
36
  </div>
37
  </div>
38
  <div class="wpd-opt-doc">
39
- <a href="<?php echo esc_url_raw($setting["options"]["showInlineFilterButton"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
40
  </div>
41
  </div>
42
  <!-- Option end -->
@@ -66,7 +66,7 @@ if (!defined("ABSPATH")) {
66
  </div>
67
  </div>
68
  <div class="wpd-opt-doc">
69
- <a href="<?php echo esc_url_raw($setting["options"]["inlineFeedbackAttractionType"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
70
  </div>
71
  </div>
72
  <!-- Option end -->
36
  </div>
37
  </div>
38
  <div class="wpd-opt-doc">
39
+ <?php $this->printDocLink($setting["options"]["showInlineFilterButton"]["docurl"]) ?>
40
  </div>
41
  </div>
42
  <!-- Option end -->
66
  </div>
67
  </div>
68
  <div class="wpd-opt-doc">
69
+ <?php $this->printDocLink($setting["options"]["inlineFeedbackAttractionType"]["docurl"]) ?>
70
  </div>
71
  </div>
72
  <!-- Option end -->
options/options-layouts/html-labels.php CHANGED
@@ -36,7 +36,7 @@ if (!defined("ABSPATH")) {
36
  </div>
37
  </div>
38
  <div class="wpd-opt-doc" style="padding-top: 36px;">
39
- <a href="<?php echo esc_url_raw($setting["options"]["blogRoleLabels"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
40
  </div>
41
  </div>
42
  <!-- Option end -->
@@ -60,7 +60,7 @@ if (!defined("ABSPATH")) {
60
  <div class="wpd-clear"></div>
61
  </div>
62
  <div class="wpd-opt-doc" style="padding-top: 36px;">
63
- <a href="<?php echo esc_url_raw($setting["options"]["commenterLabelColors"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
64
  </div>
65
  </div>
66
  <!-- Option end -->
36
  </div>
37
  </div>
38
  <div class="wpd-opt-doc" style="padding-top: 36px;">
39
+ <?php $this->printDocLink($setting["options"]["blogRoleLabels"]["docurl"]) ?>
40
  </div>
41
  </div>
42
  <!-- Option end -->
60
  <div class="wpd-clear"></div>
61
  </div>
62
  <div class="wpd-opt-doc" style="padding-top: 36px;">
63
+ <?php $this->printDocLink($setting["options"]["commenterLabelColors"]["docurl"]) ?>
64
  </div>
65
  </div>
66
  <!-- Option end -->
options/options-layouts/html-live.php CHANGED
@@ -32,7 +32,7 @@ if (!defined("ABSPATH")) {
32
  </div>
33
  </div>
34
  <div class="wpd-opt-doc">
35
- <a href="<?php echo esc_url_raw($setting["options"]["bubble"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
36
  </div>
37
  </div>
38
  <!-- Option end -->
@@ -54,7 +54,7 @@ if (!defined("ABSPATH")) {
54
  </div>
55
  </div>
56
  <div class="wpd-opt-doc">
57
- <a href="<?php echo esc_url_raw($setting["options"]["bubbleLocation"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
58
  </div>
59
  </div>
60
  <!-- Option end -->
@@ -74,7 +74,7 @@ if (!defined("ABSPATH")) {
74
  </div>
75
  </div>
76
  <div class="wpd-opt-doc">
77
- <a href="<?php echo esc_url_raw($setting["options"]["bubbleLiveUpdate"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
78
  </div>
79
  </div>
80
  <!-- Option end -->
@@ -95,7 +95,7 @@ if (!defined("ABSPATH")) {
95
  </div>
96
  </div>
97
  <div class="wpd-opt-doc">
98
- <a href="<?php echo esc_url_raw($setting["options"]["bubbleShowNewCommentMessage"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
99
  </div>
100
  </div>
101
  <!-- Option end -->
@@ -111,7 +111,7 @@ if (!defined("ABSPATH")) {
111
  <span><input type="number" value="<?php echo esc_attr($this->live["bubbleHintTimeout"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_LIVE); ?>[bubbleHintTimeout]" id="bubbleHintTimeout" style="width:70px;"> <?php esc_html_e("seconds", "wpdiscuz") ?></span>
112
  </div>
113
  <div class="wpd-opt-doc">
114
- <a href="<?php echo esc_url_raw($setting["options"]["bubbleHintTimeout"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
115
  </div>
116
  </div>
117
  <!-- Option end -->
@@ -126,7 +126,7 @@ if (!defined("ABSPATH")) {
126
  <span><input type="number" value="<?php echo esc_attr($this->live["bubbleHintHideTimeout"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_LIVE); ?>[bubbleHintHideTimeout]" id="bubbleHintHideTimeout" style="width:70px;"> <?php esc_html_e("seconds", "wpdiscuz") ?></span>
127
  </div>
128
  <div class="wpd-opt-doc">
129
- <a href="<?php echo esc_url_raw($setting["options"]["bubbleHintHideTimeout"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
130
  </div>
131
  </div>
132
  <!-- Option end -->
@@ -146,7 +146,7 @@ if (!defined("ABSPATH")) {
146
  </div>
147
  </div>
148
  <div class="wpd-opt-doc">
149
- <a href="<?php echo esc_url_raw($setting["options"]["commentListUpdateType"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
150
  </div>
151
  </div>
152
  <!-- Option end -->
@@ -164,7 +164,7 @@ if (!defined("ABSPATH")) {
164
  </div>
165
  </div>
166
  <div class="wpd-opt-doc">
167
- <a href="<?php echo esc_url_raw($setting["options"]["liveUpdateGuests"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
168
  </div>
169
  </div>
170
  <!-- Option end -->
@@ -187,7 +187,7 @@ if (!defined("ABSPATH")) {
187
  </select>
188
  </div>
189
  <div class="wpd-opt-doc">
190
- <a href="<?php echo esc_url_raw($setting["options"]["commentListUpdateTimer"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
191
  </div>
192
  </div>
193
  <!-- Option end -->
32
  </div>
33
  </div>
34
  <div class="wpd-opt-doc">
35
+ <?php $this->printDocLink($setting["options"]["bubble"]["docurl"]) ?>
36
  </div>
37
  </div>
38
  <!-- Option end -->
54
  </div>
55
  </div>
56
  <div class="wpd-opt-doc">
57
+ <?php $this->printDocLink($setting["options"]["bubbleLocation"]["docurl"]) ?>
58
  </div>
59
  </div>
60
  <!-- Option end -->
74
  </div>
75
  </div>
76
  <div class="wpd-opt-doc">
77
+ <?php $this->printDocLink($setting["options"]["bubbleLiveUpdate"]["docurl"]) ?>
78
  </div>
79
  </div>
80
  <!-- Option end -->
95
  </div>
96
  </div>
97
  <div class="wpd-opt-doc">
98
+ <?php $this->printDocLink($setting["options"]["bubbleShowNewCommentMessage"]["docurl"]) ?>
99
  </div>
100
  </div>
101
  <!-- Option end -->
111
  <span><input type="number" value="<?php echo esc_attr($this->live["bubbleHintTimeout"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_LIVE); ?>[bubbleHintTimeout]" id="bubbleHintTimeout" style="width:70px;"> <?php esc_html_e("seconds", "wpdiscuz") ?></span>
112
  </div>
113
  <div class="wpd-opt-doc">
114
+ <?php $this->printDocLink($setting["options"]["bubbleHintTimeout"]["docurl"]) ?>
115
  </div>
116
  </div>
117
  <!-- Option end -->
126
  <span><input type="number" value="<?php echo esc_attr($this->live["bubbleHintHideTimeout"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_LIVE); ?>[bubbleHintHideTimeout]" id="bubbleHintHideTimeout" style="width:70px;"> <?php esc_html_e("seconds", "wpdiscuz") ?></span>
127
  </div>
128
  <div class="wpd-opt-doc">
129
+ <?php $this->printDocLink($setting["options"]["bubbleHintHideTimeout"]["docurl"]) ?>
130
  </div>
131
  </div>
132
  <!-- Option end -->
146
  </div>
147
  </div>
148
  <div class="wpd-opt-doc">
149
+ <?php $this->printDocLink($setting["options"]["commentListUpdateType"]["docurl"]) ?>
150
  </div>
151
  </div>
152
  <!-- Option end -->
164
  </div>
165
  </div>
166
  <div class="wpd-opt-doc">
167
+ <?php $this->printDocLink($setting["options"]["liveUpdateGuests"]["docurl"]) ?>
168
  </div>
169
  </div>
170
  <!-- Option end -->
187
  </select>
188
  </div>
189
  <div class="wpd-opt-doc">
190
+ <?php $this->printDocLink($setting["options"]["commentListUpdateTimer"]["docurl"]) ?>
191
  </div>
192
  </div>
193
  <!-- Option end -->
options/options-layouts/html-login.php CHANGED
@@ -28,7 +28,7 @@ if (!defined("ABSPATH")) {
28
  </div>
29
  </div>
30
  <div class="wpd-opt-doc">
31
- <a href="<?php echo esc_url_raw($setting["options"]["showLoggedInUsername"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
32
  </div>
33
  </div>
34
  <!-- Option end -->
@@ -46,7 +46,22 @@ if (!defined("ABSPATH")) {
46
  </div>
47
  </div>
48
  <div class="wpd-opt-doc">
49
- <a href="<?php echo esc_url_raw($setting["options"]["showLoginLinkForGuests"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  </div>
51
  </div>
52
  <!-- Option end -->
@@ -96,7 +111,7 @@ if (!defined("ABSPATH")) {
96
  </div>
97
  </div>
98
  <div class="wpd-opt-doc">
99
- <a href="<?php echo esc_url_raw($setting["options"]["myContentSettings"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
100
  </div>
101
  </div>
102
  <!-- Option end -->
@@ -114,7 +129,7 @@ if (!defined("ABSPATH")) {
114
  </div>
115
  </div>
116
  <div class="wpd-opt-doc">
117
- <a href="<?php echo esc_url_raw($setting["options"]["enableProfileURLs"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
118
  </div>
119
  </div>
120
  <!-- Option end -->
@@ -132,7 +147,7 @@ if (!defined("ABSPATH")) {
132
  </div>
133
  </div>
134
  <div class="wpd-opt-doc">
135
- <a href="<?php echo esc_url_raw($setting["options"]["websiteAsProfileUrl"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
136
  </div>
137
  </div>
138
  <!-- Option end -->
@@ -150,8 +165,7 @@ if (!defined("ABSPATH")) {
150
  </div>
151
  </div>
152
  <div class="wpd-opt-doc">
153
- <a href="<?php echo esc_url_raw($setting["options"]["isUserByEmail"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
154
  </div>
155
  </div>
156
- <!-- Option end -->
157
-
28
  </div>
29
  </div>
30
  <div class="wpd-opt-doc">
31
+ <?php $this->printDocLink($setting["options"]["showLoggedInUsername"]["docurl"]) ?>
32
  </div>
33
  </div>
34
  <!-- Option end -->
46
  </div>
47
  </div>
48
  <div class="wpd-opt-doc">
49
+ <?php $this->printDocLink($setting["options"]["showLoginLinkForGuests"]["docurl"]) ?>
50
+ </div>
51
+ </div>
52
+ <!-- Option end -->
53
+
54
+ <!-- Option start -->
55
+ <div class="wpd-opt-row" data-wpd-opt="loginUrl">
56
+ <div class="wpd-opt-name">
57
+ <label for="loginUrl"><?php echo esc_html($setting["options"]["loginUrl"]["label"]) ?></label>
58
+ <p class="wpd-desc"><?php echo $setting["options"]["loginUrl"]["description"] ?></p>
59
+ </div>
60
+ <div class="wpd-opt-input">
61
+ <input type="url" value="<?php echo esc_attr($this->login["loginUrl"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_LOGIN); ?>[loginUrl]" id="loginUrl" placeholder="<?php echo esc_url_raw(home_url("/my-login-page/")) ?>" />
62
+ </div>
63
+ <div class="wpd-opt-doc">
64
+ <?php $this->printDocLink($setting["options"]["loginUrl"]["docurl"]) ?>
65
  </div>
66
  </div>
67
  <!-- Option end -->
111
  </div>
112
  </div>
113
  <div class="wpd-opt-doc">
114
+ <?php $this->printDocLink($setting["options"]["myContentSettings"]["docurl"]) ?>
115
  </div>
116
  </div>
117
  <!-- Option end -->
129
  </div>
130
  </div>
131
  <div class="wpd-opt-doc">
132
+ <?php $this->printDocLink($setting["options"]["enableProfileURLs"]["docurl"]) ?>
133
  </div>
134
  </div>
135
  <!-- Option end -->
147
  </div>
148
  </div>
149
  <div class="wpd-opt-doc">
150
+ <?php $this->printDocLink($setting["options"]["websiteAsProfileUrl"]["docurl"]) ?>
151
  </div>
152
  </div>
153
  <!-- Option end -->
165
  </div>
166
  </div>
167
  <div class="wpd-opt-doc">
168
+ <?php $this->printDocLink($setting["options"]["isUserByEmail"]["docurl"]) ?>
169
  </div>
170
  </div>
171
+ <!-- Option end -->
 
options/options-layouts/html-moderation.php CHANGED
@@ -33,7 +33,7 @@ if (!defined("ABSPATH")) {
33
  </select>
34
  </div>
35
  <div class="wpd-opt-doc">
36
- <a href="<?php echo esc_url_raw($setting["options"]["commentEditableTime"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
37
  </div>
38
  </div>
39
  <!-- Option end -->
@@ -51,7 +51,7 @@ if (!defined("ABSPATH")) {
51
  </div>
52
  </div>
53
  <div class="wpd-opt-doc">
54
- <a href="<?php echo esc_url_raw($setting["options"]["enableEditingWhenHaveReplies"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
55
  </div>
56
  </div>
57
  <!-- Option end -->
@@ -69,7 +69,7 @@ if (!defined("ABSPATH")) {
69
  </div>
70
  </div>
71
  <div class="wpd-opt-doc">
72
- <a href="<?php echo esc_url_raw($setting["options"]["displayEditingInfo"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
73
  </div>
74
  </div>
75
  <!-- Option end -->
@@ -87,7 +87,7 @@ if (!defined("ABSPATH")) {
87
  </div>
88
  </div>
89
  <div class="wpd-opt-doc">
90
- <a href="<?php echo esc_url_raw($setting["options"]["enableStickButton"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
91
  </div>
92
  </div>
93
  <!-- Option end -->
@@ -105,7 +105,7 @@ if (!defined("ABSPATH")) {
105
  </div>
106
  </div>
107
  <div class="wpd-opt-doc">
108
- <a href="<?php echo esc_url_raw($setting["options"]["enableCloseButton"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
109
  </div>
110
  </div>
111
  <!-- Option end -->
@@ -140,7 +140,7 @@ if (!defined("ABSPATH")) {
140
  </div>
141
  </div>
142
  <div class="wpd-opt-doc">
143
- <a href="<?php echo esc_url_raw($setting["options"]["userCommentsLimit"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
144
  </div>
145
  </div>
146
  <!-- Option end -->
33
  </select>
34
  </div>
35
  <div class="wpd-opt-doc">
36
+ <?php $this->printDocLink($setting["options"]["commentEditableTime"]["docurl"]) ?>
37
  </div>
38
  </div>
39
  <!-- Option end -->
51
  </div>
52
  </div>
53
  <div class="wpd-opt-doc">
54
+ <?php $this->printDocLink($setting["options"]["enableEditingWhenHaveReplies"]["docurl"]) ?>
55
  </div>
56
  </div>
57
  <!-- Option end -->
69
  </div>
70
  </div>
71
  <div class="wpd-opt-doc">
72
+ <?php $this->printDocLink($setting["options"]["displayEditingInfo"]["docurl"]) ?>
73
  </div>
74
  </div>
75
  <!-- Option end -->
87
  </div>
88
  </div>
89
  <div class="wpd-opt-doc">
90
+ <?php $this->printDocLink($setting["options"]["enableStickButton"]["docurl"]) ?>
91
  </div>
92
  </div>
93
  <!-- Option end -->
105
  </div>
106
  </div>
107
  <div class="wpd-opt-doc">
108
+ <?php $this->printDocLink($setting["options"]["enableCloseButton"]["docurl"]) ?>
109
  </div>
110
  </div>
111
  <!-- Option end -->
140
  </div>
141
  </div>
142
  <div class="wpd-opt-doc">
143
+ <?php $this->printDocLink($setting["options"]["userCommentsLimit"]["docurl"]) ?>
144
  </div>
145
  </div>
146
  <!-- Option end -->
options/options-layouts/html-rating.php CHANGED
@@ -28,7 +28,7 @@ if (!defined("ABSPATH")) {
28
  </div>
29
  </div>
30
  <div class="wpd-opt-doc">
31
- <a href="<?php echo esc_url_raw($setting["options"]["enablePostRatingSchema"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
32
  </div>
33
  </div>
34
  <!-- Option end -->
@@ -58,7 +58,7 @@ if (!defined("ABSPATH")) {
58
  </div>
59
  </div>
60
  <div class="wpd-opt-doc">
61
- <a href="<?php echo esc_url_raw($setting["options"]["displayRatingOnPost"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
62
  </div>
63
  </div>
64
  <!-- Option end -->
@@ -83,6 +83,8 @@ if (!defined("ABSPATH")) {
83
  </div>
84
  <div style="clear: both"></div>
85
  </div>
86
- <div class="wpd-opt-doc" style="padding-top: 36px;"></div>
 
 
87
  </div>
88
  <!-- Option end -->
28
  </div>
29
  </div>
30
  <div class="wpd-opt-doc">
31
+ <?php $this->printDocLink($setting["options"]["enablePostRatingSchema"]["docurl"]) ?>
32
  </div>
33
  </div>
34
  <!-- Option end -->
58
  </div>
59
  </div>
60
  <div class="wpd-opt-doc">
61
+ <?php $this->printDocLink($setting["options"]["displayRatingOnPost"]["docurl"]) ?>
62
  </div>
63
  </div>
64
  <!-- Option end -->
83
  </div>
84
  <div style="clear: both"></div>
85
  </div>
86
+ <div class="wpd-opt-doc" style="padding-top: 36px;">
87
+ <?php $this->printDocLink($setting["options"]["ratingStarColors"]["docurl"]) ?>
88
+ </div>
89
  </div>
90
  <!-- Option end -->
options/options-layouts/html-recaptcha.php CHANGED
@@ -35,7 +35,7 @@ if (!defined("ABSPATH")) {
35
  </select>
36
  </div>
37
  <div class="wpd-opt-doc">
38
- <a href="<?php echo esc_url_raw($setting["options"]["requestMethod"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
39
  </div>
40
  </div>
41
  <!-- Option end -->
@@ -53,7 +53,7 @@ if (!defined("ABSPATH")) {
53
  </div>
54
  </div>
55
  <div class="wpd-opt-doc">
56
- <a href="<?php echo esc_url_raw($setting["options"]["showForGuests"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
57
  </div>
58
  </div>
59
  <!-- Option end -->
@@ -71,7 +71,7 @@ if (!defined("ABSPATH")) {
71
  </div>
72
  </div>
73
  <div class="wpd-opt-doc">
74
- <a href="<?php echo esc_url_raw($setting["options"]["showForUsers"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
75
  </div>
76
  </div>
77
  <!-- Option end -->
@@ -89,7 +89,7 @@ if (!defined("ABSPATH")) {
89
  </div>
90
  </div>
91
  <div class="wpd-opt-doc">
92
- <a href="<?php echo esc_url_raw($setting["options"]["isShowOnSubscribeForm"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
93
  </div>
94
  </div>
95
  <!-- Option end -->
@@ -108,7 +108,7 @@ if (!defined("ABSPATH")) {
108
  <input id="siteKey" type="text" name="<?php echo esc_attr(WpdiscuzCore::TAB_RECAPTCHA); ?>[siteKey]" placeholder="<?php esc_html_e("reCAPTCHA V2 Site Key", "wpdiscuz"); ?>" value="<?php echo esc_attr($this->recaptcha["siteKey"]); ?>" style="margin:1px;padding:3px 5px; width:90%;"/>
109
  </div>
110
  <div class="wpd-opt-doc">
111
- <a href="<?php echo esc_url_raw($setting["options"]["siteKey"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
112
  </div>
113
  </div>
114
  <!-- Option end -->
@@ -123,7 +123,7 @@ if (!defined("ABSPATH")) {
123
  <input id="secretKey" type="text" name="<?php echo esc_attr(WpdiscuzCore::TAB_RECAPTCHA); ?>[secretKey]" placeholder="<?php esc_html_e("reCAPTCHA V2 Secret Key", "wpdiscuz"); ?>" value="<?php echo esc_attr($this->recaptcha["secretKey"]); ?>" style="margin: 1px;padding:3px 5px; width:90%;"/>
124
  </div>
125
  <div class="wpd-opt-doc">
126
- <a href="<?php echo esc_url_raw($setting["options"]["secretKey"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
127
  </div>
128
  </div>
129
  <!-- Option end -->
@@ -141,7 +141,7 @@ if (!defined("ABSPATH")) {
141
  </select>
142
  </div>
143
  <div class="wpd-opt-doc">
144
- <a href="<?php echo esc_url_raw($setting["options"]["theme"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
145
  </div>
146
  </div>
147
  <!-- Option end -->
@@ -157,7 +157,7 @@ if (!defined("ABSPATH")) {
157
  <a target="blanck" style="font-size: 10px;" href="https://developers.google.com/recaptcha/docs/language"><?php esc_html_e("Language codes", "wpdiscuz"); ?></a>
158
  </div>
159
  <div class="wpd-opt-doc">
160
- <a href="<?php echo esc_url_raw($setting["options"]["lang"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
161
  </div>
162
  </div>
163
  <!-- Option end -->
35
  </select>
36
  </div>
37
  <div class="wpd-opt-doc">
38
+ <?php $this->printDocLink($setting["options"]["requestMethod"]["docurl"]) ?>
39
  </div>
40
  </div>
41
  <!-- Option end -->
53
  </div>
54
  </div>
55
  <div class="wpd-opt-doc">
56
+ <?php $this->printDocLink($setting["options"]["showForGuests"]["docurl"]) ?>
57
  </div>
58
  </div>
59
  <!-- Option end -->
71
  </div>
72
  </div>
73
  <div class="wpd-opt-doc">
74
+ <?php $this->printDocLink($setting["options"]["showForUsers"]["docurl"]) ?>
75
  </div>
76
  </div>
77
  <!-- Option end -->
89
  </div>
90
  </div>
91
  <div class="wpd-opt-doc">
92
+ <?php $this->printDocLink($setting["options"]["isShowOnSubscribeForm"]["docurl"]) ?>
93
  </div>
94
  </div>
95
  <!-- Option end -->
108
  <input id="siteKey" type="text" name="<?php echo esc_attr(WpdiscuzCore::TAB_RECAPTCHA); ?>[siteKey]" placeholder="<?php esc_html_e("reCAPTCHA V2 Site Key", "wpdiscuz"); ?>" value="<?php echo esc_attr($this->recaptcha["siteKey"]); ?>" style="margin:1px;padding:3px 5px; width:90%;"/>
109
  </div>
110
  <div class="wpd-opt-doc">
111
+ <?php $this->printDocLink($setting["options"]["siteKey"]["docurl"]) ?>
112
  </div>
113
  </div>
114
  <!-- Option end -->
123
  <input id="secretKey" type="text" name="<?php echo esc_attr(WpdiscuzCore::TAB_RECAPTCHA); ?>[secretKey]" placeholder="<?php esc_html_e("reCAPTCHA V2 Secret Key", "wpdiscuz"); ?>" value="<?php echo esc_attr($this->recaptcha["secretKey"]); ?>" style="margin: 1px;padding:3px 5px; width:90%;"/>
124
  </div>
125
  <div class="wpd-opt-doc">
126
+ <?php $this->printDocLink($setting["options"]["secretKey"]["docurl"]) ?>
127
  </div>
128
  </div>
129
  <!-- Option end -->
141
  </select>
142
  </div>
143
  <div class="wpd-opt-doc">
144
+ <?php $this->printDocLink($setting["options"]["theme"]["docurl"]) ?>
145
  </div>
146
  </div>
147
  <!-- Option end -->
157
  <a target="blanck" style="font-size: 10px;" href="https://developers.google.com/recaptcha/docs/language"><?php esc_html_e("Language codes", "wpdiscuz"); ?></a>
158
  </div>
159
  <div class="wpd-opt-doc">
160
+ <?php $this->printDocLink($setting["options"]["lang"]["docurl"]) ?>
161
  </div>
162
  </div>
163
  <!-- Option end -->
options/options-layouts/html-social.php CHANGED
@@ -28,7 +28,7 @@ if (!defined("ABSPATH")) {
28
  </div>
29
  </div>
30
  <div class="wpd-opt-doc">
31
- <a href="<?php echo esc_url_raw($setting["options"]["socialLoginAgreementCheckbox"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
32
  </div>
33
  </div>
34
  <!-- Option end -->
@@ -46,7 +46,7 @@ if (!defined("ABSPATH")) {
46
  </div>
47
  </div>
48
  <div class="wpd-opt-doc">
49
- <a href="<?php echo esc_url_raw($setting["options"]["socialLoginInSecondaryForm"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
50
  </div>
51
  </div>
52
  <!-- Option end -->
@@ -64,7 +64,7 @@ if (!defined("ABSPATH")) {
64
  </div>
65
  </div>
66
  <div class="wpd-opt-doc">
67
- <a href="<?php echo esc_url_raw($setting["options"]["displayIconOnAvatar"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
68
  </div>
69
  </div>
70
  <!-- Option end -->
@@ -89,7 +89,9 @@ if (!defined("ABSPATH")) {
89
  <label for="enableFbLogin"></label>
90
  </div>
91
  </div>
92
- <div class="wpd-opt-doc"></div>
 
 
93
  </div>
94
  <!-- Option end -->
95
 
@@ -106,7 +108,9 @@ if (!defined("ABSPATH")) {
106
  <label for="fbUseOAuth2"></label>
107
  </div>
108
  </div>
109
- <div class="wpd-opt-doc"></div>
 
 
110
  </div>
111
  <!-- Option end -->
112
  <?php } ?>
@@ -123,7 +127,9 @@ if (!defined("ABSPATH")) {
123
  <label for="enableFbShare"></label>
124
  </div>
125
  </div>
126
- <div class="wpd-opt-doc"></div>
 
 
127
  </div>
128
  <!-- Option end -->
129
 
@@ -137,7 +143,7 @@ if (!defined("ABSPATH")) {
137
  <input placeholder="<?php esc_attr_e("Application ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["fbAppID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[fbAppID]" id="wpd-fb-app-id" />
138
  </div>
139
  <div class="wpd-opt-doc">
140
- <a href="<?php echo esc_url_raw($setting["options"]["fbAppID"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
141
  </div>
142
  </div>
143
  <!-- Option end -->
@@ -152,7 +158,7 @@ if (!defined("ABSPATH")) {
152
  <input placeholder="<?php esc_attr_e("Application Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["fbAppSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[fbAppSecret]" id="wpd-fb-app-secret" />
153
  </div>
154
  <div class="wpd-opt-doc">
155
- <a href="<?php echo esc_url_raw($setting["options"]["fbAppSecret"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
156
  </div>
157
  </div>
158
  <!-- Option end -->
@@ -179,7 +185,9 @@ if (!defined("ABSPATH")) {
179
  <label for="enableTwitterLogin"></label>
180
  </div>
181
  </div>
182
- <div class="wpd-opt-doc"></div>
 
 
183
  </div>
184
  <!-- Option end -->
185
 
@@ -195,7 +203,9 @@ if (!defined("ABSPATH")) {
195
  <label for="enableTwitterShare"></label>
196
  </div>
197
  </div>
198
- <div class="wpd-opt-doc"></div>
 
 
199
  </div>
200
  <!-- Option end -->
201
 
@@ -209,7 +219,7 @@ if (!defined("ABSPATH")) {
209
  <input placeholder="<?php esc_attr_e("Consumer Key (API Key)", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["twitterAppID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[twitterAppID]" id="wpd-twitter-app-id" />
210
  </div>
211
  <div class="wpd-opt-doc">
212
- <a href="<?php echo esc_url_raw($setting["options"]["twitterAppID"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
213
  </div>
214
  </div>
215
  <!-- Option end -->
@@ -224,7 +234,7 @@ if (!defined("ABSPATH")) {
224
  <input placeholder="<?php esc_attr_e("Consumer Secret (API Secret)", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["twitterAppSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[twitterAppSecret]" id="wpd-twitter-app-secret" />
225
  </div>
226
  <div class="wpd-opt-doc">
227
- <a href="<?php echo esc_url_raw($setting["options"]["twitterAppSecret"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
228
  </div>
229
  </div>
230
  <!-- Option end -->
@@ -250,7 +260,9 @@ if (!defined("ABSPATH")) {
250
  <label for="enableGoogleLogin"></label>
251
  </div>
252
  </div>
253
- <div class="wpd-opt-doc"></div>
 
 
254
  </div>
255
  <!-- Option end -->
256
 
@@ -264,7 +276,7 @@ if (!defined("ABSPATH")) {
264
  <input placeholder="<?php esc_attr_e("Client ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["googleClientID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[googleClientID]" id="wpd-google-client-id" />
265
  </div>
266
  <div class="wpd-opt-doc">
267
- <a href="<?php echo esc_url_raw($setting["options"]["googleClientID"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
268
  </div>
269
  </div>
270
  <!-- Option end -->
@@ -279,7 +291,7 @@ if (!defined("ABSPATH")) {
279
  <input placeholder="<?php esc_attr_e("Client Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["googleClientSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[googleClientSecret]" id="wpd-google-client-secret" />
280
  </div>
281
  <div class="wpd-opt-doc">
282
- <a href="<?php echo esc_url_raw($setting["options"]["googleClientSecret"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
283
  </div>
284
  </div>
285
  <!-- Option end -->
@@ -306,7 +318,9 @@ if (!defined("ABSPATH")) {
306
  <label for="enableDisqusLogin"></label>
307
  </div>
308
  </div>
309
- <div class="wpd-opt-doc"></div>
 
 
310
  </div>
311
  <!-- Option end -->
312
 
@@ -320,7 +334,7 @@ if (!defined("ABSPATH")) {
320
  <input placeholder="<?php esc_attr_e("Public Key", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["disqusPublicKey"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[disqusPublicKey]" id="wpd-disqus-public-key" />
321
  </div>
322
  <div class="wpd-opt-doc">
323
- <a href="<?php echo esc_url_raw($setting["options"]["disqusPublicKey"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
324
  </div>
325
  </div>
326
  <!-- Option end -->
@@ -335,7 +349,7 @@ if (!defined("ABSPATH")) {
335
  <input placeholder="<?php esc_attr_e("Secure Key", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["disqusSecretKey"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[disqusSecretKey]" id="wpd-disqus-secret-key" />
336
  </div>
337
  <div class="wpd-opt-doc">
338
- <a href="<?php echo esc_url_raw($setting["options"]["disqusSecretKey"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
339
  </div>
340
  </div>
341
  <!-- Option end -->
@@ -361,7 +375,9 @@ if (!defined("ABSPATH")) {
361
  <label for="enableWordpressLogin"></label>
362
  </div>
363
  </div>
364
- <div class="wpd-opt-doc"></div>
 
 
365
  </div>
366
  <!-- Option end -->
367
 
@@ -375,7 +391,7 @@ if (!defined("ABSPATH")) {
375
  <input placeholder="<?php esc_attr_e("Client ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["wordpressClientID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[wordpressClientID]" id="wpd-wordpress-client-id" />
376
  </div>
377
  <div class="wpd-opt-doc">
378
- <a href="<?php echo esc_url_raw($setting["options"]["wordpressClientID"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
379
  </div>
380
  </div>
381
  <!-- Option end -->
@@ -390,7 +406,7 @@ if (!defined("ABSPATH")) {
390
  <input placeholder="<?php esc_attr_e("Client Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["wordpressClientSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[wordpressClientSecret]" id="wpd-wordpress-client-secret" />
391
  </div>
392
  <div class="wpd-opt-doc">
393
- <a href="<?php echo esc_url_raw($setting["options"]["wordpressClientSecret"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
394
  </div>
395
  </div>
396
  <!-- Option end -->
@@ -414,7 +430,9 @@ if (!defined("ABSPATH")) {
414
  <label for="enableInstagramLogin"></label>
415
  </div>
416
  </div>
417
- <div class="wpd-opt-doc"></div>
 
 
418
  </div>
419
  <!-- Option end -->
420
 
@@ -428,7 +446,7 @@ if (!defined("ABSPATH")) {
428
  <input placeholder="<?php esc_attr_e("App ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["instagramAppID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[instagramAppID]" id="wpd-google-client-id" />
429
  </div>
430
  <div class="wpd-opt-doc">
431
- <a href="<?php echo esc_url_raw($setting["options"]["instagramAppID"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
432
  </div>
433
  </div>
434
  <!-- Option end -->
@@ -443,7 +461,7 @@ if (!defined("ABSPATH")) {
443
  <input placeholder="<?php esc_attr_e("App Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["instagramAppSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[instagramAppSecret]" id="wpd-google-client-secret" />
444
  </div>
445
  <div class="wpd-opt-doc">
446
- <a href="<?php echo esc_url_raw($setting["options"]["instagramAppSecret"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
447
  </div>
448
  </div>
449
  <!-- Option end -->
@@ -468,7 +486,9 @@ if (!defined("ABSPATH")) {
468
  <label for="enableLinkedinLogin"></label>
469
  </div>
470
  </div>
471
- <div class="wpd-opt-doc"></div>
 
 
472
  </div>
473
  <!-- Option end -->
474
 
@@ -482,7 +502,7 @@ if (!defined("ABSPATH")) {
482
  <input placeholder="<?php esc_attr_e("Client ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["linkedinClientID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[linkedinClientID]" id="wpd-google-client-id" />
483
  </div>
484
  <div class="wpd-opt-doc">
485
- <a href="<?php echo esc_url_raw($setting["options"]["linkedinClientID"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
486
  </div>
487
  </div>
488
  <!-- Option end -->
@@ -497,7 +517,7 @@ if (!defined("ABSPATH")) {
497
  <input placeholder="<?php esc_attr_e("Client Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["linkedinClientSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[linkedinClientSecret]" id="wpd-google-client-secret" />
498
  </div>
499
  <div class="wpd-opt-doc">
500
- <a href="<?php echo esc_url_raw($setting["options"]["linkedinClientSecret"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
501
  </div>
502
  </div>
503
  <!-- Option end -->
@@ -518,7 +538,9 @@ if (!defined("ABSPATH")) {
518
  <label for="enableWhatsappShare"></label>
519
  </div>
520
  </div>
521
- <div class="wpd-opt-doc"></div>
 
 
522
  </div>
523
  <!-- Option end -->
524
 
@@ -542,7 +564,9 @@ if (!defined("ABSPATH")) {
542
  <label for="enableYandexLogin"></label>
543
  </div>
544
  </div>
545
- <div class="wpd-opt-doc"></div>
 
 
546
  </div>
547
  <!-- Option end -->
548
 
@@ -556,7 +580,7 @@ if (!defined("ABSPATH")) {
556
  <input placeholder="<?php esc_attr_e("ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["yandexID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[yandexID]" id="wpd-google-client-id" />
557
  </div>
558
  <div class="wpd-opt-doc">
559
- <a href="<?php echo esc_url_raw($setting["options"]["yandexID"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
560
  </div>
561
  </div>
562
  <!-- Option end -->
@@ -571,7 +595,7 @@ if (!defined("ABSPATH")) {
571
  <input placeholder="<?php esc_attr_e("Password", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["yandexPassword"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[yandexPassword]" id="wpd-google-client-secret" />
572
  </div>
573
  <div class="wpd-opt-doc">
574
- <a href="<?php echo esc_url_raw($setting["options"]["yandexPassword"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
575
  </div>
576
  </div>
577
  <!-- Option end -->
@@ -580,7 +604,7 @@ if (!defined("ABSPATH")) {
580
  <img src="<?php echo esc_url_raw(plugins_url(WPDISCUZ_DIR_NAME . "/assets/img/social-icons/vk-m.png")); ?>" style="vertical-align:bottom; height: 24px; margin-bottom: -2px; position: relative; border-radius: 50%;">&nbsp; VK
581
  </div>
582
  <p style="font-size: 14px; font-style: italic; margin-top: 5px;">
583
- <?php esc_html_e("To start using VK Login Button you should get Application ID and Secure Key. Please follow to this ", "wpdiscuz"); ?> <a href="https://wpdiscuz.com/docs/wpdiscuz-documentation/social-login-and-share/vk-application-id-and-secure-key/" target="_blank" style="font-weight: 600;"><?php esc_html_e("instruction &raquo;", "wpdiscuz"); ?></a> &nbsp;
584
  <?php echo esc_html__("Redirect URI", "wpdiscuz") . " : <code>" . esc_url_raw(admin_url("admin-ajax.php")) . "</code>"; ?>
585
  </p>
586
 
@@ -597,7 +621,9 @@ if (!defined("ABSPATH")) {
597
  <label for="enableVkLogin"></label>
598
  </div>
599
  </div>
600
- <div class="wpd-opt-doc"></div>
 
 
601
  </div>
602
  <!-- Option end -->
603
 
@@ -613,7 +639,9 @@ if (!defined("ABSPATH")) {
613
  <label for="enableVkShare"></label>
614
  </div>
615
  </div>
616
- <div class="wpd-opt-doc"></div>
 
 
617
  </div>
618
  <!-- Option end -->
619
 
@@ -627,7 +655,7 @@ if (!defined("ABSPATH")) {
627
  <input placeholder="<?php esc_attr_e("Application ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["vkAppID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[vkAppID]" id="wpd-vk-app-id" />
628
  </div>
629
  <div class="wpd-opt-doc">
630
- <a href="<?php echo esc_url_raw($setting["options"]["vkAppID"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
631
  </div>
632
  </div>
633
  <!-- Option end -->
@@ -642,7 +670,7 @@ if (!defined("ABSPATH")) {
642
  <input placeholder="<?php esc_attr_e("Secure Key", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["vkAppSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[vkAppSecret]" id="wpd-vk-app-secret" />
643
  </div>
644
  <div class="wpd-opt-doc">
645
- <a href="<?php echo esc_url_raw($setting["options"]["vkAppSecret"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
646
  </div>
647
  </div>
648
  <!-- Option end -->
@@ -667,7 +695,9 @@ if (!defined("ABSPATH")) {
667
  <label for="enableMailruLogin"></label>
668
  </div>
669
  </div>
670
- <div class="wpd-opt-doc"></div>
 
 
671
  </div>
672
  <!-- Option end -->
673
 
@@ -681,7 +711,7 @@ if (!defined("ABSPATH")) {
681
  <input placeholder="<?php esc_attr_e("ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["mailruClientID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[mailruClientID]" id="wpd-google-client-id" />
682
  </div>
683
  <div class="wpd-opt-doc">
684
- <a href="<?php echo esc_url_raw($setting["options"]["mailruClientID"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
685
  </div>
686
  </div>
687
  <!-- Option end -->
@@ -696,7 +726,7 @@ if (!defined("ABSPATH")) {
696
  <input placeholder="<?php esc_attr_e("Secret Key", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["mailruClientSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[mailruClientSecret]" id="wpd-google-client-secret" />
697
  </div>
698
  <div class="wpd-opt-doc">
699
- <a href="<?php echo esc_url_raw($setting["options"]["mailruClientSecret"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
700
  </div>
701
  </div>
702
  <!-- Option end -->
@@ -723,7 +753,9 @@ if (!defined("ABSPATH")) {
723
  <label for="enableOkLogin"></label>
724
  </div>
725
  </div>
726
- <div class="wpd-opt-doc"></div>
 
 
727
  </div>
728
  <!-- Option end -->
729
 
@@ -739,7 +771,9 @@ if (!defined("ABSPATH")) {
739
  <label for="enableOkShare"></label>
740
  </div>
741
  </div>
742
- <div class="wpd-opt-doc"></div>
 
 
743
  </div>
744
  <!-- Option end -->
745
 
@@ -753,7 +787,7 @@ if (!defined("ABSPATH")) {
753
  <input placeholder="<?php esc_attr_e("Application ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["okAppID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[okAppID]" id="wpd-ok-app-id" />
754
  </div>
755
  <div class="wpd-opt-doc">
756
- <a href="<?php echo esc_url_raw($setting["options"]["okAppID"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
757
  </div>
758
  </div>
759
  <!-- Option end -->
@@ -768,7 +802,7 @@ if (!defined("ABSPATH")) {
768
  <input placeholder="<?php esc_attr_e("Application Key", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["okAppKey"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[okAppKey]" id="wpd-ok-app-key" />
769
  </div>
770
  <div class="wpd-opt-doc">
771
- <a href="<?php echo esc_url_raw($setting["options"]["okAppKey"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
772
  </div>
773
  </div>
774
  <!-- Option end -->
@@ -783,7 +817,7 @@ if (!defined("ABSPATH")) {
783
  <input placeholder="<?php esc_attr_e("Application Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["okAppSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[okAppSecret]" id="wpd-ok-app-secret" />
784
  </div>
785
  <div class="wpd-opt-doc">
786
- <a href="<?php echo esc_url_raw($setting["options"]["okAppSecret"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
787
  </div>
788
  </div>
789
  <!-- Option end -->
@@ -807,7 +841,9 @@ if (!defined("ABSPATH")) {
807
  <label for="enableWechatLogin"></label>
808
  </div>
809
  </div>
810
- <div class="wpd-opt-doc"></div>
 
 
811
  </div>
812
  <!-- Option end -->
813
 
@@ -821,7 +857,7 @@ if (!defined("ABSPATH")) {
821
  <input placeholder="<?php esc_attr_e("App ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["wechatAppID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[wechatAppID]" id="wpd-google-client-id" />
822
  </div>
823
  <div class="wpd-opt-doc">
824
- <a href="<?php echo esc_url_raw($setting["options"]["wechatAppID"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
825
  </div>
826
  </div>
827
  <!-- Option end -->
@@ -836,7 +872,7 @@ if (!defined("ABSPATH")) {
836
  <input placeholder="<?php esc_attr_e("Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["wechatSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[wechatSecret]" id="wpd-google-client-secret" />
837
  </div>
838
  <div class="wpd-opt-doc">
839
- <a href="<?php echo esc_url_raw($setting["options"]["wechatSecret"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
840
  </div>
841
  </div>
842
  <!-- Option end -->
@@ -861,7 +897,9 @@ if (!defined("ABSPATH")) {
861
  <label for="enableWeiboLogin"></label>
862
  </div>
863
  </div>
864
- <div class="wpd-opt-doc"></div>
 
 
865
  </div>
866
  <!-- Option end -->
867
 
@@ -875,7 +913,7 @@ if (!defined("ABSPATH")) {
875
  <input placeholder="<?php esc_attr_e("Key", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["weiboKey"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[weiboKey]" id="wpd-google-client-id" />
876
  </div>
877
  <div class="wpd-opt-doc">
878
- <a href="<?php echo esc_url_raw($setting["options"]["weiboKey"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
879
  </div>
880
  </div>
881
  <!-- Option end -->
@@ -890,7 +928,7 @@ if (!defined("ABSPATH")) {
890
  <input placeholder="<?php esc_attr_e("Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["weiboSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[weiboSecret]" id="wpd-google-client-secret" />
891
  </div>
892
  <div class="wpd-opt-doc">
893
- <a href="<?php echo esc_url_raw($setting["options"]["weiboSecret"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
894
  </div>
895
  </div>
896
  <!-- Option end -->
@@ -915,7 +953,9 @@ if (!defined("ABSPATH")) {
915
  <label for="enableQQLogin"></label>
916
  </div>
917
  </div>
918
- <div class="wpd-opt-doc"></div>
 
 
919
  </div>
920
  <!-- Option end -->
921
 
@@ -929,7 +969,7 @@ if (!defined("ABSPATH")) {
929
  <input placeholder="<?php esc_attr_e("App ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["qqAppID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[qqAppID]" id="wpd-google-client-id" />
930
  </div>
931
  <div class="wpd-opt-doc">
932
- <a href="<?php echo esc_url_raw($setting["options"]["qqAppID"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
933
  </div>
934
  </div>
935
  <!-- Option end -->
@@ -944,7 +984,7 @@ if (!defined("ABSPATH")) {
944
  <input placeholder="<?php esc_attr_e("Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["qqSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[qqSecret]" id="wpd-google-client-secret" />
945
  </div>
946
  <div class="wpd-opt-doc">
947
- <a href="<?php echo esc_url_raw($setting["options"]["qqSecret"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
948
  </div>
949
  </div>
950
  <!-- Option end -->
@@ -969,7 +1009,9 @@ if (!defined("ABSPATH")) {
969
  <label for="enableBaiduLogin"></label>
970
  </div>
971
  </div>
972
- <div class="wpd-opt-doc"></div>
 
 
973
  </div>
974
  <!-- Option end -->
975
 
@@ -983,7 +1025,7 @@ if (!defined("ABSPATH")) {
983
  <input placeholder="<?php esc_attr_e("App ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["baiduAppID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[baiduAppID]" id="wpd-google-client-id" />
984
  </div>
985
  <div class="wpd-opt-doc">
986
- <a href="<?php echo esc_url_raw($setting["options"]["baiduAppID"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
987
  </div>
988
  </div>
989
  <!-- Option end -->
@@ -998,7 +1040,7 @@ if (!defined("ABSPATH")) {
998
  <input placeholder="<?php esc_attr_e("Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["baiduSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[baiduSecret]" id="wpd-google-client-secret" />
999
  </div>
1000
  <div class="wpd-opt-doc">
1001
- <a href="<?php echo esc_url_raw($setting["options"]["baiduSecret"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
1002
  </div>
1003
  </div>
1004
  <!-- Option end -->
28
  </div>
29
  </div>
30
  <div class="wpd-opt-doc">
31
+ <?php $this->printDocLink($setting["options"]["socialLoginAgreementCheckbox"]["docurl"]) ?>
32
  </div>
33
  </div>
34
  <!-- Option end -->
46
  </div>
47
  </div>
48
  <div class="wpd-opt-doc">
49
+ <?php $this->printDocLink($setting["options"]["socialLoginInSecondaryForm"]["docurl"]) ?>
50
  </div>
51
  </div>
52
  <!-- Option end -->
64
  </div>
65
  </div>
66
  <div class="wpd-opt-doc">
67
+ <?php $this->printDocLink($setting["options"]["displayIconOnAvatar"]["docurl"]) ?>
68
  </div>
69
  </div>
70
  <!-- Option end -->
89
  <label for="enableFbLogin"></label>
90
  </div>
91
  </div>
92
+ <div class="wpd-opt-doc">
93
+ <?php $this->printDocLink($setting["options"]["enableFbLogin"]["docurl"]) ?>
94
+ </div>
95
  </div>
96
  <!-- Option end -->
97
 
108
  <label for="fbUseOAuth2"></label>
109
  </div>
110
  </div>
111
+ <div class="wpd-opt-doc">
112
+ <?php $this->printDocLink($setting["options"]["fbUseOAuth2"]["docurl"]) ?>
113
+ </div>
114
  </div>
115
  <!-- Option end -->
116
  <?php } ?>
127
  <label for="enableFbShare"></label>
128
  </div>
129
  </div>
130
+ <div class="wpd-opt-doc">
131
+ <?php $this->printDocLink($setting["options"]["enableFbShare"]["docurl"]) ?>
132
+ </div>
133
  </div>
134
  <!-- Option end -->
135
 
143
  <input placeholder="<?php esc_attr_e("Application ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["fbAppID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[fbAppID]" id="wpd-fb-app-id" />
144
  </div>
145
  <div class="wpd-opt-doc">
146
+ <?php $this->printDocLink($setting["options"]["fbAppID"]["docurl"]) ?>
147
  </div>
148
  </div>
149
  <!-- Option end -->
158
  <input placeholder="<?php esc_attr_e("Application Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["fbAppSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[fbAppSecret]" id="wpd-fb-app-secret" />
159
  </div>
160
  <div class="wpd-opt-doc">
161
+ <?php $this->printDocLink($setting["options"]["fbAppSecret"]["docurl"]) ?>
162
  </div>
163
  </div>
164
  <!-- Option end -->
185
  <label for="enableTwitterLogin"></label>
186
  </div>
187
  </div>
188
+ <div class="wpd-opt-doc">
189
+ <?php $this->printDocLink($setting["options"]["enableTwitterLogin"]["docurl"]) ?>
190
+ </div>
191
  </div>
192
  <!-- Option end -->
193
 
203
  <label for="enableTwitterShare"></label>
204
  </div>
205
  </div>
206
+ <div class="wpd-opt-doc">
207
+ <?php $this->printDocLink($setting["options"]["enableTwitterShare"]["docurl"]) ?>
208
+ </div>
209
  </div>
210
  <!-- Option end -->
211
 
219
  <input placeholder="<?php esc_attr_e("Consumer Key (API Key)", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["twitterAppID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[twitterAppID]" id="wpd-twitter-app-id" />
220
  </div>
221
  <div class="wpd-opt-doc">
222
+ <?php $this->printDocLink($setting["options"]["twitterAppID"]["docurl"]) ?>
223
  </div>
224
  </div>
225
  <!-- Option end -->
234
  <input placeholder="<?php esc_attr_e("Consumer Secret (API Secret)", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["twitterAppSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[twitterAppSecret]" id="wpd-twitter-app-secret" />
235
  </div>
236
  <div class="wpd-opt-doc">
237
+ <?php $this->printDocLink($setting["options"]["twitterAppSecret"]["docurl"]) ?>
238
  </div>
239
  </div>
240
  <!-- Option end -->
260
  <label for="enableGoogleLogin"></label>
261
  </div>
262
  </div>
263
+ <div class="wpd-opt-doc">
264
+ <?php $this->printDocLink($setting["options"]["enableGoogleLogin"]["docurl"]) ?>
265
+ </div>
266
  </div>
267
  <!-- Option end -->
268
 
276
  <input placeholder="<?php esc_attr_e("Client ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["googleClientID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[googleClientID]" id="wpd-google-client-id" />
277
  </div>
278
  <div class="wpd-opt-doc">
279
+ <?php $this->printDocLink($setting["options"]["googleClientID"]["docurl"]) ?>
280
  </div>
281
  </div>
282
  <!-- Option end -->
291
  <input placeholder="<?php esc_attr_e("Client Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["googleClientSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[googleClientSecret]" id="wpd-google-client-secret" />
292
  </div>
293
  <div class="wpd-opt-doc">
294
+ <?php $this->printDocLink($setting["options"]["googleClientSecret"]["docurl"]) ?>
295
  </div>
296
  </div>
297
  <!-- Option end -->
318
  <label for="enableDisqusLogin"></label>
319
  </div>
320
  </div>
321
+ <div class="wpd-opt-doc">
322
+ <?php $this->printDocLink($setting["options"]["enableDisqusLogin"]["docurl"]) ?>
323
+ </div>
324
  </div>
325
  <!-- Option end -->
326
 
334
  <input placeholder="<?php esc_attr_e("Public Key", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["disqusPublicKey"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[disqusPublicKey]" id="wpd-disqus-public-key" />
335
  </div>
336
  <div class="wpd-opt-doc">
337
+ <?php $this->printDocLink($setting["options"]["disqusPublicKey"]["docurl"]) ?>
338
  </div>
339
  </div>
340
  <!-- Option end -->
349
  <input placeholder="<?php esc_attr_e("Secure Key", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["disqusSecretKey"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[disqusSecretKey]" id="wpd-disqus-secret-key" />
350
  </div>
351
  <div class="wpd-opt-doc">
352
+ <?php $this->printDocLink($setting["options"]["disqusSecretKey"]["docurl"]) ?>
353
  </div>
354
  </div>
355
  <!-- Option end -->
375
  <label for="enableWordpressLogin"></label>
376
  </div>
377
  </div>
378
+ <div class="wpd-opt-doc">
379
+ <?php $this->printDocLink($setting["options"]["enableWordpressLogin"]["docurl"]) ?>
380
+ </div>
381
  </div>
382
  <!-- Option end -->
383
 
391
  <input placeholder="<?php esc_attr_e("Client ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["wordpressClientID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[wordpressClientID]" id="wpd-wordpress-client-id" />
392
  </div>
393
  <div class="wpd-opt-doc">
394
+ <?php $this->printDocLink($setting["options"]["wordpressClientID"]["docurl"]) ?>
395
  </div>
396
  </div>
397
  <!-- Option end -->
406
  <input placeholder="<?php esc_attr_e("Client Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["wordpressClientSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[wordpressClientSecret]" id="wpd-wordpress-client-secret" />
407
  </div>
408
  <div class="wpd-opt-doc">
409
+ <?php $this->printDocLink($setting["options"]["wordpressClientSecret"]["docurl"]) ?>
410
  </div>
411
  </div>
412
  <!-- Option end -->
430
  <label for="enableInstagramLogin"></label>
431
  </div>
432
  </div>
433
+ <div class="wpd-opt-doc">
434
+ <?php $this->printDocLink($setting["options"]["enableInstagramLogin"]["docurl"]) ?>
435
+ </div>
436
  </div>
437
  <!-- Option end -->
438
 
446
  <input placeholder="<?php esc_attr_e("App ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["instagramAppID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[instagramAppID]" id="wpd-google-client-id" />
447
  </div>
448
  <div class="wpd-opt-doc">
449
+ <?php $this->printDocLink($setting["options"]["instagramAppID"]["docurl"]) ?>
450
  </div>
451
  </div>
452
  <!-- Option end -->
461
  <input placeholder="<?php esc_attr_e("App Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["instagramAppSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[instagramAppSecret]" id="wpd-google-client-secret" />
462
  </div>
463
  <div class="wpd-opt-doc">
464
+ <?php $this->printDocLink($setting["options"]["instagramAppSecret"]["docurl"]) ?>
465
  </div>
466
  </div>
467
  <!-- Option end -->
486
  <label for="enableLinkedinLogin"></label>
487
  </div>
488
  </div>
489
+ <div class="wpd-opt-doc">
490
+ <?php $this->printDocLink($setting["options"]["enableLinkedinLogin"]["docurl"]) ?>
491
+ </div>
492
  </div>
493
  <!-- Option end -->
494
 
502
  <input placeholder="<?php esc_attr_e("Client ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["linkedinClientID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[linkedinClientID]" id="wpd-google-client-id" />
503
  </div>
504
  <div class="wpd-opt-doc">
505
+ <?php $this->printDocLink($setting["options"]["linkedinClientID"]["docurl"]) ?>
506
  </div>
507
  </div>
508
  <!-- Option end -->
517
  <input placeholder="<?php esc_attr_e("Client Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["linkedinClientSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[linkedinClientSecret]" id="wpd-google-client-secret" />
518
  </div>
519
  <div class="wpd-opt-doc">
520
+ <?php $this->printDocLink($setting["options"]["linkedinClientSecret"]["docurl"]) ?>
521
  </div>
522
  </div>
523
  <!-- Option end -->
538
  <label for="enableWhatsappShare"></label>
539
  </div>
540
  </div>
541
+ <div class="wpd-opt-doc">
542
+ <?php $this->printDocLink($setting["options"]["enableWhatsappShare"]["docurl"]) ?>
543
+ </div>
544
  </div>
545
  <!-- Option end -->
546
 
564
  <label for="enableYandexLogin"></label>
565
  </div>
566
  </div>
567
+ <div class="wpd-opt-doc">
568
+ <?php $this->printDocLink($setting["options"]["enableYandexLogin"]["docurl"]) ?>
569
+ </div>
570
  </div>
571
  <!-- Option end -->
572
 
580
  <input placeholder="<?php esc_attr_e("ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["yandexID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[yandexID]" id="wpd-google-client-id" />
581
  </div>
582
  <div class="wpd-opt-doc">
583
+ <?php $this->printDocLink($setting["options"]["yandexID"]["docurl"]) ?>
584
  </div>
585
  </div>
586
  <!-- Option end -->
595
  <input placeholder="<?php esc_attr_e("Password", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["yandexPassword"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[yandexPassword]" id="wpd-google-client-secret" />
596
  </div>
597
  <div class="wpd-opt-doc">
598
+ <?php $this->printDocLink($setting["options"]["yandexPassword"]["docurl"]) ?>
599
  </div>
600
  </div>
601
  <!-- Option end -->
604
  <img src="<?php echo esc_url_raw(plugins_url(WPDISCUZ_DIR_NAME . "/assets/img/social-icons/vk-m.png")); ?>" style="vertical-align:bottom; height: 24px; margin-bottom: -2px; position: relative; border-radius: 50%;">&nbsp; VK
605
  </div>
606
  <p style="font-size: 14px; font-style: italic; margin-top: 5px;">
607
+ <?php esc_html_e("To start using VK Login Button you should get Application ID and Secure Key. Please follow to this ", "wpdiscuz"); ?> <a href="https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/vk-app-configuration/" target="_blank" style="font-weight: 600;"><?php esc_html_e("instruction &raquo;", "wpdiscuz"); ?></a> &nbsp;
608
  <?php echo esc_html__("Redirect URI", "wpdiscuz") . " : <code>" . esc_url_raw(admin_url("admin-ajax.php")) . "</code>"; ?>
609
  </p>
610
 
621
  <label for="enableVkLogin"></label>
622
  </div>
623
  </div>
624
+ <div class="wpd-opt-doc">
625
+ <?php $this->printDocLink($setting["options"]["enableVkLogin"]["docurl"]) ?>
626
+ </div>
627
  </div>
628
  <!-- Option end -->
629
 
639
  <label for="enableVkShare"></label>
640
  </div>
641
  </div>
642
+ <div class="wpd-opt-doc">
643
+ <?php $this->printDocLink($setting["options"]["enableVkShare"]["docurl"]) ?>
644
+ </div>
645
  </div>
646
  <!-- Option end -->
647
 
655
  <input placeholder="<?php esc_attr_e("Application ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["vkAppID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[vkAppID]" id="wpd-vk-app-id" />
656
  </div>
657
  <div class="wpd-opt-doc">
658
+ <?php $this->printDocLink($setting["options"]["vkAppID"]["docurl"]) ?>
659
  </div>
660
  </div>
661
  <!-- Option end -->
670
  <input placeholder="<?php esc_attr_e("Secure Key", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["vkAppSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[vkAppSecret]" id="wpd-vk-app-secret" />
671
  </div>
672
  <div class="wpd-opt-doc">
673
+ <?php $this->printDocLink($setting["options"]["vkAppSecret"]["docurl"]) ?>
674
  </div>
675
  </div>
676
  <!-- Option end -->
695
  <label for="enableMailruLogin"></label>
696
  </div>
697
  </div>
698
+ <div class="wpd-opt-doc">
699
+ <?php $this->printDocLink($setting["options"]["enableMailruLogin"]["docurl"]) ?>
700
+ </div>
701
  </div>
702
  <!-- Option end -->
703
 
711
  <input placeholder="<?php esc_attr_e("ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["mailruClientID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[mailruClientID]" id="wpd-google-client-id" />
712
  </div>
713
  <div class="wpd-opt-doc">
714
+ <?php $this->printDocLink($setting["options"]["mailruClientID"]["docurl"]) ?>
715
  </div>
716
  </div>
717
  <!-- Option end -->
726
  <input placeholder="<?php esc_attr_e("Secret Key", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["mailruClientSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[mailruClientSecret]" id="wpd-google-client-secret" />
727
  </div>
728
  <div class="wpd-opt-doc">
729
+ <?php $this->printDocLink($setting["options"]["mailruClientSecret"]["docurl"]) ?>
730
  </div>
731
  </div>
732
  <!-- Option end -->
753
  <label for="enableOkLogin"></label>
754
  </div>
755
  </div>
756
+ <div class="wpd-opt-doc">
757
+ <?php $this->printDocLink($setting["options"]["enableOkLogin"]["docurl"]) ?>
758
+ </div>
759
  </div>
760
  <!-- Option end -->
761
 
771
  <label for="enableOkShare"></label>
772
  </div>
773
  </div>
774
+ <div class="wpd-opt-doc">
775
+ <?php $this->printDocLink($setting["options"]["enableOkShare"]["docurl"]) ?>
776
+ </div>
777
  </div>
778
  <!-- Option end -->
779
 
787
  <input placeholder="<?php esc_attr_e("Application ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["okAppID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[okAppID]" id="wpd-ok-app-id" />
788
  </div>
789
  <div class="wpd-opt-doc">
790
+ <?php $this->printDocLink($setting["options"]["okAppID"]["docurl"]) ?>
791
  </div>
792
  </div>
793
  <!-- Option end -->
802
  <input placeholder="<?php esc_attr_e("Application Key", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["okAppKey"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[okAppKey]" id="wpd-ok-app-key" />
803
  </div>
804
  <div class="wpd-opt-doc">
805
+ <?php $this->printDocLink($setting["options"]["okAppKey"]["docurl"]) ?>
806
  </div>
807
  </div>
808
  <!-- Option end -->
817
  <input placeholder="<?php esc_attr_e("Application Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["okAppSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[okAppSecret]" id="wpd-ok-app-secret" />
818
  </div>
819
  <div class="wpd-opt-doc">
820
+ <?php $this->printDocLink($setting["options"]["okAppSecret"]["docurl"]) ?>
821
  </div>
822
  </div>
823
  <!-- Option end -->
841
  <label for="enableWechatLogin"></label>
842
  </div>
843
  </div>
844
+ <div class="wpd-opt-doc">
845
+ <?php $this->printDocLink($setting["options"]["enableWechatLogin"]["docurl"]) ?>
846
+ </div>
847
  </div>
848
  <!-- Option end -->
849
 
857
  <input placeholder="<?php esc_attr_e("App ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["wechatAppID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[wechatAppID]" id="wpd-google-client-id" />
858
  </div>
859
  <div class="wpd-opt-doc">
860
+ <?php $this->printDocLink($setting["options"]["wechatAppID"]["docurl"]) ?>
861
  </div>
862
  </div>
863
  <!-- Option end -->
872
  <input placeholder="<?php esc_attr_e("Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["wechatSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[wechatSecret]" id="wpd-google-client-secret" />
873
  </div>
874
  <div class="wpd-opt-doc">
875
+ <?php $this->printDocLink($setting["options"]["wechatSecret"]["docurl"]) ?>
876
  </div>
877
  </div>
878
  <!-- Option end -->
897
  <label for="enableWeiboLogin"></label>
898
  </div>
899
  </div>
900
+ <div class="wpd-opt-doc">
901
+ <?php $this->printDocLink($setting["options"]["enableWeiboLogin"]["docurl"]) ?>
902
+ </div>
903
  </div>
904
  <!-- Option end -->
905
 
913
  <input placeholder="<?php esc_attr_e("Key", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["weiboKey"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[weiboKey]" id="wpd-google-client-id" />
914
  </div>
915
  <div class="wpd-opt-doc">
916
+ <?php $this->printDocLink($setting["options"]["weiboKey"]["docurl"]) ?>
917
  </div>
918
  </div>
919
  <!-- Option end -->
928
  <input placeholder="<?php esc_attr_e("Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["weiboSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[weiboSecret]" id="wpd-google-client-secret" />
929
  </div>
930
  <div class="wpd-opt-doc">
931
+ <?php $this->printDocLink($setting["options"]["weiboSecret"]["docurl"]) ?>
932
  </div>
933
  </div>
934
  <!-- Option end -->
953
  <label for="enableQQLogin"></label>
954
  </div>
955
  </div>
956
+ <div class="wpd-opt-doc">
957
+ <?php $this->printDocLink($setting["options"]["enableQQLogin"]["docurl"]) ?>
958
+ </div>
959
  </div>
960
  <!-- Option end -->
961
 
969
  <input placeholder="<?php esc_attr_e("App ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["qqAppID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[qqAppID]" id="wpd-google-client-id" />
970
  </div>
971
  <div class="wpd-opt-doc">
972
+ <?php $this->printDocLink($setting["options"]["qqAppID"]["docurl"]) ?>
973
  </div>
974
  </div>
975
  <!-- Option end -->
984
  <input placeholder="<?php esc_attr_e("Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["qqSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[qqSecret]" id="wpd-google-client-secret" />
985
  </div>
986
  <div class="wpd-opt-doc">
987
+ <?php $this->printDocLink($setting["options"]["qqSecret"]["docurl"]) ?>
988
  </div>
989
  </div>
990
  <!-- Option end -->
1009
  <label for="enableBaiduLogin"></label>
1010
  </div>
1011
  </div>
1012
+ <div class="wpd-opt-doc">
1013
+ <?php $this->printDocLink($setting["options"]["enableBaiduLogin"]["docurl"]) ?>
1014
+ </div>
1015
  </div>
1016
  <!-- Option end -->
1017
 
1025
  <input placeholder="<?php esc_attr_e("App ID", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["baiduAppID"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[baiduAppID]" id="wpd-google-client-id" />
1026
  </div>
1027
  <div class="wpd-opt-doc">
1028
+ <?php $this->printDocLink($setting["options"]["baiduAppID"]["docurl"]) ?>
1029
  </div>
1030
  </div>
1031
  <!-- Option end -->
1040
  <input placeholder="<?php esc_attr_e("Secret", "wpdiscuz"); ?>" type="text" value="<?php echo esc_attr($this->social["baiduSecret"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_SOCIAL); ?>[baiduSecret]" id="wpd-google-client-secret" />
1041
  </div>
1042
  <div class="wpd-opt-doc">
1043
+ <?php $this->printDocLink($setting["options"]["baiduSecret"]["docurl"]) ?>
1044
  </div>
1045
  </div>
1046
  <!-- Option end -->
options/options-layouts/html-subscription.php CHANGED
@@ -28,7 +28,7 @@ if (!defined("ABSPATH")) {
28
  </div>
29
  </div>
30
  <div class="wpd-opt-doc">
31
- <a href="<?php echo esc_url_raw($setting["options"]["enableUserMentioning"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
32
  </div>
33
  </div>
34
  <!-- Option end -->
@@ -46,7 +46,7 @@ if (!defined("ABSPATH")) {
46
  </div>
47
  </div>
48
  <div class="wpd-opt-doc">
49
- <a href="<?php echo esc_url_raw($setting["options"]["sendMailToMentionedUsers"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
50
  </div>
51
  </div>
52
  <!-- Option end -->
@@ -64,7 +64,7 @@ if (!defined("ABSPATH")) {
64
  </div>
65
  </div>
66
  <div class="wpd-opt-doc">
67
- <a href="<?php echo esc_url_raw($setting["options"]["isNotifyOnCommentApprove"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
68
  </div>
69
  </div>
70
  <!-- Option end -->
@@ -82,7 +82,7 @@ if (!defined("ABSPATH")) {
82
  </div>
83
  </div>
84
  <div class="wpd-opt-doc">
85
- <a href="<?php echo esc_url_raw($setting["options"]["enableMemberConfirm"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
86
  </div>
87
  </div>
88
  <!-- Option end -->
@@ -100,7 +100,7 @@ if (!defined("ABSPATH")) {
100
  </div>
101
  </div>
102
  <div class="wpd-opt-doc">
103
- <a href="<?php echo esc_url_raw($setting["options"]["enableGuestsConfirm"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
104
  </div>
105
  </div>
106
  <!-- Option end -->
@@ -129,7 +129,7 @@ if (!defined("ABSPATH")) {
129
  </div>
130
  </div>
131
  <div class="wpd-opt-doc">
132
- <a href="<?php echo esc_url_raw($setting["options"]["subscriptionType"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
133
  </div>
134
  </div>
135
  <!-- Option end -->
@@ -147,7 +147,7 @@ if (!defined("ABSPATH")) {
147
  </div>
148
  </div>
149
  <div class="wpd-opt-doc">
150
- <a href="<?php echo esc_url_raw($setting["options"]["showReplyCheckbox"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
151
  </div>
152
  </div>
153
  <!-- Option end -->
@@ -164,7 +164,9 @@ if (!defined("ABSPATH")) {
164
  <label for="isReplyDefaultChecked"></label>
165
  </div>
166
  </div>
167
- <div class="wpd-opt-doc"></div>
 
 
168
  </div>
169
  <!-- Option end -->
170
 
@@ -182,7 +184,7 @@ if (!defined("ABSPATH")) {
182
  </div>
183
  </div>
184
  <div class="wpd-opt-doc">
185
- <a href="<?php echo esc_url_raw($setting["options"]["usePostmaticForCommentNotification"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
186
  </div>
187
  </div>
188
  <!-- Option end -->
@@ -201,7 +203,7 @@ if (!defined("ABSPATH")) {
201
  </div>
202
  </div>
203
  <div class="wpd-opt-doc">
204
- <a href="<?php echo esc_url_raw($setting["options"]["isFollowActive"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
205
  </div>
206
  </div>
207
  <!-- Option end -->
@@ -219,7 +221,7 @@ if (!defined("ABSPATH")) {
219
  </div>
220
  </div>
221
  <div class="wpd-opt-doc">
222
- <a href="<?php echo esc_url_raw($setting["options"]["disableFollowConfirmForUsers"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
223
  </div>
224
  </div>
225
  <!-- Option end -->
28
  </div>
29
  </div>
30
  <div class="wpd-opt-doc">
31
+ <?php $this->printDocLink($setting["options"]["enableUserMentioning"]["docurl"]) ?>
32
  </div>
33
  </div>
34
  <!-- Option end -->
46
  </div>
47
  </div>
48
  <div class="wpd-opt-doc">
49
+ <?php $this->printDocLink($setting["options"]["sendMailToMentionedUsers"]["docurl"]) ?>
50
  </div>
51
  </div>
52
  <!-- Option end -->
64
  </div>
65
  </div>
66
  <div class="wpd-opt-doc">
67
+ <?php $this->printDocLink($setting["options"]["isNotifyOnCommentApprove"]["docurl"]) ?>
68
  </div>
69
  </div>
70
  <!-- Option end -->
82
  </div>
83
  </div>
84
  <div class="wpd-opt-doc">
85
+ <?php $this->printDocLink($setting["options"]["enableMemberConfirm"]["docurl"]) ?>
86
  </div>
87
  </div>
88
  <!-- Option end -->
100
  </div>
101
  </div>
102
  <div class="wpd-opt-doc">
103
+ <?php $this->printDocLink($setting["options"]["enableGuestsConfirm"]["docurl"]) ?>
104
  </div>
105
  </div>
106
  <!-- Option end -->
129
  </div>
130
  </div>
131
  <div class="wpd-opt-doc">
132
+ <?php $this->printDocLink($setting["options"]["subscriptionType"]["docurl"]) ?>
133
  </div>
134
  </div>
135
  <!-- Option end -->
147
  </div>
148
  </div>
149
  <div class="wpd-opt-doc">
150
+ <?php $this->printDocLink($setting["options"]["showReplyCheckbox"]["docurl"]) ?>
151
  </div>
152
  </div>
153
  <!-- Option end -->
164
  <label for="isReplyDefaultChecked"></label>
165
  </div>
166
  </div>
167
+ <div class="wpd-opt-doc">
168
+ <?php $this->printDocLink($setting["options"]["isReplyDefaultChecked"]["docurl"]) ?>
169
+ </div>
170
  </div>
171
  <!-- Option end -->
172
 
184
  </div>
185
  </div>
186
  <div class="wpd-opt-doc">
187
+ <?php $this->printDocLink($setting["options"]["usePostmaticForCommentNotification"]["docurl"]) ?>
188
  </div>
189
  </div>
190
  <!-- Option end -->
203
  </div>
204
  </div>
205
  <div class="wpd-opt-doc">
206
+ <?php $this->printDocLink($setting["options"]["isFollowActive"]["docurl"]) ?>
207
  </div>
208
  </div>
209
  <!-- Option end -->
221
  </div>
222
  </div>
223
  <div class="wpd-opt-doc">
224
+ <?php $this->printDocLink($setting["options"]["disableFollowConfirmForUsers"]["docurl"]) ?>
225
  </div>
226
  </div>
227
  <!-- Option end -->
options/options-layouts/html-thread_display.php CHANGED
@@ -39,7 +39,7 @@ if (!defined("ABSPATH")) {
39
  </div>
40
  </div>
41
  <div class="wpd-opt-doc">
42
- <a href="<?php echo esc_url_raw($setting["options"]["firstLoadWithAjax"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
43
  </div>
44
  </div>
45
  <!-- Option end -->
@@ -75,7 +75,7 @@ if (!defined("ABSPATH")) {
75
  </fieldset>
76
  </div>
77
  <div class="wpd-opt-doc">
78
- <a href="<?php echo esc_url_raw($setting["options"]["commentListLoadType"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
79
  </div>
80
  </div>
81
  <!-- Option end -->
@@ -93,7 +93,7 @@ if (!defined("ABSPATH")) {
93
  </div>
94
  </div>
95
  <div class="wpd-opt-doc">
96
- <a href="<?php echo esc_url_raw($setting["options"]["isLoadOnlyParentComments"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
97
  </div>
98
  </div>
99
  <!-- Option end -->
@@ -111,7 +111,7 @@ if (!defined("ABSPATH")) {
111
  </div>
112
  </div>
113
  <div class="wpd-opt-doc">
114
- <a href="<?php echo esc_url_raw($setting["options"]["showReactedFilterButton"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
115
  </div>
116
  </div>
117
  <!-- Option end -->
@@ -129,7 +129,7 @@ if (!defined("ABSPATH")) {
129
  </div>
130
  </div>
131
  <div class="wpd-opt-doc">
132
- <a href="<?php echo esc_url_raw($setting["options"]["showHottestFilterButton"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
133
  </div>
134
  </div>
135
  <!-- Option end -->
@@ -147,7 +147,7 @@ if (!defined("ABSPATH")) {
147
  </div>
148
  </div>
149
  <div class="wpd-opt-doc">
150
- <a href="<?php echo esc_url_raw($setting["options"]["showSortingButtons"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
151
  </div>
152
  </div>
153
  <!-- Option end -->
@@ -165,7 +165,7 @@ if (!defined("ABSPATH")) {
165
  </div>
166
  </div>
167
  <div class="wpd-opt-doc">
168
- <a href="<?php echo esc_url_raw($setting["options"]["mostVotedByDefault"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
169
  </div>
170
  </div>
171
  <!-- Option end -->
@@ -183,7 +183,7 @@ if (!defined("ABSPATH")) {
183
  </div>
184
  </div>
185
  <div class="wpd-opt-doc">
186
- <a href="<?php echo esc_url_raw($setting["options"]["reverseChildren"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
187
  </div>
188
  </div>
189
  <!-- Option end -->
@@ -201,7 +201,7 @@ if (!defined("ABSPATH")) {
201
  </div>
202
  </div>
203
  <div class="wpd-opt-doc">
204
- <a href="<?php echo esc_url_raw($setting["options"]["highlightUnreadComments"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
205
  </div>
206
  </div>
207
  <!-- Option end -->
@@ -219,7 +219,27 @@ if (!defined("ABSPATH")) {
219
  </div>
220
  </div>
221
  <div class="wpd-opt-doc">
222
- <a href="<?php echo esc_url_raw($setting["options"]["scrollToComment"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
223
  </div>
224
  </div>
225
  <!-- Option end -->
39
  </div>
40
  </div>
41
  <div class="wpd-opt-doc">
42
+ <?php $this->printDocLink($setting["options"]["firstLoadWithAjax"]["docurl"]) ?>
43
  </div>
44
  </div>
45
  <!-- Option end -->
75
  </fieldset>
76
  </div>
77
  <div class="wpd-opt-doc">
78
+ <?php $this->printDocLink($setting["options"]["commentListLoadType"]["docurl"]) ?>
79
  </div>
80
  </div>
81
  <!-- Option end -->
93
  </div>
94
  </div>
95
  <div class="wpd-opt-doc">
96
+ <?php $this->printDocLink($setting["options"]["isLoadOnlyParentComments"]["docurl"]) ?>
97
  </div>
98
  </div>
99
  <!-- Option end -->
111
  </div>
112
  </div>
113
  <div class="wpd-opt-doc">
114
+ <?php $this->printDocLink($setting["options"]["showReactedFilterButton"]["docurl"]) ?>
115
  </div>
116
  </div>
117
  <!-- Option end -->
129
  </div>
130
  </div>
131
  <div class="wpd-opt-doc">
132
+ <?php $this->printDocLink($setting["options"]["showHottestFilterButton"]["docurl"]) ?>
133
  </div>
134
  </div>
135
  <!-- Option end -->
147
  </div>
148
  </div>
149
  <div class="wpd-opt-doc">
150
+ <?php $this->printDocLink($setting["options"]["showSortingButtons"]["docurl"]) ?>
151
  </div>
152
  </div>
153
  <!-- Option end -->
165
  </div>
166
  </div>
167
  <div class="wpd-opt-doc">
168
+ <?php $this->printDocLink($setting["options"]["mostVotedByDefault"]["docurl"]) ?>
169
  </div>
170
  </div>
171
  <!-- Option end -->
183
  </div>
184
  </div>
185
  <div class="wpd-opt-doc">
186
+ <?php $this->printDocLink($setting["options"]["reverseChildren"]["docurl"]) ?>
187
  </div>
188
  </div>
189
  <!-- Option end -->
201
  </div>
202
  </div>
203
  <div class="wpd-opt-doc">
204
+ <?php $this->printDocLink($setting["options"]["highlightUnreadComments"]["docurl"]) ?>
205
  </div>
206
  </div>
207
  <!-- Option end -->
219
  </div>
220
  </div>
221
  <div class="wpd-opt-doc">
222
+ <?php $this->printDocLink($setting["options"]["scrollToComment"]["docurl"]) ?>
223
+ </div>
224
+ </div>
225
+ <!-- Option end -->
226
+
227
+ <!-- Option start -->
228
+ <div class="wpd-opt-row" data-wpd-opt="orderCommentsBy">
229
+ <div class="wpd-opt-name">
230
+ <label for="orderCommentsBy"><?php echo esc_html($setting["options"]["orderCommentsBy"]["label"]) ?></label>
231
+ <p class="wpd-desc"><?php echo $setting["options"]["orderCommentsBy"]["description"] ?></p>
232
+ </div>
233
+ <div class="wpd-opt-input">
234
+ <div class="wpd-switch-field">
235
+ <input type="radio" value="comment_ID" <?php checked("comment_ID" === $this->thread_display["orderCommentsBy"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[orderCommentsBy]" id="orderCommentsById" />
236
+ <label for="orderCommentsById" style="min-width:60px;"><?php esc_html_e("ID", "wpdiscuz"); ?></label>
237
+ <input type="radio" value="comment_date_gmt" <?php checked("comment_date_gmt" === $this->thread_display["orderCommentsBy"]); ?> name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_DISPLAY); ?>[orderCommentsBy]" id="orderCommentsByDate" />
238
+ <label for="orderCommentsByDate" style="min-width:60px;"><?php esc_html_e("Date", "wpdiscuz"); ?></label>
239
+ </div>
240
+ </div>
241
+ <div class="wpd-opt-doc">
242
+ <?php $this->printDocLink($setting["options"]["orderCommentsBy"]["docurl"]) ?>
243
  </div>
244
  </div>
245
  <!-- Option end -->
options/options-layouts/html-thread_layouts.php CHANGED
@@ -52,7 +52,7 @@ if (!defined("ABSPATH")) {
52
  </div>
53
  </div>
54
  <div class="wpd-opt-doc">
55
- <a href="<?php echo esc_url_raw($setting["options"]["showAvatars"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
56
  </div>
57
  </div>
58
  <!-- Option end -->
@@ -67,7 +67,7 @@ if (!defined("ABSPATH")) {
67
  <input type="url" value="<?php echo esc_attr($this->thread_layouts["defaultAvatarUrlForUser"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_LAYOUTS); ?>[defaultAvatarUrlForUser]" id="defaultAvatarUrlForUser" />
68
  </div>
69
  <div class="wpd-opt-doc">
70
- <a href="<?php echo esc_url_raw($setting["options"]["defaultAvatarUrlForUser"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
71
  </div>
72
  </div>
73
  <!-- Option end -->
@@ -82,7 +82,7 @@ if (!defined("ABSPATH")) {
82
  <input type="url" value="<?php echo esc_attr($this->thread_layouts["defaultAvatarUrlForGuest"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_LAYOUTS); ?>[defaultAvatarUrlForGuest]" id="defaultAvatarUrlForGuest" />
83
  </div>
84
  <div class="wpd-opt-doc">
85
- <a href="<?php echo esc_url_raw($setting["options"]["defaultAvatarUrlForGuest"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
86
  </div>
87
  </div>
88
  <!-- Option end -->
@@ -100,7 +100,7 @@ if (!defined("ABSPATH")) {
100
  </div>
101
  </div>
102
  <div class="wpd-opt-doc">
103
- <a href="<?php echo esc_url_raw($setting["options"]["changeAvatarsEverywhere"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
104
  </div>
105
  </div>
106
  <!-- Option end -->
@@ -122,7 +122,7 @@ if (!defined("ABSPATH")) {
122
  </div>
123
  </div>
124
  <div class="wpd-opt-doc">
125
- <a href="<?php echo esc_url_raw($setting["options"]["showVotingButtons"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
126
  </div>
127
  </div>
128
  <!-- Option end -->
@@ -146,7 +146,7 @@ if (!defined("ABSPATH")) {
146
  </div>
147
  </div>
148
  <div class="wpd-opt-doc">
149
- <a href="<?php echo esc_url_raw($setting["options"]["votingButtonsIcon"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
150
  </div>
151
  </div>
152
  <!-- Option end -->
@@ -164,7 +164,7 @@ if (!defined("ABSPATH")) {
164
  </div>
165
  </div>
166
  <div class="wpd-opt-doc">
167
- <a href="<?php echo esc_url_raw($setting["options"]["votingButtonsStyle"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
168
  </div>
169
  </div>
170
  <!-- Option end -->
@@ -182,7 +182,7 @@ if (!defined("ABSPATH")) {
182
  </div>
183
  </div>
184
  <div class="wpd-opt-doc">
185
- <a href="<?php echo esc_url_raw($setting["options"]["enableDislikeButton"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
186
  </div>
187
  </div>
188
  <!-- Option end -->
@@ -200,7 +200,7 @@ if (!defined("ABSPATH")) {
200
  </div>
201
  </div>
202
  <div class="wpd-opt-doc">
203
- <a href="<?php echo esc_url_raw($setting["options"]["isGuestCanVote"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
204
  </div>
205
  </div>
206
  <!-- Option end -->
@@ -218,7 +218,7 @@ if (!defined("ABSPATH")) {
218
  </div>
219
  </div>
220
  <div class="wpd-opt-doc">
221
- <a href="<?php echo esc_url_raw($setting["options"]["highlightVotingButtons"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
222
  </div>
223
  </div>
224
  <!-- Option end -->
@@ -241,7 +241,7 @@ if (!defined("ABSPATH")) {
241
  </div>
242
  </div>
243
  <div class="wpd-opt-doc">
244
- <a href="<?php echo esc_url_raw($setting["options"]["showCommentLink"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
245
  </div>
246
  </div>
247
  <!-- Option end -->
@@ -258,6 +258,8 @@ if (!defined("ABSPATH")) {
258
  <label for="showCommentDate"></label>
259
  </div>
260
  </div>
261
- <div class="wpd-opt-doc"></div>
 
 
262
  </div>
263
  <!-- Option end -->
52
  </div>
53
  </div>
54
  <div class="wpd-opt-doc">
55
+ <?php $this->printDocLink($setting["options"]["showAvatars"]["docurl"]) ?>
56
  </div>
57
  </div>
58
  <!-- Option end -->
67
  <input type="url" value="<?php echo esc_attr($this->thread_layouts["defaultAvatarUrlForUser"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_LAYOUTS); ?>[defaultAvatarUrlForUser]" id="defaultAvatarUrlForUser" />
68
  </div>
69
  <div class="wpd-opt-doc">
70
+ <?php $this->printDocLink($setting["options"]["defaultAvatarUrlForUser"]["docurl"]) ?>
71
  </div>
72
  </div>
73
  <!-- Option end -->
82
  <input type="url" value="<?php echo esc_attr($this->thread_layouts["defaultAvatarUrlForGuest"]); ?>" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_LAYOUTS); ?>[defaultAvatarUrlForGuest]" id="defaultAvatarUrlForGuest" />
83
  </div>
84
  <div class="wpd-opt-doc">
85
+ <?php $this->printDocLink($setting["options"]["defaultAvatarUrlForGuest"]["docurl"]) ?>
86
  </div>
87
  </div>
88
  <!-- Option end -->
100
  </div>
101
  </div>
102
  <div class="wpd-opt-doc">
103
+ <?php $this->printDocLink($setting["options"]["changeAvatarsEverywhere"]["docurl"]) ?>
104
  </div>
105
  </div>
106
  <!-- Option end -->
122
  </div>
123
  </div>
124
  <div class="wpd-opt-doc">
125
+ <?php $this->printDocLink($setting["options"]["showVotingButtons"]["docurl"]) ?>
126
  </div>
127
  </div>
128
  <!-- Option end -->
146
  </div>
147
  </div>
148
  <div class="wpd-opt-doc">
149
+ <?php $this->printDocLink($setting["options"]["votingButtonsIcon"]["docurl"]) ?>
150
  </div>
151
  </div>
152
  <!-- Option end -->
164
  </div>
165
  </div>
166
  <div class="wpd-opt-doc">
167
+ <?php $this->printDocLink($setting["options"]["votingButtonsStyle"]["docurl"]) ?>
168
  </div>
169
  </div>
170
  <!-- Option end -->
182
  </div>
183
  </div>
184
  <div class="wpd-opt-doc">
185
+ <?php $this->printDocLink($setting["options"]["enableDislikeButton"]["docurl"]) ?>
186
  </div>
187
  </div>
188
  <!-- Option end -->
200
  </div>
201
  </div>
202
  <div class="wpd-opt-doc">
203
+ <?php $this->printDocLink($setting["options"]["isGuestCanVote"]["docurl"]) ?>
204
  </div>
205
  </div>
206
  <!-- Option end -->
218
  </div>
219
  </div>
220
  <div class="wpd-opt-doc">
221
+ <?php $this->printDocLink($setting["options"]["highlightVotingButtons"]["docurl"]) ?>
222
  </div>
223
  </div>
224
  <!-- Option end -->
241
  </div>
242
  </div>
243
  <div class="wpd-opt-doc">
244
+ <?php $this->printDocLink($setting["options"]["showCommentLink"]["docurl"]) ?>
245
  </div>
246
  </div>
247
  <!-- Option end -->
258
  <label for="showCommentDate"></label>
259
  </div>
260
  </div>
261
+ <div class="wpd-opt-doc">
262
+ <?php $this->printDocLink($setting["options"]["showCommentDate"]["docurl"]) ?>
263
+ </div>
264
  </div>
265
  <!-- Option end -->
options/options-layouts/html-thread_styles.php CHANGED
@@ -29,7 +29,7 @@ if (!defined("ABSPATH")) {
29
  </div>
30
  </div>
31
  <div class="wpd-opt-doc">
32
- <a href="<?php echo esc_url_raw($setting["options"]["theme"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
33
  </div>
34
  </div>
35
  <!-- Option end -->
@@ -96,7 +96,7 @@ if (!defined("ABSPATH")) {
96
  <div style="clear: both"></div>
97
  </div>
98
  <div class="wpd-opt-doc" style="padding-top: 36px;">
99
- <a href="<?php echo esc_url_raw($setting["options"]["styleSpecificColors"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
100
  </div>
101
  </div>
102
  <!-- Option end -->
@@ -134,7 +134,7 @@ if (!defined("ABSPATH")) {
134
  <div style="clear: both"></div>
135
  </div>
136
  <div class="wpd-opt-doc" style="padding-top: 36px;">
137
- <a href="<?php echo esc_url_raw($setting["options"]["colors"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
138
  </div>
139
  </div>
140
  <!-- Option end -->
@@ -156,7 +156,7 @@ if (!defined("ABSPATH")) {
156
  </div>
157
  </div>
158
  <div class="wpd-opt-doc">
159
- <a href="<?php echo esc_url_raw($setting["options"]["enableFontAwesome"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
160
  </div>
161
  </div>
162
  <!-- Option end -->
@@ -171,7 +171,7 @@ if (!defined("ABSPATH")) {
171
  <textarea class="regular-text" id="customCss" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_STYLES); ?>[customCss]" placeholder="" style="width: 90%; height: 100px; color: #333333; font-family: 'Courier New', Courier, monospace; background: #f5f5f5;direction:ltr;text-align:left;"><?php echo stripslashes($this->thread_styles["customCss"]); ?></textarea>
172
  </div>
173
  <div class="wpd-opt-doc">
174
- <a href="<?php echo esc_url_raw($setting["options"]["customCss"]["docurl"]) ?>" title="<?php esc_attr_e("Read the documentation", "wpdiscuz") ?>" target="_blank"><i class="far fa-question-circle"></i></a>
175
  </div>
176
  </div>
177
  <!-- Option end -->
29
  </div>
30
  </div>
31
  <div class="wpd-opt-doc">
32
+ <?php $this->printDocLink($setting["options"]["theme"]["docurl"]) ?>
33
  </div>
34
  </div>
35
  <!-- Option end -->
96
  <div style="clear: both"></div>
97
  </div>
98
  <div class="wpd-opt-doc" style="padding-top: 36px;">
99
+ <?php $this->printDocLink($setting["options"]["styleSpecificColors"]["docurl"]) ?>
100
  </div>
101
  </div>
102
  <!-- Option end -->
134
  <div style="clear: both"></div>
135
  </div>
136
  <div class="wpd-opt-doc" style="padding-top: 36px;">
137
+ <?php $this->printDocLink($setting["options"]["colors"]["docurl"]) ?>
138
  </div>
139
  </div>
140
  <!-- Option end -->
156
  </div>
157
  </div>
158
  <div class="wpd-opt-doc">
159
+ <?php $this->printDocLink($setting["options"]["enableFontAwesome"]["docurl"]) ?>
160
  </div>
161
  </div>
162
  <!-- Option end -->
171
  <textarea class="regular-text" id="customCss" name="<?php echo esc_attr(WpdiscuzCore::TAB_THREAD_STYLES); ?>[customCss]" placeholder="" style="width: 90%; height: 100px; color: #333333; font-family: 'Courier New', Courier, monospace; background: #f5f5f5;direction:ltr;text-align:left;"><?php echo stripslashes($this->thread_styles["customCss"]); ?></textarea>
172
  </div>
173
  <div class="wpd-opt-doc">
174
+ <?php $this->printDocLink($setting["options"]["customCss"]["docurl"]) ?>
175
  </div>
176
  </div>
177
  <!-- Option end -->
options/phrases-layouts/phrases-email.php CHANGED
@@ -25,6 +25,7 @@ if (!defined("ABSPATH")) {
25
  <div class="wc_available_variables">
26
  <div class="wc_available_variable">[BLOG_TITLE]</div>
27
  <div class="wc_available_variable">[POST_TITLE]</div>
 
28
  </div>
29
  </th>
30
  <td colspan="3"><input type="text" value="<?php echo esc_attr($this->phrases["wc_email_subject"]); ?>" name="wc_email_subject" id="wc_email_subject" /></td>
@@ -57,6 +58,7 @@ if (!defined("ABSPATH")) {
57
  <div class="wc_available_variables">
58
  <div class="wc_available_variable">[BLOG_TITLE]</div>
59
  <div class="wc_available_variable">[POST_TITLE]</div>
 
60
  </div>
61
  </th>
62
  <td colspan="3"><input type="text" value="<?php echo esc_attr($this->phrases["wc_all_comment_new_reply_subject"]); ?>" name="wc_all_comment_new_reply_subject" id="wc_all_comment_new_reply_subject" /></td>
@@ -89,6 +91,7 @@ if (!defined("ABSPATH")) {
89
  <div class="wc_available_variables">
90
  <div class="wc_available_variable">[BLOG_TITLE]</div>
91
  <div class="wc_available_variable">[POST_TITLE]</div>
 
92
  </div>
93
  </th>
94
  <td colspan="3"><input type="text" value="<?php echo esc_attr($this->phrases["wc_new_reply_email_subject"]); ?>" name="wc_new_reply_email_subject" id="wc_new_reply_email_subject" /></td>
@@ -146,6 +149,7 @@ if (!defined("ABSPATH")) {
146
  <div class="wc_available_variables">
147
  <div class="wc_available_variable">[BLOG_TITLE]</div>
148
  <div class="wc_available_variable">[POST_TITLE]</div>
 
149
  </div>
150
  </th>
151
  <td colspan="3"><input type="text" name="wc_comment_approved_email_subject" id="wc_comment_approved_email_subject" value="<?php echo esc_attr($this->phrases["wc_comment_approved_email_subject"]); ?>" /></td>
25
  <div class="wc_available_variables">
26
  <div class="wc_available_variable">[BLOG_TITLE]</div>
27
  <div class="wc_available_variable">[POST_TITLE]</div>
28
+ <div class="wc_available_variable">[COMMENT_AUTHOR]</div>
29
  </div>
30
  </th>
31
  <td colspan="3"><input type="text" value="<?php echo esc_attr($this->phrases["wc_email_subject"]); ?>" name="wc_email_subject" id="wc_email_subject" /></td>
58
  <div class="wc_available_variables">
59
  <div class="wc_available_variable">[BLOG_TITLE]</div>
60
  <div class="wc_available_variable">[POST_TITLE]</div>
61
+ <div class="wc_available_variable">[COMMENT_AUTHOR]</div>
62
  </div>
63
  </th>
64
  <td colspan="3"><input type="text" value="<?php echo esc_attr($this->phrases["wc_all_comment_new_reply_subject"]); ?>" name="wc_all_comment_new_reply_subject" id="wc_all_comment_new_reply_subject" /></td>
91
  <div class="wc_available_variables">
92
  <div class="wc_available_variable">[BLOG_TITLE]</div>
93
  <div class="wc_available_variable">[POST_TITLE]</div>
94
+ <div class="wc_available_variable">[COMMENT_AUTHOR]</div>
95
  </div>
96
  </th>
97
  <td colspan="3"><input type="text" value="<?php echo esc_attr($this->phrases["wc_new_reply_email_subject"]); ?>" name="wc_new_reply_email_subject" id="wc_new_reply_email_subject" /></td>
149
  <div class="wc_available_variables">
150
  <div class="wc_available_variable">[BLOG_TITLE]</div>
151
  <div class="wc_available_variable">[POST_TITLE]</div>
152
+ <div class="wc_available_variable">[COMMENT_AUTHOR]</div>
153
  </div>
154
  </th>
155
  <td colspan="3"><input type="text" name="wc_comment_approved_email_subject" id="wc_comment_approved_email_subject" value="<?php echo esc_attr($this->phrases["wc_comment_approved_email_subject"]); ?>" /></td>
options/phrases-layouts/phrases-follow.php CHANGED
@@ -85,6 +85,7 @@ if (!defined("ABSPATH")) {
85
  <div class="wc_available_variables">
86
  <div class="wc_available_variable">[BLOG_TITLE]</div>
87
  <div class="wc_available_variable">[POST_TITLE]</div>
 
88
  </div>
89
  </th>
90
  <td colspan="3"><input type="text" name="wc_follow_email_subject" id="wc_follow_email_subject" value="<?php echo esc_attr($this->phrases["wc_follow_email_subject"]); ?>" /></td>
85
  <div class="wc_available_variables">
86
  <div class="wc_available_variable">[BLOG_TITLE]</div>
87
  <div class="wc_available_variable">[POST_TITLE]</div>
88
+ <div class="wc_available_variable">[COMMENT_AUTHOR]</div>
89
  </div>
90
  </th>
91
  <td colspan="3"><input type="text" name="wc_follow_email_subject" id="wc_follow_email_subject" value="<?php echo esc_attr($this->phrases["wc_follow_email_subject"]); ?>" /></td>
options/tools-layouts/tool-images.php CHANGED
@@ -2,20 +2,50 @@
2
  if (!defined("ABSPATH")) {
3
  exit();
4
  }
5
- $commentsCount = get_comments(
6
- [
7
- "count" => true,
8
- "meta_query" => [
9
- [
10
- "key" => "comment_image_reloaded",
11
- "value" => "",
12
- "compare" => "!="
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  ]
14
  ]
15
- ]
16
- );
17
- $curImagesCount = intval($commentsCount);
18
- $disabled = $curImagesCount ? "" : "disabled='disabled'";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  ?>
20
  <div class="wpdtool-accordion-item">
21
 
@@ -24,22 +54,43 @@ $disabled = $curImagesCount ? "" : "disabled='disabled'";
24
  </div>
25
 
26
  <div class="wpdtool-accordion-content">
 
 
 
 
 
27
 
28
  <div class="wpdtool wpdtool-import-cir-images">
29
- <p class="wpdtool-desc"><?php esc_html_e("Using this tool you can import comments' images from other plugins to wpDiscuz.", "wpdiscuz"); ?></p>
30
  <form action="" method="post" class="wc-tools-settings-form wc-form">
31
  <?php wp_nonce_field("wc_tools_form", "wpd-cir-images"); ?>
32
  <div class="wpdtool-block">
33
- <button type="submit" class="button button-secondary import-cir" <?php echo $disabled; ?> title="<?php esc_attr_e('Import images from "Comment Images Reloaded"', "wpdiscuz"); ?>">
34
- <?php esc_html_e('Import images from "Comment Images Reloaded" plugin', "wpdiscuz"); ?>&nbsp;
35
  <i class="fas wc-hidden"></i>
36
  </button>
37
- <span class="import-progress">&nbsp;</span>
38
- <input type="hidden" name="cir-images-count" value="<?php echo esc_attr($curImagesCount); ?>" class="cir-images-count" />
39
  <input type="hidden" name="cir-step" value="0" class="cir-step"/>
40
  </div>
41
  </form>
42
  </div>
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  </div>
45
  </div>
2
  if (!defined("ABSPATH")) {
3
  exit();
4
  }
5
+
6
+ $wmuIsActive = apply_filters("wpdiscuz_mu_isactive", false);
7
+
8
+ $cirComments = [];
9
+ $cirImagesCount = 0;
10
+ $cirDisabled = "disabled";
11
+ $dcoComments = [];
12
+ $dcoImagesCount = 0;
13
+ $dcoDisabled = "disabled";
14
+
15
+ if ($wmuIsActive) {
16
+
17
+ /* ===== Comment Images Reloaded ===== */
18
+ $cirComments = get_comments(
19
+ [
20
+ "count" => true,
21
+ "meta_query" => [
22
+ [
23
+ "key" => "comment_image_reloaded",
24
+ "value" => "",
25
+ "compare" => "!="
26
+ ]
27
  ]
28
  ]
29
+ );
30
+ $cirImagesCount = intval($cirComments);
31
+ $cirDisabled = $cirImagesCount ? "" : "disabled";
32
+
33
+ /* ===== DCO Comment Attachment ===== */
34
+ $dcoComments = get_comments(
35
+ [
36
+ "count" => true,
37
+ "meta_query" => [
38
+ [
39
+ "key" => "attachment_id",
40
+ "value" => "",
41
+ "compare" => "!="
42
+ ]
43
+ ]
44
+ ]
45
+ );
46
+ $dcoImagesCount = intval($dcoComments);
47
+ $dcoDisabled = $dcoImagesCount ? "" : "disabled='disabled'";
48
+ }
49
  ?>
50
  <div class="wpdtool-accordion-item">
51
 
54
  </div>
55
 
56
  <div class="wpdtool-accordion-content">
57
+ <?php if (!$wmuIsActive) { ?>
58
+ <div class="wpdtool wpdtool-import-cir-images">
59
+ <p class="wpdtool-desc"><?php _e("These tools are available only in <a href='https://gvectors.com/product/wpdiscuz-media-uploader/'><strong><i>wpDiscuz Media Uploader</i></strong></a> addon! Please install and activate it to use importer!", "wpdiscuz"); ?></p>
60
+ </div>
61
+ <?php } ?>
62
 
63
  <div class="wpdtool wpdtool-import-cir-images">
64
+ <p class="wpdtool-desc"><?php _e("Here you can import comments' images from <strong><i>Comment Images Reloaded</i></strong> plugin to wpDiscuz.", "wpdiscuz"); ?></p>
65
  <form action="" method="post" class="wc-tools-settings-form wc-form">
66
  <?php wp_nonce_field("wc_tools_form", "wpd-cir-images"); ?>
67
  <div class="wpdtool-block">
68
+ <button type="submit" class="button button-secondary import-cir" <?php echo $cirDisabled; ?>>
69
+ <?php esc_html_e("Import images", "wpdiscuz"); ?>&nbsp;
70
  <i class="fas wc-hidden"></i>
71
  </button>
72
+ <span class="cir-import-progress">&nbsp;</span>
73
+ <input type="hidden" name="cir-images-count" value="<?php echo esc_attr($cirImagesCount); ?>" class="cir-images-count" />
74
  <input type="hidden" name="cir-step" value="0" class="cir-step"/>
75
  </div>
76
  </form>
77
  </div>
78
 
79
+ <div class="wpdtool wpdtool-import-dco-images">
80
+ <p class="wpdtool-desc"><?php _e("Here you can import comments' images from <strong><i>DCO Comment Attachment</i></strong> plugin to wpDiscuz.", "wpdiscuz"); ?></p>
81
+ <form action="" method="post" class="wc-tools-settings-form wc-form">
82
+ <?php wp_nonce_field("wc_tools_form", "wpd-dco-images"); ?>
83
+ <div class="wpdtool-block">
84
+ <button type="submit" class="button button-secondary import-dco" <?php echo $dcoDisabled; ?>>
85
+ <?php esc_html_e("Import images", "wpdiscuz"); ?>&nbsp;
86
+ <i class="fas wc-hidden"></i>
87
+ </button>
88
+ <span class="dco-import-progress">&nbsp;</span>
89
+ <input type="hidden" name="dco-images-count" value="<?php echo esc_attr($dcoImagesCount); ?>" class="dco-images-count" />
90
+ <input type="hidden" name="dco-step" value="0" class="dco-step"/>
91
+ </div>
92
+ </form>
93
+ </div>
94
+
95
  </div>
96
  </div>
options/tools-layouts/tool-subscriptions.php CHANGED
@@ -3,7 +3,11 @@ if (!defined("ABSPATH")) {
3
  exit();
4
  }
5
  $stcrSubscriptionsCount = intval($this->dbManager->getStcrAllSubscriptions());
6
- $disabledSubscriptions = $stcrSubscriptionsCount ? "" : "disabled='disabled'";
 
 
 
 
7
  ?>
8
  <div class="wpdtool-accordion-item">
9
 
@@ -13,21 +17,37 @@ $disabledSubscriptions = $stcrSubscriptionsCount ? "" : "disabled='disabled'";
13
 
14
  <div class="wpdtool-accordion-content">
15
 
16
- <div class="wpdtool wpdtool-import-subscriptions">
17
- <p class="wpdtool-desc"><?php esc_html_e("Using this tool you can import subscriptions from other plugins to wpDiscuz.", "wpdiscuz"); ?></p>
18
  <form action="" method="post" class="wc-tools-settings-form wc-form">
19
  <?php wp_nonce_field("wc_tools_form", "wpd-stcr-subscriptions"); ?>
20
  <div class="wpdtool-block">
21
- <button type="submit" class="button button-secondary import-stcr" <?php echo $disabledSubscriptions; ?> title="<?php esc_attr_e("Import subscriptions from Subscribe To Comments Reloaded", "wpdiscuz"); ?>">
22
- <?php esc_html_e('Import subscriptions from "Subscribe To Comments Reloaded" plugin', "wpdiscuz"); ?>&nbsp;
23
  <i class="fas wc-hidden"></i>
24
  </button>
25
- <span class="import-progress">&nbsp;</span>
26
  <input type="hidden" name="stcr-subscriptions-count" value="<?php echo esc_attr($stcrSubscriptionsCount); ?>" class="stcr-subscriptions-count" />
27
  <input type="hidden" name="stcr-step" value="0" class="stcr-step"/>
28
  </div>
29
  </form>
30
  </div>
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  </div>
33
  </div>
3
  exit();
4
  }
5
  $stcrSubscriptionsCount = intval($this->dbManager->getStcrAllSubscriptions());
6
+ $stcrDisabled = $stcrSubscriptionsCount ? "" : "disabled='disabled'";
7
+
8
+ $isLstcExists = $this->dbManager->isTableExists("comment_notifier", false);
9
+ $lstcSubscriptionsCount = $isLstcExists ? intval($this->dbManager->getLstcAllSubscriptions()) : false;
10
+ $lstcDisabled = $lstcSubscriptionsCount ? "" : "disabled='disabled'";
11
  ?>
12
  <div class="wpdtool-accordion-item">
13
 
17
 
18
  <div class="wpdtool-accordion-content">
19
 
20
+ <div class="wpdtool wpdtool-import-stcr-subscriptions">
21
+ <p class="wpdtool-desc"><?php _e("Here you can import subscriptions from <strong><i>Subscribe To Comments Reloaded</i></strong> plugin to wpDiscuz.", "wpdiscuz"); ?></p>
22
  <form action="" method="post" class="wc-tools-settings-form wc-form">
23
  <?php wp_nonce_field("wc_tools_form", "wpd-stcr-subscriptions"); ?>
24
  <div class="wpdtool-block">
25
+ <button type="submit" class="button button-secondary import-stcr" <?php echo $stcrDisabled; ?>>
26
+ <?php esc_html_e('Import subscriptions', "wpdiscuz"); ?>&nbsp;
27
  <i class="fas wc-hidden"></i>
28
  </button>
29
+ <span class="stcr-import-progress">&nbsp;</span>
30
  <input type="hidden" name="stcr-subscriptions-count" value="<?php echo esc_attr($stcrSubscriptionsCount); ?>" class="stcr-subscriptions-count" />
31
  <input type="hidden" name="stcr-step" value="0" class="stcr-step"/>
32
  </div>
33
  </form>
34
  </div>
35
 
36
+ <div class="wpdtool wpdtool-import-lstc-subscriptions">
37
+ <p class="wpdtool-desc"><?php _e("Here you can import subscriptions from <strong><i>Lightweight Subscribe To Comments</i></strong> plugin to wpDiscuz.", "wpdiscuz"); ?></p>
38
+ <form action="" method="post" class="wc-tools-settings-form wc-form">
39
+ <?php wp_nonce_field("wc_tools_form", "wpd-lstc-subscriptions"); ?>
40
+ <div class="wpdtool-block">
41
+ <button type="submit" class="button button-secondary import-lstc" <?php echo $lstcDisabled; ?>>
42
+ <?php esc_html_e('Import subscriptions', "wpdiscuz"); ?>&nbsp;
43
+ <i class="fas wc-hidden"></i>
44
+ </button>
45
+ <span class="lstc-import-progress">&nbsp;</span>
46
+ <input type="hidden" name="lstc-subscriptions-count" value="<?php echo esc_attr($lstcSubscriptionsCount); ?>" class="lstc-subscriptions-count" />
47
+ <input type="hidden" name="lstc-step" value="0" class="lstc-step"/>
48
+ </div>
49
+ </form>
50
+ </div>
51
+
52
  </div>
53
  </div>
options/tools-layouts_old/fix-tables.php DELETED
@@ -1,24 +0,0 @@
1
- <?php
2
- if (!defined("ABSPATH")) {
3
- exit();
4
- }
5
- ?>
6
- <div>
7
- <h2 style="padding:5px 10px 10px 10px; margin:0px;"><?php esc_html_e("Fix Tables", "wpdiscuz"); ?></h2>
8
- <form action="" method="post" class="wc-tools-settings-form wc-form">
9
- <?php wp_nonce_field("wc_tools_form", "wpd-fix-tables"); ?>
10
- <table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
11
- <tbody>
12
- <tr>
13
- <td>
14
- <button type="submit" class="button button-secondary fix-tables" title="<?php esc_attr_e("Fix Tables", "wpdiscuz"); ?>">
15
- <?php esc_html_e("Fix Tables", "wpdiscuz"); ?>&nbsp;
16
- <i class="fas wc-hidden"></i>
17
- </button>
18
- <span class="fix-tables-import-progress"></span>
19
- </td>
20
- </tr>
21
- </tbody>
22
- </table>
23
- </form>
24
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
options/tools-layouts_old/images-import.php DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
- if (!defined("ABSPATH")) {
3
- exit();
4
- }
5
- $commentsCount = get_comments(
6
- [
7
- "count" => true,
8
- //"fields" => "ids",
9
- //"orderby" => "comment_date",
10
- //"order" => "asc",
11
- "meta_query" => [
12
- [
13
- "key" => "comment_image_reloaded",
14
- "value" => "",
15
- "compare" => "!="
16
- ]
17
- ]
18
- ]
19
- );
20
- $curImagesCount = intval($commentsCount);
21
- $disabled = $curImagesCount ? "" : "disabled='disabled'";
22
- ?>
23
- <div>
24
- <h2 style="padding:5px 10px 10px 10px; margin:0px;"><?php esc_html_e("Import images", "wpdiscuz"); ?></h2>
25
- <p style="font-size:13px; color:#999999; width:90%; padding-left:0px; margin-left:10px;">
26
- <?php esc_html_e("Using this tool you can import subscriptions from other plugins to wpDiscuz.", "wpdiscuz"); ?>
27
- </p>
28
- <form action="" method="post" class="wc-tools-settings-form wc-form">
29
- <?php wp_nonce_field("wc_tools_form", "wpd-cir-images"); ?>
30
- <table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
31
- <tbody>
32
- <tr>
33
- <td>
34
- <button type="submit" class="button button-secondary import-cir" <?php echo $disabled; ?> title="<?php esc_attr_e('Import images from "Comment Images Reloaded"', "wpdiscuz"); ?>">
35
- <?php esc_html_e('Import images from "Comment Images Reloaded" plugin', "wpdiscuz"); ?>&nbsp;
36
- <i class="fas wc-hidden"></i>
37
- </button>
38
- <span class="import-progress">&nbsp;</span>
39
- <input type="hidden" name="cir-images-count" value="<?php echo esc_attr($curImagesCount); ?>" class="cir-images-count" />
40
- <input type="hidden" name="cir-step" value="0" class="cir-step"/>
41
- </td>
42
- </tr>
43
- </tbody>
44
- </table>
45
- </form>
46
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
options/tools-layouts_old/options-export.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
- if (!defined("ABSPATH")) {
3
- exit();
4
- }
5
- ?>
6
- <div>
7
- <h2 style="padding:5px 10px 10px 10px; margin:0px;"><?php esc_html_e("Export options", "wpdiscuz"); ?></h2>
8
- <p style="font-size:13px; color:#999999; width:90%; padding-left:0px; margin-left:10px;">
9
- <?php esc_html_e("Using this tool you can migrate or backup/restore wpDiscuz options from one WordPress to another.", "wpdiscuz"); ?>
10
- </p>
11
- <form action="" method="post" class="wc-tools-settings-form wc-form">
12
- <?php wp_nonce_field("wc_tools_form", "wpd-options-export"); ?>
13
- <table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
14
- <tbody>
15
- <?php if (file_exists($wpdiscuzOptionsDir . self::OPTIONS_FILENAME . ".txt")) { ?>
16
- <tr>
17
- <td>
18
- <div class="wpdiscuz-option-download">
19
- <a href="<?php echo esc_url_raw($wpdiscuzOptionsUrl . self::OPTIONS_FILENAME . ".txt"); ?>" download="<?php echo esc_attr(self::OPTIONS_FILENAME . ".txt"); ?>" class="button button-secondary">
20
- <?php esc_html_e("Download Options", "wpdiscuz"); ?>
21
- </a>
22
- </div>
23
- </td>
24
- </tr>
25
- <?php } ?>
26
- <tr>
27
- <td style="text-align:right;">
28
- <input type="submit" name="wpdiscuz-export-submit" class="button button-primary" value="<?php esc_attr_e("Backup Options", "wpdiscuz"); ?>">
29
- <input type="hidden" name="tools-action" value="export-options" />
30
- </td>
31
- </tr>
32
- </tbody>
33
- </table>
34
- </form>
35
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
options/tools-layouts_old/options-import.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
- if (!defined("ABSPATH")) {
3
- exit();
4
- }
5
- ?>
6
- <div>
7
- <h2 style="padding:5px 10px 10px 10px; margin:0px;"><?php esc_html_e("Import options", "wpdiscuz"); ?></h2>
8
- <p style="font-size:13px; color:#999999; width:90%; padding-left:0px; margin-left:10px;">
9
- <?php esc_html_e("Here you can import and restore wpDiscuz options. You just need to choose backup file and click import options.", "wpdiscuz"); ?>
10
- </p>
11
- <form action="" method="post" class="wc-tools-settings-form wc-form" enctype="multipart/form-data">
12
- <?php wp_nonce_field("wc_tools_form", "wpd-options-import"); ?>
13
- <table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
14
- <tbody>
15
- <tr>
16
- <td>
17
- <input type="file" name="wpdiscuz-options-file" class=""/>
18
- </td>
19
- </tr>
20
- <tr>
21
- <td style="text-align:right;">
22
- <input type="submit" name="wpdiscuz-import-submit" class="button button-primary" value="<?php esc_attr_e("Import Options", "wpdiscuz"); ?>">
23
- <input type="hidden" name="tools-action" value="import-options" />
24
- </td>
25
- </tr>
26
- </tbody>
27
- </table>
28
- </form>
29
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
options/tools-layouts_old/phrases-export.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
- if (!defined("ABSPATH")) {
3
- exit();
4
- }
5
- ?>
6
- <div>
7
- <h2 style="padding:5px 10px 10px 10px; margin:0px;"><?php esc_html_e("Export phrases", "wpdiscuz"); ?></h2>
8
- <p style="font-size:13px; color:#999999; width:90%; padding-left:0px; margin-left:10px;">
9
- <?php esc_html_e("Using this tool you can migrate or backup/restore wpDiscuz phrases from one WordPress to another.", "wpdiscuz"); ?>
10
- </p>
11
- <form action="" method="post" class="wc-tools-settings-form wc-form">
12
- <?php wp_nonce_field("wc_tools_form", "wpd-phrases-export"); ?>
13
- <table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
14
- <tbody>
15
- <?php if (file_exists($wpdiscuzOptionsDir . self::PHRASES_FILENAME . ".txt")) { ?>
16
- <tr>
17
- <td>
18
- <div class="wpdiscuz-phrase-download">
19
- <a href="<?php echo esc_url_raw($wpdiscuzOptionsUrl . self::PHRASES_FILENAME . ".txt"); ?>" download="<?php echo esc_attr(self::PHRASES_FILENAME . ".txt"); ?>" class="button button-secondary">
20
- <?php esc_html_e("Download Phrases", "wpdiscuz"); ?>
21
- </a>
22
- </div>
23
- </td>
24
- </tr>
25
- <?php } ?>
26
- <tr>
27
- <td style="text-align:right;">
28
- <input type="submit" name="wpdiscuz-export-submit" class="button button-primary" value="<?php esc_attr_e("Backup Phrases", "wpdiscuz"); ?>">
29
- <input type="hidden" name="tools-action" value="export-phrases" />
30
- </td>
31
- </tr>
32
- </tbody>
33
- </table>
34
- </form>
35
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
options/tools-layouts_old/phrases-import.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
- if (!defined("ABSPATH")) {
3
- exit();
4
- }
5
- ?>
6
- <div>
7
- <h2 style="padding:5px 10px 10px 10px; margin:0px;"><?php esc_html_e("Import phrases", "wpdiscuz"); ?></h2>
8
- <p style="font-size:13px; color:#999999; width:90%; padding-left:0px; margin-left:10px;">
9
- <?php esc_html_e("Here you can import and restore wpDiscuz phrases. You just need to choose backup file and click import phrases.", "wpdiscuz"); ?>
10
- </p>
11
- <form action="" method="post" class="wc-tools-settings-form wc-form" enctype="multipart/form-data">
12
- <?php wp_nonce_field("wc_tools_form", "wpd-phrases-import"); ?>
13
- <table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
14
- <tbody>
15
- <tr>
16
- <td>
17
- <input type="file" name="wpdiscuz-phrases-file" class=""/>
18
- </td>
19
- </tr>
20
- <tr>
21
- <td style="text-align:right;">
22
- <input type="submit" name="wpdiscuz-import-submit" class="button button-primary" value="<?php esc_attr_e("Import Phrases", "wpdiscuz"); ?>">
23
- <input type="hidden" name="tools-action" value="import-phrases" />
24
- </td>
25
- </tr>
26
- </tbody>
27
- </table>
28
- </form>
29
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
options/tools-layouts_old/rebuild-ratings.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
- if (!defined("ABSPATH")) {
3
- exit();
4
- }
5
- $rebuildRatingsCount = intval($this->dbManager->getRebuildRatingsCount());
6
- $disabled = $rebuildRatingsCount ? "" : "disabled='disabled'";
7
- ?>
8
- <div>
9
- <h2 style="padding:5px 10px 10px 10px; margin:0px;"><?php esc_html_e("Rebuid Ratings", "wpdiscuz"); ?></h2>
10
- <form action="" method="post" class="wc-tools-settings-form wc-form">
11
- <?php wp_nonce_field("wc_tools_form", "wpd-rebuild-ratings"); ?>
12
- <table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
13
- <tbody>
14
- <tr>
15
- <td>
16
- <button <?php echo $disabled; ?> type="submit" class="button button-secondary rebuild-ratings" title="<?php esc_attr_e("Start Rebuild", "wpdiscuz"); ?>">
17
- <?php esc_html_e("Rebuild Ratings", "wpdiscuz"); ?>&nbsp;
18
- <i class="fas wc-hidden"></i>
19
- </button>
20
- <span class="rebuild-ratings-import-progress">&nbsp;</span>
21
- <input type="hidden" name="rebuild-ratings-start-id" value="0" class="rebuild-ratings-start-id"/>
22
- <input type="hidden" name="rebuild-ratings-count" value="<?php echo esc_attr($rebuildRatingsCount); ?>" class="rebuild-ratings-count"/>
23
- <input type="hidden" name="rebuild-ratings-step" value="0" class="rebuild-ratings-step"/>
24
- </td>
25
- </tr>
26
- </tbody>
27
- </table>
28
- </form>
29
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
options/tools-layouts_old/regenerate-closed-comments.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- if (!defined("ABSPATH")) {
3
- exit();
4
- }
5
- $showClosedMessage = intval(get_option(self::OPTION_SLUG_SHOW_CLOSED_REG_MESSAGE));
6
- $closedRegenerateDataCount = $showClosedMessage ? intval($this->dbManager->getClosedRegenerateCount()) : 0;
7
- $disabled = $closedRegenerateDataCount ? "" : "disabled='disabled'";
8
- ?>
9
- <div>
10
- <h2 style="padding:5px 10px 10px 10px; margin:0px;"><?php esc_html_e("Regenerate Closed Comments", "wpdiscuz"); ?></h2>
11
- <form action="" method="post" class="wc-tools-settings-form wc-form">
12
- <?php wp_nonce_field("wc_tools_form", "wpd-closed-regenerate"); ?>
13
- <table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
14
- <tbody>
15
- <tr>
16
- <td>
17
- <button <?php echo $disabled; ?> type="submit" class="button button-secondary regenerate-closed-comments" title="<?php esc_attr_e("Start Regenerate", "wpdiscuz"); ?>">
18
- <?php esc_html_e("Regenerate Closed Comments", "wpdiscuz"); ?>&nbsp;
19
- <i class="fas wc-hidden"></i>
20
- </button>
21
- <input <?php echo $disabled; ?> type="number" name="closed-regenerate-limit" value="500" min="1" class="closed-regenerate-limit"/>
22
- <span class="closed-regenerate-import-progress">&nbsp;</span>
23
- <input type="hidden" name="closed-regenerate-start-id" value="0" class="closed-regenerate-start-id"/>
24
- <input type="hidden" name="closed-regenerate-count" value="<?php echo esc_attr($closedRegenerateDataCount); ?>" class="closed-regenerate-count"/>
25
- <input type="hidden" name="closed-regenerate-step" value="0" class="closed-regenerate-step"/>
26
- </td>
27
- </tr>
28
- </tbody>
29
- </table>
30
- </form>
31
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
options/tools-layouts_old/regenerate-vote-data.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- if (!defined("ABSPATH")) {
3
- exit();
4
- }
5
- $showVoteDataMessage = intval(get_option(self::OPTION_SLUG_SHOW_VOTE_DATA_REG_MESSAGE));
6
- $voteDataRegenerateCount = $showVoteDataMessage ? intval($this->dbManager->getVoteDataRegenerateCount()) : 0;
7
- $disabled = $voteDataRegenerateCount ? "" : "disabled='disabled'";
8
- ?>
9
- <div>
10
- <h2 style="padding:5px 10px 10px 10px; margin:0px;"><?php esc_html_e("Regenerate Vote Data", "wpdiscuz"); ?></h2>
11
- <form action="" method="post" class="wc-tools-settings-form wc-form">
12
- <?php wp_nonce_field("wc_tools_form", "wpd-regenerate-vote-data"); ?>
13
- <table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
14
- <tbody>
15
- <tr>
16
- <td>
17
- <button <?php echo $disabled; ?> type="submit" class="button button-secondary regenerate-vote-data" title="<?php esc_attr_e("Start Regenerate", "wpdiscuz"); ?>">
18
- <?php esc_html_e("Regenerate Vote Data", "wpdiscuz"); ?>&nbsp;
19
- <i class="fas wc-hidden"></i>
20
- </button>
21
- <input <?php echo $disabled; ?> type="number" name="regenerate-vote-data-limit" value="500" min="1" class="regenerate-vote-data-limit"/>
22
- <span class="regenerate-vote-data-import-progress">&nbsp;</span>
23
- <input type="hidden" name="regenerate-vote-data-start-id" value="0" class="regenerate-vote-data-start-id"/>
24
- <input type="hidden" name="regenerate-vote-data-count" value="<?php echo esc_attr($voteDataRegenerateCount); ?>" class="regenerate-vote-data-count"/>
25
- <input type="hidden" name="regenerate-vote-data-step" value="0" class="regenerate-vote-data-step"/>
26
- </td>
27
- </tr>
28
- </tbody>
29
- </table>
30
- </form>
31
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
options/tools-layouts_old/regenerate-vote-metas.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- if (!defined("ABSPATH")) {
3
- exit();
4
- }
5
- $showVoteMessage = intval(get_option(self::OPTION_SLUG_SHOW_VOTE_REG_MESSAGE));
6
- $voteRegenerateDataCount = $showVoteMessage ? intval($this->dbManager->getVoteRegenerateCount()) : 0;
7
- $disabled = $voteRegenerateDataCount ? "" : "disabled='disabled'";
8
- ?>
9
- <div>
10
- <h2 style="padding:5px 10px 10px 10px; margin:0px;"><?php esc_html_e("Regenerate Vote Metas", "wpdiscuz"); ?></h2>
11
- <form action="" method="post" class="wc-tools-settings-form wc-form">
12
- <?php wp_nonce_field("wc_tools_form", "wpd-vote-regenerate"); ?>
13
- <table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
14
- <tbody>
15
- <tr>
16
- <td>
17
- <button <?php echo $disabled; ?> type="submit" class="button button-secondary regenerate-vote-metas" title="<?php esc_attr_e("Start Regenerate", "wpdiscuz"); ?>">
18
- <?php esc_html_e("Regenerate Vote Metas", "wpdiscuz"); ?>&nbsp;
19
- <i class="fas wc-hidden"></i>
20
- </button>
21
- <input <?php echo $disabled; ?> type="number" name="vote-regenerate-limit" value="500" min="1" class="vote-regenerate-limit"/>
22
- <span class="vote-regenerate-import-progress">&nbsp;</span>
23
- <input type="hidden" name="vote-regenerate-start-id" value="0" class="vote-regenerate-start-id"/>
24
- <input type="hidden" name="vote-regenerate-count" value="<?php echo esc_attr($voteRegenerateDataCount); ?>" class="vote-regenerate-count"/>
25
- <input type="hidden" name="vote-regenerate-step" value="0" class="vote-regenerate-step"/>
26
- </td>
27
- </tr>
28
- </tbody>
29
- </table>
30
- </form>
31
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
options/tools-layouts_old/subscriptions-import.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- if (!defined("ABSPATH")) {
3
- exit();
4
- }
5
- $stcrSubscriptionsCount = intval($this->dbManager->getStcrAllSubscriptions());
6
- $disabled = $stcrSubscriptionsCount ? "" : "disabled='disabled'";
7
- ?>
8
- <div>
9
- <h2 style="padding:5px 10px 10px 10px; margin:0px;"><?php esc_html_e("Import subscriptions", "wpdiscuz"); ?></h2>
10
- <p style="font-size:13px; color:#999999; width:90%; padding-left:0px; margin-left:10px;">
11
- <?php esc_html_e("Using this tool you can import subscriptions from other plugins to wpDiscuz.", "wpdiscuz"); ?>
12
- </p>
13
- <form action="" method="post" class="wc-tools-settings-form wc-form">
14
- <?php wp_nonce_field("wc_tools_form", "wpd-stcr-subscriptions"); ?>
15
- <table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
16
- <tbody>
17
- <tr>
18
- <td>
19
- <button type="submit" class="button button-secondary import-stcr" <?php echo $disabled; ?> title="<?php esc_attr_e("Import subscriptions from Subscribe To Comments Reloaded", "wpdiscuz"); ?>">
20
- <?php esc_html_e('Import subscriptions from "Subscribe To Comments Reloaded" plugin', "wpdiscuz"); ?>&nbsp;
21
- <i class="fas wc-hidden"></i>
22
- </button>
23
- <span class="import-progress">&nbsp;</span>
24
- <input type="hidden" name="stcr-subscriptions-count" value="<?php echo esc_attr($stcrSubscriptionsCount); ?>" class="stcr-subscriptions-count" />
25
- <input type="hidden" name="stcr-step" value="0" class="stcr-step"/>
26
- </td>
27
- </tr>
28
- </tbody>
29
- </table>
30
- </form>
31
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
options/tools-layouts_old/sync-commenter-data.php DELETED
@@ -1,25 +0,0 @@
1
- <?php
2
- if (!defined("ABSPATH")) {
3
- exit();
4
- }
5
- $showSyncMessage = intval(get_option(self::OPTION_SLUG_SHOW_SYNC_COMMENTERS_MESSAGE));
6
- ?>
7
- <div>
8
- <h2 style="padding:5px 10px 10px 10px; margin:0px;"><?php esc_html_e("Synchronize Commenters Data", "wpdiscuz"); ?></h2>
9
- <form action="" method="post" class="wc-tools-settings-form wc-form">
10
- <?php wp_nonce_field("wc_tools_form", "wpd-sync-commenters"); ?>
11
- <table class="wp-list-table widefat plugins" style="margin-top:10px; border:none;">
12
- <tbody>
13
- <tr>
14
- <td>
15
- <button <?php echo $showSyncMessage ? "" : "disabled='disabled'"; ?> type="submit" class="button button-secondary sync-commenter-data" title="<?php esc_attr_e("Start Sync", "wpdiscuz"); ?>">
16
- <?php esc_html_e("Synchronize Commenters Data", "wpdiscuz"); ?>&nbsp;
17
- <i class="fas wc-hidden"></i>
18
- </button>
19
- <span class="sync-commenter-import-progress"></span>
20
- </td>
21
- </tr>
22
- </tbody>
23
- </table>
24
- </form>
25
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: gVectors Team
3
  Tags: comment, comments, ajax comments, comment form, comment fields
4
  Requires at least: 5.0
5
  Tested up to: 5.4
6
- Stable tag: 7.0.3
7
  Requires PHP: 5.4 and higher
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
@@ -179,6 +179,28 @@ Nothing will be lost! **Comments - wpDiscuz** will show all old comments.
179
 
180
  == Changelog ==
181
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  = Comments - wpDiscuz v7.0.3 =
183
 
184
  **IMPORTANT!**
3
  Tags: comment, comments, ajax comments, comment form, comment fields
4
  Requires at least: 5.0
5
  Tested up to: 5.4
6
+ Stable tag: 7.0.4
7
  Requires PHP: 5.4 and higher
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
179
 
180
  == Changelog ==
181
 
182
+ = Comments - wpDiscuz v7.0.4 =
183
+
184
+ **IMPORTANT!**
185
+ 1. Please don't forget delete all caches and purge CDN after the update.
186
+ 2. If you have custom CSS code for fixing mobile view, tooltips and addon related issues, please consider removing those after the update and check again. Some issues are already fixed in this version, and they may conflict with your custom CSS code.
187
+ 3. If yo're updating from 5.x.x versions please read this topic: [https://wordpress.org/support/topic/before-updating-to-wpdiscuz-7-version/](https://wordpress.org/support/topic/before-updating-to-wpdiscuz-7-version/)
188
+
189
+ * Added: Quick tags for simple comment editor (if rich editor is disabled)
190
+ * Added: The wpDiscuz > Tools admin page is fully redesigned
191
+ * New Tool: Import subscribers from "Lightweight Subscribe To Comments" plugin
192
+ * New Option: Newest and oldest comment ordering by [ID | Date]
193
+ * New Option: Insert custom login page URL
194
+ * Optimized: CSS / JS files
195
+ * Fixed Bug: Security issues
196
+ * Fixed Bug: Color options for Rating Stars
197
+ * Fixed Bug: Issues with WPBruiser plugin
198
+ * Fixed Bug: Line-break issue in the rich editor blockquotes and codes
199
+ * Fixed Bug: Problems with [Read More] feature
200
+ * Fixed Bug: CSS issues on mobile view
201
+ * Fixed Bug: CSS Issues on RTL websites
202
+ * Fixed Bug: About two dozens of small bugs are fixed and the core is optimized
203
+
204
  = Comments - wpDiscuz v7.0.3 =
205
 
206
  **IMPORTANT!**
themes/default/class.WpdiscuzWalker.php CHANGED
@@ -323,7 +323,7 @@ class WpdiscuzWalker extends Walker_Comment implements WpDiscuzConstants {
323
  $search[] = "{FOLLOW_ICON}";
324
  $replace[] = "wpd-follow-link wpd_not_clicked " . $followClass;
325
  $replace[] = esc_attr($followTip);
326
- $replace[] = $args["layout"] == 1 ? "right" : "top";
327
  $replace[] = "<i class='fas fa-rss' aria-hidden='true'></i>";
328
  }
329
 
@@ -480,6 +480,7 @@ class WpdiscuzWalker extends Walker_Comment implements WpDiscuzConstants {
480
  if ($commentReadMoreLimit && WpdiscuzHelper::strWordCount(wp_strip_all_tags($comment->comment_content)) > $commentReadMoreLimit) {
481
  $comment->comment_content = WpdiscuzHelper::getCommentExcerpt($comment->comment_content, $uniqueId, $this->options);
482
  }
 
483
 
484
  $lastEdited = "";
485
  if ($this->options->moderation["displayEditingInfo"] && isset($commentMetas[self::META_KEY_LAST_EDITED_AT]) && isset($commentMetas[self::META_KEY_LAST_EDITED_BY])) {
323
  $search[] = "{FOLLOW_ICON}";
324
  $replace[] = "wpd-follow-link wpd_not_clicked " . $followClass;
325
  $replace[] = esc_attr($followTip);
326
+ $replace[] = $args["layout"] == 1 ? ( !is_rtl() ? ( wp_is_mobile() ? 'left' : 'right') : ( wp_is_mobile() ? 'right' : 'left') ) : "top";
327
  $replace[] = "<i class='fas fa-rss' aria-hidden='true'></i>";
328
  }
329
 
480
  if ($commentReadMoreLimit && WpdiscuzHelper::strWordCount(wp_strip_all_tags($comment->comment_content)) > $commentReadMoreLimit) {
481
  $comment->comment_content = WpdiscuzHelper::getCommentExcerpt($comment->comment_content, $uniqueId, $this->options);
482
  }
483
+ $comment->comment_content = apply_filters("wpdiscuz_after_read_more", $comment->comment_content, $comment, $args);
484
 
485
  $lastEdited = "";
486
  if ($this->options->moderation["displayEditingInfo"] && isset($commentMetas[self::META_KEY_LAST_EDITED_AT]) && isset($commentMetas[self::META_KEY_LAST_EDITED_BY])) {
themes/default/comment-form.php CHANGED
@@ -140,7 +140,10 @@ if (!post_password_required($post->ID)) {
140
  $form = $wpdiscuz->wpdiscuzForm->getForm($post->ID);
141
 
142
  $wpCommClasses[] = "wpd-layout-" . $form->getLayout();
 
 
143
  $wpCommClasses = apply_filters("wpdiscuz_container_classes", $wpCommClasses);
 
144
  $wpCommClasses = implode(" ", $wpCommClasses);
145
 
146
  $isShowSubscribeBar = $form->isShowSubscriptionBar();
@@ -153,8 +156,6 @@ if (!post_password_required($post->ID)) {
153
  $currentUserEmail = $currentUser->user_email;
154
  }
155
 
156
- $commentsOpen = comments_open($post);
157
-
158
  $wpdiscuz->helper->superSocializerFix();
159
  if ($commentsOpen) {
160
  if ($formCustomCss = $form->getCustomCSS()) {
@@ -210,8 +211,12 @@ if (!post_password_required($post->ID)) {
210
  echo apply_filters("wpdiscuz_user_info_and_logout_link", $logout_text);
211
  }
212
  } else if ($wpdiscuz->options->login["showLoginLinkForGuests"]) {
213
- $login = wp_loginout(get_permalink(), false);
214
- $login = preg_replace("!>([^<]+)!is", "><i class='fas fa-sign-in-alt'></i> " . esc_html($wpdiscuz->options->phrases["wc_log_in"]), $login);
 
 
 
 
215
  if ($wpdiscuz->options->isShowLoginButtons()) {
216
  echo "<div class='wpd-sep'></div>";
217
  }
@@ -334,7 +339,7 @@ if (!post_password_required($post->ID)) {
334
  <?php
335
  if (($wpdiscuz->options->login["showActivityTab"] || $wpdiscuz->options->login["showSubscriptionsTab"] || $wpdiscuz->options->login["showFollowsTab"] || apply_filters("wpdiscuz_enable_content_modal", false)) && $currentUserEmail) {
336
  ?>
337
- <div class="wpdiscuz-user-settings wpd-info wpd-not-clicked" wpd-tooltip="<?php echo esc_attr($wpdiscuz->options->phrases["wc_content_and_settings"]); ?>">
338
  <i class="fas fa-user-cog"></i>
339
  </div>
340
  <?php
@@ -363,21 +368,21 @@ if (!post_password_required($post->ID)) {
363
  if (!$wpdiscuz->options->wp["isPaginate"] && $wpdiscuz->options->thread_display["showSortingButtons"] && $wpdiscuz->options->thread_display["mostVotedByDefault"]) {
364
  $wpdiscuzCommentsOrderBy = "by_vote";
365
  } else {
366
- $wpdiscuzCommentsOrderBy = "comment_ID";
367
  }
368
  $wpdiscuzCommentsOrderBy = apply_filters("wpdiscuz_comments_order_by", $wpdiscuzCommentsOrderBy);
369
  $wpdiscuzCommentsOrder = apply_filters("wpdiscuz_comments_order", $wpdiscuzCommentsOrder);
370
  if ($commentsCount && $wpdiscuz->options->thread_display["showSortingButtons"] && !$wpdiscuz->options->wp["isPaginate"]) {
371
  $sortingButtons = [
372
  [
373
- "orderBy" => "comment_ID",
374
  "order" => "desc",
375
  "class" => "wpdiscuz-date-sort-desc",
376
  "text" => $wpdiscuz->options->phrases["wc_newest"],
377
  "type" => "newest",
378
  ],
379
  [
380
- "orderBy" => "comment_ID",
381
  "order" => "asc",
382
  "class" => "wpdiscuz-date-sort-asc",
383
  "text" => $wpdiscuz->options->phrases["wc_oldest"],
140
  $form = $wpdiscuz->wpdiscuzForm->getForm($post->ID);
141
 
142
  $wpCommClasses[] = "wpd-layout-" . $form->getLayout();
143
+ $commentsOpen = comments_open($post);
144
+ $wpCommClasses[] = $commentsOpen ? "wpd-comments-open" : "wpd-comments-closed";
145
  $wpCommClasses = apply_filters("wpdiscuz_container_classes", $wpCommClasses);
146
+
147
  $wpCommClasses = implode(" ", $wpCommClasses);
148
 
149
  $isShowSubscribeBar = $form->isShowSubscriptionBar();
156
  $currentUserEmail = $currentUser->user_email;
157
  }
158
 
 
 
159
  $wpdiscuz->helper->superSocializerFix();
160
  if ($commentsOpen) {
161
  if ($formCustomCss = $form->getCustomCSS()) {
211
  echo apply_filters("wpdiscuz_user_info_and_logout_link", $logout_text);
212
  }
213
  } else if ($wpdiscuz->options->login["showLoginLinkForGuests"]) {
214
+ if ($wpdiscuz->options->login["loginUrl"]) {
215
+ $login = "<a href='" . esc_url_raw($wpdiscuz->options->login["loginUrl"]) . "'><i class='fas fa-sign-in-alt'></i> " . esc_html($wpdiscuz->options->phrases["wc_log_in"]) . "</a>";
216
+ } else {
217
+ $login = $wpdiscuz->options->login["loginUrl"] ? "<a href='" . esc_url_raw($wpdiscuz->options->login["loginUrl"]) . "'></a>" : wp_loginout(get_permalink(), false);
218
+ $login = preg_replace("!>([^<]+)!is", "><i class='fas fa-sign-in-alt'></i> " . esc_html($wpdiscuz->options->phrases["wc_log_in"]), $login);
219
+ }
220
  if ($wpdiscuz->options->isShowLoginButtons()) {
221
  echo "<div class='wpd-sep'></div>";
222
  }
339
  <?php
340
  if (($wpdiscuz->options->login["showActivityTab"] || $wpdiscuz->options->login["showSubscriptionsTab"] || $wpdiscuz->options->login["showFollowsTab"] || apply_filters("wpdiscuz_enable_content_modal", false)) && $currentUserEmail) {
341
  ?>
342
+ <div class="wpdiscuz-user-settings wpd-info wpd-not-clicked" wpd-tooltip="<?php echo esc_attr($wpdiscuz->options->phrases["wc_content_and_settings"]); ?>" wpd-tooltip-position="right">
343
  <i class="fas fa-user-cog"></i>
344
  </div>
345
  <?php
368
  if (!$wpdiscuz->options->wp["isPaginate"] && $wpdiscuz->options->thread_display["showSortingButtons"] && $wpdiscuz->options->thread_display["mostVotedByDefault"]) {
369
  $wpdiscuzCommentsOrderBy = "by_vote";
370
  } else {
371
+ $wpdiscuzCommentsOrderBy = $wpdiscuz->options->thread_display["orderCommentsBy"];
372
  }
373
  $wpdiscuzCommentsOrderBy = apply_filters("wpdiscuz_comments_order_by", $wpdiscuzCommentsOrderBy);
374
  $wpdiscuzCommentsOrder = apply_filters("wpdiscuz_comments_order", $wpdiscuzCommentsOrder);
375
  if ($commentsCount && $wpdiscuz->options->thread_display["showSortingButtons"] && !$wpdiscuz->options->wp["isPaginate"]) {
376
  $sortingButtons = [
377
  [
378
+ "orderBy" => $wpdiscuz->options->thread_display["orderCommentsBy"],
379
  "order" => "desc",
380
  "class" => "wpdiscuz-date-sort-desc",
381
  "text" => $wpdiscuz->options->phrases["wc_newest"],
382
  "type" => "newest",
383
  ],
384
  [
385
+ "orderBy" => $wpdiscuz->options->thread_display["orderCommentsBy"],
386
  "order" => "asc",
387
  "class" => "wpdiscuz-date-sort-asc",
388
  "text" => $wpdiscuz->options->phrases["wc_oldest"],
themes/default/style-rtl.css CHANGED
@@ -100,16 +100,11 @@ _:-ms-lang(x), .wpd-social-login [wpd-tooltip]::before{top: -24px;}
100
  #wpd-post-rating .wpd-rating-wrap .wpd-rating-value:hover{background-color: #555555; transition:0.5s;}
101
  #wpd-post-rating .wpd-rating-wrap .wpd-rating-stars{margin-top:7px; display: flex; flex-wrap: nowrap; flex-direction: row; justify-content: center;}
102
  #wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg{ width: 26px; height: 26px; display: block; margin-left: -3px;}
103
- #wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg .wpd-star{fill: #cccccc;}
104
- #wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg .wpd-active{fill: #ffc600;}
105
 
106
  #wpd-post-rating.wpd-not-rated .wpd-rating-wrap .wpd-rating-data:hover .wpd-rating-stars{display:none;}
107
  #wpd-post-rating.wpd-not-rated .wpd-rating-wrap .wpd-rating-data:hover .wpd-rate-starts{display:flex;}
108
  #wpd-post-rating .wpd-rating-wrap .wpd-rate-starts{display:none;margin-top:7px; flex-wrap: nowrap; flex-direction: row; justify-content: center;}
109
  #wpd-post-rating .wpd-rating-wrap .wpd-rate-starts svg{ width: 26px; height: 26px; display: block; margin-left: -3px;}
110
- #wpd-post-rating .wpd-rating-wrap .wpd-rate-starts svg .wpd-star{fill: #cccccc;}
111
- #wpd-post-rating .wpd-rating-wrap .wpd-rate-starts:hover svg .wpd-star{fill:#FFED85;}
112
- #wpd-post-rating.wpd-not-rated .wpd-rating-wrap .wpd-rate-starts svg:hover ~ svg .wpd-star{ fill: #cccccc;}
113
 
114
  .wpd-rating{display: flex; flex-wrap: wrap; flex-direction: row; justify-content: center; align-items: center; width: 100%; margin-top: 20px; margin-bottom: 30px;}
115
  .wpd-rating .wpd-rating-wrap{width: 30%;display: flex; flex-wrap: nowrap; flex-direction: row; justify-content: center; align-items: center; align-content: center; text-align: center; }
@@ -215,11 +210,15 @@ _:-ms-lang(x), .wpd-social-login [wpd-tooltip]::before{top: -24px;}
215
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap{padding-bottom: 10px;}
216
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt{flex-wrap: wrap;}
217
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wpd-avatar{flex-basis: 69px; margin-left: 0;}
218
- #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt textarea{flex-basis: calc( 100% - 70px );}
 
 
219
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wmu-upload-wrap {flex-basis: 100%; text-align: left; margin-top: 3px;}
220
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wmu-upload-wrap i{color: #888; font-size: 18px;}
221
- #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt [wpd-tooltip]::after{left: -90px; right:auto;}
222
- #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt [wpd-tooltip]::before{left: 0; right:auto;}
 
 
223
 
224
  /* COMMENT FORM | BUTTONS */
225
  #wpdcom input[type="button"],
@@ -247,6 +246,7 @@ _:-ms-lang(x), .wpd-social-login [wpd-tooltip]::before{top: -24px;}
247
  #wpdcom .ql-editor{min-height: 65px; border-bottom-color: #fff; word-break: break-word;}
248
  #wpdcom .ql-editor::before{ font-size: 16px; color: #aaa; letter-spacing: 1px;}
249
  #wpdcom .ql-editor > * { cursor: text; font-size: 15px; letter-spacing: 0.5px; font-family: Arial; font-weight: normal; color: #666666;}
 
250
  #wpdcom .ql-container{border-radius: 3px 3px 0 0; background: #fff; border-bottom: none; border-color: #dddddd;}
251
  #wpdcom .ql-toolbar {padding: 8px 5px 3px 8px; background-color: #fafafa; border-top: none; border-radius: 0 0 3px 3px; border-color: #dddddd;}
252
  #wpdcom .ql-toolbar.wpd-toolbar-hidden{display:none;}
@@ -483,6 +483,8 @@ _:-ms-lang(x), .wpd-social-login [wpd-tooltip]::before{top: -24px;}
483
  #wpdcom .wpd-comment-text video,
484
  #wpdcom .wpd-comment-text audio{max-width: 100% !important;}
485
  #wpdcom .wpd-comment-text iframe{width: 480px;height: 280px;}
 
 
486
  #wpdcom .wpd-comment-text .wpd-inline-feedback-wrapper {font-style: italic; font-size: 13px; padding: 15px; background: #fffce1; margin-bottom: 10px; color: #777;}
487
  #wpdcom .wpd-comment-text .wpd-inline-feedback-wrapper .wpd-inline-feedback-info{font-style: normal; font-weight: 600;}
488
  #wpdcom .wpd-comment-text .wpd-inline-feedback-wrapper i.fa-quote-left { margin-left: 8px;font-size: 17px;color: #999797;}
@@ -1041,7 +1043,8 @@ _:-ms-lang(x), #wpdcom.wpd-layout-3 .wpd-comment.wpd-reply .wpd-comment-footer .
1041
  #wpdcom .wpd-auth {margin: 0 -3px 2px 0;}
1042
  #wpdcom .wpd-social-login .wpd-connect-with{display: none!important;}
1043
  #wpdcom .wpd-form .wpd-avatar{display: none;}
1044
- #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt textarea{flex-basis: 100%;}
 
1045
  #wpdcom .wpdiscuz_select{font-size: 16px !important;}
1046
  #wpdcom .wpdiscuz-subscribe-form-email {font-size: 16px; display: block; padding: 10px 0 0 0; width: 98%; margin: 0 auto;}
1047
  #wpdcom .wpdiscuz-subscribe-form-email input[type="email"]{font-size: 16px !important;}
@@ -1062,6 +1065,9 @@ _:-ms-lang(x), #wpdcom.wpd-layout-3 .wpd-comment.wpd-reply .wpd-comment-footer .
1062
  #wpdcom .wpd-field-radio .wpd-field-label, #wpdcom .wpd-field-checkbox .wpd-field-label{font-size: 14px;}
1063
  #wpdcom .wpd-form-col-left .wpd-field-group .wpd-field-group-title, #wpdcom .wpd-form-col-right .wpd-field-group .wpd-field-group-title, #wpdcom .wpd-form-col-full .wpd-field-group .wpd-field-group-title{font-size: 14px;}
1064
  #wpdcom .wpd-form-row .wpdiscuz-item input[type="text"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="password"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="email"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="url"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="color"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="date"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="datetime"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="datetime-local"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="month"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="number"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="time"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="week"], #wpdcom textarea, #wpdcom select, #wpdcom .wpd-form-row .wpd-field{font-size: 16px!important; height: auto;}
 
 
 
1065
  /* Comment Threads */
1066
  #wpdiscuz-comment-message{width: 97%; }
1067
  #wpdcom .wpd-hidden {visibility: visible; opacity: 1;}
@@ -1096,6 +1102,7 @@ _:-ms-lang(x), #wpdcom.wpd-layout-3 .wpd-comment.wpd-reply .wpd-comment-footer .
1096
  #wpdcom.wpd-layout-2 .wpd-reply {margin-right: 0px;}
1097
  #wpdcom.wpd-layout-2 .wpd-reply.wpd_comment_level-2{margin-right: 15px;}
1098
  #wpdcom.wpd-layout-2 .wpd-comment .wpd-comment-header .wpd-user-info {width:100%; display: flex; flex-direction:row; justify-content: flex-start; flex-grow: 0;margin-bottom: -3px;float: left;margin-right: 61px;flex-wrap: wrap;margin-top: -44px;}
 
1099
  #wpdcom.wpd-layout-2 .wpd-comment.wpd-reply .wpd-comment-header .wpd-comment-date{padding-right: 0;}
1100
  #wpdcom.wpd-layout-2 .wpd-comment-header .wpd-comment-link {margin-bottom: 0; padding-top: 1px; align-items: normal; flex-basis: 100%; text-align: left; margin-top: -20px;}
1101
  #wpdcom.wpd-layout-2 .wpd-comment-header .wpd-reply-to{margin-left: 10px;}
@@ -1104,8 +1111,10 @@ _:-ms-lang(x), #wpdcom.wpd-layout-3 .wpd-comment.wpd-reply .wpd-comment-footer .
1104
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-left {width: 45px;}
1105
  #wpdcom.wpd-layout-3 .wpd-form .wpd-avatar img, #wpdcom.wpd-layout-3 .wpd-form .wpd-avatar img.avatar, #wpdcom.wpd-layout-3 .wpd-comment .wpd-avatar img, #wpdcom.wpd-layout-3 .wpd-comment .wpd-avatar img.avatar {width: 40px;height: 40px;max-width: none;padding: 2px;}
1106
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-header .wpd-comment-author {padding-right: 55px;}
 
 
1107
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-right {border-right: none;border-bottom: none;width: 100%;}
1108
- #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-text {padding-right: 7px;padding-top: 15px;padding-bottom: 17px;font-size: 90%;}
1109
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer {margin-bottom: -10px;margin-right: 7px;}
1110
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote {padding-right: 0;margin-right: 0;}
1111
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote-up, #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote-down {border: none;padding: 0;width: 16px;height: 16px;background-color:none;}
@@ -1128,13 +1137,11 @@ _:-ms-lang(x), #wpdcom.wpd-layout-3 .wpd-comment.wpd-reply .wpd-comment-footer .
1128
  #wpdcom.wpd-layout-3 .wpd-comment.wpd-reply .wpd-comment-footer{margin-right: 10px;}
1129
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote-up.wpd-up,
1130
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote-down.wpd-down{border: none;}
 
 
 
 
1131
  }
1132
 
1133
- #wpdcom .wpdiscuz-textarea-wrap .ql-editor {
1134
- direction: rtl;
1135
- text-align: right;
1136
- }
1137
- #wpdcom pre.ql-syntax {
1138
- direction: ltr;
1139
- text-align: left;
1140
- }
100
  #wpd-post-rating .wpd-rating-wrap .wpd-rating-value:hover{background-color: #555555; transition:0.5s;}
101
  #wpd-post-rating .wpd-rating-wrap .wpd-rating-stars{margin-top:7px; display: flex; flex-wrap: nowrap; flex-direction: row; justify-content: center;}
102
  #wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg{ width: 26px; height: 26px; display: block; margin-left: -3px;}
 
 
103
 
104
  #wpd-post-rating.wpd-not-rated .wpd-rating-wrap .wpd-rating-data:hover .wpd-rating-stars{display:none;}
105
  #wpd-post-rating.wpd-not-rated .wpd-rating-wrap .wpd-rating-data:hover .wpd-rate-starts{display:flex;}
106
  #wpd-post-rating .wpd-rating-wrap .wpd-rate-starts{display:none;margin-top:7px; flex-wrap: nowrap; flex-direction: row; justify-content: center;}
107
  #wpd-post-rating .wpd-rating-wrap .wpd-rate-starts svg{ width: 26px; height: 26px; display: block; margin-left: -3px;}
 
 
 
108
 
109
  .wpd-rating{display: flex; flex-wrap: wrap; flex-direction: row; justify-content: center; align-items: center; width: 100%; margin-top: 20px; margin-bottom: 30px;}
110
  .wpd-rating .wpd-rating-wrap{width: 30%;display: flex; flex-wrap: nowrap; flex-direction: row; justify-content: center; align-items: center; align-content: center; text-align: center; }
210
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap{padding-bottom: 10px;}
211
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt{flex-wrap: wrap;}
212
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wpd-avatar{flex-basis: 69px; margin-left: 0;}
213
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wpd-textarea-wrap{flex-basis: calc( 100% - 70px );}
214
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wpd-textarea-wrap .quicktags-toolbar{ width: 100%; margin-bottom: 1px;}
215
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wpd-textarea-wrap textarea{width: 100%;}
216
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wmu-upload-wrap {flex-basis: 100%; text-align: left; margin-top: 3px;}
217
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wmu-upload-wrap i{color: #888; font-size: 18px;}
218
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt [wpd-tooltip]::after{left: 28px; right: auto;}
219
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt [wpd-tooltip]::before{left: 25px; right:auto;}
220
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .quicktags-toolbar .ed_button {opacity: 0.8; box-shadow:none; background: #eeeeee; color: #666; font-size: 13px; padding: 1px 12px; margin: 2px 1px; display: inline-block; border-radius: 0; line-height: 20px;}
221
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .quicktags-toolbar .ed_button:hover{opacity: 1;}
222
 
223
  /* COMMENT FORM | BUTTONS */
224
  #wpdcom input[type="button"],
246
  #wpdcom .ql-editor{min-height: 65px; border-bottom-color: #fff; word-break: break-word;}
247
  #wpdcom .ql-editor::before{ font-size: 16px; color: #aaa; letter-spacing: 1px;}
248
  #wpdcom .ql-editor > * { cursor: text; font-size: 15px; letter-spacing: 0.5px; font-family: Arial; font-weight: normal; color: #666666;}
249
+ #wpdcom .ql-editor blockquote {margin-top: 0 !important; margin-bottom: 0 !important;}
250
  #wpdcom .ql-container{border-radius: 3px 3px 0 0; background: #fff; border-bottom: none; border-color: #dddddd;}
251
  #wpdcom .ql-toolbar {padding: 8px 5px 3px 8px; background-color: #fafafa; border-top: none; border-radius: 0 0 3px 3px; border-color: #dddddd;}
252
  #wpdcom .ql-toolbar.wpd-toolbar-hidden{display:none;}
483
  #wpdcom .wpd-comment-text video,
484
  #wpdcom .wpd-comment-text audio{max-width: 100% !important;}
485
  #wpdcom .wpd-comment-text iframe{width: 480px;height: 280px;}
486
+ #wpdcom .wpd-comment-text blockquote {margin: 5px 15px 5px auto;padding: 2px 10px;font-size: 14px;}
487
+ #wpdcom .wpd-comment-text blockquote p {margin-bottom: 5px;}
488
  #wpdcom .wpd-comment-text .wpd-inline-feedback-wrapper {font-style: italic; font-size: 13px; padding: 15px; background: #fffce1; margin-bottom: 10px; color: #777;}
489
  #wpdcom .wpd-comment-text .wpd-inline-feedback-wrapper .wpd-inline-feedback-info{font-style: normal; font-weight: 600;}
490
  #wpdcom .wpd-comment-text .wpd-inline-feedback-wrapper i.fa-quote-left { margin-left: 8px;font-size: 17px;color: #999797;}
1043
  #wpdcom .wpd-auth {margin: 0 -3px 2px 0;}
1044
  #wpdcom .wpd-social-login .wpd-connect-with{display: none!important;}
1045
  #wpdcom .wpd-form .wpd-avatar{display: none;}
1046
+ #wpdcom.wpd-form .wpd-form-wrapper{padding-left: 5px;}
1047
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt textarea{flex-basis: 100%; width: 100%;}
1048
  #wpdcom .wpdiscuz_select{font-size: 16px !important;}
1049
  #wpdcom .wpdiscuz-subscribe-form-email {font-size: 16px; display: block; padding: 10px 0 0 0; width: 98%; margin: 0 auto;}
1050
  #wpdcom .wpdiscuz-subscribe-form-email input[type="email"]{font-size: 16px !important;}
1065
  #wpdcom .wpd-field-radio .wpd-field-label, #wpdcom .wpd-field-checkbox .wpd-field-label{font-size: 14px;}
1066
  #wpdcom .wpd-form-col-left .wpd-field-group .wpd-field-group-title, #wpdcom .wpd-form-col-right .wpd-field-group .wpd-field-group-title, #wpdcom .wpd-form-col-full .wpd-field-group .wpd-field-group-title{font-size: 14px;}
1067
  #wpdcom .wpd-form-row .wpdiscuz-item input[type="text"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="password"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="email"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="url"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="color"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="date"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="datetime"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="datetime-local"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="month"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="number"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="time"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="week"], #wpdcom textarea, #wpdcom select, #wpdcom .wpd-form-row .wpd-field{font-size: 16px!important; height: auto;}
1068
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wpd-textarea-wrap{flex-basis: 100%; width: 100%;}
1069
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .quicktags-toolbar{margin-bottom: 2px;}
1070
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .quicktags-toolbar .ed_button {font-size: 14px; width: 19%;}
1071
  /* Comment Threads */
1072
  #wpdiscuz-comment-message{width: 97%; }
1073
  #wpdcom .wpd-hidden {visibility: visible; opacity: 1;}
1102
  #wpdcom.wpd-layout-2 .wpd-reply {margin-right: 0px;}
1103
  #wpdcom.wpd-layout-2 .wpd-reply.wpd_comment_level-2{margin-right: 15px;}
1104
  #wpdcom.wpd-layout-2 .wpd-comment .wpd-comment-header .wpd-user-info {width:100%; display: flex; flex-direction:row; justify-content: flex-start; flex-grow: 0;margin-bottom: -3px;float: left;margin-right: 61px;flex-wrap: wrap;margin-top: -44px;}
1105
+ #wpdcom.wpd-layout-2 .wpd-comment .wpd-comment-header .wpd-user-info .wpd-uinfo-top {flex-wrap: wrap!important;}
1106
  #wpdcom.wpd-layout-2 .wpd-comment.wpd-reply .wpd-comment-header .wpd-comment-date{padding-right: 0;}
1107
  #wpdcom.wpd-layout-2 .wpd-comment-header .wpd-comment-link {margin-bottom: 0; padding-top: 1px; align-items: normal; flex-basis: 100%; text-align: left; margin-top: -20px;}
1108
  #wpdcom.wpd-layout-2 .wpd-comment-header .wpd-reply-to{margin-left: 10px;}
1111
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-left {width: 45px;}
1112
  #wpdcom.wpd-layout-3 .wpd-form .wpd-avatar img, #wpdcom.wpd-layout-3 .wpd-form .wpd-avatar img.avatar, #wpdcom.wpd-layout-3 .wpd-comment .wpd-avatar img, #wpdcom.wpd-layout-3 .wpd-comment .wpd-avatar img.avatar {width: 40px;height: 40px;max-width: none;padding: 2px;}
1113
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-header .wpd-comment-author {padding-right: 55px;}
1114
+ #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-header,
1115
+ #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-subheader{justify-content: flex-start;}
1116
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-right {border-right: none;border-bottom: none;width: 100%;}
1117
+ #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-text {padding-right: 7px;padding-top: 15px;padding-bottom: 17px;font-size: 100%;}
1118
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer {margin-bottom: -10px;margin-right: 7px;}
1119
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote {padding-right: 0;margin-right: 0;}
1120
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote-up, #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote-down {border: none;padding: 0;width: 16px;height: 16px;background-color:none;}
1137
  #wpdcom.wpd-layout-3 .wpd-comment.wpd-reply .wpd-comment-footer{margin-right: 10px;}
1138
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote-up.wpd-up,
1139
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote-down.wpd-down{border: none;}
1140
+ /* Tooltip */
1141
+ [wpd-tooltip-size='small']::after{min-width: 60px;}
1142
+ [wpd-tooltip-size='medium']::after{min-width: 90px;}
1143
+ [wpd-tooltip-size='long']::after{min-width: 200px;}
1144
  }
1145
 
1146
+ #wpdcom .wpdiscuz-textarea-wrap .ql-editor {direction: rtl;text-align: right;}
1147
+ #wpdcom pre.ql-syntax {direction: ltr;text-align: left;}
 
 
 
 
 
 
themes/default/style.css CHANGED
@@ -100,16 +100,11 @@ _:-ms-lang(x), .wpd-social-login [wpd-tooltip]::before{top: -24px;}
100
  #wpd-post-rating .wpd-rating-wrap .wpd-rating-value:hover{background-color: #555555; transition:0.5s;}
101
  #wpd-post-rating .wpd-rating-wrap .wpd-rating-stars{margin-top:7px; display: flex; flex-wrap: nowrap; flex-direction: row; justify-content: center;}
102
  #wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg{ width: 26px; height: 26px; display: block; margin-right: -3px;}
103
- #wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg .wpd-star{fill: #cccccc;}
104
- #wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg .wpd-active{fill: #ffc600;}
105
 
106
  #wpd-post-rating.wpd-not-rated .wpd-rating-wrap .wpd-rating-data:hover .wpd-rating-stars{display:none;}
107
  #wpd-post-rating.wpd-not-rated .wpd-rating-wrap .wpd-rating-data:hover .wpd-rate-starts{display:flex;}
108
  #wpd-post-rating .wpd-rating-wrap .wpd-rate-starts{display:none;margin-top:7px; flex-wrap: nowrap; flex-direction: row; justify-content: center;}
109
  #wpd-post-rating .wpd-rating-wrap .wpd-rate-starts svg{ width: 26px; height: 26px; display: block; margin-right: -3px;}
110
- #wpd-post-rating .wpd-rating-wrap .wpd-rate-starts svg .wpd-star{fill: #cccccc;}
111
- #wpd-post-rating .wpd-rating-wrap .wpd-rate-starts:hover svg .wpd-star{fill:#FFED85;}
112
- #wpd-post-rating.wpd-not-rated .wpd-rating-wrap .wpd-rate-starts svg:hover ~ svg .wpd-star{ fill: #cccccc;}
113
 
114
  .wpd-rating{display: flex; flex-wrap: wrap; flex-direction: row; justify-content: center; align-items: center; width: 100%; margin-top: 20px; margin-bottom: 30px;}
115
  .wpd-rating .wpd-rating-wrap{width: 30%;display: flex; flex-wrap: nowrap; flex-direction: row; justify-content: center; align-items: center; align-content: center; text-align: center; }
@@ -217,11 +212,15 @@ _:-ms-lang(x), .wpd-social-login [wpd-tooltip]::before{top: -24px;}
217
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap{padding-bottom: 10px;}
218
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt{flex-wrap: wrap;}
219
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wpd-avatar{flex-basis: 69px; margin-right: 0;}
220
- #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt textarea{flex-basis: calc( 100% - 70px );}
 
 
221
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wmu-upload-wrap {flex-basis: 100%;text-align: right; margin-top: 3px;}
222
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wmu-upload-wrap i{color: #888; font-size: 18px;}
223
- #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt [wpd-tooltip]::after{right: -90px; left:auto;}
224
- #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt [wpd-tooltip]::before{right: 0; left:auto;}
 
 
225
 
226
  /* COMMENT FORM | BUTTONS */
227
  #wpdcom input[type="button"],
@@ -249,6 +248,7 @@ _:-ms-lang(x), .wpd-social-login [wpd-tooltip]::before{top: -24px;}
249
  #wpdcom .ql-editor{min-height: 65px; border-bottom-color: #fff; word-break: break-word;}
250
  #wpdcom .ql-editor::before{ font-size: 16px; color: #aaa; letter-spacing: 1px;}
251
  #wpdcom .ql-editor > * { cursor: text; font-size: 15px; letter-spacing: 0.5px; font-family: Arial; font-weight: normal; color: #666666;}
 
252
  #wpdcom .ql-container{border-radius: 3px 3px 0 0; background: #fff; border-bottom: none; border-color: #dddddd;}
253
  #wpdcom .ql-toolbar {padding: 8px 8px 3px 5px; background-color: #fafafa; border-top: none; border-radius: 0 0 3px 3px; border-color: #dddddd;}
254
  #wpdcom .ql-toolbar.wpd-toolbar-hidden{display:none;}
@@ -485,6 +485,8 @@ _:-ms-lang(x), .wpd-social-login [wpd-tooltip]::before{top: -24px;}
485
  #wpdcom .wpd-comment-text video,
486
  #wpdcom .wpd-comment-text audio{max-width: 100% !important;}
487
  #wpdcom .wpd-comment-text iframe{width: 480px; height: 280px;}
 
 
488
  #wpdcom .wpd-comment-text .wpd-inline-feedback-wrapper {font-style: italic; font-size: 15px; padding: 15px; background: #fffce1; margin-bottom: 10px; color: #777;}
489
  #wpdcom .wpd-comment-text .wpd-inline-feedback-wrapper .wpd-inline-feedback-info{font-style: normal; font-weight: 600;}
490
  #wpdcom .wpd-comment-text .wpd-inline-feedback-wrapper i.fa-quote-left { margin-right: 8px;font-size: 17px;color:#999797;}
@@ -1058,7 +1060,8 @@ _:-ms-lang(x), #wpdcom.wpd-layout-3 .wpd-comment.wpd-reply .wpd-comment-footer .
1058
  #wpdcom .wpd-auth {margin: 0 0 2px -3px;}
1059
  #wpdcom .wpd-social-login .wpd-connect-with{display: none!important;}
1060
  #wpdcom .wpd-form .wpd-avatar{display: none;}
1061
- #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt textarea{flex-basis: 100%;}
 
1062
  #wpdcom .wpdiscuz_select{font-size: 16px !important;}
1063
  #wpdcom .wpdiscuz-subscribe-form-email {font-size: 16px; display: block; padding: 10px 0 0 0; width: 98%; margin: 0 auto;}
1064
  #wpdcom .wpdiscuz-subscribe-form-email input[type="email"]{font-size: 16px !important;}
@@ -1079,6 +1082,9 @@ _:-ms-lang(x), #wpdcom.wpd-layout-3 .wpd-comment.wpd-reply .wpd-comment-footer .
1079
  #wpdcom .wpd-field-radio .wpd-field-label, #wpdcom .wpd-field-checkbox .wpd-field-label{font-size: 14px;}
1080
  #wpdcom .wpd-form-col-left .wpd-field-group .wpd-field-group-title, #wpdcom .wpd-form-col-right .wpd-field-group .wpd-field-group-title, #wpdcom .wpd-form-col-full .wpd-field-group .wpd-field-group-title{font-size: 14px;}
1081
  #wpdcom .wpd-form-row .wpdiscuz-item input[type="text"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="password"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="email"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="url"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="color"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="date"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="datetime"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="datetime-local"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="month"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="number"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="time"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="week"], #wpdcom textarea, #wpdcom select, #wpdcom .wpd-form-row .wpd-field{font-size: 16px!important; height: auto;}
 
 
 
1082
  /* Comment Threads */
1083
  #wpdiscuz-comment-message{width: 97%; }
1084
  #wpdcom .wpd-hidden {visibility: visible; opacity: 1;}
@@ -1113,6 +1119,7 @@ _:-ms-lang(x), #wpdcom.wpd-layout-3 .wpd-comment.wpd-reply .wpd-comment-footer .
1113
  #wpdcom.wpd-layout-2 .wpd-reply {margin-left: 0px;}
1114
  #wpdcom.wpd-layout-2 .wpd-reply.wpd_comment_level-2{margin-left: 15px;}
1115
  #wpdcom.wpd-layout-2 .wpd-comment .wpd-comment-header .wpd-user-info {width:100%; display: flex; flex-direction:row; justify-content: flex-start; flex-grow: 0;margin-bottom: -3px;float: right;margin-left: 61px;flex-wrap: wrap;margin-top: -44px;}
 
1116
  #wpdcom.wpd-layout-2 .wpd-comment.wpd-reply .wpd-comment-header .wpd-comment-date{padding-left: 0;}
1117
  #wpdcom.wpd-layout-2 .wpd-comment-header .wpd-comment-link {margin-bottom: 0; padding-top: 1px; align-items: normal; flex-basis: 100%; text-align: right; margin-top: -20px;}
1118
  #wpdcom.wpd-layout-2 .wpd-comment-header .wpd-reply-to{margin-right: 10px;}
@@ -1121,8 +1128,10 @@ _:-ms-lang(x), #wpdcom.wpd-layout-3 .wpd-comment.wpd-reply .wpd-comment-footer .
1121
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-left {width: 45px;}
1122
  #wpdcom.wpd-layout-3 .wpd-form .wpd-avatar img, #wpdcom.wpd-layout-3 .wpd-form .wpd-avatar img.avatar, #wpdcom.wpd-layout-3 .wpd-comment .wpd-avatar img, #wpdcom.wpd-layout-3 .wpd-comment .wpd-avatar img.avatar {width: 40px;height: 40px;max-width: none;padding: 2px;}
1123
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-header .wpd-comment-author {padding-left: 55px;}
 
 
1124
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-right {border-left: none;border-bottom: none;width: 100%;}
1125
- #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-text {padding-left: 7px;padding-top: 15px;padding-bottom: 17px;font-size: 90%;}
1126
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer {margin-bottom: -10px;margin-left: 7px;}
1127
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote {padding-left: 0;margin-left: 0;}
1128
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote-up, #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote-down {border: none;padding: 0;width: 16px;height: 16px;background-color:none;}
@@ -1145,4 +1154,8 @@ _:-ms-lang(x), #wpdcom.wpd-layout-3 .wpd-comment.wpd-reply .wpd-comment-footer .
1145
  #wpdcom.wpd-layout-3 .wpd-comment.wpd-reply .wpd-comment-footer{margin-left: 10px;}
1146
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote-up.wpd-up,
1147
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote-down.wpd-down{border: none;}
 
 
 
 
1148
  }
100
  #wpd-post-rating .wpd-rating-wrap .wpd-rating-value:hover{background-color: #555555; transition:0.5s;}
101
  #wpd-post-rating .wpd-rating-wrap .wpd-rating-stars{margin-top:7px; display: flex; flex-wrap: nowrap; flex-direction: row; justify-content: center;}
102
  #wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg{ width: 26px; height: 26px; display: block; margin-right: -3px;}
 
 
103
 
104
  #wpd-post-rating.wpd-not-rated .wpd-rating-wrap .wpd-rating-data:hover .wpd-rating-stars{display:none;}
105
  #wpd-post-rating.wpd-not-rated .wpd-rating-wrap .wpd-rating-data:hover .wpd-rate-starts{display:flex;}
106
  #wpd-post-rating .wpd-rating-wrap .wpd-rate-starts{display:none;margin-top:7px; flex-wrap: nowrap; flex-direction: row; justify-content: center;}
107
  #wpd-post-rating .wpd-rating-wrap .wpd-rate-starts svg{ width: 26px; height: 26px; display: block; margin-right: -3px;}
 
 
 
108
 
109
  .wpd-rating{display: flex; flex-wrap: wrap; flex-direction: row; justify-content: center; align-items: center; width: 100%; margin-top: 20px; margin-bottom: 30px;}
110
  .wpd-rating .wpd-rating-wrap{width: 30%;display: flex; flex-wrap: nowrap; flex-direction: row; justify-content: center; align-items: center; align-content: center; text-align: center; }
212
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap{padding-bottom: 10px;}
213
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt{flex-wrap: wrap;}
214
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wpd-avatar{flex-basis: 69px; margin-right: 0;}
215
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wpd-textarea-wrap{flex-basis: calc( 100% - 70px );}
216
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wpd-textarea-wrap .quicktags-toolbar{ width: 100%; margin-bottom: 1px;}
217
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wpd-textarea-wrap textarea{width: 100%;}
218
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wmu-upload-wrap {flex-basis: 100%;text-align: right; margin-top: 3px;}
219
  #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wmu-upload-wrap i{color: #888; font-size: 18px;}
220
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt [wpd-tooltip]::after{left:auto; margin-left: -35px;}
221
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt [wpd-tooltip]::before{right: 25px; left:auto;}
222
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .quicktags-toolbar .ed_button {opacity: 0.8; box-shadow:none; background: #eeeeee; color: #666; font-size: 13px; padding: 1px 12px; margin: 2px 1px; display: inline-block; border-radius: 0; line-height: 20px;}
223
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .quicktags-toolbar .ed_button:hover{opacity: 1;}
224
 
225
  /* COMMENT FORM | BUTTONS */
226
  #wpdcom input[type="button"],
248
  #wpdcom .ql-editor{min-height: 65px; border-bottom-color: #fff; word-break: break-word;}
249
  #wpdcom .ql-editor::before{ font-size: 16px; color: #aaa; letter-spacing: 1px;}
250
  #wpdcom .ql-editor > * { cursor: text; font-size: 15px; letter-spacing: 0.5px; font-family: Arial; font-weight: normal; color: #666666;}
251
+ #wpdcom .ql-editor blockquote {margin-top: 0 !important; margin-bottom: 0 !important;}
252
  #wpdcom .ql-container{border-radius: 3px 3px 0 0; background: #fff; border-bottom: none; border-color: #dddddd;}
253
  #wpdcom .ql-toolbar {padding: 8px 8px 3px 5px; background-color: #fafafa; border-top: none; border-radius: 0 0 3px 3px; border-color: #dddddd;}
254
  #wpdcom .ql-toolbar.wpd-toolbar-hidden{display:none;}
485
  #wpdcom .wpd-comment-text video,
486
  #wpdcom .wpd-comment-text audio{max-width: 100% !important;}
487
  #wpdcom .wpd-comment-text iframe{width: 480px; height: 280px;}
488
+ #wpdcom .wpd-comment-text blockquote {margin: 5px auto 5px 15px;padding: 2px 10px;font-size: 14px;}
489
+ #wpdcom .wpd-comment-text blockquote p {margin-bottom: 5px;}
490
  #wpdcom .wpd-comment-text .wpd-inline-feedback-wrapper {font-style: italic; font-size: 15px; padding: 15px; background: #fffce1; margin-bottom: 10px; color: #777;}
491
  #wpdcom .wpd-comment-text .wpd-inline-feedback-wrapper .wpd-inline-feedback-info{font-style: normal; font-weight: 600;}
492
  #wpdcom .wpd-comment-text .wpd-inline-feedback-wrapper i.fa-quote-left { margin-right: 8px;font-size: 17px;color:#999797;}
1060
  #wpdcom .wpd-auth {margin: 0 0 2px -3px;}
1061
  #wpdcom .wpd-social-login .wpd-connect-with{display: none!important;}
1062
  #wpdcom .wpd-form .wpd-avatar{display: none;}
1063
+ #wpdcom .wpd-form.wpd-form-wrapper{padding-right: 5px;}
1064
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt textarea{flex-basis: 100%; width: 100%;}
1065
  #wpdcom .wpdiscuz_select{font-size: 16px !important;}
1066
  #wpdcom .wpdiscuz-subscribe-form-email {font-size: 16px; display: block; padding: 10px 0 0 0; width: 98%; margin: 0 auto;}
1067
  #wpdcom .wpdiscuz-subscribe-form-email input[type="email"]{font-size: 16px !important;}
1082
  #wpdcom .wpd-field-radio .wpd-field-label, #wpdcom .wpd-field-checkbox .wpd-field-label{font-size: 14px;}
1083
  #wpdcom .wpd-form-col-left .wpd-field-group .wpd-field-group-title, #wpdcom .wpd-form-col-right .wpd-field-group .wpd-field-group-title, #wpdcom .wpd-form-col-full .wpd-field-group .wpd-field-group-title{font-size: 14px;}
1084
  #wpdcom .wpd-form-row .wpdiscuz-item input[type="text"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="password"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="email"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="url"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="color"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="date"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="datetime"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="datetime-local"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="month"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="number"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="time"], #wpdcom .wpd-form-row .wpdiscuz-item input[type="week"], #wpdcom textarea, #wpdcom select, #wpdcom .wpd-form-row .wpd-field{font-size: 16px!important; height: auto;}
1085
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .wpd-textarea-wrap{flex-basis: 100%; width: 100%;}
1086
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .quicktags-toolbar{margin-bottom: 2px;}
1087
+ #wpdcom .wpd-form .wpdiscuz-textarea-wrap.wpd-txt .quicktags-toolbar .ed_button {font-size: 14px; width: 19%;}
1088
  /* Comment Threads */
1089
  #wpdiscuz-comment-message{width: 97%; }
1090
  #wpdcom .wpd-hidden {visibility: visible; opacity: 1;}
1119
  #wpdcom.wpd-layout-2 .wpd-reply {margin-left: 0px;}
1120
  #wpdcom.wpd-layout-2 .wpd-reply.wpd_comment_level-2{margin-left: 15px;}
1121
  #wpdcom.wpd-layout-2 .wpd-comment .wpd-comment-header .wpd-user-info {width:100%; display: flex; flex-direction:row; justify-content: flex-start; flex-grow: 0;margin-bottom: -3px;float: right;margin-left: 61px;flex-wrap: wrap;margin-top: -44px;}
1122
+ #wpdcom.wpd-layout-2 .wpd-comment .wpd-comment-header .wpd-user-info .wpd-uinfo-top {flex-wrap: wrap!important;}
1123
  #wpdcom.wpd-layout-2 .wpd-comment.wpd-reply .wpd-comment-header .wpd-comment-date{padding-left: 0;}
1124
  #wpdcom.wpd-layout-2 .wpd-comment-header .wpd-comment-link {margin-bottom: 0; padding-top: 1px; align-items: normal; flex-basis: 100%; text-align: right; margin-top: -20px;}
1125
  #wpdcom.wpd-layout-2 .wpd-comment-header .wpd-reply-to{margin-right: 10px;}
1128
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-left {width: 45px;}
1129
  #wpdcom.wpd-layout-3 .wpd-form .wpd-avatar img, #wpdcom.wpd-layout-3 .wpd-form .wpd-avatar img.avatar, #wpdcom.wpd-layout-3 .wpd-comment .wpd-avatar img, #wpdcom.wpd-layout-3 .wpd-comment .wpd-avatar img.avatar {width: 40px;height: 40px;max-width: none;padding: 2px;}
1130
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-header .wpd-comment-author {padding-left: 55px;}
1131
+ #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-header,
1132
+ #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-subheader{justify-content: flex-start;}
1133
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-right {border-left: none;border-bottom: none;width: 100%;}
1134
+ #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-text {padding-left: 7px;padding-top: 15px;padding-bottom: 17px;font-size: 100%;}
1135
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer {margin-bottom: -10px;margin-left: 7px;}
1136
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote {padding-left: 0;margin-left: 0;}
1137
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote-up, #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote-down {border: none;padding: 0;width: 16px;height: 16px;background-color:none;}
1154
  #wpdcom.wpd-layout-3 .wpd-comment.wpd-reply .wpd-comment-footer{margin-left: 10px;}
1155
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote-up.wpd-up,
1156
  #wpdcom.wpd-layout-3 .wpd-comment .wpd-comment-footer .wpd-vote-down.wpd-down{border: none;}
1157
+ /* Tooltip */
1158
+ [wpd-tooltip-size='small']::after{min-width: 60px;}
1159
+ [wpd-tooltip-size='medium']::after{min-width: 90px;}
1160
+ [wpd-tooltip-size='long']::after{min-width: 200px;}
1161
  }
utils/class.WpdiscuzHelper.php CHANGED
@@ -33,6 +33,7 @@ class WpdiscuzHelper implements WpDiscuzConstants {
33
  if ($this->options->content["enableShortcodes"]) {
34
  add_filter("comment_text", [&$this, "doShortcode"], 10, 3);
35
  }
 
36
  add_filter("wp_update_comment_data", [&$this, "commentDataArr"], 10, 3);
37
  add_action("post_updated", [&$this, "checkFeedbackShortcodes"], 10, 3);
38
  add_filter("comment_row_actions", [&$this, "commentRowStickAction"], 10, 2);
@@ -155,7 +156,7 @@ class WpdiscuzHelper implements WpDiscuzConstants {
155
  if (strpos($url, get_site_url()) !== 0) {
156
  $rel .= " nofollow";
157
  }
158
- return "<a rel='$rel' target='_blank' href='" . esc_url_raw($url) . "'><img alt='comment image' src='" . esc_url_raw($url) . "' /></a>";
159
  }
160
 
161
  /**
@@ -236,8 +237,8 @@ class WpdiscuzHelper implements WpDiscuzConstants {
236
 
237
  public static function strWordCount($content) {
238
  $words = preg_split("/[\n\r\t ]+/", $content, -1, PREG_SPLIT_NO_EMPTY);
239
- $words = array_filter($words, function ($w){
240
- return $w !== "&nbsp;";
241
  });
242
  return count($words);
243
  }
@@ -680,7 +681,7 @@ class WpdiscuzHelper implements WpDiscuzConstants {
680
  if (strlen($whatsapp_content) < $length) {
681
  $whatsapp_content .= "... ";
682
  }
683
- $whatsapp_content = urlencode($whatsapp_content) . ' URL: ' . $commentLink;
684
  return $whatsapp_content;
685
  }
686
 
@@ -779,14 +780,14 @@ class WpdiscuzHelper implements WpDiscuzConstants {
779
  foreach ($users as $k => $user) {
780
  $user_link = "";
781
  if (class_exists("BuddyPress")) {
782
- $user_link = bp_core_get_user_domain($user["ID"]);
783
  }
784
  if (class_exists("UM_API")) {
785
- um_fetch_user($user["ID"]);
786
  $user_link = um_user_profile_url();
787
  }
788
  if (!$user_link) {
789
- $user_link = get_author_posts_url($user["ID"]);
790
  }
791
  if ($user_link) {
792
  $replacement = "<a href='" . $user_link . "' rel='author'>@" . $user["name"] . "</a>";
@@ -810,10 +811,11 @@ class WpdiscuzHelper implements WpDiscuzConstants {
810
  public function getMentionedUsers($content) {
811
  $users = [];
812
  if (preg_match_all("/(@[^\s\,\@\.\!\?\#\$\%\:\;\'\"\`\~\)\(\}\{\|\\\[\]]*)/is", $content, $nicenames)) {
813
- $nicenames = array_unique($nicenames[0]);
 
814
  foreach ($nicenames as $k => $nicename) {
815
  if ($user = get_user_by("slug", ltrim($nicename, "@"))) {
816
- $users[] = ["replace" => $nicename, "ID" => $user->ID, "name" => $user->display_name, "email" => $user->user_email];
817
  }
818
  }
819
  }
@@ -821,7 +823,7 @@ class WpdiscuzHelper implements WpDiscuzConstants {
821
  }
822
 
823
  public function checkFeedbackShortcodes($post_ID, $post_after, $post_before) {
824
- if (comments_open($post_ID) && $post_after->post_status === "publish" && ($form = $this->wpdiscuzForm->getForm($post_ID)) && $form->getFormID()) {
825
  preg_match_all(self::$inlineFormPattern, $post_before->post_content, $matchesBefore, PREG_SET_ORDER);
826
  preg_match_all(self::$inlineFormPattern, $post_after->post_content, $matchesAfter, PREG_SET_ORDER);
827
  if ($matchesAfter || $matchesBefore) {
@@ -840,21 +842,26 @@ class WpdiscuzHelper implements WpDiscuzConstants {
840
  }
841
  }
842
  foreach ($matchesAfter as $k => $matchAfter) {
843
- if (isset($matchAfter[3]) && preg_match_all(self::$inlineFormAttsPattern, $matchAfter[3], $attsAfter, PREG_SET_ORDER)) {
844
- $atts = [];
845
- foreach ($attsAfter as $k1 => $attrAfter) {
846
- $atts[$attrAfter[1]] = $attrAfter[2];
847
  }
848
- $atts["content"] = $matchAfter[5];
849
- $atts = array_merge($defaultAtts, $atts);
850
- if (($atts["id"] = trim($atts["id"])) && ($atts["question"] = strip_tags($atts["question"]))) {
851
- if (isset($inlineFormsBefore[$atts["id"]])) {
852
- if ($atts["question"] !== $inlineFormsBefore[$atts["id"]]["question"] || $atts["opened"] !== $inlineFormsBefore[$atts["id"]]["opened"]) {
853
- $this->dbManager->updateFeedbackForm($post_ID, $atts["id"], $atts["question"], $atts["opened"]);
 
 
 
 
 
 
 
 
 
854
  }
855
- unset($inlineFormsBefore[$atts["id"]]);
856
- } else {
857
- $this->dbManager->addFeedbackForm($post_ID, $atts["id"], $atts["question"], $atts["opened"], $atts["content"]);
858
  }
859
  }
860
  }
@@ -967,6 +974,12 @@ class WpdiscuzHelper implements WpDiscuzConstants {
967
  return $author_name;
968
  }
969
 
 
 
 
 
 
 
970
  public function addRatingResetButton($postType, $post) {
971
  $form = $this->wpdiscuzForm->getForm($post->ID);
972
  if ($form->getFormID() && ($form->getEnableRateOnPost() || $form->getRatingsExists())) {
@@ -1146,6 +1159,13 @@ class WpdiscuzHelper implements WpDiscuzConstants {
1146
  #wpdcom .wpdiscuz-item .wpdiscuz-rating > input:checked + label:hover ~ label,
1147
  #wpdcom .wpdiscuz-item .wpdiscuz-rating > input:checked ~ label:hover ~ label, .wpd-custom-field .wcf-active-star,
1148
  #wpdcom .wpdiscuz-item .wpdiscuz-rating > input:checked ~ label{ color:<?php echo $this->options->rating["ratingActiveColor"]; ?>;}
 
 
 
 
 
 
 
1149
  #wpdcom .wpd-comment .wpd-follow-active{color:#ff7a00;}
1150
  #wpdcom .page-numbers{color:#555;border:#555 1px solid;}
1151
  #wpdcom span.current{background:#555;}
33
  if ($this->options->content["enableShortcodes"]) {
34
  add_filter("comment_text", [&$this, "doShortcode"], 10, 3);
35
  }
36
+ add_filter("comment_text", [&$this, "multipleBlockquotesToOne"], 100);
37
  add_filter("wp_update_comment_data", [&$this, "commentDataArr"], 10, 3);
38
  add_action("post_updated", [&$this, "checkFeedbackShortcodes"], 10, 3);
39
  add_filter("comment_row_actions", [&$this, "commentRowStickAction"], 10, 2);
156
  if (strpos($url, get_site_url()) !== 0) {
157
  $rel .= " nofollow";
158
  }
159
+ return apply_filters("wpdiscuz_source_to_image_conversion", "<a rel='$rel' target='_blank' href='" . esc_url_raw($url) . "'><img alt='comment image' src='" . esc_url_raw($url) . "' /></a>", $url);
160
  }
161
 
162
  /**
237
 
238
  public static function strWordCount($content) {
239
  $words = preg_split("/[\n\r\t ]+/", $content, -1, PREG_SPLIT_NO_EMPTY);
240
+ $words = array_filter($words, function ($w) {
241
+ return $w !== "&nbsp;";
242
  });
243
  return count($words);
244
  }
681
  if (strlen($whatsapp_content) < $length) {
682
  $whatsapp_content .= "... ";
683
  }
684
+ $whatsapp_content = urlencode($whatsapp_content) . ' URL: ' . urlencode($commentLink);
685
  return $whatsapp_content;
686
  }
687
 
780
  foreach ($users as $k => $user) {
781
  $user_link = "";
782
  if (class_exists("BuddyPress")) {
783
+ $user_link = bp_core_get_user_domain($user["u_id"]);
784
  }
785
  if (class_exists("UM_API")) {
786
+ um_fetch_user($user["u_id"]);
787
  $user_link = um_user_profile_url();
788
  }
789
  if (!$user_link) {
790
+ $user_link = get_author_posts_url($user["u_id"]);
791
  }
792
  if ($user_link) {
793
  $replacement = "<a href='" . $user_link . "' rel='author'>@" . $user["name"] . "</a>";
811
  public function getMentionedUsers($content) {
812
  $users = [];
813
  if (preg_match_all("/(@[^\s\,\@\.\!\?\#\$\%\:\;\'\"\`\~\)\(\}\{\|\\\[\]]*)/is", $content, $nicenames)) {
814
+ $nicenames = array_map("strip_tags", $nicenames[0]);
815
+ $nicenames = array_unique($nicenames);
816
  foreach ($nicenames as $k => $nicename) {
817
  if ($user = get_user_by("slug", ltrim($nicename, "@"))) {
818
+ $users[] = ["replace" => $nicename, "u_id" => $user->ID, "name" => $user->display_name, "email" => $user->user_email];
819
  }
820
  }
821
  }
823
  }
824
 
825
  public function checkFeedbackShortcodes($post_ID, $post_after, $post_before) {
826
+ if (comments_open($post_ID) && ($form = $this->wpdiscuzForm->getForm($post_ID)) && $form->getFormID()) {
827
  preg_match_all(self::$inlineFormPattern, $post_before->post_content, $matchesBefore, PREG_SET_ORDER);
828
  preg_match_all(self::$inlineFormPattern, $post_after->post_content, $matchesAfter, PREG_SET_ORDER);
829
  if ($matchesAfter || $matchesBefore) {
842
  }
843
  }
844
  foreach ($matchesAfter as $k => $matchAfter) {
845
+ if (isset($matchAfter[3])) {
846
+ if (function_exists("use_block_editor_for_post") && use_block_editor_for_post($post_ID)) {
847
+ $matchAfter[3] = json_decode('"' . $matchAfter[3] . '"');
 
848
  }
849
+ if (preg_match_all(self::$inlineFormAttsPattern, $matchAfter[3], $attsAfter, PREG_SET_ORDER)) {
850
+ $atts = [];
851
+ foreach ($attsAfter as $k1 => $attrAfter) {
852
+ $atts[$attrAfter[1]] = $attrAfter[2];
853
+ }
854
+ $atts["content"] = $matchAfter[5];
855
+ $atts = array_merge($defaultAtts, $atts);
856
+ if (($atts["id"] = trim($atts["id"])) && ($atts["question"] = strip_tags($atts["question"]))) {
857
+ if (isset($inlineFormsBefore[$atts["id"]])) {
858
+ if ($atts["question"] !== $inlineFormsBefore[$atts["id"]]["question"] || $atts["opened"] !== $inlineFormsBefore[$atts["id"]]["opened"]) {
859
+ $this->dbManager->updateFeedbackForm($post_ID, $atts["id"], $atts["question"], $atts["opened"]);
860
+ }
861
+ unset($inlineFormsBefore[$atts["id"]]);
862
+ } else {
863
+ $this->dbManager->addFeedbackForm($post_ID, $atts["id"], $atts["question"], $atts["opened"], $atts["content"]);
864
  }
 
 
 
865
  }
866
  }
867
  }
974
  return $author_name;
975
  }
976
 
977
+ public function multipleBlockquotesToOne($content) {
978
+ $content = preg_replace('~<\/blockquote>\s?<blockquote>~is', '</p><p>', $content);
979
+ $content = preg_replace('~<\/code>\s?<code>~is', '</p><p>', $content);
980
+ return $content;
981
+ }
982
+
983
  public function addRatingResetButton($postType, $post) {
984
  $form = $this->wpdiscuzForm->getForm($post->ID);
985
  if ($form->getFormID() && ($form->getEnableRateOnPost() || $form->getRatingsExists())) {
1159
  #wpdcom .wpdiscuz-item .wpdiscuz-rating > input:checked + label:hover ~ label,
1160
  #wpdcom .wpdiscuz-item .wpdiscuz-rating > input:checked ~ label:hover ~ label, .wpd-custom-field .wcf-active-star,
1161
  #wpdcom .wpdiscuz-item .wpdiscuz-rating > input:checked ~ label{ color:<?php echo $this->options->rating["ratingActiveColor"]; ?>;}
1162
+ #wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg .wpd-star{fill: <?php echo $this->options->rating["ratingInactiveColor"]; ?>;}
1163
+ #wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg .wpd-active{fill:<?php echo $this->options->rating["ratingActiveColor"]; ?>;}
1164
+ #wpd-post-rating .wpd-rating-wrap .wpd-rate-starts svg .wpd-star{fill:<?php echo $this->options->rating["ratingInactiveColor"]; ?>;}
1165
+ #wpd-post-rating .wpd-rating-wrap .wpd-rate-starts:hover svg .wpd-star{fill:<?php echo $this->options->rating["ratingHoverColor"]; ?>;}
1166
+ #wpd-post-rating.wpd-not-rated .wpd-rating-wrap .wpd-rate-starts svg:hover ~ svg .wpd-star{ fill:<?php echo $this->options->rating["ratingInactiveColor"]; ?>;}
1167
+ .wpdiscuz-post-rating-wrap .wpd-rating .wpd-rating-wrap .wpd-rating-stars svg .wpd-star{fill:<?php echo $this->options->rating["ratingInactiveColor"]; ?>;}
1168
+ .wpdiscuz-post-rating-wrap .wpd-rating .wpd-rating-wrap .wpd-rating-stars svg .wpd-active{fill:<?php echo $this->options->rating["ratingActiveColor"]; ?>;}
1169
  #wpdcom .wpd-comment .wpd-follow-active{color:#ff7a00;}
1170
  #wpdcom .page-numbers{color:#555;border:#555 1px solid;}
1171
  #wpdcom span.current{background:#555;}
utils/class.WpdiscuzHelperAjax.php CHANGED
@@ -21,7 +21,8 @@ class WpdiscuzHelperAjax implements WpDiscuzConstants {
21
  add_action("wp_ajax_wpdCloseThread", [&$this, "closeThread"]);
22
  add_action("wp_ajax_wpdDeactivate", [&$this, "deactivate"]);
23
  add_action("wp_ajax_wpdImportSTCR", [&$this, "importSTCR"]);
24
- add_action("wp_ajax_wpdImportCIR", [&$this, "importCIR"]);
 
25
  add_action("wp_ajax_wpdFollowUser", [&$this, "followUser"]);
26
  add_action("wp_ajax_wpdRegenerateVoteMetas", [&$this, "regenerateVoteMetas"]);
27
  add_action("wp_ajax_wpdRegenerateClosedComments", [&$this, "regenerateClosedComments"]);
@@ -176,6 +177,9 @@ class WpdiscuzHelperAjax implements WpDiscuzConstants {
176
  wp_die(json_encode($response));
177
  }
178
 
 
 
 
179
  public function importSTCR() {
180
  $response = ["progress" => 0];
181
  $stcrData = isset($_POST["stcrData"]) ? $_POST["stcrData"] : "";
@@ -205,86 +209,27 @@ class WpdiscuzHelperAjax implements WpDiscuzConstants {
205
  }
206
 
207
  /**
208
- * Import images uploaded via "Comment Images Reloaded" plugin
209
  */
210
- public function importCIR() {
211
  $response = ["progress" => 0];
212
- $cirData = isset($_POST["cirData"]) ? $_POST["cirData"] : "";
213
- if ($cirData) {
214
- parse_str($cirData, $data);
215
- $limit = 100;
216
- $step = isset($data["cir-step"]) ? intval($data["cir-step"]) : 0;
217
- $cirImagesCount = isset($data["cir-images-count"]) ? intval($data["cir-images-count"]) : 0;
218
- $nonce = isset($data["wpd-cir-images"]) ? trim($data["wpd-cir-images"]) : "";
219
- if (wp_verify_nonce($nonce, "wc_tools_form") && $cirImagesCount) {
220
  $offset = $limit * $step;
221
  if ($limit && $offset >= 0) {
222
- $cirMetakey = "comment_image_reloaded";
223
- $commentIds = get_comments(
224
- [
225
- "number" => $limit,
226
- "offset" => $offset,
227
- "fields" => "ids",
228
- "orderby" => "comment_date",
229
- "order" => "asc",
230
- "meta_query" => [
231
- [
232
- "key" => $cirMetakey,
233
- "value" => "",
234
- "compare" => "!="
235
- ]
236
- ]
237
- ]
238
- );
239
-
240
- if ($commentIds) {
241
- if (apply_filters("wpdiscuz_mu_import_cir_images", false)) {
242
- foreach ($commentIds as $commentId) {
243
- $cirAttachmentIds = get_comment_meta($commentId, $cirMetakey, true);
244
- if ($cirAttachmentIds && is_array(maybe_unserialize($cirAttachmentIds))) {
245
- $wpdiscuzMUMeta = get_comment_meta($commentId, self::METAKEY_ATTACHMENTS, true);
246
- foreach ($cirAttachmentIds as $cirAttachId) {
247
- $cirAttachPath = $cirAttachId ? get_attached_file($cirAttachId) : false;
248
- if ($cirAttachPath && getimagesize($cirAttachPath)) {
249
-
250
- if (!$wpdiscuzMUMeta) {
251
- $wpdiscuzMUMeta = ["images" => []];
252
- }
253
-
254
- if (isset($wpdiscuzMUMeta["images"]) && is_array($wpdiscuzMUMeta["images"]) && !in_array($cirAttachId, $wpdiscuzMUMeta["images"])) {
255
- $wpdiscuzMUMeta["images"][] = $cirAttachId;
256
-
257
- update_post_meta($cirAttachId, "_wp_attachment_image_alt", get_the_title($cirAttachId));
258
- update_post_meta($cirAttachId, self::METAKEY_ATTCHMENT_OWNER_IP, "127.0.0.1");
259
- update_post_meta($cirAttachId, self::METAKEY_ATTCHMENT_COMMENT_ID, $commentId);
260
- update_post_meta($cirAttachId, self::METAKEY_IMPORTED_FROM, $cirMetakey);
261
- }
262
- }
263
- }
264
- update_comment_meta($commentId, self::METAKEY_ATTACHMENTS, $wpdiscuzMUMeta);
265
- }
266
- }
267
- //$wpdiscuzMUMeta = get_comment_meta($commentId, self::METAKEY_ATTACHMENTS, true);
268
- } else {
269
- foreach ($commentIds as $commentId) {
270
- $cirAttachmentIds = get_comment_meta($commentId, $cirMetakey, true);
271
- if ($cirAttachmentIds && is_array(maybe_unserialize($cirAttachmentIds))) {
272
- if (!get_comment_meta($commentId, self::METAKEY_ATTACHMENTS, true)) {
273
- $cirAttachId = intval($cirAttachmentIds[0]);
274
- $cirAttachPath = $cirAttachId ? get_attached_file($cirAttachId) : false;
275
- if ($cirAttachPath && getimagesize($cirAttachPath)) {
276
- $wpdiscuzMUMeta = ["images" => [$cirAttachId]];
277
- update_comment_meta($commentId, self::METAKEY_ATTACHMENTS, $wpdiscuzMUMeta);
278
- }
279
- }
280
- }
281
- }
282
- }
283
-
284
  ++$step;
285
  $response["step"] = $step;
286
- $progress = $offset ? $offset * 100 / $cirImagesCount : $limit * 100 / $cirImagesCount;
287
- $response["progress"] = (($p = intval($progress)) > 100) ? 100 : $p;
288
  } else {
289
  $response["progress"] = 100;
290
  }
@@ -653,6 +598,7 @@ class WpdiscuzHelperAjax implements WpDiscuzConstants {
653
  $commentContent = $this->helper->makeClickable($commentContent);
654
  }
655
  $commentContent = apply_filters("comment_text", $commentContent, $comment, ["is_wpdiscuz_comment" => true]);
 
656
  $inlineContent = "";
657
  if ($inlineFormID = intval(get_comment_meta($comment->comment_ID, self::META_KEY_FEEDBACK_FORM_ID, true))) {
658
  $feedbackForm = $this->dbManager->getFeedbackForm($inlineFormID);
@@ -810,7 +756,7 @@ class WpdiscuzHelperAjax implements WpDiscuzConstants {
810
  $inline_form_id = !empty($_POST["inline_form_id"]) ? intval($_POST["inline_form_id"]) : 0;
811
  if ($inline_form_id && ($inline_form = $this->dbManager->getFeedbackForm($inline_form_id))) {
812
  $args = [
813
- "orderby" => "comment_ID",
814
  "order" => "DESC",
815
  "number" => 3,
816
  "meta_query" => [
21
  add_action("wp_ajax_wpdCloseThread", [&$this, "closeThread"]);
22
  add_action("wp_ajax_wpdDeactivate", [&$this, "deactivate"]);
23
  add_action("wp_ajax_wpdImportSTCR", [&$this, "importSTCR"]);
24
+ add_action("wp_ajax_wpdImportLSTC", [&$this, "importLSTC"]);
25
+
26
  add_action("wp_ajax_wpdFollowUser", [&$this, "followUser"]);
27
  add_action("wp_ajax_wpdRegenerateVoteMetas", [&$this, "regenerateVoteMetas"]);
28
  add_action("wp_ajax_wpdRegenerateClosedComments", [&$this, "regenerateClosedComments"]);
177
  wp_die(json_encode($response));
178
  }
179
 
180
+ /**
181
+ * Import subscriptions from "Subscribe To Comments Reloaded" plugin
182
+ */
183
  public function importSTCR() {
184
  $response = ["progress" => 0];
185
  $stcrData = isset($_POST["stcrData"]) ? $_POST["stcrData"] : "";
209
  }
210
 
211
  /**
212
+ * Import subscriptions from "Lightweight Subscribe To Comments" plugin
213
  */
214
+ public function importLSTC() {
215
  $response = ["progress" => 0];
216
+ $lstcData = isset($_POST["lstcData"]) ? $_POST["lstcData"] : "";
217
+ if ($lstcData) {
218
+ parse_str($lstcData, $data);
219
+ $limit = 50;
220
+ $step = isset($data["lstc-step"]) ? intval($data["lstc-step"]) : 0;
221
+ $lstcSubscriptionsCount = isset($data["lstc-subscriptions-count"]) ? intval($data["lstc-subscriptions-count"]) : 0;
222
+ $nonce = isset($data["wpd-lstc-subscriptions"]) ? trim($data["wpd-lstc-subscriptions"]) : "";
223
+ if (wp_verify_nonce($nonce, "wc_tools_form") && $lstcSubscriptionsCount) {
224
  $offset = $limit * $step;
225
  if ($limit && $offset >= 0) {
226
+ $subscriptions = $this->dbManager->getLstcSubscriptions($limit, $offset);
227
+ if ($subscriptions) {
228
+ $this->dbManager->addLstcSubscriptions($subscriptions);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  ++$step;
230
  $response["step"] = $step;
231
+ $progress = $offset ? $offset * 100 / $lstcSubscriptionsCount : $limit * 100 / $lstcSubscriptionsCount;
232
+ $response["progress"] = ($prg = intval($progress)) > 100 ? 100 : $prg;
233
  } else {
234
  $response["progress"] = 100;
235
  }
598
  $commentContent = $this->helper->makeClickable($commentContent);
599
  }
600
  $commentContent = apply_filters("comment_text", $commentContent, $comment, ["is_wpdiscuz_comment" => true]);
601
+ $commentContent = apply_filters("wpdiscuz_after_read_more", $commentContent, $comment, ["is_wpdiscuz_comment" => true]);
602
  $inlineContent = "";
603
  if ($inlineFormID = intval(get_comment_meta($comment->comment_ID, self::META_KEY_FEEDBACK_FORM_ID, true))) {
604
  $feedbackForm = $this->dbManager->getFeedbackForm($inlineFormID);
756
  $inline_form_id = !empty($_POST["inline_form_id"]) ? intval($_POST["inline_form_id"]) : 0;
757
  if ($inline_form_id && ($inline_form = $this->dbManager->getFeedbackForm($inline_form_id))) {
758
  $args = [
759
+ "orderby" => $this->options->thread_display["orderCommentsBy"],
760
  "order" => "DESC",
761
  "number" => 3,
762
  "meta_query" => [
utils/class.WpdiscuzHelperEmail.php CHANGED
@@ -144,7 +144,7 @@ class WpdiscuzHelperEmail implements WpDiscuzConstants {
144
  $replace = [$siteUrl, get_permalink($comment->comment_post_ID), $blogTitle, $postTitle, $subscriber, get_comment_link($commentId), $commentAuthor, wpautop($comment->comment_content)];
145
  $message = str_replace($search, $replace, $message);
146
 
147
- $subject = str_replace(["[BLOG_TITLE]", "[POST_TITLE]"], [$blogTitle, $postTitle], $subject);
148
 
149
  if (strpos($message, "[UNSUBSCRIBE_URL]") === false) {
150
  $message .= "<br/><br/><a href='$unsubscribeUrl'>" . $this->options->phrases["wc_unsubscribe"] . "</a>";
@@ -314,7 +314,7 @@ class WpdiscuzHelperEmail implements WpDiscuzConstants {
314
  $replace = [$siteUrl, get_permalink($comment->comment_post_ID), $blogTitle, $postTitle, get_comment_link($comment->comment_ID), $comment->comment_author, wpautop($comment->comment_content)];
315
  $message = str_replace($search, $replace, $this->options->phrases["wc_comment_approved_email_message"]);
316
 
317
- $subject = str_replace(["[BLOG_TITLE]", "[POST_TITLE]"], [$blogTitle, $postTitle], $this->options->phrases["wc_comment_approved_email_subject"]);
318
  $headers = [];
319
  $fromName = html_entity_decode($blogTitle, ENT_QUOTES);
320
  $parsedUrl = parse_url($siteUrl);
@@ -380,9 +380,7 @@ class WpdiscuzHelperEmail implements WpDiscuzConstants {
380
  $postUrl = get_permalink($post);
381
  $commentUrl = get_comment_link($comment);
382
 
383
- // TODO send emails
384
  $subject = str_replace(["[BLOG_TITLE]", "[POST_TITLE]"], [$blogTitle, $postTitle], $this->options->phrases["wc_follow_email_subject"]);
385
- $subject = html_entity_decode($subject, ENT_QUOTES);
386
 
387
  $search = ["[SITE_URL]", "[POST_URL]", "[BLOG_TITLE]", "[POST_TITLE]", "[COMMENT_URL]", "[COMMENT_CONTENT]"];
388
  $replace = [$siteUrl, $postUrl, $blogTitle, $postTitle, $commentUrl, wpautop($comment->comment_content)];
@@ -402,9 +400,10 @@ class WpdiscuzHelperEmail implements WpDiscuzConstants {
402
  ];
403
 
404
  foreach ($followersData as $k => $followerData) {
405
- if (($followerData["follower_email"] == $postAuthor->user_email) && (($moderationNotify && $comment->comment_approved === "0") || ($commentsNotify && $comment->comment_approved === "1"))) {
406
  return;
407
  }
 
408
  $message = str_replace(["[COMMENT_AUTHOR]", "[FOLLOWER_NAME]"], [$followerData["user_name"], $followerData["follower_name"]], $message);
409
  $this->emailToFollower($followerData, $comment, $subject, $message, $cancelLink, $data);
410
  do_action("wpdiscuz_notify_followers", $comment, $followerData);
@@ -445,9 +444,11 @@ class WpdiscuzHelperEmail implements WpDiscuzConstants {
445
  $replace = ["", $post_title, $comment_link, $comment_data->comment_author];
446
  foreach ($users as $k => $user) {
447
  if ($user["email"] != $comment_data->comment_author_email) {
448
- $replace[0] = $user["name"];
449
- $body = str_replace($search, $replace, $message);
450
- wp_mail($user["email"], $subject, $body, $headers);
 
 
451
  }
452
  }
453
  }
144
  $replace = [$siteUrl, get_permalink($comment->comment_post_ID), $blogTitle, $postTitle, $subscriber, get_comment_link($commentId), $commentAuthor, wpautop($comment->comment_content)];
145
  $message = str_replace($search, $replace, $message);
146
 
147
+ $subject = str_replace(["[BLOG_TITLE]", "[POST_TITLE]", "[COMMENT_AUTHOR]"], [$blogTitle, $postTitle, $commentAuthor], $subject);
148
 
149
  if (strpos($message, "[UNSUBSCRIBE_URL]") === false) {
150
  $message .= "<br/><br/><a href='$unsubscribeUrl'>" . $this->options->phrases["wc_unsubscribe"] . "</a>";
314
  $replace = [$siteUrl, get_permalink($comment->comment_post_ID), $blogTitle, $postTitle, get_comment_link($comment->comment_ID), $comment->comment_author, wpautop($comment->comment_content)];
315
  $message = str_replace($search, $replace, $this->options->phrases["wc_comment_approved_email_message"]);
316
 
317
+ $subject = str_replace(["[BLOG_TITLE]", "[POST_TITLE]", "[COMMENT_AUTHOR]"], [$blogTitle, $postTitle, $comment->comment_author], $this->options->phrases["wc_comment_approved_email_subject"]);
318
  $headers = [];
319
  $fromName = html_entity_decode($blogTitle, ENT_QUOTES);
320
  $parsedUrl = parse_url($siteUrl);
380
  $postUrl = get_permalink($post);
381
  $commentUrl = get_comment_link($comment);
382
 
 
383
  $subject = str_replace(["[BLOG_TITLE]", "[POST_TITLE]"], [$blogTitle, $postTitle], $this->options->phrases["wc_follow_email_subject"]);
 
384
 
385
  $search = ["[SITE_URL]", "[POST_URL]", "[BLOG_TITLE]", "[POST_TITLE]", "[COMMENT_URL]", "[COMMENT_CONTENT]"];
386
  $replace = [$siteUrl, $postUrl, $blogTitle, $postTitle, $commentUrl, wpautop($comment->comment_content)];
400
  ];
401
 
402
  foreach ($followersData as $k => $followerData) {
403
+ if (($followerData["follower_email"] === $postAuthor->user_email) && (($moderationNotify && $comment->comment_approved === "0") || ($commentsNotify && $comment->comment_approved === "1"))) {
404
  return;
405
  }
406
+ $subject = str_replace(["[COMMENT_AUTHOR]"], [$followerData["user_name"]], $this->options->phrases["wc_follow_email_subject"]);
407
  $message = str_replace(["[COMMENT_AUTHOR]", "[FOLLOWER_NAME]"], [$followerData["user_name"], $followerData["follower_name"]], $message);
408
  $this->emailToFollower($followerData, $comment, $subject, $message, $cancelLink, $data);
409
  do_action("wpdiscuz_notify_followers", $comment, $followerData);
444
  $replace = ["", $post_title, $comment_link, $comment_data->comment_author];
445
  foreach ($users as $k => $user) {
446
  if ($user["email"] != $comment_data->comment_author_email) {
447
+ if (apply_filters("wpducm_mail_to_mentioned_user", true, $user, $comment_data)) {
448
+ $replace[0] = $user["name"];
449
+ $body = str_replace($search, $replace, $message);
450
+ wp_mail($user["email"], $subject, $body, $headers);
451
+ }
452
  }
453
  }
454
  }
utils/class.WpdiscuzHelperUpload.php CHANGED
@@ -15,6 +15,7 @@ class WpdiscuzHelperUpload implements WpDiscuzConstants {
15
  private $wpUploadsUrl;
16
  private $currentUser;
17
  private $requestUri;
 
18
 
19
  public function __construct($options, $dbManager, $wpdiscuzForm, $helper) {
20
  $this->options = $options;
@@ -26,31 +27,33 @@ class WpdiscuzHelperUpload implements WpDiscuzConstants {
26
  $this->wpUploadsPath = $wpUploadsDir["path"];
27
  $this->wpUploadsUrl = $wpUploadsDir["url"];
28
  $this->requestUri = isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : "";
 
 
 
29
 
30
- add_filter("wpdiscuz_editor_buttons_html", [&$this, "uploadButtons"], 1, 2);
31
- add_action("wpdiscuz_button_actions", [&$this, "uploadPreview"], 1, 2);
 
32
 
33
- add_filter("wpdiscuz_comment_list_args", [&$this, "commentListArgs"]);
34
- add_filter("comment_text", [&$this, "getAttachments"], 100, 3);
 
35
 
36
- add_action("comment_post", [&$this, "addAttachments"]);
37
- add_filter("wpdiscuz_comment_post", [&$this, "postComment"], 10);
38
- add_filter("wpdiscuz_ajax_callbacks", [&$this, "wmuImageCallbacks"], 10);
39
 
40
- add_action("wp_ajax_wmuUploadFiles", [&$this, "uploadFiles"]);
41
- add_action("wp_ajax_nopriv_wmuUploadFiles", [&$this, "uploadFiles"]);
42
 
43
- add_action("wp_ajax_wmuRemoveAttachmentPreview", [&$this, "removeAttachmentPreview"]);
44
- add_action("wp_ajax_nopriv_wmuRemoveAttachmentPreview", [&$this, "removeAttachmentPreview"]);
45
 
46
- add_action("wp_ajax_wmuDeleteAttachment", [&$this, "deleteAttachment"]);
47
- add_action("wp_ajax_nopriv_wmuDeleteAttachment", [&$this, "deleteAttachment"]);
48
 
49
- add_action("delete_comment", [&$this, "deleteLinkedAttachments"], 20);
50
- add_action("delete_attachment", [&$this, "deleteAttachmentIdFromMeta"], 20);
51
-
52
- add_filter("wpdiscuz_privacy_personal_data_export", [&$this, "exportPersonalData"], 10, 2);
53
- add_filter("wpdiscuz_do_export_personal_data", "__return_true");
54
  }
55
 
56
  public function uploadButtons($html, $uniqueId) {
@@ -58,7 +61,7 @@ class WpdiscuzHelperUpload implements WpDiscuzConstants {
58
  $type = apply_filters("wpdiscuz_mu_upload_type", "");
59
  $faIcon = apply_filters("wpdiscuz_mu_upload_icon", "far fa-image");
60
  $allowedExts = apply_filters("wpdiscuz_mu_allowed_extensions", "accept='image/*'");
61
- $html .= "<span class='wmu-upload-wrap' wpd-tooltip='" . esc_attr($this->options->phrases["wmuAttachImage"]) . "'>";
62
  $html .= "<label class='wmu-add'>";
63
  $html .= "<i class='$faIcon'></i>";
64
  $html .= "<input style='display:none;' class='wmu-add-files' type='file' name='" . self::INPUT_NAME . "[]' $type $allowedExts/>";
@@ -79,26 +82,35 @@ class WpdiscuzHelperUpload implements WpDiscuzConstants {
79
  }
80
  }
81
 
82
- public function getAttachments($content, $comment, $args = []) {
83
- if ($comment && (isset($args["is_wpdiscuz_comment"]) || ((strpos($this->requestUri, self::PAGE_COMMENTS) !== false) && $this->options->content["wmuIsShowFilesDashboard"]))) {
84
- $attachments = get_comment_meta($comment->comment_ID, self::METAKEY_ATTACHMENTS, true);
85
- if ($attachments && is_array($attachments)) {
86
- // get files from jetpack CDN on ajax calls
87
- add_filter("jetpack_photon_admin_allow_image_downsize", "__return_true");
88
- $content .= "<div class='wmu-comment-attachments'>";
89
- foreach ($attachments as $key => $ids) {
90
- if (!empty($ids)) {
91
- $attachIds = array_map("intval", $ids);
92
- $type = (count($attachIds) > 1) ? "multi" : "single";
93
- if ($key == self::KEY_IMAGES) {
94
- $imgHtml = $this->getAttachedImages($attachIds, $this->currentUser);
95
- $content .= "<div class='wmu-attached-images wmu-count-" . $type . "'>" . $imgHtml . "</div>";
96
- }
97
- $content .= apply_filters("wpdiscuz_mu_get_attachments", "", $attachIds, $this->currentUser, $key);
 
 
 
 
 
 
 
 
98
  }
 
99
  }
100
- $content .= "</div>";
101
  }
 
102
  }
103
  return $content;
104
  }
@@ -310,22 +322,22 @@ class WpdiscuzHelperUpload implements WpDiscuzConstants {
310
  foreach ($files as $file) {
311
  $error = false;
312
  $extension = pathinfo($file["name"], PATHINFO_EXTENSION);
313
- $mimeType = $this->getMimeType($file, $extension);
314
-
315
- if (!$mimeType && $this->getMimeTypeFromContent($file["tmp_name"])) {
316
- $matches = wp_check_filetype($file["name"], $this->options->content["wmuMimeTypes"]);
317
- $mimeType = empty($matches["type"]) ? "" : $matches["type"];
 
318
  }
319
 
320
  if ($this->isAllowedFileType($mimeType)) {
321
  if (empty($extension)) {
322
- if (strpos($mimeType, "image/") !== false) {
323
- $file["name"] .= ".jpg";
324
- } else {
325
- $ext = array_search($mimeType, $this->options->content["wmuMimeTypes"]);
326
- $values = explode("|", $ext);
327
- $filtered = array_values(array_filter($values));
328
- $file["name"] .= empty($filtered[0]) ? "" : "." . $filtered[0];
329
  }
330
  }
331
  $file["type"] = $mimeType;
@@ -367,22 +379,31 @@ class WpdiscuzHelperUpload implements WpDiscuzConstants {
367
 
368
  private function isAllowedFileType($mimeType) {
369
  $isAllowed = false;
370
- if (!empty($this->options->content["wmuMimeTypes"]) && is_array($this->options->content["wmuMimeTypes"])) {
371
- $isAllowed = in_array($mimeType, $this->options->content["wmuMimeTypes"]);
 
 
 
 
 
372
  }
373
  return $isAllowed;
374
  }
375
 
376
  private function getMimeType($file, $extension) {
377
  $mimeType = "";
378
- if (function_exists("mime_content_type")) {
379
- $mimeType = mime_content_type($file["tmp_name"]);
380
- } elseif (function_exists("finfo_open") && function_exists("finfo_file")) {
381
  $finfo = finfo_open(FILEINFO_MIME_TYPE);
382
  $mimeType = finfo_file($finfo, $file["tmp_name"]);
 
 
383
  } elseif ($extension) {
384
- $matches = wp_check_filetype($file["name"], $this->options->content["wmuMimeTypes"]);
385
- $mimeType = empty($matches["type"]) ? "" : $matches["type"];
 
 
 
 
386
  }
387
  return $mimeType;
388
  }
@@ -465,7 +486,8 @@ class WpdiscuzHelperUpload implements WpDiscuzConstants {
465
  global $post;
466
  $gPost = $postObj ? $postObj : $post;
467
  $isAllowed = false;
468
- if ($this->isAllowedPostType($gPost) && !empty($this->options->content["wmuMimeTypes"])) {
 
469
  $currentUser = WpdiscuzHelper::getCurrentUser();
470
  $isUserLoggedIn = !empty($currentUser->ID);
471
  $isGuestAllowed = !$isUserLoggedIn && $this->options->content["wmuIsGuestAllowed"];
@@ -703,6 +725,13 @@ class WpdiscuzHelperUpload implements WpDiscuzConstants {
703
  return ["administrator", "editor", "author", "contributor", "subscriber"];
704
  }
705
 
 
 
 
 
 
 
 
706
  public function getMimeTypeFromContent($path) {
707
  $fileContent = $path && function_exists("file_get_contents") && ($v = file_get_contents($path)) ? $v : "";
708
  if ($fileContent && preg_match('/\A(?:(\xff\xd8\xff)|(GIF8[79]a)|(\x89PNG\x0d\x0a)|(BM)|(\x49\x49(?:\x2a\x00|\x00\x4a))|(FORM.{4}ILBM))/', $fileContent, $hits)) {
@@ -730,7 +759,7 @@ class WpdiscuzHelperUpload implements WpDiscuzConstants {
730
 
731
  foreach ($attachIds as $attachId) {
732
  if (intval($attachId)) {
733
- if ($key == self::KEY_IMAGES) {
734
  $data[] = ["name" => esc_html__("Attached Images", "wpdiscuz"), "value" => wp_get_attachment_url($attachId)];
735
  } else if ($isWmuExists) {
736
  $data = apply_filters("wpdiscuz_mu_export_data", $data, $key, $attachId);
15
  private $wpUploadsUrl;
16
  private $currentUser;
17
  private $requestUri;
18
+ private $mimeTypes = [];
19
 
20
  public function __construct($options, $dbManager, $wpdiscuzForm, $helper) {
21
  $this->options = $options;
27
  $this->wpUploadsPath = $wpUploadsDir["path"];
28
  $this->wpUploadsUrl = $wpUploadsDir["url"];
29
  $this->requestUri = isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : "";
30
+ if ($this->options->content["wmuIsEnabled"]) {
31
+ add_filter("wpdiscuz_editor_buttons_html", [&$this, "uploadButtons"], 1, 2);
32
+ add_action("wpdiscuz_button_actions", [&$this, "uploadPreview"], 1, 2);
33
 
34
+ add_filter("wpdiscuz_comment_list_args", [&$this, "commentListArgs"]);
35
+ add_filter("comment_text", [&$this, "commentText"], 100, 3);
36
+ add_filter("wpdiscuz_after_read_more", [&$this, "afterReadMore"], 100, 3);
37
 
38
+ add_action("comment_post", [&$this, "addAttachments"]);
39
+ add_filter("wpdiscuz_comment_post", [&$this, "postComment"], 10);
40
+ add_filter("wpdiscuz_ajax_callbacks", [&$this, "wmuImageCallbacks"], 10);
41
 
42
+ add_action("wp_ajax_wmuUploadFiles", [&$this, "uploadFiles"]);
43
+ add_action("wp_ajax_nopriv_wmuUploadFiles", [&$this, "uploadFiles"]);
 
44
 
45
+ add_action("wp_ajax_wmuRemoveAttachmentPreview", [&$this, "removeAttachmentPreview"]);
46
+ add_action("wp_ajax_nopriv_wmuRemoveAttachmentPreview", [&$this, "removeAttachmentPreview"]);
47
 
48
+ add_action("wp_ajax_wmuDeleteAttachment", [&$this, "deleteAttachment"]);
49
+ add_action("wp_ajax_nopriv_wmuDeleteAttachment", [&$this, "deleteAttachment"]);
50
 
51
+ add_action("delete_comment", [&$this, "deleteLinkedAttachments"], 20);
52
+ add_action("delete_attachment", [&$this, "deleteAttachmentIdFromMeta"], 20);
53
 
54
+ add_filter("wpdiscuz_privacy_personal_data_export", [&$this, "exportPersonalData"], 10, 2);
55
+ add_filter("wpdiscuz_do_export_personal_data", "__return_true");
56
+ }
 
 
57
  }
58
 
59
  public function uploadButtons($html, $uniqueId) {
61
  $type = apply_filters("wpdiscuz_mu_upload_type", "");
62
  $faIcon = apply_filters("wpdiscuz_mu_upload_icon", "far fa-image");
63
  $allowedExts = apply_filters("wpdiscuz_mu_allowed_extensions", "accept='image/*'");
64
+ $html .= "<span class='wmu-upload-wrap' wpd-tooltip='" . esc_attr($this->options->phrases["wmuAttachImage"]) . "' wpd-tooltip-position='" . (!is_rtl() ? 'left' : 'right' ) . "'>";
65
  $html .= "<label class='wmu-add'>";
66
  $html .= "<i class='$faIcon'></i>";
67
  $html .= "<input style='display:none;' class='wmu-add-files' type='file' name='" . self::INPUT_NAME . "[]' $type $allowedExts/>";
82
  }
83
  }
84
 
85
+ public function commentText($content, $comment) {
86
+ if ($comment && strpos($this->requestUri, self::PAGE_COMMENTS) !== false && $this->options->content["wmuIsShowFilesDashboard"]) {
87
+ $content = $this->getAttachments($content, $comment);
88
+ }
89
+ return $content;
90
+ }
91
+
92
+ public function afterReadMore($content, $comment) {
93
+ return $this->getAttachments($content, $comment);
94
+ }
95
+
96
+ private function getAttachments($content, $comment) {
97
+ $attachments = get_comment_meta($comment->comment_ID, self::METAKEY_ATTACHMENTS, true);
98
+ if ($attachments && is_array($attachments)) {
99
+ // get files from jetpack CDN on ajax calls
100
+ add_filter("jetpack_photon_admin_allow_image_downsize", "__return_true");
101
+ $content .= "<div class='wmu-comment-attachments'>";
102
+ foreach ($attachments as $key => $ids) {
103
+ if (!empty($ids)) {
104
+ $attachIds = array_map("intval", $ids);
105
+ $type = (count($attachIds) > 1) ? "multi" : "single";
106
+ if ($key == self::KEY_IMAGES) {
107
+ $imgHtml = $this->getAttachedImages($attachIds, $this->currentUser);
108
+ $content .= "<div class='wmu-attached-images wmu-count-" . $type . "'>" . $imgHtml . "</div>";
109
  }
110
+ $content .= apply_filters("wpdiscuz_mu_get_attachments", "", $attachIds, $this->currentUser, $key);
111
  }
 
112
  }
113
+ $content .= "</div>";
114
  }
115
  return $content;
116
  }
322
  foreach ($files as $file) {
323
  $error = false;
324
  $extension = pathinfo($file["name"], PATHINFO_EXTENSION);
325
+ if ($mimeType = $this->isImage($file)) {
326
+ if ((strpos($mimeType, "image/") !== false) && empty($extension)) {
327
+ $file["name"] .= ".jpg";
328
+ }
329
+ } else {
330
+ $mimeType = $this->getMimeType($file, $extension);
331
  }
332
 
333
  if ($this->isAllowedFileType($mimeType)) {
334
  if (empty($extension)) {
335
+ if (strpos($mimeType, "image/") === false) {
336
+ foreach ($this->mimeTypes as $ext => $mimes) {
337
+ if (in_array($mimeType, explode("|", $mimes))) {
338
+ $file["name"] .= "." . $ext;
339
+ }
340
+ }
 
341
  }
342
  }
343
  $file["type"] = $mimeType;
379
 
380
  private function isAllowedFileType($mimeType) {
381
  $isAllowed = false;
382
+ if (!empty($this->mimeTypes) && is_array($this->mimeTypes)) {
383
+ foreach ($this->mimeTypes as $ext => $mimes) {
384
+ $isAllowed = in_array($mimeType, explode("|", $mimes));
385
+ if ($isAllowed) {
386
+ break;
387
+ }
388
+ }
389
  }
390
  return $isAllowed;
391
  }
392
 
393
  private function getMimeType($file, $extension) {
394
  $mimeType = "";
395
+ if (function_exists("finfo_open") && function_exists("finfo_file")) {
 
 
396
  $finfo = finfo_open(FILEINFO_MIME_TYPE);
397
  $mimeType = finfo_file($finfo, $file["tmp_name"]);
398
+ } elseif (function_exists("mime_content_type")) {
399
+ $mimeType = mime_content_type($file["tmp_name"]);
400
  } elseif ($extension) {
401
+ foreach ($this->mimeTypes as $ext => $mimeTypes) {
402
+ $exp = explode("|", $mimeTypes);
403
+ if (in_array($extension, $exp)) {
404
+ $mimeType = $exp[0];
405
+ }
406
+ }
407
  }
408
  return $mimeType;
409
  }
486
  global $post;
487
  $gPost = $postObj ? $postObj : $post;
488
  $isAllowed = false;
489
+ $this->mimeTypes = apply_filters("wpdiscuz_mu_mime_types", $this->options->content["wmuMimeTypes"]);
490
+ if ($this->isAllowedPostType($gPost) && !empty($this->mimeTypes)) {
491
  $currentUser = WpdiscuzHelper::getCurrentUser();
492
  $isUserLoggedIn = !empty($currentUser->ID);
493
  $isGuestAllowed = !$isUserLoggedIn && $this->options->content["wmuIsGuestAllowed"];
725
  return ["administrator", "editor", "author", "contributor", "subscriber"];
726
  }
727
 
728
+ public function isImage($file) {
729
+ return wp_get_image_mime($file["tmp_name"]);
730
+ }
731
+
732
+ /**
733
+ * DEPRECATED due to some secuirty issues
734
+ */
735
  public function getMimeTypeFromContent($path) {
736
  $fileContent = $path && function_exists("file_get_contents") && ($v = file_get_contents($path)) ? $v : "";
737
  if ($fileContent && preg_match('/\A(?:(\xff\xd8\xff)|(GIF8[79]a)|(\x89PNG\x0d\x0a)|(BM)|(\x49\x49(?:\x2a\x00|\x00\x4a))|(FORM.{4}ILBM))/', $fileContent, $hits)) {
759
 
760
  foreach ($attachIds as $attachId) {
761
  if (intval($attachId)) {
762
+ if ($key === self::KEY_IMAGES) {
763
  $data[] = ["name" => esc_html__("Attached Images", "wpdiscuz"), "value" => wp_get_attachment_url($attachId)];
764
  } else if ($isWmuExists) {
765
  $data = apply_filters("wpdiscuz_mu_export_data", $data, $key, $attachId);