diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index 5e04365f2f..9751bc5bef 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -3344,6 +3344,8 @@ function wp_ajax_install_theme() { wp_send_json_error( $status ); } + $status['themeName'] = wp_get_theme( $slug )->get( 'Name' ); + if ( current_user_can( 'switch_themes' ) ) { if ( is_multisite() ) { $status['activateUrl'] = add_query_arg( array( diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index d758480f39..6f25348280 100644 --- a/wp-admin/includes/theme.php +++ b/wp-admin/includes/theme.php @@ -635,7 +635,11 @@ function customize_themes_print_templates() { <# if ( ! data.active ) { #>
- + +
<# } #> diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index 88452190d0..eff6f7647c 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -690,7 +690,7 @@ function wp_print_admin_notice_templates() { * @type string colspan The number of table columns this row spans. * @type string content The row content. * } - * + * * The delete template takes one argument with four values: * * param {object} data { @@ -716,13 +716,23 @@ function wp_print_update_row_templates() { diff --git a/wp-admin/js/updates.js b/wp-admin/js/updates.js index 0de60b5a1c..24a8186a24 100644 --- a/wp-admin/js/updates.js +++ b/wp-admin/js/updates.js @@ -508,7 +508,9 @@ $message.text( wp.updates.l10n.installing ); } - $message.addClass( 'updating-message' ); + $message + .addClass( 'updating-message' ) + .attr( 'aria-label', wp.updates.l10n.pluginInstallingLabel.replace( '%s', $message.data( 'name' ) ) ); wp.a11y.speak( wp.updates.l10n.installingMsg, 'polite' ); @@ -535,6 +537,7 @@ $message .removeClass( 'updating-message' ) .addClass( 'updated-message installed button-disabled' ) + .attr( 'aria-label', wp.updates.l10n.pluginInstalledLabel.replace( '%s', response.pluginName ) ) .text( wp.updates.l10n.installed ); wp.a11y.speak( wp.updates.l10n.installedMsg, 'polite' ); @@ -547,6 +550,7 @@ // Transform the 'Install' button into an 'Activate' button. $message.removeClass( 'install-now installed button-disabled updated-message' ).addClass( 'activate-now button-primary' ) .attr( 'href', response.activateUrl ) + .attr( 'aria-label', wp.updates.l10n.activatePluginLabel.replace( '%s', response.pluginName ) ) .text( wp.updates.l10n.activatePlugin ); }, 1000 ); } @@ -595,7 +599,7 @@ $button .removeClass( 'updating-message' ).addClass( 'button-disabled' ) - .attr( 'aria-label', wp.updates.l10n.installFailedLabel.replace( '%s', response.pluginName ) ) + .attr( 'aria-label', wp.updates.l10n.pluginInstallFailedLabel.replace( '%s', $button.data( 'name' ) ) ) .text( wp.updates.l10n.installFailedShort ); wp.a11y.speak( errorMessage, 'assertive' ); @@ -1003,7 +1007,9 @@ $message.data( 'originaltext', $message.html() ); } - $message.text( wp.updates.l10n.installing ); + $message + .text( wp.updates.l10n.installing ) + .attr( 'aria-label', wp.updates.l10n.themeInstallingLabel.replace( '%s', $message.data( 'name' ) ) ); wp.a11y.speak( wp.updates.l10n.installingMsg, 'polite' ); // Remove previous error messages, if any. @@ -1032,6 +1038,7 @@ $message = $card.find( '.button-primary' ) .removeClass( 'updating-message' ) .addClass( 'updated-message disabled' ) + .attr( 'aria-label', wp.updates.l10n.themeInstalledLabel.replace( '%s', response.themeName ) ) .text( wp.updates.l10n.installed ); wp.a11y.speak( wp.updates.l10n.installedMsg, 'polite' ); @@ -1045,6 +1052,7 @@ .attr( 'href', response.activateUrl ) .removeClass( 'theme-install updated-message disabled' ) .addClass( 'activate' ) + .attr( 'aria-label', wp.updates.l10n.activateThemeLabel.replace( '%s', response.themeName ) ) .text( wp.updates.l10n.activateTheme ); } @@ -1098,7 +1106,7 @@ $button .removeClass( 'updating-message' ) - .attr( 'aria-label', wp.updates.l10n.installFailedLabel.replace( '%s', $card.find( '.theme-name' ).text() ) ) + .attr( 'aria-label', wp.updates.l10n.themeInstallFailedLabel.replace( '%s', $button.data( 'name' ) ) ) .text( wp.updates.l10n.installFailedShort ); wp.a11y.speak( errorMessage, 'assertive' ); diff --git a/wp-admin/js/updates.min.js b/wp-admin/js/updates.min.js index 679b0d1745..6d83bfd23c 100644 --- a/wp-admin/js/updates.min.js +++ b/wp-admin/js/updates.min.js @@ -1 +1 @@ -!function(a,b,c){var d=a(document);b=b||{},b.updates={},b.updates.ajaxNonce=c.ajax_nonce,b.updates.l10n=c.l10n,b.updates.searchTerm="",b.updates.shouldRequestFilesystemCredentials=!1,b.updates.filesystemCredentials={ftp:{host:"",username:"",password:"",connectionType:""},ssh:{publicKey:"",privateKey:""},available:!1},b.updates.ajaxLocked=!1,b.updates.adminNotice=b.template("wp-updates-admin-notice"),b.updates.queue=[],b.updates.$elToReturnFocusToFromCredentialsModal=void 0,b.updates.addAdminNotice=function(c){var e,f=a(c.selector);delete c.selector,e=b.updates.adminNotice(c),f.length||(f=a("#"+c.id)),f.length?f.replaceWith(e):a(".wrap").find("> h1").after(e),d.trigger("wp-updates-notice-added")},b.updates.ajax=function(c,d){var e={};return b.updates.ajaxLocked?(b.updates.queue.push({action:c,data:d}),a.Deferred()):(b.updates.ajaxLocked=!0,d.success&&(e.success=d.success,delete d.success),d.error&&(e.error=d.error,delete d.error),e.data=_.extend(d,{action:c,_ajax_nonce:b.updates.ajaxNonce,username:b.updates.filesystemCredentials.ftp.username,password:b.updates.filesystemCredentials.ftp.password,hostname:b.updates.filesystemCredentials.ftp.hostname,connection_type:b.updates.filesystemCredentials.ftp.connectionType,public_key:b.updates.filesystemCredentials.ssh.publicKey,private_key:b.updates.filesystemCredentials.ssh.privateKey}),b.ajax.send(e).always(b.updates.ajaxAlways))},b.updates.ajaxAlways=function(c){c.errorCode||"unable_to_connect_to_filesystem"===c.errorCode||(b.updates.ajaxLocked=!1,b.updates.queueChecker()),"undefined"!=typeof c.debug&&_.map(c.debug,function(b){window.console.log(a("

").html(b).text())})},b.updates.decrementCount=function(b){var c,d,e,f=a("#wp-admin-bar-updates"),g=a('a[href="update-core.php"] .update-plugins'),h=f.find(".ab-label").text();h=parseInt(h,10)-1,0>h||isNaN(h)||(f.find(".ab-item").removeAttr("title"),f.find(".ab-label").text(h),h||f.find(".ab-label").parents("li").remove(),g.each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+h)}),g.removeAttr("title"),g.find(".update-count").text(h),"plugin"===b?(c=a("#menu-plugins"),d=c.find(".plugin-count")):"theme"===b&&(c=a("#menu-appearance"),d=c.find(".theme-count")),d&&(e=d.eq(0).text(),e=parseInt(e,10)-1),0>e||isNaN(e)||(e>0?(a(".subsubsub .upgrade .count").text("("+e+")"),d.text(e),c.find(".update-plugins").each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+e)})):(a(".subsubsub .upgrade").remove(),c.find(".update-plugins").remove())))},b.updates.updatePlugin=function(c){var e,f,g,h;return c=_.extend({success:b.updates.updatePluginSuccess,error:b.updates.updatePluginError},c),"plugins"===pagenow||"plugins-network"===pagenow?(e=a('tr[data-plugin="'+c.plugin+'"]'),g=e.find(".update-message").addClass("updating-message").find("p"),h=b.updates.l10n.updatingLabel.replace("%s",e.find(".plugin-title strong").text())):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(f=a(".plugin-card-"+c.slug),g=f.find(".update-now").addClass("updating-message"),h=b.updates.l10n.updatingLabel.replace("%s",g.data("name")),f.removeClass("plugin-card-update-failed").find(".notice.notice-error").remove()),g.html()!==b.updates.l10n.updating&&g.data("originaltext",g.html()),g.attr("aria-label",h).text(b.updates.l10n.updating),d.trigger("wp-plugin-updating"),b.updates.ajax("update-plugin",c)},b.updates.updatePluginSuccess=function(c){var e,f,g;"plugins"===pagenow||"plugins-network"===pagenow?(e=a('tr[data-plugin="'+c.plugin+'"]').removeClass("update").addClass("updated"),f=e.find(".update-message").removeClass("updating-message notice-warning").addClass("updated-message notice-success").find("p"),g=e.find(".plugin-version-author-uri").html().replace(c.oldVersion,c.newVersion),e.find(".plugin-version-author-uri").html(g)):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(f=a(".plugin-card-"+c.slug).find(".update-now").removeClass("updating-message").addClass("button-disabled updated-message")),f.attr("aria-label",b.updates.l10n.updatedLabel.replace("%s",c.pluginName)).text(b.updates.l10n.updated),b.a11y.speak(b.updates.l10n.updatedMsg,"polite"),b.updates.decrementCount("plugin"),d.trigger("wp-plugin-update-success",c)},b.updates.updatePluginError=function(c){var e,f,g;b.updates.isValidResponse(c,"update")&&(b.updates.maybeHandleCredentialError(c,"update-plugin")||(g=b.updates.l10n.updateFailed.replace("%s",c.errorMessage),"plugins"===pagenow||"plugins-network"===pagenow?(f=a('tr[data-plugin="'+c.plugin+'"]').find(".update-message"),f.removeClass("updating-message notice-warning").addClass("notice-error").find("p").html(g)):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(e=a(".plugin-card-"+c.slug).addClass("plugin-card-update-failed").append(b.updates.adminNotice({className:"update-message notice-error notice-alt is-dismissible",message:g})),e.find(".update-now").attr("aria-label",b.updates.l10n.updateFailedLabel.replace("%s",c.pluginName)).text(b.updates.l10n.updateFailedShort).removeClass("updating-message"),e.on("click",".notice.is-dismissible .notice-dismiss",function(){setTimeout(function(){e.removeClass("plugin-card-update-failed").find(".column-name a").focus(),e.find(".update-now").attr("aria-label",!1).text(b.updates.l10n.updateNow)},200)})),b.a11y.speak(g,"assertive"),d.trigger("wp-plugin-update-error",c)))},b.updates.installPlugin=function(c){var d=a(".plugin-card-"+c.slug),e=d.find(".install-now");return c=_.extend({success:b.updates.installPluginSuccess,error:b.updates.installPluginError},c),"import"===pagenow?e=a('a[href*="'+c.slug+'"]'):e.text(b.updates.l10n.installing),e.addClass("updating-message"),b.a11y.speak(b.updates.l10n.installingMsg,"polite"),d.removeClass("plugin-card-install-failed").find(".notice.notice-error").remove(),b.updates.ajax("install-plugin",c)},b.updates.installPluginSuccess=function(c){var e=a(".plugin-card-"+c.slug).find(".install-now");e.removeClass("updating-message").addClass("updated-message installed button-disabled").text(b.updates.l10n.installed),b.a11y.speak(b.updates.l10n.installedMsg,"polite"),d.trigger("wp-plugin-install-success",c),c.activateUrl&&setTimeout(function(){e.removeClass("install-now installed button-disabled updated-message").addClass("activate-now button-primary").attr("href",c.activateUrl).text(b.updates.l10n.activatePlugin)},1e3)},b.updates.installPluginError=function(c){var e,f=a(".plugin-card-"+c.slug),g=f.find(".install-now");b.updates.isValidResponse(c,"install")&&(b.updates.maybeHandleCredentialError(c,"install-plugin")||(e=b.updates.l10n.installFailed.replace("%s",c.errorMessage),f.addClass("plugin-card-update-failed").append('

'+e+"

"),f.on("click",".notice.is-dismissible .notice-dismiss",function(){setTimeout(function(){f.removeClass("plugin-card-update-failed").find(".column-name a").focus()},200)}),g.removeClass("updating-message").addClass("button-disabled").attr("aria-label",b.updates.l10n.installFailedLabel.replace("%s",c.pluginName)).text(b.updates.l10n.installFailedShort),b.a11y.speak(e,"assertive"),d.trigger("wp-plugin-install-error",c)))},b.updates.installImporterSuccess=function(c){b.updates.addAdminNotice({id:"install-success",className:"notice-success is-dismissible",message:b.updates.l10n.importerInstalledMsg.replace("%s",c.activateUrl+"&from=import")}),a('a[href*="'+c.slug+'"]').removeClass("thickbox open-plugin-details-modal updating-message").off("click").attr("href",c.activateUrl+"&from=import").attr("title",b.updates.l10n.activateImporter),b.a11y.speak(b.updates.l10n.installedMsg,"polite"),d.trigger("wp-importer-install-success",c)},b.updates.installImporterError=function(c){var e=b.updates.l10n.installFailed.replace("%s",c.errorMessage);b.updates.isValidResponse(c,"install")&&(b.updates.maybeHandleCredentialError(c,"install-plugin")||(b.updates.addAdminNotice({id:c.errorCode,className:"notice-error is-dismissible",message:e}),a('a[href*="'+c.slug+'"]').removeClass("updating-message"),b.a11y.speak(e,"assertive"),d.trigger("wp-importer-install-error",c)))},b.updates.deletePlugin=function(c){var d=a('[data-plugin="'+c.plugin+'"]').find(".update-message p");return c=_.extend({success:b.updates.deletePluginSuccess,error:b.updates.deletePluginError},c),d.html()!==b.updates.l10n.updating&&d.data("originaltext",d.html()),b.a11y.speak(b.updates.l10n.deleting,"polite"),b.updates.ajax("delete-plugin",c)},b.updates.deletePluginSuccess=function(e){a('[data-plugin="'+e.plugin+'"]').css({backgroundColor:"#faafaa"}).fadeOut(350,function(){var d=a("#bulk-action-form"),f=a(".subsubsub"),g=a(this),h=d.find("thead th:not(.hidden), thead td").length,i=b.template("item-deleted-row"),j=c.plugins;g.hasClass("plugin-update-tr")||g.after(i({slug:e.slug,plugin:e.plugin,colspan:h,name:e.pluginName})),g.remove(),-1!==_.indexOf(j.upgrade,e.plugin)&&(j.upgrade=_.without(j.upgrade,e.plugin),b.updates.decrementCount("plugin")),-1!==_.indexOf(j.inactive,e.plugin)&&(j.inactive=_.without(j.inactive,e.plugin),j.inactive.length?f.find(".inactive .count").text("("+j.inactive.length+")"):f.find(".inactive").remove()),-1!==_.indexOf(j.active,e.plugin)&&(j.active=_.without(j.active,e.plugin),j.active.length?f.find(".active .count").text("("+j.active.length+")"):f.find(".active").remove()),-1!==_.indexOf(j.recently_activated,e.plugin)&&(j.recently_activated=_.without(j.recently_activated,e.plugin),j.recently_activated.length?f.find(".recently_activated .count").text("("+j.recently_activated.length+")"):f.find(".recently_activated").remove()),j.all=_.without(j.all,e.plugin),j.all.length?f.find(".all .count").text("("+j.all.length+")"):(d.find(".tablenav").css({visibility:"hidden"}),f.find(".all").remove(),d.find("tr.no-items").length||d.find("#the-list").append(''+b.updates.l10n.noPlugins+""))}),b.a11y.speak(b.updates.l10n.deleted,"polite"),d.trigger("wp-plugin-delete-success",e)},b.updates.deletePluginError=function(c){var e=a('tr.inactive[data-plugin="'+c.plugin+'"]'),f=b.template("item-update-row"),g=e.siblings('[data-plugin="'+c.plugin+'"]'),h=b.updates.adminNotice({className:"update-message notice-error notice-alt",message:c.errorMessage});b.updates.isValidResponse(c,"delete")&&(b.updates.maybeHandleCredentialError(c,"delete-plugin")||(g.length?(g.find(".notice-error").remove(),g.find(".plugin-update").append(h)):e.addClass("update").after(f({slug:c.slug,plugin:c.plugin,colspan:a("#bulk-action-form").find("thead th:not(.hidden), thead td").length,content:h})),d.trigger("wp-plugin-delete-error",c)))},b.updates.updateTheme=function(c){var e;return c=_.extend({success:b.updates.updateThemeSuccess,error:b.updates.updateThemeError},c),"themes-network"===pagenow?e=a('[data-slug="'+c.slug+'"]').find(".update-message").addClass("updating-message").find("p"):(e=a("#update-theme").closest(".notice").removeClass("notice-large"),e.find("h3").remove(),e=e.add(a('[data-slug="'+c.slug+'"]').find(".update-message")),e=e.addClass("updating-message").find("p")),e.html()!==b.updates.l10n.updating&&e.data("originaltext",e.html()),b.a11y.speak(b.updates.l10n.updatingMsg,"polite"),e.text(b.updates.l10n.updating),d.trigger("wp-theme-updating"),b.updates.ajax("update-theme",c)},b.updates.updateThemeSuccess=function(c){var e,f,g=a("body.modal-open").length,h=a('[data-slug="'+c.slug+'"]'),i={className:"updated-message notice-success notice-alt",message:b.updates.l10n.updated};"themes-network"===pagenow?(e=h.find(".update-message"),f=h.find(".theme-version-author-uri").html().replace(c.oldVersion,c.newVersion),h.find(".theme-version-author-uri").html(f)):(e=a(".theme-info .notice").add(h.find(".update-message")),g?a(".load-customize:visible").focus():h.find(".load-customize").focus()),b.updates.addAdminNotice(_.extend({selector:e},i)),b.a11y.speak(b.updates.l10n.updatedMsg,"polite"),b.updates.decrementCount("theme"),d.trigger("wp-theme-update-success",c),g&&a(".theme-info .theme-author").after(b.updates.adminNotice(i))},b.updates.updateThemeError=function(c){var e,f=a('[data-slug="'+c.slug+'"]'),g=b.updates.l10n.updateFailed.replace("%s",c.errorMessage);b.updates.isValidResponse(c,"update")&&(b.updates.maybeHandleCredentialError(c,"update-theme")||("themes-network"===pagenow?e=f.find(".update-message "):(e=a(".theme-info .notice").add(f.find(".notice")),a("body.modal-open").length?a(".load-customize:visible").focus():f.find(".load-customize").focus()),b.updates.addAdminNotice({selector:e,className:"update-message notice-error notice-alt is-dismissible",message:g}),b.a11y.speak(g,"polite"),d.trigger("wp-theme-update-error",c)))},b.updates.installTheme=function(c){var d=a('.theme-install[data-slug="'+c.slug+'"]');return c=_.extend({success:b.updates.installThemeSuccess,error:b.updates.installThemeError},c),d.addClass("updating-message"),d.parents(".theme").addClass("focus"),d.html()!==b.updates.l10n.installing&&d.data("originaltext",d.html()),d.text(b.updates.l10n.installing),b.a11y.speak(b.updates.l10n.installingMsg,"polite"),a('.install-theme-info, [data-slug="'+c.slug+'"]').removeClass("theme-install-failed").find(".notice.notice-error").remove(),b.updates.ajax("install-theme",c)},b.updates.installThemeSuccess=function(c){var e,f=a(".wp-full-overlay-header, [data-slug="+c.slug+"]");d.trigger("wp-install-theme-success",c),e=f.find(".button-primary").removeClass("updating-message").addClass("updated-message disabled").text(b.updates.l10n.installed),b.a11y.speak(b.updates.l10n.installedMsg,"polite"),setTimeout(function(){c.activateUrl&&e.attr("href",c.activateUrl).removeClass("theme-install updated-message disabled").addClass("activate").text(b.updates.l10n.activateTheme),c.customizeUrl&&e.siblings(".preview").replaceWith(function(){return a("").attr("href",c.customizeUrl).addClass("button button-secondary load-customize").text(b.updates.l10n.livePreview)})},1e3)},b.updates.installThemeError=function(c){var e,f,g=b.updates.l10n.installFailed.replace("%s",c.errorMessage),h=b.updates.adminNotice({className:"update-message notice-error notice-alt",message:g});b.updates.isValidResponse(c,"install")&&(b.updates.maybeHandleCredentialError(c,"install-theme")||(d.find("body").hasClass("full-overlay-active")?(f=a('.theme-install[data-slug="'+c.slug+'"]'),e=a(".install-theme-info").prepend(h)):(e=a('[data-slug="'+c.slug+'"]').removeClass("focus").addClass("theme-install-failed").append(h),f=e.find(".theme-install")),f.removeClass("updating-message").attr("aria-label",b.updates.l10n.installFailedLabel.replace("%s",e.find(".theme-name").text())).text(b.updates.l10n.installFailedShort),b.a11y.speak(g,"assertive"),d.trigger("wp-theme-install-error",c)))},b.updates.deleteTheme=function(c){var d=a(".theme-actions .delete-theme");return c=_.extend({success:b.updates.deleteThemeSuccess,error:b.updates.deleteThemeError},c),d.html()!==b.updates.l10n.deleting&&d.data("originaltext",d.html()),d.text(b.updates.l10n.deleting),b.a11y.speak(b.updates.l10n.deleting,"polite"),a(".theme-info .update-message").remove(),b.updates.ajax("delete-theme",c)},b.updates.deleteThemeSuccess=function(e){var f=a('[data-slug="'+e.slug+'"]');"themes-network"===pagenow&&f.css({backgroundColor:"#faafaa"}).fadeOut(350,function(){var d=a(".subsubsub"),f=a(this),g=c.totals,h=b.template("item-deleted-row");f.hasClass("plugin-update-tr")||f.after(h({slug:e.slug,colspan:a("#bulk-action-form").find("thead th:not(.hidden), thead td").length,name:f.find(".theme-title strong").text()})),f.remove(),f.hasClass("update")&&(g.upgrade--,b.updates.decrementCount("theme")),f.hasClass("inactive")&&(g.disabled--,g.disabled?d.find(".disabled .count").text("("+g.disabled+")"):d.find(".disabled").remove()),d.find(".all .count").text("("+--g.all+")")}),b.a11y.speak(b.updates.l10n.deleted,"polite"),d.trigger("wp-delete-theme-success",e)},b.updates.deleteThemeError=function(c){var e=a('tr.inactive[data-slug="'+c.slug+'"]'),f=a(".theme-actions .delete-theme"),g=b.template("item-update-row"),h=e.siblings("#"+c.slug+"-update"),i=b.updates.l10n.deleteFailed.replace("%s",c.errorMessage),j=b.updates.adminNotice({className:"update-message notice-error notice-alt",message:i});b.updates.maybeHandleCredentialError(c,"delete-theme")||("themes-network"===pagenow?h.length?(h.find(".notice-error").remove(),h.find(".plugin-update").append(j)):e.addClass("update").after(g({slug:c.slug,colspan:a("#bulk-action-form").find("thead th:not(.hidden), thead td").length,content:j})):a(".theme-info .theme-description").before(j),f.html(f.data("originaltext")),b.a11y.speak(i,"assertive"),d.trigger("wp-theme-delete-error",c))},b.updates._addCallbacks=function(a,c){return"import"===pagenow&&"install-plugin"===c&&(a.success=b.updates.installImporterSuccess,a.error=b.updates.installImporterError),a},b.updates.queueChecker=function(){var a;if(!b.updates.ajaxLocked&&b.updates.queue.length)switch(a=b.updates.queue.shift(),a.action){case"install-plugin":b.updates.installPlugin(a.data);break;case"update-plugin":b.updates.updatePlugin(a.data);break;case"delete-plugin":b.updates.deletePlugin(a.data);break;case"install-theme":b.updates.installTheme(a.data);break;case"update-theme":b.updates.updateTheme(a.data);break;case"delete-theme":b.updates.deleteTheme(a.data);break;default:window.console.error("Failed to execute queued update job.",a)}},b.updates.requestFilesystemCredentials=function(c){!1===b.updates.filesystemCredentials.available&&(c&&!b.updates.$elToReturnFocusToFromCredentialsModal&&(b.updates.$elToReturnFocusToFromCredentialsModal=a(c.target)),b.updates.ajaxLocked=!0,b.updates.requestForCredentialsModalOpen())},b.updates.maybeRequestFilesystemCredentials=function(a){b.updates.shouldRequestFilesystemCredentials&&!b.updates.ajaxLocked&&b.updates.requestFilesystemCredentials(a)},b.updates.keydown=function(c){27===c.keyCode?b.updates.requestForCredentialsModalCancel():9===c.keyCode&&("upgrade"!==c.target.id||c.shiftKey?"hostname"===c.target.id&&c.shiftKey&&(a("#upgrade").focus(),c.preventDefault()):(a("#hostname").focus(),c.preventDefault()))},b.updates.requestForCredentialsModalOpen=function(){var c=a("#request-filesystem-credentials-dialog");a("body").addClass("modal-open"),c.show(),c.find("input:enabled:first").focus(),c.on("keydown",b.updates.keydown)},b.updates.requestForCredentialsModalClose=function(){a("#request-filesystem-credentials-dialog").hide(),a("body").removeClass("modal-open"),b.updates.$elToReturnFocusToFromCredentialsModal&&b.updates.$elToReturnFocusToFromCredentialsModal.focus()},b.updates.requestForCredentialsModalCancel=function(){(b.updates.ajaxLocked||b.updates.queue.length)&&(_.each(b.updates.queue,function(a){d.trigger("credential-modal-cancel",a)}),b.updates.ajaxLocked=!1,b.updates.queue=[],b.updates.requestForCredentialsModalClose())},b.updates.showErrorInCredentialsForm=function(b){var c=a("#request-filesystem-credentials-form");c.find(".notice").remove(),c.find("#request-filesystem-credentials-title").after('

'+b+"

")},b.updates.credentialError=function(a,c){a=b.updates._addCallbacks(a,c),b.updates.queue.push({action:c,data:a}),b.updates.filesystemCredentials.available=!1,b.updates.showErrorInCredentialsForm(a.errorMessage),b.updates.requestFilesystemCredentials()},b.updates.maybeHandleCredentialError=function(a,c){return a.errorCode&&"unable_to_connect_to_filesystem"===a.errorCode?(b.updates.credentialError(a,c),!0):!1},b.updates.isValidResponse=function(c,d){var e,f=b.updates.l10n.unknownError;if(_.isObject(c)&&!_.isFunction(c.always))return!0;switch(_.isString(c)?f=c:_.isString(c.responseText)&&""!==c.responseText?f=c.responseText:_.isString(c.statusText)&&(f=c.statusText),d){case"update":e=b.updates.l10n.updateFailed;break;case"install":e=b.updates.l10n.installFailed;break;case"delete":e=b.updates.l10n.deleteFailed}return e=e.replace("%s",f),b.updates.addAdminNotice({id:"unknown_error",className:"notice-error is-dismissible",message:e}),b.updates.ajaxLocked=!1,b.updates.queue=[],a(".button.updating-message").removeClass("updating-message").attr("aria-label",b.updates.l10n.updateFailedShort).prop("disabled",!0).text(b.updates.l10n.updateFailedShort),a(".updating-message:not(.button):not(.thickbox)").removeClass("updating-message notice-warning").addClass("notice-error").find("p").text(e),b.a11y.speak(e,"assertive"),!1},b.updates.beforeunload=function(){return b.updates.ajaxLocked?b.updates.l10n.beforeunload:void 0},a(function(){var c=a("#plugin-filter"),e=a("#bulk-action-form"),f=a("#request-filesystem-credentials-dialog"),g=a(".plugins-php .wp-filter-search");b.updates.shouldRequestFilesystemCredentials=f.length>0,f.on("submit","form",function(c){c.preventDefault(),b.updates.filesystemCredentials.ftp.hostname=a("#hostname").val(),b.updates.filesystemCredentials.ftp.username=a("#username").val(),b.updates.filesystemCredentials.ftp.password=a("#password").val(),b.updates.filesystemCredentials.ftp.connectionType=a('input[name="connection_type"]:checked').val(),b.updates.filesystemCredentials.ssh.publicKey=a("#public_key").val(),b.updates.filesystemCredentials.ssh.privateKey=a("#private_key").val(),b.updates.filesystemCredentials.available=!0,b.updates.ajaxLocked=!1,b.updates.queueChecker(),b.updates.requestForCredentialsModalClose()}),f.on("click",'[data-js-action="close"], .notification-dialog-background',b.updates.requestForCredentialsModalCancel),f.on("change",'input[name="connection_type"]',function(){a("#ssh-keys").toggleClass("hidden","ssh"!==a(this).val())}).change(),d.on("credential-modal-cancel",function(c,d){var e,f,g=a(".updating-message");"import"===pagenow?g.removeClass("updating-message"):e="plugins"===pagenow||"plugins-network"===pagenow?a('tr[data-plugin="'+d.data.plugin+'"]').find(".update-message"):"plugin-install"===pagenow||"plugin-install-network"===pagenow?a(".update-now.updating-message"):g,e&&(f=e.data("originaltext"),"undefined"==typeof f&&(f=a("

").html(e.find("p").data("originaltext"))),e.removeClass("updating-message").html(f)),b.a11y.speak(b.updates.l10n.updateCancel,"polite")}),e.on("click","[data-plugin] .update-link",function(c){var d=a(c.target),e=d.parents("tr");c.preventDefault(),d.hasClass("updating-message")||d.hasClass("button-disabled")||(b.updates.maybeRequestFilesystemCredentials(c),b.updates.$elToReturnFocusToFromCredentialsModal=e.find(".check-column input"),b.updates.updatePlugin({plugin:e.data("plugin"),slug:e.data("slug")}))}),c.on("click",".update-now",function(c){var d=a(c.target);c.preventDefault(),d.hasClass("updating-message")||d.hasClass("button-disabled")||(b.updates.maybeRequestFilesystemCredentials(c),b.updates.updatePlugin({plugin:d.data("plugin"),slug:d.data("slug")}))}),c.on("click",".install-now",function(c){var e=a(c.target);c.preventDefault(),e.hasClass("updating-message")||e.hasClass("button-disabled")||(b.updates.shouldRequestFilesystemCredentials&&!b.updates.ajaxLocked&&(b.updates.requestFilesystemCredentials(c),d.on("credential-modal-cancel",function(){var c=a(".install-now.updating-message");c.removeClass("updating-message").text(b.updates.l10n.installNow),b.a11y.speak(b.updates.l10n.updateCancel,"polite")})),b.updates.installPlugin({slug:e.data("slug")}))}),e.on("click","[data-plugin] a.delete",function(c){var d=a(c.target).parents("tr");c.preventDefault(),window.confirm(b.updates.l10n.aysDeleteUninstall.replace("%s",d.find(".plugin-title strong").text()))&&(b.updates.maybeRequestFilesystemCredentials(c),b.updates.deletePlugin({plugin:d.data("plugin"),slug:d.data("slug")}))}),d.on("click",".themes-php.network-admin .update-link",function(c){var d=a(c.target),e=d.parents("tr");c.preventDefault(),d.hasClass("updating-message")||d.hasClass("button-disabled")||(b.updates.maybeRequestFilesystemCredentials(c),b.updates.$elToReturnFocusToFromCredentialsModal=e.find(".check-column input"),b.updates.updateTheme({slug:e.data("slug")}))}),d.on("click",".themes-php.network-admin a.delete",function(c){var d=a(c.target).parents("tr");c.preventDefault(),window.confirm(b.updates.l10n.aysDelete.replace("%s",d.find(".theme-title strong").text()))&&(b.updates.maybeRequestFilesystemCredentials(c),b.updates.deleteTheme({slug:d.data("slug")}))}),e.on("click",'[type="submit"]',function(c){var f,g,h=a(c.target).siblings("select").val(),i=e.find('input[name="checked[]"]:checked'),j=0,k=0,l=[];switch(pagenow){case"plugins":case"plugins-network":f="plugin";break;case"themes-network":f="theme";break;default:return void window.console.error('The page "%s" is not white-listed for bulk action handling.',pagenow)}if(!i.length)return c.preventDefault(),a("html, body").animate({scrollTop:0}),b.updates.addAdminNotice({id:"no-items-selected",className:"notice-error is-dismissible",message:b.updates.l10n.noItemsSelected});switch(h){case"update-selected":g=h.replace("selected",f);break;case"delete-selected":if(!window.confirm("plugin"===f?b.updates.l10n.aysBulkDelete:b.updates.l10n.aysBulkDeleteThemes))return void c.preventDefault();g=h.replace("selected",f);break;default:return void window.console.error("Failed to identify bulk action: %s",h)}b.updates.maybeRequestFilesystemCredentials(c),c.preventDefault(),e.find('.manage-column [type="checkbox"]').prop("checked",!1),i.each(function(c,d){var e=a(d),f=e.parents("tr");e.prop("checked",!1),("update-selected"!==h||f.hasClass("update")&&!f.find("notice-error").length)&&b.updates.queue.push({action:g,data:{plugin:f.data("plugin"),slug:f.data("slug")}})}),d.on("wp-plugin-update-success wp-plugin-update-error wp-theme-update-success wp-theme-update-error",function(c,d){var e,f;"wp-"+d.update+"-update-success"===c.type?j++:(f=d.pluginName?d.pluginName:a('[data-slug="'+d.slug+'"]').find(".theme-title strong").text(),k++,l.push(f+": "+d.errorMessage)),b.updates.adminNotice=b.template("wp-bulk-updates-admin-notice"),b.updates.addAdminNotice({id:"bulk-action-notice",successes:j,errors:k,errorMessages:l,type:d.update}),e=a("#bulk-action-notice").on("click","button",function(){e.find("ul").toggleClass("hidden")}),k>0&&!b.updates.queue.length&&a("html, body").animate({scrollTop:0})}),d.on("wp-updates-notice-added",function(){b.updates.adminNotice=b.template("wp-updates-admin-notice")}),b.updates.queueChecker()}),a(".plugin-install-php .wp-filter-search").on("keyup search",_.debounce(function(){var c=a("#plugin-filter").empty(),d=_.extend({_ajax_nonce:b.updates.ajaxNonce,s:a("

").html(a(this).val()).text(),tab:"search",type:a("#typeselector").val()},{type:"term"});b.updates.searchTerm!==d.s&&(b.updates.searchTerm=d.s,history.pushState&&history.pushState(null,"",location.href.split("?")[0]+"?"+a.param(_.omit(d,"_ajax_nonce"))),"undefined"!=typeof b.updates.searchRequest&&b.updates.searchRequest.abort(),a("body").addClass("loading-content"),b.updates.searchRequest=b.ajax.post("search-install-plugins",d).done(function(d){a("body").removeClass("loading-content"),c.append(d.items),delete b.updates.searchRequest}))},500)),g.length>0&&g.attr("aria-describedby","live-search-desc"),g.on("keyup input",_.debounce(function(c){var d={_ajax_nonce:b.updates.ajaxNonce,s:c.target.value};"keyup"===c.type&&27===c.which&&(c.target.value=""),b.updates.searchTerm!==d.s&&(b.updates.searchTerm=d.s,history.pushState&&history.pushState(null,"",location.href.split("?")[0]+"?s="+d.s),"undefined"!=typeof b.updates.searchRequest&&b.updates.searchRequest.abort(),e.empty(),a("body").addClass("loading-content"),b.updates.searchRequest=b.ajax.post("search-plugins",d).done(function(c){var f=a("").addClass("subtitle").html(b.updates.l10n.searchResults.replace("%s",d.s)),g=a(".wrap .subtitle");d.s.length?g.length?g.replaceWith(f):a(".wrap h1").append(f):g.remove(),a("body").removeClass("loading-content"),e.append(c.items),delete b.updates.searchRequest,0===c.count?b.a11y.speak(b.updates.l10n.noPluginsFound):b.a11y.speak(b.updates.l10n.pluginsFound.replace("%d",c.count))}))},500)),d.on("submit",".search-plugins",function(b){b.preventDefault(),a("input.wp-filter-search").trigger("search")}),a("#typeselector").on("change",function(){a('input[name="s"]').trigger("search")}),a("#plugin_update_from_iframe").on("click",function(b){var c,d=window.parent===window?null:window.parent;a.support.postMessage=!!window.postMessage,!1!==a.support.postMessage&&null!==d&&-1===window.parent.location.pathname.indexOf("update-core.php")&&(b.preventDefault(),c={action:"update-plugin",data:{plugin:a(this).data("plugin"),slug:a(this).data("slug")}},d.postMessage(JSON.stringify(c),window.location.origin))}),a("#plugin_install_from_iframe").on("click",function(b){var c,d=window.parent===window?null:window.parent;a.support.postMessage=!!window.postMessage,!1!==a.support.postMessage&&null!==d&&-1===window.parent.location.pathname.indexOf("index.php")&&(b.preventDefault(),c={action:"install-plugin",data:{slug:a(this).data("slug")}},d.postMessage(JSON.stringify(c),window.location.origin))}),a(window).on("message",function(c){var d,e=c.originalEvent,f=document.location.protocol+"//"+document.location.hostname;if(e.origin===f){try{d=a.parseJSON(e.data)}catch(g){return}if("undefined"!=typeof d.action)switch(d.action){case"decrementUpdateCount":b.updates.decrementCount(d.upgradeType);break;case"install-plugin":case"update-plugin":window.tb_remove(),d.data=b.updates._addCallbacks(d.data,d.action),b.updates.queue.push(d),b.updates.queueChecker()}}}),a(window).on("beforeunload",b.updates.beforeunload)})}(jQuery,window.wp,_.extend(window._wpUpdatesSettings,window._wpUpdatesItemCounts||{})); \ No newline at end of file +!function(a,b,c){var d=a(document);b=b||{},b.updates={},b.updates.ajaxNonce=c.ajax_nonce,b.updates.l10n=c.l10n,b.updates.searchTerm="",b.updates.shouldRequestFilesystemCredentials=!1,b.updates.filesystemCredentials={ftp:{host:"",username:"",password:"",connectionType:""},ssh:{publicKey:"",privateKey:""},available:!1},b.updates.ajaxLocked=!1,b.updates.adminNotice=b.template("wp-updates-admin-notice"),b.updates.queue=[],b.updates.$elToReturnFocusToFromCredentialsModal=void 0,b.updates.addAdminNotice=function(c){var e,f=a(c.selector);delete c.selector,e=b.updates.adminNotice(c),f.length||(f=a("#"+c.id)),f.length?f.replaceWith(e):a(".wrap").find("> h1").after(e),d.trigger("wp-updates-notice-added")},b.updates.ajax=function(c,d){var e={};return b.updates.ajaxLocked?(b.updates.queue.push({action:c,data:d}),a.Deferred()):(b.updates.ajaxLocked=!0,d.success&&(e.success=d.success,delete d.success),d.error&&(e.error=d.error,delete d.error),e.data=_.extend(d,{action:c,_ajax_nonce:b.updates.ajaxNonce,username:b.updates.filesystemCredentials.ftp.username,password:b.updates.filesystemCredentials.ftp.password,hostname:b.updates.filesystemCredentials.ftp.hostname,connection_type:b.updates.filesystemCredentials.ftp.connectionType,public_key:b.updates.filesystemCredentials.ssh.publicKey,private_key:b.updates.filesystemCredentials.ssh.privateKey}),b.ajax.send(e).always(b.updates.ajaxAlways))},b.updates.ajaxAlways=function(c){c.errorCode||"unable_to_connect_to_filesystem"===c.errorCode||(b.updates.ajaxLocked=!1,b.updates.queueChecker()),"undefined"!=typeof c.debug&&_.map(c.debug,function(b){window.console.log(a("

").html(b).text())})},b.updates.decrementCount=function(b){var c,d,e,f=a("#wp-admin-bar-updates"),g=a('a[href="update-core.php"] .update-plugins'),h=f.find(".ab-label").text();h=parseInt(h,10)-1,0>h||isNaN(h)||(f.find(".ab-item").removeAttr("title"),f.find(".ab-label").text(h),h||f.find(".ab-label").parents("li").remove(),g.each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+h)}),g.removeAttr("title"),g.find(".update-count").text(h),"plugin"===b?(c=a("#menu-plugins"),d=c.find(".plugin-count")):"theme"===b&&(c=a("#menu-appearance"),d=c.find(".theme-count")),d&&(e=d.eq(0).text(),e=parseInt(e,10)-1),0>e||isNaN(e)||(e>0?(a(".subsubsub .upgrade .count").text("("+e+")"),d.text(e),c.find(".update-plugins").each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+e)})):(a(".subsubsub .upgrade").remove(),c.find(".update-plugins").remove())))},b.updates.updatePlugin=function(c){var e,f,g,h;return c=_.extend({success:b.updates.updatePluginSuccess,error:b.updates.updatePluginError},c),"plugins"===pagenow||"plugins-network"===pagenow?(e=a('tr[data-plugin="'+c.plugin+'"]'),g=e.find(".update-message").addClass("updating-message").find("p"),h=b.updates.l10n.updatingLabel.replace("%s",e.find(".plugin-title strong").text())):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(f=a(".plugin-card-"+c.slug),g=f.find(".update-now").addClass("updating-message"),h=b.updates.l10n.updatingLabel.replace("%s",g.data("name")),f.removeClass("plugin-card-update-failed").find(".notice.notice-error").remove()),g.html()!==b.updates.l10n.updating&&g.data("originaltext",g.html()),g.attr("aria-label",h).text(b.updates.l10n.updating),d.trigger("wp-plugin-updating"),b.updates.ajax("update-plugin",c)},b.updates.updatePluginSuccess=function(c){var e,f,g;"plugins"===pagenow||"plugins-network"===pagenow?(e=a('tr[data-plugin="'+c.plugin+'"]').removeClass("update").addClass("updated"),f=e.find(".update-message").removeClass("updating-message notice-warning").addClass("updated-message notice-success").find("p"),g=e.find(".plugin-version-author-uri").html().replace(c.oldVersion,c.newVersion),e.find(".plugin-version-author-uri").html(g)):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(f=a(".plugin-card-"+c.slug).find(".update-now").removeClass("updating-message").addClass("button-disabled updated-message")),f.attr("aria-label",b.updates.l10n.updatedLabel.replace("%s",c.pluginName)).text(b.updates.l10n.updated),b.a11y.speak(b.updates.l10n.updatedMsg,"polite"),b.updates.decrementCount("plugin"),d.trigger("wp-plugin-update-success",c)},b.updates.updatePluginError=function(c){var e,f,g;b.updates.isValidResponse(c,"update")&&(b.updates.maybeHandleCredentialError(c,"update-plugin")||(g=b.updates.l10n.updateFailed.replace("%s",c.errorMessage),"plugins"===pagenow||"plugins-network"===pagenow?(f=a('tr[data-plugin="'+c.plugin+'"]').find(".update-message"),f.removeClass("updating-message notice-warning").addClass("notice-error").find("p").html(g)):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(e=a(".plugin-card-"+c.slug).addClass("plugin-card-update-failed").append(b.updates.adminNotice({className:"update-message notice-error notice-alt is-dismissible",message:g})),e.find(".update-now").attr("aria-label",b.updates.l10n.updateFailedLabel.replace("%s",c.pluginName)).text(b.updates.l10n.updateFailedShort).removeClass("updating-message"),e.on("click",".notice.is-dismissible .notice-dismiss",function(){setTimeout(function(){e.removeClass("plugin-card-update-failed").find(".column-name a").focus(),e.find(".update-now").attr("aria-label",!1).text(b.updates.l10n.updateNow)},200)})),b.a11y.speak(g,"assertive"),d.trigger("wp-plugin-update-error",c)))},b.updates.installPlugin=function(c){var d=a(".plugin-card-"+c.slug),e=d.find(".install-now");return c=_.extend({success:b.updates.installPluginSuccess,error:b.updates.installPluginError},c),"import"===pagenow?e=a('a[href*="'+c.slug+'"]'):e.text(b.updates.l10n.installing),e.addClass("updating-message").attr("aria-label",b.updates.l10n.pluginInstallingLabel.replace("%s",e.data("name"))),b.a11y.speak(b.updates.l10n.installingMsg,"polite"),d.removeClass("plugin-card-install-failed").find(".notice.notice-error").remove(),b.updates.ajax("install-plugin",c)},b.updates.installPluginSuccess=function(c){var e=a(".plugin-card-"+c.slug).find(".install-now");e.removeClass("updating-message").addClass("updated-message installed button-disabled").attr("aria-label",b.updates.l10n.pluginInstalledLabel.replace("%s",c.pluginName)).text(b.updates.l10n.installed),b.a11y.speak(b.updates.l10n.installedMsg,"polite"),d.trigger("wp-plugin-install-success",c),c.activateUrl&&setTimeout(function(){e.removeClass("install-now installed button-disabled updated-message").addClass("activate-now button-primary").attr("href",c.activateUrl).attr("aria-label",b.updates.l10n.activatePluginLabel.replace("%s",c.pluginName)).text(b.updates.l10n.activatePlugin)},1e3)},b.updates.installPluginError=function(c){var e,f=a(".plugin-card-"+c.slug),g=f.find(".install-now");b.updates.isValidResponse(c,"install")&&(b.updates.maybeHandleCredentialError(c,"install-plugin")||(e=b.updates.l10n.installFailed.replace("%s",c.errorMessage),f.addClass("plugin-card-update-failed").append('

'+e+"

"),f.on("click",".notice.is-dismissible .notice-dismiss",function(){setTimeout(function(){f.removeClass("plugin-card-update-failed").find(".column-name a").focus()},200)}),g.removeClass("updating-message").addClass("button-disabled").attr("aria-label",b.updates.l10n.pluginInstallFailedLabel.replace("%s",g.data("name"))).text(b.updates.l10n.installFailedShort),b.a11y.speak(e,"assertive"),d.trigger("wp-plugin-install-error",c)))},b.updates.installImporterSuccess=function(c){b.updates.addAdminNotice({id:"install-success",className:"notice-success is-dismissible",message:b.updates.l10n.importerInstalledMsg.replace("%s",c.activateUrl+"&from=import")}),a('a[href*="'+c.slug+'"]').removeClass("thickbox open-plugin-details-modal updating-message").off("click").attr("href",c.activateUrl+"&from=import").attr("title",b.updates.l10n.activateImporter),b.a11y.speak(b.updates.l10n.installedMsg,"polite"),d.trigger("wp-importer-install-success",c)},b.updates.installImporterError=function(c){var e=b.updates.l10n.installFailed.replace("%s",c.errorMessage);b.updates.isValidResponse(c,"install")&&(b.updates.maybeHandleCredentialError(c,"install-plugin")||(b.updates.addAdminNotice({id:c.errorCode,className:"notice-error is-dismissible",message:e}),a('a[href*="'+c.slug+'"]').removeClass("updating-message"),b.a11y.speak(e,"assertive"),d.trigger("wp-importer-install-error",c)))},b.updates.deletePlugin=function(c){var d=a('[data-plugin="'+c.plugin+'"]').find(".update-message p");return c=_.extend({success:b.updates.deletePluginSuccess,error:b.updates.deletePluginError},c),d.html()!==b.updates.l10n.updating&&d.data("originaltext",d.html()),b.a11y.speak(b.updates.l10n.deleting,"polite"),b.updates.ajax("delete-plugin",c)},b.updates.deletePluginSuccess=function(e){a('[data-plugin="'+e.plugin+'"]').css({backgroundColor:"#faafaa"}).fadeOut(350,function(){var d=a("#bulk-action-form"),f=a(".subsubsub"),g=a(this),h=d.find("thead th:not(.hidden), thead td").length,i=b.template("item-deleted-row"),j=c.plugins;g.hasClass("plugin-update-tr")||g.after(i({slug:e.slug,plugin:e.plugin,colspan:h,name:e.pluginName})),g.remove(),-1!==_.indexOf(j.upgrade,e.plugin)&&(j.upgrade=_.without(j.upgrade,e.plugin),b.updates.decrementCount("plugin")),-1!==_.indexOf(j.inactive,e.plugin)&&(j.inactive=_.without(j.inactive,e.plugin),j.inactive.length?f.find(".inactive .count").text("("+j.inactive.length+")"):f.find(".inactive").remove()),-1!==_.indexOf(j.active,e.plugin)&&(j.active=_.without(j.active,e.plugin),j.active.length?f.find(".active .count").text("("+j.active.length+")"):f.find(".active").remove()),-1!==_.indexOf(j.recently_activated,e.plugin)&&(j.recently_activated=_.without(j.recently_activated,e.plugin),j.recently_activated.length?f.find(".recently_activated .count").text("("+j.recently_activated.length+")"):f.find(".recently_activated").remove()),j.all=_.without(j.all,e.plugin),j.all.length?f.find(".all .count").text("("+j.all.length+")"):(d.find(".tablenav").css({visibility:"hidden"}),f.find(".all").remove(),d.find("tr.no-items").length||d.find("#the-list").append(''+b.updates.l10n.noPlugins+""))}),b.a11y.speak(b.updates.l10n.deleted,"polite"),d.trigger("wp-plugin-delete-success",e)},b.updates.deletePluginError=function(c){var e=a('tr.inactive[data-plugin="'+c.plugin+'"]'),f=b.template("item-update-row"),g=e.siblings('[data-plugin="'+c.plugin+'"]'),h=b.updates.adminNotice({className:"update-message notice-error notice-alt",message:c.errorMessage});b.updates.isValidResponse(c,"delete")&&(b.updates.maybeHandleCredentialError(c,"delete-plugin")||(g.length?(g.find(".notice-error").remove(),g.find(".plugin-update").append(h)):e.addClass("update").after(f({slug:c.slug,plugin:c.plugin,colspan:a("#bulk-action-form").find("thead th:not(.hidden), thead td").length,content:h})),d.trigger("wp-plugin-delete-error",c)))},b.updates.updateTheme=function(c){var e;return c=_.extend({success:b.updates.updateThemeSuccess,error:b.updates.updateThemeError},c),"themes-network"===pagenow?e=a('[data-slug="'+c.slug+'"]').find(".update-message").addClass("updating-message").find("p"):(e=a("#update-theme").closest(".notice").removeClass("notice-large"),e.find("h3").remove(),e=e.add(a('[data-slug="'+c.slug+'"]').find(".update-message")),e=e.addClass("updating-message").find("p")),e.html()!==b.updates.l10n.updating&&e.data("originaltext",e.html()),b.a11y.speak(b.updates.l10n.updatingMsg,"polite"),e.text(b.updates.l10n.updating),d.trigger("wp-theme-updating"),b.updates.ajax("update-theme",c)},b.updates.updateThemeSuccess=function(c){var e,f,g=a("body.modal-open").length,h=a('[data-slug="'+c.slug+'"]'),i={className:"updated-message notice-success notice-alt",message:b.updates.l10n.updated};"themes-network"===pagenow?(e=h.find(".update-message"),f=h.find(".theme-version-author-uri").html().replace(c.oldVersion,c.newVersion),h.find(".theme-version-author-uri").html(f)):(e=a(".theme-info .notice").add(h.find(".update-message")),g?a(".load-customize:visible").focus():h.find(".load-customize").focus()),b.updates.addAdminNotice(_.extend({selector:e},i)),b.a11y.speak(b.updates.l10n.updatedMsg,"polite"),b.updates.decrementCount("theme"),d.trigger("wp-theme-update-success",c),g&&a(".theme-info .theme-author").after(b.updates.adminNotice(i))},b.updates.updateThemeError=function(c){var e,f=a('[data-slug="'+c.slug+'"]'),g=b.updates.l10n.updateFailed.replace("%s",c.errorMessage);b.updates.isValidResponse(c,"update")&&(b.updates.maybeHandleCredentialError(c,"update-theme")||("themes-network"===pagenow?e=f.find(".update-message "):(e=a(".theme-info .notice").add(f.find(".notice")),a("body.modal-open").length?a(".load-customize:visible").focus():f.find(".load-customize").focus()),b.updates.addAdminNotice({selector:e,className:"update-message notice-error notice-alt is-dismissible",message:g}),b.a11y.speak(g,"polite"),d.trigger("wp-theme-update-error",c)))},b.updates.installTheme=function(c){var d=a('.theme-install[data-slug="'+c.slug+'"]');return c=_.extend({success:b.updates.installThemeSuccess,error:b.updates.installThemeError},c),d.addClass("updating-message"),d.parents(".theme").addClass("focus"),d.html()!==b.updates.l10n.installing&&d.data("originaltext",d.html()),d.text(b.updates.l10n.installing).attr("aria-label",b.updates.l10n.themeInstallingLabel.replace("%s",d.data("name"))),b.a11y.speak(b.updates.l10n.installingMsg,"polite"),a('.install-theme-info, [data-slug="'+c.slug+'"]').removeClass("theme-install-failed").find(".notice.notice-error").remove(),b.updates.ajax("install-theme",c)},b.updates.installThemeSuccess=function(c){var e,f=a(".wp-full-overlay-header, [data-slug="+c.slug+"]");d.trigger("wp-install-theme-success",c),e=f.find(".button-primary").removeClass("updating-message").addClass("updated-message disabled").attr("aria-label",b.updates.l10n.themeInstalledLabel.replace("%s",c.themeName)).text(b.updates.l10n.installed),b.a11y.speak(b.updates.l10n.installedMsg,"polite"),setTimeout(function(){c.activateUrl&&e.attr("href",c.activateUrl).removeClass("theme-install updated-message disabled").addClass("activate").attr("aria-label",b.updates.l10n.activateThemeLabel.replace("%s",c.themeName)).text(b.updates.l10n.activateTheme),c.customizeUrl&&e.siblings(".preview").replaceWith(function(){return a("
").attr("href",c.customizeUrl).addClass("button button-secondary load-customize").text(b.updates.l10n.livePreview)})},1e3)},b.updates.installThemeError=function(c){var e,f,g=b.updates.l10n.installFailed.replace("%s",c.errorMessage),h=b.updates.adminNotice({className:"update-message notice-error notice-alt",message:g});b.updates.isValidResponse(c,"install")&&(b.updates.maybeHandleCredentialError(c,"install-theme")||(d.find("body").hasClass("full-overlay-active")?(f=a('.theme-install[data-slug="'+c.slug+'"]'),e=a(".install-theme-info").prepend(h)):(e=a('[data-slug="'+c.slug+'"]').removeClass("focus").addClass("theme-install-failed").append(h),f=e.find(".theme-install")),f.removeClass("updating-message").attr("aria-label",b.updates.l10n.themeInstallFailedLabel.replace("%s",f.data("name"))).text(b.updates.l10n.installFailedShort),b.a11y.speak(g,"assertive"),d.trigger("wp-theme-install-error",c)))},b.updates.deleteTheme=function(c){var d=a(".theme-actions .delete-theme");return c=_.extend({success:b.updates.deleteThemeSuccess,error:b.updates.deleteThemeError},c),d.html()!==b.updates.l10n.deleting&&d.data("originaltext",d.html()),d.text(b.updates.l10n.deleting),b.a11y.speak(b.updates.l10n.deleting,"polite"),a(".theme-info .update-message").remove(),b.updates.ajax("delete-theme",c)},b.updates.deleteThemeSuccess=function(e){var f=a('[data-slug="'+e.slug+'"]');"themes-network"===pagenow&&f.css({backgroundColor:"#faafaa"}).fadeOut(350,function(){var d=a(".subsubsub"),f=a(this),g=c.totals,h=b.template("item-deleted-row");f.hasClass("plugin-update-tr")||f.after(h({slug:e.slug,colspan:a("#bulk-action-form").find("thead th:not(.hidden), thead td").length,name:f.find(".theme-title strong").text()})),f.remove(),f.hasClass("update")&&(g.upgrade--,b.updates.decrementCount("theme")),f.hasClass("inactive")&&(g.disabled--,g.disabled?d.find(".disabled .count").text("("+g.disabled+")"):d.find(".disabled").remove()),d.find(".all .count").text("("+--g.all+")")}),b.a11y.speak(b.updates.l10n.deleted,"polite"),d.trigger("wp-delete-theme-success",e)},b.updates.deleteThemeError=function(c){var e=a('tr.inactive[data-slug="'+c.slug+'"]'),f=a(".theme-actions .delete-theme"),g=b.template("item-update-row"),h=e.siblings("#"+c.slug+"-update"),i=b.updates.l10n.deleteFailed.replace("%s",c.errorMessage),j=b.updates.adminNotice({className:"update-message notice-error notice-alt",message:i});b.updates.maybeHandleCredentialError(c,"delete-theme")||("themes-network"===pagenow?h.length?(h.find(".notice-error").remove(),h.find(".plugin-update").append(j)):e.addClass("update").after(g({slug:c.slug,colspan:a("#bulk-action-form").find("thead th:not(.hidden), thead td").length,content:j})):a(".theme-info .theme-description").before(j),f.html(f.data("originaltext")),b.a11y.speak(i,"assertive"),d.trigger("wp-theme-delete-error",c))},b.updates._addCallbacks=function(a,c){return"import"===pagenow&&"install-plugin"===c&&(a.success=b.updates.installImporterSuccess,a.error=b.updates.installImporterError),a},b.updates.queueChecker=function(){var a;if(!b.updates.ajaxLocked&&b.updates.queue.length)switch(a=b.updates.queue.shift(),a.action){case"install-plugin":b.updates.installPlugin(a.data);break;case"update-plugin":b.updates.updatePlugin(a.data);break;case"delete-plugin":b.updates.deletePlugin(a.data);break;case"install-theme":b.updates.installTheme(a.data);break;case"update-theme":b.updates.updateTheme(a.data);break;case"delete-theme":b.updates.deleteTheme(a.data);break;default:window.console.error("Failed to execute queued update job.",a)}},b.updates.requestFilesystemCredentials=function(c){!1===b.updates.filesystemCredentials.available&&(c&&!b.updates.$elToReturnFocusToFromCredentialsModal&&(b.updates.$elToReturnFocusToFromCredentialsModal=a(c.target)),b.updates.ajaxLocked=!0,b.updates.requestForCredentialsModalOpen())},b.updates.maybeRequestFilesystemCredentials=function(a){b.updates.shouldRequestFilesystemCredentials&&!b.updates.ajaxLocked&&b.updates.requestFilesystemCredentials(a)},b.updates.keydown=function(c){27===c.keyCode?b.updates.requestForCredentialsModalCancel():9===c.keyCode&&("upgrade"!==c.target.id||c.shiftKey?"hostname"===c.target.id&&c.shiftKey&&(a("#upgrade").focus(),c.preventDefault()):(a("#hostname").focus(),c.preventDefault()))},b.updates.requestForCredentialsModalOpen=function(){var c=a("#request-filesystem-credentials-dialog");a("body").addClass("modal-open"),c.show(),c.find("input:enabled:first").focus(),c.on("keydown",b.updates.keydown)},b.updates.requestForCredentialsModalClose=function(){a("#request-filesystem-credentials-dialog").hide(),a("body").removeClass("modal-open"),b.updates.$elToReturnFocusToFromCredentialsModal&&b.updates.$elToReturnFocusToFromCredentialsModal.focus()},b.updates.requestForCredentialsModalCancel=function(){(b.updates.ajaxLocked||b.updates.queue.length)&&(_.each(b.updates.queue,function(a){d.trigger("credential-modal-cancel",a)}),b.updates.ajaxLocked=!1,b.updates.queue=[],b.updates.requestForCredentialsModalClose())},b.updates.showErrorInCredentialsForm=function(b){var c=a("#request-filesystem-credentials-form");c.find(".notice").remove(),c.find("#request-filesystem-credentials-title").after('

'+b+"

")},b.updates.credentialError=function(a,c){a=b.updates._addCallbacks(a,c),b.updates.queue.push({action:c,data:a}),b.updates.filesystemCredentials.available=!1,b.updates.showErrorInCredentialsForm(a.errorMessage),b.updates.requestFilesystemCredentials()},b.updates.maybeHandleCredentialError=function(a,c){return a.errorCode&&"unable_to_connect_to_filesystem"===a.errorCode?(b.updates.credentialError(a,c),!0):!1},b.updates.isValidResponse=function(c,d){var e,f=b.updates.l10n.unknownError;if(_.isObject(c)&&!_.isFunction(c.always))return!0;switch(_.isString(c)?f=c:_.isString(c.responseText)&&""!==c.responseText?f=c.responseText:_.isString(c.statusText)&&(f=c.statusText),d){case"update":e=b.updates.l10n.updateFailed;break;case"install":e=b.updates.l10n.installFailed;break;case"delete":e=b.updates.l10n.deleteFailed}return e=e.replace("%s",f),b.updates.addAdminNotice({id:"unknown_error",className:"notice-error is-dismissible",message:e}),b.updates.ajaxLocked=!1,b.updates.queue=[],a(".button.updating-message").removeClass("updating-message").attr("aria-label",b.updates.l10n.updateFailedShort).prop("disabled",!0).text(b.updates.l10n.updateFailedShort),a(".updating-message:not(.button):not(.thickbox)").removeClass("updating-message notice-warning").addClass("notice-error").find("p").text(e),b.a11y.speak(e,"assertive"),!1},b.updates.beforeunload=function(){return b.updates.ajaxLocked?b.updates.l10n.beforeunload:void 0},a(function(){var c=a("#plugin-filter"),e=a("#bulk-action-form"),f=a("#request-filesystem-credentials-dialog"),g=a(".plugins-php .wp-filter-search");b.updates.shouldRequestFilesystemCredentials=f.length>0,f.on("submit","form",function(c){c.preventDefault(),b.updates.filesystemCredentials.ftp.hostname=a("#hostname").val(),b.updates.filesystemCredentials.ftp.username=a("#username").val(),b.updates.filesystemCredentials.ftp.password=a("#password").val(),b.updates.filesystemCredentials.ftp.connectionType=a('input[name="connection_type"]:checked').val(),b.updates.filesystemCredentials.ssh.publicKey=a("#public_key").val(),b.updates.filesystemCredentials.ssh.privateKey=a("#private_key").val(),b.updates.filesystemCredentials.available=!0,b.updates.ajaxLocked=!1,b.updates.queueChecker(),b.updates.requestForCredentialsModalClose()}),f.on("click",'[data-js-action="close"], .notification-dialog-background',b.updates.requestForCredentialsModalCancel),f.on("change",'input[name="connection_type"]',function(){a("#ssh-keys").toggleClass("hidden","ssh"!==a(this).val())}).change(),d.on("credential-modal-cancel",function(c,d){var e,f,g=a(".updating-message");"import"===pagenow?g.removeClass("updating-message"):e="plugins"===pagenow||"plugins-network"===pagenow?a('tr[data-plugin="'+d.data.plugin+'"]').find(".update-message"):"plugin-install"===pagenow||"plugin-install-network"===pagenow?a(".update-now.updating-message"):g,e&&(f=e.data("originaltext"),"undefined"==typeof f&&(f=a("

").html(e.find("p").data("originaltext"))),e.removeClass("updating-message").html(f)),b.a11y.speak(b.updates.l10n.updateCancel,"polite")}),e.on("click","[data-plugin] .update-link",function(c){var d=a(c.target),e=d.parents("tr");c.preventDefault(),d.hasClass("updating-message")||d.hasClass("button-disabled")||(b.updates.maybeRequestFilesystemCredentials(c),b.updates.$elToReturnFocusToFromCredentialsModal=e.find(".check-column input"),b.updates.updatePlugin({plugin:e.data("plugin"),slug:e.data("slug")}))}),c.on("click",".update-now",function(c){var d=a(c.target);c.preventDefault(),d.hasClass("updating-message")||d.hasClass("button-disabled")||(b.updates.maybeRequestFilesystemCredentials(c),b.updates.updatePlugin({plugin:d.data("plugin"),slug:d.data("slug")}))}),c.on("click",".install-now",function(c){var e=a(c.target);c.preventDefault(),e.hasClass("updating-message")||e.hasClass("button-disabled")||(b.updates.shouldRequestFilesystemCredentials&&!b.updates.ajaxLocked&&(b.updates.requestFilesystemCredentials(c),d.on("credential-modal-cancel",function(){var c=a(".install-now.updating-message");c.removeClass("updating-message").text(b.updates.l10n.installNow),b.a11y.speak(b.updates.l10n.updateCancel,"polite")})),b.updates.installPlugin({slug:e.data("slug")}))}),e.on("click","[data-plugin] a.delete",function(c){var d=a(c.target).parents("tr");c.preventDefault(),window.confirm(b.updates.l10n.aysDeleteUninstall.replace("%s",d.find(".plugin-title strong").text()))&&(b.updates.maybeRequestFilesystemCredentials(c),b.updates.deletePlugin({plugin:d.data("plugin"),slug:d.data("slug")}))}),d.on("click",".themes-php.network-admin .update-link",function(c){var d=a(c.target),e=d.parents("tr");c.preventDefault(),d.hasClass("updating-message")||d.hasClass("button-disabled")||(b.updates.maybeRequestFilesystemCredentials(c),b.updates.$elToReturnFocusToFromCredentialsModal=e.find(".check-column input"),b.updates.updateTheme({slug:e.data("slug")}))}),d.on("click",".themes-php.network-admin a.delete",function(c){var d=a(c.target).parents("tr");c.preventDefault(),window.confirm(b.updates.l10n.aysDelete.replace("%s",d.find(".theme-title strong").text()))&&(b.updates.maybeRequestFilesystemCredentials(c),b.updates.deleteTheme({slug:d.data("slug")}))}),e.on("click",'[type="submit"]',function(c){var f,g,h=a(c.target).siblings("select").val(),i=e.find('input[name="checked[]"]:checked'),j=0,k=0,l=[];switch(pagenow){case"plugins":case"plugins-network":f="plugin";break;case"themes-network":f="theme";break;default:return void window.console.error('The page "%s" is not white-listed for bulk action handling.',pagenow)}if(!i.length)return c.preventDefault(),a("html, body").animate({scrollTop:0}),b.updates.addAdminNotice({id:"no-items-selected",className:"notice-error is-dismissible",message:b.updates.l10n.noItemsSelected});switch(h){case"update-selected":g=h.replace("selected",f);break;case"delete-selected":if(!window.confirm("plugin"===f?b.updates.l10n.aysBulkDelete:b.updates.l10n.aysBulkDeleteThemes))return void c.preventDefault();g=h.replace("selected",f);break;default:return void window.console.error("Failed to identify bulk action: %s",h)}b.updates.maybeRequestFilesystemCredentials(c),c.preventDefault(),e.find('.manage-column [type="checkbox"]').prop("checked",!1),i.each(function(c,d){var e=a(d),f=e.parents("tr");e.prop("checked",!1),("update-selected"!==h||f.hasClass("update")&&!f.find("notice-error").length)&&b.updates.queue.push({action:g,data:{plugin:f.data("plugin"),slug:f.data("slug")}})}),d.on("wp-plugin-update-success wp-plugin-update-error wp-theme-update-success wp-theme-update-error",function(c,d){var e,f;"wp-"+d.update+"-update-success"===c.type?j++:(f=d.pluginName?d.pluginName:a('[data-slug="'+d.slug+'"]').find(".theme-title strong").text(),k++,l.push(f+": "+d.errorMessage)),b.updates.adminNotice=b.template("wp-bulk-updates-admin-notice"),b.updates.addAdminNotice({id:"bulk-action-notice",successes:j,errors:k,errorMessages:l,type:d.update}),e=a("#bulk-action-notice").on("click","button",function(){e.find("ul").toggleClass("hidden")}),k>0&&!b.updates.queue.length&&a("html, body").animate({scrollTop:0})}),d.on("wp-updates-notice-added",function(){b.updates.adminNotice=b.template("wp-updates-admin-notice")}),b.updates.queueChecker()}),a(".plugin-install-php .wp-filter-search").on("keyup search",_.debounce(function(){var c=a("#plugin-filter").empty(),d=_.extend({_ajax_nonce:b.updates.ajaxNonce,s:a("

").html(a(this).val()).text(),tab:"search",type:a("#typeselector").val()},{type:"term"});b.updates.searchTerm!==d.s&&(b.updates.searchTerm=d.s,history.pushState&&history.pushState(null,"",location.href.split("?")[0]+"?"+a.param(_.omit(d,"_ajax_nonce"))),"undefined"!=typeof b.updates.searchRequest&&b.updates.searchRequest.abort(),a("body").addClass("loading-content"),b.updates.searchRequest=b.ajax.post("search-install-plugins",d).done(function(d){a("body").removeClass("loading-content"),c.append(d.items),delete b.updates.searchRequest}))},500)),g.length>0&&g.attr("aria-describedby","live-search-desc"),g.on("keyup input",_.debounce(function(c){var d={_ajax_nonce:b.updates.ajaxNonce,s:c.target.value};"keyup"===c.type&&27===c.which&&(c.target.value=""),b.updates.searchTerm!==d.s&&(b.updates.searchTerm=d.s,history.pushState&&history.pushState(null,"",location.href.split("?")[0]+"?s="+d.s),"undefined"!=typeof b.updates.searchRequest&&b.updates.searchRequest.abort(),e.empty(),a("body").addClass("loading-content"),b.updates.searchRequest=b.ajax.post("search-plugins",d).done(function(c){var f=a("").addClass("subtitle").html(b.updates.l10n.searchResults.replace("%s",d.s)),g=a(".wrap .subtitle");d.s.length?g.length?g.replaceWith(f):a(".wrap h1").append(f):g.remove(),a("body").removeClass("loading-content"),e.append(c.items),delete b.updates.searchRequest,0===c.count?b.a11y.speak(b.updates.l10n.noPluginsFound):b.a11y.speak(b.updates.l10n.pluginsFound.replace("%d",c.count))}))},500)),d.on("submit",".search-plugins",function(b){b.preventDefault(),a("input.wp-filter-search").trigger("search")}),a("#typeselector").on("change",function(){a('input[name="s"]').trigger("search")}),a("#plugin_update_from_iframe").on("click",function(b){var c,d=window.parent===window?null:window.parent;a.support.postMessage=!!window.postMessage,!1!==a.support.postMessage&&null!==d&&-1===window.parent.location.pathname.indexOf("update-core.php")&&(b.preventDefault(),c={action:"update-plugin",data:{plugin:a(this).data("plugin"),slug:a(this).data("slug")}},d.postMessage(JSON.stringify(c),window.location.origin))}),a("#plugin_install_from_iframe").on("click",function(b){var c,d=window.parent===window?null:window.parent;a.support.postMessage=!!window.postMessage,!1!==a.support.postMessage&&null!==d&&-1===window.parent.location.pathname.indexOf("index.php")&&(b.preventDefault(),c={action:"install-plugin",data:{slug:a(this).data("slug")}},d.postMessage(JSON.stringify(c),window.location.origin))}),a(window).on("message",function(c){var d,e=c.originalEvent,f=document.location.protocol+"//"+document.location.hostname;if(e.origin===f){try{d=a.parseJSON(e.data)}catch(g){return}if("undefined"!=typeof d.action)switch(d.action){case"decrementUpdateCount":b.updates.decrementCount(d.upgradeType);break;case"install-plugin":case"update-plugin":window.tb_remove(),d.data=b.updates._addCallbacks(d.data,d.action),b.updates.queue.push(d),b.updates.queueChecker()}}}),a(window).on("beforeunload",b.updates.beforeunload)})}(jQuery,window.wp,_.extend(window._wpUpdatesSettings,window._wpUpdatesItemCounts||{})); \ No newline at end of file diff --git a/wp-admin/theme-install.php b/wp-admin/theme-install.php index 646203e4c0..050a7b97b5 100644 --- a/wp-admin/theme-install.php +++ b/wp-admin/theme-install.php @@ -248,17 +248,25 @@ if ( $tab ) {

<# if ( data.installed ) { #> + <# if ( data.activate_url ) { #> - + <# } #> <# if ( data.customize_url ) { #> - + <# } else { #> - + <# } #> <# } else { #> - - + + + <# } #>
@@ -274,9 +282,9 @@ if ( $tab ) { <# if ( data.installed ) { #> - + <# } else { #> - + <# } #>
diff --git a/wp-admin/themes.php b/wp-admin/themes.php index 580318e80c..59ba3dd017 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -277,7 +277,11 @@ foreach ( $themes as $theme ) : - + + @@ -402,7 +406,11 @@ $can_install = current_user_can( 'install_themes' ); <# } #> <# } else { #> - + + <# } #>
@@ -456,8 +464,12 @@ $can_install = current_user_can( 'install_themes' );
+ <# if ( data.actions.activate ) { #> - + <# } #>
diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 2945b480fb..c2dadf21df 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -628,12 +628,18 @@ function wp_default_scripts( &$scripts ) { 'installFailedShort' => __( 'Install Failed!' ), /* translators: Error string for a failed installation */ 'installFailed' => __( 'Installation failed: %s' ), - /* translators: Plugin/Theme name and version */ - 'installingLabel' => __( 'Installing %s...' ), // no ellipsis - /* translators: Plugin/Theme name and version */ - 'installedLabel' => __( '%s installed!' ), - /* translators: Plugin/Theme name and version */ - 'installFailedLabel' => __( '%s installation failed' ), + /* translators: Plugin name and version */ + 'pluginInstallingLabel' => _x( 'Installing %s...', 'plugin' ), // no ellipsis + /* translators: Theme name and version */ + 'themeInstallingLabel' => _x( 'Installing %s...', 'theme' ), // no ellipsis + /* translators: Plugin name and version */ + 'pluginInstalledLabel' => _x( '%s installed!', 'plugin' ), + /* translators: Theme name and version */ + 'themeInstalledLabel' => _x( '%s installed!', 'theme' ), + /* translators: Plugin name and version */ + 'pluginInstallFailedLabel' => _x( '%s installation failed', 'plugin' ), + /* translators: Theme name and version */ + 'themeInstallFailedLabel' => _x( '%s installation failed', 'theme' ), 'installingMsg' => __( 'Installing... please wait.' ), 'installedMsg' => __( 'Installation completed successfully.' ), /* translators: Activation URL */ @@ -649,10 +655,15 @@ function wp_default_scripts( &$scripts ) { 'deleteFailed' => __( 'Deletion failed: %s' ), 'deleted' => __( 'Deleted!' ), 'livePreview' => __( 'Live Preview' ), + /* translators: %s: Theme name */ 'activatePlugin' => is_network_admin() ? __( 'Network Activate' ) : __( 'Activate' ), 'activateTheme' => is_network_admin() ? __( 'Network Enable' ) : __( 'Activate' ), + /* translators: %s: Plugin name */ + 'activatePluginLabel' => is_network_admin() ? _x( 'Network Activate %s', 'plugin' ) : _x( 'Activate %s', 'plugin' ), + /* translators: %s: Theme name */ + 'activateThemeLabel' => is_network_admin() ? _x( 'Network Activate %s', 'theme' ) : _x( 'Activate %s', 'theme' ), 'activateImporter' => __( 'Activate importer' ), - 'unknownError' => __( 'An unknown error occured' ), + 'unknownError' => __( 'An unknown error occurred' ), 'pluginsFound' => __( 'Number of plugins found: %d' ), 'noPluginsFound' => __( 'No plugins found. Try a different search.' ), ), diff --git a/wp-includes/version.php b/wp-includes/version.php index 7605215e11..63344ae0d0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-beta2-38056'; +$wp_version = '4.6-beta2-38057'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.