Acest modul nu a fost testat cu ultimele 3 versiuni importante ale WordPress. S-ar putea să nu mai fie întreținut sau susținut și ar putea avea probleme de compatibilitate când este folosit cu versiuni recente ale WordPress.

Enable SVG

Descriere

This plugin serves one simple purpose: to add support for uploading SVG files in the WordPress Media Library.

WordPress 4.7 introduced changes to the file validation process for images. While this generally makes image uploads more secure, it breaks existing plugins that made SVG uploads available.

This is because the SVG format uses the MIME type „image/svg+xml”, and WordPress 4.7 uses a pair of core PHP functions for validating any file that has an „image/” MIME type, but those functions don’t handle SVG.

This plugin detects whether the uploaded file is an SVG and, if so, replaces the new WordPress image validation with checks that 1) the uploaded file is valid XML, and 2) it contains certain required text strings expected in an SVG file. Please note: For performance reasons, this is not a strict SVG validator, and does not provide complete protection from possible SVG security exploits.

Do not use this plugin if you are concerned about SVG as a possible security risk. This plugin is provided as-is with no warranty whatsoever.

Întrebări frecvente

Can the SVG image preview show in the Media Library instead of the generic file icon?

This is coming in a future update.

Contributori și dezvoltatori

„Enable SVG” este un software open-source. La acest modul au contribuit următoarele persoane.

Contributori

Tradu „Enable SVG” în limba ta.

Te interesează dezvoltarea?

Răsfoiește codul, vezi depozitarul SVN, sau abonează-te la jurnalul de dezvoltare prin RSS.

Istoric modificări

1.3.0

Fixed syntax in R34SVG::wp_get_attachment_metadata() that may trigger fatal „Uncaught Error: Cannot use string offset as an array” in some configurations.

1.2.1

Removed file_is_displayable_image() method because it is no longer needed and was causing false HTTP error messages on AJAX file uploads.

1.2.0

Added support for SVG previews in Media Library grid view.

1.1.1

Updated description and fixed an additional false negative validation issue.

1.1.0

Revised SVG validation criteria to resolve possible false negatives.

1.0.0

Initial version.