=== Smart Affiliate Link Manager ===
Contributors: ermaldbilla
Tags: affiliate, links, monetization, seo, automation
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 8.0
Stable tag: 1.0.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automatically transform keywords in your posts into affiliate links. Professional, secure, and WordPress standards compliant.

== Description ==

**Smart Affiliate Link Manager** is the definitive plugin for monetizing your WordPress site through affiliate links. It completely automates the link insertion process, saving hours of manual work.

= Key Features =

* **Automatic Replacement** - Keywords are automatically transformed into affiliate links
* **Centralized Management** - Intuitive admin interface to manage all keywords
* **SEO Friendly** - Links with `rel="nofollow sponsored"` attributes for Google compliance
* **Enterprise Security** - CSRF protection, input sanitization, prepared statements
* **Optimized Performance** - Efficient regex patterns and intelligent caching
* **Detailed Logs** - Complete tracking of every operation
* **AJAX Ready** - Instant operations without page reload
* **UTF-8 Support** - Works perfectly with accented characters (àèéìòù)
* **Responsive Design** - Modern interface that works on every device

= Typical Use Case =

1. Add a keyword (e.g., "iPhone") and your Amazon affiliate link
2. Write or edit a post containing the word "iPhone"
3. The plugin automatically transforms "iPhone" into an affiliate link
4. Earn commissions without manually modifying every post!

= Perfect For =

* **Bloggers** who want to monetize content
* **Product review sites**
* **Online magazines** with sponsored content
* **Marketers** managing affiliate campaigns
* **Agencies** managing multiple client sites

= Security and Compliance =

The plugin implements ALL WordPress security best practices:

* Nonce verification for CSRF protection
* Capability checks (`manage_options`)
* Input sanitization (`sanitize_text_field`, `esc_url_raw`)
* Output escaping (`esc_html`, `esc_url`, `esc_attr`)
* Database prepared statements (`$wpdb->prepare`)
* Compliant with WPCS (WordPress Coding Standards)

= Support and Documentation =

* Complete documentation included in the plugin
* Support via WordPress.org forum
* Bug reports on GitHub
* Custom development available

= Useful Links =

* [Complete Documentation](https://getwebsolution.it/smart-affiliate-link-manager)
* [Request Support](https://wordpress.org/support/plugin/smart-affiliate-link-manager/)
* [Leave a Review](https://wordpress.org/support/plugin/smart-affiliate-link-manager/reviews/)

== Installation ==

= Automatic Installation =

1. Go to "Plugins → Add New" in your WordPress dashboard
2. Search for "Smart Affiliate Link Manager"
3. Click "Install Now" and then "Activate"
4. Go to "Settings → Affiliate Links" to configure

= Manual Installation =

1. Download the plugin ZIP file
2. Go to "Plugins → Add New → Upload Plugin"
3. Select the downloaded ZIP file
4. Click "Install Now" and then "Activate"

= Initial Configuration =

After activation:

1. Go to **Settings → Affiliate Links**
2. Click **"Add New Keyword"**
3. Enter the keyword (e.g., "iPhone")
4. Enter the affiliate link (e.g., "https://amazon.com/iphone?tag=your-id")
5. Configure options (case sensitivity, max replacements)
6. Click **"Add Keyword"**
7. The plugin will start automatically transforming keywords in your posts!

= Minimum Requirements =

* WordPress 6.2 or higher
* PHP 8.0 or higher
* MySQL 5.7+ or MariaDB 10.2+
* `manage_options` permissions for administrator

== Frequently Asked Questions ==

= Does the plugin work with the Gutenberg editor? =

Yes! The plugin is fully compatible with Gutenberg (block editor) and also with the Classic Editor.

= Can I limit the number of links per post? =

Absolutely yes. Use the "Max Replacements" field when adding/editing a keyword. Set:
* `0` for unlimited replacements
* `1` to replace only the first occurrence
* `N` to replace only the first N occurrences

= Do affiliate links harm SEO? =

No! The plugin automatically adds `rel="nofollow sponsored"` attributes to all links, following Google's official guidelines for affiliate links.

= Does it work with keywords containing accents? =

Yes! The plugin fully supports UTF-8 and works with accented characters like: àèéìòù, ñ, ç, etc.

= Can I disable a keyword without deleting it? =

Yes, simply uncheck the "Enabled" checkbox when editing the keyword. You can reactivate it at any time.

= How do I apply rules to already published posts? =

Use the **"Update All Posts Now"** button in the plugin dashboard. This will reprocess all existing posts applying the active keywords.

= Is the plugin secure? =

Absolutely! We implement:
* CSRF Protection (nonce verification)
* Input sanitization on all fields
* Output escaping on all displayed data
* Database prepared statements
* Capability checks on all admin operations
* Full compliance with WordPress Coding Standards

= Can I customize the link style? =

Yes! Generated links have the CSS class `.sal-affiliate-link`. You can add custom CSS in your theme to style them as you prefer.

= Does it work with page builders? =

Yes, it's compatible with Elementor, Divi, WPBakery, and other popular page builders. The plugin hooks into standard WordPress filters.

= Do you offer customizations? =

Yes! Contact us via the plugin support forum or email for custom development requests.

== Screenshots ==

1. **Main Dashboard** - Complete view with keyword management, real-time statistics, and activity logs
2. **Add Keyword** - Intuitive form with validation to add new keywords and affiliate links
3. **Edit Keyword** - Quick inline editing with immediate confirmation
4. **Activity Logs** - Detailed tracking of all plugin operations
5. **Link in Action** - Example of keyword transformed into affiliate link with SEO-friendly attributes
6. **Statistics** - Summary panel with key metrics

== Changelog ==

= 1.0.6 - 2025-11-24 =
* Initial public release
* Complete keyword management (CRUD operations)
* Automatic content replacement
* UTF-8 and accented characters support
* Detailed activity logging
* Responsive admin interface
* AJAX operations
* Enterprise-grade security
* Translation ready (.pot file)
* WordPress 6.2-6.8 compatibility
* PHP 8.0-8.3 compatibility
* WPCS compliance

== Upgrade Notice ==

= 1.0.6 =
First public release. Backup recommended before installation on production sites.

== Additional Info ==

= Privacy Policy =

This plugin does NOT:
* Collect personal user data
* Send data to external servers
* Use cookies or tracking
* Require external registrations

All data (keywords, links, logs) are saved exclusively in your WordPress database.

= Support =

For technical support:
* WordPress.org Forum: [Plugin Support](https://wordpress.org/support/plugin/smart-affiliate-link-manager/)
* Email: info@getwebsolution.it

= Contributions =

The plugin is open source! Contribute on [GitHub](https://github.com/yourusername/smart-affiliate-link-manager).

= Credits =

Developed with ❤️ by [Ermald Billa](https://getwebsolution.it) following WordPress Coding Standards.
```

---

## **Optimal Keywords for WordPress.org**
```
Tags: affiliate, links, monetization, seo, automation