/** * Temporarily set a term and its descendants aside from the rest of a vocabulary. * If this is not done a second time, corruption will result. * **/ private function displace_term( $term ) { // took this from delete_term below if ( is_string( $term ) ) { $term = $this->get_term( $term ); } $params = array($this->id, $term->mptt_left, $term->mptt_right); DB::query( 'UPDATE {terms} SET mptt_left = -mptt_left, mptt_right= -mptt_right WHERE vocabulary_id = ? AND mptt_left BETWEEN ? AND ?', $params ); }