/** * Creates the entry and term relationships. * * If the term $IDs is empty then the uncategorized category is set as the relationship. * NOTE: Only if the taxonomy is 'category' * * @deprecated 8.1.6 Use {@see cnTerm::setRelationships()} instead. * @see cnTerm::setRelationships() * * @param int $entryID * @param array $termIDs * @param string $taxonomy * * @return bool */ public function setTermRelationships($entryID, $termIDs, $taxonomy) { if (!is_array($termIDs)) { $termIDs = array($termIDs); } $termIDs = array_map('intval', $termIDs); $result = cnTerm::setRelationships($entryID, $termIDs, $taxonomy); if (!empty($result) && !is_wp_error($result)) { cnTerm::updateCount($result, $taxonomy); } cnCache::clear(TRUE, 'transient', "cn_{$taxonomy}"); return $result; }