# Elegant Popup — WordPress Plugin v2.0.0

**Author:** DevPress Factory  
**Compatibilità WordPress:** 4.9 — 6.9+  
**Compatibilità PHP:** 5.6+

---

## Installazione

1. Carica la cartella `elegant-popup` in `/wp-content/plugins/`
2. Attiva il plugin da **Plugin → Plugin installati**
3. Vai su **Elegant Popup** nel menu di amministrazione

---

## Compatibilità Page Builder

| Builder | Integrazione |
|---|---|
| **Gutenberg** (WP 5.0+) | Blocco nativo "Elegant Popup" nell'inseritore blocchi |
| **Elementor** (qualsiasi versione) | Widget nativo con controlli stile completi nel pannello Elementor |
| **WPBakery Page Builder** | Elemento nativo nel Content Elements picker |
| **Visual Composer Classic** | Supporto tramite `vc_map()` — retrocompatibile |
| **Classic Editor** | Metabox con shortcode reference nella sidebar della pagina |

---

## Lingue Supportate

Vai su **Elegant Popup → Settings** per scegliere la lingua:

- 🇮🇹 Italiano
- 🇬🇧 English
- 🇪🇸 Español
- 🇩🇪 Deutsch
- 🇫🇷 Français
- 🌐 Automatico (segue la locale WordPress)

---

## Utilizzo

### Shortcode
```
[elegant_popup id="1"]
[elegant_popup id="1" label="Guarda il video" class="mia-classe"]
```

### Attributo HTML
```html
<a href="#" data-ep-open="1">Apri popup</a>
<button data-ep-open="2">Video promo</button>
```

### JavaScript API
```javascript
ElegantPopup.open(1);   // Apre il popup con ID 1
ElegantPopup.close(1);  // Chiude il popup con ID 1
```

---

## Struttura File

```
elegant-popup/
├── elegant-popup.php
├── README.md
├── blocks/
│   └── index.js                          # Gutenberg block (no build step)
├── includes/
│   ├── class-ep-i18n.php                 # Internazionalizzazione (5 lingue)
│   ├── class-ep-db.php                   # Database
│   ├── class-ep-admin.php                # Pannello admin
│   ├── class-ep-frontend.php             # Rendering frontend
│   └── integrations/
│       ├── class-ep-gutenberg.php        # Blocco Gutenberg
│       ├── class-ep-elementor.php        # Widget Elementor (loader)
│       ├── class-ep-elementor-widget.php # Widget Elementor (classe)
│       └── class-ep-wpbakery.php         # WPBakery / Visual Composer
├── admin/
│   ├── css/admin.css
│   ├── js/admin.js
│   ├── img/icon.svg
│   └── views/
│       ├── list.php
│       ├── edit.php
│       └── settings.php
└── public/
    ├── css/popup.css
    └── js/popup.js
```
