Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // teasers
- $meta_boxes[] = array(
- 'id' => 'teaser_title',
- 'title' => 'Teaser',
- 'pages' => array( 'page'),
- 'show' => array(
- 'relation' => 'OR',
- 'template' => array( 'index.php', 'tmpl.whats-on.php', 'tmpl.visit.php', 'tmpl.landing.php', 'tmpl.shop.php','tmpl.about.php', 'default', 'archive-product.php'),
- ),
- 'fields' => array(
- array(
- 'id' => 'teaser_tiles',
- 'type' => 'group',
- 'clone' => true,
- 'max_clone' => 10,
- 'sort_clone' => true,
- 'collapsible' => true,
- 'group_title' => 'Teaser',
- 'fields' => array(
- array(
- 'name' => __( 'Type', 'rwmb' ),
- 'id' => "{$prefix}teaser_type",
- 'type' => 'select',
- 'clone_default' => true,
- 'options' => array(
- 'half' => __( 'Half', 'rwmb' ),
- 'small-image' => __( 'Small image', 'rwmb' ),
- 'center-image' => __( 'Center image', 'rwmb' ),
- 'plain' => __( 'Plain', 'rwmb' ),
- ),
- 'multiple' => false,
- 'placeholder' => __( 'Select', 'rwmb' ),
- 'std' => 'image',
- ),
- array(
- 'name' => __( 'Colour', 'rwmb' ),
- 'id' => "{$prefix}teaser_colour",
- 'type' => 'select',
- 'clone_default' => true,
- 'options' => array(
- 'red' => __( 'Red', 'rwmb' ),
- 'dark-blue' => __( 'Purple', 'rwmb' ),
- 'light-blue' => __( 'Light Blue', 'rwmb' ),
- 'brown' => __( 'Brown', 'rwmb' ),
- 'white' => __( 'White', 'rwmb' ),
- ),
- 'multiple' => false,
- 'placeholder' => __( 'Select', 'rwmb' ),
- 'std' => 'image',
- ),
- // Half
- array(
- 'name' => __( 'Half Image Align', 'rwmb' ),
- 'id' => "{$prefix}teaser_half_align",
- 'type' => 'select',
- 'clone_default' => false,
- 'options' => array(
- 'half-left' => __( 'Left', 'rwmb' ),
- 'half-right' => __( 'Right', 'rwmb' ),
- ),
- 'multiple' => false,
- 'placeholder' => __( 'Select', 'rwmb' ),
- 'std' => 'image',
- 'visible' => array( 'meta_teaser_type', 'half' )
- ),
- // Small Image
- array(
- 'name' => __( 'Small Image Align', 'rwmb' ),
- 'id' => "{$prefix}teaser_small_image_align",
- 'type' => 'select',
- 'clone_default' => false,
- 'options' => array(
- 'small-top-left' => __( 'Top Left', 'rwmb' ),
- 'small-top-right' => __( 'Top Right', 'rwmb' ),
- 'small-bottom-left' => __( 'Bottom Left', 'rwmb' ),
- 'small-bottom-right' => __( 'Bottom Right', 'rwmb' ),
- ),
- 'multiple' => false,
- 'placeholder' => __( 'Select', 'rwmb' ),
- 'std' => 'image',
- 'visible' => array( 'meta_teaser_type', 'small-image' )
- ),
- // Plain
- array(
- 'name' => __( 'Big Heading Align', 'rwmb' ),
- 'id' => "{$prefix}teaser_plain_heading_align",
- 'type' => 'select',
- 'clone_default' => false,
- 'options' => array(
- 'plain-top-left' => __( 'Top Left', 'rwmb' ),
- 'plain-top-right' => __( 'Top Right', 'rwmb' ),
- 'plain-bottom-left' => __( 'Bottom Left', 'rwmb' ),
- 'plain-bottom-right' => __( 'Bottom Right', 'rwmb' ),
- ),
- 'multiple' => false,
- 'placeholder' => __( 'Select', 'rwmb' ),
- 'std' => 'image',
- 'visible' => array( 'meta_teaser_type', 'plain' )
- ),
- // Content
- array(
- 'name' => __( 'Big Heading', 'rwmb' ),
- 'id' => "{$prefix}teaser_big_heading",
- 'type' => 'textarea',
- 'cols' => 10,
- 'rows' => 2,
- ),
- array(
- 'name' => __( 'Copy', 'rwmb' ),
- 'id' => "{$prefix}teaser_copy",
- 'type' => 'textarea',
- 'cols' => 10,
- 'rows' => 2,
- ),
- array(
- 'name' => __( 'No text indent?', 'rwmb' ),
- 'id' => "{$prefix}teaser-indent",
- 'type' => 'checkbox',
- 'options' => array(
- 'no-indent' => __( 'Yes', 'rwmb' )
- ),
- ),
- array(
- 'name' => __( 'Image', 'rwmb' ),
- 'id' => "{$prefix}teaser_image",
- 'type' => 'image_advanced',
- 'max_file_uploads' => 1,
- 'clone' => false,
- 'hidden' => array( 'meta_teaser_type', 'plain' )
- ),
- array(
- 'name' => __( 'Link', 'rwmb' ),
- 'id' => "{$prefix}teaser_link",
- 'type' => 'post',
- 'clone' => false,
- 'force_delete' => true,
- 'std' => '',
- 'field_type' => 'select_advanced',
- 'query_args' => array(
- 'post_status' => 'publish',
- 'posts_per_page' => '-1',
- 'post_type' => array('event','exhibition', 'page'),
- ),
- 'hidden' => array( 'page_template', 'tmpl.shop.php' )
- ),
- array(
- 'name' => __( 'Category Link', 'rwmb' ),
- 'id' => "{$prefix}teaser_special_link",
- 'type' => 'taxonomy',
- 'taxonomy' => 'product_cat',
- 'clone' => false,
- 'force_delete' => true,
- 'std' => '',
- 'field_type' => 'select_advanced',
- 'query_args' => array(
- 'post_status' => 'publish',
- 'posts_per_page' => '-1',
- 'post_type' => array('product'),
- ),
- 'visible' => array( 'page_template', 'tmpl.shop.php' )
- ),
- array(
- 'name' => __( 'Link text (optional)', 'rwmb' ),
- 'id' => "{$prefix}teaser_link_text",
- 'type' => 'text',
- 'visible' => array( 'meta_teaser_type', 'plain' )
- ),
- ),
- ),
- )
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement