=== XD Widgets for Elementor ===
Contributors: vinhxomdoi
Tags: widgets, slider, banner, testimonial, page builder
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: elementor
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

13 lightweight widgets with ready-made style presets for Elementor. Assets load only on pages that use them.

== Description ==

XD Widgets for Elementor adds 13 clean, modern widgets to the free Elementor page builder, each with several ready-made style presets in a familiar page-builder style. Switching a preset only changes one class, so your content and Style tab edits are kept.

**Requires the free [Elementor](https://wordpress.org/plugins/elementor/) plugin.**

**[Live demo of all widgets](https://www.vinhxd.com/elementor-xd/)** · [Plugin page & docs](https://www.vinhxd.com/tai-nguyen/elementor-xd/) · Made by [Vĩnh XD](https://vinhxd.com)

Widgets:

* Testimonial – 6 presets, star rating.
* Team Member – 5 presets, repeatable social links.
* Message Box – 6 presets, two buttons, dismissible (remembered for N days).
* Lightbox – open from a button, image, text or any `#xdwfe-lb-ID` link; content from the editor, an Elementor template, an image or a video; optional auto-open by delay, scroll or exit intent.
* Image Box – 7 presets.
* Icon Box – 7 presets × 3 icon positions; icon, image or number.
* Banner – 6 presets, 9-point content position, two buttons, "above the fold" option (fetchpriority=high).
* Banner Grids – 7 layouts.
* Slider – banner or Elementor template slides, slide or fade, native swipe (CSS scroll-snap).
* Video Button – 4 presets, YouTube/Vimeo/MP4, the player is only created on click.
* Title / Divider – 7 presets, wrap *words* in asterisks to highlight them.
* Blog Posts – grid, list or slider; 5 card presets.
* Scroll To – scroll anchors with header offset and a fixed dot navigation, or a "scroll down" button.

Performance:

* Each widget has its own small CSS/JS file that only loads on pages using that widget.
* No jQuery and no third-party libraries.
* Images use wp_get_attachment_image (srcset, sizes, width/height, lazy loading).
* Unused widgets can be turned off under Elementor → XD Widgets.

The plugin interface is currently in Vietnamese and is translation-ready.

This plugin is an independent project and is not affiliated with, endorsed by, or sponsored by Elementor Ltd. Elementor is a trademark of its respective owner.

== External services ==

The plugin does not contact any external service by itself. Only when you add a YouTube or Vimeo link to the Video Button, Lightbox or Slider widget:

* YouTube: the video cover image is loaded from i.ytimg.com when no custom cover is set, and the player (youtube-nocookie.com) is loaded only after the visitor clicks play. The video ID is sent. [Terms](https://www.youtube.com/t/terms), [Privacy](https://policies.google.com/privacy).
* Vimeo: the player (player.vimeo.com) is loaded only after the visitor clicks play. The video ID is sent. [Terms](https://vimeo.com/terms), [Privacy](https://vimeo.com/privacy).

== Installation ==

1. Install and activate the free Elementor plugin.
2. Upload the `xd-widgets-for-elementor` folder to `/wp-content/plugins/`, or install the plugin from the Plugins screen.
3. Activate the plugin. The widgets appear in the "XD Widgets" category of the Elementor panel (type "XD" to filter).

== Frequently Asked Questions ==

= Does it work without Elementor? =

No. The free Elementor plugin must be installed and active.

= Can I change the accent color? =

Yes. Widgets use Elementor's Primary global color by default, and each widget has its own accent color control. You can also override the CSS variables --xdwfe-primary, --xdwfe-heading, --xdwfe-text, --xdwfe-radius and --xdwfe-shadow.

== Screenshots ==

1. Banner – white box, frosted glass and split image/text presets.
2. Banner Grids – one of 7 grid layouts (1 large + 4 small).
3. Slider – multi-slide carousel with arrows and dots, showing a peek of the next slide.
4. Testimonial – light card, speech bubble and dark card presets.
5. Icon Box – a row of icon boxes with title and text.

== Changelog ==

= 1.0.1 =
* Security: all output is now escaped late with context-appropriate functions (esc_*, tag_escape, wp_kses with strict allowlists for images, SVG icons and editor content).
* Security: video URLs are limited to http(s); saved-template output validates the template ID, type, status and password protection.
* Elementor link/attribute output now uses print_render_attribute_string().

= 1.0.0 =
* Initial release: 13 widgets, style presets, per-widget asset loading.
