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: wpml-simple-language-selector.js
var WPML_Core = WPML_Core || {};
[0] Fix | Delete
[1] Fix | Delete
WPML_Core.SimpleLanguageSelector = function () {
[2] Fix | Delete
var self = this;
[3] Fix | Delete
[4] Fix | Delete
var init = function () {
[5] Fix | Delete
jQuery(document).ready(function() {
[6] Fix | Delete
self.initialize_select2();
[7] Fix | Delete
});
[8] Fix | Delete
};
[9] Fix | Delete
[10] Fix | Delete
var add_flags = function ( state ) {
[11] Fix | Delete
if (!state.id) { return state.text; }
[12] Fix | Delete
[13] Fix | Delete
var text = state.text;
[14] Fix | Delete
if (jQuery(state.element).data('status') == 'active' ) {
[15] Fix | Delete
text = '<strong>&nbsp;' + text + '</strong>';
[16] Fix | Delete
}
[17] Fix | Delete
[18] Fix | Delete
return '<img width="18" height="12" src="' + jQuery(state.element).data('flag_url') + '"/> ' + text;
[19] Fix | Delete
};
[20] Fix | Delete
[21] Fix | Delete
self.initialize_select2 = function () {
[22] Fix | Delete
jQuery('.js-simple-lang-selector-flags').select2({
[23] Fix | Delete
formatResult: add_flags,
[24] Fix | Delete
formatSelection: add_flags,
[25] Fix | Delete
escapeMarkup: function(m) { return m; },
[26] Fix | Delete
width: 'auto',
[27] Fix | Delete
dropdownCss: {'z-index': parseInt(jQuery('.ui-dialog').css('z-index'), 10) + 100},
[28] Fix | Delete
dropdownAutoWidth: true
[29] Fix | Delete
});
[30] Fix | Delete
[31] Fix | Delete
var lang_selector_flags = jQuery('.js-simple-lang-selector-flags');
[32] Fix | Delete
[33] Fix | Delete
if (lang_selector_flags.is(':disabled')) {
[34] Fix | Delete
lang_selector_flags.find('.select2-choice').addClass('button button-secondary').attr('disabled', 'true');
[35] Fix | Delete
}
[36] Fix | Delete
};
[37] Fix | Delete
[38] Fix | Delete
init();
[39] Fix | Delete
[40] Fix | Delete
};
[41] Fix | Delete
[42] Fix | Delete
WPML_Core.simple_language_selector = new WPML_Core.SimpleLanguageSelector();
[43] Fix | Delete
[44] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function