Make WordPress Core

Ticket #61861: 61861.patch

File 61861.patch, 1.2 KB (added by iflairwebtechnologies, 17 months ago)

Fixed 61861: Duplicate Update Responses in Theme Details Popup During Simultaneous Theme Updates

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

    diff --git a/src/js/_enqueues/wp/updates.js b/src/js/_enqueues/wp/updates.js
    index 806dd62ec8..5f61c048af 100644
    a b  
    16261626                        if ( isModalOpen ) {
    16271627                                $( '.load-customize:visible' ).trigger( 'focus' );
    16281628                                $( '.theme-info .theme-autoupdate' ).find( '.auto-update-time' ).empty();
     1629                                $( '.theme-info .theme-autoupdate' ).find( $notice ).remove();
    16291630                        } else {
    16301631                                $theme.find( '.load-customize' ).trigger( 'focus' );
    16311632                        }
    16321633                }
    1633 
    1634                 wp.updates.addAdminNotice( _.extend( { selector: $notice }, updatedMessage ) );
     1634               
     1635                if ( !$theme.find('.updated-message').length ) {
     1636                        wp.updates.addAdminNotice( _.extend( { selector: $notice }, updatedMessage ) );
     1637                }
    16351638                wp.a11y.speak( __( 'Update completed successfully.' ) );
    16361639
    16371640                wp.updates.decrementCount( 'theme' );
     
    16401643
    16411644                // Show updated message after modal re-rendered.
    16421645                if ( isModalOpen && 'customize' !== pagenow ) {
    1643                         $( '.theme-info .theme-author' ).after( wp.updates.adminNotice( updatedMessage ) );
     1646                        if ( !$( '.theme-info .updated-message' ).length ) {
     1647                                $( '.theme-info .theme-author' ).after( wp.updates.adminNotice( updatedMessage ) );
     1648                        }
    16441649                }
    16451650        };
    16461651