<?php

add_action('acf/init', 'rdg_blocks_heading_fields');

function rdg_blocks_heading_fields() {
    if (function_exists('acf_add_local_field_group')) {
        acf_add_local_field_group(array(
            'key' => 'blocks_heading_zcadwrw324542s3e',
            'title' => 'Heading',
            'fields' => array(
                array(
                    'key' => 'field_64403e536a7d0',
                    'label' => 'Title',
                    'name' => 'title',
                    'aria-label' => '',
                    'type' => 'radio',
                    'instructions' => '',
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'choices' => array(
                        'show' => 'Show',
                        'hide' => 'Hide',
                    ),
                    'default_value' => 'show',
                    'return_format' => 'value',
                    'allow_null' => 0,
                    'other_choice' => 0,
                    'layout' => 'horizontal',
                    'save_other_choice' => 0,
                ),
                array(
                    'key' => 'field_643ea22e9289b',
                    'label' => 'Separator',
                    'name' => 'separator',
                    'aria-label' => '',
                    'type' => 'group',
                    'instructions' => '',
                    'required' => 0,
                    'conditional_logic' => array(
                        array(
                            array(
                                'field' => 'field_64403e536a7d0',
                                'operator' => '==',
                                'value' => 'show',
                            ),
                        ),
                    ),
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'layout' => 'block',
                    'sub_fields' => array(
                        array(
                            'key' => 'field_643d67203ec2b',
                            'label' => 'Tag',
                            'name' => 'tag',
                            'aria-label' => '',
                            'type' => 'select',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => 0,
                            'wrapper' => array(
                                'width' => '',
                                'class' => '',
                                'id' => '',
                            ),
                            'choices' => array(
                                'h1' => 'Heading H1',
                                'h2' => 'Heading H2',
                                'h3' => 'Heading H3',
                                'span' => 'Heading Span',
                            ),
                            'default_value' => 'h1',
                            'return_format' => 'value',
                            'multiple' => 0,
                            'allow_null' => 0,
                            'ui' => 0,
                            'ajax' => 0,
                            'placeholder' => '',
                        ),
                        array(
                            'key' => 'field_643d67693ec2c',
                            'label' => 'Padding',
                            'name' => 'padding',
                            'aria-label' => '',
                            'type' => 'number',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => 0,
                            'wrapper' => array(
                                'width' => '',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => '1.5',
                            'min' => 0,
                            'max' => 20,
                            'placeholder' => '',
                            'step' => '',
                            'prepend' => '',
                            'append' => '',
                        ),
                        array(
                            'key' => 'field_643d678c3ec2d',
                            'label' => 'Text Align',
                            'name' => 'text_align',
                            'aria-label' => '',
                            'type' => 'select',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => 0,
                            'wrapper' => array(
                                'width' => '',
                                'class' => '',
                                'id' => '',
                            ),
                            'choices' => array(
                                'left' => 'Left',
                                'center' => 'Center',
                                'right' => 'Right',
                            ),
                            'default_value' => 'left',
                            'return_format' => 'value',
                            'multiple' => 0,
                            'allow_null' => 0,
                            'ui' => 0,
                            'ajax' => 0,
                            'placeholder' => '',
                        ),
                        array(
                            'key' => 'field_643e94e82da81',
                            'label' => 'Border',
                            'name' => 'border',
                            'aria-label' => '',
                            'type' => 'number',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => 0,
                            'wrapper' => array(
                                'width' => '',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => 5,
                            'min' => 0,
                            'max' => 20,
                            'placeholder' => '',
                            'step' => '',
                            'prepend' => '',
                            'append' => '',
                        ),
                        array(
                            'key' => 'field_643e95022da82',
                            'label' => 'Border Color',
                            'name' => 'border_color',
                            'aria-label' => '',
                            'type' => 'color_picker',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => 0,
                            'wrapper' => array(
                                'width' => '',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => '#0160ac',
                            'enable_opacity' => 0,
                            'return_format' => 'string',
                        ),
                    ),
                ),
                array(
                    'key' => 'field_643ea18148aa3',
                    'label' => 'Titles',
                    'name' => 'titles',
                    'aria-label' => '',
                    'type' => 'repeater',
                    'instructions' => '',
                    'required' => 0,
                    'conditional_logic' => array(
                        array(
                            array(
                                'field' => 'field_64403e536a7d0',
                                'operator' => '==',
                                'value' => 'show',
                            ),
                        ),
                    ),
                    'wrapper' => array(
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'layout' => 'block',
                    'pagination' => 0,
                    'min' => 0,
                    'max' => 0,
                    'collapsed' => '',
                    'button_label' => 'Add Row',
                    'rows_per_page' => 20,
                    'sub_fields' => array(
                        array(
                            'key' => 'field_643d66dc3ec2a',
                            'label' => 'Text',
                            'name' => 'heading_text',
                            'aria-label' => '',
                            'type' => 'wysiwyg',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => 0,
                            'wrapper' => array(
                                'width' => '',
                                'class' => 'height-150',
                                'id' => '',
                            ),
                            'default_value' => '',
                            'tabs' => 'text',
                            'media_upload' => 0,
                            'toolbar' => 'full',
                            'delay' => 0,
                            'parent_repeater' => 'field_643ea18148aa3',
                        ),
                        array(
                            'key' => 'field_643d67c53ec2e',
                            'label' => 'Font Weight',
                            'name' => 'font_weight',
                            'aria-label' => '',
                            'type' => 'select',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => 0,
                            'wrapper' => array(
                                'width' => '',
                                'class' => '',
                                'id' => '',
                            ),
                            'choices' => array(
                                100 => '100',
                                200 => '200',
                                300 => '300',
                                400 => '400',
                                500 => '500',
                                600 => '600',
                                700 => '700',
                                800 => '800',
                                900 => '900',
                            ),
                            'default_value' => 800,
                            'return_format' => 'value',
                            'multiple' => 0,
                            'allow_null' => 0,
                            'ui' => 0,
                            'ajax' => 0,
                            'placeholder' => '',
                            'parent_repeater' => 'field_643ea18148aa3',
                        ),
                        array(
                            'key' => 'field_643d67fd3ec2f',
                            'label' => 'Size',
                            'name' => 'size',
                            'aria-label' => '',
                            'type' => 'number',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => 0,
                            'wrapper' => array(
                                'width' => '',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => 2,
                            'min' => 1,
                            'max' => 20,
                            'placeholder' => '',
                            'step' => '',
                            'prepend' => '',
                            'append' => '',
                            'parent_repeater' => 'field_643ea18148aa3',
                        ),
                        array(
                            'key' => 'field_643d681b3ec30',
                            'label' => 'Size LG',
                            'name' => 'size_lg',
                            'aria-label' => '',
                            'type' => 'number',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => 0,
                            'wrapper' => array(
                                'width' => '',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => 0,
                            'min' => 0,
                            'max' => 20,
                            'placeholder' => '',
                            'step' => '',
                            'prepend' => '',
                            'append' => '',
                            'parent_repeater' => 'field_643ea18148aa3',
                        ),
                        array(
                            'key' => 'field_643d68403ec31',
                            'label' => 'Size MD',
                            'name' => 'size_md',
                            'aria-label' => '',
                            'type' => 'number',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => 0,
                            'wrapper' => array(
                                'width' => '',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => 0,
                            'min' => 0,
                            'max' => 20,
                            'placeholder' => '',
                            'step' => '',
                            'prepend' => '',
                            'append' => '',
                            'parent_repeater' => 'field_643ea18148aa3',
                        ),
                        array(
                            'key' => 'field_643d68543ec33',
                            'label' => 'Size SM',
                            'name' => 'size_sm',
                            'aria-label' => '',
                            'type' => 'number',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => 0,
                            'wrapper' => array(
                                'width' => '',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => 0,
                            'min' => 0,
                            'max' => 20,
                            'placeholder' => '',
                            'step' => '',
                            'prepend' => '',
                            'append' => '',
                            'parent_repeater' => 'field_643ea18148aa3',
                        ),
                        array(
                            'key' => 'field_643d68723ec34',
                            'label' => 'Text Color',
                            'name' => 'title_color',
                            'aria-label' => '',
                            'type' => 'color_picker',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => 0,
                            'wrapper' => array(
                                'width' => '',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => '',
                            'enable_opacity' => 0,
                            'return_format' => 'string',
                            'parent_repeater' => 'field_643ea18148aa3',
                        ),
                        array(
                            'key' => 'field_643d68923ec35',
                            'label' => 'Shadow Color',
                            'name' => 'title_color_shadow',
                            'aria-label' => '',
                            'type' => 'color_picker',
                            'instructions' => '',
                            'required' => 0,
                            'conditional_logic' => 0,
                            'wrapper' => array(
                                'width' => '',
                                'class' => '',
                                'id' => '',
                            ),
                            'default_value' => '',
                            'enable_opacity' => 0,
                            'return_format' => 'string',
                            'parent_repeater' => 'field_643ea18148aa3',
                        ),
                    ),
                ),
            ),
            'location' => array(
                array(
                    array(
                        'param' => 'block',
                        'operator' => '==',
                        'value' => 'acf/rdg-heading',
                    ),
                ),
                array(
                    array(
                        'param' => 'block',
                        'operator' => '==',
                        'value' => 'acf/rdg-pros-cons',
                    ),
                ),
                array(
                    array(
                        'param' => 'block',
                        'operator' => '==',
                        'value' => 'acf/rdg-heading-paragraph',
                    ),
                ),
            ),
            'menu_order' => 0,
            'position' => 'normal',
            'style' => 'default',
            'label_placement' => 'top',
            'instruction_placement' => 'label',
            'hide_on_screen' => '',
            'active' => true,
            'description' => '',
        ));
    }
}
