/* ═══════════════════════════════════════════════════════════════ NEWSLETTER FOOTER WIDGET — Brevo DOI par langue ═══════════════════════════════════════════════════════════════ */ /* ── Textes par langue ── */ function wpa_nl_texts() { return [ 'fr' => ['title'=>'Restez informé', 'placeholder'=>'Votre adresse e-mail', 'btn'=>'S\'abonner', 'success'=>'Bienvenue ! Vous êtes bien inscrit. 🎉', 'error'=>'Une erreur est survenue, réessayez.', 'exists'=>'Vous êtes déjà inscrit !', 'consent'=>'J\'accepte de recevoir la newsletter et la politique de confidentialité.'], 'de' => ['title'=>'Bleiben Sie informiert', 'placeholder'=>'Ihre E-Mail-Adresse', 'btn'=>'Abonnieren', 'success'=>'Willkommen! Sie sind jetzt angemeldet. 🎉', 'error'=>'Ein Fehler ist aufgetreten, bitte erneut versuchen.', 'exists'=>'Sie sind bereits angemeldet!', 'consent'=>'Ich stimme dem Empfang des Newsletters zu und akzeptiere die Datenschutzerklärung.'], 'es' => ['title'=>'Manténgase informado', 'placeholder'=>'Su dirección de correo', 'btn'=>'Suscribirse', 'success'=>'¡Bienvenido! Ya está suscrito. 🎉', 'error'=>'Se ha producido un error, inténtelo de nuevo.', 'exists'=>'¡Ya está suscrito!', 'consent'=>'Acepto recibir el boletín y la política de privacidad.'], 'it' => ['title'=>'Resta aggiornato', 'placeholder'=>'Il suo indirizzo e-mail', 'btn'=>'Iscriviti', 'success'=>'Benvenuto! Sei iscritto con successo. 🎉', 'error'=>'Si è verificato un errore, riprova.', 'exists'=>'Sei già iscritto!', 'consent'=>'Accetto di ricevere la newsletter e l\'informativa sulla privacy.'], 'en' => ['title'=>'Stay informed', 'placeholder'=>'Your email address', 'btn'=>'Subscribe', 'success'=>'Welcome! You are now subscribed. 🎉', 'error'=>'An error occurred, please try again.', 'exists'=>'You are already subscribed!', 'consent'=>'I agree to receive the newsletter and the privacy policy.'], 'en-gb' => ['title'=>'Stay informed', 'placeholder'=>'Your email address', 'btn'=>'Subscribe', 'success'=>'Welcome! You are now subscribed. 🎉', 'error'=>'An error occurred, please try again.', 'exists'=>'You are already subscribed!', 'consent'=>'I agree to receive the newsletter and the privacy policy.'], 'en-us' => ['title'=>'Stay informed', 'placeholder'=>'Your email address', 'btn'=>'Subscribe', 'success'=>'Welcome! You are now subscribed. 🎉', 'error'=>'An error occurred, please try again.', 'exists'=>'You are already subscribed!', 'consent'=>'I agree to receive the newsletter and the privacy policy.'], 'en-ca' => ['title'=>'Stay informed', 'placeholder'=>'Your email address', 'btn'=>'Subscribe', 'success'=>'Welcome! You are now subscribed. 🎉', 'error'=>'An error occurred, please try again.', 'exists'=>'You are already subscribed!', 'consent'=>'I agree to receive the newsletter and the privacy policy.'], 'en-au' => ['title'=>'Stay informed', 'placeholder'=>'Your email address', 'btn'=>'Subscribe', 'success'=>'Welcome! You are now subscribed. 🎉', 'error'=>'An error occurred, please try again.', 'exists'=>'You are already subscribed!', 'consent'=>'I agree to receive the newsletter and the privacy policy.'], 'nl' => ['title'=>'Blijf op de hoogte', 'placeholder'=>'Uw e-mailadres', 'btn'=>'Abonneren', 'success'=>'Welkom! U bent ingeschreven. 🎉', 'error'=>'Er is een fout opgetreden, probeer het opnieuw.', 'exists'=>'U bent al ingeschreven!', 'consent'=>'Ik ga akkoord met het ontvangen van de nieuwsbrief en het privacybeleid.'], 'ja' => ['title'=>'最新情報を受け取る', 'placeholder'=>'メールアドレス', 'btn'=>'登録する', 'success'=>'ようこそ!登録が完了しました。🎉', 'error'=>'エラーが発生しました。もう一度お試しください。', 'exists'=>'すでに登録されています!', 'consent'=>'ニュースレターの受信とプライバシーポリシーに同意します。'], 'fr-ca' => ['title'=>'Restez informé', 'placeholder'=>'Votre adresse e-mail', 'btn'=>"S'abonner", 'success'=>'Vérifiez votre boîte mail pour confirmer !', 'error'=>'Une erreur est survenue, réessayez.', 'exists'=>'Vous êtes déjà inscrit !', 'consent'=>"J'accepte de recevoir la newsletter et la politique de confidentialité."], ]; } /* ── Liste Brevo par langue ── */ function wpa_nl_list_id($lang) { // Listmonk list IDs $ids = ['fr'=>3, 'de'=>4, 'es'=>5, 'it'=>6, 'en'=>7, 'en-gb'=>7, 'en-us'=>8, 'en-ca'=>9, 'en-au'=>10, 'nl'=>11, 'ja'=>12, 'fr-ca'=>13]; return $ids[$lang] ?? 3; } /* ── Détection langue courante (Polylang) ── */ function wpa_nl_lang() { if (function_exists('pll_current_language')) { $l = pll_current_language('slug'); if (!$l) return 'en'; return $l; } return 'en'; } /* ── AJAX handler (public) ── */ add_action('wp_ajax_wpa_newsletter_subscribe', 'wpa_newsletter_subscribe'); add_action('wp_ajax_nopriv_wpa_newsletter_subscribe', 'wpa_newsletter_subscribe'); function wpa_newsletter_subscribe() { check_ajax_referer('wpa_nl_nonce', 'nonce'); $email = sanitize_email($_POST['email'] ?? ''); $lang = sanitize_text_field($_POST['lang'] ?? 'en'); $consent = sanitize_text_field($_POST['consent'] ?? ''); if (!is_email($email)) { wp_send_json_error('invalid_email'); } if ($consent !== '1') { wp_send_json_error('no_consent'); } $list_id = wpa_nl_list_id($lang); // Inscription via Listmonk (auto-hébergé) $body = json_encode([ 'email' => $email, 'name' => '', 'status' => 'enabled', 'lists' => [$list_id], ]); $response = wp_remote_post('http://127.0.0.1:9000/api/subscribers', [ 'headers' => [ 'Content-Type' => 'application/json', 'Authorization' => 'Basic ' . base64_encode('apiuser:wpa-listmonk-apitoken-2026'), ], 'body' => $body, 'timeout' => 15, ]); if (is_wp_error($response)) { error_log('[WPA NL] Listmonk WP_Error: ' . $response->get_error_message()); wp_send_json_error('api_error'); } $code = (int) wp_remote_retrieve_response_code($response); $body_raw = wp_remote_retrieve_body($response); if ($code === 200) { // Nouveau subscriber créé // Ajouter à la liste (subscriber_lists) $sub_data = json_decode($body_raw, true); $sub_id = $sub_data['data']['id'] ?? 0; if ($sub_id) { wp_remote_request('http://127.0.0.1:9000/api/subscribers/lists', [ 'method' => 'PUT', 'headers' => [ 'Content-Type' => 'application/json', 'Authorization' => 'Basic ' . base64_encode('apiuser:wpa-listmonk-apitoken-2026'), ], 'body' => json_encode(['ids' => [$sub_id], 'action' => 'add', 'target_list_ids' => [$list_id], 'status' => 'confirmed']), 'timeout' => 10, ]); } wp_send_json_success('ok'); } elseif ($code === 409) { // Déjà inscrit wp_send_json_error('already_subscribed'); } else { $body_resp = json_decode($body_raw, true); $msg = $body_resp['message'] ?? ''; if (stripos($msg, 'already') !== false || stripos($msg, 'duplicate') !== false) { wp_send_json_error('already_subscribed'); } error_log('[WPA NL] Listmonk code=' . $code . ' body=' . substr($body_raw, 0, 200)); wp_send_json_error('api_error'); } } /* ── HTML du widget footer ── */ add_action('wp_footer', 'wpa_newsletter_footer', 5); function wpa_newsletter_footer() { $lang = wpa_nl_lang(); $texts = wpa_nl_texts()[$lang] ?? wpa_nl_texts()['en']; $nonce = wp_create_nonce('wpa_nl_nonce'); $ajax = admin_url('admin-ajax.php'); ?>
Top 5 Smartphone o Tablet: Scopri il Dispositivo: Confronto Completo 2026

Confronti onesti, recensioni di esperti e selezioni top — per acquistare meglio.

🔒Dati sicuri
Recensioni certificate
Indipendente
📺Prezzi e garanzie trasparenti
8 000+ Recensioni verificate
9 Lingue
100% Indipendente
★★★★★ Acquirenti soddisfatti

Smartphone o Tablet: Scopri il Migliore Dispositivo per Te

Smartphone o Tablet: Scopri il Migliore Dispositivo per Te

? Questo articolo contiene link affiliati Amazon. Riceviamo una piccola commissione senza costi aggiuntivi per voi. Grazie per il supporto!

? Questo articolo è stato scritto con l’assistenza dell’intelligenza artificiale e poi rivisto per qualità, accuratezza e pertinenza.

Quando si parla di scegliere tra smartphone e tablet, il vero dubbio non è solo la dimensione dello schermo, ma il tipo di esperienza che si desidera ogni giorno. C’è chi cerca un dispositivo compatto, veloce e sempre pronto per foto, messaggi, social e lavoro in mobilità; c’è chi invece vuole un display ampio per guardare contenuti, prendere appunti, modificare documenti o gestire più attività contemporaneamente. In questo scenario, gli smartphone di fascia alta rappresentano spesso il punto d’incontro ideale tra potenza, portabilità e versatilità, mentre i tablet offrono comfort visivo e produttività su schermo grande.



Questa selezione ti aiuterà a orientarti nella scelta tra smartphone e tablet, in base alle tue esigenze personali e professionali. Ricorda che il dispositivo ideale è quello che si adatta meglio al tuo stile di vita quotidiano.

Torna in alto
In qualità di Affiliato Amazon, ricevo un guadagno per gli acquisti idonei.