Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WordPress: Alle CSS-Dateien entfernen
<?php
function dp_dequeue_unused_styles() {
wp_dequeue_style( "mashsb-styles" );
wp_dequeue_style( "lashare-styles" );
wp_dequeue_style( "mashnet-styles" );
wp_dequeue_style( "banana_content" );
wp_dequeue_script( 'wp-mediaelement' );
wp_dequeue_script( 'mediaelement-and-player.min' );
}
add_action('wp_enqueue_scripts', 'dp_dequeue_unused_styles' );
function dp_dequeue_topposts_styles() {
wp_dequeue_style( 'jetpack-top-posts-widget' );
wp_deregister_style( 'jetpack-top-posts-widget' );
wp_dequeue_style( 'mediaelement' );
wp_deregister_style( 'mediaelement' );
wp_dequeue_style( 'wp-mediaelement' );
wp_deregister_style( 'wp-mediaelement' );
wp_dequeue_style( "dpc-professional-breadcrumbs-frontend" );
wp_deregister_style( "dpc-professional-breadcrumbs-frontend" );
}
add_action('wp_print_styles', 'dp_dequeue_topposts_styles' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.