=== ImmobiliareAI – AI-Powered Real Estate Descriptions ===
Contributors: viarete  
Tags: immobiliare, property description, real estate, AI, OpenAI
Requires at least: 5.0  
Tested up to: 6.8  
Requires PHP: 7.4  
Stable tag: 1.2.5  
License: GPL-2.0-or-later  
License URI: https://www.gnu.org/licenses/gpl-2.0.html  

Generate polished real-estate listings with AI. Gutenberg block. IT/EN, saves time per listing.

== Description ==

ImmobiliareAI is an AI-powered WordPress plugin that helps real estate professionals and agencies create high-quality real estate (immobiliare) property descriptions in seconds.

Just enter a few property details into a simple form, and the plugin uses advanced language models (via OpenAI) to write a compelling listing—directly in the block editor.

Whether you're a real estate agent, property manager, or agency, you’ll save time while improving the quality and consistency of your listings.

### Key Features

- 🧠 **AI-generated content** tailored to your property’s features
- ✍️ **Gutenberg integration** – works directly in the WordPress editor
- 📋 **Structured form inputs** for fast and accurate description building
- 🔑 Supports both **OpenAI personal keys** and **commercial license keys**
- 🌐 Language auto-detect (IT/EN) based on site language.
- 🛡️ Safe, secure, and lightweight – no bloat or tracking

Ideal for professionals who want to streamline publishing, improve SEO, and never write another boring listing again.

== Installation ==

1. Download and unzip the plugin package.
2. Upload the `immobiliareai` folder to `/wp-content/plugins/`.
3. Activate the plugin via the “Plugins” menu in WordPress.
4. Go to **Settings → ImmobiliareAI** and enter your license key or OpenAI API key.
5. In the post editor, fill out the form and click **“Generate description”**.

== Frequently Asked Questions ==

= Do I need an OpenAI API key to use the plugin? =  
No. You can use your own OpenAI key (free or paid), or a commercial license key provided by the plugin author.

= Is the generated content unique? =  
Yes. Each description is created dynamically using AI and your property data. You’re free to edit or adapt it to fit your brand.

= Does it support custom post types? =  
Not yet. Support for custom post types is planned in a future update.

== Screenshots ==

1. Open the editor: the ImmobiliareAI panel appears automatically.
2. Fill the property form  
3. Generate description (IT)
4. Generate description (EN)
5. Before vs After in the editor
6. Modify the generated description

== Changelog ==

= 1.2.5 =
*	Compatibility: tested with WordPress 6.8.
*	Documentation: revised short description; unified language note (auto-detect IT/EN); clarified FAQ on OpenAI key vs license.
*	Screenshots: updated titles and order (auto panel, form, generate IT, generate EN, Before/After, modify generated descriptions).
*	“External services” section refined.
*	No functional code changes.

= 1.2.4 =
* Added automatic language detection based on WordPress language setting (Italian / English)
* Cleaned up debug logs and removed console output

= 1.2.3 =
* Improved code compliance with WordPress.org plugin guidelines.
* Escaped all attribute and JS values for improved security.
* Removed obsolete plugin textdomain loader.
* Cleaned up plugin header and removed duplicate fields.
* Minor logic refactor for locale detection.

= 1.2.2 =
* Added missing "Requires" headers to plugin file.
* Documented use of third-party services (OpenAI and custom API).
* Added `ABSPATH` check to prevent direct access.
* Removed `load_plugin_textdomain()` (not needed on WordPress.org).
* Added `immobi_` prefix to all hooks, functions, and options.
* Minor frontend fix in admin.js (AJAX action renamed).
* Improved form usability by converting several text fields to select dropdowns.

= 1.2.1 =
* Improved security: all form data is now sanitized and verified.
* Added nonce verification for AJAX requests.
* Fixed Plugin Checker warnings related to `$_POST` handling and escaping.

= 1.2 =
* Added automatic language detection based on the site’s language (Italian and English supported).
* Minor improvements to translations and backend UI.

= 1.1 =
* Added support for personal OpenAI keys (free usage).
* Improved form layout and editor integration.
* Minor bug fixes and enhancements.

= 1.0 =
* Initial release with commercial license support.

== Upgrade Notice ==

= 1.2.5 =
Documentation and compatibility update. No changes to functionality. Safe to update.

= 1.2.4 =
Adds automatic language detection (IT/EN) and removes debug output. Recommended update.

== License ==

This plugin is released under the GPL-2.0-or-later license. See LICENSE.txt for full details.

== External services ==

This plugin connects to external AI services to generate property descriptions.

1. **OpenAI API** – https://api.openai.com  
Used when a user enters their personal OpenAI key. The plugin sends the structured description prompt to the OpenAI API to generate a real estate description.  
Only the prompt data entered by the user is sent.  
Terms of service: https://openai.com/terms  
Privacy policy: https://openai.com/privacy

2. **AI Property Describer API** – https://ai-property-describer.vercel.app  
This is a custom API used when a commercial license key is provided (instead of a personal OpenAI key). The same prompt data is sent securely to this service for AI-based description generation.  
The backend is managed by the plugin author.  
Terms of service: https://immobiliareai.org/terms  
Privacy policy: https://immobiliareai.org/privacy
