Last active
May 21, 2017 20:39
-
-
Save perezdans/2bc00c4aa1315a890a00ff371b89dc32 to your computer and use it in GitHub Desktop.
Hacer deregister de los estilos CSS de los dashicons para todos los visitantes salvo cuando se muestre la barra de admin para mejorar Google Page Speed Insights
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
<?php | |
// Deregister los dashicons si no se muestra la barra de admin | |
add_action( 'wp_print_styles', function() { | |
if (!is_admin_bar_showing()) wp_deregister_style( 'dashicons' ); | |
}, 100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment