=== GetValetParking Valet Search Widget ===
Tags: valet, parking, search, widget, directory
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add a valet parking search box to your site. Visitors search the GetValetParking directory and results open on getvaletparking.com.

== Description ==

The GetValetParking Valet Search Widget adds a free valet parking search box to any post, page, or widget area. It is built for valet operators, hotels, wedding and event venues, restaurants, and facility managers who want to help their own site visitors find a valet parking company nearby without building any search functionality themselves.

The widget is rendered by the GetValetParking service (getvaletparking.com). Visitors search by service or company and city; ZIP codes are not supported. Search results open in a new tab on getvaletparking.com. The service renders "Powered by GetValetParking" attribution below the widget. The attribution link uses `nofollow`. See "External services" below for the information sent to the service.

Add the widget anywhere with the shortcode:

`[getvaletparking_widget]`

== Installation ==

1. Upload the plugin through Plugins → Add New → Upload Plugin, or upload the `getvaletparking-widget` folder to `/wp-content/plugins/`.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Add `[getvaletparking_widget]` to any post, page, or Shortcode block.

**Shortcode attributes** (all optional):

| Attribute | Default | Meaning |
| --- | --- | --- |
| `service` | (empty) | Prefills the "Service or company" search field. |
| `near` | (empty) | Prefills the "City" search field. Use a city name, not a ZIP code. |
| `theme` | `light` | `light` or `dark`. |
| `height` | `auto` | `auto` sizes to content. A positive whole number sets a scrollable frame height, limited to 170–2000 pixels. Invalid values use `auto`. |

Example:

`[getvaletparking_widget service="wedding valet" near="austin" theme="light" height="auto"]`

== External services ==

This plugin relies on the GetValetParking valet parking directory service to render the search widget. Specifically:

* On pages where the `[getvaletparking_widget]` shortcode is rendered, the plugin loads `https://getvaletparking.com/widget.js?mode=containers&ver=1.0.1`. This service script embeds `https://getvaletparking.com/embed/` in an iframe and renders the service attribution. Pages without a rendered shortcode do not load the widget service.
* As a visitor types into the embedded widget's city field, the widget requests city suggestions from `https://api.getvaletparking.com/cities-autocomplete`.
* When the widget loads, the service receives the configured service/company and city defaults, display theme, widget version, embedding page's hostname and origin, and HTTP request metadata including the visitor's IP address and user agent. As visitors type a city, their city text is sent to the suggestions endpoint.
* When visitors submit a search, their service/company term, city, and selected state are sent to `https://getvaletparking.com/services/`. The results URL includes `utm_source=embed`, `utm_medium=widget`, and the embedding hostname as `utm_content` to identify widget referrals.
* Requests occur when the widget loads, when visitors request city suggestions, and when they search. These are direct browser requests to the service. The plugin does not create options or tables in the WordPress database or set cookies. Data handling by the service is described in its privacy policy.

Terms of service: https://getvaletparking.com/terms/
Privacy policy: https://getvaletparking.com/privacy/

== Frequently Asked Questions ==

= Does this work with the block editor? =

Yes. Use the core Shortcode block and paste `[getvaletparking_widget]` into it. There is no custom Gutenberg block to install or maintain.

= Can I remove the "Powered by GetValetParking" link? =

No. It is part of the widget that the GetValetParking service renders, not something produced by this plugin, and it cannot be toggled from WordPress. Using the service means displaying its attribution.

= Does it store anything in my database? =

No. The plugin adds no options, no database tables, and sets no cookies.

= Does it work without JavaScript or if the service is unavailable? =

Interactive search requires JavaScript and access to GetValetParking. A link to browse the directory remains available when JavaScript is disabled or the widget cannot load. That link does not require interactive search. The directory itself still needs an internet connection.

= How do I get help or update a manually installed copy? =

Use the Setup guide and Support links on the Plugins screen, or visit https://getvaletparking.com/support/. Download the current ZIP from https://getvaletparking.com/widget/ and upload it through Plugins → Add New → Upload Plugin. WordPress will offer to replace the existing plugin. Until this plugin is published in the WordPress.org directory, manual installations do not receive directory-managed automatic updates.

== Changelog ==

= 1.0.1 =
* Use explicit container-only loading so footer scripts do not create an extra widget.
* Add a useful directory fallback and setup/support links on the Plugins screen.
* Validate fixed heights and document city search, service requests, and manual updates.
* Package a reproducible release and verify WordPress compatibility.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.1 =
Fixes duplicate widgets with footer loading and improves fallback behavior. Update the plugin and use city names rather than ZIP codes.
