Skip to content

Instantly share code, notes, and snippets.

@Willem-Siebe
Last active August 26, 2018 18:52
Show Gist options
  • Select an option

  • Save Willem-Siebe/3f6bff80b01973a21467 to your computer and use it in GitHub Desktop.

Select an option

Save Willem-Siebe/3f6bff80b01973a21467 to your computer and use it in GitHub Desktop.
// Remove CSS and JS from Jetpack plugin, see https://gist.github.com/Willem-Siebe/3f6bff80b01973a21467.
function wsis_remove_jetpack_assets() {
// devicepx-jetpack.js, used to optionally load retina/HiDPI versions of files (Gravatars etc) which are known to support it, for devices that run at a higher resolution.
wp_dequeue_script( 'devicepx' );
}
add_action( 'wp_enqueue_scripts', 'wsis_remove_jetpack_assets', 20 );
// Remove CSS file, from version 3.2 of Jetpack
add_filter( 'jetpack_implode_frontend_css', '__return_false' );
@Willem-Siebe
Copy link
Author

Remove CSS is method from version 3.2 of Jetpack, see also https://www.twirlingumbrellas.com/wordpress/remove-deregister-jetpack-contact-form-styles/.

@techblogger5
Copy link

I am unable to remove Jetpack Dim Photon Script in my irtc page, kindy post some code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment