Files
medicalalert-web-reloaded/wp/wp-content/plugins/wordpress-seo-premium/assets/js/dist/wp-seo-premium-quickedit-notification-2150.min.js
Tony Volpe 8f4b5efda6 Merged in feature/MAW-855-import-code-into-aws (pull request #2)
code import from pantheon

* code import from pantheon
2023-12-04 23:08:14 +00:00

1 line
3.4 KiB
JavaScript

(window.yoastPremiumWebpackJsonp=window.yoastPremiumWebpackJsonp||[]).push([[5],{10:function(e,t){e.exports=window.wp.apiFetch},160:function(e,t,o){"use strict";var n=o(24),r=0;function i(){jQuery.post(ajaxurl,{action:"yoast_get_notifications"},function(e){if(""!==e){var t=jQuery(".wrap").children().eq(0);jQuery(e).insertAfter(t),r=0}r<20&&""===e&&(r++,setTimeout(i,500))})}function d(){return jQuery(location).attr("pathname").split("/").pop()}function a(e){return"edit-tags.php"===(e=e||d())?"slug":"post_name"}function s(){return jQuery("tr.inline-editor")}function c(){var e=s();return 0===e.length||""===e?"":e.attr("id").replace("edit-","")}function u(){var e=c(),t=a();return jQuery("#inline_"+e).find("."+t).html()}function p(){var e=s(),t=a();return u()!==e.find("input[name="+t+"]").val()}function w(e){13===e.which&&p()&&i()}function l(e){"save-order"!==jQuery(e.target).attr("id")&&p()&&i()}window.wpseoShowNotification=i,window.wpseoGetCurrentPage=d,window.wpseoGetActiveEditor=s,window.wpseoGetItemId=c,window.wpseoGetCurrentSlug=u,window.wpseoSlugChanged=p,window.wpseoHandleKeyEvents=w,window.wpseoHandleButtonEvents=l,window.wpseoUndoRedirect=n.wpseoUndoRedirect,window.wpseoUndoRedirectByObjectId=n.wpseoUndoRedirectByObjectId,window.wpseoCreateRedirect=n.wpseoCreateRedirect,window.wpseoRemoveNotification=n.wpseoRemoveNotification,jQuery(function(){var e=d();["edit.php","edit-tags.php"].includes(e)&&(jQuery("#inline-edit input").on("keydown",function(e){w(e)}),jQuery(".button-primary").on("click",function(e){l(e)})),"edit-tags.php"===e&&jQuery(document).on("ajaxComplete",function(e,t,o){o.data.indexOf("action=delete-tag")>-1&&i()})})},24:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ALLOW_EMPTY_TARGET=void 0,t.wpseoDeleteRedirect=r,t.wpseoUndoRedirectForObject=i,t.wpseoRemoveNotification=d,t.wpseoUndoRedirect=function(e,t,o,n,i){r(e,t,o).then(function(e){!0===e.success&&d(i)})},t.wpseoUndoRedirectByObjectId=function(e,t,o){i(e,t).then(function(e){!0===e.success&&d(o)})},t.wpseoCreateRedirect=function(e,t,o,n){var r="";if(410!==parseInt(t,10)&&""===(r=window.prompt(wpseoPremiumStrings.enter_new_url.replace("%s",e))))return void window.alert(wpseoPremiumStrings.error_new_url);jQuery.post(ajaxurl,{action:"wpseo_add_redirect_plain",ajax_nonce:o,redirect:{origin:e,target:r,type:t}},function(e){var o=jQuery(n).closest(".yoast-notification");if(jQuery(o).removeClass("updated").removeClass("error"),jQuery(o).find(".redirect_error").remove(),e.error)jQuery(o).addClass("error").prepend('<p class="redirect_error">'+e.error.message+"</p>");else{var r="";r=(r=410===parseInt(t,10)?_.escape(wpseoPremiumStrings.redirect_saved_no_target):wpseoPremiumStrings.redirect_saved.replace("%2$s","<code>"+_.escape(e.target)+"</code>")).replace("%1$s","<code>"+_.escape(e.origin)+"</code>"),jQuery(o).addClass("updated").html("<p>"+r+"</p>")}},"json")};var n=function(e){return e&&e.__esModule?e:{default:e}}(o(10));t.ALLOW_EMPTY_TARGET=[410,451];function r(e,t,o){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"plain";return(0,n.default)({method:"POST",url:wpApiSettings.root+"yoast/v1/redirects/delete",headers:{"X-WP-Nonce":wpApiSettings.nonce},data:{origin:e,target:t,type:o,format:r}})}function i(e,t){return(0,n.default)({method:"POST",url:wpApiSettings.root+"yoast/v1/redirects/undo-for-object",headers:{"X-WP-Nonce":wpApiSettings.nonce},data:{obj_id:e,obj_type:t}})}function d(e){jQuery(e).closest(".yoast-notification").fadeOut("slow")}}},[[160,0]]]);