From c55e62a9ae978356a9549e9e0eb298df166e415d Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 19 Oct 2011 23:01:55 +0000 Subject: [PATCH] Make $screen argument for add_meta_box() (previously $page) optional. see #18958. git-svn-id: https://develop.svn.wordpress.org/trunk@19019 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/template.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index b57a751b35..f2560c8994 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -839,11 +839,11 @@ function wp_import_upload_form( $action ) { * @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|object $screen The screen on which to show the box (post, page, link). - * @param string $context The context within the page where the boxes should show ('normal', 'advanced'). - * @param string $priority The priority within the context where the boxes should show ('high', 'low'). + * @param string|object Optional. $screen The screen on which to show the box (post, page, link). Defaults to current screen. + * @param string $context Optional. The context within the page where the boxes should show ('normal', 'advanced'). + * @param string $priority Optional. The priority within the context where the boxes should show ('high', 'low'). */ -function add_meta_box($id, $title, $callback, $screen, $context = 'advanced', $priority = 'default', $callback_args=null) { +function add_meta_box( $id, $title, $callback, $screen = null, $context = 'advanced', $priority = 'default', $callback_args = null ) { global $wp_meta_boxes; if ( empty( $screen ) )