Files
wpdev 99f4653b25 docs(2meet-data-optimizer-hivepress-addon): map HivePress extension meta keys and query shapes
- docs/HIVEPRESS-COVERAGE.md: read-only inventory on dev36 of the hp_* meta each post type holds (registered or not, queried or not), where the extensions keep their data (comments, taxonomies, user meta) and the query shapes a front-end crawl produced.
- Conclusion for plan D04: attribute auto-registration is not needed now — every meta key HivePress queries is registered, select attributes are taxonomies, and the unregistered keys written (hp_due_date, hp_availability, hp_warranty) are never queried; revisit for sites that add filterable or sortable number / date attributes. README links it.
- PR: PR-083
2026-09-27 09:19:09 +08:00

108 lines
3.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 2meet Data Optimizer — HivePress AddOn
> 為 **HivePress** + 12 個官方擴充提供完整反 EAV 整合(最大 AddOn,~7,400 行)。
---
## What it does
從 `wp-data-optimizer v2.16.0` 提煉的 HivePress 整合層,包含 13 個 adapter、7 個 HPCT 攔截器、5 個查詢攔截器、bootstrap、admin tab、CLI namespace。
### 13 HP Adapter 全清單
| Adapter | 對應 HP 擴充 | 行數 |
|---|---|---:|
| Core | hivepress | 407 |
| Reviews | hivepress-reviews | 146 |
| Bookings | hivepress-bookings | 159 |
| Messages | hivepress-messages | 263 |
| Memberships | hivepress-memberships | 169 |
| Requests | hivepress-requests | 267 |
| Favorites | hivepress-favorites | 234 |
| Statistics | hivepress-statistics | 130 |
| Tags | hivepress-tags | 84 |
| SEO | hivepress-seo | 76 |
| Social Links | hivepress-social-links | 115 |
| Blocks | hivepress-blocks | 73 |
| Marketplace | hivepress-marketplace | 135 |
### 7 HPCT Interceptor
reviews / messages / favorites / memberships / requests / statistics / listing-meta
### 5 Query Interceptor (pre_get_posts 改寫)
reviews / messages / memberships / requests / listing-meta
### 額外組件
- HP transient filter(`_transient_hp_*` postmeta → wp_options 路由,避免 postmeta 脹大)
- HPCT (HP Custom Tables) import 工具(v2.0.0 取代 HPCT 之相容路徑)
- HP attribute bridge / cron optimizer / suitability scorer / benchmark / REST
- HivePress comment router
---
Registered keys HivePress keeps in core columns instead of meta (`hp_vendor`, `hp_status`, …): see [docs/REGISTERED-KEYS.md](docs/REGISTERED-KEYS.md).
What the HivePress extensions write and how they query it (dev36 inventory, D04 decision): see [docs/HIVEPRESS-COVERAGE.md](docs/HIVEPRESS-COVERAGE.md).
## Requirements
- WordPress ≥ 6.0
- PHP ≥ 8.1
- 2meet-data-optimizer ≥ 0.1.0
- hivepress ≥ 1.7.22 (支援 `_alias` / `_external` field convention)
---
## Installation
```bash
# 啟用前確認 HP 已啟用
wp plugin list | grep hivepress
# 安裝 + 啟用
wp plugin install /path/to/2meet-data-optimizer-hivepress-addon-v0.1.0.zip --activate
# 驗證 13 adapter 全 bound
wp tmdo hivepress detect
# Benchmark vs HP 預設
wp tmdo hivepress benchmark --post-type=hp_listing --samples=200
```
---
## 為什麼選擇單一 AddOn(不拆 13 sub-AddOn)
| 維度 | 單一 AddOn ✓ | 13 sub-AddOn ✗ |
|---|---|---|
| 啟動開銷 | 一次偵測 | 13 次重複偵測 |
| 依存管理 | 單一 ZIP | WP 依存解析複雜 |
| Feature flags | 統一管理 | 跨 sub-AddOn 同步 |
| UX | 一鍵啟用 | 分次啟用 |
---
## CLI
```bash
wp tmdo hivepress detect
wp tmdo hivepress benchmark
wp tmdo hivepress import-hpct --dry-run
wp tmdo hivepress score # 8 維 anti-EAV 評分
wp tmdo hivepress doctor
```
---
## Phase
Phase 3 — 與 [WooCommerce AddOn](../2meet-data-optimizer-woocommerce-addon/) 與 [LatePoint AddOn](../2meet-data-optimizer-latepoint-addon/) 同期 ship。風險最高的 phase。
---
## License
GPL-2.0-or-later