-
-
Save bewho/a1efed317c7de22b6d8b3eef94eac94a to your computer and use it in GitHub Desktop.
Remove dashicons from the front-end for non-admins
This file contains 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