=== Droplark ===
Contributors: manimuridi
Tags: popup, spin to win, waitlist, coupons, loyalty
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.5.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Ten engagement games, drop waitlists, and loyalty for WordPress — spin-to-win, scratch cards, balloon pops and more. Free plan, from droplark.com.

== Description ==

Droplark adds playful engagement widgets to your site: visitors play a quick game (ten to choose from — spin-to-win, scratch card, mystery box, balloon pop, memory match and more) or join your waitlist, you capture their email, and they get a discount code they'll come back to spend.

Beyond the games: loyalty points and stamp cards, date clubs that auto-reward fans every year on a day they choose, community goals where everyone's code upgrades when a signup target is hit, Apple & Google Wallet passes, shareable win images, and public leaderboards. Widgets speak English or Arabic (RTL), per site.

This plugin adds the Droplark loader to your site and lets you place widgets with a shortcode or float one site-wide. Configure your widgets, prizes, and themes at droplark.com — new features appear on your site automatically, no plugin updates needed. Droplark has a free plan, so you can use it without paying.

== External services ==

This plugin relies on Droplark (https://droplark.com), the third-party service that powers your widgets, so that a widget you configure can load and run on your site.

* **What it does:** on page views where a widget is included, the plugin adds a `<script>` tag that loads Droplark's widget runtime (`w.js`) from droplark.com. That runtime then requests your site's widget configuration from Droplark and, when a visitor plays a widget or joins a waitlist, submits the information the visitor entered to Droplark, which stores it in your Droplark dashboard on your behalf.
* **When data is sent:** the runtime script loads with the page; visitor data is transmitted only when a visitor actually submits a widget.
* **What data is sent:** the publishable key you configured, your page's origin (used by Droplark to verify the domain), and any details a visitor enters into a widget (for example an email address and any custom form answers).

By installing this plugin you agree to Droplark's terms and acknowledge its privacy practices:

* Terms of Service: https://droplark.com/docs/terms
* Privacy Policy: https://droplark.com/docs/privacy

== Installation ==

1. Create a free account at droplark.com and add your site (use this site's domain).
2. Install and activate this plugin.
3. Go to Settings → Droplark and paste your publishable key (pk_live_...).
4. Back at droplark.com, click Verify next to your domain — the plugin's snippet is the proof.
5. Create a widget, then include it: add `[droplark widget="ID"]` to a page to place it inline, or set a widget ID in the "Float site-wide" field to show it floating on every page.

== Frequently Asked Questions ==

= Does this slow down my site? =
No — the script is a few kilobytes, loads deferred, and never blocks rendering or shifts layout.

= Where do the emails go? =
Into your Droplark dashboard, exportable as CSV anytime. They're your contacts.

= How do I put a widget on a specific page? =
Use the shortcode `[droplark widget="12"]` — replace 12 with the widget's ID from your Droplark dashboard. The widget renders exactly where you place the shortcode. Nothing appears automatically: to float a widget on every page instead, put its ID in the "Float site-wide" field under Settings → Droplark.

= Can I point this at a staging or self-hosted Droplark? =
Yes — add `define('DROPLARK_BASE_URL', 'https://your-droplark-host');` to wp-config.php. It defaults to https://droplark.com.

== Screenshots ==

1. A widget floating on your site — visitors tap the launcher to play.
2. Ten built-in games — here, spin-to-win in your own brand colors.
3. Every play captures an email — your new contact, exportable anytime.

== Changelog ==

= 1.5.0 =
* Widgets are now included explicitly — nothing auto-appears. Added a "Float site-wide" setting for showing a widget on every page; the shortcode remains for inline placement.

= 1.4.0 =
* Shortcode gains a `full` option — `[droplark widget="12" full="1"]` lets an inline widget fill its container instead of the default centered width.

= 1.3.0 =
* Added a `[droplark widget="ID"]` shortcode for inline placement on specific pages.

= 1.2.0 =
* Added a configurable DROPLARK_BASE_URL constant for local, staging, and self-hosted Droplark instances.

= 1.1.0 =
* Refreshed for the current Droplark feature set (ten games, loyalty & clubs, Arabic). No functional changes — the embed does all the work.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.5.0 =
Widgets are now included explicitly — a shortcode or the new "Float site-wide" setting — instead of all appearing at once. You control where each widget shows.
