WordPress/wp-admin/js/updates.min.js

2 lines
40 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
!function(p,c,g){var m=p(document),h=c.i18n.__,d=c.i18n._x,u=c.i18n.sprintf;(c=c||{}).updates={},c.updates.l10n={searchResults:"",searchResultsLabel:"",noPlugins:"",noItemsSelected:"",updating:"",pluginUpdated:"",themeUpdated:"",update:"",updateNow:"",pluginUpdateNowLabel:"",updateFailedShort:"",updateFailed:"",pluginUpdatingLabel:"",pluginUpdatedLabel:"",pluginUpdateFailedLabel:"",updatingMsg:"",updatedMsg:"",updateCancel:"",beforeunload:"",installNow:"",pluginInstallNowLabel:"",installing:"",pluginInstalled:"",themeInstalled:"",installFailedShort:"",installFailed:"",pluginInstallingLabel:"",themeInstallingLabel:"",pluginInstalledLabel:"",themeInstalledLabel:"",pluginInstallFailedLabel:"",themeInstallFailedLabel:"",installingMsg:"",installedMsg:"",importerInstalledMsg:"",aysDelete:"",aysDeleteUninstall:"",aysBulkDelete:"",aysBulkDeleteThemes:"",deleting:"",deleteFailed:"",pluginDeleted:"",themeDeleted:"",livePreview:"",activatePlugin:"",activateTheme:"",activatePluginLabel:"",activateThemeLabel:"",activateImporter:"",activateImporterLabel:"",unknownError:"",connectionError:"",nonceError:"",pluginsFound:"",noPluginsFound:"",autoUpdatesEnable:"",autoUpdatesEnabling:"",autoUpdatesEnabled:"",autoUpdatesDisable:"",autoUpdatesDisabling:"",autoUpdatesDisabled:"",autoUpdatesError:""},c.updates.l10n=window.wp.deprecateL10nObject("wp.updates.l10n",c.updates.l10n,"5.5.0"),c.updates.ajaxNonce=g.ajax_nonce,c.updates.searchTerm="",c.updates.shouldRequestFilesystemCredentials=!1,c.updates.filesystemCredentials={ftp:{host:"",username:"",password:"",connectionType:""},ssh:{publicKey:"",privateKey:""},fsNonce:"",available:!1},c.updates.ajaxLocked=!1,c.updates.adminNotice=c.template("wp-updates-admin-notice"),c.updates.queue=[],c.updates.$elToReturnFocusToFromCredentialsModal=void 0,c.updates.addAdminNotice=function(e){var t,a=p(e.selector),s=p(".wp-header-end");delete e.selector,t=c.updates.adminNotice(e),(a=!a.length?p("#"+e.id):a).length?a.replaceWith(t):s.length?s.after(t):"customize"===pagenow?p(".customize-themes-notifications").append(t):p(".wrap").find("> h1").after(t),m.trigger("wp-updates-notice-added")},c.updates.ajax=function(e,t){var a={};return c.updates.ajaxLocked?(c.updates.queue.push({action:e,data:t}),p.Deferred()):(c.updates.ajaxLocked=!0,t.success&&(a.success=t.success,delete t.success),t.error&&(a.error=t.error,delete t.error),a.data=_.extend(t,{action:e,_ajax_nonce:c.updates.ajaxNonce,_fs_nonce:c.updates.filesystemCredentials.fsNonce,username:c.updates.filesystemCredentials.ftp.username,password:c.updates.filesystemCredentials.ftp.password,hostname:c.updates.filesystemCredentials.ftp.hostname,connection_type:c.updates.filesystemCredentials.ftp.connectionType,public_key:c.updates.filesystemCredentials.ssh.publicKey,private_key:c.updates.filesystemCredentials.ssh.privateKey}),c.ajax.send(a).always(c.updates.ajaxAlways))},c.updates.ajaxAlways=function(e){e.errorCode&&"unable_to_connect_to_filesystem"===e.errorCode||(c.updates.ajaxLocked=!1,c.updates.queueChecker()),void 0!==e.debug&&window.console&&window.console.log&&_.map(e.debug,function(e){window.console.log(c.sanitize.stripTagsAndEncodeText(e))})},c.updates.refreshCount=function(){var e,t=p("#wp-admin-bar-updates"),a=p('a[href="update-core.php"] .update-plugins'),s=p('a[href="plugins.php"] .update-plugins'),n=p('a[href="themes.php"] .update-plugins');t.find(".ab-item").removeAttr("title"),t.find(".ab-label").text(g.totals.counts.total),0===g.totals.counts.total&&t.find(".ab-label").parents("li").remove(),a.each(function(e,t){t.className=t.className.replace(/count-\d+/,"count-"+g.totals.counts.total)}),0<g.totals.counts.total?a.find(".update-count").text(g.totals.counts.total):a.remove(),s.each(function(e,t){t.className=t.className.replace(/count-\d+/,"count-"+g.totals.counts.plugins)}),0<g.totals.counts.total?s.find(".plugin-count").text(g.totals.counts.plugins):s.remove(),n.each(function(e,t){t.className=t.className.replace(/count-\d+/,"count-"+g.totals.counts.themes)}),0<g.totals.counts.total?n.find(".theme-count").text(g.totals.counts.themes):n.remove(),"plugin