function caviar_meta_box2_callback($post) { wp_nonce_field('caviar_save_meta_box2_data', 'caviar_meta_box2_nonce'); $txtDetail = get_post_meta($post->ID, '_txtDetail', true); $txtArea = get_post_meta($post->ID, '_txtArea', true); $fieldy = array('scenery' => array('id' => 'sceneTitle', 'title' => 'Scenery', 'type' => 'text'), 'pic' => array('id' => 'scenePic', 'title' => 'Scene Pic', 'type' => 'upload')); $fieldControl = new Field_Controls(); $fieldControl->upload('Featured', 'upFeatured', array('name' => 'upFeatured', 'value' => $upPhoto, 'class' => 'single previewImage', 'placeholder' => esc_html__('Featured URL', 'claypress'))); $fieldControl->editor('Detail', 'txtDetail', array('value' => esc_attr($txtDetail))); $fieldControl->editor('Area', 'txtArea', array('value' => esc_attr($txtArea))); $fieldControl->repeaterField('Scene', 'reScene', array('name' => 'reScene', 'value' => $reScene), $fieldy); }