add_meta_boxes
Fires after all built-in meta boxes have been added.
Usage
add_action( 'add_meta_boxes', 'wp_kama_add_meta_boxes_action', 10, 2 ); /** * Function for `add_meta_boxes` action-hook. * * @param string $post_type Post type. * @param WP_Post $post Post object. * * @return void */ function wp_kama_add_meta_boxes_action( $post_type, $post ){ // action... }
- $post_type(string)
- Post type.
- $post(WP_Post)
- Post object.
Changelog
Since 3.0.0 | Introduced. |
Where the hook is called
add_meta_boxes
wp-admin/includes/meta-boxes.php 1716
do_action( 'add_meta_boxes', $post_type, $post );
wp-admin/edit-form-comment.php 257
do_action( 'add_meta_boxes', 'comment', $comment );
wp-admin/edit-link-form.php 37
do_action( 'add_meta_boxes', 'link', $link );