<?php
/**
 * Initialize the custom Meta Boxes. 
 */
add_action( 'admin_init', 'xs_register_list_boxes' );
add_action( 'admin_init', 'xs_register_list_boxes2' );

/**
 * Meta Boxes demo code.
 *
 * You can find all the available option types in theme-options.php.
 *
 * @return    void
 * @since     2.3.0
 */
function xs_register_list_boxes() {

  /**
   * Create a custom meta boxes array that we pass to 
   * the OptionTree Meta Box API Class.
   */
  $xs_register_list_box = array(
    'id'          => 'xs_register_list_box',
    'title'       => __( 'User Data', 'option-tree-theme' ),
    'desc'        => '',
    'pages'       => array( 'xs_register_list' ),
    'context'     => 'side',
    'priority'    => 'default',
    'fields'      => array(
      array(
        'label'       => __( 'Name', 'option-tree-theme' ),
        'id'          => 'xs_register_name',
        'type'        => 'text',
        'desc'        => '',
        'std'         => ''
      ),
      array(
        'label'       => __( 'Phone', 'option-tree-theme' ),
        'id'          => 'xs_register_phone',
        'type'        => 'text',
        'desc'        => '',
        'std'         => ''
      ),
    /*  array(
        'label'       => __( 'Package', 'option-tree-theme' ),
        'id'          => 'xs_register_package',
        'type'        => 'text',
        'desc'        => '',
        'std'         => ''
      ), */
      array(
        'label'       => __( 'Email', 'option-tree-theme' ),
        'id'          => 'xs_register_email',
        'type'        => 'text',
        'desc'        => '',
        'std'         => ''
      )
    )
  );
  
  /**
   * Register our meta boxes using the 
   * ot_register_meta_box() function.
   */
	if ( function_exists( 'ot_register_meta_box' ) ){
		ot_register_meta_box( $xs_register_list_box );
	}

}

function xs_register_list_boxes2() {

  /**
   * Create a custom meta boxes array that we pass to 
   * the OptionTree Meta Box API Class.
   */
  $xs_register_list_box2 = array(
    'id'          => 'xs_register_list_box2',
    'title'       => __( 'User Message', 'option-tree-theme' ),
    'desc'        => '',
    'pages'       => array( 'xs_register_list' ),
    'context'     => 'normal',
    'priority'    => 'high',
    'fields'      => array(
      array(
        'label'       => __( 'Message', 'option-tree-theme' ),
        'id'          => 'xs_register_message',
        'type'        => 'textarea',
        'desc'        => '',
        'std'         => ''
      )
    )
  );
  
  /**
   * Register our meta boxes using the 
   * ot_register_meta_box() function.
   */
	if ( function_exists( 'ot_register_meta_box' ) ){
		ot_register_meta_box( $xs_register_list_box2 );
	}

}