Edit File by line
/home/barbar84/www/wp-conte.../themes/Divi/epanel/js
File: custom_uploader.js
jQuery(document).ready(function() {
[0] Fix | Delete
var et_file_frame;
[1] Fix | Delete
[2] Fix | Delete
jQuery( '.et-upload-image-button' ).click(function( event ) {
[3] Fix | Delete
var this_el = jQuery( this ),
[4] Fix | Delete
use_for = this_el.parents( '.et-epanel-box' ).find( '.et-box-title > h3' ).text(),
[5] Fix | Delete
button_text = this_el.data( 'button_text' ),
[6] Fix | Delete
window_title = epanel_uploader.media_window_title,
[7] Fix | Delete
fileInput = this_el.parent().prev('input.et-upload-field');
[8] Fix | Delete
[9] Fix | Delete
event.preventDefault();
[10] Fix | Delete
[11] Fix | Delete
et_file_frame = wp.media.frames.et_file_frame = wp.media({
[12] Fix | Delete
title: window_title,
[13] Fix | Delete
library: {
[14] Fix | Delete
type: 'image'
[15] Fix | Delete
},
[16] Fix | Delete
button: {
[17] Fix | Delete
text: button_text,
[18] Fix | Delete
},
[19] Fix | Delete
multiple: false
[20] Fix | Delete
});
[21] Fix | Delete
[22] Fix | Delete
et_file_frame.on( 'select', function() {
[23] Fix | Delete
var attachment = et_file_frame.state().get( 'selection' ).first().toJSON();
[24] Fix | Delete
fileInput.val( attachment.url );
[25] Fix | Delete
});
[26] Fix | Delete
[27] Fix | Delete
et_file_frame.open();
[28] Fix | Delete
[29] Fix | Delete
return false;
[30] Fix | Delete
});
[31] Fix | Delete
[32] Fix | Delete
jQuery( '.et-upload-image-reset' ).click( function() {
[33] Fix | Delete
jQuery(this).parent().prev( 'input.et-upload-field' ).val( '' );
[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