<?php

if (! defined('ABSPATH')) {
    exit;
} require_once __DIR__ . '/class-puffergo-base-cpt.php';
class PufferGo_Testimonial_CPT extends PufferGo_Base_CPT
{
    public const CPT_SLUG = 'puffergo_testimonial';

    public const TAX_SLUG = 'puffergo_testimonial_industry';

    protected function get_module_key(): string
    {
        return 'testimonial';
    }

    protected function get_config(): array
    {
        return ['module_key' => 'testimonial', 'cpt_slug' => self::CPT_SLUG, 'archive_slug_option' => 'puffergo_testimonial_slug', 'archive_slug_default' => 'testimonials', 'archive_slug_label' => __('Testimonials archive base', 'puffergo'), 'menu_icon' => 'dashicons-format-quote', 'menu_position' => 7, 'supports' => ['title', 'thumbnail'], 'has_archive' => true, 'singular' => __('Testimonial', 'puffergo'), 'plural' => __('Testimonials', 'puffergo'), 'menu_label' => __('Testimonials', 'puffergo'), 'tax_slug' => self::TAX_SLUG, 'tax_singular' => __('Industry', 'puffergo'), 'tax_plural' => __('Industries', 'puffergo'), 'tax_archive_slug' => 'testimonial-industry', 'tag_slug' => null, ];
    }

    protected function get_meta_fields(): array
    {
        return ['_puffergo_testimony_client_name' => ['type' => 'string', 'description' => __('Client Name', 'puffergo'), 'single' => true, 'show_in_rest' => true, 'sanitize_callback' => 'sanitize_text_field', 'auth_callback' => [$this, 'auth_callback'], ], '_puffergo_testimony_client_title' => ['type' => 'string', 'description' => __('Job Title', 'puffergo'), 'single' => true, 'show_in_rest' => true, 'sanitize_callback' => 'sanitize_text_field', 'auth_callback' => [$this, 'auth_callback'], ], '_puffergo_testimony_client_company' => ['type' => 'string', 'description' => __('Company', 'puffergo'), 'single' => true, 'show_in_rest' => true, 'sanitize_callback' => 'sanitize_text_field', 'auth_callback' => [$this, 'auth_callback'], ], '_puffergo_testimony_client_country' => ['type' => 'string', 'description' => __('Client Country', 'puffergo'), 'single' => true, 'show_in_rest' => true, 'sanitize_callback' => 'sanitize_text_field', 'auth_callback' => [$this, 'auth_callback'], ], '_puffergo_testimony_quote' => ['type' => 'string', 'description' => __('Quote', 'puffergo'), 'single' => true, 'show_in_rest' => true, 'sanitize_callback' => 'sanitize_textarea_field', 'auth_callback' => [$this, 'auth_callback'], 'translate' => true, ], '_puffergo_testimony_photo' => ['type' => 'integer', 'description' => __('Photo', 'puffergo'), 'single' => true, 'show_in_rest' => true, 'sanitize_callback' => 'absint', 'auth_callback' => [$this, 'auth_callback'], ], '_puffergo_testimony_rating' => ['type' => 'integer', 'description' => __('Rating', 'puffergo'), 'single' => true, 'show_in_rest' => true, 'sanitize_callback' => 'absint', 'auth_callback' => [$this, 'auth_callback'], ], ];
    }
}
