[ 'label' => __('Temperatuur', 'siti-wash-instructions'), 'term_key' => 'lb_wash_temp', 'product_key' => '_lb_wash_temp', 'icon' => '🌡️', 'options' => [ '' => __('Geen advies', 'siti-wash-instructions'), 'cold' => __('Koud wassen (max 20°C)', 'siti-wash-instructions'), '30h' => __('30°C handwas', 'siti-wash-instructions'), '30' => __('30°C fijnwas', 'siti-wash-instructions'), '40' => __('40°C normaal', 'siti-wash-instructions'), '60' => __('60°C intensief', 'siti-wash-instructions'), 'hand' => __('Alleen handwas', 'siti-wash-instructions'), ], ], 'dryer' => [ 'label' => __('Droger', 'siti-wash-instructions'), 'term_key' => 'lb_wash_dryer', 'product_key' => '_lb_wash_dryer', 'icon' => '🌀', 'options' => [ '' => __('Geen advies', 'siti-wash-instructions'), 'no' => __('Niet in de droger', 'siti-wash-instructions'), 'low' => __('Alleen lage stand', 'siti-wash-instructions'), 'yes' => __('Droger toegestaan', 'siti-wash-instructions'), ], ], 'iron' => [ 'label' => __('Strijken', 'siti-wash-instructions'), 'term_key' => 'lb_wash_iron', 'product_key' => '_lb_wash_iron', 'icon' => '🧺', 'options' => [ '' => __('Geen advies', 'siti-wash-instructions'), 'no' => __('Niet strijken', 'siti-wash-instructions'), 'low' => __('Lage temperatuur', 'siti-wash-instructions'), 'med' => __('Gemiddelde temperatuur', 'siti-wash-instructions'), 'high' => __('Hoge temperatuur', 'siti-wash-instructions'), ], ], 'bleach' => [ 'label' => __('Bleken', 'siti-wash-instructions'), 'term_key' => 'lb_wash_bleach', 'product_key' => '_lb_wash_bleach', 'icon' => '🫧', 'options' => [ '' => __('Geen advies', 'siti-wash-instructions'), 'no' => __('Niet bleken', 'siti-wash-instructions'), 'yes' => __('Alleen zuurstofbleekmiddel', 'siti-wash-instructions'), ], ], ]; } public static function register_brand_hooks(): void { $tax = self::TAXONOMY; add_action("{$tax}_add_form_fields", [__CLASS__, 'render_brand_add_form']); add_action("{$tax}_edit_form_fields", [__CLASS__, 'render_brand_edit_form'], 10, 2); add_action("created_{$tax}", [__CLASS__, 'save_brand_fields']); add_action("edited_{$tax}", [__CLASS__, 'save_brand_fields']); } public static function render_brand_add_form($taxonomy): void { foreach (self::fields() as $field) { self::render_brand_field('', $field); } } public static function render_brand_edit_form($term, $taxonomy): void { foreach (self::fields() as $field) { $value = (string) get_term_meta($term->term_id, $field['term_key'], true); ?>