posttype = $posttype; $this->metaboxes_fields = $fields; add_action( 'add_meta_boxes', array( &$this, 'new_metaboxes' ) ); add_action( 'save_post', array( &$this, 'sheeba_lite_metaboxes_save' ) ); } public function new_metaboxes() { $posttype = $this->posttype ; add_meta_box( $posttype, ucfirst($posttype).' settings', array( &$this, 'metaboxes_panel' ), $posttype, 'normal', 'high' ); } public function metaboxes_panel() { $metaboxes_fields = $this->metaboxes_fields ; global $post, $post_id; foreach ($metaboxes_fields as $value) { switch ( $value['type'] ) { case 'navigation': ?>