=== PuntoMappa ===
Contributors: leviath
Tags: image map, hotspots, interactive map, polygons
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.3.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Create interactive image maps with editable hotspots, custom text and photos, or existing WordPress posts. Free, with no external service required.

== Description ==

PuntoMappa turns an image from your WordPress Media Library into an interactive map. Draw points, rectangles or polygons and give each area its own popup.

* Draw and edit hotspots directly over your image.
* Move areas or drag vertices to adjust the shape.
* Add a title, plain text and a photo, or link an existing published post.
* Linked posts display their featured image, excerpt and a link to the full article.
* Choose a popup position for each hotspot: any corner, map center or near the area.
* Open by click or hover. Hover previews close after leaving the area or popup; clicking keeps them open.
* Long content scrolls. On phones, popups appear below the image and open by tap.
* Hotspot coordinates follow the image as it resizes.
* Embed with [puntomappa id="123"] in the Shortcode block.
* Translation-ready interface, with language packs managed through translate.wordpress.org.

No account, subscription, tracking or third-party service is required. Map data is stored in your WordPress database and images remain in your Media Library.

== Installation ==

1. Upload the puntomappa folder to /wp-content/plugins/, or upload the ZIP through Plugins > Add New > Upload Plugin.
2. Activate PuntoMappa.
3. Go to PuntoMappa > Add map, give it a title and choose an image.
4. Select Point, Rectangle or Polygon and draw an area. Fill in its content in the side panel.
5. Publish and copy its shortcode into a Shortcode block on any page or post.

== Frequently Asked Questions ==

= Which image formats are supported? =

Formats accepted by your WordPress installation and supported by the browser. PuntoMappa does not enable SVG uploads or bypass WordPress upload restrictions. PDF and design source files must first be converted to an image.

= Can I use an existing post? =

Yes. Set the source to Existing post, search for a published post and select it. Private, draft and inaccessible password-protected posts are not displayed to visitors.

= Can I edit areas or replace the image? =

Use Select to drag an area or its handles. Replacing the background preserves proportional coordinates: review your areas after choosing a different image.

= How does hover work? =

Leaving the area starts a 300 ms closing delay. Entering the popup or returning to the hotspot cancels it. Click, tap, keyboard activation or focusing a popup control keeps the popup open until dismissed.

= Can I choose popup positions? =

Each hotspot supports four corners, map center or placement near the hotspot. Placement adapts to available space. On phones, the popup appears below the image.

= Are there limits? =

Up to 300 hotspots per map and 200 vertices per polygon. Custom text is plain text with paragraphs preserved. Zoom, map panning and a dedicated block are not included in this version.

= What happens when I uninstall? =

Maps and images are retained to avoid accidental data loss. Reactivating restores access to your maps.

= How can I report a problem? =

Use the author's website linked from https://profiles.wordpress.org/leviath/. Include plugin, WordPress and PHP versions, reproduction steps and error messages. Do not share passwords or private data.

== Screenshots ==

1. Visual editor with a rectangle, a point and a polygon. Each area has its own content, color and popup position.
2. Published map with an open popup. Areas remain aligned with the background image as it resizes.
3. Mobile view: the popup appears below the image and supports tapping and scrolling.

== Changelog ==

= 0.3.2 =
* Remove bundled translation catalogues and use WordPress.org language packs.
* Keep PHP and JavaScript strings internationalized under the puntomappa text domain.
* Use the standard WordPress script translation lookup without a custom language directory.

= 0.3.1 =
* Remove the discouraged manual translation loader and use WordPress automatic loading.
* Escape formatted popup output at the point of rendering.
* Document schema-based validation of JSON input without altering its structure.
* Declare the tested WordPress release series in the readme.

= 0.3.0 =
* Add English source strings, translation support and bundled Italian translations.
* Update author and contributor metadata for distribution.
* Harden malformed hotspot payload handling and hide inaccessible password-protected maps.

= 0.2.1 =
* Automatically close hover previews after 300 ms when leaving the hotspot or popup.
* Keep popups open after click, tap, keyboard activation or focusing popup controls.

= 0.2.0 =
* Add per-hotspot popup placement and responsive positioning.

= 0.1.0 =
* Visual editor, three shapes, custom content, linked posts and shortcode.

== Upgrade Notice ==

= 0.3.2 =
Translation files are now managed through WordPress.org. Translations depend on the available language packs; existing maps and content are preserved.

= 0.3.0 =
Adds translation support and distribution metadata. Existing maps and positions are preserved.
