1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
if(function_exists("register_field_group"))
{
register_field_group(array (
'id' => 'acf_acf_test_inject_menu',
'title' => 'ACF_test_inject_menu',
'fields' => array (
array (
'key' => 'field_53f46783186a4',
'label' => 'Les champs d\'information',
'name' => 'champs_info',
'type' => 'repeater',
'sub_fields' => array (
array (
'key' => 'field_53f46874186a5',
'label' => 'Nom du champ',
'name' => 'nom_du_champs',
'type' => 'text',
'column_width' => '',
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'formatting' => 'html',
'maxlength' => '',
),
array (
'key' => 'field_53f468c5186a6',
'label' => 'Valeur du champ',
'name' => 'valeur_du_champ',
'type' => 'text',
'column_width' => '',
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'formatting' => 'html',
'maxlength' => '',
),
),
'row_min' => 0,
'row_limit' => '',
'layout' => 'table',
'button_label' => 'Ajouter un champ',
),
array (
'key' => 'field_53f468e3186a7',
'label' => 'Liste des projets',
'name' => 'liste_des_projets',
'type' => 'select',
'choices' => array (
'rouge' => 'Rouge',
'bleu' => 'Bleu',
'vert' => 'Vert',
'pistache' => 'Pistache',
),
'default_value' => '',
'allow_null' => 0,
'multiple' => 0,
),
),
'location' => array (
array (
array (
'param' => 'post_type',
'operator' => '==',
'value' => 'my_post_type',
'order_no' => 0,
'group_no' => 0,
),
),
),
'options' => array (
'position' => 'normal',
'layout' => 'no_box',
'hide_on_screen' => array (
),
),
'menu_order' => 0,
));
} |
Partager