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/clone/wp-conte.../plugins/wp-smush.../_src/js/modules
File: nextgen-bulk.js
import Smush from '../smush/smush';
[0] Fix | Delete
import SmushProcess from '../common/progressbar';
[1] Fix | Delete
[2] Fix | Delete
(function($) {
[3] Fix | Delete
$(function() {
[4] Fix | Delete
/** Handle NextGen Gallery smush button click **/
[5] Fix | Delete
$('body').on('click', '.wp-smush-nextgen-send', function (e) {
[6] Fix | Delete
// prevent the default action
[7] Fix | Delete
e.preventDefault();
[8] Fix | Delete
new Smush($(this), false, 'nextgen');
[9] Fix | Delete
});
[10] Fix | Delete
[11] Fix | Delete
/** Handle NextGen Gallery Bulk smush button click **/
[12] Fix | Delete
$('body').on('click', '.wp-smush-nextgen-bulk', function (e) {
[13] Fix | Delete
// prevent the default action
[14] Fix | Delete
e.preventDefault();
[15] Fix | Delete
[16] Fix | Delete
// Remove existing Re-Smush notices.
[17] Fix | Delete
// TODO: REMOVE re-smush-notice since no longer used.
[18] Fix | Delete
$('.wp-smush-resmush-notice').remove();
[19] Fix | Delete
[20] Fix | Delete
//Check for ids, if there is none (Unsmushed or lossless), don't call smush function
[21] Fix | Delete
if (
[22] Fix | Delete
'undefined' === typeof wp_smushit_data ||
[23] Fix | Delete
(wp_smushit_data.unsmushed.length === 0 &&
[24] Fix | Delete
wp_smushit_data.resmush.length === 0)
[25] Fix | Delete
) {
[26] Fix | Delete
return false;
[27] Fix | Delete
}
[28] Fix | Delete
[29] Fix | Delete
const bulkSmush = new Smush( $(this), true, 'nextgen' );
[30] Fix | Delete
SmushProcess.setOnCancelCallback( () => {
[31] Fix | Delete
bulkSmush.cancelAjax();
[32] Fix | Delete
}).update( 0, bulkSmush.ids.length ).show();
[33] Fix | Delete
[34] Fix | Delete
jQuery('.wp-smush-all, .wp-smush-scan').prop('disabled', true);
[35] Fix | Delete
$('.wp-smush-notice.wp-smush-remaining').hide();
[36] Fix | Delete
[37] Fix | Delete
// Run bulk Smush.
[38] Fix | Delete
bulkSmush.run();
[39] Fix | Delete
})
[40] Fix | Delete
.on('click', '.wp-smush-trigger-nextgen-bulk', function(e){
[41] Fix | Delete
e.preventDefault();
[42] Fix | Delete
const bulkSmushButton = $('.wp-smush-nextgen-bulk');
[43] Fix | Delete
if ( bulkSmushButton.length ) {
[44] Fix | Delete
bulkSmushButton.trigger('click');
[45] Fix | Delete
SUI.closeNotice( 'wp-smush-ajax-notice' );
[46] Fix | Delete
}
[47] Fix | Delete
});
[48] Fix | Delete
[49] Fix | Delete
});
[50] Fix | Delete
}(window.jQuery));
[51] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function