$product_id) { if (!empty($product_id) && isset($product_spins[$key])) { $spin_products[$product_id] = intval($product_spins[$key]); } } } update_option('wheel_spin_products', $spin_products); // Prikaži sporočilo o uspehu add_settings_error('wheel_settings', 'settings_updated', __('Nastavitve so bile uspešno shranjene.', 'wheel-of-fortune'), 'updated'); } // Ročno dodajanje spinov uporabniku se zdaj izvaja preko AJAX // Pridobi trenutne nastavitve $cooldown_minutes = get_option('wheel_cooldown_minutes', 0); $max_spins = get_option('wheel_max_spins', 0); $send_emails = get_option('wheel_send_emails', false); $spin_products = get_option('wheel_spin_products', array()); // Prikaži sporočila o napakah/uspehu settings_errors('wheel_settings'); ?>