SVG Upload
Adds full SVG media support to WordPress.
★ 2stars
383composer installs
1forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/digimix/wp-svg-upload/archive/refs/heads/master.zipAlso on Packagist as digimix/wp-svg-upload:
composer require digimix/wp-svg-uploadFrom the readme
Installation Instructions
Install with Composer
composer require digimix/wp-svg-upload
Install manually
1. Clone or copy the files into your WordPress plugins directory
2. Activate the plugin from the dashboard or using WP CLI
Once the plugin is activated, you're good to go. Your WordPress media library will support uploading SVG files.
Logic Breakdown
1) We need the whole page, but only if we are in the backend (hence admininit hook)
2) We would like to grab all output (obstart within admininit as nothing should echo before that, we should not interfere with things that do)
3) We want to grab the content on shutdown, concatenate all output buffers, then filter
4) Search for placeholders which should exist and replace the text
Downsides
1) Not permanent fix (for perma fix WP core would need to be editable or native filtering added)
2) A bit resource munchy (it's locked to the admin side, so IMHO who cares)
3) This is just to get SVG into WP core... Luckily the find replace is that simple in /wp-includes/media-template.php (Patch it Mullweng & Co!)
Changes...
Re-factored function declaration and calls to make compatible with lesser PHP versions, despite believ
Read the full README on GitHub →
Releases
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.