Skip to content

Instantly share code, notes, and snippets.

@Sstobo
Created April 30, 2018 14:13
Show Gist options
  • Save Sstobo/56924579e96b23425d2468bab4ecfa26 to your computer and use it in GitHub Desktop.
Save Sstobo/56924579e96b23425d2468bab4ecfa26 to your computer and use it in GitHub Desktop.
Array reg
if( function_exists('acf_add_local_field_group') ):
acf_add_local_field_group(array(
'key' => 'group_5ae2508670f5b',
'title' => 'Test Field',
'fields' => array(
array(
'key' => 'field_5ae2511a7ca5a',
'label' => 'Sean Test',
'name' => 'sean_test',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
),
'location' => array(
array(
array(
'param' => 'post_type',
'operator' => '==',
'value' => 'product',
),
),
),
'menu_order' => 0,
'position' => 'normal',
'style' => 'default',
'label_placement' => 'top',
'instruction_placement' => 'label',
'hide_on_screen' => '',
'active' => 1,
'description' => '',
'is_acf_component' => 0,
));
endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment