We added an external script in the body tag of our (dev) website https://zonnebeke.reclamebureau-simplify.be/zonnebeke2022/. However, when checking the console, I see the error message: Refused to execute as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type Any idea if this has to do with Wordpress, or another setting of our website, or how we can solve this issue? Thanks.
Can't seem to get wp_mime_type_icon filter to work so I can use custom image for icons in the Media Library for documents. @birgire answered this post with the following code, but it does not seem to work in current WordPress version. add_filter( 'wp_mime_type_icon', function( $icon, $mime, $post_id ) { if( 'application/pdf' === $mime && $post_id > 0 ) $icon = 'http://example.tld/pdf.png'; // Modify this to your needs! return $icon; }, 10, 3 ); This throws an error failed to open …
I have a plugin I created to allow for us to add additional image types (webp, svg, etc). For some reason it is failing and will not allow me to add svg. Could use an extra set of eyes on this one please: function pmp_custom_upload_mimes($existing_mimes = array()) { $existing_mimes['webp'] = 'image/webp'; $existing_mimes['ico'] = 'image/x-icon'; $existing_mimes['svg'] = 'image/svg+xml'; return $existing_mimes; } add_filter('mime_types', 'pmp_custom_upload_mimes');