original_string: function edit_field() {
      global $mf_domain;
  
      //check param custom_field_id
      $data = $this->fields_form();
      $field = $this->get_custom_field($_GET['custom_field_id']);
  
      //check if exist field
      if(!$field){
        $this->mf_flash('error');
      }else{
        $no_set = array('options','active','display_order');
        foreach($field as $k => $v){
          if( !in_array($k,$no_set) ){
            $data['core'][$k]['value'] = $v;
          }
        }
        $data['option'] = unserialize($field['options'] );
      }
      $this->form_custom_field($data);
      ?>
      <?php
    }
code: function edit_field() {
      global $mf_domain;
  
      //check param custom_field_id
      $data = $this->fields_form();
      $field = $this->get_custom_field($_GET['custom_field_id']);
  
      //check if exist field
      if(!$field){
        $this->mf_flash('error');
      }else{
        $no_set = array('options','active','display_order');
        foreach($field as $k => $v){
          if( !in_array($k,$no_set) ){
            $data['core'][$k]['value'] = $v;
          }
        }
        $data['option'] = unserialize($field['options'] );
      }
      $this->form_custom_field($data);
      ?>
      <?php
    }
code_tokens: function edit_field ( ) { global $ mf_domain ; //check param custom_field_id $ data = $ this -> fields_form ( ) ; $ field = $ this -> get_custom_field ( $ _GET [ 'custom_field_id' ] ) ; //check if exist field if ( ! $ field ) { $ this -> mf_flash ( 'error' ) ; } else { $ no_set = array ( 'options' , 'active' , 'display_order' ) ; foreach ( $ field as $ k => $ v ) { if ( ! in_array ( $ k , $ no_set ) ) { $ data [ 'core' ] [ $ k ] [ 'value' ] = $ v ; } } $ data [ 'option' ] = unserialize ( $ field [ 'options' ] ) ; } $ this -> form_custom_field ( $ data ) ; ?>
      <?php }
docstring: Page for edit a custom field
docstring_tokens: Page for edit a custom field