=== MZ SVG CurrentColor Normalizer === Contributors: mazhanay Donate link: https://www.paypal.com/paypalme/mazhanayg Tags: svg, elementor, icons, upload, currentcolor Requires at least: 5.0 Tested up to: 6.9 Requires PHP: 7.4 Stable tag: 1.6 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Automatically normalizes SVG icons to use currentColor in Elementor while preserving multicolor logos and illustrations. == Description == Tired of your SVG icons not changing color in Elementor, no matter how many style controls you tweak? MZ SVG CurrentColor Normalizer takes your monochrome SVGs and automatically converts them into icons that work perfectly with Elementor, using `currentColor` and removing inline styles that block dynamic coloring. If the SVG is a multicolor logo or illustration, the plugin is smart enough to leave it untouched. * SVG icons → normalized to work as dynamic icons with Elementor. * Multicolor logos and illustrations → respected as they are, without changes. * You → spend more time designing, and less time editing XML by hand. == Features == * Detects whether an SVG is monochrome or multicolor. * Forces `fill="currentColor"` on the `` element for monochrome icons. * Removes `stroke` from any node. * Removes `fill` on `` elements. * Cleans `fill` / `stroke` declarations inside `style` attributes. * Does not modify SVGs with more than one real color (logos, illustrations, etc.). * Works both from the Media Library and from Elementor’s upload modal. == Installation == 1. Upload the plugin to the `/wp-content/plugins/` directory or install the ZIP via “Plugins → Add New”. 2. Activate the plugin through the “Plugins” menu in WordPress. 3. Upload your SVG icons as usual (from Media or from Elementor). 4. If the icon is monochrome, it will be normalized to use `currentColor`. 5. If the SVG is multicolor, it will be uploaded without changes. == Screenshots == 1. Normal view of the custom SVG icon without the plugin (doesn't respect Elementor's colors). 2. Hovering over the custom SVG icon without the plugin (doesn't change). 3. Normal view of the custom SVG icon with the plugin installed (respects Elementor's colors). 4. Hovering over the custom SVG icon with the plugin installed (hover color works). == Frequently Asked Questions == = Does this plugin allow uploading SVG files if WordPress does not accept them by default? = Yes. The plugin adds `image/svg+xml` to the list of allowed MIME types. If you already use another SVG plugin, you can disable this part by commenting out the `upload_mimes` filter in the main plugin file. = Does this affect SVGs that were uploaded before installing the plugin? = No. It only applies to new SVG files uploaded after the plugin is activated. If you want to normalize older SVGs, you can re-upload them or use a media replacement plugin. = Can this plugin break any SVGs? = The plugin only normalizes **monochrome** SVGs. If it detects more than one real color (in `fill`, `stroke`, or `style`), it treats the file as a logo/illustration and does not modify it. = Is this only for Elementor? = No. It works with any builder or theme that uses `currentColor` or CSS-based coloring for SVGs. It is simply optimized for the common Elementor use case. == Screenshots == 1. Uploading a monochrome SVG that gets normalized as a `currentColor`-compatible icon. 2. A multicolor logo uploaded without any modifications. 3. SVG icons correctly changing color from the Elementor Style panel. == Changelog == = 1.6 = * Improve support for SVG icons that use stroke-only paths (hamburger menus, outline icons, etc.). * Handle single-color