WP_Post_Type::register_meta_boxes() WordPress Method
The WP_Post_Type::register_meta_boxes() method allows you to add meta boxes to a custom post type. This is useful for adding custom fields to a post type. The first parameter is an array of meta box options. The second parameter is the post type name. The third parameter is the post type object.
WP_Post_Type::register_meta_boxes() #
Registers the post type meta box if a custom callback was specified.
Source
File: wp-includes/class-wp-post-type.php
public function register_meta_boxes() {
if ( $this->register_meta_box_cb ) {
add_action( 'add_meta_boxes_' . $this->name, $this->register_meta_box_cb, 10, 1 );
}
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 4.6.0 | Introduced. |