[wp-hackers] Removing wp_admin_css from login only

Lynne Pope lynne.pope at gmail.com
Thu Jan 15 11:49:59 GMT 2009


The problem with doing it that way Frank is that the wp_admin_css is still
loaded, even though the styles may be getting overridden by your own CSS.

I just can't see the point in slowing down page loading by having it load
two admin css files I dont want or need. Also, the version is appended to
the wp_admin_css files so not only would your method simply add an
additional css file, but the original ones sit there in the header and give
everyone information about which version of WordPress is running.

Removing the wp_admin_css completely from the header output takes care of
all of that.

Lynne

2009/1/16 Frank Bueltge <frank at bueltge.de>

> if ( basename($_SERVER['PHP_SELF']) == 'wp-login.php' )
>     add_action( 'style_loader_tag', create_function( '$a', "return null;" )
> );
>
> I use the hook with a small function for kill the css on login-screen and
> add a new styel for corporate identity.
> if ( !function_exists('fb_custom_login') ) {
>    function fb_custom_login() {
>        echo '<link rel="stylesheet" type="text/css" href="' .
> get_bloginfo('template_directory') . '/custom-login/custom-login.css" />';
>    }
>
>    add_action('login_head', 'fb_custom_login');
> }
>
>


More information about the wp-hackers mailing list