=== Apimo ===
Contributors: apimofficiel
Tags: real estate, property listings, apimo, estate agency, property search
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 3.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show your Apimo properties on your website: automatic sync, search, property pages and contact requests sent back to Apimo.

== Description ==

Apimo is a software for real estate agencies. This plugin displays the properties of your Apimo account on your WordPress site and keeps them up to date.

* **Automatic sync**: changes made in Apimo are fetched every hour, and a full sync every night removes the properties that are no longer published.
* **Blocks and shortcodes**: property list, search form and property page, for the block editor and for page builders.
* **Fits your site**: colours and fonts come from your theme. You can change the main colour, the heading font, the rounded corners, the layout of the lists (grid, list, immersive, carousel, mosaic, compact) and the layout of the property page (gallery style, position of the contact form, order of the sections).
* **Contact requests**: the form on each property page sends the request to Apimo as a lead, on the agency of the property, with the visitor's consent.
* **Privacy by design**: only public information is stored in WordPress. Owner details, private comments, exact coordinates (unless the address is public) and private documents are never copied.
* Respects the publication settings of the Apimo listing (hidden price, description or photos).
* Works with block themes and classic themes. Every template can be overridden from your theme (`yourtheme/apimo/`).

You need an Apimo account and an API access (provider ID and token). Ask the Apimo support team to get one.

== Installation ==

1. Install and activate the plugin.
2. Go to **Apimo > Connection**, enter your provider ID and token, then click "Connect and list my agencies".
3. Go to **Apimo > Sync** and click "Full sync".
4. Your properties are online at `/biens/` (you can change this address in **Apimo > Appearance**). Add the "Apimo properties" and "Apimo property search" blocks to any page.

== Frequently Asked Questions ==

= Can I use it with a page builder? =

Yes, use the shortcodes: `[apimo]` for a list (attributes: `layout`, `columns`, `limit`, `category`, `city`, `orderby`), `[apimo_search]` for the search form and `[apimo_property id="123"]` for a property page.

= How do I change the design? =

Most sites need nothing: the plugin follows your theme. Use **Apimo > Appearance** for the main options, or override the CSS variables in your theme, for example `.apimo { --apimo-accent: #0f6b6f; --apimo-radius: 0; }`. To change the HTML, copy a file from the plugin's `templates` folder to `yourtheme/apimo/`.

= What happens to contact requests if Apimo cannot be reached? =

They are e-mailed to the site administrator so that no request is lost.

== External services ==

This plugin connects to the following services.

**Apimo API** (`https://api.apimo.pro`), provided by Apimo. It is used to read your properties, agencies and labels (sync, at most every hour, and from the admin screen) and to send contact requests. When a visitor sends the contact form, their first name, last name, e-mail, phone number, message, language and the property reference are sent to the agency's Apimo account. Data is only sent after you enter your API credentials. Legal notice: https://apimo.com/mentions-legales – Privacy policy: https://apimo.com/politique-de-confidentialite

**OpenStreetMap tiles** (`https://tile.openstreetmap.org`), provided by the OpenStreetMap Foundation. When the map section is shown on a property page, the visitor's browser loads map images from OpenStreetMap (this sends the visitor's IP address and the map area to OpenStreetMap). You can hide the map in **Apimo > Appearance**, or use another tile server with the `apimo_map_tiles` filter. Tile usage policy: https://operations.osmfoundation.org/policies/tiles/ – Privacy policy: https://osmfoundation.org/wiki/Privacy_Policy

Property photos are displayed from the Apimo media servers (`https://media.apimo.pro`).

== Third-party libraries ==

* Leaflet 1.9.4 (BSD-2-Clause), https://github.com/Leaflet/Leaflet – unminified sources: https://unpkg.com/leaflet@1.9.4/dist/leaflet-src.js

== Changelog ==

= 3.0.1 =
* New: "Back to properties" link on the property page, returning to the list and search the visitor came from.

= 3.0.0 =
* Complete rewrite.
* New: blocks for the property list, the search form and the property page, with six list layouts and a configurable property page.
* New: the design follows the theme (colours, fonts), with a few simple options.
* New: incremental sync every hour, full sync every night, resumable and with progress in the admin.
* New: contact requests with consent, sent to the agency of the property, e-mail fallback.
* Privacy: only public property data is stored; Apimo publication settings are respected.
* Photos are no longer copied into the media library.
* Your API credentials and property URLs from version 2 are kept.
* Requires PHP 8.1 and WordPress 6.5.

= 2.6.5.2 =
* Fixed a fatal error during plugin load.

== Upgrade Notice ==

= 3.0.0 =
Complete rewrite. Your API credentials and property URLs are kept. After the update, open Apimo > Sync and run a full sync, then check your pages: the 2.x settings for colours and layouts are replaced by new options.
