Created
April 21, 2017 15:52
-
-
Save lukecav/cbb3e000a05bd22af746c8b037adadad to your computer and use it in GitHub Desktop.
Remove dashicons from the front-end for non-admins
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
// remove dashicons | |
function wpdocs_dequeue_dashicon() { | |
if (current_user_can( 'update_core' )) { | |
return; | |
} | |
wp_deregister_style('dashicons'); | |
} | |
add_action( 'wp_enqueue_scripts', 'wpdocs_dequeue_dashicon' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment