On this page
do_action( 'add_meta_boxes', string $post_type, WP_Post $post )
Fires after all built-in meta boxes have been added.
Parameters
$post_typestring-
Post type.
$postWP_Post-
Post object.
More Information
The hook allows meta box registration for any post type.
Passes two parameters: $post_type and $post.
Note: You can also use add_meta_boxes_{post_type} for best practice, so your hook will only run when editing a specific post type. This will only receive 1 parameter – $post.
Source
File: wp-admin/includes/meta-boxes.php. View all references
do_action( 'add_meta_boxes', $post_type, $post );
Related
Used By
| Used By | Description |
|---|---|
| register_and_do_post_meta_boxes() wp-admin/includes/meta-boxes.php | Registers the default post meta boxes, and runs the |
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/add_meta_boxes