<?php 
//http://shibashake.com/wordpress-theme/modify-custom-taxonomy-columns

// Add to admin_init function
add_filter("manage_edit-category_columns", 'ainia_cat_columns');  
function ainia_cat_columns($theme_columns) {
	$theme_columns['draft']=__('Drafts');    
	$theme_columns['posts']=__('Published').'s';    
    return $theme_columns;
}

add_filter("manage_category_custom_column", 'ainia_manage_cat_columns', 10, 3);
function ainia_manage_cat_columns($out, $column_name, $cat_id) {
    
    switch ($column_name) {
        case 'draft': 
            $out .= count(get_posts(array('post_status'=>'draft','category'=>$cat_id)));
            break;
 
        default:
            break;
    }
    return $out;    
}

add_filter('manage_edit-category_sortable_columns', 'ainia_register_cat_sortable_columns');
function ainia_register_cat_sortable_columns( $columns ){
  $columns['draft'] = 'draft';   
  return $columns;
}

add_action('admin_head', 'ainia_admin_head');
function ainia_admin_head() {
?>
    <style type="text/css">
    .column-draft { width:15%;text-align:center; }
	.column-draft a{ text-align:center; }	
    </style>
<?php
}
