Skip to content

Instantly share code, notes, and snippets.

@CesarChaMal
Forked from rilwis/remove-resources.php
Created January 7, 2019 22:03
Show Gist options
  • Save CesarChaMal/e2fdcac713d67e3ea40148ba05d6b70d to your computer and use it in GitHub Desktop.
Save CesarChaMal/e2fdcac713d67e3ea40148ba05d6b70d to your computer and use it in GitHub Desktop.
Remove scripts and styles for metabox.io
<?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