=== Car Dealer Blocks ===
Contributors: jerryscg
Tags: car dealer, vehicles, inventory, automotive, blocks
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.2.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Dealer and classifieds inventory, seller accounts, moderation and native WordPress blocks.

== Description ==

Car Dealer Blocks provides Dealer and Classifieds inventory with custom tables, vehicle search, email inquiries, verified seller accounts, frontend vehicle forms, galleries and moderation. Ten dynamic blocks include Seller Dashboard, Submit Vehicle and Seller Directory. A resumable setup creates or links pages after an explicit review. The plugin works with the free Car Dealer Blocks theme and other suitable themes.

There is no license server requirement, commercial inventory quota or mandatory external account. Deactivation and removal preserve inventory data.

The foundation includes typed specifications, make/model validation, image ownership checks, private VIN/contact fields, manager/moderator/seller capabilities, REST endpoints and accessible vehicle presentation.

Free includes dealer and classifieds workflows without a commercial listing quota. Payments and an inquiry inbox are reserved for a future separate Pro extension. This development package has not been submitted to WordPress.org.

Vehicles, sellers, catalog, relationships, settings, verification and moderation use custom tables. WordPress supplies authentication, users, Media Library, native pages and privacy-request processing. Settings > Data and privacy provides a dedicated administrator JSON export. It is separate from a full WordPress database/files backup and has no importer. Personal-data callbacks integrate with WordPress requests; active dealerships and foreign-linked profiles require administrator reassignment before erasure. Minimal unverified account state can remain while the WordPress account exists.

== Installation ==

1. Install the ZIP through Plugins > Add New > Upload Plugin and activate it.
2. Open Vehicles > Setup. Choose Dealer or Classifieds, enter site details, and choose existing pages with the required blocks or create new pages.
3. Review publication behavior and explicitly choose whether to enable the showroom and seller registration. Write and publish your own rules/privacy pages before registration or contact use. Home page, menus and global WordPress registration are preserved.
4. Add the resulting pages to navigation. Configure your site mail service and test delivery before live account verification or vehicle inquiries.
5. Open Vehicles > Makes and models. Add a make, select it, then add its models. Configure equipment and Inventory defaults, including photos and optional listing duration.
6. Dealer managers add vehicles in the admin or frontend. Classifieds sellers confirm their email, submit a seller profile and manage their own frontend listings. Reviewers approve profiles and vehicles in Vehicles > Reviews.
7. Settings > Data and privacy offers business exports and links to native WordPress privacy requests. Keep independent database and file backups.

The private seller email and vehicle VIN are visible only in authorized edit contexts. Public phone and city are public fields. WordPress uploads remain normal public media; do not upload private identity documents as vehicle photos.

== Frequently Asked Questions ==

= Do I need the Car Dealer Blocks theme? =
No. The plugin provides a default presentation. The free theme offers coordinated styling.

= Is there a Pro theme? =
No. The theme remains free. Future paid functionality belongs in a separate Pro extension plugin.

= What happens when I deactivate or remove the plugin? =
Vehicle and seller data remain stored. Reactivation restores the plugin interface. This development release does not offer automatic data deletion.

== Upgrade Notice ==

= 1.2.1 =
Listing photo limits are clearly grouped in Settings > Inventory and enforced for admin/manager listings as well as seller/API submissions. Lower limits keep files but require galleries to comply before saving or approval.

= 1.2.0 =
Versioned extension API for a separate Pro plugin: shared typed fields, settings/account tabs, safe search, render slots and transactional policy rules. No schema migration.

= 1.1.3 =
The native media REST API now requires authentication, including individual and embedded media records. Public listing photos and image file URLs continue to work. External clients that previously read anonymous media JSON must authenticate; data and schema are unchanged.

= 1.1.2 =
Media Library ownership also covers the older WordPress 6.6 date-query format. No schema, file, ownership or role migration; previous packages are unchanged.

= 1.1.1 =
Signed-in users without administrator or inventory-manager privileges now browse only their own Media Library items, including native list/grid and REST/AJAX requests. Public image delivery, existing roles, schema 5 and data are preserved.

= 1.1.0 =
Neutral scoped frontend design replaces inherited theme colors and typography. Existing custom CSS may need to target the cdb-ui root. Schema 5, settings and data are unchanged.

= 1.0.3 =
Account forms adapt to their theme container, with verification resend below sign-in and registration. Authentication and data are unchanged.

= 1.0.2 =
Vehicle Trash remains available in inventory tabs. Its sidebar shortcut is removed. Data and permissions are unchanged.

= 1.0.1 =
Reviews layout fixes only. Schema, moderation decisions and stored data are unchanged.

= 1.0.0 =
Back up database, uploads and code. Schema 5 remains. Setup applies only after completion. Published standalone listings keep their visibility. Business JSON export is separate from full-site backup. Review privacy erasure retention messages.


= 0.3.0 =
Back up database/uploads/code. Schema 3 adds one table; existing custom inventory and legacy snapshots are retained. Dealer mode and inquiries require explicit setup. Configure the site mail transport and a valid privacy-policy URL before live contact use.

= 0.2.0 =
Custom-table migration requires a full database/uploads/code backup. Inventory is temporarily unavailable until copying and verification finish. Resume with wp cdb database migrate --user=ADMIN_ID. Legacy records are retained but not synchronized. Downgrading only plugin files is unsupported.

== Changelog ==

= 1.2.1 =
Add a clear Vehicle photos settings section, editor limit hints and consistent count/file-size validation for all listing write paths and existing Media Library selections. Preserve defaults, saved preferences, files, schema 5 and extension API 1.0.0.

= 1.2.0 =
Add extension API 1.0.0 with namespaced module registration, shared fields and validation, settings/account tabs, public-field search/sorting, render slots, entitlement rules, owner quota serialization and inquiry/review events. Preserve standalone Free, stored extension values, schema 5 and PHP 7.4+.

= 1.1.3 =
Closed anonymous media REST enumeration and direct/embedded record reads while retaining public vehicle photos, galleries and existing authenticated media permissions.

= 1.1.2 =
Preserved owner-only legacy upload months on WordPress 6.6 and newer core while retaining the native query aliases each form expects.

= 1.1.1 =
Closed media ownership bypasses in native administration, REST author filters and direct attachment operations. Kept administrator/manager library access and public listing photos.

= 1.1.0 =
Unified theme-independent frontend for search, listings, seller profiles, accounts and vehicle submission, with container-aware layouts and accessible controls.

= 1.0.3 =
Kept sign-in and registration in at most two columns and moved verification resend into a separate section below.

= 1.0.2 =
Removed the redundant vehicle Trash sidebar item; inventory Trash navigation remains.

= 1.0.1 =
Fixed empty Reviews card spacing and responsive submission/report layout.

= 1.0.0 =
Free release preparation: accessible cross-theme accent, guarded templates, package cleanup, translation catalog, documentation and compatibility validation.

= 0.5.0 =
Resumable setup and linked pages, seller directory, default listing duration, data export, WordPress privacy integration and measured search readiness. PHP 7.4+ remains.

= 0.4.3 =
Validated moderation proposals retain approved listings during review. Required rejection reasons, private review queue and bounded listing reports. Schema 5. PHP 7.4+ remains.

= 0.4.2 =
Added frontend My vehicles, add/edit forms, photo selection/upload/reordering, owner-scoped Trash/restore/delete and dynamic Submit Vehicle/Seller Dashboard blocks.

= 0.4.1 =
Added optional Classifieds seller registration, expiring email verification, WordPress sign-in/reset, account/profile forms and an additive schema 4 account table. Pending accounts cannot sign in or publish.

= 0.4.0 =
Confirmed Dealer/Classifieds modes, multi-seller public inventory, seller-profile vehicles and contact routed to the actual seller.

= 0.3.7 =
Added Sellers Trash, restore to draft and confirmed permanent deletion. Active dealership profiles and profiles referenced by any vehicles (including drafts and Trash) are protected. Trashed sellers cannot be edited, selected for new vehicle assignments or enabled as the dealership. WordPress users and Media Library files are retained. Shared AJAX/native forms and ownership checks apply; schema 3 and PHP 7.4+ remain.

= 0.3.6 =
Replaced the Edit vehicle row text with a centered pencil icon matching the Trash control, with an Edit vehicle tooltip, vehicle-specific accessible name, keyboard focus and 44px mobile target. Edit URLs, AJAX navigation and permissions remain unchanged.

= 0.3.5 =
Added Inventory defaults for vehicles per page (1-24), sorting and grid/list layout. Public inventory, search blocks and search API use these defaults when a visitor has not chosen an override. Form submission and pagination retain the chosen page size; Clear filters restores site defaults. Schema 3 and PHP 7.4+ remain.

= 0.3.4 =
Added General price formatting: thousands and decimal separators, 0-6 display decimals and an immediate preview. Display rounding preserves saved amounts, canonical API values, entry precision and search comparisons. Existing schema 3, PHP 7.4+ and WordPress 6.6+ remain.

= 0.3.3 =
Added General settings for the default currency, four symbol positions and kilometres/miles, with a live preview. Applies to vehicle entry, public blocks and search. Existing prices retain their currency and amount; no exchange-rate conversion. Canonical kilometres, two-decimal price storage, schema 3 and PHP 7.4+ remain compatible.

= 0.3.2 =
Added a unified Settings page with Dealership, Inventory and Inquiries sections, retained unsaved tab values, shared AJAX saves, native forms and legacy Dealer setup compatibility.
Styled the Move to Trash row action as a centered trash icon beside Edit, with a native tooltip, a vehicle-specific accessible name and keyboard focus styling. Schema remains 3.

= 0.3.1 =
Added multi-selection, bulk Trash actions, a dedicated Trash view, restore to draft, and confirmed permanent deletion. Restore all and Empty Trash respect ownership and the make filter across all pages. Media Library files are retained. Schema remains 3.

= 0.3.0 =
Added Dealer setup, public search/results, seller details and vehicle email inquiries. Schema 3 adds short-lived delivery receipts without message content. PHP 7.4+ remains supported. Upgrade from 0.2.x is additive; back up before installing.

= 0.2.2 =
Added AJAX saves, validation and workspace navigation, including make selection, inventory filters and pagination. Improved loading feedback, unsaved-change protection and button icon alignment. Schema remains 2; PHP 7.4+ remains supported.

= 0.2.1 =
Redesigned the administration and simplified makes/models, grouped vehicle forms, visual gallery controls and equipment selection. Schema stays at 2; no conversion is needed when upgrading from 0.2.0.

= 0.2.0 =
Moved all business data to dedicated indexed InnoDB tables. Added make-scoped model management, transactional writes and a resumable verified legacy migration. WordPress login and Media Library remain integrated. PHP 7.4+ remains supported.

= 0.1.1 =
Added PHP 7.4+ runtime compatibility and compatibility regression checks.

= 0.1.0 =
Initial development foundation. See CHANGELOG.md in the source repository for details.
