コード例 #1
0
/**
 * 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;
}
コード例 #2
0
/**
 * Returns the colour of a category
 * @ignore
 * @access private
 */
function eo_get_category_color($term)
{
    return eo_get_category_meta($term, 'color');
}