public function terms($taxonomy, $fields = array()) { // allows custom field based related terms to be included in queries global $wf, $meow_provider; $terms = parent::terms($taxonomy); if ($wf->regard_field_terms()) { $ids = $meow_provider->outgoing_terms($this, $fields); $field_terms = $wf->terms_by_id($ids, $taxonomy); if (count($field_terms)) { $terms->merge($field_terms, false); $terms->dedupe(); } } return $terms; }