<?php
/*
Plugin Name: WordPress admin themer
Plugin URI: http://rudd-o.com/projects/wp-admin-themer/
Description: Themes your WP administrative interface with a 'wp-admin.css' stylesheet from your active theme
Version: 0.1.0
Author: Manuel Amador (Rudd-O)
Author URI: http://rudd-o.com/
*/

/*  Copyright 2005  Manuel Amador

Derivative work from bsuite, written by Casey Bisson

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

//  DISABLED
// we sometimes gets called outside the WP context. This include makes it work
//
// if (!$wpdb) {
// 	require_once("../../wp-config.php");
// 	$validate_standalone = 1;
// }

function themer_admin() {
print "<link rel='stylesheet' type='text/css' href='";

bloginfo('template_directory');

print "/wp-admin.css'";

print " />\n";
}

add_filter('admin_head', 'themer_admin');
?>