Advertisement
Guest User

Untitled

a guest
Jul 31st, 2015
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.27 KB | None | 0 0
  1. if( function_exists('acf_add_local_field_group') ):
  2.  
  3. acf_add_local_field_group(array (
  4. 'key' => 'group_55ba5afe33377',
  5. 'title' => 'upload',
  6. 'fields' => array (
  7. array (
  8. 'key' => 'field_55ba753cf56ab',
  9. 'label' => 'Upload File',
  10. 'name' => '',
  11. 'type' => 'tab',
  12. 'instructions' => '',
  13. 'required' => 0,
  14. 'conditional_logic' => 0,
  15. 'wrapper' => array (
  16. 'width' => '',
  17. 'class' => '',
  18. 'id' => '',
  19. ),
  20. 'placement' => 'left',
  21. 'endpoint' => 1,
  22. ),
  23. array (
  24. 'key' => 'field_55ba5b162db22',
  25. 'label' => 'Modal Name',
  26. 'name' => 'file_name',
  27. 'type' => 'text',
  28. 'instructions' => '',
  29. 'required' => 0,
  30. 'conditional_logic' => 0,
  31. 'wrapper' => array (
  32. 'width' => 100,
  33. 'class' => '',
  34. 'id' => '',
  35. ),
  36. 'default_value' => '',
  37. 'placeholder' => '',
  38. 'prepend' => '',
  39. 'append' => '',
  40. 'maxlength' => '',
  41. 'readonly' => 0,
  42. 'disabled' => 0,
  43. ),
  44. array (
  45. 'key' => 'field_55ba5c632db24',
  46. 'label' => 'Preview Image',
  47. 'name' => 'preview_image_of_model',
  48. 'type' => 'text',
  49. 'instructions' => 'A 600x600px preview image of the model',
  50. 'required' => 0,
  51. 'conditional_logic' => 0,
  52. 'wrapper' => array (
  53. 'width' => '',
  54. 'class' => '',
  55. 'id' => '',
  56. ),
  57. 'default_value' => '',
  58. 'placeholder' => '',
  59. 'prepend' => '',
  60. 'append' => '',
  61. 'maxlength' => '',
  62. 'readonly' => 0,
  63. 'disabled' => 0,
  64. ),
  65. array (
  66. 'key' => 'field_55ba5b3f2db23',
  67. 'label' => 'Pepakura File',
  68. 'name' => 'pepakura_file',
  69. 'type' => 'file',
  70. 'instructions' => 'Please attach the correct PDO',
  71. 'required' => 1,
  72. 'conditional_logic' => 0,
  73. 'wrapper' => array (
  74. 'width' => 100,
  75. 'class' => '',
  76. 'id' => '',
  77. ),
  78. 'return_format' => 'array',
  79. 'library' => 'uploadedTo',
  80. 'min_size' => 10,
  81. 'max_size' => 10,
  82. 'mime_types' => 'pdo, .pdo',
  83. ),
  84. array (
  85. 'key' => 'field_55ba74e7d3130',
  86. 'label' => 'Meta Data',
  87. 'name' => '',
  88. 'type' => 'tab',
  89. 'instructions' => '',
  90. 'required' => 0,
  91. 'conditional_logic' => 0,
  92. 'wrapper' => array (
  93. 'width' => '',
  94. 'class' => '',
  95. 'id' => '',
  96. ),
  97. 'placement' => 'left',
  98. 'endpoint' => 1,
  99. ),
  100. array (
  101. 'key' => 'field_55ba75e6dbcd0',
  102. 'label' => 'Category',
  103. 'name' => 'file_category',
  104. 'type' => 'taxonomy',
  105. 'instructions' => 'Select the appropriate category. If it isn\'t listed, click the + icon and add the appropriate category. ',
  106. 'required' => 1,
  107. 'conditional_logic' => 0,
  108. 'wrapper' => array (
  109. 'width' => '',
  110. 'class' => '',
  111. 'id' => '',
  112. ),
  113. 'taxonomy' => 'category',
  114. 'field_type' => 'select',
  115. 'allow_null' => 0,
  116. 'add_term' => 1,
  117. 'save_terms' => 1,
  118. 'load_terms' => 0,
  119. 'return_format' => 'id',
  120. 'multiple' => 0,
  121. ),
  122. array (
  123. 'key' => 'field_55ba76d7b136e',
  124. 'label' => 'Body Part',
  125. 'name' => 'file_body_part',
  126. 'type' => 'taxonomy',
  127. 'instructions' => 'Where is the prop used?',
  128. 'required' => 1,
  129. 'conditional_logic' => 0,
  130. 'wrapper' => array (
  131. 'width' => '',
  132. 'class' => '',
  133. 'id' => '',
  134. ),
  135. 'taxonomy' => 'body_part',
  136. 'field_type' => 'radio',
  137. 'allow_null' => 0,
  138. 'add_term' => 1,
  139. 'save_terms' => 1,
  140. 'load_terms' => 1,
  141. 'return_format' => 'id',
  142. 'multiple' => 0,
  143. ),
  144. array (
  145. 'key' => 'field_55ba7c17d39ae',
  146. 'label' => 'Assembly Difficulty',
  147. 'name' => 'assembly_difficulty',
  148. 'type' => 'radio',
  149. 'instructions' => 'How difficult would it be to assemble',
  150. 'required' => 1,
  151. 'conditional_logic' => 0,
  152. 'wrapper' => array (
  153. 'width' => 100,
  154. 'class' => '',
  155. 'id' => '',
  156. ),
  157. 'choices' => array (
  158. 'Novice' => 'Novice',
  159. 'Advanced' => 'Advanced',
  160. 'Expert' => 'Expert',
  161. 'Professional' => 'Professional',
  162. ),
  163. 'other_choice' => 0,
  164. 'save_other_choice' => 0,
  165. 'default_value' => 'Novice',
  166. 'layout' => 'vertical',
  167. ),
  168. array (
  169. 'key' => 'field_55ba810a15675',
  170. 'label' => 'Been Unfolded',
  171. 'name' => 'unfolded',
  172. 'type' => 'radio',
  173. 'instructions' => 'Has the modal been unfolded?',
  174. 'required' => 1,
  175. 'conditional_logic' => 0,
  176. 'wrapper' => array (
  177. 'width' => '',
  178. 'class' => '',
  179. 'id' => '',
  180. ),
  181. 'choices' => array (
  182. 'yes' => 'Yes',
  183. 'no' => 'No',
  184. ),
  185. 'other_choice' => 0,
  186. 'save_other_choice' => 0,
  187. 'default_value' => '',
  188. 'layout' => 'horizontal',
  189. ),
  190. array (
  191. 'key' => 'field_55ba814c15676',
  192. 'label' => 'Edit Protected',
  193. 'name' => 'edit_protected',
  194. 'type' => 'radio',
  195. 'instructions' => 'Is it password protected?',
  196. 'required' => 1,
  197. 'conditional_logic' => 0,
  198. 'wrapper' => array (
  199. 'width' => '',
  200. 'class' => '',
  201. 'id' => '',
  202. ),
  203. 'choices' => array (
  204. 'yes' => 'Yes',
  205. 'no' => 'No',
  206. ),
  207. 'other_choice' => 0,
  208. 'save_other_choice' => 0,
  209. 'default_value' => '',
  210. 'layout' => 'horizontal',
  211. ),
  212. ),
  213. 'location' => array (
  214. array (
  215. array (
  216. 'param' => 'post_type',
  217. 'operator' => '==',
  218. 'value' => 'file',
  219. ),
  220. ),
  221. ),
  222. 'menu_order' => 0,
  223. 'position' => 'normal',
  224. 'style' => 'default',
  225. 'label_placement' => 'top',
  226. 'instruction_placement' => 'label',
  227. 'hide_on_screen' => '',
  228. ));
  229.  
  230. endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement