Files
2meet-data-optimizer-hivepr…/includes/hivepress/adapters/class-tmdo-hivepress-requests-adapter.php
T
wpdev 0254e40d83
Tests / PHP Lint (pull_request) Successful in 50s
Tests / Unit Tests (pull_request) Successful in 58s
Tests / Integration Tests (pull_request) Successful in 57s
refactor(2meet-data-optimizer-hivepress-addon): stop registering Hot zone fields
- ADR-003 step 4 (AddOn side): core, requests, bookings, memberships and
  marketplace adapters no longer register zone=hot fields or contribute
  hot_* FSM modules; their keys live in TMDO_HivePress_Entity_Groups.
  Cold/warm registrations are unchanged.
- Hot-table doctor probes go with them (trait defaults apply). The
  hot-clause query rewrite and cron optimizer are now inert and are left
  for the ADR step-5 removal together with core's hot path.
- New NoHotZoneRegistrationTest pins the invariant across all 13 adapters;
  per-adapter hot assertions removed.
- Verify: HP unit 142 / integration 49 green, phpcs clean (WordPress)
- PR: PR-037
2026-09-26 01:13:35 +08:00

65 lines
1.6 KiB
PHP

<?php
/**
* Requests adapter — `hivepress-requests`.
*
* Two related models:
*
* - Request (post_type=hp_request)
* hp_drafted / hp_expired_time are flattened by the `hp_draft_flags`
* and `hp_request_core` entity groups (TMDO_HivePress_Entity_Groups).
*
* - Offer (comment_type=hp_offer, parent post_type=hp_request)
* stored in comment columns only — no comment meta to flatten.
* (The adapter used to mirror offers into `wpdo_comment_hp_offer`,
* a table nothing ever created.)
*
* @package WP_Data_Optimizer
* @since 3.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'TMDO_HivePress_Requests_Adapter' ) ) {
/**
* Requests addon adapter.
*/
final class TMDO_HivePress_Requests_Adapter implements TMDO_HivePress_Adapter {
use TMDO_HivePress_Adapter_Trait;
/** Comment_type for the Offer side of Requests. */
public const OFFER_COMMENT_TYPE = 'hp_offer';
/**
* Constructor — bind register hooks via inherited trait.
*/
public function __construct() {
$this->bind_anti_eav_hooks();
}
/** Adapter slug (matches wp.org plugin slug). */
public function plugin_slug(): string {
return 'hivepress-requests';
}
/** Class probed for addon presence. */
public function detection_class(): string {
return 'HivePress\\Requests\\Plugin';
}
/** Version constant probed for addon presence. */
public function detection_const(): string {
return 'HIVEPRESS_REQUESTS_VERSION';
}
/** Minimum addon version supported. */
public function minimum_addon_version(): string {
return '1.2.0';
}
}
} // end if ( ! class_exists )