WordPress/wp-includes/js/wp-auth-check.min.js
whyisjake bdb1fe0d7e Administration: Remove wp-auth-check from the Heartbeat API.
As of [27153], wp-auth-check is returned on all heartbeats without the need for data from client-side. This also means that the timing and scheduling of this request data is ineffectual.

Fixes #50305.

Props dsixinetu, azaozz, whyisjake.


Built from https://develop.svn.wordpress.org/trunk@48056


git-svn-id: http://core.svn.wordpress.org/trunk@47823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-16 07:09:09 +00:00

2 lines
1.6 KiB
JavaScript

/*! This file is auto-generated */
!function(h){var d;function s(){h(window).off("beforeunload.wp-auth-check"),"undefined"==typeof adminpage||"post-php"!==adminpage&&"post-new-php"!==adminpage||"undefined"==typeof wp||!wp.heartbeat||(h(document).off("heartbeat-tick.wp-auth-check"),wp.heartbeat.connectNow()),d.fadeOut(200,function(){d.addClass("hidden").css("display",""),h("#wp-auth-check-frame").remove(),h("body").removeClass("modal-open")})}h(document).on("heartbeat-tick.wp-auth-check",function(e,a){"wp-auth-check"in a&&(!a["wp-auth-check"]&&d.hasClass("hidden")?function(){var e,t=h("#wp-auth-check"),c=h("#wp-auth-check-form"),n=d.find(".wp-auth-fallback-expired"),o=!1;c.length&&(h(window).on("beforeunload.wp-auth-check",function(e){e.originalEvent.returnValue=window.authcheckL10n.beforeunload}),(e=h('<iframe id="wp-auth-check-frame" frameborder="0">').attr("title",n.text())).on("load",function(){var e,a;o=!0,c.removeClass("loading");try{e=(a=h(this).contents().find("body")).height()}catch(e){return d.addClass("fallback"),t.css("max-height",""),c.remove(),void n.focus()}e?a&&a.hasClass("interim-login-success")?s():t.css("max-height",e+40+"px"):a&&a.length||(d.addClass("fallback"),t.css("max-height",""),c.remove(),n.focus())}).attr("src",c.data("src")),c.append(e)),h("body").addClass("modal-open"),d.removeClass("hidden"),e?(e.focus(),setTimeout(function(){o||(d.addClass("fallback"),c.remove(),n.focus())},1e4)):n.focus()}():a["wp-auth-check"]&&!d.hasClass("hidden")&&s())}).ready(function(){(d=h("#wp-auth-check-wrap")).find(".wp-auth-check-close").on("click",function(){s()})})}(jQuery);