Enable SVG upload before Demo import
-
Hi,
I have some SVG images that I want to include with the import file.
So I need to enable the SVG upload before the import starts.
I tried using the before_content_import action and in it I add a filter to enable that, I think the filters don’t get applied at this point though as this doesn’t seem to work. How would I go about this? Thanks!My code:
// Enable SVG upload for import function upload_svg_mime_type($mimes) { $mimes['svg'] = 'image/svg+xml'; return $mimes; } function my_before_content_import( $selected_import ) { add_filter('upload_mimes', 'upload_svg_mime_type'); } add_action( 'pt-ocdi/before_content_import', 'my_before_content_import' );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Enable SVG upload before Demo import’ is closed to new replies.