0

add_action('admin_footer', 'fix_media_script_footer', 100);
function fix_media_script_footer() {?>
<script>
 jQuery(document).on('click', '.wp-core-ui .attachment .thumbnail', function() {
    get_src = jQuery(this).find('img').attr('src');
    jQuery('.attachment-media-view img.details-image[src="<?php echo home_url();?>/wp-includes/images/media/default.png"]').attr('src', get_src);
});
</script>
<?php 
}

Jagdish Sarma Asked question November 7, 2023
Add a Comment