WP Manifestindependent plugin directory
manifest / media / sc-maps

SC Maps

Small WP plugin to add maps and map markers to your site

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/neilsayers/sc-maps/archive/refs/heads/main.zip
Updates itself. It ships its own updater (Plugin Update Checker), so new versions appear under Dashboard → Updates.

A site-agnostic map embed — Leaflet + OpenStreetMap, no API key, no Google. Guides you through naming your own marker post types before anything is registered.

Description

SC Maps is built to be dropped into any WordPress site as-is — no build step, no Composer install. Rather than hard-coding a single "Location" post type, it's managed from one "Maps" settings screen where you create your own marker types with their own singular/plural labels, colour, and icon (e.g. "Shop" / "Shops", "Point of interest" / "Points of interest", "Theme park" / "Theme parks") — up to 6 by default. That cap is filterable, e.g.:

add_filter('scm_max_marker_types', fn () => 8);

For each type, the underlying post type key and URL slug are locked in the moment it's created — renaming its labels afterwards never orphans existing markers or breaks their links. Types can be deleted from the screen too, but only after typing the type's plural label to confirm — doing so moves every one of its posts to Trash (a normal 30-day recovery window, nothing is hard-deleted) and removes any custom taxonomies attached to it.

Each marker type can also have its own custom taxonomy (e.g. "Cuisine" for Restaurants), managed from a "Taxonomies" screen under Maps — capped at 2 per marker type by default, also filterable:

add_filter('scm_max_taxonomies_per_marker_type', fn () => 4);

Unlike marker types, taxonomies can be freely deleted — removing one just stops classifying posts, it doesn't touch them.

Every marker post type gets a hand-written "Location" box above the content editor — a Leaflet + OpenStreetMap map with address search (vendored locally, no runtime CDN dependency) for dropping a pin, plus lat/lng inputs kept in sync with it. Everything else about a marker (name, photo, description) is just the post's own title/featured image/content.

Configured marker types nest under one "Map Locations" admin menu instead of each getting its own top-level entry — keeps the sidebar tidy as more types are added.

Marker data is available three ways, all backed by the same query so results always match whichever one you use: scm_get_markers()/scm_render_map() (PHP), a public REST endpoint (GET /wp-json/scm/v1/markers), and a [sc_map] shortcode. See Maps → Documentation for the full reference.

This plugin is deliberately independent of SC Events Manager and SC Room Bookings — no shared code or assets at runtime, even though the underlying patterns (and the Leaflet location picker) are the same. Any one, two, or all three can be activated or deactivated without affecting the others.

Changelog

0.3.3

  • Added self-hosted update checking (Setup\UpdateChecker, using the vendored, build-step-free plugin-update-checker library) pointed at this plugin's own GitHub repo, so installs get the normal wp-admin "Update available" notice without needing to be listed on WordPress.org.
  • Added automatic releases: a GitHub Actions workflow publishes vX.Y.Z with a correctly-named sc-maps.zip whenever the plugin header's Version changes — no manual tagging.

0.3.2

  • Add an uninstall script: deleting the plugin now removes its settings and transients. Markers and marker-type taxonomies are left in place, as they're the site's own content.

0.2.1

  • The "SC Maps" settings menu now reads "SC Maps" in the admin sidebar (not just the page title) and has moved down near the bottom of the menu, alongside SC Events Manager and SC Room Bookings's own settings screens — keeps the admin sidebar's top area for actual content rather than plugin settings. The "Map Locations" menu that lists marker post types is unaffected — it stays at the top with other content.

0.2.0

  • Marker types now nest under a single "Map Locations" top-level admin menu instead of each type getting its own — keeps the admin sidebar tidy as more types are added. Each type still gets exactly one link there (its own list); "Add New" stays one click away, from inside a type's own list.
  • scm_get_markers()/scm_render_map()/[sc_map] gained an "ids" parameter — plot exactly a given set of marker posts, for theme code that already knows which marker(s) it wants (e.g. a "pick a location" field) rather than filtering by type/taxonomy.
  • Fixed: the map's CSS could fail to load on some pages — it's now enqueued unconditionally on the front end (matching SC Events Manager's own frontend.css) rather than only when a map was already known to be rendering, which was too late for wp_head() to still be able to print it.

0.1.0

  • Initial release.