CartoBlocks for Leaflet

Changelog

1.2.5

  • Fixed: The editor map preview now syncs marker drags, circle and line drawing, and pan/zoom back to the block when WordPress itself runs inside nested iframes — e.g. the WordPress.org plugin directory “Live Preview” (WordPress Playground). Previously those interactions were silently lost and every marker kept its default coordinates.
  • Dev: Added a WordPress Playground blueprint for the plugin directory Live Preview (installs the required Leaflet Map plugin automatically) and a manual GitHub Actions workflow to update WordPress.org assets without a release.

1.2.4

  • Docs: Refreshed the plugin description, FAQ, and screenshots for the WordPress.org plugin directory listing. No change to plugin behaviour.

1.2.3

  • Added: “Source Code” section in the readme linking the public development repository and documenting how to build the compiled build/ JavaScript and CSS from source, per WordPress Plugin Review guidelines. Added the Plugin URI header pointing to the same repository.
  • Fixed: The ABSPATH direct-access guard in the block render template now uses exit, matching the rest of the codebase.
  • Dev: Full ESLint/stylelint pass across the JavaScript and SCSS sources (formatting and code-quality only, no behaviour change); PHPStan clean. Continuous integration is green again.

1.2.2

  • Changed: The frontend no longer prints inline tags. Map resize and image-map fit logic moved to the block’s view script, enqueued via the WordPress enqueue API, per WordPress Plugin Review guidelines.
  • Improved: Image-map fit now targets the correct map when multiple map blocks are on the same page.

1.2.1

  • Changed: Renamed the plugin to “CartoBlocks for Leaflet” (slug cartoblocks-for-leaflet) for a more distinctive name, per WordPress Plugin Review guidelines. Updated the Contributors list and plugin metadata.
  • Changed: Moved the block to the Media category and gave its icon the Leaflet green accent.

1.2.0

  • Changed: Replaced the bundled TGM Plugin Activation library with WordPress 6.5+ native plugin dependencies (the “Requires Plugins” header). WordPress now guides you to install and activate the required Leaflet Map plugin before activation. Minimum WordPress version is 6.8.
  • Changed: The editor preview iframe now enqueues its CSS/JS via the WordPress enqueue API instead of printing inline / tags, per WordPress Plugin Review guidelines.
  • Removed: ~3,900 lines of vendored third-party code (TGM Plugin Activation).

1.1.1

  • i18n: Wrapped the remaining untranslated UI placeholder and added translator comments for two placeholder strings so all user-facing text is translation-ready. Regenerated the translation template (.pot). No change to plugin behaviour.
  • Docs: Added a “Known Limitations” note documenting that GPX data layers sourced from the Media Library may not render (upstream Content-Type limitation).

1.1.0

  • New: Image and video overlay shortcodes ([leaflet-image-overlay] / [leaflet-video-overlay]) with drag-to-move and drag-to-resize handles in the editor preview.
  • New: Overlay bounds auto-fill centred on the current map view; overlays update live in the editor without an iframe reload.
  • Improved: Interaction toggles (dragging, keyboard, double-click zoom, etc.) now apply live in the preview.
  • Fixed: Image-map drag and zoom now sync with the sidebar controls in both the editor preview and the frontend; width is passed to [leaflet-image].
  • Fixed: Iframe no longer reloads mid-drag, which previously killed map panning.
  • Hardened: ABSPATH guard added to the generated blocks-manifest.php; Nominatim external service disclosed in the readme.

1.0.7

  • Refactor: Internal modularization (no behaviour change). Plugin code is split into focused files under includes/ so each feature has one home: shortcode builders, preview endpoint, geocoder, editor assets, file-type filters, TGM config. Main plugin file slimmed from 1450 to 95 lines; render.php from 614 to 105 lines. Frontend output is byte-identical to 1.0.6.

1.0.6


* Improved: Replaced “Anchor position” dropdown selects with a visual 3×3 grid for marker icon, shadow, and data-layer icon anchors.

1.0.5

  • Fixed: Map container now fills the block wrapper exactly — width applied to wrapper div, shortcode always gets width=”100%” to prevent tile gap.
  • Fixed: invalidateSize called via WPLeafletMapPlugin.push so Leaflet recalculates tile layout after CSS settles.

1.0.4

  • Fixed: New blocks now inherit the Default Width from Leaflet Map Settings.
  • Fixed: Zoom Level slider min/max now respect the Min Zoom and Max Zoom block attributes.

1.0.3

  • Fixed: New blocks now also inherit Fit Bounds, Zoom Controls, Scroll Wheel Zoom, Double Click Zoom, Min Zoom, and Max Zoom from Leaflet Map Settings.

1.0.2

  • Fixed: New blocks now inherit Default Latitude, Longitude, Zoom, and Height from the Leaflet Map plugin Settings page instead of hardcoded placeholder values.

1.0.1

  • Added: TGM Plugin Activation — guided one-click install of the required Leaflet Map plugin when not present.

1.0.0

  • Full feature parity with the Leaflet Map plugin — all shortcodes wrapped: markers, lines, polygons, circles, GeoJSON/GPX/KML data layers, image map, WMS, image overlay, video overlay.
  • Added: Full internationalisation (264 translatable strings, .pot file included).
  • Added: wp_set_script_translations() wired for block editor translation loading.

0.10.0

  • Added: [leaflet-image-overlay] and [leaflet-video-overlay] shortcode support via new “Overlays” panel. Pin raster images or videos to geo coordinates with configurable bounds, opacity, interactivity, z-index, CSS class, alt text, and aspect-ratio lock (image only).

0.9.0

  • Added: [leaflet-wms] shortcode support via “Use WMS tile source” toggle in the Tile Layer panel. Replaces the standard OSM/raster tile layer with a WMS source. Configurable URL, layer name, and CRS.

0.8.0

  • Added: [leaflet-image] shortcode support — “Image map mode” toggle in the Location panel replaces tiles with a flat image on L.CRS.Simple.
  • Added: MediaUpload picker (WordPress Media Library) and plain URL fallback for the image source.
  • Added: Center X / Center Y pixel coordinate fields (replaces Lat/Lng in image mode).

0.7.1

  • Fixed: Removed unreachable circleMarker toggle from Data Layers (WordPress lowercases shortcode attributes; bozdoz checks camelCase — same trap as touchZoom).
  • Fixed: Help text clarifies bare property name required for “Single property to display” (e.g. ciudad, not {ciudad}).
  • Fixed: Warning added in “Default feature style” panel that styles apply to line/polygon features only.

0.7.0

  • Added: [leaflet-geojson], [leaflet-gpx], and [leaflet-kml] shortcode support via new “Data Layers” panel.
  • Added: Full attribute parity — source URL, fitbounds, popup template, popup property, table view, full style options, custom point icon with aspect-ratio lock and anchor presets.
  • Added: 16 new Jest unit tests for buildLayerShortcodes (35 total).

0.6.0

  • Added: [leaflet-circle] shortcode support with full attribute parity.
  • Added: 2-click draw mode in the editor preview.
  • Added: Live radius guide line and draggable center pin post-draw.
  • Added: m/km unit toggle (stored in meters).
  • Added: Per-circle address geocoder.

0.5.0

  • Added: [leaflet-line] and [leaflet-polygon] shortcode support with full attribute parity.
  • Added: Click-to-draw mode for lines and polygons in the editor preview.
  • Added: Per-point address geocoder and crosshair overlay during draw mode.
  • Added: GitHub Actions CI (PHPStan + PHPCS + Jest).

0.4.3

  • Added: Per-marker “Search by address” helper using Nominatim geocoding.

0.4.2

  • Added: SVG marker support — background color, icon color (theme palette + custom picker), icon CSS class.
  • Added: Mutual-exclusion guard between SVG mode and custom icon mode.

0.4.1

  • Added: Custom icon support — Media Library picker, size with aspect-ratio lock, icon/popup anchor with 9-position presets, optional shadow.
  • Fixed: Custom icon not visible in editor iframe preview.
  • Fixed: Content-less markers causing sibling markers to disappear (self-closing shortcode fix).

0.4.0

  • Added: Per-marker advanced controls — alt text, auto-open popup, draggable, opacity, z-index offset.

0.3.x

  • Added: Shortcode viewer toolbar popover with copy button.
  • Added: Address geocoding in Location panel (Nominatim, server-side AJAX).
  • Added: Tile Layer panel with full tile override controls.
  • Added: Zoom & Bounds panel (min/max zoom, max bounds).
  • Added: Interaction controls panel (7 three-state toggles).
  • Added: Map Controls panel (scale bar, custom attribution).
  • Changed: iframe-based editor preview with postMessage bidirectional sync.
  • Fixed: OSM tile 403 errors in the editor.

0.2.0

  • Initial release with dynamic block, render.php shortcode generation, and ServerSideRender preview.

Plugin Website
Visit website

Version:
1.2.5
Last Updated
July 6, 2026
Requires
WordPress 6.8
Tested Up To
WordPress 7.0
Requires PHP
7.4

Share Post

Join our newsletter.

Get insights into what’s happening at ChangelogWP right in your inbox. We don’t believe in spam.