/** * Gets a specified meta value of the current term. * * @since 5.4 * * @param string $key The database setting where the metadata is stored. The function will add a "taxonomy_" prefix. * @param mixed $id The ID number of the post/page. * @return string The meta value requested. */ function get_termmeta($key, $id = false, $module = false) { global $wp_query; if (!$id && suwp::is_tax()) { $id = $wp_query->get_queried_object_id(); } if (!$id) { return null; } $tax_meta = $this->get_setting(sustr::startwith($key, 'taxonomy_'), array(), $module); if (is_array($tax_meta) && isset($tax_meta[$id])) { return $tax_meta[$id]; } return null; }