badah
6/21/2014 - 7:57 PM

default_hidden_meta_boxes.php

<?php

/**
 * vpm_default_hidden_meta_boxes
 */
function vpm_default_hidden_meta_boxes( $hidden, $screen ) {
	// Grab the current post type
	$post_type = $screen->post_type;

	// If we're on a 'post'...
	if ( $post_type == 'post' ) {
		// Define which meta boxes we wish to hide
		$hidden = array(
			'authordiv',
			'revisionsdiv',
		);

		// Pass our new defaults onto WordPress
		return $hidden;
	}

	// If we are not on a 'post', pass the
	// original defaults, as defined by WordPress
	return $hidden;
}

add_action( 'default_hidden_meta_boxes', 'vpm_default_hidden_meta_boxes', 10, 2 );