Files
2meet-data-optimizer-hivepr…/includes/query/class-tmdo-requests-query.php
T
wpdev b4400a68e5 chore: initial snapshot of 2meet-data-optimizer-hivepress-addon v0.1.0
Baseline before backporting wp-data-optimizer v3.0.1-v3.4.6.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 05:06:36 +08:00

62 lines
1.2 KiB
PHP

<?php
/**
* WP_Query interceptor for hp_request post type.
*
* @package WP_Data_Optimizer
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* WP_Query interceptor for hp_request post type.
*
* Intercepted meta keys:
* hp_vendor => vendor_id (BIGINT)
* hp_listing => listing_id (BIGINT)
* hp_budget => budget (VARCHAR)
*/
class TMDO_Requests_Query extends TMDO_Query_Interceptor_Base {
/**
* Returns the module identifier.
*
* @return string Module name.
*/
protected function get_module(): string {
return 'requests';
}
/**
* Returns the post types this interceptor handles.
*
* @return string[] Post type slugs.
*/
protected function get_post_types(): array {
return array( 'hp_request' );
}
/**
* Returns the custom table name.
*
* @return string Table name without prefix.
*/
protected function get_table(): string {
return 'hpct_requests';
}
/**
* Returns the meta_key to column mapping for hpct_requests.
*
* @return array<string, string> Meta key to column name map.
*/
protected function get_meta_key_map(): array {
return array(
'hp_vendor' => 'vendor_id',
'hp_listing' => 'listing_id',
'hp_budget' => 'budget',
);
}
}