カスタム分類のラベルをwp_titleから削除

カスタム分類のラベルが、wp_titleから出力されてしまうのを避けたかったのですが、プラグインなどを見つけられなかったので自作します。
wp-include内のgeneral-template.php からwp_titleのソースを失敬して、必要なところだけを書き換えてfilterにかけているだけですが・・・・・。

functions.phpにでも書いて頂ければ動作します。
[php]
add_filter( ‘wp_title’, ‘fix_wp_title’, 10, 3 );
function fix_wp_title($title, $sep, $seplocation){
global $wp_query;
if ( is_tax() ) {
$term = $wp_query->get_queried_object();
$term = $term->name;
$title =$term;
$t_sep = ‘%WP_TITILE_SEP%’; // Temporary separator, for accurate flipping, if necessary

$prefix = ”;
if ( !empty($title) )
$prefix = " $sep ";
if ( ‘right’ == $seplocation ) {
$title_array = explode( $t_sep, $title );
$title_array = array_reverse( $title_array );
$title = implode( " $sep ", $title_array ) . $prefix;
} else {
$title_array = explode( $t_sep, $title );
$title = $prefix . implode( " $sep ", $title_array );
}
}
return $title;
}

[/php]
一応WordPress3.0での動作は確認してあります。3.1でもたぶん動くと思いますけど・・・