Option to Dequeue FontAwesome
-
I love the plugin. But FontAwesome is now loaded twice, since another plugin loads FontAwesome from maxcdn.bootstrapdn.com. Unfortunately that plugin loads right after AccessPress since plugins with the same priority are loaded in alphabetical order. Therefore AccessPress does not see this other FontAwesome as already enqueued.
Is there a way to dequeue your plugin’s Font Awesome or even better is there a way to deregister, register and enqueue your scripts again with a lower priority so your script sees FontAwesome as already enqueued and therefore does not enqueue it? Or how do I deregister it so I can register maxcdn.bootstrapdn.com’s version or do you want to load from that cdn in your next update?
Presently, I was able to dequeue the cdn’s Font Awesome in print styles but this is not the ideal solution.
// Remove multiple copies of Font Awesome function remove_unwanted_css(){ wp_dequeue_style('font-awesome'); } add_filter('wp_print_styles', 'remove_unwanted_css');
Thanks.
https://www.ads-software.com/plugins/accesspress-social-counter/
- The topic ‘Option to Dequeue FontAwesome’ is closed to new replies.