[Plugin by Ympker] Host fontawesome fonts locally to better comply with GDPR
Hello everyone,
I created this mini-plugin over the weekend as I needed a solution for my clients after a german court recently ruled the use of Google Fonts (if not self-hosted) to be violating GDPR. It is safe to assume similar sentences would be applied to embedding Fontawesome via CDN (no legal advice).
So far it contains only the most recent version of Fontawesome fonts (v6.0.0). This, however, should be sufficient, as a client's site that was still on v5.x.x still worked so it appears to be backwards-compatible.
Moving forward, I will likely add a new plugin/folder in the Github repository when v7.x.x is released, or when an upgrade makes sense.
This has been tested with WordPress 5.9 (today). USE AT OWN RISK!
Github Link: Click
GitHub repository with all of my plugins: Click
For those too lazy, there is a pre-compiled latest.ZIP file of the plugin: Click
How to use:
1. Clone the repository and .zip the folder corresponding to the version of FontAwesome Fonts you want (e.g. v600-local stands for version 6.0.0.).
2. Upload Plugin to WordPress.
3. Activate Plugin
4. Use according to the FontAwesome syntax that applies to your version (e.g. for v 6.0.0: https://fontawesome.com/v6/docs).
If you run into any errors pm me or open an issue at Github
Enjoy!
If you are bored: Care to test if it works for you guys, too? ( @vyas @bikegremlin ):-)
Comments
Ympker - thank you for putting in the effort and sharing.
Now, for the bad and ugly - with the intent to help the improvement, not to put you down:
Read about the WordPress plugin guidelines.
Try to do it by the book and have the plugin in the WordPress.org repository.
Why?
In spite of the zeitgeist that goes for software development as well (IMO), plugins in the WordPress plugin download section get "some serious review and vetting" (read: get a brief view to see if they're really poorly written or problematic).
I generally advise against using plugins or themes that haven't satisfied WP.org criteria to be put there. I don't install them even on test sites unless I really trust the developer (as is the case here - see how naive I am? ).
Doing this will help you improve if it's needed, make it easier to download and install for an average git, and allow for feedback and reviews to make it look more legit (ratings are often done by idiots or deliberately abused, but average gits care about them).
I'm not into programming or software development (do only as much as necessary, usually editing someone else's code). I'm also far from an expert on that. The best I can do is install it on a test website and let you know if I run into any problems.
Detailed info about providers whose services I've used:
BikeGremlin web-hosting reviews
Hey there, mate Thanks for your thorough feedback and giving me the benefit of a doubt!
This was kind of a quick weekend-fix for my clients and I can totally see why a plugin on the official WP repo would be more "trustworthy" and has other benefits (like more exposure, testing etc).
This is kind of on the roadmap (after exams terminate; again, this was a quick fix), however, there are also some points I will need to clarify first before I feel comfortable pushing it on WordPress. For one, I will probably contact fontawesome and ask if it is okay to redistribute my plugin on WordPress (since there already is an official fontawesome plugin). Secondly, the fontawesome somehow states that "Font Awesome" name can't be in the plugin's name. This is why it is currently called "Local Font GDPR FA" when installed. I will have to see whether I also should remove the FA. Then again, how would people find it on the wp repo if they search for, say, "Font Awesome local" and it doesn't show up. Well, maybe since I can probably mention fontawesome in the plugin description the search function would find it through there. Reading into and following the wp plugin guidelines is where I don't really see a problem. I'm sure I'll be able to make it work somehow. Any suggestions are welcome since I haven't published a plugin there yet. There seems to be demand for it, though (also posted in a german Divi Theme group and people were happy to have it). So I will try to give this a go once I have a bit more time
Hope this makes sense.
Have a wonderful weekend, you guys
Ympker's VPN LTD Comparison, Uptime.is, Ympker's GitHub.
Not sure about the legal stuff. But there are other ways to market a product (word of mouth, website articles etc.).
An idea:
Not sure how complicated it is to make the plugin "expandable" - to include fonts as required.
Or to have a checklist for including the most popular fonts, whichever those were (I use Font Awesome and Montserrat, if I spelt that one properly ).
P.S.
Love how you placed all the .svg icons into separate directories.
Detailed info about providers whose services I've used:
BikeGremlin web-hosting reviews
Yeah, the legal part is something I will have to figure out before going on WordPress public directory. Probably will message them. I just adjusted the title to be "Local Fonts GDPR" instead of "Local Fonts GDPR FA" as to not even remotely use Font Awesome in the plugin name. Maybe "Local Fonts GDPR Helper" or smth similar may sound better, though haha. For now, I am glad that it works and that I could push it to my clients' sites so fast
Certainly, there are other ways I could market the product. Then again, I won't have too much time to put into marketing with this not being my "main" focus at work. If it's gonna be on WordPress Repository, I will see what I can do, though. Won't do heavy marketing campaign, though. Happy if it helps other people but first and foremost it was/is a fix to my problem
About the folder structure/svgs. That's all just the same as you would get if you downloaded it directly from Font Awesome website. So you have to thank them for that :P
There is a really good plugin for Google Fonts already which I used in the past. Not sure, it's worth putting the time into creating a new one: https://wordpress.org/plugins/host-webfonts-local/
Ympker's VPN LTD Comparison, Uptime.is, Ympker's GitHub.
Headsup: Koofr link has been updated. You will always find the most up-to-date link in the readme file on Github
Ympker's VPN LTD Comparison, Uptime.is, Ympker's GitHub.
I switched to Fort Awesome that offers the same icons but can be self-hosted.
Webhosting24 aff best VPS; ServerFactory aff best VDS; Cloudie best ASN; Huel aff best brotein.
Not sure, if I understood correctly, but Font Awesome can also be selfhosted. You can download the files from the official website and use on your websites. The thing is, the offical plugin for WordPress did only offer the option to retrieve those files by connecting to fontawesome cdn/servers.
Hence why I created the plugin to basically achieve to host the files locally.
Ympker's VPN LTD Comparison, Uptime.is, Ympker's GitHub.
Licensing
For the sake of licensing, the plugin folder and the plugin PHP file have been renamed to not show any reference to Font Awesome in their title. The Plugin's title has been revised to be "Local Fonts GDPR Helper" and the "fa" was omitted from the plugin PHP file's name.
Changes/Additions
Furthermore, I have added more comments to the code and updated the Readme file in order to easily allow others to adapt it to include their custom stylesheet or fonts. The Readme file now also includes to a publicly shared Koofr Folder where I will always upload the "latest.zip" version of the plugin. That way the link always remains the same and just the "latest.zip" will be exchanged whenever a new version gets released. Of course, you can still just clone the repo via Git and DYO
Website
I will also soon add a page on my website that will be dedicated to this plugin and any further WordPress plugins (like the Bootstrap/TailwindCSS one) I will make.
Stay tuned for more!
New Github link to the renamed folder
The new Github Link can be found here.
The main repository with all my plugins is this one.
Ympker's VPN LTD Comparison, Uptime.is, Ympker's GitHub.
“ WordPress.org Strongly Urges Theme Authors to Switch to Locally Hosted Webfonts…”
Crazier every day:
https://wptavern.com/wordpress-org-strongly-urges-theme-authors-to-switch-to-locally-hosted-webfonts
Detailed info about providers whose services I've used:
BikeGremlin web-hosting reviews
Interesting, is it hard to just update links to local files of FA? No need for plugins...
Yeah, that's GDPR for you. Then again, I wouldn't complain if more themes allowed for self-hosting Google fonts right off the bat. Ofc, for theme devs it could be annoying because with cdn fonts you can quickly try things out, which is taking longer when you want to add local fonts.
The way my plugin works, it should be really easy. You don't need to touch any code to update FA.
The plugin looks for the "all.css" file in the the "css" folder. If there's a new version of FA, simply connect to the respective directory via sftp/ftp and update/overwrite the FA files (including "all.css") with the ones from the new version. New FA versions should have the same directory structure. If at some point this is no longer the case you'd just have to update the link in https://github.com/NicolasLoew/WordPress-plugins/blob/main/local-fontsgdprhelper/v600-local/v600-local.php .
If you want to do the same without a plugin it shouldn't be that difficult either. Probably just add it to your theme's functions.php
Probleme could be automatic theme updates that overwrite functions.php and I am not a fan of child themes. So, personally, I prefer just using my plugin
Ympker's VPN LTD Comparison, Uptime.is, Ympker's GitHub.
Did you guys see this?
https://bunny.net/blog/bringing-privacy-back-into-your-own-hands-introducing-bunny-fonts/
Would you care to explain why - probably best in a separate topic?
In other words - what are the main cons of using one?
Detailed info about providers whose services I've used:
BikeGremlin web-hosting reviews
I'd love to see that topic BTW, certainly from a creative mindset!
Back on topic - https://github.com/coollabsio/fonts is pretty good
Chris on https://hostingforums.net/
Today, I received an email from someone with some questions about the the plugin. Given that people other than me seem to be using this (even though there are other options like GDPRess), I have now also added "legacy" Fontawesome v4 and Fontawesome v5 plugin
Ympker's VPN LTD Comparison, Uptime.is, Ympker's GitHub.
Update the WP version info in the plugin's description (I suppose you've tested the plugin with the "latest & greatest").
Detailed info about providers whose services I've used:
BikeGremlin web-hosting reviews
Thanks for reminding me, mate!
Will update the description later if I remember If not enough caffeine is left to fuel my productivity today, feel free to create an issue on GitHub so I won't forget
Ympker's VPN LTD Comparison, Uptime.is, Ympker's GitHub.
You realize you're asking the most absent-minded person I've met to remind you?
Detailed info about providers whose services I've used:
BikeGremlin web-hosting reviews
Here's to hoping that my coffee tomorrow morning will somehow make me remember...so much for the theory
Ympker's VPN LTD Comparison, Uptime.is, Ympker's GitHub.
@bikegremlin I didn't even have my first coffee yet and already updated the readme :P
https://github.com/NicolasLoew/WordPress-plugins/blob/main/local-fontsgdprhelper/readme.md
It's probably because, for once, the sun is shining here
Ympker's VPN LTD Comparison, Uptime.is, Ympker's GitHub.
Detailed info about providers whose services I've used:
BikeGremlin web-hosting reviews