PluginProbe
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization / 4.2.15
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization v4.2.15
4.2.15 4.2.14 4.2.13 4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 4.2.5 2.5.5 2.5.6 2.5.7 3.0.0 3.0.1 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.11.0 3.11.1 3.11.2 3.11.3 All 136 releases
← All changes | inc/media_rename/attachment_replace.php +6 -0 4.2.14 → 4.2.15 View file →
@@ -76,8 +76,14 @@
76 76 if ( $original_filetype['type'] !== $uploaded_filetype['type'] ) {
77 77 return new WP_Error( 'file_error', __( 'The uploaded file type does not match the original file type.', 'optimole-wp' ) );
78 78 }
79 79
80 + if ( $uploaded_filetype['type'] === 'image/svg+xml' ) {
81 + if ( ! Optml_Main::instance()->admin->sanitize_svg( $this->file['tmp_name'] ) ) {
82 + return new WP_Error( 'file_error', __( 'Error uploading file.', 'optimole-wp' ) );
83 + }
84 + }
85 +
80 86 global $wp_filesystem;
81 87
82 88 if ( ! $wp_filesystem->move( $this->file['tmp_name'], $original_file, true ) ) {
83 89 return new WP_Error( 'file_error', __( 'Could not move file.', 'optimole-wp' ) );