=== RetouchWP ===
Contributors: potoalfaro
Tags: elementor, editor, frontend editing, ai, client
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let your clients edit their Elementor site themselves: right-click to change text, images and links, or describe the change and let AI apply it.

== Description ==

Retouch lets the owner of an Elementor site edit it without learning Elementor. It is built for the person who actually uses the site every day: usually the client a designer or agency built it for.

While logged in, right-click any part of a published page and choose what to do.

**Direct actions (free, no AI, no balance needed)**

* Edit text in place, right on the page.
* Replace an image by picking one from the Media Library.
* Change a link: web address, email, phone number or WhatsApp.
* Undo the last changes.

**Ask the AI (optional, uses prepaid balance)**

* Describe the change in plain language: "make it bigger", "set the background to black", "rewrite this paragraph shorter", "change the title of this news item". Retouch applies it to the element you clicked.
* Use the chat in the WordPress admin for larger requests.
* Administrators can also ask it to build complete pages, or a full site, from a sketch or a description.

**Client mode**

Users who are not administrators (for example, the Editor role) can only change what already exists. They cannot create or delete pages, and they cannot touch the header, footer or global styles. Administrators keep full control.

**Safe by design**

* Every change can be undone, up to 15 steps per user.
* The page cache is cleared after each change, so visitors see the update.
* Nothing is sent to any external server until an administrator clicks "Connect to Retouch AI" in the settings. Direct actions never need the external service.

**For designers and agencies**

Install it on your client's site and let them edit it themselves. Small text, photo and link changes stop landing in your inbox, client mode keeps the layout and global design out of reach, and you still have the full Elementor editor whenever you need it.

**Requirements**

* Elementor (free or Pro).
* WordPress 6.2 or later, PHP 7.4 or later.

== External services ==

This plugin can connect to an external service operated by DEPLOIX to provide its optional AI features ("Ask the AI" and the admin chat). The direct actions (edit text, replace image, change link, undo) work without this service.

**Service:** DEPLOIX AI editing service, at https://deploy-ix.com/editor-ia/

**No connection until you opt in.** The plugin does not contact any external server until an administrator clicks "Connect to Retouch AI" in Settings.

**What is sent, and when:**

1. **When you click "Connect to Retouch AI" (once):** the site URL and a verification URL on your own site, used to confirm that the domain belongs to whoever is connecting it. The service returns a site code, which is stored in your WordPress database.
2. **When the settings page or the admin chat is opened (after connecting):** only the site code, to retrieve the current balance.
3. **Each time a user sends a request to the AI:** the text of the request, the system instructions, the site data needed to make the change (structure and texts of the page or element involved, titles and file names from the Media Library, data from the posts or records involved, site name, global colors and fonts) and any images the user attaches.

**Third-party AI provider.** To process each AI request, the DEPLOIX service forwards it to a third-party AI model provider (currently Anthropic, PBC, with servers in the United States), deducts the cost from the site's balance and returns the result. See the provider's terms (https://www.anthropic.com/legal/commercial-terms) and privacy policy (https://www.anthropic.com/legal/privacy).

**What DEPLOIX stores.** DEPLOIX does not store the content of requests. It only logs the date, the site, the number of tokens used, the cost and the remaining balance. The DEPLOIX server is hosted in Germany.

**Payments.** Balance is purchased on https://deploy-ix.com/editor-ia/, not inside the plugin. Payments are processed by Mercado Pago; DEPLOIX stores the payment ID and amount and never sees or stores card details. See Mercado Pago's privacy policy (https://www.mercadopago.com.ar/privacidad).

**Terms and privacy:**

* Terms of Use: https://retouchwp.com/terms
* Privacy Policy: https://retouchwp.com/privacy

== Installation ==

1. Install and activate Elementor (free or Pro) if it is not already active.
2. In WordPress, go to Plugins > Add New, search for "RetouchWP" and click Install, then Activate. Or upload the `retouchwp` folder to `/wp-content/plugins/` and activate it from the Plugins screen.
3. Visit any page of your site while logged in and right-click an element to use the direct actions. No setup is needed for these.
4. Optional, for the AI features: go to Retouch > Settings and click "Connect to Retouch AI". New sites receive US$1 of free balance to try it (once per domain). More balance can be purchased at https://deploy-ix.com/editor-ia/.
5. To let a client edit the site in client mode, give their account the Editor role.

== Frequently Asked Questions ==

= What is free? =

The plugin and all direct actions are free: editing text in place, replacing images from the Media Library, changing links and undoing changes. They do not require connecting to any service. Only the AI features use prepaid balance.

= How much does an AI edit cost? =

It depends on the size of the request and of the page involved. A typical small edit costs a few US cents. Larger requests, such as building a full page, cost more. The cost of each request is deducted from the actual usage, and the "≈ N edits" figure shown in the settings is an estimate. Balance is sold in packs of US$10, 25 and 50, paid in Argentine pesos through Mercado Pago, and it does not expire.

= What does my client see? =

When logged in with a non-administrator role such as Editor, your client sees a right-click menu on the published pages with the direct actions and, if the site is connected, "Ask the AI". In client mode they can change existing content only: they cannot create or delete pages or modify the header, footer or global styles.

= Does it work with the free version of Elementor? =

Yes. Retouch works with Elementor free and Elementor Pro.

= Can I undo a change? =

Yes. Each user can undo up to 15 steps, including changes made by the AI.

= What data is sent to external servers? =

Nothing until an administrator clicks "Connect to Retouch AI". After that, each AI request sends the request text and the site data needed to make that change, which DEPLOIX forwards to a third-party AI provider. DEPLOIX does not store the content of requests. See the "External services" section for the full list.

= Can the AI make mistakes? =

Yes. AI output can be wrong or not what you expected. Review each change and use Undo if needed. Keeping regular backups of your site is recommended.

= Does it work with page caching plugins? =

Retouch clears the page cache after each change so visitors see the updated content.

== Screenshots ==

1. Right-click menu on a published page: free direct actions (edit text, change link) and the box to ask the AI.
2. Editing a heading in place, directly on the page.
3. "Ask the AI": describing a change in plain language for the selected element.
4. The admin chat, used for larger requests such as building a new page.
5. Settings screen with the "Connect to Retouch AI" button, the current balance and the client mode options.

== Changelog ==

= 1.0.0 =
* First public release.
* Right-click direct actions: edit text, replace image, change link, undo.
* "Ask the AI" on any element and AI chat in the admin.
* Client mode for non-administrator users.
* Undo history of up to 15 steps per user.
* Automatic page cache clearing after each change.

== Upgrade Notice ==

= 1.0.0 =
First public release.
