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

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

  /**
   * Create a custom meta boxes array that we pass to 
   * the OptionTree Meta Box API Class.
   */
  $schedule_meta_box = array(
    'id'          => 'xs_schedule_meta_box',
    'title'       => __( 'Schedule Time', 'option-tree-theme' ),
    'desc'        => '',
    'pages'       => array( 'xs_schedule' ),
    'context'     => 'side',
    'priority'    => 'high',
    'fields'      => array(
      array(
        'label'       => '',
        'id'          => 'xs_schedule_time',
        'type'        => 'text',
        'desc'        => '',
        'std'         => '10:00 am'
      )
    )
  );
  
  /**
   * Register our meta boxes using the 
   * ot_register_meta_box() function.
   */
	if ( function_exists( 'ot_register_meta_box' ) ){
		ot_register_meta_box( $schedule_meta_box );
	}

}