=== Quick Callback Button ===
Contributors: ditsagency
Donate link: https://dits.agency
Tags: callback, contact, phone, messenger, whatsapp
Requires at least: 5.2
Tested up to: 7.1
Stable tag: 1.3.3
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Modern floating callback and messenger button for WordPress with popup contact form, WhatsApp, Telegram, Viber, click-to-call and customizable styles.

== Description ==

Quick Callback Button is a modern floating contact button plugin for WordPress that helps visitors contact your business faster through callback requests, phone calls, and popular messengers. 

The plugin adds a customizable floating button with a popup contact form and support for: 
* WhatsApp 
* Telegram 
* Viber 
* Direct phone links 

Designed for lead generation and better user engagement, Quick Callback Button works perfectly for business websites, agencies, services, WooCommerce stores, landing pages, and local companies. 

The latest version includes a built-in Preview Mode that allows administrators to preview modal window designs directly from the WordPress admin panel before applying changes. The plugin also comes with 10 professionally designed modal styles, making it easy to match the contact widget to any website design.

== Demo ==

Test the plugin before using it on a production website.

Demo site: [Open the live demo](https://callback-button.dits.md/)

Demo admin: [Open the demo admin](https://callback-button.dits.md/wp-admin)

Username: `demo`

Password: `demo`

== Pro Features ==

Unlock advanced callback workflow and analytics features with Quick Callback Button Pro.

* External API integrations for callback requests.
* Multiple API endpoints with POST, GET, or PUT methods.
* Custom request headers and body templates with the `%phone%` placeholder.
* Detailed logs for email and API requests.
* Log search, date filters, and CSV export.
* Privacy-safe GTM and GA4 events for widget opens, form submissions, phone calls, WhatsApp, Telegram, and Viber clicks.

Get [Quick Callback Button Pro](https://dits.agency/product/dits-easy-callback-button-pro).

### Features 
* **Floating callback button** – Always visible but non-intrusive.
* **Modern popup/modal contact form** – Simple and effective for lead capture.
* **Messenger integration** – Quick links to WhatsApp, Telegram, and Viber.
* **Click-to-call** – Direct phone links for mobile users.
* **Email notifications** – Instant alerts for callback requests.
* **Multiple recipients** – Send notifications to several email addresses.
* **Phone validation** – Built-in phone number masking and validation.
* **Custom error message** – Let administrators edit the frontend error message from General Settings.
* **Interaction analytics** – Track anonymous aggregated button, request, and messenger clicks in a dedicated Analytics tab.
* **Optional cleanup on uninstall** – Administrators can choose whether plugin settings and analytics data are removed when the plugin is deleted.
* **Admin assistance notice** – Administrators can contact the DITS team from WordPress admin and dismiss the notice for their own account.
* **Full Customization** – Control colors, styles, and animation effects.
* **Themes** – Support for light and dark modal themes.
* **Optimized** – Lightweight, responsive, and mobile-friendly.
* **Compatible** – Works with Elementor, Gutenberg, and all modern themes.

== Installation ==

1. Upload `dits-easy-callback-button` to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Configure the options in the admin panel.

== Screenshots ==

1. General Settings – Configure messengers, phone links, phone mask, error message, and data cleanup options.
2. Styling & Behavior – Customize button position, colors, and animation effects with Live Preview.
3. Analytics – Review anonymous aggregated button clicks, callback requests, contact-channel clicks, and top pages.
4. Original Theme – Classical design using the custom color settings below.
5. Light Theme – A clean, modern look for the callback modal form.
6. Dark Theme – Stylish dark appearance for the callback modal form.
7. Built-in Font – Preview of the form using the plugin's integrated typography.


== Frequently Asked Questions ==

= Can I change the button color? =
Yes. You can fully customize button colors, hover styles, icon colors, and modal appearance directly from the WordPress admin panel. 

= Can I send callback requests to multiple email addresses? =
Yes. The plugin supports multiple email recipients for callback request notifications. Just enter them separated by commas in the settings.

= Can I customize the error message shown to visitors? =
Yes. The Wrong message field in General Settings lets you edit the message shown when a callback request cannot be completed. The default text remains translation-ready.

= Does the plugin collect personal analytics data? =
No. Analytics are stored as anonymous daily aggregate counters by event type and page path. The plugin does not store visitor identity, phone number, IP address, referrer, or query string in the analytics table.

= Will deleting the plugin remove its data? =
Only if you enable the cleanup option in General Settings before deleting the plugin. Deactivation keeps all settings and analytics data.

== Third-party Resources ==

* Resource Name: Phone, Telegram, Viber, WhatsApp Icons (SVG)
  License: GPLv2 or later
  License URI: https://www.gnu.org/licenses/gpl-2.0.html

* Resource Name: IMask.js
  License: MIT
  License URI: https://github.com/uNmAnNeR/imaskjs
  Source: https://imask.js.org/

* Resource Name: MicroModal (micromodal.min.js)
  License: MIT
  License URI: https://opensource.org/licenses/MIT
  Source: https://github.com/ghosh/Micromodal

* Resource Name: Space Grotesk (font)
  License: OFL-1.1
  License URI: https://opensource.org/licenses/OFL-1.1
  Source: https://github.com/floriankarsten/space-grotesk

== External Services ==

This plugin provides an option to contact via WhatsApp. When enabled, it generates a link to the WhatsApp API (https://api.whatsapp.com/send). Data (phone number) is sent only when a visitor clicks the button.
WhatsApp Privacy Policy: https://www.whatsapp.com/legal/privacy-policy

AJAX callback requests: This plugin handles callback requests via an AJAX POST request to the WordPress backend. Data (phone number) is used only to send an email to the site administrator.

== Changelog ==

= 1.3.3 =
* Fix: Moved optional data cleanup to `uninstall.php` so normal plugin requests no longer register an uninstall hook or update WordPress options.
* Fix: Isolated the DITS admin notice component to prevent class and constant conflicts with other plugins, and made an incomplete component installation non-fatal.
* Fix: Run analytics schema migration only for administrators in wp-admin and retain the migration state until the analytics table exists.
* Fix: Added a WordPress 5.2-compatible date-formatting fallback for Analytics.

= 1.3.2 =
* New: Added an Analytics tab with anonymous aggregated interaction counters, contact-channel clicks, callback request totals, date filters, and top pages.
* New: Added a dismissible DITS admin notice with a Contact us action and a popup with other DITS solutions.
* New: Added a General Settings option to remove plugin settings and analytics data when the plugin is deleted.
* New: Added a General Settings field for the frontend wrong/error message, with a translation-ready default.
* New: Added `+000000000000` as the default phone input mask for new or empty mask settings without overwriting existing saved masks.
* Improvement: Moved Analytics into the plugin settings tabs instead of a separate admin submenu.
* Fix: Preserved analytics event attributes in preset/themed modal contact links so phone, WhatsApp, Telegram, and Viber clicks can be tracked.

= 1.3.0 =

* Added 10 built-in Modal Presets with professionally designed styles.
* Added Live Preview on the Styles tab. Button and modal settings are applied instantly, allowing administrators to preview changes before saving.
* Fixed callback button positioning on mobile devices. The button now displays correctly in the bottom-right corner of the screen.

= 1.2.0 =
* New: Two prebuilt modal themes — Light and Dark — with glassmorphism design.
* New: Button Behavior settings (position, animation, pulse toggle).
* New: Optional self-hosted Space Grotesk font for themed modals.
* Improvement: Plugin settings split into General and Styles tabs.
* Improvement: Updated default button and modal styles.

= 1.1.0 =
* FEATURE: Added a default phone input mask.
* IMPROVEMENT: Added informational helper text for mask configuration.
* IMPROVEMENT: Minor UI and design adjustments for visual consistency.
* FIX: Fixed an issue where the modal window did not close correctly.

= 1.0.1 =
* FEATURE: Added developer hooks (actions and filters).
* IMPROVEMENT: Improved Telegram link compatibility.
* IMPROVEMENT: Added descriptive helper text for settings.

= 1.0.0 =
* Initial release (formerly DITS Easy Callback Button).

== Upgrade Notice ==

= 1.3.3 =
Fixes fatal errors during normal plugin loading, including conflicts with other DITS plugins, and keeps analytics compatible with WordPress 5.2.

= 1.3.2 =
Adds an Analytics tab, configurable wrong message, default phone mask for empty settings, and an optional cleanup setting for plugin deletion. Existing saved phone masks are not overwritten.

= 1.3.0 =
Light/Dark themes are now Modal Presets, plus a new Live Preview on the Styles tab. Existing sites auto-map to the closest preset — open the Styles tab once to confirm the look.

= 1.1.0 =
Introduces a default phone input mask and improves modal behavior. Updating is recommended.
