=== Web Directory Free === Contributors: mihail-chepovskiy Donate link: https://www.salephpscripts.com/ Tags: directory, business directory, listings, maps, store locator Requires at least: 6.0 Tested up to: 7.0 Requires PHP: 7.4 Stable tag: 2.0.5 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html A searchable business directory for WordPress: categories, locations, custom fields and interactive Google, Mapbox or MapLibre maps. == Description == Web Directory Free turns WordPress into a searchable business directory. Sort listings into categories, locations and tags, build your own listing form, drop the directory onto any page with a shortcode, and let visitors search and browse — on a list or an interactive map. In the free edition you add and edit listings from the WordPress admin, and visitors browse, search and view them on the front end. **Live demo:** https://directory.salephpscripts.com/ **Key features** * Categories, locations and tags to organise your listings. * A listing-form builder — add your own fields (text, select, checkbox, price, opening hours, date, website, email, and more). * Maps with Google Maps, Mapbox or MapLibre (MapTiler tiles), per-category marker icons and clustering. * Advanced search: by category, location, custom fields, and address + radius search. * Google reCAPTCHA on the listing contact form. * CSV import and export for bulk listing management. * Translation-ready: ships a POT file for any standard gettext/PO editor. * Fast on large directories: marker clustering and on-demand loading keep thousands of listings responsive. This plugin uses external services (map providers and, if you enable it, Google reCAPTCHA). See the **External Services** section below. **Upgrading** The full version of Web 2.0 Directory adds front-end paid submission, membership plans and WooCommerce checkout for paid, featured, renewed and upgraded listings. Those modules are not part of the free edition. == Installation == 1. Upload the plugin folder to `/wp-content/plugins/`, or install the ZIP via Plugins -> Add New -> Upload Plugin. 2. Activate **Web Directory Free** from the Plugins menu. 3. Open the settings page, pick your map engine and enter its API key/token (Google Maps API key, Mapbox token, or MapTiler key). 4. Create your categories and locations, build the listing form, add listings, and place the directory on any page with the shortcode. == Frequently Asked Questions == = Who can add listings in the free edition? = Listings are created and edited from the WordPress admin. Front-end submission (with optional moderation, expiration and renewal) is part of the full version. = Do I need API keys? = For maps, yes — each map provider needs its own key/token, entered on the settings page. Keys are stored on your site and are never sent to us. = Which map providers are supported? = Google Maps, Mapbox, and MapLibre with MapTiler tiles. You pick one on the settings page. = Is it translation ready? = Yes. A `languages/w2dc.pot` template is included; translate it with any standard gettext/PO editor. = How do paid listings and membership plans work? = Paid submission, membership plans and WooCommerce checkout come with the full version of Web 2.0 Directory, not the free edition. == External Services == Web Directory Free uses the following third-party services. Nothing is sent until you use the matching feature: * Map providers (Google Maps, Mapbox, MapTiler / MapLibre) — when a map loads or an address is geocoded, the request (coordinates, the address being searched, and your API key/token) is sent to the provider you chose. See that provider's terms and privacy policy. * Google reCAPTCHA — when you turn it on for the contact form, the visitor's interaction is checked with Google. See Google's terms and privacy policy. The free edition does not contact the author's servers: it gets updates through WordPress.org and does no license or "phone-home" checks. == Changelog == = 2.0.5 = * Fix: choosing a different main image (logo) — or reordering a listing's images — now takes effect on the front. The listing renderer was reading a pre-rebuild image key and ignored edits made in the editor, so the main image "stuck" on the first image; it now honours the current image order and the chosen logo. * 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) becomes the main image. * New: the on-map search form gains a collapse/expand toggle beside the drag handle — both shown by the "Allow form drag and toggle" option (Edit Map → Search form). * Fix: after migrating a legacy site, category / location / listing links no longer open the directory home instead of the right page — the migration deterministically rebuilds the directory URL rules, and a "Rebuild directory routing" button on Tools → W2DC Migration re-applies them on demand. = 2.0.4 = * Fix: migrating from a legacy directory no longer risks published listings being switched to Draft — old carried-over expiration dates are grandfathered to "never expire" and the hourly expiration check is paused until the migration finishes (with automatic repair of any listings a previous run had suspended). * Fix: the migration no longer stalls with an "Unexpected token" error on large sites — the heaviest step now runs one custom field per request and automatically retries and resumes after a server timeout. * Fix: listing and directory links work right after migration — permalinks are refreshed automatically (no need to re-save Settings → Permalinks). * Fix: the "Preview" button and "View Listing" link are back on the listing editor. * Fix: migrated directories show a working map instead of an empty map area. * New: the directory elements are available in both the WPBakery / Visual Composer and Elementor page builders, using the same element names, so pages built with them render and stay editable. * New: listing cards gain a Cover / Contain image-fit option alongside the aspect-ratio control. = 2.0.3 = * 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: a new listing created in the WordPress admin now publishes reliably even when the form takes more than a minute to fill in — WordPress' autosave could previously leave it as an unpublished draft that was missing from the Listings list and the map. * Fix: the public directory 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. = 2.0.2 = * Security: only users allowed to submit listings can upload files; uploads are limited to safe file types and a maximum size, and low-privilege users are rate-limited. * Security: through the API, users can now only view and edit their own listings. * Security: anonymous star ratings are counted once per visitor and rate-limited (with optional reCAPTCHA) to stop rating spam. = 2.0.1 = * Packaging: restore the historical main plugin file name so updates from earlier versions apply cleanly without deactivating the plugin. No functional changes. = 2.0 = * Rebuilt on the shared SalePHP engine: the directory core (categories, locations, tags), the custom listing-form builder, maps (Google, Mapbox, MapLibre) and advanced search. * Hardened request-input sanitization across admin handlers; added a nonce and capability check to the license-notice endpoint; guarded a CSV image path against traversal. * No self-hosted updater or license checks — updates are delivered through WordPress.org. * Trimmed the bundled demo payload (removed compressed archives and the large country sample data). * Routed internal diagnostics through a WP_DEBUG-gated logger so production logs stay quiet.