Skip to content

Commit 2826f2e

Browse files
committed
fix: move handling of SVG to premium
1 parent 1bba5d0 commit 2826f2e

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

src/admin/class-admin.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ public function __construct() {
2626

2727
// Handle WordPress automatic image scaling
2828
add_filter( 'big_image_size_threshold', [ $this, 'maybe_disable_wp_scaling' ] );
29-
30-
// Handle enabling of WordPress SVG upload
31-
add_filter( 'upload_mimes', [ $this, 'maybe_enable_svg_upload'] );
3229
}
3330

3431
/**
@@ -362,20 +359,6 @@ public function disable_thumbnail_generation( $sizes ) {
362359

363360
return $sizes;
364361
}
365-
366-
/**
367-
* Enable SVG upload if setting is enabled
368-
*/
369-
public function maybe_enable_svg_upload( $mimes ) {
370-
$settings = get_option( 'cimo_options', [] );
371-
372-
// If svg_upload is enabled, add svg to allowed mime types
373-
if ( isset( $settings['svg_upload'] ) && $settings['svg_upload'] === 1 ) {
374-
$mimes['svg'] = 'image/svg+xml';
375-
}
376-
377-
return $mimes;
378-
}
379362
}
380363

381364
new Cimo_Admin();

0 commit comments

Comments
 (0)