Make WordPress Core

Ticket #62788: 62788.patch

File 62788.patch, 1.4 KB (added by vrishabhsk, 11 months ago)

Patch

  • src/js/_enqueues/wp/updates.js

    diff --git a/src/js/_enqueues/wp/updates.js b/src/js/_enqueues/wp/updates.js
    index aca73fdd4f..453ff5f68a 100644
    a b  
    14881488         * @param {string}  response.errorMessage The error that occurred.
    14891489         */
    14901490        wp.updates.deletePluginError = function( response ) {
    1491                 var $plugin, $pluginUpdateRow,
     1491                var $plugin, $pluginUpdateRow, $pluginDataSlug,
    14921492                        pluginUpdateRow  = wp.template( 'item-update-row' ),
    14931493                        noticeContent    = wp.updates.adminNotice( {
    14941494                                className: 'update-message notice-error notice-alt',
    14951495                                message:   response.errorMessage
    14961496                        } );
    1497 
     1497               
    14981498                if ( response.plugin ) {
    14991499                        $plugin          = $( 'tr.inactive[data-plugin="' + response.plugin + '"]' );
    1500                         $pluginUpdateRow = $plugin.siblings( '[data-plugin="' + response.plugin + '"]' );
     1500                        $pluginUpdateRow = $plugin.siblings('[data-plugin="' + response.plugin + '"]');
     1501                        $pluginDataSlug  = response.plugin;
     1502
    15011503                } else {
    15021504                        $plugin          = $( 'tr.inactive[data-slug="' + response.slug + '"]' );
    15031505                        $pluginUpdateRow = $plugin.siblings( '[data-slug="' + response.slug + '"]' );
     1506                        $pluginDataSlug  = response.slug;
     1507                }
     1508
     1509                if ( $pluginDataSlug ) {
     1510                        $link = $('[data-slug="' + $pluginDataSlug + '"]').find('.row-actions a.delete');
     1511                        $link.text( $link.data( 'originaltext' ) );
    15041512                }
    15051513
    15061514                if ( ! wp.updates.isValidResponse( response, 'delete' ) ) {