Make $screen argument for add_meta_box() (previously $page) optional. see #18958.

git-svn-id: http://svn.automattic.com/wordpress/trunk@19019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-10-19 23:01:55 +00:00
parent f11bc146f7
commit 51657715c1

View File

@ -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 ) )