public function edit_custom_taxonomy() {

    if(!isset($_GET['custom_taxonomy_id']) ){
      $this->mf_redirect(null,null,array('message' => 'success'));
    }

    $custom_taxonomy = $this->get_custom_taxonomy($_GET['custom_taxonomy_id']);

    if( !$custom_taxonomy ){
      $this->mf_redirect(null,null,array('message' => 'error'));
    }
    $data = $this->fields_form();

    $post_types = array();
    if( isset($custom_taxonomy['post_types']) ){
      foreach($custom_taxonomy['post_types'] as $k => $v){
        array_push($post_types,$v);
      }
      $data['taxonomy']['post_type'] = $post_types;
    }
    // update fields
    $perm = array('core','option','label');
    foreach($custom_taxonomy as $key => $value){
      if( in_array($key,$perm) ){
        foreach($value as $id => $val){
          $data[$key][$id]['value'] = $val;
        }
      }
    }
    $this->form_custom_taxonomy($data);
  }