Last active
August 29, 2015 14:23
-
-
Save jesgs/33c6ba07fe9fbb3d4322 to your computer and use it in GitHub Desktop.
A method for removing all default styles from WordPress login screen.
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 | |
/** | |
* Remove all WordPress-specific stylesheets from WordPress login screen | |
*/ | |
/** | |
* Force-remove login-related styles. Can't use the regular method of login_enqueue_scripts | |
* due to wp_admin_css running before login_enqueue_scripts | |
* | |
* @param WP_Styles $styles Current WP_Styles object containing dependencies | |
* @return WP_Styles | |
*/ | |
function ex_remove_login_styles(WP_Styles $styles) | |
{ | |
$styles->registered['login'] = array(); | |
return $styles; | |
} | |
add_action('wp_default_styles', 'ex_remove_login_styles'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment