How to check font support Font Awesome?

Hello in one plugin with a connection to fonts Font Awesome
// Enable support for font Awesome
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
enqueue_font_awesome function() {

 wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css' );

}

How to check that it is not connected? That is to set the condition "If there is something you do not need to connect."
Otherwise, if there is a when activated, produces an error.
Thank you.
March 19th 20 at 09:21
2 answers
March 19th 20 at 09:23
you explain other plainsclothes and temperately you need to use one handle - after all, everyone writes it as he wants. In the end, the test handle what you gave is meaningless.
The real case was: 3 different version of fontawesome is plugged and the site is sitting on the bath - 1 from the topic, from 2nd plugin, 3rd from custom Gutenberg unit (nerd developer decided that he needed 5 icons connect pack of 600 tonnes of icons is a great idea. Mount pretender) - Deshaun.Rempel commented on March 19th 20 at 09:26
In the end, the test handle what you gave is meaningless.

And what offer? - archibald.Jerde commented on March 19th 20 at 09:29
@Deshaun.Rempel, you can always cancel the registration of another file - Charles.Quitzon commented on March 19th 20 at 09:32
@Deshaun.Rempel, Well, from the curves of the plugins are not perfect. - Charles.Quitzon commented on March 19th 20 at 09:35
@Charles.Quitzon, look, you're the author of the plug 1 and advise the client to disable the font plugin 2. Or from the topic. And he disables your. In the end, your plugin not working (remember the 4-th and 5-th difference awesom font) or the theme or other plugin will get the stocks.
Generally fantaisa terrible with the release of the 5th version. So much crap and useless with obscure licensing. But not all transplanted to forkawesome - to a compatibility... - Deshaun.Rempel commented on March 19th 20 at 09:38
March 19th 20 at 09:25
If I understand correctly, and you need to execute the function code enqueue_font_awesome once, you can do so
enqueue_font_awesome function() { 
 static $done = false; 
 if (false === $done) { 
 wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css' );
 $done = true;
 } 
}
So. Thanks, I will try - archibald.Jerde commented on March 19th 20 at 09:28
@archibald.Jerde, above sent me a link to a wp function to check whether a file connection styles. I think to use this feature, it may be better in this case - louie76 commented on March 19th 20 at 09:31

Find more questions by tags WordPress