관리-도구
편집 파일: options_switch.min.js
function yarppMakeTheSwitch(a,e,i){a.get(i,e,function(a){"ok"===a&&(window.location.href="./options-general.php?page=yarpp")})}jQuery(document).ready(function(t){t(".yarpp_switch_button").on("click",function(a){a.preventDefault();var e=ajaxurl,i={action:"yarpp_switch",go:t(this).data("go"),_ajax_nonce:t("#yarpp_switch-nonce").val()};"basic"===i.go?(t("#wpwrap").after('<div id="yarpp_pro_disable_overlay"></div><div id="yarpp_pro_disable_confirm"><p>Are you sure you would like to deactivate YARPP Pro? Doing so will remove all <strong>YARPP Pro</strong> content from your site, including sidebar widgets.</p><br/><a id="yarpp_proceed_deactivation" class="button">Deactivate YARPP Pro</a> <a id="yarpp_cancel_deactivation" class="button-primary">Cancel Deactivation</a></div>'),t("#yarpp_proceed_deactivation").on("click",function(){yarppMakeTheSwitch(t,i,e)}),t("#yarpp_cancel_deactivation").on("click",function(){window.location.reload()})):yarppMakeTheSwitch(t,i,e)}),t("#yarpp-display-mode-save").on("click",function(a){a.preventDefault();var e=t(this),i=(t(".error-message","#yarpp-display-mode").remove(),t('<span class="spinner is-active"></span>')),n=(e.after(i),[]),a=(t("input","#yarpp-display-mode").each(function(){this.checked&&n.push(this.value)}),{action:"yarpp_pro_set_display_types",types:n,_wpnonce:t("#yarpp_display_nonce").val()});t.post(ajaxurl,a,function(a){setTimeout(function(){i.remove(),a.success||e.after(t('<span class="error-message">Something went wrong saving your settings. Please refresh the page and try again.</span>').css({"vertical-align":"middle","margin-left":"10px",color:"#dc3232"}))},1e3)}).fail(function(){i.remove(),e.after(t('<span class="error-message">Failed to save settings. Please try again.</span>').css({"vertical-align":"middle","margin-left":"10px",color:"#dc3232"}))})})});