<?php
/**
 * Metabox definition for the 'testimonial' post type.
 *
 * @package Sifency
 */

if ( ! defined( 'ABSPATH' ) ) {
	die;
}

// This file returns an array of metabox definitions.
return [
	'testimonial_options' => [
		'title'     => esc_html__( 'Testimonial Details', 'sifency-addons' ),
		'post_type' => 'testimonial',
		'context'   => 'normal',
		'priority'  => 'high',
		'class'     => 'sifency-metabox',
		'fields'    => [
			[
				'id'       => 'testimonial_review_content',
				'type'     => 'wp_editor',
				'title'    => esc_html__( 'Testimonial Text', 'sifency-addons' ),
				'settings' => [
					'textarea_rows' => 5,
					'media_buttons' => false,
				],
			],
			[
				'id'    => 'testimonial_position',
				'type'  => 'text',
				'title' => esc_html__( 'Job Position', 'sifency-addons' ),
			],
			[
				'id'    => 'testimonial_company',
				'type'  => 'text',
				'title' => esc_html__( 'Company', 'sifency-addons' ),
			],
			[
				'id'    => 'testimonial_user_img',
				'type'  => 'media',
				'title' => esc_html__( 'Client Photo', 'sifency-addons' ),
			],
			[
				'id'    => 'testimonial_address',
				'type'  => 'text',
				'title' => esc_html__( 'Location', 'sifency-addons' ),
			],
			[
				'id'    => 'testimonial_review_image',
				'type'  => 'media',
				'title' => esc_html__( 'Additional Image', 'sifency-addons' ),
				'desc'  => esc_html__( 'Optional: an image to accompany the testimonial, like a product photo.', 'sifency-addons' ),
			],
			[
				'id'    => 'testimonial_link',
				'type'  => 'url', // Using the 'url' type for better validation.
				'title' => esc_html__( 'Related Link', 'sifency-addons' ),
				'desc'  => esc_html__( 'Optional: A link to the client\'s website or project.', 'sifency-addons' ),
			],
		],
	],
];