do_action( 'add_meta_boxes', string $post_type , WP_Post $post )
Fires after all built-in meta boxes have been added.
Description Description
Parameters Parameters
- $post_type
-
(string) Post type.
- $post
-
(WP_Post) Post object.
Source Source
Changelog Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Best practice is to use add_meta_boxes_{post-type} to create less unnecessary hooks for other post types.
function adding_custom_meta_boxes( $post_type, $post ) { add_meta_box( 'my-meta-box', __( 'My Meta Box' ), 'render_my_meta_box', 'post', 'normal', 'default' ); } add_action( 'add_meta_boxes', 'adding_custom_meta_boxes', 10, 2 );