add_meta_boxes_<name>

Registers the post type meta box if a custom callback was specified.

Description

add_action( 'add_meta_boxes_<name>', (unknown) $this_register_meta_box_cb, (int) $int, (int) $int ); 

Parameters (3)

0. $this_register_meta_box_cb (unknown)
The this register meta box cb.
1. $int (int) => 10
The int.
2. $int (int) => 1
The int.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'add_meta_boxes_{$name}', $this_register_meta_box_cb, $int, $int ); 
The following example is for adding a hook callback.
  1. // define the add_meta_boxes_<name> callback 
  2. function action_add_meta_boxes_name( $this_register_meta_box_cb, $int, $int ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( "add_meta_boxes_{$name}", 'action_add_meta_boxes_name', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( "add_meta_boxes_{$name}", 'action_add_meta_boxes_name', 10, 3 ); 

Defined (2)

The action is defined in the following location(s).

/wp-includes/class-wp-post-type.php  
  1. add_action( 'add_meta_boxes_' . $this->name, $this->register_meta_box_cb, 10, 1 ); 
  1. remove_action( 'add_meta_boxes_' . $this->name, $this->register_meta_box_cb, 10 );