Guest User

Untitled

a guest
Feb 18th, 2020
70
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // teasers
  2.  
  3. $meta_boxes[] = array(
  4. 'id' => 'teaser_title',
  5. 'title' => 'Teaser',
  6. 'pages' => array( 'page'),
  7. 'show' => array(
  8. 'relation' => 'OR',
  9. 'template' => array( 'index.php', 'tmpl.whats-on.php', 'tmpl.visit.php', 'tmpl.landing.php', 'tmpl.shop.php','tmpl.about.php', 'default', 'archive-product.php'),
  10.  
  11. ),
  12.  
  13. 'fields' => array(
  14.  
  15. array(
  16. 'id' => 'teaser_tiles',
  17. 'type' => 'group',
  18. 'clone' => true,
  19. 'max_clone' => 10,
  20. 'sort_clone' => true,
  21. 'collapsible' => true,
  22. 'group_title' => 'Teaser',
  23. 'fields' => array(
  24.  
  25. array(
  26. 'name' => __( 'Type', 'rwmb' ),
  27. 'id' => "{$prefix}teaser_type",
  28. 'type' => 'select',
  29. 'clone_default' => true,
  30. 'options' => array(
  31. 'half' => __( 'Half', 'rwmb' ),
  32. 'small-image' => __( 'Small image', 'rwmb' ),
  33. 'center-image' => __( 'Center image', 'rwmb' ),
  34. 'plain' => __( 'Plain', 'rwmb' ),
  35.  
  36. ),
  37. 'multiple' => false,
  38. 'placeholder' => __( 'Select', 'rwmb' ),
  39. 'std' => 'image',
  40.  
  41. ),
  42. array(
  43. 'name' => __( 'Colour', 'rwmb' ),
  44. 'id' => "{$prefix}teaser_colour",
  45. 'type' => 'select',
  46. 'clone_default' => true,
  47. 'options' => array(
  48. 'red' => __( 'Red', 'rwmb' ),
  49. 'dark-blue' => __( 'Purple', 'rwmb' ),
  50. 'light-blue' => __( 'Light Blue', 'rwmb' ),
  51. 'brown' => __( 'Brown', 'rwmb' ),
  52. 'white' => __( 'White', 'rwmb' ),
  53.  
  54. ),
  55. 'multiple' => false,
  56. 'placeholder' => __( 'Select', 'rwmb' ),
  57. 'std' => 'image',
  58.  
  59. ),
  60. // Half
  61.  
  62. array(
  63. 'name' => __( 'Half Image Align', 'rwmb' ),
  64. 'id' => "{$prefix}teaser_half_align",
  65. 'type' => 'select',
  66. 'clone_default' => false,
  67. 'options' => array(
  68. 'half-left' => __( 'Left', 'rwmb' ),
  69. 'half-right' => __( 'Right', 'rwmb' ),
  70.  
  71. ),
  72. 'multiple' => false,
  73. 'placeholder' => __( 'Select', 'rwmb' ),
  74. 'std' => 'image',
  75. 'visible' => array( 'meta_teaser_type', 'half' )
  76.  
  77. ),
  78. // Small Image
  79.  
  80. array(
  81. 'name' => __( 'Small Image Align', 'rwmb' ),
  82. 'id' => "{$prefix}teaser_small_image_align",
  83. 'type' => 'select',
  84. 'clone_default' => false,
  85. 'options' => array(
  86. 'small-top-left' => __( 'Top Left', 'rwmb' ),
  87. 'small-top-right' => __( 'Top Right', 'rwmb' ),
  88. 'small-bottom-left' => __( 'Bottom Left', 'rwmb' ),
  89. 'small-bottom-right' => __( 'Bottom Right', 'rwmb' ),
  90. ),
  91. 'multiple' => false,
  92. 'placeholder' => __( 'Select', 'rwmb' ),
  93. 'std' => 'image',
  94. 'visible' => array( 'meta_teaser_type', 'small-image' )
  95.  
  96. ),
  97.  
  98. // Plain
  99.  
  100. array(
  101. 'name' => __( 'Big Heading Align', 'rwmb' ),
  102. 'id' => "{$prefix}teaser_plain_heading_align",
  103. 'type' => 'select',
  104. 'clone_default' => false,
  105. 'options' => array(
  106. 'plain-top-left' => __( 'Top Left', 'rwmb' ),
  107. 'plain-top-right' => __( 'Top Right', 'rwmb' ),
  108. 'plain-bottom-left' => __( 'Bottom Left', 'rwmb' ),
  109. 'plain-bottom-right' => __( 'Bottom Right', 'rwmb' ),
  110. ),
  111. 'multiple' => false,
  112. 'placeholder' => __( 'Select', 'rwmb' ),
  113. 'std' => 'image',
  114. 'visible' => array( 'meta_teaser_type', 'plain' )
  115.  
  116. ),
  117.  
  118. // Content
  119.  
  120. array(
  121. 'name' => __( 'Big Heading', 'rwmb' ),
  122. 'id' => "{$prefix}teaser_big_heading",
  123. 'type' => 'textarea',
  124. 'cols' => 10,
  125. 'rows' => 2,
  126.  
  127. ),
  128. array(
  129. 'name' => __( 'Copy', 'rwmb' ),
  130. 'id' => "{$prefix}teaser_copy",
  131. 'type' => 'textarea',
  132. 'cols' => 10,
  133. 'rows' => 2,
  134.  
  135. ),
  136. array(
  137. 'name' => __( 'No text indent?', 'rwmb' ),
  138. 'id' => "{$prefix}teaser-indent",
  139. 'type' => 'checkbox',
  140. 'options' => array(
  141. 'no-indent' => __( 'Yes', 'rwmb' )
  142. ),
  143. ),
  144. array(
  145. 'name' => __( 'Image', 'rwmb' ),
  146. 'id' => "{$prefix}teaser_image",
  147. 'type' => 'image_advanced',
  148. 'max_file_uploads' => 1,
  149. 'clone' => false,
  150. 'hidden' => array( 'meta_teaser_type', 'plain' )
  151.  
  152. ),
  153. array(
  154. 'name' => __( 'Link', 'rwmb' ),
  155. 'id' => "{$prefix}teaser_link",
  156. 'type' => 'post',
  157. 'clone' => false,
  158. 'force_delete' => true,
  159. 'std' => '',
  160. 'field_type' => 'select_advanced',
  161. 'query_args' => array(
  162. 'post_status' => 'publish',
  163. 'posts_per_page' => '-1',
  164. 'post_type' => array('event','exhibition', 'page'),
  165.  
  166. ),
  167. 'hidden' => array( 'page_template', 'tmpl.shop.php' )
  168.  
  169. ),
  170.  
  171. array(
  172. 'name' => __( 'Category Link', 'rwmb' ),
  173. 'id' => "{$prefix}teaser_special_link",
  174. 'type' => 'taxonomy',
  175. 'taxonomy' => 'product_cat',
  176.  
  177. 'clone' => false,
  178. 'force_delete' => true,
  179. 'std' => '',
  180. 'field_type' => 'select_advanced',
  181. 'query_args' => array(
  182. 'post_status' => 'publish',
  183. 'posts_per_page' => '-1',
  184. 'post_type' => array('product'),
  185.  
  186. ),
  187. 'visible' => array( 'page_template', 'tmpl.shop.php' )
  188.  
  189. ),
  190.  
  191. array(
  192. 'name' => __( 'Link text (optional)', 'rwmb' ),
  193. 'id' => "{$prefix}teaser_link_text",
  194. 'type' => 'text',
  195. 'visible' => array( 'meta_teaser_type', 'plain' )
  196.  
  197. ),
  198. ),
  199. ),
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206. )
  207. );
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×