=== Web 2.0 Directory ===
Contributors: salephpscripts
Donate link: https://www.salephpscripts.com/
Tags: maps, google maps, mapbox, maplibre, markers, store locator, directory, listings, map search, clusters
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.4.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Build powerful, searchable, responsive maps (Google Maps, Mapbox, MapLibre) with custom markers, clustering, frontend submission and advanced search.

== Description ==

Web 2.0 Directory lets you build custom, searchable maps for WordPress in minutes and place them anywhere with a shortcode. Choose your map engine - Google Maps, Mapbox or MapLibre - add high-quality markers, group them into a searchable listings directory, and let visitors filter by category, location, content fields or distance.

**Key features**

* Three map engines: Google Maps, Mapbox, and MapLibre (with MapTiler tiles).
* Custom markers with Font Awesome icons, per-category icons, and marker clustering.
* Advanced search: by category, location, custom content fields, address + radius, and free-hand "draw area" polygon search.
* Listings directory: sidebar list, listings below the map, InfoWindow popups, directions and read-more.
* Frontend submission form so visitors can add their own markers/listings, with optional moderation, expiration and renewal.
* Google reCAPTCHA support on contact and submission forms.
* CSV import/export for bulk marker/listing management.
* Translation-ready: ships a POT file you can translate with any standard gettext/PO editor.
* Powerful settings panel with per-map configuration.
* Fast and lightweight: marker clustering plus on-demand REST loading keep maps, listings and popups responsive even with thousands of markers - quick to load, display and search.

See the live demo: https://maps.salephpscripts.com/

This plugin connects to external services (map providers, reCAPTCHA, and the Web 2.0 Directory license/update server). Please read the **External Services** section below.

== Installation ==

1. Upload the `w2dc` folder to `/wp-content/plugins/`, or install the ZIP via Plugins -> Add New -> Upload Plugin.
2. Activate **Web 2.0 Directory** through the Plugins menu.
3. Open the Web 2.0 Directory settings page, choose your map engine and enter the matching API key/token (Google Maps API key, Mapbox token, or MapTiler key).
4. Create a map, add markers/listings, and place the map on any page with the provided shortcode.

== Frequently Asked Questions ==

= Which map engine should I use? =
Any of Google Maps, Mapbox or MapLibre. Google and Mapbox require an API key/token from the provider; MapLibre renders open tiles (for example from MapTiler) using your key.

= Do I need API keys? =
Yes. Map providers require their own key/token, which you enter on the settings page. The keys are stored on your site and are never sent to us.

= Is it translation ready? =
Yes. A `languages/rmaps.pot` template is included; translate it with any standard gettext/PO editor.

= Can visitors submit their own listings? =
Yes, through the frontend submission form, with optional moderation, expiration and renewal.

== External Services ==

Web 2.0 Directory relies on the following third-party services. Each is used only in the situation described, and all map-provider API keys/tokens are supplied by you.

1. Web 2.0 Directory license & update server (salephpscripts.com)
Used in wp-admin only, when checking for plugin updates or validating your purchase code. It sends your purchase code and your site URL so the server can verify the license and return update information.
Terms & privacy: https://maps.salephpscripts.com/

2. Google Maps Platform (maps.googleapis.com) - only when the Google engine is selected
The browser loads the Google Maps JavaScript API (with your API key) and sends map view coordinates and address/search queries in order to render maps and autocomplete addresses.
Terms: https://cloud.google.com/maps-platform/terms - Privacy: https://policies.google.com/privacy

3. Mapbox (api.mapbox.com) - only when the Mapbox engine is selected
The browser loads Mapbox GL JS (with your access token) and requests map tiles and styles.
Terms: https://www.mapbox.com/legal/tos - Privacy: https://www.mapbox.com/legal/privacy

4. MapLibre / map tiles - only when the MapLibre engine is selected
The MapLibre GL JS library is loaded in the browser, and map tiles are requested from the tile provider you configure (for example MapTiler) using your key.
MapTiler terms: https://www.maptiler.com/terms/ - Privacy: https://www.maptiler.com/privacy-policy/

5. Google reCAPTCHA (www.google.com/recaptcha) - optional, only when enabled
When you enable reCAPTCHA for the contact/submission forms, the browser loads reCAPTCHA and sends interaction signals to Google to score the request.
Terms: https://policies.google.com/terms - Privacy: https://policies.google.com/privacy

== Screenshots ==

1. A map with clustered custom markers.
2. Listings sidebar.
3. Address + radius search.
4. The map with sidebar search.
5. Price markers.
6. The frontend submission form.
7. The Web 2.0 Directory settings panel.

== Changelog ==

= 1.4.0 - August 31, 2026 =
* New: every email in Settings, Email notifications now has its own Subject line you can edit, and its own switch to stop sending it. Leave a subject empty to keep the built-in one. The [tags] work in the subject as well as the body.
* New: the Images field is now "Images & Videos" - attach a YouTube or Vimeo link (short or long form) alongside your photos. Video previews show a play icon in the listing gallery and open in the same lightbox as images, now with a built-in player.
* New: CSV import/export now carries video links and captions the same way it already does images.
* Improvement: the Email notifications tab is easier to read: each email now has its own heading, with its on/off switch and timing setting grouped under it.
* Improvement: no admin screen loads an icon from an outside server any more. Those icons were emoji, which WordPress swaps for images hosted elsewhere; they are now drawn from the icon font the plugin already ships.
* Fix: the radius slider in the search form showed as a bare circle with no track on themes that strip the native styling from form controls (Hueman and others). It now draws its own track and handle, so it looks the same whatever the theme does.
* Fix: the quotes around a listing title no longer arrive as &quot; in the activation email subject.
* Fix: server replies now read as a plain sentence with a status code and a pointer to the error log instead of raw HTML, on every admin screen and on the front-end listing and contact forms.
* Fix: the Edit Listing screen now saves everything you set on it, including plugin boxes such as Yoast (rich text ones too), the permalink, Author, Published on, Discussion settings and a status change made in the Publish box.
* Fix: after logging in from the front-end submit form, you stay on that page instead of being sent to the Dashboard page.
* Fix: the "Forgot password" email link now opens your own reset-password page instead of the default WordPress screen.
* Fix: migrating from the old plugin now also brings over any videos attached to a listing, including their captions - a one-time catch-up covers sites that had already finished migrating before this update.
* Fix: a map label built from text pasted out of Word, a PDF or another site now wraps normally - the non-breaking spaces such text arrives with left the label no point to break at.
* Fix: an Address field that collects only the location dropdowns - with "Enter address fields" switched off - can be submitted again. It answered "Address is required." no matter what you picked, because the check still asked for a street line the form did not offer.
* Fix: the Search and Reset buttons in the search form fill their slot again. A theme that resets button widths (Hello Elementor and others) shrank them to the width of their own labels.
* Fix: the current page in a listings pager takes your own colour instead of a fixed blue.
* Fix: on the Settings screen the Purchase code field stays above its support line and the "Check for updates now" button; another plugin styling the field could pull them up alongside it.

= 1.3.3 - August 25, 2026 =
* Improvement: the "Maps Reset" tool's destructive options (listings/maps/templates, or everything) now require typing DELETE to confirm, on top of the existing warning.
* Fix: logging in, registering, resetting your password and logging out now work correctly on a site with no separate Dashboard page.
* Fix: a migrated custom field (or list option) whose icon was an uploaded image no longer shows a broken icon - the fix now also cleans up sites that were migrated earlier, and covers the per-option icons of list fields (dropdown, radio, checkbox), not just the field's own icon. Affected fields fall back to no icon.

= 1.3.2 - August 21, 2026 =
* New: a "Listing status" box on the Edit Listing screen lets you pause a listing - hiding it from the map without expiring it - and resume it any time.
* New: an option to convert imported images to WebP during CSV import (in the import step) - WebP files are typically 25-35% smaller than JPEG; skipped automatically if the host's image library can't write WebP.
* New: set a specific expiration date - or "Never" - for any listing right on the Edit Listing screen. Your choice overrides the site's expiration setting; leave it on "Default" to follow that setting as before. The "Listing status" and "Listing Info" boxes are now merged into one.
* Improvement: a listing's status now shows as a coloured badge on the Edit Listing screen and in the listings table.
* Improvement: filter the listings table by the "Paused" status.
* Improvement: the Listing history now records expiration-date changes, whether made by hand or automatically.
* Improvement: pause or resume a listing from your front-end dashboard too, and the "Change expiration date" screen now uses the same Default / date / Never control.
* Fix: search form fields keep a consistent height regardless of the active theme.
* Fix: paused or expired listings no longer stay visible on the map after being re-published from Quick Edit, a bulk action or another plugin.
* Fix: map marker coordinates are sent to the browser at normal precision again (some server configurations were appending a long trail of decimal places).
* Fix: the Opening hours field again shows a green "Open" / red "Closed" badge, with correctly coloured day labels, on listings and in map popups.
* Fix: the Edit pencil next to a listing's title (in map popups, in the sidebar and on listing cards) is shown again to signed-in users who can edit that listing - the public map's cache-friendly requests were dropping the sign-in check.
* Fix: a listing that has expired can no longer be paused or resumed (from the Listing status box or the front-end dashboard) - an expired listing must be renewed. Pausing an expired listing used to hide its expired state, and resuming could put it back on the map past its expiration date.

= 1.3.1 - August 19, 2026 =
* New: an "Always load front assets" option (Settings → Advanced → JavaScript & CSS) loads the map's JavaScript and CSS on every page, so a [webmap] shortcode placed in a page-builder header, footer, widget or dynamic template (Divi, Elementor and similar) that is not part of the page's own content still shows the map - no more hidden helper section on every page.
* Improvement: after an update, the migration wizard opens automatically when there is legacy data to migrate.
* Fix: toggling the "Enable automatic user Geolocation" switch on the Edit Map screen now activates the Save button.
* Fix: creating a listing no longer reports a false "is required" error on a custom field that is already filled.
* Fix: map markers no longer disappear when another plugin or theme also loads Google Maps on the page.
* Fix: map search form fields keep their border and full width regardless of the active theme.
* Fix: HTML in a field's Description (help text) now renders on the listing form instead of showing as raw tags.

= 1.3.0 - August 11, 2026 =
* New: label-type map markers (the Rating chip and field-value labels) now take per-source background AND text colours - set them in Edit Map → Markers (the same colour control the dots use); background default white, text default #333. The Opening hours label gets two backgrounds - one for Open, one for Closed.
* New: an alternative HTML marker mode - map markers rendered as real DOM elements instead of on the canvas, switchable in the Markers "Advanced" panel (canvas stays the default).
* Improvement: the reCaptcha settings page now lists which forms reCAPTCHA protects - Login / Register / Lost-password, listing submission, "Contact this listing" (map popup / sidebar) and anonymous star ratings.
* Improvement: listing cards, map popups and the map sidebar lead with the photo as a cover image - flush to the top edge, rounded top corners, softer card corners.
* Fix: the rating field's "Icon size (px)" box in the search-form builder now accepts any value you type - it no longer jumped to the maximum when you typed a smaller number such as 20.
* Fix: migrating a custom field whose icon was an uploaded image no longer produces a broken icon - such fields fall back to their default icon.
* Fix: a label marker’s connector “tip” no longer detaches or collapses to a sliver at steep/diagonal angles - it now hugs the pill’s rounded corner cleanly (canvas and HTML markers).
* Fix: the on-map search form's collapse toggle is now shown only in full-screen - where its folded/expanded state is remembered - so leaving full-screen returns the form to expanded instead of leaving it stuck folded on the page.
* Fix: the search form's Radius slider spans the full form width now, aligned with the other fields (its stray side padding is gone).
* Fix: "Show radius circle" now works on the live map, not just the Edit Map preview - drawn at load from the map's own "Show markers in radius" radius, moved to a visitor's address + radius search, and framed by the camera when it is wider than the saved zoom.
* Fix: when a cookie-consent plugin (for example Avada's Privacy option) holds back the Google Maps script, the map now says it is waiting for consent - and loads once cookies are accepted - instead of "Google Maps API key is not configured".
* Fix: an enabled "Content" field shows on listing cards and map popups again. On some sites it was silently dropped even though the listing editor still showed it.
* Fix: the listings pager no longer shows the theme's bullet points in front of the page numbers.
* Fix: words no longer break in the middle at the end of a line. The 4-line trim on text fields used a legacy CSS box that ignored word-wrapping rules (most visible in Firefox); it now trims by height, so text wraps at spaces. Pasted text is also cleaned of invisible characters that force breaks, and the directions panel is covered too.
* Developer: the shared listing-field markup (cards, map popups, sidebar) now carries neutral `…-listing-content__*` class names alongside the historical `…-popup__*` ones. Custom CSS keyed on the old names keeps working - they are kept as deprecated aliases.

= 1.2.5 - August 6, 2026 =
* New: a Globe projection option for Mapbox and MapLibre maps (Edit Map, next to the map style) - the map shows a 3-D globe when zoomed out and flattens to the normal flat map as you zoom in.
* New: a one-click front-end self-test that checks your maps and listings work on the live site, so problems caused by other plugins (caches, optimizers, security plugins) show up even when wp-admin looks fine.
* Fix: in the setup wizard, the map step now opens the map already created during setup for editing, instead of starting a blank new one (which left you with a duplicate).
* Fix: the rating marker's text size (the px next to "Rating (score + reviews)") now actually resizes the label on Mapbox and MapLibre maps, and markers stay locked to their spot while the globe rotates.
* Fix: the map no longer shows a false "Google Maps API key is not configured" notice when the key is set. On sites where Web 2.0 Directory was the only plugin loading Google Maps, it was accidentally removing its own map script along with any conflicting ones; it now keeps its own, so the map displays.
* Fix: a website address can be entered without "https://" on the listing form, and an email pasted with a stray space is no longer rejected as invalid.
* Fix: long text on listing cards and map popups now wraps at word boundaries instead of breaking words at random characters.
* Fix: the admin reminder about a missing Google Maps API key now shows its bold text and settings-page link correctly instead of raw HTML tags.
* Fix: in the listing-form builder, a field's chosen icon now shows in the Field Properties panel right away, instead of looking blank until you re-select it.
* Fix: in the listing-form builder, grabbing a field and dropping it back in the same place no longer leaves it dimmed.

= 1.2.4 - August 4, 2026 =
* New: a listing's images can be reordered by dragging their handle in the editor - the first image (or the one marked as the logo) is the main image.
* New: the on-map search form gains a collapse/expand toggle beside the drag handle - both shown by the renamed "Allow form drag and toggle" option (Edit Map → Search form).
* Fix: on the listing form, choosing a different main image (logo) - or reordering the images - now takes effect on the front. The front-end listing renderer was still reading a pre-rebuild image key and ignored image/logo edits made in the new editor, so the main image "stuck" on the first image; it now reads the current image order and the chosen logo.

= 1.2.3 - August 2, 2026 =
* New: a "Map language" setting - show Google Maps place labels, Places autocomplete and the geocoder in a chosen language (e.g. English), independent of the site language.
* Fix: when the search form is placed on the page separately from the map, its Locations / Categories dropdowns now open above the map instead of being hidden behind it.
* Fix: the public map no longer breaks with a "Cookie check failed" (403) error on cached pages or after a long-open session - its read-only data is now fetched without a REST nonce, so full-page caches and expired sessions can't stop it loading.

= 1.2.2 - August 1, 2026 =
* Improvement: the Submit button on the front-end listing form now shows a loading indicator while the listing is saved (matching the map editor).
* Fix: the admin Settings screen now loads its section icons and styled dropdown (select) controls correctly - a packaging issue had left some bundled admin styles and scripts missing.
* Fix: the Listing Locations screen now shows the correct number of listings for each location instead of always showing 0.
* Fix: the address "restrict to a single country" setting now defaults to "Worldwide" instead of a blank selection.

= 1.2.0 - July 29, 2026 =
* New: built-in star ratings - visitors can rate listings, and the average rating shows on markers, the map popup, the sidebar and listing pages (no separate add-on needed).
* New: a "Custom" colour palette - editing any colour on the Customization tab switches the palette to Custom automatically, so your own colours are kept.
* New: guided upgrade from the Google Maps Locator plugin - a one-time welcome screen introduces Web 2.0 Directory and runs the data migration, keeping all your purchase keys active.
* New: theme-aware Settings controls, and a "Depth" option for category / location term filters in the search form.
* Improvement: smoother panning and zooming on large maps (cached projections and better marker-overlap handling).
* Improvement: new maps inherit your default map settings, and map duplication now respects user capabilities.
* Fix: when a map provider API key is not configured, the "map can't load" notice now appears immediately instead of several seconds later.
* Fix: colours on a fresh install match the Default palette; a migrated site keeps its own colours under the Custom palette.
* Fix: the form builder keeps the map, markers and panel in sync when using undo / redo.

= 1.1.0 - June 9, 2026 =
* New: 10 Google Maps and 10 MapLibre map style presets (colourful to dark).
* New: branded rocket marker icon and a matching map starting-point marker.
* Improvement: faster marker loading on maps that use a listings limit.
* Fix: list / select / checkbox field values not showing in listings, popups and search.
* Fix: duplicated markers and gallery images on some listings.
* Fix: MapLibre style switching in the map editor's live preview.
* Fix: search-form fade animation and minor UI polish.

= 1.0.0 - June 1, 2026 =
* Initial CodeCanyon release.
