diff --git a/src/wp-admin/includes/meta-boxes.php b/src/wp-admin/includes/meta-boxes.php index c52b4787a3044..52f43d0b685f4 100644 --- a/src/wp-admin/includes/meta-boxes.php +++ b/src/wp-admin/includes/meta-boxes.php @@ -1677,25 +1677,31 @@ function register_and_do_post_meta_boxes( $post ) { * * @since 3.0.0 * - * @param string $post_type Post type. - * @param WP_Post $post Post object. + * @param string $object_type The type of the current object that meta boxes were added to. + * Can be 'post', 'page', custom post types, 'comment', or 'link'. + * @param WP_Post|WP_Comment|object $object The post, comment, or link object. Type varies depending on + * `$object_type`. */ do_action( 'add_meta_boxes', $post_type, $post ); /** * Fires after all built-in meta boxes have been added, contextually for the given post type. * - * The dynamic portion of the hook name, `$post_type`, refers to the post type of the post. + * The dynamic portion of the hook name, `$post_type`, refers to the post type of the post, + * or the object type (comment, link). * * Possible hook names include: * * - `add_meta_boxes_post` * - `add_meta_boxes_page` * - `add_meta_boxes_attachment` + * - `add_meta_boxes_comment` + * - `add_meta_boxes_link` * * @since 3.0.0 * - * @param WP_Post $post Post object. + * @param WP_Post|WP_Comment|object $object The post, comment, or link object. Type varies depending on + * the hook name. */ do_action( "add_meta_boxes_{$post_type}", $post ); @@ -1706,11 +1712,11 @@ function register_and_do_post_meta_boxes( $post ) { * * @since 3.0.0 * - * @param string $post_type Post type of the post on Edit Post screen, 'link' on Edit Link screen, - * 'dashboard' on Dashboard screen. - * @param string $context Meta box context. Possible values include 'normal', 'advanced', 'side'. - * @param WP_Post|object|string $post Post object on Edit Post screen, link object on Edit Link screen, - * an empty string on Dashboard screen. + * @param string $object_type Post type of the post on Edit Post screen, 'link' on Edit Link screen, + * 'dashboard' on Dashboard screen. + * @param string $context Meta box context. Possible values include 'normal', 'advanced', 'side'. + * @param WP_Post|object|string $object Post object on Edit Post screen, link object on Edit Link screen, + * an empty string on Dashboard screen. */ do_action( 'do_meta_boxes', $post_type, 'normal', $post ); /** This action is documented in wp-admin/includes/meta-boxes.php */