Just One Category für WordPress 3.1

Seit dem Update auf WordPress 3.2.1 funktioniert das Plugin auch mit diesem Hotfix nicht mehr. Ich habe im Moment aber weder Zeit und noch größeres persönliches Interesse das Problem zu beheben. Tut mir Leid.
The Plugin with hotfix doesn’t work with WordPress 3.2.1 and I have not time and interest to solve the new problem. Sorry.

Hier eine WordPress 3.1 kompatible Version von Just One Category. That’s a new version of the plug-in Just One Category, working with WordPress 3.1.

Ich hoffe mdawaffe übernimmt es in das offizielle Projekt, so dass andere User das Plugin automatisiert updaten können. I hope mdawaffe will put it on the wordpress-website for easy updating.

Geänderter Teil von / Changed part of just-one-category/just_one_cat.php:

function where( $where ) {
   global $wpdb;
   remove_action( 'posts_where', array( &$this, 'where' ) );
   $term_id = rtrim( $this->q->get( 'cat' ), ' /' );
   if ( !is_numeric( $term_id ) || $term_id < 1 )
      return $where;
   $term_taxonomy_id = get_term( $term_id, 'category' )->term_taxonomy_id;
   $where = preg_replace('#AND\s*\(\s*wp_term_relationships.term_taxonomy_id\s*IN\s*\(\d+(,\d+)*\)\s*\)#','AND ( wp_term_relationships.term_taxonomy_id IN ('.$term_taxonomy_id.') )',$where,1);
   return $where;
}