$liste_services) { $fieldset = array( 'saisie' => 'fieldset', 'options' => array( 'nom' => $type, 'label' => $type, 'pliable' => 'oui', 'plie' => 'oui' ) ); foreach($liste_services as $service) { $champ = array( 'saisie' => 'checkbox', 'options' => array( 'nom' => $service, 'datas' => array( $service => $service ) ) ); $fieldset['saisies'][] = $champ; } switch ($type) { case 'ads': $fieldset['saisies'][] = array( 'saisie' => 'input', 'options' => array( 'nom' => 'facebookpixelkey', 'label' => 'Facebook Pixel ID', 'explication' => 'Enter your FacebookPixel ID', 'placeholder' => 'YOUR_ID', 'afficher_si' => '@facebookpixel@ == "facebookpixel"' ) ); break; case 'analytic': $fieldset['saisies'][] = array( 'saisie' => 'input', 'options' => array( 'nom' => 'gtagkey', 'label' => 'Google global site tag (gtag.js)', 'explication' => 'Replace GA_MEASUREMENT_ID with the ID of the Google Analytics property to which you want to send data', 'placeholder' => 'GA_MEASUREMENT_ID', 'afficher_si' => '@gtag@ == "gtag"' ) ); break; case 'api': $fieldset['saisies'][] = array( 'saisie' => 'input', 'options' => array( 'nom' => 'gmapkey', 'label' => 'Google Map API Key', 'explication' => 'Enter your Google Map API Key', 'placeholder' => 'API KEY', 'afficher_si' => '@googlemaps@ == "googlemaps"' ) ); break; } $saisies[] = $fieldset; } $saisies[] = array( 'saisie' => 'hidden', 'options' => array( 'nom' => '_meta_casier', 'defaut' => 'tarteaucitron/services' ) ); return $saisies; }