[wp-hackers] Removing wp_admin_css from login only

Frank Bueltge frank at bueltge.de
Thu Jan 15 11:41:24 GMT 2009


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');
}

On Thu, Jan 15, 2009 at 12:36 PM, DD32 <wordpress at dd32.id.au> wrote:

> 2009/1/15 Jeremy Visser <jeremy.visser at gmail.com>:
> > I haven't looked at that part of the WP codebase in years, and it's
> > downright scary. I mean, take a look at this snippet:
> >
> >        $ver = $this->registered[$handle]->ver ?
> >                $this->registered[$handle]->ver : $this->default_version;
> >        if ( isset($this->args[$handle]) )
> >                $ver .= '&amp;' . $this->args[$handle];
> >
> > I don't know what it is, but it's not poetry. (Nothing personal against
> > whoever wrote it -- I can't really talk, can I?)
>
> Whats so bad about that?
>
> Set $ver to the current item's 'ver' if set, else to the current
> default version, If there are also extra args defined for the current
> script/style, append it to $ver
>
> Its hard to judge based on a small sniplet if you do not understand
> how the greater glass is working, The same can be said for the Rewrite
> Class or the query class in most cases..
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list