Advertisements

remove_meta_box

Definition:
function remove_meta_box($id, $page, $context) {}

Remove a meta box from an edit form.

Parameters

  • string $id: String for use in the ‘id’ attribute of tags.
  • string|object $screen: The screen on which to show the box (post, page, link).
  • string $context: The context within the page where the boxes should show (‘normal’, ‘advanced’).

Source code

function remove_meta_box($id, $page, $context) {

	global $wp_meta_boxes;



	if ( !isset($wp_meta_boxes) )

		$wp_meta_boxes = array();

	if ( !isset($wp_meta_boxes[$page]) )

		$wp_meta_boxes[$page] = array();

	if ( !isset($wp_meta_boxes[$page][$context]) )

		$wp_meta_boxes[$page][$context] = array();



	foreach ( array('high', 'core', 'default', 'low') as $priority )

		$wp_meta_boxes[$page][$context][$priority][$id] = false;

}

2711

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: