Last active
February 24, 2019 06:41
-
-
Save mwolff44/abfc7848e5cfa35b8c6a to your computer and use it in GitHub Desktop.
remove jetpack unwanted css - Wordpress
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 | |
/* | |
MU Plugin: remove-jetpack-css | |
Plugin Name: WP Remove Jetpack CSS | |
Plugin URI: http://www.blog-des-telecoms.com | |
Description: Remove jetpack CSS | |
Version: 1.0 | |
Author: Mathias WOLFF | |
Author URI: http://www.mathias-wolff.fr | |
License: GPLv3 | |
*/ | |
// First, make sure Jetpack doesn't concatenate all its CSS | |
add_filter( 'jetpack_implode_frontend_css', '__return_false' ); | |
// Then, remove each CSS file, one at a time | |
function remove_jetpack_styles() { | |
wp_deregister_style( 'AtD_style' ); // After the Deadline | |
wp_deregister_style( 'jetpack_likes' ); // Likes | |
wp_deregister_style( 'jetpack_related-posts' ); //Related Posts | |
wp_deregister_style( 'jetpack-carousel' ); // Carousel | |
wp_deregister_style( 'grunion.css' ); // Grunion contact form | |
wp_deregister_style( 'the-neverending-homepage' ); // Infinite Scroll | |
wp_deregister_style( 'infinity-twentyten' ); // Infinite Scroll - Twentyten Theme | |
wp_deregister_style( 'infinity-twentyeleven' ); // Infinite Scroll - Twentyeleven Theme | |
wp_deregister_style( 'infinity-twentytwelve' ); // Infinite Scroll - Twentytwelve Theme | |
wp_deregister_style( 'noticons' ); // Notes | |
wp_deregister_style( 'post-by-email' ); // Post by Email | |
wp_deregister_style( 'publicize' ); // Publicize | |
wp_deregister_style( 'sharedaddy' ); // Sharedaddy | |
wp_deregister_style( 'sharing' ); // Sharedaddy Sharing | |
wp_deregister_style( 'stats_reports_css' ); // Stats | |
wp_deregister_style( 'jetpack-widgets' ); // Widgets | |
wp_deregister_style( 'jetpack-slideshow' ); // Slideshows | |
wp_deregister_style( 'presentations' ); // Presentation shortcode | |
wp_deregister_style( 'jetpack-subscriptions' ); // Subscriptions | |
wp_deregister_style( 'tiled-gallery' ); // Tiled Galleries | |
wp_deregister_style( 'widget-conditions' ); // Widget Visibility | |
wp_deregister_style( 'jetpack_display_posts_widget' ); // Display Posts Widget | |
wp_deregister_style( 'gravatar-profile-widget' ); // Gravatar Widget | |
wp_deregister_style( 'widget-grid-and-list' ); // Top Posts widget | |
wp_deregister_style( 'jetpack-widgets' ); // Widgets | |
} | |
add_action('wp_print_styles', 'remove_jetpack_styles' ); | |
?> |
Another one for disabling social-icons.css
wp_deregister_style('jetpack-widget-social-icons-styles'); // Social Icons
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's a new one:
wp_deregister_style( 'social-logos' ); // Sharedaddy social logos