=== Webris Maps ===
Contributors: webristeam
Tags: map, embed, interactive, gis, geojson
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
Stable tag: 1.0.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed interactive Webris maps in WordPress — markers, heatmaps, GPS tracks, polygons, and more. Just paste your map UUID.

== Description ==

**Webris Maps** brings the full power of [Webris](https://webris.pro) — a professional cloud mapping platform with 17+ years of GIS expertise — directly into your WordPress site.

Import your data, customize the look, and embed interactive maps on your website — all from your browser. No GIS expertise required, no installation, no training. Markers, polygons, lines, heatmaps, GPX tracks, GeoJSON, CSV, and WMS layers — all managed in one platform.

Create once, embed everywhere. Update your data in Webris and every embed refreshes automatically. Your maps are responsive, encrypted, and domain-protected out of the box.

= Why Webris? =

* **17+ years of mapping expertise** — not a startup experiment, a battle-tested platform trusted across 30+ countries
* **No API keys, no config files** — just paste your map UUID and go
* **Auto-updating embeds** — change data once, every embed refreshes
* **Your data, your choice** — export everything (GeoJSON, GPX, CSV, KML). Open standards, no lock-in

= Plugin Features =

* **Gutenberg Block** — native block editor support with live preview
* **Shortcode** — classic editor: `[webris_map id="your-uuid"]`
* **PHP Template Function** — for theme developers
* **Customizable** — height, width, and border styles
* **Responsive** — maps adapt to any screen size
* **Smart loading** — viewer script loaded once, no matter how many maps on the page
* **Self-hosted support** — works with self-hosted Webris instances

= How It Works =

1. Create your map on [Webris](https://webris.pro) — import data, add layers, style everything visually
2. Click **Publish** — one click generates a secure, encrypted bundle
3. Copy the map UUID
4. Add the Webris Map block or shortcode in WordPress
5. Done — three lines of HTML, works instantly

= Shortcode Examples =

Basic usage:
`[webris_map id="a1b2c3d4-e5f6-7890-abcd-ef1234567890"]`

With custom height:
`[webris_map id="your-uuid" height="500px"]`

With border style:
`[webris_map id="your-uuid" height="500px" border="rounded"]`

= PHP Template Function =

For theme developers:
`<?php webris_map('your-uuid', ['height' => '500px', 'border' => 'shadow']); ?>`

== Installation ==

1. Upload the `webris-map` folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu in WordPress
3. Add maps using the Gutenberg block or shortcode

== Frequently Asked Questions ==

= Where do I find my map UUID? =

In Webris: Open your map → Click **Publish** → The UUID is shown in the Publish tab and in the URL.

= Do I need a Webris account? =

Yes, you need a Webris account to create and publish maps. Visit [webris.pro](https://webris.pro) to sign up.

= Can I use Google Maps or Mapbox layers? =

Yes, if your Webris map uses Google Maps or Mapbox base layers, they will work automatically. The API keys are configured in your Webris account.

= Does it work with self-hosted Webris? =

Yes! Go to **Settings → Webris Maps** and change the Webris URL to your self-hosted instance.

= What are the shortcode attributes? =

* `id` (required) - Your map UUID
* `height` - Map height, e.g., "400px" or "50vh" (default: 400px)
* `width` - Map width, e.g., "100%" or "800px" (default: 100%)
* `border` - Border style: none, thin, rounded, shadow (default: none)

== Screenshots ==

1. Gutenberg block - paste your map UUID
2. Block preview in editor
3. Shortcode in classic editor
4. Settings page

== Changelog ==

= 1.0.6 — 2026-05-22 =
* Feature: Added translations in 16 languages (ro, de, fr, es, it, el, zh_CN, ja, pt_BR, ru, ar, ko, nl, tr, pl, hi)
* Change: Bundled .po/.mo translation files for settings page and Gutenberg block editor
* Change: Added load_plugin_textdomain() for bundled translations
* Change: Added wp_set_script_translations() for Gutenberg block i18n

= 1.0.5 — 2026-05-15 =
* Fix: Dimension sanitization for height/width shortcode attributes (matches Joomla plugin parity)
* Change: Invalid dimension values now fall back to 400px instead of passing through unchecked

= 1.0.4 — 2026-05-08 =
* Fix: Bundle scripts now loaded via wp_enqueue_script() (WordPress coding standards)
* Fix: All output properly escaped with wp_kses_post()
* Fix: Prefixed global variables in block render template
* Change: Removed deprecated load_plugin_textdomain() call (auto-handled since WP 4.6)
* Change: Removed unused Domain Path header
* Change: Updated tested-up-to to WordPress 6.9

= 1.0.3 — 2026-04-22 =
* Fix: Multi-map support — each map container uses data-webris-uuid attribute for reliable auto-discovery
* Fix: Viewer JS/CSS cache-busting via versioned query strings
* Fix: Narrow embeds on desktop now use mobile overlay layout instead of covering the map
* Change: Viewer auto-scans pre-registered bundles on load (supports defer/async script loading)

= 1.0.2 — 2026-04-22 =
* Change: Renamed plugin slug from webris-wp to webris-map (platform-neutral naming)
* Change: Updated all internal references (constants, class name, text domain)

= 1.0.1 — 2026-04-21 =
* Fix: Viewer CSS now loaded via wp_enqueue_style (styled panels, legend, callouts)
* Fix: Viewer JS deduplicated via wp_enqueue_script (one load for multiple maps)
* Fix: Corrected viewer asset URL path

= 1.0.0 — 2026-04-20 =
* Initial release
* Gutenberg block support
* Shortcode support
* PHP template function
* UUID validation
* Customizable dimensions and borders
* Self-hosted Webris support

== Upgrade Notice ==

= 1.0.6 =
Full i18n support with 16 bundled translations. Recommended update for multilingual sites.

= 1.0.5 =
Stricter dimension validation for shortcode attributes. Recommended update.

= 1.0.4 =
WordPress coding standards compliance and WordPress 6.9 compatibility.

= 1.0.3 =
Fixes multi-map rendering and narrow-embed layout. Recommended update.

= 1.0.2 =
Plugin renamed from webris-wp to webris-map. Deactivate the old plugin, delete it, and install this version.

= 1.0.1 =
Fixes viewer CSS loading and script deduplication for pages with multiple maps.

= 1.0.0 =
Initial release of Webris Maps for WordPress.
