<?php
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
// phpcs:disable WordPress.WP.I18n.MissingTranslatorsComment

// Don't load directly
if (!defined('ABSPATH')) { exit; }

// Dynamically load ACF field groups, allowing for translation and other dynamic settings
if (function_exists('acf_add_local_field_group')) {
	include_once(ABSPATH . WPINC . '/class-wp-locale.php');
	$wp_locale = new WP_Locale;
	
	// Define field group
	$field_group = array(
		'key' => 'group_668426e1a5d53',
		'title' => 'ICS Calendar Pro ' . __('Event Illustrations Library', 'ics-calendar-pro'),
		'fields' => array(
			array(
				'key' => 'field_668426e11d9e9',
				'label' => '',
				'name' => 'r34icspro_event_illustrations',
				'aria-label' => '',
				'type' => 'repeater',

				'instructions' => __('Optimum image size is 800x500 pixels. For each image, enter a comma-delimited list of keywords/phrases. If a keyword is present in the title or description of an event, the corresponding image will be displayed with the event details.', 'ics-calendar-pro') . '<br /><br />' . sprintf(__('%1$sNote:%2$s Illustrations managed on this page will only be displayed in calendars that have the %3$sEvent Illustrations%4$s option set to display local images.', 'ics-calendar-pro'), '<strong>', '</strong>', '<strong>', '</strong>'),
				'required' => 0,
				'conditional_logic' => 0,
				'wrapper' => array(
					'width' => '',
					'class' => '',
					'id' => '',
				),
				'layout' => 'block',
				'pagination' => 0,
				'min' => 0,
				'max' => 0,
				'collapsed' => '',
				'button_label' => __('Add an Illustration', 'ics-calendar-pro'),
				'rows_per_page' => 20,
				'sub_fields' => array(
					array(
						'key' => 'field_6684270a1d9ea',
						'label' => __('Image', 'ics-calendar-pro'),
						'name' => 'r34icspro_event_illustrations_image',
						'aria-label' => '',
						'type' => 'image',
						'instructions' => '',
						'required' => 0,
						'conditional_logic' => 0,
						'wrapper' => array(
							'width' => '25',
							'class' => '',
							'id' => '',
						),
						'return_format' => 'url',
						'library' => 'all',
						'min_width' => '',
						'min_height' => '',
						'min_size' => '',
						'max_width' => '',
						'max_height' => '',
						'max_size' => '',
						'mime_types' => '',
						'preview_size' => 'medium',
						'parent_repeater' => 'field_668426e11d9e9',
					),
					array(
						'key' => 'field_668427311d9eb',
						'label' => __('Keywords', 'ics-calendar-pro'),
						'name' => 'r34icspro_event_illustrations_keywords',
						'aria-label' => '',
						'type' => 'text',
						'instructions' => '',
						'required' => 0,
						'conditional_logic' => 0,
						'wrapper' => array(
							'width' => '75',
							'class' => '',
							'id' => '',
						),
						'default_value' => '',
						'maxlength' => '',
						'placeholder' => '',
						'prepend' => '',
						'append' => '',
						'parent_repeater' => 'field_668426e11d9e9',
					),
				),
			),
		),
		'location' => array(
			array(
				array(
					'param' => 'options_page',
					'operator' => '==',
					'value' => 'r34icspro-illustrations-library',
				),
			),
		),
		'menu_order' => 0,
		'position' => 'normal',
		'style' => 'seamless',
		'label_placement' => 'top',
		'instruction_placement' => 'label',
		'hide_on_screen' => '',
		'active' => true,
		'description' => '',
		'show_in_rest' => 0,
		'display_title' => '',
	);
		
	// Add field group
	acf_add_local_field_group($field_group);
	
}
