Created
December 20, 2018 22:55
-
-
Save danieljwonder/47bbcc25229d1ae2c986d84875b90e82 to your computer and use it in GitHub Desktop.
Remove Dashicons in WordPress front-end for logged out users
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Remove Dashicons in WordPress front-end for logged out users | |
| add_action( 'wp_enqueue_scripts', 'tme_dequeue_dashicons' ); | |
| function tme_dequeue_dashicons() { | |
| if ( ! is_user_logged_in() ) { | |
| wp_deregister_style( 'dashicons' ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment