/** * Add a box with the color of the current row's event category. */ function eventorganiser_add_color_column_data($html, $column, $term_id) { $term = get_term($term_id, 'event-category'); if ($column == 'event-color') { $html = sprintf('<a class="eo-event-category-color-sample" style="background-color: %s;"></a>', esc_attr(eo_get_category_meta($term, 'color'))); } return $html; }
/** * Returns the colour of a category * @ignore * @access private */ function eo_get_category_color($term) { return eo_get_category_meta($term, 'color'); }