<?php



/**



 * Registering meta boxes



 *



 * All the definitions of meta boxes are listed below with comments.



 * Please read them CAREFULLY.



 *



 * You also should read the changelog to know what has been changed before updating.



 *



 * For more information, please visit:



 * @link http://metabox.io/docs/registering-meta-boxes/



 */





 



add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' );







/**



 * Register meta boxes



 *



 * Remember to change "your_prefix" to actual prefix in your project



 *



 * @param array $meta_boxes List of meta boxes



 *



 * @return array



 */







function your_prefix_register_meta_boxes( $meta_boxes )

{



	/**



	 * prefix of meta keys (optional)



	 * Use underscore (_) at the beginning to make keys hidden



	 * Alt.: You also can make prefix empty to disable it



	 */



	// Better has an underscore as last sign



	$prefix = 'st_';

	

	

	

	$meta_boxes[] = array(



		// Meta box id, UNIQUE per meta box. Optional since 4.1.5



		'id'         => 'standard',







		// Meta box title - Will appear at the drag and drop handle bar. Required.



		'title'      => __( 'Standard Fields', 'meta-box' ),







		// Post types, accept custom post types as well - DEFAULT is 'post'. Can be array (multiple post types) or string (1 post type). Optional.



		'post_types' => array( 'speakers' ),







		// Where the meta box appear: normal (default), advanced, side. Optional.



		'context'    => 'advanced',







		// Order of meta box: high (default), low. Optional.



		'priority'   => 'high',







		// Auto save: true, false (default). Optional.



		'autosave'   => true,







		// List of meta fields



		'fields'     => array(

			// TEXT		



			array(



				// Field name - Will be used as label



				'name'  => __( 'Designation', 'meta-box' ),	



				// Field ID, i.e. the meta key


				'id'    => "{$prefix}designation",



				'type'  => 'text',



				'size'  => '60',				



			),		



		



		

		

		

		),		



		'validation' => array(

			'rules'    => array(

				"{$prefix}date" => array(

					'required'  => true,

				),

				"{$prefix}pdf" => array(

					'required'  => true,

				),

			),



			// optional override of default jquery.validate messages



			'messages' => array(



				"{$prefix}password" => array(



					'required'  => __( 'Password is required', 'meta-box' ),



					'minlength' => __( 'Password must be at least 7 characters', 'meta-box' ),



				),



			)



		)



	);

	

	

	

	

	$meta_boxes[] = array(



		// Meta box id, UNIQUE per meta box. Optional since 4.1.5



		'id'         => 'standard',







		// Meta box title - Will appear at the drag and drop handle bar. Required.



		'title'      => __( 'Standard Fields', 'meta-box' ),







		// Post types, accept custom post types as well - DEFAULT is 'post'. Can be array (multiple post types) or string (1 post type). Optional.



		'post_types' => array( 'page' ),







		// Where the meta box appear: normal (default), advanced, side. Optional.



		'context'    => 'advanced',







		// Order of meta box: high (default), low. Optional.



		'priority'   => 'high',







		// Auto save: true, false (default). Optional.



		'autosave'   => true,







		// List of meta fields



		'fields'     => array(		

			// TEXT		

			array(

				// Field name - Will be used as label

				'name'  => __( 'Header Banner', 'meta-box' ),	

				// Field ID, i.e. the meta key

				'id'    => "{$prefix}banner",

				'type'  => 'image',

				'max_file_uploads'	=> 1,

			),		

		

				// TEXT		



			array(



				// Field name - Will be used as label



				'name'  => __( 'Section 1 title', 'meta-box' ),	



				// Field ID, i.e. the meta key



				'id'    => "{$prefix}section1",



				'type'  => 'text',



				'size'  => '60',				



			),		



			



		



			// TEXT		



			array(



				// Field name - Will be used as label



				'name'  => __( 'Section 2 title', 'meta-box' ),	



				// Field ID, i.e. the meta key



				'id'    => "{$prefix}section2",



				'type'  => 'text',



				'size'  => '60',				



			),		



		



		

		

		

		),		



		'validation' => array(

			'rules'    => array(

				"{$prefix}date" => array(

					'required'  => true,

				),

				"{$prefix}pdf" => array(

					'required'  => true,

				),

			),



			// optional override of default jquery.validate messages



			'messages' => array(



				"{$prefix}password" => array(



					'required'  => __( 'Password is required', 'meta-box' ),



					'minlength' => __( 'Password must be at least 7 characters', 'meta-box' ),



				),



			)



		)



	);

	

	

	

	$meta_boxes[] = array(



		// Meta box id, UNIQUE per meta box. Optional since 4.1.5



		'id'         => 'standard',







		// Meta box title - Will appear at the drag and drop handle bar. Required.



		'title'      => __( 'Standard Fields', 'meta-box' ),







		// Post types, accept custom post types as well - DEFAULT is 'post'. Can be array (multiple post types) or string (1 post type). Optional.



		'post_types' => array( 'whoisinvolved' ),







		// Where the meta box appear: normal (default), advanced, side. Optional.



		'context'    => 'advanced',







		// Order of meta box: high (default), low. Optional.



		'priority'   => 'high',







		// Auto save: true, false (default). Optional.



		'autosave'   => true,







		// List of meta fields



		'fields'     => array(		

			// TEXT		

			array(

				// Field name - Will be used as label

				'name'  => __( 'Designation', 'meta-box' ),	

				// Field ID, i.e. the meta key

				'id'    => "{$prefix}designation",

				'type'  => 'text',

				'size'  => '60',

			),		

			

			// TEXT		

			array(

				// Field name - Will be used as label

				'name'  => __( 'Linkedin', 'meta-box' ),	

				// Field ID, i.e. the meta key

				'id'    => "{$prefix}linkedin",

				'size'  => '60',

			),	

		

		

		),		



		'validation' => array(

			'rules'    => array(

				"{$prefix}date" => array(

					'required'  => true,

				),

				"{$prefix}pdf" => array(

					'required'  => true,

				),

			),



			// optional override of default jquery.validate messages



			'messages' => array(



				"{$prefix}password" => array(



					'required'  => __( 'Password is required', 'meta-box' ),



					'minlength' => __( 'Password must be at least 7 characters', 'meta-box' ),



				),



			)



		)



	);

	

	

	

	$meta_boxes[] = array(



		// Meta box id, UNIQUE per meta box. Optional since 4.1.5



		'id'         => 'standard',







		// Meta box title - Will appear at the drag and drop handle bar. Required.



		'title'      => __( 'Standard Fields', 'meta-box' ),







		// Post types, accept custom post types as well - DEFAULT is 'post'. Can be array (multiple post types) or string (1 post type). Optional.



		'post_types' => array( 'timeline' ),







		// Where the meta box appear: normal (default), advanced, side. Optional.



		'context'    => 'advanced',







		// Order of meta box: high (default), low. Optional.



		'priority'   => 'high',







		// Auto save: true, false (default). Optional.



		'autosave'   => true,







		// List of meta fields



		'fields'     => array(		

			// TEXT		

			array(

				// Field name - Will be used as label

				'name'  => __('Period', 'meta-box' ),	

				// Field ID, i.e. the meta key

				'id'    => "{$prefix}period",

				'type'  => 'text',

				'size'  => '60',

			),		

			

		

		),		



		'validation' => array(

			'rules'    => array(

				"{$prefix}date" => array(

					'required'  => true,

				),

				"{$prefix}pdf" => array(

					'required'  => true,

				),

			),



			// optional override of default jquery.validate messages



			'messages' => array(



				"{$prefix}password" => array(



					'required'  => __( 'Password is required', 'meta-box' ),



					'minlength' => __( 'Password must be at least 7 characters', 'meta-box' ),



				),



			)



		)



	);

	

	

	

	$meta_boxes[] = array(



		// Meta box id, UNIQUE per meta box. Optional since 4.1.5



		'id'         => 'standard',







		// Meta box title - Will appear at the drag and drop handle bar. Required.



		'title'      => __( 'Standard Fields', 'meta-box' ),







		// Post types, accept custom post types as well - DEFAULT is 'post'. Can be array (multiple post types) or string (1 post type). Optional.



		'post_types' => array( 'supporting_partners' ),







		// Where the meta box appear: normal (default), advanced, side. Optional.



		'context'    => 'advanced',







		// Order of meta box: high (default), low. Optional.



		'priority'   => 'high',







		// Auto save: true, false (default). Optional.



		'autosave'   => true,







		// List of meta fields



		'fields'     => array(		

			// TEXT		

			array(

				// Field name - Will be used as label

				'name'  => __('Link', 'meta-box' ),	

				// Field ID, i.e. the meta key

				'id'    => "{$prefix}link",

				'type'  => 'text',

				'size'  => '60',

			),		

			

		

		),		



		'validation' => array(

			'rules'    => array(

				"{$prefix}date" => array(

					'required'  => true,

				),

				"{$prefix}pdf" => array(

					'required'  => true,

				),

			),



			// optional override of default jquery.validate messages



			'messages' => array(



				"{$prefix}password" => array(



					'required'  => __( 'Password is required', 'meta-box' ),



					'minlength' => __( 'Password must be at least 7 characters', 'meta-box' ),



				),



			)



		)



	);

	

	return $meta_boxes;



}