A dataset containing named CSS colors.
From MDN: CSS Colors
<?php | |
/** | |
* List available attributes on product page in a drop-down selection | |
*/ | |
add_action('woocommerce_before_add_to_cart_button', 'list_attributes_on_product_page'); | |
function list_attributes_on_product_page() { | |
global $product; | |
$attributes = $product->get_attributes(); |
Region,State,Population,Astra,Moderna,Total Doses Administered | |
South East,Abia,3727347,61152,25172,86324 | |
North East,Adamawa,4248436,70521,36302,106823 | |
South South,Akwa Ibom,5482177,67760,27174,94934 | |
South East,Anambra,5527809,62171,13874,76045 | |
North East,Bauchi,6537314,98,409,43162,141571 | |
South South,Bayelsa,2277961,31800,9296,41096 | |
North Central,Benue,5741815,107094,60256,167350 | |
North East,Borno,5860183,64623,31878,96501 | |
South South,Cross River,3866269,99813,51562,151375 |
A dataset containing named CSS colors.
From MDN: CSS Colors
using System.Collections.Generic; | |
public static class CollectionExtensions { | |
public static ObservableCollection<T> ToObservableCollection<T>(this IEnumerable<T> list) { | |
var collection = new ObservableCollection<T>(); | |
foreach(var item in list) { | |
collection.Add(item); | |
} | |
return collection; |