Version Description
Download this release
Release Info
Developer | taron96 |
Plugin | 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 +1 -1
- assets/js/wpdiscuz-combo-no_quill.min.js +1 -1
- assets/js/wpdiscuz-combo.min.js +1 -1
- assets/js/wpdiscuz.js +28 -5
- assets/js/wpdiscuz.min.js +1 -1
- class.WpdiscuzCore.php +12 -8
- forms/wpdFormAttr/Field/CookiesConsent.php +2 -1
- forms/wpdFormAttr/Form.php +3 -2
- includes/class.WpdiscuzDBManager.php +34 -9
- includes/class.WpdiscuzRest.php +109 -99
- options/class.WpdiscuzOptions.php +4256 -3797
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,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").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,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").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,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").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,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").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 (
|
22 |
for (var i in message) {
|
23 |
-
if (
|
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(
|
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.
|
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
|
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 |
-
|
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 (
|
|
|
|
|
|
|
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 |
-
|
|
|
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 |
-
|
263 |
-
|
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
|
1127 |
$this->db->query($sql_alter);
|
1128 |
-
$sql_alter = "ALTER TABLE `{$this->
|
1129 |
$this->db->query($sql_alter);
|
1130 |
-
$sql_alter = "ALTER TABLE `{$this->
|
1131 |
$this->db->query($sql_alter);
|
1132 |
-
$sql_alter = "ALTER TABLE `{$this->
|
1133 |
$this->db->query($sql_alter);
|
1134 |
-
$sql_alter = "ALTER TABLE `{$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
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 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
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 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
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 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
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 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
|
|
|
|
|
|
75 |
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
|
|
|
|
|
|
1151 |
|
1152 |
-
|
1153 |
-
|
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 |
-
|
1164 |
},
|
1165 |
-
placeholder:
|
1166 |
theme: 'snow',
|
1167 |
debug: '<?php echo $this->general["loadComboVersion"] || $this->general["loadMinVersion"] ? 'error' : 'warn'; ?>'
|
1168 |
};
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1204 |
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
|
|
|
|
|
|
1460 |
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
|
1676 |
-
|
1677 |
-
|
1678 |
|
1679 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1680 |
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
|
1733 |
-
|
1734 |
-
|
1735 |
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
|
1740 |
-
|
1741 |
|
1742 |
-
|
1743 |
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1839 |
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1892 |
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
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 |
-
|
1903 |
-
|
1904 |
</p>
|
1905 |
<div style="font-size:14px;">
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1917 |
<div style="clear:both;"></div>
|
1918 |
</div>
|
1919 |
-
<p> <a
|
|
|
|
|
1920 |
</div>
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
1959 |
-
|
1960 |
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
1977 |
-
|
1978 |
-
|
1979 |
-
<script language="javascript">jQuery(document).ready(function
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
|
|
1992 |
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
1997 |
-
|
1998 |
-
|
1999 |
<div class='notice notice-warning'>
|
2000 |
<p style="font-size: 14px; font-weight: 600;">
|
2001 |
-
|
2002 |
-
<a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_SETTINGS . "&wpd_wizard=1")); ?>"
|
|
|
2003 |
</p>
|
2004 |
</div>
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
<div class='notice notice-warning'>
|
2010 |
<p>
|
2011 |
-
|
2012 |
</p>
|
2013 |
</div>
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
<div class='notice notice-warning'>
|
2019 |
<p>
|
2020 |
-
|
2021 |
-
<a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>"
|
|
|
2022 |
</p>
|
2023 |
</div>
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
<div class='notice notice-warning'>
|
2029 |
<p>
|
2030 |
-
|
2031 |
-
<a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>"
|
|
|
2032 |
</p>
|
2033 |
</div>
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
<div class='notice notice-warning'>
|
2039 |
<p>
|
2040 |
-
|
2041 |
-
<a href="<?php echo esc_url_raw(admin_url("admin.php?page=" . self::PAGE_TOOLS . "#wpdtool-regenerate")); ?>"
|
|
|
2042 |
</p>
|
2043 |
</div>
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
<div class='notice notice-warning'>
|
2049 |
<p>
|
2050 |
-
|
2051 |
-
|
|
|
|
|
2052 |
</p>
|
2053 |
</div>
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
|
2080 |
-
|
2081 |
-
|
2082 |
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
|
|
|
|
|
|
2093 |
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
|
2106 |
-
|
2107 |
-
|
2108 |
-
|
2109 |
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
|
2167 |
-
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
-
|
2191 |
-
|
2192 |
-
|
2193 |
-
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
|
2202 |
-
|
2203 |
-
|
2204 |
-
|
2205 |
-
|
2206 |
-
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
|
2225 |
-
|
2226 |
-
|
2227 |
-
|
2228 |
-
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
|
2234 |
-
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
2238 |
-
|
2239 |
-
|
2240 |
-
|
2241 |
-
|
2242 |
-
|
2243 |
-
|
2244 |
-
|
2245 |
-
|
2246 |
-
|
2247 |
-
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
2253 |
-
|
2254 |
-
|
2255 |
-
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
|
2260 |
-
|
2261 |
-
|
2262 |
-
|
2263 |
-
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
|
2268 |
-
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
2286 |
-
|
2287 |
-
|
2288 |
-
|
2289 |
-
|
2290 |
-
|
2291 |
-
|
2292 |
-
|
2293 |
-
|
2294 |
-
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
2298 |
-
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
2319 |
-
|
2320 |
-
|
2321 |
-
|
2322 |
-
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
-
|
2338 |
-
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
2342 |
-
|
2343 |
-
|
2344 |
-
|
2345 |
-
|
2346 |
-
|
2347 |
-
|
2348 |
-
|
2349 |
-
|
2350 |
-
|
2351 |
-
|
2352 |
-
|
2353 |
-
|
2354 |
-
|
2355 |
-
|
2356 |
-
|
2357 |
-
|
2358 |
-
|
2359 |
-
|
2360 |
-
|
2361 |
-
|
2362 |
-
|
2363 |
-
|
2364 |
-
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
|
2370 |
-
|
2371 |
-
|
2372 |
-
|
2373 |
-
|
2374 |
-
|
2375 |
-
|
2376 |
-
|
2377 |
-
|
2378 |
-
|
2379 |
-
|
2380 |
-
|
2381 |
-
|
2382 |
-
|
2383 |
-
|
2384 |
-
|
2385 |
-
|
2386 |
-
|
2387 |
-
|
2388 |
-
|
2389 |
-
|
2390 |
-
|
2391 |
-
|
2392 |
-
|
2393 |
-
|
2394 |
-
|
2395 |
-
|
2396 |
-
|
2397 |
-
|
2398 |
-
|
2399 |
-
|
2400 |
-
|
2401 |
-
|
2402 |
-
|
2403 |
-
|
2404 |
-
|
2405 |
-
|
2406 |
-
|
2407 |
-
|
2408 |
-
|
2409 |
-
|
2410 |
-
|
2411 |
-
|
2412 |
-
|
2413 |
-
|
2414 |
-
|
2415 |
-
|
2416 |
-
|
2417 |
-
|
2418 |
-
|
2419 |
-
|
2420 |
-
|
2421 |
-
|
2422 |
-
|
2423 |
-
|
2424 |
-
|
2425 |
-
|
2426 |
-
|
2427 |
-
|
2428 |
-
|
2429 |
-
|
2430 |
-
|
2431 |
-
|
2432 |
-
|
2433 |
-
|
2434 |
-
|
2435 |
-
|
2436 |
-
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
-
|
2441 |
-
|
2442 |
-
|
2443 |
-
|
2444 |
-
|
2445 |
-
|
2446 |
-
|
2447 |
-
|
2448 |
-
|
2449 |
-
|
2450 |
-
|
2451 |
-
|
2452 |
-
|
2453 |
-
|
2454 |
-
|
2455 |
-
|
2456 |
-
|
2457 |
-
|
2458 |
-
|
2459 |
-
|
2460 |
-
|
2461 |
-
|
2462 |
-
|
2463 |
-
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
|
2468 |
-
|
2469 |
-
|
2470 |
-
|
2471 |
-
|
2472 |
-
|
2473 |
-
|
2474 |
-
|
2475 |
-
|
2476 |
-
|
2477 |
-
|
2478 |
-
|
2479 |
-
|
2480 |
-
|
2481 |
-
|
2482 |
-
|
2483 |
-
|
2484 |
-
|
2485 |
-
|
2486 |
-
|
2487 |
-
|
2488 |
-
|
2489 |
-
|
2490 |
-
|
2491 |
-
|
2492 |
-
|
2493 |
-
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
2497 |
-
|
2498 |
-
|
2499 |
-
|
2500 |
-
|
2501 |
-
|
2502 |
-
|
2503 |
-
|
2504 |
-
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
|
2510 |
-
|
2511 |
-
|
2512 |
-
|
2513 |
-
|
2514 |
-
|
2515 |
-
|
2516 |
-
|
2517 |
-
|
2518 |
-
|
2519 |
-
|
2520 |
-
|
2521 |
-
|
2522 |
-
|
2523 |
-
|
2524 |
-
|
2525 |
-
|
2526 |
-
|
2527 |
-
|
2528 |
-
|
2529 |
-
|
2530 |
-
|
2531 |
-
|
2532 |
-
|
2533 |
-
|
2534 |
-
|
2535 |
-
|
2536 |
-
|
2537 |
-
|
2538 |
-
|
2539 |
-
|
2540 |
-
|
2541 |
-
|
2542 |
-
|
2543 |
-
|
2544 |
-
|
2545 |
-
|
2546 |
-
|
2547 |
-
|
2548 |
-
|
2549 |
-
|
2550 |
-
|
2551 |
-
|
2552 |
-
|
2553 |
-
|
2554 |
-
|
2555 |
-
|
2556 |
-
|
2557 |
-
|
2558 |
-
|
2559 |
-
|
2560 |
-
|
2561 |
-
|
2562 |
-
|
2563 |
-
|
2564 |
|
2565 |
-
|
2566 |
-
|
2567 |
-
|
2568 |
-
|
2569 |
-
|
2570 |
|
2571 |
-
|
2572 |
-
|
2573 |
-
|
2574 |
-
|
2575 |
-
|
2576 |
-
|
2577 |
-
|
2578 |
-
|
2579 |
-
|
2580 |
-
|
2581 |
-
|
2582 |
-
|
2583 |
-
|
2584 |
-
|
2585 |
-
|
2586 |
-
|
2587 |
-
|
2588 |
-
|
2589 |
-
|
2590 |
-
|
2591 |
-
|
2592 |
-
|
2593 |
-
|
2594 |
-
|
2595 |
-
|
2596 |
-
|
2597 |
-
|
2598 |
-
|
2599 |
-
|
2600 |
-
|
2601 |
-
|
2602 |
-
|
2603 |
-
|
2604 |
-
|
2605 |
-
|
2606 |
-
|
2607 |
-
|
2608 |
-
|
2609 |
-
|
2610 |
-
|
2611 |
-
|
2612 |
-
|
2613 |
-
|
2614 |
-
|
2615 |
-
|
2616 |
-
|
2617 |
-
|
2618 |
-
|
2619 |
-
|
2620 |
-
|
2621 |
-
|
2622 |
-
|
2623 |
-
|
2624 |
-
|
2625 |
-
|
2626 |
-
|
2627 |
-
|
2628 |
-
|
2629 |
-
|
2630 |
-
|
2631 |
-
|
2632 |
-
|
2633 |
-
|
2634 |
-
|
2635 |
-
|
2636 |
-
|
2637 |
-
|
2638 |
-
|
2639 |
-
|
2640 |
-
|
2641 |
-
|
2642 |
-
|
2643 |
-
|
2644 |
-
|
2645 |
-
|
2646 |
-
|
2647 |
-
|
2648 |
-
|
2649 |
-
|
2650 |
-
|
2651 |
-
|
2652 |
-
|
2653 |
-
|
2654 |
-
|
2655 |
-
|
2656 |
-
|
2657 |
-
|
2658 |
-
|
2659 |
-
|
2660 |
-
|
2661 |
-
|
2662 |
-
|
2663 |
-
|
2664 |
-
|
2665 |
-
|
2666 |
-
|
2667 |
-
|
2668 |
-
|
2669 |
-
|
2670 |
-
|
2671 |
-
|
2672 |
-
|
2673 |
-
|
2674 |
-
|
2675 |
-
|
2676 |
-
|
2677 |
-
|
2678 |
-
|
2679 |
-
|
2680 |
-
|
2681 |
-
|
2682 |
-
|
2683 |
-
|
2684 |
-
|
2685 |
-
|
2686 |
-
|
2687 |
-
|
2688 |
-
|
2689 |
-
|
2690 |
-
|
2691 |
-
|
2692 |
-
|
2693 |
-
|
2694 |
-
|
2695 |
-
|
2696 |
-
|
2697 |
-
|
2698 |
-
|
2699 |
-
|
2700 |
-
|
2701 |
-
|
2702 |
-
|
2703 |
-
|
2704 |
-
|
2705 |
-
|
2706 |
-
|
2707 |
-
|
2708 |
-
|
2709 |
-
|
2710 |
-
|
2711 |
-
|
2712 |
-
|
2713 |
-
|
2714 |
-
|
2715 |
-
|
2716 |
-
|
2717 |
-
|
2718 |
-
|
2719 |
-
|
2720 |
-
|
2721 |
-
|
2722 |
-
|
2723 |
-
|
2724 |
-
|
2725 |
-
|
2726 |
-
|
2727 |
-
|
2728 |
-
|
2729 |
-
|
2730 |
-
|
2731 |
-
|
2732 |
-
|
2733 |
-
|
2734 |
-
|
2735 |
-
|
2736 |
-
|
2737 |
-
|
2738 |
-
|
2739 |
-
|
2740 |
-
|
2741 |
-
|
2742 |
-
|
2743 |
-
|
2744 |
-
|
2745 |
-
|
2746 |
-
|
2747 |
-
|
2748 |
-
|
2749 |
-
|
2750 |
-
|
2751 |
-
|
2752 |
-
|
2753 |
-
|
2754 |
-
|
2755 |
-
|
2756 |
-
|
2757 |
-
|
2758 |
-
|
2759 |
-
|
2760 |
-
|
2761 |
-
|
2762 |
-
|
2763 |
-
|
2764 |
-
|
2765 |
-
|
2766 |
-
|
2767 |
-
|
2768 |
-
|
2769 |
-
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
2773 |
-
|
2774 |
-
|
2775 |
-
|
2776 |
-
|
2777 |
-
|
2778 |
-
|
2779 |
-
|
2780 |
-
|
2781 |
-
|
2782 |
-
|
2783 |
-
|
2784 |
-
|
2785 |
-
|
2786 |
-
|
2787 |
-
|
2788 |
-
|
2789 |
-
|
2790 |
-
|
2791 |
-
|
2792 |
-
|
2793 |
-
|
2794 |
-
|
2795 |
-
|
2796 |
-
|
2797 |
-
|
2798 |
-
|
2799 |
-
|
2800 |
-
|
2801 |
-
|
2802 |
-
|
2803 |
-
|
2804 |
-
|
2805 |
-
|
2806 |
-
|
2807 |
-
|
2808 |
-
|
2809 |
-
|
2810 |
-
|
2811 |
-
|
2812 |
-
|
2813 |
-
|
2814 |
-
|
2815 |
-
|
2816 |
-
|
2817 |
-
|
2818 |
-
|
2819 |
-
|
2820 |
-
|
2821 |
-
|
2822 |
-
|
2823 |
-
|
2824 |
-
|
2825 |
-
|
2826 |
-
|
2827 |
-
|
2828 |
-
|
2829 |
-
|
2830 |
-
|
2831 |
-
|
2832 |
-
|
2833 |
-
|
2834 |
-
|
2835 |
-
|
2836 |
-
|
2837 |
-
|
2838 |
-
|
2839 |
-
|
2840 |
-
|
2841 |
-
|
2842 |
-
|
2843 |
-
|
2844 |
-
|
2845 |
-
|
2846 |
-
|
2847 |
-
|
2848 |
-
|
2849 |
-
|
2850 |
-
|
2851 |
-
|
2852 |
-
|
2853 |
-
|
2854 |
-
|
2855 |
-
|
2856 |
-
|
2857 |
-
|
2858 |
-
|
2859 |
-
|
2860 |
-
|
2861 |
-
|
2862 |
-
|
2863 |
-
|
2864 |
-
|
2865 |
-
|
2866 |
-
|
2867 |
-
|
2868 |
-
|
2869 |
-
|
2870 |
-
|
2871 |
-
|
2872 |
-
|
2873 |
-
|
2874 |
-
|
2875 |
-
|
2876 |
-
|
2877 |
-
|
2878 |
-
|
2879 |
-
|
2880 |
-
|
2881 |
-
|
2882 |
-
|
2883 |
-
|
2884 |
-
|
2885 |
-
|
2886 |
-
|
2887 |
-
|
2888 |
-
|
2889 |
-
|
2890 |
-
|
2891 |
-
|
2892 |
-
|
2893 |
-
|
2894 |
-
|
2895 |
-
|
2896 |
-
|
2897 |
-
|
2898 |
-
|
2899 |
-
|
2900 |
-
|
2901 |
-
|
2902 |
-
|
2903 |
-
|
2904 |
-
|
2905 |
-
|
2906 |
-
|
2907 |
-
|
2908 |
-
|
2909 |
-
|
2910 |
-
|
2911 |
-
|
2912 |
-
|
2913 |
-
|
2914 |
-
|
2915 |
-
|
2916 |
-
|
2917 |
-
|
2918 |
-
|
2919 |
-
|
2920 |
-
|
2921 |
-
|
2922 |
-
|
2923 |
-
|
2924 |
-
|
2925 |
-
|
2926 |
-
|
2927 |
-
|
2928 |
-
|
2929 |
-
|
2930 |
-
|
2931 |
-
|
2932 |
-
|
2933 |
-
|
2934 |
-
|
2935 |
-
|
2936 |
-
|
2937 |
-
|
2938 |
-
|
2939 |
-
|
2940 |
-
|
2941 |
-
|
2942 |
-
|
2943 |
-
|
2944 |
-
|
2945 |
-
|
2946 |
-
|
2947 |
-
|
2948 |
-
|
2949 |
-
|
2950 |
-
|
2951 |
-
|
2952 |
-
|
2953 |
-
|
2954 |
-
|
2955 |
-
|
2956 |
-
|
2957 |
-
|
2958 |
-
|
2959 |
-
|
2960 |
-
|
2961 |
-
|
2962 |
-
|
2963 |
-
|
2964 |
-
|
2965 |
-
|
2966 |
-
|
2967 |
-
|
2968 |
-
|
2969 |
-
|
2970 |
-
|
2971 |
-
|
2972 |
-
|
2973 |
-
|
2974 |
-
|
2975 |
-
|
2976 |
-
|
2977 |
-
|
2978 |
-
|
2979 |
-
|
2980 |
-
|
2981 |
-
|
2982 |
-
|
2983 |
-
|
2984 |
-
|
2985 |
-
|
2986 |
-
|
2987 |
-
|
2988 |
-
|
2989 |
-
|
2990 |
-
|
2991 |
-
|
2992 |
-
|
2993 |
-
|
2994 |
-
|
2995 |
-
|
2996 |
-
|
2997 |
-
|
2998 |
-
|
2999 |
-
|
3000 |
-
|
3001 |
-
|
3002 |
-
|
3003 |
-
|
3004 |
-
|
3005 |
-
|
3006 |
-
|
3007 |
-
|
3008 |
-
|
3009 |
-
|
3010 |
-
|
3011 |
-
|
3012 |
-
|
3013 |
-
|
3014 |
-
|
3015 |
-
|
3016 |
-
|
3017 |
-
|
3018 |
-
|
3019 |
-
|
3020 |
-
|
3021 |
-
|
3022 |
-
|
3023 |
-
|
3024 |
-
|
3025 |
-
|
3026 |
-
|
3027 |
-
|
3028 |
-
|
3029 |
-
|
3030 |
-
|
3031 |
-
|
3032 |
-
|
3033 |
-
|
3034 |
-
|
3035 |
-
|
3036 |
-
|
3037 |
-
|
3038 |
-
|
3039 |
-
|
3040 |
-
|
3041 |
-
|
3042 |
-
|
3043 |
-
|
3044 |
-
|
3045 |
-
|
3046 |
-
|
3047 |
-
|
3048 |
-
|
3049 |
-
|
3050 |
-
|
3051 |
-
|
3052 |
-
|
3053 |
-
|
3054 |
-
|
3055 |
-
|
3056 |
-
|
3057 |
-
|
3058 |
-
|
3059 |
-
|
3060 |
-
|
3061 |
-
|
3062 |
-
|
3063 |
-
|
3064 |
-
|
3065 |
-
|
3066 |
-
|
3067 |
-
|
3068 |
-
|
3069 |
-
|
3070 |
-
|
3071 |
-
|
3072 |
-
|
3073 |
-
|
3074 |
-
|
3075 |
-
|
3076 |
-
|
3077 |
-
|
3078 |
-
|
3079 |
-
|
3080 |
-
|
3081 |
-
|
3082 |
-
|
3083 |
-
|
3084 |
-
|
3085 |
-
|
3086 |
-
|
3087 |
-
|
3088 |
-
|
3089 |
-
|
3090 |
-
|
3091 |
-
|
3092 |
-
|
3093 |
-
|
3094 |
-
|
3095 |
-
|
3096 |
-
|
3097 |
-
|
3098 |
-
|
3099 |
-
|
3100 |
-
|
3101 |
-
|
3102 |
-
|
3103 |
-
|
3104 |
-
|
3105 |
-
|
3106 |
-
|
3107 |
-
|
3108 |
-
|
3109 |
-
|
3110 |
-
|
3111 |
-
|
3112 |
-
|
3113 |
-
|
3114 |
-
|
3115 |
-
|
3116 |
-
|
3117 |
-
|
3118 |
-
|
3119 |
-
|
3120 |
-
|
3121 |
-
|
3122 |
-
|
3123 |
-
|
3124 |
-
|
3125 |
-
|
3126 |
-
|
3127 |
-
|
3128 |
-
|
3129 |
-
|
3130 |
-
|
3131 |
-
|
3132 |
-
|
3133 |
-
|
3134 |
-
|
3135 |
-
|
3136 |
-
|
3137 |
-
|
3138 |
-
|
3139 |
-
|
3140 |
-
|
3141 |
-
|
3142 |
-
|
3143 |
-
|
3144 |
-
|
3145 |
-
|
3146 |
-
|
3147 |
-
|
3148 |
-
|
3149 |
-
|
3150 |
-
|
3151 |
-
|
3152 |
-
|
3153 |
-
|
3154 |
-
|
3155 |
-
|
3156 |
-
|
3157 |
-
|
3158 |
-
|
3159 |
-
|
3160 |
-
|
3161 |
-
|
3162 |
-
|
3163 |
-
|
3164 |
-
|
3165 |
-
|
3166 |
-
|
3167 |
-
|
3168 |
-
|
3169 |
-
|
3170 |
-
|
3171 |
-
|
3172 |
-
|
3173 |
-
|
3174 |
-
|
3175 |
-
|
3176 |
-
|
3177 |
-
|
3178 |
-
|
3179 |
-
|
3180 |
-
|
3181 |
-
|
3182 |
-
|
3183 |
-
|
3184 |
-
|
3185 |
-
|
3186 |
-
|
3187 |
-
|
3188 |
-
|
3189 |
-
|
3190 |
-
|
3191 |
-
|
3192 |
-
|
3193 |
-
|
3194 |
-
|
3195 |
-
|
3196 |
-
|
3197 |
-
|
3198 |
-
|
3199 |
-
|
3200 |
-
|
3201 |
-
|
3202 |
-
|
3203 |
-
|
3204 |
-
|
3205 |
-
|
3206 |
-
|
3207 |
-
|
3208 |
-
|
3209 |
-
|
3210 |
-
|
3211 |
-
|
3212 |
-
|
3213 |
-
|
3214 |
-
|
3215 |
-
|
3216 |
-
|
3217 |
-
|
3218 |
-
|
3219 |
-
|
3220 |
-
|
3221 |
-
|
3222 |
-
|
3223 |
-
|
3224 |
-
|
3225 |
-
|
3226 |
-
|
3227 |
-
|
3228 |
-
|
3229 |
-
|
3230 |
-
|
3231 |
-
|
3232 |
-
|
3233 |
-
|
3234 |
-
|
3235 |
-
|
3236 |
-
|
3237 |
-
|
3238 |
-
|
3239 |
-
|
3240 |
-
|
3241 |
-
|
3242 |
-
|
3243 |
-
|
3244 |
-
|
3245 |
-
|
3246 |
-
|
3247 |
-
|
3248 |
-
|
3249 |
-
|
3250 |
-
|
3251 |
-
|
3252 |
-
|
3253 |
-
|
3254 |
-
|
3255 |
-
|
3256 |
-
|
3257 |
-
|
3258 |
-
|
3259 |
-
|
3260 |
-
|
3261 |
-
|
3262 |
-
|
3263 |
-
|
3264 |
-
|
3265 |
-
|
3266 |
-
|
3267 |
-
|
3268 |
-
|
3269 |
-
|
3270 |
-
|
3271 |
-
|
3272 |
-
|
3273 |
-
|
3274 |
-
|
3275 |
-
|
3276 |
-
|
3277 |
-
|
3278 |
-
|
3279 |
-
|
3280 |
-
|
3281 |
-
|
3282 |
-
|
3283 |
-
|
3284 |
-
|
3285 |
-
|
3286 |
-
|
3287 |
-
|
3288 |
-
|
3289 |
-
|
3290 |
-
|
3291 |
-
|
3292 |
-
|
3293 |
-
|
3294 |
-
|
3295 |
-
|
3296 |
-
|
3297 |
-
|
3298 |
-
|
3299 |
-
|
3300 |
-
|
3301 |
-
|
3302 |
-
|
3303 |
-
|
3304 |
-
|
3305 |
-
|
3306 |
-
|
3307 |
-
|
3308 |
-
|
3309 |
-
|
3310 |
-
|
3311 |
-
|
3312 |
-
|
3313 |
-
|
3314 |
-
|
3315 |
-
|
3316 |
-
|
3317 |
-
|
3318 |
-
|
3319 |
-
|
3320 |
-
|
3321 |
-
|
3322 |
-
|
3323 |
-
|
3324 |
-
|
3325 |
-
|
3326 |
-
|
3327 |
-
|
3328 |
-
|
3329 |
-
|
3330 |
-
|
3331 |
-
|
3332 |
-
|
3333 |
-
|
3334 |
-
|
3335 |
-
|
3336 |
-
|
3337 |
-
|
3338 |
-
|
3339 |
-
|
3340 |
-
|
3341 |
-
|
3342 |
-
|
3343 |
-
|
3344 |
-
|
3345 |
-
|
3346 |
-
|
3347 |
-
|
3348 |
-
|
3349 |
-
|
3350 |
-
|
3351 |
-
|
3352 |
-
|
3353 |
-
|
3354 |
-
|
3355 |
-
|
3356 |
-
|
3357 |
-
|
3358 |
-
|
3359 |
-
|
3360 |
-
|
3361 |
-
|
3362 |
-
|
3363 |
-
|
3364 |
-
|
3365 |
-
|
3366 |
-
|
3367 |
-
|
3368 |
-
|
3369 |
-
|
3370 |
-
|
3371 |
-
|
3372 |
-
|
3373 |
-
|
3374 |
-
|
3375 |
-
|
3376 |
-
|
3377 |
-
|
3378 |
-
|
3379 |
-
|
3380 |
-
|
3381 |
-
|
3382 |
-
|
3383 |
-
|
3384 |
-
|
3385 |
-
|
3386 |
-
|
3387 |
-
|
3388 |
-
|
3389 |
-
|
3390 |
-
|
3391 |
-
|
3392 |
-
|
3393 |
-
|
3394 |
-
|
3395 |
-
|
3396 |
-
|
3397 |
-
|
3398 |
-
|
3399 |
-
|
3400 |
-
|
3401 |
-
|
3402 |
-
|
3403 |
-
|
3404 |
-
|
3405 |
-
|
3406 |
-
|
3407 |
-
|
3408 |
-
|
3409 |
-
|
3410 |
-
|
3411 |
-
|
3412 |
-
|
3413 |
-
|
3414 |
-
|
3415 |
-
|
3416 |
-
|
3417 |
-
|
3418 |
-
|
3419 |
-
|
3420 |
-
|
3421 |
-
|
3422 |
-
|
3423 |
-
|
3424 |
-
|
3425 |
-
|
3426 |
-
|
3427 |
-
|
3428 |
-
|
3429 |
-
|
3430 |
-
|
3431 |
-
|
3432 |
-
|
3433 |
-
|
3434 |
-
|
3435 |
-
|
3436 |
-
|
3437 |
-
|
3438 |
-
|
3439 |
-
|
3440 |
-
|
3441 |
-
|
3442 |
-
|
3443 |
-
|
3444 |
-
|
3445 |
-
|
3446 |
-
|
3447 |
-
|
3448 |
-
|
3449 |
-
|
3450 |
-
|
3451 |
-
|
3452 |
-
|
3453 |
-
|
3454 |
-
|
3455 |
-
|
3456 |
-
|
3457 |
-
|
3458 |
-
|
3459 |
-
|
3460 |
-
|
3461 |
-
|
3462 |
-
|
3463 |
-
|
3464 |
-
|
3465 |
-
|
3466 |
-
|
3467 |
-
|
3468 |
-
|
3469 |
-
|
3470 |
-
|
3471 |
-
|
3472 |
-
|
3473 |
-
|
3474 |
-
|
3475 |
-
|
3476 |
-
|
3477 |
-
|
3478 |
-
|
3479 |
-
|
3480 |
-
|
3481 |
-
|
3482 |
-
|
3483 |
-
|
3484 |
-
|
3485 |
-
|
3486 |
-
|
3487 |
-
|
3488 |
-
|
3489 |
-
|
3490 |
-
|
3491 |
-
|
3492 |
-
|
3493 |
-
|
3494 |
-
|
3495 |
-
|
3496 |
-
|
3497 |
-
|
3498 |
-
|
3499 |
-
|
3500 |
-
|
3501 |
-
|
3502 |
-
|
3503 |
-
|
3504 |
-
|
3505 |
-
|
3506 |
-
|
3507 |
-
|
3508 |
-
|
3509 |
-
|
3510 |
-
|
3511 |
-
|
3512 |
-
|
3513 |
-
|
3514 |
-
|
3515 |
-
|
3516 |
-
|
3517 |
-
|
3518 |
-
|
3519 |
-
|
3520 |
-
|
3521 |
-
|
3522 |
-
|
3523 |
-
|
3524 |
-
|
3525 |
-
|
3526 |
-
|
3527 |
-
|
3528 |
-
|
3529 |
-
|
3530 |
-
|
3531 |
-
|
3532 |
-
|
3533 |
-
|
3534 |
-
|
3535 |
-
|
3536 |
-
|
3537 |
-
|
3538 |
-
|
3539 |
-
|
3540 |
-
|
3541 |
-
|
3542 |
-
|
3543 |
-
|
3544 |
-
|
3545 |
-
|
3546 |
-
|
3547 |
-
|
3548 |
-
|
3549 |
-
|
3550 |
-
|
3551 |
-
|
3552 |
-
|
3553 |
-
|
3554 |
-
|
3555 |
-
|
3556 |
-
|
3557 |
-
|
3558 |
-
|
3559 |
-
|
3560 |
-
|
3561 |
-
|
3562 |
-
|
3563 |
-
|
3564 |
-
|
3565 |
-
|
3566 |
-
|
3567 |
-
|
3568 |
-
|
3569 |
-
|
3570 |
-
|
3571 |
-
|
3572 |
-
|
3573 |
-
|
3574 |
-
|
3575 |
-
|
3576 |
-
|
3577 |
-
|
3578 |
-
|
3579 |
-
|
3580 |
-
|
3581 |
-
|
3582 |
-
|
3583 |
-
|
3584 |
-
|
3585 |
-
|
3586 |
-
|
3587 |
-
|
3588 |
-
|
3589 |
-
|
3590 |
-
|
3591 |
-
|
3592 |
-
|
3593 |
-
|
3594 |
-
|
3595 |
-
|
3596 |
-
|
3597 |
-
|
3598 |
-
|
3599 |
-
|
3600 |
-
|
3601 |
-
|
3602 |
-
|
3603 |
-
|
3604 |
-
|
3605 |
-
|
3606 |
-
|
3607 |
-
|
3608 |
-
|
3609 |
-
|
3610 |
-
|
3611 |
-
|
3612 |
-
|
3613 |
-
|
3614 |
-
|
3615 |
-
|
3616 |
-
|
3617 |
-
|
3618 |
-
|
3619 |
-
|
3620 |
-
|
3621 |
-
|
3622 |
-
|
3623 |
-
|
3624 |
-
|
3625 |
-
|
3626 |
-
|
3627 |
-
|
3628 |
-
|
3629 |
-
|
3630 |
-
|
3631 |
-
|
3632 |
-
|
3633 |
-
|
3634 |
-
|
3635 |
-
|
3636 |
-
|
3637 |
-
|
3638 |
-
|
3639 |
-
|
3640 |
-
|
3641 |
-
|
3642 |
-
|
3643 |
-
|
3644 |
-
|
3645 |
-
|
3646 |
-
|
3647 |
-
|
3648 |
-
|
3649 |
-
|
3650 |
-
|
3651 |
-
|
3652 |
-
|
3653 |
-
|
3654 |
-
|
3655 |
-
|
3656 |
-
|
3657 |
-
|
3658 |
-
|
3659 |
-
|
3660 |
-
|
3661 |
-
|
3662 |
-
|
3663 |
-
|
3664 |
-
|
3665 |
-
|
3666 |
-
|
3667 |
-
|
3668 |
-
|
3669 |
-
|
3670 |
-
|
3671 |
-
|
3672 |
-
|
3673 |
-
|
3674 |
-
|
3675 |
-
|
3676 |
-
|
3677 |
-
|
3678 |
-
|
3679 |
-
|
3680 |
-
|
3681 |
-
|
3682 |
-
|
3683 |
-
|
3684 |
-
|
3685 |
-
|
3686 |
-
|
3687 |
-
|
3688 |
-
|
3689 |
-
|
3690 |
-
|
3691 |
-
|
3692 |
-
|
3693 |
-
|
3694 |
-
|
3695 |
-
|
3696 |
-
|
3697 |
-
|
3698 |
-
|
3699 |
-
|
3700 |
-
|
3701 |
-
|
3702 |
-
|
3703 |
-
|
3704 |
-
|
3705 |
-
|
3706 |
-
|
3707 |
-
|
3708 |
-
|
3709 |
-
|
3710 |
-
|
3711 |
-
|
3712 |
-
|
3713 |
-
|
3714 |
-
|
3715 |
-
|
3716 |
-
|
3717 |
-
|
3718 |
-
|
3719 |
-
|
3720 |
-
|
3721 |
-
|
3722 |
-
|
3723 |
-
|
3724 |
-
|
3725 |
-
|
3726 |
-
|
3727 |
-
|
3728 |
-
|
3729 |
-
|
3730 |
-
|
3731 |
-
|
3732 |
-
|
3733 |
-
|
3734 |
-
|
3735 |
-
|
3736 |
-
|
3737 |
-
|
3738 |
-
|
3739 |
-
|
3740 |
-
|
3741 |
-
|
3742 |
-
|
3743 |
-
|
3744 |
-
|
3745 |
-
|
3746 |
-
|
3747 |
-
|
3748 |
-
|
3749 |
-
|
3750 |
-
|
3751 |
-
|
3752 |
-
|
3753 |
-
|
3754 |
-
|
3755 |
-
|
3756 |
-
|
3757 |
-
|
3758 |
-
|
3759 |
-
|
3760 |
-
|
3761 |
-
|
3762 |
-
|
3763 |
-
|
3764 |
-
|
3765 |
-
|
3766 |
-
|
3767 |
-
|
3768 |
-
|
3769 |
-
|
3770 |
-
|
3771 |
-
|
3772 |
-
|
3773 |
-
|
3774 |
-
|
3775 |
-
|
3776 |
-
|
3777 |
-
|
3778 |
-
|
3779 |
-
|
3780 |
-
|
3781 |
-
|
3782 |
-
|
3783 |
-
|
3784 |
-
|
3785 |
-
|
3786 |
-
|
3787 |
-
|
3788 |
-
|
3789 |
-
|
3790 |
-
|
3791 |
-
|
3792 |
-
|
3793 |
-
|
3794 |
-
|
3795 |
-
|
3796 |
-
|
3797 |
-
|
3798 |
-
|
3799 |
-
|
3800 |
-
|
3801 |
-
|
3802 |
-
|
3803 |
-
|
3804 |
-
|
3805 |
-
|
3806 |
-
|
3807 |
-
|
3808 |
-
|
3809 |
-
|
3810 |
-
|
3811 |
-
|
3812 |
-
|
3813 |
-
|
3814 |
-
|
3815 |
-
|
3816 |
-
|
3817 |
-
|
3818 |
-
|
3819 |
-
|
3820 |
-
|
3821 |
-
|
3822 |
-
|
3823 |
-
|
3824 |
-
|
3825 |
-
|
3826 |
-
|
3827 |
-
|
3828 |
-
|
3829 |
-
|
3830 |
-
|
3831 |
-
|
3832 |
-
|
3833 |
-
|
3834 |
-
|
3835 |
-
|
3836 |
-
|
3837 |
-
|
3838 |
-
|
3839 |
-
|
3840 |
-
|
3841 |
-
|
3842 |
-
|
3843 |
-
|
3844 |
-
|
3845 |
-
|
3846 |
-
|
3847 |
-
|
3848 |
-
|
3849 |
-
|
3850 |
-
|
3851 |
-
|
3852 |
-
|
3853 |
-
|
3854 |
-
|
3855 |
-
|
3856 |
-
|
3857 |
-
|
3858 |
-
|
3859 |
-
|
3860 |
-
|
3861 |
-
|
3862 |
-
|
3863 |
-
|
3864 |
-
|
3865 |
-
|
3866 |
-
|
3867 |
-
|
3868 |
-
|
3869 |
-
|
3870 |
-
|
3871 |
-
|
3872 |
-
|
3873 |
-
|
3874 |
-
|
3875 |
-
|
3876 |
-
|
3877 |
-
|
3878 |
-
|
3879 |
-
|
3880 |
-
|
3881 |
-
|
3882 |
-
|
3883 |
-
|
3884 |
-
|
3885 |
-
|
3886 |
-
|
3887 |
-
|
3888 |
-
|
3889 |
-
|
3890 |
-
|
3891 |
-
|
3892 |
-
|
3893 |
-
|
3894 |
-
|
3895 |
-
|
3896 |
-
|
3897 |
-
|
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 »", "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__("›", "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 & 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 & 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> <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 |
+
»</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"); ?>
|
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 »", "wpdiscuz") : esc_html_e("Go to Installation Wizard »", "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"); ?>
|
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"); ?>
|
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"); ?>
|
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 |
+
|
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 ∨</u> button", "wpdiscuz"),
|
3757 |
+
"label_original" => "Display only parent comments and <u>view replies ∨</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 «Invite to Comment» 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 «Invite to Comment» 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 |
+
"
|