'vendor_id', 'hp_listing' => 'listing_id', 'hp_budget' => 'budget', ); /** * Returns the WordPress post_type slug handled by this interceptor. * * @return string */ protected function get_post_type(): string { return 'hp_request'; } /** * Returns the table key passed to TMDO_DB::table(). * * @return string */ protected function get_table_key(): string { return 'hpct_requests'; } /** * Builds the INSERT row for a newly created request post. * * @param int $post_id Post ID. * @param \WP_Post $post Post object. * @param string $now Formatted datetime string. * @return array{values: array, formats: array} */ protected function build_insert_data( int $post_id, \WP_Post $post, string $now ): array { return array( 'values' => array( 'post_id' => $post_id, 'user_id' => (int) $post->post_author, 'status' => $post->post_status, 'message' => $post->post_content, 'created_at' => $now, 'updated_at' => $now, ), 'formats' => array( '%d', '%d', '%s', '%s', '%s', '%s' ), ); } }