-
-
Save iamntz-gists/8ac88cabfc5c0d6a9b40 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("register_field_group")) | |
{ | |
register_field_group(array ( | |
'id' => 'acf_product-details', | |
'title' => 'Product Details', | |
'fields' => array ( | |
array ( | |
'key' => 'field_52c7cae6293f6', | |
'label' => 'Product Info', | |
'name' => '', | |
'type' => 'tab', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52c7d4df8be8c', | |
'operator' => '!=', | |
'value' => '1', | |
), | |
), | |
'allorany' => 'all', | |
), | |
), | |
array ( | |
'key' => 'field_52c7d316b8cb3', | |
'label' => 'Title', | |
'name' => 'title', | |
'type' => 'text', | |
'instructions' => 'Leave empty to use entry title or use a dash to not display a title at all.', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_52c7d706a5ff3', | |
'label' => 'Short Description', | |
'name' => 'short_description', | |
'type' => 'wysiwyg', | |
'default_value' => '', | |
'toolbar' => 'basic', | |
'media_upload' => 'no', | |
), | |
array ( | |
'key' => 'field_52cbc93fb6828', | |
'label' => 'SKU', | |
'name' => 'sku', | |
'type' => 'text', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_52ce506f04c77', | |
'label' => 'Layout Type', | |
'name' => 'layout_type', | |
'type' => 'select', | |
'choices' => array ( | |
'popup' => 'Popup', | |
'distinct' => 'Distinct Page', | |
), | |
'default_value' => '', | |
'allow_null' => 0, | |
'multiple' => 0, | |
), | |
array ( | |
'key' => 'field_52c7dbdec895f', | |
'label' => 'Extra Info', | |
'name' => '', | |
'type' => 'tab', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52c7d4df8be8c', | |
'operator' => '!=', | |
'value' => '1', | |
), | |
array ( | |
'field' => 'field_52ce506f04c77', | |
'operator' => '==', | |
'value' => 'distinct', | |
), | |
), | |
'allorany' => 'all', | |
), | |
), | |
array ( | |
'key' => 'field_52c7d6bea5ff2', | |
'label' => 'Subtitle', | |
'name' => 'subtitle', | |
'type' => 'text', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_52c7cac5293f4', | |
'label' => 'Description', | |
'name' => 'description', | |
'type' => 'wysiwyg', | |
'default_value' => '', | |
'toolbar' => 'basic', | |
'media_upload' => 'no', | |
), | |
array ( | |
'key' => 'field_52c7d5318be8d', | |
'label' => 'Dummy Product', | |
'name' => '', | |
'type' => 'tab', | |
), | |
array ( | |
'key' => 'field_52c7d4df8be8c', | |
'label' => 'Is Dummy Product', | |
'name' => 'is_dummy', | |
'type' => 'true_false', | |
'instructions' => 'Display only an image that is used as a title or an external link.', | |
'message' => '', | |
'default_value' => 0, | |
), | |
array ( | |
'key' => 'field_52c7d5598be8e', | |
'label' => 'External URL', | |
'name' => 'external_url', | |
'type' => 'text', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52c7d4df8be8c', | |
'operator' => '==', | |
'value' => '1', | |
), | |
), | |
'allorany' => 'all', | |
), | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_52c7cce7d8a5d', | |
'label' => 'Media', | |
'name' => '', | |
'type' => 'tab', | |
), | |
array ( | |
'key' => 'field_52c7cd01d8a5e', | |
'label' => 'Has Video', | |
'name' => 'has_video', | |
'type' => 'true_false', | |
'message' => '', | |
'default_value' => 0, | |
), | |
array ( | |
'key' => 'field_52c7cdb2d8a62', | |
'label' => 'Is HTML5 Video?', | |
'name' => 'is_html5_video', | |
'type' => 'true_false', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52c7cd01d8a5e', | |
'operator' => '==', | |
'value' => '1', | |
), | |
), | |
'allorany' => 'all', | |
), | |
'message' => '', | |
'default_value' => 0, | |
), | |
array ( | |
'key' => 'field_52c7cd16d8a5f', | |
'label' => 'Video URL', | |
'name' => 'video_url', | |
'type' => 'text', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52c7cd01d8a5e', | |
'operator' => '==', | |
'value' => '1', | |
), | |
array ( | |
'field' => 'field_52c7cdb2d8a62', | |
'operator' => '!=', | |
'value' => '1', | |
), | |
), | |
'allorany' => 'all', | |
), | |
'default_value' => '', | |
'placeholder' => 'http://', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'none', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_52c7cd2ed8a60', | |
'label' => 'HTML5 Video', | |
'name' => 'html5_video', | |
'type' => 'textarea', | |
'instructions' => 'It should contain urls to mp4, webm and ogv formats. Each URL on it\'s own line. Order is not important.', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52c7cdb2d8a62', | |
'operator' => '==', | |
'value' => '1', | |
), | |
), | |
'allorany' => 'all', | |
), | |
'default_value' => 'http://video-js.zencoder.com/oceans-clip.mp4 | |
http://video-js.zencoder.com/oceans-clip.webm | |
http://video-js.zencoder.com/oceans-clip.ogv', | |
'placeholder' => '', | |
'maxlength' => '', | |
'formatting' => 'none', | |
), | |
array ( | |
'key' => 'field_52c7cacd293f5', | |
'label' => 'Image', | |
'name' => 'image', | |
'type' => 'image', | |
'instructions' => 'Images should have around 800x800px or more. | |
If HTML5 video is selected, then this image will be used as a movie poster.', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52c7cd01d8a5e', | |
'operator' => '!=', | |
'value' => '1', | |
), | |
array ( | |
'field' => 'field_52c7cdb2d8a62', | |
'operator' => '==', | |
'value' => '1', | |
), | |
), | |
'allorany' => 'any', | |
), | |
'save_format' => 'id', | |
'preview_size' => 'thumbnail', | |
'library' => 'all', | |
), | |
array ( | |
'key' => 'field_52cbc8c42f7ba', | |
'label' => 'Auto Generate Thumbnail?', | |
'name' => 'auto_generate_thumbnail', | |
'type' => 'true_false', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52c7cd01d8a5e', | |
'operator' => '!=', | |
'value' => '1', | |
), | |
), | |
'allorany' => 'all', | |
), | |
'message' => '', | |
'default_value' => 1, | |
), | |
array ( | |
'key' => 'field_52cbc8ad2f7b9', | |
'label' => 'Thumb', | |
'name' => 'thumb', | |
'type' => 'image', | |
'instructions' => 'Image should have 440x400 (or 1.1:1 aspect ratio)', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52cbc8c42f7ba', | |
'operator' => '!=', | |
'value' => '1', | |
), | |
), | |
'allorany' => 'all', | |
), | |
'save_format' => 'id', | |
'preview_size' => 'thumbnail', | |
'library' => 'all', | |
), | |
array ( | |
'key' => 'field_52cbcf0c6b28a', | |
'label' => 'Has Gallery?', | |
'name' => 'has_gallery', | |
'type' => 'true_false', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52ce506f04c77', | |
'operator' => '==', | |
'value' => 'distinct', | |
), | |
), | |
'allorany' => 'all', | |
), | |
'message' => '', | |
'default_value' => 0, | |
), | |
array ( | |
'key' => 'field_52c7da80281ae', | |
'label' => 'Gallery', | |
'name' => 'gallery', | |
'type' => 'text', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52cbcf0c6b28a', | |
'operator' => '==', | |
'value' => '1', | |
), | |
), | |
'allorany' => 'all', | |
), | |
'default_value' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
), | |
array ( | |
'key' => 'field_52c7cafa293f7', | |
'label' => 'Social Sharing Icons', | |
'name' => '', | |
'type' => 'tab', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52c7d4df8be8c', | |
'operator' => '!=', | |
'value' => '1', | |
), | |
array ( | |
'field' => 'field_52ce506f04c77', | |
'operator' => '!=', | |
'value' => 'distinct', | |
), | |
), | |
'allorany' => 'all', | |
), | |
), | |
array ( | |
'key' => 'field_52c7cb06293f8', | |
'label' => 'Share on Pinterest?', | |
'name' => 'share_on_pinterest', | |
'type' => 'true_false', | |
'message' => '', | |
'default_value' => 1, | |
), | |
array ( | |
'key' => 'field_52c7cb1e78e1d', | |
'label' => 'FB Share', | |
'name' => 'fb_share', | |
'type' => 'true_false', | |
'message' => '', | |
'default_value' => 1, | |
), | |
array ( | |
'key' => 'field_52c7cb2878e1e', | |
'label' => 'FB Like', | |
'name' => 'fb_like', | |
'type' => 'true_false', | |
'message' => '', | |
'default_value' => 1, | |
), | |
array ( | |
'key' => 'field_52c7cc4b7abda', | |
'label' => 'Shop Online', | |
'name' => '', | |
'type' => 'tab', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52c7d4df8be8c', | |
'operator' => '!=', | |
'value' => '1', | |
), | |
array ( | |
'field' => 'field_52ce506f04c77', | |
'operator' => '!=', | |
'value' => 'distinct', | |
), | |
), | |
'allorany' => 'all', | |
), | |
), | |
array ( | |
'key' => 'field_52c7cba678e25', | |
'label' => 'Show Shop Online', | |
'name' => 'show_shop_online', | |
'type' => 'true_false', | |
'message' => '', | |
'default_value' => 1, | |
), | |
array ( | |
'key' => 'field_52c7cb3178e1f', | |
'label' => 'Default Shop online URL?', | |
'name' => 'default_shop_online_url', | |
'type' => 'true_false', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52c7cba678e25', | |
'operator' => '==', | |
'value' => '1', | |
), | |
), | |
'allorany' => 'all', | |
), | |
'message' => '', | |
'default_value' => 1, | |
), | |
array ( | |
'key' => 'field_52c7cb4878e20', | |
'label' => 'Shop Online URL', | |
'name' => 'shop_online_url', | |
'type' => 'text', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52c7cb3178e1f', | |
'operator' => '!=', | |
'value' => '1', | |
), | |
array ( | |
'field' => 'field_52c7cba678e25', | |
'operator' => '==', | |
'value' => '1', | |
), | |
), | |
'allorany' => 'all', | |
), | |
'default_value' => '', | |
'placeholder' => 'http://', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_52c7cc5a7abdb', | |
'label' => 'Store Locator', | |
'name' => '', | |
'type' => 'tab', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52c7d4df8be8c', | |
'operator' => '!=', | |
'value' => '1', | |
), | |
array ( | |
'field' => 'field_52ce506f04c77', | |
'operator' => '!=', | |
'value' => 'distinct', | |
), | |
), | |
'allorany' => 'all', | |
), | |
), | |
array ( | |
'key' => 'field_52c7cb6678e21', | |
'label' => 'Show Store Locator', | |
'name' => 'show_store_locator', | |
'type' => 'true_false', | |
'message' => '', | |
'default_value' => 1, | |
), | |
array ( | |
'key' => 'field_52c7cb7a78e22', | |
'label' => 'Default Store Locator URL', | |
'name' => 'default_store_locator_url', | |
'type' => 'true_false', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52c7cb6678e21', | |
'operator' => '==', | |
'value' => '1', | |
), | |
), | |
'allorany' => 'all', | |
), | |
'message' => '', | |
'default_value' => 1, | |
), | |
array ( | |
'key' => 'field_52c7cb8c78e23', | |
'label' => 'Store Locator URL', | |
'name' => 'store_locator_url', | |
'type' => 'text', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52c7cb6678e21', | |
'operator' => '==', | |
'value' => '1', | |
), | |
array ( | |
'field' => 'field_52c7cb7a78e22', | |
'operator' => '!=', | |
'value' => '1', | |
), | |
), | |
'allorany' => 'all', | |
), | |
'default_value' => '', | |
'placeholder' => 'http://', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_52ce54b282f10', | |
'label' => 'Archive Settings', | |
'name' => '', | |
'type' => 'tab', | |
), | |
array ( | |
'key' => 'field_52ce54c382f11', | |
'label' => 'Fields to Show', | |
'name' => 'fields_to_show', | |
'type' => 'checkbox', | |
'choices' => array ( | |
'show_title' => 'Title', | |
'show_subtitle' => 'Subtitle', | |
), | |
'default_value' => '', | |
'layout' => 'horizontal', | |
), | |
array ( | |
'key' => 'field_52ce550382f12', | |
'label' => 'Overlay Color', | |
'name' => 'overlay_color', | |
'type' => 'color_picker', | |
'conditional_logic' => array ( | |
'status' => 1, | |
'rules' => array ( | |
array ( | |
'field' => 'field_52ce54c382f11', | |
'operator' => '==', | |
'value' => 'show_title', | |
), | |
array ( | |
'field' => 'field_52ce54c382f11', | |
'operator' => '==', | |
'value' => 'show_subtitle', | |
), | |
), | |
'allorany' => 'any', | |
), | |
'default_value' => '#8a8a8a', | |
), | |
array ( | |
'key' => 'field_52c7d3c4688a0', | |
'label' => 'Help', | |
'name' => '', | |
'type' => 'tab', | |
), | |
array ( | |
'key' => 'field_52c7d350b8cb4', | |
'label' => 'Some Instructions', | |
'name' => '', | |
'type' => 'message', | |
'message' => 'Although is possible to not set a title for a product, it\'s not recommended to do so because this will make management a pain.', | |
), | |
), | |
'location' => array ( | |
array ( | |
array ( | |
'param' => 'post_type', | |
'operator' => '==', | |
'value' => 'post', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
), | |
'options' => array ( | |
'position' => 'acf_after_title', | |
'layout' => 'default', | |
'hide_on_screen' => array ( | |
), | |
), | |
'menu_order' => 0, | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment