Edit File by line
/home/barbar84/public_h.../wp-admin/js
File: language-chooser.js
/**
[0] Fix | Delete
* @output wp-admin/js/language-chooser.js
[1] Fix | Delete
*/
[2] Fix | Delete
[3] Fix | Delete
jQuery( function($) {
[4] Fix | Delete
/*
[5] Fix | Delete
* Set the correct translation to the continue button and show a spinner
[6] Fix | Delete
* when downloading a language.
[7] Fix | Delete
*/
[8] Fix | Delete
var select = $( '#language' ),
[9] Fix | Delete
submit = $( '#language-continue' );
[10] Fix | Delete
[11] Fix | Delete
if ( ! $( 'body' ).hasClass( 'language-chooser' ) ) {
[12] Fix | Delete
return;
[13] Fix | Delete
}
[14] Fix | Delete
[15] Fix | Delete
select.trigger( 'focus' ).on( 'change', function() {
[16] Fix | Delete
/*
[17] Fix | Delete
* When a language is selected, set matching translation to continue button
[18] Fix | Delete
* and attach the language attribute.
[19] Fix | Delete
*/
[20] Fix | Delete
var option = select.children( 'option:selected' );
[21] Fix | Delete
submit.attr({
[22] Fix | Delete
value: option.data( 'continue' ),
[23] Fix | Delete
lang: option.attr( 'lang' )
[24] Fix | Delete
});
[25] Fix | Delete
});
[26] Fix | Delete
[27] Fix | Delete
$( 'form' ).on( 'submit', function() {
[28] Fix | Delete
// Show spinner for languages that need to be downloaded.
[29] Fix | Delete
if ( ! select.children( 'option:selected' ).data( 'installed' ) ) {
[30] Fix | Delete
$( this ).find( '.step .spinner' ).css( 'visibility', 'visible' );
[31] Fix | Delete
}
[32] Fix | Delete
});
[33] Fix | Delete
[34] Fix | Delete
});
[35] Fix | Delete
[36] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function