Skip to content

Instantly share code, notes, and snippets.

@yratof
Created February 5, 2015 10:15
Show Gist options
  • Save yratof/b3d32b083ea41bf30cbf to your computer and use it in GitHub Desktop.
Save yratof/b3d32b083ea41bf30cbf to your computer and use it in GitHub Desktop.
Strips the wordpress admins css, leaves you raw
<?php
/**
* Plugin Name: Pneumatic Dashboard
* Plugin URI: http://eyeversuseye.com/pneumatic/dashboard
* Description: Pneumatic dashboard
* Version: 0.1
* Author: Eivin Landa
* Author URI: http://www.forsvunnet.co.uk
* License: MIT
*/
class Pneumatic_Dashboard {
public function __construct() {
if ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) {
return;
}
add_action( 'admin_enqueue_scripts', array( $this, 'admin_css' ), 9999 );
add_action( 'login_init', array( $this, 'login_css' ), 9999 );
}
public function admin_css() {
wp_deregister_style('wp-admin');
wp_deregister_style('dashicons');
wp_deregister_style('woocommerce_admin_menu_styles');
wp_deregister_style('login');
}
public function login_css() {
add_filter( 'style_loader_tag', '__return_null' );
}
}
// Initsialise the plugin
add_action( 'muplugins_loaded', create_function( '', 'new Pneumatic_Dashboard();' ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment