WP_Post_Type::unregister_meta_boxes() WordPress Method

The WP_Post_Type::unregister_meta_boxes() function can be used to remove any registered meta boxes for a given post type. This function is useful for removing unwanted meta boxes, or for reordering the meta boxes that are displayed.

WP_Post_Type::unregister_meta_boxes() #

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


Source

File: wp-includes/class-wp-post-type.php

	public function unregister_meta_boxes() {
		if ( $this->register_meta_box_cb ) {
			remove_action( 'add_meta_boxes_' . $this->name, $this->register_meta_box_cb, 10 );
		}
	}


Top ↑

Changelog

Changelog
VersionDescription
4.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.