Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' );
- function your_prefix_register_meta_boxes( $meta_boxes ) {
- $prefix = '';
- $meta_boxes[] = array (
- 'title' => esc_html__( 'Group', 'text-domain' ),
- 'id' => 'group',
- 'post_types' => array(
- 0 => 'post',
- ),
- 'context' => 'normal',
- 'priority' => 'high',
- 'fields' => array(
- array (
- 'id' => $prefix . 'group',
- 'type' => 'group',
- 'name' => esc_html__( 'Group', 'text-domain' ),
- 'fields' => array(
- array (
- 'id' => $prefix . 'slider',
- 'type' => 'slider',
- 'name' => esc_html__( 'Slider', 'text-domain' ),
- 'std' => 16,
- 'clone' => 1,
- 'clone_default' => 1,
- ),
- array (
- 'id' => $prefix . 'button_group',
- 'name' => esc_html__( 'Button Group', 'text-domain' ),
- 'type' => 'button_group',
- 'std' => array(
- 0 => '3',
- 1 => '4',
- ),
- 'options' => array(
- 1 => esc_html__( '1', 'text-domain' ),
- 2 => esc_html__( '2', 'text-domain' ),
- 3 => esc_html__( '3', 'text-domain' ),
- 4 => esc_html__( '4', 'text-domain' ),
- ),
- 'clone' => 1,
- 'inline' => 1,
- 'multiple' => 1,
- 'clone_default' => 1,
- ),
- array (
- 'id' => $prefix . 'checkbox',
- 'name' => esc_html__( 'Checkbox', 'text-domain' ),
- 'type' => 'checkbox',
- 'desc' => esc_html__( 'Default Description', 'text-domain' ),
- 'std' => 1,
- ),
- ),
- 'clone' => 1,
- 'default_state' => 'expanded',
- 'clone_default' => 1,
- 'collapsible' => true,
- ),
- ),
- );
- return $meta_boxes;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement