Better Font Awesome v2 ready for testing. . . again!

Update 3/6/21: Better Font Awesome 2.0.0 has been released! Please see the wordpress.org support thread for details.

TLDR;

finally got around to updating Better Font Awesome to support Font Awesome v5! This update includes many changes, and it’s important to get plenty of real user testing before publishing the update to the WordPress plugin repo. If you’d like to help test, please download and install the latest beta here:

  • v2.0.0 release candidate
    • No material changes
  • v2.0.0-beta7
    • fixes missing icons by restoring fa default legacy prefix
    • enables v4 legacy shim by default for upgrades (folks who enabled another beta version already will still need to manually enable the “Include v4 CSS shim” option via Settings > Better Font Awesome)
    • Decreases remote fetch timeout from 10s to 3s to mitigate performance risk
    • Ensures admin notice is dismissible
  • v2.0.0-beta6 (missing some legacy icons)

See below for testing instructions. . .

Slightly longer version

Over 2 years ago, I updated the Better Font Awesome WordPress plugin to support Font Awesome v5, which required some non-trivial updates due to the way the v5 icon data structure had changed. I published a similar blog post asking for testers. Shortly after that, however, the fine folks over at Font Awesome made some changes to their asset naming/structure that my integration didn’t support, and I never got back around to fixing things, since the changes would have required some even less trivial updates to my code, and my life had gotten a bit busier (namely a new full time job). So I put plugin development entirely on hold.

Fast forward a couple years, and 2 keys things recently changed:

  • Font Awesome now offers an amazing GraphQL API! This means fetching Font Awesome icon data is waaaaay easier.
  • I had a baby! This (surprisingly) means I had some bandwidth while on paternity leave to make the (now far simpler due to the GraphQL API) plugin updates required to get things working.

What’s new?

This update features some significant additions and removals:

Added

    • Support for Font Awesome v5
    • Integration with Font Awesome GraphQL API for all data dependencies (this improves performance now that we only have to make one external call)
    • Integration with Font Awesome CDN for all CSS
    • Option to include the v4 Font Awesome CSS shim to support older icons
    • Updated hard-coded fallback Font Awesome version (latest version the time of writing: 5.14.0)
    • Modified version check frequency to a saner 24 hour interval
    • Fixes for legacy jQuery errors
    • More/better unit tests to ensure things are working as expected

Removed

  • Ability to select a specific version of Font Awesome to use. The plugin now always uses the latest version. I hope this isn’t controversial, but I don’t see a great use case for forcing older versions, especially with the ability to use the v4 shim.
  • Ability to select minified vs. unminified assets. There’s really no reason to include unminified 3rd-party CSS.
  • All dependencies on jsDelivr. This CDN served us well, however it’s just simpler to use Font Awesome’s own CDN, and testing indicates it’s just as performant.

Testing instructions

  1. Download the latest beta version
  2. Make sure you have some way to access the filesystem on your server (FTP, SSH, automated build/deploy, etc). Nothing is expected to act wonky, but if it does, it’s always nice to be able to quickly disable the plugin.
  3. Install the downloaded version (either via the admin or direct upload)
  4. Start testing!

Things to test

  • Code review
  •  Installation
    • Does installation go smoothly?
    • Do you get any errors during the process?
  • Settings
    • Go to Settings → Better Font Awesome
    • Are your settings preserved?
    • Does the settings page indicate the latest version of Font Awesome is being used?
    • Are you able to modify all settings as expected?
  • Icon output
    • Do all icons appear as expected?
    • If you enable the v4 CSS shim on the settings page, do legacy v4 icons all appear as expected?
  • Anything else you notice?

Feedback

First of all – THANK YOU FOR TESTING! I very much appreciate your help 

If you do come across any issues or outstanding questions, please create a new thread on the official support page and prefix the title with [Beta Test]. I will be monitoring these support threads closely and will do my best to respond to any feedback as quickly as possible.

6 thoughts on “Better Font Awesome v2 ready for testing. . . again!”

  1. Hello Mickey,
    I use Better Font Awesome Version 1.7.4
    There are many bugs with WordPress 5.6 !!
    It was a good plugin when it worked, but make problems because its code is not up to date !!!
    Does your beta version of Better Font Awesome fix these issues and work with last WordPress issue (5.6) ? Thank you for keeping us informed

    According to the jQuery Migrate plugin, Better Font Awesome plugin 1.7.4 version make problems because it uses the old jQuery library that the latest version of WordPress no longer uses.
    I have used many such icons and therefore many pages or articles are affected :-((

    It seems that these dysfunctions were not anticipated by some theme editors and plugin editors.

    By the way, it must not be the only theme having problems. Indeed, there is a big update of the jQuery script library which can affect the themes but also the plugins !
    After implementing a temporary fix with Patch 5.5.1, WordPress resumes its updater for jQuery, the JavaScript library that makes it easy to write scripts in HTML code.
    The delivery of WordPress 5.6 is indeed the opportunity for the CMS to launch the 2nd stage of its 3-phase program, as announced last June 2020.
    The goal: to consolidate and keep up to date the most recent versions of jQuery in order to ensure the sustainability of the scripts.
    But it can cause big operational problems with some themes and plugins.
    Regards,

  2. After upgrading to WP 5.6, the plugin stopped working. Plugin wouldn’t insert the shortcode via the iconpicker. The error via the console window was pointing toward iconpickerItem.context not having a value.

    A rather simple fix that worked for us.

    File old version: better-font-awesome/vendor/mickey-kay/better-font-awesome-library/js/admin.js

    File beta version: better-font-awesome-2.0.0-beta4/vendor/mickey-kay/better-font-awesome-library/js/admin.js

    At or around line 41 on the old version & line 61 on the beta version, replace

    $( document ).on( ‘iconpickerSelect’, function( e ) {
    var icon_title = e.iconpickerItem.context.title.replace( ‘.’, ” );

    with:

    $( document ).on( ‘iconpickerSelected’, function( e ) {
    var icon_title = e.iconpickerItem.title.replace( ‘.’, ” );

    Hope to see this continue to be developed. Thanks for your hard work!

  3. Pingback: prova - Erboristeria del Benessere

  4. As like Denis, I too am having issues with the 1.7.4
    While the icons now show (because I added them manually in code), I cannot get the add icon to actually load an icon.

    Before spending a lot of (free) time on this project for my client, it would be good if you could answer this.

    Note: I do find it odd that there really is such a lack of support in WP for them. They are so widely used in regular coded sites that it amazes me that they emoticons, but, not font-awesome.

  5. Hi all, thanks so much for your patience. I’m doing my best to get a fix out ASAP between full-time work and parenting :). Good news, a few updates:

    • If you want a quick fix, I have a draft up for version 1.7.6 which I believe should fix all the JS/jQuery issue that arose as a result of the WP 5.6 update. Please feel free to download it and manually install it here: https://downloads.wordpress.org/plugin/better-font-awesome.1.7.6.zip (as usual, you’ll want to make sure you back up your site and take any necessary precautions). This version is working great for me, and I’d love any extra feedback if you’re willing.
    • I finally looped back and updated the 2.0.0 beta version with similar JS/jQuery fixes as well, and again I’d love some help beta testing: https://downloads.wordpress.org/plugin/better-font-awesome.2.0.0-beta5.zip. This update includes all the goodies outlined in this blog post, and should allow folks to use the latest and greatest FA versions with all the included WP 5.6 compatibility fixes as well.

    Thanks again everyone for your patience! Hopefully I can get these over the finish line shortly with your support.

    1. Hi Mickey,

      Are you able to provide an update for Better Font Awesome wordpress plugin? Known Vulnerability identified for versions <= 2.0.1.

      Thanks

Leave a Comment

Your email address will not be published. Required fields are marked *

%d bloggers like this: