Created
June 1, 2016 05:52
-
-
Save rilwis/9fcb57599012da010064d13703b8c7a7 to your computer and use it in GitHub Desktop.
Remove scripts and styles for metabox.io
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 | |
// Remove styles of plugin | |
add_filter( 'jetpack_implode_frontend_css', '__return_false' ); | |
add_filter( 'bbp_default_styles', '__return_empty_array' ); | |
// Remove bbPress scripts on non-bbPress pages | |
add_filter( 'bbp_default_scripts', function ( $scripts ) | |
{ | |
return is_bbpress() ? $scripts : [ ]; | |
} ); | |
// Jetpack scripts | |
add_action( 'wp_enqueue_scripts', function () | |
{ | |
wp_dequeue_script( 'devicepx' ); | |
}, 20 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment