Make WordPress Core

Ticket #55501: 55501.2.patch

File 55501.2.patch, 1.3 KB (added by dilipbheda, 4 years ago)

Updated patch to avoid selecting a second time same element.

  • src/wp-admin/includes/ms.php

    diff --git a/src/wp-admin/includes/ms.php b/src/wp-admin/includes/ms.php
    index ad9dbec3b2..e46df4caf9 100644
    a b jQuery( function($) { 
    10161016                // Don't show a spinner for English and installed languages,
    10171017                // as there is nothing to download.
    10181018                if ( ! languageSelect.find( 'option:selected' ).data( 'installed' ) ) {
    1019                         $( '#submit', this ).after( '<span class="spinner language-install-spinner is-active" />' );
     1019                        $( '#submit', this ).attr( 'disabled', true ).after( '<span class="spinner language-install-spinner is-active" />' );
    10201020                }
    10211021        });
    10221022} );
  • src/wp-admin/includes/options.php

    diff --git a/src/wp-admin/includes/options.php b/src/wp-admin/includes/options.php
    index 68e9138a2f..68b8e5f81e 100644
    a b function options_general_add_js() { 
    9393                        // Don't show a spinner for English and installed languages,
    9494                        // as there is nothing to download.
    9595                        if ( ! languageSelect.find( 'option:selected' ).data( 'installed' ) ) {
    96                                 $( '#submit', this ).after( '<span class="spinner language-install-spinner is-active" />' );
     96                                $( '#submit', this ).attr( 'disabled', true ).after( '<span class="spinner language-install-spinner is-active" />' );
    9797                        }
    9898                });
    9999        } );