HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ns3133907 6.8.0-86-generic #87-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep 22 18:03:36 UTC 2025 x86_64
User: cssnetorguk (1024)
PHP: 8.2.28
Disabled: NONE
Upload Files
File: //home/design-blogs.co.uk/public_html/wp-content/themes/newscrunch/assets/js/widgets.js
jQuery(document).ready( function($) {
    // upload field
    $( document ).on( "click", ".newscrunch-media-upload", function(event) 
        {
            event.preventDefault();
            if ( frame ) {
                frame.open();
                return;
            }
            var _this = $(this), frame = wp.media({
                title: 'Select or Upload Image',
                button: {
                    text: 'Add Author Image'
                },
                multiple: false
            });
            frame.open();
            frame.on( 'select', function() {
                var attachment = frame.state().get('selection').first().toJSON();
                _this.siblings(".widefat").val( attachment.url ).trigger("change");
                _this.siblings('.newscrunch_auth_img').val(attachment.url);
                 _this.siblings('.newscrunch-widget-img').attr( "src", attachment.url );
            })
        }); 
});