Some of the icons are fixed with a simple css override:
[class*="alg-"] i.fa {
font-family: 'Font Awesome 5\ Free' !important;
}
Thanks @phantasmix !
I’ll take a look at it as soon as I can.
What solution do you think it’s the best?
To change the CSS or the Template? I think changing the HTML seems more appropriate
Pablo,
Everything except for the Facebook icon is fixed with the following:
[class*="alg-"] i.fa {
font-family: 'Font Awesome 5\ Free' !important;
font-weight: 900;
}
Apparently some of the icons don’t work without the font-weight setting.
Not sure what the problem is with Facebook though, maybe content? Will look closer this afternoon.
Cleaner way would probably be to fix up the templates, but so much more fuss 🙂
CSS works for me.
Thanks
Hi again @phantasmix ,
I was able to upload the plugin to version 1.6.2. Please give it a try. The icon classes will be ok this time.
Anyway, if you need to change the icons classes there is another way, changing the classes used on the template without changing the template directly:
add_filter( 'alg_wc_wl_fa_icon_class', function( $class, $icon ){
switch ( $icon ) {
case 'facebook':
$class = 'fab fa-facebook-square';
break;
case 'twitter':
$class = 'fab fa-twitter-square';
break;
case 'google_plus':
$class = 'fab fa-google-plus-square';
break;
case 'email':
$class = 'fas fa-envelope-square';
break;
case 'copy':
$class = 'fas fa-copy';
break;
}
return $class;
}, 10, 2 );
Let me know if it worked for you 😉
The update fixed it all. Super 🙂 Thanks so much!
P.S. Sorry, I clicked update before testing out the function code. Useful snippet to have, thanks for that as well.