=== Plug and Quiz ===

Contributors: Plug and Quiz  
Tags: script, injection, quiz, gamification, integration  
Requires at least: 4.3  
Tested up to: 6.8.1
Stable tag: 1.0.3 
License: GPLv2 or later  
License URI: http://www.gnu.org/licenses/gpl-2.0.html

A simple plugin to easily integrate interactive quizzes from Plug and Quiz into your WordPress site.

== Description ==

**Plug and Quiz** is a lightweight WordPress plugin that allows you to embed engaging quizzes on your website, powered by the Plug and Quiz platform.

> ⚠️ **Important:** To use this plugin, you must have an account on [https://plug-and-quiz.com](https://plug-and-quiz.com).  
> If you don't have one yet, [click here to create your account](https://plug-and-quiz.com/register).

Once installed and configured, the plugin automatically injects a script into your site’s header or footer. This script enables you to display and manage quizzes directly on your site.

### 🔥 Features:

- ✅ **Automatic script injection** into the `<head>` or `<footer>` of your pages
- 🔧 **Flexible settings**: choose script position (header/footer) and modal placement
- 🚀 **Asynchronous loading** to ensure optimal performance
- 🧩 Designed as a complementary tool to the [Plug and Quiz](https://plug-and-quiz.com) platform

### 📌 Example of injected script:

`<script id="f22f8c3b-4370-4fc8-b1da-f266d0485cc7" src="https://cdn.plug-and-quiz.com/v1.0.0/embed.js" data-domainId="your-domain-id" data-position="bottom-right" defer></script>`

== Installation ==

1. Upload the plugin to the `/wp-content/plugins/` directory or install it directly through the WordPress plugins screen.
2. Activate the plugin via the “Plugins” menu in WordPress.
3. Go to **Settings → Plug and Quiz**.
4. Enter your **Domain ID** (you can find it on your [Plug and Quiz](https://plug-and-quiz.com) dashboard).
5. Choose your preferred settings and save. You're ready to go!

== Frequently Asked Questions ==

= Do I need an account on plug-and-quiz.com? =  
Yes, the plugin works in conjunction with your Plug and Quiz account. You can [sign up here](https://plug-and-quiz.com/register).

= Where do I find my domain ID? =  
Log in to your account at [plug-and-quiz.com](https://plug-and-quiz.com/login), and you'll find your domain ID in the domain management section.

= Will this plugin slow down my site? =  
No, the injected script is loaded asynchronously and optimized for performance.

== Screenshots ==

1. Settings page – enter your domain ID and configure the script behavior.
2. Example of a quiz injected onto the site.

== Changelog ==

= 1.0.0 =
* Initial release with automatic script injection

= 1.0.1 =
* Optimization of script loading
* Add check for avoiding wrong domain ID
* Fixes for minor bugs
* Improved dom element creation

= 1.0.2 =
* Fix minor button bug

== Upgrade Notice ==

== License ==

This plugin is licensed under the GPLv2 or later.  
See [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)

== External Service ==

This plugin uses the Plug and Quiz service to provide quiz functionality. By using this plugin, you agree to the [Plug and Quiz Terms of Service](https://plug-and-quiz.com/terms/terms) and [Privacy Policy](https://plug-and-quiz.com/privacy).
The plugin does not collect any personal data from users. Please refer to the Plug and Quiz documentation for more information on data collection and privacy practices.