getting post data in functions.php

I got it to work by doing it this way

 if (is_admin() ){
 $post_id = isset($_GET['post']) ? $_GET['post'] : isset($_POST['post_ID']) ;
 if( $post_id && in_category('audio', $post_id) ){

    add_action('admin_init', 'add_meta_boxes', 1);
  }
}

The only problem with this method is that it won’t display the metabox until after you have published the post. The $post_id variable shows bool(false) until you publish.

so the big problem is that when you go to make a new post, there is no category ID to get. So using the link posted to Toscho’s post, you can add category information and use $_GET to test for that information. Looks like it gets populated when you tick the category for that post.