Files
tysweld.com/wp-content/plugins/polylang-pro/js/build/metabox-button.min.js
2025-02-24 22:33:42 +01:00

1 line
682 B
JavaScript

jQuery((function(t){t("#ml_box").on("click",".pll-button",(function(){var a=t(this).hasClass("wp-ui-text-highlight"),l=t(this).attr("id"),e=t("#htr_lang_"+l.replace("pll_sync_post[","").replace("]","")).val();if(void 0===e||0==e||a||confirm(pll_sync_post.confirm_text)){var n={action:"toggle_"+l,value:a,post_type:t("#post_type").val(),_pll_nonce:t("#_pll_nonce").val()};t.post(ajaxurl,n,(function(a){var e=wpAjax.parseAjaxResponse(a,"pll-ajax-response");t.each(e.responses,(function(){l=l.replace("[","\\[").replace("]","\\]"),t("#"+l).toggleClass("wp-ui-text-highlight").attr("title",this.data).children("span").text(this.data),t('input[name="'+l+'"]').val(!n.value)}))}))}}))}));