Ticket #61381: 61381.diff
File 61381.diff, 1.2 KB (added by , 9 months ago) |
---|
-
src/js/_enqueues/wp/updates.js
619 619 */ 620 620 wp.updates.updatePluginError = function( response ) { 621 621 var $pluginRow, $card, $message, errorMessage, buttonText, ariaLabel, 622 $adminBarUpdates = $( '#wp-admin-bar-updates' ); 622 $adminBarUpdates = $( '#wp-admin-bar-updates' ), 623 isPluginInstall = 'plugin-install' === pagenow || 'plugin-install-network' === pagenow; 623 624 624 625 if ( ! wp.updates.isValidResponse( response, 'update' ) ) { 625 626 return; … … 658 659 } else { 659 660 $message.find( 'p' ).removeAttr( 'aria-label' ); 660 661 } 661 } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow) {662 } else if ( isPluginInstall ) { 662 663 buttonText = __( 'Update failed.' ); 663 664 664 665 $card = $( '.plugin-card-' + response.slug + ', #plugin-information-footer' ) … … 707 708 708 709 wp.a11y.speak( errorMessage, 'assertive' ); 709 710 710 if ( 'plugin-information-footer' === $card.attr('id' ) ) {711 if ( isPluginInstall && 'plugin-information-footer' === $card.attr( 'id' ) ) { 711 712 wp.updates.setCardButtonStatus( 712 713 { 713 714 status: 'plugin-update-failed',