Use term_taxonomy_id instead of term_id. Props duck_, nootron. fixes #15941

git-svn-id: https://develop.svn.wordpress.org/trunk@17108 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-12-22 17:38:22 +00:00
parent 676394918c
commit ef34db239b

View File

@ -61,7 +61,7 @@ function export_wp( $args = array() ) {
if ( $args['category'] && 'post' == $args['content'] ) {
if ( $term = term_exists( $args['category'], 'category' ) ) {
$join = "INNER JOIN {$wpdb->term_relationships} ON ({$wpdb->posts}.ID = {$wpdb->term_relationships}.object_id)";
$where .= $wpdb->prepare( " AND {$wpdb->term_relationships}.term_taxonomy_id = %d", $term['term_id'] );
$where .= $wpdb->prepare( " AND {$wpdb->term_relationships}.term_taxonomy_id = %d", $term['term_taxonomy_id'] );
}
}