=== StoryEstate ===
Contributors: bikram_sth
Tags: real estate, property, listing, agent, gutenberg
Requires at least: 6.0
Tested up to: 7.1
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A universal, high-performance, and developer-friendly real estate plugin for property listings, agents, and offices.

== Description ==

StoryEstate is a lightweight, yet feature-packed real estate plugin designed to work seamlessly with any WordPress theme. It provides a complete, premium-grade solution for managing properties, agents, and offices without bloating your site or forcing you into expensive "Pro" upgrades.

Whether you are a solo realtor, a large brokerage, or a developer building a headless real estate app, StoryEstate has you covered.

= 🌟 Advanced Features (Included Out-of-the-Box) =

* **Interactive Mortgage Calculator:** A built-in Gutenberg block that calculates monthly payments instantly. No external APIs, no bloat. It even auto-detects the property price!
* **Floating Contact Buttons:** Boost conversions with sticky WhatsApp and Click-to-Call buttons. They automatically pre-fill messages with the property title and URL.
* **WooCommerce-Style Image Gallery:** A beautiful, fixed-aspect-ratio image gallery with thumbnail swapping. 100% optimizer-proof (works perfectly with Smush, LiteSpeed, etc.).
* **Advanced Lead Generation:** AJAX-powered contact forms routed directly to the assigned agent, complete with a built-in honeypot to stop spam bots.
* **CSV Import/Export with Security:** Easily migrate listings. Includes advanced CSV formula injection protection to keep your admin safe.

=  Core Property Management =

* **Unlimited Properties:** Add unlimited properties with rich details, galleries, and virtual tour links.
* **Agent & Office Profiles:** Link agents to specific properties and manage brokerage locations seamlessly.
* **Advanced Search & Filtering:** Filter by status, type, city, price, beds, and baths with a beautiful, responsive grid layout.
* **Dynamic Status Badges:** Customizable colors for "For Sale", "For Rent", "Sold", etc.

= ️ Developer & SEO Friendly =

* **Headless / REST API Ready:** All custom meta fields are explicitly exposed to the WordPress REST API, making it perfect for React, Next.js, or mobile app integrations.
* **SEO Schema Markup:** Automatically outputs `RealEstateListing` JSON-LD schema for better search engine visibility.
* **Universal Theme Compatibility:** Scoped CSS variables ensure it matches your theme perfectly without style conflicts.
* **OpenStreetMap Integration:** Free, no-API-key-required property maps powered by Leaflet.js.

== Installation ==

1. Upload the `story-estate` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to Properties > Settings to configure your currency, units, and floating contact buttons.
4. Add your first property listing!

== Frequently Asked Questions ==

= Does this work with my theme? =
Yes! StoryEstate uses scoped CSS variables and standard WordPress template hierarchies, making it compatible with 99% of WordPress themes.

= Do I need a Google Maps API key? =
No. StoryEstate uses OpenStreetMap (Leaflet.js) out of the box, which is completely free and requires no API key.

= Is the Mortgage Calculator included? =
Yes! Unlike many competitors that lock calculators behind paid add-ons, our interactive, zero-API Mortgage Calculator is fully built-in and requires no extra purchases.

= Can I use this with a Headless WordPress setup? =
Absolutely. We have explicitly registered all custom property meta fields to the REST API, making StoryEstate one of the most headless-ready open-source real estate plugins available.

= How do I stop spam on the contact forms? =
The plugin includes a built-in "Honeypot" field that silently blocks 99% of automated spam bots without annoying your users with CAPTCHAs.

== Screenshots ==

1. Responsive property grid with advanced search and filtering.
2. Single property page with overview, OpenStreetMap location, agent contact form and floating WhatsApp / call buttons.
3. Built-in mortgage calculator with automatic property price detection.
4. Agent profile page listing the agent's properties.
5. Property editor with statuses, types, features and listing agent.
6. Properties list in the admin with price, location, status, agent and views columns.
7. CSV import and export for migrating listings.
8. Settings page for currency, measurement unit and floating contact buttons.
9. Dashboard widget with quick stats.

== Third-Party Resources ==

This plugin uses the Leaflet.js library to render maps and loads map tile imagery from OpenStreetMap. 

* **Leaflet.js** (MIT License)
  * Used for: Rendering interactive maps.
  * URL: https://leafletjs.com/
  
* **OpenStreetMap** (Open Data Commons Open Database License - ODbL)
  * Used for: Providing map tile imagery.
  * URL: https://www.openstreetmap.org/
  * Terms of Service: https://wiki.osmfoundation.org/wiki/Terms_of_Use
  * Privacy Policy: https://wiki.osmfoundation.org/wiki/Privacy_Policy

== Changelog ==

= 1.0.0 =
* Initial release.
* Added Property, Agent, and Office custom post types.
* Added Advanced Search with AJAX filtering.
* Added WooCommerce-style Image Gallery (optimizer-proof).
* Added Interactive Mortgage Calculator Gutenberg Block.
* Added Floating WhatsApp and Click-to-Call buttons.
* Added CSV Import/Export with formula injection protection.
* Added REST API support for Headless WordPress.
* Added RealEstateListing JSON-LD Schema markup.
* Added Contact Form Honeypot for spam prevention.