diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 64da6730f4..5aca0a960b 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -218,6 +218,8 @@ else + + 1 ) : + + diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 0b1305add9..a5c7693e55 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -845,4 +845,36 @@ function wp_remember_old_slug() { echo ''; } +/** + * add_meta_box() - Add a meta box to an edit form + * + * @since 2.5 + * + * @param string $id String for use in the 'id' attribute of tags. + * @param string $title Title of the meta box + * @param string $callback Function that fills the box with the desired content. The function should echo its output. + * @param string $context The context in which the box should be displayed. edit_post, edit_page, edit_link, edit_post_advanced... + */ +function add_meta_box($id, $title, $callback, $context) { + global $wp_meta_boxes; + + $wp_meta_boxes[$context][] = array('id' => $id, 'title' => $title, 'callback' => $callback); +} + +function do_meta_boxes($context, $object) { + global $wp_meta_boxes; + + if ( !isset($wp_meta_boxes) || !isset($wp_meta_boxes[$context]) ) + return; + + foreach ( (array) $wp_meta_boxes[$context] as $box ) { + echo '