posttype = $posttype; $this->metaboxes_fields = $fields; add_action( 'add_meta_boxes', array( &$this, 'new_metaboxes' ) ); add_action( 'save_post', array( &$this, 'diarjolite_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': ?>


" style="width:100%"/>


term_id] = $slideshow->name; } ?>


metaboxes_fields ; foreach ($metaboxes_fields as $value) { foreach ($value as $field) { if ((isset($field['id'])) && (isset($_POST[$field['id']]))) { $new = $_POST[$field['id']]; if ( $field['id'] <> "galleries" ) { update_post_meta( $post_id , $field['id'], $new ); } } } } } } ?>