<?php
if (function_exists('acf_add_local_field_group')):
    acf_add_local_field_group(array(
        'key' => 'group_archive_links',
        'title' => 'Liens des pages archives',
        'fields' => array(
            array(
                'key' => 'field_contact_page',
                'label' => 'Page de contact',
                'name' => 'contact_page',
                'type' => 'page_link',
                'required' => 1,
                'allow_null' => 0,
                'multiple' => 0
            ),
            array(
                'key' => 'field_agenda_archive_link',
                'label' => 'Lien page archive Agenda',
                'name' => 'agenda_archive_link',
                'type' => 'page_link',
                'instructions' => 'Sélectionnez la page d\'archive pour l\'agenda',
                'required' => 1,
                'post_type' => array('page'),
                'allow_null' => 0,
                'multiple' => 0
            ),
            array(
                'key' => 'field_actualite_archive_link',
                'label' => 'Lien page archive Actualités',
                'name' => 'actualite_archive_link',
                'type' => 'page_link',
                'instructions' => 'Sélectionnez la page d\'archive pour les actualités',
                'required' => 1,
                'post_type' => array('page'),
                'allow_null' => 0,
                'multiple' => 0
            ),
            array(
                'key' => 'field_galerie_archive_link',
                'label' => 'Lien page archive Galerie',
                'name' => 'galerie_archive_link',
                'type' => 'page_link',
                'instructions' => 'Sélectionnez la page d\'archive pour la galerie',
                'required' => 1,
                'post_type' => array('page'),
                'allow_null' => 0,
                'multiple' => 0
            ),
            array(
                'key' => 'field_offre_emploi_archive_link',
                'label' => 'Lien page archive Offres d\'emploi',
                'name' => 'offre_emploi_archive_link',
                'type' => 'page_link',
                'instructions' => 'Sélectionnez la page d\'archive pour les offres d\'emploi',
                'required' => 1,
                'post_type' => array('page'),
                'allow_null' => 0,
                'multiple' => 0
            ),
            array(
                'key' => 'field_ornex_infos_archive',
                'label' => 'Lien page archive Ornex Infox',
                'name' => 'ornex_infos_archive',
                'type' => 'page_link',
                'instructions' => 'Sélectionnez la page d\'archive pour les publications Ornex Infox',
                'required' => 1,
                'post_type' => array('page'),
                'allow_null' => 0,
                'multiple' => 0
            ),
        ),
        'location' => array(
            array(
                array(
                    'param' => 'options_page',
                    'operator' => '==',
                    'value' => 'theme-options-pages',
                ),
            ),
        ),
        'menu_order' => 2,
        'position' => 'normal',
        'style' => 'default',
        'label_placement' => 'top',
        'instruction_placement' => 'label',
        'hide_on_screen' => ''
    ));
endif;
