protected function get_individual_feature_taxonomy_value($taxonomy_name, $term_object, $feature_name_base, $feature_name_key = '') { if (taxonomy_supports($taxonomy_name, $this->individual_feature)) { $term_meta = (array) g1_get_term_meta($term_object->term_id, '_g1'); $feature_name = $feature_name_base; if (strlen($feature_name_key) > 0) { $feature_name .= '_' . $feature_name_key; } $feature_value = !empty($term_meta[$feature_name]) ? $term_meta[$feature_name] : ''; if (strlen($feature_value) > 0) { return $feature_value; } } return null; }
public function get_term_value($term_taxonomy_id, $setting_id) { $meta = (array) g1_get_term_meta($term_taxonomy_id, '_g1'); $val = isset($meta[$setting_id]) ? $meta[$setting_id] : null; return $val; }