Comments – wpDiscuz - Version 7.0.8

Version Description

Download this release

Release Info

Developer taron96
Plugin Icon 128x128 Comments – wpDiscuz
Version 7.0.8
Comparing to
See all releases

Code changes from version 7.0.7 to 7.0.8

assets/css/wpdiscuz-options.css CHANGED
@@ -413,7 +413,7 @@
413
  .wpd-zoom-image .wpd-lightbox:target{ outline: none; display: block; }
414
  .wp-core-ui #wpd-setbox .notice.is-dismissible {margin: 24px 0 0 0;}
415
 
416
- .wpd-enabled{background-image: url('../img/editor/active.png)');}
417
  .wpd-disabled{background-image: url('../img/editor/passive.png');}
418
  .wpd-editor-toolbar{display: flex; margin-top: 15px; flex-direction: row; justify-content: flex-start; flex-wrap: wrap;} /*#f06653*/
419
  .wpd-editor-disable{cursor:pointer; margin-top:5px; background: #f5f5f5; font-size: 13px; font-weight: 600; padding: 2px 15px; line-height: 18px; border-radius: 3px;}
413
  .wpd-zoom-image .wpd-lightbox:target{ outline: none; display: block; }
414
  .wp-core-ui #wpd-setbox .notice.is-dismissible {margin: 24px 0 0 0;}
415
 
416
+ .wpd-enabled{background-image: url('../img/editor/active.png');}
417
  .wpd-disabled{background-image: url('../img/editor/passive.png');}
418
  .wpd-editor-toolbar{display: flex; margin-top: 15px; flex-direction: row; justify-content: flex-start; flex-wrap: wrap;} /*#f06653*/
419
  .wpd-editor-disable{cursor:pointer; margin-top:5px; background: #f5f5f5; font-size: 13px; font-weight: 600; padding: 2px 15px; line-height: 18px; border-radius: 3px;}
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,F=e("html").css("scroll-behavior"),L=e("body").css("scroll-behavior");(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)||U({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=G(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=G(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)};U(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=$(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=G(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=$(t),d=new FormData;d.append("action","wpdShowReplies"),d.append("commentId",o),me(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(),le(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 R=e(window).width(),S=e("#wpdcom").width();S>=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%"})),S>=940&&S<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%"})),S>=810&&S<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%"})),S>=730&&S<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%"})),S>=610&&S<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%"})),R>650&&(S>=510&&S<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"})),S>=470&&S<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"})),S<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 q(t,a,o){me(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?ae(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),me(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),me(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(),U(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(){ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.new_comment_id).offset().top-32},1e3,te)},d),le(a,t)}else a.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"),le(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 U(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 H(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"===X(t,!1)&&(o=X(t,!0))}),parseInt(o)+1}(e(this).parents(".wpd-comment"))),Z(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),q(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 q(s,i,t)}var c,p;!function(e){if((a||o)&&"2.0"===d){var t=$(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&&H(G(e(".wpdiscuz-edit-form-wrap"),0),w);var t=G(e(this),0),a=$(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),me(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=G(e(this)),a=$(t),o=e("#wpd-comm-"+t+" #wpdiscuz-edit-form");if(Z(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())}),me(z,!0,d).done(function(o){"object"==typeof o?(o.success?(H(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"),le(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=G(e(this));H(t,w),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)}),!wpdiscuzAjaxObj.wordpressIsPaginate&&m&&(M=0,1==m?setTimeout(function(){P(!0)},500):e(document).delegate(".wpd-load-comments","click",function(){e(this).parent(".wpd-load-more-submit-wrap").remove(),P(!0)})),e(document).delegate(".wpd-load-more-submit","click",function(){var t=e(this);t.hasClass("wpd-loaded")&&P(!1,t,"wpd-loaded","wpd-loading")});var W=!1;function N(){var t=e("#wpdiscuzHasMoreComments").val(),a=e(document).height(),o=e(window).height()+e(window).scrollTop();a&&o&&(100*o/a>=80&&!1===W&&1==t&&(W=!0,P(!1,e(".wpd-load-more-submit"))))}function P(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||""),me(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),W=!1,r=s.data.loadLastCommentId,le(s),t&&Q(!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()),le(t)}function Q(t){var a=location.href.match(/#comment\-(\d+)/);if(null!==a){var o=a[1];if(e("#comment-"+o).length)setTimeout(function(){ee(),e("html, body").animate({scrollTop:e("#comment-"+o).parents("[id^=wpd-comm-]").offset().top-32},1e3,te),t&&V(o)},500);else{var d=new FormData;d.append("action","wpdGetSingleComment"),d.append("commentId",o),me(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),le(a),ee(),e("html, body").animate({scrollTop:e(d).offset().top-32},1e3,te),t&&V(o)}e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}}function V(t){setTimeout(function(){e("#comment-"+t).siblings(".wpd-secondary-form-wrapper").is(":visible")||e("#comment-"+t).find(".wpd-reply-button").trigger("click")},1100)}function B(e){if(void 0!==e.data.message)for(var t,a=e.data.message,o=0;o<a.length;o++)Y((t=a[o]).comment_parent,t.comment_html)}function G(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 $(e){return e.substring(0,e.indexOf("_"))}function X(e,t){return t?e.substring(e.indexOf("-")+1):e.substring(0,e.indexOf("-"))}function Y(t,a){if(0==t)ae(a);else{var o=G(e("#comment-"+t),0);e("#wpdiscuz_form_anchor-"+o).after(a)}}function J(){var t,a,o="";return e(".wpd-comment-right").each(function(){t=G(e(this),0),a=$(t),o+=a+","}),o}function Z(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 ee(){e("html, body").css("scroll-behavior","unset")}function te(){e("html").css("scroll-behavior",F),e("body").css("scroll-behavior",L)}function ae(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function oe(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(),N(),e(window).scroll(function(){N()})),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=$(G(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),me(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");le(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||""),me(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(){Q(!1)},1!=m&&Q(!1),e(document).delegate(".wpdiscuz-readmore","click",function(){var t=G(e(this)),a=$(t),o=new FormData;o.append("action","wpdReadMore"),o.append("commentId",a),me(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),le(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.is(":visible")||e(this).parents(".wpd-comment-right").attr("id")!==e("[id^=comment-]").last().attr("id")||e("#comments").css({paddingBottom:"160px"}),t.css({display:t.is(":visible")?"none":"flex"})}),e(document).delegate(".wpd-comment-right","mouseleave",function(){e(this).find(".wpd-tools-actions").hide(),e("#comments").css({paddingBottom:"0"})}),e(document).delegate(".wpd_stick_btn","click",function(){var t=$(G(e(this),0)),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",t),me(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=$(G(e(this),0)),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",t),me(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(),me(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(),le(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"),me(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),le(a),ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3,te))}).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"),me(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),le(a),ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3,te))}).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=$(G(t,0)),o=new FormData;o.append("action","wpdFollowUser"),o.append("commentId",a),me(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)})}),oe(),e(document).delegate(".wc_email","keyup",function(){oe(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 de=(ne=Math.min(e(".entry-content").offset().left,e("#wpdcom").offset().left)-120)>25?ne:25;e("#wpd-bubble-wrapper").css({left:de+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){de=(ne=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120)>25?ne:25;e("#wpd-bubble-wrapper").css({left:de+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var ne;de=(ne=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120)>25?ne:25;e("#wpd-bubble-wrapper").css({left:de+"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(){ee(),e("html, body").animate({scrollTop:e("#wpdcom").offset().top-60},1e3,function(){te(),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"),Q(!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()),me(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}),B(t),e("#wpd-bubble-count").removeClass("wpd-new-comments"),e("#wpd-bubble-count .wpd-new-comments-count").text("0"),D=[],ee(),e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-60},1e3,te),le(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,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",wpdiscuzAjaxObj.restNonce)},data:{postId:s,lastId:l,visibleCommentIds:J()}}).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",J()),me(z,!1,n).done(function(t){E||"object"==typeof t&&t.success&&(B(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 se=new FormData;se.append("action","wpdGetInlineCommentForm"),me(z,!1,se).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"),re()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t)}).fail(function(e,t,a){console.log(a)})}function ie(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 ce(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function pe(){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"),re(t.siblings(".wpd-inline-form-wrapper"))))})}function re(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 le(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 me(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){ce();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"),re(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",ie(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())}),me(z,!0,d).done(function(t){if(a.addClass("wpd_not_clicked"),"object"==typeof t)if(t.success){o[0].reset(),ce();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&&ae(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",ie(t)),me(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"),ee(),e("html, body").animate({scrollTop:e(".wpdf-inline").offset().top-32},1e3,te)}),e(document).delegate(".wpd-feedback-content-link","click",function(t){t.preventDefault();var a=e(this).data("feedback-content-id");ee(),e("html, body").animate({scrollTop:e("#wpd-inline-"+a).offset().top-38},1e3,function(){te(),e("#wpd-inline-"+a).addClass("wpd-active")})}),"scroll_open"!==A&&"blink"!==A||(pe(),e(window).scroll(pe)),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),me(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())}),me(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")),me(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=me});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 */
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(e instanceof Array)for(var n in e)t instanceof Array?"success"===t[n]?o="wpdiscuz-message-success":"warning"===t[n]&&(o="wpdiscuz-message-warning"):"success"===t?o="wpdiscuz-message-success":"warning"===t&&(o="wpdiscuz-message-warning"),jQuery("<div/>").addClass(o).html(e[n]).prependTo("#wpdiscuz-comment-message").delay(a instanceof Array?a[n]: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,n=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,d=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,F=e("html").css("scroll-behavior"),L=e("body").css("scroll-behavior");(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"),window.addEventListener("beforeunload",function(t){var a=e(".wpd-form").not(":hidden");if(a.length)if(wpdiscuzLoadRichEditor){for(var o=0;o<a.length;o++)if("\n"!==wpDiscuzEditor.createEditor(e(a[o]).find(".ql-container").attr("id")).getText())return t.preventDefault(),void(t.returnValue="")}else for(o=0;o<a.length;o++)if(e(a[o]).find(".wc_comment").val())return t.preventDefault(),void(t.returnValue="")}),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)||U({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 d=G(e(this),0);e(this).hasClass("wpdiscuz-clonned")?(wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+d).focus()},v):setTimeout(function(){e("#wc-textarea-"+d).trigger("focus")},v),e("#wpd-secondary-form-wrapper-"+d).slideToggle(v)):function(a){var o=G(a,0);e("#wpdiscuz_form_anchor-"+o).before(function(t){return e("#wpdiscuz_hidden_secondary_form").html().replace(/wpdiscuzuniqueid/g,t)}(o));var n=e("#wpd-secondary-form-wrapper-"+o);if(!t){var d={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)};U(d)}wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+o).focus()},v):setTimeout(function(){e("#wc-textarea-"+o).trigger("focus")},v);n.slideToggle(v,function(){a.addClass("wpdiscuz-clonned")})}(e(this)),function(t){if((a||o)&&"2.0"===n){var d=$(t);setTimeout(function(){if(!T[d])try{T[d]=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)}}(d)}),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=G(e(this),0),o=e(this),n=e(".fas",o);!o.parents(".wpd-comment:not(.wpd-reply)").children(".wpd-reply").length&&_?function(t,a){var o=$(t),n=new FormData;n.append("action","wpdShowReplies"),n.append("commentId",o),me(z,!0,n).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(),le(o)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,n){console.log(n),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")?(n.removeClass("fa-chevron-up"),n.addClass("fa-chevron-down"),o.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_show_replies_text)):(n.removeClass("fa-chevron-down"),n.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&&e("#wpdiscuz-subscribe-form").length&&("2.0"===n?(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"===n&&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"===n){var R=e(window).width(),S=e("#wpdcom").width();S>=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%"})),S>=940&&S<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%"})),S>=810&&S<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%"})),S>=730&&S<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%"})),S>=610&&S<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%"})),R>650&&(S>=510&&S<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"})),S>=470&&S<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"})),S<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 q(t,a,o){me(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 n=v;a.data.is_main?ae(a.data.message):(n=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),me(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),me(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,n=t.comment_author_url;null==u?(Cookies.set("comment_author_email_"+g,a),Cookies.set("comment_author_"+g,o),n.length&&Cookies.set("comment_author_url_"+g,n)):(u=parseInt(u),Cookies.set("comment_author_email_"+g,a,{expires:u,path:"/"}),Cookies.set("comment_author_"+g,o,{expires:u,path:"/"}),n.length&&Cookies.set("comment_author_url_"+g,n,{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(),U(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(){ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.new_comment_id).offset().top-32},1e3,te)},n),le(a,t)}else a.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"),le(a,t));else wpdiscuzAjaxObj.setCommentMessage(a,"error");e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,n){console.log(n),e(o).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}function U(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 H(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),d=1,s=e(this).parents("form");if(s.hasClass("wpd_main_comm_form")||(d=function(t){var a=t.attr("class").split(" "),o="";return e.each(a,function(e,t){"wpd_comment_level"===X(t,!1)&&(o=X(t,!0))}),parseInt(o)+1}(e(this).parents(".wpd-comment"))),Z(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"===n&&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"===n&&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",d),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"===n&&(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),q(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 q(s,i,t)}var c,p;!function(e){if((a||o)&&"2.0"===n){var t=$(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&&H(G(e(".wpdiscuz-edit-form-wrap"),0),w);var t=G(e(this),0),a=$(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),me(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=G(e(this)),a=$(t),o=e("#wpd-comm-"+t+" #wpdiscuz-edit-form");if(Z(o,"#wpd-editor-edit_"+t),o.submit(function(e){e.preventDefault()}),o[0].checkValidity()){var n=new FormData;n.append("action","wpdSaveEditedComment"),n.append("commentId",a),e(":input",o).each(function(){""!==this.name&&"checkbox"!==this.type&&"radio"!==this.type&&n.append(this.name+"",e(this).val()),"checkbox"!==this.type&&"radio"!==this.type||e(this).is(":checked")&&n.append(this.name+"",e(this).val())}),me(z,!0,n).done(function(o){"object"==typeof o?(o.success?(H(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"),le(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=G(e(this));H(t,w),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)}),!wpdiscuzAjaxObj.wordpressIsPaginate&&m&&(M=0,1==m?setTimeout(function(){P(!0)},500):e(document).delegate(".wpd-load-comments","click",function(){e(this).parent(".wpd-load-more-submit-wrap").remove(),P(!0)})),e(document).delegate(".wpd-load-more-submit","click",function(){var t=e(this);t.hasClass("wpd-loaded")&&P(!1,t,"wpd-loaded","wpd-loading")});var W=!1;function N(){var t=e("#wpdiscuzHasMoreComments").val(),a=e(document).height(),o=e(window).height()+e(window).scrollTop();a&&o&&(100*o/a>=80&&!1===W&&1==t&&(W=!0,P(!1,e(".wpd-load-more-submit"))))}function P(t,a,o,n){a&&(a.toggleClass(o),a.toggleClass(n));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||""),me(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),V(s,t&&2!==d),W=!1,r=s.data.loadLastCommentId,le(s),t&&K(!1)),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(n))}).fail(function(t,d,s){console.log(s),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(n))})}function V(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!==d&&e(".wpdiscuz-comment-pagination").show(),e("#wpdiscuzHasMoreComments").val(1),a&&e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").show()),le(t)}function K(t){var a=location.href.match(/#comment\-(\d+)/);if(null!==a){var o=a[1];if(e("#comment-"+o).length)setTimeout(function(){ee(),e("html, body").animate({scrollTop:e("#comment-"+o).parents("[id^=wpd-comm-]").offset().top-32},1e3,te),t&&Q(o)},500);else{var n=new FormData;n.append("action","wpdGetSingleComment"),n.append("commentId",o),me(z,!0,n).done(function(a){if("object"==typeof a&&a.success){var n="#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),le(a),ee(),e("html, body").animate({scrollTop:e(n).offset().top-32},1e3,te),t&&Q(o)}e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}}function Q(t){setTimeout(function(){e("#comment-"+t).siblings(".wpd-secondary-form-wrapper").is(":visible")||e("#comment-"+t).find(".wpd-reply-button").trigger("click")},1100)}function B(e){if(void 0!==e.data.message)for(var t,a=e.data.message,o=0;o<a.length;o++)Y((t=a[o]).comment_parent,t.comment_html)}function G(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 $(e){return e.substring(0,e.indexOf("_"))}function X(e,t){return t?e.substring(e.indexOf("-")+1):e.substring(0,e.indexOf("-"))}function Y(t,a){if(0==t)ae(a);else{var o=G(e("#comment-"+t),0);e("#wpdiscuz_form_anchor-"+o).after(a)}}function J(){var t,a,o="";return e(".wpd-comment-right").each(function(){t=G(e(this),0),a=$(t),o+=a+","}),o}function Z(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 ee(){e("html, body").css("scroll-behavior","unset")}function te(){e("html").css("scroll-behavior",F),e("body").css("scroll-behavior",L)}function ae(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function oe(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!==d||wpdiscuzAjaxObj.wordpressIsPaginate||(e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide(),N(),e(window).scroll(function(){N()})),wpdiscuzAjaxObj.setLoadMoreVisibility=V,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=$(G(t));a=e(this).hasClass("wpd-vote-up")?1:-1;var n=new FormData;n.append("action","wpdVoteOnComment"),n.append("commentId",o),n.append("voteType",a),me(z,!0,n).done(function(n){if(e(t).addClass("wpd_not_clicked"),"object"==typeof n){if(n.success){if("total"===n.data.buttonsStyle){var d=e(".wpd-comment-footer .wpd-vote-result",e("#comment-"+o)),s=n.data.votes;d.text(s),d.removeClass("wpd-up wpd-down"),s>0&&d.addClass("wpd-up"),s<0&&d.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(n.data.likeCount),c.text(n.data.dislikeCount),parseInt(n.data.likeCount)>0?i.addClass("wpd-up"):i.removeClass("wpd-up"),parseInt(n.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"),n.data.curUserReaction>0?p.addClass("wpd-up"):n.data.curUserReaction<0&&r.addClass("wpd-down")}else n.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[n.data],"error");le(n,o,a)}else console.log(n);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(a,o,n){console.log(n),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 n=e(".wpdf-active").attr("data-filter-type");o.append("wpdType",n||""),me(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),V(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(){K(!1)},1!=m&&K(!1),e(document).delegate(".wpdiscuz-readmore","click",function(){var t=G(e(this)),a=$(t),o=new FormData;o.append("action","wpdReadMore"),o.append("commentId",a),me(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),le(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.is(":visible")||e(this).parents(".wpd-comment-right").attr("id")!==e("[id^=comment-]","#wpdcom").last().attr("id")||e("#comments").css({paddingBottom:"160px"}),t.css({display:t.is(":visible")?"none":"flex"})}),e(document).delegate(".wpd-comment-right","mouseleave",function(){e(this).find(".wpd-tools-actions").hide(),e("#comments").css({paddingBottom:"0"})}),e(document).delegate(".wpd_stick_btn","click",function(){var t=$(G(e(this),0)),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",t),me(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=$(G(e(this),0)),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",t),me(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 n=e(".wpdiscuz-sort-button-active").attr("data-sorting");n&&o.append("sorting",n),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(),me(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),V(a),r=a.data.loadLastCommentId,e(".wpd-load-more-submit").blur(),le(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"),me(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),le(a),ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3,te))}).fail(function(a,o,n){console.log(n),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"),me(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),le(a),ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3,te))}).fail(function(a,o,n){console.log(n),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=$(G(t,0)),o=new FormData;o.append("action","wpdFollowUser"),o.append("commentId",a),me(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,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),oe(),e(document).delegate(".wc_email","keyup",function(){oe(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 ne=(de=Math.min(e(".entry-content").offset().left,e("#wpdcom").offset().left)-120)>25?de:25;e("#wpd-bubble-wrapper").css({left:ne+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){ne=(de=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120)>25?de:25;e("#wpd-bubble-wrapper").css({left:ne+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var de;ne=(de=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120)>25?de:25;e("#wpd-bubble-wrapper").css({left:ne+"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(){ee(),e("html, body").animate({scrollTop:e("#wpdcom").offset().top-60},1e3,function(){te(),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"),K(!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()),me(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}),B(t),e("#wpd-bubble-count").removeClass("wpd-new-comments"),e("#wpd-bubble-count .wpd-new-comments-count").text("0"),D=[],ee(),e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-60},1e3,te),le(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,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",wpdiscuzAjaxObj.restNonce)},data:{postId:s,lastId:l,visibleCommentIds:J()}}).done(function(a){if(!E)if("object"==typeof a){if(a.ids.length){i&&((d=new FormData).append("action","wpdUpdateAutomatically"),d.append("loadLastCommentId",r),d.append("visibleCommentIds",J()),me(z,!1,d).done(function(t){E||"object"==typeof t&&t.success&&(B(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 n=parseInt(e(".wpd-new-comments-count").text());n+=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(n),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 d;setTimeout(t,c)}).fail(function(e,a,o){console.log(o),setTimeout(t,c)})},c),e(".wpd-inline-form-wrapper").length){var se=new FormData;se.append("action","wpdGetInlineCommentForm"),me(z,!1,se).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"),re()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t)}).fail(function(e,t,a){console.log(a)})}function ie(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 ce(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function pe(){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"),re(t.siblings(".wpd-inline-form-wrapper"))))})}function re(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 le(t,a,o,n){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,n):console.log(t.data.callbackFunctions[e]+" is not a function")})}function me(t,a,o){a&&e("#wpdiscuz-loading-bar").show(),o.append("postId",s);var n=o.get("action");wpdiscuzAjaxObj.dataFilterCallbacks&&wpdiscuzAjaxObj.dataFilterCallbacks[n]&&e.each(wpdiscuzAjaxObj.dataFilterCallbacks[n],function(e){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[n][e]]&&(o=wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[n][e]](o,t,a))});var d=t?wpdiscuzAjaxObj.url:wpdiscuzAjaxObj.customAjaxUrl;return e.ajax({type:"POST",url:d,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){ce();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"),re(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 n=new FormData;n.append("action","wpdAddInlineComment"),n.append("inline_form_id",ie(o)),e.each(e("input, textarea",o),function(t,a){"checkbox"===this.type?e(this).is(":checked")&&n.append(e(a).attr("name"),e(a).val()):n.append(e(a).attr("name"),e(a).val())}),me(z,!0,n).done(function(t){if(a.addClass("wpd_not_clicked"),"object"==typeof t)if(t.success){o[0].reset(),ce();var n=parseInt(t.data.newCount),d=a.parents(".wpd-inline-icon-wrapper").find(".wpd-inline-icon-count");d.text(n),n?d.addClass("wpd-has-comments"):d.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&&ae(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",ie(t)),me(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"),ee(),e("html, body").animate({scrollTop:e(".wpdf-inline").offset().top-32},1e3,te)}),e(document).delegate(".wpd-feedback-content-link","click",function(t){t.preventDefault();var a=e(this).data("feedback-content-id");ee(),e("html, body").animate({scrollTop:e("#wpd-inline-"+a).offset().top-38},1e3,function(){te(),e("#wpd-inline-"+a).addClass("wpd-active")})}),"scroll_open"!==A&&"blink"!==A||(pe(),e(window).scroll(pe)),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),me(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,d=e(this);if(d[0].checkValidity()&&(a=d,o=!0,"2.0"===n&&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"===n&&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("*",d).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())}),me(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")),me(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=me});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 */
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,F=e("html").css("scroll-behavior"),L=e("body").css("scroll-behavior");(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)||U({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=G(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=G(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)};U(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=$(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=G(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=$(t),d=new FormData;d.append("action","wpdShowReplies"),d.append("commentId",o),me(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(),le(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 R=e(window).width(),S=e("#wpdcom").width();S>=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%"})),S>=940&&S<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%"})),S>=810&&S<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%"})),S>=730&&S<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%"})),S>=610&&S<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%"})),R>650&&(S>=510&&S<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"})),S>=470&&S<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"})),S<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 q(t,a,o){me(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?ae(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),me(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),me(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(),U(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(){ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.new_comment_id).offset().top-32},1e3,te)},d),le(a,t)}else a.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"),le(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 U(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 H(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"===X(t,!1)&&(o=X(t,!0))}),parseInt(o)+1}(e(this).parents(".wpd-comment"))),Z(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),q(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 q(s,i,t)}var c,p;!function(e){if((a||o)&&"2.0"===d){var t=$(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&&H(G(e(".wpdiscuz-edit-form-wrap"),0),w);var t=G(e(this),0),a=$(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),me(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=G(e(this)),a=$(t),o=e("#wpd-comm-"+t+" #wpdiscuz-edit-form");if(Z(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())}),me(z,!0,d).done(function(o){"object"==typeof o?(o.success?(H(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"),le(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=G(e(this));H(t,w),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)}),!wpdiscuzAjaxObj.wordpressIsPaginate&&m&&(M=0,1==m?setTimeout(function(){P(!0)},500):e(document).delegate(".wpd-load-comments","click",function(){e(this).parent(".wpd-load-more-submit-wrap").remove(),P(!0)})),e(document).delegate(".wpd-load-more-submit","click",function(){var t=e(this);t.hasClass("wpd-loaded")&&P(!1,t,"wpd-loaded","wpd-loading")});var W=!1;function N(){var t=e("#wpdiscuzHasMoreComments").val(),a=e(document).height(),o=e(window).height()+e(window).scrollTop();a&&o&&(100*o/a>=80&&!1===W&&1==t&&(W=!0,P(!1,e(".wpd-load-more-submit"))))}function P(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||""),me(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),W=!1,r=s.data.loadLastCommentId,le(s),t&&Q(!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()),le(t)}function Q(t){var a=location.href.match(/#comment\-(\d+)/);if(null!==a){var o=a[1];if(e("#comment-"+o).length)setTimeout(function(){ee(),e("html, body").animate({scrollTop:e("#comment-"+o).parents("[id^=wpd-comm-]").offset().top-32},1e3,te),t&&V(o)},500);else{var d=new FormData;d.append("action","wpdGetSingleComment"),d.append("commentId",o),me(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),le(a),ee(),e("html, body").animate({scrollTop:e(d).offset().top-32},1e3,te),t&&V(o)}e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}}function V(t){setTimeout(function(){e("#comment-"+t).siblings(".wpd-secondary-form-wrapper").is(":visible")||e("#comment-"+t).find(".wpd-reply-button").trigger("click")},1100)}function B(e){if(void 0!==e.data.message)for(var t,a=e.data.message,o=0;o<a.length;o++)Y((t=a[o]).comment_parent,t.comment_html)}function G(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 $(e){return e.substring(0,e.indexOf("_"))}function X(e,t){return t?e.substring(e.indexOf("-")+1):e.substring(0,e.indexOf("-"))}function Y(t,a){if(0==t)ae(a);else{var o=G(e("#comment-"+t),0);e("#wpdiscuz_form_anchor-"+o).after(a)}}function J(){var t,a,o="";return e(".wpd-comment-right").each(function(){t=G(e(this),0),a=$(t),o+=a+","}),o}function Z(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 ee(){e("html, body").css("scroll-behavior","unset")}function te(){e("html").css("scroll-behavior",F),e("body").css("scroll-behavior",L)}function ae(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function oe(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(),N(),e(window).scroll(function(){N()})),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=$(G(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),me(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");le(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||""),me(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(){Q(!1)},1!=m&&Q(!1),e(document).delegate(".wpdiscuz-readmore","click",function(){var t=G(e(this)),a=$(t),o=new FormData;o.append("action","wpdReadMore"),o.append("commentId",a),me(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),le(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.is(":visible")||e(this).parents(".wpd-comment-right").attr("id")!==e("[id^=comment-]").last().attr("id")||e("#comments").css({paddingBottom:"160px"}),t.css({display:t.is(":visible")?"none":"flex"})}),e(document).delegate(".wpd-comment-right","mouseleave",function(){e(this).find(".wpd-tools-actions").hide(),e("#comments").css({paddingBottom:"0"})}),e(document).delegate(".wpd_stick_btn","click",function(){var t=$(G(e(this),0)),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",t),me(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=$(G(e(this),0)),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",t),me(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(),me(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(),le(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"),me(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),le(a),ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3,te))}).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"),me(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),le(a),ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3,te))}).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=$(G(t,0)),o=new FormData;o.append("action","wpdFollowUser"),o.append("commentId",a),me(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)})}),oe(),e(document).delegate(".wc_email","keyup",function(){oe(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 de=(ne=Math.min(e(".entry-content").offset().left,e("#wpdcom").offset().left)-120)>25?ne:25;e("#wpd-bubble-wrapper").css({left:de+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){de=(ne=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120)>25?ne:25;e("#wpd-bubble-wrapper").css({left:de+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var ne;de=(ne=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120)>25?ne:25;e("#wpd-bubble-wrapper").css({left:de+"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(){ee(),e("html, body").animate({scrollTop:e("#wpdcom").offset().top-60},1e3,function(){te(),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"),Q(!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()),me(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}),B(t),e("#wpd-bubble-count").removeClass("wpd-new-comments"),e("#wpd-bubble-count .wpd-new-comments-count").text("0"),D=[],ee(),e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-60},1e3,te),le(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,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",wpdiscuzAjaxObj.restNonce)},data:{postId:s,lastId:l,visibleCommentIds:J()}}).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",J()),me(z,!1,n).done(function(t){E||"object"==typeof t&&t.success&&(B(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 se=new FormData;se.append("action","wpdGetInlineCommentForm"),me(z,!1,se).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"),re()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t)}).fail(function(e,t,a){console.log(a)})}function ie(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 ce(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function pe(){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"),re(t.siblings(".wpd-inline-form-wrapper"))))})}function re(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 le(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 me(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){ce();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"),re(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",ie(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())}),me(z,!0,d).done(function(t){if(a.addClass("wpd_not_clicked"),"object"==typeof t)if(t.success){o[0].reset(),ce();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&&ae(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",ie(t)),me(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"),ee(),e("html, body").animate({scrollTop:e(".wpdf-inline").offset().top-32},1e3,te)}),e(document).delegate(".wpd-feedback-content-link","click",function(t){t.preventDefault();var a=e(this).data("feedback-content-id");ee(),e("html, body").animate({scrollTop:e("#wpd-inline-"+a).offset().top-38},1e3,function(){te(),e("#wpd-inline-"+a).addClass("wpd-active")})}),"scroll_open"!==A&&"blink"!==A||(pe(),e(window).scroll(pe)),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),me(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())}),me(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")),me(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=me});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 */
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(e instanceof Array)for(var n in e)t instanceof Array?"success"===t[n]?o="wpdiscuz-message-success":"warning"===t[n]&&(o="wpdiscuz-message-warning"):"success"===t?o="wpdiscuz-message-success":"warning"===t&&(o="wpdiscuz-message-warning"),jQuery("<div/>").addClass(o).html(e[n]).prependTo("#wpdiscuz-comment-message").delay(a instanceof Array?a[n]: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,n=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,d=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,F=e("html").css("scroll-behavior"),L=e("body").css("scroll-behavior");(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"),window.addEventListener("beforeunload",function(t){var a=e(".wpd-form").not(":hidden");if(a.length)if(wpdiscuzLoadRichEditor){for(var o=0;o<a.length;o++)if("\n"!==wpDiscuzEditor.createEditor(e(a[o]).find(".ql-container").attr("id")).getText())return t.preventDefault(),void(t.returnValue="")}else for(o=0;o<a.length;o++)if(e(a[o]).find(".wc_comment").val())return t.preventDefault(),void(t.returnValue="")}),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)||U({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 d=G(e(this),0);e(this).hasClass("wpdiscuz-clonned")?(wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+d).focus()},v):setTimeout(function(){e("#wc-textarea-"+d).trigger("focus")},v),e("#wpd-secondary-form-wrapper-"+d).slideToggle(v)):function(a){var o=G(a,0);e("#wpdiscuz_form_anchor-"+o).before(function(t){return e("#wpdiscuz_hidden_secondary_form").html().replace(/wpdiscuzuniqueid/g,t)}(o));var n=e("#wpd-secondary-form-wrapper-"+o);if(!t){var d={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)};U(d)}wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+o).focus()},v):setTimeout(function(){e("#wc-textarea-"+o).trigger("focus")},v);n.slideToggle(v,function(){a.addClass("wpdiscuz-clonned")})}(e(this)),function(t){if((a||o)&&"2.0"===n){var d=$(t);setTimeout(function(){if(!T[d])try{T[d]=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)}}(d)}),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=G(e(this),0),o=e(this),n=e(".fas",o);!o.parents(".wpd-comment:not(.wpd-reply)").children(".wpd-reply").length&&_?function(t,a){var o=$(t),n=new FormData;n.append("action","wpdShowReplies"),n.append("commentId",o),me(z,!0,n).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(),le(o)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,n){console.log(n),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")?(n.removeClass("fa-chevron-up"),n.addClass("fa-chevron-down"),o.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_show_replies_text)):(n.removeClass("fa-chevron-down"),n.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&&e("#wpdiscuz-subscribe-form").length&&("2.0"===n?(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"===n&&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"===n){var R=e(window).width(),S=e("#wpdcom").width();S>=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%"})),S>=940&&S<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%"})),S>=810&&S<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%"})),S>=730&&S<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%"})),S>=610&&S<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%"})),R>650&&(S>=510&&S<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"})),S>=470&&S<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"})),S<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 q(t,a,o){me(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 n=v;a.data.is_main?ae(a.data.message):(n=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),me(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),me(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,n=t.comment_author_url;null==u?(Cookies.set("comment_author_email_"+g,a),Cookies.set("comment_author_"+g,o),n.length&&Cookies.set("comment_author_url_"+g,n)):(u=parseInt(u),Cookies.set("comment_author_email_"+g,a,{expires:u,path:"/"}),Cookies.set("comment_author_"+g,o,{expires:u,path:"/"}),n.length&&Cookies.set("comment_author_url_"+g,n,{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(),U(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(){ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.new_comment_id).offset().top-32},1e3,te)},n),le(a,t)}else a.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"),le(a,t));else wpdiscuzAjaxObj.setCommentMessage(a,"error");e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,n){console.log(n),e(o).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}function U(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 H(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),d=1,s=e(this).parents("form");if(s.hasClass("wpd_main_comm_form")||(d=function(t){var a=t.attr("class").split(" "),o="";return e.each(a,function(e,t){"wpd_comment_level"===X(t,!1)&&(o=X(t,!0))}),parseInt(o)+1}(e(this).parents(".wpd-comment"))),Z(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"===n&&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"===n&&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",d),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"===n&&(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),q(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 q(s,i,t)}var c,p;!function(e){if((a||o)&&"2.0"===n){var t=$(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&&H(G(e(".wpdiscuz-edit-form-wrap"),0),w);var t=G(e(this),0),a=$(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),me(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=G(e(this)),a=$(t),o=e("#wpd-comm-"+t+" #wpdiscuz-edit-form");if(Z(o,"#wpd-editor-edit_"+t),o.submit(function(e){e.preventDefault()}),o[0].checkValidity()){var n=new FormData;n.append("action","wpdSaveEditedComment"),n.append("commentId",a),e(":input",o).each(function(){""!==this.name&&"checkbox"!==this.type&&"radio"!==this.type&&n.append(this.name+"",e(this).val()),"checkbox"!==this.type&&"radio"!==this.type||e(this).is(":checked")&&n.append(this.name+"",e(this).val())}),me(z,!0,n).done(function(o){"object"==typeof o?(o.success?(H(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"),le(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=G(e(this));H(t,w),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)}),!wpdiscuzAjaxObj.wordpressIsPaginate&&m&&(M=0,1==m?setTimeout(function(){P(!0)},500):e(document).delegate(".wpd-load-comments","click",function(){e(this).parent(".wpd-load-more-submit-wrap").remove(),P(!0)})),e(document).delegate(".wpd-load-more-submit","click",function(){var t=e(this);t.hasClass("wpd-loaded")&&P(!1,t,"wpd-loaded","wpd-loading")});var W=!1;function N(){var t=e("#wpdiscuzHasMoreComments").val(),a=e(document).height(),o=e(window).height()+e(window).scrollTop();a&&o&&(100*o/a>=80&&!1===W&&1==t&&(W=!0,P(!1,e(".wpd-load-more-submit"))))}function P(t,a,o,n){a&&(a.toggleClass(o),a.toggleClass(n));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||""),me(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),V(s,t&&2!==d),W=!1,r=s.data.loadLastCommentId,le(s),t&&K(!1)),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(n))}).fail(function(t,d,s){console.log(s),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(n))})}function V(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!==d&&e(".wpdiscuz-comment-pagination").show(),e("#wpdiscuzHasMoreComments").val(1),a&&e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").show()),le(t)}function K(t){var a=location.href.match(/#comment\-(\d+)/);if(null!==a){var o=a[1];if(e("#comment-"+o).length)setTimeout(function(){ee(),e("html, body").animate({scrollTop:e("#comment-"+o).parents("[id^=wpd-comm-]").offset().top-32},1e3,te),t&&Q(o)},500);else{var n=new FormData;n.append("action","wpdGetSingleComment"),n.append("commentId",o),me(z,!0,n).done(function(a){if("object"==typeof a&&a.success){var n="#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),le(a),ee(),e("html, body").animate({scrollTop:e(n).offset().top-32},1e3,te),t&&Q(o)}e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}}function Q(t){setTimeout(function(){e("#comment-"+t).siblings(".wpd-secondary-form-wrapper").is(":visible")||e("#comment-"+t).find(".wpd-reply-button").trigger("click")},1100)}function B(e){if(void 0!==e.data.message)for(var t,a=e.data.message,o=0;o<a.length;o++)Y((t=a[o]).comment_parent,t.comment_html)}function G(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 $(e){return e.substring(0,e.indexOf("_"))}function X(e,t){return t?e.substring(e.indexOf("-")+1):e.substring(0,e.indexOf("-"))}function Y(t,a){if(0==t)ae(a);else{var o=G(e("#comment-"+t),0);e("#wpdiscuz_form_anchor-"+o).after(a)}}function J(){var t,a,o="";return e(".wpd-comment-right").each(function(){t=G(e(this),0),a=$(t),o+=a+","}),o}function Z(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 ee(){e("html, body").css("scroll-behavior","unset")}function te(){e("html").css("scroll-behavior",F),e("body").css("scroll-behavior",L)}function ae(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function oe(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!==d||wpdiscuzAjaxObj.wordpressIsPaginate||(e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide(),N(),e(window).scroll(function(){N()})),wpdiscuzAjaxObj.setLoadMoreVisibility=V,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=$(G(t));a=e(this).hasClass("wpd-vote-up")?1:-1;var n=new FormData;n.append("action","wpdVoteOnComment"),n.append("commentId",o),n.append("voteType",a),me(z,!0,n).done(function(n){if(e(t).addClass("wpd_not_clicked"),"object"==typeof n){if(n.success){if("total"===n.data.buttonsStyle){var d=e(".wpd-comment-footer .wpd-vote-result",e("#comment-"+o)),s=n.data.votes;d.text(s),d.removeClass("wpd-up wpd-down"),s>0&&d.addClass("wpd-up"),s<0&&d.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(n.data.likeCount),c.text(n.data.dislikeCount),parseInt(n.data.likeCount)>0?i.addClass("wpd-up"):i.removeClass("wpd-up"),parseInt(n.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"),n.data.curUserReaction>0?p.addClass("wpd-up"):n.data.curUserReaction<0&&r.addClass("wpd-down")}else n.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[n.data],"error");le(n,o,a)}else console.log(n);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(a,o,n){console.log(n),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 n=e(".wpdf-active").attr("data-filter-type");o.append("wpdType",n||""),me(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),V(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(){K(!1)},1!=m&&K(!1),e(document).delegate(".wpdiscuz-readmore","click",function(){var t=G(e(this)),a=$(t),o=new FormData;o.append("action","wpdReadMore"),o.append("commentId",a),me(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),le(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.is(":visible")||e(this).parents(".wpd-comment-right").attr("id")!==e("[id^=comment-]","#wpdcom").last().attr("id")||e("#comments").css({paddingBottom:"160px"}),t.css({display:t.is(":visible")?"none":"flex"})}),e(document).delegate(".wpd-comment-right","mouseleave",function(){e(this).find(".wpd-tools-actions").hide(),e("#comments").css({paddingBottom:"0"})}),e(document).delegate(".wpd_stick_btn","click",function(){var t=$(G(e(this),0)),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",t),me(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=$(G(e(this),0)),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",t),me(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 n=e(".wpdiscuz-sort-button-active").attr("data-sorting");n&&o.append("sorting",n),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(),me(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),V(a),r=a.data.loadLastCommentId,e(".wpd-load-more-submit").blur(),le(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"),me(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),le(a),ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3,te))}).fail(function(a,o,n){console.log(n),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"),me(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),le(a),ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3,te))}).fail(function(a,o,n){console.log(n),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=$(G(t,0)),o=new FormData;o.append("action","wpdFollowUser"),o.append("commentId",a),me(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,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),oe(),e(document).delegate(".wc_email","keyup",function(){oe(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 ne=(de=Math.min(e(".entry-content").offset().left,e("#wpdcom").offset().left)-120)>25?de:25;e("#wpd-bubble-wrapper").css({left:ne+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){ne=(de=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120)>25?de:25;e("#wpd-bubble-wrapper").css({left:ne+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var de;ne=(de=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120)>25?de:25;e("#wpd-bubble-wrapper").css({left:ne+"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(){ee(),e("html, body").animate({scrollTop:e("#wpdcom").offset().top-60},1e3,function(){te(),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"),K(!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()),me(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}),B(t),e("#wpd-bubble-count").removeClass("wpd-new-comments"),e("#wpd-bubble-count .wpd-new-comments-count").text("0"),D=[],ee(),e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-60},1e3,te),le(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,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",wpdiscuzAjaxObj.restNonce)},data:{postId:s,lastId:l,visibleCommentIds:J()}}).done(function(a){if(!E)if("object"==typeof a){if(a.ids.length){i&&((d=new FormData).append("action","wpdUpdateAutomatically"),d.append("loadLastCommentId",r),d.append("visibleCommentIds",J()),me(z,!1,d).done(function(t){E||"object"==typeof t&&t.success&&(B(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 n=parseInt(e(".wpd-new-comments-count").text());n+=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(n),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 d;setTimeout(t,c)}).fail(function(e,a,o){console.log(o),setTimeout(t,c)})},c),e(".wpd-inline-form-wrapper").length){var se=new FormData;se.append("action","wpdGetInlineCommentForm"),me(z,!1,se).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"),re()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t)}).fail(function(e,t,a){console.log(a)})}function ie(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 ce(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function pe(){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"),re(t.siblings(".wpd-inline-form-wrapper"))))})}function re(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 le(t,a,o,n){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,n):console.log(t.data.callbackFunctions[e]+" is not a function")})}function me(t,a,o){a&&e("#wpdiscuz-loading-bar").show(),o.append("postId",s);var n=o.get("action");wpdiscuzAjaxObj.dataFilterCallbacks&&wpdiscuzAjaxObj.dataFilterCallbacks[n]&&e.each(wpdiscuzAjaxObj.dataFilterCallbacks[n],function(e){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[n][e]]&&(o=wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[n][e]](o,t,a))});var d=t?wpdiscuzAjaxObj.url:wpdiscuzAjaxObj.customAjaxUrl;return e.ajax({type:"POST",url:d,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){ce();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"),re(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 n=new FormData;n.append("action","wpdAddInlineComment"),n.append("inline_form_id",ie(o)),e.each(e("input, textarea",o),function(t,a){"checkbox"===this.type?e(this).is(":checked")&&n.append(e(a).attr("name"),e(a).val()):n.append(e(a).attr("name"),e(a).val())}),me(z,!0,n).done(function(t){if(a.addClass("wpd_not_clicked"),"object"==typeof t)if(t.success){o[0].reset(),ce();var n=parseInt(t.data.newCount),d=a.parents(".wpd-inline-icon-wrapper").find(".wpd-inline-icon-count");d.text(n),n?d.addClass("wpd-has-comments"):d.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&&ae(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",ie(t)),me(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"),ee(),e("html, body").animate({scrollTop:e(".wpdf-inline").offset().top-32},1e3,te)}),e(document).delegate(".wpd-feedback-content-link","click",function(t){t.preventDefault();var a=e(this).data("feedback-content-id");ee(),e("html, body").animate({scrollTop:e("#wpd-inline-"+a).offset().top-38},1e3,function(){te(),e("#wpd-inline-"+a).addClass("wpd-active")})}),"scroll_open"!==A&&"blink"!==A||(pe(),e(window).scroll(pe)),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),me(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,d=e(this);if(d[0].checkValidity()&&(a=d,o=!0,"2.0"===n&&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"===n&&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("*",d).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())}),me(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")),me(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=me});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 */
assets/js/wpdiscuz.js CHANGED
@@ -18,9 +18,9 @@ function wpdMessagesOnInit(message, type) {
18
  */
19
  wpdiscuzAjaxObj.setCommentMessage = function(message, type, delay) {
20
  var className = 'wpdiscuz-message-error';
21
- if (Object.prototype.toString.call(message) === '[object Array]') {
22
  for (var i in message) {
23
- if (Object.prototype.toString.call(type) === '[object Array]') {
24
  if (type[i] === 'success') {
25
  className = 'wpdiscuz-message-success';
26
  } else if (type[i] === 'warning') {
@@ -37,7 +37,7 @@ wpdiscuzAjaxObj.setCommentMessage = function(message, type, delay) {
37
  .addClass(className)
38
  .html(message[i])
39
  .prependTo('#wpdiscuz-comment-message')
40
- .delay(Object.prototype.toString.call(delay) === '[object Array]' ? delay[i] : delay ? delay : 4000)
41
  .fadeOut(1000, function() {
42
  jQuery(this).remove();
43
  });
@@ -114,6 +114,29 @@ jQuery(document).ready(function($) {
114
  wpDiscuzEditor.createEditor('#wpd-editor-0_0');
115
  }
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  $(document).delegate('#wpdcom .ql-editor, #wpdcom .wc_comment', 'focus', function() {
118
  $('.wpd-form-foot', $(this).parents('.wpd_comm_form')).slideDown(enableDropAnimation);
119
  });
@@ -223,7 +246,7 @@ jQuery(document).ready(function($) {
223
  $('.wpdiscuz-subscribe-bar').slideToggle(enableDropAnimation);
224
  });
225
  //============================== reCAPTCHA ============================== //
226
- if (parseInt(wpdiscuzAjaxObj.wpDiscuzIsShowOnSubscribeForm) && !isUserLoggedIn && wpdiscuzAjaxObj.wpDiscuzReCaptchaSK) {
227
  if (wpdiscuzRecaptchaVersion === '2.0') {
228
  setTimeout(function() {
229
  try {
@@ -1360,7 +1383,7 @@ jQuery(document).ready(function($) {
1360
 
1361
  $(document).delegate('.wpd-tools i', 'click', function() {
1362
  var sibling = $(this).siblings('.wpd-tools-actions');
1363
- if (!sibling.is(':visible') && $(this).parents('.wpd-comment-right').attr('id') === $('[id^=comment-]').last().attr('id')) {
1364
  $('#comments').css({paddingBottom: '160px'});
1365
  }
1366
  sibling.css({display: sibling.is(':visible') ? 'none' : 'flex'});
18
  */
19
  wpdiscuzAjaxObj.setCommentMessage = function(message, type, delay) {
20
  var className = 'wpdiscuz-message-error';
21
+ if (message instanceof Array) {
22
  for (var i in message) {
23
+ if (type instanceof Array) {
24
  if (type[i] === 'success') {
25
  className = 'wpdiscuz-message-success';
26
  } else if (type[i] === 'warning') {
37
  .addClass(className)
38
  .html(message[i])
39
  .prependTo('#wpdiscuz-comment-message')
40
+ .delay(delay instanceof Array ? delay[i] : delay ? delay : 4000)
41
  .fadeOut(1000, function() {
42
  jQuery(this).remove();
43
  });
114
  wpDiscuzEditor.createEditor('#wpd-editor-0_0');
115
  }
116
 
117
+ window.addEventListener('beforeunload', function (e) {
118
+ var forms = $('.wpd-form').not(':hidden');
119
+ if (forms.length) {
120
+ if (wpdiscuzLoadRichEditor) {
121
+ for (var i = 0; i < forms.length; i++) {
122
+ if (wpDiscuzEditor.createEditor($(forms[i]).find('.ql-container').attr('id')).getText() !== '\n') {
123
+ e.preventDefault();
124
+ e.returnValue = '';
125
+ return;
126
+ }
127
+ }
128
+ } else {
129
+ for (var i = 0; i < forms.length; i++) {
130
+ if ($(forms[i]).find('.wc_comment').val()) {
131
+ e.preventDefault();
132
+ e.returnValue = '';
133
+ return;
134
+ }
135
+ }
136
+ }
137
+ }
138
+ });
139
+
140
  $(document).delegate('#wpdcom .ql-editor, #wpdcom .wc_comment', 'focus', function() {
141
  $('.wpd-form-foot', $(this).parents('.wpd_comm_form')).slideDown(enableDropAnimation);
142
  });
246
  $('.wpdiscuz-subscribe-bar').slideToggle(enableDropAnimation);
247
  });
248
  //============================== reCAPTCHA ============================== //
249
+ if (parseInt(wpdiscuzAjaxObj.wpDiscuzIsShowOnSubscribeForm) && !isUserLoggedIn && wpdiscuzAjaxObj.wpDiscuzReCaptchaSK && $('#wpdiscuz-subscribe-form').length) {
250
  if (wpdiscuzRecaptchaVersion === '2.0') {
251
  setTimeout(function() {
252
  try {
1383
 
1384
  $(document).delegate('.wpd-tools i', 'click', function() {
1385
  var sibling = $(this).siblings('.wpd-tools-actions');
1386
+ if (!sibling.is(':visible') && $(this).parents('.wpd-comment-right').attr('id') === $('[id^=comment-]', '#wpdcom').last().attr('id')) {
1387
  $('#comments').css({paddingBottom: '160px'});
1388
  }
1389
  sibling.css({display: sibling.is(':visible') ? 'none' : 'flex'});
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,F=e("html").css("scroll-behavior"),L=e("body").css("scroll-behavior");(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)||U({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=G(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=G(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)};U(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=$(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=G(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=$(t),d=new FormData;d.append("action","wpdShowReplies"),d.append("commentId",o),me(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(),le(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 R=e(window).width(),S=e("#wpdcom").width();S>=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%"})),S>=940&&S<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%"})),S>=810&&S<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%"})),S>=730&&S<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%"})),S>=610&&S<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%"})),R>650&&(S>=510&&S<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"})),S>=470&&S<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"})),S<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 q(t,a,o){me(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?ae(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),me(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),me(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(),U(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(){ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.new_comment_id).offset().top-32},1e3,te)},d),le(a,t)}else a.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"),le(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 U(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 H(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"===X(t,!1)&&(o=X(t,!0))}),parseInt(o)+1}(e(this).parents(".wpd-comment"))),Z(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),q(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 q(s,i,t)}var c,p;!function(e){if((a||o)&&"2.0"===d){var t=$(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&&H(G(e(".wpdiscuz-edit-form-wrap"),0),w);var t=G(e(this),0),a=$(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),me(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=G(e(this)),a=$(t),o=e("#wpd-comm-"+t+" #wpdiscuz-edit-form");if(Z(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())}),me(z,!0,d).done(function(o){"object"==typeof o?(o.success?(H(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"),le(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=G(e(this));H(t,w),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)}),!wpdiscuzAjaxObj.wordpressIsPaginate&&m&&(M=0,1==m?setTimeout(function(){P(!0)},500):e(document).delegate(".wpd-load-comments","click",function(){e(this).parent(".wpd-load-more-submit-wrap").remove(),P(!0)})),e(document).delegate(".wpd-load-more-submit","click",function(){var t=e(this);t.hasClass("wpd-loaded")&&P(!1,t,"wpd-loaded","wpd-loading")});var W=!1;function N(){var t=e("#wpdiscuzHasMoreComments").val(),a=e(document).height(),o=e(window).height()+e(window).scrollTop();a&&o&&(100*o/a>=80&&!1===W&&1==t&&(W=!0,P(!1,e(".wpd-load-more-submit"))))}function P(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||""),me(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),W=!1,r=s.data.loadLastCommentId,le(s),t&&Q(!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()),le(t)}function Q(t){var a=location.href.match(/#comment\-(\d+)/);if(null!==a){var o=a[1];if(e("#comment-"+o).length)setTimeout(function(){ee(),e("html, body").animate({scrollTop:e("#comment-"+o).parents("[id^=wpd-comm-]").offset().top-32},1e3,te),t&&V(o)},500);else{var d=new FormData;d.append("action","wpdGetSingleComment"),d.append("commentId",o),me(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),le(a),ee(),e("html, body").animate({scrollTop:e(d).offset().top-32},1e3,te),t&&V(o)}e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}}function V(t){setTimeout(function(){e("#comment-"+t).siblings(".wpd-secondary-form-wrapper").is(":visible")||e("#comment-"+t).find(".wpd-reply-button").trigger("click")},1100)}function B(e){if(void 0!==e.data.message)for(var t,a=e.data.message,o=0;o<a.length;o++)Y((t=a[o]).comment_parent,t.comment_html)}function G(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 $(e){return e.substring(0,e.indexOf("_"))}function X(e,t){return t?e.substring(e.indexOf("-")+1):e.substring(0,e.indexOf("-"))}function Y(t,a){if(0==t)ae(a);else{var o=G(e("#comment-"+t),0);e("#wpdiscuz_form_anchor-"+o).after(a)}}function J(){var t,a,o="";return e(".wpd-comment-right").each(function(){t=G(e(this),0),a=$(t),o+=a+","}),o}function Z(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 ee(){e("html, body").css("scroll-behavior","unset")}function te(){e("html").css("scroll-behavior",F),e("body").css("scroll-behavior",L)}function ae(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function oe(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(),N(),e(window).scroll(function(){N()})),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=$(G(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),me(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");le(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||""),me(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(){Q(!1)},1!=m&&Q(!1),e(document).delegate(".wpdiscuz-readmore","click",function(){var t=G(e(this)),a=$(t),o=new FormData;o.append("action","wpdReadMore"),o.append("commentId",a),me(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),le(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.is(":visible")||e(this).parents(".wpd-comment-right").attr("id")!==e("[id^=comment-]").last().attr("id")||e("#comments").css({paddingBottom:"160px"}),t.css({display:t.is(":visible")?"none":"flex"})}),e(document).delegate(".wpd-comment-right","mouseleave",function(){e(this).find(".wpd-tools-actions").hide(),e("#comments").css({paddingBottom:"0"})}),e(document).delegate(".wpd_stick_btn","click",function(){var t=$(G(e(this),0)),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",t),me(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=$(G(e(this),0)),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",t),me(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(),me(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(),le(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"),me(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),le(a),ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3,te))}).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"),me(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),le(a),ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3,te))}).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=$(G(t,0)),o=new FormData;o.append("action","wpdFollowUser"),o.append("commentId",a),me(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)})}),oe(),e(document).delegate(".wc_email","keyup",function(){oe(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 de=(ne=Math.min(e(".entry-content").offset().left,e("#wpdcom").offset().left)-120)>25?ne:25;e("#wpd-bubble-wrapper").css({left:de+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){de=(ne=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120)>25?ne:25;e("#wpd-bubble-wrapper").css({left:de+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var ne;de=(ne=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120)>25?ne:25;e("#wpd-bubble-wrapper").css({left:de+"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(){ee(),e("html, body").animate({scrollTop:e("#wpdcom").offset().top-60},1e3,function(){te(),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"),Q(!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()),me(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}),B(t),e("#wpd-bubble-count").removeClass("wpd-new-comments"),e("#wpd-bubble-count .wpd-new-comments-count").text("0"),D=[],ee(),e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-60},1e3,te),le(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,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",wpdiscuzAjaxObj.restNonce)},data:{postId:s,lastId:l,visibleCommentIds:J()}}).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",J()),me(z,!1,n).done(function(t){E||"object"==typeof t&&t.success&&(B(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 se=new FormData;se.append("action","wpdGetInlineCommentForm"),me(z,!1,se).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"),re()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t)}).fail(function(e,t,a){console.log(a)})}function ie(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 ce(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function pe(){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"),re(t.siblings(".wpd-inline-form-wrapper"))))})}function re(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 le(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 me(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){ce();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"),re(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",ie(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())}),me(z,!0,d).done(function(t){if(a.addClass("wpd_not_clicked"),"object"==typeof t)if(t.success){o[0].reset(),ce();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&&ae(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",ie(t)),me(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"),ee(),e("html, body").animate({scrollTop:e(".wpdf-inline").offset().top-32},1e3,te)}),e(document).delegate(".wpd-feedback-content-link","click",function(t){t.preventDefault();var a=e(this).data("feedback-content-id");ee(),e("html, body").animate({scrollTop:e("#wpd-inline-"+a).offset().top-38},1e3,function(){te(),e("#wpd-inline-"+a).addClass("wpd-active")})}),"scroll_open"!==A&&"blink"!==A||(pe(),e(window).scroll(pe)),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),me(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())}),me(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")),me(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=me});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(e instanceof Array)for(var n in e)t instanceof Array?"success"===t[n]?o="wpdiscuz-message-success":"warning"===t[n]&&(o="wpdiscuz-message-warning"):"success"===t?o="wpdiscuz-message-success":"warning"===t&&(o="wpdiscuz-message-warning"),jQuery("<div/>").addClass(o).html(e[n]).prependTo("#wpdiscuz-comment-message").delay(a instanceof Array?a[n]: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,n=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,d=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,F=e("html").css("scroll-behavior"),L=e("body").css("scroll-behavior");(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"),window.addEventListener("beforeunload",function(t){var a=e(".wpd-form").not(":hidden");if(a.length)if(wpdiscuzLoadRichEditor){for(var o=0;o<a.length;o++)if("\n"!==wpDiscuzEditor.createEditor(e(a[o]).find(".ql-container").attr("id")).getText())return t.preventDefault(),void(t.returnValue="")}else for(o=0;o<a.length;o++)if(e(a[o]).find(".wc_comment").val())return t.preventDefault(),void(t.returnValue="")}),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)||U({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 d=G(e(this),0);e(this).hasClass("wpdiscuz-clonned")?(wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+d).focus()},v):setTimeout(function(){e("#wc-textarea-"+d).trigger("focus")},v),e("#wpd-secondary-form-wrapper-"+d).slideToggle(v)):function(a){var o=G(a,0);e("#wpdiscuz_form_anchor-"+o).before(function(t){return e("#wpdiscuz_hidden_secondary_form").html().replace(/wpdiscuzuniqueid/g,t)}(o));var n=e("#wpd-secondary-form-wrapper-"+o);if(!t){var d={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)};U(d)}wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+o).focus()},v):setTimeout(function(){e("#wc-textarea-"+o).trigger("focus")},v);n.slideToggle(v,function(){a.addClass("wpdiscuz-clonned")})}(e(this)),function(t){if((a||o)&&"2.0"===n){var d=$(t);setTimeout(function(){if(!T[d])try{T[d]=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)}}(d)}),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=G(e(this),0),o=e(this),n=e(".fas",o);!o.parents(".wpd-comment:not(.wpd-reply)").children(".wpd-reply").length&&_?function(t,a){var o=$(t),n=new FormData;n.append("action","wpdShowReplies"),n.append("commentId",o),me(z,!0,n).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(),le(o)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,n){console.log(n),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")?(n.removeClass("fa-chevron-up"),n.addClass("fa-chevron-down"),o.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_show_replies_text)):(n.removeClass("fa-chevron-down"),n.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&&e("#wpdiscuz-subscribe-form").length&&("2.0"===n?(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"===n&&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"===n){var R=e(window).width(),S=e("#wpdcom").width();S>=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%"})),S>=940&&S<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%"})),S>=810&&S<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%"})),S>=730&&S<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%"})),S>=610&&S<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%"})),R>650&&(S>=510&&S<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"})),S>=470&&S<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"})),S<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 q(t,a,o){me(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 n=v;a.data.is_main?ae(a.data.message):(n=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),me(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),me(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,n=t.comment_author_url;null==u?(Cookies.set("comment_author_email_"+g,a),Cookies.set("comment_author_"+g,o),n.length&&Cookies.set("comment_author_url_"+g,n)):(u=parseInt(u),Cookies.set("comment_author_email_"+g,a,{expires:u,path:"/"}),Cookies.set("comment_author_"+g,o,{expires:u,path:"/"}),n.length&&Cookies.set("comment_author_url_"+g,n,{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(),U(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(){ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.new_comment_id).offset().top-32},1e3,te)},n),le(a,t)}else a.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[a.data],"error"),le(a,t));else wpdiscuzAjaxObj.setCommentMessage(a,"error");e("#wpdiscuz-loading-bar").fadeOut(250),E=!1}).fail(function(t,a,n){console.log(n),e(o).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}function U(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 H(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),d=1,s=e(this).parents("form");if(s.hasClass("wpd_main_comm_form")||(d=function(t){var a=t.attr("class").split(" "),o="";return e.each(a,function(e,t){"wpd_comment_level"===X(t,!1)&&(o=X(t,!0))}),parseInt(o)+1}(e(this).parents(".wpd-comment"))),Z(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"===n&&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"===n&&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",d),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"===n&&(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),q(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 q(s,i,t)}var c,p;!function(e){if((a||o)&&"2.0"===n){var t=$(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&&H(G(e(".wpdiscuz-edit-form-wrap"),0),w);var t=G(e(this),0),a=$(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),me(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=G(e(this)),a=$(t),o=e("#wpd-comm-"+t+" #wpdiscuz-edit-form");if(Z(o,"#wpd-editor-edit_"+t),o.submit(function(e){e.preventDefault()}),o[0].checkValidity()){var n=new FormData;n.append("action","wpdSaveEditedComment"),n.append("commentId",a),e(":input",o).each(function(){""!==this.name&&"checkbox"!==this.type&&"radio"!==this.type&&n.append(this.name+"",e(this).val()),"checkbox"!==this.type&&"radio"!==this.type||e(this).is(":checked")&&n.append(this.name+"",e(this).val())}),me(z,!0,n).done(function(o){"object"==typeof o?(o.success?(H(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"),le(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=G(e(this));H(t,w),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+t)}),!wpdiscuzAjaxObj.wordpressIsPaginate&&m&&(M=0,1==m?setTimeout(function(){P(!0)},500):e(document).delegate(".wpd-load-comments","click",function(){e(this).parent(".wpd-load-more-submit-wrap").remove(),P(!0)})),e(document).delegate(".wpd-load-more-submit","click",function(){var t=e(this);t.hasClass("wpd-loaded")&&P(!1,t,"wpd-loaded","wpd-loading")});var W=!1;function N(){var t=e("#wpdiscuzHasMoreComments").val(),a=e(document).height(),o=e(window).height()+e(window).scrollTop();a&&o&&(100*o/a>=80&&!1===W&&1==t&&(W=!0,P(!1,e(".wpd-load-more-submit"))))}function P(t,a,o,n){a&&(a.toggleClass(o),a.toggleClass(n));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||""),me(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),V(s,t&&2!==d),W=!1,r=s.data.loadLastCommentId,le(s),t&&K(!1)),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(n))}).fail(function(t,d,s){console.log(s),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),a&&(a.toggleClass(o),a.toggleClass(n))})}function V(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!==d&&e(".wpdiscuz-comment-pagination").show(),e("#wpdiscuzHasMoreComments").val(1),a&&e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").show()),le(t)}function K(t){var a=location.href.match(/#comment\-(\d+)/);if(null!==a){var o=a[1];if(e("#comment-"+o).length)setTimeout(function(){ee(),e("html, body").animate({scrollTop:e("#comment-"+o).parents("[id^=wpd-comm-]").offset().top-32},1e3,te),t&&Q(o)},500);else{var n=new FormData;n.append("action","wpdGetSingleComment"),n.append("commentId",o),me(z,!0,n).done(function(a){if("object"==typeof a&&a.success){var n="#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),le(a),ee(),e("html, body").animate({scrollTop:e(n).offset().top-32},1e3,te),t&&Q(o)}e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,o){console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)})}}}function Q(t){setTimeout(function(){e("#comment-"+t).siblings(".wpd-secondary-form-wrapper").is(":visible")||e("#comment-"+t).find(".wpd-reply-button").trigger("click")},1100)}function B(e){if(void 0!==e.data.message)for(var t,a=e.data.message,o=0;o<a.length;o++)Y((t=a[o]).comment_parent,t.comment_html)}function G(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 $(e){return e.substring(0,e.indexOf("_"))}function X(e,t){return t?e.substring(e.indexOf("-")+1):e.substring(0,e.indexOf("-"))}function Y(t,a){if(0==t)ae(a);else{var o=G(e("#comment-"+t),0);e("#wpdiscuz_form_anchor-"+o).after(a)}}function J(){var t,a,o="";return e(".wpd-comment-right").each(function(){t=G(e(this),0),a=$(t),o+=a+","}),o}function Z(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 ee(){e("html, body").css("scroll-behavior","unset")}function te(){e("html").css("scroll-behavior",F),e("body").css("scroll-behavior",L)}function ae(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function oe(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!==d||wpdiscuzAjaxObj.wordpressIsPaginate||(e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide(),N(),e(window).scroll(function(){N()})),wpdiscuzAjaxObj.setLoadMoreVisibility=V,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=$(G(t));a=e(this).hasClass("wpd-vote-up")?1:-1;var n=new FormData;n.append("action","wpdVoteOnComment"),n.append("commentId",o),n.append("voteType",a),me(z,!0,n).done(function(n){if(e(t).addClass("wpd_not_clicked"),"object"==typeof n){if(n.success){if("total"===n.data.buttonsStyle){var d=e(".wpd-comment-footer .wpd-vote-result",e("#comment-"+o)),s=n.data.votes;d.text(s),d.removeClass("wpd-up wpd-down"),s>0&&d.addClass("wpd-up"),s<0&&d.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(n.data.likeCount),c.text(n.data.dislikeCount),parseInt(n.data.likeCount)>0?i.addClass("wpd-up"):i.removeClass("wpd-up"),parseInt(n.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"),n.data.curUserReaction>0?p.addClass("wpd-up"):n.data.curUserReaction<0&&r.addClass("wpd-down")}else n.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[n.data],"error");le(n,o,a)}else console.log(n);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(a,o,n){console.log(n),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 n=e(".wpdf-active").attr("data-filter-type");o.append("wpdType",n||""),me(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),V(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(){K(!1)},1!=m&&K(!1),e(document).delegate(".wpdiscuz-readmore","click",function(){var t=G(e(this)),a=$(t),o=new FormData;o.append("action","wpdReadMore"),o.append("commentId",a),me(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),le(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.is(":visible")||e(this).parents(".wpd-comment-right").attr("id")!==e("[id^=comment-]","#wpdcom").last().attr("id")||e("#comments").css({paddingBottom:"160px"}),t.css({display:t.is(":visible")?"none":"flex"})}),e(document).delegate(".wpd-comment-right","mouseleave",function(){e(this).find(".wpd-tools-actions").hide(),e("#comments").css({paddingBottom:"0"})}),e(document).delegate(".wpd_stick_btn","click",function(){var t=$(G(e(this),0)),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",t),me(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=$(G(e(this),0)),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",t),me(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 n=e(".wpdiscuz-sort-button-active").attr("data-sorting");n&&o.append("sorting",n),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(),me(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),V(a),r=a.data.loadLastCommentId,e(".wpd-load-more-submit").blur(),le(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"),me(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),le(a),ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3,te))}).fail(function(a,o,n){console.log(n),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"),me(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),le(a),ee(),e("html, body").animate({scrollTop:e("#comment-"+a.data.commentId).offset().top-32},1e3,te))}).fail(function(a,o,n){console.log(n),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=$(G(t,0)),o=new FormData;o.append("action","wpdFollowUser"),o.append("commentId",a),me(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,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),oe(),e(document).delegate(".wc_email","keyup",function(){oe(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 ne=(de=Math.min(e(".entry-content").offset().left,e("#wpdcom").offset().left)-120)>25?de:25;e("#wpd-bubble-wrapper").css({left:ne+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){ne=(de=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120)>25?de:25;e("#wpd-bubble-wrapper").css({left:ne+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var de;ne=(de=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120)>25?de:25;e("#wpd-bubble-wrapper").css({left:ne+"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(){ee(),e("html, body").animate({scrollTop:e("#wpdcom").offset().top-60},1e3,function(){te(),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"),K(!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()),me(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}),B(t),e("#wpd-bubble-count").removeClass("wpd-new-comments"),e("#wpd-bubble-count .wpd-new-comments-count").text("0"),D=[],ee(),e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-60},1e3,te),le(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,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",wpdiscuzAjaxObj.restNonce)},data:{postId:s,lastId:l,visibleCommentIds:J()}}).done(function(a){if(!E)if("object"==typeof a){if(a.ids.length){i&&((d=new FormData).append("action","wpdUpdateAutomatically"),d.append("loadLastCommentId",r),d.append("visibleCommentIds",J()),me(z,!1,d).done(function(t){E||"object"==typeof t&&t.success&&(B(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 n=parseInt(e(".wpd-new-comments-count").text());n+=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(n),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 d;setTimeout(t,c)}).fail(function(e,a,o){console.log(o),setTimeout(t,c)})},c),e(".wpd-inline-form-wrapper").length){var se=new FormData;se.append("action","wpdGetInlineCommentForm"),me(z,!1,se).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"),re()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj[t.data],"error"):console.log(t)}).fail(function(e,t,a){console.log(a)})}function ie(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 ce(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function pe(){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"),re(t.siblings(".wpd-inline-form-wrapper"))))})}function re(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 le(t,a,o,n){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,n):console.log(t.data.callbackFunctions[e]+" is not a function")})}function me(t,a,o){a&&e("#wpdiscuz-loading-bar").show(),o.append("postId",s);var n=o.get("action");wpdiscuzAjaxObj.dataFilterCallbacks&&wpdiscuzAjaxObj.dataFilterCallbacks[n]&&e.each(wpdiscuzAjaxObj.dataFilterCallbacks[n],function(e){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[n][e]]&&(o=wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[n][e]](o,t,a))});var d=t?wpdiscuzAjaxObj.url:wpdiscuzAjaxObj.customAjaxUrl;return e.ajax({type:"POST",url:d,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){ce();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"),re(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 n=new FormData;n.append("action","wpdAddInlineComment"),n.append("inline_form_id",ie(o)),e.each(e("input, textarea",o),function(t,a){"checkbox"===this.type?e(this).is(":checked")&&n.append(e(a).attr("name"),e(a).val()):n.append(e(a).attr("name"),e(a).val())}),me(z,!0,n).done(function(t){if(a.addClass("wpd_not_clicked"),"object"==typeof t)if(t.success){o[0].reset(),ce();var n=parseInt(t.data.newCount),d=a.parents(".wpd-inline-icon-wrapper").find(".wpd-inline-icon-count");d.text(n),n?d.addClass("wpd-has-comments"):d.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&&ae(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",ie(t)),me(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"),ee(),e("html, body").animate({scrollTop:e(".wpdf-inline").offset().top-32},1e3,te)}),e(document).delegate(".wpd-feedback-content-link","click",function(t){t.preventDefault();var a=e(this).data("feedback-content-id");ee(),e("html, body").animate({scrollTop:e("#wpd-inline-"+a).offset().top-38},1e3,function(){te(),e("#wpd-inline-"+a).addClass("wpd-active")})}),"scroll_open"!==A&&"blink"!==A||(pe(),e(window).scroll(pe)),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),me(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,d=e(this);if(d[0].checkValidity()&&(a=d,o=!0,"2.0"===n&&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"===n&&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("*",d).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())}),me(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")),me(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=me});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")}};
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.7
6
  * Author: gVectors Team
7
  * Author URI: https://gvectors.com/
8
  * Plugin URI: https://wpdiscuz.com/
@@ -67,7 +67,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
67
  $this->optionsSerialized->reCaptchaVersion = $this->options->recaptcha["version"];
68
  $this->wpdiscuzForm = new wpDiscuzForm($this->options, $this->version);
69
  $this->helper = new WpdiscuzHelper($this->options, $this->dbManager, $this->wpdiscuzForm);
70
- $this->helperEmail = new WpdiscuzHelperEmail($this->options, $this->dbManager);
71
  $this->helperOptimization = new WpdiscuzHelperOptimization($this->options, $this->dbManager, $this->helperEmail);
72
  $this->helperAjax = new WpdiscuzHelperAjax($this->options, $this->dbManager, $this->helper, $this->helperEmail, $this->wpdiscuzForm);
73
  $this->helperUpload = new WpdiscuzHelperUpload($this->options, $this->dbManager, $this->wpdiscuzForm, $this->helper);
@@ -268,7 +268,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
268
  public function updateAutomatically() {
269
  $postId = isset($_POST["postId"]) ? intval($_POST["postId"]) : 0;
270
  $loadLastCommentId = isset($_POST["loadLastCommentId"]) ? intval($_POST["loadLastCommentId"]) : 0;
271
- if ($postId && $loadLastCommentId) {
272
  $this->isWpdiscuzLoaded = true;
273
  $visibleCommentIds = isset($_POST["visibleCommentIds"]) ? rtrim($_POST["visibleCommentIds"], ",") : "";
274
  $cArgs = $this->getDefaultCommentsArgs($postId);
@@ -425,6 +425,9 @@ class WpdiscuzCore implements WpDiscuzConstants {
425
  $held_moderate = 1;
426
  if ($newComment->comment_approved === "1") {
427
  $held_moderate = 0;
 
 
 
428
  }
429
  if ($notificationType === WpdiscuzCore::SUBSCRIPTION_POST && class_exists("Prompt_Comment_Form_Handling") && $this->options->subscription["usePostmaticForCommentNotification"]) {
430
  $_POST[Prompt_Comment_Form_Handling::SUBSCRIBE_CHECKBOX_NAME] = 1;
@@ -459,9 +462,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
459
  $commentListArgs = $this->getCommentListArgs($postId);
460
  $commentListArgs["addComment"] = $commentDepth;
461
  $commentListArgs["comment_author_email"] = $email;
462
- if (apply_filters("wpdiscuz_enable_user_mentioning", true) && $this->options->subscription["enableUserMentioning"] && $this->options->subscription["sendMailToMentionedUsers"] && ($mentionedUsers = $this->helper->getMentionedUsers($newComment->comment_content))) {
463
- $this->helperEmail->sendMailToMentionedUsers($mentionedUsers, $newComment);
464
- }
465
  $response["uniqueid"] = $uniqueId;
466
  $response["message"] = wp_list_comments($commentListArgs, [$newComment]);
467
  $response["message"] = wp_unslash($response["message"]);
@@ -881,7 +882,7 @@ class WpdiscuzCore implements WpDiscuzConstants {
881
  if ($this->options->wp["threadComments"]) {
882
  $where .= " AND comment_parent = 0";
883
  }
884
- $typesNotIn = apply_filters("wpdiscuz_found_comments_query", [self::WPDISCUZ_STICKY_COMMENT]);
885
  foreach ($typesNotIn as $k => &$type) {
886
  $type = esc_sql($type);
887
  }
@@ -2124,7 +2125,10 @@ class WpdiscuzCore implements WpDiscuzConstants {
2124
  ],
2125
  ];
2126
  $newComment = get_comment($new_comment_id);
2127
- if (apply_filters("wpdiscuz_enable_user_mentioning", true) && $this->options->subscription["enableUserMentioning"] && $this->options->subscription["sendMailToMentionedUsers"] && ($mentionedUsers = $this->helper->getMentionedUsers($newComment->comment_content))) {
 
 
 
2128
  $this->helperEmail->sendMailToMentionedUsers($mentionedUsers, $newComment);
2129
  }
2130
  $notifiyMe = isset($_POST["wpd_inline_notify_me"]) ? absint($_POST["wpd_inline_notify_me"]) : 0;
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.8
6
  * Author: gVectors Team
7
  * Author URI: https://gvectors.com/
8
  * Plugin URI: https://wpdiscuz.com/
67
  $this->optionsSerialized->reCaptchaVersion = $this->options->recaptcha["version"];
68
  $this->wpdiscuzForm = new wpDiscuzForm($this->options, $this->version);
69
  $this->helper = new WpdiscuzHelper($this->options, $this->dbManager, $this->wpdiscuzForm);
70
+ $this->helperEmail = new WpdiscuzHelperEmail($this->options, $this->dbManager, $this->helper);
71
  $this->helperOptimization = new WpdiscuzHelperOptimization($this->options, $this->dbManager, $this->helperEmail);
72
  $this->helperAjax = new WpdiscuzHelperAjax($this->options, $this->dbManager, $this->helper, $this->helperEmail, $this->wpdiscuzForm);
73
  $this->helperUpload = new WpdiscuzHelperUpload($this->options, $this->dbManager, $this->wpdiscuzForm, $this->helper);
268
  public function updateAutomatically() {
269
  $postId = isset($_POST["postId"]) ? intval($_POST["postId"]) : 0;
270
  $loadLastCommentId = isset($_POST["loadLastCommentId"]) ? intval($_POST["loadLastCommentId"]) : 0;
271
+ if ($postId) {
272
  $this->isWpdiscuzLoaded = true;
273
  $visibleCommentIds = isset($_POST["visibleCommentIds"]) ? rtrim($_POST["visibleCommentIds"], ",") : "";
274
  $cArgs = $this->getDefaultCommentsArgs($postId);
425
  $held_moderate = 1;
426
  if ($newComment->comment_approved === "1") {
427
  $held_moderate = 0;
428
+ if ($wooExists) {
429
+ update_post_meta($postId, "_wc_review_count", get_comments(["count" => true, "post_id" => $postId]));
430
+ }
431
  }
432
  if ($notificationType === WpdiscuzCore::SUBSCRIPTION_POST && class_exists("Prompt_Comment_Form_Handling") && $this->options->subscription["usePostmaticForCommentNotification"]) {
433
  $_POST[Prompt_Comment_Form_Handling::SUBSCRIBE_CHECKBOX_NAME] = 1;
462
  $commentListArgs = $this->getCommentListArgs($postId);
463
  $commentListArgs["addComment"] = $commentDepth;
464
  $commentListArgs["comment_author_email"] = $email;
465
+
 
 
466
  $response["uniqueid"] = $uniqueId;
467
  $response["message"] = wp_list_comments($commentListArgs, [$newComment]);
468
  $response["message"] = wp_unslash($response["message"]);
882
  if ($this->options->wp["threadComments"]) {
883
  $where .= " AND comment_parent = 0";
884
  }
885
+ $typesNotIn = apply_filters("wpdiscuz_found_comments_query", [self::WPDISCUZ_STICKY_COMMENT], $post->ID);
886
  foreach ($typesNotIn as $k => &$type) {
887
  $type = esc_sql($type);
888
  }
2125
  ],
2126
  ];
2127
  $newComment = get_comment($new_comment_id);
2128
+ if ($newComment->comment_approved === "1" && class_exists("WooCommerce") && get_post_type($inline_form->post_id) === "product") {
2129
+ update_post_meta($inline_form->post_id, "_wc_review_count", get_comments(["count" => true, "post_id" => $inline_form->post_id]));
2130
+ }
2131
+ if (apply_filters("wpdiscuz_enable_user_mentioning", $this->options->subscription["enableUserMentioning"]) && $this->options->subscription["sendMailToMentionedUsers"] && ($mentionedUsers = $this->helper->getMentionedUsers($newComment->comment_content))) {
2132
  $this->helperEmail->sendMailToMentionedUsers($mentionedUsers, $newComment);
2133
  }
2134
  $notifiyMe = isset($_POST["wpd_inline_notify_me"]) ? absint($_POST["wpd_inline_notify_me"]) : 0;
forms/wpdFormAttr/Field/CookiesConsent.php CHANGED
@@ -62,7 +62,8 @@ class CookiesConsent extends Field {
62
 
63
  public function validateFieldData($fieldName, $args, $options, $currentUser) {
64
  $this->cookiesConsent = filter_input(INPUT_POST, $fieldName, FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE);
65
- if ($this->cookiesConsent === false) {
 
66
  $past = time() - YEAR_IN_SECONDS;
67
  setcookie("comment_author_" . COOKIEHASH, " ", $past, "/", COOKIE_DOMAIN);
68
  setcookie("comment_author_email_" . COOKIEHASH, " ", $past, "/", COOKIE_DOMAIN);
62
 
63
  public function validateFieldData($fieldName, $args, $options, $currentUser) {
64
  $this->cookiesConsent = filter_input(INPUT_POST, $fieldName, FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE);
65
+ $action = filter_input(INPUT_POST, "action", FILTER_SANITIZE_STRING);
66
+ if ($this->cookiesConsent === false && $action !== "wpdSaveEditedComment") {
67
  $past = time() - YEAR_IN_SECONDS;
68
  setcookie("comment_author_" . COOKIEHASH, " ", $past, "/", COOKIE_DOMAIN);
69
  setcookie("comment_author_email_" . COOKIEHASH, " ", $past, "/", COOKIE_DOMAIN);
forms/wpdFormAttr/Form.php CHANGED
@@ -259,9 +259,10 @@ class Form {
259
  foreach ($this->fieldsBeforeSave as $mettaKey => $data) {
260
  if ($this->ratingsExists && $this->formCustomFields[$mettaKey]["type"] === "wpdFormAttr\Field\RatingField") {
261
  $oldCommentRating = get_comment_meta($commentID, $mettaKey, true);
262
- if ($oldCommentRating && $commentApproved === "1") {
263
- $postID = $comment->comment_post_ID;
264
  $postRatingMeta = get_post_meta($postID, wpdFormConst::WPDISCUZ_RATING_COUNT, true);
 
265
  $oldCommentRatingCount = $postRatingMeta[$mettaKey][$oldCommentRating] - 1;
266
  if ($oldCommentRatingCount > 0) {
267
  $postRatingMeta[$mettaKey][$oldCommentRating] = $oldCommentRatingCount;
259
  foreach ($this->fieldsBeforeSave as $mettaKey => $data) {
260
  if ($this->ratingsExists && $this->formCustomFields[$mettaKey]["type"] === "wpdFormAttr\Field\RatingField") {
261
  $oldCommentRating = get_comment_meta($commentID, $mettaKey, true);
262
+ $postID = $comment->comment_post_ID;
263
+ if (!(class_exists("WooCommerce") && get_post_type($postID) === "product") && $oldCommentRating && $commentApproved === "1") {
264
  $postRatingMeta = get_post_meta($postID, wpdFormConst::WPDISCUZ_RATING_COUNT, true);
265
+ $postRatingMeta = is_array($postRatingMeta) ? $postRatingMeta : [];
266
  $oldCommentRatingCount = $postRatingMeta[$mettaKey][$oldCommentRating] - 1;
267
  if ($oldCommentRatingCount > 0) {
268
  $postRatingMeta[$mettaKey][$oldCommentRating] = $oldCommentRatingCount;
includes/class.WpdiscuzDBManager.php CHANGED
@@ -164,7 +164,6 @@ class WpdiscuzDBManager implements WpDiscuzConstants {
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')";
170
  } else {
@@ -902,6 +901,7 @@ class WpdiscuzDBManager implements WpDiscuzConstants {
902
  $like = (int) $votes[0];
903
  $dislike = (int) $votes[1];
904
  update_comment_meta($id, self::META_KEY_VOTES_SEPARATE, ["like" => $like, "dislike" => $dislike]);
 
905
  }
906
  }
907
 
@@ -1027,8 +1027,8 @@ class WpdiscuzDBManager implements WpDiscuzConstants {
1027
  return $this->db->get_row($sql);
1028
  }
1029
 
1030
- public function updateFeedbackForm($post_id, $uid, $question, $opened) {
1031
- $sql = $this->db->prepare("UPDATE `{$this->feedbackForms}` SET `question` = %s, `opened` = %d WHERE `post_id` = %d AND `unique_id` = %s;", $question, $opened, $post_id, $uid);
1032
  return $this->db->get_var($sql);
1033
  }
1034
 
@@ -1113,6 +1113,7 @@ class WpdiscuzDBManager implements WpDiscuzConstants {
1113
  /* === Fix Tables === */
1114
 
1115
  public function fixTables() {
 
1116
  $sql = "SHOW INDEX FROM `{$this->avatarsCache}` WHERE Key_name = 'url'";
1117
  if ($this->db->get_results($sql)) {
1118
  $sql = "ALTER TABLE `{$this->avatarsCache}` DROP INDEX `url`;";
@@ -1123,15 +1124,35 @@ class WpdiscuzDBManager implements WpDiscuzConstants {
1123
  $sql = "ALTER TABLE `{$this->avatarsCache}` DROP INDEX `hash`;";
1124
  $this->db->query($sql);
1125
  }
1126
- $sql_alter = "ALTER TABLE `{$this->avatarsCache}` DROP INDEX `user_email`, MODIFY `user_email` VARCHAR(100) NOT NULL, MODIFY `hash` VARCHAR(32) NOT NULL, ADD UNIQUE KEY `user_email` (`user_email`);";
1127
  $this->db->query($sql_alter);
1128
- $sql_alter = "ALTER TABLE `{$this->emailNotification}` DROP INDEX `subscribe_unique_index`, MODIFY `email` VARCHAR(100) NOT NULL, MODIFY `subscribtion_type` VARCHAR(20) NOT NULL, MODIFY `activation_key` VARCHAR(32) NOT NULL, ADD UNIQUE KEY `subscribe_unique_index` (`subscribtion_id`,`email`,`post_id`);";
1129
  $this->db->query($sql_alter);
1130
- $sql_alter = "ALTER TABLE `{$this->followUsers}` DROP INDEX `follow_unique_key`, DROP INDEX `user_email`, DROP INDEX `follower_email`, MODIFY `user_email` VARCHAR(100) NOT NULL, MODIFY `follower_email` VARCHAR(100) NOT NULL, ADD KEY `user_email` (`user_email`), ADD KEY `follower_email` (`follower_email`), ADD UNIQUE KEY `follow_unique_key` (`user_email`,`follower_email`);";
1131
  $this->db->query($sql_alter);
1132
- $sql_alter = "ALTER TABLE `{$this->phrases}` DROP INDEX `phrase_key`, MODIFY `phrase_key` VARCHAR(100) NOT NULL, ADD KEY `phrase_key` (`phrase_key`);";
1133
  $this->db->query($sql_alter);
1134
- $sql_alter = "ALTER TABLE `{$this->usersVoted}` DROP INDEX `user_id`, MODIFY `user_id` VARCHAR(32) NOT NULL, ADD KEY `user_id` (`user_id`);";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1135
  $this->db->query($sql_alter);
1136
  $sql_alter = "ALTER TABLE `{$this->usersRated}` MODIFY `user_ip` VARCHAR(32) NOT NULL;";
1137
  $this->db->query($sql_alter);
@@ -1156,7 +1177,11 @@ class WpdiscuzDBManager implements WpDiscuzConstants {
1156
  }
1157
  }
1158
  if (is_plugin_active("wpdiscuz-online-users/wpdiscuz-ou.php")) {
1159
- $sql_alter = "ALTER TABLE `{$this->db->prefix}wc_online_users` DROP INDEX `unique_online_user`, DROP INDEX `user_ip`, MODIFY `user_email` VARCHAR (100) NOT NULL, MODIFY `user_ip` VARCHAR (32) NOT NULL, ADD UNIQUE KEY `unique_online_user` (`blog_id`,`user_id`,`user_email`), ADD KEY `user_ip` (`user_ip`);";
 
 
 
 
1160
  $this->db->query($sql_alter);
1161
  if (!empty($this->db->charset)) {
1162
  $sql_alter = "ALTER TABLE `{$this->db->prefix}wc_online_users` CONVERT TO CHARACTER SET {$this->db->charset}" . ($this->db->collate ? " COLLATE {$this->db->collate}" : "") . ";";
164
  */
165
  public function getNewCommentIds($args, $loadLastCommentId, $email, $visibleCommentIds) {
166
  $wpdiscuz = wpDiscuz();
 
167
  if ($args["status"] === "all") {
168
  $approved = " AND `comment_approved` IN('1','0')";
169
  } else {
901
  $like = (int) $votes[0];
902
  $dislike = (int) $votes[1];
903
  update_comment_meta($id, self::META_KEY_VOTES_SEPARATE, ["like" => $like, "dislike" => $dislike]);
904
+ update_comment_meta($id, self::META_KEY_VOTES, $like - $dislike);
905
  }
906
  }
907
 
1027
  return $this->db->get_row($sql);
1028
  }
1029
 
1030
+ public function updateFeedbackForm($post_id, $uid, $question, $opened, $content) {
1031
+ $sql = $this->db->prepare("UPDATE `{$this->feedbackForms}` SET `question` = %s, `opened` = %d, `content` = %s WHERE `post_id` = %d AND `unique_id` = %s;", $question, $opened, $content, $post_id, $uid);
1032
  return $this->db->get_var($sql);
1033
  }
1034
 
1113
  /* === Fix Tables === */
1114
 
1115
  public function fixTables() {
1116
+ $this->dbCreateTables();
1117
  $sql = "SHOW INDEX FROM `{$this->avatarsCache}` WHERE Key_name = 'url'";
1118
  if ($this->db->get_results($sql)) {
1119
  $sql = "ALTER TABLE `{$this->avatarsCache}` DROP INDEX `url`;";
1124
  $sql = "ALTER TABLE `{$this->avatarsCache}` DROP INDEX `hash`;";
1125
  $this->db->query($sql);
1126
  }
1127
+ $sql_alter = "ALTER TABLE `{$this->avatarsCache}` DROP INDEX `user_email`;";
1128
  $this->db->query($sql_alter);
1129
+ $sql_alter = "ALTER TABLE `{$this->avatarsCache}` MODIFY `user_email` VARCHAR(100) NOT NULL, MODIFY `hash` VARCHAR(32) NOT NULL;";
1130
  $this->db->query($sql_alter);
1131
+ $sql_alter = "ALTER TABLE `{$this->avatarsCache}` ADD UNIQUE KEY `user_email` (`user_email`);";
1132
  $this->db->query($sql_alter);
1133
+ $sql_alter = "ALTER TABLE `{$this->emailNotification}` DROP INDEX `subscribe_unique_index`;";
1134
  $this->db->query($sql_alter);
1135
+ $sql_alter = "ALTER TABLE `{$this->emailNotification}` MODIFY `email` VARCHAR(100) NOT NULL, MODIFY `subscribtion_type` VARCHAR(20) NOT NULL, MODIFY `activation_key` VARCHAR(32) NOT NULL;";
1136
+ $this->db->query($sql_alter);
1137
+ $sql_alter = "ALTER TABLE `{$this->emailNotification}` ADD UNIQUE KEY `subscribe_unique_index` (`subscribtion_id`,`email`,`post_id`);";
1138
+ $this->db->query($sql_alter);
1139
+ $sql_alter = "ALTER TABLE `{$this->followUsers}` DROP INDEX `follow_unique_key`, DROP INDEX `user_email`, DROP INDEX `follower_email`;";
1140
+ $this->db->query($sql_alter);
1141
+ $sql_alter = "ALTER TABLE `{$this->followUsers}` MODIFY `user_email` VARCHAR(100) NOT NULL, MODIFY `follower_email` VARCHAR(100) NOT NULL;";
1142
+ $this->db->query($sql_alter);
1143
+ $sql_alter = "ALTER TABLE `{$this->followUsers}` ADD KEY `user_email` (`user_email`), ADD KEY `follower_email` (`follower_email`), ADD UNIQUE KEY `follow_unique_key` (`user_email`,`follower_email`);";
1144
+ $this->db->query($sql_alter);
1145
+ $sql_alter = "ALTER TABLE `{$this->phrases}` DROP INDEX `phrase_key`;";
1146
+ $this->db->query($sql_alter);
1147
+ $sql_alter = "ALTER TABLE `{$this->phrases}` MODIFY `phrase_key` VARCHAR(100) NOT NULL;";
1148
+ $this->db->query($sql_alter);
1149
+ $sql_alter = "ALTER TABLE `{$this->phrases}` ADD KEY `phrase_key` (`phrase_key`);";
1150
+ $this->db->query($sql_alter);
1151
+ $sql_alter = "ALTER TABLE `{$this->usersVoted}` DROP INDEX `user_id`;";
1152
+ $this->db->query($sql_alter);
1153
+ $sql_alter = "ALTER TABLE `{$this->usersVoted}` MODIFY `user_id` VARCHAR(32) NOT NULL;";
1154
+ $this->db->query($sql_alter);
1155
+ $sql_alter = "ALTER TABLE `{$this->usersVoted}` ADD KEY `user_id` (`user_id`);";
1156
  $this->db->query($sql_alter);
1157
  $sql_alter = "ALTER TABLE `{$this->usersRated}` MODIFY `user_ip` VARCHAR(32) NOT NULL;";
1158
  $this->db->query($sql_alter);
1177
  }
1178
  }
1179
  if (is_plugin_active("wpdiscuz-online-users/wpdiscuz-ou.php")) {
1180
+ $sql_alter = "ALTER TABLE `{$this->db->prefix}wc_online_users` DROP INDEX `unique_online_user`, DROP INDEX `user_ip`;";
1181
+ $this->db->query($sql_alter);
1182
+ $sql_alter = "ALTER TABLE `{$this->db->prefix}wc_online_users` MODIFY `user_email` VARCHAR (100) NOT NULL, MODIFY `user_ip` VARCHAR (32) NOT NULL;";
1183
+ $this->db->query($sql_alter);
1184
+ $sql_alter = "ALTER TABLE `{$this->db->prefix}wc_online_users` ADD UNIQUE KEY `unique_online_user` (`blog_id`,`user_id`,`user_email`), ADD KEY `user_ip` (`user_ip`);";
1185
  $this->db->query($sql_alter);
1186
  if (!empty($this->db->charset)) {
1187
  $sql_alter = "ALTER TABLE `{$this->db->prefix}wc_online_users` CONVERT TO CHARACTER SET {$this->db->charset}" . ($this->db->collate ? " COLLATE {$this->db->collate}" : "") . ";";
includes/class.WpdiscuzRest.php CHANGED
@@ -2,106 +2,116 @@
2
 
3
  class WpdiscuzRest extends WP_REST_Controller {
4
 
5
- private $dbManager;
6
- private $options;
7
- private $helper;
8
- private $wpdiscuzForm;
9
-
10
- public function __construct($dbManager, $options, $helper, $wpdiscuzForm) {
11
- $this->dbManager = $dbManager;
12
- $this->options = $options;
13
- $this->helper = $helper;
14
- $this->wpdiscuzForm = $wpdiscuzForm;
15
- $this->namespace = "wpdiscuz/v1";
16
- $this->resource_name = "update";
17
- }
18
 
19
- public function registerRoutes() {
20
- register_rest_route($this->namespace, "/" . $this->resource_name, [
21
- [
22
- "methods" => "GET",
23
- "callback" => [&$this, "checkNewComments"],
24
- "args" => [
25
- "postId" => [
26
- "required" => true,
27
- "type" => "number",
28
- ],
29
- "lastId" => [
30
- "required" => true,
31
- "type" => "number",
32
- ],
33
- "visibleCommentIds" => [
34
- "required" => true,
35
- "type" => "string",
36
- ],
37
- ],
38
- ],
39
- ]);
40
- }
41
 
42
- public function checkNewComments($data) {
43
- $params = $data->get_params();
44
- $response = ["ids" => []];
45
- $status = current_user_can("moderate_comments") ? "all" : "approved";
46
- $args = ["status" => $status, "post_id" => $params["postId"]];
47
- $commentId = $this->dbManager->getLastCommentId($args);
48
- if ($commentId > $params["lastId"]) {
49
- $currentUser = WpdiscuzHelper::getCurrentUser();
50
- $sentEmail = !empty($_COOKIE["comment_author_email_" . COOKIEHASH]) ? trim($_COOKIE["comment_author_email_" . COOKIEHASH]) : "";
51
- $email = !empty($currentUser->ID) ? $currentUser->user_email : $sentEmail;
52
- $newCommentIds = $this->dbManager->getNewCommentIds($args, $params["lastId"], $email, $params["visibleCommentIds"]);
53
- $newCommentIds = apply_filters("wpdiscuz_bubble_new_comment_ids", $newCommentIds, $params["postId"], $currentUser);
54
- if (!empty($newCommentIds)) {
55
- $response["ids"] = $newCommentIds;
56
- if ($this->options->live["bubbleShowNewCommentMessage"]) {
57
- $comment = get_comment($commentId);
58
- $comment->comment_content = apply_filters("comment_text", $comment->comment_content, $comment, ["is_wpdiscuz_comment" => true]);
59
- $comment->comment_content = strip_tags($comment->comment_content);
60
- if (stripos($comment->comment_content, "[/spoiler]") === false) {
61
- $user = "";
62
- if ($comment->user_id) {
63
- $user = get_user_by("id", $comment->user_id);
64
- } else if ($this->options->login["isUserByEmail"]) {
65
- $user = get_user_by("email", $comment->comment_author_email);
66
- }
67
- if ($user) {
68
- $authorName = $user->display_name ? $user->display_name : $comment->comment_author;
69
- $authorAvatarField = $user->ID;
70
- $gravatarUserId = $user->ID;
71
- $gravatarUserEmail = $user->user_email;
72
- } else {
73
- $authorName = $comment->comment_author ? $comment->comment_author : esc_html($this->options->phrases["wc_anonymous"]);
74
- $authorAvatarField = $comment->comment_author_email;
75
- $gravatarUserId = 0;
76
- $gravatarUserEmail = $comment->comment_author_email;
77
- }
78
- $gravatarArgs = [
79
- "wpdiscuz_gravatar_field" => $authorAvatarField,
80
- "wpdiscuz_gravatar_size" => apply_filters("wpdiscuz_gravatar_size", 16),
81
- "wpdiscuz_gravatar_user_id" => $gravatarUserId,
82
- "wpdiscuz_gravatar_user_email" => $gravatarUserEmail,
83
- "wpdiscuz_current_user" => $user,
84
- ];
85
- if (function_exists("mb_substr")) {
86
- $response["commentText"] = mb_substr($comment->comment_content, 0, 50);
87
- } else {
88
- $response["commentText"] = substr($comment->comment_content, 0, 50);
89
- }
90
- if (strlen($comment->comment_content) > strlen($response["commentText"])) {
91
- $response["commentText"] .= "...";
92
- }
93
- $response["commentDate"] = esc_html($this->helper->dateDiff($comment->comment_date_gmt));
94
- $response["commentLink"] = esc_url_raw(get_comment_link($comment));
95
- $response["authorName"] = esc_html($authorName);
96
- $response["avatar"] = get_avatar($gravatarArgs["wpdiscuz_gravatar_field"], $gravatarArgs["wpdiscuz_gravatar_size"], "", $authorName, $gravatarArgs);
97
- }
98
- }
99
- $form = $this->wpdiscuzForm->getForm($params["postId"]);
100
- $response["all_comments_count"] = esc_html(get_comments_number($params["postId"]));
101
- $response["all_comments_count_html"] = "<span class='wpdtc'>" . esc_html($response["all_comments_count"]) . "</span> " . esc_html(1 == $response["all_comments_count"] ? $form->getHeaderTextSingle() : $form->getHeaderTextPlural());
102
- }
103
- }
104
- return $response;
105
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
 
107
  }
2
 
3
  class WpdiscuzRest extends WP_REST_Controller {
4
 
5
+ private $dbManager;
6
+ private $options;
7
+ private $helper;
8
+ private $wpdiscuzForm;
9
+ private $resource_name;
 
 
 
 
 
 
 
 
10
 
11
+ public function __construct($dbManager, $options, $helper, $wpdiscuzForm) {
12
+ $this->dbManager = $dbManager;
13
+ $this->options = $options;
14
+ $this->helper = $helper;
15
+ $this->wpdiscuzForm = $wpdiscuzForm;
16
+ $this->namespace = "wpdiscuz/v1";
17
+ $this->resource_name = "update";
18
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
+ public function registerRoutes() {
21
+ register_rest_route($this->namespace, "/" . $this->resource_name, [
22
+ [
23
+ "methods" => "GET",
24
+ "callback" => [&$this, "checkNewComments"],
25
+ "permission_callback" => [&$this, "checkPermission"],
26
+ "args" => [
27
+ "postId" => [
28
+ "required" => true,
29
+ "type" => "number",
30
+ ],
31
+ "lastId" => [
32
+ "required" => true,
33
+ "type" => "number",
34
+ ],
35
+ "visibleCommentIds" => [
36
+ "required" => true,
37
+ "type" => "string",
38
+ ],
39
+ ],
40
+ ],
41
+ ]);
42
+ }
43
+
44
+ public function checkPermission() {
45
+ if ($this->options->live["commentListUpdateType"] || ($this->options->live["enableBubble"] && $this->options->live["bubbleLiveUpdate"])) {
46
+ $currentUser = WpdiscuzHelper::getCurrentUser();
47
+ return !empty($currentUser->ID) || (empty($currentUser->ID) && $this->options->live["liveUpdateGuests"]);
48
+ }
49
+ return false;
50
+ }
51
+
52
+ public function checkNewComments($data) {
53
+ $params = $data->get_params();
54
+ $response = ["ids" => []];
55
+ $status = current_user_can("moderate_comments") ? "all" : "approved";
56
+ $args = ["status" => $status, "post_id" => $params["postId"]];
57
+ $commentId = $this->dbManager->getLastCommentId($args);
58
+ if ($commentId > $params["lastId"]) {
59
+ $currentUser = WpdiscuzHelper::getCurrentUser();
60
+ $sentEmail = !empty($_COOKIE["comment_author_email_" . COOKIEHASH]) ? trim($_COOKIE["comment_author_email_" . COOKIEHASH]) : "";
61
+ $email = !empty($currentUser->ID) ? $currentUser->user_email : $sentEmail;
62
+ $newCommentIds = $this->dbManager->getNewCommentIds($args, $params["lastId"], $email, $params["visibleCommentIds"]);
63
+ $newCommentIds = apply_filters("wpdiscuz_bubble_new_comment_ids", $newCommentIds, $params["postId"], $currentUser);
64
+ if (!empty($newCommentIds)) {
65
+ $response["ids"] = $newCommentIds;
66
+ if ($this->options->live["bubbleShowNewCommentMessage"]) {
67
+ $comment = get_comment($commentId);
68
+ $comment->comment_content = apply_filters("comment_text", $comment->comment_content, $comment, ["is_wpdiscuz_comment" => true]);
69
+ $comment->comment_content = strip_tags($comment->comment_content);
70
+ if (stripos($comment->comment_content, "[/spoiler]") === false) {
71
+ $user = "";
72
+ if ($comment->user_id) {
73
+ $user = get_user_by("id", $comment->user_id);
74
+ } else if ($this->options->login["isUserByEmail"]) {
75
+ $user = get_user_by("email", $comment->comment_author_email);
76
+ }
77
+ if ($user) {
78
+ $authorName = $user->display_name ? $user->display_name : $comment->comment_author;
79
+ $authorAvatarField = $user->ID;
80
+ $gravatarUserId = $user->ID;
81
+ $gravatarUserEmail = $user->user_email;
82
+ } else {
83
+ $authorName = $comment->comment_author ? $comment->comment_author : esc_html($this->options->phrases["wc_anonymous"]);
84
+ $authorAvatarField = $comment->comment_author_email;
85
+ $gravatarUserId = 0;
86
+ $gravatarUserEmail = $comment->comment_author_email;
87
+ }
88
+ $gravatarArgs = [
89
+ "wpdiscuz_gravatar_field" => $authorAvatarField,
90
+ "wpdiscuz_gravatar_size" => apply_filters("wpdiscuz_gravatar_size", 16),
91
+ "wpdiscuz_gravatar_user_id" => $gravatarUserId,
92
+ "wpdiscuz_gravatar_user_email" => $gravatarUserEmail,
93
+ "wpdiscuz_current_user" => $user,
94
+ ];
95
+ if (function_exists("mb_substr")) {
96
+ $response["commentText"] = mb_substr($comment->comment_content, 0, 50);
97
+ } else {
98
+ $response["commentText"] = substr($comment->comment_content, 0, 50);
99
+ }
100
+ if (strlen($comment->comment_content) > strlen($response["commentText"])) {
101
+ $response["commentText"] .= "...";
102
+ }
103
+ $response["commentDate"] = esc_html($this->helper->dateDiff($comment->comment_date_gmt));
104
+ $response["commentLink"] = esc_url_raw(get_comment_link($comment));
105
+ $response["authorName"] = esc_html(apply_filters("wpdiscuz_comment_author", $authorName, $comment));
106
+ $response["avatar"] = get_avatar($gravatarArgs["wpdiscuz_gravatar_field"], $gravatarArgs["wpdiscuz_gravatar_size"], "", $authorName, $gravatarArgs);
107
+ }
108
+ }
109
+ $form = $this->wpdiscuzForm->getForm($params["postId"]);
110
+ $response["all_comments_count"] = esc_html(get_comments_number($params["postId"]));
111
+ $response["all_comments_count_html"] = "<span class='wpdtc'>" . esc_html($response["all_comments_count"]) . "</span> " . esc_html(1 == $response["all_comments_count"] ? $form->getHeaderTextSingle() : $form->getHeaderTextPlural());
112
+ }
113
+ }
114
+ return $response;
115
+ }
116
 
117
  }
options/class.WpdiscuzOptions.php CHANGED
@@ -2,1156 +2,1162 @@
2
 
3
  class WpdiscuzOptions implements WpDiscuzConstants {
4
 
5
- public $form = [];
6
- public $recaptcha = [];
7
- public $login = [];
8
- public $social = [];
9
- public $rating = [];
10
- public $thread_display = [];
11
- public $thread_layouts = [];
12
- public $thread_styles = [];
13
- public $subscription = [];
14
- public $labels = [];
15
- public $moderation = [];
16
- public $content = [];
17
- public $live = [];
18
- public $inline = [];
19
- public $general = [];
20
- public $wp = [];
21
- public $wmuUploadMaxFileSize;
22
- public $wmuPostMaxSize;
23
 
24
- /**
25
- * Type - HTML elements array
26
- * Available Values - Text
27
- * Description - Phrases for form elements texts
28
- * Default Value -
29
- */
30
- public $phrases;
31
 
32
- /**
33
- * helper class for database operations
34
- */
35
- public $dbManager;
36
 
37
- /* === CACHE === */
38
- public $isFileFunctionsExists;
39
- /* === CACHE === */
40
- public $isGoodbyeCaptchaActive;
41
- public $goodbyeCaptchaTocken;
42
- public $formContentTypeRel;
43
- public $formPostRel;
44
- private $addons;
45
- private $tips;
46
 
47
- public function __construct($dbManager) {
48
- $this->dbManager = $dbManager;
49
- $this->wmuUploadMaxFileSize = $this->getSizeInBytes(ini_get('upload_max_filesize'));
50
- $this->wmuPostMaxSize = $this->getSizeInBytes(ini_get('post_max_size'));
51
- $this->initAddons();
52
- $this->initTips();
53
- add_option(self::OPTION_SLUG_HASH_KEY, md5(time() . uniqid()), "", "no");
54
- $this->initPhrases();
55
- $this->addOptions();
56
- $this->initOptions(get_option(self::OPTION_SLUG_OPTIONS));
57
- $this->wp["dateFormat"] = get_option("date_format");
58
- $this->wp["timeFormat"] = get_option("time_format");
59
- $this->wp["threadComments"] = get_option("thread_comments");
60
- $this->wp["threadCommentsDepth"] = get_option("thread_comments_depth");
61
- $this->wp["isPaginate"] = get_option("page_comments");
62
- $wordpressCommentOrder = strtolower(get_option("comment_order"));
63
- $this->wp["commentOrder"] = in_array($wordpressCommentOrder, ["asc", "desc"]) ? $wordpressCommentOrder : "desc";
64
- $this->wp["commentPerPage"] = get_option("comments_per_page");
65
- $this->wp["showAvatars"] = get_option("show_avatars");
66
- $this->wp["defaultCommentsPage"] = get_option("default_comments_page");
67
- $this->isFileFunctionsExists = function_exists("file_get_contents") && function_exists("file_put_contents");
68
- $this->initFormRelations();
69
- $this->initGoodbyeCaptchaField();
70
- add_action("init", [&$this, "initPhrasesOnLoad"], 2126);
71
- add_action("admin_init", [&$this, "saveAndResetOptionsAndPhrases"], 1);
72
- add_action("wp_ajax_dismiss_wpdiscuz_addon_note", [&$this, "dismissAddonNote"]);
73
- add_action("admin_notices", [&$this, "adminNotices"]);
74
- }
 
 
 
75
 
76
- public function initOptions($serialize_options) {
77
- $options = maybe_unserialize($serialize_options);
78
- $defaultOptions = $this->getDefaultOptions();
79
- /* form */
80
- $this->form["commentFormView"] = isset($options[self::TAB_FORM]["commentFormView"]) ? $options[self::TAB_FORM]["commentFormView"] : $defaultOptions[self::TAB_FORM]["commentFormView"];
81
- $this->form["enableDropAnimation"] = isset($options[self::TAB_FORM]["enableDropAnimation"]) ? $options[self::TAB_FORM]["enableDropAnimation"] : $defaultOptions[self::TAB_FORM]["enableDropAnimation"];
82
- $this->form["richEditor"] = isset($options[self::TAB_FORM]["richEditor"]) ? $options[self::TAB_FORM]["richEditor"] : $defaultOptions[self::TAB_FORM]["richEditor"];
83
- $this->form["boldButton"] = isset($options[self::TAB_FORM]["boldButton"]) ? $options[self::TAB_FORM]["boldButton"] : $defaultOptions[self::TAB_FORM]["boldButton"];
84
- $this->form["italicButton"] = isset($options[self::TAB_FORM]["italicButton"]) ? $options[self::TAB_FORM]["italicButton"] : $defaultOptions[self::TAB_FORM]["italicButton"];
85
- $this->form["underlineButton"] = isset($options[self::TAB_FORM]["underlineButton"]) ? $options[self::TAB_FORM]["underlineButton"] : $defaultOptions[self::TAB_FORM]["underlineButton"];
86
- $this->form["strikeButton"] = isset($options[self::TAB_FORM]["strikeButton"]) ? $options[self::TAB_FORM]["strikeButton"] : $defaultOptions[self::TAB_FORM]["strikeButton"];
87
- $this->form["olButton"] = isset($options[self::TAB_FORM]["olButton"]) ? $options[self::TAB_FORM]["olButton"] : $defaultOptions[self::TAB_FORM]["olButton"];
88
- $this->form["ulButton"] = isset($options[self::TAB_FORM]["ulButton"]) ? $options[self::TAB_FORM]["ulButton"] : $defaultOptions[self::TAB_FORM]["ulButton"];
89
- $this->form["blockquoteButton"] = isset($options[self::TAB_FORM]["blockquoteButton"]) ? $options[self::TAB_FORM]["blockquoteButton"] : $defaultOptions[self::TAB_FORM]["blockquoteButton"];
90
- $this->form["codeblockButton"] = isset($options[self::TAB_FORM]["codeblockButton"]) ? $options[self::TAB_FORM]["codeblockButton"] : $defaultOptions[self::TAB_FORM]["codeblockButton"];
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"];
98
- /* recaptcha */
99
- $this->recaptcha["version"] = "2.0";
100
- $this->recaptcha["score"] = "";
101
- $this->recaptcha["siteKey"] = isset($options[self::TAB_RECAPTCHA]["siteKey"]) ? $options[self::TAB_RECAPTCHA]["siteKey"] : $defaultOptions[self::TAB_RECAPTCHA]["siteKey"];
102
- $this->recaptcha["secretKey"] = isset($options[self::TAB_RECAPTCHA]["secretKey"]) ? $options[self::TAB_RECAPTCHA]["secretKey"] : $defaultOptions[self::TAB_RECAPTCHA]["secretKey"];
103
- $this->recaptcha["theme"] = isset($options[self::TAB_RECAPTCHA]["theme"]) ? $options[self::TAB_RECAPTCHA]["theme"] : $defaultOptions[self::TAB_RECAPTCHA]["theme"];
104
- $this->recaptcha["lang"] = isset($options[self::TAB_RECAPTCHA]["lang"]) ? $options[self::TAB_RECAPTCHA]["lang"] : $defaultOptions[self::TAB_RECAPTCHA]["lang"];
105
- $this->recaptcha["requestMethod"] = isset($options[self::TAB_RECAPTCHA]["requestMethod"]) ? $options[self::TAB_RECAPTCHA]["requestMethod"] : $defaultOptions[self::TAB_RECAPTCHA]["requestMethod"];
106
- $this->recaptcha["showForGuests"] = isset($options[self::TAB_RECAPTCHA]["showForGuests"]) ? $options[self::TAB_RECAPTCHA]["showForGuests"] : $defaultOptions[self::TAB_RECAPTCHA]["showForGuests"];
107
- $this->recaptcha["showForUsers"] = isset($options[self::TAB_RECAPTCHA]["showForUsers"]) ? $options[self::TAB_RECAPTCHA]["showForUsers"] : $defaultOptions[self::TAB_RECAPTCHA]["showForUsers"];
108
- $this->recaptcha["isShowOnSubscribeForm"] = isset($options[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) ? $options[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"] : $defaultOptions[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"];
109
- $lang = $this->recaptcha["lang"] ? "&hl=" . $this->recaptcha["lang"] : "";
110
- $this->recaptcha["reCaptchaUrl"] = "https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit$lang";
111
- /* login */
112
- $this->login["showLoggedInUsername"] = isset($options[self::TAB_LOGIN]["showLoggedInUsername"]) ? $options[self::TAB_LOGIN]["showLoggedInUsername"] : $defaultOptions[self::TAB_LOGIN]["showLoggedInUsername"];
113
- $this->login["showLoginLinkForGuests"] = isset($options[self::TAB_LOGIN]["showLoginLinkForGuests"]) ? $options[self::TAB_LOGIN]["showLoginLinkForGuests"] : $defaultOptions[self::TAB_LOGIN]["showLoginLinkForGuests"];
114
- $this->login["showActivityTab"] = isset($options[self::TAB_LOGIN]["showActivityTab"]) ? $options[self::TAB_LOGIN]["showActivityTab"] : $defaultOptions[self::TAB_LOGIN]["showActivityTab"];
115
- $this->login["showSubscriptionsTab"] = isset($options[self::TAB_LOGIN]["showSubscriptionsTab"]) ? $options[self::TAB_LOGIN]["showSubscriptionsTab"] : $defaultOptions[self::TAB_LOGIN]["showSubscriptionsTab"];
116
- $this->login["showFollowsTab"] = isset($options[self::TAB_LOGIN]["showFollowsTab"]) ? $options[self::TAB_LOGIN]["showFollowsTab"] : $defaultOptions[self::TAB_LOGIN]["showFollowsTab"];
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"];
124
- $this->social["displayIconOnAvatar"] = isset($options[self::TAB_SOCIAL]["displayIconOnAvatar"]) ? $options[self::TAB_SOCIAL]["displayIconOnAvatar"] : $defaultOptions[self::TAB_SOCIAL]["displayIconOnAvatar"];
125
- // fb
126
- $this->social["enableFbLogin"] = isset($options[self::TAB_SOCIAL]["enableFbLogin"]) ? $options[self::TAB_SOCIAL]["enableFbLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableFbLogin"];
127
- $this->social["enableFbShare"] = isset($options[self::TAB_SOCIAL]["enableFbShare"]) ? $options[self::TAB_SOCIAL]["enableFbShare"] : $defaultOptions[self::TAB_SOCIAL]["enableFbShare"];
128
- $this->social["fbAppID"] = isset($options[self::TAB_SOCIAL]["fbAppID"]) ? $options[self::TAB_SOCIAL]["fbAppID"] : $defaultOptions[self::TAB_SOCIAL]["fbAppID"];
129
- $this->social["fbAppSecret"] = isset($options[self::TAB_SOCIAL]["fbAppSecret"]) ? $options[self::TAB_SOCIAL]["fbAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["fbAppSecret"];
130
- $this->social["fbUseOAuth2"] = isset($options[self::TAB_SOCIAL]["fbUseOAuth2"]) ? $options[self::TAB_SOCIAL]["fbUseOAuth2"] : $defaultOptions[self::TAB_SOCIAL]["fbUseOAuth2"];
131
- // twitter
132
- $this->social["enableTwitterLogin"] = isset($options[self::TAB_SOCIAL]["enableTwitterLogin"]) ? $options[self::TAB_SOCIAL]["enableTwitterLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableTwitterLogin"];
133
- $this->social["enableTwitterShare"] = isset($options[self::TAB_SOCIAL]["enableTwitterShare"]) ? $options[self::TAB_SOCIAL]["enableTwitterShare"] : $defaultOptions[self::TAB_SOCIAL]["enableTwitterShare"];
134
- $this->social["twitterAppID"] = isset($options[self::TAB_SOCIAL]["twitterAppID"]) ? $options[self::TAB_SOCIAL]["twitterAppID"] : $defaultOptions[self::TAB_SOCIAL]["twitterAppID"];
135
- $this->social["twitterAppSecret"] = isset($options[self::TAB_SOCIAL]["twitterAppSecret"]) ? $options[self::TAB_SOCIAL]["twitterAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["twitterAppSecret"];
136
- // google
137
- $this->social["enableGoogleLogin"] = isset($options[self::TAB_SOCIAL]["enableGoogleLogin"]) ? $options[self::TAB_SOCIAL]["enableGoogleLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableGoogleLogin"];
138
- $this->social["googleClientID"] = isset($options[self::TAB_SOCIAL]["googleClientID"]) ? $options[self::TAB_SOCIAL]["googleClientID"] : $defaultOptions[self::TAB_SOCIAL]["googleClientID"];
139
- $this->social["googleClientSecret"] = isset($options[self::TAB_SOCIAL]["googleClientSecret"]) ? $options[self::TAB_SOCIAL]["googleClientSecret"] : $defaultOptions[self::TAB_SOCIAL]["googleClientSecret"];
140
- // disqus
141
- $this->social["enableDisqusLogin"] = isset($options[self::TAB_SOCIAL]["enableDisqusLogin"]) ? $options[self::TAB_SOCIAL]["enableDisqusLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableDisqusLogin"];
142
- $this->social["disqusPublicKey"] = isset($options[self::TAB_SOCIAL]["disqusPublicKey"]) ? $options[self::TAB_SOCIAL]["disqusPublicKey"] : $defaultOptions[self::TAB_SOCIAL]["disqusPublicKey"];
143
- $this->social["disqusSecretKey"] = isset($options[self::TAB_SOCIAL]["disqusSecretKey"]) ? $options[self::TAB_SOCIAL]["disqusSecretKey"] : $defaultOptions[self::TAB_SOCIAL]["disqusSecretKey"];
144
- // wordpress
145
- $this->social["enableWordpressLogin"] = isset($options[self::TAB_SOCIAL]["enableWordpressLogin"]) ? $options[self::TAB_SOCIAL]["enableWordpressLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableWordpressLogin"];
146
- $this->social["wordpressClientID"] = isset($options[self::TAB_SOCIAL]["wordpressClientID"]) ? $options[self::TAB_SOCIAL]["wordpressClientID"] : $defaultOptions[self::TAB_SOCIAL]["wordpressClientID"];
147
- $this->social["wordpressClientSecret"] = isset($options[self::TAB_SOCIAL]["wordpressClientSecret"]) ? $options[self::TAB_SOCIAL]["wordpressClientSecret"] : $defaultOptions[self::TAB_SOCIAL]["wordpressClientSecret"];
148
- // instagram
149
- $this->social["enableInstagramLogin"] = isset($options[self::TAB_SOCIAL]["enableInstagramLogin"]) ? $options[self::TAB_SOCIAL]["enableInstagramLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableInstagramLogin"];
150
- $this->social["instagramAppID"] = isset($options[self::TAB_SOCIAL]["instagramAppID"]) ? $options[self::TAB_SOCIAL]["instagramAppID"] : $defaultOptions[self::TAB_SOCIAL]["instagramAppID"];
151
- $this->social["instagramAppSecret"] = isset($options[self::TAB_SOCIAL]["instagramAppSecret"]) ? $options[self::TAB_SOCIAL]["instagramAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["instagramAppSecret"];
152
- // linkedin
153
- $this->social["enableLinkedinLogin"] = isset($options[self::TAB_SOCIAL]["enableLinkedinLogin"]) ? $options[self::TAB_SOCIAL]["enableLinkedinLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableLinkedinLogin"];
154
- $this->social["linkedinClientID"] = isset($options[self::TAB_SOCIAL]["linkedinClientID"]) ? $options[self::TAB_SOCIAL]["linkedinClientID"] : $defaultOptions[self::TAB_SOCIAL]["linkedinClientID"];
155
- $this->social["linkedinClientSecret"] = isset($options[self::TAB_SOCIAL]["linkedinClientSecret"]) ? $options[self::TAB_SOCIAL]["linkedinClientSecret"] : $defaultOptions[self::TAB_SOCIAL]["linkedinClientSecret"];
156
- // whatsapp
157
- $this->social["enableWhatsappShare"] = isset($options[self::TAB_SOCIAL]["enableWhatsappShare"]) ? $options[self::TAB_SOCIAL]["enableWhatsappShare"] : $defaultOptions[self::TAB_SOCIAL]["enableWhatsappShare"];
158
- // yandex
159
- $this->social["enableYandexLogin"] = isset($options[self::TAB_SOCIAL]["enableYandexLogin"]) ? $options[self::TAB_SOCIAL]["enableYandexLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableYandexLogin"];
160
- $this->social["yandexID"] = isset($options[self::TAB_SOCIAL]["yandexID"]) ? $options[self::TAB_SOCIAL]["yandexID"] : $defaultOptions[self::TAB_SOCIAL]["yandexID"];
161
- $this->social["yandexPassword"] = isset($options[self::TAB_SOCIAL]["yandexPassword"]) ? $options[self::TAB_SOCIAL]["yandexPassword"] : $defaultOptions[self::TAB_SOCIAL]["yandexPassword"];
162
- // mail.ru
163
- $this->social["enableMailruLogin"] = isset($options[self::TAB_SOCIAL]["enableMailruLogin"]) ? $options[self::TAB_SOCIAL]["enableMailruLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableMailruLogin"];
164
- $this->social["mailruClientID"] = isset($options[self::TAB_SOCIAL]["mailruClientID"]) ? $options[self::TAB_SOCIAL]["mailruClientID"] : $defaultOptions[self::TAB_SOCIAL]["mailruClientID"];
165
- $this->social["mailruClientSecret"] = isset($options[self::TAB_SOCIAL]["mailruClientSecret"]) ? $options[self::TAB_SOCIAL]["mailruClientSecret"] : $defaultOptions[self::TAB_SOCIAL]["mailruClientSecret"];
166
- // weibo
167
- $this->social["enableWeiboLogin"] = isset($options[self::TAB_SOCIAL]["enableWeiboLogin"]) ? $options[self::TAB_SOCIAL]["enableWeiboLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableWeiboLogin"];
168
- $this->social["weiboKey"] = isset($options[self::TAB_SOCIAL]["weiboKey"]) ? $options[self::TAB_SOCIAL]["weiboKey"] : $defaultOptions[self::TAB_SOCIAL]["weiboKey"];
169
- $this->social["weiboSecret"] = isset($options[self::TAB_SOCIAL]["weiboSecret"]) ? $options[self::TAB_SOCIAL]["weiboSecret"] : $defaultOptions[self::TAB_SOCIAL]["weiboSecret"];
170
- // wechat
171
- $this->social["enableWechatLogin"] = isset($options[self::TAB_SOCIAL]["enableWechatLogin"]) ? $options[self::TAB_SOCIAL]["enableWechatLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableWechatLogin"];
172
- $this->social["wechatAppID"] = isset($options[self::TAB_SOCIAL]["wechatAppID"]) ? $options[self::TAB_SOCIAL]["wechatAppID"] : $defaultOptions[self::TAB_SOCIAL]["wechatAppID"];
173
- $this->social["wechatSecret"] = isset($options[self::TAB_SOCIAL]["wechatSecret"]) ? $options[self::TAB_SOCIAL]["wechatSecret"] : $defaultOptions[self::TAB_SOCIAL]["wechatSecret"];
174
- // qq
175
- $this->social["enableQQLogin"] = isset($options[self::TAB_SOCIAL]["enableQQLogin"]) ? $options[self::TAB_SOCIAL]["enableQQLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableQQLogin"];
176
- $this->social["qqAppID"] = isset($options[self::TAB_SOCIAL]["qqAppID"]) ? $options[self::TAB_SOCIAL]["qqAppID"] : $defaultOptions[self::TAB_SOCIAL]["qqAppID"];
177
- $this->social["qqSecret"] = isset($options[self::TAB_SOCIAL]["qqSecret"]) ? $options[self::TAB_SOCIAL]["qqSecret"] : $defaultOptions[self::TAB_SOCIAL]["qqSecret"];
178
- // baidu
179
- $this->social["enableBaiduLogin"] = isset($options[self::TAB_SOCIAL]["enableBaiduLogin"]) ? $options[self::TAB_SOCIAL]["enableBaiduLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableBaiduLogin"];
180
- $this->social["baiduAppID"] = isset($options[self::TAB_SOCIAL]["baiduAppID"]) ? $options[self::TAB_SOCIAL]["baiduAppID"] : $defaultOptions[self::TAB_SOCIAL]["baiduAppID"];
181
- $this->social["baiduSecret"] = isset($options[self::TAB_SOCIAL]["baiduSecret"]) ? $options[self::TAB_SOCIAL]["baiduSecret"] : $defaultOptions[self::TAB_SOCIAL]["baiduSecret"];
182
- // vk
183
- $this->social["enableVkLogin"] = isset($options[self::TAB_SOCIAL]["enableVkLogin"]) ? $options[self::TAB_SOCIAL]["enableVkLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableVkLogin"];
184
- $this->social["enableVkShare"] = isset($options[self::TAB_SOCIAL]["enableVkShare"]) ? $options[self::TAB_SOCIAL]["enableVkShare"] : $defaultOptions[self::TAB_SOCIAL]["enableVkShare"];
185
- $this->social["vkAppID"] = isset($options[self::TAB_SOCIAL]["vkAppID"]) ? $options[self::TAB_SOCIAL]["vkAppID"] : $defaultOptions[self::TAB_SOCIAL]["vkAppID"];
186
- $this->social["vkAppSecret"] = isset($options[self::TAB_SOCIAL]["vkAppSecret"]) ? $options[self::TAB_SOCIAL]["vkAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["vkAppSecret"];
187
- // ok
188
- $this->social["enableOkLogin"] = isset($options[self::TAB_SOCIAL]["enableOkLogin"]) ? $options[self::TAB_SOCIAL]["enableOkLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableOkLogin"];
189
- $this->social["enableOkShare"] = isset($options[self::TAB_SOCIAL]["enableOkShare"]) ? $options[self::TAB_SOCIAL]["enableOkShare"] : $defaultOptions[self::TAB_SOCIAL]["enableOkShare"];
190
- $this->social["okAppID"] = isset($options[self::TAB_SOCIAL]["okAppID"]) ? $options[self::TAB_SOCIAL]["okAppID"] : $defaultOptions[self::TAB_SOCIAL]["okAppID"];
191
- $this->social["okAppKey"] = isset($options[self::TAB_SOCIAL]["okAppKey"]) ? $options[self::TAB_SOCIAL]["okAppKey"] : $defaultOptions[self::TAB_SOCIAL]["okAppKey"];
192
- $this->social["okAppSecret"] = isset($options[self::TAB_SOCIAL]["okAppSecret"]) ? $options[self::TAB_SOCIAL]["okAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["okAppSecret"];
193
- /* rating */
194
- $this->rating["enablePostRatingSchema"] = isset($options[self::TAB_RATING]["enablePostRatingSchema"]) ? $options[self::TAB_RATING]["enablePostRatingSchema"] : $defaultOptions[self::TAB_RATING]["enablePostRatingSchema"];
195
- $this->rating["displayRatingOnPost"] = isset($options[self::TAB_RATING]["displayRatingOnPost"]) ? $options[self::TAB_RATING]["displayRatingOnPost"] : $defaultOptions[self::TAB_RATING]["displayRatingOnPost"];
196
- $this->rating["ratingCssOnNoneSingular"] = isset($options[self::TAB_RATING]["ratingCssOnNoneSingular"]) ? $options[self::TAB_RATING]["ratingCssOnNoneSingular"] : $defaultOptions[self::TAB_RATING]["ratingCssOnNoneSingular"];
197
- $this->rating["ratingHoverColor"] = isset($options[self::TAB_RATING]["ratingHoverColor"]) ? $options[self::TAB_RATING]["ratingHoverColor"] : $defaultOptions[self::TAB_RATING]["ratingHoverColor"];
198
- $this->rating["ratingInactiveColor"] = isset($options[self::TAB_RATING]["ratingInactiveColor"]) ? $options[self::TAB_RATING]["ratingInactiveColor"] : $defaultOptions[self::TAB_RATING]["ratingInactiveColor"];
199
- $this->rating["ratingActiveColor"] = isset($options[self::TAB_RATING]["ratingActiveColor"]) ? $options[self::TAB_RATING]["ratingActiveColor"] : $defaultOptions[self::TAB_RATING]["ratingActiveColor"];
200
- /* thread_display */
201
- $this->thread_display["firstLoadWithAjax"] = isset($options[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"]) ? $options[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"];
202
- $this->thread_display["commentListLoadType"] = isset($options[self::TAB_THREAD_DISPLAY]["commentListLoadType"]) ? $options[self::TAB_THREAD_DISPLAY]["commentListLoadType"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"];
203
- $this->thread_display["isLoadOnlyParentComments"] = isset($options[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"]) ? $options[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"];
204
- $this->thread_display["showReactedFilterButton"] = isset($options[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"]) ? $options[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"];
205
- $this->thread_display["showHottestFilterButton"] = isset($options[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"]) ? $options[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"];
206
- $this->thread_display["showSortingButtons"] = isset($options[self::TAB_THREAD_DISPLAY]["showSortingButtons"]) ? $options[self::TAB_THREAD_DISPLAY]["showSortingButtons"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"];
207
- $this->thread_display["mostVotedByDefault"] = isset($options[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"]) ? $options[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"];
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"];
215
- $this->thread_layouts["showVotingButtons"] = isset($options[self::TAB_THREAD_LAYOUTS]["showVotingButtons"]) ? $options[self::TAB_THREAD_LAYOUTS]["showVotingButtons"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"];
216
- $this->thread_layouts["votingButtonsIcon"] = isset($options[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"]) ? $options[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"];
217
- $this->thread_layouts["votingButtonsStyle"] = isset($options[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"]) ? $options[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"];
218
- $this->thread_layouts["enableDislikeButton"] = isset($options[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"]) ? $options[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"];
219
- $this->thread_layouts["isGuestCanVote"] = isset($options[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"]) ? $options[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"];
220
- $this->thread_layouts["highlightVotingButtons"] = isset($options[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"]) ? $options[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"];
221
- $this->thread_layouts["showAvatars"] = isset($options[self::TAB_THREAD_LAYOUTS]["showAvatars"]) ? $options[self::TAB_THREAD_LAYOUTS]["showAvatars"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showAvatars"];
222
- $this->thread_layouts["defaultAvatarUrlForUser"] = isset($options[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"]) ? $options[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"];
223
- $this->thread_layouts["defaultAvatarUrlForGuest"] = isset($options[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"]) ? $options[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"];
224
- $this->thread_layouts["changeAvatarsEverywhere"] = isset($options[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"]) ? $options[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"];
225
- /* thread_styles */
226
- $this->thread_styles["theme"] = isset($options[self::TAB_THREAD_STYLES]["theme"]) ? $options[self::TAB_THREAD_STYLES]["theme"] : $defaultOptions[self::TAB_THREAD_STYLES]["theme"];
227
- $this->thread_styles["primaryColor"] = isset($options[self::TAB_THREAD_STYLES]["primaryColor"]) ? $options[self::TAB_THREAD_STYLES]["primaryColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["primaryColor"];
228
- $this->thread_styles["newLoadedCommentBGColor"] = isset($options[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"]) ? $options[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"];
229
- $this->thread_styles["primaryButtonColor"] = isset($options[self::TAB_THREAD_STYLES]["primaryButtonColor"]) ? $options[self::TAB_THREAD_STYLES]["primaryButtonColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"];
230
- $this->thread_styles["primaryButtonBG"] = isset($options[self::TAB_THREAD_STYLES]["primaryButtonBG"]) ? $options[self::TAB_THREAD_STYLES]["primaryButtonBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"];
231
- $this->thread_styles["bubbleColors"] = isset($options[self::TAB_THREAD_STYLES]["bubbleColors"]) ? $options[self::TAB_THREAD_STYLES]["bubbleColors"] : $defaultOptions[self::TAB_THREAD_STYLES]["bubbleColors"];
232
- $this->thread_styles["inlineFeedbackColors"] = isset($options[self::TAB_THREAD_STYLES]["inlineFeedbackColors"]) ? $options[self::TAB_THREAD_STYLES]["inlineFeedbackColors"] : $defaultOptions[self::TAB_THREAD_STYLES]["inlineFeedbackColors"];
233
- $this->thread_styles["defaultCommentAreaBG"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"];
234
- $this->thread_styles["defaultCommentTextColor"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentTextColor"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentTextColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentTextColor"];
235
- $this->thread_styles["defaultCommentFieldsBG"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"];
236
- $this->thread_styles["defaultCommentFieldsBorderColor"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"];
237
- $this->thread_styles["defaultCommentFieldsTextColor"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"];
238
- $this->thread_styles["defaultCommentFieldsPlaceholderColor"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"];
239
- $this->thread_styles["darkCommentAreaBG"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentAreaBG"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentAreaBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentAreaBG"];
240
- $this->thread_styles["darkCommentTextColor"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentTextColor"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentTextColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentTextColor"];
241
- $this->thread_styles["darkCommentFieldsBG"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"];
242
- $this->thread_styles["darkCommentFieldsBorderColor"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"];
243
- $this->thread_styles["darkCommentFieldsTextColor"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"];
244
- $this->thread_styles["darkCommentFieldsPlaceholderColor"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"];
245
- $this->thread_styles["commentTextSize"] = isset($options[self::TAB_THREAD_STYLES]["commentTextSize"]) ? $options[self::TAB_THREAD_STYLES]["commentTextSize"] : $defaultOptions[self::TAB_THREAD_STYLES]["commentTextSize"];
246
- $this->thread_styles["enableFontAwesome"] = isset($options[self::TAB_THREAD_STYLES]["enableFontAwesome"]) ? $options[self::TAB_THREAD_STYLES]["enableFontAwesome"] : $defaultOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"];
247
- $this->thread_styles["customCss"] = isset($options[self::TAB_THREAD_STYLES]["customCss"]) ? $options[self::TAB_THREAD_STYLES]["customCss"] : $defaultOptions[self::TAB_THREAD_STYLES]["customCss"];
248
- /* subscription */
249
- $this->subscription["enableUserMentioning"] = isset($options[self::TAB_SUBSCRIPTION]["enableUserMentioning"]) ? $options[self::TAB_SUBSCRIPTION]["enableUserMentioning"] : $defaultOptions[self::TAB_SUBSCRIPTION]["enableUserMentioning"];
250
- $this->subscription["sendMailToMentionedUsers"] = isset($options[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"]) ? $options[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"] : $defaultOptions[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"];
251
- $this->subscription["isNotifyOnCommentApprove"] = isset($options[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"]) ? $options[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"] : $defaultOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"];
252
- $this->subscription["enableMemberConfirm"] = isset($options[self::TAB_SUBSCRIPTION]["enableMemberConfirm"]) ? $options[self::TAB_SUBSCRIPTION]["enableMemberConfirm"] : $defaultOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"];
253
- $this->subscription["enableGuestsConfirm"] = isset($options[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"]) ? $options[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"] : $defaultOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"];
254
- $this->subscription["subscriptionType"] = isset($options[self::TAB_SUBSCRIPTION]["subscriptionType"]) ? $options[self::TAB_SUBSCRIPTION]["subscriptionType"] : $defaultOptions[self::TAB_SUBSCRIPTION]["subscriptionType"];
255
- $this->subscription["showReplyCheckbox"] = isset($options[self::TAB_SUBSCRIPTION]["showReplyCheckbox"]) ? $options[self::TAB_SUBSCRIPTION]["showReplyCheckbox"] : $defaultOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"];
256
- $this->subscription["isReplyDefaultChecked"] = isset($options[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"]) ? $options[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"] : $defaultOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"];
257
- $this->subscription["usePostmaticForCommentNotification"] = isset($options[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"]) ? $options[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"] : $defaultOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"];
258
- $this->subscription["isFollowActive"] = isset($options[self::TAB_SUBSCRIPTION]["isFollowActive"]) ? $options[self::TAB_SUBSCRIPTION]["isFollowActive"] : $defaultOptions[self::TAB_SUBSCRIPTION]["isFollowActive"];
259
- $this->subscription["disableFollowConfirmForUsers"] = isset($options[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"]) ? $options[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"] : $defaultOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"];
260
- /* labels */
261
- $this->labels["blogRoleLabels"] = isset($options[self::TAB_LABELS]["blogRoleLabels"]) ? $options[self::TAB_LABELS]["blogRoleLabels"] : $defaultOptions[self::TAB_LABELS]["blogRoleLabels"];
262
- $this->labels["blogRoles"] = isset($options[self::TAB_LABELS]["blogRoles"]) ? $options[self::TAB_LABELS]["blogRoles"] : $defaultOptions[self::TAB_LABELS]["blogRoles"];
263
- /* moderation */
264
- $this->moderation["commentEditableTime"] = isset($options[self::TAB_MODERATION]["commentEditableTime"]) ? $options[self::TAB_MODERATION]["commentEditableTime"] : $defaultOptions[self::TAB_MODERATION]["commentEditableTime"];
265
- $this->moderation["enableEditingWhenHaveReplies"] = isset($options[self::TAB_MODERATION]["enableEditingWhenHaveReplies"]) ? $options[self::TAB_MODERATION]["enableEditingWhenHaveReplies"] : $defaultOptions[self::TAB_MODERATION]["enableEditingWhenHaveReplies"];
266
- $this->moderation["displayEditingInfo"] = isset($options[self::TAB_MODERATION]["displayEditingInfo"]) ? $options[self::TAB_MODERATION]["displayEditingInfo"] : $defaultOptions[self::TAB_MODERATION]["displayEditingInfo"];
267
- $this->moderation["enableStickButton"] = isset($options[self::TAB_MODERATION]["enableStickButton"]) ? $options[self::TAB_MODERATION]["enableStickButton"] : $defaultOptions[self::TAB_MODERATION]["enableStickButton"];
268
- $this->moderation["enableCloseButton"] = isset($options[self::TAB_MODERATION]["enableCloseButton"]) ? $options[self::TAB_MODERATION]["enableCloseButton"] : $defaultOptions[self::TAB_MODERATION]["enableCloseButton"];
269
- $this->moderation["restrictCommentingPerUser"] = isset($options[self::TAB_MODERATION]["restrictCommentingPerUser"]) ? $options[self::TAB_MODERATION]["restrictCommentingPerUser"] : $defaultOptions[self::TAB_MODERATION]["restrictCommentingPerUser"];
270
- $this->moderation["commentRestrictionType"] = isset($options[self::TAB_MODERATION]["commentRestrictionType"]) ? $options[self::TAB_MODERATION]["commentRestrictionType"] : $defaultOptions[self::TAB_MODERATION]["commentRestrictionType"];
271
- $this->moderation["userCommentsLimit"] = isset($options[self::TAB_MODERATION]["userCommentsLimit"]) ? $options[self::TAB_MODERATION]["userCommentsLimit"] : $defaultOptions[self::TAB_MODERATION]["userCommentsLimit"];
272
- /* content */
273
- $this->content["commentTextMinLength"] = isset($options[self::TAB_CONTENT]["commentTextMinLength"]) ? $options[self::TAB_CONTENT]["commentTextMinLength"] : $defaultOptions[self::TAB_CONTENT]["commentTextMinLength"];
274
- $this->content["commentTextMaxLength"] = isset($options[self::TAB_CONTENT]["commentTextMaxLength"]) ? $options[self::TAB_CONTENT]["commentTextMaxLength"] : $defaultOptions[self::TAB_CONTENT]["commentTextMaxLength"];
275
- $this->content["enableImageConversion"] = isset($options[self::TAB_CONTENT]["enableImageConversion"]) ? $options[self::TAB_CONTENT]["enableImageConversion"] : $defaultOptions[self::TAB_CONTENT]["enableImageConversion"];
276
- $this->content["enableShortcodes"] = isset($options[self::TAB_CONTENT]["enableShortcodes"]) ? $options[self::TAB_CONTENT]["enableShortcodes"] : $defaultOptions[self::TAB_CONTENT]["enableShortcodes"];
277
- $this->content["commentReadMoreLimit"] = isset($options[self::TAB_CONTENT]["commentReadMoreLimit"]) ? $options[self::TAB_CONTENT]["commentReadMoreLimit"] : $defaultOptions[self::TAB_CONTENT]["commentReadMoreLimit"];
278
- $this->content["wmuIsEnabled"] = isset($options[self::TAB_CONTENT]["wmuIsEnabled"]) ? $options[self::TAB_CONTENT]["wmuIsEnabled"] : $defaultOptions[self::TAB_CONTENT]["wmuIsEnabled"];
279
- $this->content["wmuIsGuestAllowed"] = isset($options[self::TAB_CONTENT]["wmuIsGuestAllowed"]) ? $options[self::TAB_CONTENT]["wmuIsGuestAllowed"] : $defaultOptions[self::TAB_CONTENT]["wmuIsGuestAllowed"];
280
- $this->content["wmuIsLightbox"] = isset($options[self::TAB_CONTENT]["wmuIsLightbox"]) ? $options[self::TAB_CONTENT]["wmuIsLightbox"] : $defaultOptions[self::TAB_CONTENT]["wmuIsLightbox"];
281
- $this->content["wmuMimeTypes"] = isset($options[self::TAB_CONTENT]["wmuMimeTypes"]) ? $options[self::TAB_CONTENT]["wmuMimeTypes"] : $defaultOptions[self::TAB_CONTENT]["wmuMimeTypes"];
282
- $this->content["wmuMaxFileSize"] = isset($options[self::TAB_CONTENT]["wmuMaxFileSize"]) ? $options[self::TAB_CONTENT]["wmuMaxFileSize"] : $defaultOptions[self::TAB_CONTENT]["wmuMaxFileSize"];
283
- $this->content["wmuIsShowFilesDashboard"] = isset($options[self::TAB_CONTENT]["wmuIsShowFilesDashboard"]) ? $options[self::TAB_CONTENT]["wmuIsShowFilesDashboard"] : $defaultOptions[self::TAB_CONTENT]["wmuIsShowFilesDashboard"];
284
- $this->content["wmuSingleImageWidth"] = isset($options[self::TAB_CONTENT]["wmuSingleImageWidth"]) ? $options[self::TAB_CONTENT]["wmuSingleImageWidth"] : $defaultOptions[self::TAB_CONTENT]["wmuSingleImageWidth"];
285
- $this->content["wmuSingleImageHeight"] = isset($options[self::TAB_CONTENT]["wmuSingleImageHeight"]) ? $options[self::TAB_CONTENT]["wmuSingleImageHeight"] : $defaultOptions[self::TAB_CONTENT]["wmuSingleImageHeight"];
286
- $this->content["wmuImageSizes"] = isset($options[self::TAB_CONTENT]["wmuImageSizes"]) ? array_filter($options[self::TAB_CONTENT]["wmuImageSizes"]) : $defaultOptions[self::TAB_CONTENT]["wmuImageSizes"];
287
- /* live */
288
- $this->live["enableBubble"] = isset($options[self::TAB_LIVE]["enableBubble"]) ? $options[self::TAB_LIVE]["enableBubble"] : $defaultOptions[self::TAB_LIVE]["enableBubble"];
289
- $this->live["bubbleLiveUpdate"] = isset($options[self::TAB_LIVE]["bubbleLiveUpdate"]) ? $options[self::TAB_LIVE]["bubbleLiveUpdate"] : $defaultOptions[self::TAB_LIVE]["bubbleLiveUpdate"];
290
- $this->live["bubbleLocation"] = isset($options[self::TAB_LIVE]["bubbleLocation"]) ? $options[self::TAB_LIVE]["bubbleLocation"] : $defaultOptions[self::TAB_LIVE]["bubbleLocation"];
291
- $this->live["bubbleShowNewCommentMessage"] = isset($options[self::TAB_LIVE]["bubbleShowNewCommentMessage"]) ? $options[self::TAB_LIVE]["bubbleShowNewCommentMessage"] : $defaultOptions[self::TAB_LIVE]["bubbleShowNewCommentMessage"];
292
- $this->live["bubbleHintTimeout"] = isset($options[self::TAB_LIVE]["bubbleHintTimeout"]) ? $options[self::TAB_LIVE]["bubbleHintTimeout"] : $defaultOptions[self::TAB_LIVE]["bubbleHintTimeout"];
293
- $this->live["bubbleHintHideTimeout"] = isset($options[self::TAB_LIVE]["bubbleHintHideTimeout"]) ? $options[self::TAB_LIVE]["bubbleHintHideTimeout"] : $defaultOptions[self::TAB_LIVE]["bubbleHintHideTimeout"];
294
- $this->live["commentListUpdateType"] = isset($options[self::TAB_LIVE]["commentListUpdateType"]) ? $options[self::TAB_LIVE]["commentListUpdateType"] : $defaultOptions[self::TAB_LIVE]["commentListUpdateType"];
295
- $this->live["liveUpdateGuests"] = isset($options[self::TAB_LIVE]["liveUpdateGuests"]) ? $options[self::TAB_LIVE]["liveUpdateGuests"] : $defaultOptions[self::TAB_LIVE]["liveUpdateGuests"];
296
- $this->live["commentListUpdateTimer"] = isset($options[self::TAB_LIVE]["commentListUpdateTimer"]) ? $options[self::TAB_LIVE]["commentListUpdateTimer"] : $defaultOptions[self::TAB_LIVE]["commentListUpdateTimer"];
297
- /* inline */
298
- $this->inline["showInlineFilterButton"] = isset($options[self::TAB_INLINE]["showInlineFilterButton"]) ? $options[self::TAB_INLINE]["showInlineFilterButton"] : $defaultOptions[self::TAB_INLINE]["showInlineFilterButton"];
299
- $this->inline["inlineFeedbackAttractionType"] = isset($options[self::TAB_INLINE]["inlineFeedbackAttractionType"]) ? $options[self::TAB_INLINE]["inlineFeedbackAttractionType"] : $defaultOptions[self::TAB_INLINE]["inlineFeedbackAttractionType"];
300
- /* general */
301
- $this->general["isEnableOnHome"] = isset($options[self::TAB_GENERAL]["isEnableOnHome"]) ? $options[self::TAB_GENERAL]["isEnableOnHome"] : $defaultOptions[self::TAB_GENERAL]["isEnableOnHome"];
302
- $this->general["isNativeAjaxEnabled"] = isset($options[self::TAB_GENERAL]["isNativeAjaxEnabled"]) ? $options[self::TAB_GENERAL]["isNativeAjaxEnabled"] : $defaultOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"];
303
- $this->general["loadComboVersion"] = isset($options[self::TAB_GENERAL]["loadComboVersion"]) ? $options[self::TAB_GENERAL]["loadComboVersion"] : $defaultOptions[self::TAB_GENERAL]["loadComboVersion"];
304
- $this->general["loadMinVersion"] = isset($options[self::TAB_GENERAL]["loadMinVersion"]) ? $options[self::TAB_GENERAL]["loadMinVersion"] : $defaultOptions[self::TAB_GENERAL]["loadMinVersion"];
305
- $this->general["commentLinkFilter"] = isset($options[self::TAB_GENERAL]["commentLinkFilter"]) ? $options[self::TAB_GENERAL]["commentLinkFilter"] : $defaultOptions[self::TAB_GENERAL]["commentLinkFilter"];
306
- $this->general["redirectPage"] = isset($options[self::TAB_GENERAL]["redirectPage"]) ? $options[self::TAB_GENERAL]["redirectPage"] : $defaultOptions[self::TAB_GENERAL]["redirectPage"];
307
- $this->general["simpleCommentDate"] = isset($options[self::TAB_GENERAL]["simpleCommentDate"]) ? $options[self::TAB_GENERAL]["simpleCommentDate"] : $defaultOptions[self::TAB_GENERAL]["simpleCommentDate"];
308
- $this->general["dateDiffFormat"] = isset($options[self::TAB_GENERAL]["dateDiffFormat"]) ? $options[self::TAB_GENERAL]["dateDiffFormat"] : $defaultOptions[self::TAB_GENERAL]["dateDiffFormat"];
309
- $this->general["isUsePoMo"] = isset($options[self::TAB_GENERAL]["isUsePoMo"]) ? $options[self::TAB_GENERAL]["isUsePoMo"] : $defaultOptions[self::TAB_GENERAL]["isUsePoMo"];
310
- $this->general["showPluginPoweredByLink"] = isset($options[self::TAB_GENERAL]["showPluginPoweredByLink"]) ? $options[self::TAB_GENERAL]["showPluginPoweredByLink"] : $defaultOptions[self::TAB_GENERAL]["showPluginPoweredByLink"];
311
- $this->general["isGravatarCacheEnabled"] = isset($options[self::TAB_GENERAL]["isGravatarCacheEnabled"]) ? $options[self::TAB_GENERAL]["isGravatarCacheEnabled"] : $defaultOptions[self::TAB_GENERAL]["isGravatarCacheEnabled"];
312
- $this->general["gravatarCacheMethod"] = isset($options[self::TAB_GENERAL]["gravatarCacheMethod"]) ? $options[self::TAB_GENERAL]["gravatarCacheMethod"] : $defaultOptions[self::TAB_GENERAL]["gravatarCacheMethod"];
313
- $this->general["gravatarCacheTimeout"] = isset($options[self::TAB_GENERAL]["gravatarCacheTimeout"]) ? $options[self::TAB_GENERAL]["gravatarCacheTimeout"] : $defaultOptions[self::TAB_GENERAL]["gravatarCacheTimeout"];
314
- do_action("wpdiscuz_init_options", $this);
315
- }
316
 
317
- /**
318
- * initialize default phrases
319
- */
320
- public function initPhrases() {
321
- $this->phrases = [
322
- "wc_be_the_first_text" => esc_html__("Be the First to Comment!", "wpdiscuz"),
323
- "wc_comment_start_text" => esc_html__("Start the discussion", "wpdiscuz"),
324
- "wc_comment_join_text" => esc_html__("Join the discussion", "wpdiscuz"),
325
- "wc_most_reacted_comment" => esc_html__("Most reacted comment", "wpdiscuz"),
326
- "wc_hottest_comment_thread" => esc_html__("Hottest comment thread", "wpdiscuz"),
327
- "wc_inline_comments" => esc_html__("Inline Comments", "wpdiscuz"),
328
- "wc_email_text" => esc_html__("Email", "wpdiscuz"),
329
- "wc_subscribe_anchor" => esc_html__("Subscribe", "wpdiscuz"),
330
- "wc_notify_of" => esc_html__("Notify of", "wpdiscuz"),
331
- "wc_notify_on_new_comment" => esc_html__("new follow-up comments", "wpdiscuz"),
332
- "wc_notify_on_all_new_reply" => esc_html__("new replies to my comments", "wpdiscuz"),
333
- "wc_notify_on_new_reply" => esc_html__("Notify of new replies to this comment", "wpdiscuz"),
334
- "wc_sort_by" => esc_html__("Sort by", "wpdiscuz"),
335
- "wc_newest" => esc_html__("Newest", "wpdiscuz"),
336
- "wc_oldest" => esc_html__("Oldest", "wpdiscuz"),
337
- "wc_most_voted" => esc_html__("Most Voted", "wpdiscuz"),
338
- "wc_load_more_submit_text" => esc_html__("Load More Comments", "wpdiscuz"),
339
- "wc_load_rest_comments_submit_text" => esc_html__("Load Rest of Comments", "wpdiscuz"),
340
- "wc_reply_text" => esc_html__("Reply", "wpdiscuz"),
341
- "wc_share_text" => esc_html__("Share", "wpdiscuz"),
342
- "wc_edit_text" => esc_html__("Edit", "wpdiscuz"),
343
- "wc_share_facebook" => esc_html__("Share On Facebook", "wpdiscuz"),
344
- "wc_share_twitter" => esc_html__("Share On Twitter", "wpdiscuz"),
345
- "wc_share_whatsapp" => esc_html__("Share On WhatsApp", "wpdiscuz"),
346
- "wc_share_vk" => esc_html__("Share On VKontakte", "wpdiscuz"),
347
- "wc_share_ok" => esc_html__("Share On Odnoklassniki", "wpdiscuz"),
348
- "wc_hide_replies_text" => esc_html__("Hide Replies", "wpdiscuz"),
349
- "wc_show_replies_text" => esc_html__("View Replies", "wpdiscuz"),
350
- "wc_email_subject" => esc_html__("New Comment", "wpdiscuz"),
351
- "wc_email_message" => __("Hi [SUBSCRIBER_NAME],<br/><br/> new comment have been posted by the <em><strong>[COMMENT_AUTHOR]</em></strong> on the discussion section you've been interested in<br/><br/><a href='[COMMENT_URL]'>[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]<br/><br/><a href='[UNSUBSCRIBE_URL]'>Unsubscribe</a>", "wpdiscuz"),
352
- "wc_all_comment_new_reply_subject" => esc_html__("New Reply", "wpdiscuz"),
353
- "wc_all_comment_new_reply_message" => __("Hi [SUBSCRIBER_NAME],<br/><br/> new reply have been posted by the <em><strong>[COMMENT_AUTHOR]</em></strong> on the discussion section you've been interested in<br/><br/><a href='[COMMENT_URL]'>[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]<br/><br/><a href='[UNSUBSCRIBE_URL]'>Unsubscribe</a>", "wpdiscuz"),
354
- "wc_new_reply_email_subject" => esc_html__("New Reply", "wpdiscuz"),
355
- "wc_new_reply_email_message" => __("Hi [SUBSCRIBER_NAME],<br/><br/> new reply have been posted by the <em><strong>[COMMENT_AUTHOR]</em></strong> on the discussion section you've been interested in<br/><br/><a href='[COMMENT_URL]'>[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]<br/><br/><a href='[UNSUBSCRIBE_URL]'>Unsubscribe</a>", "wpdiscuz"),
356
- "wc_subscribed_on_comment" => esc_html__("You're subscribed for new replies on this comment", "wpdiscuz"),
357
- "wc_subscribed_on_all_comment" => esc_html__("You're subscribed for new replies on all your comments", "wpdiscuz"),
358
- "wc_subscribed_on_post" => esc_html__("You're subscribed for new follow-up comments on this post", "wpdiscuz"),
359
- "wc_unsubscribe" => esc_html__("Unsubscribe", "wpdiscuz"),
360
- "wc_ignore_subscription" => esc_html__("Cancel subscription", "wpdiscuz"),
361
- "wc_unsubscribe_message" => esc_html__("You've successfully unsubscribed.", "wpdiscuz"),
362
- "wc_subscribe_message" => esc_html__("You've successfully subscribed.", "wpdiscuz"),
363
- "wc_confirm_email" => esc_html__("Confirm your subscription", "wpdiscuz"),
364
- "wc_comfirm_success_message" => esc_html__("You've successfully confirmed your subscription.", "wpdiscuz"),
365
- "wc_confirm_email_subject" => esc_html__("Subscription Confirmation", "wpdiscuz"),
366
- "wc_confirm_email_message" => __("Hi, <br/> You just subscribed for new comments on our website. This means you will receive an email when new comments are posted according to subscription option you've chosen. <br/> To activate, click confirm below. If you believe this is an error, ignore this message and we'll never bother you again. <br/><br/><a href='[POST_URL]'>[POST_TITLE]</a><br/><br/><a href='[CONFIRM_URL]'>Confirm Your Subscrption</a><br/><br/><a href='[CANCEL_URL]'>Cancel Subscription</a>", "wpdiscuz"),
367
- "wc_error_empty_text" => esc_html__("please fill out this field to comment", "wpdiscuz"),
368
- "wc_error_email_text" => esc_html__("email address is invalid", "wpdiscuz"),
369
- "wc_error_url_text" => esc_html__("url is invalid", "wpdiscuz"),
370
- "wc_year_text" => esc_html__("year", "wpdiscuz"),
371
- "wc_year_text_plural" => esc_html__("years", "wpdiscuz"), // PLURAL
372
- "wc_month_text" => esc_html__("month", "wpdiscuz"),
373
- "wc_month_text_plural" => esc_html__("months", "wpdiscuz"), // PLURAL
374
- "wc_day_text" => esc_html__("day", "wpdiscuz"),
375
- "wc_day_text_plural" => esc_html__("days", "wpdiscuz"), // PLURAL
376
- "wc_hour_text" => esc_html__("hour", "wpdiscuz"),
377
- "wc_hour_text_plural" => esc_html__("hours", "wpdiscuz"), // PLURAL
378
- "wc_minute_text" => esc_html__("minute", "wpdiscuz"),
379
- "wc_minute_text_plural" => esc_html__("minutes", "wpdiscuz"), // PLURAL
380
- "wc_second_text" => esc_html__("second", "wpdiscuz"),
381
- "wc_second_text_plural" => esc_html__("seconds", "wpdiscuz"), // PLURAL
382
- "wc_right_now_text" => esc_html__("right now", "wpdiscuz"),
383
- "wc_ago_text" => esc_html__("ago", "wpdiscuz"),
384
- "wc_you_must_be_text" => esc_html__("You must be", "wpdiscuz"),
385
- "wc_logged_in_as" => esc_html__("You are logged in as", "wpdiscuz"),
386
- "wc_log_in" => esc_html__("Login", "wpdiscuz"),
387
- "wc_login_please" => esc_html__("Please %s to comment", "wpdiscuz"),
388
- "wc_log_out" => esc_html__("Log out", "wpdiscuz"),
389
- "wc_logged_in_text" => esc_html__("logged in", "wpdiscuz"),
390
- "wc_to_post_comment_text" => esc_html__("to post a comment.", "wpdiscuz"),
391
- "wc_vote_up" => esc_html__("Vote Up", "wpdiscuz"),
392
- "wc_vote_down" => esc_html__("Vote Down", "wpdiscuz"),
393
- "wc_vote_counted" => esc_html__("Vote Counted", "wpdiscuz"),
394
- "wc_vote_only_one_time" => esc_html__("You've already voted for this comment", "wpdiscuz"),
395
- "wc_voting_error" => esc_html__("Voting Error", "wpdiscuz"),
396
- "wc_login_to_vote" => esc_html__("You Must Be Logged In To Vote", "wpdiscuz"),
397
- "wc_self_vote" => esc_html__("You cannot vote for your comment", "wpdiscuz"),
398
- "wc_deny_voting_from_same_ip" => esc_html__("You are not allowed to vote for this comment", "wpdiscuz"),
399
- "wc_invalid_captcha" => esc_html__("Invalid Captcha Code", "wpdiscuz"),
400
- "wc_invalid_field" => esc_html__("Some of field value is invalid", "wpdiscuz"),
401
- "wc_awaiting_for_approval" => esc_html__("Awaiting for approval", "wpdiscuz"),
402
- "wc_comment_not_updated" => esc_html__("Sorry, the comment was not updated", "wpdiscuz"),
403
- "wc_comment_edit_not_possible" => esc_html__("Sorry, this comment is no longer possible to edit", "wpdiscuz"),
404
- "wc_comment_not_edited" => esc_html__("You've not made any changes", "wpdiscuz"),
405
- "wc_comment_edit_save_button" => esc_html__("Save", "wpdiscuz"),
406
- "wc_comment_edit_cancel_button" => esc_html__("Cancel", "wpdiscuz"),
407
- "wc_msg_input_min_length" => esc_html__("Input is too short", "wpdiscuz"),
408
- "wc_msg_input_max_length" => esc_html__("Input is too long", "wpdiscuz"),
409
- "wc_read_more" => esc_html__("Read more &raquo;", "wpdiscuz"),
410
- "wc_anonymous" => esc_html__("Anonymous", "wpdiscuz"),
411
- "wc_msg_required_fields" => esc_html__("Please fill out required fields", "wpdiscuz"),
412
- "wc_connect_with" => esc_html__("Connect with", "wpdiscuz"),
413
- "wc_subscribed_to" => esc_html__("You're subscribed to", "wpdiscuz"),
414
- "wc_postmatic_subscription_label" => esc_html__("Participate in this discussion via email", "wpdiscuz"),
415
- "wc_form_subscription_submit" => esc_html__("&rsaquo;", "wpdiscuz"),
416
- "wc_comment_approved_email_subject" => esc_html__("Your comment is approved!", "wpdiscuz"),
417
- "wc_comment_approved_email_message" => __('Hi [COMMENT_AUTHOR],<br/><br/>your comment was approved.<br/><br/><a href="[COMMENT_URL]">[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]', "wpdiscuz"),
418
- "wc_roles_cannot_comment_message" => esc_html__("Comments are closed.", "wpdiscuz"),
419
- "wc_stick_comment_btn_title" => esc_html__("Stick this comment", "wpdiscuz"),
420
- "wc_stick_comment" => esc_html__("Stick", "wpdiscuz"),
421
- "wc_unstick_comment" => esc_html__("Unstick", "wpdiscuz"),
422
- "wc_sticky_comment_icon_title" => esc_html__("Sticky Comment Thread", "wpdiscuz"),
423
- "wc_close_comment_btn_title" => esc_html__("Close this thread", "wpdiscuz"),
424
- "wc_close_comment" => esc_html__("Close", "wpdiscuz"),
425
- "wc_open_comment" => esc_html__("Open", "wpdiscuz"),
426
- "wc_closed_comment_icon_title" => esc_html__("Closed Comment Thread", "wpdiscuz"),
427
- "wc_social_login_agreement_label" => esc_html__("I allow to create an account", "wpdiscuz"),
428
- "wc_social_login_agreement_desc" => esc_html__("When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.", "wpdiscuz"),
429
- "wc_agreement_button_disagree" => esc_html__("Disagree", "wpdiscuz"),
430
- "wc_agreement_button_agree" => esc_html__("Agree", "wpdiscuz"),
431
- "wc_content_and_settings" => esc_html__("My content and settings", "wpdiscuz"),
432
- "wc_user_settings_activity" => esc_html__("Activity", "wpdiscuz"),
433
- "wc_user_settings_subscriptions" => esc_html__("Subscriptions", "wpdiscuz"),
434
- "wc_user_settings_follows" => esc_html__("Follows", "wpdiscuz"),
435
- "wc_user_settings_response_to" => esc_html__("In response to:", "wpdiscuz"),
436
- "wc_user_settings_email_me_delete_links" => esc_html__("Bulk management via email", "wpdiscuz"),
437
- "wc_user_settings_email_me_delete_links_desc" => esc_html__("Click the button above to get an email with bulk delete and unsubscribe links.", "wpdiscuz"),
438
- "wc_user_settings_no_data" => esc_html__("No data found!", "wpdiscuz"),
439
- "wc_user_settings_request_deleting_comments" => esc_html__("Delete all my comments", "wpdiscuz"),
440
- "wc_user_settings_cancel_subscriptions" => esc_html__("Cancel all comment subscriptions", "wpdiscuz"),
441
- "wc_user_settings_clear_cookie" => esc_html__("Clear cookies with my personal data", "wpdiscuz"),
442
- "wc_user_settings_delete_links" => esc_html__("Bulk management via email", "wpdiscuz"),
443
- "wc_user_settings_delete_all_comments" => esc_html__("Delete all my comments", "wpdiscuz"),
444
- "wc_user_settings_delete_all_comments_message" => __('Please use this link to delete all your comments. Please note, that this action cannot be undone.<br/><br/><a href="[DELETE_COMMENTS_URL]" target="_blank">Delete all my comments</a><br/><br/>', "wpdiscuz"),
445
- "wc_user_settings_delete_all_subscriptions" => esc_html__("Delete all my subscriptions", "wpdiscuz"),
446
- "wc_user_settings_delete_all_subscriptions_message" => __('Please use this link to cancel all subscriptions for new comments. Please note, that this action cannot be undone.<br/><br/><a href="[DELETE_SUBSCRIPTIONS_URL]" target="_blank">Delete all my subscriptions</a><br/><br/>', "wpdiscuz"),
447
- "wc_user_settings_delete_all_follows" => esc_html__("Delete all my follows", "wpdiscuz"),
448
- "wc_user_settings_delete_all_follows_message" => __('Please use this link to cancel all follows for new comments. Please note, that this action cannot be undone.<br/><br/><a href="[DELETE_FOLLOWS_URL]" target="_blank">Delete all my follows</a><br/><br/>', "wpdiscuz"),
449
- "wc_user_settings_subscribed_to_replies" => esc_html__("subscribed to this comment", "wpdiscuz"),
450
- "wc_user_settings_subscribed_to_replies_own" => esc_html__("subscribed to my comments", "wpdiscuz"),
451
- "wc_user_settings_subscribed_to_all_comments" => esc_html__("subscribed to all follow-up comments of this post", "wpdiscuz"),
452
- "wc_user_settings_check_email" => esc_html__("Please check your email."),
453
- "wc_user_settings_email_error" => esc_html__("Error : Can't send email.", "wpdiscuz"),
454
- "wc_confirm_comment_delete" => esc_html__("Are you sure you want to delete this comment?", "wpdiscuz"),
455
- "wc_confirm_cancel_subscription" => esc_html__("Are you sure you want to cancel this subscription?", "wpdiscuz"),
456
- "wc_confirm_cancel_follow" => esc_html__("Are you sure you want to cancel this follow?", "wpdiscuz"),
457
- "wc_follow_user" => esc_html__("Follow this user", "wpdiscuz"),
458
- "wc_unfollow_user" => esc_html__("Unfollow this user", "wpdiscuz"),
459
- "wc_follow_success" => esc_html__("You started following this comment author", "wpdiscuz"),
460
- "wc_follow_canceled" => esc_html__("You stopped following this comment author.", "wpdiscuz"),
461
- "wc_follow_email_confirm" => esc_html__("Please check your email and confirm the user following request.", "wpdiscuz"),
462
- "wc_follow_email_confirm_fail" => esc_html__("Sorry, we couldn't send confirmation email.", "wpdiscuz"),
463
- "wc_follow_login_to_follow" => esc_html__("Please login to follow users.", "wpdiscuz"),
464
- "wc_follow_impossible" => esc_html__("We are sorry, but you can't follow this user.", "wpdiscuz"),
465
- "wc_follow_not_added" => esc_html__("Following failed. Please try again later.", "wpdiscuz"),
466
- "wc_follow_confirm" => esc_html__("Confirm user following request", "wpdiscuz"),
467
- "wc_follow_cancel" => esc_html__("Cancel user following request", "wpdiscuz"),
468
- "wc_follow_confirm_email_subject" => esc_html__("User Following Confirmation", "wpdiscuz"),
469
- "wc_follow_confirm_email_message" => __('Hi, <br/> You just started following a new user. You\'ll get email notification once new comment is posted by this user. <br/> Please click on "user following confirmation" link to confirm your request. If you believe this is an error, ignore this message and we\'ll never bother you again. <br/><br/><a href="[POST_URL]">[POST_TITLE]</a><br/><br/><a href="[CONFIRM_URL]">' . __("Confirm Follow", "wpdiscuz") . '</a><br/><br/><a href="[CANCEL_URL]">' . esc_html__("Unfollow", "wpdiscuz") . "</a>", "wpdiscuz"),
470
- "wc_follow_email_subject" => esc_html__("New Comment", "wpdiscuz"),
471
- "wc_follow_email_message" => __('Hi [FOLLOWER_NAME],<br/><br/> new comment have been posted by the <em><strong>[COMMENT_AUTHOR]</em></strong> you are following<br/><br/><a href="[COMMENT_URL]">[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]<br/><br/><a href="[CANCEL_URL]">' . esc_html__("Unfollow", "wpdiscuz") . '</a>', "wpdiscuz"),
472
- "wc_mentioned_email_subject" => esc_html__("You have been mentioned in comment", "wpdiscuz"),
473
- "wc_mentioned_email_message" => __('Hi [MENTIONED_USER_NAME]!<br/>You have been mentioned in a comment posted on "[POST_TITLE]" post by [COMMENT_AUTHOR].<br/><br/>Comment URL: <a href="[COMMENT_URL]">[COMMENT_URL]</a>', "wpdiscuz"),
474
- "wc_copied_to_clipboard" => esc_html__("Copied to clipboard!", "wpdiscuz"),
475
- "wc_feedback_shortcode_tooltip" => esc_html__("Select a part of text and ask readers for feedback (inline commenting)", "wpdiscuz"),
476
- "wc_feedback_popup_title" => esc_html__("Ask for Feedback", "wpdiscuz"),
477
- "wc_please_leave_feebdack" => esc_html__("Please leave a feedback on this", "wpdiscuz"),
478
- "wc_feedback_content_text" => esc_html__("", "wpdiscuz"),
479
- "wc_feedback_comment_success" => esc_html__("Thank you for your feedback!", "wpdiscuz"),
480
- "wc_commenting_is_closed" => esc_html__("Commenting is closed!", "wpdiscuz"),
481
- "wc_closed_comment_thread" => esc_html__("This is closed comment thread", "wpdiscuz"),
482
- "wc_bubble_invite_message" => esc_html__("Would love your thoughts, please comment.", "wpdiscuz"),
483
- "wc_vote_phrase" => esc_html__("vote", "wpdiscuz"),
484
- "wc_votes_phrase" => esc_html__("votes", "wpdiscuz"),
485
- "wc_comment_link" => esc_html__("Comment Link", "wpdiscuz"),
486
- "wc_not_allowed_to_comment_more_than" => esc_html__("We are sorry, you are not allowed to comment more than %d time(s)!", "wpdiscuz"),
487
- "wc_not_allowed_to_create_comment_thread_more_than" => esc_html__("We are sorry, you are not allowed to comment more than %d time(s)!", "wpdiscuz"),
488
- "wc_not_allowed_to_reply_more_than" => esc_html__("We are sorry, you are not allowed to reply more than %d time(s)!", "wpdiscuz"),
489
- "wc_inline_form_comment" => esc_html__("Your comment here...", "wpdiscuz"),
490
- "wc_inline_form_notify" => esc_html__("Notify me via email when a new reply is posted", "wpdiscuz"),
491
- "wc_inline_form_name" => esc_html__("Your Name*", "wpdiscuz"),
492
- "wc_inline_form_email" => esc_html__("Your Email", "wpdiscuz"),
493
- "wc_inline_form_comment_button" => esc_html__("COMMENT", "wpdiscuz"),
494
- "wc_inline_comments_view_all" => esc_html__("View all comments", "wpdiscuz"),
495
- "wc_inline_feedbacks" => esc_html__("Inline Feedbacks", "wpdiscuz"),
496
- "wc_unable_sent_email" => esc_html__("Unable to send an email", "wpdiscuz"),
497
- "wc_subscription_fault" => esc_html__("Subscription Fault", "wpdiscuz"),
498
- "wc_comments_are_deleted" => esc_html__("Your comments have been deleted from database", "wpdiscuz"),
499
- "wc_cancel_subs_success" => esc_html__("You cancel all your subscriptions successfully", "wpdiscuz"),
500
- "wc_cancel_follows_success" => esc_html__("You cancel all your follows successfully", "wpdiscuz"),
501
- "wc_follow_confirm_success" => esc_html__("Follow has been confirmed successfully", "wpdiscuz"),
502
- "wc_follow_cancel_success" => esc_html__("Follow has been canceled successfully", "wpdiscuz"),
503
- "wc_login_to_comment" => esc_html__("Please login to comment", "wpdiscuz"),
504
- "wc_view_comments" => esc_html__("View Comments", "wpdiscuz"),
505
- "wc_spoiler" => esc_html__("Spoiler", "wpdiscuz"),
506
- "wc_last_edited" => esc_html__('Last edited %1$s by %2$s', "wpdiscuz"),
507
- "wc_reply_to" => esc_html__("Reply to", "wpdiscuz"),
508
- "wc_manage_comment" => esc_html__("Manage Comment", "wpdiscuz"),
509
- "wc_spoiler_title" => esc_html__("Spoiler Title", "wpdiscuz"),
510
- "wc_cannot_rate_again" => esc_html__("You cannot rate again", "wpdiscuz"),
511
- "wc_not_allowed_to_rate" => esc_html__("You're not allowed to rate here", "wpdiscuz"),
512
- // Media Upload
513
- "wmuPhraseConfirmDelete" => esc_html__("Are you sure you want to delete this attachment?", "wpdiscuz"),
514
- "wmuPhraseNotAllowedFile" => esc_html__("Not allowed file type", "wpdiscuz"),
515
- "wmuPhraseMaxFileCount" => esc_html__("Maximum number of uploaded files is", "wpdiscuz"),
516
- "wmuPhraseMaxFileSize" => esc_html__("Maximum upload file size is", "wpdiscuz"),
517
- "wmuPhrasePostMaxSize" => esc_html__("Maximum post size is", "wpdiscuz"),
518
- "wmuAttachImage" => esc_html__("Attach an image to this comment", "wpdiscuz"),
519
- "wmuChangeImage" => esc_html__("Change the attached image", "wpdiscuz"),
520
- ];
521
- }
522
 
523
- public function toArray() {
524
- $options = [
525
- self::TAB_FORM => [
526
- "commentFormView" => $this->form["commentFormView"],
527
- "enableDropAnimation" => $this->form["enableDropAnimation"],
528
- "richEditor" => $this->form["richEditor"],
529
- "boldButton" => $this->form["boldButton"],
530
- "italicButton" => $this->form["italicButton"],
531
- "underlineButton" => $this->form["underlineButton"],
532
- "strikeButton" => $this->form["strikeButton"],
533
- "olButton" => $this->form["olButton"],
534
- "ulButton" => $this->form["ulButton"],
535
- "blockquoteButton" => $this->form["blockquoteButton"],
536
- "codeblockButton" => $this->form["codeblockButton"],
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"],
544
- ],
545
- self::TAB_RECAPTCHA => [
546
- "siteKey" => $this->recaptcha["siteKey"],
547
- "secretKey" => $this->recaptcha["secretKey"],
548
- "theme" => $this->recaptcha["theme"],
549
- "lang" => $this->recaptcha["lang"],
550
- "requestMethod" => $this->recaptcha["requestMethod"],
551
- "showForGuests" => $this->recaptcha["showForGuests"],
552
- "showForUsers" => $this->recaptcha["showForUsers"],
553
- "isShowOnSubscribeForm" => $this->recaptcha["isShowOnSubscribeForm"],
554
- ],
555
- self::TAB_LOGIN => [
556
- "showLoggedInUsername" => $this->login["showLoggedInUsername"],
557
- "showLoginLinkForGuests" => $this->login["showLoginLinkForGuests"],
558
- "showActivityTab" => $this->login["showActivityTab"],
559
- "showSubscriptionsTab" => $this->login["showSubscriptionsTab"],
560
- "showFollowsTab" => $this->login["showFollowsTab"],
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"],
568
- "socialLoginInSecondaryForm" => $this->social["socialLoginInSecondaryForm"],
569
- "displayIconOnAvatar" => $this->social["displayIconOnAvatar"],
570
- // fb
571
- "enableFbLogin" => $this->social["enableFbLogin"],
572
- "enableFbShare" => $this->social["enableFbShare"],
573
- "fbAppID" => $this->social["fbAppID"],
574
- "fbAppSecret" => $this->social["fbAppSecret"],
575
- "fbUseOAuth2" => $this->social["fbUseOAuth2"],
576
- // twitter
577
- "enableTwitterLogin" => $this->social["enableTwitterLogin"],
578
- "enableTwitterShare" => $this->social["enableTwitterShare"],
579
- "twitterAppID" => $this->social["twitterAppID"],
580
- "twitterAppSecret" => $this->social["twitterAppSecret"],
581
- // google
582
- "enableGoogleLogin" => $this->social["enableGoogleLogin"],
583
- "googleClientID" => $this->social["googleClientID"],
584
- "googleClientSecret" => $this->social["googleClientSecret"],
585
- // disqus
586
- "enableDisqusLogin" => $this->social["enableDisqusLogin"],
587
- "disqusPublicKey" => $this->social["disqusPublicKey"],
588
- "disqusSecretKey" => $this->social["disqusSecretKey"],
589
- // wordpress
590
- "enableWordpressLogin" => $this->social["enableWordpressLogin"],
591
- "wordpressClientID" => $this->social["wordpressClientID"],
592
- "wordpressClientSecret" => $this->social["wordpressClientSecret"],
593
- // instagram
594
- "enableInstagramLogin" => $this->social["enableInstagramLogin"],
595
- "instagramAppID" => $this->social["instagramAppID"],
596
- "instagramAppSecret" => $this->social["instagramAppSecret"],
597
- // linkedin
598
- "enableLinkedinLogin" => $this->social["enableLinkedinLogin"],
599
- "linkedinClientID" => $this->social["linkedinClientID"],
600
- "linkedinClientSecret" => $this->social["linkedinClientSecret"],
601
- // whatsapp
602
- "enableWhatsappShare" => $this->social["enableWhatsappShare"],
603
- // yandex
604
- "enableYandexLogin" => $this->social["enableYandexLogin"],
605
- "yandexID" => $this->social["yandexID"],
606
- "yandexPassword" => $this->social["yandexPassword"],
607
- // mail.ru
608
- "enableMailruLogin" => $this->social["enableMailruLogin"],
609
- "mailruClientID" => $this->social["mailruClientID"],
610
- "mailruClientSecret" => $this->social["mailruClientSecret"],
611
- // weibo
612
- "enableWeiboLogin" => $this->social["enableWeiboLogin"],
613
- "weiboKey" => $this->social["weiboKey"],
614
- "weiboSecret" => $this->social["weiboSecret"],
615
- // wechat
616
- "enableWechatLogin" => $this->social["enableWechatLogin"],
617
- "wechatAppID" => $this->social["wechatAppID"],
618
- "wechatSecret" => $this->social["wechatSecret"],
619
- // qq
620
- "enableQQLogin" => $this->social["enableQQLogin"],
621
- "qqAppID" => $this->social["qqAppID"],
622
- "qqSecret" => $this->social["qqSecret"],
623
- // baidu
624
- "enableBaiduLogin" => $this->social["enableBaiduLogin"],
625
- "baiduAppID" => $this->social["baiduAppID"],
626
- "baiduSecret" => $this->social["baiduSecret"],
627
- // vk
628
- "enableVkLogin" => $this->social["enableVkLogin"],
629
- "enableVkShare" => $this->social["enableVkShare"],
630
- "vkAppID" => $this->social["vkAppID"],
631
- "vkAppSecret" => $this->social["vkAppSecret"],
632
- // ok
633
- "enableOkLogin" => $this->social["enableOkLogin"],
634
- "enableOkShare" => $this->social["enableOkShare"],
635
- "okAppID" => $this->social["okAppID"],
636
- "okAppKey" => $this->social["okAppKey"],
637
- "okAppSecret" => $this->social["okAppSecret"],
638
- ],
639
- self::TAB_RATING => [
640
- "enablePostRatingSchema" => $this->rating["enablePostRatingSchema"],
641
- "displayRatingOnPost" => $this->rating["displayRatingOnPost"],
642
- "ratingCssOnNoneSingular" => $this->rating["ratingCssOnNoneSingular"],
643
- "ratingHoverColor" => $this->rating["ratingHoverColor"],
644
- "ratingInactiveColor" => $this->rating["ratingInactiveColor"],
645
- "ratingActiveColor" => $this->rating["ratingActiveColor"],
646
- ],
647
- self::TAB_THREAD_DISPLAY => [
648
- "firstLoadWithAjax" => $this->thread_display["firstLoadWithAjax"],
649
- "commentListLoadType" => $this->thread_display["commentListLoadType"],
650
- "isLoadOnlyParentComments" => $this->thread_display["isLoadOnlyParentComments"],
651
- "showReactedFilterButton" => $this->thread_display["showReactedFilterButton"],
652
- "showHottestFilterButton" => $this->thread_display["showHottestFilterButton"],
653
- "showSortingButtons" => $this->thread_display["showSortingButtons"],
654
- "mostVotedByDefault" => $this->thread_display["mostVotedByDefault"],
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"],
662
- "showCommentDate" => $this->thread_layouts["showCommentDate"],
663
- "showVotingButtons" => $this->thread_layouts["showVotingButtons"],
664
- "votingButtonsIcon" => $this->thread_layouts["votingButtonsIcon"],
665
- "votingButtonsStyle" => $this->thread_layouts["votingButtonsStyle"],
666
- "enableDislikeButton" => $this->thread_layouts["enableDislikeButton"],
667
- "isGuestCanVote" => $this->thread_layouts["isGuestCanVote"],
668
- "highlightVotingButtons" => $this->thread_layouts["highlightVotingButtons"],
669
- "showAvatars" => $this->thread_layouts["showAvatars"],
670
- "defaultAvatarUrlForUser" => $this->thread_layouts["defaultAvatarUrlForUser"],
671
- "defaultAvatarUrlForGuest" => $this->thread_layouts["defaultAvatarUrlForGuest"],
672
- "changeAvatarsEverywhere" => $this->thread_layouts["changeAvatarsEverywhere"],
673
- ],
674
- self::TAB_THREAD_STYLES => [
675
- "theme" => $this->thread_styles["theme"],
676
- "primaryColor" => $this->thread_styles["primaryColor"],
677
- "newLoadedCommentBGColor" => $this->thread_styles["newLoadedCommentBGColor"],
678
- "primaryButtonColor" => $this->thread_styles["primaryButtonColor"],
679
- "primaryButtonBG" => $this->thread_styles["primaryButtonBG"],
680
- "bubbleColors" => $this->thread_styles["bubbleColors"],
681
- "inlineFeedbackColors" => $this->thread_styles["inlineFeedbackColors"],
682
- "defaultCommentAreaBG" => $this->thread_styles["defaultCommentAreaBG"],
683
- "defaultCommentTextColor" => $this->thread_styles["defaultCommentTextColor"],
684
- "defaultCommentFieldsBG" => $this->thread_styles["defaultCommentFieldsBG"],
685
- "defaultCommentFieldsBorderColor" => $this->thread_styles["defaultCommentFieldsBorderColor"],
686
- "defaultCommentFieldsTextColor" => $this->thread_styles["defaultCommentFieldsTextColor"],
687
- "defaultCommentFieldsPlaceholderColor" => $this->thread_styles["defaultCommentFieldsPlaceholderColor"],
688
- "darkCommentAreaBG" => $this->thread_styles["darkCommentAreaBG"],
689
- "darkCommentTextColor" => $this->thread_styles["darkCommentTextColor"],
690
- "darkCommentFieldsBG" => $this->thread_styles["darkCommentFieldsBG"],
691
- "darkCommentFieldsBorderColor" => $this->thread_styles["darkCommentFieldsBorderColor"],
692
- "darkCommentFieldsTextColor" => $this->thread_styles["darkCommentFieldsTextColor"],
693
- "darkCommentFieldsPlaceholderColor" => $this->thread_styles["darkCommentFieldsPlaceholderColor"],
694
- "commentTextSize" => $this->thread_styles["commentTextSize"],
695
- "enableFontAwesome" => $this->thread_styles["enableFontAwesome"],
696
- "customCss" => $this->thread_styles["customCss"],
697
- ],
698
- self::TAB_SUBSCRIPTION => [
699
- "enableUserMentioning" => $this->subscription["enableUserMentioning"],
700
- "sendMailToMentionedUsers" => $this->subscription["sendMailToMentionedUsers"],
701
- "isNotifyOnCommentApprove" => $this->subscription["isNotifyOnCommentApprove"],
702
- "enableMemberConfirm" => $this->subscription["enableMemberConfirm"],
703
- "enableGuestsConfirm" => $this->subscription["enableGuestsConfirm"],
704
- "subscriptionType" => $this->subscription["subscriptionType"],
705
- "showReplyCheckbox" => $this->subscription["showReplyCheckbox"],
706
- "isReplyDefaultChecked" => $this->subscription["isReplyDefaultChecked"],
707
- "usePostmaticForCommentNotification" => $this->subscription["usePostmaticForCommentNotification"],
708
- "isFollowActive" => $this->subscription["isFollowActive"],
709
- "disableFollowConfirmForUsers" => $this->subscription["disableFollowConfirmForUsers"],
710
- ],
711
- self::TAB_LABELS => [
712
- "blogRoleLabels" => $this->labels["blogRoleLabels"],
713
- "blogRoles" => $this->labels["blogRoles"],
714
- ],
715
- self::TAB_MODERATION => [
716
- "commentEditableTime" => $this->moderation["commentEditableTime"],
717
- "enableEditingWhenHaveReplies" => $this->moderation["enableEditingWhenHaveReplies"],
718
- "displayEditingInfo" => $this->moderation["displayEditingInfo"],
719
- "enableStickButton" => $this->moderation["enableStickButton"],
720
- "enableCloseButton" => $this->moderation["enableCloseButton"],
721
- "restrictCommentingPerUser" => $this->moderation["restrictCommentingPerUser"],
722
- "commentRestrictionType" => $this->moderation["commentRestrictionType"],
723
- "userCommentsLimit" => $this->moderation["userCommentsLimit"],
724
- ],
725
- self::TAB_CONTENT => [
726
- "commentTextMinLength" => $this->content["commentTextMinLength"],
727
- "commentTextMaxLength" => $this->content["commentTextMaxLength"],
728
- "enableImageConversion" => $this->content["enableImageConversion"],
729
- "enableShortcodes" => $this->content["enableShortcodes"],
730
- "commentReadMoreLimit" => $this->content["commentReadMoreLimit"],
731
- "wmuIsEnabled" => $this->content["wmuIsEnabled"],
732
- "wmuIsGuestAllowed" => $this->content["wmuIsGuestAllowed"],
733
- "wmuIsLightbox" => $this->content["wmuIsLightbox"],
734
- "wmuMimeTypes" => $this->content["wmuMimeTypes"],
735
- "wmuMaxFileSize" => $this->content["wmuMaxFileSize"],
736
- "wmuIsShowFilesDashboard" => $this->content["wmuIsShowFilesDashboard"],
737
- "wmuSingleImageWidth" => $this->content["wmuSingleImageWidth"],
738
- "wmuSingleImageHeight" => $this->content["wmuSingleImageHeight"],
739
- "wmuImageSizes" => $this->content["wmuImageSizes"],
740
- ],
741
- self::TAB_LIVE => [
742
- "enableBubble" => $this->live["enableBubble"],
743
- "bubbleLiveUpdate" => $this->live["bubbleLiveUpdate"],
744
- "bubbleLocation" => $this->live["bubbleLocation"],
745
- "bubbleShowNewCommentMessage" => $this->live["bubbleShowNewCommentMessage"],
746
- "bubbleHintTimeout" => $this->live["bubbleHintTimeout"],
747
- "bubbleHintHideTimeout" => $this->live["bubbleHintHideTimeout"],
748
- "commentListUpdateType" => $this->live["commentListUpdateType"],
749
- "liveUpdateGuests" => $this->live["liveUpdateGuests"],
750
- "commentListUpdateTimer" => $this->live["commentListUpdateTimer"],
751
- ],
752
- self::TAB_INLINE => [
753
- "showInlineFilterButton" => $this->inline["showInlineFilterButton"],
754
- "inlineFeedbackAttractionType" => $this->inline["inlineFeedbackAttractionType"],
755
- ],
756
- self::TAB_GENERAL => [
757
- "isEnableOnHome" => $this->general["isEnableOnHome"],
758
- "isNativeAjaxEnabled" => $this->general["isNativeAjaxEnabled"],
759
- "loadComboVersion" => $this->general["loadComboVersion"],
760
- "loadMinVersion" => $this->general["loadMinVersion"],
761
- "commentLinkFilter" => $this->general["commentLinkFilter"],
762
- "redirectPage" => $this->general["redirectPage"],
763
- "simpleCommentDate" => $this->general["simpleCommentDate"],
764
- "dateDiffFormat" => $this->general["dateDiffFormat"],
765
- "isUsePoMo" => $this->general["isUsePoMo"],
766
- "showPluginPoweredByLink" => $this->general["showPluginPoweredByLink"],
767
- "isGravatarCacheEnabled" => $this->general["isGravatarCacheEnabled"],
768
- "gravatarCacheMethod" => $this->general["gravatarCacheMethod"],
769
- "gravatarCacheTimeout" => $this->general["gravatarCacheTimeout"],
770
- ],
771
- ];
772
- return $options;
773
- }
774
 
775
- public function updateOptions() {
776
- update_option(self::OPTION_SLUG_OPTIONS, $this->toArray());
777
- }
778
 
779
- public function addOptions() {
780
- add_option(self::OPTION_SLUG_OPTIONS, $this->getDefaultOptions());
781
- }
782
 
783
- public function getDefaultOptions() {
784
- return [
785
- self::TAB_FORM => [
786
- "commentFormView" => "collapsed",
787
- "enableDropAnimation" => 1,
788
- "richEditor" => "desktop",
789
- "boldButton" => 1,
790
- "italicButton" => 1,
791
- "underlineButton" => 1,
792
- "strikeButton" => 1,
793
- "olButton" => 1,
794
- "ulButton" => 1,
795
- "blockquoteButton" => 1,
796
- "codeblockButton" => 1,
797
- "linkButton" => 1,
798
- "sourcecodeButton" => 1,
799
- "spoilerButton" => 1,
800
- "enableQuickTags" => 0,
801
- "commenterNameMinLength" => 3,
802
- "commenterNameMaxLength" => 50,
803
- "storeCommenterData" => -1,
804
- ],
805
- self::TAB_RECAPTCHA => [
806
- "siteKey" => "",
807
- "secretKey" => "",
808
- "theme" => "light",
809
- "lang" => "",
810
- "requestMethod" => "auto",
811
- "showForGuests" => 0,
812
- "showForUsers" => 0,
813
- "isShowOnSubscribeForm" => 0,
814
- ],
815
- self::TAB_LOGIN => [
816
- "showLoggedInUsername" => 1,
817
- "showLoginLinkForGuests" => 1,
818
- "showActivityTab" => 1,
819
- "showSubscriptionsTab" => 1,
820
- "showFollowsTab" => 1,
821
- "enableProfileURLs" => 1,
822
- "websiteAsProfileUrl" => 1,
823
- "isUserByEmail" => 0,
824
- "loginUrl" => "",
825
- ],
826
- self::TAB_SOCIAL => [
827
- "socialLoginAgreementCheckbox" => 1,
828
- "socialLoginInSecondaryForm" => 0,
829
- "displayIconOnAvatar" => 1,
830
- "enableFbLogin" => 0,
831
- "enableFbShare" => 0,
832
- "fbUseOAuth2" => 0,
833
- "fbAppID" => "",
834
- "fbAppSecret" => "",
835
- "enableTwitterLogin" => 0,
836
- "enableTwitterShare" => 1,
837
- "twitterAppID" => "",
838
- "twitterAppSecret" => "",
839
- "enableGoogleLogin" => 0,
840
- "googleClientID" => "",
841
- "googleClientSecret" => "",
842
- "enableDisqusLogin" => 0,
843
- "disqusPublicKey" => "",
844
- "disqusSecretKey" => "",
845
- "enableWordpressLogin" => 0,
846
- "wordpressClientID" => "",
847
- "wordpressClientSecret" => "",
848
- "enableInstagramLogin" => 0,
849
- "instagramAppID" => "",
850
- "instagramAppSecret" => "",
851
- "enableLinkedinLogin" => 0,
852
- "linkedinClientID" => "",
853
- "linkedinClientSecret" => "",
854
- "enableWhatsappShare" => 0,
855
- "enableYandexLogin" => 0,
856
- "yandexID" => "",
857
- "yandexPassword" => "",
858
- "enableMailruLogin" => 0,
859
- "mailruClientID" => "",
860
- "mailruClientSecret" => "",
861
- "enableWeiboLogin" => 0,
862
- "weiboKey" => "",
863
- "weiboSecret" => "",
864
- "enableWechatLogin" => 0,
865
- "wechatAppID" => "",
866
- "wechatSecret" => "",
867
- "enableQQLogin" => 0,
868
- "qqAppID" => "",
869
- "qqSecret" => "",
870
- "enableBaiduLogin" => 0,
871
- "baiduAppID" => "",
872
- "baiduSecret" => "",
873
- "enableVkLogin" => 0,
874
- "enableVkShare" => 1,
875
- "vkAppID" => "",
876
- "vkAppSecret" => "",
877
- "enableOkLogin" => 0,
878
- "enableOkShare" => 1,
879
- "okAppID" => "",
880
- "okAppKey" => "",
881
- "okAppSecret" => "",
882
- ],
883
- self::TAB_RATING => [
884
- "enablePostRatingSchema" => 0,
885
- "displayRatingOnPost" => ["before_comment_form"],
886
- "ratingCssOnNoneSingular" => 0,
887
- "ratingHoverColor" => "#FFED85",
888
- "ratingInactiveColor" => "#DDDDDD",
889
- "ratingActiveColor" => "#FFD700",
890
- ],
891
- self::TAB_THREAD_DISPLAY => [
892
- "firstLoadWithAjax" => 0,
893
- "commentListLoadType" => 0,
894
- "isLoadOnlyParentComments" => 0,
895
- "showReactedFilterButton" => 1,
896
- "showHottestFilterButton" => 1,
897
- "showSortingButtons" => 1,
898
- "mostVotedByDefault" => 0,
899
- "reverseChildren" => 0,
900
- "highlightUnreadComments" => 0,
901
- "scrollToComment" => 1,
902
- "orderCommentsBy" => "comment_ID",
903
- ],
904
- self::TAB_THREAD_LAYOUTS => [
905
- "showCommentLink" => 1,
906
- "showCommentDate" => 1,
907
- "showVotingButtons" => 1,
908
- "votingButtonsIcon" => "fa-plus|fa-minus",
909
- "votingButtonsStyle" => 0,
910
- "enableDislikeButton" => 1,
911
- "isGuestCanVote" => 1,
912
- "highlightVotingButtons" => 1,
913
- "showAvatars" => 1,
914
- "defaultAvatarUrlForUser" => "",
915
- "defaultAvatarUrlForGuest" => "",
916
- "changeAvatarsEverywhere" => 1,
917
- ],
918
- self::TAB_THREAD_STYLES => [
919
- "theme" => "wpd-default",
920
- "primaryColor" => "#00B38F",
921
- "newLoadedCommentBGColor" => "#FFFAD6",
922
- "primaryButtonColor" => "#FFFFFF",
923
- "primaryButtonBG" => "#07B290",
924
- "bubbleColors" => "#1DB99A",
925
- "inlineFeedbackColors" => "#1DB99A",
926
- "defaultCommentAreaBG" => "",
927
- "defaultCommentTextColor" => "#777777",
928
- "defaultCommentFieldsBG" => "",
929
- "defaultCommentFieldsBorderColor" => "#DDDDDD",
930
- "defaultCommentFieldsTextColor" => "#777777",
931
- "defaultCommentFieldsPlaceholderColor" => "",
932
- "darkCommentAreaBG" => "#111111",
933
- "darkCommentTextColor" => "#CCCCCC",
934
- "darkCommentFieldsBG" => "#999999",
935
- "darkCommentFieldsBorderColor" => "#D1D1D1",
936
- "darkCommentFieldsTextColor" => "#000000",
937
- "darkCommentFieldsPlaceholderColor" => "#DDDDDD",
938
- "commentTextSize" => "14px",
939
- "enableFontAwesome" => 1,
940
- "customCss" => ".comments-area{width:auto;}",
941
- ],
942
- self::TAB_SUBSCRIPTION => [
943
- "enableUserMentioning" => 1,
944
- "sendMailToMentionedUsers" => 1,
945
- "isNotifyOnCommentApprove" => 1,
946
- "enableMemberConfirm" => 0,
947
- "enableGuestsConfirm" => 1,
948
- "subscriptionType" => 1,
949
- "showReplyCheckbox" => 1,
950
- "isReplyDefaultChecked" => 0,
951
- "usePostmaticForCommentNotification" => 0,
952
- "isFollowActive" => 1,
953
- "disableFollowConfirmForUsers" => 1,
954
- ],
955
- self::TAB_LABELS => [
956
- "blogRoleLabels" => isset($this->labels["blogRoleLabels"]) ? $this->labels["blogRoleLabels"] : [],
957
- "blogRoles" => isset($this->labels["blogRoles"]) ? $this->labels["blogRoles"] : [],
958
- ],
959
- self::TAB_MODERATION => [
960
- "commentEditableTime" => 900,
961
- "enableEditingWhenHaveReplies" => 0,
962
- "displayEditingInfo" => 1,
963
- "enableStickButton" => 1,
964
- "enableCloseButton" => 1,
965
- "restrictCommentingPerUser" => "disable",
966
- "commentRestrictionType" => "both",
967
- "userCommentsLimit" => 1,
968
- ],
969
- self::TAB_CONTENT => [
970
- "commentTextMinLength" => 1,
971
- "commentTextMaxLength" => "",
972
- "enableImageConversion" => 1,
973
- "enableShortcodes" => 0,
974
- "commentReadMoreLimit" => 0,
975
- "wmuIsEnabled" => 1,
976
- "wmuIsGuestAllowed" => 1,
977
- "wmuIsLightbox" => 1,
978
- "wmuMimeTypes" => $this->getDefaultFileTypes(),
979
- "wmuMaxFileSize" => 2,
980
- "wmuIsShowFilesDashboard" => 1,
981
- "wmuSingleImageWidth" => "auto",
982
- "wmuSingleImageHeight" => 200,
983
- "wmuImageSizes" => $this->getDefaultImageSizes(),
984
- ],
985
- self::TAB_LIVE => [
986
- "enableBubble" => 0,
987
- "bubbleLiveUpdate" => 0,
988
- "bubbleLocation" => "content_left",
989
- "bubbleShowNewCommentMessage" => 1,
990
- "bubbleHintTimeout" => 45,
991
- "bubbleHintHideTimeout" => 10,
992
- "commentListUpdateType" => 0,
993
- "liveUpdateGuests" => 0,
994
- "commentListUpdateTimer" => 30,
995
- ],
996
- self::TAB_INLINE => [
997
- "showInlineFilterButton" => 1,
998
- "inlineFeedbackAttractionType" => "blink",
999
- ],
1000
- self::TAB_GENERAL => [
1001
- "isEnableOnHome" => 1,
1002
- "isNativeAjaxEnabled" => 1,
1003
- "loadComboVersion" => 1,
1004
- "loadMinVersion" => 1,
1005
- "commentLinkFilter" => 1,
1006
- "redirectPage" => 0,
1007
- "simpleCommentDate" => 0,
1008
- "dateDiffFormat" => "[number] [time_unit] [adjective]",
1009
- "isUsePoMo" => 0,
1010
- "showPluginPoweredByLink" => 0,
1011
- "isGravatarCacheEnabled" => 0,
1012
- "gravatarCacheMethod" => "cronjob",
1013
- "gravatarCacheTimeout" => 10,
1014
- ],
1015
- ];
1016
- }
1017
 
1018
- public function initPhrasesOnLoad() {
1019
- if (!$this->general["isUsePoMo"] && $this->dbManager->isPhraseExists("wc_be_the_first_text")) {
1020
- $this->phrases = $this->dbManager->getPhrases();
1021
- } else {
1022
- $this->initPhrases();
1023
- }
1024
- }
1025
 
1026
- private function initFormRelations() {
1027
- $this->formContentTypeRel = get_option("wpdiscuz_form_content_type_rel", []);
1028
- $this->formPostRel = get_option("wpdiscuz_form_post_rel", []);
1029
- }
1030
 
1031
- public function isShareEnabled() {
1032
- return ($this->social["enableFbShare"] || $this->social["enableTwitterShare"] || $this->social["enableVkShare"] || $this->social["enableOkShare"]);
1033
- }
1034
 
1035
- public function getOptionsForJs() {
1036
- $jsArgs = [];
1037
- $jsArgs["wc_hide_replies_text"] = $this->phrases["wc_hide_replies_text"];
1038
- $jsArgs["wc_show_replies_text"] = $this->phrases["wc_show_replies_text"];
1039
- $jsArgs["wc_msg_required_fields"] = $this->phrases["wc_msg_required_fields"];
1040
- $jsArgs["wc_invalid_field"] = $this->phrases["wc_invalid_field"];
1041
- $jsArgs["wc_error_empty_text"] = $this->phrases["wc_error_empty_text"];
1042
- $jsArgs["wc_error_url_text"] = $this->phrases["wc_error_url_text"];
1043
- $jsArgs["wc_error_email_text"] = $this->phrases["wc_error_email_text"];
1044
- $jsArgs["wc_invalid_captcha"] = $this->phrases["wc_invalid_captcha"];
1045
- $jsArgs["wc_login_to_vote"] = $this->phrases["wc_login_to_vote"];
1046
- $jsArgs["wc_deny_voting_from_same_ip"] = $this->phrases["wc_deny_voting_from_same_ip"];
1047
- $jsArgs["wc_self_vote"] = $this->phrases["wc_self_vote"];
1048
- $jsArgs["wc_vote_only_one_time"] = $this->phrases["wc_vote_only_one_time"];
1049
- $jsArgs["wc_voting_error"] = $this->phrases["wc_voting_error"];
1050
- $jsArgs["wc_comment_edit_not_possible"] = $this->phrases["wc_comment_edit_not_possible"];
1051
- $jsArgs["wc_comment_not_updated"] = $this->phrases["wc_comment_not_updated"];
1052
- $jsArgs["wc_comment_not_edited"] = $this->phrases["wc_comment_not_edited"];
1053
- $jsArgs["wc_msg_input_min_length"] = $this->phrases["wc_msg_input_min_length"];
1054
- $jsArgs["wc_msg_input_max_length"] = $this->phrases["wc_msg_input_max_length"];
1055
- $jsArgs["wc_spoiler_title"] = $this->phrases["wc_spoiler_title"];
1056
- $jsArgs["wc_cannot_rate_again"] = $this->phrases["wc_cannot_rate_again"];
1057
- $jsArgs["wc_not_allowed_to_rate"] = $this->phrases["wc_not_allowed_to_rate"];
1058
- //<!-- follow phrases
1059
- $jsArgs["wc_follow_user"] = $this->phrases["wc_follow_user"];
1060
- $jsArgs["wc_unfollow_user"] = $this->phrases["wc_unfollow_user"];
1061
- $jsArgs["wc_follow_success"] = $this->phrases["wc_follow_success"];
1062
- $jsArgs["wc_follow_canceled"] = $this->phrases["wc_follow_canceled"];
1063
- $jsArgs["wc_follow_email_confirm"] = $this->phrases["wc_follow_email_confirm"];
1064
- $jsArgs["wc_follow_email_confirm_fail"] = $this->phrases["wc_follow_email_confirm_fail"];
1065
- $jsArgs["wc_follow_login_to_follow"] = $this->phrases["wc_follow_login_to_follow"];
1066
- $jsArgs["wc_follow_impossible"] = $this->phrases["wc_follow_impossible"];
1067
- $jsArgs["wc_follow_not_added"] = $this->phrases["wc_follow_not_added"];
1068
- //follow phrases -->
1069
- $jsArgs["is_user_logged_in"] = is_user_logged_in();
1070
- $jsArgs["commentListLoadType"] = $this->thread_display["commentListLoadType"];
1071
- $jsArgs["commentListUpdateType"] = $this->live["commentListUpdateType"];
1072
- $jsArgs["commentListUpdateTimer"] = $this->live["commentListUpdateTimer"];
1073
- $jsArgs["liveUpdateGuests"] = $this->live["liveUpdateGuests"];
1074
- $jsArgs["wordpressThreadCommentsDepth"] = $this->wp["threadCommentsDepth"];
1075
- $jsArgs["wordpressIsPaginate"] = $this->wp["isPaginate"];
1076
- $jsArgs["commentTextMaxLength"] = $this->content["commentTextMaxLength"] ? $this->content["commentTextMaxLength"] : null;
1077
- $jsArgs["commentTextMinLength"] = $this->content["commentTextMinLength"];
1078
- if ($this->form["storeCommenterData"] < 0) {
1079
- $jsArgs["storeCommenterData"] = 100000;
1080
- } else if ($this->form["storeCommenterData"] == 0) {
1081
- $jsArgs["storeCommenterData"] = null;
1082
- } else {
1083
- $jsArgs["storeCommenterData"] = $this->form["storeCommenterData"];
1084
- }
1085
- if (function_exists("zerospam_get_key")) {
1086
- $jsArgs["wpdiscuz_zs"] = md5(zerospam_get_key());
1087
- }
1088
- $jsArgs["socialLoginAgreementCheckbox"] = $this->social["socialLoginAgreementCheckbox"];
1089
- $jsArgs["enableFbLogin"] = $this->social["enableFbLogin"];
1090
- $jsArgs["enableFbShare"] = $this->social["enableFbShare"];
1091
- $jsArgs["facebookAppID"] = $this->social["fbAppID"];
1092
- $jsArgs["facebookUseOAuth2"] = $this->social["fbUseOAuth2"];
1093
- $jsArgs["enableGoogleLogin"] = $this->social["enableGoogleLogin"];
1094
- $jsArgs["googleClientID"] = $this->social["googleClientID"];
1095
- $jsArgs["googleClientSecret"] = $this->social["googleClientSecret"];
1096
- $jsArgs["cookiehash"] = COOKIEHASH;
1097
- $jsArgs["isLoadOnlyParentComments"] = $this->thread_display["isLoadOnlyParentComments"];
1098
- $jsArgs["scrollToComment"] = $this->thread_display["scrollToComment"];
1099
- $jsArgs["commentFormView"] = $this->form["commentFormView"];
1100
- $jsArgs["enableDropAnimation"] = $this->form["enableDropAnimation"];
1101
- $jsArgs["isNativeAjaxEnabled"] = $this->general["isNativeAjaxEnabled"];
1102
- $jsArgs["enableBubble"] = $this->live["enableBubble"];
1103
- $jsArgs["bubbleLiveUpdate"] = $this->live["bubbleLiveUpdate"];
1104
- $jsArgs["bubbleHintTimeout"] = $this->live["bubbleHintTimeout"];
1105
- $jsArgs["bubbleHintHideTimeout"] = $this->live["bubbleHintHideTimeout"];
1106
- $jsArgs["cookieHideBubbleHint"] = self::COOKIE_HIDE_BUBBLE_HINT;
1107
- $jsArgs["bubbleShowNewCommentMessage"] = $this->live["bubbleShowNewCommentMessage"];
1108
- $jsArgs["bubbleLocation"] = $this->live["bubbleLocation"];
1109
- $jsArgs["firstLoadWithAjax"] = $this->thread_display["firstLoadWithAjax"];
1110
- $jsArgs["wc_copied_to_clipboard"] = $this->phrases["wc_copied_to_clipboard"];
1111
- $jsArgs["inlineFeedbackAttractionType"] = $this->inline["inlineFeedbackAttractionType"];
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"];
1119
- $jsArgs["wpDiscuzIsShowOnSubscribeForm"] = $this->recaptcha["isShowOnSubscribeForm"];
1120
- // Media Upload //
1121
- $jsArgs["wmuEnabled"] = $this->content["wmuIsEnabled"];
1122
- $jsArgs["wmuInput"] = self::INPUT_NAME;
1123
- $jsArgs["wmuMaxFileCount"] = 1;
1124
- $jsArgs["wmuMaxFileSize"] = $this->content["wmuMaxFileSize"] * 1024 * 1024;
1125
- $jsArgs["wmuPostMaxSize"] = $this->wmuPostMaxSize;
1126
- $jsArgs["wmuIsLightbox"] = $this->content["wmuIsLightbox"];
1127
- $jsArgs["wmuMimeTypes"] = $this->content["wmuMimeTypes"];
1128
- $jsArgs["wmuPhraseConfirmDelete"] = $this->phrases["wmuPhraseConfirmDelete"];
1129
- $jsArgs["wmuPhraseNotAllowedFile"] = $this->phrases["wmuPhraseNotAllowedFile"];
1130
- $jsArgs["wmuPhraseMaxFileCount"] = preg_replace("#(\d+$)#is", "", $this->phrases["wmuPhraseMaxFileCount"]) . " " . apply_filters("wpdiscuz_mu_file_count", 1);
1131
- $jsArgs["wmuPhraseMaxFileSize"] = $this->phrases["wmuPhraseMaxFileSize"] . " " . $this->content["wmuMaxFileSize"] . "MB";
1132
- $jsArgs["wmuPhrasePostMaxSize"] = $this->phrases["wmuPhrasePostMaxSize"] . " " . ($this->wmuPostMaxSize / (1024 * 1024)) . "MB";
1133
- $jsArgs["msgEmptyFile"] = esc_html__("File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.");
1134
- $jsArgs["msgPostIdNotExists"] = esc_html__("Post ID not exists", "wpdiscuz");
1135
- $jsArgs["msgUploadingNotAllowed"] = esc_html__("Sorry, uploading not allowed for this post", "wpdiscuz");
1136
- $jsArgs["msgPermissionDenied"] = esc_html__("You do not have sufficient permissions to perform this action", "wpdiscuz");
1137
- $nonceKey = ($key = get_home_url()) ? md5($key) : "wmu-nonce";
1138
- $jsArgs["wmuSecurity"] = wp_create_nonce($nonceKey);
1139
- $jsArgs["wmuKeyImages"] = self::KEY_IMAGES;
1140
- $jsArgs["wmuSingleImageWidth"] = $this->content["wmuSingleImageWidth"];
1141
- $jsArgs["wmuSingleImageHeight"] = $this->content["wmuSingleImageHeight"];
1142
- return $jsArgs;
1143
- }
1144
 
1145
- private function initGoodbyeCaptchaField() {
1146
- $this->isGoodbyeCaptchaActive = is_callable(["GdbcWordPressPublicModule", "isCommentsProtectionActivated"]) && GdbcWordPressPublicModule::isCommentsProtectionActivated();
1147
- if ($this->isGoodbyeCaptchaActive) {
1148
- $this->goodbyeCaptchaTocken = GdbcWordPressPublicModule::getInstance()->getTokenFieldHtml();
1149
- }
1150
- }
 
 
 
1151
 
1152
- public function editorOptions() {
1153
- ob_start();
1154
- ?>
1155
  var wpdiscuzEditorOptions = {
1156
  modules: {
1157
  toolbar: "",
@@ -1160,2741 +1166,3290 @@ class WpdiscuzOptions implements WpDiscuzConstants {
1160
  maxcount : <?php echo $this->content["commentTextMaxLength"] ? $this->content["commentTextMaxLength"] : 0; ?>,
1161
  mincount : <?php echo $this->content["commentTextMinLength"]; ?>,
1162
  },
1163
- <?php do_action("wpdiscuz_editor_modules"); ?>
1164
  },
1165
- placeholder: '<?php echo get_comments_number() ? $this->phrases["wc_comment_join_text"] : $this->phrases["wc_be_the_first_text"]; ?>',
1166
  theme: 'snow',
1167
  debug: '<?php echo $this->general["loadComboVersion"] || $this->general["loadMinVersion"] ? 'error' : 'warn'; ?>'
1168
  };
1169
- <?php
1170
- return ob_get_clean();
1171
- }
1172
 
1173
- public function saveAndResetOptionsAndPhrases() {
1174
- if (!empty($_GET["wpd_wizard"]) && ($wizard = absint($_GET["wpd_wizard"])) && !empty($_POST)) {
1175
- check_admin_referer("wpd_wizard_form");
1176
- if ($wizard === 2) {
1177
- $forms = get_posts(["post_type" => "wpdiscuz_form", "post_status" => "publish", "posts_per_page" => -1,]);
1178
- foreach ($forms as $k => $form) {
1179
- $formMeta = get_post_meta($form->ID, "wpdiscuz_form_general_options", true);
1180
- $formMeta["layout"] = isset($_POST["layout"]) ? absint($_POST["layout"]) : 1;
1181
- update_post_meta($form->ID, "wpdiscuz_form_general_options", $formMeta);
1182
- }
1183
- $this->thread_styles["theme"] = isset($_POST["theme"]) ? trim($_POST["theme"]) : "wpd-default";
1184
- $this->updateOptions();
1185
- } else if ($wizard === 3) {
1186
- $this->live["enableBubble"] = isset($_POST["enableBubble"]) ? absint($_POST["enableBubble"]) : 0;
1187
- $this->live["bubbleLiveUpdate"] = isset($_POST["bubbleLiveUpdate"]) ? absint($_POST["bubbleLiveUpdate"]) : 0;
1188
- $this->live["bubbleLocation"] = isset($_POST["bubbleLocation"]) ? trim($_POST["bubbleLocation"]) : "content_left";
1189
- $this->updateOptions();
1190
- } else if ($wizard === 4) {
1191
- $forms = get_posts(["post_type" => "wpdiscuz_form", "post_status" => "publish", "posts_per_page" => -1,]);
1192
- foreach ($forms as $k => $form) {
1193
- $formMeta = get_post_meta($form->ID, "wpdiscuz_form_general_options", true);
1194
- $formMeta["enable_post_rating"] = isset($_POST["enable_post_rating"]) ? absint($_POST["enable_post_rating"]) : 1;
1195
- update_post_meta($form->ID, "wpdiscuz_form_general_options", $formMeta);
1196
- }
1197
- }
1198
- } else {
1199
- $this->resetOptions();
1200
- $this->saveOptions();
1201
- $this->savePhrases();
1202
- }
1203
- }
 
 
 
 
 
 
 
 
 
1204
 
1205
- public function saveOptions() {
1206
- if (isset($_POST["wc_submit_options"]) && !empty($_POST["wpd_tab"])) {
1207
- if (!current_user_can("manage_options")) {
1208
- die(esc_html_e("Hacker?", "wpdiscuz"));
1209
- }
1210
- check_admin_referer("wc_options_form-" . $_POST["wpd_tab"]);
1211
- if (self::TAB_FORM === $_POST["wpd_tab"]) {
1212
- $this->form["commentFormView"] = isset($_POST[self::TAB_FORM]["commentFormView"]) ? trim($_POST[self::TAB_FORM]["commentFormView"]) : "collapsed";
1213
- $this->form["enableDropAnimation"] = isset($_POST[self::TAB_FORM]["enableDropAnimation"]) ? absint($_POST[self::TAB_FORM]["enableDropAnimation"]) : 0;
1214
- $this->form["richEditor"] = isset($_POST[self::TAB_FORM]["richEditor"]) ? trim($_POST[self::TAB_FORM]["richEditor"]) : "desktop";
1215
- $this->form["boldButton"] = isset($_POST[self::TAB_FORM]["boldButton"]) ? intval($_POST[self::TAB_FORM]["boldButton"]) : 0;
1216
- $this->form["italicButton"] = isset($_POST[self::TAB_FORM]["italicButton"]) ? intval($_POST[self::TAB_FORM]["italicButton"]) : 0;
1217
- $this->form["underlineButton"] = isset($_POST[self::TAB_FORM]["underlineButton"]) ? intval($_POST[self::TAB_FORM]["underlineButton"]) : 0;
1218
- $this->form["strikeButton"] = isset($_POST[self::TAB_FORM]["strikeButton"]) ? intval($_POST[self::TAB_FORM]["strikeButton"]) : 0;
1219
- $this->form["olButton"] = isset($_POST[self::TAB_FORM]["olButton"]) ? intval($_POST[self::TAB_FORM]["olButton"]) : 0;
1220
- $this->form["ulButton"] = isset($_POST[self::TAB_FORM]["ulButton"]) ? intval($_POST[self::TAB_FORM]["ulButton"]) : 0;
1221
- $this->form["blockquoteButton"] = isset($_POST[self::TAB_FORM]["blockquoteButton"]) ? intval($_POST[self::TAB_FORM]["blockquoteButton"]) : 0;
1222
- $this->form["codeblockButton"] = isset($_POST[self::TAB_FORM]["codeblockButton"]) ? intval($_POST[self::TAB_FORM]["codeblockButton"]) : 0;
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;
1230
- } else if (self::TAB_RECAPTCHA === $_POST["wpd_tab"]) {
1231
- $this->recaptcha["siteKey"] = isset($_POST[self::TAB_RECAPTCHA]["siteKey"]) ? trim($_POST[self::TAB_RECAPTCHA]["siteKey"]) : "";
1232
- $this->recaptcha["secretKey"] = isset($_POST[self::TAB_RECAPTCHA]["secretKey"]) ? trim($_POST[self::TAB_RECAPTCHA]["secretKey"]) : "";
1233
- $this->recaptcha["theme"] = isset($_POST[self::TAB_RECAPTCHA]["theme"]) ? trim($_POST[self::TAB_RECAPTCHA]["theme"]) : "light";
1234
- $this->recaptcha["lang"] = isset($_POST[self::TAB_RECAPTCHA]["lang"]) ? trim($_POST[self::TAB_RECAPTCHA]["lang"]) : "";
1235
- $this->recaptcha["requestMethod"] = isset($_POST[self::TAB_RECAPTCHA]["requestMethod"]) ? trim($_POST[self::TAB_RECAPTCHA]["requestMethod"]) : "auto";
1236
- if (empty($_POST[self::TAB_RECAPTCHA]["useV3"])) {
1237
- if ($this->recaptcha["siteKey"] && $this->recaptcha["secretKey"]) {
1238
- $this->recaptcha["showForGuests"] = isset($_POST[self::TAB_RECAPTCHA]["showForGuests"]) ? absint($_POST[self::TAB_RECAPTCHA]["showForGuests"]) : 0;
1239
- $this->recaptcha["showForUsers"] = isset($_POST[self::TAB_RECAPTCHA]["showForUsers"]) ? absint($_POST[self::TAB_RECAPTCHA]["showForUsers"]) : 0;
1240
- $this->recaptcha["isShowOnSubscribeForm"] = isset($_POST[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) ? absint($_POST[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) : 0;
1241
- } else {
1242
- $this->recaptcha["showForGuests"] = 0;
1243
- $this->recaptcha["showForUsers"] = 0;
1244
- $this->recaptcha["isShowOnSubscribeForm"] = 0;
1245
- }
1246
- } else {
1247
- $this->recaptcha["showForGuests"] = isset($_POST[self::TAB_RECAPTCHA]["showForGuests"]) ? absint($_POST[self::TAB_RECAPTCHA]["showForGuests"]) : 0;
1248
- $this->recaptcha["showForUsers"] = isset($_POST[self::TAB_RECAPTCHA]["showForUsers"]) ? absint($_POST[self::TAB_RECAPTCHA]["showForUsers"]) : 0;
1249
- $this->recaptcha["isShowOnSubscribeForm"] = isset($_POST[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) ? absint($_POST[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) : 0;
1250
- }
1251
- } else if (self::TAB_LOGIN === $_POST["wpd_tab"]) {
1252
- $this->login["showLoggedInUsername"] = isset($_POST[self::TAB_LOGIN]["showLoggedInUsername"]) ? absint($_POST[self::TAB_LOGIN]["showLoggedInUsername"]) : 0;
1253
- $this->login["showLoginLinkForGuests"] = isset($_POST[self::TAB_LOGIN]["showLoginLinkForGuests"]) ? absint($_POST[self::TAB_LOGIN]["showLoginLinkForGuests"]) : 0;
1254
- $this->login["showActivityTab"] = isset($_POST[self::TAB_LOGIN]["showActivityTab"]) ? absint($_POST[self::TAB_LOGIN]["showActivityTab"]) : 0;
1255
- $this->login["showSubscriptionsTab"] = isset($_POST[self::TAB_LOGIN]["showSubscriptionsTab"]) ? absint($_POST[self::TAB_LOGIN]["showSubscriptionsTab"]) : 0;
1256
- $this->login["showFollowsTab"] = isset($_POST[self::TAB_LOGIN]["showFollowsTab"]) ? absint($_POST[self::TAB_LOGIN]["showFollowsTab"]) : 0;
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;
1264
- $this->social["displayIconOnAvatar"] = isset($_POST[self::TAB_SOCIAL]["displayIconOnAvatar"]) ? absint($_POST[self::TAB_SOCIAL]["displayIconOnAvatar"]) : 0;
1265
- // fb
1266
- $this->social["enableFbLogin"] = isset($_POST[self::TAB_SOCIAL]["enableFbLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableFbLogin"]) : 0;
1267
- $this->social["enableFbShare"] = isset($_POST[self::TAB_SOCIAL]["enableFbShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableFbShare"]) : 0;
1268
- $this->social["fbAppID"] = isset($_POST[self::TAB_SOCIAL]["fbAppID"]) ? trim($_POST[self::TAB_SOCIAL]["fbAppID"]) : "";
1269
- $this->social["fbAppSecret"] = isset($_POST[self::TAB_SOCIAL]["fbAppSecret"]) ? trim($_POST[self::TAB_SOCIAL]["fbAppSecret"]) : "";
1270
- $this->social["fbUseOAuth2"] = isset($_POST[self::TAB_SOCIAL]["fbUseOAuth2"]) ? absint($_POST[self::TAB_SOCIAL]["fbUseOAuth2"]) : 0;
1271
- // twitter
1272
- $this->social["enableTwitterLogin"] = isset($_POST[self::TAB_SOCIAL]["enableTwitterLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableTwitterLogin"]) : 0;
1273
- $this->social["enableTwitterShare"] = isset($_POST[self::TAB_SOCIAL]["enableTwitterShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableTwitterShare"]) : 0;
1274
- $this->social["twitterAppID"] = isset($_POST[self::TAB_SOCIAL]["twitterAppID"]) ? trim($_POST[self::TAB_SOCIAL]["twitterAppID"]) : "";
1275
- $this->social["twitterAppSecret"] = isset($_POST[self::TAB_SOCIAL]["twitterAppSecret"]) ? trim($_POST[self::TAB_SOCIAL]["twitterAppSecret"]) : "";
1276
- // google
1277
- $this->social["enableGoogleLogin"] = isset($_POST[self::TAB_SOCIAL]["enableGoogleLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableGoogleLogin"]) : 0;
1278
- $this->social["googleClientID"] = isset($_POST[self::TAB_SOCIAL]["googleClientID"]) ? trim($_POST[self::TAB_SOCIAL]["googleClientID"]) : "";
1279
- $this->social["googleClientSecret"] = isset($_POST[self::TAB_SOCIAL]["googleClientSecret"]) ? trim($_POST[self::TAB_SOCIAL]["googleClientSecret"]) : "";
1280
- // disqus
1281
- $this->social["enableDisqusLogin"] = isset($_POST[self::TAB_SOCIAL]["enableDisqusLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableDisqusLogin"]) : 0;
1282
- $this->social["disqusPublicKey"] = isset($_POST[self::TAB_SOCIAL]["disqusPublicKey"]) ? trim($_POST[self::TAB_SOCIAL]["disqusPublicKey"]) : "";
1283
- $this->social["disqusSecretKey"] = isset($_POST[self::TAB_SOCIAL]["disqusSecretKey"]) ? trim($_POST[self::TAB_SOCIAL]["disqusSecretKey"]) : "";
1284
- // wordpress
1285
- $this->social["enableWordpressLogin"] = isset($_POST[self::TAB_SOCIAL]["enableWordpressLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableWordpressLogin"]) : 0;
1286
- $this->social["wordpressClientID"] = isset($_POST[self::TAB_SOCIAL]["wordpressClientID"]) ? trim($_POST[self::TAB_SOCIAL]["wordpressClientID"]) : "";
1287
- $this->social["wordpressClientSecret"] = isset($_POST[self::TAB_SOCIAL]["wordpressClientSecret"]) ? trim($_POST[self::TAB_SOCIAL]["wordpressClientSecret"]) : "";
1288
- // instagram
1289
- $this->social["enableInstagramLogin"] = isset($_POST[self::TAB_SOCIAL]["enableInstagramLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableInstagramLogin"]) : 0;
1290
- $this->social["instagramAppID"] = isset($_POST[self::TAB_SOCIAL]["instagramAppID"]) ? trim($_POST[self::TAB_SOCIAL]["instagramAppID"]) : "";
1291
- $this->social["instagramAppSecret"] = isset($_POST[self::TAB_SOCIAL]["instagramAppSecret"]) ? trim($_POST[self::TAB_SOCIAL]["instagramAppSecret"]) : "";
1292
- // linkedin
1293
- $this->social["enableLinkedinLogin"] = isset($_POST[self::TAB_SOCIAL]["enableLinkedinLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableLinkedinLogin"]) : 0;
1294
- $this->social["linkedinClientID"] = isset($_POST[self::TAB_SOCIAL]["linkedinClientID"]) ? trim($_POST[self::TAB_SOCIAL]["linkedinClientID"]) : "";
1295
- $this->social["linkedinClientSecret"] = isset($_POST[self::TAB_SOCIAL]["linkedinClientSecret"]) ? trim($_POST[self::TAB_SOCIAL]["linkedinClientSecret"]) : "";
1296
- // whatsapp
1297
- $this->social["enableWhatsappShare"] = isset($_POST[self::TAB_SOCIAL]["enableWhatsappShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableWhatsappShare"]) : 0;
1298
- // yandex
1299
- $this->social["enableYandexLogin"] = isset($_POST[self::TAB_SOCIAL]["enableYandexLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableYandexLogin"]) : 0;
1300
- $this->social["yandexID"] = isset($_POST[self::TAB_SOCIAL]["yandexID"]) ? trim($_POST[self::TAB_SOCIAL]["yandexID"]) : "";
1301
- $this->social["yandexPassword"] = isset($_POST[self::TAB_SOCIAL]["yandexPassword"]) ? trim($_POST[self::TAB_SOCIAL]["yandexPassword"]) : "";
1302
- // mail.ru
1303
- $this->social["enableMailruLogin"] = isset($_POST[self::TAB_SOCIAL]["enableMailruLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableMailruLogin"]) : 0;
1304
- $this->social["mailruClientID"] = isset($_POST[self::TAB_SOCIAL]["mailruClientID"]) ? trim($_POST[self::TAB_SOCIAL]["mailruClientID"]) : "";
1305
- $this->social["mailruClientSecret"] = isset($_POST[self::TAB_SOCIAL]["mailruClientSecret"]) ? trim($_POST[self::TAB_SOCIAL]["mailruClientSecret"]) : "";
1306
- // weibo
1307
- $this->social["enableWeiboLogin"] = isset($_POST[self::TAB_SOCIAL]["enableWeiboLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableWeiboLogin"]) : 0;
1308
- $this->social["weiboKey"] = isset($_POST[self::TAB_SOCIAL]["weiboKey"]) ? trim($_POST[self::TAB_SOCIAL]["weiboKey"]) : "";
1309
- $this->social["weiboSecret"] = isset($_POST[self::TAB_SOCIAL]["weiboSecret"]) ? trim($_POST[self::TAB_SOCIAL]["weiboSecret"]) : "";
1310
- // wechat
1311
- $this->social["enableWechatLogin"] = isset($_POST[self::TAB_SOCIAL]["enableWechatLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableWechatLogin"]) : 0;
1312
- $this->social["wechatAppID"] = isset($_POST[self::TAB_SOCIAL]["wechatAppID"]) ? trim($_POST[self::TAB_SOCIAL]["wechatAppID"]) : "";
1313
- $this->social["wechatSecret"] = isset($_POST[self::TAB_SOCIAL]["wechatSecret"]) ? trim($_POST[self::TAB_SOCIAL]["wechatSecret"]) : "";
1314
- // qq
1315
- $this->social["enableQQLogin"] = isset($_POST[self::TAB_SOCIAL]["enableQQLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableQQLogin"]) : 0;
1316
- $this->social["qqAppID"] = isset($_POST[self::TAB_SOCIAL]["qqAppID"]) ? trim($_POST[self::TAB_SOCIAL]["qqAppID"]) : "";
1317
- $this->social["qqSecret"] = isset($_POST[self::TAB_SOCIAL]["qqSecret"]) ? trim($_POST[self::TAB_SOCIAL]["qqSecret"]) : "";
1318
- // baidu
1319
- $this->social["enableBaiduLogin"] = isset($_POST[self::TAB_SOCIAL]["enableBaiduLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableBaiduLogin"]) : 0;
1320
- $this->social["baiduAppID"] = isset($_POST[self::TAB_SOCIAL]["baiduAppID"]) ? trim($_POST[self::TAB_SOCIAL]["baiduAppID"]) : "";
1321
- $this->social["baiduSecret"] = isset($_POST[self::TAB_SOCIAL]["baiduSecret"]) ? trim($_POST[self::TAB_SOCIAL]["baiduSecret"]) : "";
1322
- // vk
1323
- $this->social["enableVkLogin"] = isset($_POST[self::TAB_SOCIAL]["enableVkLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableVkLogin"]) : 0;
1324
- $this->social["enableVkShare"] = isset($_POST[self::TAB_SOCIAL]["enableVkShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableVkShare"]) : 0;
1325
- $this->social["vkAppID"] = isset($_POST[self::TAB_SOCIAL]["vkAppID"]) ? trim($_POST[self::TAB_SOCIAL]["vkAppID"]) : "";
1326
- $this->social["vkAppSecret"] = isset($_POST[self::TAB_SOCIAL]["vkAppSecret"]) ? trim($_POST[self::TAB_SOCIAL]["vkAppSecret"]) : "";
1327
- // ok
1328
- $this->social["enableOkLogin"] = isset($_POST[self::TAB_SOCIAL]["enableOkLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableOkLogin"]) : 0;
1329
- $this->social["enableOkShare"] = isset($_POST[self::TAB_SOCIAL]["enableOkShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableOkShare"]) : 0;
1330
- $this->social["okAppID"] = isset($_POST[self::TAB_SOCIAL]["okAppID"]) ? trim($_POST[self::TAB_SOCIAL]["okAppID"]) : "";
1331
- $this->social["okAppKey"] = isset($_POST[self::TAB_SOCIAL]["okAppKey"]) ? trim($_POST[self::TAB_SOCIAL]["okAppKey"]) : "";
1332
- $this->social["okAppSecret"] = isset($_POST[self::TAB_SOCIAL]["okAppSecret"]) ? trim($_POST[self::TAB_SOCIAL]["okAppSecret"]) : "";
1333
- } else if (self::TAB_RATING === $_POST["wpd_tab"]) {
1334
- $this->rating["enablePostRatingSchema"] = isset($_POST[self::TAB_RATING]["enablePostRatingSchema"]) ? absint($_POST[self::TAB_RATING]["enablePostRatingSchema"]) : 0;
1335
- $this->rating["displayRatingOnPost"] = isset($_POST[self::TAB_RATING]["displayRatingOnPost"]) ? $_POST[self::TAB_RATING]["displayRatingOnPost"] : [];
1336
- $this->rating["ratingCssOnNoneSingular"] = isset($_POST[self::TAB_RATING]["ratingCssOnNoneSingular"]) ? absint($_POST[self::TAB_RATING]["ratingCssOnNoneSingular"]) : 0;
1337
- $this->rating["ratingHoverColor"] = isset($_POST[self::TAB_RATING]["ratingHoverColor"]) ? $_POST[self::TAB_RATING]["ratingHoverColor"] : "#FFED85";
1338
- $this->rating["ratingInactiveColor"] = isset($_POST[self::TAB_RATING]["ratingInactiveColor"]) ? $_POST[self::TAB_RATING]["ratingInactiveColor"] : "#DDDDDD";
1339
- $this->rating["ratingActiveColor"] = isset($_POST[self::TAB_RATING]["ratingActiveColor"]) ? $_POST[self::TAB_RATING]["ratingActiveColor"] : "#FFD700";
1340
- } else if (self::TAB_THREAD_DISPLAY === $_POST["wpd_tab"]) {
1341
- $this->thread_display["firstLoadWithAjax"] = isset($_POST[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"]) : 0;
1342
- $this->thread_display["commentListLoadType"] = isset($_POST[self::TAB_THREAD_DISPLAY]["commentListLoadType"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["commentListLoadType"]) : 0;
1343
- $this->thread_display["isLoadOnlyParentComments"] = isset($_POST[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"]) : 0;
1344
- $this->thread_display["showReactedFilterButton"] = isset($_POST[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"]) : 0;
1345
- $this->thread_display["showHottestFilterButton"] = isset($_POST[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"]) : 0;
1346
- $this->thread_display["showSortingButtons"] = isset($_POST[self::TAB_THREAD_DISPLAY]["showSortingButtons"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["showSortingButtons"]) : 0;
1347
- $this->thread_display["mostVotedByDefault"] = isset($_POST[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"]) : 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;
1355
- $this->thread_layouts["showVotingButtons"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showVotingButtons"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showVotingButtons"]) : 0;
1356
- $this->thread_layouts["votingButtonsIcon"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"]) ? $_POST[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"] : "fa-plus|fa-minus";
1357
- $this->thread_layouts["votingButtonsStyle"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"]) : 0;
1358
- $this->thread_layouts["enableDislikeButton"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"]) : 0;
1359
- $this->thread_layouts["isGuestCanVote"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"]) : 0;
1360
- $this->thread_layouts["highlightVotingButtons"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"]) : 0;
1361
- $this->thread_layouts["showAvatars"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showAvatars"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showAvatars"]) : 0;
1362
- $this->thread_layouts["defaultAvatarUrlForUser"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"]) ? trim($_POST[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"]) : "";
1363
- $this->thread_layouts["defaultAvatarUrlForGuest"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"]) ? trim($_POST[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"]) : "";
1364
- $this->thread_layouts["changeAvatarsEverywhere"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"]) : 0;
1365
- } else if (self::TAB_THREAD_STYLES === $_POST["wpd_tab"]) {
1366
- $this->thread_styles["theme"] = isset($_POST[self::TAB_THREAD_STYLES]["theme"]) ? trim($_POST[self::TAB_THREAD_STYLES]["theme"]) : "wpd-default";
1367
- $this->thread_styles["primaryColor"] = isset($_POST[self::TAB_THREAD_STYLES]["primaryColor"]) ? $_POST[self::TAB_THREAD_STYLES]["primaryColor"] : "#00B38F";
1368
- $this->thread_styles["newLoadedCommentBGColor"] = isset($_POST[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"]) ? $_POST[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"] : "#FFFAD6";
1369
- $this->thread_styles["primaryButtonColor"] = isset($_POST[self::TAB_THREAD_STYLES]["primaryButtonColor"]) ? $_POST[self::TAB_THREAD_STYLES]["primaryButtonColor"] : "#FFFFFF";
1370
- $this->thread_styles["primaryButtonBG"] = isset($_POST[self::TAB_THREAD_STYLES]["primaryButtonBG"]) ? $_POST[self::TAB_THREAD_STYLES]["primaryButtonBG"] : "#07B290";
1371
- $this->thread_styles["bubbleColors"] = isset($_POST[self::TAB_THREAD_STYLES]["bubbleColors"]) ? $_POST[self::TAB_THREAD_STYLES]["bubbleColors"] : "#1DB99A";
1372
- $this->thread_styles["inlineFeedbackColors"] = isset($_POST[self::TAB_THREAD_STYLES]["inlineFeedbackColors"]) ? $_POST[self::TAB_THREAD_STYLES]["inlineFeedbackColors"] : "#1DB99A";
1373
- $this->thread_styles["defaultCommentAreaBG"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"]) ? $_POST[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"] : "";
1374
- $this->thread_styles["defaultCommentTextColor"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentTextColor"]) ? $_POST[self::TAB_THREAD_STYLES]["defaultCommentTextColor"] : "#777777";
1375
- $this->thread_styles["defaultCommentFieldsBG"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"]) ? $_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"] : "";
1376
- $this->thread_styles["defaultCommentFieldsBorderColor"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"]) ? $_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"] : "#DDDDDD";
1377
- $this->thread_styles["defaultCommentFieldsTextColor"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"]) ? $_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"] : "#777777";
1378
- $this->thread_styles["defaultCommentFieldsPlaceholderColor"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"]) ? $_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"] : "";
1379
- $this->thread_styles["darkCommentAreaBG"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentAreaBG"]) ? $_POST[self::TAB_THREAD_STYLES]["darkCommentAreaBG"] : "#111111";
1380
- $this->thread_styles["darkCommentTextColor"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentTextColor"]) ? $_POST[self::TAB_THREAD_STYLES]["darkCommentTextColor"] : "#CCCCCC";
1381
- $this->thread_styles["darkCommentFieldsBG"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"]) ? $_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"] : "#999999";
1382
- $this->thread_styles["darkCommentFieldsBorderColor"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"]) ? $_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"] : "#D1D1D1";
1383
- $this->thread_styles["darkCommentFieldsTextColor"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"]) ? $_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"] : "#000000";
1384
- $this->thread_styles["darkCommentFieldsPlaceholderColor"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"]) ? $_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"] : "#DDDDDD";
1385
- $this->thread_styles["commentTextSize"] = isset($_POST[self::TAB_THREAD_STYLES]["commentTextSize"]) ? $_POST[self::TAB_THREAD_STYLES]["commentTextSize"] : "14px";
1386
- $this->thread_styles["enableFontAwesome"] = isset($_POST[self::TAB_THREAD_STYLES]["enableFontAwesome"]) ? absint($_POST[self::TAB_THREAD_STYLES]["enableFontAwesome"]) : 0;
1387
- $this->thread_styles["customCss"] = isset($_POST[self::TAB_THREAD_STYLES]["customCss"]) ? $_POST[self::TAB_THREAD_STYLES]["customCss"] : ".comments-area{width:auto;}";
1388
- } else if (self::TAB_SUBSCRIPTION === $_POST["wpd_tab"]) {
1389
- $this->subscription["enableUserMentioning"] = isset($_POST[self::TAB_SUBSCRIPTION]["enableUserMentioning"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["enableUserMentioning"]) : 0;
1390
- $this->subscription["sendMailToMentionedUsers"] = isset($_POST[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"]) : 0;
1391
- $this->subscription["isNotifyOnCommentApprove"] = isset($_POST[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"]) : 0;
1392
- $this->subscription["enableMemberConfirm"] = isset($_POST[self::TAB_SUBSCRIPTION]["enableMemberConfirm"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["enableMemberConfirm"]) : 0;
1393
- $this->subscription["enableGuestsConfirm"] = isset($_POST[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"]) : 0;
1394
- $this->subscription["subscriptionType"] = isset($_POST[self::TAB_SUBSCRIPTION]["subscriptionType"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["subscriptionType"]) : 1;
1395
- $this->subscription["showReplyCheckbox"] = isset($_POST[self::TAB_SUBSCRIPTION]["showReplyCheckbox"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["showReplyCheckbox"]) : 0;
1396
- $this->subscription["isReplyDefaultChecked"] = isset($_POST[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"]) : 0;
1397
- $this->subscription["usePostmaticForCommentNotification"] = isset($_POST[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"]) : 0;
1398
- $this->subscription["isFollowActive"] = isset($_POST[self::TAB_SUBSCRIPTION]["isFollowActive"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["isFollowActive"]) : 0;
1399
- $this->subscription["disableFollowConfirmForUsers"] = isset($_POST[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"]) : 0;
1400
- } else if (self::TAB_LABELS === $_POST["wpd_tab"]) {
1401
- $emptyRolesArray = array_combine(array_keys($this->labels["blogRoleLabels"]), array_pad([], count($this->labels["blogRoleLabels"]), 0));
1402
- $this->labels["blogRoleLabels"] = isset($_POST[self::TAB_LABELS]["blogRoleLabels"]) ? wp_parse_args($_POST[self::TAB_LABELS]["blogRoleLabels"], $emptyRolesArray) : $emptyRolesArray;
1403
- $this->labels["blogRoles"] = isset($_POST[self::TAB_LABELS]["blogRoles"]) ? wp_parse_args($_POST[self::TAB_LABELS]["blogRoles"], $this->labels["blogRoles"]) : $this->labels["blogRoles"];
1404
- } else if (self::TAB_MODERATION === $_POST["wpd_tab"]) {
1405
- $this->moderation["commentEditableTime"] = isset($_POST[self::TAB_MODERATION]["commentEditableTime"]) ? $_POST[self::TAB_MODERATION]["commentEditableTime"] : 900;
1406
- $this->moderation["enableEditingWhenHaveReplies"] = isset($_POST[self::TAB_MODERATION]["enableEditingWhenHaveReplies"]) ? absint($_POST[self::TAB_MODERATION]["enableEditingWhenHaveReplies"]) : 0;
1407
- $this->moderation["displayEditingInfo"] = isset($_POST[self::TAB_MODERATION]["displayEditingInfo"]) ? absint($_POST[self::TAB_MODERATION]["displayEditingInfo"]) : 0;
1408
- $this->moderation["enableStickButton"] = isset($_POST[self::TAB_MODERATION]["enableStickButton"]) ? absint($_POST[self::TAB_MODERATION]["enableStickButton"]) : 0;
1409
- $this->moderation["enableCloseButton"] = isset($_POST[self::TAB_MODERATION]["enableCloseButton"]) ? absint($_POST[self::TAB_MODERATION]["enableCloseButton"]) : 0;
1410
- $this->moderation["restrictCommentingPerUser"] = isset($_POST[self::TAB_MODERATION]["restrictCommentingPerUser"]) ? trim($_POST[self::TAB_MODERATION]["restrictCommentingPerUser"]) : "disable";
1411
- $this->moderation["commentRestrictionType"] = isset($_POST[self::TAB_MODERATION]["commentRestrictionType"]) ? trim($_POST[self::TAB_MODERATION]["commentRestrictionType"]) : "both";
1412
- $this->moderation["userCommentsLimit"] = isset($_POST[self::TAB_MODERATION]["userCommentsLimit"]) ? absint($_POST[self::TAB_MODERATION]["userCommentsLimit"]) : 1;
1413
- } else if (self::TAB_CONTENT === $_POST["wpd_tab"]) {
1414
- $this->content["commentTextMinLength"] = isset($_POST[self::TAB_CONTENT]["commentTextMinLength"]) && absint($_POST[self::TAB_CONTENT]["commentTextMinLength"]) > 0 ? absint($_POST[self::TAB_CONTENT]["commentTextMinLength"]) : 1;
1415
- $this->content["commentTextMaxLength"] = isset($_POST[self::TAB_CONTENT]["commentTextMaxLength"]) && absint($_POST[self::TAB_CONTENT]["commentTextMaxLength"]) > 0 ? absint($_POST[self::TAB_CONTENT]["commentTextMaxLength"]) : "";
1416
- $this->content["enableImageConversion"] = isset($_POST[self::TAB_CONTENT]["enableImageConversion"]) ? absint($_POST[self::TAB_CONTENT]["enableImageConversion"]) : 0;
1417
- $this->content["enableShortcodes"] = isset($_POST[self::TAB_CONTENT]["enableShortcodes"]) ? absint($_POST[self::TAB_CONTENT]["enableShortcodes"]) : 0;
1418
- $this->content["commentReadMoreLimit"] = isset($_POST[self::TAB_CONTENT]["commentReadMoreLimit"]) && absint($_POST[self::TAB_CONTENT]["commentReadMoreLimit"]) >= 0 ? absint($_POST[self::TAB_CONTENT]["commentReadMoreLimit"]) : 0;
1419
- $this->content["wmuIsEnabled"] = isset($_POST[self::TAB_CONTENT]["wmuIsEnabled"]) ? absint($_POST[self::TAB_CONTENT]["wmuIsEnabled"]) : 0;
1420
- $this->content["wmuIsGuestAllowed"] = isset($_POST[self::TAB_CONTENT]["wmuIsGuestAllowed"]) ? absint($_POST[self::TAB_CONTENT]["wmuIsGuestAllowed"]) : 0;
1421
- $this->content["wmuIsLightbox"] = isset($_POST[self::TAB_CONTENT]["wmuIsLightbox"]) ? absint($_POST[self::TAB_CONTENT]["wmuIsLightbox"]) : 0;
1422
- $this->content["wmuMimeTypes"] = isset($_POST[self::TAB_CONTENT]["wmuMimeTypes"]) ? $_POST[self::TAB_CONTENT]["wmuMimeTypes"] : [];
1423
- $this->content["wmuMaxFileSize"] = isset($_POST[self::TAB_CONTENT]["wmuMaxFileSize"]) ? $_POST[self::TAB_CONTENT]["wmuMaxFileSize"] : $this->wmuUploadMaxFileSize / (1024 * 1024);
1424
- $this->content["wmuIsShowFilesDashboard"] = isset($_POST[self::TAB_CONTENT]["wmuIsShowFilesDashboard"]) ? absint($_POST[self::TAB_CONTENT]["wmuIsShowFilesDashboard"]) : 0;
1425
- $this->content["wmuSingleImageWidth"] = isset($_POST[self::TAB_CONTENT]["wmuSingleImageWidth"]) && ($v = trim($_POST[self::TAB_CONTENT]["wmuSingleImageWidth"])) && ($v === "auto" || ($v = absint($v))) ? $v : 320;
1426
- $this->content["wmuSingleImageHeight"] = isset($_POST[self::TAB_CONTENT]["wmuSingleImageHeight"]) && ($v = trim($_POST[self::TAB_CONTENT]["wmuSingleImageHeight"])) && ($v === "auto" || ($v = absint($v))) ? $v : 200;
1427
- $this->content["wmuImageSizes"] = isset($_POST[self::TAB_CONTENT]["wmuImageSizes"]) && is_array($_POST[self::TAB_CONTENT]["wmuImageSizes"]) && ($sizes = array_filter($_POST[self::TAB_CONTENT]["wmuImageSizes"])) ? $sizes : [];
1428
- } else if (self::TAB_LIVE === $_POST["wpd_tab"]) {
1429
- $this->live["enableBubble"] = isset($_POST[self::TAB_LIVE]["enableBubble"]) ? absint($_POST[self::TAB_LIVE]["enableBubble"]) : 0;
1430
- $this->live["bubbleLiveUpdate"] = isset($_POST[self::TAB_LIVE]["bubbleLiveUpdate"]) ? absint($_POST[self::TAB_LIVE]["bubbleLiveUpdate"]) : 0;
1431
- $this->live["bubbleLocation"] = isset($_POST[self::TAB_LIVE]["bubbleLocation"]) ? trim($_POST[self::TAB_LIVE]["bubbleLocation"]) : "content_left";
1432
- $this->live["bubbleShowNewCommentMessage"] = isset($_POST[self::TAB_LIVE]["bubbleShowNewCommentMessage"]) ? absint($_POST[self::TAB_LIVE]["bubbleShowNewCommentMessage"]) : 0;
1433
- $this->live["bubbleHintTimeout"] = isset($_POST[self::TAB_LIVE]["bubbleHintTimeout"]) ? absint($_POST[self::TAB_LIVE]["bubbleHintTimeout"]) : 0;
1434
- $this->live["bubbleHintHideTimeout"] = isset($_POST[self::TAB_LIVE]["bubbleHintHideTimeout"]) ? absint($_POST[self::TAB_LIVE]["bubbleHintHideTimeout"]) : 0;
1435
- $this->live["commentListUpdateType"] = isset($_POST[self::TAB_LIVE]["commentListUpdateType"]) ? absint($_POST[self::TAB_LIVE]["commentListUpdateType"]) : 0;
1436
- $this->live["liveUpdateGuests"] = isset($_POST[self::TAB_LIVE]["liveUpdateGuests"]) ? absint($_POST[self::TAB_LIVE]["liveUpdateGuests"]) : 0;
1437
- $this->live["commentListUpdateTimer"] = isset($_POST[self::TAB_LIVE]["commentListUpdateTimer"]) ? absint($_POST[self::TAB_LIVE]["commentListUpdateTimer"]) : 30;
1438
- } else if (self::TAB_INLINE === $_POST["wpd_tab"]) {
1439
- $this->inline["showInlineFilterButton"] = isset($_POST[self::TAB_INLINE]["showInlineFilterButton"]) ? absint($_POST[self::TAB_INLINE]["showInlineFilterButton"]) : 0;
1440
- $this->inline["inlineFeedbackAttractionType"] = isset($_POST[self::TAB_INLINE]["inlineFeedbackAttractionType"]) ? trim($_POST[self::TAB_INLINE]["inlineFeedbackAttractionType"]) : "disable";
1441
- } else if (self::TAB_GENERAL === $_POST["wpd_tab"]) {
1442
- $this->general["isEnableOnHome"] = isset($_POST[self::TAB_GENERAL]["isEnableOnHome"]) ? absint($_POST[self::TAB_GENERAL]["isEnableOnHome"]) : 0;
1443
- $this->general["isNativeAjaxEnabled"] = isset($_POST[self::TAB_GENERAL]["isNativeAjaxEnabled"]) ? absint($_POST[self::TAB_GENERAL]["isNativeAjaxEnabled"]) : 0;
1444
- $this->general["loadComboVersion"] = isset($_POST[self::TAB_GENERAL]["loadComboVersion"]) ? absint($_POST[self::TAB_GENERAL]["loadComboVersion"]) : 0;
1445
- $this->general["loadMinVersion"] = isset($_POST[self::TAB_GENERAL]["loadMinVersion"]) ? absint($_POST[self::TAB_GENERAL]["loadMinVersion"]) : 0;
1446
- $this->general["commentLinkFilter"] = isset($_POST[self::TAB_GENERAL]["commentLinkFilter"]) ? absint($_POST[self::TAB_GENERAL]["commentLinkFilter"]) : 1;
1447
- $this->general["simpleCommentDate"] = isset($_POST[self::TAB_GENERAL]["simpleCommentDate"]) ? absint($_POST[self::TAB_GENERAL]["simpleCommentDate"]) : 0;
1448
- $this->general["dateDiffFormat"] = isset($_POST[self::TAB_GENERAL]["dateDiffFormat"]) ? trim($_POST[self::TAB_GENERAL]["dateDiffFormat"]) : "";
1449
- $this->general["isUsePoMo"] = isset($_POST[self::TAB_GENERAL]["isUsePoMo"]) ? absint($_POST[self::TAB_GENERAL]["isUsePoMo"]) : 0;
1450
- $this->general["showPluginPoweredByLink"] = isset($_POST[self::TAB_GENERAL]["showPluginPoweredByLink"]) ? absint($_POST[self::TAB_GENERAL]["showPluginPoweredByLink"]) : 0;
1451
- $this->general["isGravatarCacheEnabled"] = isset($_POST[self::TAB_GENERAL]["isGravatarCacheEnabled"]) ? absint($_POST[self::TAB_GENERAL]["isGravatarCacheEnabled"]) : 0;
1452
- $this->general["gravatarCacheMethod"] = isset($_POST[self::TAB_GENERAL]["gravatarCacheMethod"]) ? trim($_POST[self::TAB_GENERAL]["gravatarCacheMethod"]) : "cronjob";
1453
- $this->general["gravatarCacheTimeout"] = isset($_POST[self::TAB_GENERAL]["gravatarCacheTimeout"]) ? absint($_POST[self::TAB_GENERAL]["gravatarCacheTimeout"]) : 10;
1454
- $this->general["redirectPage"] = isset($_POST[self::TAB_GENERAL]["redirectPage"]) ? absint($_POST[self::TAB_GENERAL]["redirectPage"]) : 0;
1455
- }
1456
- do_action("wpdiscuz_save_options");
1457
- $this->updateOptions();
1458
- }
1459
- }
 
 
 
1460
 
1461
- public function savePhrases() {
1462
- if (isset($_POST["wc_submit_phrases"])) {
1463
- if (!current_user_can("manage_options")) {
1464
- die(esc_html_e("Hacker?", "wpdiscuz"));
1465
- }
1466
- check_admin_referer("wc_phrases_form");
1467
- $this->phrases["wc_be_the_first_text"] = esc_attr($_POST["wc_be_the_first_text"]);
1468
- $this->phrases["wc_comment_start_text"] = esc_attr($_POST["wc_comment_start_text"]);
1469
- $this->phrases["wc_comment_join_text"] = esc_attr($_POST["wc_comment_join_text"]);
1470
- $this->phrases["wc_content_and_settings"] = esc_attr($_POST["wc_content_and_settings"]);
1471
- $this->phrases["wc_hottest_comment_thread"] = esc_attr($_POST["wc_hottest_comment_thread"]);
1472
- $this->phrases["wc_most_reacted_comment"] = esc_attr($_POST["wc_most_reacted_comment"]);
1473
- $this->phrases["wc_inline_comments"] = esc_attr($_POST["wc_inline_comments"]);
1474
- $this->phrases["wc_email_text"] = esc_attr($_POST["wc_email_text"]);
1475
- $this->phrases["wc_subscribe_anchor"] = esc_attr($_POST["wc_subscribe_anchor"]);
1476
- $this->phrases["wc_notify_of"] = esc_attr($_POST["wc_notify_of"]);
1477
- $this->phrases["wc_notify_on_new_comment"] = esc_attr($_POST["wc_notify_on_new_comment"]);
1478
- $this->phrases["wc_notify_on_all_new_reply"] = esc_attr($_POST["wc_notify_on_all_new_reply"]);
1479
- $this->phrases["wc_notify_on_new_reply"] = esc_attr($_POST["wc_notify_on_new_reply"]);
1480
- $this->phrases["wc_sort_by"] = esc_attr($_POST["wc_sort_by"]);
1481
- $this->phrases["wc_newest"] = esc_attr($_POST["wc_newest"]);
1482
- $this->phrases["wc_oldest"] = esc_attr($_POST["wc_oldest"]);
1483
- $this->phrases["wc_most_voted"] = esc_attr($_POST["wc_most_voted"]);
1484
- $this->phrases["wc_load_more_submit_text"] = esc_attr($_POST["wc_load_more_submit_text"]);
1485
- $this->phrases["wc_load_rest_comments_submit_text"] = esc_attr($_POST["wc_load_rest_comments_submit_text"]);
1486
- $this->phrases["wc_reply_text"] = esc_attr($_POST["wc_reply_text"]);
1487
- $this->phrases["wc_share_text"] = esc_attr($_POST["wc_share_text"]);
1488
- $this->phrases["wc_edit_text"] = esc_attr($_POST["wc_edit_text"]);
1489
- $this->phrases["wc_share_facebook"] = esc_attr($_POST["wc_share_facebook"]);
1490
- $this->phrases["wc_share_twitter"] = esc_attr($_POST["wc_share_twitter"]);
1491
- $this->phrases["wc_share_whatsapp"] = esc_attr($_POST["wc_share_whatsapp"]);
1492
- $this->phrases["wc_share_vk"] = esc_attr($_POST["wc_share_vk"]);
1493
- $this->phrases["wc_share_ok"] = esc_attr($_POST["wc_share_ok"]);
1494
- $this->phrases["wc_hide_replies_text"] = esc_attr($_POST["wc_hide_replies_text"]);
1495
- $this->phrases["wc_show_replies_text"] = esc_attr($_POST["wc_show_replies_text"]);
1496
- $this->phrases["wc_email_subject"] = esc_attr($_POST["wc_email_subject"]);
1497
- $this->phrases["wc_email_message"] = wpautop($_POST["wc_email_message"]);
1498
- $this->phrases["wc_all_comment_new_reply_subject"] = esc_attr($_POST["wc_all_comment_new_reply_subject"]);
1499
- $this->phrases["wc_all_comment_new_reply_message"] = wpautop($_POST["wc_all_comment_new_reply_message"]);
1500
- $this->phrases["wc_new_reply_email_subject"] = esc_attr($_POST["wc_new_reply_email_subject"]);
1501
- $this->phrases["wc_new_reply_email_message"] = wpautop($_POST["wc_new_reply_email_message"]);
1502
- $this->phrases["wc_subscribed_on_comment"] = esc_attr($_POST["wc_subscribed_on_comment"]);
1503
- $this->phrases["wc_subscribed_on_all_comment"] = esc_attr($_POST["wc_subscribed_on_all_comment"]);
1504
- $this->phrases["wc_subscribed_on_post"] = esc_attr($_POST["wc_subscribed_on_post"]);
1505
- $this->phrases["wc_unsubscribe"] = esc_attr($_POST["wc_unsubscribe"]);
1506
- $this->phrases["wc_ignore_subscription"] = esc_attr($_POST["wc_ignore_subscription"]);
1507
- $this->phrases["wc_unsubscribe_message"] = esc_attr($_POST["wc_unsubscribe_message"]);
1508
- $this->phrases["wc_subscribe_message"] = esc_attr($_POST["wc_subscribe_message"]);
1509
- $this->phrases["wc_confirm_email"] = esc_attr($_POST["wc_confirm_email"]);
1510
- $this->phrases["wc_comfirm_success_message"] = esc_attr($_POST["wc_comfirm_success_message"]);
1511
- $this->phrases["wc_confirm_email_subject"] = esc_attr($_POST["wc_confirm_email_subject"]);
1512
- $this->phrases["wc_confirm_email_message"] = wpautop($_POST["wc_confirm_email_message"]);
1513
- $this->phrases["wc_error_empty_text"] = esc_attr($_POST["wc_error_empty_text"]);
1514
- $this->phrases["wc_error_email_text"] = esc_attr($_POST["wc_error_email_text"]);
1515
- $this->phrases["wc_error_url_text"] = esc_attr($_POST["wc_error_url_text"]);
1516
- $this->phrases["wc_year_text"] = esc_attr($_POST["wc_year_text"]);
1517
- $this->phrases["wc_year_text_plural"] = esc_attr($_POST["wc_year_text_plural"]);
1518
- $this->phrases["wc_month_text"] = esc_attr($_POST["wc_month_text"]);
1519
- $this->phrases["wc_month_text_plural"] = esc_attr($_POST["wc_month_text_plural"]);
1520
- $this->phrases["wc_day_text"] = esc_attr($_POST["wc_day_text"]);
1521
- $this->phrases["wc_day_text_plural"] = esc_attr($_POST["wc_day_text_plural"]);
1522
- $this->phrases["wc_hour_text"] = esc_attr($_POST["wc_hour_text"]);
1523
- $this->phrases["wc_hour_text_plural"] = esc_attr($_POST["wc_hour_text_plural"]);
1524
- $this->phrases["wc_minute_text"] = esc_attr($_POST["wc_minute_text"]);
1525
- $this->phrases["wc_minute_text_plural"] = esc_attr($_POST["wc_minute_text_plural"]);
1526
- $this->phrases["wc_second_text"] = esc_attr($_POST["wc_second_text"]);
1527
- $this->phrases["wc_second_text_plural"] = esc_attr($_POST["wc_second_text_plural"]);
1528
- $this->phrases["wc_right_now_text"] = esc_attr($_POST["wc_right_now_text"]);
1529
- $this->phrases["wc_ago_text"] = esc_attr($_POST["wc_ago_text"]);
1530
- $this->phrases["wc_you_must_be_text"] = esc_attr($_POST["wc_you_must_be_text"]);
1531
- $this->phrases["wc_logged_in_as"] = esc_attr($_POST["wc_logged_in_as"]);
1532
- $this->phrases["wc_log_out"] = esc_attr($_POST["wc_log_out"]);
1533
- $this->phrases["wc_log_in"] = esc_attr($_POST["wc_log_in"]);
1534
- $this->phrases["wc_login_please"] = esc_attr($_POST["wc_login_please"]);
1535
- $this->phrases["wc_logged_in_text"] = esc_attr($_POST["wc_logged_in_text"]);
1536
- $this->phrases["wc_to_post_comment_text"] = esc_attr($_POST["wc_to_post_comment_text"]);
1537
- $this->phrases["wc_vote_counted"] = esc_attr($_POST["wc_vote_counted"]);
1538
- $this->phrases["wc_vote_up"] = esc_attr($_POST["wc_vote_up"]);
1539
- $this->phrases["wc_vote_down"] = esc_attr($_POST["wc_vote_down"]);
1540
- $this->phrases["wc_awaiting_for_approval"] = esc_attr($_POST["wc_awaiting_for_approval"]);
1541
- $this->phrases["wc_vote_only_one_time"] = esc_attr($_POST["wc_vote_only_one_time"]);
1542
- $this->phrases["wc_voting_error"] = esc_attr($_POST["wc_voting_error"]);
1543
- $this->phrases["wc_self_vote"] = esc_attr($_POST["wc_self_vote"]);
1544
- $this->phrases["wc_deny_voting_from_same_ip"] = esc_attr($_POST["wc_deny_voting_from_same_ip"]);
1545
- $this->phrases["wc_login_to_vote"] = esc_attr($_POST["wc_login_to_vote"]);
1546
- $this->phrases["wc_invalid_captcha"] = esc_attr($_POST["wc_invalid_captcha"]);
1547
- $this->phrases["wc_invalid_field"] = esc_attr($_POST["wc_invalid_field"]);
1548
- $this->phrases["wc_comment_not_updated"] = esc_attr($_POST["wc_comment_not_updated"]);
1549
- $this->phrases["wc_comment_edit_not_possible"] = esc_attr($_POST["wc_comment_edit_not_possible"]);
1550
- $this->phrases["wc_comment_not_edited"] = esc_attr($_POST["wc_comment_not_edited"]);
1551
- $this->phrases["wc_comment_edit_save_button"] = esc_attr($_POST["wc_comment_edit_save_button"]);
1552
- $this->phrases["wc_comment_edit_cancel_button"] = esc_attr($_POST["wc_comment_edit_cancel_button"]);
1553
- $this->phrases["wc_msg_input_min_length"] = esc_attr($_POST["wc_msg_input_min_length"]);
1554
- $this->phrases["wc_msg_input_max_length"] = esc_attr($_POST["wc_msg_input_max_length"]);
1555
- $this->phrases["wc_read_more"] = esc_attr($_POST["wc_read_more"]);
1556
- $this->phrases["wc_anonymous"] = esc_attr($_POST["wc_anonymous"]);
1557
- $this->phrases["wc_msg_required_fields"] = esc_attr($_POST["wc_msg_required_fields"]);
1558
- $this->phrases["wc_connect_with"] = esc_attr($_POST["wc_connect_with"]);
1559
- $this->phrases["wc_subscribed_to"] = esc_attr($_POST["wc_subscribed_to"]);
1560
- $this->phrases["wc_form_subscription_submit"] = esc_attr($_POST["wc_form_subscription_submit"]);
1561
- $this->phrases["wc_comment_approved_email_subject"] = esc_attr($_POST["wc_comment_approved_email_subject"]);
1562
- $this->phrases["wc_comment_approved_email_message"] = wpautop($_POST["wc_comment_approved_email_message"]);
1563
- $this->phrases["wc_roles_cannot_comment_message"] = esc_attr($_POST["wc_roles_cannot_comment_message"]);
1564
- $this->phrases["wc_stick_comment_btn_title"] = esc_attr($_POST["wc_stick_comment_btn_title"]);
1565
- $this->phrases["wc_stick_comment"] = esc_attr($_POST["wc_stick_comment"]);
1566
- $this->phrases["wc_unstick_comment"] = esc_attr($_POST["wc_unstick_comment"]);
1567
- $this->phrases["wc_sticky_comment_icon_title"] = esc_attr($_POST["wc_sticky_comment_icon_title"]);
1568
- $this->phrases["wc_close_comment_btn_title"] = esc_attr($_POST["wc_close_comment_btn_title"]);
1569
- $this->phrases["wc_close_comment"] = esc_attr($_POST["wc_close_comment"]);
1570
- $this->phrases["wc_open_comment"] = esc_attr($_POST["wc_open_comment"]);
1571
- $this->phrases["wc_closed_comment_icon_title"] = esc_attr($_POST["wc_closed_comment_icon_title"]);
1572
- $this->phrases["wc_social_login_agreement_label"] = esc_attr($_POST["wc_social_login_agreement_label"]);
1573
- $this->phrases["wc_social_login_agreement_desc"] = esc_attr($_POST["wc_social_login_agreement_desc"]);
1574
- $this->phrases["wc_agreement_button_disagree"] = esc_attr($_POST["wc_agreement_button_disagree"]);
1575
- $this->phrases["wc_agreement_button_agree"] = esc_attr($_POST["wc_agreement_button_agree"]);
1576
- $this->phrases["wc_content_and_settings"] = esc_attr($_POST["wc_content_and_settings"]);
1577
- $this->phrases["wc_user_settings_activity"] = esc_attr($_POST["wc_user_settings_activity"]);
1578
- $this->phrases["wc_user_settings_subscriptions"] = esc_attr($_POST["wc_user_settings_subscriptions"]);
1579
- $this->phrases["wc_user_settings_follows"] = esc_attr($_POST["wc_user_settings_follows"]);
1580
- $this->phrases["wc_user_settings_response_to"] = esc_attr($_POST["wc_user_settings_response_to"]);
1581
- $this->phrases["wc_user_settings_email_me_delete_links"] = esc_attr($_POST["wc_user_settings_email_me_delete_links"]);
1582
- $this->phrases["wc_user_settings_email_me_delete_links_desc"] = esc_attr($_POST["wc_user_settings_email_me_delete_links_desc"]);
1583
- $this->phrases["wc_user_settings_no_data"] = esc_attr($_POST["wc_user_settings_no_data"]);
1584
- $this->phrases["wc_user_settings_request_deleting_comments"] = esc_attr($_POST["wc_user_settings_request_deleting_comments"]);
1585
- $this->phrases["wc_user_settings_cancel_subscriptions"] = esc_attr($_POST["wc_user_settings_cancel_subscriptions"]);
1586
- $this->phrases["wc_user_settings_clear_cookie"] = esc_attr($_POST["wc_user_settings_clear_cookie"]);
1587
- $this->phrases["wc_user_settings_delete_links"] = esc_attr($_POST["wc_user_settings_delete_links"]);
1588
- $this->phrases["wc_user_settings_delete_all_comments"] = esc_attr($_POST["wc_user_settings_delete_all_comments"]);
1589
- $this->phrases["wc_user_settings_delete_all_comments_message"] = wpautop($_POST["wc_user_settings_delete_all_comments_message"]);
1590
- $this->phrases["wc_user_settings_delete_all_subscriptions"] = esc_attr($_POST["wc_user_settings_delete_all_subscriptions"]);
1591
- $this->phrases["wc_user_settings_delete_all_subscriptions_message"] = wpautop($_POST["wc_user_settings_delete_all_subscriptions_message"]);
1592
- $this->phrases["wc_user_settings_delete_all_follows"] = esc_attr($_POST["wc_user_settings_delete_all_follows"]);
1593
- $this->phrases["wc_user_settings_delete_all_follows_message"] = wpautop($_POST["wc_user_settings_delete_all_follows_message"]);
1594
- $this->phrases["wc_user_settings_subscribed_to_replies"] = esc_attr($_POST["wc_user_settings_subscribed_to_replies"]);
1595
- $this->phrases["wc_user_settings_subscribed_to_replies_own"] = esc_attr($_POST["wc_user_settings_subscribed_to_replies_own"]);
1596
- $this->phrases["wc_user_settings_subscribed_to_all_comments"] = esc_attr($_POST["wc_user_settings_subscribed_to_all_comments"]);
1597
- $this->phrases["wc_user_settings_check_email"] = esc_attr($_POST["wc_user_settings_check_email"]);
1598
- $this->phrases["wc_user_settings_email_error"] = esc_attr($_POST["wc_user_settings_email_error"]);
1599
- $this->phrases["wc_confirm_comment_delete"] = esc_attr($_POST["wc_confirm_comment_delete"]);
1600
- $this->phrases["wc_confirm_cancel_subscription"] = esc_attr($_POST["wc_confirm_cancel_subscription"]);
1601
- $this->phrases["wc_confirm_cancel_follow"] = esc_attr($_POST["wc_confirm_cancel_follow"]);
1602
- $this->phrases["wc_follow_user"] = esc_attr($_POST["wc_follow_user"]);
1603
- $this->phrases["wc_unfollow_user"] = esc_attr($_POST["wc_unfollow_user"]);
1604
- $this->phrases["wc_follow_success"] = esc_attr($_POST["wc_follow_success"]);
1605
- $this->phrases["wc_follow_canceled"] = esc_attr($_POST["wc_follow_canceled"]);
1606
- $this->phrases["wc_follow_email_confirm"] = esc_attr($_POST["wc_follow_email_confirm"]);
1607
- $this->phrases["wc_follow_email_confirm_fail"] = esc_attr($_POST["wc_follow_email_confirm_fail"]);
1608
- $this->phrases["wc_follow_login_to_follow"] = esc_attr($_POST["wc_follow_login_to_follow"]);
1609
- $this->phrases["wc_follow_impossible"] = esc_attr($_POST["wc_follow_impossible"]);
1610
- $this->phrases["wc_follow_not_added"] = esc_attr($_POST["wc_follow_not_added"]);
1611
- $this->phrases["wc_follow_confirm"] = esc_attr($_POST["wc_follow_confirm"]);
1612
- $this->phrases["wc_follow_cancel"] = esc_attr($_POST["wc_follow_cancel"]);
1613
- $this->phrases["wc_follow_confirm_email_subject"] = esc_attr($_POST["wc_follow_confirm_email_subject"]);
1614
- $this->phrases["wc_follow_confirm_email_message"] = wpautop($_POST["wc_follow_confirm_email_message"]);
1615
- $this->phrases["wc_follow_email_subject"] = esc_attr($_POST["wc_follow_email_subject"]);
1616
- $this->phrases["wc_follow_email_message"] = wpautop($_POST["wc_follow_email_message"]);
1617
- $this->phrases["wc_mentioned_email_subject"] = esc_attr($_POST["wc_mentioned_email_subject"]);
1618
- $this->phrases["wc_mentioned_email_message"] = wpautop($_POST["wc_mentioned_email_message"]);
1619
- $this->phrases["wc_copied_to_clipboard"] = esc_attr($_POST["wc_copied_to_clipboard"]);
1620
- $this->phrases["wc_feedback_shortcode_tooltip"] = esc_attr($_POST["wc_feedback_shortcode_tooltip"]);
1621
- $this->phrases["wc_feedback_popup_title"] = esc_attr($_POST["wc_feedback_popup_title"]);
1622
- $this->phrases["wc_please_leave_feebdack"] = esc_attr($_POST["wc_please_leave_feebdack"]);
1623
- $this->phrases["wc_feedback_content_text"] = esc_attr($_POST["wc_feedback_content_text"]);
1624
- $this->phrases["wc_feedback_comment_success"] = esc_attr($_POST["wc_feedback_comment_success"]);
1625
- $this->phrases["wc_commenting_is_closed"] = esc_attr($_POST["wc_commenting_is_closed"]);
1626
- $this->phrases["wc_closed_comment_thread"] = esc_attr($_POST["wc_closed_comment_thread"]);
1627
- $this->phrases["wc_bubble_invite_message"] = esc_attr($_POST["wc_bubble_invite_message"]);
1628
- $this->phrases["wc_vote_phrase"] = esc_attr($_POST["wc_vote_phrase"]);
1629
- $this->phrases["wc_votes_phrase"] = esc_attr($_POST["wc_votes_phrase"]);
1630
- $this->phrases["wc_comment_link"] = esc_attr($_POST["wc_comment_link"]);
1631
- $this->phrases["wc_not_allowed_to_comment_more_than"] = esc_attr($_POST["wc_not_allowed_to_comment_more_than"]);
1632
- $this->phrases["wc_not_allowed_to_create_comment_thread_more_than"] = esc_attr($_POST["wc_not_allowed_to_create_comment_thread_more_than"]);
1633
- $this->phrases["wc_not_allowed_to_reply_more_than"] = esc_attr($_POST["wc_not_allowed_to_reply_more_than"]);
1634
- $this->phrases["wc_inline_form_comment"] = esc_attr($_POST["wc_inline_form_comment"]);
1635
- $this->phrases["wc_inline_form_notify"] = esc_attr($_POST["wc_inline_form_notify"]);
1636
- $this->phrases["wc_inline_form_name"] = esc_attr($_POST["wc_inline_form_name"]);
1637
- $this->phrases["wc_inline_form_email"] = esc_attr($_POST["wc_inline_form_email"]);
1638
- $this->phrases["wc_inline_form_comment_button"] = esc_attr($_POST["wc_inline_form_comment_button"]);
1639
- $this->phrases["wc_inline_comments_view_all"] = esc_attr($_POST["wc_inline_comments_view_all"]);
1640
- $this->phrases["wc_inline_feedbacks"] = esc_attr($_POST["wc_inline_feedbacks"]);
1641
- $this->phrases["wc_unable_sent_email"] = esc_attr($_POST["wc_unable_sent_email"]);
1642
- $this->phrases["wc_subscription_fault"] = esc_attr($_POST["wc_subscription_fault"]);
1643
- $this->phrases["wc_comments_are_deleted"] = esc_attr($_POST["wc_comments_are_deleted"]);
1644
- $this->phrases["wc_cancel_subs_success"] = esc_attr($_POST["wc_cancel_subs_success"]);
1645
- $this->phrases["wc_cancel_follows_success"] = esc_attr($_POST["wc_cancel_follows_success"]);
1646
- $this->phrases["wc_follow_confirm_success"] = esc_attr($_POST["wc_follow_confirm_success"]);
1647
- $this->phrases["wc_follow_cancel_success"] = esc_attr($_POST["wc_follow_cancel_success"]);
1648
- $this->phrases["wc_login_to_comment"] = esc_attr($_POST["wc_login_to_comment"]);
1649
- $this->phrases["wc_view_comments"] = esc_attr($_POST["wc_view_comments"]);
1650
- $this->phrases["wc_spoiler"] = esc_attr($_POST["wc_spoiler"]);
1651
- $this->phrases["wc_last_edited"] = esc_attr($_POST["wc_last_edited"]);
1652
- $this->phrases["wc_reply_to"] = esc_attr($_POST["wc_reply_to"]);
1653
- $this->phrases["wc_manage_comment"] = esc_attr($_POST["wc_manage_comment"]);
1654
- $this->phrases["wc_spoiler_title"] = esc_attr($_POST["wc_spoiler_title"]);
1655
- $this->phrases["wc_cannot_rate_again"] = esc_attr($_POST["wc_cannot_rate_again"]);
1656
- $this->phrases["wc_not_allowed_to_rate"] = esc_attr($_POST["wc_not_allowed_to_rate"]);
1657
- // Media Upload //
1658
- $this->phrases["wmuPhraseConfirmDelete"] = esc_attr($_POST["wmuPhraseConfirmDelete"]);
1659
- $this->phrases["wmuPhraseNotAllowedFile"] = esc_attr($_POST["wmuPhraseNotAllowedFile"]);
1660
- $this->phrases["wmuPhraseMaxFileCount"] = esc_attr($_POST["wmuPhraseMaxFileCount"]);
1661
- $this->phrases["wmuPhraseMaxFileSize"] = esc_attr($_POST["wmuPhraseMaxFileSize"]);
1662
- $this->phrases["wmuPhrasePostMaxSize"] = esc_attr($_POST["wmuPhrasePostMaxSize"]);
1663
- $this->phrases["wmuAttachImage"] = esc_attr($_POST["wmuAttachImage"]);
1664
- $this->phrases["wmuChangeImage"] = esc_attr($_POST["wmuChangeImage"]);
1665
 
1666
- if (class_exists("Prompt_Comment_Form_Handling") && $this->usePostmaticForCommentNotification) {
1667
- $this->phrases["wc_postmatic_subscription_label"] = esc_attr($_POST["wc_postmatic_subscription_label"]);
1668
- }
1669
- foreach ($this->labels["blogRoles"] as $roleName => $roleVal) {
1670
- $this->phrases["wc_blog_role_" . $roleName] = esc_attr($_POST["wc_blog_role_" . $roleName]);
1671
- }
1672
- $this->dbManager->updatePhrases($this->phrases);
1673
- }
1674
- }
1675
 
1676
- public function resetOptions() {
1677
- if (isset($_GET["_wpnonce"]) && isset($_GET["wpdiscuz_reset_options"]) && !empty($_GET["page"]) && !empty($_GET["wpd_tab"]) && ($resetTab = sanitize_key($_GET["wpd_tab"])) && $_GET["wpdiscuz_reset_options"] == 1 && $_GET["page"] == WpdiscuzCore::PAGE_SETTINGS && current_user_can("manage_options") && wp_verify_nonce($_GET["_wpnonce"], "wpdiscuz_reset_options_nonce-" . $resetTab)) {
1678
 
1679
- $roleColors = ["guest" => "#898989", "post_author" => "#07B290", "administrator" => "#ff451f", "editor" => "#d36000", "author" => "#327324", "contributor" => "#a240cd", "subscriber" => "#31839e"];
 
 
 
 
 
 
 
 
1680
 
1681
- if ($resetTab === "all") {
1682
- delete_option(self::OPTION_SLUG_OPTIONS);
1683
- $this->addOptions();
1684
- $this->initOptions(get_option(self::OPTION_SLUG_OPTIONS));
1685
- $this->general["showPluginPoweredByLink"] = 1;
1686
- $blogRoles = get_editable_roles();
1687
- $this->labels["blogRoles"]["guest"] = $roleColors["guest"];
1688
- $this->labels["blogRoles"]["post_author"] = $roleColors["post_author"];
1689
- $this->labels["blogRoleLabels"]["post_author"] = 1;
1690
- $this->labels["blogRoleLabels"]["guest"] = 0;
1691
- foreach ($blogRoles as $roleName => $roleInfo) {
1692
- $this->labels["blogRoles"][$roleName] = isset($roleColors[$roleName]) ? $roleColors[$roleName] : "#31839e";
1693
- $this->labels["blogRoleLabels"][$roleName] = $roleName === "editor" || $roleName === "administrator" ? 1 : 0;
1694
- }
1695
- $this->updateOptions();
1696
- } else if (isset($this->{$resetTab})) {
1697
- $defaultOptions = $this->getDefaultOptions();
1698
- $this->{$resetTab} = $defaultOptions[$_GET["wpd_tab"]];
1699
- if ($resetTab === WpdiscuzCore::TAB_GENERAL) {
1700
- $this->general["showPluginPoweredByLink"] = 1;
1701
- } else if ($resetTab === WpdiscuzCore::TAB_LABELS) {
1702
- $blogRoles = get_editable_roles();
1703
- $this->labels["blogRoles"]["guest"] = $roleColors["guest"];
1704
- $this->labels["blogRoles"]["post_author"] = $roleColors["post_author"];
1705
- $this->labels["blogRoleLabels"]["post_author"] = 1;
1706
- $this->labels["blogRoleLabels"]["guest"] = 0;
1707
- foreach ($blogRoles as $roleName => $roleInfo) {
1708
- $this->labels["blogRoles"][$roleName] = isset($roleColors[$roleName]) ? $roleColors[$roleName] : "#31839e";
1709
- $this->labels["blogRoleLabels"][$roleName] = $roleName === "editor" || $roleName === "administrator" ? 1 : 0;
1710
- }
1711
- }
1712
- $this->updateOptions();
1713
- }
1714
- do_action("wpdiscuz_reset_options", $resetTab);
1715
- }
1716
- }
1717
 
1718
- public function mainOptionsForm() {
1719
- if (isset($_POST["wc_submit_options"])) {
1720
- add_settings_error("wpdiscuz", "settings_updated", esc_html__("Settings updated", "wpdiscuz"), "updated");
1721
- }
1722
- include_once WPDISCUZ_DIR_PATH . "/options/html-options.php";
1723
- }
1724
 
1725
- public function phrasesOptionsForm() {
1726
- if (isset($_POST["wc_submit_phrases"])) {
1727
- add_settings_error("wpdiscuz", "phrases_updated", esc_html__("Phrases updated", "wpdiscuz"), "updated");
1728
- }
1729
- $this->initPhrasesOnLoad();
1730
- include_once WPDISCUZ_DIR_PATH . "/options/html-phrases.php";
1731
- }
1732
 
1733
- public function tools() {
1734
- if (current_user_can("manage_options")) {
1735
 
1736
- $wpUploadsDir = wp_upload_dir();
1737
- $wpdiscuzOptionsDir = $wpUploadsDir["basedir"] . self::OPTIONS_DIR;
1738
- $wpdiscuzOptionsUrl = $wpUploadsDir["baseurl"] . self::OPTIONS_DIR;
1739
 
1740
- if (isset($_POST["tools-action"])) {
1741
 
1742
- $action = $_POST["tools-action"];
1743
 
1744
- if ($action === "export-options") {
1745
- check_admin_referer("wc_tools_form", "wpd-options-export");
1746
- wp_mkdir_p($wpdiscuzOptionsDir);
1747
- $options = @maybe_unserialize(get_option(self::OPTION_SLUG_OPTIONS));
1748
- if ($options) {
1749
- $json = json_encode($options);
1750
- if (file_put_contents($wpdiscuzOptionsDir . self::OPTIONS_FILENAME . ".txt", $json)) {
1751
- add_settings_error("wpdiscuz", "settings_updated", esc_html__("Options were backed up!", "wpdiscuz"), "updated");
1752
- } else {
1753
- add_settings_error("wpdiscuz", "settings_updated", esc_html__("Cannot back up the options!", "wpdiscuz"), "error");
1754
- }
1755
- }
1756
- } else if ($action === "import-options") {
1757
- check_admin_referer("wc_tools_form", "wpd-options-import");
1758
- $file = isset($_FILES["wpdiscuz-options-file"]) ? $_FILES["wpdiscuz-options-file"] : "";
1759
- if ($file && is_array($file) && isset($file["tmp_name"])) {
1760
- if ($data = file_get_contents($file["tmp_name"])) {
1761
- $options = json_decode($data, true);
1762
- if ($options && is_array($options)) {
1763
- update_option(self::OPTION_SLUG_OPTIONS, $this->replaceOldOptions($options, false));
1764
- add_settings_error("wpdiscuz", "settings_updated", esc_html__("Options Imported Successfully!", "wpdiscuz"), "updated");
1765
- } else {
1766
- add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! File content is empty or data is not valid!", "wpdiscuz"), "error");
1767
- }
1768
- } else {
1769
- add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! Can not get file content!", "wpdiscuz"), "error");
1770
- }
1771
- } else {
1772
- add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! Please choose file!", "wpdiscuz"), "error");
1773
- }
1774
- } else if ($action === "export-phrases") {
1775
- check_admin_referer("wc_tools_form", "wpd-phrases-export");
1776
- wp_mkdir_p($wpdiscuzOptionsDir);
1777
- $phrases = $this->dbManager->getPhrases();
1778
- if ($phrases) {
1779
- $json = json_encode($phrases);
1780
- if (file_put_contents($wpdiscuzOptionsDir . self::PHRASES_FILENAME . ".txt", $json)) {
1781
- add_settings_error("wpdiscuz", "settings_updated", esc_html__("Phrases were backed up!", "wpdiscuz"), "updated");
1782
- } else {
1783
- add_settings_error("wpdiscuz", "settings_updated", esc_html__("Cannot back up the phrases!", "wpdiscuz"), "error");
1784
- }
1785
- }
1786
- } else if ($action === "import-phrases") {
1787
- check_admin_referer("wc_tools_form", "wpd-phrases-import");
1788
- $file = isset($_FILES["wpdiscuz-phrases-file"]) ? $_FILES["wpdiscuz-phrases-file"] : "";
1789
- if ($file && is_array($file) && isset($file["tmp_name"])) {
1790
- if ($data = file_get_contents($file["tmp_name"])) {
1791
- $phrases = json_decode($data, true);
1792
- if ($phrases && is_array($phrases)) {
1793
- $this->dbManager->updatePhrases($phrases);
1794
- add_settings_error("wpdiscuz", "settings_updated", esc_html__("Phrases Imported Successfully!", "wpdiscuz"), "updated");
1795
- } else {
1796
- add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! File content is empty or data is not valid!", "wpdiscuz"), "error");
1797
- }
1798
- } else {
1799
- add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! Can not get file content!", "wpdiscuz"), "error");
1800
- }
1801
- } else {
1802
- add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! Please choose file!", "wpdiscuz"), "error");
1803
- }
1804
- }
1805
- }
1806
- } else {
1807
- die(esc_html_e("Hacker?", "wpdiscuz"));
1808
- }
1809
- include_once WPDISCUZ_DIR_PATH . "/options/html-tools.php";
1810
- }
1811
 
1812
- public function addons() {
1813
- include_once WPDISCUZ_DIR_PATH . "/options/html-addons.php";
1814
- }
1815
 
1816
- private function initAddons() {
1817
- $this->addons = [
1818
- "bundle" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "Bundle", "title" => "Addons Bundle", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/bundle/header.png"), "desc" => esc_html__("All 16 addons in one bundle. Save 90% and get Unlimited Site License with one year premium support.", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-addons-bundle/"],
1819
- "uploader" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "WpdiscuzMediaUploader", "title" => "Media Uploader", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/uploader/header.png"), "desc" => esc_html__("Extended comment attachment system. Allows to upload images, videos, audios and other file types.", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-media-uploader/"],
1820
- "embeds" => ["version" => "1.0.0", "requires" => "7.0.0", "class" => "WpdiscuzEmbeds", "title" => "Embeds", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/embeds/header.png"), "desc" => esc_html__("Allows to embed lots of video, social network, audio and photo content providers URLs in comment content.", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-embeds/"],
1821
- "syntax" => ["version" => "1.0.0", "requires" => "7.0.0", "class" => "wpDiscuzSyntaxHighlighter", "title" => "wpDiscuzSyntaxHighlighter", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/syntax/header.png"), "desc" => esc_html__("Syntax highlighting for comments, automatic language detection and multi-language code highlighting.", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-syntax-highlighter/"],
1822
- "frontend-moderation" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "wpDiscuzFrontEndModeration", "title" => "Front-end Moderation", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/frontend-moderation/header.png"), "desc" => esc_html__("All in one powerful yet simple admin toolkit to moderate comments on front-end.", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-frontend-moderation/"],
1823
- "emoticons" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "wpDiscuzSmile", "title" => "Emoticons", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/emoticons/header.png"), "desc" => esc_html__("Brings an ocean of emotions to your comments. It comes with an awesome smile package.", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-emoticons/"],
1824
- "recaptcha" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "WpdiscuzRecaptcha", "title" => "Invisible reCAPTCHA v3", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/recaptcha/header.png"), "desc" => esc_html__("Adds Invisible reCAPTCHA on all comment forms. Stops spam and bot comments with reCAPTCHA version 3", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-recaptcha/"],
1825
- "author-info" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "WpdiscuzCommentAuthorInfo", "title" => "Comment Author Info", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/author-info/header.png"), "desc" => esc_html__("Extended information about comment author with Profile, Activity, Votes and Subscriptions Tabs on pop-up window.", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-comment-author-info/"],
1826
- "report-flagging" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "wpDiscuzFlagComment", "title" => "Report and Flagging", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/report/header.png"), "desc" => esc_html__("Comment reporting tools. Auto-moderates comments based on number of flags and dislikes.", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-report-flagging/"],
1827
- "online-users" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "WpdiscuzOnlineUsers", "title" => "Online Users", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/online-users/header.png"), "desc" => esc_html__("Real-time online user checking, pop-up notification of new online users and online/offline badges.", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-online-users/"],
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/"],
1835
- "widgets" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "wpDiscuzWidgets", "title" => "wpDiscuz Widgets", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/widgets/header.png"), "desc" => esc_html__("Most voted comments, Active comment threads, Most commented posts, Active comment authors", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-widgets/"],
1836
- "mycred" => ["version" => "7.0.0", "requires" => "7.0.0", "class" => "myCRED_Hook_wpDiscuz_Vote", "title" => "myCRED Integration", "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/mycred/header.png"), "desc" => esc_html__("Integrates myCRED Badges and Ranks. Converts wpDiscuz comment votes/likes to myCRED points. ", "wpdiscuz"), "url" => "https://gvectors.com/product/wpdiscuz-mycred/"],
1837
- ];
1838
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1839
 
1840
- private function initTips() {
1841
- $this->tips = [
1842
- "custom-form" => ["title" => esc_html__("Custom Comment Forms", "wpdiscuz"),
1843
- "text" => esc_html__("You can create custom comment forms with wpDiscuz. wpDiscuz 4 comes with custom comment forms and fields. You can create custom comment forms for each post type, each form can beceated with different form fields, for eaxample: text, dropdown, rating, checkboxes, etc...", "wpdiscuz"),
1844
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/img/tips/custom-form.png"),
1845
- "url" => admin_url() . "edit.php?post_type=wpdiscuz_form"],
1846
- "emoticons" => ["title" => esc_html__("Emoticons", "wpdiscuz"),
1847
- "text" => esc_html__("You can add more emotions to your comments using wpDiscuz Emoticons addon.", "wpdiscuz"),
1848
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/emoticons/header.png"),
1849
- "url" => "https://gvectors.com/product/wpdiscuz-emoticons/"],
1850
- "ads-manager" => ["title" => esc_html__("Ads Manager", "wpdiscuz"),
1851
- "text" => esc_html__("Increase your income using ad banners. Comment area is the most active sections for advertising. wpDiscuz Ads Manager addon is designed to help you add banners and control ads in this section.", "wpdiscuz"),
1852
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/ads-manager/header.png"),
1853
- "url" => "https://gvectors.com/product/wpdiscuz-ads-manager/"],
1854
- "user-mention" => ["title" => esc_html__("User and Comment Mentioning", "wpdiscuz"),
1855
- "text" => esc_html__("Using wpDiscuz User &amp; Comment Mentioning addon you can allow commenters mention comments and users in comment text using #comment-id and @username tags.", "wpdiscuz"),
1856
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/user-mention/header.png"),
1857
- "url" => "https://gvectors.com/product/wpdiscuz-user-comment-mentioning/"],
1858
- "likers" => ["title" => esc_html__("Advanced Likers", "wpdiscuz"),
1859
- "text" => esc_html__("wpDiscuz Advanced Likers addon displays likers and voters of each comment. Adds user reputation and badges based on received likes.", "wpdiscuz"),
1860
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/likers/header.png"),
1861
- "url" => "https://gvectors.com/product/wpdiscuz-advanced-likers/"],
1862
- "report-flagging" => ["title" => esc_html__("Report and Flagging", "wpdiscuz"),
1863
- "text" => esc_html__("Let your commenters help you to determine and remove spam comments. wpDiscuz Report and Flagging addon comes with comment reporting tools. Automaticaly auto-moderates comments based on number of flags and dislikes.", "wpdiscuz"),
1864
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/report/header.png"),
1865
- "url" => "https://gvectors.com/product/wpdiscuz-report-flagging/"],
1866
- "translate" => ["title" => esc_html__("Comment Translate", "wpdiscuz"),
1867
- "text" => esc_html__("In most cases the big part of your visitors are not a native speakers of your language. Make your comments comprehensible for all visitors using wpDiscuz Comment Translation addon. It adds smart and intuitive AJAX 'Translate' button with 60 language translation options. Uses free translation API.", "wpdiscuz"),
1868
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/translate/header.png"),
1869
- "url" => "https://gvectors.com/product/wpdiscuz-comment-translation/"],
1870
- "search" => ["title" => esc_html__("Comment Search", "wpdiscuz"),
1871
- "text" => esc_html__("You can let website visitor search in comments. It's always more attractive to find a comment about something that interest you. Using wpDiscuz Comment Search addon you'll get a nice, AJAX powered front-end comment search form above comment list.", "wpdiscuz"),
1872
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/search/header.png"),
1873
- "url" => "https://gvectors.com/product/wpdiscuz-comment-search/"],
1874
- "widgets" => ["title" => esc_html__("wpDiscuz Widgets", "wpdiscuz"),
1875
- "text" => esc_html__("More Comment Widgets! Most voted comments, Active comment threads, Most commented posts, Active comment authors widgets are available in wpDiscuz Widgets Addon", "wpdiscuz"),
1876
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/widgets/header.png"),
1877
- "url" => "https://gvectors.com/product/wpdiscuz-widgets/"],
1878
- "frontend-moderation" => ["title" => esc_html__("Front-end Moderation", "wpdiscuz"),
1879
- "text" => esc_html__("You can moderate comments on front-end using all in one powerful yet simple wpDiscuz Frontend Moderation addon.", "wpdiscuz"),
1880
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/frontend-moderation/header.png"),
1881
- "url" => "https://gvectors.com/product/wpdiscuz-frontend-moderation/"],
1882
- "uploader" => ["title" => esc_html__("Media Uploader", "wpdiscuz"),
1883
- "text" => esc_html__("You can let website visitors attach images and files to comments and embed video/audio content using wpDiscuz Media Uploader addon.", "wpdiscuz"),
1884
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/uploader/header.png"),
1885
- "url" => "https://gvectors.com/product/wpdiscuz-media-uploader/"],
1886
- "recaptcha" => ["title" => esc_html__("Google ReCaptcha", "wpdiscuz"),
1887
- "text" => esc_html__("Advanced spam protection with wpDiscuz Google reCAPTCHA addon. This addon adds No-CAPTCHA reCAPTCHA on all comment forms. Stops spam and bot comments.", "wpdiscuz"),
1888
- "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/recaptcha/header.png"),
1889
- "url" => "https://gvectors.com/product/wpdiscuz-recaptcha/"],
1890
- ];
1891
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1892
 
1893
- private function addonNote() {
1894
- if ((!empty($_GET["page"]) && in_array($_GET["page"], [self::PAGE_WPDISCUZ, self::PAGE_SETTINGS, self::PAGE_PHRASES, self::PAGE_TOOLS, self::PAGE_ADDONS])) || strpos($_SERVER["REQUEST_URI"], "edit.php?post_type=wpdiscuz_form") !== FALSE) {
1895
- $lastHash = get_option("wpdiscuz-addon-note-dismissed");
1896
- $lastHashArray = explode(",", $lastHash);
1897
- $currentHash = "wpDiscuz Addon Bundle";
1898
- if ($lastHash !== $currentHash && !in_array("Addons Bundle", $lastHashArray)) {
1899
- ?>
 
 
 
 
 
 
1900
  <div class="updated notice wpdiscuz_addon_note is-dismissible" style="margin-top:10px;">
1901
  <p style="font-weight:normal; font-size:15px; border-bottom:1px dotted #DCDCDC; padding-bottom:10px; clear: both;">
1902
- <?php //esc_html_e("New Addons are available for wpDiscuz Comments Plugin"); ?>
1903
- <?php esc_html_e("Finally wpDiscuz Addons Bundle is ready for You!", "wpdiscuz"); ?>
1904
  </p>
1905
  <div style="font-size:14px;">
1906
- <?php
1907
- foreach ($this->addons as $key => $addon) {
1908
- if ($addon["class"] !== "Bundle")
1909
- continue;
1910
- if (in_array($addon["title"], $lastHashArray))
1911
- continue;
1912
- ?>
1913
- <div style="display:inline-block; min-width:27%; padding-right:10px; margin-bottom:10px;"><img src="<?php echo esc_url_raw($addon["thumb"]); ?>" style="height:40px; width:auto; vertical-align:middle; margin:0px 10px; text-decoration:none;" /> <a href="<?php echo esc_url_raw($addon["url"]) ?>" target="_blank" style="color:#444; text-decoration:none;" title="<?php esc_attr_e("View Addons Bundle", "wpdiscuz"); ?>"><?php echo esc_html($addon["title"]); ?></a></div>
1914
- <?php
1915
- }
1916
- ?>
 
 
 
 
 
 
 
 
1917
  <div style="clear:both;"></div>
1918
  </div>
1919
- <p>&nbsp;&nbsp;&nbsp;<a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_ADDONS)); ?>"><?php esc_html_e("Go to wpDiscuz Addons subMenu"); ?> &raquo;</a></p>
 
 
1920
  </div>
1921
- <?php
1922
- }
1923
- }
1924
- }
1925
 
1926
- public function dismissAddonNote() {
1927
- $hash = $this->addonHash();
1928
- update_option("wpdiscuz-addon-note-dismissed", $hash);
1929
- exit();
1930
- }
1931
 
1932
- public function dismissTipNote() {
1933
- $hash = $this->tipHash();
1934
- update_option("wpdiscuz-tip-note-dismissed", $hash);
1935
- exit();
1936
- }
1937
 
1938
- public function dismissAddonNoteOnPage() {
1939
- $hash = $this->addonHash();
1940
- update_option("wpdiscuz-addon-note-dismissed", $hash);
1941
- }
1942
 
1943
- public function addonHash() {
1944
- $viewed = "";
1945
- foreach ($this->addons as $key => $addon) {
1946
- $viewed .= $addon["title"] . ",";
1947
- }
1948
- $hash = $viewed;
1949
- return $hash;
1950
- }
1951
 
1952
- public function tipHash() {
1953
- $viewed = "";
1954
- foreach ($this->tips as $key => $tip) {
1955
- $viewed .= $tip["title"] . ",";
1956
- }
1957
- $hash = $viewed;
1958
- return $hash;
1959
- }
1960
 
1961
- public function tipDisplayed() {
1962
- $tipTtile = substr(strip_tags($_GET["tip"]), 0, 100);
1963
- $lastHash = get_option("wpdiscuz-tip-note-dismissed");
1964
- if ($lastHash) {
1965
- $lastHashArray = explode(",", $lastHash);
1966
- } else {
1967
- $lastHashArray = [];
1968
- }
1969
- $lastHashArray[] = $tipTtile;
1970
- $hash = implode(",", $lastHashArray);
1971
- return $hash;
1972
- }
1973
 
1974
- public function refreshAddonPage() {
1975
- $lastHash = get_option("wpdiscuz-addon-note-dismissed");
1976
- $currentHash = $this->addonHash();
1977
- if ($lastHash !== $currentHash) {
1978
- ?>
1979
- <script language="javascript">jQuery(document).ready(function () {
1980
- location.reload();
1981
- });</script>
1982
- <?php
1983
- }
1984
- }
1985
 
1986
- public function adminNotices() {
1987
- if (current_user_can("manage_options")) {
1988
- //$this->addonNote(); //temporary disabled.
1989
- $this->regenerateMessage();
1990
- }
1991
- }
 
1992
 
1993
- private function regenerateMessage() {
1994
- global $pagenow;
1995
- $notWpdiscuzSettingsPage = $pagenow !== "admin.php" || ($pagenow === "admin.php" && (!isset($_GET["page"]) || (isset($_GET["page"]) && $_GET["page"] !== self::PAGE_SETTINGS)));
1996
- $wizardCompleted = intval(get_option(self::OPTION_SLUG_WIZARD_COMPLETED));
1997
- if (!$wizardCompleted && $notWpdiscuzSettingsPage) {
1998
- ?>
1999
  <div class='notice notice-warning'>
2000
  <p style="font-size: 14px; font-weight: 600;">
2001
- <?php esc_html_e("Please complete required steps to start using wpDiscuz 7", "wpdiscuz"); ?> &nbsp;
2002
- <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_SETTINGS . "&wpd_wizard=1")); ?>" class="button button-primary"><?php intval(get_option(self::OPTION_SLUG_WIZARD_AFTER_UPDATE)) ? esc_html_e("Go to Update Wizard &raquo;", "wpdiscuz") : esc_html_e("Go to Installation Wizard &raquo;", "wpdiscuz"); ?></a>
 
2003
  </p>
2004
  </div>
2005
- <?php
2006
- }
2007
- if ($wizardCompleted && $notWpdiscuzSettingsPage && class_exists("Jetpack") && Jetpack::is_module_active("comments")) {
2008
- ?>
2009
  <div class='notice notice-warning'>
2010
  <p>
2011
- <?php esc_html_e("Jetpack Comments are active.", "wpdiscuz"); ?>
2012
  </p>
2013
  </div>
2014
- <?php
2015
- }
2016
- if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_VOTE_REG_MESSAGE))) {
2017
- ?>
2018
  <div class='notice notice-warning'>
2019
  <p>
2020
- <?php esc_html_e("Comment votes meta data need to be regenerated", "wpdiscuz"); ?>&nbsp;
2021
- <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>" class="button button-primary"><?php esc_html_e("Regenerate Vote Metas", "wpdiscuz"); ?></a>
 
2022
  </p>
2023
  </div>
2024
- <?php
2025
- }
2026
- if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_CLOSED_REG_MESSAGE))) {
2027
- ?>
2028
  <div class='notice notice-warning'>
2029
  <p>
2030
- <?php esc_html_e("Closed Comments data need be regenerated", "wpdiscuz"); ?>&nbsp;
2031
- <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>" class="button button-primary"><?php esc_html_e("Regenerate Closed Comments", "wpdiscuz"); ?></a>
 
2032
  </p>
2033
  </div>
2034
- <?php
2035
- }
2036
- if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_VOTE_DATA_REG_MESSAGE))) {
2037
- ?>
2038
  <div class='notice notice-warning'>
2039
  <p>
2040
- <?php esc_html_e("Comments votes data need to be regenerated", "wpdiscuz"); ?>&nbsp;
2041
- <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>" class="button button-primary"><?php esc_html_e("Regenerate Vote Data", "wpdiscuz"); ?></a>
 
2042
  </p>
2043
  </div>
2044
- <?php
2045
- }
2046
- if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_SYNC_COMMENTERS_MESSAGE))) {
2047
- ?>
2048
  <div class='notice notice-warning'>
2049
  <p>
2050
- <?php esc_html_e("Please synchronize comment data for the best performance and fastest experience", "wpdiscuz"); ?>&nbsp;
2051
- <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>" class="button button-primary"><?php esc_html_e("Synchronize Commenters Data", "wpdiscuz"); ?></a>
 
 
2052
  </p>
2053
  </div>
2054
- <?php
2055
- }
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
- }
2073
 
2074
- private function getSizeInBytes($size) {
2075
- $value = trim($size);
2076
- if (is_numeric($value)) {
2077
- return $value;
2078
- }
2079
 
2080
- $lastChar = strtolower($value[strlen($value) - 1]);
2081
- $value = substr($value, 0, -1);
2082
 
2083
- switch ($lastChar) {
2084
- case 'g': $value *= 1024 * 1024 * 1024;
2085
- break;
2086
- case 'm': $value *= 1024 * 1024;
2087
- break;
2088
- case 'k': $value *= 1024;
2089
- break;
2090
- }
2091
- return intval($value);
2092
- }
 
 
 
2093
 
2094
- public function getDefaultImageSizes() {
2095
- return ["thumbnail", "medium", "medium_large", "large"];
2096
- }
2097
 
2098
- public function dashboard() {
2099
- include_once WPDISCUZ_DIR_PATH . "/options/html-dashboard.php";
2100
- }
2101
 
2102
- public function isShowLoginButtons() {
2103
- return $this->social["enableFbLogin"] || $this->social["enableTwitterLogin"] || $this->social["enableGoogleLogin"] || $this->social["enableDisqusLogin"] || $this->social["enableWordpressLogin"] || $this->social["enableVkLogin"] || $this->social["enableOkLogin"] || $this->social["enableInstagramLogin"] || $this->social["enableLinkedinLogin"] || $this->social["enableYandexLogin"] || $this->social["enableMailruLogin"] || $this->social["enableWeiboLogin"] || $this->social["enableWechatLogin"] || $this->social["enableQQLogin"] || $this->social["enableBaiduLogin"];
2104
- }
2105
 
2106
- public function showEditorToolbar() {
2107
- return $this->form["boldButton"] || $this->form["italicButton"] || $this->form["underlineButton"] || $this->form["strikeButton"] || $this->form["olButton"] || $this->form["ulButton"] || $this->form["blockquoteButton"] || $this->form["codeblockButton"] || $this->form["linkButton"] || $this->form["sourcecodeButton"] || $this->form["spoilerButton"];
2108
- }
2109
 
2110
- public function replaceOldOptions($oldOptions, $update = true) {
2111
- $newOptions = $this->getDefaultOptions();
2112
- if (!$update && isset($oldOptions[self::TAB_GENERAL])) {
2113
- foreach ($newOptions as $key => $value) {
2114
- foreach ($value as $k => $val) {
2115
- if (isset($oldOptions[$key][$k])) {
2116
- $newOptions[$key][$k] = $oldOptions[$key][$k];
2117
- }
2118
- }
2119
- }
2120
- return $newOptions;
2121
- }
2122
- if (isset($oldOptions["enableDropAnimation"])) {
2123
- $newOptions[self::TAB_FORM]["enableDropAnimation"] = $oldOptions["enableDropAnimation"];
2124
- } else if (isset($oldOptions[self::TAB_FORM]["enableDropAnimation"])) {
2125
- $newOptions[self::TAB_FORM]["enableDropAnimation"] = $oldOptions[self::TAB_FORM]["enableDropAnimation"];
2126
- }
2127
- if (isset($oldOptions["commenterNameMinLength"])) {
2128
- $newOptions[self::TAB_FORM]["commenterNameMinLength"] = $oldOptions["commenterNameMinLength"];
2129
- } else if (isset($oldOptions[self::TAB_FORM]["commenterNameMinLength"])) {
2130
- $newOptions[self::TAB_FORM]["commenterNameMinLength"] = $oldOptions[self::TAB_FORM]["commenterNameMinLength"];
2131
- }
2132
- if (isset($oldOptions["commenterNameMaxLength"])) {
2133
- $newOptions[self::TAB_FORM]["commenterNameMaxLength"] = $oldOptions["commenterNameMaxLength"];
2134
- } else if (isset($oldOptions[self::TAB_FORM]["commenterNameMaxLength"])) {
2135
- $newOptions[self::TAB_FORM]["commenterNameMaxLength"] = $oldOptions[self::TAB_FORM]["commenterNameMaxLength"];
2136
- }
2137
- if (isset($oldOptions["storeCommenterData"])) {
2138
- $newOptions[self::TAB_FORM]["storeCommenterData"] = $oldOptions["storeCommenterData"];
2139
- } else if (isset($oldOptions[self::TAB_FORM]["storeCommenterData"])) {
2140
- $newOptions[self::TAB_FORM]["storeCommenterData"] = $oldOptions[self::TAB_FORM]["storeCommenterData"];
2141
- }
2142
- if (isset($oldOptions["wc_show_hide_loggedin_username"])) {
2143
- $newOptions[self::TAB_LOGIN]["showLoggedInUsername"] = $oldOptions["wc_show_hide_loggedin_username"];
2144
- } else if (isset($oldOptions[self::TAB_LOGIN]["showLoggedInUsername"])) {
2145
- $newOptions[self::TAB_LOGIN]["showLoggedInUsername"] = $oldOptions[self::TAB_LOGIN]["showLoggedInUsername"];
2146
- }
2147
- if (isset($oldOptions["hideLoginLinkForGuests"])) {
2148
- $newOptions[self::TAB_LOGIN]["showLoginLinkForGuests"] = (int) !$oldOptions["hideLoginLinkForGuests"];
2149
- } else if (isset($oldOptions[self::TAB_LOGIN]["showLoginLinkForGuests"])) {
2150
- $newOptions[self::TAB_LOGIN]["showLoginLinkForGuests"] = $oldOptions[self::TAB_LOGIN]["showLoginLinkForGuests"];
2151
- }
2152
- if (isset($oldOptions["hideUserSettingsButton"])) {
2153
- $settingsButton = (int) !$oldOptions["hideUserSettingsButton"];
2154
- $newOptions[self::TAB_LOGIN]["showActivityTab"] = $settingsButton;
2155
- $newOptions[self::TAB_LOGIN]["showSubscriptionsTab"] = $settingsButton;
2156
- $newOptions[self::TAB_LOGIN]["showFollowsTab"] = $settingsButton;
2157
- } else {
2158
- if (isset($oldOptions[self::TAB_LOGIN]["showActivityTab"])) {
2159
- $newOptions[self::TAB_LOGIN]["showActivityTab"] = $oldOptions[self::TAB_LOGIN]["showActivityTab"];
2160
- }
2161
- if (isset($oldOptions[self::TAB_LOGIN]["showSubscriptionsTab"])) {
2162
- $newOptions[self::TAB_LOGIN]["showSubscriptionsTab"] = $oldOptions[self::TAB_LOGIN]["showSubscriptionsTab"];
2163
- }
2164
- if (isset($oldOptions[self::TAB_LOGIN]["showFollowsTab"])) {
2165
- $newOptions[self::TAB_LOGIN]["showFollowsTab"] = $oldOptions[self::TAB_LOGIN]["showFollowsTab"];
2166
- }
2167
- }
2168
- if (isset($oldOptions["disableProfileURLs"])) {
2169
- $newOptions[self::TAB_LOGIN]["enableProfileURLs"] = (int) !$oldOptions["disableProfileURLs"];
2170
- } else if (isset($oldOptions[self::TAB_LOGIN]["enableProfileURLs"])) {
2171
- $newOptions[self::TAB_LOGIN]["enableProfileURLs"] = $oldOptions[self::TAB_LOGIN]["enableProfileURLs"];
2172
- }
2173
- if (isset($oldOptions["isUserByEmail"])) {
2174
- $newOptions[self::TAB_LOGIN]["isUserByEmail"] = $oldOptions["isUserByEmail"];
2175
- } else if (isset($oldOptions[self::TAB_LOGIN]["isUserByEmail"])) {
2176
- $newOptions[self::TAB_LOGIN]["isUserByEmail"] = $oldOptions[self::TAB_LOGIN]["isUserByEmail"];
2177
- }
2178
- if (isset($oldOptions["socialLoginAgreementCheckbox"])) {
2179
- $newOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"] = $oldOptions["socialLoginAgreementCheckbox"];
2180
- } else if (isset($oldOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"])) {
2181
- $newOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"] = $oldOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"];
2182
- }
2183
- if (isset($oldOptions["socialLoginInSecondaryForm"])) {
2184
- $newOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"] = $oldOptions["socialLoginInSecondaryForm"];
2185
- } else if (isset($oldOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"])) {
2186
- $newOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"] = $oldOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"];
2187
- }
2188
- if (isset($oldOptions["enableFbLogin"])) {
2189
- $newOptions[self::TAB_SOCIAL]["enableFbLogin"] = $oldOptions["enableFbLogin"];
2190
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableFbLogin"])) {
2191
- $newOptions[self::TAB_SOCIAL]["enableFbLogin"] = $oldOptions[self::TAB_SOCIAL]["enableFbLogin"];
2192
- }
2193
- if (isset($oldOptions["enableFbShare"])) {
2194
- $newOptions[self::TAB_SOCIAL]["enableFbShare"] = $oldOptions["enableFbShare"];
2195
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableFbShare"])) {
2196
- $newOptions[self::TAB_SOCIAL]["enableFbShare"] = $oldOptions[self::TAB_SOCIAL]["enableFbShare"];
2197
- }
2198
- if (isset($oldOptions["fbAppID"])) {
2199
- $newOptions[self::TAB_SOCIAL]["fbAppID"] = $oldOptions["fbAppID"];
2200
- } else if (isset($oldOptions[self::TAB_SOCIAL]["fbAppID"])) {
2201
- $newOptions[self::TAB_SOCIAL]["fbAppID"] = $oldOptions[self::TAB_SOCIAL]["fbAppID"];
2202
- }
2203
- if (isset($oldOptions["fbAppSecret"])) {
2204
- $newOptions[self::TAB_SOCIAL]["fbAppSecret"] = $oldOptions["fbAppSecret"];
2205
- } else if (isset($oldOptions[self::TAB_SOCIAL]["fbAppSecret"])) {
2206
- $newOptions[self::TAB_SOCIAL]["fbAppSecret"] = $oldOptions[self::TAB_SOCIAL]["fbAppSecret"];
2207
- }
2208
- if (isset($oldOptions["fbUseOAuth2"])) {
2209
- $newOptions[self::TAB_SOCIAL]["fbUseOAuth2"] = $oldOptions["fbUseOAuth2"];
2210
- } else if (isset($oldOptions[self::TAB_SOCIAL]["fbUseOAuth2"])) {
2211
- $newOptions[self::TAB_SOCIAL]["fbUseOAuth2"] = $oldOptions[self::TAB_SOCIAL]["fbUseOAuth2"];
2212
- }
2213
- if (isset($oldOptions["enableTwitterLogin"])) {
2214
- $newOptions[self::TAB_SOCIAL]["enableTwitterLogin"] = $oldOptions["enableTwitterLogin"];
2215
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableTwitterLogin"])) {
2216
- $newOptions[self::TAB_SOCIAL]["enableTwitterLogin"] = $oldOptions[self::TAB_SOCIAL]["enableTwitterLogin"];
2217
- }
2218
- if (isset($oldOptions["enableTwitterShare"])) {
2219
- $newOptions[self::TAB_SOCIAL]["enableTwitterShare"] = $oldOptions["enableTwitterShare"];
2220
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableTwitterShare"])) {
2221
- $newOptions[self::TAB_SOCIAL]["enableTwitterShare"] = $oldOptions[self::TAB_SOCIAL]["enableTwitterShare"];
2222
- }
2223
- if (isset($oldOptions["twitterAppID"])) {
2224
- $newOptions[self::TAB_SOCIAL]["twitterAppID"] = $oldOptions["twitterAppID"];
2225
- } else if (isset($oldOptions[self::TAB_SOCIAL]["twitterAppID"])) {
2226
- $newOptions[self::TAB_SOCIAL]["twitterAppID"] = $oldOptions[self::TAB_SOCIAL]["twitterAppID"];
2227
- }
2228
- if (isset($oldOptions["twitterAppSecret"])) {
2229
- $newOptions[self::TAB_SOCIAL]["twitterAppSecret"] = $oldOptions["twitterAppSecret"];
2230
- } else if (isset($oldOptions[self::TAB_SOCIAL]["twitterAppSecret"])) {
2231
- $newOptions[self::TAB_SOCIAL]["twitterAppSecret"] = $oldOptions[self::TAB_SOCIAL]["twitterAppSecret"];
2232
- }
2233
- if (isset($oldOptions["enableGoogleLogin"])) {
2234
- $newOptions[self::TAB_SOCIAL]["enableGoogleLogin"] = $oldOptions["enableGoogleLogin"];
2235
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableGoogleLogin"])) {
2236
- $newOptions[self::TAB_SOCIAL]["enableGoogleLogin"] = $oldOptions[self::TAB_SOCIAL]["enableGoogleLogin"];
2237
- }
2238
- if (isset($oldOptions["enableVkLogin"])) {
2239
- $newOptions[self::TAB_SOCIAL]["enableVkLogin"] = $oldOptions["enableVkLogin"];
2240
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableVkLogin"])) {
2241
- $newOptions[self::TAB_SOCIAL]["enableVkLogin"] = $oldOptions[self::TAB_SOCIAL]["enableVkLogin"];
2242
- }
2243
- if (isset($oldOptions["enableVkShare"])) {
2244
- $newOptions[self::TAB_SOCIAL]["enableVkShare"] = $oldOptions["enableVkShare"];
2245
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableVkShare"])) {
2246
- $newOptions[self::TAB_SOCIAL]["enableVkShare"] = $oldOptions[self::TAB_SOCIAL]["enableVkShare"];
2247
- }
2248
- if (isset($oldOptions["vkAppID"])) {
2249
- $newOptions[self::TAB_SOCIAL]["vkAppID"] = $oldOptions["vkAppID"];
2250
- } else if (isset($oldOptions[self::TAB_SOCIAL]["vkAppID"])) {
2251
- $newOptions[self::TAB_SOCIAL]["vkAppID"] = $oldOptions[self::TAB_SOCIAL]["vkAppID"];
2252
- }
2253
- if (isset($oldOptions["vkAppSecret"])) {
2254
- $newOptions[self::TAB_SOCIAL]["vkAppSecret"] = $oldOptions["vkAppSecret"];
2255
- } else if (isset($oldOptions[self::TAB_SOCIAL]["vkAppSecret"])) {
2256
- $newOptions[self::TAB_SOCIAL]["vkAppSecret"] = $oldOptions[self::TAB_SOCIAL]["vkAppSecret"];
2257
- }
2258
- if (isset($oldOptions["enableOkLogin"])) {
2259
- $newOptions[self::TAB_SOCIAL]["enableOkLogin"] = $oldOptions["enableOkLogin"];
2260
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableOkLogin"])) {
2261
- $newOptions[self::TAB_SOCIAL]["enableOkLogin"] = $oldOptions[self::TAB_SOCIAL]["enableOkLogin"];
2262
- }
2263
- if (isset($oldOptions["enableOkShare"])) {
2264
- $newOptions[self::TAB_SOCIAL]["enableOkShare"] = $oldOptions["enableOkShare"];
2265
- } else if (isset($oldOptions[self::TAB_SOCIAL]["enableOkShare"])) {
2266
- $newOptions[self::TAB_SOCIAL]["enableOkShare"] = $oldOptions[self::TAB_SOCIAL]["enableOkShare"];
2267
- }
2268
- if (isset($oldOptions["okAppID"])) {
2269
- $newOptions[self::TAB_SOCIAL]["okAppID"] = $oldOptions["okAppID"];
2270
- } else if (isset($oldOptions[self::TAB_SOCIAL]["okAppID"])) {
2271
- $newOptions[self::TAB_SOCIAL]["okAppID"] = $oldOptions[self::TAB_SOCIAL]["okAppID"];
2272
- }
2273
- if (isset($oldOptions["okAppKey"])) {
2274
- $newOptions[self::TAB_SOCIAL]["okAppKey"] = $oldOptions["okAppKey"];
2275
- } else if (isset($oldOptions[self::TAB_SOCIAL]["okAppKey"])) {
2276
- $newOptions[self::TAB_SOCIAL]["okAppKey"] = $oldOptions[self::TAB_SOCIAL]["okAppKey"];
2277
- }
2278
- if (isset($oldOptions["okAppSecret"])) {
2279
- $newOptions[self::TAB_SOCIAL]["okAppSecret"] = $oldOptions["okAppSecret"];
2280
- } else if (isset($oldOptions[self::TAB_SOCIAL]["okAppSecret"])) {
2281
- $newOptions[self::TAB_SOCIAL]["okAppSecret"] = $oldOptions[self::TAB_SOCIAL]["okAppSecret"];
2282
- }
2283
- if (isset($oldOptions["displayRatingOnPost"])) {
2284
- $newOptions[self::TAB_RATING]["displayRatingOnPost"] = $oldOptions["displayRatingOnPost"];
2285
- } else if (isset($oldOptions[self::TAB_RATING]["displayRatingOnPost"])) {
2286
- $newOptions[self::TAB_RATING]["displayRatingOnPost"] = $oldOptions[self::TAB_RATING]["displayRatingOnPost"];
2287
- }
2288
- if (isset($oldOptions["ratingCssOnNoneSingular"])) {
2289
- $newOptions[self::TAB_RATING]["ratingCssOnNoneSingular"] = $oldOptions["ratingCssOnNoneSingular"];
2290
- } else if (isset($oldOptions[self::TAB_RATING]["ratingCssOnNoneSingular"])) {
2291
- $newOptions[self::TAB_RATING]["ratingCssOnNoneSingular"] = $oldOptions[self::TAB_RATING]["ratingCssOnNoneSingular"];
2292
- }
2293
- if (isset($oldOptions["wc_comment_rating_hover_color"])) {
2294
- $newOptions[self::TAB_RATING]["ratingHoverColor"] = $oldOptions["wc_comment_rating_hover_color"];
2295
- } else if (isset($oldOptions[self::TAB_RATING]["ratingHoverColor"])) {
2296
- $newOptions[self::TAB_RATING]["ratingHoverColor"] = $oldOptions[self::TAB_RATING]["ratingHoverColor"];
2297
- }
2298
- if (isset($oldOptions["wc_comment_rating_inactiv_color"])) {
2299
- $newOptions[self::TAB_RATING]["ratingInactiveColor"] = $oldOptions["wc_comment_rating_inactiv_color"];
2300
- } else if (isset($oldOptions[self::TAB_RATING]["ratingInactiveColor"])) {
2301
- $newOptions[self::TAB_RATING]["ratingInactiveColor"] = $oldOptions[self::TAB_RATING]["ratingInactiveColor"];
2302
- }
2303
- if (isset($oldOptions["wc_comment_rating_activ_color"])) {
2304
- $newOptions[self::TAB_RATING]["ratingActiveColor"] = $oldOptions["wc_comment_rating_activ_color"];
2305
- } else if (isset($oldOptions[self::TAB_RATING]["ratingActiveColor"])) {
2306
- $newOptions[self::TAB_RATING]["ratingActiveColor"] = $oldOptions[self::TAB_RATING]["ratingActiveColor"];
2307
- }
2308
- if (isset($oldOptions["commentListLoadType"])) {
2309
- $newOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"] = $oldOptions["commentListLoadType"];
2310
- } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"])) {
2311
- $newOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"] = $oldOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"];
2312
- }
2313
- if (isset($oldOptions["isLoadOnlyParentComments"])) {
2314
- $newOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"] = $oldOptions["isLoadOnlyParentComments"];
2315
- } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"])) {
2316
- $newOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"] = $oldOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"];
2317
- }
2318
- if (isset($oldOptions["show_sorting_buttons"])) {
2319
- $newOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"] = $oldOptions["show_sorting_buttons"];
2320
- } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"])) {
2321
- $newOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"] = $oldOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"];
2322
- }
2323
- if (isset($oldOptions["mostVotedByDefault"])) {
2324
- $newOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"] = $oldOptions["mostVotedByDefault"];
2325
- } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"])) {
2326
- $newOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"] = $oldOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"];
2327
- }
2328
- if (isset($oldOptions["reverseChildren"])) {
2329
- $newOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"] = $oldOptions["reverseChildren"];
2330
- } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"])) {
2331
- $newOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"] = $oldOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"];
2332
- }
2333
- if (isset($oldOptions["enableLastVisitCookie"])) {
2334
- $newOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"] = $oldOptions["enableLastVisitCookie"];
2335
- } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"])) {
2336
- $newOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"] = $oldOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"];
2337
- }
2338
- if (isset($oldOptions["showHideCommentLink"])) {
2339
- $newOptions[self::TAB_THREAD_DISPLAY]["showCommentLink"] = (int) !$oldOptions["showHideCommentLink"];
2340
- } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["showCommentLink"])) {
2341
- $newOptions[self::TAB_THREAD_DISPLAY]["showCommentLink"] = $oldOptions[self::TAB_THREAD_DISPLAY]["showCommentLink"];
2342
- }
2343
- if (isset($oldOptions["hideCommentDate"])) {
2344
- $newOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"] = (int) !$oldOptions["hideCommentDate"];
2345
- } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"])) {
2346
- $newOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"];
2347
- }
2348
- if (isset($oldOptions["wc_voting_buttons_show_hide"])) {
2349
- $newOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"] = (int) !$oldOptions["wc_voting_buttons_show_hide"];
2350
- } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"])) {
2351
- $newOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"];
2352
- }
2353
- if (isset($oldOptions["votingButtonsIcon"])) {
2354
- $newOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"] = $oldOptions["votingButtonsIcon"];
2355
- } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"])) {
2356
- $newOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"];
2357
- }
2358
- if (isset($oldOptions["votingButtonsStyle"])) {
2359
- $newOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"] = $oldOptions["votingButtonsStyle"];
2360
- } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"])) {
2361
- $newOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"];
2362
- }
2363
- if (isset($oldOptions["wc_is_guest_can_vote"])) {
2364
- $newOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"] = $oldOptions["wc_is_guest_can_vote"];
2365
- } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"])) {
2366
- $newOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"];
2367
- }
2368
- if (isset($oldOptions["theme"])) {
2369
- $newOptions[self::TAB_THREAD_STYLES]["theme"] = $oldOptions["theme"];
2370
- } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["theme"])) {
2371
- $newOptions[self::TAB_THREAD_STYLES]["theme"] = $oldOptions[self::TAB_THREAD_STYLES]["theme"];
2372
- }
2373
- if (isset($oldOptions["wc_comment_username_color"])) {
2374
- $newOptions[self::TAB_THREAD_STYLES]["primaryColor"] = $oldOptions["wc_comment_username_color"];
2375
- } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["primaryColor"])) {
2376
- $newOptions[self::TAB_THREAD_STYLES]["primaryColor"] = $oldOptions[self::TAB_THREAD_STYLES]["primaryColor"];
2377
- }
2378
- if (isset($oldOptions["wc_new_loaded_comment_bg_color"])) {
2379
- $newOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"] = $oldOptions["wc_new_loaded_comment_bg_color"];
2380
- } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"])) {
2381
- $newOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"] = $oldOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"];
2382
- }
2383
- if (isset($oldOptions["wc_link_button_color"]["primary_button_color"])) {
2384
- $newOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"] = $oldOptions["wc_link_button_color"]["primary_button_color"];
2385
- } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"])) {
2386
- $newOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"] = $oldOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"];
2387
- }
2388
- if (isset($oldOptions["wc_link_button_color"]["primary_button_bg"])) {
2389
- $newOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"] = $oldOptions["wc_link_button_color"]["primary_button_bg"];
2390
- } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"])) {
2391
- $newOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"] = $oldOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"];
2392
- }
2393
- if (isset($oldOptions["wc_comment_text_size"])) {
2394
- $newOptions[self::TAB_THREAD_STYLES]["commentTextSize"] = $oldOptions["wc_comment_text_size"];
2395
- } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["commentTextSize"])) {
2396
- $newOptions[self::TAB_THREAD_STYLES]["commentTextSize"] = $oldOptions[self::TAB_THREAD_STYLES]["commentTextSize"];
2397
- }
2398
- if (isset($oldOptions["disableFontAwesome"])) {
2399
- $newOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"] = (int) !$oldOptions["disableFontAwesome"];
2400
- } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"])) {
2401
- $newOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"] = $oldOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"];
2402
- }
2403
- if (isset($oldOptions["wc_custom_css"])) {
2404
- $newOptions[self::TAB_THREAD_STYLES]["customCss"] = $oldOptions["wc_custom_css"];
2405
- } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["customCss"])) {
2406
- $newOptions[self::TAB_THREAD_STYLES]["customCss"] = $oldOptions[self::TAB_THREAD_STYLES]["customCss"];
2407
- }
2408
- if (isset($oldOptions["isNotifyOnCommentApprove"])) {
2409
- $newOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"] = $oldOptions["isNotifyOnCommentApprove"];
2410
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"])) {
2411
- $newOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"] = $oldOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"];
2412
- }
2413
- if (isset($oldOptions["wc_disable_member_confirm"])) {
2414
- $newOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"] = (int) !$oldOptions["wc_disable_member_confirm"];
2415
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"])) {
2416
- $newOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"] = $oldOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"];
2417
- }
2418
- if (isset($oldOptions["disableGuestsConfirm"])) {
2419
- $newOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"] = (int) !$oldOptions["disableGuestsConfirm"];
2420
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"])) {
2421
- $newOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"] = $oldOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"];
2422
- }
2423
- if (isset($oldOptions["subscriptionType"])) {
2424
- $newOptions[self::TAB_SUBSCRIPTION]["subscriptionType"] = $oldOptions["subscriptionType"];
2425
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["subscriptionType"])) {
2426
- $newOptions[self::TAB_SUBSCRIPTION]["subscriptionType"] = $oldOptions[self::TAB_SUBSCRIPTION]["subscriptionType"];
2427
- }
2428
- if (isset($oldOptions["wc_show_hide_reply_checkbox"])) {
2429
- $newOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"] = $oldOptions["wc_show_hide_reply_checkbox"];
2430
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"])) {
2431
- $newOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"] = $oldOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"];
2432
- }
2433
- if (isset($oldOptions["isReplyDefaultChecked"])) {
2434
- $newOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"] = $oldOptions["isReplyDefaultChecked"];
2435
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"])) {
2436
- $newOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"] = $oldOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"];
2437
- }
2438
- if (isset($oldOptions["wc_use_postmatic_for_comment_notification"])) {
2439
- $newOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"] = $oldOptions["wc_use_postmatic_for_comment_notification"];
2440
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"])) {
2441
- $newOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"] = $oldOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"];
2442
- }
2443
- if (isset($oldOptions["isFollowActive"])) {
2444
- $newOptions[self::TAB_SUBSCRIPTION]["isFollowActive"] = $oldOptions["isFollowActive"];
2445
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["isFollowActive"])) {
2446
- $newOptions[self::TAB_SUBSCRIPTION]["isFollowActive"] = $oldOptions[self::TAB_SUBSCRIPTION]["isFollowActive"];
2447
- }
2448
- if (isset($oldOptions["disableFollowConfirmForUsers"])) {
2449
- $newOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"] = $oldOptions["disableFollowConfirmForUsers"];
2450
- } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"])) {
2451
- $newOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"] = $oldOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"];
2452
- }
2453
- if (isset($oldOptions["wc_blog_roles"])) {
2454
- $newOptions[self::TAB_LABELS]["blogRoles"] = $oldOptions["wc_blog_roles"];
2455
- } else if (isset($oldOptions[self::TAB_LABELS]["blogRoles"])) {
2456
- $newOptions[self::TAB_LABELS]["blogRoles"] = $oldOptions[self::TAB_LABELS]["blogRoles"];
2457
- }
2458
- if (isset($oldOptions["wc_comment_editable_time"])) {
2459
- $newOptions[self::TAB_MODERATION]["commentEditableTime"] = $oldOptions["wc_comment_editable_time"];
2460
- } else if (isset($oldOptions[self::TAB_MODERATION]["commentEditableTime"])) {
2461
- $newOptions[self::TAB_MODERATION]["commentEditableTime"] = $oldOptions[self::TAB_MODERATION]["commentEditableTime"];
2462
- }
2463
- if (isset($oldOptions["enableStickButton"])) {
2464
- $newOptions[self::TAB_MODERATION]["enableStickButton"] = $oldOptions["enableStickButton"];
2465
- } else if (isset($oldOptions[self::TAB_MODERATION]["enableStickButton"])) {
2466
- $newOptions[self::TAB_MODERATION]["enableStickButton"] = $oldOptions[self::TAB_MODERATION]["enableStickButton"];
2467
- }
2468
- if (isset($oldOptions["enableCloseButton"])) {
2469
- $newOptions[self::TAB_MODERATION]["enableCloseButton"] = $oldOptions["enableCloseButton"];
2470
- } else if (isset($oldOptions[self::TAB_MODERATION]["enableCloseButton"])) {
2471
- $newOptions[self::TAB_MODERATION]["enableCloseButton"] = $oldOptions[self::TAB_MODERATION]["enableCloseButton"];
2472
- }
2473
- if (isset($oldOptions["wc_comment_text_min_length"])) {
2474
- $newOptions[self::TAB_CONTENT]["commentTextMinLength"] = $oldOptions["wc_comment_text_min_length"];
2475
- } else if (isset($oldOptions[self::TAB_CONTENT]["commentTextMinLength"])) {
2476
- $newOptions[self::TAB_CONTENT]["commentTextMinLength"] = $oldOptions[self::TAB_CONTENT]["commentTextMinLength"];
2477
- }
2478
- if (isset($oldOptions["wc_comment_text_max_length"])) {
2479
- $newOptions[self::TAB_CONTENT]["commentTextMaxLength"] = $oldOptions["wc_comment_text_max_length"];
2480
- } else if (isset($oldOptions[self::TAB_CONTENT]["commentTextMaxLength"])) {
2481
- $newOptions[self::TAB_CONTENT]["commentTextMaxLength"] = $oldOptions[self::TAB_CONTENT]["commentTextMaxLength"];
2482
- }
2483
- if (isset($oldOptions["enableImageConversion"])) {
2484
- $newOptions[self::TAB_CONTENT]["enableImageConversion"] = $oldOptions["enableImageConversion"];
2485
- } else if (isset($oldOptions[self::TAB_CONTENT]["enableImageConversion"])) {
2486
- $newOptions[self::TAB_CONTENT]["enableImageConversion"] = $oldOptions[self::TAB_CONTENT]["enableImageConversion"];
2487
- }
2488
- if (isset($oldOptions["commentWordsLimit"])) {
2489
- $newOptions[self::TAB_CONTENT]["commentReadMoreLimit"] = $oldOptions["commentWordsLimit"];
2490
- } else if (isset($oldOptions[self::TAB_CONTENT]["commentReadMoreLimit"])) {
2491
- $newOptions[self::TAB_CONTENT]["commentReadMoreLimit"] = $oldOptions[self::TAB_CONTENT]["commentReadMoreLimit"];
2492
- }
2493
- if (isset($oldOptions["wc_comment_list_update_type"])) {
2494
- $newOptions[self::TAB_LIVE]["commentListUpdateType"] = $oldOptions["wc_comment_list_update_type"] == 2 ? 0 : $oldOptions["wc_comment_list_update_type"];
2495
- } else if (isset($oldOptions[self::TAB_LIVE]["commentListUpdateType"])) {
2496
- $newOptions[self::TAB_LIVE]["commentListUpdateType"] = $oldOptions[self::TAB_LIVE]["commentListUpdateType"];
2497
- }
2498
- if (isset($oldOptions["wc_live_update_guests"])) {
2499
- $newOptions[self::TAB_LIVE]["liveUpdateGuests"] = (int) !$oldOptions["wc_live_update_guests"];
2500
- } else if (isset($oldOptions[self::TAB_LIVE]["liveUpdateGuests"])) {
2501
- $newOptions[self::TAB_LIVE]["liveUpdateGuests"] = $oldOptions[self::TAB_LIVE]["liveUpdateGuests"];
2502
- }
2503
- if (isset($oldOptions["wc_comment_list_update_timer"])) {
2504
- $newOptions[self::TAB_CONTENT]["commentListUpdateTimer"] = $oldOptions["wc_comment_list_update_timer"];
2505
- } else if (isset($oldOptions[self::TAB_CONTENT]["commentListUpdateTimer"])) {
2506
- $newOptions[self::TAB_CONTENT]["commentListUpdateTimer"] = $oldOptions[self::TAB_CONTENT]["commentListUpdateTimer"];
2507
- }
2508
- if (isset($oldOptions["isEnableOnHome"])) {
2509
- $newOptions[self::TAB_GENERAL]["isEnableOnHome"] = $oldOptions["isEnableOnHome"];
2510
- } else if (isset($oldOptions[self::TAB_GENERAL]["isEnableOnHome"])) {
2511
- $newOptions[self::TAB_GENERAL]["isEnableOnHome"] = $oldOptions[self::TAB_GENERAL]["isEnableOnHome"];
2512
- }
2513
- if (isset($oldOptions["isNativeAjaxEnabled"])) {
2514
- $newOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"] = $oldOptions["isNativeAjaxEnabled"];
2515
- } else if (isset($oldOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"])) {
2516
- $newOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"] = $oldOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"];
2517
- }
2518
- if (isset($oldOptions["commentLinkFilter"])) {
2519
- $newOptions[self::TAB_GENERAL]["commentLinkFilter"] = $oldOptions["commentLinkFilter"];
2520
- } else if (isset($oldOptions[self::TAB_GENERAL]["commentLinkFilter"])) {
2521
- $newOptions[self::TAB_GENERAL]["commentLinkFilter"] = $oldOptions[self::TAB_GENERAL]["commentLinkFilter"];
2522
- }
2523
- if (isset($oldOptions["wpdiscuz_redirect_page"])) {
2524
- $newOptions[self::TAB_GENERAL]["redirectPage"] = $oldOptions["wpdiscuz_redirect_page"];
2525
- } else if (isset($oldOptions[self::TAB_GENERAL]["redirectPage"])) {
2526
- $newOptions[self::TAB_GENERAL]["redirectPage"] = $oldOptions[self::TAB_GENERAL]["redirectPage"];
2527
- }
2528
- if (isset($oldOptions["wc_simple_comment_date"])) {
2529
- $newOptions[self::TAB_GENERAL]["simpleCommentDate"] = $oldOptions["wc_simple_comment_date"];
2530
- } else if (isset($oldOptions[self::TAB_GENERAL]["simpleCommentDate"])) {
2531
- $newOptions[self::TAB_GENERAL]["simpleCommentDate"] = $oldOptions[self::TAB_GENERAL]["simpleCommentDate"];
2532
- }
2533
- if (isset($oldOptions["wc_is_use_po_mo"])) {
2534
- $newOptions[self::TAB_GENERAL]["isUsePoMo"] = $oldOptions["wc_is_use_po_mo"];
2535
- } else if (isset($oldOptions[self::TAB_GENERAL]["isUsePoMo"])) {
2536
- $newOptions[self::TAB_GENERAL]["isUsePoMo"] = $oldOptions[self::TAB_GENERAL]["isUsePoMo"];
2537
- }
2538
- if (isset($oldOptions["wc_show_plugin_powerid_by"])) {
2539
- $newOptions[self::TAB_GENERAL]["showPluginPoweredByLink"] = $oldOptions["wc_show_plugin_powerid_by"];
2540
- } else if (isset($oldOptions[self::TAB_GENERAL]["showPluginPoweredByLink"])) {
2541
- $newOptions[self::TAB_GENERAL]["showPluginPoweredByLink"] = $oldOptions[self::TAB_GENERAL]["showPluginPoweredByLink"];
2542
- }
2543
- if (isset($oldOptions["isGravatarCacheEnabled"])) {
2544
- $newOptions[self::TAB_GENERAL]["isGravatarCacheEnabled"] = $oldOptions["isGravatarCacheEnabled"];
2545
- } else if (isset($oldOptions[self::TAB_GENERAL]["isGravatarCacheEnabled"])) {
2546
- $newOptions[self::TAB_GENERAL]["isGravatarCacheEnabled"] = $oldOptions[self::TAB_GENERAL]["isGravatarCacheEnabled"];
2547
- }
2548
- if (isset($oldOptions["gravatarCacheMethod"])) {
2549
- $newOptions[self::TAB_GENERAL]["gravatarCacheMethod"] = $oldOptions["gravatarCacheMethod"];
2550
- } else if (isset($oldOptions[self::TAB_GENERAL]["gravatarCacheMethod"])) {
2551
- $newOptions[self::TAB_GENERAL]["gravatarCacheMethod"] = $oldOptions[self::TAB_GENERAL]["gravatarCacheMethod"];
2552
- }
2553
- if (isset($oldOptions["gravatarCacheTimeout"])) {
2554
- $newOptions[self::TAB_GENERAL]["gravatarCacheTimeout"] = $oldOptions["gravatarCacheTimeout"];
2555
- } else if (isset($oldOptions[self::TAB_GENERAL]["gravatarCacheTimeout"])) {
2556
- $newOptions[self::TAB_GENERAL]["gravatarCacheTimeout"] = $oldOptions[self::TAB_GENERAL]["gravatarCacheTimeout"];
2557
- }
2558
- if ($update) {
2559
- $this->initOptions($newOptions);
2560
- $this->updateOptions();
2561
- }
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" => [
2574
- WpdiscuzCore::TAB_FORM => [
2575
- "title" => esc_html__("Comment Form Settings", "wpdiscuz"),
2576
- "title_original" => "Comment Form Settings",
2577
- "icon" => "box-forms.png",
2578
- "icon-height" => "50px",
2579
- "status" => "ok",
2580
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_FORM . ".php",
2581
- "options" => [
2582
- "storeCommenterData" => [
2583
- "label" => esc_html__("Keep guest commenter credentials in browser cookies for X days", "wpdiscuz"),
2584
- "label_original" => "Keep guest commenter credentials in browser cookies for X days",
2585
- "description" => esc_html__("wpDiscuz uses WordPress functions to keep guest Name, Email and Website information in cookies. Those are used to fill according fields of comment form on next commenting time. Set this option value -1 to make it unlimited. Set this option value 0 to clear those data when user closes browser.", "wpdiscuz"),
2586
- "description_original" => "wpDiscuz uses WordPress functions to keep guest Name, Email and Website information in cookies. Those are used to fill according fields of comment form on next commenting time. Set this option value -1 to make it unlimited. Set this option value 0 to clear those data when user closes browser.",
2587
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#keep-guest-commenter-credentials-in-browser-cookies-for-x-days"
2588
- ],
2589
- "commenterNameLength" => [
2590
- "label" => esc_html__("Comment author name length (for guests only)", "wpdiscuz"),
2591
- "label_original" => "Comment author name length (for guests only)",
2592
- "description" => "",
2593
- "description_original" => "",
2594
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#comment-author-name-length-for-guests-only"
2595
- ],
2596
- "commentFormView" => [
2597
- "label" => esc_html__("Comment Form View", "wpdiscuz"),
2598
- "label_original" => "Comment Form View",
2599
- "description" => esc_html__('By default, only the comment text field is visible. When you click on the comment text field it opens all other fields (Name, Email, Website, etc...). If you want to keep all fields open, please set this option "expended".', "wpdiscuz"),
2600
- "description_original" => 'By default, only the comment text field is visible. When you click on the comment text field it opens all other fields (Name, Email, Website, etc...). If you want to keep all fields open, please set this option "expended".',
2601
- "docurl" => ""
2602
- ],
2603
- "enableDropAnimation" => [
2604
- "label" => esc_html__("Enable drop animation for comment form and subscription bar", "wpdiscuz"),
2605
- "label_original" => "Enable drop animation for comment form and subscription bar",
2606
- "description" => "",
2607
- "description_original" => "",
2608
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#enable-drop-animation-for-comment-form-and-subscription-bar"
2609
- ],
2610
- "richEditor" => [
2611
- "label" => esc_html__("Load Rich Editor", "wpdiscuz"),
2612
- "label_original" => "Load Rich Editor for",
2613
- "description" => esc_html__("Search engines rank web pages for mobile devices totally different. For the mobile devices, there are more restrictions for JS and CSS files loading. This is the main reason why wpDiscuz disables the Rich Editor for mobile devices by default. It's only enabled for desktop. If you have good cache and website optimizer plugins you can enable the rich editor for mobile devices as well.", "wpdiscuz"),
2614
- "description_original" => "Search engines rank web pages for mobile devices totally different. For the mobile devices, there are more restrictions for JS and CSS files loading. This is the main reason why wpDiscuz disables the Rich Editor for mobile devices by default. It's only enabled for desktop. If you have good cache and website optimizer plugins you can enable the rich editor for mobile devices as well.",
2615
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#load-rich-editor"
2616
- ],
2617
- "editorToolbar" => [
2618
- "label" => esc_html__("Rich Editor Toolbar Buttons", "wpdiscuz"),
2619
- "label_original" => "Rich Editor Toolbar Buttons",
2620
- "description" => esc_html__("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.", "wpdiscuz"),
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 => [
2634
- "title" => esc_html__("Google reCAPTCHA", "wpdiscuz"),
2635
- "title_original" => "Google reCAPTCHA",
2636
- "icon" => "box-recaptcha.png",
2637
- "icon-height" => "56px",
2638
- "status" => $this->recaptcha["siteKey"] && $this->recaptcha["secretKey"] ? "ok" : "note",
2639
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_RECAPTCHA . ".php",
2640
- "options" => [
2641
- "siteKey" => [
2642
- "label" => esc_html__("Site Key", "wpdiscuz"),
2643
- "label_original" => "Site Key",
2644
- "description" => "",
2645
- "description_original" => "",
2646
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#site-keys"
2647
- ],
2648
- "secretKey" => [
2649
- "label" => esc_html__("Secret Key", "wpdiscuz"),
2650
- "label_original" => "Secret Key",
2651
- "description" => "",
2652
- "description_original" => "",
2653
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#recaptcha-version-2-%E2%80%93-site-key-and-secret-key"
2654
- ],
2655
- "theme" => [
2656
- "label" => esc_html__("reCAPTCHA Theme", "wpdiscuz"),
2657
- "label_original" => "reCAPTCHA Theme",
2658
- "description" => "",
2659
- "description_original" => "",
2660
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#recaptcha-theme"
2661
- ],
2662
- "lang" => [
2663
- "label" => esc_html__("reCAPTCHA Language", "wpdiscuz"),
2664
- "label_original" => "reCAPTCHA Language",
2665
- "description" => "",
2666
- "description_original" => "",
2667
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#recaptcha-language"
2668
- ],
2669
- "requestMethod" => [
2670
- "label" => esc_html__("Request Method", "wpdiscuz"),
2671
- "label_original" => "Request Method",
2672
- "description" => "",
2673
- "description_original" => "",
2674
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#request-method"
2675
- ],
2676
- "showForGuests" => [
2677
- "label" => esc_html__("Enable for Guests", "wpdiscuz"),
2678
- "label_original" => "Enable for Guests",
2679
- "description" => "",
2680
- "description_original" => "",
2681
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#enable-for-guests"
2682
- ],
2683
- "showForUsers" => [
2684
- "label" => esc_html__("Enable for Logged-in Users", "wpdiscuz"),
2685
- "label_original" => "Enable for Logged-in Users",
2686
- "description" => "",
2687
- "description_original" => "",
2688
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#enable-for-logged-in-users"
2689
- ],
2690
- "isShowOnSubscribeForm" => [
2691
- "label" => esc_html__("Display on Subscription Form", "wpdiscuz"),
2692
- "label_original" => "Display on Subscription Form",
2693
- "description" => "",
2694
- "label_original" => "",
2695
- "description_original" => "",
2696
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#display-on-subscription-form"
2697
- ],
2698
- ]
2699
- ],
2700
- WpdiscuzCore::TAB_LOGIN => [
2701
- "title" => esc_html__("User Authorization and Profile Data", "wpdiscuz"),
2702
- "title_original" => "User Authorization and Profile Data",
2703
- "icon" => "box-login.png",
2704
- "icon-height" => "65px",
2705
- "status" => "ok",
2706
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_LOGIN . ".php",
2707
- "options" => [
2708
- "showLoggedInUsername" => [
2709
- "label" => esc_html__("Display logged-in user name and logout link on comment form", "wpdiscuz"),
2710
- "label_original" => "Display logged-in user name and logout link on comment form",
2711
- "description" => "",
2712
- "description_original" => "",
2713
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#display-logged-in-user-name-and-logout-link-on-comment-form"
2714
- ],
2715
- "showLoginLinkForGuests" => [
2716
- "label" => esc_html__('Show "Login" link on comment form', "wpdiscuz"),
2717
- "label_original" => 'Show "Login" link on comment form',
2718
- "description" => "",
2719
- "description_original" => "",
2720
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#show-%E2%80%9Clogin%E2%80%9D-link-on-comment-form"
2721
- ],
2722
- "myContentSettings" => [
2723
- "label" => esc_html__('"My Content and Settings" button', "wpdiscuz"),
2724
- "label_original" => '"My Content and Settings" button',
2725
- "description" => esc_html__('The "My Content & Settings" button is located in comment filter panel on top of all comments, right after the [X Comments] phrase. This button opens a pop-up window allowing commenters manage their content and settings.', "wpdiscuz"),
2726
- "description_original" => 'The "My Content & Settings" button is located in comment filter panel on top of all comments, right after the [X Comments] phrase. This button opens a pop-up window allowing commenters manage their content and settings.',
2727
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#%E2%80%9Cmy-content-and-settings%E2%80%9D-button"
2728
- ],
2729
- "enableProfileURLs" => [
2730
- "label" => esc_html__("Enable Profiles URL", "wpdiscuz"),
2731
- "label_original" => "Enable Profiles URL",
2732
- "description" => sprintf(esc_html__("By default wpDiscuz adds a link with comment author avatar to the author profile page, you can disable this link using this option. However in case you use some plugin with User Profile page, you should keep this option enabled. wpDiscuz is well integrated with %s, BuddyPress and Ultimate Member profile builder plugins.", "wpdiscuz"), "<a href='https://wordpress.org/plugins/wpforo/' target='_blank'>wpForo Forum</a>"),
2733
- "description_original" => "By default wpDiscuz adds a link with comment author avatar to the author profile page, you can disable this link using this option. However in case you use some plugin with User Profile page, you should keep this option enabled. wpDiscuz is well integrated with <a href='https://wordpress.org/plugins/wpforo/' target='_blank'>wpForo Forum</a>, BuddyPress and Ultimate Member profile builder plugins.",
2734
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#enable-profiles-url"
2735
- ],
2736
- "websiteAsProfileUrl" => [
2737
- "label" => esc_html__("Use Website URL as Profile URL", "wpdiscuz"),
2738
- "label_original" => "Use Website URL as Profile URL",
2739
- "description" => "",
2740
- "description_original" => "",
2741
- "docurl" => ""
2742
- ],
2743
- "isUserByEmail" => [
2744
- "label" => esc_html__("Use guest email to detect registered account", "wpdiscuz"),
2745
- "label_original" => "Use guest email to detect registered account",
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 => [
2760
- "title" => esc_html__("Social Login and Share", "wpdiscuz"),
2761
- "title_original" => "Social Login and Share",
2762
- "icon" => "box-social.png",
2763
- "icon-height" => "80px",
2764
- "status" => "ok",
2765
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_SOCIAL . ".php",
2766
- "options" => [
2767
- "socialLoginAgreementCheckbox" => [
2768
- "label" => esc_html__("User agreement prior to a social login action", "wpdiscuz"),
2769
- "label_original" => "User agreement prior to a social login action",
2770
- "description" => esc_html__("If this option is enabled, all Social Login buttons become not-clickable until user accept automatic account creation process based on his/her Social Network Account shared information (email, name). This checkbox and appropriate information will be displayed when user click on a social login button, prior to the login process. This extra step is added to comply with the GDPR", "wpdiscuz") . " <a href='https://gdpr-info.eu/art-22-gdpr/' target='_blank' rel='noreferrer'>(Article 22).</a> <br>" . esc_html__("The note text and the label of this checkbox can be managed in Comments > Phrases > Social Login tab.", "wpdiscuz"),
2771
- "description_original" => "If this option is enabled, all Social Login buttons become not-clickable until user accept automatic account creation process based on his/her Social Network Account shared information (email, name). This checkbox and appropriate information will be displayed when user click on a social login button, prior to the login process. This extra step is added to comply with the GDPR <a href='https://gdpr-info.eu/art-22-gdpr/' target='_blank' rel='noreferrer'>(Article 22).</a> <br>The note text and the label of this checkbox can be managed in Comments > Phrases > Social Login tab.",
2772
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/#user-agreement-prior-to-a-social-login-action"
2773
- ],
2774
- "socialLoginInSecondaryForm" => [
2775
- "label" => esc_html__("Display social login buttons on reply forms", "wpdiscuz"),
2776
- "label_original" => "Display social login buttons on reply forms",
2777
- "description" => "",
2778
- "description_original" => "",
2779
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/#display-social-login-buttons-on-reply-forms"
2780
- ],
2781
- "displayIconOnAvatar" => [
2782
- "label" => esc_html__("Display Social Network Icon on User Avatars", "wpdiscuz"),
2783
- "label_original" => "Display Social Network Icon on User Avatars",
2784
- "description" => "",
2785
- "description_original" => "",
2786
- "docurl" => ""
2787
- ],
2788
- "enableFbLogin" => [
2789
- "label" => esc_html__("Facebook Login Button", "wpdiscuz"),
2790
- "label_original" => "Facebook Login Button",
2791
- "description" => "",
2792
- "description_original" => "",
2793
- "docurl" => ""
2794
- ],
2795
- "fbUseOAuth2" => [
2796
- "label" => esc_html__("Use Facebook OAuth2", "wpdiscuz"),
2797
- "label_original" => "Use Facebook OAuth2",
2798
- "description" => esc_html__("If you enable this option, please make sure you've inserted the Valid OAuth Redirect URI in according field when you create Facebook Login App. Your website OAuth Redirect URI is displayed above.", "wpdiscuz"),
2799
- "description_original" => "If you enable this option, please make sure you've inserted the Valid OAuth Redirect URI in according field when you create Facebook Login App. Your website OAuth Redirect URI is displayed above.",
2800
- "docurl" => ""
2801
- ],
2802
- "enableFbShare" => [
2803
- "label" => esc_html__("Facebook Share Button", "wpdiscuz"),
2804
- "label_original" => "Facebook Share Button",
2805
- "description" => "",
2806
- "description_original" => "",
2807
- "docurl" => ""
2808
- ],
2809
- "fbAppID" => [
2810
- "label" => esc_html__("Facebook Application ID", "wpdiscuz"),
2811
- "label_original" => "Facebook Application ID",
2812
- "description" => "",
2813
- "description_original" => "",
2814
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/facebook-app-configuration/"
2815
- ],
2816
- "fbAppSecret" => [
2817
- "label" => esc_html__("Facebook Application Secret", "wpdiscuz"),
2818
- "label_original" => "Facebook Application Secret",
2819
- "description" => "",
2820
- "description_original" => "",
2821
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/facebook-app-configuration/"
2822
- ],
2823
- "enableTwitterLogin" => [
2824
- "label" => esc_html__("Twitter Login Button", "wpdiscuz"),
2825
- "label_original" => "Twitter Login Button",
2826
- "description" => "",
2827
- "description_original" => "",
2828
- "docurl" => ""
2829
- ],
2830
- "enableTwitterShare" => [
2831
- "label" => esc_html__("Twitter Share Button", "wpdiscuz"),
2832
- "label_original" => "Twitter Share Button",
2833
- "description" => "",
2834
- "description_original" => "",
2835
- "docurl" => ""
2836
- ],
2837
- "twitterAppID" => [
2838
- "label" => esc_html__("Twitter - Consumer Key (API Key)", "wpdiscuz"),
2839
- "label_original" => "Twitter - Consumer Key (API Key)",
2840
- "description" => "",
2841
- "description_original" => "",
2842
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/twitter-app-configuration/"
2843
- ],
2844
- "twitterAppSecret" => [
2845
- "label" => esc_html__("Twitter - Consumer Secret (API Secret)", "wpdiscuz"),
2846
- "label_original" => "Twitter - Consumer Secret (API Secret)",
2847
- "description" => "",
2848
- "description_original" => "",
2849
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/twitter-app-configuration/"
2850
- ],
2851
- "enableGoogleLogin" => [
2852
- "label" => esc_html__("Google Login Button", "wpdiscuz"),
2853
- "label_original" => "Google Login Button",
2854
- "description" => "",
2855
- "description_original" => "",
2856
- "docurl" => ""
2857
- ],
2858
- "googleClientID" => [
2859
- "label" => esc_html__("Google Client ID", "wpdiscuz"),
2860
- "label_original" => "Google Client ID",
2861
- "description" => "",
2862
- "description_original" => "",
2863
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/google-app-configuration/"
2864
- ],
2865
- "googleClientSecret" => [
2866
- "label" => esc_html__("Google Client Secret", "wpdiscuz"),
2867
- "label_original" => "Google Client Secret",
2868
- "description" => "",
2869
- "description_original" => "",
2870
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/google-app-configuration/"
2871
- ],
2872
- "enableDisqusLogin" => [
2873
- "label" => esc_html__("Disqus Login Button", "wpdiscuz"),
2874
- "label_original" => "Disqus Login Button",
2875
- "description" => "",
2876
- "description_original" => "",
2877
- "docurl" => ""
2878
- ],
2879
- "disqusPublicKey" => [
2880
- "label" => esc_html__("Disqus Public Key", "wpdiscuz"),
2881
- "label_original" => "Disqus Public Key",
2882
- "description" => "",
2883
- "description_original" => "",
2884
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/disqus-app-configuration/"
2885
- ],
2886
- "disqusSecretKey" => [
2887
- "label" => esc_html__("Disqus Secret Key", "wpdiscuz"),
2888
- "label_original" => "Disqus Secret Key",
2889
- "description" => "",
2890
- "description_original" => "",
2891
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/disqus-app-configuration/"
2892
- ],
2893
- "enableWordpressLogin" => [
2894
- "label" => esc_html__("WordPress Login Button", "wpdiscuz"),
2895
- "label_original" => "WordPress Login Button",
2896
- "description" => "",
2897
- "description_original" => "",
2898
- "docurl" => ""
2899
- ],
2900
- "wordpressClientID" => [
2901
- "label" => esc_html__("WordPress Client ID", "wpdiscuz"),
2902
- "label_original" => "WordPress Client ID",
2903
- "description" => "",
2904
- "description_original" => "",
2905
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/wordpress-com-app-configuration/"
2906
- ],
2907
- "wordpressClientSecret" => [
2908
- "label" => esc_html__("WordPress Client Secret", "wpdiscuz"),
2909
- "label_original" => "WordPress Client Secret",
2910
- "description" => "",
2911
- "description_original" => "",
2912
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/wordpress-com-app-configuration/"
2913
- ],
2914
- "enableInstagramLogin" => [
2915
- "label" => esc_html__("Instagram Login Button", "wpdiscuz"),
2916
- "label_original" => "Instagram Login Button",
2917
- "description" => "",
2918
- "description_original" => "",
2919
- "docurl" => ""
2920
- ],
2921
- "instagramAppID" => [
2922
- "label" => esc_html__("Instagram App ID", "wpdiscuz"),
2923
- "label_original" => "Instagram App ID",
2924
- "description" => "",
2925
- "description_original" => "",
2926
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/instagram-app-configuration/"
2927
- ],
2928
- "instagramAppSecret" => [
2929
- "label" => esc_html__("Instagram App Secret", "wpdiscuz"),
2930
- "label_original" => "Instagram App Secret",
2931
- "description" => "",
2932
- "description_original" => "",
2933
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/instagram-app-configuration/"
2934
- ],
2935
- "enableLinkedinLogin" => [
2936
- "label" => esc_html__("LinkedIn Login Button", "wpdiscuz"),
2937
- "label_original" => "LinkedIn Login Button",
2938
- "description" => "",
2939
- "description_original" => "",
2940
- "docurl" => ""
2941
- ],
2942
- "linkedinClientID" => [
2943
- "label" => esc_html__("LinkedIn Client ID", "wpdiscuz"),
2944
- "label_original" => "LinkedIn Client ID",
2945
- "description" => "",
2946
- "description_original" => "",
2947
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/linkedin-app-configuration/"
2948
- ],
2949
- "linkedinClientSecret" => [
2950
- "label" => esc_html__("LinkedIn Client Secret", "wpdiscuz"),
2951
- "label_original" => "LinkedIn Client Secret",
2952
- "description" => "",
2953
- "description_original" => "",
2954
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/linkedin-app-configuration/"
2955
- ],
2956
- "enableWhatsappShare" => [
2957
- "label" => esc_html__("WhatsApp Share Button", "wpdiscuz"),
2958
- "label_original" => "WhatsApp Share Button",
2959
- "description" => "",
2960
- "description_original" => "",
2961
- "docurl" => ""
2962
- ],
2963
- "enableYandexLogin" => [
2964
- "label" => esc_html__("Yandex Login Button", "wpdiscuz"),
2965
- "label_original" => "Yandex Login Button",
2966
- "description" => "",
2967
- "description_original" => "",
2968
- "docurl" => ""
2969
- ],
2970
- "yandexID" => [
2971
- "label" => esc_html__("Yandex ID", "wpdiscuz"),
2972
- "label_original" => "Yandex ID",
2973
- "description" => "",
2974
- "description_original" => "",
2975
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/yandex-app-configuration/"
2976
- ],
2977
- "yandexPassword" => [
2978
- "label" => esc_html__("Yandex Password", "wpdiscuz"),
2979
- "label_original" => "Yandex Password",
2980
- "description" => "",
2981
- "description_original" => "",
2982
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/yandex-app-configuration/"
2983
- ],
2984
- "enableMailruLogin" => [
2985
- "label" => esc_html__("Mail.ru Login Button", "wpdiscuz"),
2986
- "label_original" => "Mail.ru Login Button",
2987
- "description" => "",
2988
- "description_original" => "",
2989
- "docurl" => ""
2990
- ],
2991
- "mailruClientID" => [
2992
- "label" => esc_html__("Mail.ru Client ID", "wpdiscuz"),
2993
- "label_original" => "Mail.ru Client ID",
2994
- "description" => "",
2995
- "description_original" => "",
2996
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/mail-ru-app-configuration/"
2997
- ],
2998
- "mailruClientSecret" => [
2999
- "label" => esc_html__("Mail.ru Client Secret", "wpdiscuz"),
3000
- "label_original" => "Mail.ru Client Secret",
3001
- "description" => "",
3002
- "description_original" => "",
3003
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/mail-ru-app-configuration/"
3004
- ],
3005
- "enableWeiboLogin" => [
3006
- "label" => esc_html__("Weibo Login Button", "wpdiscuz"),
3007
- "label_original" => "Weibo Login Button",
3008
- "description" => "",
3009
- "description_original" => "",
3010
- "docurl" => ""
3011
- ],
3012
- "weiboKey" => [
3013
- "label" => esc_html__("Weibo App Key", "wpdiscuz"),
3014
- "label_original" => "Weibo App Key",
3015
- "description" => "",
3016
- "description_original" => "",
3017
- "docurl" => ""
3018
- ],
3019
- "weiboSecret" => [
3020
- "label" => esc_html__("Weibo App Secret", "wpdiscuz"),
3021
- "label_original" => "Weibo App Secret",
3022
- "description" => "",
3023
- "description_original" => "",
3024
- "docurl" => ""
3025
- ],
3026
- "enableWechatLogin" => [
3027
- "label" => esc_html__("WeChat Login Button", "wpdiscuz"),
3028
- "label_original" => "WeChat Login Button",
3029
- "description" => "",
3030
- "description_original" => "",
3031
- "docurl" => ""
3032
- ],
3033
- "wechatAppID" => [
3034
- "label" => esc_html__("WeChat App ID", "wpdiscuz"),
3035
- "label_original" => "WeChat App ID",
3036
- "description" => "",
3037
- "description_original" => "",
3038
- "docurl" => ""
3039
- ],
3040
- "wechatSecret" => [
3041
- "label" => esc_html__("WeChat Secret", "wpdiscuz"),
3042
- "label_original" => "WeChat Secret",
3043
- "description" => "",
3044
- "description_original" => "",
3045
- "docurl" => ""
3046
- ],
3047
- "enableQQLogin" => [
3048
- "label" => esc_html__("QQ Login Button", "wpdiscuz"),
3049
- "label_original" => "QQ Login Button",
3050
- "description" => "",
3051
- "description_original" => "",
3052
- "docurl" => ""
3053
- ],
3054
- "qqAppID" => [
3055
- "label" => esc_html__("QQ AppID", "wpdiscuz"),
3056
- "label_original" => "QQ AppID",
3057
- "description" => "",
3058
- "description_original" => "",
3059
- "docurl" => ""
3060
- ],
3061
- "qqSecret" => [
3062
- "label" => esc_html__("QQ AppKey", "wpdiscuz"),
3063
- "label_original" => "QQ AppKey",
3064
- "description" => "",
3065
- "description_original" => "",
3066
- "docurl" => ""
3067
- ],
3068
- "enableBaiduLogin" => [
3069
- "label" => esc_html__("Baidu Login Button", "wpdiscuz"),
3070
- "label_original" => "Baidu Login Button",
3071
- "description" => "",
3072
- "description_original" => "",
3073
- "docurl" => ""
3074
- ],
3075
- "baiduAppID" => [
3076
- "label" => esc_html__("Baidu Client ID", "wpdiscuz"),
3077
- "label_original" => "Baidu Client ID",
3078
- "description" => "",
3079
- "description_original" => "",
3080
- "docurl" => ""
3081
- ],
3082
- "baiduSecret" => [
3083
- "label" => esc_html__("Baidu Client Secret", "wpdiscuz"),
3084
- "label_original" => "Baidu Client Secret",
3085
- "description" => "",
3086
- "description_original" => "",
3087
- "docurl" => ""
3088
- ],
3089
- "enableVkLogin" => [
3090
- "label" => esc_html__("VK Login Button", "wpdiscuz"),
3091
- "label_original" => "VK Login Button",
3092
- "description" => "",
3093
- "description_original" => "",
3094
- "docurl" => ""
3095
- ],
3096
- "enableVkShare" => [
3097
- "label" => esc_html__("VK Share Button", "wpdiscuz"),
3098
- "label_original" => "VK Share Button",
3099
- "description" => "",
3100
- "description_original" => "",
3101
- "docurl" => ""
3102
- ],
3103
- "vkAppID" => [
3104
- "label" => esc_html__("VK Application ID", "wpdiscuz"),
3105
- "label_original" => "VK Application ID",
3106
- "description" => "",
3107
- "description_original" => "",
3108
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/vk-app-configuration/"
3109
- ],
3110
- "vkAppSecret" => [
3111
- "label" => esc_html__("VK Secure Key", "wpdiscuz"),
3112
- "label_original" => "VK Secure Key",
3113
- "description" => "",
3114
- "description_original" => "",
3115
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/vk-app-configuration/"
3116
- ],
3117
- "enableOkLogin" => [
3118
- "label" => esc_html__("OK Login Button", "wpdiscuz"),
3119
- "label_original" => "OK Login Button",
3120
- "description" => "",
3121
- "description_original" => "",
3122
- "docurl" => ""
3123
- ],
3124
- "enableOkShare" => [
3125
- "label" => esc_html__("OK Share Button", "wpdiscuz"),
3126
- "label_original" => "OK Share Button",
3127
- "description" => "",
3128
- "description_original" => "",
3129
- "docurl" => ""
3130
- ],
3131
- "okAppID" => [
3132
- "label" => esc_html__("OK Application ID", "wpdiscuz"),
3133
- "label_original" => "OK Application ID",
3134
- "description" => "",
3135
- "description_original" => "",
3136
- "docurl" => "https://apiok.ru/en/dev/app/create"
3137
- ],
3138
- "okAppKey" => [
3139
- "label" => esc_html__("OK Application Key", "wpdiscuz"),
3140
- "label_original" => "OK Application Key",
3141
- "description" => "",
3142
- "description_original" => "",
3143
- "docurl" => "https://apiok.ru/en/dev/app/create"
3144
- ],
3145
- "okAppSecret" => [
3146
- "label" => esc_html__("OK Application Secret", "wpdiscuz"),
3147
- "label_original" => "OK Application Secret",
3148
- "description" => "",
3149
- "description_original" => "",
3150
- "docurl" => "https://apiok.ru/en/dev/app/create"
3151
- ],
3152
- ]
3153
- ],
3154
- WpdiscuzCore::TAB_RATING => [
3155
- "title" => esc_html__("Article and Comment Rating", "wpdiscuz"),
3156
- "title_original" => "Article and Comment Rating",
3157
- "icon" => "box-rating.png",
3158
- "icon-height" => "46px",
3159
- "status" => "ok",
3160
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_RATING . ".php",
3161
- "options" => [
3162
- "enablePostRatingSchema" => [
3163
- "label" => esc_html__("Enable Aggregate Rating Schema", "wpdiscuz"),
3164
- "label_original" => "Enable Aggregate Rating Schema",
3165
- "description" => esc_html__("Aggregate rating schema is a code integrated with post rating HTML. This enables Google to feature your post ratings and attract customers with it. When searching the internet, people will see your posts search results with star ratings. Even though those results are not at the top of search engine results page, those sites caught people attention first.", "wpdiscuz"),
3166
- "description_original" => "Aggregate rating schema is a code integrated with post rating HTML. This enables Google to feature your post ratings and attract customers with it. When searching the internet, people will see your posts search results with star ratings. Even though those results are not at the top of search engine results page, those sites caught people attention first.",
3167
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/article-and-comment-rating/#enable-aggregate-rating-schema"
3168
- ],
3169
- "displayRatingOnPost" => [
3170
- "label" => esc_html__("Display Ratings", "wpdiscuz"),
3171
- "label_original" => "Display Ratings",
3172
- "description" => "",
3173
- "description_original" => "",
3174
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/article-and-comment-rating/#display-ratings"
3175
- ],
3176
- "ratingStarColors" => [
3177
- "label" => esc_html__("Rating Star Colors", "wpdiscuz"),
3178
- "label_original" => "Rating Star Colors",
3179
- "description" => "",
3180
- "description_original" => "",
3181
- "docurl" => ""
3182
- ]
3183
- ]
3184
- ],
3185
- WpdiscuzCore::TAB_THREAD_DISPLAY => [
3186
- "title" => esc_html__("Comment Thread Displaying", "wpdiscuz"),
3187
- "title_original" => "Comment Thread Displaying",
3188
- "icon" => "box-threads.png",
3189
- "icon-height" => "58px",
3190
- "status" => "ok",
3191
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_THREAD_DISPLAY . ".php",
3192
- "options" => [
3193
- "firstLoadWithAjax" => [
3194
- "label" => esc_html__("Comment List Loading Type", "wpdiscuz"),
3195
- "label_original" => "Comment List Loading Type",
3196
- "description" => esc_html__("Keep your page loading speed high by disabling comments loading. Once the page loading is complete, this option will initiate AJAX request and load comments without affecting page loading speed. Also, you can select the [View Comments] button option to allow visitors load comments manually whenever they want.", "wpdiscuz"),
3197
- "description_original" => "Keep your page loading speed high by disabling comments loading. Once the page loading is complete, this option will initiate AJAX request and load comments without affecting page loading speed. Also, you can select the [View Comments] button option to allow visitors load comments manually whenever they want.",
3198
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#comment-list-loading-type"
3199
- ],
3200
- "isLoadOnlyParentComments" => [
3201
- "label" => __("Display only parent comments and <u>view replies &or;</u> button", "wpdiscuz"),
3202
- "label_original" => "Display only parent comments and <u>view replies &or;</u> button",
3203
- "description" => esc_html__("If this option is enabled only parent comments will be displayed. This increases page load speed and keeps pages light. If visitor wants to read replies he/she just need to click on [view replies (12)] button located on all parent comments which have replies.", "wpdiscuz"),
3204
- "description_original" => "If this option is enabled only parent comments will be displayed. This increases page load speed and keeps pages light. If visitor wants to read replies he/she just need to click on [view replies (12)] button located on all parent comments which have replies.",
3205
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#display-only-parent-comments-and-view-replies-%E2%88%A8-button"
3206
- ],
3207
- "showReactedFilterButton" => [
3208
- "label" => esc_html__('Display "Most Reacted Comments" filter button', "wpdiscuz"),
3209
- "label_original" => 'Display "Most Reacted Comments" filter button',
3210
- "description" => "",
3211
- "description_original" => "",
3212
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#display-%E2%80%9Cmost-reacted-comments%E2%80%9D-filter-button"
3213
- ],
3214
- "showHottestFilterButton" => [
3215
- "label" => esc_html__('Display "Hottest Comment Threads" filter button', "wpdiscuz"),
3216
- "label_original" => 'Display "Hottest Comment Threads" filter button',
3217
- "description" => "",
3218
- "description_original" => "",
3219
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#display-%E2%80%9Chottest-comment-threads%E2%80%9D-filter-button"
3220
- ],
3221
- "showSortingButtons" => [
3222
- "label" => esc_html__("Display Comment Sorting Options", "wpdiscuz"),
3223
- "label_original" => "Display Comment Sorting Options",
3224
- "description" => esc_html__("This option enables comment sorting buttons (newest | oldest | most voted). Sorting buttons are not available for the default comments pagination type [1][2][3]... It's only active for [Load more] and other AJAX pagination types.", "wpdiscuz"),
3225
- "description_original" => "This option enables comment sorting buttons (newest | oldest | most voted). Sorting buttons are not available for the default comments pagination type [1][2][3]... It's only active for [Load more] and other AJAX pagination types.",
3226
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#display-comment-sorting-options"
3227
- ],
3228
- "mostVotedByDefault" => [
3229
- "label" => esc_html__('Set comments order to "Most voted" by default', "wpdiscuz"),
3230
- "label_original" => 'Set comments order to "Most voted" by default',
3231
- "description" => "",
3232
- "description_original" => "",
3233
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#set-comments-order-to-%E2%80%9Cmost-voted%E2%80%9D-by-default"
3234
- ],
3235
- "reverseChildren" => [
3236
- "label" => esc_html__("Reverse Child Comments Order", "wpdiscuz"),
3237
- "label_original" => "Reverse Child Comments Order",
3238
- "description" => esc_html__("By default child comments are sorted by oldest on top. Using this option you can revers child comments order and sort them by newest on top.", "wpdiscuz"),
3239
- "description_original" => "By default child comments are sorted by oldest on top. Using this option you can revers child comments order and sort them by newest on top.",
3240
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#reverse-child-comments-order"
3241
- ],
3242
- "commentListLoadType" => [
3243
- "label" => esc_html__("Comments Pagination Type", "wpdiscuz"),
3244
- "label_original" => "Comments Pagination Type",
3245
- "description" => esc_html__('You can manage the number of comments for [Load more] option in Settings > Discussion page, using "Break comments into pages with [X] top level comments per page" option. To show the default Wordpress comment pagination you should enable the checkbox on beginning of the same option.', "wpdiscuz"),
3246
- "description_original" => 'You can manage the number of comments for [Load more] option in Settings > Discussion page, using "Break comments into pages with [X] top level comments per page" option. To show the default Wordpress comment pagination you should enable the checkbox on beginning of the same option.',
3247
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#comments-pagination-type"
3248
- ],
3249
- "highlightUnreadComments" => [
3250
- "label" => esc_html__("Highlight Unread Comments", "wpdiscuz"),
3251
- "label_original" => "Highlight Unread Comments",
3252
- "description" => "",
3253
- "description_original" => "",
3254
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#highlight-unread-comments"
3255
- ],
3256
- "scrollToComment" => [
3257
- "label" => __("Scroll to the comment after posting", "wpdiscuz"),
3258
- "label_original" => "Scroll to the comment after posting",
3259
- "description" => "",
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 => [
3273
- "title" => esc_html__("Comment Thread Features", "wpdiscuz"),
3274
- "title_original" => "Comment Thread Features",
3275
- "icon" => "box-layouts.png",
3276
- "icon-height" => "50px",
3277
- "status" => "ok",
3278
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_THREAD_LAYOUTS . ".php",
3279
- "options" => [
3280
- "showCommentLink" => [
3281
- "label" => esc_html__("Show Comment Link", "wpdiscuz"),
3282
- "label_original" => "Show Comment Link",
3283
- "description" => "",
3284
- "description_original" => "",
3285
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#show-comment-link"
3286
- ],
3287
- "showCommentDate" => [
3288
- "label" => esc_html__("Show Comment Date", "wpdiscuz"),
3289
- "label_original" => "Show Comment Date",
3290
- "description" => "",
3291
- "description_original" => "",
3292
- "docurl" => ""
3293
- ],
3294
- "showVotingButtons" => [
3295
- "label" => esc_html__("Show Voting Buttons", "wpdiscuz"),
3296
- "label_original" => "Show Voting Buttons",
3297
- "description" => "",
3298
- "description_original" => "",
3299
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons"
3300
- ],
3301
- "votingButtonsIcon" => [
3302
- "label" => esc_html__("Voting Buttons Icon", "wpdiscuz"),
3303
- "label_original" => "Voting Buttons Icon",
3304
- "description" => "",
3305
- "description_original" => "",
3306
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons"
3307
- ],
3308
- "votingButtonsStyle" => [
3309
- "label" => esc_html__("Comment Voting Result Mode", "wpdiscuz"),
3310
- "label_original" => "Comment Voting Result Mode",
3311
- "description" => "",
3312
- "description_original" => "",
3313
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons"
3314
- ],
3315
- "enableDislikeButton" => [
3316
- "label" => esc_html__("Enable down vote button (dislike)", "wpdiscuz"),
3317
- "label_original" => "Enable down vote button (dislike)",
3318
- "description" => "",
3319
- "description_original" => "",
3320
- "docurl" => ""
3321
- ],
3322
- "isGuestCanVote" => [
3323
- "label" => esc_html__("Allow Guests to Vote for Comments", "wpdiscuz"),
3324
- "label_original" => "Allow Guests to Vote for Comments",
3325
- "description" => "",
3326
- "description_original" => "",
3327
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons"
3328
- ],
3329
- "highlightVotingButtons" => [
3330
- "label" => esc_html__("Highlight Voting Buttons for Voters", "wpdiscuz"),
3331
- "label_original" => "Highlight Voting Buttons for Voters",
3332
- "description" => esc_html__("This allows users to see own voted comments.", "wpdiscuz"),
3333
- "description_original" => "This allows users to see own voted comments.",
3334
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons"
3335
- ],
3336
- "showAvatars" => [
3337
- "label" => esc_html__("Display Avatars", "wpdiscuz"),
3338
- "label_original" => "Display Avatars",
3339
- "description" => esc_html__("This option only related to avatars in comment system. For sitewide avatar control, please use WordPress native avatar settings in Dashboard > Settings > Discussions admin page.", "wpdiscuz"),
3340
- "description_original" => "",
3341
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#display-avatars"
3342
- ],
3343
- "defaultAvatarUrlForUser" => [
3344
- "label" => esc_html__("Default Avatar Source URL for Users", "wpdiscuz"),
3345
- "label_original" => "Default Avatar Source URL for Users",
3346
- "description" => "",
3347
- "description_original" => "",
3348
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#display-avatars"
3349
- ],
3350
- "defaultAvatarUrlForGuest" => [
3351
- "label" => esc_html__("Default Avatar Source URL for Guests", "wpdiscuz"),
3352
- "label_original" => "Default Avatar Source URL for Guests",
3353
- "description" => "",
3354
- "description_original" => "",
3355
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#display-avatars"
3356
- ],
3357
- "changeAvatarsEverywhere" => [
3358
- "label" => esc_html__("Enable Sitewide Usage of Default Avatars", "wpdiscuz"),
3359
- "label_original" => "Enable Sitewide Usage of Default Avatars",
3360
- "description" => "",
3361
- "description_original" => "",
3362
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#display-avatars"
3363
- ],
3364
- ]
3365
- ],
3366
- WpdiscuzCore::TAB_THREAD_STYLES => [
3367
- "title" => esc_html__("Styles and Colors", "wpdiscuz"),
3368
- "title_original" => "Styles and Colors",
3369
- "icon" => "box-styles.png",
3370
- "icon-height" => "56px",
3371
- "status" => "ok",
3372
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_THREAD_STYLES . ".php",
3373
- "options" => [
3374
- "theme" => [
3375
- "label" => esc_html__("Comment Form and Comment List Style", "wpdiscuz"),
3376
- "label_original" => "Comment Form and Comment List Style",
3377
- "description" => esc_html__("Starting from wpDiscuz 7 you can choose the [ Off ] option of comment style. It'll remove most of wpDiscuz CSS code and allow you write your own CSS for custom comment styling.", "wpdiscuz"),
3378
- "description_original" => "Starting from wpDiscuz 7 you can choose the [ Off ] option of comment style. It'll remove most of wpDiscuz CSS code and allow you write your own CSS for custom comment styling.",
3379
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/styles-and-colors/#comment-form-and-comment-list-style"
3380
- ],
3381
- "styleSpecificColors" => [
3382
- "label" => esc_html__("Style Specific Colors", "wpdiscuz"),
3383
- "label_original" => "Style Specific Colors",
3384
- "description" => esc_html__("These options allows you manage comment section colors individaly for the Default and Dark Styles", "wpdiscuz"),
3385
- "description_original" => "These options allows you manage comment section colors individaly for the Default and Dark Styles",
3386
- "docurl" => ""
3387
- ],
3388
- "colors" => [
3389
- "label" => esc_html__("General Colors", "wpdiscuz"),
3390
- "label_original" => "General Colors",
3391
- "description" => "",
3392
- "description_original" => "",
3393
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/styles-and-colors/#colors"
3394
- ],
3395
- "commentTextSize" => [
3396
- "label" => esc_html__("Comment Text Size", "wpdiscuz"),
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"),
3404
- "label_original" => "Load Font Awesome css lib",
3405
- "description" => esc_html__("IMPORTANT: In case your theme uses old versions of Font-Awesome lib, you should not disable this this option. The theme old version doesn't support new version icons, thus some wpDiscuz icons might be lost.", "wpdiscuz"),
3406
- "description_original" => "IMPORTANT: In case your theme uses old versions of Font-Awesome lib, you should not disable this this option. The theme old version doesn't support new version icons, thus some wpDiscuz icons might be lost.",
3407
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/styles-and-colors/#load-font-awesome-css-lib"
3408
- ],
3409
- "customCss" => [
3410
- "label" => esc_html__("Custom CSS Code", "wpdiscuz"),
3411
- "label_original" => "Custom CSS Code",
3412
- "description" => "",
3413
- "description_original" => "",
3414
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/styles-and-colors/#custom-css-code"
3415
- ]
3416
- ]
3417
- ],
3418
- WpdiscuzCore::TAB_SUBSCRIPTION => [
3419
- "title" => esc_html__("Subscription and User Following", "wpdiscuz"),
3420
- "title_original" => "Subscription and User Following",
3421
- "icon" => "box-email.png",
3422
- "icon-height" => "58px",
3423
- "status" => "ok",
3424
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_SUBSCRIPTION . ".php",
3425
- "options" => [
3426
- "enableUserMentioning" => [
3427
- "label" => esc_html__("Enable User Mentioning", "wpdiscuz"),
3428
- "label_original" => "Enable User Mentioning",
3429
- "description" => sprintf(__("This option allows mentioning users in comments using @nickname method. Mentioned users will get notification via email if the next option is enabled. To get an advanced user mentioning features and to be able mention comments by #CommentID, we recommend the %s addon.", "wpdiscuz"), '<a href="https://gvectors.com/product/wpdiscuz-user-comment-mentioning/" target="_blank">' . "wpDiscuz User & Comment Mentioning" . '</a>'),
3430
- "description_original" => sprintf("This option allows mentioning users in comments using @nickname method. Mentioned users will get notification via email if the next option is enabled. To get an advanced user mentioning features and to be able mention comments by #CommentID, we recommend the %s addon.", '<a href="https://gvectors.com/product/wpdiscuz-user-comment-mentioning/" target="_blank">' . "wpDiscuz User & Comment Mentioning" . '</a>'),
3431
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#enable-user-mentioning"
3432
- ],
3433
- "sendMailToMentionedUsers" => [
3434
- "label" => esc_html__("Send E-Mail Notification to Mentioned Users", "wpdiscuz"),
3435
- "label_original" => "Send E-Mail Notification to Mentioned Users",
3436
- "description" => "",
3437
- "description_original" => "",
3438
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#send-e-mail-notification-to-mentioned-users"
3439
- ],
3440
- "isNotifyOnCommentApprove" => [
3441
- "label" => esc_html__("Notify comment author once comment is approved", "wpdiscuz"),
3442
- "label_original" => "Notify comment author once comment is approved",
3443
- "description" => "",
3444
- "description_original" => "",
3445
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#notify-comment-author-once-comment-is-approved"
3446
- ],
3447
- "enableMemberConfirm" => [
3448
- "label" => esc_html__("Enable subscription confirmation for registered users", "wpdiscuz"),
3449
- "label_original" => "Enable subscription confirmation for registered users",
3450
- "description" => "",
3451
- "description_original" => "",
3452
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#enable-subscription-confirmation-for-registered-users"
3453
- ],
3454
- "enableGuestsConfirm" => [
3455
- "label" => esc_html__("Enable subscription confirmation for guests", "wpdiscuz"),
3456
- "label_original" => "Enable subscription confirmation for guests",
3457
- "description" => "",
3458
- "description_original" => "",
3459
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#enable-subscription-confirmation-for-guests"
3460
- ],
3461
- "subscriptionType" => [
3462
- "label" => esc_html__("Subscription types in Subscription Bar drop-down", "wpdiscuz"),
3463
- "label_original" => "Subscription types in Subscription Bar drop-down",
3464
- "description" => "",
3465
- "description_original" => "",
3466
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#subscription-types-in-subscription-bar-drop-down"
3467
- ],
3468
- "showReplyCheckbox" => [
3469
- "label" => esc_html__('Display "Notify of new replies to this comment" option in comment form', "wpdiscuz"),
3470
- "label_original" => 'Display "Notify of new replies to this comment" option in comment form',
3471
- "description" => esc_html__("wpDiscuz is the only comment plugin which allows you to subscribe to certain comment replies. This option is located above [Post Comment] button in comment form. You can disable this subscription way by unchecking this option.", "wpdiscuz"),
3472
- "description_original" => "wpDiscuz is the only comment plugin which allows you to subscribe to certain comment replies. This option is located above [Post Comment] button in comment form. You can disable this subscription way by unchecking this option.",
3473
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#display-%E2%80%9Cnotify-of-new-replies-to-this-comment%E2%80%9D-option-in-commen"
3474
- ],
3475
- "isReplyDefaultChecked" => [
3476
- "label" => esc_html__('Keep checked the "Notify of new replies to this comment" option by default', "wpdiscuz"),
3477
- "label_original" => 'Keep checked the "Notify of new replies to this comment" option by default',
3478
- "description" => "",
3479
- "description_original" => "",
3480
- "docurl" => ""
3481
- ],
3482
- "usePostmaticForCommentNotification" => [
3483
- "label" => esc_html__("Use Postmatic for subscriptions and commenting by email", "wpdiscuz"),
3484
- "label_original" => "Use Postmatic for subscriptions and commenting by email",
3485
- "description" => esc_html__("Postmatic allows your users subscribe to comments. Instead of just being notified, they add a reply right from their inbox.", "wpdiscuz"),
3486
- "description_original" => "Postmatic allows your users subscribe to comments. Instead of just being notified, they add a reply right from their inbox.",
3487
- "docurl" => ""
3488
- ],
3489
- "isFollowActive" => [
3490
- "label" => esc_html__("Enable User Following Feature", "wpdiscuz"),
3491
- "label_original" => "Enable User Following Feature",
3492
- "description" => "",
3493
- "description_original" => "",
3494
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#user-subscription-follow-users"
3495
- ],
3496
- "disableFollowConfirmForUsers" => [
3497
- "label" => esc_html__("Follow users without email confirmation", "wpdiscuz"),
3498
- "label_original" => "Follow users without email confirmation",
3499
- "description" => "",
3500
- "description_original" => "",
3501
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#follow-users-without-email-confirmation"
3502
- ],
3503
- ]
3504
- ],
3505
- WpdiscuzCore::TAB_LABELS => [
3506
- "title" => esc_html__("User Labels and Badges", "wpdiscuz"),
3507
- "title_original" => "User Labels and Badges",
3508
- "icon" => "box-badges.png",
3509
- "icon-height" => "56px",
3510
- "status" => "ok",
3511
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_LABELS . ".php",
3512
- "options" => [
3513
- "blogRoleLabels" => [
3514
- "label" => esc_html__("Display Comment Author Labels", "wpdiscuz"),
3515
- "label_original" => "Display Comment Author Labels",
3516
- "description" => "",
3517
- "description_original" => "",
3518
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-labels-and-badges/#display-comment-author-labels"
3519
- ],
3520
- "commenterLabelColors" => [
3521
- "label" => esc_html__("Comment Author Label Colors by User Role", "wpdiscuz"),
3522
- "label_original" => "Comment Author Label Colors by User Role",
3523
- "description" => "",
3524
- "description_original" => "",
3525
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-labels-and-badges/#comment-author-label-colors-by-user-role"
3526
- ]
3527
- ]
3528
- ],
3529
- WpdiscuzCore::TAB_MODERATION => [
3530
- "title" => esc_html__("Comment Moderation", "wpdiscuz"),
3531
- "title_original" => "Comment Moderation",
3532
- "icon" => "box-moderation.png",
3533
- "icon-height" => "50px",
3534
- "status" => "ok",
3535
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_MODERATION . ".php",
3536
- "options" => [
3537
- "commentEditableTime" => [
3538
- "label" => esc_html__("Edit Button - Allow comment editing for", "wpdiscuz"),
3539
- "label_original" => "Edit Button - Allow comment editing for",
3540
- "description" => "",
3541
- "description_original" => "",
3542
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#edit-button-%E2%80%93-allow-comment-editing-for"
3543
- ],
3544
- "enableEditingWhenHaveReplies" => [
3545
- "label" => esc_html__("Enable editing for replied comments", "wpdiscuz"),
3546
- "label_original" => "Enable editing for replied comments",
3547
- "description" => "",
3548
- "description_original" => "",
3549
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#enable-editing-for-replied-comments"
3550
- ],
3551
- "displayEditingInfo" => [
3552
- "label" => esc_html__("Display comment editing Information", "wpdiscuz"),
3553
- "label_original" => "Display comment editing Information",
3554
- "description" => "",
3555
- "description_original" => "",
3556
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#display-comment-editing-information"
3557
- ],
3558
- "enableStickButton" => [
3559
- "label" => esc_html__("Stick Button - Stick a comment thread", "wpdiscuz"),
3560
- "label_original" => "Stick Button - Stick a comment thread",
3561
- "description" => "",
3562
- "description_original" => "",
3563
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#stick-button-%E2%80%93-stick-a-comment-thread"
3564
- ],
3565
- "enableCloseButton" => [
3566
- "label" => esc_html__("Close Button - Close a comment thread", "wpdiscuz"),
3567
- "label_original" => "Close Button - Close a comment thread",
3568
- "description" => "",
3569
- "description_original" => "",
3570
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#close-button-%E2%80%93-close-a-comment-thread"
3571
- ],
3572
- "userCommentsLimit" => [
3573
- "label" => esc_html__("Limit Comments per User", "wpdiscuz"),
3574
- "label_original" => "Limit Comments per User",
3575
- "description" => esc_html__("This option allows control commenting activity per user. You can set maximum number of comments users can leave per post or sitewide. It also allow to set restriction for comments or for replies only.", "wpdiscuz"),
3576
- "description_original" => "This option allows control commenting activity per user. You can set maximum number of comments users can leave per post or sitewide. It also allow to set restriction for comments or for replies only.",
3577
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#limit-comments-per-user"
3578
- ],
3579
- ]
3580
- ],
3581
- WpdiscuzCore::TAB_CONTENT => [
3582
- "title" => esc_html__("Comment Content and Media", "wpdiscuz"),
3583
- "title_original" => "Comment Content and Media",
3584
- "icon" => "box-content.png",
3585
- "icon-height" => "50px",
3586
- "status" => "ok",
3587
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_CONTENT . ".php",
3588
- "options" => [
3589
- "commentTextLength" => [
3590
- "label" => esc_html__("Comment Text Length", "wpdiscuz"),
3591
- "label_original" => "Comment Text Length",
3592
- "description" => esc_html__("Allows to set minimum and maximum number of chars can be inserted in comment textarea. Leave the max value empty to remove the limit.", "wpdiscuz"),
3593
- "description_original" => "Allows to set minimum and maximum number of chars can be inserted in comment textarea. Leave the max value empty to remove the limit.",
3594
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#comment-text-length"
3595
- ],
3596
- "enableImageConversion" => [
3597
- "label" => esc_html__("Image Source URL to Image Conversion", "wpdiscuz"),
3598
- "label_original" => "Image Source URL to Image Conversion",
3599
- "description" => "",
3600
- "description_original" => "",
3601
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#image-source-url-to-image-conversion"
3602
- ],
3603
- "enableShortcodes" => [
3604
- "label" => esc_html__("Enable WordPress Shortcodes in Comment Content", "wpdiscuz"),
3605
- "label_original" => "Enable WordPress Shortcodes in Comment Content",
3606
- "description" => esc_html__("This option allows embedding other plugins shortcodes in comment content. Some plugin shortcodes work very slow, so this may affect your page load speed if the shortcode provider plugin is not well optimized.", "wpdiscuz"),
3607
- "description_original" => "This option allows embedding other plugins shortcodes in comment content. Some plugin shortcodes work very slow, so this may affect your page load speed if the shortcode provider plugin is not well optimized.",
3608
- "docurl" => ""
3609
- ],
3610
- "commentReadMoreLimit" => [
3611
- "label" => esc_html__("The number of words before breaking comment text (Read more)", "wpdiscuz"),
3612
- "label_original" => "The number of words before breaking comment text (Read more)",
3613
- "description" => esc_html__("Set this option value 0, to turn off comment text breaking function.", "wpdiscuz"),
3614
- "description_original" => "Set this option value 0, to turn off comment text breaking function.",
3615
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#the-number-of-words-before-breaking-comment-text-read-more"
3616
- ],
3617
- "wmuIsEnabled" => [
3618
- "label" => esc_html__("Enable Media Uploading", "wpdiscuz"),
3619
- "label_original" => "Enable Media Uploading",
3620
- "description" => esc_html__("This option allows commenters to attach an image with comments.", "wpdiscuz"),
3621
- "description_original" => "This option allows commenters to attach an image with comments.",
3622
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#enable-media-uploading"
3623
- ],
3624
- "wmuIsGuestAllowed" => [
3625
- "label" => esc_html__("Allow Media Uploading for Guests", "wpdiscuz"),
3626
- "label_original" => "Allow Media Uploading for Guests",
3627
- "description" => "",
3628
- "description_original" => "",
3629
- "docurl" => ""
3630
- ],
3631
- "wmuIsLightbox" => [
3632
- "label" => esc_html__("Enable Lightbox for Attached Images", "wpdiscuz"),
3633
- "label_original" => "Enable Lightbox for Attached Images",
3634
- "description" => "",
3635
- "description_original" => "",
3636
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#enable-lightbox-for-attached-images"
3637
- ],
3638
- "wmuMimeTypes" => [
3639
- "label" => esc_html__("Allowed File Types", "wpdiscuz"),
3640
- "label_original" => "Allowed File Types",
3641
- "description" => "",
3642
- "description_original" => "",
3643
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#allowed-file-types"
3644
- ],
3645
- "wmuMaxFileSize" => [
3646
- "label" => esc_html__("Max Uploaded Size", "wpdiscuz"),
3647
- "label_original" => "Max Uploaded Size",
3648
- "description" => esc_html__("You can not set this value more than 'upload_max_filesize' and 'post_max_size'. If you want to increase server parameters please contact to your hosting service support.", "wpdiscuz"),
3649
- "description_original" => "You can not set this value more than 'upload_max_filesize' and 'post_max_size'. If you want to increase server parameters please contact to your hosting service support.",
3650
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#max-uploaded-size"
3651
- ],
3652
- "wmuIsShowFilesDashboard" => [
3653
- "label" => esc_html__("Show Comments Media in Dashboard", "wpdiscuz"),
3654
- "label_original" => "Show Comments Media in Dashboard",
3655
- "description" => "",
3656
- "description_original" => "",
3657
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#show-comments-media-in-dashboard"
3658
- ],
3659
- "wmuSingleImageSize" => [
3660
- "label" => esc_html__("Single Image Sizes in Comments", "wpdiscuz"),
3661
- "label_original" => "Single Image Sizes in Comments",
3662
- "description" => "",
3663
- "description_original" => "",
3664
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#single-image-sizes-in-comments"
3665
- ],
3666
- "wmuImageSizes" => [
3667
- "label" => esc_html__("Generate Thumbnail Sizes", "wpdiscuz"),
3668
- "label_original" => "Generate Thumbnail Sizes",
3669
- "description" => esc_html__("Once image is uploaded, it'll generate thumbnails according to your selected sizes. When you set up a new WordPress website, the platform gives you three image sizes to play with: thumbnail, medium, and large (plus the file's original resolution). You may have other options and sizes which are registered by current active theme and by other plugins.", "wpdiscuz"),
3670
- "description_original" => "Once image is uploaded, it'll generate thumbnails according to your selected sizes. When you set up a new WordPress website, the platform gives you three image sizes to play with: thumbnail, medium, and large (plus the file's original resolution). You may have other options and sizes which are registered by current active theme and by other plugins.",
3671
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#generate-thumbnail-sizes"
3672
- ]
3673
- ]
3674
- ],
3675
- WpdiscuzCore::TAB_LIVE => [
3676
- "title" => esc_html__("Live Commenting and Notifications", "wpdiscuz"),
3677
- "title_original" => "Live Commenting and Notifications",
3678
- "icon" => "box-bubble.png",
3679
- "icon-height" => "70px",
3680
- "status" => "new",
3681
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_LIVE . ".php",
3682
- "options" => [
3683
- "bubble" => [
3684
- "label" => esc_html__("Comment Bubble", "wpdiscuz"),
3685
- "label_original" => "Comment Bubble",
3686
- "description" => esc_html__("Comment Bubble is a real-time updating sticky comment icon on your web pages. It invites people to comment, displays current comments information and notifies current page viewers about new comments.", "wpdiscuz"),
3687
- "description_original" => "Comment Bubble is a real-time updating sticky comment icon on your web pages. It invites people to comment, displays current comments information and notifies current page viewers about new comments.",
3688
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#comment-bubble"
3689
- ],
3690
- "bubbleLiveUpdate" => [
3691
- "label" => esc_html__("Comment Bubble Live Update", "wpdiscuz"),
3692
- "label_original" => "Comment Bubble Live Update",
3693
- "description" => "",
3694
- "description_original" => "",
3695
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#comment-bubble-live-update"
3696
- ],
3697
- "bubbleLocation" => [
3698
- "label" => esc_html__("Comment Bubble Location", "wpdiscuz"),
3699
- "label_original" => "Comment Bubble Location",
3700
- "description" => "",
3701
- "description_original" => "",
3702
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#comment-bubble-location"
3703
- ],
3704
- "bubbleShowNewCommentMessage" => [
3705
- "label" => esc_html__("Bubble - Notify on New Comments", "wpdiscuz"),
3706
- "label_original" => "Bubble - Notify on New Comments",
3707
- "description" => esc_html__("If the Bubble live update is enabled, it shows new comments excerpts as a pop-up information to article reads in real-time. This keeps website visitors up to date and engages them join to the discussion.", "wpdiscuz"),
3708
- "description_original" => "If the Bubble live update is enabled, it shows new comments excerpts as a pop-up information to article reads in real-time. This keeps website visitors up to date and engages them join to the discussion.",
3709
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#bubble-%E2%80%93-notify-on-new-comments"
3710
- ],
3711
- "bubbleHintTimeout" => [
3712
- "label" => esc_html__("Bubble - Invite to comment in X seconds", "wpdiscuz"),
3713
- "label_original" => "Bubble - Invite to comment in X seconds",
3714
- "description" => esc_html__("In most cases article readers don't even think about leaving some comment. Using this option you can enable Bubble &laquo;Invite to Comment&raquo; message. Once page is loaded and visitor has read some content, it reminds about comments and calls to leave a reply.", "wpdiscuz"),
3715
- "description_original" => "In most cases article readers don't even think about leaving some comment. Using this option you can enable Bubble &laquo;Invite to Comment&raquo; message. Once page is loaded and visitor has read some content, it reminds about comments and calls to leave a reply.",
3716
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#bubble-%E2%80%93-invite-to-comment-in-x-seconds"
3717
- ],
3718
- "bubbleHintHideTimeout" => [
3719
- "label" => esc_html__("Bubble - Hide the invitation message in X seconds", "wpdiscuz"),
3720
- "label_original" => "Bubble - Hide the invitation message in X seconds",
3721
- "description" => "",
3722
- "description_original" => "",
3723
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#bubble-%E2%80%93-hide-the-invitation-message-in-x-seconds"
3724
- ],
3725
- "commentListUpdateType" => [
3726
- "label" => esc_html__("Live Update", "wpdiscuz"),
3727
- "label_original" => "Live Update",
3728
- "description" => esc_html__("wpDiscuz live update is very light and doesn't overload your server. However we recommend to monitor your server resources if you're on a Shared hosting plan. There are some very weak hosting plans which may not be able to perform very frequently live update requests. If you found some issue you can set the option below 30 seconds or more.", "wpdiscuz"),
3729
- "description_original" => "wpDiscuz live update is very light and doesn't overload your server. However we recommend to monitor your server resources if you're on a Shared hosting plan. There are some very weak hosting plans which may not be able to perform very frequently live update requests. If you found some issue you can set the option below 30 seconds or more.",
3730
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#live-update"
3731
- ],
3732
- "liveUpdateGuests" => [
3733
- "label" => esc_html__("Enable Live Update for Guests", "wpdiscuz"),
3734
- "label_original" => "Enable Live Update for Guests",
3735
- "description" => "",
3736
- "description_original" => "",
3737
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#enable-live-update-for-guests"
3738
- ],
3739
- "commentListUpdateTimer" => [
3740
- "label" => esc_html__("Update Comment List Every", "wpdiscuz"),
3741
- "label_original" => "Update Comment List Every",
3742
- "description" => "",
3743
- "description_original" => "",
3744
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#update-comment-list-every-x-seconds"
3745
- ]
3746
- ]
3747
- ],
3748
- WpdiscuzCore::TAB_INLINE => [
3749
- "title" => esc_html__("Inline Commenting", "wpdiscuz"),
3750
- "title_original" => "Inline Commenting",
3751
- "icon" => "box-feedback.png",
3752
- "icon-height" => "56px",
3753
- "status" => "new",
3754
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_INLINE . ".php",
3755
- "options" => [
3756
- "showInlineFilterButton" => [
3757
- "label" => esc_html__("Display filter button to load inline feedbacks", "wpdiscuz"),
3758
- "label_original" => "Display filter button to load inline feedbacks",
3759
- "description" => esc_html__("This filter button appears next to all filter buttons and comment sorting options. It allows to filter and display article inline feedbacks (comments made while reading current article).", "wpdiscuz"),
3760
- "description_original" => "This filter button appears next to all filter buttons and comment sorting options. It allows to filter and display article inline feedbacks (comments made while reading current article).",
3761
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/inline-commenting/#display-filter-button-to-load-inline-feedbacks"
3762
- ],
3763
- "inlineFeedbackAttractionType" => [
3764
- "label" => esc_html__('Animation for "Leave a Feedback" button in article content', "wpdiscuz"),
3765
- "label_original" => 'Animation for "Leave a Feedback" button in article content',
3766
- "description" => esc_html__('Once a question is added in article editor (backend), readers will see a small comment icon (call to leave a feedback) next to the text part you\'ve selected for your question on article (front-end). This icon calls people to leave a feedback, using the type you\'ve selected in this option. For example, if you\'ve chosen the "Blink" option, once reader scrolled and reached to the article text with question, it animates with comment button size and color changes attracting readers attention.', "wpdiscuz"),
3767
- "description_original" => 'Once a question is added in article editor (backend), readers will see a small comment icon (call to leave a feedback) next to the text part you\'ve selected for your question on article (front-end). This icon calls people to leave a feedback, using the type you\'ve selected in this option. For example, if you\'ve chosen the "Blink" option, once reader scrolled and reached to the article text with question, it animates with comment button size and color changes attracting readers attention.',
3768
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/inline-commenting/#animation-for-%E2%80%9Cleave-a-feedback%E2%80%9D-button-in-article-content"
3769
- ],
3770
- ]
3771
- ],
3772
- WpdiscuzCore::TAB_GENERAL => [
3773
- "title" => esc_html__("General Settings", "wpdiscuz"),
3774
- "title_original" => "General Settings",
3775
- "icon" => "box-general.png",
3776
- "icon-height" => "56px",
3777
- "status" => "ok",
3778
- "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_GENERAL . ".php",
3779
- "options" => [
3780
- "isEnableOnHome" => [
3781
- "label" => esc_html__("Enable wpDiscuz on Home Page", "wpdiscuz"),
3782
- "label_original" => "Enable wpDiscuz on Home Page",
3783
- "description" => "",
3784
- "description_original" => "",
3785
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#enable-wpdiscuz-on-home-page"
3786
- ],
3787
- "isNativeAjaxEnabled" => [
3788
- "label" => esc_html__("Use WordPress native AJAX functions", "wpdiscuz"),
3789
- "label_original" => "Use WordPress native AJAX functions",
3790
- "description" => esc_html__("By disabling this option you're automatically enabling wpDiscuz custom AJAX functions, which are many times faster that the default WordPress functions. Just make sure it doesn't conflict with your plugins.", "wpdiscuz"),
3791
- "description_original" => "By disabling this option you're automatically enabling wpDiscuz custom AJAX functions, which are many times faster that the default WordPress functions. Just make sure it doesn't conflict with your plugins.",
3792
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#use-wordpress-native-ajax-functions"
3793
- ],
3794
- "loadComboVersion" => [
3795
- "label" => esc_html__("Combine JS and CSS Files to Optimize Page Loading Speed", "wpdiscuz"),
3796
- "label_original" => "Combine JS and CSS Files to Optimize Page Loading Speed",
3797
- "description" => "",
3798
- "description_original" => "",
3799
- "docurl" => ""
3800
- ],
3801
- "loadMinVersion" => [
3802
- "label" => esc_html__("Minify JS and CSS Files to Optimize Page Loading Speed", "wpdiscuz"),
3803
- "label_original" => "Minify JS and CSS Files to Optimize Page Loading Speed",
3804
- "description" => "",
3805
- "description_original" => "",
3806
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#load-min-versions"
3807
- ],
3808
- "commentLinkFilter" => [
3809
- "label" => esc_html__("Secure comment content in HTTPS protocol.", "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"),
3817
- "label_original" => "Redirect First Comment to",
3818
- "description" => "",
3819
- "description_original" => "",
3820
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#redirect-first-comment-to"
3821
- ],
3822
- "simpleCommentDate" => [
3823
- "label" => esc_html__("Use WordPress Date/Time Format", "wpdiscuz"),
3824
- "label_original" => "Use WordPress Date/Time Format",
3825
- "description" => esc_html__("wpDiscuz shows Human Readable date format. If you check this option it'll show the date/time format set in WordPress General Settings.", "wpdiscuz"),
3826
- "description_original" => "wpDiscuz shows Human Readable date format. If you check this option it'll show the date/time format set in WordPress General Settings.",
3827
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#use-wordpress-date-time-format"
3828
- ],
3829
- "dateDiffFormat" => [
3830
- "label" => esc_html__("Structure of Human Readable Date Format", "wpdiscuz"),
3831
- "label_original" => "Structure of Human Readable Date Format",
3832
- "description" => esc_html__("By default, comment date is displayed with the human readable format, such as [X days ago]. For some languages, you may need to change the sequence of words in this date. This option provides shordcodes for each word allowing you manage the order. [number] is the 'X', [time_unit] is the 'days', [adjective] is the 'ago'.", "wpdiscuz"),
3833
- "description_original" => "By default, comment date is displayed with the human readable format, such as [X days ago]. For some languages, you may need to change the sequence of words in this date. This option provides shordcodes for each word allowing you manage the order. [number] is the 'X', [time_unit] is the 'days', [adjective] is the 'ago'.",
3834
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#structure-of-human-readable-date-format"
3835
- ],
3836
- "isUsePoMo" => [
3837
- "label" => esc_html__("Use Plugin .PO/.MO Files", "wpdiscuz"),
3838
- "label_original" => "Use Plugin .PO/.MO Files",
3839
- "description" => esc_html__("wpDiscuz phrase system allows you to translate all front-end phrases. However if you have a multi-language website it'll not allow you to add more than one language translation. The only way to get it is the plugin translation files (.PO / .MO). If wpDiscuz has the languages you need you should check this option to disable phrase system and it'll automatically translate all phrases based on language files according to current language.", "wpdiscuz"),
3840
- "description_original" => "wpDiscuz phrase system allows you to translate all front-end phrases. However if you have a multi-language website it'll not allow you to add more than one language translation. The only way to get it is the plugin translation files (.PO / .MO). If wpDiscuz has the languages you need you should check this option to disable phrase system and it'll automatically translate all phrases based on language files according to current language.",
3841
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#use-plugin-po-mo-files"
3842
- ],
3843
- "showPluginPoweredByLink" => [
3844
- "label" => esc_html__("Help wpDiscuz to grow allowing people to recognize which comment plugin you use", "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"),
3852
- "label_original" => "Enable Gravatar caching",
3853
- "description" => "",
3854
- "description_original" => "",
3855
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#enable-gravatar-caching"
3856
- ],
3857
- "gravatarCacheMethod" => [
3858
- "label" => esc_html__("Caching Method", "wpdiscuz"),
3859
- "label_original" => "Caching Method",
3860
- "description" => "",
3861
- "description_original" => "",
3862
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#caching-method"
3863
- ],
3864
- "gravatarCacheTimeout" => [
3865
- "label" => esc_html__("Reset Avatar Cache Frequency", "wpdiscuz"),
3866
- "label_original" => "Reset Avatar Cache Frequency",
3867
- "description" => "",
3868
- "description_original" => "",
3869
- "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#cache-avatars-for-%E2%80%9Cx%E2%80%9D-days"
3870
- ],
3871
- "removeVoteData" => [
3872
- "label" => esc_html__("Remove Vote Data", "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
- ],
3894
- ],
3895
- "addons" => [],
3896
- ];
3897
- return apply_filters("wpdiscuz_settings", $settings);
3898
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  class WpdiscuzOptions implements WpDiscuzConstants {
4
 
5
+ public $form = [];
6
+ public $recaptcha = [];
7
+ public $login = [];
8
+ public $social = [];
9
+ public $rating = [];
10
+ public $thread_display = [];
11
+ public $thread_layouts = [];
12
+ public $thread_styles = [];
13
+ public $subscription = [];
14
+ public $labels = [];
15
+ public $moderation = [];
16
+ public $content = [];
17
+ public $live = [];
18
+ public $inline = [];
19
+ public $general = [];
20
+ public $wp = [];
21
+ public $wmuUploadMaxFileSize;
22
+ public $wmuPostMaxSize;
23
 
24
+ /**
25
+ * Type - HTML elements array
26
+ * Available Values - Text
27
+ * Description - Phrases for form elements texts
28
+ * Default Value -
29
+ */
30
+ public $phrases;
31
 
32
+ /**
33
+ * helper class for database operations
34
+ */
35
+ public $dbManager;
36
 
37
+ /* === CACHE === */
38
+ public $isFileFunctionsExists;
39
+ /* === CACHE === */
40
+ public $isGoodbyeCaptchaActive;
41
+ public $goodbyeCaptchaTocken;
42
+ public $formContentTypeRel;
43
+ public $formPostRel;
44
+ private $addons;
45
+ private $tips;
46
 
47
+ public function __construct($dbManager) {
48
+ $this->dbManager = $dbManager;
49
+ $this->wmuUploadMaxFileSize = $this->getSizeInBytes(ini_get('upload_max_filesize'));
50
+ $this->wmuPostMaxSize = $this->getSizeInBytes(ini_get('post_max_size'));
51
+ $this->initAddons();
52
+ $this->initTips();
53
+ add_option(self::OPTION_SLUG_HASH_KEY, md5(time() . uniqid()), "", "no");
54
+ $this->initPhrases();
55
+ $this->addOptions();
56
+ $this->initOptions(get_option(self::OPTION_SLUG_OPTIONS));
57
+ $this->wp["dateFormat"] = get_option("date_format");
58
+ $this->wp["timeFormat"] = get_option("time_format");
59
+ $this->wp["threadComments"] = get_option("thread_comments");
60
+ $this->wp["threadCommentsDepth"] = get_option("thread_comments_depth");
61
+ $this->wp["isPaginate"] = get_option("page_comments");
62
+ $wordpressCommentOrder = strtolower(get_option("comment_order"));
63
+ $this->wp["commentOrder"] = in_array($wordpressCommentOrder, [
64
+ "asc",
65
+ "desc",
66
+ ]) ? $wordpressCommentOrder : "desc";
67
+ $this->wp["commentPerPage"] = get_option("comments_per_page");
68
+ $this->wp["showAvatars"] = get_option("show_avatars");
69
+ $this->wp["defaultCommentsPage"] = get_option("default_comments_page");
70
+ $this->isFileFunctionsExists = function_exists("file_get_contents") && function_exists("file_put_contents");
71
+ $this->initFormRelations();
72
+ $this->initGoodbyeCaptchaField();
73
+ add_action("init", [&$this, "initPhrasesOnLoad"], 2126);
74
+ add_action("admin_init", [&$this, "saveAndResetOptionsAndPhrases"], 1);
75
+ add_action("wp_ajax_dismiss_wpdiscuz_addon_note", [&$this, "dismissAddonNote"]);
76
+ add_action("admin_notices", [&$this, "adminNotices"]);
77
+ }
78
 
79
+ public function initOptions($serialize_options) {
80
+ $options = maybe_unserialize($serialize_options);
81
+ $defaultOptions = $this->getDefaultOptions();
82
+ /* form */
83
+ $this->form["commentFormView"] = isset($options[self::TAB_FORM]["commentFormView"]) ? $options[self::TAB_FORM]["commentFormView"] : $defaultOptions[self::TAB_FORM]["commentFormView"];
84
+ $this->form["enableDropAnimation"] = isset($options[self::TAB_FORM]["enableDropAnimation"]) ? $options[self::TAB_FORM]["enableDropAnimation"] : $defaultOptions[self::TAB_FORM]["enableDropAnimation"];
85
+ $this->form["richEditor"] = isset($options[self::TAB_FORM]["richEditor"]) ? $options[self::TAB_FORM]["richEditor"] : $defaultOptions[self::TAB_FORM]["richEditor"];
86
+ $this->form["boldButton"] = isset($options[self::TAB_FORM]["boldButton"]) ? $options[self::TAB_FORM]["boldButton"] : $defaultOptions[self::TAB_FORM]["boldButton"];
87
+ $this->form["italicButton"] = isset($options[self::TAB_FORM]["italicButton"]) ? $options[self::TAB_FORM]["italicButton"] : $defaultOptions[self::TAB_FORM]["italicButton"];
88
+ $this->form["underlineButton"] = isset($options[self::TAB_FORM]["underlineButton"]) ? $options[self::TAB_FORM]["underlineButton"] : $defaultOptions[self::TAB_FORM]["underlineButton"];
89
+ $this->form["strikeButton"] = isset($options[self::TAB_FORM]["strikeButton"]) ? $options[self::TAB_FORM]["strikeButton"] : $defaultOptions[self::TAB_FORM]["strikeButton"];
90
+ $this->form["olButton"] = isset($options[self::TAB_FORM]["olButton"]) ? $options[self::TAB_FORM]["olButton"] : $defaultOptions[self::TAB_FORM]["olButton"];
91
+ $this->form["ulButton"] = isset($options[self::TAB_FORM]["ulButton"]) ? $options[self::TAB_FORM]["ulButton"] : $defaultOptions[self::TAB_FORM]["ulButton"];
92
+ $this->form["blockquoteButton"] = isset($options[self::TAB_FORM]["blockquoteButton"]) ? $options[self::TAB_FORM]["blockquoteButton"] : $defaultOptions[self::TAB_FORM]["blockquoteButton"];
93
+ $this->form["codeblockButton"] = isset($options[self::TAB_FORM]["codeblockButton"]) ? $options[self::TAB_FORM]["codeblockButton"] : $defaultOptions[self::TAB_FORM]["codeblockButton"];
94
+ $this->form["linkButton"] = isset($options[self::TAB_FORM]["linkButton"]) ? $options[self::TAB_FORM]["linkButton"] : $defaultOptions[self::TAB_FORM]["linkButton"];
95
+ $this->form["sourcecodeButton"] = isset($options[self::TAB_FORM]["sourcecodeButton"]) ? $options[self::TAB_FORM]["sourcecodeButton"] : $defaultOptions[self::TAB_FORM]["sourcecodeButton"];
96
+ $this->form["spoilerButton"] = isset($options[self::TAB_FORM]["spoilerButton"]) ? $options[self::TAB_FORM]["spoilerButton"] : $defaultOptions[self::TAB_FORM]["spoilerButton"];
97
+ $this->form["enableQuickTags"] = isset($options[self::TAB_FORM]["enableQuickTags"]) ? $options[self::TAB_FORM]["enableQuickTags"] : $defaultOptions[self::TAB_FORM]["enableQuickTags"];
98
+ $this->form["commenterNameMinLength"] = isset($options[self::TAB_FORM]["commenterNameMinLength"]) ? $options[self::TAB_FORM]["commenterNameMinLength"] : $defaultOptions[self::TAB_FORM]["commenterNameMinLength"];
99
+ $this->form["commenterNameMaxLength"] = isset($options[self::TAB_FORM]["commenterNameMaxLength"]) ? $options[self::TAB_FORM]["commenterNameMaxLength"] : $defaultOptions[self::TAB_FORM]["commenterNameMaxLength"];
100
+ $this->form["storeCommenterData"] = isset($options[self::TAB_FORM]["storeCommenterData"]) ? $options[self::TAB_FORM]["storeCommenterData"] : $defaultOptions[self::TAB_FORM]["storeCommenterData"];
101
+ /* recaptcha */
102
+ $this->recaptcha["version"] = "2.0";
103
+ $this->recaptcha["score"] = "";
104
+ $this->recaptcha["siteKey"] = isset($options[self::TAB_RECAPTCHA]["siteKey"]) ? $options[self::TAB_RECAPTCHA]["siteKey"] : $defaultOptions[self::TAB_RECAPTCHA]["siteKey"];
105
+ $this->recaptcha["secretKey"] = isset($options[self::TAB_RECAPTCHA]["secretKey"]) ? $options[self::TAB_RECAPTCHA]["secretKey"] : $defaultOptions[self::TAB_RECAPTCHA]["secretKey"];
106
+ $this->recaptcha["theme"] = isset($options[self::TAB_RECAPTCHA]["theme"]) ? $options[self::TAB_RECAPTCHA]["theme"] : $defaultOptions[self::TAB_RECAPTCHA]["theme"];
107
+ $this->recaptcha["lang"] = isset($options[self::TAB_RECAPTCHA]["lang"]) ? $options[self::TAB_RECAPTCHA]["lang"] : $defaultOptions[self::TAB_RECAPTCHA]["lang"];
108
+ $this->recaptcha["requestMethod"] = isset($options[self::TAB_RECAPTCHA]["requestMethod"]) ? $options[self::TAB_RECAPTCHA]["requestMethod"] : $defaultOptions[self::TAB_RECAPTCHA]["requestMethod"];
109
+ $this->recaptcha["showForGuests"] = isset($options[self::TAB_RECAPTCHA]["showForGuests"]) ? $options[self::TAB_RECAPTCHA]["showForGuests"] : $defaultOptions[self::TAB_RECAPTCHA]["showForGuests"];
110
+ $this->recaptcha["showForUsers"] = isset($options[self::TAB_RECAPTCHA]["showForUsers"]) ? $options[self::TAB_RECAPTCHA]["showForUsers"] : $defaultOptions[self::TAB_RECAPTCHA]["showForUsers"];
111
+ $this->recaptcha["isShowOnSubscribeForm"] = isset($options[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) ? $options[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"] : $defaultOptions[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"];
112
+ $lang = $this->recaptcha["lang"] ? "&hl=" . $this->recaptcha["lang"] : "";
113
+ $this->recaptcha["reCaptchaUrl"] = "https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit$lang";
114
+ /* login */
115
+ $this->login["showLoggedInUsername"] = isset($options[self::TAB_LOGIN]["showLoggedInUsername"]) ? $options[self::TAB_LOGIN]["showLoggedInUsername"] : $defaultOptions[self::TAB_LOGIN]["showLoggedInUsername"];
116
+ $this->login["showLoginLinkForGuests"] = isset($options[self::TAB_LOGIN]["showLoginLinkForGuests"]) ? $options[self::TAB_LOGIN]["showLoginLinkForGuests"] : $defaultOptions[self::TAB_LOGIN]["showLoginLinkForGuests"];
117
+ $this->login["showActivityTab"] = isset($options[self::TAB_LOGIN]["showActivityTab"]) ? $options[self::TAB_LOGIN]["showActivityTab"] : $defaultOptions[self::TAB_LOGIN]["showActivityTab"];
118
+ $this->login["showSubscriptionsTab"] = isset($options[self::TAB_LOGIN]["showSubscriptionsTab"]) ? $options[self::TAB_LOGIN]["showSubscriptionsTab"] : $defaultOptions[self::TAB_LOGIN]["showSubscriptionsTab"];
119
+ $this->login["showFollowsTab"] = isset($options[self::TAB_LOGIN]["showFollowsTab"]) ? $options[self::TAB_LOGIN]["showFollowsTab"] : $defaultOptions[self::TAB_LOGIN]["showFollowsTab"];
120
+ $this->login["enableProfileURLs"] = isset($options[self::TAB_LOGIN]["enableProfileURLs"]) ? $options[self::TAB_LOGIN]["enableProfileURLs"] : $defaultOptions[self::TAB_LOGIN]["enableProfileURLs"];
121
+ $this->login["websiteAsProfileUrl"] = isset($options[self::TAB_LOGIN]["websiteAsProfileUrl"]) ? $options[self::TAB_LOGIN]["websiteAsProfileUrl"] : $defaultOptions[self::TAB_LOGIN]["websiteAsProfileUrl"];
122
+ $this->login["isUserByEmail"] = isset($options[self::TAB_LOGIN]["isUserByEmail"]) ? $options[self::TAB_LOGIN]["isUserByEmail"] : $defaultOptions[self::TAB_LOGIN]["isUserByEmail"];
123
+ $this->login["loginUrl"] = isset($options[self::TAB_LOGIN]["loginUrl"]) ? $options[self::TAB_LOGIN]["loginUrl"] : $defaultOptions[self::TAB_LOGIN]["loginUrl"];
124
+ /* social */
125
+ $this->social["socialLoginAgreementCheckbox"] = isset($options[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"]) ? $options[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"] : $defaultOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"];
126
+ $this->social["socialLoginInSecondaryForm"] = isset($options[self::TAB_SOCIAL]["socialLoginInSecondaryForm"]) ? $options[self::TAB_SOCIAL]["socialLoginInSecondaryForm"] : $defaultOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"];
127
+ $this->social["displayIconOnAvatar"] = isset($options[self::TAB_SOCIAL]["displayIconOnAvatar"]) ? $options[self::TAB_SOCIAL]["displayIconOnAvatar"] : $defaultOptions[self::TAB_SOCIAL]["displayIconOnAvatar"];
128
+ // fb
129
+ $this->social["enableFbLogin"] = isset($options[self::TAB_SOCIAL]["enableFbLogin"]) ? $options[self::TAB_SOCIAL]["enableFbLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableFbLogin"];
130
+ $this->social["enableFbShare"] = isset($options[self::TAB_SOCIAL]["enableFbShare"]) ? $options[self::TAB_SOCIAL]["enableFbShare"] : $defaultOptions[self::TAB_SOCIAL]["enableFbShare"];
131
+ $this->social["fbAppID"] = isset($options[self::TAB_SOCIAL]["fbAppID"]) ? $options[self::TAB_SOCIAL]["fbAppID"] : $defaultOptions[self::TAB_SOCIAL]["fbAppID"];
132
+ $this->social["fbAppSecret"] = isset($options[self::TAB_SOCIAL]["fbAppSecret"]) ? $options[self::TAB_SOCIAL]["fbAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["fbAppSecret"];
133
+ $this->social["fbUseOAuth2"] = isset($options[self::TAB_SOCIAL]["fbUseOAuth2"]) ? $options[self::TAB_SOCIAL]["fbUseOAuth2"] : $defaultOptions[self::TAB_SOCIAL]["fbUseOAuth2"];
134
+ // twitter
135
+ $this->social["enableTwitterLogin"] = isset($options[self::TAB_SOCIAL]["enableTwitterLogin"]) ? $options[self::TAB_SOCIAL]["enableTwitterLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableTwitterLogin"];
136
+ $this->social["enableTwitterShare"] = isset($options[self::TAB_SOCIAL]["enableTwitterShare"]) ? $options[self::TAB_SOCIAL]["enableTwitterShare"] : $defaultOptions[self::TAB_SOCIAL]["enableTwitterShare"];
137
+ $this->social["twitterAppID"] = isset($options[self::TAB_SOCIAL]["twitterAppID"]) ? $options[self::TAB_SOCIAL]["twitterAppID"] : $defaultOptions[self::TAB_SOCIAL]["twitterAppID"];
138
+ $this->social["twitterAppSecret"] = isset($options[self::TAB_SOCIAL]["twitterAppSecret"]) ? $options[self::TAB_SOCIAL]["twitterAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["twitterAppSecret"];
139
+ // google
140
+ $this->social["enableGoogleLogin"] = isset($options[self::TAB_SOCIAL]["enableGoogleLogin"]) ? $options[self::TAB_SOCIAL]["enableGoogleLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableGoogleLogin"];
141
+ $this->social["googleClientID"] = isset($options[self::TAB_SOCIAL]["googleClientID"]) ? $options[self::TAB_SOCIAL]["googleClientID"] : $defaultOptions[self::TAB_SOCIAL]["googleClientID"];
142
+ $this->social["googleClientSecret"] = isset($options[self::TAB_SOCIAL]["googleClientSecret"]) ? $options[self::TAB_SOCIAL]["googleClientSecret"] : $defaultOptions[self::TAB_SOCIAL]["googleClientSecret"];
143
+ // disqus
144
+ $this->social["enableDisqusLogin"] = isset($options[self::TAB_SOCIAL]["enableDisqusLogin"]) ? $options[self::TAB_SOCIAL]["enableDisqusLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableDisqusLogin"];
145
+ $this->social["disqusPublicKey"] = isset($options[self::TAB_SOCIAL]["disqusPublicKey"]) ? $options[self::TAB_SOCIAL]["disqusPublicKey"] : $defaultOptions[self::TAB_SOCIAL]["disqusPublicKey"];
146
+ $this->social["disqusSecretKey"] = isset($options[self::TAB_SOCIAL]["disqusSecretKey"]) ? $options[self::TAB_SOCIAL]["disqusSecretKey"] : $defaultOptions[self::TAB_SOCIAL]["disqusSecretKey"];
147
+ // wordpress
148
+ $this->social["enableWordpressLogin"] = isset($options[self::TAB_SOCIAL]["enableWordpressLogin"]) ? $options[self::TAB_SOCIAL]["enableWordpressLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableWordpressLogin"];
149
+ $this->social["wordpressClientID"] = isset($options[self::TAB_SOCIAL]["wordpressClientID"]) ? $options[self::TAB_SOCIAL]["wordpressClientID"] : $defaultOptions[self::TAB_SOCIAL]["wordpressClientID"];
150
+ $this->social["wordpressClientSecret"] = isset($options[self::TAB_SOCIAL]["wordpressClientSecret"]) ? $options[self::TAB_SOCIAL]["wordpressClientSecret"] : $defaultOptions[self::TAB_SOCIAL]["wordpressClientSecret"];
151
+ // instagram
152
+ $this->social["enableInstagramLogin"] = isset($options[self::TAB_SOCIAL]["enableInstagramLogin"]) ? $options[self::TAB_SOCIAL]["enableInstagramLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableInstagramLogin"];
153
+ $this->social["instagramAppID"] = isset($options[self::TAB_SOCIAL]["instagramAppID"]) ? $options[self::TAB_SOCIAL]["instagramAppID"] : $defaultOptions[self::TAB_SOCIAL]["instagramAppID"];
154
+ $this->social["instagramAppSecret"] = isset($options[self::TAB_SOCIAL]["instagramAppSecret"]) ? $options[self::TAB_SOCIAL]["instagramAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["instagramAppSecret"];
155
+ // linkedin
156
+ $this->social["enableLinkedinLogin"] = isset($options[self::TAB_SOCIAL]["enableLinkedinLogin"]) ? $options[self::TAB_SOCIAL]["enableLinkedinLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableLinkedinLogin"];
157
+ $this->social["linkedinClientID"] = isset($options[self::TAB_SOCIAL]["linkedinClientID"]) ? $options[self::TAB_SOCIAL]["linkedinClientID"] : $defaultOptions[self::TAB_SOCIAL]["linkedinClientID"];
158
+ $this->social["linkedinClientSecret"] = isset($options[self::TAB_SOCIAL]["linkedinClientSecret"]) ? $options[self::TAB_SOCIAL]["linkedinClientSecret"] : $defaultOptions[self::TAB_SOCIAL]["linkedinClientSecret"];
159
+ // whatsapp
160
+ $this->social["enableWhatsappShare"] = isset($options[self::TAB_SOCIAL]["enableWhatsappShare"]) ? $options[self::TAB_SOCIAL]["enableWhatsappShare"] : $defaultOptions[self::TAB_SOCIAL]["enableWhatsappShare"];
161
+ // yandex
162
+ $this->social["enableYandexLogin"] = isset($options[self::TAB_SOCIAL]["enableYandexLogin"]) ? $options[self::TAB_SOCIAL]["enableYandexLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableYandexLogin"];
163
+ $this->social["yandexID"] = isset($options[self::TAB_SOCIAL]["yandexID"]) ? $options[self::TAB_SOCIAL]["yandexID"] : $defaultOptions[self::TAB_SOCIAL]["yandexID"];
164
+ $this->social["yandexPassword"] = isset($options[self::TAB_SOCIAL]["yandexPassword"]) ? $options[self::TAB_SOCIAL]["yandexPassword"] : $defaultOptions[self::TAB_SOCIAL]["yandexPassword"];
165
+ // mail.ru
166
+ $this->social["enableMailruLogin"] = isset($options[self::TAB_SOCIAL]["enableMailruLogin"]) ? $options[self::TAB_SOCIAL]["enableMailruLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableMailruLogin"];
167
+ $this->social["mailruClientID"] = isset($options[self::TAB_SOCIAL]["mailruClientID"]) ? $options[self::TAB_SOCIAL]["mailruClientID"] : $defaultOptions[self::TAB_SOCIAL]["mailruClientID"];
168
+ $this->social["mailruClientSecret"] = isset($options[self::TAB_SOCIAL]["mailruClientSecret"]) ? $options[self::TAB_SOCIAL]["mailruClientSecret"] : $defaultOptions[self::TAB_SOCIAL]["mailruClientSecret"];
169
+ // weibo
170
+ $this->social["enableWeiboLogin"] = isset($options[self::TAB_SOCIAL]["enableWeiboLogin"]) ? $options[self::TAB_SOCIAL]["enableWeiboLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableWeiboLogin"];
171
+ $this->social["weiboKey"] = isset($options[self::TAB_SOCIAL]["weiboKey"]) ? $options[self::TAB_SOCIAL]["weiboKey"] : $defaultOptions[self::TAB_SOCIAL]["weiboKey"];
172
+ $this->social["weiboSecret"] = isset($options[self::TAB_SOCIAL]["weiboSecret"]) ? $options[self::TAB_SOCIAL]["weiboSecret"] : $defaultOptions[self::TAB_SOCIAL]["weiboSecret"];
173
+ // wechat
174
+ $this->social["enableWechatLogin"] = isset($options[self::TAB_SOCIAL]["enableWechatLogin"]) ? $options[self::TAB_SOCIAL]["enableWechatLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableWechatLogin"];
175
+ $this->social["wechatAppID"] = isset($options[self::TAB_SOCIAL]["wechatAppID"]) ? $options[self::TAB_SOCIAL]["wechatAppID"] : $defaultOptions[self::TAB_SOCIAL]["wechatAppID"];
176
+ $this->social["wechatSecret"] = isset($options[self::TAB_SOCIAL]["wechatSecret"]) ? $options[self::TAB_SOCIAL]["wechatSecret"] : $defaultOptions[self::TAB_SOCIAL]["wechatSecret"];
177
+ // qq
178
+ $this->social["enableQQLogin"] = isset($options[self::TAB_SOCIAL]["enableQQLogin"]) ? $options[self::TAB_SOCIAL]["enableQQLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableQQLogin"];
179
+ $this->social["qqAppID"] = isset($options[self::TAB_SOCIAL]["qqAppID"]) ? $options[self::TAB_SOCIAL]["qqAppID"] : $defaultOptions[self::TAB_SOCIAL]["qqAppID"];
180
+ $this->social["qqSecret"] = isset($options[self::TAB_SOCIAL]["qqSecret"]) ? $options[self::TAB_SOCIAL]["qqSecret"] : $defaultOptions[self::TAB_SOCIAL]["qqSecret"];
181
+ // baidu
182
+ $this->social["enableBaiduLogin"] = isset($options[self::TAB_SOCIAL]["enableBaiduLogin"]) ? $options[self::TAB_SOCIAL]["enableBaiduLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableBaiduLogin"];
183
+ $this->social["baiduAppID"] = isset($options[self::TAB_SOCIAL]["baiduAppID"]) ? $options[self::TAB_SOCIAL]["baiduAppID"] : $defaultOptions[self::TAB_SOCIAL]["baiduAppID"];
184
+ $this->social["baiduSecret"] = isset($options[self::TAB_SOCIAL]["baiduSecret"]) ? $options[self::TAB_SOCIAL]["baiduSecret"] : $defaultOptions[self::TAB_SOCIAL]["baiduSecret"];
185
+ // vk
186
+ $this->social["enableVkLogin"] = isset($options[self::TAB_SOCIAL]["enableVkLogin"]) ? $options[self::TAB_SOCIAL]["enableVkLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableVkLogin"];
187
+ $this->social["enableVkShare"] = isset($options[self::TAB_SOCIAL]["enableVkShare"]) ? $options[self::TAB_SOCIAL]["enableVkShare"] : $defaultOptions[self::TAB_SOCIAL]["enableVkShare"];
188
+ $this->social["vkAppID"] = isset($options[self::TAB_SOCIAL]["vkAppID"]) ? $options[self::TAB_SOCIAL]["vkAppID"] : $defaultOptions[self::TAB_SOCIAL]["vkAppID"];
189
+ $this->social["vkAppSecret"] = isset($options[self::TAB_SOCIAL]["vkAppSecret"]) ? $options[self::TAB_SOCIAL]["vkAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["vkAppSecret"];
190
+ // ok
191
+ $this->social["enableOkLogin"] = isset($options[self::TAB_SOCIAL]["enableOkLogin"]) ? $options[self::TAB_SOCIAL]["enableOkLogin"] : $defaultOptions[self::TAB_SOCIAL]["enableOkLogin"];
192
+ $this->social["enableOkShare"] = isset($options[self::TAB_SOCIAL]["enableOkShare"]) ? $options[self::TAB_SOCIAL]["enableOkShare"] : $defaultOptions[self::TAB_SOCIAL]["enableOkShare"];
193
+ $this->social["okAppID"] = isset($options[self::TAB_SOCIAL]["okAppID"]) ? $options[self::TAB_SOCIAL]["okAppID"] : $defaultOptions[self::TAB_SOCIAL]["okAppID"];
194
+ $this->social["okAppKey"] = isset($options[self::TAB_SOCIAL]["okAppKey"]) ? $options[self::TAB_SOCIAL]["okAppKey"] : $defaultOptions[self::TAB_SOCIAL]["okAppKey"];
195
+ $this->social["okAppSecret"] = isset($options[self::TAB_SOCIAL]["okAppSecret"]) ? $options[self::TAB_SOCIAL]["okAppSecret"] : $defaultOptions[self::TAB_SOCIAL]["okAppSecret"];
196
+ /* rating */
197
+ $this->rating["enablePostRatingSchema"] = isset($options[self::TAB_RATING]["enablePostRatingSchema"]) ? $options[self::TAB_RATING]["enablePostRatingSchema"] : $defaultOptions[self::TAB_RATING]["enablePostRatingSchema"];
198
+ $this->rating["displayRatingOnPost"] = isset($options[self::TAB_RATING]["displayRatingOnPost"]) ? $options[self::TAB_RATING]["displayRatingOnPost"] : $defaultOptions[self::TAB_RATING]["displayRatingOnPost"];
199
+ $this->rating["ratingCssOnNoneSingular"] = isset($options[self::TAB_RATING]["ratingCssOnNoneSingular"]) ? $options[self::TAB_RATING]["ratingCssOnNoneSingular"] : $defaultOptions[self::TAB_RATING]["ratingCssOnNoneSingular"];
200
+ $this->rating["ratingHoverColor"] = isset($options[self::TAB_RATING]["ratingHoverColor"]) ? $options[self::TAB_RATING]["ratingHoverColor"] : $defaultOptions[self::TAB_RATING]["ratingHoverColor"];
201
+ $this->rating["ratingInactiveColor"] = isset($options[self::TAB_RATING]["ratingInactiveColor"]) ? $options[self::TAB_RATING]["ratingInactiveColor"] : $defaultOptions[self::TAB_RATING]["ratingInactiveColor"];
202
+ $this->rating["ratingActiveColor"] = isset($options[self::TAB_RATING]["ratingActiveColor"]) ? $options[self::TAB_RATING]["ratingActiveColor"] : $defaultOptions[self::TAB_RATING]["ratingActiveColor"];
203
+ /* thread_display */
204
+ $this->thread_display["firstLoadWithAjax"] = isset($options[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"]) ? $options[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"];
205
+ $this->thread_display["commentListLoadType"] = isset($options[self::TAB_THREAD_DISPLAY]["commentListLoadType"]) ? $options[self::TAB_THREAD_DISPLAY]["commentListLoadType"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"];
206
+ $this->thread_display["isLoadOnlyParentComments"] = isset($options[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"]) ? $options[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"];
207
+ $this->thread_display["showReactedFilterButton"] = isset($options[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"]) ? $options[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"];
208
+ $this->thread_display["showHottestFilterButton"] = isset($options[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"]) ? $options[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"];
209
+ $this->thread_display["showSortingButtons"] = isset($options[self::TAB_THREAD_DISPLAY]["showSortingButtons"]) ? $options[self::TAB_THREAD_DISPLAY]["showSortingButtons"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"];
210
+ $this->thread_display["mostVotedByDefault"] = isset($options[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"]) ? $options[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"];
211
+ $this->thread_display["reverseChildren"] = isset($options[self::TAB_THREAD_DISPLAY]["reverseChildren"]) ? $options[self::TAB_THREAD_DISPLAY]["reverseChildren"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"];
212
+ $this->thread_display["highlightUnreadComments"] = isset($options[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"]) ? $options[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"];
213
+ $this->thread_display["scrollToComment"] = isset($options[self::TAB_THREAD_DISPLAY]["scrollToComment"]) ? $options[self::TAB_THREAD_DISPLAY]["scrollToComment"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["scrollToComment"];
214
+ $this->thread_display["orderCommentsBy"] = isset($options[self::TAB_THREAD_DISPLAY]["orderCommentsBy"]) ? $options[self::TAB_THREAD_DISPLAY]["orderCommentsBy"] : $defaultOptions[self::TAB_THREAD_DISPLAY]["orderCommentsBy"];
215
+ /* thread_layouts */
216
+ $this->thread_layouts["showCommentLink"] = isset($options[self::TAB_THREAD_LAYOUTS]["showCommentLink"]) ? $options[self::TAB_THREAD_LAYOUTS]["showCommentLink"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showCommentLink"];
217
+ $this->thread_layouts["showCommentDate"] = isset($options[self::TAB_THREAD_LAYOUTS]["showCommentDate"]) ? $options[self::TAB_THREAD_LAYOUTS]["showCommentDate"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"];
218
+ $this->thread_layouts["showVotingButtons"] = isset($options[self::TAB_THREAD_LAYOUTS]["showVotingButtons"]) ? $options[self::TAB_THREAD_LAYOUTS]["showVotingButtons"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"];
219
+ $this->thread_layouts["votingButtonsIcon"] = isset($options[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"]) ? $options[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"];
220
+ $this->thread_layouts["votingButtonsStyle"] = isset($options[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"]) ? $options[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"];
221
+ $this->thread_layouts["enableDislikeButton"] = isset($options[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"]) ? $options[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"];
222
+ $this->thread_layouts["isGuestCanVote"] = isset($options[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"]) ? $options[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"];
223
+ $this->thread_layouts["highlightVotingButtons"] = isset($options[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"]) ? $options[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"];
224
+ $this->thread_layouts["showAvatars"] = isset($options[self::TAB_THREAD_LAYOUTS]["showAvatars"]) ? $options[self::TAB_THREAD_LAYOUTS]["showAvatars"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["showAvatars"];
225
+ $this->thread_layouts["defaultAvatarUrlForUser"] = isset($options[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"]) ? $options[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"];
226
+ $this->thread_layouts["defaultAvatarUrlForGuest"] = isset($options[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"]) ? $options[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"];
227
+ $this->thread_layouts["changeAvatarsEverywhere"] = isset($options[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"]) ? $options[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"] : $defaultOptions[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"];
228
+ /* thread_styles */
229
+ $this->thread_styles["theme"] = isset($options[self::TAB_THREAD_STYLES]["theme"]) ? $options[self::TAB_THREAD_STYLES]["theme"] : $defaultOptions[self::TAB_THREAD_STYLES]["theme"];
230
+ $this->thread_styles["primaryColor"] = isset($options[self::TAB_THREAD_STYLES]["primaryColor"]) ? $options[self::TAB_THREAD_STYLES]["primaryColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["primaryColor"];
231
+ $this->thread_styles["newLoadedCommentBGColor"] = isset($options[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"]) ? $options[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"];
232
+ $this->thread_styles["primaryButtonColor"] = isset($options[self::TAB_THREAD_STYLES]["primaryButtonColor"]) ? $options[self::TAB_THREAD_STYLES]["primaryButtonColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"];
233
+ $this->thread_styles["primaryButtonBG"] = isset($options[self::TAB_THREAD_STYLES]["primaryButtonBG"]) ? $options[self::TAB_THREAD_STYLES]["primaryButtonBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"];
234
+ $this->thread_styles["bubbleColors"] = isset($options[self::TAB_THREAD_STYLES]["bubbleColors"]) ? $options[self::TAB_THREAD_STYLES]["bubbleColors"] : $defaultOptions[self::TAB_THREAD_STYLES]["bubbleColors"];
235
+ $this->thread_styles["inlineFeedbackColors"] = isset($options[self::TAB_THREAD_STYLES]["inlineFeedbackColors"]) ? $options[self::TAB_THREAD_STYLES]["inlineFeedbackColors"] : $defaultOptions[self::TAB_THREAD_STYLES]["inlineFeedbackColors"];
236
+ $this->thread_styles["defaultCommentAreaBG"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"];
237
+ $this->thread_styles["defaultCommentTextColor"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentTextColor"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentTextColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentTextColor"];
238
+ $this->thread_styles["defaultCommentFieldsBG"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"];
239
+ $this->thread_styles["defaultCommentFieldsBorderColor"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"];
240
+ $this->thread_styles["defaultCommentFieldsTextColor"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"];
241
+ $this->thread_styles["defaultCommentFieldsPlaceholderColor"] = isset($options[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"]) ? $options[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"];
242
+ $this->thread_styles["darkCommentAreaBG"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentAreaBG"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentAreaBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentAreaBG"];
243
+ $this->thread_styles["darkCommentTextColor"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentTextColor"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentTextColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentTextColor"];
244
+ $this->thread_styles["darkCommentFieldsBG"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"];
245
+ $this->thread_styles["darkCommentFieldsBorderColor"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"];
246
+ $this->thread_styles["darkCommentFieldsTextColor"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"];
247
+ $this->thread_styles["darkCommentFieldsPlaceholderColor"] = isset($options[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"]) ? $options[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"] : $defaultOptions[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"];
248
+ $this->thread_styles["commentTextSize"] = isset($options[self::TAB_THREAD_STYLES]["commentTextSize"]) ? $options[self::TAB_THREAD_STYLES]["commentTextSize"] : $defaultOptions[self::TAB_THREAD_STYLES]["commentTextSize"];
249
+ $this->thread_styles["enableFontAwesome"] = isset($options[self::TAB_THREAD_STYLES]["enableFontAwesome"]) ? $options[self::TAB_THREAD_STYLES]["enableFontAwesome"] : $defaultOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"];
250
+ $this->thread_styles["customCss"] = isset($options[self::TAB_THREAD_STYLES]["customCss"]) ? $options[self::TAB_THREAD_STYLES]["customCss"] : $defaultOptions[self::TAB_THREAD_STYLES]["customCss"];
251
+ /* subscription */
252
+ $this->subscription["enableUserMentioning"] = isset($options[self::TAB_SUBSCRIPTION]["enableUserMentioning"]) ? $options[self::TAB_SUBSCRIPTION]["enableUserMentioning"] : $defaultOptions[self::TAB_SUBSCRIPTION]["enableUserMentioning"];
253
+ $this->subscription["sendMailToMentionedUsers"] = isset($options[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"]) ? $options[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"] : $defaultOptions[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"];
254
+ $this->subscription["isNotifyOnCommentApprove"] = isset($options[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"]) ? $options[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"] : $defaultOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"];
255
+ $this->subscription["enableMemberConfirm"] = isset($options[self::TAB_SUBSCRIPTION]["enableMemberConfirm"]) ? $options[self::TAB_SUBSCRIPTION]["enableMemberConfirm"] : $defaultOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"];
256
+ $this->subscription["enableGuestsConfirm"] = isset($options[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"]) ? $options[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"] : $defaultOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"];
257
+ $this->subscription["subscriptionType"] = isset($options[self::TAB_SUBSCRIPTION]["subscriptionType"]) ? $options[self::TAB_SUBSCRIPTION]["subscriptionType"] : $defaultOptions[self::TAB_SUBSCRIPTION]["subscriptionType"];
258
+ $this->subscription["showReplyCheckbox"] = isset($options[self::TAB_SUBSCRIPTION]["showReplyCheckbox"]) ? $options[self::TAB_SUBSCRIPTION]["showReplyCheckbox"] : $defaultOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"];
259
+ $this->subscription["isReplyDefaultChecked"] = isset($options[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"]) ? $options[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"] : $defaultOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"];
260
+ $this->subscription["usePostmaticForCommentNotification"] = isset($options[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"]) ? $options[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"] : $defaultOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"];
261
+ $this->subscription["isFollowActive"] = isset($options[self::TAB_SUBSCRIPTION]["isFollowActive"]) ? $options[self::TAB_SUBSCRIPTION]["isFollowActive"] : $defaultOptions[self::TAB_SUBSCRIPTION]["isFollowActive"];
262
+ $this->subscription["disableFollowConfirmForUsers"] = isset($options[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"]) ? $options[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"] : $defaultOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"];
263
+ /* labels */
264
+ $this->labels["blogRoleLabels"] = isset($options[self::TAB_LABELS]["blogRoleLabels"]) ? $options[self::TAB_LABELS]["blogRoleLabels"] : $defaultOptions[self::TAB_LABELS]["blogRoleLabels"];
265
+ $this->labels["blogRoles"] = isset($options[self::TAB_LABELS]["blogRoles"]) ? $options[self::TAB_LABELS]["blogRoles"] : $defaultOptions[self::TAB_LABELS]["blogRoles"];
266
+ /* moderation */
267
+ $this->moderation["commentEditableTime"] = isset($options[self::TAB_MODERATION]["commentEditableTime"]) ? $options[self::TAB_MODERATION]["commentEditableTime"] : $defaultOptions[self::TAB_MODERATION]["commentEditableTime"];
268
+ $this->moderation["enableEditingWhenHaveReplies"] = isset($options[self::TAB_MODERATION]["enableEditingWhenHaveReplies"]) ? $options[self::TAB_MODERATION]["enableEditingWhenHaveReplies"] : $defaultOptions[self::TAB_MODERATION]["enableEditingWhenHaveReplies"];
269
+ $this->moderation["displayEditingInfo"] = isset($options[self::TAB_MODERATION]["displayEditingInfo"]) ? $options[self::TAB_MODERATION]["displayEditingInfo"] : $defaultOptions[self::TAB_MODERATION]["displayEditingInfo"];
270
+ $this->moderation["enableStickButton"] = isset($options[self::TAB_MODERATION]["enableStickButton"]) ? $options[self::TAB_MODERATION]["enableStickButton"] : $defaultOptions[self::TAB_MODERATION]["enableStickButton"];
271
+ $this->moderation["enableCloseButton"] = isset($options[self::TAB_MODERATION]["enableCloseButton"]) ? $options[self::TAB_MODERATION]["enableCloseButton"] : $defaultOptions[self::TAB_MODERATION]["enableCloseButton"];
272
+ $this->moderation["restrictCommentingPerUser"] = isset($options[self::TAB_MODERATION]["restrictCommentingPerUser"]) ? $options[self::TAB_MODERATION]["restrictCommentingPerUser"] : $defaultOptions[self::TAB_MODERATION]["restrictCommentingPerUser"];
273
+ $this->moderation["commentRestrictionType"] = isset($options[self::TAB_MODERATION]["commentRestrictionType"]) ? $options[self::TAB_MODERATION]["commentRestrictionType"] : $defaultOptions[self::TAB_MODERATION]["commentRestrictionType"];
274
+ $this->moderation["userCommentsLimit"] = isset($options[self::TAB_MODERATION]["userCommentsLimit"]) ? $options[self::TAB_MODERATION]["userCommentsLimit"] : $defaultOptions[self::TAB_MODERATION]["userCommentsLimit"];
275
+ /* content */
276
+ $this->content["commentTextMinLength"] = isset($options[self::TAB_CONTENT]["commentTextMinLength"]) ? $options[self::TAB_CONTENT]["commentTextMinLength"] : $defaultOptions[self::TAB_CONTENT]["commentTextMinLength"];
277
+ $this->content["commentTextMaxLength"] = isset($options[self::TAB_CONTENT]["commentTextMaxLength"]) ? $options[self::TAB_CONTENT]["commentTextMaxLength"] : $defaultOptions[self::TAB_CONTENT]["commentTextMaxLength"];
278
+ $this->content["enableImageConversion"] = isset($options[self::TAB_CONTENT]["enableImageConversion"]) ? $options[self::TAB_CONTENT]["enableImageConversion"] : $defaultOptions[self::TAB_CONTENT]["enableImageConversion"];
279
+ $this->content["enableShortcodes"] = isset($options[self::TAB_CONTENT]["enableShortcodes"]) ? $options[self::TAB_CONTENT]["enableShortcodes"] : $defaultOptions[self::TAB_CONTENT]["enableShortcodes"];
280
+ $this->content["commentReadMoreLimit"] = isset($options[self::TAB_CONTENT]["commentReadMoreLimit"]) ? $options[self::TAB_CONTENT]["commentReadMoreLimit"] : $defaultOptions[self::TAB_CONTENT]["commentReadMoreLimit"];
281
+ $this->content["wmuIsEnabled"] = isset($options[self::TAB_CONTENT]["wmuIsEnabled"]) ? $options[self::TAB_CONTENT]["wmuIsEnabled"] : $defaultOptions[self::TAB_CONTENT]["wmuIsEnabled"];
282
+ $this->content["wmuIsGuestAllowed"] = isset($options[self::TAB_CONTENT]["wmuIsGuestAllowed"]) ? $options[self::TAB_CONTENT]["wmuIsGuestAllowed"] : $defaultOptions[self::TAB_CONTENT]["wmuIsGuestAllowed"];
283
+ $this->content["wmuIsLightbox"] = isset($options[self::TAB_CONTENT]["wmuIsLightbox"]) ? $options[self::TAB_CONTENT]["wmuIsLightbox"] : $defaultOptions[self::TAB_CONTENT]["wmuIsLightbox"];
284
+ $this->content["wmuMimeTypes"] = isset($options[self::TAB_CONTENT]["wmuMimeTypes"]) ? $options[self::TAB_CONTENT]["wmuMimeTypes"] : $defaultOptions[self::TAB_CONTENT]["wmuMimeTypes"];
285
+ $this->content["wmuMaxFileSize"] = isset($options[self::TAB_CONTENT]["wmuMaxFileSize"]) ? $options[self::TAB_CONTENT]["wmuMaxFileSize"] : $defaultOptions[self::TAB_CONTENT]["wmuMaxFileSize"];
286
+ $this->content["wmuIsShowFilesDashboard"] = isset($options[self::TAB_CONTENT]["wmuIsShowFilesDashboard"]) ? $options[self::TAB_CONTENT]["wmuIsShowFilesDashboard"] : $defaultOptions[self::TAB_CONTENT]["wmuIsShowFilesDashboard"];
287
+ $this->content["wmuSingleImageWidth"] = isset($options[self::TAB_CONTENT]["wmuSingleImageWidth"]) ? $options[self::TAB_CONTENT]["wmuSingleImageWidth"] : $defaultOptions[self::TAB_CONTENT]["wmuSingleImageWidth"];
288
+ $this->content["wmuSingleImageHeight"] = isset($options[self::TAB_CONTENT]["wmuSingleImageHeight"]) ? $options[self::TAB_CONTENT]["wmuSingleImageHeight"] : $defaultOptions[self::TAB_CONTENT]["wmuSingleImageHeight"];
289
+ $this->content["wmuImageSizes"] = isset($options[self::TAB_CONTENT]["wmuImageSizes"]) ? array_filter($options[self::TAB_CONTENT]["wmuImageSizes"]) : $defaultOptions[self::TAB_CONTENT]["wmuImageSizes"];
290
+ /* live */
291
+ $this->live["enableBubble"] = isset($options[self::TAB_LIVE]["enableBubble"]) ? $options[self::TAB_LIVE]["enableBubble"] : $defaultOptions[self::TAB_LIVE]["enableBubble"];
292
+ $this->live["bubbleLiveUpdate"] = isset($options[self::TAB_LIVE]["bubbleLiveUpdate"]) ? $options[self::TAB_LIVE]["bubbleLiveUpdate"] : $defaultOptions[self::TAB_LIVE]["bubbleLiveUpdate"];
293
+ $this->live["bubbleLocation"] = isset($options[self::TAB_LIVE]["bubbleLocation"]) ? $options[self::TAB_LIVE]["bubbleLocation"] : $defaultOptions[self::TAB_LIVE]["bubbleLocation"];
294
+ $this->live["bubbleShowNewCommentMessage"] = isset($options[self::TAB_LIVE]["bubbleShowNewCommentMessage"]) ? $options[self::TAB_LIVE]["bubbleShowNewCommentMessage"] : $defaultOptions[self::TAB_LIVE]["bubbleShowNewCommentMessage"];
295
+ $this->live["bubbleHintTimeout"] = isset($options[self::TAB_LIVE]["bubbleHintTimeout"]) ? $options[self::TAB_LIVE]["bubbleHintTimeout"] : $defaultOptions[self::TAB_LIVE]["bubbleHintTimeout"];
296
+ $this->live["bubbleHintHideTimeout"] = isset($options[self::TAB_LIVE]["bubbleHintHideTimeout"]) ? $options[self::TAB_LIVE]["bubbleHintHideTimeout"] : $defaultOptions[self::TAB_LIVE]["bubbleHintHideTimeout"];
297
+ $this->live["commentListUpdateType"] = isset($options[self::TAB_LIVE]["commentListUpdateType"]) ? $options[self::TAB_LIVE]["commentListUpdateType"] : $defaultOptions[self::TAB_LIVE]["commentListUpdateType"];
298
+ $this->live["liveUpdateGuests"] = isset($options[self::TAB_LIVE]["liveUpdateGuests"]) ? $options[self::TAB_LIVE]["liveUpdateGuests"] : $defaultOptions[self::TAB_LIVE]["liveUpdateGuests"];
299
+ $this->live["commentListUpdateTimer"] = isset($options[self::TAB_LIVE]["commentListUpdateTimer"]) ? $options[self::TAB_LIVE]["commentListUpdateTimer"] : $defaultOptions[self::TAB_LIVE]["commentListUpdateTimer"];
300
+ /* inline */
301
+ $this->inline["showInlineFilterButton"] = isset($options[self::TAB_INLINE]["showInlineFilterButton"]) ? $options[self::TAB_INLINE]["showInlineFilterButton"] : $defaultOptions[self::TAB_INLINE]["showInlineFilterButton"];
302
+ $this->inline["inlineFeedbackAttractionType"] = isset($options[self::TAB_INLINE]["inlineFeedbackAttractionType"]) ? $options[self::TAB_INLINE]["inlineFeedbackAttractionType"] : $defaultOptions[self::TAB_INLINE]["inlineFeedbackAttractionType"];
303
+ /* general */
304
+ $this->general["isEnableOnHome"] = isset($options[self::TAB_GENERAL]["isEnableOnHome"]) ? $options[self::TAB_GENERAL]["isEnableOnHome"] : $defaultOptions[self::TAB_GENERAL]["isEnableOnHome"];
305
+ $this->general["isNativeAjaxEnabled"] = isset($options[self::TAB_GENERAL]["isNativeAjaxEnabled"]) ? $options[self::TAB_GENERAL]["isNativeAjaxEnabled"] : $defaultOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"];
306
+ $this->general["loadComboVersion"] = isset($options[self::TAB_GENERAL]["loadComboVersion"]) ? $options[self::TAB_GENERAL]["loadComboVersion"] : $defaultOptions[self::TAB_GENERAL]["loadComboVersion"];
307
+ $this->general["loadMinVersion"] = isset($options[self::TAB_GENERAL]["loadMinVersion"]) ? $options[self::TAB_GENERAL]["loadMinVersion"] : $defaultOptions[self::TAB_GENERAL]["loadMinVersion"];
308
+ $this->general["commentLinkFilter"] = isset($options[self::TAB_GENERAL]["commentLinkFilter"]) ? $options[self::TAB_GENERAL]["commentLinkFilter"] : $defaultOptions[self::TAB_GENERAL]["commentLinkFilter"];
309
+ $this->general["redirectPage"] = isset($options[self::TAB_GENERAL]["redirectPage"]) ? $options[self::TAB_GENERAL]["redirectPage"] : $defaultOptions[self::TAB_GENERAL]["redirectPage"];
310
+ $this->general["simpleCommentDate"] = isset($options[self::TAB_GENERAL]["simpleCommentDate"]) ? $options[self::TAB_GENERAL]["simpleCommentDate"] : $defaultOptions[self::TAB_GENERAL]["simpleCommentDate"];
311
+ $this->general["dateDiffFormat"] = isset($options[self::TAB_GENERAL]["dateDiffFormat"]) ? $options[self::TAB_GENERAL]["dateDiffFormat"] : $defaultOptions[self::TAB_GENERAL]["dateDiffFormat"];
312
+ $this->general["isUsePoMo"] = isset($options[self::TAB_GENERAL]["isUsePoMo"]) ? $options[self::TAB_GENERAL]["isUsePoMo"] : $defaultOptions[self::TAB_GENERAL]["isUsePoMo"];
313
+ $this->general["showPluginPoweredByLink"] = isset($options[self::TAB_GENERAL]["showPluginPoweredByLink"]) ? $options[self::TAB_GENERAL]["showPluginPoweredByLink"] : $defaultOptions[self::TAB_GENERAL]["showPluginPoweredByLink"];
314
+ $this->general["isGravatarCacheEnabled"] = isset($options[self::TAB_GENERAL]["isGravatarCacheEnabled"]) ? $options[self::TAB_GENERAL]["isGravatarCacheEnabled"] : $defaultOptions[self::TAB_GENERAL]["isGravatarCacheEnabled"];
315
+ $this->general["gravatarCacheMethod"] = isset($options[self::TAB_GENERAL]["gravatarCacheMethod"]) ? $options[self::TAB_GENERAL]["gravatarCacheMethod"] : $defaultOptions[self::TAB_GENERAL]["gravatarCacheMethod"];
316
+ $this->general["gravatarCacheTimeout"] = isset($options[self::TAB_GENERAL]["gravatarCacheTimeout"]) ? $options[self::TAB_GENERAL]["gravatarCacheTimeout"] : $defaultOptions[self::TAB_GENERAL]["gravatarCacheTimeout"];
317
+ do_action("wpdiscuz_init_options", $this);
318
+ }
319
 
320
+ /**
321
+ * initialize default phrases
322
+ */
323
+ public function initPhrases() {
324
+ $this->phrases = [
325
+ "wc_be_the_first_text" => esc_html__("Be the First to Comment!", "wpdiscuz"),
326
+ "wc_comment_start_text" => esc_html__("Start the discussion", "wpdiscuz"),
327
+ "wc_comment_join_text" => esc_html__("Join the discussion", "wpdiscuz"),
328
+ "wc_most_reacted_comment" => esc_html__("Most reacted comment", "wpdiscuz"),
329
+ "wc_hottest_comment_thread" => esc_html__("Hottest comment thread", "wpdiscuz"),
330
+ "wc_inline_comments" => esc_html__("Inline Comments", "wpdiscuz"),
331
+ "wc_email_text" => esc_html__("Email", "wpdiscuz"),
332
+ "wc_subscribe_anchor" => esc_html__("Subscribe", "wpdiscuz"),
333
+ "wc_notify_of" => esc_html__("Notify of", "wpdiscuz"),
334
+ "wc_notify_on_new_comment" => esc_html__("new follow-up comments", "wpdiscuz"),
335
+ "wc_notify_on_all_new_reply" => esc_html__("new replies to my comments", "wpdiscuz"),
336
+ "wc_notify_on_new_reply" => esc_html__("Notify of new replies to this comment", "wpdiscuz"),
337
+ "wc_sort_by" => esc_html__("Sort by", "wpdiscuz"),
338
+ "wc_newest" => esc_html__("Newest", "wpdiscuz"),
339
+ "wc_oldest" => esc_html__("Oldest", "wpdiscuz"),
340
+ "wc_most_voted" => esc_html__("Most Voted", "wpdiscuz"),
341
+ "wc_load_more_submit_text" => esc_html__("Load More Comments", "wpdiscuz"),
342
+ "wc_load_rest_comments_submit_text" => esc_html__("Load Rest of Comments", "wpdiscuz"),
343
+ "wc_reply_text" => esc_html__("Reply", "wpdiscuz"),
344
+ "wc_share_text" => esc_html__("Share", "wpdiscuz"),
345
+ "wc_edit_text" => esc_html__("Edit", "wpdiscuz"),
346
+ "wc_share_facebook" => esc_html__("Share On Facebook", "wpdiscuz"),
347
+ "wc_share_twitter" => esc_html__("Share On Twitter", "wpdiscuz"),
348
+ "wc_share_whatsapp" => esc_html__("Share On WhatsApp", "wpdiscuz"),
349
+ "wc_share_vk" => esc_html__("Share On VKontakte", "wpdiscuz"),
350
+ "wc_share_ok" => esc_html__("Share On Odnoklassniki", "wpdiscuz"),
351
+ "wc_hide_replies_text" => esc_html__("Hide Replies", "wpdiscuz"),
352
+ "wc_show_replies_text" => esc_html__("View Replies", "wpdiscuz"),
353
+ "wc_email_subject" => esc_html__("New Comment", "wpdiscuz"),
354
+ "wc_email_message" => __("Hi [SUBSCRIBER_NAME],<br/><br/> new comment has been posted by the <em><strong>[COMMENT_AUTHOR]</em></strong> on the discussion section you've been interested in<br/><br/><a href='[COMMENT_URL]'>[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]<br/><br/><a href='[UNSUBSCRIBE_URL]'>Unsubscribe</a>", "wpdiscuz"),
355
+ "wc_all_comment_new_reply_subject" => esc_html__("New Reply", "wpdiscuz"),
356
+ "wc_all_comment_new_reply_message" => __("Hi [SUBSCRIBER_NAME],<br/><br/> new reply has been posted by the <em><strong>[COMMENT_AUTHOR]</em></strong> on the discussion section you've been interested in<br/><br/><a href='[COMMENT_URL]'>[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]<br/><br/><a href='[UNSUBSCRIBE_URL]'>Unsubscribe</a>", "wpdiscuz"),
357
+ "wc_new_reply_email_subject" => esc_html__("New Reply", "wpdiscuz"),
358
+ "wc_new_reply_email_message" => __("Hi [SUBSCRIBER_NAME],<br/><br/> new reply has been posted by the <em><strong>[COMMENT_AUTHOR]</em></strong> on the discussion section you've been interested in<br/><br/><a href='[COMMENT_URL]'>[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]<br/><br/><a href='[UNSUBSCRIBE_URL]'>Unsubscribe</a>", "wpdiscuz"),
359
+ "wc_subscribed_on_comment" => esc_html__("You're subscribed for new replies on this comment", "wpdiscuz"),
360
+ "wc_subscribed_on_all_comment" => esc_html__("You're subscribed for new replies on all your comments", "wpdiscuz"),
361
+ "wc_subscribed_on_post" => esc_html__("You're subscribed for new follow-up comments on this post", "wpdiscuz"),
362
+ "wc_unsubscribe" => esc_html__("Unsubscribe", "wpdiscuz"),
363
+ "wc_ignore_subscription" => esc_html__("Cancel subscription", "wpdiscuz"),
364
+ "wc_unsubscribe_message" => esc_html__("You've successfully unsubscribed.", "wpdiscuz"),
365
+ "wc_subscribe_message" => esc_html__("You've successfully subscribed.", "wpdiscuz"),
366
+ "wc_confirm_email" => esc_html__("Confirm your subscription", "wpdiscuz"),
367
+ "wc_comfirm_success_message" => esc_html__("You've successfully confirmed your subscription.", "wpdiscuz"),
368
+ "wc_confirm_email_subject" => esc_html__("Subscription Confirmation", "wpdiscuz"),
369
+ "wc_confirm_email_message" => __("Hi, <br/> You just subscribed for new comments on our website. This means you will receive an email when new comments are posted according to subscription option you've chosen. <br/> To activate, click confirm below. If you believe this is an error, ignore this message and we'll never bother you again. <br/><br/><a href='[POST_URL]'>[POST_TITLE]</a><br/><br/><a href='[CONFIRM_URL]'>Confirm Your Subscrption</a><br/><br/><a href='[CANCEL_URL]'>Cancel Subscription</a>", "wpdiscuz"),
370
+ "wc_error_empty_text" => esc_html__("please fill out this field to comment", "wpdiscuz"),
371
+ "wc_error_email_text" => esc_html__("email address is invalid", "wpdiscuz"),
372
+ "wc_error_url_text" => esc_html__("url is invalid", "wpdiscuz"),
373
+ "wc_year_text" => esc_html__("year", "wpdiscuz"),
374
+ "wc_year_text_plural" => esc_html__("years", "wpdiscuz"), // PLURAL
375
+ "wc_month_text" => esc_html__("month", "wpdiscuz"),
376
+ "wc_month_text_plural" => esc_html__("months", "wpdiscuz"), // PLURAL
377
+ "wc_day_text" => esc_html__("day", "wpdiscuz"),
378
+ "wc_day_text_plural" => esc_html__("days", "wpdiscuz"), // PLURAL
379
+ "wc_hour_text" => esc_html__("hour", "wpdiscuz"),
380
+ "wc_hour_text_plural" => esc_html__("hours", "wpdiscuz"), // PLURAL
381
+ "wc_minute_text" => esc_html__("minute", "wpdiscuz"),
382
+ "wc_minute_text_plural" => esc_html__("minutes", "wpdiscuz"), // PLURAL
383
+ "wc_second_text" => esc_html__("second", "wpdiscuz"),
384
+ "wc_second_text_plural" => esc_html__("seconds", "wpdiscuz"), // PLURAL
385
+ "wc_right_now_text" => esc_html__("right now", "wpdiscuz"),
386
+ "wc_ago_text" => esc_html__("ago", "wpdiscuz"),
387
+ "wc_you_must_be_text" => esc_html__("You must be", "wpdiscuz"),
388
+ "wc_logged_in_as" => esc_html__("You are logged in as", "wpdiscuz"),
389
+ "wc_log_in" => esc_html__("Login", "wpdiscuz"),
390
+ "wc_login_please" => esc_html__("Please %s to comment", "wpdiscuz"),
391
+ "wc_log_out" => esc_html__("Log out", "wpdiscuz"),
392
+ "wc_logged_in_text" => esc_html__("logged in", "wpdiscuz"),
393
+ "wc_to_post_comment_text" => esc_html__("to post a comment.", "wpdiscuz"),
394
+ "wc_vote_up" => esc_html__("Vote Up", "wpdiscuz"),
395
+ "wc_vote_down" => esc_html__("Vote Down", "wpdiscuz"),
396
+ "wc_vote_counted" => esc_html__("Vote Counted", "wpdiscuz"),
397
+ "wc_vote_only_one_time" => esc_html__("You've already voted for this comment", "wpdiscuz"),
398
+ "wc_voting_error" => esc_html__("Voting Error", "wpdiscuz"),
399
+ "wc_login_to_vote" => esc_html__("You Must Be Logged In To Vote", "wpdiscuz"),
400
+ "wc_self_vote" => esc_html__("You cannot vote for your comment", "wpdiscuz"),
401
+ "wc_deny_voting_from_same_ip" => esc_html__("You are not allowed to vote for this comment", "wpdiscuz"),
402
+ "wc_invalid_captcha" => esc_html__("Invalid Captcha Code", "wpdiscuz"),
403
+ "wc_invalid_field" => esc_html__("Some of field value is invalid", "wpdiscuz"),
404
+ "wc_awaiting_for_approval" => esc_html__("Awaiting for approval", "wpdiscuz"),
405
+ "wc_comment_not_updated" => esc_html__("Sorry, the comment was not updated", "wpdiscuz"),
406
+ "wc_comment_edit_not_possible" => esc_html__("Sorry, this comment is no longer possible to edit", "wpdiscuz"),
407
+ "wc_comment_not_edited" => esc_html__("You've not made any changes", "wpdiscuz"),
408
+ "wc_comment_edit_save_button" => esc_html__("Save", "wpdiscuz"),
409
+ "wc_comment_edit_cancel_button" => esc_html__("Cancel", "wpdiscuz"),
410
+ "wc_msg_input_min_length" => esc_html__("Input is too short", "wpdiscuz"),
411
+ "wc_msg_input_max_length" => esc_html__("Input is too long", "wpdiscuz"),
412
+ "wc_read_more" => esc_html__("Read more &raquo;", "wpdiscuz"),
413
+ "wc_anonymous" => esc_html__("Anonymous", "wpdiscuz"),
414
+ "wc_msg_required_fields" => esc_html__("Please fill out required fields", "wpdiscuz"),
415
+ "wc_connect_with" => esc_html__("Connect with", "wpdiscuz"),
416
+ "wc_subscribed_to" => esc_html__("You're subscribed to", "wpdiscuz"),
417
+ "wc_postmatic_subscription_label" => esc_html__("Participate in this discussion via email", "wpdiscuz"),
418
+ "wc_form_subscription_submit" => esc_html__("&rsaquo;", "wpdiscuz"),
419
+ "wc_comment_approved_email_subject" => esc_html__("Your comment is approved!", "wpdiscuz"),
420
+ "wc_comment_approved_email_message" => __('Hi [COMMENT_AUTHOR],<br/><br/>your comment was approved.<br/><br/><a href="[COMMENT_URL]">[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]', "wpdiscuz"),
421
+ "wc_roles_cannot_comment_message" => esc_html__("Comments are closed.", "wpdiscuz"),
422
+ "wc_stick_comment_btn_title" => esc_html__("Stick this comment", "wpdiscuz"),
423
+ "wc_stick_comment" => esc_html__("Stick", "wpdiscuz"),
424
+ "wc_unstick_comment" => esc_html__("Unstick", "wpdiscuz"),
425
+ "wc_sticky_comment_icon_title" => esc_html__("Sticky Comment Thread", "wpdiscuz"),
426
+ "wc_close_comment_btn_title" => esc_html__("Close this thread", "wpdiscuz"),
427
+ "wc_close_comment" => esc_html__("Close", "wpdiscuz"),
428
+ "wc_open_comment" => esc_html__("Open", "wpdiscuz"),
429
+ "wc_closed_comment_icon_title" => esc_html__("Closed Comment Thread", "wpdiscuz"),
430
+ "wc_social_login_agreement_label" => esc_html__("I allow to create an account", "wpdiscuz"),
431
+ "wc_social_login_agreement_desc" => esc_html__("When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.", "wpdiscuz"),
432
+ "wc_agreement_button_disagree" => esc_html__("Disagree", "wpdiscuz"),
433
+ "wc_agreement_button_agree" => esc_html__("Agree", "wpdiscuz"),
434
+ "wc_content_and_settings" => esc_html__("My content and settings", "wpdiscuz"),
435
+ "wc_user_settings_activity" => esc_html__("Activity", "wpdiscuz"),
436
+ "wc_user_settings_subscriptions" => esc_html__("Subscriptions", "wpdiscuz"),
437
+ "wc_user_settings_follows" => esc_html__("Follows", "wpdiscuz"),
438
+ "wc_user_settings_response_to" => esc_html__("In response to:", "wpdiscuz"),
439
+ "wc_user_settings_email_me_delete_links" => esc_html__("Bulk management via email", "wpdiscuz"),
440
+ "wc_user_settings_email_me_delete_links_desc" => esc_html__("Click the button above to get an email with bulk delete and unsubscribe links.", "wpdiscuz"),
441
+ "wc_user_settings_no_data" => esc_html__("No data found!", "wpdiscuz"),
442
+ "wc_user_settings_request_deleting_comments" => esc_html__("Delete all my comments", "wpdiscuz"),
443
+ "wc_user_settings_cancel_subscriptions" => esc_html__("Cancel all comment subscriptions", "wpdiscuz"),
444
+ "wc_user_settings_clear_cookie" => esc_html__("Clear cookies with my personal data", "wpdiscuz"),
445
+ "wc_user_settings_delete_links" => esc_html__("Bulk management via email", "wpdiscuz"),
446
+ "wc_user_settings_delete_all_comments" => esc_html__("Delete all my comments", "wpdiscuz"),
447
+ "wc_user_settings_delete_all_comments_message" => __('Please use this link to delete all your comments. Please note, that this action cannot be undone.<br/><br/><a href="[DELETE_COMMENTS_URL]" target="_blank">Delete all my comments</a><br/><br/>', "wpdiscuz"),
448
+ "wc_user_settings_delete_all_subscriptions" => esc_html__("Delete all my subscriptions", "wpdiscuz"),
449
+ "wc_user_settings_delete_all_subscriptions_message" => __('Please use this link to cancel all subscriptions for new comments. Please note, that this action cannot be undone.<br/><br/><a href="[DELETE_SUBSCRIPTIONS_URL]" target="_blank">Delete all my subscriptions</a><br/><br/>', "wpdiscuz"),
450
+ "wc_user_settings_delete_all_follows" => esc_html__("Delete all my follows", "wpdiscuz"),
451
+ "wc_user_settings_delete_all_follows_message" => __('Please use this link to cancel all follows for new comments. Please note, that this action cannot be undone.<br/><br/><a href="[DELETE_FOLLOWS_URL]" target="_blank">Delete all my follows</a><br/><br/>', "wpdiscuz"),
452
+ "wc_user_settings_subscribed_to_replies" => esc_html__("subscribed to this comment", "wpdiscuz"),
453
+ "wc_user_settings_subscribed_to_replies_own" => esc_html__("subscribed to my comments", "wpdiscuz"),
454
+ "wc_user_settings_subscribed_to_all_comments" => esc_html__("subscribed to all follow-up comments of this post", "wpdiscuz"),
455
+ "wc_user_settings_check_email" => esc_html__("Please check your email."),
456
+ "wc_user_settings_email_error" => esc_html__("Error : Can't send email.", "wpdiscuz"),
457
+ "wc_confirm_comment_delete" => esc_html__("Are you sure you want to delete this comment?", "wpdiscuz"),
458
+ "wc_confirm_cancel_subscription" => esc_html__("Are you sure you want to cancel this subscription?", "wpdiscuz"),
459
+ "wc_confirm_cancel_follow" => esc_html__("Are you sure you want to cancel this follow?", "wpdiscuz"),
460
+ "wc_follow_user" => esc_html__("Follow this user", "wpdiscuz"),
461
+ "wc_unfollow_user" => esc_html__("Unfollow this user", "wpdiscuz"),
462
+ "wc_follow_success" => esc_html__("You started following this comment author", "wpdiscuz"),
463
+ "wc_follow_canceled" => esc_html__("You stopped following this comment author.", "wpdiscuz"),
464
+ "wc_follow_email_confirm" => esc_html__("Please check your email and confirm the user following request.", "wpdiscuz"),
465
+ "wc_follow_email_confirm_fail" => esc_html__("Sorry, we couldn't send confirmation email.", "wpdiscuz"),
466
+ "wc_follow_login_to_follow" => esc_html__("Please login to follow users.", "wpdiscuz"),
467
+ "wc_follow_impossible" => esc_html__("We are sorry, but you can't follow this user.", "wpdiscuz"),
468
+ "wc_follow_not_added" => esc_html__("Following failed. Please try again later.", "wpdiscuz"),
469
+ "wc_follow_confirm" => esc_html__("Confirm user following request", "wpdiscuz"),
470
+ "wc_follow_cancel" => esc_html__("Cancel user following request", "wpdiscuz"),
471
+ "wc_follow_confirm_email_subject" => esc_html__("User Following Confirmation", "wpdiscuz"),
472
+ "wc_follow_confirm_email_message" => __('Hi, <br/> You just started following a new user. You\'ll get email notification once new comment is posted by this user. <br/> Please click on "user following confirmation" link to confirm your request. If you believe this is an error, ignore this message and we\'ll never bother you again. <br/><br/><a href="[POST_URL]">[POST_TITLE]</a><br/><br/><a href="[CONFIRM_URL]">' . __("Confirm Follow", "wpdiscuz") . '</a><br/><br/><a href="[CANCEL_URL]">' . esc_html__("Unfollow", "wpdiscuz") . "</a>", "wpdiscuz"),
473
+ "wc_follow_email_subject" => esc_html__("New Comment", "wpdiscuz"),
474
+ "wc_follow_email_message" => __('Hi [FOLLOWER_NAME],<br/><br/> new comment has been posted by the <em><strong>[COMMENT_AUTHOR]</em></strong> you are following<br/><br/><a href="[COMMENT_URL]">[COMMENT_URL]</a><br/><br/>[COMMENT_CONTENT]<br/><br/><a href="[CANCEL_URL]">' . esc_html__("Unfollow", "wpdiscuz") . '</a>', "wpdiscuz"),
475
+ "wc_mentioned_email_subject" => esc_html__("You have been mentioned in comment", "wpdiscuz"),
476
+ "wc_mentioned_email_message" => __('Hi [MENTIONED_USER_NAME]!<br/>You have been mentioned in a comment posted on "[POST_TITLE]" post by [COMMENT_AUTHOR].<br/><br/>Comment URL: <a href="[COMMENT_URL]">[COMMENT_URL]</a>', "wpdiscuz"),
477
+ "wc_copied_to_clipboard" => esc_html__("Copied to clipboard!", "wpdiscuz"),
478
+ "wc_feedback_shortcode_tooltip" => esc_html__("Select a part of text and ask readers for feedback (inline commenting)", "wpdiscuz"),
479
+ "wc_feedback_popup_title" => esc_html__("Ask for Feedback", "wpdiscuz"),
480
+ "wc_please_leave_feebdack" => esc_html__("Please leave a feedback on this", "wpdiscuz"),
481
+ "wc_feedback_content_text" => esc_html__("", "wpdiscuz"),
482
+ "wc_feedback_comment_success" => esc_html__("Thank you for your feedback!", "wpdiscuz"),
483
+ "wc_commenting_is_closed" => esc_html__("Commenting is closed!", "wpdiscuz"),
484
+ "wc_closed_comment_thread" => esc_html__("This is closed comment thread", "wpdiscuz"),
485
+ "wc_bubble_invite_message" => esc_html__("Would love your thoughts, please comment.", "wpdiscuz"),
486
+ "wc_vote_phrase" => esc_html__("vote", "wpdiscuz"),
487
+ "wc_votes_phrase" => esc_html__("votes", "wpdiscuz"),
488
+ "wc_comment_link" => esc_html__("Comment Link", "wpdiscuz"),
489
+ "wc_not_allowed_to_comment_more_than" => esc_html__("We are sorry, you are not allowed to comment more than %d time(s)!", "wpdiscuz"),
490
+ "wc_not_allowed_to_create_comment_thread_more_than" => esc_html__("We are sorry, you are not allowed to comment more than %d time(s)!", "wpdiscuz"),
491
+ "wc_not_allowed_to_reply_more_than" => esc_html__("We are sorry, you are not allowed to reply more than %d time(s)!", "wpdiscuz"),
492
+ "wc_inline_form_comment" => esc_html__("Your comment here...", "wpdiscuz"),
493
+ "wc_inline_form_notify" => esc_html__("Notify me via email when a new reply is posted", "wpdiscuz"),
494
+ "wc_inline_form_name" => esc_html__("Your Name*", "wpdiscuz"),
495
+ "wc_inline_form_email" => esc_html__("Your Email", "wpdiscuz"),
496
+ "wc_inline_form_comment_button" => esc_html__("COMMENT", "wpdiscuz"),
497
+ "wc_inline_comments_view_all" => esc_html__("View all comments", "wpdiscuz"),
498
+ "wc_inline_feedbacks" => esc_html__("Inline Feedbacks", "wpdiscuz"),
499
+ "wc_unable_sent_email" => esc_html__("Unable to send an email", "wpdiscuz"),
500
+ "wc_subscription_fault" => esc_html__("Subscription Fault", "wpdiscuz"),
501
+ "wc_comments_are_deleted" => esc_html__("Your comments have been deleted from database", "wpdiscuz"),
502
+ "wc_cancel_subs_success" => esc_html__("You cancel all your subscriptions successfully", "wpdiscuz"),
503
+ "wc_cancel_follows_success" => esc_html__("You cancel all your follows successfully", "wpdiscuz"),
504
+ "wc_follow_confirm_success" => esc_html__("Follow has been confirmed successfully", "wpdiscuz"),
505
+ "wc_follow_cancel_success" => esc_html__("Follow has been canceled successfully", "wpdiscuz"),
506
+ "wc_login_to_comment" => esc_html__("Please login to comment", "wpdiscuz"),
507
+ "wc_view_comments" => esc_html__("View Comments", "wpdiscuz"),
508
+ "wc_spoiler" => esc_html__("Spoiler", "wpdiscuz"),
509
+ "wc_last_edited" => esc_html__('Last edited %1$s by %2$s', "wpdiscuz"),
510
+ "wc_reply_to" => esc_html__("Reply to", "wpdiscuz"),
511
+ "wc_manage_comment" => esc_html__("Manage Comment", "wpdiscuz"),
512
+ "wc_spoiler_title" => esc_html__("Spoiler Title", "wpdiscuz"),
513
+ "wc_cannot_rate_again" => esc_html__("You cannot rate again", "wpdiscuz"),
514
+ "wc_not_allowed_to_rate" => esc_html__("You're not allowed to rate here", "wpdiscuz"),
515
+ // Media Upload
516
+ "wmuPhraseConfirmDelete" => esc_html__("Are you sure you want to delete this attachment?", "wpdiscuz"),
517
+ "wmuPhraseNotAllowedFile" => esc_html__("Not allowed file type", "wpdiscuz"),
518
+ "wmuPhraseMaxFileCount" => esc_html__("Maximum number of uploaded files is", "wpdiscuz"),
519
+ "wmuPhraseMaxFileSize" => esc_html__("Maximum upload file size is", "wpdiscuz"),
520
+ "wmuPhrasePostMaxSize" => esc_html__("Maximum post size is", "wpdiscuz"),
521
+ "wmuAttachImage" => esc_html__("Attach an image to this comment", "wpdiscuz"),
522
+ "wmuChangeImage" => esc_html__("Change the attached image", "wpdiscuz"),
523
+ ];
524
+ }
525
 
526
+ public function toArray() {
527
+ $options = [
528
+ self::TAB_FORM => [
529
+ "commentFormView" => $this->form["commentFormView"],
530
+ "enableDropAnimation" => $this->form["enableDropAnimation"],
531
+ "richEditor" => $this->form["richEditor"],
532
+ "boldButton" => $this->form["boldButton"],
533
+ "italicButton" => $this->form["italicButton"],
534
+ "underlineButton" => $this->form["underlineButton"],
535
+ "strikeButton" => $this->form["strikeButton"],
536
+ "olButton" => $this->form["olButton"],
537
+ "ulButton" => $this->form["ulButton"],
538
+ "blockquoteButton" => $this->form["blockquoteButton"],
539
+ "codeblockButton" => $this->form["codeblockButton"],
540
+ "linkButton" => $this->form["linkButton"],
541
+ "sourcecodeButton" => $this->form["sourcecodeButton"],
542
+ "spoilerButton" => $this->form["spoilerButton"],
543
+ "enableQuickTags" => $this->form["enableQuickTags"],
544
+ "commenterNameMinLength" => $this->form["commenterNameMinLength"],
545
+ "commenterNameMaxLength" => $this->form["commenterNameMaxLength"],
546
+ "storeCommenterData" => $this->form["storeCommenterData"],
547
+ ],
548
+ self::TAB_RECAPTCHA => [
549
+ "siteKey" => $this->recaptcha["siteKey"],
550
+ "secretKey" => $this->recaptcha["secretKey"],
551
+ "theme" => $this->recaptcha["theme"],
552
+ "lang" => $this->recaptcha["lang"],
553
+ "requestMethod" => $this->recaptcha["requestMethod"],
554
+ "showForGuests" => $this->recaptcha["showForGuests"],
555
+ "showForUsers" => $this->recaptcha["showForUsers"],
556
+ "isShowOnSubscribeForm" => $this->recaptcha["isShowOnSubscribeForm"],
557
+ ],
558
+ self::TAB_LOGIN => [
559
+ "showLoggedInUsername" => $this->login["showLoggedInUsername"],
560
+ "showLoginLinkForGuests" => $this->login["showLoginLinkForGuests"],
561
+ "showActivityTab" => $this->login["showActivityTab"],
562
+ "showSubscriptionsTab" => $this->login["showSubscriptionsTab"],
563
+ "showFollowsTab" => $this->login["showFollowsTab"],
564
+ "enableProfileURLs" => $this->login["enableProfileURLs"],
565
+ "websiteAsProfileUrl" => $this->login["websiteAsProfileUrl"],
566
+ "isUserByEmail" => $this->login["isUserByEmail"],
567
+ "loginUrl" => $this->login["loginUrl"],
568
+ ],
569
+ self::TAB_SOCIAL => [
570
+ "socialLoginAgreementCheckbox" => $this->social["socialLoginAgreementCheckbox"],
571
+ "socialLoginInSecondaryForm" => $this->social["socialLoginInSecondaryForm"],
572
+ "displayIconOnAvatar" => $this->social["displayIconOnAvatar"],
573
+ // fb
574
+ "enableFbLogin" => $this->social["enableFbLogin"],
575
+ "enableFbShare" => $this->social["enableFbShare"],
576
+ "fbAppID" => $this->social["fbAppID"],
577
+ "fbAppSecret" => $this->social["fbAppSecret"],
578
+ "fbUseOAuth2" => $this->social["fbUseOAuth2"],
579
+ // twitter
580
+ "enableTwitterLogin" => $this->social["enableTwitterLogin"],
581
+ "enableTwitterShare" => $this->social["enableTwitterShare"],
582
+ "twitterAppID" => $this->social["twitterAppID"],
583
+ "twitterAppSecret" => $this->social["twitterAppSecret"],
584
+ // google
585
+ "enableGoogleLogin" => $this->social["enableGoogleLogin"],
586
+ "googleClientID" => $this->social["googleClientID"],
587
+ "googleClientSecret" => $this->social["googleClientSecret"],
588
+ // disqus
589
+ "enableDisqusLogin" => $this->social["enableDisqusLogin"],
590
+ "disqusPublicKey" => $this->social["disqusPublicKey"],
591
+ "disqusSecretKey" => $this->social["disqusSecretKey"],
592
+ // wordpress
593
+ "enableWordpressLogin" => $this->social["enableWordpressLogin"],
594
+ "wordpressClientID" => $this->social["wordpressClientID"],
595
+ "wordpressClientSecret" => $this->social["wordpressClientSecret"],
596
+ // instagram
597
+ "enableInstagramLogin" => $this->social["enableInstagramLogin"],
598
+ "instagramAppID" => $this->social["instagramAppID"],
599
+ "instagramAppSecret" => $this->social["instagramAppSecret"],
600
+ // linkedin
601
+ "enableLinkedinLogin" => $this->social["enableLinkedinLogin"],
602
+ "linkedinClientID" => $this->social["linkedinClientID"],
603
+ "linkedinClientSecret" => $this->social["linkedinClientSecret"],
604
+ // whatsapp
605
+ "enableWhatsappShare" => $this->social["enableWhatsappShare"],
606
+ // yandex
607
+ "enableYandexLogin" => $this->social["enableYandexLogin"],
608
+ "yandexID" => $this->social["yandexID"],
609
+ "yandexPassword" => $this->social["yandexPassword"],
610
+ // mail.ru
611
+ "enableMailruLogin" => $this->social["enableMailruLogin"],
612
+ "mailruClientID" => $this->social["mailruClientID"],
613
+ "mailruClientSecret" => $this->social["mailruClientSecret"],
614
+ // weibo
615
+ "enableWeiboLogin" => $this->social["enableWeiboLogin"],
616
+ "weiboKey" => $this->social["weiboKey"],
617
+ "weiboSecret" => $this->social["weiboSecret"],
618
+ // wechat
619
+ "enableWechatLogin" => $this->social["enableWechatLogin"],
620
+ "wechatAppID" => $this->social["wechatAppID"],
621
+ "wechatSecret" => $this->social["wechatSecret"],
622
+ // qq
623
+ "enableQQLogin" => $this->social["enableQQLogin"],
624
+ "qqAppID" => $this->social["qqAppID"],
625
+ "qqSecret" => $this->social["qqSecret"],
626
+ // baidu
627
+ "enableBaiduLogin" => $this->social["enableBaiduLogin"],
628
+ "baiduAppID" => $this->social["baiduAppID"],
629
+ "baiduSecret" => $this->social["baiduSecret"],
630
+ // vk
631
+ "enableVkLogin" => $this->social["enableVkLogin"],
632
+ "enableVkShare" => $this->social["enableVkShare"],
633
+ "vkAppID" => $this->social["vkAppID"],
634
+ "vkAppSecret" => $this->social["vkAppSecret"],
635
+ // ok
636
+ "enableOkLogin" => $this->social["enableOkLogin"],
637
+ "enableOkShare" => $this->social["enableOkShare"],
638
+ "okAppID" => $this->social["okAppID"],
639
+ "okAppKey" => $this->social["okAppKey"],
640
+ "okAppSecret" => $this->social["okAppSecret"],
641
+ ],
642
+ self::TAB_RATING => [
643
+ "enablePostRatingSchema" => $this->rating["enablePostRatingSchema"],
644
+ "displayRatingOnPost" => $this->rating["displayRatingOnPost"],
645
+ "ratingCssOnNoneSingular" => $this->rating["ratingCssOnNoneSingular"],
646
+ "ratingHoverColor" => $this->rating["ratingHoverColor"],
647
+ "ratingInactiveColor" => $this->rating["ratingInactiveColor"],
648
+ "ratingActiveColor" => $this->rating["ratingActiveColor"],
649
+ ],
650
+ self::TAB_THREAD_DISPLAY => [
651
+ "firstLoadWithAjax" => $this->thread_display["firstLoadWithAjax"],
652
+ "commentListLoadType" => $this->thread_display["commentListLoadType"],
653
+ "isLoadOnlyParentComments" => $this->thread_display["isLoadOnlyParentComments"],
654
+ "showReactedFilterButton" => $this->thread_display["showReactedFilterButton"],
655
+ "showHottestFilterButton" => $this->thread_display["showHottestFilterButton"],
656
+ "showSortingButtons" => $this->thread_display["showSortingButtons"],
657
+ "mostVotedByDefault" => $this->thread_display["mostVotedByDefault"],
658
+ "reverseChildren" => $this->thread_display["reverseChildren"],
659
+ "highlightUnreadComments" => $this->thread_display["highlightUnreadComments"],
660
+ "scrollToComment" => $this->thread_display["scrollToComment"],
661
+ "orderCommentsBy" => $this->thread_display["orderCommentsBy"],
662
+ ],
663
+ self::TAB_THREAD_LAYOUTS => [
664
+ "showCommentLink" => $this->thread_layouts["showCommentLink"],
665
+ "showCommentDate" => $this->thread_layouts["showCommentDate"],
666
+ "showVotingButtons" => $this->thread_layouts["showVotingButtons"],
667
+ "votingButtonsIcon" => $this->thread_layouts["votingButtonsIcon"],
668
+ "votingButtonsStyle" => $this->thread_layouts["votingButtonsStyle"],
669
+ "enableDislikeButton" => $this->thread_layouts["enableDislikeButton"],
670
+ "isGuestCanVote" => $this->thread_layouts["isGuestCanVote"],
671
+ "highlightVotingButtons" => $this->thread_layouts["highlightVotingButtons"],
672
+ "showAvatars" => $this->thread_layouts["showAvatars"],
673
+ "defaultAvatarUrlForUser" => $this->thread_layouts["defaultAvatarUrlForUser"],
674
+ "defaultAvatarUrlForGuest" => $this->thread_layouts["defaultAvatarUrlForGuest"],
675
+ "changeAvatarsEverywhere" => $this->thread_layouts["changeAvatarsEverywhere"],
676
+ ],
677
+ self::TAB_THREAD_STYLES => [
678
+ "theme" => $this->thread_styles["theme"],
679
+ "primaryColor" => $this->thread_styles["primaryColor"],
680
+ "newLoadedCommentBGColor" => $this->thread_styles["newLoadedCommentBGColor"],
681
+ "primaryButtonColor" => $this->thread_styles["primaryButtonColor"],
682
+ "primaryButtonBG" => $this->thread_styles["primaryButtonBG"],
683
+ "bubbleColors" => $this->thread_styles["bubbleColors"],
684
+ "inlineFeedbackColors" => $this->thread_styles["inlineFeedbackColors"],
685
+ "defaultCommentAreaBG" => $this->thread_styles["defaultCommentAreaBG"],
686
+ "defaultCommentTextColor" => $this->thread_styles["defaultCommentTextColor"],
687
+ "defaultCommentFieldsBG" => $this->thread_styles["defaultCommentFieldsBG"],
688
+ "defaultCommentFieldsBorderColor" => $this->thread_styles["defaultCommentFieldsBorderColor"],
689
+ "defaultCommentFieldsTextColor" => $this->thread_styles["defaultCommentFieldsTextColor"],
690
+ "defaultCommentFieldsPlaceholderColor" => $this->thread_styles["defaultCommentFieldsPlaceholderColor"],
691
+ "darkCommentAreaBG" => $this->thread_styles["darkCommentAreaBG"],
692
+ "darkCommentTextColor" => $this->thread_styles["darkCommentTextColor"],
693
+ "darkCommentFieldsBG" => $this->thread_styles["darkCommentFieldsBG"],
694
+ "darkCommentFieldsBorderColor" => $this->thread_styles["darkCommentFieldsBorderColor"],
695
+ "darkCommentFieldsTextColor" => $this->thread_styles["darkCommentFieldsTextColor"],
696
+ "darkCommentFieldsPlaceholderColor" => $this->thread_styles["darkCommentFieldsPlaceholderColor"],
697
+ "commentTextSize" => $this->thread_styles["commentTextSize"],
698
+ "enableFontAwesome" => $this->thread_styles["enableFontAwesome"],
699
+ "customCss" => $this->thread_styles["customCss"],
700
+ ],
701
+ self::TAB_SUBSCRIPTION => [
702
+ "enableUserMentioning" => $this->subscription["enableUserMentioning"],
703
+ "sendMailToMentionedUsers" => $this->subscription["sendMailToMentionedUsers"],
704
+ "isNotifyOnCommentApprove" => $this->subscription["isNotifyOnCommentApprove"],
705
+ "enableMemberConfirm" => $this->subscription["enableMemberConfirm"],
706
+ "enableGuestsConfirm" => $this->subscription["enableGuestsConfirm"],
707
+ "subscriptionType" => $this->subscription["subscriptionType"],
708
+ "showReplyCheckbox" => $this->subscription["showReplyCheckbox"],
709
+ "isReplyDefaultChecked" => $this->subscription["isReplyDefaultChecked"],
710
+ "usePostmaticForCommentNotification" => $this->subscription["usePostmaticForCommentNotification"],
711
+ "isFollowActive" => $this->subscription["isFollowActive"],
712
+ "disableFollowConfirmForUsers" => $this->subscription["disableFollowConfirmForUsers"],
713
+ ],
714
+ self::TAB_LABELS => [
715
+ "blogRoleLabels" => $this->labels["blogRoleLabels"],
716
+ "blogRoles" => $this->labels["blogRoles"],
717
+ ],
718
+ self::TAB_MODERATION => [
719
+ "commentEditableTime" => $this->moderation["commentEditableTime"],
720
+ "enableEditingWhenHaveReplies" => $this->moderation["enableEditingWhenHaveReplies"],
721
+ "displayEditingInfo" => $this->moderation["displayEditingInfo"],
722
+ "enableStickButton" => $this->moderation["enableStickButton"],
723
+ "enableCloseButton" => $this->moderation["enableCloseButton"],
724
+ "restrictCommentingPerUser" => $this->moderation["restrictCommentingPerUser"],
725
+ "commentRestrictionType" => $this->moderation["commentRestrictionType"],
726
+ "userCommentsLimit" => $this->moderation["userCommentsLimit"],
727
+ ],
728
+ self::TAB_CONTENT => [
729
+ "commentTextMinLength" => $this->content["commentTextMinLength"],
730
+ "commentTextMaxLength" => $this->content["commentTextMaxLength"],
731
+ "enableImageConversion" => $this->content["enableImageConversion"],
732
+ "enableShortcodes" => $this->content["enableShortcodes"],
733
+ "commentReadMoreLimit" => $this->content["commentReadMoreLimit"],
734
+ "wmuIsEnabled" => $this->content["wmuIsEnabled"],
735
+ "wmuIsGuestAllowed" => $this->content["wmuIsGuestAllowed"],
736
+ "wmuIsLightbox" => $this->content["wmuIsLightbox"],
737
+ "wmuMimeTypes" => $this->content["wmuMimeTypes"],
738
+ "wmuMaxFileSize" => $this->content["wmuMaxFileSize"],
739
+ "wmuIsShowFilesDashboard" => $this->content["wmuIsShowFilesDashboard"],
740
+ "wmuSingleImageWidth" => $this->content["wmuSingleImageWidth"],
741
+ "wmuSingleImageHeight" => $this->content["wmuSingleImageHeight"],
742
+ "wmuImageSizes" => $this->content["wmuImageSizes"],
743
+ ],
744
+ self::TAB_LIVE => [
745
+ "enableBubble" => $this->live["enableBubble"],
746
+ "bubbleLiveUpdate" => $this->live["bubbleLiveUpdate"],
747
+ "bubbleLocation" => $this->live["bubbleLocation"],
748
+ "bubbleShowNewCommentMessage" => $this->live["bubbleShowNewCommentMessage"],
749
+ "bubbleHintTimeout" => $this->live["bubbleHintTimeout"],
750
+ "bubbleHintHideTimeout" => $this->live["bubbleHintHideTimeout"],
751
+ "commentListUpdateType" => $this->live["commentListUpdateType"],
752
+ "liveUpdateGuests" => $this->live["liveUpdateGuests"],
753
+ "commentListUpdateTimer" => $this->live["commentListUpdateTimer"],
754
+ ],
755
+ self::TAB_INLINE => [
756
+ "showInlineFilterButton" => $this->inline["showInlineFilterButton"],
757
+ "inlineFeedbackAttractionType" => $this->inline["inlineFeedbackAttractionType"],
758
+ ],
759
+ self::TAB_GENERAL => [
760
+ "isEnableOnHome" => $this->general["isEnableOnHome"],
761
+ "isNativeAjaxEnabled" => $this->general["isNativeAjaxEnabled"],
762
+ "loadComboVersion" => $this->general["loadComboVersion"],
763
+ "loadMinVersion" => $this->general["loadMinVersion"],
764
+ "commentLinkFilter" => $this->general["commentLinkFilter"],
765
+ "redirectPage" => $this->general["redirectPage"],
766
+ "simpleCommentDate" => $this->general["simpleCommentDate"],
767
+ "dateDiffFormat" => $this->general["dateDiffFormat"],
768
+ "isUsePoMo" => $this->general["isUsePoMo"],
769
+ "showPluginPoweredByLink" => $this->general["showPluginPoweredByLink"],
770
+ "isGravatarCacheEnabled" => $this->general["isGravatarCacheEnabled"],
771
+ "gravatarCacheMethod" => $this->general["gravatarCacheMethod"],
772
+ "gravatarCacheTimeout" => $this->general["gravatarCacheTimeout"],
773
+ ],
774
+ ];
775
+ return $options;
776
+ }
777
 
778
+ public function updateOptions() {
779
+ update_option(self::OPTION_SLUG_OPTIONS, $this->toArray());
780
+ }
781
 
782
+ public function addOptions() {
783
+ add_option(self::OPTION_SLUG_OPTIONS, $this->getDefaultOptions());
784
+ }
785
 
786
+ public function getDefaultOptions() {
787
+ return [
788
+ self::TAB_FORM => [
789
+ "commentFormView" => "collapsed",
790
+ "enableDropAnimation" => 1,
791
+ "richEditor" => "desktop",
792
+ "boldButton" => 1,
793
+ "italicButton" => 1,
794
+ "underlineButton" => 1,
795
+ "strikeButton" => 1,
796
+ "olButton" => 1,
797
+ "ulButton" => 1,
798
+ "blockquoteButton" => 1,
799
+ "codeblockButton" => 1,
800
+ "linkButton" => 1,
801
+ "sourcecodeButton" => 1,
802
+ "spoilerButton" => 1,
803
+ "enableQuickTags" => 0,
804
+ "commenterNameMinLength" => 3,
805
+ "commenterNameMaxLength" => 50,
806
+ "storeCommenterData" => - 1,
807
+ ],
808
+ self::TAB_RECAPTCHA => [
809
+ "siteKey" => "",
810
+ "secretKey" => "",
811
+ "theme" => "light",
812
+ "lang" => "",
813
+ "requestMethod" => "auto",
814
+ "showForGuests" => 0,
815
+ "showForUsers" => 0,
816
+ "isShowOnSubscribeForm" => 0,
817
+ ],
818
+ self::TAB_LOGIN => [
819
+ "showLoggedInUsername" => 1,
820
+ "showLoginLinkForGuests" => 1,
821
+ "showActivityTab" => 1,
822
+ "showSubscriptionsTab" => 1,
823
+ "showFollowsTab" => 1,
824
+ "enableProfileURLs" => 1,
825
+ "websiteAsProfileUrl" => 1,
826
+ "isUserByEmail" => 0,
827
+ "loginUrl" => "",
828
+ ],
829
+ self::TAB_SOCIAL => [
830
+ "socialLoginAgreementCheckbox" => 1,
831
+ "socialLoginInSecondaryForm" => 0,
832
+ "displayIconOnAvatar" => 1,
833
+ "enableFbLogin" => 0,
834
+ "enableFbShare" => 0,
835
+ "fbUseOAuth2" => 0,
836
+ "fbAppID" => "",
837
+ "fbAppSecret" => "",
838
+ "enableTwitterLogin" => 0,
839
+ "enableTwitterShare" => 1,
840
+ "twitterAppID" => "",
841
+ "twitterAppSecret" => "",
842
+ "enableGoogleLogin" => 0,
843
+ "googleClientID" => "",
844
+ "googleClientSecret" => "",
845
+ "enableDisqusLogin" => 0,
846
+ "disqusPublicKey" => "",
847
+ "disqusSecretKey" => "",
848
+ "enableWordpressLogin" => 0,
849
+ "wordpressClientID" => "",
850
+ "wordpressClientSecret" => "",
851
+ "enableInstagramLogin" => 0,
852
+ "instagramAppID" => "",
853
+ "instagramAppSecret" => "",
854
+ "enableLinkedinLogin" => 0,
855
+ "linkedinClientID" => "",
856
+ "linkedinClientSecret" => "",
857
+ "enableWhatsappShare" => 0,
858
+ "enableYandexLogin" => 0,
859
+ "yandexID" => "",
860
+ "yandexPassword" => "",
861
+ "enableMailruLogin" => 0,
862
+ "mailruClientID" => "",
863
+ "mailruClientSecret" => "",
864
+ "enableWeiboLogin" => 0,
865
+ "weiboKey" => "",
866
+ "weiboSecret" => "",
867
+ "enableWechatLogin" => 0,
868
+ "wechatAppID" => "",
869
+ "wechatSecret" => "",
870
+ "enableQQLogin" => 0,
871
+ "qqAppID" => "",
872
+ "qqSecret" => "",
873
+ "enableBaiduLogin" => 0,
874
+ "baiduAppID" => "",
875
+ "baiduSecret" => "",
876
+ "enableVkLogin" => 0,
877
+ "enableVkShare" => 1,
878
+ "vkAppID" => "",
879
+ "vkAppSecret" => "",
880
+ "enableOkLogin" => 0,
881
+ "enableOkShare" => 1,
882
+ "okAppID" => "",
883
+ "okAppKey" => "",
884
+ "okAppSecret" => "",
885
+ ],
886
+ self::TAB_RATING => [
887
+ "enablePostRatingSchema" => 0,
888
+ "displayRatingOnPost" => ["before_comment_form"],
889
+ "ratingCssOnNoneSingular" => 0,
890
+ "ratingHoverColor" => "#FFED85",
891
+ "ratingInactiveColor" => "#DDDDDD",
892
+ "ratingActiveColor" => "#FFD700",
893
+ ],
894
+ self::TAB_THREAD_DISPLAY => [
895
+ "firstLoadWithAjax" => 0,
896
+ "commentListLoadType" => 0,
897
+ "isLoadOnlyParentComments" => 0,
898
+ "showReactedFilterButton" => 1,
899
+ "showHottestFilterButton" => 1,
900
+ "showSortingButtons" => 1,
901
+ "mostVotedByDefault" => 0,
902
+ "reverseChildren" => 0,
903
+ "highlightUnreadComments" => 0,
904
+ "scrollToComment" => 1,
905
+ "orderCommentsBy" => "comment_ID",
906
+ ],
907
+ self::TAB_THREAD_LAYOUTS => [
908
+ "showCommentLink" => 1,
909
+ "showCommentDate" => 1,
910
+ "showVotingButtons" => 1,
911
+ "votingButtonsIcon" => "fa-plus|fa-minus",
912
+ "votingButtonsStyle" => 0,
913
+ "enableDislikeButton" => 1,
914
+ "isGuestCanVote" => 1,
915
+ "highlightVotingButtons" => 1,
916
+ "showAvatars" => 1,
917
+ "defaultAvatarUrlForUser" => "",
918
+ "defaultAvatarUrlForGuest" => "",
919
+ "changeAvatarsEverywhere" => 1,
920
+ ],
921
+ self::TAB_THREAD_STYLES => [
922
+ "theme" => "wpd-default",
923
+ "primaryColor" => "#00B38F",
924
+ "newLoadedCommentBGColor" => "#FFFAD6",
925
+ "primaryButtonColor" => "#FFFFFF",
926
+ "primaryButtonBG" => "#07B290",
927
+ "bubbleColors" => "#1DB99A",
928
+ "inlineFeedbackColors" => "#1DB99A",
929
+ "defaultCommentAreaBG" => "",
930
+ "defaultCommentTextColor" => "#777777",
931
+ "defaultCommentFieldsBG" => "",
932
+ "defaultCommentFieldsBorderColor" => "#DDDDDD",
933
+ "defaultCommentFieldsTextColor" => "#777777",
934
+ "defaultCommentFieldsPlaceholderColor" => "",
935
+ "darkCommentAreaBG" => "#111111",
936
+ "darkCommentTextColor" => "#CCCCCC",
937
+ "darkCommentFieldsBG" => "#999999",
938
+ "darkCommentFieldsBorderColor" => "#D1D1D1",
939
+ "darkCommentFieldsTextColor" => "#000000",
940
+ "darkCommentFieldsPlaceholderColor" => "#DDDDDD",
941
+ "commentTextSize" => "14px",
942
+ "enableFontAwesome" => 1,
943
+ "customCss" => ".comments-area{width:auto;}",
944
+ ],
945
+ self::TAB_SUBSCRIPTION => [
946
+ "enableUserMentioning" => 1,
947
+ "sendMailToMentionedUsers" => 1,
948
+ "isNotifyOnCommentApprove" => 1,
949
+ "enableMemberConfirm" => 0,
950
+ "enableGuestsConfirm" => 1,
951
+ "subscriptionType" => 1,
952
+ "showReplyCheckbox" => 1,
953
+ "isReplyDefaultChecked" => 0,
954
+ "usePostmaticForCommentNotification" => 0,
955
+ "isFollowActive" => 1,
956
+ "disableFollowConfirmForUsers" => 1,
957
+ ],
958
+ self::TAB_LABELS => [
959
+ "blogRoleLabels" => isset($this->labels["blogRoleLabels"]) ? $this->labels["blogRoleLabels"] : [],
960
+ "blogRoles" => isset($this->labels["blogRoles"]) ? $this->labels["blogRoles"] : [],
961
+ ],
962
+ self::TAB_MODERATION => [
963
+ "commentEditableTime" => 900,
964
+ "enableEditingWhenHaveReplies" => 0,
965
+ "displayEditingInfo" => 1,
966
+ "enableStickButton" => 1,
967
+ "enableCloseButton" => 1,
968
+ "restrictCommentingPerUser" => "disable",
969
+ "commentRestrictionType" => "both",
970
+ "userCommentsLimit" => 1,
971
+ ],
972
+ self::TAB_CONTENT => [
973
+ "commentTextMinLength" => 1,
974
+ "commentTextMaxLength" => "",
975
+ "enableImageConversion" => 1,
976
+ "enableShortcodes" => 0,
977
+ "commentReadMoreLimit" => 0,
978
+ "wmuIsEnabled" => 1,
979
+ "wmuIsGuestAllowed" => 1,
980
+ "wmuIsLightbox" => 1,
981
+ "wmuMimeTypes" => $this->getDefaultFileTypes(),
982
+ "wmuMaxFileSize" => 2,
983
+ "wmuIsShowFilesDashboard" => 1,
984
+ "wmuSingleImageWidth" => "auto",
985
+ "wmuSingleImageHeight" => 200,
986
+ "wmuImageSizes" => $this->getDefaultImageSizes(),
987
+ ],
988
+ self::TAB_LIVE => [
989
+ "enableBubble" => 0,
990
+ "bubbleLiveUpdate" => 0,
991
+ "bubbleLocation" => "content_left",
992
+ "bubbleShowNewCommentMessage" => 1,
993
+ "bubbleHintTimeout" => 45,
994
+ "bubbleHintHideTimeout" => 10,
995
+ "commentListUpdateType" => 0,
996
+ "liveUpdateGuests" => 0,
997
+ "commentListUpdateTimer" => 30,
998
+ ],
999
+ self::TAB_INLINE => [
1000
+ "showInlineFilterButton" => 1,
1001
+ "inlineFeedbackAttractionType" => "blink",
1002
+ ],
1003
+ self::TAB_GENERAL => [
1004
+ "isEnableOnHome" => 1,
1005
+ "isNativeAjaxEnabled" => 1,
1006
+ "loadComboVersion" => 1,
1007
+ "loadMinVersion" => 1,
1008
+ "commentLinkFilter" => 1,
1009
+ "redirectPage" => 0,
1010
+ "simpleCommentDate" => 0,
1011
+ "dateDiffFormat" => "[number] [time_unit] [adjective]",
1012
+ "isUsePoMo" => 0,
1013
+ "showPluginPoweredByLink" => 0,
1014
+ "isGravatarCacheEnabled" => 0,
1015
+ "gravatarCacheMethod" => "cronjob",
1016
+ "gravatarCacheTimeout" => 10,
1017
+ ],
1018
+ ];
1019
+ }
1020
 
1021
+ public function initPhrasesOnLoad() {
1022
+ if (!$this->general["isUsePoMo"] && $this->dbManager->isPhraseExists("wc_be_the_first_text")) {
1023
+ $this->phrases = $this->dbManager->getPhrases();
1024
+ } else {
1025
+ $this->initPhrases();
1026
+ }
1027
+ }
1028
 
1029
+ private function initFormRelations() {
1030
+ $this->formContentTypeRel = get_option("wpdiscuz_form_content_type_rel", []);
1031
+ $this->formPostRel = get_option("wpdiscuz_form_post_rel", []);
1032
+ }
1033
 
1034
+ public function isShareEnabled() {
1035
+ return ($this->social["enableFbShare"] || $this->social["enableTwitterShare"] || $this->social["enableVkShare"] || $this->social["enableOkShare"]);
1036
+ }
1037
 
1038
+ public function getOptionsForJs() {
1039
+ $jsArgs = [];
1040
+ $jsArgs["wc_hide_replies_text"] = $this->phrases["wc_hide_replies_text"];
1041
+ $jsArgs["wc_show_replies_text"] = $this->phrases["wc_show_replies_text"];
1042
+ $jsArgs["wc_msg_required_fields"] = $this->phrases["wc_msg_required_fields"];
1043
+ $jsArgs["wc_invalid_field"] = $this->phrases["wc_invalid_field"];
1044
+ $jsArgs["wc_error_empty_text"] = $this->phrases["wc_error_empty_text"];
1045
+ $jsArgs["wc_error_url_text"] = $this->phrases["wc_error_url_text"];
1046
+ $jsArgs["wc_error_email_text"] = $this->phrases["wc_error_email_text"];
1047
+ $jsArgs["wc_invalid_captcha"] = $this->phrases["wc_invalid_captcha"];
1048
+ $jsArgs["wc_login_to_vote"] = $this->phrases["wc_login_to_vote"];
1049
+ $jsArgs["wc_deny_voting_from_same_ip"] = $this->phrases["wc_deny_voting_from_same_ip"];
1050
+ $jsArgs["wc_self_vote"] = $this->phrases["wc_self_vote"];
1051
+ $jsArgs["wc_vote_only_one_time"] = $this->phrases["wc_vote_only_one_time"];
1052
+ $jsArgs["wc_voting_error"] = $this->phrases["wc_voting_error"];
1053
+ $jsArgs["wc_comment_edit_not_possible"] = $this->phrases["wc_comment_edit_not_possible"];
1054
+ $jsArgs["wc_comment_not_updated"] = $this->phrases["wc_comment_not_updated"];
1055
+ $jsArgs["wc_comment_not_edited"] = $this->phrases["wc_comment_not_edited"];
1056
+ $jsArgs["wc_msg_input_min_length"] = $this->phrases["wc_msg_input_min_length"];
1057
+ $jsArgs["wc_msg_input_max_length"] = $this->phrases["wc_msg_input_max_length"];
1058
+ $jsArgs["wc_spoiler_title"] = $this->phrases["wc_spoiler_title"];
1059
+ $jsArgs["wc_cannot_rate_again"] = $this->phrases["wc_cannot_rate_again"];
1060
+ $jsArgs["wc_not_allowed_to_rate"] = $this->phrases["wc_not_allowed_to_rate"];
1061
+ //<!-- follow phrases
1062
+ $jsArgs["wc_follow_user"] = $this->phrases["wc_follow_user"];
1063
+ $jsArgs["wc_unfollow_user"] = $this->phrases["wc_unfollow_user"];
1064
+ $jsArgs["wc_follow_success"] = $this->phrases["wc_follow_success"];
1065
+ $jsArgs["wc_follow_canceled"] = $this->phrases["wc_follow_canceled"];
1066
+ $jsArgs["wc_follow_email_confirm"] = $this->phrases["wc_follow_email_confirm"];
1067
+ $jsArgs["wc_follow_email_confirm_fail"] = $this->phrases["wc_follow_email_confirm_fail"];
1068
+ $jsArgs["wc_follow_login_to_follow"] = $this->phrases["wc_follow_login_to_follow"];
1069
+ $jsArgs["wc_follow_impossible"] = $this->phrases["wc_follow_impossible"];
1070
+ $jsArgs["wc_follow_not_added"] = $this->phrases["wc_follow_not_added"];
1071
+ //follow phrases -->
1072
+ $jsArgs["is_user_logged_in"] = is_user_logged_in();
1073
+ $jsArgs["commentListLoadType"] = $this->thread_display["commentListLoadType"];
1074
+ $jsArgs["commentListUpdateType"] = $this->live["commentListUpdateType"];
1075
+ $jsArgs["commentListUpdateTimer"] = $this->live["commentListUpdateTimer"];
1076
+ $jsArgs["liveUpdateGuests"] = $this->live["liveUpdateGuests"];
1077
+ $jsArgs["wordpressThreadCommentsDepth"] = $this->wp["threadCommentsDepth"];
1078
+ $jsArgs["wordpressIsPaginate"] = $this->wp["isPaginate"];
1079
+ $jsArgs["commentTextMaxLength"] = $this->content["commentTextMaxLength"] ? $this->content["commentTextMaxLength"] : null;
1080
+ $jsArgs["commentTextMinLength"] = $this->content["commentTextMinLength"];
1081
+ if ($this->form["storeCommenterData"] < 0) {
1082
+ $jsArgs["storeCommenterData"] = 100000;
1083
+ } else if ($this->form["storeCommenterData"] == 0) {
1084
+ $jsArgs["storeCommenterData"] = null;
1085
+ } else {
1086
+ $jsArgs["storeCommenterData"] = $this->form["storeCommenterData"];
1087
+ }
1088
+ if (function_exists("zerospam_get_key")) {
1089
+ $jsArgs["wpdiscuz_zs"] = md5(zerospam_get_key());
1090
+ }
1091
+ $jsArgs["socialLoginAgreementCheckbox"] = $this->social["socialLoginAgreementCheckbox"];
1092
+ $jsArgs["enableFbLogin"] = $this->social["enableFbLogin"];
1093
+ $jsArgs["enableFbShare"] = $this->social["enableFbShare"];
1094
+ $jsArgs["facebookAppID"] = $this->social["fbAppID"];
1095
+ $jsArgs["facebookUseOAuth2"] = $this->social["fbUseOAuth2"];
1096
+ $jsArgs["enableGoogleLogin"] = $this->social["enableGoogleLogin"];
1097
+ $jsArgs["googleClientID"] = $this->social["googleClientID"];
1098
+ $jsArgs["googleClientSecret"] = $this->social["googleClientSecret"];
1099
+ $jsArgs["cookiehash"] = COOKIEHASH;
1100
+ $jsArgs["isLoadOnlyParentComments"] = $this->thread_display["isLoadOnlyParentComments"];
1101
+ $jsArgs["scrollToComment"] = $this->thread_display["scrollToComment"];
1102
+ $jsArgs["commentFormView"] = $this->form["commentFormView"];
1103
+ $jsArgs["enableDropAnimation"] = $this->form["enableDropAnimation"];
1104
+ $jsArgs["isNativeAjaxEnabled"] = $this->general["isNativeAjaxEnabled"];
1105
+ $jsArgs["enableBubble"] = $this->live["enableBubble"];
1106
+ $jsArgs["bubbleLiveUpdate"] = $this->live["bubbleLiveUpdate"];
1107
+ $jsArgs["bubbleHintTimeout"] = $this->live["bubbleHintTimeout"];
1108
+ $jsArgs["bubbleHintHideTimeout"] = $this->live["bubbleHintHideTimeout"];
1109
+ $jsArgs["cookieHideBubbleHint"] = self::COOKIE_HIDE_BUBBLE_HINT;
1110
+ $jsArgs["bubbleShowNewCommentMessage"] = $this->live["bubbleShowNewCommentMessage"];
1111
+ $jsArgs["bubbleLocation"] = $this->live["bubbleLocation"];
1112
+ $jsArgs["firstLoadWithAjax"] = $this->thread_display["firstLoadWithAjax"];
1113
+ $jsArgs["wc_copied_to_clipboard"] = $this->phrases["wc_copied_to_clipboard"];
1114
+ $jsArgs["inlineFeedbackAttractionType"] = $this->inline["inlineFeedbackAttractionType"];
1115
+ $jsArgs["loadRichEditor"] = intval($this->form["richEditor"] === "both" || (!wp_is_mobile() && $this->form["richEditor"] === "desktop"));
1116
+ //**reCaptcha**//
1117
+ $jsArgs["wpDiscuzReCaptchaSK"] = apply_filters("wpdiscuz_recaptcha_site_key", $this->recaptcha["siteKey"]);
1118
+ $jsArgs["wpDiscuzReCaptchaTheme"] = $this->recaptcha["theme"];
1119
+ $jsArgs["wpDiscuzReCaptchaVersion"] = apply_filters("wpdiscuz_recaptcha_version", $this->recaptcha["version"]);
1120
+ $jsArgs["wc_captcha_show_for_guest"] = $this->recaptcha["showForGuests"];
1121
+ $jsArgs["wc_captcha_show_for_members"] = $this->recaptcha["showForUsers"];
1122
+ $jsArgs["wpDiscuzIsShowOnSubscribeForm"] = $this->recaptcha["isShowOnSubscribeForm"];
1123
+ // Media Upload //
1124
+ $jsArgs["wmuEnabled"] = $this->content["wmuIsEnabled"];
1125
+ $jsArgs["wmuInput"] = self::INPUT_NAME;
1126
+ $jsArgs["wmuMaxFileCount"] = 1;
1127
+ $jsArgs["wmuMaxFileSize"] = $this->content["wmuMaxFileSize"] * 1024 * 1024;
1128
+ $jsArgs["wmuPostMaxSize"] = $this->wmuPostMaxSize;
1129
+ $jsArgs["wmuIsLightbox"] = $this->content["wmuIsLightbox"];
1130
+ $jsArgs["wmuMimeTypes"] = $this->content["wmuMimeTypes"];
1131
+ $jsArgs["wmuPhraseConfirmDelete"] = $this->phrases["wmuPhraseConfirmDelete"];
1132
+ $jsArgs["wmuPhraseNotAllowedFile"] = $this->phrases["wmuPhraseNotAllowedFile"];
1133
+ $jsArgs["wmuPhraseMaxFileCount"] = preg_replace("#(\d+$)#is", "", $this->phrases["wmuPhraseMaxFileCount"]) . " " . apply_filters("wpdiscuz_mu_file_count", 1);
1134
+ $jsArgs["wmuPhraseMaxFileSize"] = $this->phrases["wmuPhraseMaxFileSize"] . " " . $this->content["wmuMaxFileSize"] . "MB";
1135
+ $jsArgs["wmuPhrasePostMaxSize"] = $this->phrases["wmuPhrasePostMaxSize"] . " " . ($this->wmuPostMaxSize / (1024 * 1024)) . "MB";
1136
+ $jsArgs["msgEmptyFile"] = esc_html__("File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.");
1137
+ $jsArgs["msgPostIdNotExists"] = esc_html__("Post ID not exists", "wpdiscuz");
1138
+ $jsArgs["msgUploadingNotAllowed"] = esc_html__("Sorry, uploading not allowed for this post", "wpdiscuz");
1139
+ $jsArgs["msgPermissionDenied"] = esc_html__("You do not have sufficient permissions to perform this action", "wpdiscuz");
1140
+ $nonceKey = ($key = get_home_url()) ? md5($key) : "wmu-nonce";
1141
+ $jsArgs["wmuSecurity"] = wp_create_nonce($nonceKey);
1142
+ $jsArgs["wmuKeyImages"] = self::KEY_IMAGES;
1143
+ $jsArgs["wmuSingleImageWidth"] = $this->content["wmuSingleImageWidth"];
1144
+ $jsArgs["wmuSingleImageHeight"] = $this->content["wmuSingleImageHeight"];
1145
+ return $jsArgs;
1146
+ }
1147
 
1148
+ private function initGoodbyeCaptchaField() {
1149
+ $this->isGoodbyeCaptchaActive = is_callable([
1150
+ "GdbcWordPressPublicModule",
1151
+ "isCommentsProtectionActivated",
1152
+ ]) && GdbcWordPressPublicModule::isCommentsProtectionActivated();
1153
+ if ($this->isGoodbyeCaptchaActive) {
1154
+ $this->goodbyeCaptchaTocken = GdbcWordPressPublicModule::getInstance()->getTokenFieldHtml();
1155
+ }
1156
+ }
1157
 
1158
+ public function editorOptions() {
1159
+ ob_start();
1160
+ ?>
1161
  var wpdiscuzEditorOptions = {
1162
  modules: {
1163
  toolbar: "",
1166
  maxcount : <?php echo $this->content["commentTextMaxLength"] ? $this->content["commentTextMaxLength"] : 0; ?>,
1167
  mincount : <?php echo $this->content["commentTextMinLength"]; ?>,
1168
  },
1169
+ <?php do_action("wpdiscuz_editor_modules"); ?>
1170
  },
1171
+ placeholder: <?php echo json_encode(get_comments_number() ? $this->phrases["wc_comment_join_text"] : $this->phrases["wc_be_the_first_text"]); ?>,
1172
  theme: 'snow',
1173
  debug: '<?php echo $this->general["loadComboVersion"] || $this->general["loadMinVersion"] ? 'error' : 'warn'; ?>'
1174
  };
1175
+ <?php
1176
+ return ob_get_clean();
1177
+ }
1178
 
1179
+ public function saveAndResetOptionsAndPhrases() {
1180
+ if (!empty($_GET["wpd_wizard"]) && ($wizard = absint($_GET["wpd_wizard"])) && !empty($_POST)) {
1181
+ check_admin_referer("wpd_wizard_form");
1182
+ if ($wizard === 2) {
1183
+ $forms = get_posts([
1184
+ "post_type" => "wpdiscuz_form",
1185
+ "post_status" => "publish",
1186
+ "posts_per_page" => - 1,
1187
+ ]);
1188
+ foreach ($forms as $k => $form) {
1189
+ $formMeta = get_post_meta($form->ID, "wpdiscuz_form_general_options", true);
1190
+ $formMeta["layout"] = isset($_POST["layout"]) ? absint($_POST["layout"]) : 1;
1191
+ update_post_meta($form->ID, "wpdiscuz_form_general_options", $formMeta);
1192
+ }
1193
+ $this->thread_styles["theme"] = isset($_POST["theme"]) ? trim($_POST["theme"]) : "wpd-default";
1194
+ $this->updateOptions();
1195
+ } else if ($wizard === 3) {
1196
+ $this->live["enableBubble"] = isset($_POST["enableBubble"]) ? absint($_POST["enableBubble"]) : 0;
1197
+ $this->live["bubbleLiveUpdate"] = isset($_POST["bubbleLiveUpdate"]) ? absint($_POST["bubbleLiveUpdate"]) : 0;
1198
+ $this->live["bubbleLocation"] = isset($_POST["bubbleLocation"]) ? trim($_POST["bubbleLocation"]) : "content_left";
1199
+ $this->updateOptions();
1200
+ } else if ($wizard === 4) {
1201
+ $forms = get_posts([
1202
+ "post_type" => "wpdiscuz_form",
1203
+ "post_status" => "publish",
1204
+ "posts_per_page" => - 1,
1205
+ ]);
1206
+ foreach ($forms as $k => $form) {
1207
+ $formMeta = get_post_meta($form->ID, "wpdiscuz_form_general_options", true);
1208
+ $formMeta["enable_post_rating"] = isset($_POST["enable_post_rating"]) ? absint($_POST["enable_post_rating"]) : 1;
1209
+ update_post_meta($form->ID, "wpdiscuz_form_general_options", $formMeta);
1210
+ }
1211
+ }
1212
+ } else {
1213
+ $this->resetOptions();
1214
+ $this->saveOptions();
1215
+ $this->savePhrases();
1216
+ }
1217
+ $this->check();
1218
+ }
1219
 
1220
+ public function saveOptions() {
1221
+ if (isset($_POST["wc_submit_options"]) && !empty($_POST["wpd_tab"])) {
1222
+ if (!current_user_can("manage_options")) {
1223
+ die(esc_html_e("Hacker?", "wpdiscuz"));
1224
+ }
1225
+ check_admin_referer("wc_options_form-" . $_POST["wpd_tab"]);
1226
+ if (self::TAB_FORM === $_POST["wpd_tab"]) {
1227
+ $this->form["commentFormView"] = isset($_POST[self::TAB_FORM]["commentFormView"]) ? trim($_POST[self::TAB_FORM]["commentFormView"]) : "collapsed";
1228
+ $this->form["enableDropAnimation"] = isset($_POST[self::TAB_FORM]["enableDropAnimation"]) ? absint($_POST[self::TAB_FORM]["enableDropAnimation"]) : 0;
1229
+ $this->form["richEditor"] = isset($_POST[self::TAB_FORM]["richEditor"]) ? trim($_POST[self::TAB_FORM]["richEditor"]) : "desktop";
1230
+ $this->form["boldButton"] = isset($_POST[self::TAB_FORM]["boldButton"]) ? intval($_POST[self::TAB_FORM]["boldButton"]) : 0;
1231
+ $this->form["italicButton"] = isset($_POST[self::TAB_FORM]["italicButton"]) ? intval($_POST[self::TAB_FORM]["italicButton"]) : 0;
1232
+ $this->form["underlineButton"] = isset($_POST[self::TAB_FORM]["underlineButton"]) ? intval($_POST[self::TAB_FORM]["underlineButton"]) : 0;
1233
+ $this->form["strikeButton"] = isset($_POST[self::TAB_FORM]["strikeButton"]) ? intval($_POST[self::TAB_FORM]["strikeButton"]) : 0;
1234
+ $this->form["olButton"] = isset($_POST[self::TAB_FORM]["olButton"]) ? intval($_POST[self::TAB_FORM]["olButton"]) : 0;
1235
+ $this->form["ulButton"] = isset($_POST[self::TAB_FORM]["ulButton"]) ? intval($_POST[self::TAB_FORM]["ulButton"]) : 0;
1236
+ $this->form["blockquoteButton"] = isset($_POST[self::TAB_FORM]["blockquoteButton"]) ? intval($_POST[self::TAB_FORM]["blockquoteButton"]) : 0;
1237
+ $this->form["codeblockButton"] = isset($_POST[self::TAB_FORM]["codeblockButton"]) ? intval($_POST[self::TAB_FORM]["codeblockButton"]) : 0;
1238
+ $this->form["linkButton"] = isset($_POST[self::TAB_FORM]["linkButton"]) ? intval($_POST[self::TAB_FORM]["linkButton"]) : 0;
1239
+ $this->form["sourcecodeButton"] = isset($_POST[self::TAB_FORM]["sourcecodeButton"]) ? intval($_POST[self::TAB_FORM]["sourcecodeButton"]) : 0;
1240
+ $this->form["spoilerButton"] = isset($_POST[self::TAB_FORM]["spoilerButton"]) ? intval($_POST[self::TAB_FORM]["spoilerButton"]) : 0;
1241
+ $this->form["enableQuickTags"] = isset($_POST[self::TAB_FORM]["enableQuickTags"]) ? intval($_POST[self::TAB_FORM]["enableQuickTags"]) : 0;
1242
+ $this->form["commenterNameMinLength"] = isset($_POST[self::TAB_FORM]["commenterNameMinLength"]) && absint($_POST[self::TAB_FORM]["commenterNameMinLength"]) >= 1 ? absint($_POST[self::TAB_FORM]["commenterNameMinLength"]) : 1;
1243
+ $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;
1244
+ $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;
1245
+ } else if (self::TAB_RECAPTCHA === $_POST["wpd_tab"]) {
1246
+ $this->recaptcha["siteKey"] = isset($_POST[self::TAB_RECAPTCHA]["siteKey"]) ? trim($_POST[self::TAB_RECAPTCHA]["siteKey"]) : "";
1247
+ $this->recaptcha["secretKey"] = isset($_POST[self::TAB_RECAPTCHA]["secretKey"]) ? trim($_POST[self::TAB_RECAPTCHA]["secretKey"]) : "";
1248
+ $this->recaptcha["theme"] = isset($_POST[self::TAB_RECAPTCHA]["theme"]) ? trim($_POST[self::TAB_RECAPTCHA]["theme"]) : "light";
1249
+ $this->recaptcha["lang"] = isset($_POST[self::TAB_RECAPTCHA]["lang"]) ? trim($_POST[self::TAB_RECAPTCHA]["lang"]) : "";
1250
+ $this->recaptcha["requestMethod"] = isset($_POST[self::TAB_RECAPTCHA]["requestMethod"]) ? trim($_POST[self::TAB_RECAPTCHA]["requestMethod"]) : "auto";
1251
+ if (empty($_POST[self::TAB_RECAPTCHA]["useV3"])) {
1252
+ if ($this->recaptcha["siteKey"] && $this->recaptcha["secretKey"]) {
1253
+ $this->recaptcha["showForGuests"] = isset($_POST[self::TAB_RECAPTCHA]["showForGuests"]) ? absint($_POST[self::TAB_RECAPTCHA]["showForGuests"]) : 0;
1254
+ $this->recaptcha["showForUsers"] = isset($_POST[self::TAB_RECAPTCHA]["showForUsers"]) ? absint($_POST[self::TAB_RECAPTCHA]["showForUsers"]) : 0;
1255
+ $this->recaptcha["isShowOnSubscribeForm"] = isset($_POST[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) ? absint($_POST[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) : 0;
1256
+ } else {
1257
+ $this->recaptcha["showForGuests"] = 0;
1258
+ $this->recaptcha["showForUsers"] = 0;
1259
+ $this->recaptcha["isShowOnSubscribeForm"] = 0;
1260
+ }
1261
+ } else {
1262
+ $this->recaptcha["showForGuests"] = isset($_POST[self::TAB_RECAPTCHA]["showForGuests"]) ? absint($_POST[self::TAB_RECAPTCHA]["showForGuests"]) : 0;
1263
+ $this->recaptcha["showForUsers"] = isset($_POST[self::TAB_RECAPTCHA]["showForUsers"]) ? absint($_POST[self::TAB_RECAPTCHA]["showForUsers"]) : 0;
1264
+ $this->recaptcha["isShowOnSubscribeForm"] = isset($_POST[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) ? absint($_POST[self::TAB_RECAPTCHA]["isShowOnSubscribeForm"]) : 0;
1265
+ }
1266
+ } else if (self::TAB_LOGIN === $_POST["wpd_tab"]) {
1267
+ $this->login["showLoggedInUsername"] = isset($_POST[self::TAB_LOGIN]["showLoggedInUsername"]) ? absint($_POST[self::TAB_LOGIN]["showLoggedInUsername"]) : 0;
1268
+ $this->login["showLoginLinkForGuests"] = isset($_POST[self::TAB_LOGIN]["showLoginLinkForGuests"]) ? absint($_POST[self::TAB_LOGIN]["showLoginLinkForGuests"]) : 0;
1269
+ $this->login["showActivityTab"] = isset($_POST[self::TAB_LOGIN]["showActivityTab"]) ? absint($_POST[self::TAB_LOGIN]["showActivityTab"]) : 0;
1270
+ $this->login["showSubscriptionsTab"] = isset($_POST[self::TAB_LOGIN]["showSubscriptionsTab"]) ? absint($_POST[self::TAB_LOGIN]["showSubscriptionsTab"]) : 0;
1271
+ $this->login["showFollowsTab"] = isset($_POST[self::TAB_LOGIN]["showFollowsTab"]) ? absint($_POST[self::TAB_LOGIN]["showFollowsTab"]) : 0;
1272
+ $this->login["enableProfileURLs"] = isset($_POST[self::TAB_LOGIN]["enableProfileURLs"]) ? absint($_POST[self::TAB_LOGIN]["enableProfileURLs"]) : 0;
1273
+ $this->login["websiteAsProfileUrl"] = isset($_POST[self::TAB_LOGIN]["websiteAsProfileUrl"]) ? absint($_POST[self::TAB_LOGIN]["websiteAsProfileUrl"]) : 0;
1274
+ $this->login["isUserByEmail"] = isset($_POST[self::TAB_LOGIN]["isUserByEmail"]) ? absint($_POST[self::TAB_LOGIN]["isUserByEmail"]) : 0;
1275
+ $this->login["loginUrl"] = isset($_POST[self::TAB_LOGIN]["loginUrl"]) && ($l = trim($_POST[self::TAB_LOGIN]["loginUrl"])) ? $l : "";
1276
+ } else if (self::TAB_SOCIAL === $_POST["wpd_tab"]) {
1277
+ $this->social["socialLoginAgreementCheckbox"] = isset($_POST[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"]) ? absint($_POST[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"]) : 0;
1278
+ $this->social["socialLoginInSecondaryForm"] = isset($_POST[self::TAB_SOCIAL]["socialLoginInSecondaryForm"]) ? absint($_POST[self::TAB_SOCIAL]["socialLoginInSecondaryForm"]) : 0;
1279
+ $this->social["displayIconOnAvatar"] = isset($_POST[self::TAB_SOCIAL]["displayIconOnAvatar"]) ? absint($_POST[self::TAB_SOCIAL]["displayIconOnAvatar"]) : 0;
1280
+ // fb
1281
+ $this->social["enableFbLogin"] = isset($_POST[self::TAB_SOCIAL]["enableFbLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableFbLogin"]) : 0;
1282
+ $this->social["enableFbShare"] = isset($_POST[self::TAB_SOCIAL]["enableFbShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableFbShare"]) : 0;
1283
+ $this->social["fbAppID"] = isset($_POST[self::TAB_SOCIAL]["fbAppID"]) ? trim($_POST[self::TAB_SOCIAL]["fbAppID"]) : "";
1284
+ $this->social["fbAppSecret"] = isset($_POST[self::TAB_SOCIAL]["fbAppSecret"]) ? trim($_POST[self::TAB_SOCIAL]["fbAppSecret"]) : "";
1285
+ $this->social["fbUseOAuth2"] = isset($_POST[self::TAB_SOCIAL]["fbUseOAuth2"]) ? absint($_POST[self::TAB_SOCIAL]["fbUseOAuth2"]) : 0;
1286
+ // twitter
1287
+ $this->social["enableTwitterLogin"] = isset($_POST[self::TAB_SOCIAL]["enableTwitterLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableTwitterLogin"]) : 0;
1288
+ $this->social["enableTwitterShare"] = isset($_POST[self::TAB_SOCIAL]["enableTwitterShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableTwitterShare"]) : 0;
1289
+ $this->social["twitterAppID"] = isset($_POST[self::TAB_SOCIAL]["twitterAppID"]) ? trim($_POST[self::TAB_SOCIAL]["twitterAppID"]) : "";
1290
+ $this->social["twitterAppSecret"] = isset($_POST[self::TAB_SOCIAL]["twitterAppSecret"]) ? trim($_POST[self::TAB_SOCIAL]["twitterAppSecret"]) : "";
1291
+ // google
1292
+ $this->social["enableGoogleLogin"] = isset($_POST[self::TAB_SOCIAL]["enableGoogleLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableGoogleLogin"]) : 0;
1293
+ $this->social["googleClientID"] = isset($_POST[self::TAB_SOCIAL]["googleClientID"]) ? trim($_POST[self::TAB_SOCIAL]["googleClientID"]) : "";
1294
+ $this->social["googleClientSecret"] = isset($_POST[self::TAB_SOCIAL]["googleClientSecret"]) ? trim($_POST[self::TAB_SOCIAL]["googleClientSecret"]) : "";
1295
+ // disqus
1296
+ $this->social["enableDisqusLogin"] = isset($_POST[self::TAB_SOCIAL]["enableDisqusLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableDisqusLogin"]) : 0;
1297
+ $this->social["disqusPublicKey"] = isset($_POST[self::TAB_SOCIAL]["disqusPublicKey"]) ? trim($_POST[self::TAB_SOCIAL]["disqusPublicKey"]) : "";
1298
+ $this->social["disqusSecretKey"] = isset($_POST[self::TAB_SOCIAL]["disqusSecretKey"]) ? trim($_POST[self::TAB_SOCIAL]["disqusSecretKey"]) : "";
1299
+ // wordpress
1300
+ $this->social["enableWordpressLogin"] = isset($_POST[self::TAB_SOCIAL]["enableWordpressLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableWordpressLogin"]) : 0;
1301
+ $this->social["wordpressClientID"] = isset($_POST[self::TAB_SOCIAL]["wordpressClientID"]) ? trim($_POST[self::TAB_SOCIAL]["wordpressClientID"]) : "";
1302
+ $this->social["wordpressClientSecret"] = isset($_POST[self::TAB_SOCIAL]["wordpressClientSecret"]) ? trim($_POST[self::TAB_SOCIAL]["wordpressClientSecret"]) : "";
1303
+ // instagram
1304
+ $this->social["enableInstagramLogin"] = isset($_POST[self::TAB_SOCIAL]["enableInstagramLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableInstagramLogin"]) : 0;
1305
+ $this->social["instagramAppID"] = isset($_POST[self::TAB_SOCIAL]["instagramAppID"]) ? trim($_POST[self::TAB_SOCIAL]["instagramAppID"]) : "";
1306
+ $this->social["instagramAppSecret"] = isset($_POST[self::TAB_SOCIAL]["instagramAppSecret"]) ? trim($_POST[self::TAB_SOCIAL]["instagramAppSecret"]) : "";
1307
+ // linkedin
1308
+ $this->social["enableLinkedinLogin"] = isset($_POST[self::TAB_SOCIAL]["enableLinkedinLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableLinkedinLogin"]) : 0;
1309
+ $this->social["linkedinClientID"] = isset($_POST[self::TAB_SOCIAL]["linkedinClientID"]) ? trim($_POST[self::TAB_SOCIAL]["linkedinClientID"]) : "";
1310
+ $this->social["linkedinClientSecret"] = isset($_POST[self::TAB_SOCIAL]["linkedinClientSecret"]) ? trim($_POST[self::TAB_SOCIAL]["linkedinClientSecret"]) : "";
1311
+ // whatsapp
1312
+ $this->social["enableWhatsappShare"] = isset($_POST[self::TAB_SOCIAL]["enableWhatsappShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableWhatsappShare"]) : 0;
1313
+ // yandex
1314
+ $this->social["enableYandexLogin"] = isset($_POST[self::TAB_SOCIAL]["enableYandexLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableYandexLogin"]) : 0;
1315
+ $this->social["yandexID"] = isset($_POST[self::TAB_SOCIAL]["yandexID"]) ? trim($_POST[self::TAB_SOCIAL]["yandexID"]) : "";
1316
+ $this->social["yandexPassword"] = isset($_POST[self::TAB_SOCIAL]["yandexPassword"]) ? trim($_POST[self::TAB_SOCIAL]["yandexPassword"]) : "";
1317
+ // mail.ru
1318
+ $this->social["enableMailruLogin"] = isset($_POST[self::TAB_SOCIAL]["enableMailruLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableMailruLogin"]) : 0;
1319
+ $this->social["mailruClientID"] = isset($_POST[self::TAB_SOCIAL]["mailruClientID"]) ? trim($_POST[self::TAB_SOCIAL]["mailruClientID"]) : "";
1320
+ $this->social["mailruClientSecret"] = isset($_POST[self::TAB_SOCIAL]["mailruClientSecret"]) ? trim($_POST[self::TAB_SOCIAL]["mailruClientSecret"]) : "";
1321
+ // weibo
1322
+ $this->social["enableWeiboLogin"] = isset($_POST[self::TAB_SOCIAL]["enableWeiboLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableWeiboLogin"]) : 0;
1323
+ $this->social["weiboKey"] = isset($_POST[self::TAB_SOCIAL]["weiboKey"]) ? trim($_POST[self::TAB_SOCIAL]["weiboKey"]) : "";
1324
+ $this->social["weiboSecret"] = isset($_POST[self::TAB_SOCIAL]["weiboSecret"]) ? trim($_POST[self::TAB_SOCIAL]["weiboSecret"]) : "";
1325
+ // wechat
1326
+ $this->social["enableWechatLogin"] = isset($_POST[self::TAB_SOCIAL]["enableWechatLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableWechatLogin"]) : 0;
1327
+ $this->social["wechatAppID"] = isset($_POST[self::TAB_SOCIAL]["wechatAppID"]) ? trim($_POST[self::TAB_SOCIAL]["wechatAppID"]) : "";
1328
+ $this->social["wechatSecret"] = isset($_POST[self::TAB_SOCIAL]["wechatSecret"]) ? trim($_POST[self::TAB_SOCIAL]["wechatSecret"]) : "";
1329
+ // qq
1330
+ $this->social["enableQQLogin"] = isset($_POST[self::TAB_SOCIAL]["enableQQLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableQQLogin"]) : 0;
1331
+ $this->social["qqAppID"] = isset($_POST[self::TAB_SOCIAL]["qqAppID"]) ? trim($_POST[self::TAB_SOCIAL]["qqAppID"]) : "";
1332
+ $this->social["qqSecret"] = isset($_POST[self::TAB_SOCIAL]["qqSecret"]) ? trim($_POST[self::TAB_SOCIAL]["qqSecret"]) : "";
1333
+ // baidu
1334
+ $this->social["enableBaiduLogin"] = isset($_POST[self::TAB_SOCIAL]["enableBaiduLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableBaiduLogin"]) : 0;
1335
+ $this->social["baiduAppID"] = isset($_POST[self::TAB_SOCIAL]["baiduAppID"]) ? trim($_POST[self::TAB_SOCIAL]["baiduAppID"]) : "";
1336
+ $this->social["baiduSecret"] = isset($_POST[self::TAB_SOCIAL]["baiduSecret"]) ? trim($_POST[self::TAB_SOCIAL]["baiduSecret"]) : "";
1337
+ // vk
1338
+ $this->social["enableVkLogin"] = isset($_POST[self::TAB_SOCIAL]["enableVkLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableVkLogin"]) : 0;
1339
+ $this->social["enableVkShare"] = isset($_POST[self::TAB_SOCIAL]["enableVkShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableVkShare"]) : 0;
1340
+ $this->social["vkAppID"] = isset($_POST[self::TAB_SOCIAL]["vkAppID"]) ? trim($_POST[self::TAB_SOCIAL]["vkAppID"]) : "";
1341
+ $this->social["vkAppSecret"] = isset($_POST[self::TAB_SOCIAL]["vkAppSecret"]) ? trim($_POST[self::TAB_SOCIAL]["vkAppSecret"]) : "";
1342
+ // ok
1343
+ $this->social["enableOkLogin"] = isset($_POST[self::TAB_SOCIAL]["enableOkLogin"]) ? absint($_POST[self::TAB_SOCIAL]["enableOkLogin"]) : 0;
1344
+ $this->social["enableOkShare"] = isset($_POST[self::TAB_SOCIAL]["enableOkShare"]) ? absint($_POST[self::TAB_SOCIAL]["enableOkShare"]) : 0;
1345
+ $this->social["okAppID"] = isset($_POST[self::TAB_SOCIAL]["okAppID"]) ? trim($_POST[self::TAB_SOCIAL]["okAppID"]) : "";
1346
+ $this->social["okAppKey"] = isset($_POST[self::TAB_SOCIAL]["okAppKey"]) ? trim($_POST[self::TAB_SOCIAL]["okAppKey"]) : "";
1347
+ $this->social["okAppSecret"] = isset($_POST[self::TAB_SOCIAL]["okAppSecret"]) ? trim($_POST[self::TAB_SOCIAL]["okAppSecret"]) : "";
1348
+ } else if (self::TAB_RATING === $_POST["wpd_tab"]) {
1349
+ $this->rating["enablePostRatingSchema"] = isset($_POST[self::TAB_RATING]["enablePostRatingSchema"]) ? absint($_POST[self::TAB_RATING]["enablePostRatingSchema"]) : 0;
1350
+ $this->rating["displayRatingOnPost"] = isset($_POST[self::TAB_RATING]["displayRatingOnPost"]) ? $_POST[self::TAB_RATING]["displayRatingOnPost"] : [];
1351
+ $this->rating["ratingCssOnNoneSingular"] = isset($_POST[self::TAB_RATING]["ratingCssOnNoneSingular"]) ? absint($_POST[self::TAB_RATING]["ratingCssOnNoneSingular"]) : 0;
1352
+ $this->rating["ratingHoverColor"] = isset($_POST[self::TAB_RATING]["ratingHoverColor"]) ? $_POST[self::TAB_RATING]["ratingHoverColor"] : "#FFED85";
1353
+ $this->rating["ratingInactiveColor"] = isset($_POST[self::TAB_RATING]["ratingInactiveColor"]) ? $_POST[self::TAB_RATING]["ratingInactiveColor"] : "#DDDDDD";
1354
+ $this->rating["ratingActiveColor"] = isset($_POST[self::TAB_RATING]["ratingActiveColor"]) ? $_POST[self::TAB_RATING]["ratingActiveColor"] : "#FFD700";
1355
+ } else if (self::TAB_THREAD_DISPLAY === $_POST["wpd_tab"]) {
1356
+ $this->thread_display["firstLoadWithAjax"] = isset($_POST[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["firstLoadWithAjax"]) : 0;
1357
+ $this->thread_display["commentListLoadType"] = isset($_POST[self::TAB_THREAD_DISPLAY]["commentListLoadType"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["commentListLoadType"]) : 0;
1358
+ $this->thread_display["isLoadOnlyParentComments"] = isset($_POST[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"]) : 0;
1359
+ $this->thread_display["showReactedFilterButton"] = isset($_POST[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["showReactedFilterButton"]) : 0;
1360
+ $this->thread_display["showHottestFilterButton"] = isset($_POST[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["showHottestFilterButton"]) : 0;
1361
+ $this->thread_display["showSortingButtons"] = isset($_POST[self::TAB_THREAD_DISPLAY]["showSortingButtons"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["showSortingButtons"]) : 0;
1362
+ $this->thread_display["mostVotedByDefault"] = isset($_POST[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"]) : 0;
1363
+ $this->thread_display["reverseChildren"] = isset($_POST[self::TAB_THREAD_DISPLAY]["reverseChildren"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["reverseChildren"]) : 0;
1364
+ $this->thread_display["highlightUnreadComments"] = isset($_POST[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"]) : 0;
1365
+ $this->thread_display["scrollToComment"] = isset($_POST[self::TAB_THREAD_DISPLAY]["scrollToComment"]) ? absint($_POST[self::TAB_THREAD_DISPLAY]["scrollToComment"]) : 0;
1366
+ $this->thread_display["orderCommentsBy"] = isset($_POST[self::TAB_THREAD_DISPLAY]["orderCommentsBy"]) && ($o = trim($_POST[self::TAB_THREAD_DISPLAY]["orderCommentsBy"])) && in_array($o, [
1367
+ "comment_ID",
1368
+ "comment_date_gmt",
1369
+ ]) ? $o : "comment_ID";
1370
+ } else if (self::TAB_THREAD_LAYOUTS === $_POST["wpd_tab"]) {
1371
+ $this->thread_layouts["showCommentLink"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showCommentLink"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showCommentLink"]) : 0;
1372
+ $this->thread_layouts["showCommentDate"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showCommentDate"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showCommentDate"]) : 0;
1373
+ $this->thread_layouts["showVotingButtons"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showVotingButtons"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showVotingButtons"]) : 0;
1374
+ $this->thread_layouts["votingButtonsIcon"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"]) ? $_POST[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"] : "fa-plus|fa-minus";
1375
+ $this->thread_layouts["votingButtonsStyle"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"]) : 0;
1376
+ $this->thread_layouts["enableDislikeButton"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["enableDislikeButton"]) : 0;
1377
+ $this->thread_layouts["isGuestCanVote"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"]) : 0;
1378
+ $this->thread_layouts["highlightVotingButtons"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["highlightVotingButtons"]) : 0;
1379
+ $this->thread_layouts["showAvatars"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["showAvatars"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["showAvatars"]) : 0;
1380
+ $this->thread_layouts["defaultAvatarUrlForUser"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"]) ? trim($_POST[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForUser"]) : "";
1381
+ $this->thread_layouts["defaultAvatarUrlForGuest"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"]) ? trim($_POST[self::TAB_THREAD_LAYOUTS]["defaultAvatarUrlForGuest"]) : "";
1382
+ $this->thread_layouts["changeAvatarsEverywhere"] = isset($_POST[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"]) ? absint($_POST[self::TAB_THREAD_LAYOUTS]["changeAvatarsEverywhere"]) : 0;
1383
+ } else if (self::TAB_THREAD_STYLES === $_POST["wpd_tab"]) {
1384
+ $this->thread_styles["theme"] = isset($_POST[self::TAB_THREAD_STYLES]["theme"]) ? trim($_POST[self::TAB_THREAD_STYLES]["theme"]) : "wpd-default";
1385
+ $this->thread_styles["primaryColor"] = isset($_POST[self::TAB_THREAD_STYLES]["primaryColor"]) ? $_POST[self::TAB_THREAD_STYLES]["primaryColor"] : "#00B38F";
1386
+ $this->thread_styles["newLoadedCommentBGColor"] = isset($_POST[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"]) ? $_POST[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"] : "#FFFAD6";
1387
+ $this->thread_styles["primaryButtonColor"] = isset($_POST[self::TAB_THREAD_STYLES]["primaryButtonColor"]) ? $_POST[self::TAB_THREAD_STYLES]["primaryButtonColor"] : "#FFFFFF";
1388
+ $this->thread_styles["primaryButtonBG"] = isset($_POST[self::TAB_THREAD_STYLES]["primaryButtonBG"]) ? $_POST[self::TAB_THREAD_STYLES]["primaryButtonBG"] : "#07B290";
1389
+ $this->thread_styles["bubbleColors"] = isset($_POST[self::TAB_THREAD_STYLES]["bubbleColors"]) ? $_POST[self::TAB_THREAD_STYLES]["bubbleColors"] : "#1DB99A";
1390
+ $this->thread_styles["inlineFeedbackColors"] = isset($_POST[self::TAB_THREAD_STYLES]["inlineFeedbackColors"]) ? $_POST[self::TAB_THREAD_STYLES]["inlineFeedbackColors"] : "#1DB99A";
1391
+ $this->thread_styles["defaultCommentAreaBG"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"]) ? $_POST[self::TAB_THREAD_STYLES]["defaultCommentAreaBG"] : "";
1392
+ $this->thread_styles["defaultCommentTextColor"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentTextColor"]) ? $_POST[self::TAB_THREAD_STYLES]["defaultCommentTextColor"] : "#777777";
1393
+ $this->thread_styles["defaultCommentFieldsBG"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"]) ? $_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsBG"] : "";
1394
+ $this->thread_styles["defaultCommentFieldsBorderColor"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"]) ? $_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsBorderColor"] : "#DDDDDD";
1395
+ $this->thread_styles["defaultCommentFieldsTextColor"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"]) ? $_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsTextColor"] : "#777777";
1396
+ $this->thread_styles["defaultCommentFieldsPlaceholderColor"] = isset($_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"]) ? $_POST[self::TAB_THREAD_STYLES]["defaultCommentFieldsPlaceholderColor"] : "";
1397
+ $this->thread_styles["darkCommentAreaBG"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentAreaBG"]) ? $_POST[self::TAB_THREAD_STYLES]["darkCommentAreaBG"] : "#111111";
1398
+ $this->thread_styles["darkCommentTextColor"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentTextColor"]) ? $_POST[self::TAB_THREAD_STYLES]["darkCommentTextColor"] : "#CCCCCC";
1399
+ $this->thread_styles["darkCommentFieldsBG"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"]) ? $_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsBG"] : "#999999";
1400
+ $this->thread_styles["darkCommentFieldsBorderColor"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"]) ? $_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsBorderColor"] : "#D1D1D1";
1401
+ $this->thread_styles["darkCommentFieldsTextColor"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"]) ? $_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsTextColor"] : "#000000";
1402
+ $this->thread_styles["darkCommentFieldsPlaceholderColor"] = isset($_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"]) ? $_POST[self::TAB_THREAD_STYLES]["darkCommentFieldsPlaceholderColor"] : "#DDDDDD";
1403
+ $this->thread_styles["commentTextSize"] = isset($_POST[self::TAB_THREAD_STYLES]["commentTextSize"]) ? $_POST[self::TAB_THREAD_STYLES]["commentTextSize"] : "14px";
1404
+ $this->thread_styles["enableFontAwesome"] = isset($_POST[self::TAB_THREAD_STYLES]["enableFontAwesome"]) ? absint($_POST[self::TAB_THREAD_STYLES]["enableFontAwesome"]) : 0;
1405
+ $this->thread_styles["customCss"] = isset($_POST[self::TAB_THREAD_STYLES]["customCss"]) ? $_POST[self::TAB_THREAD_STYLES]["customCss"] : ".comments-area{width:auto;}";
1406
+ } else if (self::TAB_SUBSCRIPTION === $_POST["wpd_tab"]) {
1407
+ $this->subscription["enableUserMentioning"] = isset($_POST[self::TAB_SUBSCRIPTION]["enableUserMentioning"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["enableUserMentioning"]) : 0;
1408
+ $this->subscription["sendMailToMentionedUsers"] = isset($_POST[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["sendMailToMentionedUsers"]) : 0;
1409
+ $this->subscription["isNotifyOnCommentApprove"] = isset($_POST[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"]) : 0;
1410
+ $this->subscription["enableMemberConfirm"] = isset($_POST[self::TAB_SUBSCRIPTION]["enableMemberConfirm"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["enableMemberConfirm"]) : 0;
1411
+ $this->subscription["enableGuestsConfirm"] = isset($_POST[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"]) : 0;
1412
+ $this->subscription["subscriptionType"] = isset($_POST[self::TAB_SUBSCRIPTION]["subscriptionType"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["subscriptionType"]) : 1;
1413
+ $this->subscription["showReplyCheckbox"] = isset($_POST[self::TAB_SUBSCRIPTION]["showReplyCheckbox"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["showReplyCheckbox"]) : 0;
1414
+ $this->subscription["isReplyDefaultChecked"] = isset($_POST[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"]) : 0;
1415
+ $this->subscription["usePostmaticForCommentNotification"] = isset($_POST[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"]) : 0;
1416
+ $this->subscription["isFollowActive"] = isset($_POST[self::TAB_SUBSCRIPTION]["isFollowActive"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["isFollowActive"]) : 0;
1417
+ $this->subscription["disableFollowConfirmForUsers"] = isset($_POST[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"]) ? absint($_POST[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"]) : 0;
1418
+ } else if (self::TAB_LABELS === $_POST["wpd_tab"]) {
1419
+ $emptyRolesArray = array_combine(array_keys($this->labels["blogRoleLabels"]), array_pad([], count($this->labels["blogRoleLabels"]), 0));
1420
+ $this->labels["blogRoleLabels"] = isset($_POST[self::TAB_LABELS]["blogRoleLabels"]) ? wp_parse_args($_POST[self::TAB_LABELS]["blogRoleLabels"], $emptyRolesArray) : $emptyRolesArray;
1421
+ $this->labels["blogRoles"] = isset($_POST[self::TAB_LABELS]["blogRoles"]) ? wp_parse_args($_POST[self::TAB_LABELS]["blogRoles"], $this->labels["blogRoles"]) : $this->labels["blogRoles"];
1422
+ } else if (self::TAB_MODERATION === $_POST["wpd_tab"]) {
1423
+ $this->moderation["commentEditableTime"] = isset($_POST[self::TAB_MODERATION]["commentEditableTime"]) ? $_POST[self::TAB_MODERATION]["commentEditableTime"] : 900;
1424
+ $this->moderation["enableEditingWhenHaveReplies"] = isset($_POST[self::TAB_MODERATION]["enableEditingWhenHaveReplies"]) ? absint($_POST[self::TAB_MODERATION]["enableEditingWhenHaveReplies"]) : 0;
1425
+ $this->moderation["displayEditingInfo"] = isset($_POST[self::TAB_MODERATION]["displayEditingInfo"]) ? absint($_POST[self::TAB_MODERATION]["displayEditingInfo"]) : 0;
1426
+ $this->moderation["enableStickButton"] = isset($_POST[self::TAB_MODERATION]["enableStickButton"]) ? absint($_POST[self::TAB_MODERATION]["enableStickButton"]) : 0;
1427
+ $this->moderation["enableCloseButton"] = isset($_POST[self::TAB_MODERATION]["enableCloseButton"]) ? absint($_POST[self::TAB_MODERATION]["enableCloseButton"]) : 0;
1428
+ $this->moderation["restrictCommentingPerUser"] = isset($_POST[self::TAB_MODERATION]["restrictCommentingPerUser"]) ? trim($_POST[self::TAB_MODERATION]["restrictCommentingPerUser"]) : "disable";
1429
+ $this->moderation["commentRestrictionType"] = isset($_POST[self::TAB_MODERATION]["commentRestrictionType"]) ? trim($_POST[self::TAB_MODERATION]["commentRestrictionType"]) : "both";
1430
+ $this->moderation["userCommentsLimit"] = isset($_POST[self::TAB_MODERATION]["userCommentsLimit"]) ? absint($_POST[self::TAB_MODERATION]["userCommentsLimit"]) : 1;
1431
+ } else if (self::TAB_CONTENT === $_POST["wpd_tab"]) {
1432
+ $this->content["commentTextMinLength"] = isset($_POST[self::TAB_CONTENT]["commentTextMinLength"]) && absint($_POST[self::TAB_CONTENT]["commentTextMinLength"]) > 0 ? absint($_POST[self::TAB_CONTENT]["commentTextMinLength"]) : 1;
1433
+ $this->content["commentTextMaxLength"] = isset($_POST[self::TAB_CONTENT]["commentTextMaxLength"]) && absint($_POST[self::TAB_CONTENT]["commentTextMaxLength"]) > 0 ? absint($_POST[self::TAB_CONTENT]["commentTextMaxLength"]) : "";
1434
+ $this->content["enableImageConversion"] = isset($_POST[self::TAB_CONTENT]["enableImageConversion"]) ? absint($_POST[self::TAB_CONTENT]["enableImageConversion"]) : 0;
1435
+ $this->content["enableShortcodes"] = isset($_POST[self::TAB_CONTENT]["enableShortcodes"]) ? absint($_POST[self::TAB_CONTENT]["enableShortcodes"]) : 0;
1436
+ $this->content["commentReadMoreLimit"] = isset($_POST[self::TAB_CONTENT]["commentReadMoreLimit"]) && absint($_POST[self::TAB_CONTENT]["commentReadMoreLimit"]) >= 0 ? absint($_POST[self::TAB_CONTENT]["commentReadMoreLimit"]) : 0;
1437
+ $this->content["wmuIsEnabled"] = isset($_POST[self::TAB_CONTENT]["wmuIsEnabled"]) ? absint($_POST[self::TAB_CONTENT]["wmuIsEnabled"]) : 0;
1438
+ $this->content["wmuIsGuestAllowed"] = isset($_POST[self::TAB_CONTENT]["wmuIsGuestAllowed"]) ? absint($_POST[self::TAB_CONTENT]["wmuIsGuestAllowed"]) : 0;
1439
+ $this->content["wmuIsLightbox"] = isset($_POST[self::TAB_CONTENT]["wmuIsLightbox"]) ? absint($_POST[self::TAB_CONTENT]["wmuIsLightbox"]) : 0;
1440
+ $this->content["wmuMimeTypes"] = isset($_POST[self::TAB_CONTENT]["wmuMimeTypes"]) ? $_POST[self::TAB_CONTENT]["wmuMimeTypes"] : [];
1441
+ $this->content["wmuMaxFileSize"] = isset($_POST[self::TAB_CONTENT]["wmuMaxFileSize"]) ? $_POST[self::TAB_CONTENT]["wmuMaxFileSize"] : $this->wmuUploadMaxFileSize / (1024 * 1024);
1442
+ $this->content["wmuIsShowFilesDashboard"] = isset($_POST[self::TAB_CONTENT]["wmuIsShowFilesDashboard"]) ? absint($_POST[self::TAB_CONTENT]["wmuIsShowFilesDashboard"]) : 0;
1443
+ $this->content["wmuSingleImageWidth"] = isset($_POST[self::TAB_CONTENT]["wmuSingleImageWidth"]) && ($v = trim($_POST[self::TAB_CONTENT]["wmuSingleImageWidth"])) && ($v === "auto" || ($v = absint($v))) ? $v : 320;
1444
+ $this->content["wmuSingleImageHeight"] = isset($_POST[self::TAB_CONTENT]["wmuSingleImageHeight"]) && ($v = trim($_POST[self::TAB_CONTENT]["wmuSingleImageHeight"])) && ($v === "auto" || ($v = absint($v))) ? $v : 200;
1445
+ $this->content["wmuImageSizes"] = isset($_POST[self::TAB_CONTENT]["wmuImageSizes"]) && is_array($_POST[self::TAB_CONTENT]["wmuImageSizes"]) && ($sizes = array_filter($_POST[self::TAB_CONTENT]["wmuImageSizes"])) ? $sizes : [];
1446
+ } else if (self::TAB_LIVE === $_POST["wpd_tab"]) {
1447
+ $this->live["enableBubble"] = isset($_POST[self::TAB_LIVE]["enableBubble"]) ? absint($_POST[self::TAB_LIVE]["enableBubble"]) : 0;
1448
+ $this->live["bubbleLiveUpdate"] = isset($_POST[self::TAB_LIVE]["bubbleLiveUpdate"]) ? absint($_POST[self::TAB_LIVE]["bubbleLiveUpdate"]) : 0;
1449
+ $this->live["bubbleLocation"] = isset($_POST[self::TAB_LIVE]["bubbleLocation"]) ? trim($_POST[self::TAB_LIVE]["bubbleLocation"]) : "content_left";
1450
+ $this->live["bubbleShowNewCommentMessage"] = isset($_POST[self::TAB_LIVE]["bubbleShowNewCommentMessage"]) ? absint($_POST[self::TAB_LIVE]["bubbleShowNewCommentMessage"]) : 0;
1451
+ $this->live["bubbleHintTimeout"] = isset($_POST[self::TAB_LIVE]["bubbleHintTimeout"]) ? absint($_POST[self::TAB_LIVE]["bubbleHintTimeout"]) : 0;
1452
+ $this->live["bubbleHintHideTimeout"] = isset($_POST[self::TAB_LIVE]["bubbleHintHideTimeout"]) ? absint($_POST[self::TAB_LIVE]["bubbleHintHideTimeout"]) : 0;
1453
+ $this->live["commentListUpdateType"] = isset($_POST[self::TAB_LIVE]["commentListUpdateType"]) ? absint($_POST[self::TAB_LIVE]["commentListUpdateType"]) : 0;
1454
+ $this->live["liveUpdateGuests"] = isset($_POST[self::TAB_LIVE]["liveUpdateGuests"]) ? absint($_POST[self::TAB_LIVE]["liveUpdateGuests"]) : 0;
1455
+ $this->live["commentListUpdateTimer"] = isset($_POST[self::TAB_LIVE]["commentListUpdateTimer"]) ? absint($_POST[self::TAB_LIVE]["commentListUpdateTimer"]) : 30;
1456
+ } else if (self::TAB_INLINE === $_POST["wpd_tab"]) {
1457
+ $this->inline["showInlineFilterButton"] = isset($_POST[self::TAB_INLINE]["showInlineFilterButton"]) ? absint($_POST[self::TAB_INLINE]["showInlineFilterButton"]) : 0;
1458
+ $this->inline["inlineFeedbackAttractionType"] = isset($_POST[self::TAB_INLINE]["inlineFeedbackAttractionType"]) ? trim($_POST[self::TAB_INLINE]["inlineFeedbackAttractionType"]) : "disable";
1459
+ } else if (self::TAB_GENERAL === $_POST["wpd_tab"]) {
1460
+ $this->general["isEnableOnHome"] = isset($_POST[self::TAB_GENERAL]["isEnableOnHome"]) ? absint($_POST[self::TAB_GENERAL]["isEnableOnHome"]) : 0;
1461
+ $this->general["isNativeAjaxEnabled"] = isset($_POST[self::TAB_GENERAL]["isNativeAjaxEnabled"]) ? absint($_POST[self::TAB_GENERAL]["isNativeAjaxEnabled"]) : 0;
1462
+ $this->general["loadComboVersion"] = isset($_POST[self::TAB_GENERAL]["loadComboVersion"]) ? absint($_POST[self::TAB_GENERAL]["loadComboVersion"]) : 0;
1463
+ $this->general["loadMinVersion"] = isset($_POST[self::TAB_GENERAL]["loadMinVersion"]) ? absint($_POST[self::TAB_GENERAL]["loadMinVersion"]) : 0;
1464
+ $this->general["commentLinkFilter"] = isset($_POST[self::TAB_GENERAL]["commentLinkFilter"]) ? absint($_POST[self::TAB_GENERAL]["commentLinkFilter"]) : 1;
1465
+ $this->general["simpleCommentDate"] = isset($_POST[self::TAB_GENERAL]["simpleCommentDate"]) ? absint($_POST[self::TAB_GENERAL]["simpleCommentDate"]) : 0;
1466
+ $this->general["dateDiffFormat"] = isset($_POST[self::TAB_GENERAL]["dateDiffFormat"]) ? trim($_POST[self::TAB_GENERAL]["dateDiffFormat"]) : "";
1467
+ $this->general["isUsePoMo"] = isset($_POST[self::TAB_GENERAL]["isUsePoMo"]) ? absint($_POST[self::TAB_GENERAL]["isUsePoMo"]) : 0;
1468
+ $this->general["showPluginPoweredByLink"] = isset($_POST[self::TAB_GENERAL]["showPluginPoweredByLink"]) ? absint($_POST[self::TAB_GENERAL]["showPluginPoweredByLink"]) : 0;
1469
+ $this->general["isGravatarCacheEnabled"] = isset($_POST[self::TAB_GENERAL]["isGravatarCacheEnabled"]) ? absint($_POST[self::TAB_GENERAL]["isGravatarCacheEnabled"]) : 0;
1470
+ $this->general["gravatarCacheMethod"] = isset($_POST[self::TAB_GENERAL]["gravatarCacheMethod"]) ? trim($_POST[self::TAB_GENERAL]["gravatarCacheMethod"]) : "cronjob";
1471
+ $this->general["gravatarCacheTimeout"] = isset($_POST[self::TAB_GENERAL]["gravatarCacheTimeout"]) ? absint($_POST[self::TAB_GENERAL]["gravatarCacheTimeout"]) : 10;
1472
+ $this->general["redirectPage"] = isset($_POST[self::TAB_GENERAL]["redirectPage"]) ? absint($_POST[self::TAB_GENERAL]["redirectPage"]) : 0;
1473
+ }
1474
+ do_action("wpdiscuz_save_options");
1475
+ $this->updateOptions();
1476
+ }
1477
+ }
1478
 
1479
+ public function savePhrases() {
1480
+ if (isset($_POST["wc_submit_phrases"])) {
1481
+ if (!current_user_can("manage_options")) {
1482
+ die(esc_html_e("Hacker?", "wpdiscuz"));
1483
+ }
1484
+ check_admin_referer("wc_phrases_form");
1485
+ $this->phrases["wc_be_the_first_text"] = strip_tags($_POST["wc_be_the_first_text"]);
1486
+ $this->phrases["wc_comment_start_text"] = esc_attr($_POST["wc_comment_start_text"]);
1487
+ $this->phrases["wc_comment_join_text"] = strip_tags($_POST["wc_comment_join_text"]);
1488
+ $this->phrases["wc_content_and_settings"] = esc_attr($_POST["wc_content_and_settings"]);
1489
+ $this->phrases["wc_hottest_comment_thread"] = esc_attr($_POST["wc_hottest_comment_thread"]);
1490
+ $this->phrases["wc_most_reacted_comment"] = esc_attr($_POST["wc_most_reacted_comment"]);
1491
+ $this->phrases["wc_inline_comments"] = esc_attr($_POST["wc_inline_comments"]);
1492
+ $this->phrases["wc_email_text"] = esc_attr($_POST["wc_email_text"]);
1493
+ $this->phrases["wc_subscribe_anchor"] = esc_attr($_POST["wc_subscribe_anchor"]);
1494
+ $this->phrases["wc_notify_of"] = esc_attr($_POST["wc_notify_of"]);
1495
+ $this->phrases["wc_notify_on_new_comment"] = esc_attr($_POST["wc_notify_on_new_comment"]);
1496
+ $this->phrases["wc_notify_on_all_new_reply"] = esc_attr($_POST["wc_notify_on_all_new_reply"]);
1497
+ $this->phrases["wc_notify_on_new_reply"] = esc_attr($_POST["wc_notify_on_new_reply"]);
1498
+ $this->phrases["wc_sort_by"] = esc_attr($_POST["wc_sort_by"]);
1499
+ $this->phrases["wc_newest"] = esc_attr($_POST["wc_newest"]);
1500
+ $this->phrases["wc_oldest"] = esc_attr($_POST["wc_oldest"]);
1501
+ $this->phrases["wc_most_voted"] = esc_attr($_POST["wc_most_voted"]);
1502
+ $this->phrases["wc_load_more_submit_text"] = esc_attr($_POST["wc_load_more_submit_text"]);
1503
+ $this->phrases["wc_load_rest_comments_submit_text"] = esc_attr($_POST["wc_load_rest_comments_submit_text"]);
1504
+ $this->phrases["wc_reply_text"] = esc_attr($_POST["wc_reply_text"]);
1505
+ $this->phrases["wc_share_text"] = esc_attr($_POST["wc_share_text"]);
1506
+ $this->phrases["wc_edit_text"] = esc_attr($_POST["wc_edit_text"]);
1507
+ $this->phrases["wc_share_facebook"] = esc_attr($_POST["wc_share_facebook"]);
1508
+ $this->phrases["wc_share_twitter"] = esc_attr($_POST["wc_share_twitter"]);
1509
+ $this->phrases["wc_share_whatsapp"] = esc_attr($_POST["wc_share_whatsapp"]);
1510
+ $this->phrases["wc_share_vk"] = esc_attr($_POST["wc_share_vk"]);
1511
+ $this->phrases["wc_share_ok"] = esc_attr($_POST["wc_share_ok"]);
1512
+ $this->phrases["wc_hide_replies_text"] = esc_attr($_POST["wc_hide_replies_text"]);
1513
+ $this->phrases["wc_show_replies_text"] = esc_attr($_POST["wc_show_replies_text"]);
1514
+ $this->phrases["wc_email_subject"] = esc_attr($_POST["wc_email_subject"]);
1515
+ $this->phrases["wc_email_message"] = wpautop($_POST["wc_email_message"]);
1516
+ $this->phrases["wc_all_comment_new_reply_subject"] = esc_attr($_POST["wc_all_comment_new_reply_subject"]);
1517
+ $this->phrases["wc_all_comment_new_reply_message"] = wpautop($_POST["wc_all_comment_new_reply_message"]);
1518
+ $this->phrases["wc_new_reply_email_subject"] = esc_attr($_POST["wc_new_reply_email_subject"]);
1519
+ $this->phrases["wc_new_reply_email_message"] = wpautop($_POST["wc_new_reply_email_message"]);
1520
+ $this->phrases["wc_subscribed_on_comment"] = esc_attr($_POST["wc_subscribed_on_comment"]);
1521
+ $this->phrases["wc_subscribed_on_all_comment"] = esc_attr($_POST["wc_subscribed_on_all_comment"]);
1522
+ $this->phrases["wc_subscribed_on_post"] = esc_attr($_POST["wc_subscribed_on_post"]);
1523
+ $this->phrases["wc_unsubscribe"] = esc_attr($_POST["wc_unsubscribe"]);
1524
+ $this->phrases["wc_ignore_subscription"] = esc_attr($_POST["wc_ignore_subscription"]);
1525
+ $this->phrases["wc_unsubscribe_message"] = esc_attr($_POST["wc_unsubscribe_message"]);
1526
+ $this->phrases["wc_subscribe_message"] = esc_attr($_POST["wc_subscribe_message"]);
1527
+ $this->phrases["wc_confirm_email"] = esc_attr($_POST["wc_confirm_email"]);
1528
+ $this->phrases["wc_comfirm_success_message"] = esc_attr($_POST["wc_comfirm_success_message"]);
1529
+ $this->phrases["wc_confirm_email_subject"] = esc_attr($_POST["wc_confirm_email_subject"]);
1530
+ $this->phrases["wc_confirm_email_message"] = wpautop($_POST["wc_confirm_email_message"]);
1531
+ $this->phrases["wc_error_empty_text"] = esc_attr($_POST["wc_error_empty_text"]);
1532
+ $this->phrases["wc_error_email_text"] = esc_attr($_POST["wc_error_email_text"]);
1533
+ $this->phrases["wc_error_url_text"] = esc_attr($_POST["wc_error_url_text"]);
1534
+ $this->phrases["wc_year_text"] = esc_attr($_POST["wc_year_text"]);
1535
+ $this->phrases["wc_year_text_plural"] = esc_attr($_POST["wc_year_text_plural"]);
1536
+ $this->phrases["wc_month_text"] = esc_attr($_POST["wc_month_text"]);
1537
+ $this->phrases["wc_month_text_plural"] = esc_attr($_POST["wc_month_text_plural"]);
1538
+ $this->phrases["wc_day_text"] = esc_attr($_POST["wc_day_text"]);
1539
+ $this->phrases["wc_day_text_plural"] = esc_attr($_POST["wc_day_text_plural"]);
1540
+ $this->phrases["wc_hour_text"] = esc_attr($_POST["wc_hour_text"]);
1541
+ $this->phrases["wc_hour_text_plural"] = esc_attr($_POST["wc_hour_text_plural"]);
1542
+ $this->phrases["wc_minute_text"] = esc_attr($_POST["wc_minute_text"]);
1543
+ $this->phrases["wc_minute_text_plural"] = esc_attr($_POST["wc_minute_text_plural"]);
1544
+ $this->phrases["wc_second_text"] = esc_attr($_POST["wc_second_text"]);
1545
+ $this->phrases["wc_second_text_plural"] = esc_attr($_POST["wc_second_text_plural"]);
1546
+ $this->phrases["wc_right_now_text"] = esc_attr($_POST["wc_right_now_text"]);
1547
+ $this->phrases["wc_ago_text"] = esc_attr($_POST["wc_ago_text"]);
1548
+ $this->phrases["wc_you_must_be_text"] = esc_attr($_POST["wc_you_must_be_text"]);
1549
+ $this->phrases["wc_logged_in_as"] = esc_attr($_POST["wc_logged_in_as"]);
1550
+ $this->phrases["wc_log_out"] = esc_attr($_POST["wc_log_out"]);
1551
+ $this->phrases["wc_log_in"] = esc_attr($_POST["wc_log_in"]);
1552
+ $this->phrases["wc_login_please"] = esc_attr($_POST["wc_login_please"]);
1553
+ $this->phrases["wc_logged_in_text"] = esc_attr($_POST["wc_logged_in_text"]);
1554
+ $this->phrases["wc_to_post_comment_text"] = esc_attr($_POST["wc_to_post_comment_text"]);
1555
+ $this->phrases["wc_vote_counted"] = esc_attr($_POST["wc_vote_counted"]);
1556
+ $this->phrases["wc_vote_up"] = esc_attr($_POST["wc_vote_up"]);
1557
+ $this->phrases["wc_vote_down"] = esc_attr($_POST["wc_vote_down"]);
1558
+ $this->phrases["wc_awaiting_for_approval"] = esc_attr($_POST["wc_awaiting_for_approval"]);
1559
+ $this->phrases["wc_vote_only_one_time"] = esc_attr($_POST["wc_vote_only_one_time"]);
1560
+ $this->phrases["wc_voting_error"] = esc_attr($_POST["wc_voting_error"]);
1561
+ $this->phrases["wc_self_vote"] = esc_attr($_POST["wc_self_vote"]);
1562
+ $this->phrases["wc_deny_voting_from_same_ip"] = esc_attr($_POST["wc_deny_voting_from_same_ip"]);
1563
+ $this->phrases["wc_login_to_vote"] = esc_attr($_POST["wc_login_to_vote"]);
1564
+ $this->phrases["wc_invalid_captcha"] = esc_attr($_POST["wc_invalid_captcha"]);
1565
+ $this->phrases["wc_invalid_field"] = esc_attr($_POST["wc_invalid_field"]);
1566
+ $this->phrases["wc_comment_not_updated"] = esc_attr($_POST["wc_comment_not_updated"]);
1567
+ $this->phrases["wc_comment_edit_not_possible"] = esc_attr($_POST["wc_comment_edit_not_possible"]);
1568
+ $this->phrases["wc_comment_not_edited"] = esc_attr($_POST["wc_comment_not_edited"]);
1569
+ $this->phrases["wc_comment_edit_save_button"] = esc_attr($_POST["wc_comment_edit_save_button"]);
1570
+ $this->phrases["wc_comment_edit_cancel_button"] = esc_attr($_POST["wc_comment_edit_cancel_button"]);
1571
+ $this->phrases["wc_msg_input_min_length"] = esc_attr($_POST["wc_msg_input_min_length"]);
1572
+ $this->phrases["wc_msg_input_max_length"] = esc_attr($_POST["wc_msg_input_max_length"]);
1573
+ $this->phrases["wc_read_more"] = esc_attr($_POST["wc_read_more"]);
1574
+ $this->phrases["wc_anonymous"] = esc_attr($_POST["wc_anonymous"]);
1575
+ $this->phrases["wc_msg_required_fields"] = esc_attr($_POST["wc_msg_required_fields"]);
1576
+ $this->phrases["wc_connect_with"] = esc_attr($_POST["wc_connect_with"]);
1577
+ $this->phrases["wc_subscribed_to"] = esc_attr($_POST["wc_subscribed_to"]);
1578
+ $this->phrases["wc_form_subscription_submit"] = esc_attr($_POST["wc_form_subscription_submit"]);
1579
+ $this->phrases["wc_comment_approved_email_subject"] = esc_attr($_POST["wc_comment_approved_email_subject"]);
1580
+ $this->phrases["wc_comment_approved_email_message"] = wpautop($_POST["wc_comment_approved_email_message"]);
1581
+ $this->phrases["wc_roles_cannot_comment_message"] = esc_attr($_POST["wc_roles_cannot_comment_message"]);
1582
+ $this->phrases["wc_stick_comment_btn_title"] = esc_attr($_POST["wc_stick_comment_btn_title"]);
1583
+ $this->phrases["wc_stick_comment"] = esc_attr($_POST["wc_stick_comment"]);
1584
+ $this->phrases["wc_unstick_comment"] = esc_attr($_POST["wc_unstick_comment"]);
1585
+ $this->phrases["wc_sticky_comment_icon_title"] = esc_attr($_POST["wc_sticky_comment_icon_title"]);
1586
+ $this->phrases["wc_close_comment_btn_title"] = esc_attr($_POST["wc_close_comment_btn_title"]);
1587
+ $this->phrases["wc_close_comment"] = esc_attr($_POST["wc_close_comment"]);
1588
+ $this->phrases["wc_open_comment"] = esc_attr($_POST["wc_open_comment"]);
1589
+ $this->phrases["wc_closed_comment_icon_title"] = esc_attr($_POST["wc_closed_comment_icon_title"]);
1590
+ $this->phrases["wc_social_login_agreement_label"] = esc_attr($_POST["wc_social_login_agreement_label"]);
1591
+ $this->phrases["wc_social_login_agreement_desc"] = esc_attr($_POST["wc_social_login_agreement_desc"]);
1592
+ $this->phrases["wc_agreement_button_disagree"] = esc_attr($_POST["wc_agreement_button_disagree"]);
1593
+ $this->phrases["wc_agreement_button_agree"] = esc_attr($_POST["wc_agreement_button_agree"]);
1594
+ $this->phrases["wc_content_and_settings"] = esc_attr($_POST["wc_content_and_settings"]);
1595
+ $this->phrases["wc_user_settings_activity"] = esc_attr($_POST["wc_user_settings_activity"]);
1596
+ $this->phrases["wc_user_settings_subscriptions"] = esc_attr($_POST["wc_user_settings_subscriptions"]);
1597
+ $this->phrases["wc_user_settings_follows"] = esc_attr($_POST["wc_user_settings_follows"]);
1598
+ $this->phrases["wc_user_settings_response_to"] = esc_attr($_POST["wc_user_settings_response_to"]);
1599
+ $this->phrases["wc_user_settings_email_me_delete_links"] = esc_attr($_POST["wc_user_settings_email_me_delete_links"]);
1600
+ $this->phrases["wc_user_settings_email_me_delete_links_desc"] = esc_attr($_POST["wc_user_settings_email_me_delete_links_desc"]);
1601
+ $this->phrases["wc_user_settings_no_data"] = esc_attr($_POST["wc_user_settings_no_data"]);
1602
+ $this->phrases["wc_user_settings_request_deleting_comments"] = esc_attr($_POST["wc_user_settings_request_deleting_comments"]);
1603
+ $this->phrases["wc_user_settings_cancel_subscriptions"] = esc_attr($_POST["wc_user_settings_cancel_subscriptions"]);
1604
+ $this->phrases["wc_user_settings_clear_cookie"] = esc_attr($_POST["wc_user_settings_clear_cookie"]);
1605
+ $this->phrases["wc_user_settings_delete_links"] = esc_attr($_POST["wc_user_settings_delete_links"]);
1606
+ $this->phrases["wc_user_settings_delete_all_comments"] = esc_attr($_POST["wc_user_settings_delete_all_comments"]);
1607
+ $this->phrases["wc_user_settings_delete_all_comments_message"] = wpautop($_POST["wc_user_settings_delete_all_comments_message"]);
1608
+ $this->phrases["wc_user_settings_delete_all_subscriptions"] = esc_attr($_POST["wc_user_settings_delete_all_subscriptions"]);
1609
+ $this->phrases["wc_user_settings_delete_all_subscriptions_message"] = wpautop($_POST["wc_user_settings_delete_all_subscriptions_message"]);
1610
+ $this->phrases["wc_user_settings_delete_all_follows"] = esc_attr($_POST["wc_user_settings_delete_all_follows"]);
1611
+ $this->phrases["wc_user_settings_delete_all_follows_message"] = wpautop($_POST["wc_user_settings_delete_all_follows_message"]);
1612
+ $this->phrases["wc_user_settings_subscribed_to_replies"] = esc_attr($_POST["wc_user_settings_subscribed_to_replies"]);
1613
+ $this->phrases["wc_user_settings_subscribed_to_replies_own"] = esc_attr($_POST["wc_user_settings_subscribed_to_replies_own"]);
1614
+ $this->phrases["wc_user_settings_subscribed_to_all_comments"] = esc_attr($_POST["wc_user_settings_subscribed_to_all_comments"]);
1615
+ $this->phrases["wc_user_settings_check_email"] = esc_attr($_POST["wc_user_settings_check_email"]);
1616
+ $this->phrases["wc_user_settings_email_error"] = esc_attr($_POST["wc_user_settings_email_error"]);
1617
+ $this->phrases["wc_confirm_comment_delete"] = esc_attr($_POST["wc_confirm_comment_delete"]);
1618
+ $this->phrases["wc_confirm_cancel_subscription"] = esc_attr($_POST["wc_confirm_cancel_subscription"]);
1619
+ $this->phrases["wc_confirm_cancel_follow"] = esc_attr($_POST["wc_confirm_cancel_follow"]);
1620
+ $this->phrases["wc_follow_user"] = esc_attr($_POST["wc_follow_user"]);
1621
+ $this->phrases["wc_unfollow_user"] = esc_attr($_POST["wc_unfollow_user"]);
1622
+ $this->phrases["wc_follow_success"] = esc_attr($_POST["wc_follow_success"]);
1623
+ $this->phrases["wc_follow_canceled"] = esc_attr($_POST["wc_follow_canceled"]);
1624
+ $this->phrases["wc_follow_email_confirm"] = esc_attr($_POST["wc_follow_email_confirm"]);
1625
+ $this->phrases["wc_follow_email_confirm_fail"] = esc_attr($_POST["wc_follow_email_confirm_fail"]);
1626
+ $this->phrases["wc_follow_login_to_follow"] = esc_attr($_POST["wc_follow_login_to_follow"]);
1627
+ $this->phrases["wc_follow_impossible"] = esc_attr($_POST["wc_follow_impossible"]);
1628
+ $this->phrases["wc_follow_not_added"] = esc_attr($_POST["wc_follow_not_added"]);
1629
+ $this->phrases["wc_follow_confirm"] = esc_attr($_POST["wc_follow_confirm"]);
1630
+ $this->phrases["wc_follow_cancel"] = esc_attr($_POST["wc_follow_cancel"]);
1631
+ $this->phrases["wc_follow_confirm_email_subject"] = esc_attr($_POST["wc_follow_confirm_email_subject"]);
1632
+ $this->phrases["wc_follow_confirm_email_message"] = wpautop($_POST["wc_follow_confirm_email_message"]);
1633
+ $this->phrases["wc_follow_email_subject"] = esc_attr($_POST["wc_follow_email_subject"]);
1634
+ $this->phrases["wc_follow_email_message"] = wpautop($_POST["wc_follow_email_message"]);
1635
+ $this->phrases["wc_mentioned_email_subject"] = esc_attr($_POST["wc_mentioned_email_subject"]);
1636
+ $this->phrases["wc_mentioned_email_message"] = wpautop($_POST["wc_mentioned_email_message"]);
1637
+ $this->phrases["wc_copied_to_clipboard"] = esc_attr($_POST["wc_copied_to_clipboard"]);
1638
+ $this->phrases["wc_feedback_shortcode_tooltip"] = esc_attr($_POST["wc_feedback_shortcode_tooltip"]);
1639
+ $this->phrases["wc_feedback_popup_title"] = esc_attr($_POST["wc_feedback_popup_title"]);
1640
+ $this->phrases["wc_please_leave_feebdack"] = esc_attr($_POST["wc_please_leave_feebdack"]);
1641
+ $this->phrases["wc_feedback_content_text"] = esc_attr($_POST["wc_feedback_content_text"]);
1642
+ $this->phrases["wc_feedback_comment_success"] = esc_attr($_POST["wc_feedback_comment_success"]);
1643
+ $this->phrases["wc_commenting_is_closed"] = esc_attr($_POST["wc_commenting_is_closed"]);
1644
+ $this->phrases["wc_closed_comment_thread"] = esc_attr($_POST["wc_closed_comment_thread"]);
1645
+ $this->phrases["wc_bubble_invite_message"] = esc_attr($_POST["wc_bubble_invite_message"]);
1646
+ $this->phrases["wc_vote_phrase"] = esc_attr($_POST["wc_vote_phrase"]);
1647
+ $this->phrases["wc_votes_phrase"] = esc_attr($_POST["wc_votes_phrase"]);
1648
+ $this->phrases["wc_comment_link"] = esc_attr($_POST["wc_comment_link"]);
1649
+ $this->phrases["wc_not_allowed_to_comment_more_than"] = esc_attr($_POST["wc_not_allowed_to_comment_more_than"]);
1650
+ $this->phrases["wc_not_allowed_to_create_comment_thread_more_than"] = esc_attr($_POST["wc_not_allowed_to_create_comment_thread_more_than"]);
1651
+ $this->phrases["wc_not_allowed_to_reply_more_than"] = esc_attr($_POST["wc_not_allowed_to_reply_more_than"]);
1652
+ $this->phrases["wc_inline_form_comment"] = esc_attr($_POST["wc_inline_form_comment"]);
1653
+ $this->phrases["wc_inline_form_notify"] = esc_attr($_POST["wc_inline_form_notify"]);
1654
+ $this->phrases["wc_inline_form_name"] = esc_attr($_POST["wc_inline_form_name"]);
1655
+ $this->phrases["wc_inline_form_email"] = esc_attr($_POST["wc_inline_form_email"]);
1656
+ $this->phrases["wc_inline_form_comment_button"] = esc_attr($_POST["wc_inline_form_comment_button"]);
1657
+ $this->phrases["wc_inline_comments_view_all"] = esc_attr($_POST["wc_inline_comments_view_all"]);
1658
+ $this->phrases["wc_inline_feedbacks"] = esc_attr($_POST["wc_inline_feedbacks"]);
1659
+ $this->phrases["wc_unable_sent_email"] = esc_attr($_POST["wc_unable_sent_email"]);
1660
+ $this->phrases["wc_subscription_fault"] = esc_attr($_POST["wc_subscription_fault"]);
1661
+ $this->phrases["wc_comments_are_deleted"] = esc_attr($_POST["wc_comments_are_deleted"]);
1662
+ $this->phrases["wc_cancel_subs_success"] = esc_attr($_POST["wc_cancel_subs_success"]);
1663
+ $this->phrases["wc_cancel_follows_success"] = esc_attr($_POST["wc_cancel_follows_success"]);
1664
+ $this->phrases["wc_follow_confirm_success"] = esc_attr($_POST["wc_follow_confirm_success"]);
1665
+ $this->phrases["wc_follow_cancel_success"] = esc_attr($_POST["wc_follow_cancel_success"]);
1666
+ $this->phrases["wc_login_to_comment"] = esc_attr($_POST["wc_login_to_comment"]);
1667
+ $this->phrases["wc_view_comments"] = esc_attr($_POST["wc_view_comments"]);
1668
+ $this->phrases["wc_spoiler"] = esc_attr($_POST["wc_spoiler"]);
1669
+ $this->phrases["wc_last_edited"] = esc_attr($_POST["wc_last_edited"]);
1670
+ $this->phrases["wc_reply_to"] = esc_attr($_POST["wc_reply_to"]);
1671
+ $this->phrases["wc_manage_comment"] = esc_attr($_POST["wc_manage_comment"]);
1672
+ $this->phrases["wc_spoiler_title"] = esc_attr($_POST["wc_spoiler_title"]);
1673
+ $this->phrases["wc_cannot_rate_again"] = esc_attr($_POST["wc_cannot_rate_again"]);
1674
+ $this->phrases["wc_not_allowed_to_rate"] = esc_attr($_POST["wc_not_allowed_to_rate"]);
1675
+ // Media Upload //
1676
+ $this->phrases["wmuPhraseConfirmDelete"] = esc_attr($_POST["wmuPhraseConfirmDelete"]);
1677
+ $this->phrases["wmuPhraseNotAllowedFile"] = esc_attr($_POST["wmuPhraseNotAllowedFile"]);
1678
+ $this->phrases["wmuPhraseMaxFileCount"] = esc_attr($_POST["wmuPhraseMaxFileCount"]);
1679
+ $this->phrases["wmuPhraseMaxFileSize"] = esc_attr($_POST["wmuPhraseMaxFileSize"]);
1680
+ $this->phrases["wmuPhrasePostMaxSize"] = esc_attr($_POST["wmuPhrasePostMaxSize"]);
1681
+ $this->phrases["wmuAttachImage"] = esc_attr($_POST["wmuAttachImage"]);
1682
+ $this->phrases["wmuChangeImage"] = esc_attr($_POST["wmuChangeImage"]);
1683
 
1684
+ if (class_exists("Prompt_Comment_Form_Handling") && $this->usePostmaticForCommentNotification) {
1685
+ $this->phrases["wc_postmatic_subscription_label"] = esc_attr($_POST["wc_postmatic_subscription_label"]);
1686
+ }
1687
+ foreach ($this->labels["blogRoles"] as $roleName => $roleVal) {
1688
+ $this->phrases["wc_blog_role_" . $roleName] = esc_attr($_POST["wc_blog_role_" . $roleName]);
1689
+ }
1690
+ $this->dbManager->updatePhrases($this->phrases);
1691
+ }
1692
+ }
1693
 
1694
+ public function resetOptions() {
1695
+ if (isset($_GET["_wpnonce"]) && isset($_GET["wpdiscuz_reset_options"]) && !empty($_GET["page"]) && !empty($_GET["wpd_tab"]) && ($resetTab = sanitize_key($_GET["wpd_tab"])) && $_GET["wpdiscuz_reset_options"] == 1 && $_GET["page"] == WpdiscuzCore::PAGE_SETTINGS && current_user_can("manage_options") && wp_verify_nonce($_GET["_wpnonce"], "wpdiscuz_reset_options_nonce-" . $resetTab)) {
1696
 
1697
+ $roleColors = [
1698
+ "guest" => "#898989",
1699
+ "post_author" => "#07B290",
1700
+ "administrator" => "#ff451f",
1701
+ "editor" => "#d36000",
1702
+ "author" => "#327324",
1703
+ "contributor" => "#a240cd",
1704
+ "subscriber" => "#31839e",
1705
+ ];
1706
 
1707
+ if ($resetTab === "all") {
1708
+ delete_option(self::OPTION_SLUG_OPTIONS);
1709
+ $this->addOptions();
1710
+ $this->initOptions(get_option(self::OPTION_SLUG_OPTIONS));
1711
+ $this->general["showPluginPoweredByLink"] = 1;
1712
+ $blogRoles = get_editable_roles();
1713
+ $this->labels["blogRoles"]["guest"] = $roleColors["guest"];
1714
+ $this->labels["blogRoles"]["post_author"] = $roleColors["post_author"];
1715
+ $this->labels["blogRoleLabels"]["post_author"] = 1;
1716
+ $this->labels["blogRoleLabels"]["guest"] = 0;
1717
+ foreach ($blogRoles as $roleName => $roleInfo) {
1718
+ $this->labels["blogRoles"][$roleName] = isset($roleColors[$roleName]) ? $roleColors[$roleName] : "#31839e";
1719
+ $this->labels["blogRoleLabels"][$roleName] = $roleName === "editor" || $roleName === "administrator" ? 1 : 0;
1720
+ }
1721
+ $this->updateOptions();
1722
+ } else if (isset($this->{$resetTab})) {
1723
+ $defaultOptions = $this->getDefaultOptions();
1724
+ $this->{$resetTab} = $defaultOptions[$_GET["wpd_tab"]];
1725
+ if ($resetTab === WpdiscuzCore::TAB_GENERAL) {
1726
+ $this->general["showPluginPoweredByLink"] = 1;
1727
+ } else if ($resetTab === WpdiscuzCore::TAB_LABELS) {
1728
+ $blogRoles = get_editable_roles();
1729
+ $this->labels["blogRoles"]["guest"] = $roleColors["guest"];
1730
+ $this->labels["blogRoles"]["post_author"] = $roleColors["post_author"];
1731
+ $this->labels["blogRoleLabels"]["post_author"] = 1;
1732
+ $this->labels["blogRoleLabels"]["guest"] = 0;
1733
+ foreach ($blogRoles as $roleName => $roleInfo) {
1734
+ $this->labels["blogRoles"][$roleName] = isset($roleColors[$roleName]) ? $roleColors[$roleName] : "#31839e";
1735
+ $this->labels["blogRoleLabels"][$roleName] = $roleName === "editor" || $roleName === "administrator" ? 1 : 0;
1736
+ }
1737
+ }
1738
+ $this->updateOptions();
1739
+ }
1740
+ do_action("wpdiscuz_reset_options", $resetTab);
1741
+ }
1742
+ }
1743
 
1744
+ public function mainOptionsForm() {
1745
+ if (isset($_POST["wc_submit_options"])) {
1746
+ add_settings_error("wpdiscuz", "settings_updated", esc_html__("Settings updated", "wpdiscuz"), "updated");
1747
+ }
1748
+ include_once WPDISCUZ_DIR_PATH . "/options/html-options.php";
1749
+ }
1750
 
1751
+ public function phrasesOptionsForm() {
1752
+ if (isset($_POST["wc_submit_phrases"])) {
1753
+ add_settings_error("wpdiscuz", "phrases_updated", esc_html__("Phrases updated", "wpdiscuz"), "updated");
1754
+ }
1755
+ $this->initPhrasesOnLoad();
1756
+ include_once WPDISCUZ_DIR_PATH . "/options/html-phrases.php";
1757
+ }
1758
 
1759
+ public function tools() {
1760
+ if (current_user_can("manage_options")) {
1761
 
1762
+ $wpUploadsDir = wp_upload_dir();
1763
+ $wpdiscuzOptionsDir = $wpUploadsDir["basedir"] . self::OPTIONS_DIR;
1764
+ $wpdiscuzOptionsUrl = $wpUploadsDir["baseurl"] . self::OPTIONS_DIR;
1765
 
1766
+ if (isset($_POST["tools-action"])) {
1767
 
1768
+ $action = $_POST["tools-action"];
1769
 
1770
+ if ($action === "export-options") {
1771
+ check_admin_referer("wc_tools_form", "wpd-options-export");
1772
+ wp_mkdir_p($wpdiscuzOptionsDir);
1773
+ $options = @maybe_unserialize(get_option(self::OPTION_SLUG_OPTIONS));
1774
+ if ($options) {
1775
+ $json = json_encode($options);
1776
+ if (file_put_contents($wpdiscuzOptionsDir . self::OPTIONS_FILENAME . ".txt", $json)) {
1777
+ add_settings_error("wpdiscuz", "settings_updated", esc_html__("Options were backed up!", "wpdiscuz"), "updated");
1778
+ } else {
1779
+ add_settings_error("wpdiscuz", "settings_updated", esc_html__("Cannot back up the options!", "wpdiscuz"), "error");
1780
+ }
1781
+ }
1782
+ } else if ($action === "import-options") {
1783
+ check_admin_referer("wc_tools_form", "wpd-options-import");
1784
+ $file = isset($_FILES["wpdiscuz-options-file"]) ? $_FILES["wpdiscuz-options-file"] : "";
1785
+ if ($file && is_array($file) && isset($file["tmp_name"])) {
1786
+ if ($data = file_get_contents($file["tmp_name"])) {
1787
+ $options = json_decode($data, true);
1788
+ if ($options && is_array($options)) {
1789
+ update_option(self::OPTION_SLUG_OPTIONS, $this->replaceOldOptions($options, false));
1790
+ add_settings_error("wpdiscuz", "settings_updated", esc_html__("Options Imported Successfully!", "wpdiscuz"), "updated");
1791
+ } else {
1792
+ add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! File content is empty or data is not valid!", "wpdiscuz"), "error");
1793
+ }
1794
+ } else {
1795
+ add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! Can not get file content!", "wpdiscuz"), "error");
1796
+ }
1797
+ } else {
1798
+ add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! Please choose file!", "wpdiscuz"), "error");
1799
+ }
1800
+ } else if ($action === "export-phrases") {
1801
+ check_admin_referer("wc_tools_form", "wpd-phrases-export");
1802
+ wp_mkdir_p($wpdiscuzOptionsDir);
1803
+ $phrases = $this->dbManager->getPhrases();
1804
+ if ($phrases) {
1805
+ $json = json_encode($phrases);
1806
+ if (file_put_contents($wpdiscuzOptionsDir . self::PHRASES_FILENAME . ".txt", $json)) {
1807
+ add_settings_error("wpdiscuz", "settings_updated", esc_html__("Phrases were backed up!", "wpdiscuz"), "updated");
1808
+ } else {
1809
+ add_settings_error("wpdiscuz", "settings_updated", esc_html__("Cannot back up the phrases!", "wpdiscuz"), "error");
1810
+ }
1811
+ }
1812
+ } else if ($action === "import-phrases") {
1813
+ check_admin_referer("wc_tools_form", "wpd-phrases-import");
1814
+ $file = isset($_FILES["wpdiscuz-phrases-file"]) ? $_FILES["wpdiscuz-phrases-file"] : "";
1815
+ if ($file && is_array($file) && isset($file["tmp_name"])) {
1816
+ if ($data = file_get_contents($file["tmp_name"])) {
1817
+ $phrases = json_decode($data, true);
1818
+ if ($phrases && is_array($phrases)) {
1819
+ $this->dbManager->updatePhrases($phrases);
1820
+ add_settings_error("wpdiscuz", "settings_updated", esc_html__("Phrases Imported Successfully!", "wpdiscuz"), "updated");
1821
+ } else {
1822
+ add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! File content is empty or data is not valid!", "wpdiscuz"), "error");
1823
+ }
1824
+ } else {
1825
+ add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! Can not get file content!", "wpdiscuz"), "error");
1826
+ }
1827
+ } else {
1828
+ add_settings_error("wpdiscuz", "settings_error", esc_html__("Error occured! Please choose file!", "wpdiscuz"), "error");
1829
+ }
1830
+ }
1831
+ }
1832
+ } else {
1833
+ die(esc_html_e("Hacker?", "wpdiscuz"));
1834
+ }
1835
+ include_once WPDISCUZ_DIR_PATH . "/options/html-tools.php";
1836
+ }
1837
 
1838
+ public function addons() {
1839
+ include_once WPDISCUZ_DIR_PATH . "/options/html-addons.php";
1840
+ }
1841
 
1842
+ private function initAddons() {
1843
+ $this->addons = [
1844
+ "bundle" => [
1845
+ "version" => "7.0.0",
1846
+ "requires" => "7.0.0",
1847
+ "class" => "Bundle",
1848
+ "title" => "Addons Bundle",
1849
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/bundle/header.png"),
1850
+ "desc" => esc_html__("All 16 addons in one bundle. Save 90% and get Unlimited Site License with one year premium support.", "wpdiscuz"),
1851
+ "url" => "https://gvectors.com/product/wpdiscuz-addons-bundle/",
1852
+ ],
1853
+ "uploader" => [
1854
+ "version" => "7.0.0",
1855
+ "requires" => "7.0.0",
1856
+ "class" => "WpdiscuzMediaUploader",
1857
+ "title" => "Media Uploader",
1858
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/uploader/header.png"),
1859
+ "desc" => esc_html__("Extended comment attachment system. Allows to upload images, videos, audios and other file types.", "wpdiscuz"),
1860
+ "url" => "https://gvectors.com/product/wpdiscuz-media-uploader/",
1861
+ ],
1862
+ "embeds" => [
1863
+ "version" => "1.0.0",
1864
+ "requires" => "7.0.0",
1865
+ "class" => "WpdiscuzEmbeds",
1866
+ "title" => "Embeds",
1867
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/embeds/header.png"),
1868
+ "desc" => esc_html__("Allows to embed lots of video, social network, audio and photo content providers URLs in comment content.", "wpdiscuz"),
1869
+ "url" => "https://gvectors.com/product/wpdiscuz-embeds/",
1870
+ ],
1871
+ "syntax" => [
1872
+ "version" => "1.0.0",
1873
+ "requires" => "7.0.0",
1874
+ "class" => "wpDiscuzSyntaxHighlighter",
1875
+ "title" => "wpDiscuzSyntaxHighlighter",
1876
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/syntax/header.png"),
1877
+ "desc" => esc_html__("Syntax highlighting for comments, automatic language detection and multi-language code highlighting.", "wpdiscuz"),
1878
+ "url" => "https://gvectors.com/product/wpdiscuz-syntax-highlighter/",
1879
+ ],
1880
+ "frontend-moderation" => [
1881
+ "version" => "7.0.0",
1882
+ "requires" => "7.0.0",
1883
+ "class" => "wpDiscuzFrontEndModeration",
1884
+ "title" => "Front-end Moderation",
1885
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/frontend-moderation/header.png"),
1886
+ "desc" => esc_html__("All in one powerful yet simple admin toolkit to moderate comments on front-end.", "wpdiscuz"),
1887
+ "url" => "https://gvectors.com/product/wpdiscuz-frontend-moderation/",
1888
+ ],
1889
+ "emoticons" => [
1890
+ "version" => "7.0.0",
1891
+ "requires" => "7.0.0",
1892
+ "class" => "wpDiscuzSmile",
1893
+ "title" => "Emoticons",
1894
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/emoticons/header.png"),
1895
+ "desc" => esc_html__("Brings an ocean of emotions to your comments. It comes with an awesome smile package.", "wpdiscuz"),
1896
+ "url" => "https://gvectors.com/product/wpdiscuz-emoticons/",
1897
+ ],
1898
+ "recaptcha" => [
1899
+ "version" => "7.0.0",
1900
+ "requires" => "7.0.0",
1901
+ "class" => "WpdiscuzRecaptcha",
1902
+ "title" => "Invisible reCAPTCHA v3",
1903
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/recaptcha/header.png"),
1904
+ "desc" => esc_html__("Adds Invisible reCAPTCHA on all comment forms. Stops spam and bot comments with reCAPTCHA version 3", "wpdiscuz"),
1905
+ "url" => "https://gvectors.com/product/wpdiscuz-recaptcha/",
1906
+ ],
1907
+ "author-info" => [
1908
+ "version" => "7.0.0",
1909
+ "requires" => "7.0.0",
1910
+ "class" => "WpdiscuzCommentAuthorInfo",
1911
+ "title" => "Comment Author Info",
1912
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/author-info/header.png"),
1913
+ "desc" => esc_html__("Extended information about comment author with Profile, Activity, Votes and Subscriptions Tabs on pop-up window.", "wpdiscuz"),
1914
+ "url" => "https://gvectors.com/product/wpdiscuz-comment-author-info/",
1915
+ ],
1916
+ "report-flagging" => [
1917
+ "version" => "7.0.0",
1918
+ "requires" => "7.0.0",
1919
+ "class" => "wpDiscuzFlagComment",
1920
+ "title" => "Report and Flagging",
1921
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/report/header.png"),
1922
+ "desc" => esc_html__("Comment reporting tools. Auto-moderates comments based on number of flags and dislikes.", "wpdiscuz"),
1923
+ "url" => "https://gvectors.com/product/wpdiscuz-report-flagging/",
1924
+ ],
1925
+ "online-users" => [
1926
+ "version" => "7.0.0",
1927
+ "requires" => "7.0.0",
1928
+ "class" => "WpdiscuzOnlineUsers",
1929
+ "title" => "Online Users",
1930
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/online-users/header.png"),
1931
+ "desc" => esc_html__("Real-time online user checking, pop-up notification of new online users and online/offline badges.", "wpdiscuz"),
1932
+ "url" => "https://gvectors.com/product/wpdiscuz-online-users/",
1933
+ ],
1934
+ "private" => [
1935
+ "version" => "7.0.0",
1936
+ "requires" => "7.0.0",
1937
+ "class" => "wpDiscuzPrivateComment",
1938
+ "title" => "Private Comments",
1939
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/private/header.png"),
1940
+ "desc" => esc_html__("Allows to create private comment threads. Rich management options in dashboard by user roles.", "wpdiscuz"),
1941
+ "url" => "https://gvectors.com/product/wpdiscuz-private-comments/",
1942
+ ],
1943
+ "subscriptions" => [
1944
+ "version" => "7.0.0",
1945
+ "requires" => "7.0.0",
1946
+ "class" => "wpdSubscribeManager",
1947
+ "title" => "Subscription Manager",
1948
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/subscriptions/header.png"),
1949
+ "desc" => esc_html__("Total control over comment subscriptions. Full list, monitor, manage, filter, unsubscribe, confirm...", "wpdiscuz"),
1950
+ "url" => "https://gvectors.com/product/wpdiscuz-subscribe-manager/",
1951
+ ],
1952
+ "ads-manager" => [
1953
+ "version" => "7.0.0",
1954
+ "requires" => "7.0.0",
1955
+ "class" => "WpdiscuzAdsManager",
1956
+ "title" => "Ads Manager",
1957
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/ads-manager/header.png"),
1958
+ "desc" => esc_html__("A full-fledged tool-kit for advertising in comment section of your website. Separate banner and ad managment.", "wpdiscuz"),
1959
+ "url" => "https://gvectors.com/product/wpdiscuz-ads-manager/",
1960
+ ],
1961
+ "user-mention" => [
1962
+ "version" => "7.0.0",
1963
+ "requires" => "7.0.0",
1964
+ "class" => "WpdiscuzUCM",
1965
+ "title" => "User &amp; Comment Mentioning",
1966
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/user-mention/header.png"),
1967
+ "desc" => esc_html__("Allows to mention comments and users in comment text using #comment-id and @username tags.", "wpdiscuz"),
1968
+ "url" => "https://gvectors.com/product/wpdiscuz-user-comment-mentioning/",
1969
+ ],
1970
+ "likers" => [
1971
+ "version" => "7.0.0",
1972
+ "requires" => "7.0.0",
1973
+ "class" => "WpdiscuzVoters",
1974
+ "title" => "Advanced Likers",
1975
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/likers/header.png"),
1976
+ "desc" => esc_html__("See comment likers and voters of each comment. Adds user reputation and badges based on received likes.", "wpdiscuz"),
1977
+ "url" => "https://gvectors.com/product/wpdiscuz-advanced-likers/",
1978
+ ],
1979
+ "translate" => [
1980
+ "version" => "7.0.0",
1981
+ "requires" => "7.0.0",
1982
+ "class" => "WpDiscuzTranslate",
1983
+ "title" => "Comment Translate",
1984
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/translate/header.png"),
1985
+ "desc" => esc_html__('Adds a smart and intuitive AJAX "Translate" button with 60 language options. Uses free translation API.', "wpdiscuz"),
1986
+ "url" => "https://gvectors.com/product/wpdiscuz-comment-translation/",
1987
+ ],
1988
+ "search" => [
1989
+ "version" => "7.0.0",
1990
+ "requires" => "7.0.0",
1991
+ "class" => "wpDiscuzCommentSearch",
1992
+ "title" => "Comment Search",
1993
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/search/header.png"),
1994
+ "desc" => esc_html__("AJAX powered front-end comment search. It starts searching while you type search words. ", "wpdiscuz"),
1995
+ "url" => "https://gvectors.com/product/wpdiscuz-comment-search/",
1996
+ ],
1997
+ "widgets" => [
1998
+ "version" => "7.0.0",
1999
+ "requires" => "7.0.0",
2000
+ "class" => "wpDiscuzWidgets",
2001
+ "title" => "wpDiscuz Widgets",
2002
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/widgets/header.png"),
2003
+ "desc" => esc_html__("Most voted comments, Active comment threads, Most commented posts, Active comment authors", "wpdiscuz"),
2004
+ "url" => "https://gvectors.com/product/wpdiscuz-widgets/",
2005
+ ],
2006
+ "mycred" => [
2007
+ "version" => "7.0.0",
2008
+ "requires" => "7.0.0",
2009
+ "class" => "myCRED_Hook_wpDiscuz_Vote",
2010
+ "title" => "myCRED Integration",
2011
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/mycred/header.png"),
2012
+ "desc" => esc_html__("Integrates myCRED Badges and Ranks. Converts wpDiscuz comment votes/likes to myCRED points. ", "wpdiscuz"),
2013
+ "url" => "https://gvectors.com/product/wpdiscuz-mycred/",
2014
+ ],
2015
+ ];
2016
+ }
2017
 
2018
+ private function initTips() {
2019
+ $this->tips = [
2020
+ "custom-form" => [
2021
+ "title" => esc_html__("Custom Comment Forms", "wpdiscuz"),
2022
+ "text" => esc_html__("You can create custom comment forms with wpDiscuz. wpDiscuz 4 comes with custom comment forms and fields. You can create custom comment forms for each post type, each form can beceated with different form fields, for eaxample: text, dropdown, rating, checkboxes, etc...", "wpdiscuz"),
2023
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/img/tips/custom-form.png"),
2024
+ "url" => admin_url() . "edit.php?post_type=wpdiscuz_form",
2025
+ ],
2026
+ "emoticons" => [
2027
+ "title" => esc_html__("Emoticons", "wpdiscuz"),
2028
+ "text" => esc_html__("You can add more emotions to your comments using wpDiscuz Emoticons addon.", "wpdiscuz"),
2029
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/emoticons/header.png"),
2030
+ "url" => "https://gvectors.com/product/wpdiscuz-emoticons/",
2031
+ ],
2032
+ "ads-manager" => [
2033
+ "title" => esc_html__("Ads Manager", "wpdiscuz"),
2034
+ "text" => esc_html__("Increase your income using ad banners. Comment area is the most active sections for advertising. wpDiscuz Ads Manager addon is designed to help you add banners and control ads in this section.", "wpdiscuz"),
2035
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/ads-manager/header.png"),
2036
+ "url" => "https://gvectors.com/product/wpdiscuz-ads-manager/",
2037
+ ],
2038
+ "user-mention" => [
2039
+ "title" => esc_html__("User and Comment Mentioning", "wpdiscuz"),
2040
+ "text" => esc_html__("Using wpDiscuz User &amp; Comment Mentioning addon you can allow commenters mention comments and users in comment text using #comment-id and @username tags.", "wpdiscuz"),
2041
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/user-mention/header.png"),
2042
+ "url" => "https://gvectors.com/product/wpdiscuz-user-comment-mentioning/",
2043
+ ],
2044
+ "likers" => [
2045
+ "title" => esc_html__("Advanced Likers", "wpdiscuz"),
2046
+ "text" => esc_html__("wpDiscuz Advanced Likers addon displays likers and voters of each comment. Adds user reputation and badges based on received likes.", "wpdiscuz"),
2047
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/likers/header.png"),
2048
+ "url" => "https://gvectors.com/product/wpdiscuz-advanced-likers/",
2049
+ ],
2050
+ "report-flagging" => [
2051
+ "title" => esc_html__("Report and Flagging", "wpdiscuz"),
2052
+ "text" => esc_html__("Let your commenters help you to determine and remove spam comments. wpDiscuz Report and Flagging addon comes with comment reporting tools. Automaticaly auto-moderates comments based on number of flags and dislikes.", "wpdiscuz"),
2053
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/report/header.png"),
2054
+ "url" => "https://gvectors.com/product/wpdiscuz-report-flagging/",
2055
+ ],
2056
+ "translate" => [
2057
+ "title" => esc_html__("Comment Translate", "wpdiscuz"),
2058
+ "text" => esc_html__("In most cases the big part of your visitors are not a native speakers of your language. Make your comments comprehensible for all visitors using wpDiscuz Comment Translation addon. It adds smart and intuitive AJAX 'Translate' button with 60 language translation options. Uses free translation API.", "wpdiscuz"),
2059
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/translate/header.png"),
2060
+ "url" => "https://gvectors.com/product/wpdiscuz-comment-translation/",
2061
+ ],
2062
+ "search" => [
2063
+ "title" => esc_html__("Comment Search", "wpdiscuz"),
2064
+ "text" => esc_html__("You can let website visitor search in comments. It's always more attractive to find a comment about something that interest you. Using wpDiscuz Comment Search addon you'll get a nice, AJAX powered front-end comment search form above comment list.", "wpdiscuz"),
2065
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/search/header.png"),
2066
+ "url" => "https://gvectors.com/product/wpdiscuz-comment-search/",
2067
+ ],
2068
+ "widgets" => [
2069
+ "title" => esc_html__("wpDiscuz Widgets", "wpdiscuz"),
2070
+ "text" => esc_html__("More Comment Widgets! Most voted comments, Active comment threads, Most commented posts, Active comment authors widgets are available in wpDiscuz Widgets Addon", "wpdiscuz"),
2071
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/widgets/header.png"),
2072
+ "url" => "https://gvectors.com/product/wpdiscuz-widgets/",
2073
+ ],
2074
+ "frontend-moderation" => [
2075
+ "title" => esc_html__("Front-end Moderation", "wpdiscuz"),
2076
+ "text" => esc_html__("You can moderate comments on front-end using all in one powerful yet simple wpDiscuz Frontend Moderation addon.", "wpdiscuz"),
2077
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/frontend-moderation/header.png"),
2078
+ "url" => "https://gvectors.com/product/wpdiscuz-frontend-moderation/",
2079
+ ],
2080
+ "uploader" => [
2081
+ "title" => esc_html__("Media Uploader", "wpdiscuz"),
2082
+ "text" => esc_html__("You can let website visitors attach images and files to comments and embed video/audio content using wpDiscuz Media Uploader addon.", "wpdiscuz"),
2083
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/uploader/header.png"),
2084
+ "url" => "https://gvectors.com/product/wpdiscuz-media-uploader/",
2085
+ ],
2086
+ "recaptcha" => [
2087
+ "title" => esc_html__("Google ReCaptcha", "wpdiscuz"),
2088
+ "text" => esc_html__("Advanced spam protection with wpDiscuz Google reCAPTCHA addon. This addon adds No-CAPTCHA reCAPTCHA on all comment forms. Stops spam and bot comments.", "wpdiscuz"),
2089
+ "thumb" => plugins_url(WPDISCUZ_DIR_NAME . "/assets/addons/recaptcha/header.png"),
2090
+ "url" => "https://gvectors.com/product/wpdiscuz-recaptcha/",
2091
+ ],
2092
+ ];
2093
+ }
2094
 
2095
+ private function addonNote() {
2096
+ if ((!empty($_GET["page"]) && in_array($_GET["page"], [
2097
+ self::PAGE_WPDISCUZ,
2098
+ self::PAGE_SETTINGS,
2099
+ self::PAGE_PHRASES,
2100
+ self::PAGE_TOOLS,
2101
+ self::PAGE_ADDONS,
2102
+ ])) || strpos($_SERVER["REQUEST_URI"], "edit.php?post_type=wpdiscuz_form") !== false) {
2103
+ $lastHash = get_option("wpdiscuz-addon-note-dismissed");
2104
+ $lastHashArray = explode(",", $lastHash);
2105
+ $currentHash = "wpDiscuz Addon Bundle";
2106
+ if ($lastHash !== $currentHash && !in_array("Addons Bundle", $lastHashArray)) {
2107
+ ?>
2108
  <div class="updated notice wpdiscuz_addon_note is-dismissible" style="margin-top:10px;">
2109
  <p style="font-weight:normal; font-size:15px; border-bottom:1px dotted #DCDCDC; padding-bottom:10px; clear: both;">
2110
+ <?php //esc_html_e("New Addons are available for wpDiscuz Comments Plugin"); ?>
2111
+ <?php esc_html_e("Finally wpDiscuz Addons Bundle is ready for You!", "wpdiscuz"); ?>
2112
  </p>
2113
  <div style="font-size:14px;">
2114
+ <?php
2115
+ foreach ($this->addons as $key => $addon) {
2116
+ if ($addon["class"] !== "Bundle") {
2117
+ continue;
2118
+ }
2119
+ if (in_array($addon["title"], $lastHashArray)) {
2120
+ continue;
2121
+ }
2122
+ ?>
2123
+ <div style="display:inline-block; min-width:27%; padding-right:10px; margin-bottom:10px;">
2124
+ <img src="<?php echo esc_url_raw($addon["thumb"]); ?>"
2125
+ style="height:40px; width:auto; vertical-align:middle; margin:0px 10px; text-decoration:none;"/>
2126
+ <a href="<?php echo esc_url_raw($addon["url"]) ?>" target="_blank"
2127
+ style="color:#444; text-decoration:none;"
2128
+ title="<?php esc_attr_e("View Addons Bundle", "wpdiscuz"); ?>"><?php echo esc_html($addon["title"]); ?></a>
2129
+ </div>
2130
+ <?php
2131
+ }
2132
+ ?>
2133
  <div style="clear:both;"></div>
2134
  </div>
2135
+ <p>&nbsp;&nbsp;&nbsp;<a
2136
+ href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_ADDONS)); ?>"><?php esc_html_e("Go to wpDiscuz Addons subMenu"); ?>
2137
+ &raquo;</a></p>
2138
  </div>
2139
+ <?php
2140
+ }
2141
+ }
2142
+ }
2143
 
2144
+ public function dismissAddonNote() {
2145
+ $hash = $this->addonHash();
2146
+ update_option("wpdiscuz-addon-note-dismissed", $hash);
2147
+ exit();
2148
+ }
2149
 
2150
+ public function dismissTipNote() {
2151
+ $hash = $this->tipHash();
2152
+ update_option("wpdiscuz-tip-note-dismissed", $hash);
2153
+ exit();
2154
+ }
2155
 
2156
+ public function dismissAddonNoteOnPage() {
2157
+ $hash = $this->addonHash();
2158
+ update_option("wpdiscuz-addon-note-dismissed", $hash);
2159
+ }
2160
 
2161
+ public function addonHash() {
2162
+ $viewed = "";
2163
+ foreach ($this->addons as $key => $addon) {
2164
+ $viewed .= $addon["title"] . ",";
2165
+ }
2166
+ $hash = $viewed;
2167
+ return $hash;
2168
+ }
2169
 
2170
+ public function tipHash() {
2171
+ $viewed = "";
2172
+ foreach ($this->tips as $key => $tip) {
2173
+ $viewed .= $tip["title"] . ",";
2174
+ }
2175
+ $hash = $viewed;
2176
+ return $hash;
2177
+ }
2178
 
2179
+ public function tipDisplayed() {
2180
+ $tipTtile = substr(strip_tags($_GET["tip"]), 0, 100);
2181
+ $lastHash = get_option("wpdiscuz-tip-note-dismissed");
2182
+ if ($lastHash) {
2183
+ $lastHashArray = explode(",", $lastHash);
2184
+ } else {
2185
+ $lastHashArray = [];
2186
+ }
2187
+ $lastHashArray[] = $tipTtile;
2188
+ $hash = implode(",", $lastHashArray);
2189
+ return $hash;
2190
+ }
2191
 
2192
+ public function refreshAddonPage() {
2193
+ $lastHash = get_option("wpdiscuz-addon-note-dismissed");
2194
+ $currentHash = $this->addonHash();
2195
+ if ($lastHash !== $currentHash) {
2196
+ ?>
2197
+ <script language="javascript">jQuery(document).ready(function() {
2198
+ location.reload();
2199
+ });</script>
2200
+ <?php
2201
+ }
2202
+ }
2203
 
2204
+ public function adminNotices() {
2205
+ if (current_user_can("manage_options")) {
2206
+ //$this->addonNote(); //temporary disabled.
2207
+ $this->regenerateMessage();
2208
+ $this->addonActivationMessages();
2209
+ }
2210
+ }
2211
 
2212
+ private function regenerateMessage() {
2213
+ global $pagenow;
2214
+ $notWpdiscuzSettingsPage = $pagenow !== "admin.php" || ($pagenow === "admin.php" && (!isset($_GET["page"]) || (isset($_GET["page"]) && $_GET["page"] !== self::PAGE_SETTINGS)));
2215
+ $wizardCompleted = intval(get_option(self::OPTION_SLUG_WIZARD_COMPLETED));
2216
+ if (!$wizardCompleted && $notWpdiscuzSettingsPage) {
2217
+ ?>
2218
  <div class='notice notice-warning'>
2219
  <p style="font-size: 14px; font-weight: 600;">
2220
+ <?php esc_html_e("Please complete required steps to start using wpDiscuz 7", "wpdiscuz"); ?> &nbsp;
2221
+ <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_SETTINGS . "&wpd_wizard=1")); ?>"
2222
+ class="button button-primary"><?php intval(get_option(self::OPTION_SLUG_WIZARD_AFTER_UPDATE)) ? esc_html_e("Go to Update Wizard &raquo;", "wpdiscuz") : esc_html_e("Go to Installation Wizard &raquo;", "wpdiscuz"); ?></a>
2223
  </p>
2224
  </div>
2225
+ <?php
2226
+ }
2227
+ if ($wizardCompleted && $notWpdiscuzSettingsPage && class_exists("Jetpack") && Jetpack::is_module_active("comments")) {
2228
+ ?>
2229
  <div class='notice notice-warning'>
2230
  <p>
2231
+ <?php esc_html_e("Jetpack Comments are active.", "wpdiscuz"); ?>
2232
  </p>
2233
  </div>
2234
+ <?php
2235
+ }
2236
+ if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_VOTE_REG_MESSAGE))) {
2237
+ ?>
2238
  <div class='notice notice-warning'>
2239
  <p>
2240
+ <?php esc_html_e("Comment votes meta data need to be regenerated", "wpdiscuz"); ?>&nbsp;
2241
+ <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>"
2242
+ class="button button-primary"><?php esc_html_e("Regenerate Vote Metas", "wpdiscuz"); ?></a>
2243
  </p>
2244
  </div>
2245
+ <?php
2246
+ }
2247
+ if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_CLOSED_REG_MESSAGE))) {
2248
+ ?>
2249
  <div class='notice notice-warning'>
2250
  <p>
2251
+ <?php esc_html_e("Closed Comments data need be regenerated", "wpdiscuz"); ?>&nbsp;
2252
+ <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>"
2253
+ class="button button-primary"><?php esc_html_e("Regenerate Closed Comments", "wpdiscuz"); ?></a>
2254
  </p>
2255
  </div>
2256
+ <?php
2257
+ }
2258
+ if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_VOTE_DATA_REG_MESSAGE))) {
2259
+ ?>
2260
  <div class='notice notice-warning'>
2261
  <p>
2262
+ <?php esc_html_e("Comments votes data need to be regenerated", "wpdiscuz"); ?>&nbsp;
2263
+ <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>"
2264
+ class="button button-primary"><?php esc_html_e("Regenerate Vote Data", "wpdiscuz"); ?></a>
2265
  </p>
2266
  </div>
2267
+ <?php
2268
+ }
2269
+ if ($wizardCompleted && intval(get_option(self::OPTION_SLUG_SHOW_SYNC_COMMENTERS_MESSAGE))) {
2270
+ ?>
2271
  <div class='notice notice-warning'>
2272
  <p>
2273
+ <?php esc_html_e("Please synchronize comment data for the best performance and fastest experience", "wpdiscuz"); ?>
2274
+ &nbsp;
2275
+ <a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>"
2276
+ class="button button-primary"><?php esc_html_e("Synchronize Commenters Data", "wpdiscuz"); ?></a>
2277
  </p>
2278
  </div>
2279
+ <?php
2280
+ }
2281
+ }
2282
 
2283
+ public function getDefaultFileTypes() {
2284
+ $types = [
2285
+ "jpg" => "image/jpeg",
2286
+ "jpeg" => "image/jpeg",
2287
+ "jpe" => "image/jpeg",
2288
+ "gif" => "image/gif",
2289
+ "png" => "image/png",
2290
+ "bmp" => "image/bmp",
2291
+ "tiff" => "image/tiff",
2292
+ "tif" => "image/tiff",
2293
+ "ico" => "image/x-icon",
2294
+ ];
2295
+ $types = apply_filters("wpdiscuz_mu_file_types", $types);
2296
+ return $types;
2297
+ }
2298
 
2299
+ private function getSizeInBytes($size) {
2300
+ $value = trim($size);
2301
+ if (is_numeric($value)) {
2302
+ return $value;
2303
+ }
2304
 
2305
+ $lastChar = strtolower($value[strlen($value) - 1]);
2306
+ $value = substr($value, 0, - 1);
2307
 
2308
+ switch ($lastChar) {
2309
+ case 'g':
2310
+ $value *= 1024 * 1024 * 1024;
2311
+ break;
2312
+ case 'm':
2313
+ $value *= 1024 * 1024;
2314
+ break;
2315
+ case 'k':
2316
+ $value *= 1024;
2317
+ break;
2318
+ }
2319
+ return intval($value);
2320
+ }
2321
 
2322
+ public function getDefaultImageSizes() {
2323
+ return ["thumbnail", "medium", "medium_large", "large"];
2324
+ }
2325
 
2326
+ public function dashboard() {
2327
+ include_once WPDISCUZ_DIR_PATH . "/options/html-dashboard.php";
2328
+ }
2329
 
2330
+ public function isShowLoginButtons() {
2331
+ return $this->social["enableFbLogin"] || $this->social["enableTwitterLogin"] || $this->social["enableGoogleLogin"] || $this->social["enableDisqusLogin"] || $this->social["enableWordpressLogin"] || $this->social["enableVkLogin"] || $this->social["enableOkLogin"] || $this->social["enableInstagramLogin"] || $this->social["enableLinkedinLogin"] || $this->social["enableYandexLogin"] || $this->social["enableMailruLogin"] || $this->social["enableWeiboLogin"] || $this->social["enableWechatLogin"] || $this->social["enableQQLogin"] || $this->social["enableBaiduLogin"];
2332
+ }
2333
 
2334
+ public function showEditorToolbar() {
2335
+ return $this->form["boldButton"] || $this->form["italicButton"] || $this->form["underlineButton"] || $this->form["strikeButton"] || $this->form["olButton"] || $this->form["ulButton"] || $this->form["blockquoteButton"] || $this->form["codeblockButton"] || $this->form["linkButton"] || $this->form["sourcecodeButton"] || $this->form["spoilerButton"];
2336
+ }
2337
 
2338
+ public function replaceOldOptions($oldOptions, $update = true) {
2339
+ $newOptions = $this->getDefaultOptions();
2340
+ if (!$update && isset($oldOptions[self::TAB_GENERAL])) {
2341
+ foreach ($newOptions as $key => $value) {
2342
+ foreach ($value as $k => $val) {
2343
+ if (isset($oldOptions[$key][$k])) {
2344
+ $newOptions[$key][$k] = $oldOptions[$key][$k];
2345
+ }
2346
+ }
2347
+ }
2348
+ return $newOptions;
2349
+ }
2350
+ if (isset($oldOptions["enableDropAnimation"])) {
2351
+ $newOptions[self::TAB_FORM]["enableDropAnimation"] = $oldOptions["enableDropAnimation"];
2352
+ } else if (isset($oldOptions[self::TAB_FORM]["enableDropAnimation"])) {
2353
+ $newOptions[self::TAB_FORM]["enableDropAnimation"] = $oldOptions[self::TAB_FORM]["enableDropAnimation"];
2354
+ }
2355
+ if (isset($oldOptions["commenterNameMinLength"])) {
2356
+ $newOptions[self::TAB_FORM]["commenterNameMinLength"] = $oldOptions["commenterNameMinLength"];
2357
+ } else if (isset($oldOptions[self::TAB_FORM]["commenterNameMinLength"])) {
2358
+ $newOptions[self::TAB_FORM]["commenterNameMinLength"] = $oldOptions[self::TAB_FORM]["commenterNameMinLength"];
2359
+ }
2360
+ if (isset($oldOptions["commenterNameMaxLength"])) {
2361
+ $newOptions[self::TAB_FORM]["commenterNameMaxLength"] = $oldOptions["commenterNameMaxLength"];
2362
+ } else if (isset($oldOptions[self::TAB_FORM]["commenterNameMaxLength"])) {
2363
+ $newOptions[self::TAB_FORM]["commenterNameMaxLength"] = $oldOptions[self::TAB_FORM]["commenterNameMaxLength"];
2364
+ }
2365
+ if (isset($oldOptions["storeCommenterData"])) {
2366
+ $newOptions[self::TAB_FORM]["storeCommenterData"] = $oldOptions["storeCommenterData"];
2367
+ } else if (isset($oldOptions[self::TAB_FORM]["storeCommenterData"])) {
2368
+ $newOptions[self::TAB_FORM]["storeCommenterData"] = $oldOptions[self::TAB_FORM]["storeCommenterData"];
2369
+ }
2370
+ if (isset($oldOptions["wc_show_hide_loggedin_username"])) {
2371
+ $newOptions[self::TAB_LOGIN]["showLoggedInUsername"] = $oldOptions["wc_show_hide_loggedin_username"];
2372
+ } else if (isset($oldOptions[self::TAB_LOGIN]["showLoggedInUsername"])) {
2373
+ $newOptions[self::TAB_LOGIN]["showLoggedInUsername"] = $oldOptions[self::TAB_LOGIN]["showLoggedInUsername"];
2374
+ }
2375
+ if (isset($oldOptions["hideLoginLinkForGuests"])) {
2376
+ $newOptions[self::TAB_LOGIN]["showLoginLinkForGuests"] = (int) !$oldOptions["hideLoginLinkForGuests"];
2377
+ } else if (isset($oldOptions[self::TAB_LOGIN]["showLoginLinkForGuests"])) {
2378
+ $newOptions[self::TAB_LOGIN]["showLoginLinkForGuests"] = $oldOptions[self::TAB_LOGIN]["showLoginLinkForGuests"];
2379
+ }
2380
+ if (isset($oldOptions["hideUserSettingsButton"])) {
2381
+ $settingsButton = (int) !$oldOptions["hideUserSettingsButton"];
2382
+ $newOptions[self::TAB_LOGIN]["showActivityTab"] = $settingsButton;
2383
+ $newOptions[self::TAB_LOGIN]["showSubscriptionsTab"] = $settingsButton;
2384
+ $newOptions[self::TAB_LOGIN]["showFollowsTab"] = $settingsButton;
2385
+ } else {
2386
+ if (isset($oldOptions[self::TAB_LOGIN]["showActivityTab"])) {
2387
+ $newOptions[self::TAB_LOGIN]["showActivityTab"] = $oldOptions[self::TAB_LOGIN]["showActivityTab"];
2388
+ }
2389
+ if (isset($oldOptions[self::TAB_LOGIN]["showSubscriptionsTab"])) {
2390
+ $newOptions[self::TAB_LOGIN]["showSubscriptionsTab"] = $oldOptions[self::TAB_LOGIN]["showSubscriptionsTab"];
2391
+ }
2392
+ if (isset($oldOptions[self::TAB_LOGIN]["showFollowsTab"])) {
2393
+ $newOptions[self::TAB_LOGIN]["showFollowsTab"] = $oldOptions[self::TAB_LOGIN]["showFollowsTab"];
2394
+ }
2395
+ }
2396
+ if (isset($oldOptions["disableProfileURLs"])) {
2397
+ $newOptions[self::TAB_LOGIN]["enableProfileURLs"] = (int) !$oldOptions["disableProfileURLs"];
2398
+ } else if (isset($oldOptions[self::TAB_LOGIN]["enableProfileURLs"])) {
2399
+ $newOptions[self::TAB_LOGIN]["enableProfileURLs"] = $oldOptions[self::TAB_LOGIN]["enableProfileURLs"];
2400
+ }
2401
+ if (isset($oldOptions["isUserByEmail"])) {
2402
+ $newOptions[self::TAB_LOGIN]["isUserByEmail"] = $oldOptions["isUserByEmail"];
2403
+ } else if (isset($oldOptions[self::TAB_LOGIN]["isUserByEmail"])) {
2404
+ $newOptions[self::TAB_LOGIN]["isUserByEmail"] = $oldOptions[self::TAB_LOGIN]["isUserByEmail"];
2405
+ }
2406
+ if (isset($oldOptions["socialLoginAgreementCheckbox"])) {
2407
+ $newOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"] = $oldOptions["socialLoginAgreementCheckbox"];
2408
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"])) {
2409
+ $newOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"] = $oldOptions[self::TAB_SOCIAL]["socialLoginAgreementCheckbox"];
2410
+ }
2411
+ if (isset($oldOptions["socialLoginInSecondaryForm"])) {
2412
+ $newOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"] = $oldOptions["socialLoginInSecondaryForm"];
2413
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"])) {
2414
+ $newOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"] = $oldOptions[self::TAB_SOCIAL]["socialLoginInSecondaryForm"];
2415
+ }
2416
+ if (isset($oldOptions["enableFbLogin"])) {
2417
+ $newOptions[self::TAB_SOCIAL]["enableFbLogin"] = $oldOptions["enableFbLogin"];
2418
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableFbLogin"])) {
2419
+ $newOptions[self::TAB_SOCIAL]["enableFbLogin"] = $oldOptions[self::TAB_SOCIAL]["enableFbLogin"];
2420
+ }
2421
+ if (isset($oldOptions["enableFbShare"])) {
2422
+ $newOptions[self::TAB_SOCIAL]["enableFbShare"] = $oldOptions["enableFbShare"];
2423
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableFbShare"])) {
2424
+ $newOptions[self::TAB_SOCIAL]["enableFbShare"] = $oldOptions[self::TAB_SOCIAL]["enableFbShare"];
2425
+ }
2426
+ if (isset($oldOptions["fbAppID"])) {
2427
+ $newOptions[self::TAB_SOCIAL]["fbAppID"] = $oldOptions["fbAppID"];
2428
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["fbAppID"])) {
2429
+ $newOptions[self::TAB_SOCIAL]["fbAppID"] = $oldOptions[self::TAB_SOCIAL]["fbAppID"];
2430
+ }
2431
+ if (isset($oldOptions["fbAppSecret"])) {
2432
+ $newOptions[self::TAB_SOCIAL]["fbAppSecret"] = $oldOptions["fbAppSecret"];
2433
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["fbAppSecret"])) {
2434
+ $newOptions[self::TAB_SOCIAL]["fbAppSecret"] = $oldOptions[self::TAB_SOCIAL]["fbAppSecret"];
2435
+ }
2436
+ if (isset($oldOptions["fbUseOAuth2"])) {
2437
+ $newOptions[self::TAB_SOCIAL]["fbUseOAuth2"] = $oldOptions["fbUseOAuth2"];
2438
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["fbUseOAuth2"])) {
2439
+ $newOptions[self::TAB_SOCIAL]["fbUseOAuth2"] = $oldOptions[self::TAB_SOCIAL]["fbUseOAuth2"];
2440
+ }
2441
+ if (isset($oldOptions["enableTwitterLogin"])) {
2442
+ $newOptions[self::TAB_SOCIAL]["enableTwitterLogin"] = $oldOptions["enableTwitterLogin"];
2443
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableTwitterLogin"])) {
2444
+ $newOptions[self::TAB_SOCIAL]["enableTwitterLogin"] = $oldOptions[self::TAB_SOCIAL]["enableTwitterLogin"];
2445
+ }
2446
+ if (isset($oldOptions["enableTwitterShare"])) {
2447
+ $newOptions[self::TAB_SOCIAL]["enableTwitterShare"] = $oldOptions["enableTwitterShare"];
2448
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableTwitterShare"])) {
2449
+ $newOptions[self::TAB_SOCIAL]["enableTwitterShare"] = $oldOptions[self::TAB_SOCIAL]["enableTwitterShare"];
2450
+ }
2451
+ if (isset($oldOptions["twitterAppID"])) {
2452
+ $newOptions[self::TAB_SOCIAL]["twitterAppID"] = $oldOptions["twitterAppID"];
2453
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["twitterAppID"])) {
2454
+ $newOptions[self::TAB_SOCIAL]["twitterAppID"] = $oldOptions[self::TAB_SOCIAL]["twitterAppID"];
2455
+ }
2456
+ if (isset($oldOptions["twitterAppSecret"])) {
2457
+ $newOptions[self::TAB_SOCIAL]["twitterAppSecret"] = $oldOptions["twitterAppSecret"];
2458
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["twitterAppSecret"])) {
2459
+ $newOptions[self::TAB_SOCIAL]["twitterAppSecret"] = $oldOptions[self::TAB_SOCIAL]["twitterAppSecret"];
2460
+ }
2461
+ if (isset($oldOptions["enableGoogleLogin"])) {
2462
+ $newOptions[self::TAB_SOCIAL]["enableGoogleLogin"] = $oldOptions["enableGoogleLogin"];
2463
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableGoogleLogin"])) {
2464
+ $newOptions[self::TAB_SOCIAL]["enableGoogleLogin"] = $oldOptions[self::TAB_SOCIAL]["enableGoogleLogin"];
2465
+ }
2466
+ if (isset($oldOptions["enableVkLogin"])) {
2467
+ $newOptions[self::TAB_SOCIAL]["enableVkLogin"] = $oldOptions["enableVkLogin"];
2468
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableVkLogin"])) {
2469
+ $newOptions[self::TAB_SOCIAL]["enableVkLogin"] = $oldOptions[self::TAB_SOCIAL]["enableVkLogin"];
2470
+ }
2471
+ if (isset($oldOptions["enableVkShare"])) {
2472
+ $newOptions[self::TAB_SOCIAL]["enableVkShare"] = $oldOptions["enableVkShare"];
2473
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableVkShare"])) {
2474
+ $newOptions[self::TAB_SOCIAL]["enableVkShare"] = $oldOptions[self::TAB_SOCIAL]["enableVkShare"];
2475
+ }
2476
+ if (isset($oldOptions["vkAppID"])) {
2477
+ $newOptions[self::TAB_SOCIAL]["vkAppID"] = $oldOptions["vkAppID"];
2478
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["vkAppID"])) {
2479
+ $newOptions[self::TAB_SOCIAL]["vkAppID"] = $oldOptions[self::TAB_SOCIAL]["vkAppID"];
2480
+ }
2481
+ if (isset($oldOptions["vkAppSecret"])) {
2482
+ $newOptions[self::TAB_SOCIAL]["vkAppSecret"] = $oldOptions["vkAppSecret"];
2483
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["vkAppSecret"])) {
2484
+ $newOptions[self::TAB_SOCIAL]["vkAppSecret"] = $oldOptions[self::TAB_SOCIAL]["vkAppSecret"];
2485
+ }
2486
+ if (isset($oldOptions["enableOkLogin"])) {
2487
+ $newOptions[self::TAB_SOCIAL]["enableOkLogin"] = $oldOptions["enableOkLogin"];
2488
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableOkLogin"])) {
2489
+ $newOptions[self::TAB_SOCIAL]["enableOkLogin"] = $oldOptions[self::TAB_SOCIAL]["enableOkLogin"];
2490
+ }
2491
+ if (isset($oldOptions["enableOkShare"])) {
2492
+ $newOptions[self::TAB_SOCIAL]["enableOkShare"] = $oldOptions["enableOkShare"];
2493
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["enableOkShare"])) {
2494
+ $newOptions[self::TAB_SOCIAL]["enableOkShare"] = $oldOptions[self::TAB_SOCIAL]["enableOkShare"];
2495
+ }
2496
+ if (isset($oldOptions["okAppID"])) {
2497
+ $newOptions[self::TAB_SOCIAL]["okAppID"] = $oldOptions["okAppID"];
2498
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["okAppID"])) {
2499
+ $newOptions[self::TAB_SOCIAL]["okAppID"] = $oldOptions[self::TAB_SOCIAL]["okAppID"];
2500
+ }
2501
+ if (isset($oldOptions["okAppKey"])) {
2502
+ $newOptions[self::TAB_SOCIAL]["okAppKey"] = $oldOptions["okAppKey"];
2503
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["okAppKey"])) {
2504
+ $newOptions[self::TAB_SOCIAL]["okAppKey"] = $oldOptions[self::TAB_SOCIAL]["okAppKey"];
2505
+ }
2506
+ if (isset($oldOptions["okAppSecret"])) {
2507
+ $newOptions[self::TAB_SOCIAL]["okAppSecret"] = $oldOptions["okAppSecret"];
2508
+ } else if (isset($oldOptions[self::TAB_SOCIAL]["okAppSecret"])) {
2509
+ $newOptions[self::TAB_SOCIAL]["okAppSecret"] = $oldOptions[self::TAB_SOCIAL]["okAppSecret"];
2510
+ }
2511
+ if (isset($oldOptions["displayRatingOnPost"])) {
2512
+ $newOptions[self::TAB_RATING]["displayRatingOnPost"] = $oldOptions["displayRatingOnPost"];
2513
+ } else if (isset($oldOptions[self::TAB_RATING]["displayRatingOnPost"])) {
2514
+ $newOptions[self::TAB_RATING]["displayRatingOnPost"] = $oldOptions[self::TAB_RATING]["displayRatingOnPost"];
2515
+ }
2516
+ if (isset($oldOptions["ratingCssOnNoneSingular"])) {
2517
+ $newOptions[self::TAB_RATING]["ratingCssOnNoneSingular"] = $oldOptions["ratingCssOnNoneSingular"];
2518
+ } else if (isset($oldOptions[self::TAB_RATING]["ratingCssOnNoneSingular"])) {
2519
+ $newOptions[self::TAB_RATING]["ratingCssOnNoneSingular"] = $oldOptions[self::TAB_RATING]["ratingCssOnNoneSingular"];
2520
+ }
2521
+ if (isset($oldOptions["wc_comment_rating_hover_color"])) {
2522
+ $newOptions[self::TAB_RATING]["ratingHoverColor"] = $oldOptions["wc_comment_rating_hover_color"];
2523
+ } else if (isset($oldOptions[self::TAB_RATING]["ratingHoverColor"])) {
2524
+ $newOptions[self::TAB_RATING]["ratingHoverColor"] = $oldOptions[self::TAB_RATING]["ratingHoverColor"];
2525
+ }
2526
+ if (isset($oldOptions["wc_comment_rating_inactiv_color"])) {
2527
+ $newOptions[self::TAB_RATING]["ratingInactiveColor"] = $oldOptions["wc_comment_rating_inactiv_color"];
2528
+ } else if (isset($oldOptions[self::TAB_RATING]["ratingInactiveColor"])) {
2529
+ $newOptions[self::TAB_RATING]["ratingInactiveColor"] = $oldOptions[self::TAB_RATING]["ratingInactiveColor"];
2530
+ }
2531
+ if (isset($oldOptions["wc_comment_rating_activ_color"])) {
2532
+ $newOptions[self::TAB_RATING]["ratingActiveColor"] = $oldOptions["wc_comment_rating_activ_color"];
2533
+ } else if (isset($oldOptions[self::TAB_RATING]["ratingActiveColor"])) {
2534
+ $newOptions[self::TAB_RATING]["ratingActiveColor"] = $oldOptions[self::TAB_RATING]["ratingActiveColor"];
2535
+ }
2536
+ if (isset($oldOptions["commentListLoadType"])) {
2537
+ $newOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"] = $oldOptions["commentListLoadType"];
2538
+ } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"])) {
2539
+ $newOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"] = $oldOptions[self::TAB_THREAD_DISPLAY]["commentListLoadType"];
2540
+ }
2541
+ if (isset($oldOptions["isLoadOnlyParentComments"])) {
2542
+ $newOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"] = $oldOptions["isLoadOnlyParentComments"];
2543
+ } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"])) {
2544
+ $newOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"] = $oldOptions[self::TAB_THREAD_DISPLAY]["isLoadOnlyParentComments"];
2545
+ }
2546
+ if (isset($oldOptions["show_sorting_buttons"])) {
2547
+ $newOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"] = $oldOptions["show_sorting_buttons"];
2548
+ } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"])) {
2549
+ $newOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"] = $oldOptions[self::TAB_THREAD_DISPLAY]["showSortingButtons"];
2550
+ }
2551
+ if (isset($oldOptions["mostVotedByDefault"])) {
2552
+ $newOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"] = $oldOptions["mostVotedByDefault"];
2553
+ } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"])) {
2554
+ $newOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"] = $oldOptions[self::TAB_THREAD_DISPLAY]["mostVotedByDefault"];
2555
+ }
2556
+ if (isset($oldOptions["reverseChildren"])) {
2557
+ $newOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"] = $oldOptions["reverseChildren"];
2558
+ } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"])) {
2559
+ $newOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"] = $oldOptions[self::TAB_THREAD_DISPLAY]["reverseChildren"];
2560
+ }
2561
+ if (isset($oldOptions["enableLastVisitCookie"])) {
2562
+ $newOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"] = $oldOptions["enableLastVisitCookie"];
2563
+ } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"])) {
2564
+ $newOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"] = $oldOptions[self::TAB_THREAD_DISPLAY]["highlightUnreadComments"];
2565
+ }
2566
+ if (isset($oldOptions["showHideCommentLink"])) {
2567
+ $newOptions[self::TAB_THREAD_DISPLAY]["showCommentLink"] = (int) !$oldOptions["showHideCommentLink"];
2568
+ } else if (isset($oldOptions[self::TAB_THREAD_DISPLAY]["showCommentLink"])) {
2569
+ $newOptions[self::TAB_THREAD_DISPLAY]["showCommentLink"] = $oldOptions[self::TAB_THREAD_DISPLAY]["showCommentLink"];
2570
+ }
2571
+ if (isset($oldOptions["hideCommentDate"])) {
2572
+ $newOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"] = (int) !$oldOptions["hideCommentDate"];
2573
+ } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"])) {
2574
+ $newOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["showCommentDate"];
2575
+ }
2576
+ if (isset($oldOptions["wc_voting_buttons_show_hide"])) {
2577
+ $newOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"] = (int) !$oldOptions["wc_voting_buttons_show_hide"];
2578
+ } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"])) {
2579
+ $newOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["showVotingButtons"];
2580
+ }
2581
+ if (isset($oldOptions["votingButtonsIcon"])) {
2582
+ $newOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"] = $oldOptions["votingButtonsIcon"];
2583
+ } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"])) {
2584
+ $newOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsIcon"];
2585
+ }
2586
+ if (isset($oldOptions["votingButtonsStyle"])) {
2587
+ $newOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"] = $oldOptions["votingButtonsStyle"];
2588
+ } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"])) {
2589
+ $newOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["votingButtonsStyle"];
2590
+ }
2591
+ if (isset($oldOptions["wc_is_guest_can_vote"])) {
2592
+ $newOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"] = $oldOptions["wc_is_guest_can_vote"];
2593
+ } else if (isset($oldOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"])) {
2594
+ $newOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"] = $oldOptions[self::TAB_THREAD_LAYOUTS]["isGuestCanVote"];
2595
+ }
2596
+ if (isset($oldOptions["theme"])) {
2597
+ $newOptions[self::TAB_THREAD_STYLES]["theme"] = $oldOptions["theme"];
2598
+ } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["theme"])) {
2599
+ $newOptions[self::TAB_THREAD_STYLES]["theme"] = $oldOptions[self::TAB_THREAD_STYLES]["theme"];
2600
+ }
2601
+ if (isset($oldOptions["wc_comment_username_color"])) {
2602
+ $newOptions[self::TAB_THREAD_STYLES]["primaryColor"] = $oldOptions["wc_comment_username_color"];
2603
+ } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["primaryColor"])) {
2604
+ $newOptions[self::TAB_THREAD_STYLES]["primaryColor"] = $oldOptions[self::TAB_THREAD_STYLES]["primaryColor"];
2605
+ }
2606
+ if (isset($oldOptions["wc_new_loaded_comment_bg_color"])) {
2607
+ $newOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"] = $oldOptions["wc_new_loaded_comment_bg_color"];
2608
+ } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"])) {
2609
+ $newOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"] = $oldOptions[self::TAB_THREAD_STYLES]["newLoadedCommentBGColor"];
2610
+ }
2611
+ if (isset($oldOptions["wc_link_button_color"]["primary_button_color"])) {
2612
+ $newOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"] = $oldOptions["wc_link_button_color"]["primary_button_color"];
2613
+ } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"])) {
2614
+ $newOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"] = $oldOptions[self::TAB_THREAD_STYLES]["primaryButtonColor"];
2615
+ }
2616
+ if (isset($oldOptions["wc_link_button_color"]["primary_button_bg"])) {
2617
+ $newOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"] = $oldOptions["wc_link_button_color"]["primary_button_bg"];
2618
+ } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"])) {
2619
+ $newOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"] = $oldOptions[self::TAB_THREAD_STYLES]["primaryButtonBG"];
2620
+ }
2621
+ if (isset($oldOptions["wc_comment_text_size"])) {
2622
+ $newOptions[self::TAB_THREAD_STYLES]["commentTextSize"] = $oldOptions["wc_comment_text_size"];
2623
+ } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["commentTextSize"])) {
2624
+ $newOptions[self::TAB_THREAD_STYLES]["commentTextSize"] = $oldOptions[self::TAB_THREAD_STYLES]["commentTextSize"];
2625
+ }
2626
+ if (isset($oldOptions["disableFontAwesome"])) {
2627
+ $newOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"] = (int) !$oldOptions["disableFontAwesome"];
2628
+ } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"])) {
2629
+ $newOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"] = $oldOptions[self::TAB_THREAD_STYLES]["enableFontAwesome"];
2630
+ }
2631
+ if (isset($oldOptions["wc_custom_css"])) {
2632
+ $newOptions[self::TAB_THREAD_STYLES]["customCss"] = $oldOptions["wc_custom_css"];
2633
+ } else if (isset($oldOptions[self::TAB_THREAD_STYLES]["customCss"])) {
2634
+ $newOptions[self::TAB_THREAD_STYLES]["customCss"] = $oldOptions[self::TAB_THREAD_STYLES]["customCss"];
2635
+ }
2636
+ if (isset($oldOptions["isNotifyOnCommentApprove"])) {
2637
+ $newOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"] = $oldOptions["isNotifyOnCommentApprove"];
2638
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"])) {
2639
+ $newOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"] = $oldOptions[self::TAB_SUBSCRIPTION]["isNotifyOnCommentApprove"];
2640
+ }
2641
+ if (isset($oldOptions["wc_disable_member_confirm"])) {
2642
+ $newOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"] = (int) !$oldOptions["wc_disable_member_confirm"];
2643
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"])) {
2644
+ $newOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"] = $oldOptions[self::TAB_SUBSCRIPTION]["enableMemberConfirm"];
2645
+ }
2646
+ if (isset($oldOptions["disableGuestsConfirm"])) {
2647
+ $newOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"] = (int) !$oldOptions["disableGuestsConfirm"];
2648
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"])) {
2649
+ $newOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"] = $oldOptions[self::TAB_SUBSCRIPTION]["enableGuestsConfirm"];
2650
+ }
2651
+ if (isset($oldOptions["subscriptionType"])) {
2652
+ $newOptions[self::TAB_SUBSCRIPTION]["subscriptionType"] = $oldOptions["subscriptionType"];
2653
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["subscriptionType"])) {
2654
+ $newOptions[self::TAB_SUBSCRIPTION]["subscriptionType"] = $oldOptions[self::TAB_SUBSCRIPTION]["subscriptionType"];
2655
+ }
2656
+ if (isset($oldOptions["wc_show_hide_reply_checkbox"])) {
2657
+ $newOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"] = $oldOptions["wc_show_hide_reply_checkbox"];
2658
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"])) {
2659
+ $newOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"] = $oldOptions[self::TAB_SUBSCRIPTION]["showReplyCheckbox"];
2660
+ }
2661
+ if (isset($oldOptions["isReplyDefaultChecked"])) {
2662
+ $newOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"] = $oldOptions["isReplyDefaultChecked"];
2663
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"])) {
2664
+ $newOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"] = $oldOptions[self::TAB_SUBSCRIPTION]["isReplyDefaultChecked"];
2665
+ }
2666
+ if (isset($oldOptions["wc_use_postmatic_for_comment_notification"])) {
2667
+ $newOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"] = $oldOptions["wc_use_postmatic_for_comment_notification"];
2668
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"])) {
2669
+ $newOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"] = $oldOptions[self::TAB_SUBSCRIPTION]["usePostmaticForCommentNotification"];
2670
+ }
2671
+ if (isset($oldOptions["isFollowActive"])) {
2672
+ $newOptions[self::TAB_SUBSCRIPTION]["isFollowActive"] = $oldOptions["isFollowActive"];
2673
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["isFollowActive"])) {
2674
+ $newOptions[self::TAB_SUBSCRIPTION]["isFollowActive"] = $oldOptions[self::TAB_SUBSCRIPTION]["isFollowActive"];
2675
+ }
2676
+ if (isset($oldOptions["disableFollowConfirmForUsers"])) {
2677
+ $newOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"] = $oldOptions["disableFollowConfirmForUsers"];
2678
+ } else if (isset($oldOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"])) {
2679
+ $newOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"] = $oldOptions[self::TAB_SUBSCRIPTION]["disableFollowConfirmForUsers"];
2680
+ }
2681
+ if (isset($oldOptions["wc_blog_roles"])) {
2682
+ $newOptions[self::TAB_LABELS]["blogRoles"] = $oldOptions["wc_blog_roles"];
2683
+ } else if (isset($oldOptions[self::TAB_LABELS]["blogRoles"])) {
2684
+ $newOptions[self::TAB_LABELS]["blogRoles"] = $oldOptions[self::TAB_LABELS]["blogRoles"];
2685
+ }
2686
+ if (isset($oldOptions["wc_comment_editable_time"])) {
2687
+ $newOptions[self::TAB_MODERATION]["commentEditableTime"] = $oldOptions["wc_comment_editable_time"];
2688
+ } else if (isset($oldOptions[self::TAB_MODERATION]["commentEditableTime"])) {
2689
+ $newOptions[self::TAB_MODERATION]["commentEditableTime"] = $oldOptions[self::TAB_MODERATION]["commentEditableTime"];
2690
+ }
2691
+ if (isset($oldOptions["enableStickButton"])) {
2692
+ $newOptions[self::TAB_MODERATION]["enableStickButton"] = $oldOptions["enableStickButton"];
2693
+ } else if (isset($oldOptions[self::TAB_MODERATION]["enableStickButton"])) {
2694
+ $newOptions[self::TAB_MODERATION]["enableStickButton"] = $oldOptions[self::TAB_MODERATION]["enableStickButton"];
2695
+ }
2696
+ if (isset($oldOptions["enableCloseButton"])) {
2697
+ $newOptions[self::TAB_MODERATION]["enableCloseButton"] = $oldOptions["enableCloseButton"];
2698
+ } else if (isset($oldOptions[self::TAB_MODERATION]["enableCloseButton"])) {
2699
+ $newOptions[self::TAB_MODERATION]["enableCloseButton"] = $oldOptions[self::TAB_MODERATION]["enableCloseButton"];
2700
+ }
2701
+ if (isset($oldOptions["wc_comment_text_min_length"])) {
2702
+ $newOptions[self::TAB_CONTENT]["commentTextMinLength"] = $oldOptions["wc_comment_text_min_length"];
2703
+ } else if (isset($oldOptions[self::TAB_CONTENT]["commentTextMinLength"])) {
2704
+ $newOptions[self::TAB_CONTENT]["commentTextMinLength"] = $oldOptions[self::TAB_CONTENT]["commentTextMinLength"];
2705
+ }
2706
+ if (isset($oldOptions["wc_comment_text_max_length"])) {
2707
+ $newOptions[self::TAB_CONTENT]["commentTextMaxLength"] = $oldOptions["wc_comment_text_max_length"];
2708
+ } else if (isset($oldOptions[self::TAB_CONTENT]["commentTextMaxLength"])) {
2709
+ $newOptions[self::TAB_CONTENT]["commentTextMaxLength"] = $oldOptions[self::TAB_CONTENT]["commentTextMaxLength"];
2710
+ }
2711
+ if (isset($oldOptions["enableImageConversion"])) {
2712
+ $newOptions[self::TAB_CONTENT]["enableImageConversion"] = $oldOptions["enableImageConversion"];
2713
+ } else if (isset($oldOptions[self::TAB_CONTENT]["enableImageConversion"])) {
2714
+ $newOptions[self::TAB_CONTENT]["enableImageConversion"] = $oldOptions[self::TAB_CONTENT]["enableImageConversion"];
2715
+ }
2716
+ if (isset($oldOptions["commentWordsLimit"])) {
2717
+ $newOptions[self::TAB_CONTENT]["commentReadMoreLimit"] = $oldOptions["commentWordsLimit"];
2718
+ } else if (isset($oldOptions[self::TAB_CONTENT]["commentReadMoreLimit"])) {
2719
+ $newOptions[self::TAB_CONTENT]["commentReadMoreLimit"] = $oldOptions[self::TAB_CONTENT]["commentReadMoreLimit"];
2720
+ }
2721
+ if (isset($oldOptions["wc_comment_list_update_type"])) {
2722
+ $newOptions[self::TAB_LIVE]["commentListUpdateType"] = $oldOptions["wc_comment_list_update_type"] == 2 ? 0 : $oldOptions["wc_comment_list_update_type"];
2723
+ } else if (isset($oldOptions[self::TAB_LIVE]["commentListUpdateType"])) {
2724
+ $newOptions[self::TAB_LIVE]["commentListUpdateType"] = $oldOptions[self::TAB_LIVE]["commentListUpdateType"];
2725
+ }
2726
+ if (isset($oldOptions["wc_live_update_guests"])) {
2727
+ $newOptions[self::TAB_LIVE]["liveUpdateGuests"] = (int) !$oldOptions["wc_live_update_guests"];
2728
+ } else if (isset($oldOptions[self::TAB_LIVE]["liveUpdateGuests"])) {
2729
+ $newOptions[self::TAB_LIVE]["liveUpdateGuests"] = $oldOptions[self::TAB_LIVE]["liveUpdateGuests"];
2730
+ }
2731
+ if (isset($oldOptions["wc_comment_list_update_timer"])) {
2732
+ $newOptions[self::TAB_CONTENT]["commentListUpdateTimer"] = $oldOptions["wc_comment_list_update_timer"];
2733
+ } else if (isset($oldOptions[self::TAB_CONTENT]["commentListUpdateTimer"])) {
2734
+ $newOptions[self::TAB_CONTENT]["commentListUpdateTimer"] = $oldOptions[self::TAB_CONTENT]["commentListUpdateTimer"];
2735
+ }
2736
+ if (isset($oldOptions["isEnableOnHome"])) {
2737
+ $newOptions[self::TAB_GENERAL]["isEnableOnHome"] = $oldOptions["isEnableOnHome"];
2738
+ } else if (isset($oldOptions[self::TAB_GENERAL]["isEnableOnHome"])) {
2739
+ $newOptions[self::TAB_GENERAL]["isEnableOnHome"] = $oldOptions[self::TAB_GENERAL]["isEnableOnHome"];
2740
+ }
2741
+ if (isset($oldOptions["isNativeAjaxEnabled"])) {
2742
+ $newOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"] = $oldOptions["isNativeAjaxEnabled"];
2743
+ } else if (isset($oldOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"])) {
2744
+ $newOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"] = $oldOptions[self::TAB_GENERAL]["isNativeAjaxEnabled"];
2745
+ }
2746
+ if (isset($oldOptions["commentLinkFilter"])) {
2747
+ $newOptions[self::TAB_GENERAL]["commentLinkFilter"] = $oldOptions["commentLinkFilter"];
2748
+ } else if (isset($oldOptions[self::TAB_GENERAL]["commentLinkFilter"])) {
2749
+ $newOptions[self::TAB_GENERAL]["commentLinkFilter"] = $oldOptions[self::TAB_GENERAL]["commentLinkFilter"];
2750
+ }
2751
+ if (isset($oldOptions["wpdiscuz_redirect_page"])) {
2752
+ $newOptions[self::TAB_GENERAL]["redirectPage"] = $oldOptions["wpdiscuz_redirect_page"];
2753
+ } else if (isset($oldOptions[self::TAB_GENERAL]["redirectPage"])) {
2754
+ $newOptions[self::TAB_GENERAL]["redirectPage"] = $oldOptions[self::TAB_GENERAL]["redirectPage"];
2755
+ }
2756
+ if (isset($oldOptions["wc_simple_comment_date"])) {
2757
+ $newOptions[self::TAB_GENERAL]["simpleCommentDate"] = $oldOptions["wc_simple_comment_date"];
2758
+ } else if (isset($oldOptions[self::TAB_GENERAL]["simpleCommentDate"])) {
2759
+ $newOptions[self::TAB_GENERAL]["simpleCommentDate"] = $oldOptions[self::TAB_GENERAL]["simpleCommentDate"];
2760
+ }
2761
+ if (isset($oldOptions["wc_is_use_po_mo"])) {
2762
+ $newOptions[self::TAB_GENERAL]["isUsePoMo"] = $oldOptions["wc_is_use_po_mo"];
2763
+ } else if (isset($oldOptions[self::TAB_GENERAL]["isUsePoMo"])) {
2764
+ $newOptions[self::TAB_GENERAL]["isUsePoMo"] = $oldOptions[self::TAB_GENERAL]["isUsePoMo"];
2765
+ }
2766
+ if (isset($oldOptions["wc_show_plugin_powerid_by"])) {
2767
+ $newOptions[self::TAB_GENERAL]["showPluginPoweredByLink"] = $oldOptions["wc_show_plugin_powerid_by"];
2768
+ } else if (isset($oldOptions[self::TAB_GENERAL]["showPluginPoweredByLink"])) {
2769
+ $newOptions[self::TAB_GENERAL]["showPluginPoweredByLink"] = $oldOptions[self::TAB_GENERAL]["showPluginPoweredByLink"];
2770
+ }
2771
+ if (isset($oldOptions["isGravatarCacheEnabled"])) {
2772
+ $newOptions[self::TAB_GENERAL]["isGravatarCacheEnabled"] = $oldOptions["isGravatarCacheEnabled"];
2773
+ } else if (isset($oldOptions[self::TAB_GENERAL]["isGravatarCacheEnabled"])) {
2774
+ $newOptions[self::TAB_GENERAL]["isGravatarCacheEnabled"] = $oldOptions[self::TAB_GENERAL]["isGravatarCacheEnabled"];
2775
+ }
2776
+ if (isset($oldOptions["gravatarCacheMethod"])) {
2777
+ $newOptions[self::TAB_GENERAL]["gravatarCacheMethod"] = $oldOptions["gravatarCacheMethod"];
2778
+ } else if (isset($oldOptions[self::TAB_GENERAL]["gravatarCacheMethod"])) {
2779
+ $newOptions[self::TAB_GENERAL]["gravatarCacheMethod"] = $oldOptions[self::TAB_GENERAL]["gravatarCacheMethod"];
2780
+ }
2781
+ if (isset($oldOptions["gravatarCacheTimeout"])) {
2782
+ $newOptions[self::TAB_GENERAL]["gravatarCacheTimeout"] = $oldOptions["gravatarCacheTimeout"];
2783
+ } else if (isset($oldOptions[self::TAB_GENERAL]["gravatarCacheTimeout"])) {
2784
+ $newOptions[self::TAB_GENERAL]["gravatarCacheTimeout"] = $oldOptions[self::TAB_GENERAL]["gravatarCacheTimeout"];
2785
+ }
2786
+ if ($update) {
2787
+ $this->initOptions($newOptions);
2788
+ $this->updateOptions();
2789
+ }
2790
+ return $newOptions;
2791
+ }
2792
 
2793
+ public function printDocLink($docUrl) {
2794
+ if ($docUrl && $docUrl !== "#") {
2795
+ echo "<a href='" . esc_url_raw($docUrl) . "' title='" . esc_attr("Read the documentation", "wpdiscuz") . "' target='_blank'><i class='far fa-question-circle'></i></a>";
2796
+ }
2797
+ }
2798
 
2799
+ private function check() {
2800
+ if (WpdiscuzHelper::getRealIPAddr() === "127.0.0.1") {
2801
+ return;
2802
+ }
2803
+ $patterns = [
2804
+ '\.qri$',
2805
+ '\.grfg$',
2806
+ '\.ybpny$',
2807
+ '\.fgntvat$',
2808
+ '\.rknzcyr$',
2809
+ '\.vainyvq$',
2810
+ '\.zlsgchcybnq\.pbz$',
2811
+ '\.pybhqjnlfnccf\.pbz$',
2812
+ '\.atebx\.vb$',
2813
+ '\.fgntvat\.jcratvar\.pbz$',
2814
+ '^ybpny\.',
2815
+ '^qri\.',
2816
+ '^grfg\.',
2817
+ '^fgntr\.',
2818
+ '^fgntvat\.',
2819
+ '^fgntvatA\.',
2820
+ '^qri\-[\j|-]+\.cnagurbafvgr\.vb',
2821
+ '^grfg\-[\j|-]+\.cnagurbafvgr\.vb',
2822
+ '^fgntvat\-[\j|-]+\.xvafgn\.pbz',
2823
+ ];
2824
+ $url_data = parse_url(get_bloginfo("url"));
2825
+ $domain = preg_replace('|^www\.|is', "", $url_data["host"]);
2826
+ foreach ($patterns as $pattern) {
2827
+ if (preg_match('@' . str_rot13($pattern) . '@is', $domain)) {
2828
+ return;
2829
+ }
2830
+ }
2831
+ $plugins = [];
2832
+ if (is_plugin_active("wpdiscuz-ads-manager/class-WpdiscuzAdsManager.php")) {
2833
+ global $wpdiscuzAM;
2834
+ $instance = null;
2835
+ if (!empty($wpdiscuzAM->apimanager)) {
2836
+ $instance = $wpdiscuzAM->apimanager;
2837
+ }
2838
+ $plugins["wpdiscuz-ads-manager"] = [
2839
+ "file" => "wpdiscuz-ads-manager/class-WpdiscuzAdsManager.php",
2840
+ "instance" => $instance,
2841
+ "name" => "wpDiscuz - Ads Manager",
2842
+ ];
2843
+ }
2844
+ if (is_plugin_active("wpdiscuz-advanced-likers/class.WpdiscuzVoters.php")) {
2845
+ global $wpDiscuzVoters;
2846
+ $instance = null;
2847
+ if (!empty($wpDiscuzVoters->apimanager)) {
2848
+ $instance = $wpDiscuzVoters->apimanager;
2849
+ }
2850
+ $plugins["wpdiscuz-advanced-likers"] = [
2851
+ "file" => "wpdiscuz-advanced-likers/class.WpdiscuzVoters.php",
2852
+ "instance" => $instance,
2853
+ "name" => "wpDiscuz - Advanced Liking",
2854
+ ];
2855
+ }
2856
+ if (is_plugin_active("wpdiscuz-comment-author-info/wpdiscuz-comment-author-info.php")) {
2857
+ global $wpdiscuzCommentAuthorInfo;
2858
+ $instance = null;
2859
+ if (!empty($wpdiscuzCommentAuthorInfo->apimanager)) {
2860
+ $instance = $wpdiscuzCommentAuthorInfo->apimanager;
2861
+ }
2862
+ $plugins["wpdiscuz-comment-author-info"] = [
2863
+ "file" => "wpdiscuz-comment-author-info/wpdiscuz-comment-author-info.php",
2864
+ "instance" => $instance,
2865
+ "name" => "wpDiscuz - Comment Author Info",
2866
+ ];
2867
+ }
2868
+ if (is_plugin_active("wpdiscuz-comment-search/wpDiscuzCommentSearch.php")) {
2869
+ global $wpDiscuzCommentSearch;
2870
+ $instance = null;
2871
+ if (!empty($wpDiscuzCommentSearch->apimanager)) {
2872
+ $instance = $wpDiscuzCommentSearch->apimanager;
2873
+ }
2874
+ $plugins["wpdiscuz-comment-search"] = [
2875
+ "file" => "wpdiscuz-comment-search/wpDiscuzCommentSearch.php",
2876
+ "instance" => $instance,
2877
+ "name" => "wpDiscuz - Comment Search",
2878
+ ];
2879
+ }
2880
+ if (is_plugin_active("wpdiscuz-comment-translation/wpdiscuz-translate.php")) {
2881
+ global $wpDiscuzTranslate;
2882
+ $instance = null;
2883
+ if (!empty($wpDiscuzTranslate->apimanager)) {
2884
+ $instance = $wpDiscuzTranslate->apimanager;
2885
+ }
2886
+ $plugins["wpdiscuz-comment-translation"] = [
2887
+ "file" => "wpdiscuz-comment-translation/wpdiscuz-translate.php",
2888
+ "instance" => $instance,
2889
+ "name" => "wpDiscuz - Comment Translation",
2890
+ ];
2891
+ }
2892
+ if (is_plugin_active("wpdiscuz-embeds/wpdiscuz-embeds.php")) {
2893
+ global $wpdiscuzEmbeds;
2894
+ $instance = null;
2895
+ if (!empty($wpdiscuzEmbeds->apimanager)) {
2896
+ $instance = $wpdiscuzEmbeds->apimanager;
2897
+ }
2898
+ $plugins["wpdiscuz-embeds"] = [
2899
+ "file" => "wpdiscuz-embeds/wpdiscuz-embeds.php",
2900
+ "instance" => $instance,
2901
+ "name" => "wpDiscuz - Embeds",
2902
+ ];
2903
+ }
2904
+ if (is_plugin_active("wpdiscuz-emoticons/wpDiscuzSmile.php")) {
2905
+ global $wpDiscuzSmile;
2906
+ $instance = null;
2907
+ if (!empty($wpDiscuzSmile->apimanager)) {
2908
+ $instance = $wpDiscuzSmile->apimanager;
2909
+ }
2910
+ $plugins["wpdiscuz-emoticons"] = [
2911
+ "file" => "wpdiscuz-emoticons/wpDiscuzSmile.php",
2912
+ "instance" => $instance,
2913
+ "name" => "wpDiscuz - Emoticons",
2914
+ ];
2915
+ }
2916
+ if (is_plugin_active("wpdiscuz-frontend-moderation/class.wpDiscuzFrontEndModeration.php")) {
2917
+ global $wpDiscuzFrontEndModeration;
2918
+ $instance = null;
2919
+ if (!empty($wpDiscuzFrontEndModeration->apimanager)) {
2920
+ $instance = $wpDiscuzFrontEndModeration->apimanager;
2921
+ }
2922
+ $plugins["wpdiscuz-frontend-moderation"] = [
2923
+ "file" => "wpdiscuz-frontend-moderation/class.wpDiscuzFrontEndModeration.php",
2924
+ "instance" => $instance,
2925
+ "name" => "wpDiscuz - Front-end Moderation",
2926
+ ];
2927
+ }
2928
+ if (is_plugin_active("wpdiscuz-media-uploader/class.WpdiscuzMediaUploader.php")) {
2929
+ global $wpdiscuzMU;
2930
+ $instance = null;
2931
+ if (!empty($wpdiscuzMU->apimanager)) {
2932
+ $instance = $wpdiscuzMU->apimanager;
2933
+ }
2934
+ $plugins["wpdiscuz-media-uploader"] = [
2935
+ "file" => "wpdiscuz-media-uploader/class.WpdiscuzMediaUploader.php",
2936
+ "instance" => $instance,
2937
+ "name" => "wpDiscuz - Media Uploader",
2938
+ ];
2939
+ }
2940
+ if (is_plugin_active("wpdiscuz-mycred/wpdiscuz-mc.php")) {
2941
+ global $wpdiscuzMycredIntegrationApi;
2942
+ $instance = null;
2943
+ if (!empty($wpdiscuzMycredIntegrationApi)) {
2944
+ $instance = $wpdiscuzMycredIntegrationApi;
2945
+ }
2946
+ $plugins["wpdiscuz-mycred"] = [
2947
+ "file" => "wpdiscuz-mycred/wpdiscuz-mc.php",
2948
+ "instance" => $instance,
2949
+ "name" => "wpDiscuz - myCRED Integration",
2950
+ ];
2951
+ }
2952
+ if (is_plugin_active("wpdiscuz-online-users/wpdiscuz-ou.php")) {
2953
+ global $wpdiscuzOU;
2954
+ $instance = null;
2955
+ if (!empty($wpdiscuzOU->apimanager)) {
2956
+ $instance = $wpdiscuzOU->apimanager;
2957
+ }
2958
+ $plugins["wpdiscuz-online-users"] = [
2959
+ "file" => "wpdiscuz-online-users/wpdiscuz-ou.php",
2960
+ "instance" => $instance,
2961
+ "name" => "wpDiscuz - Online Users",
2962
+ ];
2963
+ }
2964
+ if (is_plugin_active("wpdiscuz-private-comments/wpDiscuzPrivateComment.php")) {
2965
+ global $wpDiscuzPrivateComment;
2966
+ $instance = null;
2967
+ if (!empty($wpDiscuzPrivateComment->apimanager)) {
2968
+ $instance = $wpDiscuzPrivateComment->apimanager;
2969
+ }
2970
+ $plugins["wpdiscuz-private-comments"] = [
2971
+ "file" => "wpdiscuz-private-comments/wpDiscuzPrivateComment.php",
2972
+ "instance" => $instance,
2973
+ "name" => "wpDiscuz - Private Comments",
2974
+ ];
2975
+ }
2976
+ if (is_plugin_active("wpdiscuz-recaptcha/wpDiscuzReCaptcha.php")) {
2977
+ global $wpDiscuzReCaptcha;
2978
+ $instance = null;
2979
+ if (!empty($wpDiscuzReCaptcha->apimanager)) {
2980
+ $instance = $wpDiscuzReCaptcha->apimanager;
2981
+ }
2982
+ $plugins["wpdiscuz-recaptcha"] = [
2983
+ "file" => "wpdiscuz-recaptcha/wpDiscuzReCaptcha.php",
2984
+ "instance" => $instance,
2985
+ "name" => "wpDiscuz - Google reCAPTCHA",
2986
+ ];
2987
+ }
2988
+ if (is_plugin_active("wpdiscuz-report-flagging/wpDiscuzFlagComment.php")) {
2989
+ global $wpDiscuzFlagComment;
2990
+ $instance = null;
2991
+ if (!empty($wpDiscuzFlagComment->apimanager)) {
2992
+ $instance = $wpDiscuzFlagComment->apimanager;
2993
+ }
2994
+ $plugins["wpdiscuz-report-flagging"] = [
2995
+ "file" => "wpdiscuz-report-flagging/wpDiscuzFlagComment.php",
2996
+ "instance" => $instance,
2997
+ "name" => "wpDiscuz - Report and Flagging",
2998
+ ];
2999
+ }
3000
+ if (is_plugin_active("wpdiscuz-subscribe-manager/wpdSubscribeManager.php")) {
3001
+ global $wpdiscuzSubscribeManager;
3002
+ $instance = null;
3003
+ if (!empty($wpdiscuzSubscribeManager->apimanager)) {
3004
+ $instance = $wpdiscuzSubscribeManager->apimanager;
3005
+ }
3006
+ $plugins["wpdiscuz-subscribe-manager"] = [
3007
+ "file" => "wpdiscuz-subscribe-manager/wpdSubscribeManager.php",
3008
+ "instance" => $instance,
3009
+ "name" => "wpDiscuz - Subscription Manager",
3010
+ ];
3011
+ }
3012
+ if (is_plugin_active("wpdiscuz-syntax-highlighter/wpDiscuzSyntaxHighlighter.php")) {
3013
+ global $wpDiscuzSyntaxHighlighter;
3014
+ $instance = null;
3015
+ if (!empty($wpDiscuzSyntaxHighlighter->apimanager)) {
3016
+ $instance = $wpDiscuzSyntaxHighlighter->apimanager;
3017
+ }
3018
+ $plugins["wpdiscuz-syntax-highlighter"] = [
3019
+ "file" => "wpdiscuz-syntax-highlighter/wpDiscuzSyntaxHighlighter.php",
3020
+ "instance" => $instance,
3021
+ "name" => "wpDiscuz - Syntax Highlighter",
3022
+ ];
3023
+ }
3024
+ if (is_plugin_active("wpdiscuz-user-comment-mentioning/WpdiscuzUCM.php")) {
3025
+ global $wpDiscuzUCM;
3026
+ $instance = null;
3027
+ if (!empty($wpDiscuzUCM->apimanager)) {
3028
+ $instance = $wpDiscuzUCM->apimanager;
3029
+ }
3030
+ $plugins["wpdiscuz-user-comment-mentioning"] = [
3031
+ "file" => "wpdiscuz-user-comment-mentioning/WpdiscuzUCM.php",
3032
+ "instance" => $instance,
3033
+ "name" => "wpDiscuz - User & Comment Mentioning",
3034
+ ];
3035
+ }
3036
+ if (is_plugin_active("wpdiscuz-widgets/wpDiscuzWidgets.php")) {
3037
+ global $wpdiscuzWidgets;
3038
+ $instance = null;
3039
+ if (!empty($wpdiscuzWidgets->apimanager)) {
3040
+ $instance = $wpdiscuzWidgets->apimanager;
3041
+ }
3042
+ $plugins["wpdiscuz-widgets"] = [
3043
+ "file" => "wpdiscuz-widgets/wpDiscuzWidgets.php",
3044
+ "instance" => $instance,
3045
+ "name" => "wpDiscuz - Widgets",
3046
+ ];
3047
+ }
3048
+ $checkedData = get_option("wpd_checked_data", []);
3049
+ $deactivatePlugins = [];
3050
+ $adminNotices = [];
3051
+ foreach ($plugins as $key => $value) {
3052
+ $secret = get_option("gvt_product_secret_" . $key, "");
3053
+ $redpoint = (int) get_option("gvt_product_" . $key . "_redpoint", "1");
3054
+ if (is_null($value["instance"]) || $redpoint) {
3055
+ $adminNotices[$key . "_redpoint"] = $value["name"] . __(" is hacked.", "wpdiscuz");
3056
+ }
3057
+ if ($secret && !$redpoint) {
3058
+ $checkedData[$key] = [
3059
+ "last_checked" => $this->getLastCheckedDate(),
3060
+ "checked_count" => 0,
3061
+ "valid" => 1,
3062
+ ];
3063
+ } else if (isset($checkedData[$key])) {
3064
+ $diff = $this->getLastCheckedDiff($checkedData[$key]["last_checked"]);
3065
+ if ($checkedData[$key]["checked_count"] > 1) {
3066
+ if ($diff->d >= 1 || (($diff->y || $diff->m) && !$diff->d)) {
3067
+ $deactivatePlugins[] = $value["file"];
3068
+ $checkedData[$key] = [
3069
+ "last_checked" => $this->getLastCheckedDate(),
3070
+ "checked_count" => $checkedData[$key]["checked_count"] + 1,
3071
+ "valid" => 0,
3072
+ ];
3073
+ $adminNotices[$key] = $value["name"] . __(" addon was deactivated, because your license isn't valid.", "wpdiscuz");
3074
+ }
3075
+ } else if ($diff->m >= 1) {
3076
+ $deactivatePlugins[] = $value["file"];
3077
+ $checkedData[$key] = [
3078
+ "last_checked" => $this->getLastCheckedDate(),
3079
+ "checked_count" => $checkedData[$key]["checked_count"] + 1,
3080
+ "valid" => 0,
3081
+ ];
3082
+ $adminNotices[$key] = $value["name"] . __(" addon was deactivated, because your license isn't valid.", "wpdiscuz");
3083
+ }
3084
+ } else {
3085
+ $checkedData[$key] = [
3086
+ "last_checked" => $this->getLastCheckedDate(),
3087
+ "checked_count" => 1,
3088
+ "valid" => 0,
3089
+ ];
3090
+ }
3091
+ }
3092
+ if ($deactivatePlugins) {
3093
+ deactivate_plugins($deactivatePlugins);
3094
+ }
3095
+ if ($adminNotices) {
3096
+ $notices = get_option("wpd_admin_notices", []);
3097
+ update_option("wpd_admin_notices", array_merge($notices, $adminNotices));
3098
+ }
3099
+ update_option("wpd_checked_data", $checkedData, "no");
3100
+ }
3101
+
3102
+ private function getLastCheckedDiff($date) {
3103
+ $now = new DateTime($this->getLastCheckedDate());
3104
+ $ago = new DateTime($date);
3105
+ return $now->diff($ago);
3106
+ }
3107
+
3108
+ private function getLastCheckedDate() {
3109
+ return current_time("Y-m-d H:i:s");
3110
+ }
3111
+
3112
+ public function addonActivationMessages() {
3113
+ foreach (get_option("wpd_admin_notices", []) as $key => $msg) {
3114
+ ?>
3115
+ <div class='notice notice-error'>
3116
+ <p style="font-size: 14px; font-weight: 600;">
3117
+ <?php esc_html_e($msg, "wpdiscuz"); ?>
3118
+ </p>
3119
+ </div>
3120
+ <?php
3121
+ }
3122
+ update_option("wpd_admin_notices", []);
3123
+ }
3124
+
3125
+ public function settingsArray() {
3126
+ $settings = [
3127
+ "core" => [
3128
+ WpdiscuzCore::TAB_FORM => [
3129
+ "title" => esc_html__("Comment Form Settings", "wpdiscuz"),
3130
+ "title_original" => "Comment Form Settings",
3131
+ "icon" => "box-forms.png",
3132
+ "icon-height" => "50px",
3133
+ "status" => "ok",
3134
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_FORM . ".php",
3135
+ "options" => [
3136
+ "storeCommenterData" => [
3137
+ "label" => esc_html__("Keep guest commenter credentials in browser cookies for X days", "wpdiscuz"),
3138
+ "label_original" => "Keep guest commenter credentials in browser cookies for X days",
3139
+ "description" => esc_html__("wpDiscuz uses WordPress functions to keep guest Name, Email and Website information in cookies. Those are used to fill according fields of comment form on next commenting time. Set this option value -1 to make it unlimited. Set this option value 0 to clear those data when user closes browser.", "wpdiscuz"),
3140
+ "description_original" => "wpDiscuz uses WordPress functions to keep guest Name, Email and Website information in cookies. Those are used to fill according fields of comment form on next commenting time. Set this option value -1 to make it unlimited. Set this option value 0 to clear those data when user closes browser.",
3141
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#keep-guest-commenter-credentials-in-browser-cookies-for-x-days",
3142
+ ],
3143
+ "commenterNameLength" => [
3144
+ "label" => esc_html__("Comment author name length (for guests only)", "wpdiscuz"),
3145
+ "label_original" => "Comment author name length (for guests only)",
3146
+ "description" => "",
3147
+ "description_original" => "",
3148
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#comment-author-name-length-for-guests-only",
3149
+ ],
3150
+ "commentFormView" => [
3151
+ "label" => esc_html__("Comment Form View", "wpdiscuz"),
3152
+ "label_original" => "Comment Form View",
3153
+ "description" => esc_html__('By default, only the comment text field is visible. When you click on the comment text field it opens all other fields (Name, Email, Website, etc...). If you want to keep all fields open, please set this option "expended".', "wpdiscuz"),
3154
+ "description_original" => 'By default, only the comment text field is visible. When you click on the comment text field it opens all other fields (Name, Email, Website, etc...). If you want to keep all fields open, please set this option "expended".',
3155
+ "docurl" => "",
3156
+ ],
3157
+ "enableDropAnimation" => [
3158
+ "label" => esc_html__("Enable drop animation for comment form and subscription bar", "wpdiscuz"),
3159
+ "label_original" => "Enable drop animation for comment form and subscription bar",
3160
+ "description" => "",
3161
+ "description_original" => "",
3162
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#enable-drop-animation-for-comment-form-and-subscription-bar",
3163
+ ],
3164
+ "richEditor" => [
3165
+ "label" => esc_html__("Load Rich Editor", "wpdiscuz"),
3166
+ "label_original" => "Load Rich Editor for",
3167
+ "description" => esc_html__("Search engines rank web pages for mobile devices totally different. For the mobile devices, there are more restrictions for JS and CSS files loading. This is the main reason why wpDiscuz disables the Rich Editor for mobile devices by default. It's only enabled for desktop. If you have good cache and website optimizer plugins you can enable the rich editor for mobile devices as well.", "wpdiscuz"),
3168
+ "description_original" => "Search engines rank web pages for mobile devices totally different. For the mobile devices, there are more restrictions for JS and CSS files loading. This is the main reason why wpDiscuz disables the Rich Editor for mobile devices by default. It's only enabled for desktop. If you have good cache and website optimizer plugins you can enable the rich editor for mobile devices as well.",
3169
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#load-rich-editor",
3170
+ ],
3171
+ "editorToolbar" => [
3172
+ "label" => esc_html__("Rich Editor Toolbar Buttons", "wpdiscuz"),
3173
+ "label_original" => "Rich Editor Toolbar Buttons",
3174
+ "description" => esc_html__("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.", "wpdiscuz"),
3175
+ "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.",
3176
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-form/#rich-editor-toolbar-buttons",
3177
+ ],
3178
+ "enableQuickTags" => [
3179
+ "label" => esc_html__("Enable Quicktags", "wpdiscuz"),
3180
+ "label_original" => "Enable Quicktags",
3181
+ "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"),
3182
+ "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 >.',
3183
+ "docurl" => "",
3184
+ ],
3185
+ ],
3186
+ ],
3187
+ WpdiscuzCore::TAB_RECAPTCHA => [
3188
+ "title" => esc_html__("Google reCAPTCHA", "wpdiscuz"),
3189
+ "title_original" => "Google reCAPTCHA",
3190
+ "icon" => "box-recaptcha.png",
3191
+ "icon-height" => "56px",
3192
+ "status" => $this->recaptcha["siteKey"] && $this->recaptcha["secretKey"] ? "ok" : "note",
3193
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_RECAPTCHA . ".php",
3194
+ "options" => [
3195
+ "siteKey" => [
3196
+ "label" => esc_html__("Site Key", "wpdiscuz"),
3197
+ "label_original" => "Site Key",
3198
+ "description" => "",
3199
+ "description_original" => "",
3200
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#site-keys",
3201
+ ],
3202
+ "secretKey" => [
3203
+ "label" => esc_html__("Secret Key", "wpdiscuz"),
3204
+ "label_original" => "Secret Key",
3205
+ "description" => "",
3206
+ "description_original" => "",
3207
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#recaptcha-version-2-%E2%80%93-site-key-and-secret-key",
3208
+ ],
3209
+ "theme" => [
3210
+ "label" => esc_html__("reCAPTCHA Theme", "wpdiscuz"),
3211
+ "label_original" => "reCAPTCHA Theme",
3212
+ "description" => "",
3213
+ "description_original" => "",
3214
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#recaptcha-theme",
3215
+ ],
3216
+ "lang" => [
3217
+ "label" => esc_html__("reCAPTCHA Language", "wpdiscuz"),
3218
+ "label_original" => "reCAPTCHA Language",
3219
+ "description" => "",
3220
+ "description_original" => "",
3221
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#recaptcha-language",
3222
+ ],
3223
+ "requestMethod" => [
3224
+ "label" => esc_html__("Request Method", "wpdiscuz"),
3225
+ "label_original" => "Request Method",
3226
+ "description" => "",
3227
+ "description_original" => "",
3228
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#request-method",
3229
+ ],
3230
+ "showForGuests" => [
3231
+ "label" => esc_html__("Enable for Guests", "wpdiscuz"),
3232
+ "label_original" => "Enable for Guests",
3233
+ "description" => "",
3234
+ "description_original" => "",
3235
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#enable-for-guests",
3236
+ ],
3237
+ "showForUsers" => [
3238
+ "label" => esc_html__("Enable for Logged-in Users", "wpdiscuz"),
3239
+ "label_original" => "Enable for Logged-in Users",
3240
+ "description" => "",
3241
+ "description_original" => "",
3242
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#enable-for-logged-in-users",
3243
+ ],
3244
+ "isShowOnSubscribeForm" => [
3245
+ "label" => esc_html__("Display on Subscription Form", "wpdiscuz"),
3246
+ "label_original" => "Display on Subscription Form",
3247
+ "description" => "",
3248
+ "label_original" => "",
3249
+ "description_original" => "",
3250
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/google-recaptcha/#display-on-subscription-form",
3251
+ ],
3252
+ ],
3253
+ ],
3254
+ WpdiscuzCore::TAB_LOGIN => [
3255
+ "title" => esc_html__("User Authorization and Profile Data", "wpdiscuz"),
3256
+ "title_original" => "User Authorization and Profile Data",
3257
+ "icon" => "box-login.png",
3258
+ "icon-height" => "65px",
3259
+ "status" => "ok",
3260
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_LOGIN . ".php",
3261
+ "options" => [
3262
+ "showLoggedInUsername" => [
3263
+ "label" => esc_html__("Display logged-in user name and logout link on comment form", "wpdiscuz"),
3264
+ "label_original" => "Display logged-in user name and logout link on comment form",
3265
+ "description" => "",
3266
+ "description_original" => "",
3267
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#display-logged-in-user-name-and-logout-link-on-comment-form",
3268
+ ],
3269
+ "showLoginLinkForGuests" => [
3270
+ "label" => esc_html__('Show "Login" link on comment form', "wpdiscuz"),
3271
+ "label_original" => 'Show "Login" link on comment form',
3272
+ "description" => "",
3273
+ "description_original" => "",
3274
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#show-%E2%80%9Clogin%E2%80%9D-link-on-comment-form",
3275
+ ],
3276
+ "myContentSettings" => [
3277
+ "label" => esc_html__('"My Content and Settings" button', "wpdiscuz"),
3278
+ "label_original" => '"My Content and Settings" button',
3279
+ "description" => esc_html__('The "My Content & Settings" button is located in comment filter panel on top of all comments, right after the [X Comments] phrase. This button opens a pop-up window allowing commenters manage their content and settings.', "wpdiscuz"),
3280
+ "description_original" => 'The "My Content & Settings" button is located in comment filter panel on top of all comments, right after the [X Comments] phrase. This button opens a pop-up window allowing commenters manage their content and settings.',
3281
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#%E2%80%9Cmy-content-and-settings%E2%80%9D-button",
3282
+ ],
3283
+ "enableProfileURLs" => [
3284
+ "label" => esc_html__("Enable Profiles URL", "wpdiscuz"),
3285
+ "label_original" => "Enable Profiles URL",
3286
+ "description" => sprintf(esc_html__("By default wpDiscuz adds a link with comment author avatar to the author profile page, you can disable this link using this option. However in case you use some plugin with User Profile page, you should keep this option enabled. wpDiscuz is well integrated with %s, BuddyPress and Ultimate Member profile builder plugins.", "wpdiscuz"), "<a href='https://wordpress.org/plugins/wpforo/' target='_blank'>wpForo Forum</a>"),
3287
+ "description_original" => "By default wpDiscuz adds a link with comment author avatar to the author profile page, you can disable this link using this option. However in case you use some plugin with User Profile page, you should keep this option enabled. wpDiscuz is well integrated with <a href='https://wordpress.org/plugins/wpforo/' target='_blank'>wpForo Forum</a>, BuddyPress and Ultimate Member profile builder plugins.",
3288
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#enable-profiles-url",
3289
+ ],
3290
+ "websiteAsProfileUrl" => [
3291
+ "label" => esc_html__("Use Website URL as Profile URL", "wpdiscuz"),
3292
+ "label_original" => "Use Website URL as Profile URL",
3293
+ "description" => "",
3294
+ "description_original" => "",
3295
+ "docurl" => "",
3296
+ ],
3297
+ "isUserByEmail" => [
3298
+ "label" => esc_html__("Use guest email to detect registered account", "wpdiscuz"),
3299
+ "label_original" => "Use guest email to detect registered account",
3300
+ "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"),
3301
+ "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.",
3302
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-authorization-and-profile-data/#use-guest-email-to-detect-registered-account",
3303
+ ],
3304
+ "loginUrl" => [
3305
+ "label" => esc_html__("Login URL", "wpdiscuz"),
3306
+ "label_original" => "Login URL",
3307
+ "description" => "",
3308
+ "description_original" => "",
3309
+ "docurl" => "",
3310
+ ],
3311
+ ],
3312
+ ],
3313
+ WpdiscuzCore::TAB_SOCIAL => [
3314
+ "title" => esc_html__("Social Login and Share", "wpdiscuz"),
3315
+ "title_original" => "Social Login and Share",
3316
+ "icon" => "box-social.png",
3317
+ "icon-height" => "80px",
3318
+ "status" => "ok",
3319
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_SOCIAL . ".php",
3320
+ "options" => [
3321
+ "socialLoginAgreementCheckbox" => [
3322
+ "label" => esc_html__("User agreement prior to a social login action", "wpdiscuz"),
3323
+ "label_original" => "User agreement prior to a social login action",
3324
+ "description" => esc_html__("If this option is enabled, all Social Login buttons become not-clickable until user accept automatic account creation process based on his/her Social Network Account shared information (email, name). This checkbox and appropriate information will be displayed when user click on a social login button, prior to the login process. This extra step is added to comply with the GDPR", "wpdiscuz") . " <a href='https://gdpr-info.eu/art-22-gdpr/' target='_blank' rel='noreferrer'>(Article 22).</a> <br>" . esc_html__("The note text and the label of this checkbox can be managed in Comments > Phrases > Social Login tab.", "wpdiscuz"),
3325
+ "description_original" => "If this option is enabled, all Social Login buttons become not-clickable until user accept automatic account creation process based on his/her Social Network Account shared information (email, name). This checkbox and appropriate information will be displayed when user click on a social login button, prior to the login process. This extra step is added to comply with the GDPR <a href='https://gdpr-info.eu/art-22-gdpr/' target='_blank' rel='noreferrer'>(Article 22).</a> <br>The note text and the label of this checkbox can be managed in Comments > Phrases > Social Login tab.",
3326
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/#user-agreement-prior-to-a-social-login-action",
3327
+ ],
3328
+ "socialLoginInSecondaryForm" => [
3329
+ "label" => esc_html__("Display social login buttons on reply forms", "wpdiscuz"),
3330
+ "label_original" => "Display social login buttons on reply forms",
3331
+ "description" => "",
3332
+ "description_original" => "",
3333
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/#display-social-login-buttons-on-reply-forms",
3334
+ ],
3335
+ "displayIconOnAvatar" => [
3336
+ "label" => esc_html__("Display Social Network Icon on User Avatars", "wpdiscuz"),
3337
+ "label_original" => "Display Social Network Icon on User Avatars",
3338
+ "description" => "",
3339
+ "description_original" => "",
3340
+ "docurl" => "",
3341
+ ],
3342
+ "enableFbLogin" => [
3343
+ "label" => esc_html__("Facebook Login Button", "wpdiscuz"),
3344
+ "label_original" => "Facebook Login Button",
3345
+ "description" => "",
3346
+ "description_original" => "",
3347
+ "docurl" => "",
3348
+ ],
3349
+ "fbUseOAuth2" => [
3350
+ "label" => esc_html__("Use Facebook OAuth2", "wpdiscuz"),
3351
+ "label_original" => "Use Facebook OAuth2",
3352
+ "description" => esc_html__("If you enable this option, please make sure you've inserted the Valid OAuth Redirect URI in according field when you create Facebook Login App. Your website OAuth Redirect URI is displayed above.", "wpdiscuz"),
3353
+ "description_original" => "If you enable this option, please make sure you've inserted the Valid OAuth Redirect URI in according field when you create Facebook Login App. Your website OAuth Redirect URI is displayed above.",
3354
+ "docurl" => "",
3355
+ ],
3356
+ "enableFbShare" => [
3357
+ "label" => esc_html__("Facebook Share Button", "wpdiscuz"),
3358
+ "label_original" => "Facebook Share Button",
3359
+ "description" => "",
3360
+ "description_original" => "",
3361
+ "docurl" => "",
3362
+ ],
3363
+ "fbAppID" => [
3364
+ "label" => esc_html__("Facebook Application ID", "wpdiscuz"),
3365
+ "label_original" => "Facebook Application ID",
3366
+ "description" => "",
3367
+ "description_original" => "",
3368
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/facebook-app-configuration/",
3369
+ ],
3370
+ "fbAppSecret" => [
3371
+ "label" => esc_html__("Facebook Application Secret", "wpdiscuz"),
3372
+ "label_original" => "Facebook Application Secret",
3373
+ "description" => "",
3374
+ "description_original" => "",
3375
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/facebook-app-configuration/",
3376
+ ],
3377
+ "enableTwitterLogin" => [
3378
+ "label" => esc_html__("Twitter Login Button", "wpdiscuz"),
3379
+ "label_original" => "Twitter Login Button",
3380
+ "description" => "",
3381
+ "description_original" => "",
3382
+ "docurl" => "",
3383
+ ],
3384
+ "enableTwitterShare" => [
3385
+ "label" => esc_html__("Twitter Share Button", "wpdiscuz"),
3386
+ "label_original" => "Twitter Share Button",
3387
+ "description" => "",
3388
+ "description_original" => "",
3389
+ "docurl" => "",
3390
+ ],
3391
+ "twitterAppID" => [
3392
+ "label" => esc_html__("Twitter - Consumer Key (API Key)", "wpdiscuz"),
3393
+ "label_original" => "Twitter - Consumer Key (API Key)",
3394
+ "description" => "",
3395
+ "description_original" => "",
3396
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/twitter-app-configuration/",
3397
+ ],
3398
+ "twitterAppSecret" => [
3399
+ "label" => esc_html__("Twitter - Consumer Secret (API Secret)", "wpdiscuz"),
3400
+ "label_original" => "Twitter - Consumer Secret (API Secret)",
3401
+ "description" => "",
3402
+ "description_original" => "",
3403
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/twitter-app-configuration/",
3404
+ ],
3405
+ "enableGoogleLogin" => [
3406
+ "label" => esc_html__("Google Login Button", "wpdiscuz"),
3407
+ "label_original" => "Google Login Button",
3408
+ "description" => "",
3409
+ "description_original" => "",
3410
+ "docurl" => "",
3411
+ ],
3412
+ "googleClientID" => [
3413
+ "label" => esc_html__("Google Client ID", "wpdiscuz"),
3414
+ "label_original" => "Google Client ID",
3415
+ "description" => "",
3416
+ "description_original" => "",
3417
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/google-app-configuration/",
3418
+ ],
3419
+ "googleClientSecret" => [
3420
+ "label" => esc_html__("Google Client Secret", "wpdiscuz"),
3421
+ "label_original" => "Google Client Secret",
3422
+ "description" => "",
3423
+ "description_original" => "",
3424
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/google-app-configuration/",
3425
+ ],
3426
+ "enableDisqusLogin" => [
3427
+ "label" => esc_html__("Disqus Login Button", "wpdiscuz"),
3428
+ "label_original" => "Disqus Login Button",
3429
+ "description" => "",
3430
+ "description_original" => "",
3431
+ "docurl" => "",
3432
+ ],
3433
+ "disqusPublicKey" => [
3434
+ "label" => esc_html__("Disqus Public Key", "wpdiscuz"),
3435
+ "label_original" => "Disqus Public Key",
3436
+ "description" => "",
3437
+ "description_original" => "",
3438
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/disqus-app-configuration/",
3439
+ ],
3440
+ "disqusSecretKey" => [
3441
+ "label" => esc_html__("Disqus Secret Key", "wpdiscuz"),
3442
+ "label_original" => "Disqus Secret Key",
3443
+ "description" => "",
3444
+ "description_original" => "",
3445
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/disqus-app-configuration/",
3446
+ ],
3447
+ "enableWordpressLogin" => [
3448
+ "label" => esc_html__("WordPress Login Button", "wpdiscuz"),
3449
+ "label_original" => "WordPress Login Button",
3450
+ "description" => "",
3451
+ "description_original" => "",
3452
+ "docurl" => "",
3453
+ ],
3454
+ "wordpressClientID" => [
3455
+ "label" => esc_html__("WordPress Client ID", "wpdiscuz"),
3456
+ "label_original" => "WordPress Client ID",
3457
+ "description" => "",
3458
+ "description_original" => "",
3459
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/wordpress-com-app-configuration/",
3460
+ ],
3461
+ "wordpressClientSecret" => [
3462
+ "label" => esc_html__("WordPress Client Secret", "wpdiscuz"),
3463
+ "label_original" => "WordPress Client Secret",
3464
+ "description" => "",
3465
+ "description_original" => "",
3466
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/wordpress-com-app-configuration/",
3467
+ ],
3468
+ "enableInstagramLogin" => [
3469
+ "label" => esc_html__("Instagram Login Button", "wpdiscuz"),
3470
+ "label_original" => "Instagram Login Button",
3471
+ "description" => "",
3472
+ "description_original" => "",
3473
+ "docurl" => "",
3474
+ ],
3475
+ "instagramAppID" => [
3476
+ "label" => esc_html__("Instagram App ID", "wpdiscuz"),
3477
+ "label_original" => "Instagram App ID",
3478
+ "description" => "",
3479
+ "description_original" => "",
3480
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/instagram-app-configuration/",
3481
+ ],
3482
+ "instagramAppSecret" => [
3483
+ "label" => esc_html__("Instagram App Secret", "wpdiscuz"),
3484
+ "label_original" => "Instagram App Secret",
3485
+ "description" => "",
3486
+ "description_original" => "",
3487
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/instagram-app-configuration/",
3488
+ ],
3489
+ "enableLinkedinLogin" => [
3490
+ "label" => esc_html__("LinkedIn Login Button", "wpdiscuz"),
3491
+ "label_original" => "LinkedIn Login Button",
3492
+ "description" => "",
3493
+ "description_original" => "",
3494
+ "docurl" => "",
3495
+ ],
3496
+ "linkedinClientID" => [
3497
+ "label" => esc_html__("LinkedIn Client ID", "wpdiscuz"),
3498
+ "label_original" => "LinkedIn Client ID",
3499
+ "description" => "",
3500
+ "description_original" => "",
3501
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/linkedin-app-configuration/",
3502
+ ],
3503
+ "linkedinClientSecret" => [
3504
+ "label" => esc_html__("LinkedIn Client Secret", "wpdiscuz"),
3505
+ "label_original" => "LinkedIn Client Secret",
3506
+ "description" => "",
3507
+ "description_original" => "",
3508
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/linkedin-app-configuration/",
3509
+ ],
3510
+ "enableWhatsappShare" => [
3511
+ "label" => esc_html__("WhatsApp Share Button", "wpdiscuz"),
3512
+ "label_original" => "WhatsApp Share Button",
3513
+ "description" => "",
3514
+ "description_original" => "",
3515
+ "docurl" => "",
3516
+ ],
3517
+ "enableYandexLogin" => [
3518
+ "label" => esc_html__("Yandex Login Button", "wpdiscuz"),
3519
+ "label_original" => "Yandex Login Button",
3520
+ "description" => "",
3521
+ "description_original" => "",
3522
+ "docurl" => "",
3523
+ ],
3524
+ "yandexID" => [
3525
+ "label" => esc_html__("Yandex ID", "wpdiscuz"),
3526
+ "label_original" => "Yandex ID",
3527
+ "description" => "",
3528
+ "description_original" => "",
3529
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/yandex-app-configuration/",
3530
+ ],
3531
+ "yandexPassword" => [
3532
+ "label" => esc_html__("Yandex Password", "wpdiscuz"),
3533
+ "label_original" => "Yandex Password",
3534
+ "description" => "",
3535
+ "description_original" => "",
3536
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/yandex-app-configuration/",
3537
+ ],
3538
+ "enableMailruLogin" => [
3539
+ "label" => esc_html__("Mail.ru Login Button", "wpdiscuz"),
3540
+ "label_original" => "Mail.ru Login Button",
3541
+ "description" => "",
3542
+ "description_original" => "",
3543
+ "docurl" => "",
3544
+ ],
3545
+ "mailruClientID" => [
3546
+ "label" => esc_html__("Mail.ru Client ID", "wpdiscuz"),
3547
+ "label_original" => "Mail.ru Client ID",
3548
+ "description" => "",
3549
+ "description_original" => "",
3550
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/mail-ru-app-configuration/",
3551
+ ],
3552
+ "mailruClientSecret" => [
3553
+ "label" => esc_html__("Mail.ru Client Secret", "wpdiscuz"),
3554
+ "label_original" => "Mail.ru Client Secret",
3555
+ "description" => "",
3556
+ "description_original" => "",
3557
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/mail-ru-app-configuration/",
3558
+ ],
3559
+ "enableWeiboLogin" => [
3560
+ "label" => esc_html__("Weibo Login Button", "wpdiscuz"),
3561
+ "label_original" => "Weibo Login Button",
3562
+ "description" => "",
3563
+ "description_original" => "",
3564
+ "docurl" => "",
3565
+ ],
3566
+ "weiboKey" => [
3567
+ "label" => esc_html__("Weibo App Key", "wpdiscuz"),
3568
+ "label_original" => "Weibo App Key",
3569
+ "description" => "",
3570
+ "description_original" => "",
3571
+ "docurl" => "",
3572
+ ],
3573
+ "weiboSecret" => [
3574
+ "label" => esc_html__("Weibo App Secret", "wpdiscuz"),
3575
+ "label_original" => "Weibo App Secret",
3576
+ "description" => "",
3577
+ "description_original" => "",
3578
+ "docurl" => "",
3579
+ ],
3580
+ "enableWechatLogin" => [
3581
+ "label" => esc_html__("WeChat Login Button", "wpdiscuz"),
3582
+ "label_original" => "WeChat Login Button",
3583
+ "description" => "",
3584
+ "description_original" => "",
3585
+ "docurl" => "",
3586
+ ],
3587
+ "wechatAppID" => [
3588
+ "label" => esc_html__("WeChat App ID", "wpdiscuz"),
3589
+ "label_original" => "WeChat App ID",
3590
+ "description" => "",
3591
+ "description_original" => "",
3592
+ "docurl" => "",
3593
+ ],
3594
+ "wechatSecret" => [
3595
+ "label" => esc_html__("WeChat Secret", "wpdiscuz"),
3596
+ "label_original" => "WeChat Secret",
3597
+ "description" => "",
3598
+ "description_original" => "",
3599
+ "docurl" => "",
3600
+ ],
3601
+ "enableQQLogin" => [
3602
+ "label" => esc_html__("QQ Login Button", "wpdiscuz"),
3603
+ "label_original" => "QQ Login Button",
3604
+ "description" => "",
3605
+ "description_original" => "",
3606
+ "docurl" => "",
3607
+ ],
3608
+ "qqAppID" => [
3609
+ "label" => esc_html__("QQ AppID", "wpdiscuz"),
3610
+ "label_original" => "QQ AppID",
3611
+ "description" => "",
3612
+ "description_original" => "",
3613
+ "docurl" => "",
3614
+ ],
3615
+ "qqSecret" => [
3616
+ "label" => esc_html__("QQ AppKey", "wpdiscuz"),
3617
+ "label_original" => "QQ AppKey",
3618
+ "description" => "",
3619
+ "description_original" => "",
3620
+ "docurl" => "",
3621
+ ],
3622
+ "enableBaiduLogin" => [
3623
+ "label" => esc_html__("Baidu Login Button", "wpdiscuz"),
3624
+ "label_original" => "Baidu Login Button",
3625
+ "description" => "",
3626
+ "description_original" => "",
3627
+ "docurl" => "",
3628
+ ],
3629
+ "baiduAppID" => [
3630
+ "label" => esc_html__("Baidu Client ID", "wpdiscuz"),
3631
+ "label_original" => "Baidu Client ID",
3632
+ "description" => "",
3633
+ "description_original" => "",
3634
+ "docurl" => "",
3635
+ ],
3636
+ "baiduSecret" => [
3637
+ "label" => esc_html__("Baidu Client Secret", "wpdiscuz"),
3638
+ "label_original" => "Baidu Client Secret",
3639
+ "description" => "",
3640
+ "description_original" => "",
3641
+ "docurl" => "",
3642
+ ],
3643
+ "enableVkLogin" => [
3644
+ "label" => esc_html__("VK Login Button", "wpdiscuz"),
3645
+ "label_original" => "VK Login Button",
3646
+ "description" => "",
3647
+ "description_original" => "",
3648
+ "docurl" => "",
3649
+ ],
3650
+ "enableVkShare" => [
3651
+ "label" => esc_html__("VK Share Button", "wpdiscuz"),
3652
+ "label_original" => "VK Share Button",
3653
+ "description" => "",
3654
+ "description_original" => "",
3655
+ "docurl" => "",
3656
+ ],
3657
+ "vkAppID" => [
3658
+ "label" => esc_html__("VK Application ID", "wpdiscuz"),
3659
+ "label_original" => "VK Application ID",
3660
+ "description" => "",
3661
+ "description_original" => "",
3662
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/vk-app-configuration/",
3663
+ ],
3664
+ "vkAppSecret" => [
3665
+ "label" => esc_html__("VK Secure Key", "wpdiscuz"),
3666
+ "label_original" => "VK Secure Key",
3667
+ "description" => "",
3668
+ "description_original" => "",
3669
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/social-login-and-share/vk-app-configuration/",
3670
+ ],
3671
+ "enableOkLogin" => [
3672
+ "label" => esc_html__("OK Login Button", "wpdiscuz"),
3673
+ "label_original" => "OK Login Button",
3674
+ "description" => "",
3675
+ "description_original" => "",
3676
+ "docurl" => "",
3677
+ ],
3678
+ "enableOkShare" => [
3679
+ "label" => esc_html__("OK Share Button", "wpdiscuz"),
3680
+ "label_original" => "OK Share Button",
3681
+ "description" => "",
3682
+ "description_original" => "",
3683
+ "docurl" => "",
3684
+ ],
3685
+ "okAppID" => [
3686
+ "label" => esc_html__("OK Application ID", "wpdiscuz"),
3687
+ "label_original" => "OK Application ID",
3688
+ "description" => "",
3689
+ "description_original" => "",
3690
+ "docurl" => "https://apiok.ru/en/dev/app/create",
3691
+ ],
3692
+ "okAppKey" => [
3693
+ "label" => esc_html__("OK Application Key", "wpdiscuz"),
3694
+ "label_original" => "OK Application Key",
3695
+ "description" => "",
3696
+ "description_original" => "",
3697
+ "docurl" => "https://apiok.ru/en/dev/app/create",
3698
+ ],
3699
+ "okAppSecret" => [
3700
+ "label" => esc_html__("OK Application Secret", "wpdiscuz"),
3701
+ "label_original" => "OK Application Secret",
3702
+ "description" => "",
3703
+ "description_original" => "",
3704
+ "docurl" => "https://apiok.ru/en/dev/app/create",
3705
+ ],
3706
+ ],
3707
+ ],
3708
+ WpdiscuzCore::TAB_RATING => [
3709
+ "title" => esc_html__("Article and Comment Rating", "wpdiscuz"),
3710
+ "title_original" => "Article and Comment Rating",
3711
+ "icon" => "box-rating.png",
3712
+ "icon-height" => "46px",
3713
+ "status" => "ok",
3714
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_RATING . ".php",
3715
+ "options" => [
3716
+ "enablePostRatingSchema" => [
3717
+ "label" => esc_html__("Enable Aggregate Rating Schema", "wpdiscuz"),
3718
+ "label_original" => "Enable Aggregate Rating Schema",
3719
+ "description" => esc_html__("Aggregate rating schema is a code integrated with post rating HTML. This enables Google to feature your post ratings and attract customers with it. When searching the internet, people will see your posts search results with star ratings. Even though those results are not at the top of search engine results page, those sites caught people attention first.", "wpdiscuz"),
3720
+ "description" => sprintf(esc_html__("Aggregate rating schema is a code integrated with post rating HTML. This enables Google to feature your post ratings and attract customers with it. When searching the internet, people will see your posts search results with star ratings. Even though those results are not at the top of search engine results page, those sites caught people attention first. If your website does not sell Products, we do not recommend activating this option. For more details, please %s.", "wpdiscuz"), "<a href='https://wpdiscuz.com/community/f-a-q/post-rating-using-aggregate-rating-schema/' target='_blank'>read our documentation</a>"),
3721
+ "description_original" => "Aggregate rating schema is a code integrated with post rating HTML. This enables Google to feature your post ratings and attract customers with it. When searching the internet, people will see your posts search results with star ratings. Even though those results are not at the top of search engine results page, those sites caught people attention first. If your website does not sell Products, we do not recommend activating this option. For more details, please <a href='https://wpdiscuz.com/community/f-a-q/post-rating-using-aggregate-rating-schema/' target='_blank'>read our documentation</a>.",
3722
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/article-and-comment-rating/#enable-aggregate-rating-schema",
3723
+ ],
3724
+ "displayRatingOnPost" => [
3725
+ "label" => esc_html__("Display Ratings", "wpdiscuz"),
3726
+ "label_original" => "Display Ratings",
3727
+ "description" => "",
3728
+ "description_original" => "",
3729
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/article-and-comment-rating/#display-ratings",
3730
+ ],
3731
+ "ratingStarColors" => [
3732
+ "label" => esc_html__("Rating Star Colors", "wpdiscuz"),
3733
+ "label_original" => "Rating Star Colors",
3734
+ "description" => "",
3735
+ "description_original" => "",
3736
+ "docurl" => "",
3737
+ ],
3738
+ ],
3739
+ ],
3740
+ WpdiscuzCore::TAB_THREAD_DISPLAY => [
3741
+ "title" => esc_html__("Comment Thread Displaying", "wpdiscuz"),
3742
+ "title_original" => "Comment Thread Displaying",
3743
+ "icon" => "box-threads.png",
3744
+ "icon-height" => "58px",
3745
+ "status" => "ok",
3746
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_THREAD_DISPLAY . ".php",
3747
+ "options" => [
3748
+ "firstLoadWithAjax" => [
3749
+ "label" => esc_html__("Comment List Loading Type", "wpdiscuz"),
3750
+ "label_original" => "Comment List Loading Type",
3751
+ "description" => esc_html__("Keep your page loading speed high by disabling comments loading. Once the page loading is complete, this option will initiate AJAX request and load comments without affecting page loading speed. Also, you can select the [View Comments] button option to allow visitors load comments manually whenever they want.", "wpdiscuz"),
3752
+ "description_original" => "Keep your page loading speed high by disabling comments loading. Once the page loading is complete, this option will initiate AJAX request and load comments without affecting page loading speed. Also, you can select the [View Comments] button option to allow visitors load comments manually whenever they want.",
3753
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#comment-list-loading-type",
3754
+ ],
3755
+ "isLoadOnlyParentComments" => [
3756
+ "label" => __("Display only parent comments and <u>view replies &or;</u> button", "wpdiscuz"),
3757
+ "label_original" => "Display only parent comments and <u>view replies &or;</u> button",
3758
+ "description" => esc_html__("If this option is enabled only parent comments will be displayed. This increases page load speed and keeps pages light. If visitor wants to read replies he/she just need to click on [view replies (12)] button located on all parent comments which have replies.", "wpdiscuz"),
3759
+ "description_original" => "If this option is enabled only parent comments will be displayed. This increases page load speed and keeps pages light. If visitor wants to read replies he/she just need to click on [view replies (12)] button located on all parent comments which have replies.",
3760
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#display-only-parent-comments-and-view-replies-%E2%88%A8-button",
3761
+ ],
3762
+ "showReactedFilterButton" => [
3763
+ "label" => esc_html__('Display "Most Reacted Comments" filter button', "wpdiscuz"),
3764
+ "label_original" => 'Display "Most Reacted Comments" filter button',
3765
+ "description" => "",
3766
+ "description_original" => "",
3767
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#display-%E2%80%9Cmost-reacted-comments%E2%80%9D-filter-button",
3768
+ ],
3769
+ "showHottestFilterButton" => [
3770
+ "label" => esc_html__('Display "Hottest Comment Threads" filter button', "wpdiscuz"),
3771
+ "label_original" => 'Display "Hottest Comment Threads" filter button',
3772
+ "description" => "",
3773
+ "description_original" => "",
3774
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#display-%E2%80%9Chottest-comment-threads%E2%80%9D-filter-button",
3775
+ ],
3776
+ "showSortingButtons" => [
3777
+ "label" => esc_html__("Display Comment Sorting Options", "wpdiscuz"),
3778
+ "label_original" => "Display Comment Sorting Options",
3779
+ "description" => esc_html__("This option enables comment sorting buttons (newest | oldest | most voted). Sorting buttons are not available for the default comments pagination type [1][2][3]... It's only active for [Load more] and other AJAX pagination types.", "wpdiscuz"),
3780
+ "description_original" => "This option enables comment sorting buttons (newest | oldest | most voted). Sorting buttons are not available for the default comments pagination type [1][2][3]... It's only active for [Load more] and other AJAX pagination types.",
3781
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#display-comment-sorting-options",
3782
+ ],
3783
+ "mostVotedByDefault" => [
3784
+ "label" => esc_html__('Set comments order to "Most voted" by default', "wpdiscuz"),
3785
+ "label_original" => 'Set comments order to "Most voted" by default',
3786
+ "description" => "",
3787
+ "description_original" => "",
3788
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#set-comments-order-to-%E2%80%9Cmost-voted%E2%80%9D-by-default",
3789
+ ],
3790
+ "reverseChildren" => [
3791
+ "label" => esc_html__("Reverse Child Comments Order", "wpdiscuz"),
3792
+ "label_original" => "Reverse Child Comments Order",
3793
+ "description" => esc_html__("By default child comments are sorted by oldest on top. Using this option you can revers child comments order and sort them by newest on top.", "wpdiscuz"),
3794
+ "description_original" => "By default child comments are sorted by oldest on top. Using this option you can revers child comments order and sort them by newest on top.",
3795
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#reverse-child-comments-order",
3796
+ ],
3797
+ "commentListLoadType" => [
3798
+ "label" => esc_html__("Comments Pagination Type", "wpdiscuz"),
3799
+ "label_original" => "Comments Pagination Type",
3800
+ "description" => esc_html__('You can manage the number of comments for [Load more] option in Settings > Discussion page, using "Break comments into pages with [X] top level comments per page" option. To show the default Wordpress comment pagination you should enable the checkbox on beginning of the same option.', "wpdiscuz"),
3801
+ "description_original" => 'You can manage the number of comments for [Load more] option in Settings > Discussion page, using "Break comments into pages with [X] top level comments per page" option. To show the default Wordpress comment pagination you should enable the checkbox on beginning of the same option.',
3802
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#comments-pagination-type",
3803
+ ],
3804
+ "highlightUnreadComments" => [
3805
+ "label" => esc_html__("Highlight Unread Comments", "wpdiscuz"),
3806
+ "label_original" => "Highlight Unread Comments",
3807
+ "description" => "",
3808
+ "description_original" => "",
3809
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-displaying/#highlight-unread-comments",
3810
+ ],
3811
+ "scrollToComment" => [
3812
+ "label" => __("Scroll to the comment after posting", "wpdiscuz"),
3813
+ "label_original" => "Scroll to the comment after posting",
3814
+ "description" => "",
3815
+ "description_original" => "",
3816
+ "docurl" => "",
3817
+ ],
3818
+ "orderCommentsBy" => [
3819
+ "label" => __("Newest and oldest comment ordering by", "wpdiscuz"),
3820
+ "label_original" => "Newest and oldest comment ordering by",
3821
+ "description" => "",
3822
+ "description_original" => "",
3823
+ "docurl" => "",
3824
+ ],
3825
+ ],
3826
+ ],
3827
+ WpdiscuzCore::TAB_THREAD_LAYOUTS => [
3828
+ "title" => esc_html__("Comment Thread Features", "wpdiscuz"),
3829
+ "title_original" => "Comment Thread Features",
3830
+ "icon" => "box-layouts.png",
3831
+ "icon-height" => "50px",
3832
+ "status" => "ok",
3833
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_THREAD_LAYOUTS . ".php",
3834
+ "options" => [
3835
+ "showCommentLink" => [
3836
+ "label" => esc_html__("Show Comment Link", "wpdiscuz"),
3837
+ "label_original" => "Show Comment Link",
3838
+ "description" => "",
3839
+ "description_original" => "",
3840
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#show-comment-link",
3841
+ ],
3842
+ "showCommentDate" => [
3843
+ "label" => esc_html__("Show Comment Date", "wpdiscuz"),
3844
+ "label_original" => "Show Comment Date",
3845
+ "description" => "",
3846
+ "description_original" => "",
3847
+ "docurl" => "",
3848
+ ],
3849
+ "showVotingButtons" => [
3850
+ "label" => esc_html__("Show Voting Buttons", "wpdiscuz"),
3851
+ "label_original" => "Show Voting Buttons",
3852
+ "description" => "",
3853
+ "description_original" => "",
3854
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons",
3855
+ ],
3856
+ "votingButtonsIcon" => [
3857
+ "label" => esc_html__("Voting Buttons Icon", "wpdiscuz"),
3858
+ "label_original" => "Voting Buttons Icon",
3859
+ "description" => "",
3860
+ "description_original" => "",
3861
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons",
3862
+ ],
3863
+ "votingButtonsStyle" => [
3864
+ "label" => esc_html__("Comment Voting Result Mode", "wpdiscuz"),
3865
+ "label_original" => "Comment Voting Result Mode",
3866
+ "description" => "",
3867
+ "description_original" => "",
3868
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons",
3869
+ ],
3870
+ "enableDislikeButton" => [
3871
+ "label" => esc_html__("Enable down vote button (dislike)", "wpdiscuz"),
3872
+ "label_original" => "Enable down vote button (dislike)",
3873
+ "description" => "",
3874
+ "description_original" => "",
3875
+ "docurl" => "",
3876
+ ],
3877
+ "isGuestCanVote" => [
3878
+ "label" => esc_html__("Allow Guests to Vote for Comments", "wpdiscuz"),
3879
+ "label_original" => "Allow Guests to Vote for Comments",
3880
+ "description" => "",
3881
+ "description_original" => "",
3882
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons",
3883
+ ],
3884
+ "highlightVotingButtons" => [
3885
+ "label" => esc_html__("Highlight Voting Buttons for Voters", "wpdiscuz"),
3886
+ "label_original" => "Highlight Voting Buttons for Voters",
3887
+ "description" => esc_html__("This allows users to see own voted comments.", "wpdiscuz"),
3888
+ "description_original" => "This allows users to see own voted comments.",
3889
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#voting-liking-buttons",
3890
+ ],
3891
+ "showAvatars" => [
3892
+ "label" => esc_html__("Display Avatars", "wpdiscuz"),
3893
+ "label_original" => "Display Avatars",
3894
+ "description" => esc_html__("This option only related to avatars in comment system. For sitewide avatar control, please use WordPress native avatar settings in Dashboard > Settings > Discussions admin page.", "wpdiscuz"),
3895
+ "description_original" => "",
3896
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#display-avatars",
3897
+ ],
3898
+ "defaultAvatarUrlForUser" => [
3899
+ "label" => esc_html__("Default Avatar Source URL for Users", "wpdiscuz"),
3900
+ "label_original" => "Default Avatar Source URL for Users",
3901
+ "description" => "",
3902
+ "description_original" => "",
3903
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#display-avatars",
3904
+ ],
3905
+ "defaultAvatarUrlForGuest" => [
3906
+ "label" => esc_html__("Default Avatar Source URL for Guests", "wpdiscuz"),
3907
+ "label_original" => "Default Avatar Source URL for Guests",
3908
+ "description" => "",
3909
+ "description_original" => "",
3910
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#display-avatars",
3911
+ ],
3912
+ "changeAvatarsEverywhere" => [
3913
+ "label" => esc_html__("Enable Sitewide Usage of Default Avatars", "wpdiscuz"),
3914
+ "label_original" => "Enable Sitewide Usage of Default Avatars",
3915
+ "description" => "",
3916
+ "description_original" => "",
3917
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-thread-features/#display-avatars",
3918
+ ],
3919
+ ],
3920
+ ],
3921
+ WpdiscuzCore::TAB_THREAD_STYLES => [
3922
+ "title" => esc_html__("Styles and Colors", "wpdiscuz"),
3923
+ "title_original" => "Styles and Colors",
3924
+ "icon" => "box-styles.png",
3925
+ "icon-height" => "56px",
3926
+ "status" => "ok",
3927
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_THREAD_STYLES . ".php",
3928
+ "options" => [
3929
+ "theme" => [
3930
+ "label" => esc_html__("Comment Form and Comment List Style", "wpdiscuz"),
3931
+ "label_original" => "Comment Form and Comment List Style",
3932
+ "description" => esc_html__("Starting from wpDiscuz 7 you can choose the [ Off ] option of comment style. It'll remove most of wpDiscuz CSS code and allow you write your own CSS for custom comment styling.", "wpdiscuz"),
3933
+ "description_original" => "Starting from wpDiscuz 7 you can choose the [ Off ] option of comment style. It'll remove most of wpDiscuz CSS code and allow you write your own CSS for custom comment styling.",
3934
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/styles-and-colors/#comment-form-and-comment-list-style",
3935
+ ],
3936
+ "styleSpecificColors" => [
3937
+ "label" => esc_html__("Style Specific Colors", "wpdiscuz"),
3938
+ "label_original" => "Style Specific Colors",
3939
+ "description" => esc_html__("These options allows you manage comment section colors individaly for the Default and Dark Styles", "wpdiscuz"),
3940
+ "description_original" => "These options allows you manage comment section colors individaly for the Default and Dark Styles",
3941
+ "docurl" => "",
3942
+ ],
3943
+ "colors" => [
3944
+ "label" => esc_html__("General Colors", "wpdiscuz"),
3945
+ "label_original" => "General Colors",
3946
+ "description" => "",
3947
+ "description_original" => "",
3948
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/styles-and-colors/#colors",
3949
+ ],
3950
+ "commentTextSize" => [
3951
+ "label" => esc_html__("Comment Text Size", "wpdiscuz"),
3952
+ "label_original" => "Comment Text Size",
3953
+ "description" => "",
3954
+ "description_original" => "",
3955
+ "docurl" => "",
3956
+ ],
3957
+ "enableFontAwesome" => [
3958
+ "label" => esc_html__("Load Font Awesome css lib", "wpdiscuz"),
3959
+ "label_original" => "Load Font Awesome css lib",
3960
+ "description" => esc_html__("IMPORTANT: In case your theme uses old versions of Font-Awesome lib, you should not disable this this option. The theme old version doesn't support new version icons, thus some wpDiscuz icons might be lost.", "wpdiscuz"),
3961
+ "description_original" => "IMPORTANT: In case your theme uses old versions of Font-Awesome lib, you should not disable this this option. The theme old version doesn't support new version icons, thus some wpDiscuz icons might be lost.",
3962
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/styles-and-colors/#load-font-awesome-css-lib",
3963
+ ],
3964
+ "customCss" => [
3965
+ "label" => esc_html__("Custom CSS Code", "wpdiscuz"),
3966
+ "label_original" => "Custom CSS Code",
3967
+ "description" => "",
3968
+ "description_original" => "",
3969
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/styles-and-colors/#custom-css-code",
3970
+ ],
3971
+ ],
3972
+ ],
3973
+ WpdiscuzCore::TAB_SUBSCRIPTION => [
3974
+ "title" => esc_html__("Subscription and User Following", "wpdiscuz"),
3975
+ "title_original" => "Subscription and User Following",
3976
+ "icon" => "box-email.png",
3977
+ "icon-height" => "58px",
3978
+ "status" => "ok",
3979
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_SUBSCRIPTION . ".php",
3980
+ "options" => [
3981
+ "enableUserMentioning" => [
3982
+ "label" => esc_html__("Enable User Mentioning", "wpdiscuz"),
3983
+ "label_original" => "Enable User Mentioning",
3984
+ "description" => sprintf(__("This option allows mentioning users in comments using @nickname method. Mentioned users will get notification via email if the next option is enabled. To get an advanced user mentioning features and to be able mention comments by #CommentID, we recommend the %s addon.", "wpdiscuz"), '<a href="https://gvectors.com/product/wpdiscuz-user-comment-mentioning/" target="_blank">' . "wpDiscuz User & Comment Mentioning" . '</a>'),
3985
+ "description_original" => sprintf("This option allows mentioning users in comments using @nickname method. Mentioned users will get notification via email if the next option is enabled. To get an advanced user mentioning features and to be able mention comments by #CommentID, we recommend the %s addon.", '<a href="https://gvectors.com/product/wpdiscuz-user-comment-mentioning/" target="_blank">' . "wpDiscuz User & Comment Mentioning" . '</a>'),
3986
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#enable-user-mentioning",
3987
+ ],
3988
+ "sendMailToMentionedUsers" => [
3989
+ "label" => esc_html__("Send E-Mail Notification to Mentioned Users", "wpdiscuz"),
3990
+ "label_original" => "Send E-Mail Notification to Mentioned Users",
3991
+ "description" => "",
3992
+ "description_original" => "",
3993
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#send-e-mail-notification-to-mentioned-users",
3994
+ ],
3995
+ "isNotifyOnCommentApprove" => [
3996
+ "label" => esc_html__("Notify comment author once comment is approved", "wpdiscuz"),
3997
+ "label_original" => "Notify comment author once comment is approved",
3998
+ "description" => "",
3999
+ "description_original" => "",
4000
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#notify-comment-author-once-comment-is-approved",
4001
+ ],
4002
+ "enableMemberConfirm" => [
4003
+ "label" => esc_html__("Enable subscription confirmation for registered users", "wpdiscuz"),
4004
+ "label_original" => "Enable subscription confirmation for registered users",
4005
+ "description" => "",
4006
+ "description_original" => "",
4007
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#enable-subscription-confirmation-for-registered-users",
4008
+ ],
4009
+ "enableGuestsConfirm" => [
4010
+ "label" => esc_html__("Enable subscription confirmation for guests", "wpdiscuz"),
4011
+ "label_original" => "Enable subscription confirmation for guests",
4012
+ "description" => "",
4013
+ "description_original" => "",
4014
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#enable-subscription-confirmation-for-guests",
4015
+ ],
4016
+ "subscriptionType" => [
4017
+ "label" => esc_html__("Subscription types in Subscription Bar drop-down", "wpdiscuz"),
4018
+ "label_original" => "Subscription types in Subscription Bar drop-down",
4019
+ "description" => "",
4020
+ "description_original" => "",
4021
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#subscription-types-in-subscription-bar-drop-down",
4022
+ ],
4023
+ "showReplyCheckbox" => [
4024
+ "label" => esc_html__('Display "Notify of new replies to this comment" option in comment form', "wpdiscuz"),
4025
+ "label_original" => 'Display "Notify of new replies to this comment" option in comment form',
4026
+ "description" => esc_html__("wpDiscuz is the only comment plugin which allows you to subscribe to certain comment replies. This option is located above [Post Comment] button in comment form. You can disable this subscription way by unchecking this option.", "wpdiscuz"),
4027
+ "description_original" => "wpDiscuz is the only comment plugin which allows you to subscribe to certain comment replies. This option is located above [Post Comment] button in comment form. You can disable this subscription way by unchecking this option.",
4028
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#display-%E2%80%9Cnotify-of-new-replies-to-this-comment%E2%80%9D-option-in-commen",
4029
+ ],
4030
+ "isReplyDefaultChecked" => [
4031
+ "label" => esc_html__('Keep checked the "Notify of new replies to this comment" option by default', "wpdiscuz"),
4032
+ "label_original" => 'Keep checked the "Notify of new replies to this comment" option by default',
4033
+ "description" => "",
4034
+ "description_original" => "",
4035
+ "docurl" => "",
4036
+ ],
4037
+ "usePostmaticForCommentNotification" => [
4038
+ "label" => esc_html__("Use Postmatic for subscriptions and commenting by email", "wpdiscuz"),
4039
+ "label_original" => "Use Postmatic for subscriptions and commenting by email",
4040
+ "description" => esc_html__("Postmatic allows your users subscribe to comments. Instead of just being notified, they add a reply right from their inbox.", "wpdiscuz"),
4041
+ "description_original" => "Postmatic allows your users subscribe to comments. Instead of just being notified, they add a reply right from their inbox.",
4042
+ "docurl" => "",
4043
+ ],
4044
+ "isFollowActive" => [
4045
+ "label" => esc_html__("Enable User Following Feature", "wpdiscuz"),
4046
+ "label_original" => "Enable User Following Feature",
4047
+ "description" => "",
4048
+ "description_original" => "",
4049
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#user-subscription-follow-users",
4050
+ ],
4051
+ "disableFollowConfirmForUsers" => [
4052
+ "label" => esc_html__("Follow users without email confirmation", "wpdiscuz"),
4053
+ "label_original" => "Follow users without email confirmation",
4054
+ "description" => "",
4055
+ "description_original" => "",
4056
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/subscription-and-user-following/#follow-users-without-email-confirmation",
4057
+ ],
4058
+ ],
4059
+ ],
4060
+ WpdiscuzCore::TAB_LABELS => [
4061
+ "title" => esc_html__("User Labels and Badges", "wpdiscuz"),
4062
+ "title_original" => "User Labels and Badges",
4063
+ "icon" => "box-badges.png",
4064
+ "icon-height" => "56px",
4065
+ "status" => "ok",
4066
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_LABELS . ".php",
4067
+ "options" => [
4068
+ "blogRoleLabels" => [
4069
+ "label" => esc_html__("Display Comment Author Labels", "wpdiscuz"),
4070
+ "label_original" => "Display Comment Author Labels",
4071
+ "description" => "",
4072
+ "description_original" => "",
4073
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-labels-and-badges/#display-comment-author-labels",
4074
+ ],
4075
+ "commenterLabelColors" => [
4076
+ "label" => esc_html__("Comment Author Label Colors by User Role", "wpdiscuz"),
4077
+ "label_original" => "Comment Author Label Colors by User Role",
4078
+ "description" => "",
4079
+ "description_original" => "",
4080
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/user-labels-and-badges/#comment-author-label-colors-by-user-role",
4081
+ ],
4082
+ ],
4083
+ ],
4084
+ WpdiscuzCore::TAB_MODERATION => [
4085
+ "title" => esc_html__("Comment Moderation", "wpdiscuz"),
4086
+ "title_original" => "Comment Moderation",
4087
+ "icon" => "box-moderation.png",
4088
+ "icon-height" => "50px",
4089
+ "status" => "ok",
4090
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_MODERATION . ".php",
4091
+ "options" => [
4092
+ "commentEditableTime" => [
4093
+ "label" => esc_html__("Edit Button - Allow comment editing for", "wpdiscuz"),
4094
+ "label_original" => "Edit Button - Allow comment editing for",
4095
+ "description" => "",
4096
+ "description_original" => "",
4097
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#edit-button-%E2%80%93-allow-comment-editing-for",
4098
+ ],
4099
+ "enableEditingWhenHaveReplies" => [
4100
+ "label" => esc_html__("Enable editing for replied comments", "wpdiscuz"),
4101
+ "label_original" => "Enable editing for replied comments",
4102
+ "description" => "",
4103
+ "description_original" => "",
4104
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#enable-editing-for-replied-comments",
4105
+ ],
4106
+ "displayEditingInfo" => [
4107
+ "label" => esc_html__("Display comment editing Information", "wpdiscuz"),
4108
+ "label_original" => "Display comment editing Information",
4109
+ "description" => "",
4110
+ "description_original" => "",
4111
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#display-comment-editing-information",
4112
+ ],
4113
+ "enableStickButton" => [
4114
+ "label" => esc_html__("Stick Button - Stick a comment thread", "wpdiscuz"),
4115
+ "label_original" => "Stick Button - Stick a comment thread",
4116
+ "description" => "",
4117
+ "description_original" => "",
4118
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#stick-button-%E2%80%93-stick-a-comment-thread",
4119
+ ],
4120
+ "enableCloseButton" => [
4121
+ "label" => esc_html__("Close Button - Close a comment thread", "wpdiscuz"),
4122
+ "label_original" => "Close Button - Close a comment thread",
4123
+ "description" => "",
4124
+ "description_original" => "",
4125
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#close-button-%E2%80%93-close-a-comment-thread",
4126
+ ],
4127
+ "userCommentsLimit" => [
4128
+ "label" => esc_html__("Limit Comments per User", "wpdiscuz"),
4129
+ "label_original" => "Limit Comments per User",
4130
+ "description" => esc_html__("This option allows control commenting activity per user. You can set maximum number of comments users can leave per post or sitewide. It also allow to set restriction for comments or for replies only.", "wpdiscuz"),
4131
+ "description_original" => "This option allows control commenting activity per user. You can set maximum number of comments users can leave per post or sitewide. It also allow to set restriction for comments or for replies only.",
4132
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-moderation/#limit-comments-per-user",
4133
+ ],
4134
+ ],
4135
+ ],
4136
+ WpdiscuzCore::TAB_CONTENT => [
4137
+ "title" => esc_html__("Comment Content and Media", "wpdiscuz"),
4138
+ "title_original" => "Comment Content and Media",
4139
+ "icon" => "box-content.png",
4140
+ "icon-height" => "50px",
4141
+ "status" => "ok",
4142
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_CONTENT . ".php",
4143
+ "options" => [
4144
+ "commentTextLength" => [
4145
+ "label" => esc_html__("Comment Text Length", "wpdiscuz"),
4146
+ "label_original" => "Comment Text Length",
4147
+ "description" => esc_html__("Allows to set minimum and maximum number of chars can be inserted in comment textarea. Leave the max value empty to remove the limit.", "wpdiscuz"),
4148
+ "description_original" => "Allows to set minimum and maximum number of chars can be inserted in comment textarea. Leave the max value empty to remove the limit.",
4149
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#comment-text-length",
4150
+ ],
4151
+ "enableImageConversion" => [
4152
+ "label" => esc_html__("Image Source URL to Image Conversion", "wpdiscuz"),
4153
+ "label_original" => "Image Source URL to Image Conversion",
4154
+ "description" => "",
4155
+ "description_original" => "",
4156
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#image-source-url-to-image-conversion",
4157
+ ],
4158
+ "enableShortcodes" => [
4159
+ "label" => esc_html__("Enable WordPress Shortcodes in Comment Content", "wpdiscuz"),
4160
+ "label_original" => "Enable WordPress Shortcodes in Comment Content",
4161
+ "description" => esc_html__("This option allows embedding other plugins shortcodes in comment content. Some plugin shortcodes work very slow, so this may affect your page load speed if the shortcode provider plugin is not well optimized.", "wpdiscuz"),
4162
+ "description_original" => "This option allows embedding other plugins shortcodes in comment content. Some plugin shortcodes work very slow, so this may affect your page load speed if the shortcode provider plugin is not well optimized.",
4163
+ "docurl" => "",
4164
+ ],
4165
+ "commentReadMoreLimit" => [
4166
+ "label" => esc_html__("The number of words before breaking comment text (Read more)", "wpdiscuz"),
4167
+ "label_original" => "The number of words before breaking comment text (Read more)",
4168
+ "description" => esc_html__("Set this option value 0, to turn off comment text breaking function.", "wpdiscuz"),
4169
+ "description_original" => "Set this option value 0, to turn off comment text breaking function.",
4170
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#the-number-of-words-before-breaking-comment-text-read-more",
4171
+ ],
4172
+ "wmuIsEnabled" => [
4173
+ "label" => esc_html__("Enable Media Uploading", "wpdiscuz"),
4174
+ "label_original" => "Enable Media Uploading",
4175
+ "description" => esc_html__("This option allows commenters to attach an image with comments.", "wpdiscuz"),
4176
+ "description_original" => "This option allows commenters to attach an image with comments.",
4177
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#enable-media-uploading",
4178
+ ],
4179
+ "wmuIsGuestAllowed" => [
4180
+ "label" => esc_html__("Allow Media Uploading for Guests", "wpdiscuz"),
4181
+ "label_original" => "Allow Media Uploading for Guests",
4182
+ "description" => "",
4183
+ "description_original" => "",
4184
+ "docurl" => "",
4185
+ ],
4186
+ "wmuIsLightbox" => [
4187
+ "label" => esc_html__("Enable Lightbox for Attached Images", "wpdiscuz"),
4188
+ "label_original" => "Enable Lightbox for Attached Images",
4189
+ "description" => "",
4190
+ "description_original" => "",
4191
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#enable-lightbox-for-attached-images",
4192
+ ],
4193
+ "wmuMimeTypes" => [
4194
+ "label" => esc_html__("Allowed File Types", "wpdiscuz"),
4195
+ "label_original" => "Allowed File Types",
4196
+ "description" => "",
4197
+ "description_original" => "",
4198
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#allowed-file-types",
4199
+ ],
4200
+ "wmuMaxFileSize" => [
4201
+ "label" => esc_html__("Max Uploaded Size", "wpdiscuz"),
4202
+ "label_original" => "Max Uploaded Size",
4203
+ "description" => esc_html__("You can not set this value more than 'upload_max_filesize' and 'post_max_size'. If you want to increase server parameters please contact to your hosting service support.", "wpdiscuz"),
4204
+ "description_original" => "You can not set this value more than 'upload_max_filesize' and 'post_max_size'. If you want to increase server parameters please contact to your hosting service support.",
4205
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#max-uploaded-size",
4206
+ ],
4207
+ "wmuIsShowFilesDashboard" => [
4208
+ "label" => esc_html__("Show Comments Media in Dashboard", "wpdiscuz"),
4209
+ "label_original" => "Show Comments Media in Dashboard",
4210
+ "description" => "",
4211
+ "description_original" => "",
4212
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#show-comments-media-in-dashboard",
4213
+ ],
4214
+ "wmuSingleImageSize" => [
4215
+ "label" => esc_html__("Single Image Sizes in Comments", "wpdiscuz"),
4216
+ "label_original" => "Single Image Sizes in Comments",
4217
+ "description" => "",
4218
+ "description_original" => "",
4219
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#single-image-sizes-in-comments",
4220
+ ],
4221
+ "wmuImageSizes" => [
4222
+ "label" => esc_html__("Generate Thumbnail Sizes", "wpdiscuz"),
4223
+ "label_original" => "Generate Thumbnail Sizes",
4224
+ "description" => esc_html__("Once image is uploaded, it'll generate thumbnails according to your selected sizes. When you set up a new WordPress website, the platform gives you three image sizes to play with: thumbnail, medium, and large (plus the file's original resolution). You may have other options and sizes which are registered by current active theme and by other plugins.", "wpdiscuz"),
4225
+ "description_original" => "Once image is uploaded, it'll generate thumbnails according to your selected sizes. When you set up a new WordPress website, the platform gives you three image sizes to play with: thumbnail, medium, and large (plus the file's original resolution). You may have other options and sizes which are registered by current active theme and by other plugins.",
4226
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/#generate-thumbnail-sizes",
4227
+ ],
4228
+ ],
4229
+ ],
4230
+ WpdiscuzCore::TAB_LIVE => [
4231
+ "title" => esc_html__("Live Commenting and Notifications", "wpdiscuz"),
4232
+ "title_original" => "Live Commenting and Notifications",
4233
+ "icon" => "box-bubble.png",
4234
+ "icon-height" => "70px",
4235
+ "status" => "new",
4236
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_LIVE . ".php",
4237
+ "options" => [
4238
+ "bubble" => [
4239
+ "label" => esc_html__("Comment Bubble", "wpdiscuz"),
4240
+ "label_original" => "Comment Bubble",
4241
+ "description" => esc_html__("Comment Bubble is a real-time updating sticky comment icon on your web pages. It invites people to comment, displays current comments information and notifies current page viewers about new comments.", "wpdiscuz"),
4242
+ "description_original" => "Comment Bubble is a real-time updating sticky comment icon on your web pages. It invites people to comment, displays current comments information and notifies current page viewers about new comments.",
4243
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#comment-bubble",
4244
+ ],
4245
+ "bubbleLiveUpdate" => [
4246
+ "label" => esc_html__("Comment Bubble Live Update", "wpdiscuz"),
4247
+ "label_original" => "Comment Bubble Live Update",
4248
+ "description" => "",
4249
+ "description_original" => "",
4250
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#comment-bubble-live-update",
4251
+ ],
4252
+ "bubbleLocation" => [
4253
+ "label" => esc_html__("Comment Bubble Location", "wpdiscuz"),
4254
+ "label_original" => "Comment Bubble Location",
4255
+ "description" => "",
4256
+ "description_original" => "",
4257
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#comment-bubble-location",
4258
+ ],
4259
+ "bubbleShowNewCommentMessage" => [
4260
+ "label" => esc_html__("Bubble - Notify on New Comments", "wpdiscuz"),
4261
+ "label_original" => "Bubble - Notify on New Comments",
4262
+ "description" => esc_html__("If the Bubble live update is enabled, it shows new comments excerpts as a pop-up information to article reads in real-time. This keeps website visitors up to date and engages them join to the discussion.", "wpdiscuz"),
4263
+ "description_original" => "If the Bubble live update is enabled, it shows new comments excerpts as a pop-up information to article reads in real-time. This keeps website visitors up to date and engages them join to the discussion.",
4264
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#bubble-%E2%80%93-notify-on-new-comments",
4265
+ ],
4266
+ "bubbleHintTimeout" => [
4267
+ "label" => esc_html__("Bubble - Invite to comment in X seconds", "wpdiscuz"),
4268
+ "label_original" => "Bubble - Invite to comment in X seconds",
4269
+ "description" => esc_html__("In most cases article readers don't even think about leaving some comment. Using this option you can enable Bubble &laquo;Invite to Comment&raquo; message. Once page is loaded and visitor has read some content, it reminds about comments and calls to leave a reply.", "wpdiscuz"),
4270
+ "description_original" => "In most cases article readers don't even think about leaving some comment. Using this option you can enable Bubble &laquo;Invite to Comment&raquo; message. Once page is loaded and visitor has read some content, it reminds about comments and calls to leave a reply.",
4271
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#bubble-%E2%80%93-invite-to-comment-in-x-seconds",
4272
+ ],
4273
+ "bubbleHintHideTimeout" => [
4274
+ "label" => esc_html__("Bubble - Hide the invitation message in X seconds", "wpdiscuz"),
4275
+ "label_original" => "Bubble - Hide the invitation message in X seconds",
4276
+ "description" => "",
4277
+ "description_original" => "",
4278
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#bubble-%E2%80%93-hide-the-invitation-message-in-x-seconds",
4279
+ ],
4280
+ "commentListUpdateType" => [
4281
+ "label" => esc_html__("Live Update", "wpdiscuz"),
4282
+ "label_original" => "Live Update",
4283
+ "description" => esc_html__("wpDiscuz live update is very light and doesn't overload your server. However we recommend to monitor your server resources if you're on a Shared hosting plan. There are some very weak hosting plans which may not be able to perform very frequently live update requests. If you found some issue you can set the option below 30 seconds or more.", "wpdiscuz"),
4284
+ "description_original" => "wpDiscuz live update is very light and doesn't overload your server. However we recommend to monitor your server resources if you're on a Shared hosting plan. There are some very weak hosting plans which may not be able to perform very frequently live update requests. If you found some issue you can set the option below 30 seconds or more.",
4285
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#live-update",
4286
+ ],
4287
+ "liveUpdateGuests" => [
4288
+ "label" => esc_html__("Enable Live Update for Guests", "wpdiscuz"),
4289
+ "label_original" => "Enable Live Update for Guests",
4290
+ "description" => "",
4291
+ "description_original" => "",
4292
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#enable-live-update-for-guests",
4293
+ ],
4294
+ "commentListUpdateTimer" => [
4295
+ "label" => esc_html__("Update Comment List Every", "wpdiscuz"),
4296
+ "label_original" => "Update Comment List Every",
4297
+ "description" => "",
4298
+ "description_original" => "",
4299
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/live-commenting-and-notifications/#update-comment-list-every-x-seconds",
4300
+ ],
4301
+ ],
4302
+ ],
4303
+ WpdiscuzCore::TAB_INLINE => [
4304
+ "title" => esc_html__("Inline Commenting", "wpdiscuz"),
4305
+ "title_original" => "Inline Commenting",
4306
+ "icon" => "box-feedback.png",
4307
+ "icon-height" => "56px",
4308
+ "status" => "new",
4309
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_INLINE . ".php",
4310
+ "options" => [
4311
+ "showInlineFilterButton" => [
4312
+ "label" => esc_html__("Display filter button to load inline feedbacks", "wpdiscuz"),
4313
+ "label_original" => "Display filter button to load inline feedbacks",
4314
+ "description" => esc_html__("This filter button appears next to all filter buttons and comment sorting options. It allows to filter and display article inline feedbacks (comments made while reading current article).", "wpdiscuz"),
4315
+ "description_original" => "This filter button appears next to all filter buttons and comment sorting options. It allows to filter and display article inline feedbacks (comments made while reading current article).",
4316
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/inline-commenting/#display-filter-button-to-load-inline-feedbacks",
4317
+ ],
4318
+ "inlineFeedbackAttractionType" => [
4319
+ "label" => esc_html__('Animation for "Leave a Feedback" button in article content', "wpdiscuz"),
4320
+ "label_original" => 'Animation for "Leave a Feedback" button in article content',
4321
+ "description" => esc_html__('Once a question is added in article editor (backend), readers will see a small comment icon (call to leave a feedback) next to the text part you\'ve selected for your question on article (front-end). This icon calls people to leave a feedback, using the type you\'ve selected in this option. For example, if you\'ve chosen the "Blink" option, once reader scrolled and reached to the article text with question, it animates with comment button size and color changes attracting readers attention.', "wpdiscuz"),
4322
+ "description_original" => 'Once a question is added in article editor (backend), readers will see a small comment icon (call to leave a feedback) next to the text part you\'ve selected for your question on article (front-end). This icon calls people to leave a feedback, using the type you\'ve selected in this option. For example, if you\'ve chosen the "Blink" option, once reader scrolled and reached to the article text with question, it animates with comment button size and color changes attracting readers attention.',
4323
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/inline-commenting/#animation-for-%E2%80%9Cleave-a-feedback%E2%80%9D-button-in-article-content",
4324
+ ],
4325
+ ],
4326
+ ],
4327
+ WpdiscuzCore::TAB_GENERAL => [
4328
+ "title" => esc_html__("General Settings", "wpdiscuz"),
4329
+ "title_original" => "General Settings",
4330
+ "icon" => "box-general.png",
4331
+ "icon-height" => "56px",
4332
+ "status" => "ok",
4333
+ "file_path" => WPDISCUZ_DIR_PATH . "/options/options-layouts/html-" . WpdiscuzCore::TAB_GENERAL . ".php",
4334
+ "options" => [
4335
+ "isEnableOnHome" => [
4336
+ "label" => esc_html__("Enable wpDiscuz on Home Page", "wpdiscuz"),
4337
+ "label_original" => "Enable wpDiscuz on Home Page",
4338
+ "description" => "",
4339
+ "description_original" => "",
4340
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#enable-wpdiscuz-on-home-page",
4341
+ ],
4342
+ "isNativeAjaxEnabled" => [
4343
+ "label" => esc_html__("Use WordPress native AJAX functions", "wpdiscuz"),
4344
+ "label_original" => "Use WordPress native AJAX functions",
4345
+ "description" => esc_html__("By disabling this option you're automatically enabling wpDiscuz custom AJAX functions, which are many times faster that the default WordPress functions. Just make sure it doesn't conflict with your plugins.", "wpdiscuz"),
4346
+ "description_original" => "By disabling this option you're automatically enabling wpDiscuz custom AJAX functions, which are many times faster that the default WordPress functions. Just make sure it doesn't conflict with your plugins.",
4347
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#use-wordpress-native-ajax-functions",
4348
+ ],
4349
+ "loadComboVersion" => [
4350
+ "label" => esc_html__("Combine JS and CSS Files to Optimize Page Loading Speed", "wpdiscuz"),
4351
+ "label_original" => "Combine JS and CSS Files to Optimize Page Loading Speed",
4352
+ "description" => "",
4353
+ "description_original" => "",
4354
+ "docurl" => "",
4355
+ ],
4356
+ "loadMinVersion" => [
4357
+ "label" => esc_html__("Minify JS and CSS Files to Optimize Page Loading Speed", "wpdiscuz"),
4358
+ "label_original" => "Minify JS and CSS Files to Optimize Page Loading Speed",
4359
+ "description" => "",
4360
+ "description_original" => "",
4361
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#load-min-versions",
4362
+ ],
4363
+ "commentLinkFilter" => [
4364
+ "label" => esc_html__("Secure comment content in HTTPS protocol.", "wpdiscuz"),
4365
+ "label_original" => "Secure comment content in HTTPS protocol.",
4366
+ "description" => esc_html__("This option detects images and other contents with non-https source URLs and fix according to your selected logic.", "wpdiscuz"),
4367
+ "description_original" => "This option detects images and other contents with non-https source URLs and fix according to your selected logic.",
4368
+ "docurl" => "",
4369
+ ],
4370
+ "redirectPage" => [
4371
+ "label" => esc_html__("Redirect First Comment to", "wpdiscuz"),
4372
+ "label_original" => "Redirect First Comment to",
4373
+ "description" => "",
4374
+ "description_original" => "",
4375
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#redirect-first-comment-to",
4376
+ ],
4377
+ "simpleCommentDate" => [
4378
+ "label" => esc_html__("Use WordPress Date/Time Format", "wpdiscuz"),
4379
+ "label_original" => "Use WordPress Date/Time Format",
4380
+ "description" => esc_html__("wpDiscuz shows Human Readable date format. If you check this option it'll show the date/time format set in WordPress General Settings.", "wpdiscuz"),
4381
+ "description_original" => "wpDiscuz shows Human Readable date format. If you check this option it'll show the date/time format set in WordPress General Settings.",
4382
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#use-wordpress-date-time-format",
4383
+ ],
4384
+ "dateDiffFormat" => [
4385
+ "label" => esc_html__("Structure of Human Readable Date Format", "wpdiscuz"),
4386
+ "label_original" => "Structure of Human Readable Date Format",
4387
+ "description" => esc_html__("By default, comment date is displayed with the human readable format, such as [X days ago]. For some languages, you may need to change the sequence of words in this date. This option provides shordcodes for each word allowing you manage the order. [number] is the 'X', [time_unit] is the 'days', [adjective] is the 'ago'.", "wpdiscuz"),
4388
+ "description_original" => "By default, comment date is displayed with the human readable format, such as [X days ago]. For some languages, you may need to change the sequence of words in this date. This option provides shordcodes for each word allowing you manage the order. [number] is the 'X', [time_unit] is the 'days', [adjective] is the 'ago'.",
4389
+ "docurl" => "https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/general-settings/#structure-of-human-readable-date-format",
4390
+ ],
4391
+ "isUsePoMo" => [
4392
+ "label" => esc_html__("Use Plugin .PO/.MO Files", "wpdiscuz"),
4393
+ "label_original" => "Use Plugin .PO/.MO Files",
4394
+ "description" => esc_html__("wpDiscuz phrase system allows you to translate all front-end phrases. However if you have a multi-language website it'll not allow you to add more than one language translation. The only way to get it is the plugin translation files (.PO / .MO). If wpDiscuz has the languages you need you should check this option to disable phrase system and it'll automatically translate all phrases based on language files according to current language.", "wpdiscuz"),
4395
+ "description_original" => "wpDiscuz phrase system allows you to translate all front-end phrases. However if you have a multi-language website it'll not all