Make WordPress Core

Ticket #15475: 15475.2.diff

File 15475.2.diff, 845 bytes (added by kovshenin, 11 years ago)
  • wp-includes/taxonomy.php

     
    23122312        if ( $tt_ids ) {
    23132313                $in_tt_ids = "'" . implode( "', '", $tt_ids ) . "'";
    23142314                do_action( 'delete_term_relationships', $object_id, $tt_ids );
    2315                 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id IN ($in_tt_ids)", $object_id ) );
     2315                $deleted = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id IN ($in_tt_ids)", $object_id ) );
    23162316                do_action( 'deleted_term_relationships', $object_id, $tt_ids );
    23172317                wp_update_term_count( $tt_ids, $taxonomy );
    23182318               
    2319                 return true;
     2319                return (bool) $deleted;
    23202320        }
    23212321
    23222322        return false;