Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/sitepres.../res/js
File: theme-plugin-localization.js
/* globals icl_ajx_saved, icl_ajx_error, ajaxurl */
[0] Fix | Delete
[1] Fix | Delete
jQuery(function($){
[2] Fix | Delete
[3] Fix | Delete
'use strict';
[4] Fix | Delete
[5] Fix | Delete
$(document).ready(function () {
[6] Fix | Delete
var ajax_success_action = function( response, response_text ) {
[7] Fix | Delete
[8] Fix | Delete
if( response.success ) {
[9] Fix | Delete
response_text.text( icl_ajx_saved );
[10] Fix | Delete
} else {
[11] Fix | Delete
response_text.text( icl_ajx_error );
[12] Fix | Delete
}
[13] Fix | Delete
[14] Fix | Delete
response_text.show();
[15] Fix | Delete
[16] Fix | Delete
setTimeout(function () {
[17] Fix | Delete
response_text.fadeOut('slow');
[18] Fix | Delete
}, 2500);
[19] Fix | Delete
};
[20] Fix | Delete
[21] Fix | Delete
$( '#wpml-js-theme-plugin-save-option' ).click(function(){
[22] Fix | Delete
[23] Fix | Delete
var alert_scan_new_strings = $( 'input[name*="wpml_st_display_strings_scan_notices"]' ),
[24] Fix | Delete
use_theme_plugin_domain = $( 'input[name*="use_theme_plugin_domain"]' ),
[25] Fix | Delete
theme_localization_load_textdomain = $( 'input[name*="theme_localization_load_textdomain"]' ),
[26] Fix | Delete
gettext_theme_domain_name = $( 'input[name*="gettext_theme_domain_name"]' ),
[27] Fix | Delete
response_text = $( '#wpml-js-theme-plugin-options-response' ),
[28] Fix | Delete
spinner = $( '#wpml-js-theme-plugin-options-spinner' );
[29] Fix | Delete
[30] Fix | Delete
spinner.addClass( 'is-active' );
[31] Fix | Delete
[32] Fix | Delete
$.ajax({
[33] Fix | Delete
url: ajaxurl,
[34] Fix | Delete
type: 'POST',
[35] Fix | Delete
data: {
[36] Fix | Delete
action: 'wpml_update_localization_options',
[37] Fix | Delete
nonce: $( '#wpml-localization-options-nonce' ).val(),
[38] Fix | Delete
wpml_st_display_strings_scan_notices: 'checked' === alert_scan_new_strings.attr( 'checked' ) ? alert_scan_new_strings.val() : 0,
[39] Fix | Delete
use_theme_plugin_domain: 'checked' === use_theme_plugin_domain.attr( 'checked' ) ? use_theme_plugin_domain.val() : 0,
[40] Fix | Delete
theme_localization_load_textdomain: 'checked' === theme_localization_load_textdomain.attr( 'checked' ) ? theme_localization_load_textdomain.val() : 0,
[41] Fix | Delete
gettext_theme_domain_name: gettext_theme_domain_name.val()
[42] Fix | Delete
[43] Fix | Delete
},
[44] Fix | Delete
success: function ( response ) {
[45] Fix | Delete
spinner.removeClass( 'is-active' );
[46] Fix | Delete
ajax_success_action( response, response_text );
[47] Fix | Delete
}
[48] Fix | Delete
});
[49] Fix | Delete
});
[50] Fix | Delete
[51] Fix | Delete
$('#theme_localization_load_textdomain').on('change', function() {
[52] Fix | Delete
$('input[name="gettext_theme_domain_name"]').prop('disabled', !$(this).is(':checked'));
[53] Fix | Delete
});
[54] Fix | Delete
});
[55] Fix | Delete
});
[56] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function