Created
February 5, 2015 10:15
-
-
Save yratof/b3d32b083ea41bf30cbf to your computer and use it in GitHub Desktop.
Strips the wordpress admins css, leaves you raw
This file contains hidden or 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 | |
/** | |
* 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