'hp_price', 'type' => 'decimal', 'searchable' => true, 'label' => 'Listing price', ), array( 'key' => 'hp_status', 'type' => 'enum', 'searchable' => true, 'options' => array( 'publish', 'draft', 'pending', 'expired', 'private' ), 'label' => 'Listing status', ), array( 'key' => 'hp_featured', 'type' => 'integer', 'searchable' => true, 'label' => 'Featured flag (0/1)', ), array( 'key' => 'hp_verified', 'type' => 'integer', 'searchable' => true, 'label' => 'Verified flag (0/1)', ), array( 'key' => 'hp_vendor', 'type' => 'integer', 'searchable' => true, 'label' => 'Vendor user ID', ), array( 'key' => 'hp_expired_time', 'type' => 'integer', 'searchable' => true, 'label' => 'Expiry unix ts', ), array( 'key' => 'hp_featured_time', 'type' => 'integer', 'label' => 'Featured-until unix ts', ), array( 'key' => 'hp_view_count', 'type' => 'integer', 'searchable' => true, 'label' => 'View counter', ), array( 'key' => 'hp_rating', 'type' => 'decimal', 'searchable' => true, 'label' => 'Average rating', ), array( 'key' => 'hp_rating_count', 'type' => 'integer', 'label' => 'Rating count', ), array( 'key' => 'hp_hourly_rate', 'type' => 'decimal', 'label' => 'Hourly rate', ), ), array( 'post_types' => array( 'hp_listing' ) ) ); } /** * HivePress request core meta keys (post_type=hp_request). * * @return void */ private static function register_hp_request_core_group(): void { TMDO_Entity_Registry::register_group( 'post', 'hp_request_core', array( array( 'key' => 'hp_status', 'type' => 'enum', 'searchable' => true, 'options' => array( 'publish', 'draft', 'pending', 'expired' ), 'label' => 'Request status', ), array( 'key' => 'hp_user', 'type' => 'integer', 'searchable' => true, 'label' => 'Request author user ID', ), array( 'key' => 'hp_expired_time', 'type' => 'integer', 'searchable' => true, 'label' => 'Expiry unix ts', ), array( 'key' => 'hp_budget', 'type' => 'decimal', 'searchable' => true, 'label' => 'Budget amount', ), array( 'key' => 'hp_view_count', 'type' => 'integer', 'label' => 'View counter', ), ), array( 'post_types' => array( 'hp_request' ) ) ); } /** * HivePress vendor core meta keys (post_type=hp_vendor). * * @return void */ private static function register_hp_vendor_core_group(): void { TMDO_Entity_Registry::register_group( 'post', 'hp_vendor_core', array( array( 'key' => 'hp_user', 'type' => 'integer', 'searchable' => true, 'label' => 'Vendor user ID (linked WP user)', ), array( 'key' => 'hp_verified', 'type' => 'integer', 'searchable' => true, 'label' => 'Verified flag (0/1)', ), array( 'key' => 'hp_hourly_rate', 'type' => 'decimal', 'searchable' => true, 'label' => 'Hourly rate', ), array( 'key' => 'hp_rating_count', 'type' => 'integer', 'label' => 'Rating count', ), array( 'key' => 'hp_rating', 'type' => 'decimal', 'searchable' => true, 'label' => 'Average rating', ), ), array( 'post_types' => array( 'hp_vendor' ) ) ); } /** * HivePress per-user fields (favorites + avatar attachment). * * Hp_favorited_listings is a serialized array of post IDs in legacy storage; * the migration engine safe_unserialize()s it (allowed_classes=false to block * PHP-object injection) then the json type encodes back to a JSON array column. * * @return void */ private static function register_hp_user_group(): void { TMDO_Entity_Registry::register_group( 'user', 'hp_user', array( array( 'key' => 'hp_favorited_listings', 'type' => 'json', 'label' => 'HivePress favorited listing IDs (array)', ), array( 'key' => 'hp_image', 'type' => 'text', 'label' => 'HivePress avatar attachment ID', ), ) ); } }