External Libraries: Further fix jQuery deprecations in WordPress core.

This addresses `JQMIGRATE` warnings in some admin files and the Thickbox library.

Follow-up to [50001], [50270].

Props bordoni, poena.
See #51812.
Built from https://develop.svn.wordpress.org/trunk@50367


git-svn-id: http://core.svn.wordpress.org/trunk@49978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-02-16 20:25:03 +00:00
parent c4da0c6fc2
commit 8080762e93
14 changed files with 43 additions and 43 deletions

View File

@ -25,7 +25,7 @@
var name = $newAppPassField.val();
if ( 0 === name.length ) {
$newAppPassField.focus();
$newAppPassField.trigger( 'focus' );
return;
}
@ -60,7 +60,7 @@
name: response.name,
password: response.password
} ) );
$( '.new-application-password-notice' ).focus();
$( '.new-application-password-notice' ).trigger( 'focus' );
$appPassTbody.prepend( tmplAppPassRow( response ) );
@ -105,7 +105,7 @@
}
$tr.remove();
addNotice( wp.i18n.__( 'Application password revoked.' ), 'success' ).focus();
addNotice( wp.i18n.__( 'Application password revoked.' ), 'success' ).trigger( 'focus' );
}
} ).fail( handleErrorResponse );
} );
@ -133,7 +133,7 @@
$appPassSection.children( '.new-application-password' ).remove();
$appPassTwrapper.hide();
addNotice( wp.i18n.__( 'All application passwords revoked.' ), 'success' ).focus();
addNotice( wp.i18n.__( 'All application passwords revoked.' ), 'success' ).trigger( 'focus' );
}
} ).fail( handleErrorResponse );
} );
@ -145,7 +145,7 @@
$el.fadeTo( 100, 0, function () {
$el.slideUp( 100, function () {
$el.remove();
$newAppPassField.focus();
$newAppPassField.trigger( 'focus' );
} );
} );
} );

View File

@ -1,2 +1,2 @@
/*! This file is auto-generated */
!function(o){var a=o("#application-passwords-section"),i=a.find(".create-application-password"),n=i.find(".input"),t=i.find(".button"),p=a.find(".application-passwords-list-table-wrapper"),r=a.find("tbody"),d=r.find(".no-items"),e=o("#revoke-all-application-passwords"),l=wp.template("new-application-password"),c=wp.template("application-password-row"),u=o("#user_id").val();function w(e,s,a){f(e.responseJSON&&e.responseJSON.message?e.responseJSON.message:a,"error")}function f(e,s){e=o("<div></div>").attr("role","alert").attr("tabindex","-1").addClass("is-dismissible notice notice-"+s).append(o("<p></p>").text(e)).append(o("<button></button>").attr("type","button").addClass("notice-dismiss").append(o("<span></span>").addClass("screen-reader-text").text(wp.i18n.__("Dismiss this notice."))));return i.after(e),e}function v(){o(".notice",a).remove()}t.on("click",function(e){var s;e.preventDefault(),t.prop("aria-disabled")||(0!==(e=n.val()).length?(v(),t.prop("aria-disabled",!0).addClass("disabled"),s={name:e},s=wp.hooks.applyFilters("wp_application_passwords_new_password_request",s,u),wp.apiRequest({path:"/wp/v2/users/"+u+"/application-passwords?_locale=user",method:"POST",data:s}).always(function(){t.removeProp("aria-disabled").removeClass("disabled")}).done(function(e){n.val(""),t.prop("disabled",!1),i.after(l({name:e.name,password:e.password})),o(".new-application-password-notice").focus(),r.prepend(c(e)),p.show(),d.remove(),wp.hooks.doAction("wp_application_passwords_created_password",e,s)}).fail(w)):n.focus())}),r.on("click",".delete",function(e){var s,a;e.preventDefault(),window.confirm(wp.i18n.__("Are you sure you want to revoke this password? This action cannot be undone."))&&(s=o(this),e=(a=s.closest("tr")).data("uuid"),v(),s.prop("disabled",!0),wp.apiRequest({path:"/wp/v2/users/"+u+"/application-passwords/"+e+"?_locale=user",method:"DELETE"}).always(function(){s.prop("disabled",!1)}).done(function(e){e.deleted&&(0===a.siblings().length&&p.hide(),a.remove(),f(wp.i18n.__("Application password revoked."),"success").focus())}).fail(w))}),e.on("click",function(e){var s;e.preventDefault(),window.confirm(wp.i18n.__("Are you sure you want to revoke all passwords? This action cannot be undone."))&&(s=o(this),v(),s.prop("disabled",!0),wp.apiRequest({path:"/wp/v2/users/"+u+"/application-passwords?_locale=user",method:"DELETE"}).always(function(){s.prop("disabled",!1)}).done(function(e){e.deleted&&(r.children().remove(),a.children(".new-application-password").remove(),p.hide(),f(wp.i18n.__("All application passwords revoked."),"success").focus())}).fail(w))}),a.on("click",".notice-dismiss",function(e){e.preventDefault();var s=o(this).parent();s.removeAttr("role"),s.fadeTo(100,0,function(){s.slideUp(100,function(){s.remove(),n.focus()})})}),0===r.children("tr").not(d).length&&p.hide()}(jQuery);
!function(o){var a=o("#application-passwords-section"),i=a.find(".create-application-password"),t=i.find(".input"),n=i.find(".button"),p=a.find(".application-passwords-list-table-wrapper"),r=a.find("tbody"),d=r.find(".no-items"),e=o("#revoke-all-application-passwords"),l=wp.template("new-application-password"),c=wp.template("application-password-row"),u=o("#user_id").val();function w(e,s,a){f(e.responseJSON&&e.responseJSON.message?e.responseJSON.message:a,"error")}function f(e,s){e=o("<div></div>").attr("role","alert").attr("tabindex","-1").addClass("is-dismissible notice notice-"+s).append(o("<p></p>").text(e)).append(o("<button></button>").attr("type","button").addClass("notice-dismiss").append(o("<span></span>").addClass("screen-reader-text").text(wp.i18n.__("Dismiss this notice."))));return i.after(e),e}function v(){o(".notice",a).remove()}n.on("click",function(e){var s;e.preventDefault(),n.prop("aria-disabled")||(0!==(e=t.val()).length?(v(),n.prop("aria-disabled",!0).addClass("disabled"),s={name:e},s=wp.hooks.applyFilters("wp_application_passwords_new_password_request",s,u),wp.apiRequest({path:"/wp/v2/users/"+u+"/application-passwords?_locale=user",method:"POST",data:s}).always(function(){n.removeProp("aria-disabled").removeClass("disabled")}).done(function(e){t.val(""),n.prop("disabled",!1),i.after(l({name:e.name,password:e.password})),o(".new-application-password-notice").trigger("focus"),r.prepend(c(e)),p.show(),d.remove(),wp.hooks.doAction("wp_application_passwords_created_password",e,s)}).fail(w)):t.trigger("focus"))}),r.on("click",".delete",function(e){var s,a;e.preventDefault(),window.confirm(wp.i18n.__("Are you sure you want to revoke this password? This action cannot be undone."))&&(s=o(this),e=(a=s.closest("tr")).data("uuid"),v(),s.prop("disabled",!0),wp.apiRequest({path:"/wp/v2/users/"+u+"/application-passwords/"+e+"?_locale=user",method:"DELETE"}).always(function(){s.prop("disabled",!1)}).done(function(e){e.deleted&&(0===a.siblings().length&&p.hide(),a.remove(),f(wp.i18n.__("Application password revoked."),"success").trigger("focus"))}).fail(w))}),e.on("click",function(e){var s;e.preventDefault(),window.confirm(wp.i18n.__("Are you sure you want to revoke all passwords? This action cannot be undone."))&&(s=o(this),v(),s.prop("disabled",!0),wp.apiRequest({path:"/wp/v2/users/"+u+"/application-passwords?_locale=user",method:"DELETE"}).always(function(){s.prop("disabled",!1)}).done(function(e){e.deleted&&(r.children().remove(),a.children(".new-application-password").remove(),p.hide(),f(wp.i18n.__("All application passwords revoked."),"success").trigger("focus"))}).fail(w))}),a.on("click",".notice-dismiss",function(e){e.preventDefault();var s=o(this).parent();s.removeAttr("role"),s.fadeTo(100,0,function(){s.slideUp(100,function(){s.remove(),t.trigger("focus")})})}),0===r.children("tr").not(d).length&&p.hide()}(jQuery);

View File

@ -72,7 +72,7 @@ jQuery( document ).ready( function( $ ) {
$rowActions.addClass( 'processing' );
$action.blur();
$action.trigger( 'blur' );
clearResultsAfterRow( $requestRow );
setExportProgress( 0 );
@ -177,7 +177,7 @@ jQuery( document ).ready( function( $ ) {
$rowActions.addClass( 'processing' );
$action.blur();
$action.trigger( 'blur' );
clearResultsAfterRow( $requestRow );
setErasureProgress( 0 );

File diff suppressed because one or more lines are too long

View File

@ -24,7 +24,7 @@ jQuery( document ).ready( function( $ ) {
// Clear the selection and move focus back to the trigger.
e.clearSelection();
// Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680
triggerElement.focus();
triggerElement.trigger( 'focus' );
// Show success visual feedback.
clearTimeout( successTimeout );

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@
*/
jQuery( document ).ready(function( $ ) {
$( '#link_rel' ).prop( 'readonly', true );
$( '#linkxfndiv input' ).bind( 'click keyup', function() {
$( '#linkxfndiv input' ).on( 'click keyup', function() {
var isMe = $( '#me' ).is( ':checked' ), inputs = '';
$( 'input.valinp' ).each( function() {
if ( isMe ) {

View File

@ -1,2 +1,2 @@
/*! This file is auto-generated */
jQuery(document).ready(function(n){n("#link_rel").prop("readonly",!0),n("#linkxfndiv input").bind("click keyup",function(){var e=n("#me").is(":checked"),i="";n("input.valinp").each(function(){e?n(this).prop("disabled",!0).parent().addClass("disabled"):(n(this).removeAttr("disabled").parent().removeClass("disabled"),n(this).is(":checked")&&""!==n(this).val()&&(i+=n(this).val()+" "))}),n("#link_rel").val(e?"me":i.substr(0,i.length-1))})});
jQuery(document).ready(function(n){n("#link_rel").prop("readonly",!0),n("#linkxfndiv input").on("click keyup",function(){var e=n("#me").is(":checked"),i="";n("input.valinp").each(function(){e?n(this).prop("disabled",!0).parent().addClass("disabled"):(n(this).removeAttr("disabled").parent().removeClass("disabled"),n(this).is(":checked")&&""!==n(this).val()&&(i+=n(this).val()+" "))}),n("#link_rel").val(e?"me":i.substr(0,i.length-1))})});

View File

@ -9054,7 +9054,7 @@ Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototyp
// Clear the selection and move focus back to the trigger.
event.clearSelection();
// Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680
triggerElement.focus();
triggerElement.trigger( 'focus' );
// Show success visual feedback.
clearTimeout( successTimeout );
@ -9111,18 +9111,18 @@ Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototyp
*/
moveFocus: function() {
if ( this.previousAttachment.length ) {
this.previousAttachment.focus();
this.previousAttachment.trigger( 'focus' );
return;
}
if ( this.nextAttachment.length ) {
this.nextAttachment.focus();
this.nextAttachment.trigger( 'focus' );
return;
}
// Fallback: move focus to the "Select Files" button in the media modal.
if ( this.controller.uploader && this.controller.uploader.$browser ) {
this.controller.uploader.$browser.focus();
this.controller.uploader.$browser.trigger( 'focus' );
return;
}
@ -9139,7 +9139,7 @@ Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototyp
// Last fallback: make the frame focusable and move focus to it.
$( '.media-frame' )
.attr( 'tabindex', '-1' )
.focus();
.trigger( 'focus' );
},
/**

File diff suppressed because one or more lines are too long

View File

@ -35,7 +35,7 @@ function tb_click(){
var a = this.href || this.alt;
var g = this.rel || false;
tb_show(t,a,g);
this.blur();
this.trigger( 'blur' );
return false;
}
@ -49,12 +49,12 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
jQuery("html").css("overflow","hidden");
if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
jQuery("body").append("<iframe id='TB_HideSelect'>"+thickboxL10n.noiframes+"</iframe><div id='TB_overlay'></div><div id='TB_window' class='thickbox-loading'></div>");
jQuery("#TB_overlay").click(tb_remove);
jQuery("#TB_overlay").trigger( 'click', tb_remove );
}
}else{//all others
if(document.getElementById("TB_overlay") === null){
jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window' class='thickbox-loading'></div>");
jQuery("#TB_overlay").click(tb_remove);
jQuery("#TB_overlay").trigger( 'click', tb_remove );
jQuery( 'body' ).addClass( 'modal-open' );
}
}
@ -141,17 +141,17 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
TB_HEIGHT = imageHeight + 60;
jQuery("#TB_window").append("<a href='' id='TB_ImageOff'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div>");
jQuery("#TB_closeWindowButton").click(tb_remove);
jQuery("#TB_closeWindowButton").trigger( 'click', tb_remove );
if (!(TB_PrevHTML === "")) {
function goPrev(){
if(jQuery(document).unbind("click",goPrev)){jQuery(document).unbind("click",goPrev);}
if(jQuery(document).off("click",goPrev)){jQuery(document).off("click",goPrev);}
jQuery("#TB_window").remove();
jQuery("body").append("<div id='TB_window'></div>");
tb_show(TB_PrevCaption, TB_PrevURL, imageGroup);
return false;
}
jQuery("#TB_prev").click(goPrev);
jQuery("#TB_prev").trigger( 'click', goPrev );
}
if (!(TB_NextHTML === "")) {
@ -161,22 +161,22 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
tb_show(TB_NextCaption, TB_NextURL, imageGroup);
return false;
}
jQuery("#TB_next").click(goNext);
jQuery("#TB_next").trigger( 'click', goNext );
}
jQuery(document).bind('keydown.thickbox', function(e){
jQuery(document).on('keydown.thickbox', function(e){
if ( e.which == 27 ){ // close
tb_remove();
} else if ( e.which == 190 ){ // display previous image
if(!(TB_NextHTML == "")){
jQuery(document).unbind('thickbox');
jQuery(document).off('thickbox');
goNext();
}
} else if ( e.which == 188 ){ // display next image
if(!(TB_PrevHTML == "")){
jQuery(document).unbind('thickbox');
jQuery(document).off('thickbox');
goPrev();
}
}
@ -185,7 +185,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
tb_position();
jQuery("#TB_load").remove();
jQuery("#TB_ImageOff").click(tb_remove);
jQuery("#TB_ImageOff").trigger( 'click', tb_remove );
jQuery("#TB_window").css({'visibility':'visible'}); //for safari using css instead of show
};
@ -206,7 +206,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
if(params['modal'] != "true"){//iframe no modal
jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div></div><iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' >"+thickboxL10n.noiframes+"</iframe>");
}else{//iframe modal
jQuery("#TB_overlay").unbind();
jQuery("#TB_overlay").off();
jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'>"+thickboxL10n.noiframes+"</iframe>");
}
}else{// not an iframe, ajax
@ -214,7 +214,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
if(params['modal'] != "true"){//ajax no modal
jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
}else{//ajax modal
jQuery("#TB_overlay").unbind();
jQuery("#TB_overlay").off();
jQuery("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");
}
}else{//this means the window is already up, we are just loading new content via ajax
@ -225,11 +225,11 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
}
}
jQuery("#TB_closeWindowButton").click(tb_remove);
jQuery("#TB_closeWindowButton").trigger( 'click', tb_remove );
if(url.indexOf('TB_inline') != -1){
jQuery("#TB_ajaxContent").append(jQuery('#' + params['inlineId']).children());
jQuery("#TB_window").bind('tb_unload', function () {
jQuery("#TB_window").on('tb_unload', function () {
jQuery('#' + params['inlineId']).append( jQuery("#TB_ajaxContent").children() ); // move elements back when you're finished
});
tb_position();
@ -253,7 +253,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
}
if(!params['modal']){
jQuery(document).bind('keydown.thickbox', function(e){
jQuery(document).on('keydown.thickbox', function(e){
if ( e.which == 27 ){ // close
tb_remove();
return false;
@ -268,7 +268,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
* In other admin screens is hidden and replaced by a different icon.
*/
if ( $closeBtn.find( '.tb-close-icon' ).is( ':visible' ) ) {
$closeBtn.focus();
$closeBtn.trigger( 'focus' );
}
} catch(e) {
@ -283,10 +283,10 @@ function tb_showIframe(){
}
function tb_remove() {
jQuery("#TB_imageOff").unbind("click");
jQuery("#TB_closeWindowButton").unbind("click");
jQuery("#TB_imageOff").off("click");
jQuery("#TB_closeWindowButton").off("click");
jQuery( '#TB_window' ).fadeOut( 'fast', function() {
jQuery( '#TB_window, #TB_overlay, #TB_HideSelect' ).trigger( 'tb_unload' ).unbind().remove();
jQuery( '#TB_window, #TB_overlay, #TB_HideSelect' ).trigger( 'tb_unload' ).off().remove();
jQuery( 'body' ).trigger( 'thickbox:removed' );
});
jQuery( 'body' ).removeClass( 'modal-open' );
@ -295,7 +295,7 @@ function tb_remove() {
jQuery("body","html").css({height: "auto", width: "auto"});
jQuery("html").css("overflow","");
}
jQuery(document).unbind('.thickbox');
jQuery(document).off('.thickbox');
return false;
}

View File

@ -19,7 +19,7 @@
buttons: function( event, t ) {
var button = $('<a class="close" href="#"></a>').text( wp.i18n.__( 'Dismiss' ) );
return button.bind( 'click.pointer', function(e) {
return button.on( 'click.pointer', function(e) {
e.preventDefault();
t.element.pointer('close');
});

View File

@ -1,2 +1,2 @@
/*! This file is auto-generated */
!function(o){var i=0,e=9999;o.widget("wp.pointer",{options:{pointerClass:"wp-pointer",pointerWidth:320,content:function(){return o(this).text()},buttons:function(t,i){return o('<a class="close" href="#"></a>').text(wp.i18n.__("Dismiss")).bind("click.pointer",function(t){t.preventDefault(),i.element.pointer("close")})},position:"top",show:function(t,i){i.pointer.show(),i.opened()},hide:function(t,i){i.pointer.hide(),i.closed()},document:document},_create:function(){var t;this.content=o('<div class="wp-pointer-content"></div>'),this.arrow=o('<div class="wp-pointer-arrow"><div class="wp-pointer-arrow-inner"></div></div>'),t="absolute",this.element.parents().add(this.element).filter(function(){return"fixed"===o(this).css("position")}).length&&(t="fixed"),this.pointer=o("<div />").append(this.content).append(this.arrow).attr("id","wp-pointer-"+i++).addClass(this.options.pointerClass).css({position:t,width:this.options.pointerWidth+"px",display:"none"}).appendTo(this.options.document.body)},_setOption:function(t,i){var e=this.options,n=this.pointer;"document"===t&&i!==e.document?n.detach().appendTo(i.body):"pointerClass"===t&&n.removeClass(e.pointerClass).addClass(i),o.Widget.prototype._setOption.apply(this,arguments),"position"===t?this.reposition():"content"===t&&this.active&&this.update()},destroy:function(){this.pointer.remove(),o.Widget.prototype.destroy.call(this)},widget:function(){return this.pointer},update:function(i){var e=this,t=this.options,n=o.Deferred();if(!t.disabled)return n.done(function(t){e._update(i,t)}),(t="string"==typeof t.content?t.content:t.content.call(this.element[0],n.resolve,i,this._handoff()))&&n.resolve(t),n.promise()},_update:function(t,i){var e=this.options;i&&(this.pointer.stop(),this.content.html(i),(t=e.buttons.call(this.element[0],t,this._handoff()))&&t.wrap('<div class="wp-pointer-buttons" />').parent().appendTo(this.content),this.reposition())},reposition:function(){var t;this.options.disabled||(t=this._processPosition(this.options.position),this.pointer.css({top:0,left:0,zIndex:e++}).show().position(o.extend({of:this.element,collision:"fit none"},t)),this.repoint())},repoint:function(){var t=this.options;t.disabled||(t="string"==typeof t.position?t.position:t.position.edge,this.pointer[0].className=this.pointer[0].className.replace(/wp-pointer-[^\s'"]*/,""),this.pointer.addClass("wp-pointer-"+t))},_processPosition:function(t){var i={top:"bottom",bottom:"top",left:"right",right:"left"},t="string"==typeof t?{edge:t+""}:o.extend({},t);return t.edge&&("top"==t.edge||"bottom"==t.edge?(t.align=t.align||"left",t.at=t.at||t.align+" "+i[t.edge],t.my=t.my||t.align+" "+t.edge):(t.align=t.align||"top",t.at=t.at||i[t.edge]+" "+t.align,t.my=t.my||t.edge+" "+t.align)),t},open:function(t){var i=this,e=this.options;this.active||e.disabled||this.element.is(":hidden")||this.update().done(function(){i._open(t)})},_open:function(t){var i=this,e=this.options;this.active||e.disabled||this.element.is(":hidden")||(this.active=!0,this._trigger("open",t,this._handoff()),this._trigger("show",t,this._handoff({opened:function(){i._trigger("opened",t,i._handoff())}})))},close:function(t){var i;this.active&&!this.options.disabled&&((i=this).active=!1,this._trigger("close",t,this._handoff()),this._trigger("hide",t,this._handoff({closed:function(){i._trigger("closed",t,i._handoff())}})))},sendToTop:function(){this.active&&this.pointer.css("z-index",e++)},toggle:function(t){this.pointer.is(":hidden")?this.open(t):this.close(t)},_handoff:function(t){return o.extend({pointer:this.pointer,element:this.element},t)}})}(jQuery);
!function(o){var i=0,e=9999;o.widget("wp.pointer",{options:{pointerClass:"wp-pointer",pointerWidth:320,content:function(){return o(this).text()},buttons:function(t,i){return o('<a class="close" href="#"></a>').text(wp.i18n.__("Dismiss")).on("click.pointer",function(t){t.preventDefault(),i.element.pointer("close")})},position:"top",show:function(t,i){i.pointer.show(),i.opened()},hide:function(t,i){i.pointer.hide(),i.closed()},document:document},_create:function(){var t;this.content=o('<div class="wp-pointer-content"></div>'),this.arrow=o('<div class="wp-pointer-arrow"><div class="wp-pointer-arrow-inner"></div></div>'),t="absolute",this.element.parents().add(this.element).filter(function(){return"fixed"===o(this).css("position")}).length&&(t="fixed"),this.pointer=o("<div />").append(this.content).append(this.arrow).attr("id","wp-pointer-"+i++).addClass(this.options.pointerClass).css({position:t,width:this.options.pointerWidth+"px",display:"none"}).appendTo(this.options.document.body)},_setOption:function(t,i){var e=this.options,n=this.pointer;"document"===t&&i!==e.document?n.detach().appendTo(i.body):"pointerClass"===t&&n.removeClass(e.pointerClass).addClass(i),o.Widget.prototype._setOption.apply(this,arguments),"position"===t?this.reposition():"content"===t&&this.active&&this.update()},destroy:function(){this.pointer.remove(),o.Widget.prototype.destroy.call(this)},widget:function(){return this.pointer},update:function(i){var e=this,t=this.options,n=o.Deferred();if(!t.disabled)return n.done(function(t){e._update(i,t)}),(t="string"==typeof t.content?t.content:t.content.call(this.element[0],n.resolve,i,this._handoff()))&&n.resolve(t),n.promise()},_update:function(t,i){var e=this.options;i&&(this.pointer.stop(),this.content.html(i),(t=e.buttons.call(this.element[0],t,this._handoff()))&&t.wrap('<div class="wp-pointer-buttons" />').parent().appendTo(this.content),this.reposition())},reposition:function(){var t;this.options.disabled||(t=this._processPosition(this.options.position),this.pointer.css({top:0,left:0,zIndex:e++}).show().position(o.extend({of:this.element,collision:"fit none"},t)),this.repoint())},repoint:function(){var t=this.options;t.disabled||(t="string"==typeof t.position?t.position:t.position.edge,this.pointer[0].className=this.pointer[0].className.replace(/wp-pointer-[^\s'"]*/,""),this.pointer.addClass("wp-pointer-"+t))},_processPosition:function(t){var i={top:"bottom",bottom:"top",left:"right",right:"left"},t="string"==typeof t?{edge:t+""}:o.extend({},t);return t.edge&&("top"==t.edge||"bottom"==t.edge?(t.align=t.align||"left",t.at=t.at||t.align+" "+i[t.edge],t.my=t.my||t.align+" "+t.edge):(t.align=t.align||"top",t.at=t.at||i[t.edge]+" "+t.align,t.my=t.my||t.edge+" "+t.align)),t},open:function(t){var i=this,e=this.options;this.active||e.disabled||this.element.is(":hidden")||this.update().done(function(){i._open(t)})},_open:function(t){var i=this,e=this.options;this.active||e.disabled||this.element.is(":hidden")||(this.active=!0,this._trigger("open",t,this._handoff()),this._trigger("show",t,this._handoff({opened:function(){i._trigger("opened",t,i._handoff())}})))},close:function(t){var i;this.active&&!this.options.disabled&&((i=this).active=!1,this._trigger("close",t,this._handoff()),this._trigger("hide",t,this._handoff({closed:function(){i._trigger("closed",t,i._handoff())}})))},sendToTop:function(){this.active&&this.pointer.css("z-index",e++)},toggle:function(t){this.pointer.is(":hidden")?this.open(t):this.close(t)},_handoff:function(t){return o.extend({pointer:this.pointer,element:this.element},t)}})}(jQuery);

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.7-beta2-50365';
$wp_version = '5.7-beta2-50367';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.