Add a meta box to an edit form.

Signature

add_meta_box( $id, $title, $callback, $screen = null, $context = 'advanced', $priority = 'default', $callback_args = null )
id
 (string) String for use in the 'id' attribute of tags.
title
 (string) Title of the meta box.
callback
 (callback) Function that fills the box with the desired content. The function should echo its output.
screen
 (string|WP_Screen) Optional. The screen on which to show the box (like a post type, 'link', or 'comment'). Default is the current screen.
Default: null
context
 (string) Optional. The context within the screen where the boxes should display. Available contexts vary from screen to screen. Post edit screen contexts include 'normal', 'side', and 'advanced'. Comments screen contexts include 'normal' and 'side'. Menus meta boxes (accordion sections) all use the 'side' context. Global default is 'advanced'.
Default: 'advanced'
priority
 (string) Optional. The priority within the context where the boxes should show ('high', 'low'). Default 'default'.
Default: 'default'
callback_args
 (array) Optional. Data that should be set as the $args property of the box array (which is the second parameter passed to your callback). Default null.
Default: null

Return

(void)

Source

function add_meta_box( $id, $title, $callback, $screen = null, $context = 'advanced', $priority = 'default', $callback_args = null ) {
	global $wp_meta_boxes;

	if ( empty( $screen ) )
		$screen = get_current_screen();
	elseif ( is_string( $screen ) )
		$screen = convert_to_screen( $screen );

	$page = $screen->id;

	if ( !isset($wp_meta_boxes) )
		$wp_meta_boxes = array();
	if ( !isset($wp_meta_boxes[$page]) )
		$wp_meta_boxes[$page] = array();
	if ( !isset($wp_meta_boxes[$page][$context]) )
		$wp_meta_boxes[$page][$context] = array();

	foreach ( array_keys($wp_meta_boxes[$page]) as $a_context ) {
		foreach ( array('high', 'core', 'default', 'low') as $a_priority ) {
			if ( !isset($wp_meta_boxes[$page][$a_context][$a_priority][$id]) )
44 more lines...
WP Trac GitHub

Link here