# Nutaan Chatbot Widget - WordPress Plugin

A simple and efficient WordPress plugin to integrate the Nutaan chatbot widget into your website.

## Features

- ✅ Easy configuration via WordPress admin panel
- ✅ Secure API credential management
- ✅ Enable/disable widget with one click
- ✅ Automatic loading on all pages
- ✅ No coding required
- ✅ Lightweight and fast

## Installation

### Method 1: Manual Installation

1. Download or clone this repository
2. Copy the `nutaan-widget` folder to your WordPress plugins directory: `/wp-content/plugins/`
3. Go to your WordPress admin panel
4. Navigate to **Plugins > Installed Plugins**
5. Find "Nutaan Chatbot Widget" and click **Activate**

### Method 2: ZIP Upload

1. Zip the `nutaan-widget` folder
2. Go to **Plugins > Add New** in WordPress admin
3. Click **Upload Plugin**
4. Choose the zip file and click **Install Now**
5. Click **Activate Plugin**

## Configuration

1. After activation, go to **Settings > Nutaan Chatbot** in your WordPress admin
2. Enter your **Authorization Token** (e.g., `nutaan-xxxxxxxx-xxxxx`)
3. Enter your **API Key** (e.g., `nut-xxxxxxxx-xxxxx`)
4. Check the **Enable Widget** checkbox
5. Click **Save Settings**

The chatbot widget will now appear on all pages of your website!

## Getting Your Credentials

Visit your Nutaan dashboard at [https://nutaan.com](https://nutaan.com) to get your:

- Authorization Token
- API Key

## File Structure

```
nutaan-widget/
├── nutaan-widget.php  # Main plugin file
├── readme.txt                 # WordPress plugin readme
├── uninstall.php             # Cleanup on plugin deletion
└── README.md                 # This file
```

## How It Works

The plugin adds a script tag to the WordPress footer with your configured credentials:

```html
<script
  src="https://cdn.nutaan.com/chatbot-widget.js"
  Authorization="Bearer YOUR_TOKEN"
  x-api-key="YOUR_API_KEY"
></script>
```

## Support

For support and documentation, visit [Nutaan.com](https://nutaan.com)

## License

This plugin is licensed under the GPL v2 or later.

## Changelog

### Version 1.0.7

- **Removed**: Internal GitHub updater to comply with WordPress.org guidelines.
- **Fixed**: PHPCS linting errors and nonce verification.

### Version 1.0.6

- **Security**: Complete security overhaul (CSRF protection, input validation, strict escaping).

### Version 1.0.0

- Initial release.
