add_meta_boxes_<post_type>
Fires after all built-in meta boxes have been added, contextually for the given post type.
Description
The dynamic portion(s) of the hook refer to the post type of the post.
Parameters (1)
- 0. $post (WP_Post)
- Post object.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'add_meta_boxes_{$post_type}', $post );
- The following example is for adding a hook callback.
- // define the add_meta_boxes_<post_type> callback
- function action_add_meta_boxes_post_type( $post ) {
- // make action magic happen here...
- };
- // add the action
- add_action( "add_meta_boxes_{$post_type}", 'action_add_meta_boxes_post_type', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( "add_meta_boxes_{$post_type}", 'action_add_meta_boxes_post_type', 10, 1 );
Defined (1)
The action is defined in the following location(s).
- /wp-admin/edit-form-advanced.php
- do_action( "add_meta_boxes_{$post_type}", $post );