Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid double loading fontawesome icons for Elementor users #457

Open
kowsar89 opened this issue Sep 9, 2021 · 0 comments
Open

Avoid double loading fontawesome icons for Elementor users #457

kowsar89 opened this issue Sep 9, 2021 · 0 comments

Comments

@kowsar89
Copy link
Contributor

kowsar89 commented Sep 9, 2021

Currently fontawesome is loaded twice in Elementor pages, which could be avoided easily by applying the following code somewhere:

add_action( 'wp_enqueue_scripts', function(){
	if (wp_style_is( 'directorist-font-awesome', 'enqueued' )) {
		wp_deregister_style( 'elementor-icons-fa-regular' );
		wp_deregister_style( 'elementor-icons-fa-solid' );
		wp_deregister_style( 'elementor-icons-fa-brands' );
	}
}, 11 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant