admin/mf_post.php
function mf_metabox_content( $post, $metabox ) {
    global $mf_domain, $mf_post_values;

    //Getting the custom fields for this metabox
    $custom_fields = $this->get_custom_fields_by_group($metabox['args']['group_info']['id']);
    $group_id = $metabox['args']['group_info']['id'];
    //default markup
    ?>
    <div class="mf-group-wrapper group-<?php print $group_id;?>" id="mf_group-<?php print $group_id; ?>" >
      <!-- grupos se puede repetir -->
      <?php
        $extraclass = "";
        if( $metabox['args']['group_info']['duplicated'] ) {
          $extraclass = "mf_duplicate_group";
          $repeated_groups = $this->mf_get_duplicated_groups( $post->ID, $group_id );
        } else {
          $repeated_groups = 1;
        }

        for( $group_index = 1; $group_index <= $repeated_groups; $group_index++ ){
          $only = ($repeated_groups == 1)? TRUE : FALSE;
          $this->mf_draw_group($metabox,$extraclass,$group_index,$custom_fields,$mf_post_values,$only);
        }
        printf('<input value="%d" id="mf_group_counter_%d" style="display:none" >',$repeated_groups,$group_id);
      ?>
      <!-- fin del grupo -->
    </div>
  <?php
  }
function mf_metabox_content( $post, $metabox ) {
    global $mf_domain, $mf_post_values;

    //Getting the custom fields for this metabox
    $custom_fields = $this->get_custom_fields_by_group($metabox['args']['group_info']['id']);
    $group_id = $metabox['args']['group_info']['id'];
    //default markup
    ?>
    <div class="mf-group-wrapper group-<?php print $group_id;?>" id="mf_group-<?php print $group_id; ?>" >
      <!-- grupos se puede repetir -->
      <?php
        $extraclass = "";
        if( $metabox['args']['group_info']['duplicated'] ) {
          $extraclass = "mf_duplicate_group";
          $repeated_groups = $this->mf_get_duplicated_groups( $post->ID, $group_id );
        } else {
          $repeated_groups = 1;
        }

        for( $group_index = 1; $group_index <= $repeated_groups; $group_index++ ){
          $only = ($repeated_groups == 1)? TRUE : FALSE;
          $this->mf_draw_group($metabox,$extraclass,$group_index,$custom_fields,$mf_post_values,$only);
        }
        printf('<input value="%d" id="mf_group_counter_%d" style="display:none" >',$repeated_groups,$group_id);
      ?>
      <!-- fin del grupo -->
    </div>
  <?php
  }
function mf_metabox_content ( $ post , $ metabox ) { global $ mf_domain , $ mf_post_values ; //Getting the custom fields for this metabox $ custom_fields = $ this -> get_custom_fields_by_group ( $ metabox [ 'args' ] [ 'group_info' ] [ 'id' ] ) ; $ group_id = $ metabox [ 'args' ] [ 'group_info' ] [ 'id' ] ; //default markup ?>
    <div class="mf-group-wrapper group-<?php print $ group_id ; ?>" id="mf_group-<?php print $ group_id ; ?>" >
      <!-- grupos se puede repetir -->
      <?php $ extraclass = "" ; if ( $ metabox [ 'args' ] [ 'group_info' ] [ 'duplicated' ] ) { $ extraclass = "mf_duplicate_group" ; $ repeated_groups = $ this -> mf_get_duplicated_groups ( $ post -> ID , $ group_id ) ; } else { $ repeated_groups = 1 ; } for ( $ group_index = 1 ; $ group_index <= $ repeated_groups ; $ group_index ++ ) { $ only = ( $ repeated_groups == 1 ) ? TRUE : FALSE ; $ this -> mf_draw_group ( $ metabox , $ extraclass , $ group_index , $ custom_fields , $ mf_post_values , $ only ) ; } printf ( '<input value="%d" id="mf_group_counter_%d" style="display:none" >' , $ repeated_groups , $ group_id ) ; ?>
      <!-- fin del grupo -->
    </div>
  <?php }
Fill a metabox with custom fields
Fill a metabox with custom fields