-
-
Save iamntz-gists/655288cfa3af359e2895 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if( function_exists('acf_add_local_field_group') ): | |
acf_add_local_field_group(array ( | |
'key' => 'group_55b5d9ed5f428', | |
'title' => 'All fields', | |
'fields' => array ( | |
array ( | |
'key' => 'field_55b5da06923f6', | |
'label' => 'Sample Text', | |
'name' => 'sample_text', | |
'type' => 'text', | |
'instructions' => 'Sample Instructions', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'default_value' => 'default value is set', | |
'placeholder' => 'placeholder text', | |
'prepend' => 'boo', | |
'append' => 'hoo', | |
'maxlength' => '', | |
'readonly' => 0, | |
'disabled' => 0, | |
), | |
array ( | |
'key' => 'field_55b5da30923f8', | |
'label' => 'Sample Text Area', | |
'name' => 'sample_text_area', | |
'type' => 'textarea', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'default_value' => '', | |
'placeholder' => '', | |
'maxlength' => '', | |
'rows' => '', | |
'new_lines' => 'wpautop', | |
'readonly' => 0, | |
'disabled' => 0, | |
), | |
array ( | |
'key' => 'field_55b5da3c923f9', | |
'label' => 'Sample wysiwyg', | |
'name' => 'sample_wysiwyg', | |
'type' => 'wysiwyg', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'default_value' => '', | |
'tabs' => 'all', | |
'toolbar' => 'basic', | |
'media_upload' => 0, | |
), | |
array ( | |
'key' => 'field_55b5da54923fa', | |
'label' => 'Sample wysiwyg (advanced)', | |
'name' => 'sample_wysiwyg_(advanced)', | |
'type' => 'wysiwyg', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'default_value' => '', | |
'tabs' => 'all', | |
'toolbar' => 'full', | |
'media_upload' => 1, | |
), | |
array ( | |
'key' => 'field_55b5da62923fb', | |
'label' => 'Sample Image', | |
'name' => 'sample_image', | |
'type' => 'image', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'return_format' => 'array', | |
'preview_size' => 'medium', | |
'library' => 'all', | |
'min_width' => '', | |
'min_height' => '', | |
'min_size' => '', | |
'max_width' => '', | |
'max_height' => '', | |
'max_size' => '', | |
'mime_types' => '', | |
), | |
array ( | |
'key' => 'field_55b5da79923fc', | |
'label' => 'Sample File', | |
'name' => 'sample_file', | |
'type' => 'file', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'return_format' => 'array', | |
'library' => 'all', | |
'min_size' => '', | |
'max_size' => '', | |
'mime_types' => 'zip, rar, pdf', | |
), | |
array ( | |
'key' => 'field_55b5da91923fd', | |
'label' => 'Sample Gallery', | |
'name' => 'sample_gallery', | |
'type' => 'gallery', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'min' => '', | |
'max' => '', | |
'preview_size' => 'large', | |
'library' => 'all', | |
'min_width' => '', | |
'min_height' => '', | |
'min_size' => '', | |
'max_width' => '', | |
'max_height' => '', | |
'max_size' => '', | |
'mime_types' => '', | |
), | |
array ( | |
'key' => 'field_55b5dab9923ff', | |
'label' => 'Sample Checkbox', | |
'name' => 'sample_checkbox', | |
'type' => 'checkbox', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'choices' => array ( | |
'foo' => 'Bar', | |
), | |
'default_value' => array ( | |
), | |
'layout' => 'vertical', | |
'toggle' => 0, | |
), | |
array ( | |
'key' => 'field_55b5dacf92400', | |
'label' => 'Sample message', | |
'name' => '', | |
'type' => 'message', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'message' => 'Lorem Ipsum', | |
'esc_html' => 0, | |
), | |
array ( | |
'key' => 'field_55b5dae592401', | |
'label' => 'Sample Tab Top Aligned', | |
'name' => '', | |
'type' => 'tab', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'placement' => 'top', | |
'endpoint' => 0, | |
), | |
array ( | |
'key' => 'field_55b5db1092404', | |
'label' => 'Sample Repeater', | |
'name' => 'sample_repeater', | |
'type' => 'repeater', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'min' => '', | |
'max' => '', | |
'layout' => 'table', | |
'button_label' => 'Add Row', | |
'sub_fields' => array ( | |
array ( | |
'key' => 'field_55b5dc5409c16', | |
'label' => 'Text inside repeater', | |
'name' => 'text_inside_repeater', | |
'type' => 'text', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'maxlength' => '', | |
'readonly' => 0, | |
'disabled' => 0, | |
), | |
), | |
), | |
array ( | |
'key' => 'field_55b5db0692403', | |
'label' => 'Sample Tab Top Aligned End Point', | |
'name' => '', | |
'type' => 'tab', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'placement' => 'top', | |
'endpoint' => 1, | |
), | |
array ( | |
'key' => 'field_55b5da9e923fe', | |
'label' => 'Sample Select', | |
'name' => 'sample_select', | |
'type' => 'select', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'choices' => array ( | |
'foo' => 'bar', | |
'baz' => 'bzz', | |
), | |
'default_value' => array ( | |
), | |
'allow_null' => 0, | |
'multiple' => 0, | |
'ui' => 0, | |
'ajax' => 0, | |
'placeholder' => '', | |
'disabled' => 0, | |
'readonly' => 0, | |
), | |
array ( | |
'key' => 'field_55b5daf992402', | |
'label' => 'Sample Tab Left Aligned', | |
'name' => '', | |
'type' => 'tab', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'placement' => 'left', | |
'endpoint' => 0, | |
), | |
array ( | |
'key' => 'field_55b5db2e92406', | |
'label' => 'Sample Flexible', | |
'name' => 'sample_flexible', | |
'type' => 'flexible_content', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'button_label' => 'Add Row', | |
'min' => '', | |
'max' => '', | |
'layouts' => array ( | |
array ( | |
'key' => '55b5db3abc573', | |
'name' => 'flexible_box_1', | |
'label' => 'Flexible Box 1', | |
'display' => 'block', | |
'sub_fields' => array ( | |
array ( | |
'key' => 'field_55b5db4792408', | |
'label' => 'Sampe Text inside flexible', | |
'name' => 'sampe_text_inside_flexible', | |
'type' => 'text', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'maxlength' => '', | |
'readonly' => 0, | |
'disabled' => 0, | |
), | |
array ( | |
'key' => 'field_55b5db4f92409', | |
'label' => 'Sample Select inside flexible', | |
'name' => 'sample_select_inside_flexible', | |
'type' => 'select', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'choices' => array ( | |
), | |
'default_value' => array ( | |
), | |
'allow_null' => 0, | |
'multiple' => 0, | |
'ui' => 0, | |
'ajax' => 0, | |
'placeholder' => '', | |
'disabled' => 0, | |
'readonly' => 0, | |
), | |
), | |
'min' => '', | |
'max' => '', | |
), | |
array ( | |
'key' => '55b5db3992407', | |
'name' => 'flexible_box_2', | |
'label' => 'Flexible Box 2', | |
'display' => 'row', | |
'sub_fields' => array ( | |
array ( | |
'key' => 'field_55b5db5e9240a', | |
'label' => 'Sample Textarea inside flexible', | |
'name' => 'sample_textarea_inside_flexible', | |
'type' => 'textarea', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'default_value' => '', | |
'placeholder' => '', | |
'maxlength' => '', | |
'rows' => '', | |
'new_lines' => 'wpautop', | |
'readonly' => 0, | |
'disabled' => 0, | |
), | |
), | |
'min' => '', | |
'max' => '', | |
), | |
), | |
), | |
array ( | |
'key' => 'field_55b5db7a9240b', | |
'label' => 'Conditional Checkbox', | |
'name' => 'conditional_checkbox', | |
'type' => 'checkbox', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'choices' => array ( | |
'yes' => 'yes', | |
'no' => 'no', | |
), | |
'default_value' => array ( | |
), | |
'layout' => 'vertical', | |
'toggle' => 0, | |
), | |
array ( | |
'key' => 'field_55b5dbbb9240d', | |
'label' => 'Conditional Checkbox 2 and required', | |
'name' => 'conditional_checkbox_2', | |
'type' => 'checkbox', | |
'instructions' => '', | |
'required' => 1, | |
'conditional_logic' => 0, | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'choices' => array ( | |
'yes' => 'yes', | |
'no' => 'no', | |
'maybe' => 'maybe', | |
), | |
'default_value' => array ( | |
), | |
'layout' => 'vertical', | |
'toggle' => 0, | |
), | |
array ( | |
'key' => 'field_55b5db849240c', | |
'label' => 'A Field visible when conditional', | |
'name' => 'a_field_visible_when_conditional', | |
'type' => 'text', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => array ( | |
array ( | |
array ( | |
'field' => 'field_55b5db7a9240b', | |
'operator' => '!=', | |
'value' => 'yes', | |
), | |
), | |
), | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'maxlength' => '', | |
'readonly' => 0, | |
'disabled' => 0, | |
), | |
array ( | |
'key' => 'field_55b5dbc69240f', | |
'label' => 'A Field visible with complex conditional', | |
'name' => 'a_field_visible_with_complex_conditional', | |
'type' => 'text', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => array ( | |
array ( | |
array ( | |
'field' => 'field_55b5db7a9240b', | |
'operator' => '!=', | |
'value' => 'yes', | |
), | |
array ( | |
'field' => 'field_55b5dbbb9240d', | |
'operator' => '==', | |
'value' => 'maybe', | |
), | |
), | |
array ( | |
array ( | |
'field' => 'field_55b5dbbb9240d', | |
'operator' => '==', | |
'value' => 'no', | |
), | |
), | |
), | |
'wrapper' => array ( | |
'width' => '', | |
'class' => '', | |
'id' => '', | |
), | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'maxlength' => '', | |
'readonly' => 0, | |
'disabled' => 0, | |
), | |
), | |
'location' => array ( | |
array ( | |
array ( | |
'param' => 'post_type', | |
'operator' => '==', | |
'value' => 'post', | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page_template', | |
'operator' => '==', | |
'value' => 'default', | |
), | |
array ( | |
'param' => 'page_parent', | |
'operator' => '==', | |
'value' => '100317', | |
), | |
), | |
array ( | |
array ( | |
'param' => 'widget', | |
'operator' => '==', | |
'value' => 'my-events', | |
), | |
), | |
array ( | |
array ( | |
'param' => 'options_page', | |
'operator' => '==', | |
'value' => 'my-options', | |
), | |
array ( | |
'param' => 'post_status', | |
'operator' => '==', | |
'value' => 'my-options', | |
), | |
), | |
), | |
'menu_order' => 0, | |
'position' => 'normal', | |
'style' => 'default', | |
'label_placement' => 'top', | |
'instruction_placement' => 'field', | |
'hide_on_screen' => array ( | |
0 => 'excerpt', | |
1 => 'custom_fields', | |
2 => 'comments', | |
), | |
)); | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment