Server IP : 66.29.132.124 / Your IP : 18.222.182.226 Web Server : LiteSpeed System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : wavevlvu ( 1524) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/home/wavevlvu/./diixadigital.com/wp-content/themes/meto/assets/js/ |
Upload File : |
(function($) { "use strict"; $('body').on('click','.experts_media_upload', function(e) { var mediaImg = $(this).parent('p').find('img'); var mediaUrl = $(this).parent('p').find('.experts_media_url'); e.preventDefault(); var custom_uploader = wp.media({ title: 'Select Image', button: { text: 'Use This Image', }, library: { type: 'image' }, multiple: false, }) .on('select', function() { var attachment = custom_uploader.state().get('selection').first().toJSON(); $(mediaImg).attr('src', attachment.url); $(mediaUrl).val(attachment.url); }) .open(); }); $('body').on('click','.experts_media_upload_delete', function(e) { $(this).parent('p').find('img').attr('src', ''); $(this).parent('p').find('.experts_media_url').val(''); }); })(jQuery);