WordPress/wp-includes/js/wp-auth-check.min.js
Dominik Schilling 718626a8ce I18N: Use wp.i18n for translatable strings in wp-includes/js/wp-auth-check.js.
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.

Props swissspidy, ocean90.
See #20491.
Fixes #50553.
Built from https://develop.svn.wordpress.org/trunk@48285


git-svn-id: http://core.svn.wordpress.org/trunk@48054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-03 19:05:03 +00:00

2 lines
1.6 KiB
JavaScript

/*! This file is auto-generated */
!function(h){var s;function i(){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()),s.fadeOut(200,function(){s.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"]&&s.hasClass("hidden")?function(){var e,t=h("#wp-auth-check"),n=h("#wp-auth-check-form"),o=s.find(".wp-auth-fallback-expired"),c=!1;n.length&&(h(window).on("beforeunload.wp-auth-check",function(e){e.originalEvent.returnValue=wp.i18n.__("Your session has expired. You can log in again from this page or go to the login page.")}),(e=h('<iframe id="wp-auth-check-frame" frameborder="0">').attr("title",o.text())).on("load",function(){var e,a;c=!0,n.removeClass("loading");try{e=(a=h(this).contents().find("body")).height()}catch(e){return s.addClass("fallback"),t.css("max-height",""),n.remove(),void o.focus()}e?a&&a.hasClass("interim-login-success")?i():t.css("max-height",e+40+"px"):a&&a.length||(s.addClass("fallback"),t.css("max-height",""),n.remove(),o.focus())}).attr("src",n.data("src")),n.append(e)),h("body").addClass("modal-open"),s.removeClass("hidden"),e?(e.focus(),setTimeout(function(){c||(s.addClass("fallback"),n.remove(),o.focus())},1e4)):o.focus()}():a["wp-auth-check"]&&!s.hasClass("hidden")&&i())}).ready(function(){(s=h("#wp-auth-check-wrap")).find(".wp-auth-check-close").on("click",function(){i()})})}(jQuery);