From a846684cfcf2f0461087d9d1bbcd749ae376c0e5 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 8 Mar 2018 03:56:50 +0000 Subject: [PATCH] Docs: Improve documentation for `add_meta_boxes` and `do_meta_boxes` actions. Props danieltj, johnbillion, SergeyBiryukov. Fixes #43229. git-svn-id: https://develop.svn.wordpress.org/trunk@42796 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/edit-form-advanced.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/edit-form-advanced.php b/src/wp-admin/edit-form-advanced.php index f52a5aa288..9e1a33c09b 100644 --- a/src/wp-admin/edit-form-advanced.php +++ b/src/wp-admin/edit-form-advanced.php @@ -357,8 +357,9 @@ if ( post_type_supports( $post_type, 'author' ) && current_user_can( $post_type_ * * @since 3.0.0 * - * @param string $post_type Post type. - * @param WP_Post $post Post object. + * @param string $post_type Post type for posts, 'comment' for comments, + * 'link' for links. + * @param WP_Post|WP_Comment|object $post Post, comment, or link object. */ do_action( 'add_meta_boxes', $post_type, $post ); @@ -380,9 +381,11 @@ do_action( "add_meta_boxes_{$post_type}", $post ); * * @since 3.0.0 * - * @param string $post_type Post type of the post. - * @param string $context string Meta box context. - * @param WP_Post $post Post object. + * @param string $post_type Post type for posts, 'dashboard' for dashboard widgets, + * 'link' for links. + * @param string $context Meta box context. Accepts 'normal', 'advanced', 'side'. + * @param WP_Post|string|object $post Post object for posts, empty string for dashboard widgets, + * link object for links. */ do_action( 'do_meta_boxes', $post_type, 'normal', $post ); /** This action is documented in wp-admin/edit-form-advanced.php */