BeAPI/acf-svg-icon

Some ideas

Opened this issue ยท 1 comments

Hi,

Because your idea is brilliant, THANK YOU ๐Ÿ˜˜

But it's a bit annoying that the plugin (through its only filter acf_svg_icon_filepath) doesn't allow us to specify an SVG file for a particular ACF field (by {$field_key} or {$field_name}) ๐Ÿ˜•
I don't know if it was a technical restriction or a personal choice (no need at first) but IMHO it could be very useful to be able to do it ๐Ÿ˜Š

Second point a bit more specific ๐Ÿ˜‰ It could be very useful to be able to change/translate the texts associated to the SVG icons. Most of the time, the SVG id names are a personal fight for the developper ๐Ÿ˜’ and don't represent exactly what they are. Because clients can manage/choose their icons in some cases, it's really important to give them a beautiful transcript.

For the fun, it could be interesting to improve the way the icons are used into Select2. Instead of using a symbol from in-document sprite, we could use the symbol directly from the external sprite (e.g.: <use xlink:href="/path/to/icons.svg#newspaper"></use>) :simple_smile:

If you continue to use this plugin and are interested in these changes, I will be happy to submit a PR :bowtie:

Best regards,
Xavier.

Hi @7studio,

This plugin has been crafted once for a client, more like a snapshot, but knowing it will needs improvements.

We already thought about what you are speaking about, and you're totally right, it's a better implementation !
As you offer yourself for a PR, please let's go ahead ! ๐Ÿ™Œ

So thank you for your interest and contribution. ๐Ÿ’ช
Waiting forward to read your PR.